## Maple Code Thu Apr 3 08:02:22 METDST 1997 ## UpDate Fri Jun 23 23:04:18 METDST 2000 ## ## ## Title: HYPERG package (for HYPERGeometric series) ## Content: A Maple Package about hypergeometric series ## Created: Thu Apr 3 08:02:22 METDST 1997 ## Author: Bruno Gauthier ## http://www-igm.univ-mlv.fr/~gauthier/HYPERG.html ## Address: Universite of Marne-la-Vallee, ## Institut Gaspard Monge, ## Cite Descartes, ## 5, Bd Descartes, Champs-sur-Marne, ## F-77454 Marne-la-Vallee, CEDEX 2, FRANCE ## ## ## Description: HYPERG is a package for the manipulation of hypergeometric ## series. It also provides tools for automatic proofs ## of identities, but they are just tools: every step ## in a series of manipulations has to be controlled by the ## user. The goal of this package is to make the algorithms ## in this area better known, and to help you enter ## the wonderful world of hypergeometric series. ## ## ## Several features of this package are due to C. Krattenthaler. ## ## Many thanks to C. Krattenthaler, M. Petkovsek, A. Tefera, D. Zeilberger ## for their helpful comments. ## ## ## ## Modifications: ## ## 1.0b HypContig improvement (C86, C118) Jun 2000 ## (thanks to Edgardo S. Cheb-Terrab) Jun 2000 ## 1.0a Oct 1999 ## 1.0 Jun 1999 ## 0.98a HypSolRec improvement (thanks to Akalu Tefera) Mar 1999 ## 0.98 PolySolRec and Gosper improvement Mar 1999 ## 0.97j T2111 Mar 1999 ## 0.97i HypConverg Feb 1999 ## 0.97h QRF modified and Gosper improvement Dec 1998 ## 0.97f MapApply, MapList (with depth) Nov 1998 ## 0.97d SumToHyp (with complex parameters) Oct 1998 ## 0.97b T1101 and fixed bugs Oct 1998 ## 0.97a HypDiff improvement Sep 1998 ## 0.97 PolySolQRec, RatioSolQRec, HypSolQRec, GenQRec Sep 1998 ## 0.96 HypType Jul 1998 ## 0.95 QBIN, IsQBIN, QBinEval Jul 1998 ## 0.94 HypSumList, HypTransfList Jun 1998 ## 0.90 transformation formulas T6501-T7694 Jun 1998 ## 0.88 transformation formulas T3204-T5403 Apr 1998 ## 0.87 summation formulas S7631-S7691 Apr 1998 ## 0.85 transformation formulas T2103-T2192 Apr 1998 ## 0.84 summation formulas S4306-S6532 Apr 1998 ## 0.83 RecOrder Apr 1998 ## 0.82 SimplifyRec, ShiftRec, SubsRec, CheckRec Mar 1998 ## 0.81 IsHomog, Homog Mar 1998 ## 0.80 HypDiff Feb 1998 ## 0.80 IsHyperg, HypergToRec Feb 1998 ## 0.80 contiguous formulas C104-C121 Feb 1998 ## 0.79 contiguous formulas C59-C103 Jan 1998 ## 0.78 very-well-poised basic hypergeometric series Jan 1998 ## 0.77 hypergeometric solutions of q-recurrences Nov 1997 ## 0.76 polynomial and rational solutions of q-recurrences Oct 1997 ## 0.75 basic hypergeometric series Oct 1997 ## 0.74 very-well-poised hypergeometric series Sep 1997 ## 0.73 MapList, MapApply Sep 1997 ## 0.72 contiguous formulas C53-C58 Sep 1997 ## 0.71 contiguous formulas C31-C52 Sep 1997 ## 0.65 contiguous formulas C01-C30 Aug 1997 ## 0.60 summation formulas S1001-S3291 Aug 1997 ## 0.50 rules for manipulating factorial expressions Jun 1997 ## 0.40 Gosper/Zeilberger algorithms Jun 1997 ## 0.30 hypergeometric solutions of recurrences May 1997 ## 0.20 polynomial and rational solutions of recurrences May 1997 ## 0.10 basics Apr 1997 ## ## Please report all bugs to: gauthier@univ-mlv.fr ######################### Global Constants ############################## `HYPERG/init` := proc() global `HYPERG/Verbose`, `HYPERG/Version`, `HYPERG/PrintBool`, INFINITY; `HYPERG/Verbose` := 0: `HYPERG/Version` := `1.0b`: `HYPERG/PrintBool` := true: INFINITY := 9999: end: ########## # File @(#) Basics (HYPERG PACKAGE) Fri Jun 27 08:22:05 METDST 1997 ########## # # HYPERG[AddParam] # # HYPERG[HypPermUp] # HYPERG[HypPermLow] # HYPERG[HypPermBoth] # # BG270697 BG220897 BG150997 HYPERG[AddParam] := proc() local shyp,newp, l1,l2; option `Copyright by Bruno Gauthier, IGM, Universite Marne-la-Vallee, France`; if ( nargs <> 2 ) then ERROR(`Expecting tow arguments`); fi: shyp := args[1]; newp := args[2]; if not ( HYPERG[IsHYP](shyp) or HYPERG[IsQHYP](shyp) ) then ERROR(`Not a standard hypergeometric series`,shyp); fi: l1 := op(1,shyp); l2 := op(2,shyp); if type(newp,numeric) then if ( type(newp,negint) or (newp=0) ) then ERROR(`The new parameter must be positive`); fi: else `HYPERG/Print`(newp,` must be an integer > 0`); fi: if HYPERG[IsHYP](shyp) then HYP[[newp,op(l1)],[newp,op(l2)],op(3,shyp)]; else QHYP[[newp,op(l1)],[newp,op(l2)],op(3..4,shyp)]; fi: end: HYPERG[HypPermUp] := proc() local shyp,perm,l1,l2,m1,i; option `Copyright by Bruno Gauthier, IGM, Universite Marne-la-Vallee, France`; if ( nargs <> 2 ) then ERROR(`Expecting tow arguments`); fi: shyp := args[1]; perm := args[2]; if not ( HYPERG[IsHYP](shyp) or HYPERG[IsQHYP](shyp) ) then ERROR(`Not a standard hypergeometric series`,shyp); fi: if not type(perm,list) then ERROR(`Not a permutation list`,perm); fi: l1 := op(1,shyp); l2 := op(2,shyp); if ( nops(perm) <> nops(l1) ) then ERROR(`Not same length`,perm,l1); fi: if not evalb( [seq(i,i=1..nops(perm))]=sort(perm) ) then ERROR(`Not a permutation`,perm); fi: m1 := [seq(k.i,i=1..nops(l1))]; for i from 1 to nops(perm) do m1 := subsop(i=l1[perm[i]],m1); od: if HYPERG[IsHYP](shyp) then HYP[m1,l2,op(3,shyp)]; else QHYP[m1,l2,op(3..4,shyp)]; fi: end: HYPERG[HypPermLow] := proc() local shyp,perm,l1,l2,m2,i; option `Copyright by Bruno Gauthier, IGM, Universite Marne-la-Vallee, France`; if ( nargs <> 2 ) then ERROR(`Expecting two arguments`); fi: shyp := args[1]; perm := args[2]; if not ( HYPERG[IsHYP](shyp) or HYPERG[IsQHYP](shyp) ) then ERROR(`Not a standard hypergeometric series`,shyp); fi: if not type(perm,list) then ERROR(`Not a permutation list`,perm); fi: l1 := op(1,shyp); l2 := op(2,shyp); if ( nops(perm) <> nops(l2) ) then ERROR(`Not same length`,perm,l2); fi: if not evalb( [seq(i,i=1..nops(perm))]=sort(perm) ) then ERROR(`Not a permutation`,perm); fi: m2 := [seq(k.i,i=1..nops(l2))]; for i from 1 to nops(perm) do m2 := subsop(i=l2[perm[i]],m2); od: if HYPERG[IsHYP](shyp) then HYP[l1,m2,op(3,shyp)]; else QHYP[l1,m2,op(3..4,shyp)]; fi: end: HYPERG[HypPermBoth] := proc() local shyp,perm,l1,l2,elt,m1,m2,i; option `Copyright by Bruno Gauthier, IGM, Universite Marne-la-Vallee, France`; if ( nargs <> 2 ) then ERROR(`Expecting two arguments`); fi: shyp := args[1]; perm := args[2]; if not ( HYPERG[IsHYP](shyp) or HYPERG[IsQHYP](shyp) ) then ERROR(`Not a standard hypergeometric series`,shyp); fi: if not type(perm,list) then ERROR(`Not a permutation list`,perm); fi: l1 := op(1,shyp); l2 := op(2,shyp); if ( nops(l1) <> nops(l2)+1 ) then ERROR(`Not a {r+1}_HYP_{r}`); fi: if ( nops(perm) <> nops(l2) ) then ERROR(`Not same length`,perm,l2); fi: if not evalb( [seq(i,i=1..nops(perm))]=sort(perm) ) then ERROR(`Not a permutation`,perm); fi: elt := op(1,l1); m1 := [seq(k.i,i=1..nops(l1)-1)]; for i from 1 to nops(perm) do m1 := subsop(i=l1[perm[i]+1],m1); od: m1 := [elt, op(m1) ]; m2 := [seq(k.i,i=1..nops(l2))]; for i from 1 to nops(perm) do m2 := subsop(i=l2[perm[i]],m2); od: if HYPERG[IsHYP](shyp) then HYP[m1,m2,op(3,shyp)]; else QHYP[m1,m2,op(3..4,shyp)]; fi: end: ########## # File @(#) CheckRec (HYPERG PACKAGE) Fri Mar 27 08:08:34 MET 1998 ########## # # HYPERG[CheckRec] # # BG270398 BG310398 BG270598 HYPERG[CheckRec] := proc() # INPUT : <-- rec : recurrence equation with polynomial coefficients # <-- U(n) : sequence # <-- term : term # OUTPUT : --> true/false local rec, suite, U,n, term, new; option `Copyright by Bruno Gauthier, IGM, Universite Marne-la-Vallee, France`; if ( nargs <> 3 ) then ERROR(`Expecting three arguments`); fi: rec := args[1]; #if not type(rec,`=`) # then ERROR(rec,`is not a recurrence`); #fi: suite := args[2]; if ( not type(suite,function) ) then ERROR(suite,`is not a sequence`); fi: U := op(0,suite); n := op(1,suite); term := args[3]; new := HYPERG[SubsRec](rec,suite,term); new := normal( expand( op(1,new)-op(2,new) ) ); if ( new=0 ) then true; else false; fi: end: ########## # File @(#) Divers (HYPERG PACKAGE) Wed Sep 10 15:59:25 METDST 1997 ########## # # `HYPERG/MemberHas` # `HYPERG/Mymin` # `HYPERG/Mymax` # `HYPERG/Writeln` # `HYPERG/Print` # `HYPERG/Verbose/Print` # # HYPERG[Time] # # BG100997 BG021097 BG081098 BG201098 `HYPERG/MemberHas` := proc(a,li,posi) local i,n,flag; n := nops(li); flag := false; i := 1; while ( ( not flag ) and ( i<=n ) ) do if ( has(op(i,li),a) ) then flag := true; posi := i; fi: i := i+1; od: flag; end: `HYPERG/Mymin` := proc(a,b) local l1,l2,z,cond; if (a=-infinity) or (b=-infinity) then RETURN(-infinity); fi: if (a=infinity) then RETURN(b); fi: if (b=infinity) then RETURN(a); fi: min(a,b); end: `HYPERG/Mymax` := proc(a,b) local l1,l2,z,cond; if (a=infinity) or (b=infinity) then RETURN(infinity); fi: if (a=-infinity) then RETURN(b); fi: if (b=-infinity) then RETURN(a); fi: max(a,b); end: `HYPERG/Writeln` := proc() local i, expr; printf(`# `); for i from 1 to nargs do expr := args[i]; #if type(expr, integer) then printf(`%d`, expr) #elif type(expr, float) then printf(`%g`, expr) #elif type(expr, string) then printf(`%s`, expr) #else printf(`%a`, expr) #fi od; printf(`\n`); end: `HYPERG/Print` := proc() global `HYPERG/PrintBool`; if (`HYPERG/PrintBool`=true) then `HYPERG/Writeln`(args); #then print(args); fi: end: `HYPERG/Verbose/Print` := proc() global `HYPERG/Verbose`; if (`HYPERG/Verbose`>=args[1]) then printf(args[2..nargs]); fi: end: HYPERG[Time] := proc(f,t) local r,s; option `Copyright by Bruno Gauthier, IGM, Universite Marne-la-Vallee, France`; s := time(); r := f(args[3 .. nargs]); t := time()-s; r; end: ########## # File @(#) EvalFun (HYPERG PACKAGE) Mon Apr 14 09:25:40 MET 1997 ########## # # HYPERG[HypEval] # `HYPERG/HypEval/basic` # # HYPERG[RfEval] # `HYPERG/RfEval/basic` # # BG140497 BG290598 BG151098 BG091198 BG310399 `HYPERG/HypEval/basic`:=proc(shyp,k) local sshyp,l1,l2,z,summand,i; global `HYPERG/PrintBool`; `HYPERG/PrintBool` := false; sshyp := HYPERG[HypSimplify](shyp); `HYPERG/PrintBool` := true; l1 := op(1,sshyp); l2 := op(2,sshyp); z := op(3,sshyp); if has(l1,0) or (z=0) then RETURN(1); fi: if (nops(l1)=0 and nops(l2)=0) then RETURN(exp(z)); fi: summand := convert( [seq(RF[op(i,l1),k],i=1..nops(l1))],`*` ); summand := summand / convert( [seq(RF[op(i,l2),k],i=1..nops(l2))],`*` ); summand := summand * z^(k) / (k)!; Sum(summand,k=0..infinity); end: HYPERG[HypEval] := proc() # this function evaluates hypergeometric series HYP and VHYP local i, # loop variable expr, # any expression tsi, # index summation (by default: k) res; # final result option `Copyright by Bruno Gauthier, IGM, Universite Marne-la-Vallee, France`; if ( nargs > 2 ) then ERROR(`Wrong number of arguments`); fi: expr := args[1]; if ( nargs = 2 ) then tsi := args[2]; else tsi := k; #[default value] global variable fi: if ( not type(tsi,name) ) then ERROR(`Expecting a name as summation index`,tsi); fi: if ( type(expr,function) and ( op(0,expr)=Sum or op(0,expr)=sum ) ) then res := Sum(HYPERG[HypEval](op(1,expr),tsi),op(2,expr)); elif type(expr,`*`) then res := convert([seq(HYPERG[HypEval](op(i,expr),tsi),i=1..nops(expr))],`*`); elif type(expr,`+`) then res := convert([seq(HYPERG[HypEval](op(i,expr),tsi),i=1..nops(expr))],`+`); elif type(expr,`^`) then res := HYPERG[HypEval](op(1,expr),tsi)^(op(2,expr)); elif ( `HYPERG/IsHYP`(expr) = true ) then res := `HYPERG/HypEval/basic`(expr,tsi); elif ( `HYPERG/IsVHYP`(expr) = true ) then res := `HYPERG/HypEval/basic`(HYPERG[VHypToHyp](expr),tsi); else RETURN (expr); fi; res; end: # BG031297 `HYPERG/RfEval/basic`:=proc(rf) local a,n,i; a := op(1,rf); n := op(2,rf); if ( type(n,numeric) and not type(n,integer) ) then ERROR(`Rising factorial: the second argument is not an integer`,n); fi: if type(n,integer) then if ( n=0 ) then RETURN(1); elif ( n>0 ) then RETURN(product(a+i,i=0..n-1)); else RETURN(1/product(a+n+i,i=0..-n-1)); # (a+n) must be > 0 (else division by 0) fi: else if ( a=0 ) then RETURN(rf); # nothing to return else RETURN(product(a+i,i=0..n-1)); fi: fi: end: HYPERG[RfEval] := proc(expr) # this function evaluates rising factorials RF local i,res; option `Copyright by Bruno Gauthier, IGM, Universite Marne-la-Vallee, France`; if ( nargs <> 1 ) then ERROR(`Expecting only one argument`); elif ( type(expr,function) and ( op(0,expr)=Sum or op(0,expr)=sum ) ) then res := Sum(HYPERG[RfEval](op(1,expr)),op(2,expr)); elif type(expr,`*`) then res := convert([seq(HYPERG[RfEval](op(i,expr)),i=1..nops(expr))],`*`); elif type(expr,`+`) then res := convert([seq(HYPERG[RfEval](op(i,expr)),i=1..nops(expr))],`+`); elif type(expr,`^`) then res := HYPERG[RfEval](op(1,expr))^(op(2,expr)); elif ( `HYPERG/IsRF`(expr) = true ) then res := `HYPERG/RfEval/basic`(expr); else RETURN (expr); fi: res; end: ########## # File @(#) FirstTerms (HYPERG PACKAGE) Mon Jun 15 08:11:15 METDST 1998 ########## # # HYPERG[FirstTerms] # # BG150698 BG220698 HYPERG[FirstTerms] := proc() local s,n, s1,s2,vari,bi,bs, i, nterm,res; option `Copyright by Bruno Gauthier, IGM, Universite Marne-la-Vallee, France`; if ( nargs <> 2 ) then ERROR(`Expecting tow arguments`); fi: s := combine( HYPERG[HypEval](args[1]) ); n := args[2]; if ( op(0,s) <> Sum ) then ERROR(s,`is neither a Sum or a HYPergeometric series`); fi: if not type(n,posint) then ERROR(`The second argument must be an positive integer`); fi: s1 := op(1,s); s2 := op(2,s); if not type(s2,`=`) then ERROR(`Can't extract first terms of the sum`); fi: vari := op(1,s2); bi := op(1,op(2,s2)); bs := op(2,op(2,s2)); if (b1=infinity) or (b1=-infinity) then ERROR(`Can't extract first terms of the sum`,s); fi: if not type(bi,numeric) then ERROR(`Can't extract first terms of the sum`,s); fi: if type(bs,numeric) then if (bs 0 ) then res := res + nterm; fi: od: if (not type(bs,numeric)) or (bs>bi+n-1) then res := res + Sum(s1,vari=bi+n..bs); fi: res; end: ########## # File @(#) GenRec (HYPERG PACKAGE) Thu Aug 14 08:24:40 METDST 1997 ########## # # HYPERG[GenRec] # # BG140897 BG020498 BG240498 HYPERG[GenRec] := proc() # INPUT : <-- solutions : set of solutions {s1,s2,...,sp} # <-- yn : suite [y(n)] # OUTPUT : --> rec : recurrence lineaire a coefficients polynomiaux # dont s1, s2, ..., et sp sont des solutions local yn, solutions, rec, yy, nn, in_mat, i, k, MAT, dim, d; # Casoratian determinant option `Copyright by Bruno Gauthier, IGM, Universite Marne-la-Vallee, France`; if ( nargs <> 2 ) then ERROR(`Expecting two arguments`); fi: solutions := args[1]; if ( not type(solutions,set) ) then ERROR(solutions,`is not a set`); fi: solutions := [ op(solutions) ]; solutions := map(HYPERG[RfEval],solutions); yn := args[2]; if ( not type(yn,function) ) then ERROR(yn,`is not a sequence`); fi: yy := op(0,yn); nn := op(1,yn); in_mat := [ yn, op(solutions) ]; dim := nops(in_mat); MAT := linalg[matrix](dim,dim,[in_mat, seq(map((pp,vv,mm)->subs(vv=vv+mm,pp), in_mat,nn,k), k=1..dim-1)]); d := linalg[det](MAT); d := normal(expand(d/convert(solutions,`*`))); # si la simplification n'est pas totale, on ne conserve que le numerateur d := numer(d); if (d<>0) then rec := HYPERG[SimplifyRec](d=0,yn); else rec := d=0; fi: rec; end: ########## # File @(#) Gosper (HYPERG PACKAGE) Tue Jun 24 08:09:58 METDST 1997 ########## # # [HYPERG]Gosper` # `HYPERG/Gosper/Bound` # `HYPERG/Gosper/Decomp` # `HYPERG/Gosper/DegreePolyBound` # # BG240697 BG170498 BG121198 BG281298 BG130399 `HYPERG/Gosper/Bound` := proc(n,d,k) local r,s,nr,ns, i,j,rr,ss,drr,dss, aa,bb,cc,dd,res,tmp,disp; r := factor(n): s := factor(d): if ( not type(r,`*`) ) then nr := 1: else nr := nops(r): fi: if ( not type(s,`*`) ) then ns := 1: else ns := nops(s): fi: disp := {}: for i from 1 to nr do # ieme facteur de r if ( nr = 1 ) then rr := r: else rr := op(i,r): fi: if ( type(rr,`^`) ) then rr := op(1,rr): fi: for j from 1 to ns do # jeme facteur de s if ( ns = 1 ) then ss := s: else ss := op(j,s): fi: if ( type(ss,`^`) ) then ss := op(1,ss): fi: # Pour tous les couples (rr,ss) de facteurs de r et s rr := collect(rr,k): ss := collect(ss,k): drr := degree(rr,k): dss := degree(ss,k): if ( ( drr = 0 ) or ( drr <> dss ) ) then tmp := {}: else aa := coeff(rr,k,drr): bb := coeff(rr,k,drr-1): cc := coeff(ss,k,drr): dd := coeff(ss,k,drr-1): res := normal((bb*cc-aa*dd)/(aa*cc*drr)): if not type(res,nonnegint) then tmp := {}: else if ( collect(cc*rr-aa*subs(k=k+res,ss),k) = 0 ) then tmp := {res}: else tmp := {}: fi: fi: fi: disp := disp union tmp: od: od: [op(disp)]: end: `HYPERG/Gosper/Decomp` := proc(r,nn) # INPUT : <-- r(n) : # OUTPUT : --> a(n), b(n), c(n) s.t. r(n)= a(n)/b(n) * c(n+1)/c(n) local rr,a,b,c, f,g, # numerateur et denominateur de r(n) lcf,lcg, # coefficients de tete de f et g Z, # lcf/lcg racines,h, # Compute( f(n), g(n+h), n ) NN, # nombre de racines ss,pp,qq, i,j,k; # variables de boucle rr := normal(r); f := expand(numer(rr)); g := expand(denom(rr)); lcf := lcoeff(f,nn); lcg := lcoeff(g,nn); Z := lcf/lcg; f := expand(f/lcf); g := expand(g/lcg); i := 1; racines:=`HYPERG/Gosper/Bound`(f,g,nn); NN := nops(racines); pp := f; qq := g; ss := array[1..NN]; for j from 1 to NN do ss[j] := gcd(pp,subs(nn=nn+op(j,racines),qq)); pp := simplify( pp/ss[j] ); qq := simplify( qq/subs(nn=nn-op(j,racines),ss[j]) ); od: a := simplify(Z * pp); b := simplify(qq); c := convert( [seq(product(subs(nn=nn-k,ss[i]),k=1..op(i,racines)),i=1..NN)], `*`); c := simplify(c); [a,b,c]; end: `HYPERG/Gosper/DegreePolyBound` := proc(a,b,c,nn) # INPUT : --> a(n), b(n), c(n) s.t. r(n)= a(n)/b(n) * c(n+1)/c(n) # OUTPUT : <-- a degree bound for x(n) local aa,bb,cc,da,db,dc,ens,i,res; aa := collect(a,nn); bb := collect(b,nn); cc := collect(c,nn); da := `HYPERG/MyDegree`(aa,nn); db := `HYPERG/MyDegree`(bb,nn); dc := `HYPERG/MyDegree`(cc,nn); if ( da <> db ) or ( lcoeff(aa,nn) <> lcoeff(bb,nn) ) then ens := { dc-max(da,db) }; else ens := { dc-da+1, (coeff(collect(subs(nn=nn-1,bb),nn),nn,db-1) -coeff(aa,nn,da-1))/lcoeff(aa,nn) }; fi: res := []; for i in ens do if type(i,nonnegint) then res := [ op(res), i ]; fi: od: if ( res=[] ) then -1; else max(op(res)); fi: end: HYPERG[Gosper] := proc(TT,nn) # INPUT : <-- TT(n) hypergeometric sequence # OUTPUT : --> u(n) hypergeometric sequence such that u(n+1) - u(n) = TT(n) local T, # TT r, # rapport T(n+1)/T(n) a,b,c, # decomposition de r(n)= a(n)/b(n) * c(n+1)/c(n) ret, db, # degree bound for r(n) x, # x(n) polynome solution de a(n)*x(n+1)-b(n-1)*x(n)=c(n) sol; # solution de l'eq. precedent option `Copyright by Bruno Gauthier, IGM, Universite Marne-la-Vallee, France`; if ( nargs <> 2 ) then ERROR(`Expecting two arguments`); fi: T := HYPERG[RfEval](TT); T := convert(T,factorial); # L'algo de Gosper est-il applicable ? if not HYPERG[IsHyperg](T,nn) then ERROR(TT,`is not hypergeometric in`,nn); fi: T := normal(T); r := normal(expand(subs(nn=nn+1,T)/T)); ret := `HYPERG/Gosper/Decomp`(r,nn); a := op(1,ret); b := op(2,ret); c := op(3,ret); `HYPERG/Verbose/Print`(1,`\n Gosper decomposition: %a, %a, %a\n`,a,b,c); db := `HYPERG/Gosper/DegreePolyBound`(a,b,c,nn); if ( db < 0 ) then `HYPERG/Verbose/Print`(1,`\n No polynomial x exists`); print(FAIL); RETURN(NULL); fi: `HYPERG/Verbose/Print`(1,`\n Degree bound for x: %a\n`,db); sol:=traperror( HYPERG[PolySolRec](a*x(nn+1)-subs(nn=nn-1,b)*x(nn)=c,x(nn)) ); if ( sol = lasterror ) then print(FAIL); NULL; else normal(subs(nn=nn-1,b)*sol/c*T); fi: end: ########## # File @(#) Homog (HYPERG PACKAGE) Thu Mar 12 18:15:19 MET 1998 ########## # # HYPERG[Homog] # HYPERG[IsHomog] # `HYPERG/NonHomogTerm` # # BG120398 BG260398 BG050598 `HYPERG/NonHomogTerm` := proc() # INPUT : <-- rec : recurrence [sous forme op(1, )-op(2, )] # <-- U(n) : suite # OUTPUT : --> rec - newh; local rec, suite, U,n, newh, # new recurrence (without inhomogeneous term) li,i,name_c; if ( nargs <> 2 ) then ERROR(`Expecting two arguments`); fi: rec := expand(args[1]); suite := args[2]; if ( not type(suite,function) ) then ERROR(suite,`is not a sequence`); fi: U := op(0,suite); n := op(1,suite); li := [ op(indets(rec)) ]; newh := 0; for i from 1 to nops(li) do name_c := op(i,li); if `HYPERG/IsSeq`(name_c,suite) then newh := newh + name_c*coeff(rec,name_c); fi: od: normal(rec-newh); end: HYPERG[IsHomog] := proc() # INPUT : <-- rec : recurrence homogene/inhomogene ? # <-- U(n) : suite # OUTPUT : --> bool : True/false local rec,suite,val; option `Copyright by Bruno Gauthier, IGM, Universite Marne-la-Vallee, France`; if ( nargs <> 2 ) then ERROR(`Expecting two arguments`); fi: rec := args[1]; if type(rec,`=`) then rec := op(1,rec)-op(2,rec); fi: suite := args[2]; if ( not type(suite,function) ) then ERROR(suite,`is not a sequence`); fi: val := `HYPERG/NonHomogTerm`(rec,suite); if ( val=0 ) then true; else false; fi: end: HYPERG[Homog] := proc() # INPUT : <-- rec : recurrence homogene/inhomogene ? # <-- U(n) : suite # OUTPUT : --> rec : recurrence homogene satisfaite par U(n) local rec, suite, U,n, val, homog_r,h_rec; option `Copyright by Bruno Gauthier, IGM, Universite Marne-la-Vallee, France`; if ( nargs <> 2 ) then ERROR(`Expecting two arguments`); fi: rec := args[1]; if type(rec,`=`) then rec := op(1,rec)-op(2,rec); fi: suite := args[2]; if ( not type(suite,function) ) then ERROR(suite,`is not a sequence`); fi: U := op(0,suite); n := op(1,suite); val := `HYPERG/NonHomogTerm`(rec,suite); if ( val=0 ) # si l'equation est deja homogene then RETURN(rec=0); fi: homog_r := rec * subs(n=n+1,val) - subs(n=n+1,rec) * val; h_rec := HYPERG[SimplifyRec](homog_r=0,suite); end: ########## # File @(#) HypContig (HYPERG PACKAGE) Tue Aug 19 08:22:09 METDST 1997 ########## # # `HYPERG/VerifPos` # # HYPERG[HypContig] # HYPERG[HypContigPrint] # `HYPERG/HypContig/heart` # `HYPERG/C01`, `HYPERG/C02`, `HYPERG/C14`, `HYPERG/C15`, `HYPERG/C16`, # `HYPERG/C17`, `HYPERG/C18`, `HYPERG/C19`, `HYPERG/C20`, `HYPERG/C21`, # `HYPERG/C22`, `HYPERG/C23`, `HYPERG/C24`, `HYPERG/C25`, `HYPERG/C26`, # `HYPERG/C27`, `HYPERG/C30`, `HYPERG/C31`, `HYPERG/C32`, `HYPERG/C33`, # `HYPERG/C34`, `HYPERG/C35`, `HYPERG/C36`, `HYPERG/C40`, `HYPERG/C41`, # `HYPERG/C42`, `HYPERG/C43`, `HYPERG/C44`, `HYPERG/C45`, `HYPERG/C46`, # `HYPERG/C49`, `HYPERG/C50`, `HYPERG/C51`, `HYPERG/C52`, `HYPERG/C53`, # `HYPERG/C54`, `HYPERG/C55`, `HYPERG/C56`, `HYPERG/C57`, `HYPERG/C58`, # `HYPERG/C59`, `HYPERG/C60`, `HYPERG/C61`, `HYPERG/C62`, `HYPERG/C63`, # `HYPERG/C64`, `HYPERG/C65`, `HYPERG/C66`, `HYPERG/C67`, `HYPERG/C68`, # `HYPERG/C69`, `HYPERG/C70`, `HYPERG/C71`, `HYPERG/C72`, `HYPERG/C73`, # `HYPERG/C74`, `HYPERG/C75`, `HYPERG/C76`, `HYPERG/C77`, `HYPERG/C78`, # `HYPERG/C79`, `HYPERG/C80`, `HYPERG/C81`, `HYPERG/C82`, `HYPERG/C83`, # `HYPERG/C84`, `HYPERG/C85`, `HYPERG/C86`, `HYPERG/C87`, `HYPERG/C88`, # `HYPERG/C89`, `HYPERG/C90`, `HYPERG/C91`, `HYPERG/C92`, `HYPERG/C93`, # `HYPERG/C94`, `HYPERG/C95`, `HYPERG/C96`, `HYPERG/C97`, `HYPERG/C98`, # `HYPERG/C99`, `HYPERG/C100`, `HYPERG/C101`, `HYPERG/C102`, `HYPERG/C103`, # `HYPERG/C104, `HYPERG/C110`, `HYPERG/C105`, `HYPERG/C112`, `HYPERG/C106`, # `HYPERG/C107, `HYPERG/C114`, `HYPERG/C115`, `HYPERG/C108`, `HYPERG/C118`, # `HYPERG/C109`, `HYPERG/C120`, `HYPERG/C111`, `HYPERG/C113`, `HYPERG/C116`, # `HYPERG/C117`, `HYPERG/C119`, `HYPERG/C121`, # # BG190897 BG160198 BG020298 BG060298 BG170498 BG130898 BG230600 `HYPERG/VerifPos` := proc(pos,binf,bsup) if ( pos < binf ) or ( pos > bsup ) then ERROR(`Wrong parameter position`); fi: end: # Two-term relations # `HYPERG/C01`:=proc(shyp) local l1,l2,z, m1,m2,prod1,prod2,i; l1 := op(1,shyp); l2 := op(2,shyp); z := op(3,shyp); prod1 := convert(l1,`*`); prod2 := convert(l2,`*`); m1 := [ 1, seq(op(i,l1)+1,i=1..nops(l1)) ]; m2 := [ 2, seq(op(i,l2)+1,i=1..nops(l2)) ]; 1 + z*prod1/prod2 * HYP[m1,m2,z]; end: `HYPERG/C02`:=proc(shyp) local l1,l2,z,a, m1,m2,prod1,prod2,i,prod,k; l1 := op(1,shyp); l2 := op(2,shyp); z := op(3,shyp); if ( member(1,l1,'k') = false ) then ERROR(`The integer 1 is absent from the upper parameters`); fi: a := op(k,l1); l1 := subsop(k=NULL,l1); m1 := [ 1, seq(op(i,l1)-1,i=1..nops(l1)) ]; m2 := [ seq(op(i,l2)-1,i=1..nops(l2)) ]; prod1 := convert(m1,`*`); prod2 := convert(m2,`*`); prod := prod2/z/prod1; prod * HYP[m1,m2,z] - prod; end: # Three-term relations with one parameter # `HYPERG/C14`:=proc(shyp,up1) local l1,l2,z,a, m1,m2,n1,n2,prod1,prod2,i; l1 := op(1,shyp); l2 := op(2,shyp); z := op(3,shyp); a := op(up1,l1); l1 := subsop(up1=NULL,l1); m1 := [ a-1, op(l1) ]; m2 := l2; prod1 := convert(l1,`*`); prod2 := convert(l2,`*`); n1 := [ a, seq(op(i,l1)+1,i=1..nops(l1)) ]; n2 := [ seq(op(i,l2)+1,i=1..nops(l2)) ]; HYP[m1,m2,z] + z*prod1/prod2 * HYP[n1,n2,z]; end: `HYPERG/C15`:=proc(shyp,up1) local l1,l2,z,a, m1,m2,n1,n2,prod1,prod2,i; l1 := op(1,shyp); l2 := op(2,shyp); z := op(3,shyp); a := op(up1,l1); l1 := subsop(up1=NULL,l1); m1 := [ a+1, op(l1) ]; m2 := l2; prod1 := convert(l1,`*`); prod2 := convert(l2,`*`); n1 := [ a+1, seq(op(i,l1)+1,i=1..nops(l1)) ]; n2 := [ seq(op(i,l2)+1,i=1..nops(l2)) ]; HYP[m1,m2,z] - z*prod1/prod2 * HYP[n1,n2,z]; end: `HYPERG/C16`:=proc(shyp,up1) local l1,l2,z,a, tmp1,tmp2, m1,m2,n1,n2,prod1,prod2,i; l1 := op(1,shyp); l2 := op(2,shyp); z := op(3,shyp); a := op(up1,l1); l1 := subsop(up1=NULL,l1); tmp1 := [ seq(op(i,l1)-1,i=1..nops(l1)) ]; tmp2 := [ seq(op(i,l2)-1,i=1..nops(l2)) ]; prod1 := convert(tmp1,`*`); prod2 := convert(tmp2,`*`); m1 := [ a, op(tmp1) ]; m2 := tmp2; n1 := [ a-1, op(tmp1) ]; n2 := tmp2; prod2/prod1/z * HYP[m1,m2,z] - prod2/prod1/z * HYP[n1,n2,z]; end: `HYPERG/C17`:=proc(shyp,up1) local l1,l2,z,a, m1,m2,n1,n2,prod1,prod2,i; l1 := op(1,shyp); l2 := op(2,shyp); z := op(3,shyp); a := op(up1,l1); l1 := subsop(up1=NULL,l1); m1 := [ a-1, op(l1) ]; m2 := l2; prod1 := convert(l1,`*`); prod2 := convert(l2,`*`); n1 := [ a, seq(op(i,l1)+1,i=1..nops(l1)) ]; n2 := [ seq(op(i,l2)+1,i=1..nops(l2)) ]; HYP[m1,m2,z] + z*prod1/prod2 * HYP[n1,n2,z]; end: `HYPERG/C18`:=proc(shyp,up1) `HYPERG/C15`(shyp,up1): end: `HYPERG/C19`:=proc(shyp,up1) `HYPERG/C16`(shyp,up1): end: `HYPERG/C20`:=proc(shyp,low1) local l1,l2,z,b, m1,m2,n1,n2,prod1,prod2,i; l1 := op(1,shyp); l2 := op(2,shyp); z := op(3,shyp); b := op(low1,l2); l2 := subsop(low1=NULL,l2); m1 := l1; m2 := [ b+1, op(l2) ]; prod1 := convert(l1,`*`); prod2 := convert(l2,`*`); n1 := [ seq(op(i,l1)+1,i=1..nops(l1)) ]; n2 := [ b+2, seq(op(i,l2)+1,i=1..nops(l2)) ]; HYP[m1,m2,z] + z/b/(b+1) * prod1/prod2 * HYP[n1,n2,z]; end: `HYPERG/C21`:=proc(shyp,low1) local l1,l2,z,b, m1,m2,n1,n2,prod1,prod2,i; l1 := op(1,shyp); l2 := op(2,shyp); z := op(3,shyp); b := op(low1,l2); l2 := subsop(low1=NULL,l2); m1 := l1; m2 := [ b-1, op(l2) ]; prod1 := convert(l1,`*`); prod2 := convert(l2,`*`); n1 := [ seq(op(i,l1)+1,i=1..nops(l1)) ]; n2 := [ b+1, seq(op(i,l2)+1,i=1..nops(l2)) ]; HYP[m1,m2,z] - z/(b-1)/b * prod1/prod2 * HYP[n1,n2,z]; end: `HYPERG/C22`:=proc(shyp,low1) local l1,l2,z,b, tmp1,tmp2,m1,m2,n1,n2,prod1,prod2,i; l1 := op(1,shyp); l2 := op(2,shyp); z := op(3,shyp); b := op(low1,l2); l2 := subsop(low1=NULL,l2); tmp1 := [ seq(op(i,l1)-1,i=1..nops(l1)) ]; tmp2 := [ seq(op(i,l2)-1,i=1..nops(l2)) ]; prod1 := convert(l1,`*`); prod2 := convert(l2,`*`); m1 := tmp1; m2 := [ b-2, op(tmp2) ]; n1 := tmp1; n2 := [ b-1, op(tmp2) ]; (b-2)*(b-1)/z * prod2/prod1 * HYP[m1,m2,z] - (b-2)*(b-1)/z * prod2/prod1 * HYP[n1,n2,z]; end: `HYPERG/C23`:=proc(shyp,low1) `HYPERG/C20`(shyp,low1): end: `HYPERG/C24`:=proc(shyp,low1) `HYPERG/C21`(shyp,low1): end: `HYPERG/C25`:=proc(shyp,low1) `HYPERG/C22`(shyp,low1): end: # Three-term relations with two parameters # `HYPERG/C26`:=proc(shyp,up1,up2) local l1,l2,z,a,b, m1,m2,n1,n2,i; l1 := op(1,shyp); l2 := op(2,shyp); z := op(3,shyp); a := op(up1,l1); b := op(up2,l1); l1 := subsop(up1=NULL,up2=NULL,l1); m1 := [ a, b+1, op(l1) ]; m2 := l2; n1 := [ a+1, b, op(l1) ]; n2 := l2; b/(b-a) * HYP[m1,m2,z] + a/(a-b) * HYP[n1,n2,z]; end: `HYPERG/C27`:=proc(shyp,up1,up2) local l1,l2,z,a,b, m1,m2,n1,n2,i; l1 := op(1,shyp); l2 := op(2,shyp); z := op(3,shyp); a := op(up1,l1); b := op(up2,l1); l1 := subsop(up1=NULL,up2=NULL,l1); m1 := [ a-1, b, op(l1) ]; m2 := l2; n1 := [ a-1, b+1, op(l1) ]; n2 := l2; (a-b-1)/(a-1) * HYP[m1,m2,z] + b/(a-1) * HYP[n1,n2,z]; end: `HYPERG/C30`:=proc(shyp,up1,up2) local l1,l2,z,a,b, m1,m2,n1,n2,prod1,prod2,i; l1 := op(1,shyp); l2 := op(2,shyp); z := op(3,shyp); a := op(up1,l1); b := op(up2,l1); l1 := subsop(up1=NULL,up2=NULL,l1); prod1 := convert(l1,`*`); prod2 := convert(l2,`*`); m1 := [ a-1, b+1, op(l1) ]; m2 := l2; n1 := [ a, b+1, seq(op(i,l1)+1,i=1..nops(l1)) ]; n2 := [ seq(op(i,l2)+1,i=1..nops(l2)) ]; HYP[m1,m2,z] + (1-a+b)*z*prod1/prod2 * HYP[n1,n2,z]; end: `HYPERG/C31`:=proc(shyp,up1,up2) local l1,l2,z,a,b, tmp1,tmp2,m1,m2,n1,n2,prod1,prod2,i; l1 := op(1,shyp); l2 := op(2,shyp); z := op(3,shyp); a := op(up1,l1); b := op(up2,l1); l1 := subsop(up1=NULL,up2=NULL,l1); tmp1 := [ seq(op(i,l1)-1,i=1..nops(l1)) ]; tmp2 := [ seq(op(i,l2)-1,i=1..nops(l2)) ]; prod1 := convert(tmp1,`*`); prod2 := convert(tmp2,`*`); m1 := [ a, b-1, op(tmp1) ]; m2 := tmp2; n1 := [ a-1, b, op(tmp1) ]; n2 := tmp2; 1/(b-a)/z*prod2/prod1 * HYP[m1,m2,z] - 1/(b-a)/z*prod2/prod1 * HYP[n1,n2,z]; end: `HYPERG/C32`:=proc(shyp,up1,up2) local l1,l2,z,a,b, tmp1,tmp2,m1,m2,n1,n2,prod1,prod2,i; l1 := op(1,shyp); l2 := op(2,shyp); z := op(3,shyp); a := op(up1,l1); b := op(up2,l1); l1 := subsop(up1=NULL,up2=NULL,l1); prod1 := convert(l1,`*`); prod2 := convert(l2,`*`); m1 := [ a-1, b-1, op(l1) ]; m2 := l2; tmp1 := [ seq(op(i,l1)+1,i=1..nops(l1)) ]; tmp2 := [ seq(op(i,l2)+1,i=1..nops(l2)) ]; n1 := [ a, b, a+b, op(tmp1) ]; n2 := [ -1+a+b, op(tmp2) ]; HYP[m1,m2,z] + (a+b-1)*z*prod1/prod2 * HYP[n1,n2,z]; end: `HYPERG/C33`:=proc(shyp,up1,up2) local l1,l2,z,a,b, tmp1,tmp2,m1,m2,n1,n2,prod1,prod2,i; l1 := op(1,shyp); l2 := op(2,shyp); z := op(3,shyp); a := op(up1,l1); b := op(up2,l1); l1 := subsop(up1=NULL,up2=NULL,l1); prod1 := convert(l1,`*`); prod2 := convert(l2,`*`); m1 := [ a+1, b+1, op(l1) ]; m2 := l2; tmp1 := [ seq(op(i,l1)+1,i=1..nops(l1)) ]; tmp2 := [ seq(op(i,l2)+1,i=1..nops(l2)) ]; n1 := [ a+1, b+1, a+b+2, op(tmp1) ]; n2 := [ a+b+1, op(tmp2) ]; HYP[m1,m2,z] - (1+a+b)*z*prod1/prod2 * HYP[n1,n2,z]; end: `HYPERG/C34`:=proc(shyp,up1,dw1) local l1,l2,z,a,b, m1,m2,n1,n2; l1 := op(1,shyp); l2 := op(2,shyp); z := op(3,shyp); a := op(up1,l1); l1 := subsop(up1=NULL,l1); b := op(dw1,l2); l2 := subsop(dw1=NULL,l2); m1 := [ a, op(l1) ]; m2 := [ b-1, op(l2) ]; n1 := [ a+1, op(l1) ]; n2 := [ b, op(l2) ]; (b-1)/(b-1-a) * HYP[m1,m2,z] + a/(1+a-b) * HYP[n1,n2,z]; end: `HYPERG/C35`:=proc(shyp,up1,dw1) local l1,l2,z,a,b, m1,m2,n1,n2; l1 := op(1,shyp); l2 := op(2,shyp); z := op(3,shyp); a := op(up1,l1); l1 := subsop(up1=NULL,l1); b := op(dw1,l2); l2 := subsop(dw1=NULL,l2); m1 := [ a-1, op(l1) ]; m2 := [ b-1, op(l2) ]; n1 := [ a-1, op(l1) ]; n2 := [ b, op(l2) ]; (b-1)/(a-1) * HYP[m1,m2,z] + (a-b)/(a-1) * HYP[n1,n2,z]; end: `HYPERG/C36`:=proc(shyp,up1,dw1) local l1,l2,z,a,b, m1,m2,n1,n2; l1 := op(1,shyp); l2 := op(2,shyp); z := op(3,shyp); a := op(up1,l1); l1 := subsop(up1=NULL,l1); b := op(dw1,l2); l2 := subsop(dw1=NULL,l2); m1 := [ a, op(l1) ]; m2 := [ b+1, op(l2) ]; n1 := [ a+1, op(l1) ]; n2 := [ b+1, op(l2) ]; (b-a)/b * HYP[m1,m2,z] + a/b * HYP[n1,n2,z]; end: `HYPERG/C40`:=proc(shyp,up1,dw1) local l1,l2,z,a,b, m1,m2,n1,n2,prod1,prod2,i; l1 := op(1,shyp); l2 := op(2,shyp); z := op(3,shyp); a := op(up1,l1); l1 := subsop(up1=NULL,l1); b := op(dw1,l2); l2 := subsop(dw1=NULL,l2); m1 := [ a-1, op(l1) ]; m2 := [ b-1, op(l2) ]; prod1 := convert(l1,`*`); prod2 := convert(l2,`*`); n1 := [ a, seq(op(i,l1)+1,i=1..nops(l1)) ]; n2 := [ b+1, seq(op(i,l2)+1,i=1..nops(l2)) ]; HYP[m1,m2,z] + (b-a)*z/(b-1)/b * prod1/prod2 * HYP[n1,n2,z]; end: `HYPERG/C41`:=proc(shyp,up1,dw1) local l1,l2,z,a,b, m1,m2,n1,n2,prod1,prod2,i; l1 := op(1,shyp); l2 := op(2,shyp); z := op(3,shyp); a := op(up1,l1); l1 := subsop(up1=NULL,l1); b := op(dw1,l2); l2 := subsop(dw1=NULL,l2); m1 := [ a+1, op(l1) ]; m2 := [ b+1, op(l2) ]; prod1 := convert(l1,`*`); prod2 := convert(l2,`*`); n1 := [ a+1, seq(op(i,l1)+1,i=1..nops(l1)) ]; n2 := [ b+2, seq(op(i,l2)+1,i=1..nops(l2)) ]; HYP[m1,m2,z] - (b-a)*z/b/(1+b) * prod1/prod2 * HYP[n1,n2,z]; end: `HYPERG/C42`:=proc(shyp,up1,dw1) local l1,l2,z,a,b, tmp1,tmp2,m1,m2,n1,n2,prod1,prod2,i; l1 := op(1,shyp); l2 := op(2,shyp); z := op(3,shyp); a := op(up1,l1); l1 := subsop(up1=NULL,l1); b := op(dw1,l2); l2 := subsop(dw1=NULL,l2); tmp1 := [ seq(op(i,l1)-1,i=1..nops(l1)) ]; tmp2 := [ seq(op(i,l2)-1,i=1..nops(l2)) ]; prod1 := convert(tmp1,`*`); prod2 := convert(tmp2,`*`); m1 := [ a, op(tmp1) ]; m2 := [ b-1, op(tmp2) ]; n1 := [ a-1, op(tmp1) ]; n2 := [ b-2, op(tmp2) ]; (b-2)*(b-1)/(b-a-1)/z * prod2/prod1 * HYP[m1,m2,z] - (b-2)*(b-1)/(b-a-1)/z * prod2/prod1 * HYP[n1,n2,z]; end: `HYPERG/C43`:=proc(shyp,up1,dw1) local l1,l2,z,a,b, m1,m2,n1,n2,prod1,prod2,i; l1 := op(1,shyp); l2 := op(2,shyp); z := op(3,shyp); a := op(up1,l1); l1 := subsop(up1=NULL,l1); b := op(dw1,l2); l2 := subsop(dw1=NULL,l2); m1 := [ a-1, op(l1) ]; m2 := [ b+1, op(l2) ]; prod1 := convert(l1,`*`); prod2 := convert(l2,`*`); n1 := [ a,1+a+b, seq(op(i,l1)+1,i=1..nops(l1))]; n2 := [ b+2,a+b, seq(op(i,l2)+1,i=1..nops(l2))]; HYP[m1,m2,z] + (a+b)*z/b/(1+b) * prod1/prod2 * HYP[n1,n2,z]; end: `HYPERG/C44`:=proc(shyp,up1,dw1) local l1,l2,z,a,b, m1,m2,n1,n2,prod1,prod2,i; l1 := op(1,shyp); l2 := op(2,shyp); z := op(3,shyp); a := op(up1,l1); l1 := subsop(up1=NULL,l1); b := op(dw1,l2); l2 := subsop(dw1=NULL,l2); m1 := [ a+1, op(l1) ]; m2 := [ b-1, op(l2) ]; prod1 := convert(l1,`*`); prod2 := convert(l2,`*`); n1 := [ 1+a,a+b+1, seq(op(i,l1)+1,i=1..nops(l1))]; n2 := [ b+1,a+b, seq(op(i,l2)+1,i=1..nops(l2))]; HYP[m1,m2,z] - (a+b)*z/(b-1)/b * prod1/prod2 * HYP[n1,n2,z]; end: `HYPERG/C45`:=proc(shyp,dw1,dw2) local l1,l2,z,a,b, m1,m2,n1,n2,i; l1 := op(1,shyp); l2 := op(2,shyp); z := op(3,shyp); a := op(dw1,l2); b := op(dw2,l2); l2 := subsop(dw1=NULL,dw2=NULL,l2); m1 := l1; m2 := [ -1+a, b, op(l2) ]; n1 := l1; n2 := [ a, -1+b, op(l2)]; (a-1)/(a-b) * HYP[m1,m2,z] + (b-1)/(b-a) * HYP[n1,n2,z]; end: `HYPERG/C46`:=proc(shyp,dw1,dw2) local l1,l2,z,a,b, m1,m2,n1,n2,i; l1 := op(1,shyp); l2 := op(2,shyp); z := op(3,shyp); a := op(dw1,l2); b := op(dw2,l2); l2 := subsop(dw1=NULL,dw2=NULL,l2); m1 := l1; m2 := [ a+1, b-1, op(l2) ]; n1 := l1; n2 := [ a+1, b, op(l2)]; (b-1)/a * HYP[m1,m2,z] + (1+a-b)/a * HYP[n1,n2,z]; end: `HYPERG/C49`:=proc(shyp,dw1,dw2) local l1,l2,z,a,b, m1,m2,n1,n2,prod1,prod2,i; l1 := op(1,shyp); l2 := op(2,shyp); z := op(3,shyp); a := op(dw1,l2); b := op(dw2,l2); l2 := subsop(dw1=NULL,dw2=NULL,l2); m1 := l1; m2 := [ a+1, b-1, op(l2) ]; prod1 := convert(l1,`*`); prod2 := convert(l2,`*`); n1 := [ seq(op(i,l1)+1,i=1..nops(l1)) ]; n2 := [ a+2, b+1, seq(op(i,l2)+1,i=1..nops(l2)) ]; HYP[m1,m2,z] + (b-a-1)*z/a/(1+a)/(b-1)/b*prod1/prod2 * HYP[n1,n2,z]; end: `HYPERG/C50`:=proc(shyp,dw1,dw2) local l1,l2,z,a,b, tmp1,tmp2,m1,m2,n1,n2,prod1,prod2,i; l1 := op(1,shyp); l2 := op(2,shyp); z := op(3,shyp); a := op(dw1,l2); b := op(dw2,l2); l2 := subsop(dw1=NULL,dw2=NULL,l2); tmp1 := [ seq(op(i,l1)-1,i=1..nops(l1)) ]; tmp2 := [ seq(op(i,l2)-1,i=1..nops(l2)) ]; prod1 := convert(tmp1,`*`); prod2 := convert(tmp2,`*`); m1 := tmp1; m2 := [ -2+a, b-1, op(tmp2) ]; n1 := tmp1; n2 := [ a-1, b-2, op(tmp2) ]; (a-2)*(a-1)*(b-2)*(b-1)/(b-a)/z * prod2/prod1 * HYP[m1,m2,z] - (a-2)*(a-1)*(b-2)*(b-1)/(b-a)/z * prod2/prod1 * HYP[n1,n2,z]; end: `HYPERG/C51`:=proc(shyp,dw1,dw2) local l1,l2,z,a,b, m1,m2,n1,n2,prod1,prod2,i; l1 := op(1,shyp); l2 := op(2,shyp); z := op(3,shyp); a := op(dw1,l2); b := op(dw2,l2); l2 := subsop(dw1=NULL,dw2=NULL,l2); m1 := l1; m2 := [ a+1, b+1, op(l2) ]; prod1 := convert(l1,`*`); prod2 := convert(l2,`*`); n1 := [ a+b+2, seq(op(i,l1)+1,i=1..nops(l1)) ]; n2 := [ a+2, b+2, a+b+1, seq(op(i,l2)+1,i=1..nops(l2)) ]; HYP[m1,m2,z] + (1+a+b)*z/a/(1+a)/b/(1+b)*prod1/prod2 * HYP[n1,n2,z]; end: `HYPERG/C52`:=proc(shyp,dw1,dw2) local l1,l2,z,a,b, m1,m2,n1,n2,prod1,prod2,i; l1 := op(1,shyp); l2 := op(2,shyp); z := op(3,shyp); a := op(dw1,l2); b := op(dw2,l2); l2 := subsop(dw1=NULL,dw2=NULL,l2); m1 := l1; m2 := [ a-1, b-1, op(l2) ]; prod1 := convert(l1,`*`); prod2 := convert(l2,`*`); n1 := [ a+b, seq(op(i,l1)+1,i=1..nops(l1)) ]; n2 := [ a+1, 1+b, b-a+1, seq(op(i,l2)+1,i=1..nops(l2)) ]; HYP[m1,m2,z] - (a+b-1)*z/(a-1)/a/(b-1)/b*prod1/prod2 * HYP[n1,n2,z]; end: # Three-term relations with three parameters # `HYPERG/C53`:=proc(shyp,up1,up2,up3) local l1,l2,z,a,b,c, m1,m2,n1,n2; l1 := op(1,shyp); l2 := op(2,shyp); z := op(3,shyp); a := op(up1,l1); b := op(up2,l1); c := op(up3,l1); l1 := subsop(up1=NULL,up2=NULL,up3=NULL,l1); m1 := [ a, b+1, c-1, op(l1) ]; m2 := l2; n1 := [ a+1, b, c-1, op(l1) ]; n2 := l2; b*(c-a-1)/(b-a)/(c-1) * HYP[m1,m2,z] + a*(c-b-1)/(a-b)/(c-1) * HYP[n1,n2,z]; end: `HYPERG/C54`:=proc(shyp,up1,up2,dw1) local l1,l2,z,a,b,c, m1,m2,n1,n2; l1 := op(1,shyp); l2 := op(2,shyp); z := op(3,shyp); a := op(up1,l1); b := op(up2,l1); c := op(dw1,l2); l1 := subsop(up1=NULL,up2=NULL,l1); l2 := subsop(dw1=NULL,l2); m1 := [ a, b+1, op(l1) ]; m2 := [ c+1, op(l2) ]; n1 := [ a+1, b, op(l1) ]; n2 := [ c+1, op(l2) ]; b*(c-a)/(b-a)/c * HYP[m1,m2,z] + a*(c-b)/(a-b)/c * HYP[n1,n2,z]; end: `HYPERG/C55`:=proc(shyp,up1,up2,dw1) local l1,l2,z,a,b,c, m1,m2,n1,n2; l1 := op(1,shyp); l2 := op(2,shyp); z := op(3,shyp); a := op(up1,l1); b := op(up2,l1); c := op(dw1,l2); l1 := subsop(up1=NULL,up2=NULL,l1); l2 := subsop(dw1=NULL,l2); m1 := [ a-1, b, op(l1) ]; m2 := [ c-1, op(l2) ]; n1 := [ a-1, b+1, op(l1) ]; n2 := [ c, op(l2) ]; (1-a+b)*(c-1)/(a-1)/(1+b-c) * HYP[m1,m2,z] + b*(c-a)/(a-1)/(c-b-1) * HYP[n1,n2,z]; end: `HYPERG/C56`:=proc(shyp,up1,dw1,dw2) local l1,l2,z,a,b,c, m1,m2,n1,n2; l1 := op(1,shyp); l2 := op(2,shyp); z := op(3,shyp); a := op(up1,l1); b := op(dw1,l2); c := op(dw2,l2); l1 := subsop(up1=NULL,l1); l2 := subsop(dw1=NULL,dw2=NULL,l2); m1 := [ a, op(l1) ]; m2 := [ b-1, c+1, op(l2) ]; n1 := [ a+1, op(l1) ]; n2 := [ b, c+1, op(l2) ]; (b-1)*(c-a)/(b-a-1)/c * HYP[m1,m2,z] + a*(1-b+c)/(1+a-b)/c * HYP[n1,n2,z]; end: `HYPERG/C57`:=proc(shyp,up1,dw1,dw2) local l1,l2,z,a,b,c, m1,m2,n1,n2; l1 := op(1,shyp); l2 := op(2,shyp); z := op(3,shyp); a := op(up1,l1); b := op(dw1,l2); c := op(dw2,l2); l1 := subsop(up1=NULL,l1); l2 := subsop(dw1=NULL,dw2=NULL,l2); m1 := [ a-1, op(l1) ]; m2 := [ b-1, c, op(l2) ]; n1 := [ a-1, op(l1) ]; n2 := [ b, c-1, op(l2) ]; (b-1)*(c-a)/(a-1)/(c-b) * HYP[m1,m2,z] + (b-a)*(c-1)/(a-1)/(b-c) * HYP[n1,n2,z]; end: `HYPERG/C58`:=proc(shyp,dw1,dw2,dw3) local l1,l2,z,a,b,c, m1,m2,n1,n2; l1 := op(1,shyp); l2 := op(2,shyp); z := op(3,shyp); a := op(dw1,l2); b := op(dw2,l2); c := op(dw3,l2); l2 := subsop(dw1=NULL,dw2=NULL,dw3=NULL,l2); m1 := l1; m2 := [ a-1, b, c+1, op(l2) ]; n1 := l1; n2 := [ a, b-1, c+1, op(l2) ]; (a-1)*(1-b+c)/(a-b)/c * HYP[m1,m2,z] + (b-1)*(1-a+c)/(b-a)/c * HYP[n1,n2,z]; end: # Three-term relations with four parameters # `HYPERG/C59`:=proc(shyp,up1,up2,up3,up4) local l1,l2,z,A,B,C,D,a,b,c, m1,m2,n1,n2; l1 := op(1,shyp); l2 := op(2,shyp); z := op(3,shyp); A := op(up1,l1); B := op(up2,l1); C := op(up3,l1); D := op(up4,l1); a := A; b := C; c := B-2+A; if `HYPERG/Egalite`(D=c-b)=false then ERROR(`Enable to apply C59 with parameters`,A,B,C,D); fi: l1 := subsop(up1=NULL,up2=NULL,up3=NULL,up4=NULL,l1); m1 := [ a-1, 1-a+c, b, c-b, op(l1) ]; m2 := l2; n1 := [ a-1, 1-a+c, b+1, 1+c-b, op(l1) ]; n2 := l2; (a-b-1)*(1-a-b+c)/(a-1)/(1-a+c) * HYP[m1,m2,z] + b*(c-b)/(a-1)/(1-a+c) * HYP[n1,n2,z]; end: `HYPERG/C60`:=proc(shyp,up1,up2,up3,up4) local l1,l2,z,A,B,C,D,a,b,c, m1,m2,n1,n2; l1 := op(1,shyp); l2 := op(2,shyp); z := op(3,shyp); A := op(up1,l1); B := op(up2,l1); C := op(up3,l1); D := op(up4,l1); a := A; b := C; c := B+A; if `HYPERG/Egalite`(D=c-b)=false then ERROR(`Enable to apply C60 with parameters`,A,B,C,D); fi: l1 := subsop(up1=NULL,up2=NULL,up3=NULL,up4=NULL,l1); m1 := [ a+1, 1-a+c, b, c-b, op(l1) ]; m2 := l2; n1 := [ a, c-a, b+1, 1+c-b, op(l1) ]; n2 := l2; a*(c-a)/(a-b)/(c-a-b) * HYP[m1,m2,z] - b*(c-b)/(a-b)/(c-a-b) * HYP[n1,n2,z]; end: `HYPERG/C61`:=proc(shyp,up1,up2,up3,up4) local l1,l2,z,A,B,C,D,a,b,c, m1,m2,n1,n2; l1 := op(1,shyp); l2 := op(2,shyp); z := op(3,shyp); A := op(up1,l1); B := op(up2,l1); C := op(up3,l1); D := op(up4,l1); a := A; b := C; c := B+A; if `HYPERG/Egalite`(D=c-b)=false then ERROR(`Enable to apply C61 with parameters`,A,B,C,D); fi: l1 := subsop(up1=NULL,up2=NULL,up3=NULL,up4=NULL,l1); m1 := [ a+1, c-a-1, b+1, -1-b+c, op(l1) ]; m2 := l2; n1 := [ 1+(c-1)/2, a, -1-a+c, b, c-b-1, op(l1) ]; n2 := [ (c-1)/2, op(l2) ]; a*b/(c-a-1)/(c-b-1) * HYP[m1,m2,z] - (c-1)(-1-a-b+c)/(c-a-1)/(c-b-1) * HYP[n1,n2,z]; end: `HYPERG/C62`:=proc(shyp,up1,up2,up3,up4) local l1,l2,z,A,B,C,D,a,b,c, m1,m2,n1,n2,prod1,prod2,i; l1 := op(1,shyp); l2 := op(2,shyp); z := op(3,shyp); A := op(up1,l1); B := op(up2,l1); C := op(up3,l1); D := op(up4,l1); a := A; b := C; c := B+A; if `HYPERG/Egalite`(D=2-b+c)=false then ERROR(`Enable to apply C62 with parameters`,A,B,C,D); fi: l1 := subsop(up1=NULL,up2=NULL,up3=NULL,up4=NULL,l1); prod1 := convert(l1,`*`); prod2 := convert(l2,`*`); m1 := [ a+1, 1-a+c, b-1, 1+c-b, op(l1) ]; m2 := l2; n1 := [ a+1, 1-a+c, b, 2-b+c, c+2, seq(op(i,l1)+1,i=1..nops(l1)) ]; n2 := [ c+1, seq(op(i,l2)+1,i=1..nops(l2)) ]; HYP[m1,m2,z] + (a-b+1)*(1+c)*(c-a-b+1) * z*prod1/prod2 * HYP[n1,n2,z]; end: `HYPERG/C63`:=proc(shyp,up1,up2,up3,up4,plus) local l1,l2,z,A,B,C,D,a,b,c, m1,m2,n1,n2; l1 := op(1,shyp); l2 := op(2,shyp); z := op(3,shyp); A := op(up1,l1); B := op(up2,l1); C := op(up3,l1); D := op(up4,l1); a := A; b := C; c := B+A-2; if `HYPERG/Egalite`(D=c-b)=false then ERROR(`Enable to apply C63 with parameters`,A,B,C,D); fi: l1 := subsop(up1=NULL,up2=NULL,up3=NULL,up4=NULL,l1); m1 := [ a-1, 1-a+c, b+1, 1-b+c, op(l1) ]; m2 := l2; n1 := [ a-1, 1-a+c, b, -b+c, plus+1, 1+c-plus, op(l1) ]; n2 := [ plus, c-plus, op(l2) ]; b*(c-b)*(a-plus-1)*(1-a+c-plus) /(a-1)/(1-a+c)/(b-plus)/(c-b-plus) * HYP[m1,m2,z] + (1-a+b)*(1-a-b+c)*(c-plus)*plus/(a-1) /(1-a+c)/(b-plus)/(c-b-plus) * HYP[n1,n2,z]; end: `HYPERG/C64`:=proc(shyp,up1,up2,up3,dw1) local l1,l2,z,A,B,C,D,a,b,c, m1,m2,n1,n2; l1 := op(1,shyp); l2 := op(2,shyp); z := op(3,shyp); A := op(up1,l1); B := op(up2,l1); C := op(up3,l1); D := op(dw1,l2); a := A; b := C; c := B+A-1; if `HYPERG/Egalite`(D=c-b)=false then ERROR(`Enable to apply C64 with parameters`,A,B,C,D); fi: l1 := subsop(up1=NULL,up2=NULL,up3=NULL,l1); l2 := subsop(dw1=NULL,l2); m1 := [ a-1, c-a, b, op(l1) ]; m2 := [ c-b, op(l2) ]; n1 := [ a-1, c-a, b+1, op(l1) ]; n2 := [ -1-b+c, op(l2) ]; (a-b-1)*(c-a-b)/(a-1)/(c-a) * HYP[m1,m2,z] + b*(c-b-1)/(a-1)/(c-a) * HYP[n1,n2,z]; end: `HYPERG/C65`:=proc(shyp,up1,up2,up3,dw1) local l1,l2,z,A,B,C,D,a,b,c, m1,m2,n1,n2; l1 := op(1,shyp); l2 := op(2,shyp); z := op(3,shyp); A := op(up1,l1); B := op(up2,l1); C := op(up3,l1); D := op(dw1,l2); a := A; b := C; c := B+A; if `HYPERG/Egalite`(D=1-b+c)=false then ERROR(`Enable to apply C65 with parameters`,A,B,C,D); fi: l1 := subsop(up1=NULL,up2=NULL,up3=NULL,l1); l2 := subsop(dw1=NULL,l2); m1 := [ a+1, 1-a+c, b-1, op(l1) ]; m2 := [ 2-b+c, op(l2) ]; n1 := [ a, c-a, b-1, op(l1) ]; n2 := [ 2-b+c, op(l2) ]; a*(c-a)/(b-1)/(1-b+c) * HYP[m1,m2,z] - (1+a-b)*(1-a-b-c)/(b-1)/(1-b+c) * HYP[n1,n2,z]; end: `HYPERG/C66`:=proc(shyp,up1,up2,up3,dw1) local l1,l2,z,A,B,C,D,a,b,c, m1,m2,n1,n2; l1 := op(1,shyp); l2 := op(2,shyp); z := op(3,shyp); A := op(up1,l1); B := op(up2,l1); C := op(up3,l1); D := op(dw1,l2); a := A; b := C; c := B+A; if `HYPERG/Egalite`(D=1-b+c)=false then ERROR(`Enable to apply C66 with parameters`,A,B,C,D); fi: l1 := subsop(up1=NULL,up2=NULL,up3=NULL,l1); l2 := subsop(dw1=NULL,l2); m1 := [ a+1, 1-a+c, b, op(l1) ]; m2 := [ 1-b+c, op(l2) ]; n1 := [ a, c-a, b+1, op(l1) ]; n2 := [ c-b, op(l2) ]; a*(c-a)/(a-b)/(c-a-b) * HYP[m1,m2,z] - b*(c-b)/(a-b)/(c-a-b) * HYP[n1,n2,z]; end: `HYPERG/C67`:=proc(shyp,up1,up2,up3,dw1) local l1,l2,z,A,B,C,D,a,b,c, m1,m2,n1,n2; l1 := op(1,shyp); l2 := op(2,shyp); z := op(3,shyp); A := op(up1,l1); B := op(up2,l1); C := op(up3,l1); D := op(dw1,l2); a := A; b := C; c := B+A-1; if `HYPERG/Egalite`(D=c-b)=false then ERROR(`Enable to apply C67 with parameters`,A,B,C,D); fi: l1 := subsop(up1=NULL,up2=NULL,up3=NULL,l1); l2 := subsop(dw1=NULL,l2); m1 := [ a+1, c-a, b+1, op(l1) ]; m2 := [ 1-b+c, op(l2) ]; n1 := [ 1+c/2, a, c-a, b, op(l1) ]; n2 := [ c/2, 1-b+c, op(l2) ]; a*b/(c-a)/(c-b) * HYP[m1,m2,z] + c*(c-a-b)/(c-a)/(c-b) * HYP[n1,n2,z]; end: `HYPERG/C68`:=proc(shyp,up1,up2,up3,dw1) local l1,l2,z,A,B,C,D,a,b,c, m1,m2,n1,n2; l1 := op(1,shyp); l2 := op(2,shyp); z := op(3,shyp); A := op(up1,l1); B := op(up2,l1); C := op(up3,l1); D := op(dw1,l2); a := A; b := C; c := B+A; if `HYPERG/Egalite`(D=1-b+c)=false then ERROR(`Enable to apply C68 with parameters`,A,B,C,D); fi: l1 := subsop(up1=NULL,up2=NULL,up3=NULL,l1); l2 := subsop(dw1=NULL,l2); m1 := [ a-1, 1-a+c, b-1, op(l1) ]; m2 := [ c-b, op(l2) ]; n1 := [ 1+(c-1)/2, -1+a, c-a, b-1, op(l1) ]; n2 := [ (c-1)/2, 1-b+c, op(l2) ]; (c-a)*(c-b)/(a-1)/(b-1) * HYP[m1,m2,z] - (c-1)*(1-a-b+c)/(a-1)/(b-1) * HYP[n1,n2,z]; end: `HYPERG/C69`:=proc(shyp,up1,up2,up3,dw1) local l1,l2,z,A,B,C,D,a,b,c, m1,m2,n1,n2,prod1,prod2,i; l1 := op(1,shyp); l2 := op(2,shyp); z := op(3,shyp); A := op(up1,l1); B := op(up2,l1); C := op(up3,l1); D := op(dw1,l2); a := A; b := C; c := B+A; if `HYPERG/Egalite`(D=1-b+c)=false then ERROR(`Enable to apply C69 with parameters`,A,B,C,D); fi: l1 := subsop(up1=NULL,up2=NULL,up3=NULL,l1); l2 := subsop(dw1=NULL,l2); prod1 := convert(l1,`*`); prod2 := convert(l2,`*`); m1 := [ a+1, 1-a+c, b-1, op(l1) ]; m2 := [ 2-b+c, op(l2) ]; n1 := [ a+1, 1-a+c, b, c+2, seq(op(i,l1)+1,i=1..nops(l1)) ]; n2 := [ 3-b+c, c+1, seq(op(i,l2)+1,i=1..nops(l2)) ]; HYP[m1,m2,z] + (1+a-b)*(1+c)*(1-a-b+c) * z /(1-b+c)/(2-b+c) * prod1/prod2 * HYP[n1,n2,z]; end: `HYPERG/C70`:=proc(shyp,up1,up2,up3,dw1) local l1,l2,z,A,B,C,D,a,b,c, m1,m2,n1,n2,prod1,prod2,i; l1 := op(1,shyp); l2 := op(2,shyp); z := op(3,shyp); A := op(up1,l1); B := op(up2,l1); C := op(up3,l1); D := op(dw1,l2); a := A; b := C; c := B+A-1; if `HYPERG/Egalite`(D=c-b)=false then ERROR(`Enable to apply C70 with parameters`,A,B,C,D); fi: l1 := subsop(up1=NULL,up2=NULL,up3=NULL,l1); l2 := subsop(dw1=NULL,l2); prod1 := convert(l1,`*`); prod2 := convert(l2,`*`); m1 := [ a-1, c-a, b+1, op(l1) ]; m2 := [ -1-b+c, op(l2) ]; n1 := [ a, 1-a+c, b+1, c+1, seq(op(i,l1)+1,i=1..nops(l1)) ]; n2 := [ 1-b+c, c, seq(op(i,l2)+1,i=1..nops(l2)) ]; HYP[m1,m2,z] - (a-b-1)*c*(c-a-b) * z /(c-b-1)/(c-b) * prod1/prod2 * HYP[n1,n2,z]; end: `HYPERG/C71`:=proc(shyp,up1,up2,up3,dw1,plus) local l1,l2,z,A,B,C,D,a,b,c, m1,m2,n1,n2; l1 := op(1,shyp); l2 := op(2,shyp); z := op(3,shyp); A := op(up1,l1); B := op(up2,l1); C := op(up3,l1); D := op(dw1,l2); a := A; b := C; c := B+A-1; if `HYPERG/Egalite`(D=c-b)=false then ERROR(`Enable to apply C71 with parameters`,A,B,C,D); fi: l1 := subsop(up1=NULL,up2=NULL,up3=NULL,l1); l2 := subsop(dw1=NULL,l2); m1 := [ a-1, c-a, b+1, op(l1) ]; m2 := [ -1-b+c, op(l2) ]; n1 := [ a-1, c-a, b, plus+1, c-plus, op(l1) ]; n2 := [ c-b, plus, c-plus-1, op(l2) ]; b*(c-b-1)*(a-plus-1)*(c-a-plus) /(a-1)/(c-a)/(b-plus)/(c-b-1-plus) * HYP[m1,m2,z] + (1-a+b)*(c-a-b)*(c-plus-1)*plus /(a-1)/(c-a)/(b-plus)/(c-b-1-plus) * HYP[n1,n2,z]; end: `HYPERG/C72`:=proc(shyp,up1,up2,up3,dw1,plus) local l1,l2,z,A,B,C,D,a,b,c, m1,m2,n1,n2; l1 := op(1,shyp); l2 := op(2,shyp); z := op(3,shyp); A := op(up1,l1); B := op(up2,l1); C := op(up3,l1); D := op(dw1,l2); a := A; b := C; c := B+A; if `HYPERG/Egalite`(D=1-b+c)=false then ERROR(`Enable to apply C72 with parameters`,A,B,C,D); fi: l1 := subsop(up1=NULL,up2=NULL,up3=NULL,l1); l2 := subsop(dw1=NULL,l2); m1 := [ a+1, 1-a+c, b-1, op(l1) ]; m2 := [ 2-b+c, op(l2) ]; n1 := [ a, c-a, b-1, plus+1, 1+c-plus, op(l1) ]; n2 := [ 2-b+c, plus, c-plus, op(l2) ]; a*(c-a)*(b-plus-1)*(1-b+c-plus) /(b-1)/(1-b+c)/(a-plus)/(c-a-plus) * HYP[m1,m2,z] - (b-a-1)*(1-a-b+c)*(c-plus)*plus /(b-1)/(1-b+c)/(a-plus)/(c-a-plus) * HYP[n1,n2,z]; end: `HYPERG/C73`:=proc(shyp,up1,up2,up3,dw1) local l1,l2,z,A,B,C,D,a,b, tmp1,tmp2,m1,m2,n1,n2,prod1,prod2,i; l1 := op(1,shyp); l2 := op(2,shyp); z := op(3,shyp); A := op(up1,l1); B := op(up2,l1); C := op(up3,l1); D := op(dw1,l2); a := A; b := B; if `HYPERG/Egalite`(C=a+b)=false or `HYPERG/Egalite`(D=b-a+1)=false then ERROR(`Enable to apply C73 with parameters`,A,B,C,D); fi: l1 := subsop(up1=NULL,up2=NULL,up3=NULL,l1); l2 := subsop(dw1=NULL,l2); tmp1 := [ seq(op(i,l1)-1,i=1..nops(l1)) ]; tmp2 := [ seq(op(i,l2)-1,i=1..nops(l2)) ]; prod1 := convert(tmp1,`*`); prod2 := convert(tmp2,`*`); m1 := [ a, b, op(tmp1) ]; m2 := tmp2; n1 := [ a-1, b-1, op(tmp1) ]; n2 := tmp2; 1/(a+b-1)/z * prod2/prod1 * HYP[m1,m2,z] - 1/(a+b-1)/z * prod2/prod1 * HYP[n1,n2,z]; end: `HYPERG/C74`:=proc(shyp,up1,up2,dw1,dw2) local l1,l2,z,A,B,C,D,a,b,c,cp, m1,m2,n1,n2; l1 := op(1,shyp); l2 := op(2,shyp); z := op(3,shyp); A := op(up1,l1); B := op(up2,l1); C := op(dw1,l2); D := op(dw2,l2); a := A; b := B; c := C+A; cp := D+B; if `HYPERG/Egalite`(c=cp)=false then ERROR(`Enable to apply C74 with parameters`,A,B,C,D); fi: l1 := subsop(up1=NULL,up2=NULL,l1); l2 := subsop(dw1=NULL,dw2=NULL,l2); m1 := [ a-1, b, op(l1) ]; m2 := [ 1-a+c, -b+c, op(l2) ]; n1 := [ a-1, b+1, op(l1) ]; n2 := [ 1-a+c, c-b-1, op(l2) ]; (a-b-1)*(c-a-b)/(a-1)/(c-a) * HYP[m1,m2,z] + b*(c-b-1)/(a-1)/(c-a) * HYP[n1,n2,z]; end: `HYPERG/C75`:=proc(shyp,up1,up2,dw1,dw2) local l1,l2,z,A,B,C,D,a,b,c,cp, m1,m2,n1,n2; l1 := op(1,shyp); l2 := op(2,shyp); z := op(3,shyp); A := op(up1,l1); B := op(up2,l1); C := op(dw1,l2); D := op(dw2,l2); a := A; b := B; c := C+A; cp := D+B; if `HYPERG/Egalite`(c=cp)=false then ERROR(`Enable to apply C75 with parameters`,A,B,C,D); fi: l1 := subsop(up1=NULL,up2=NULL,l1); l2 := subsop(dw1=NULL,dw2=NULL,l2); m1 := [ a+1, b, op(l1) ]; m2 := [ c-a-1, -b+c, op(l2) ]; n1 := [ a, b+1, op(l1) ]; n2 := [ c-a-1, -1-b+c, op(l2) ]; a*(c-a-1)/(a-b)/(-1-a-b+c) * HYP[m1,m2,z] - b*(c-b-1)/(a-b)/(-1-a-b+c) * HYP[n1,n2,z]; end: `HYPERG/C76`:=proc(shyp,up1,up2,dw1,dw2) local l1,l2,z,A,B,C,D,a,b,c,cp, m1,m2,n1,n2; l1 := op(1,shyp); l2 := op(2,shyp); z := op(3,shyp); A := op(up1,l1); B := op(up2,l1); C := op(dw1,l2); D := op(dw2,l2); a := A; b := B; c := C+A; cp := D+B; if `HYPERG/Egalite`(c=cp)=false then ERROR(`Enable to apply C76 with parameters`,A,B,C,D); fi: l1 := subsop(up1=NULL,up2=NULL,l1); l2 := subsop(dw1=NULL,dw2=NULL,l2); m1 := [ a+1, b+1, op(l1) ]; m2 := [ 1-a+c, 1-b+c, op(l2) ]; n1 := [ 1+c/2, a, b, op(l1) ]; n2 := [ c/2, 1-a+c, 1-b+c, op(l2) ]; a*b/(c-a)/(c-b) * HYP[m1,m2,z] + c*(c-a-b)/(c-a)/(c-b) * HYP[n1,n2,z]; end: `HYPERG/C77`:=proc(shyp,up1,up2,dw1,dw2) local l1,l2,z,A,B,C,D,a,b,c,cp, m1,m2,n1,n2; l1 := op(1,shyp); l2 := op(2,shyp); z := op(3,shyp); A := op(up1,l1); B := op(up2,l1); C := op(dw1,l2); D := op(dw2,l2); a := A; b := B; c := C+A; cp := D+B; if `HYPERG/Egalite`(c=cp)=false then ERROR(`Enable to apply C77 with parameters`,A,B,C,D); fi: l1 := subsop(up1=NULL,up2=NULL,l1); l2 := subsop(dw1=NULL,dw2=NULL,l2); m1 := [ a-1, b-1, op(l1) ]; m2 := [ c-a-1, c-b-1, op(l2) ]; n1 := [ 1+(c-2)/2, -1+a, b-1, op(l1) ]; n2 := [ (c-2)/2, c-a, c-b, op(l2) ]; (c-a-1)*(c-b-1)/(a-1)/(b-1) * HYP[m1,m2,z] - (c-2)*(c-a-b)/(a-1)/(b-1) * HYP[n1,n2,z]; end: `HYPERG/C78`:=proc(shyp,up1,up2,dw1,dw2) local l1,l2,z,A,B,C,D,a,b,c,cp, m1,m2,n1,n2,prod1,prod2,i; l1 := op(1,shyp); l2 := op(2,shyp); z := op(3,shyp); A := op(up1,l1); B := op(up2,l1); C := op(dw1,l2); D := op(dw2,l2); a := A; b := B; c := C+A; cp := D+B; if `HYPERG/Egalite`(c=cp)=false then ERROR(`Enable to apply C78 with parameters`,A,B,C,D); fi: l1 := subsop(up1=NULL,up2=NULL,l1); l2 := subsop(dw1=NULL,dw2=NULL,l2); prod1 := convert(l1,`*`); prod2 := convert(l2,`*`); m1 := [ a+1, b-1, op(l1) ]; m2 := [ c-a-1, 1-b+c, op(l2) ]; n1 := [ a+1, b, c+1, seq(op(i,l1)+1,i=1..nops(l1)) ]; n2 := [ 1-a+c, 2-b+c, c, seq(op(i,l2)+1,i=1..nops(l2)) ]; HYP[m1,m2,z] + (1+a-b)*c*(c-a-b)*z/(c-a-1)/(c-a)/(c-b)/(1-b+c)*prod1/prod2 * HYP[n1,n2,z]; end: `HYPERG/C79`:=proc(shyp,up1,up2,dw1,dw2,plus) local l1,l2,z,A,B,C,D,a,b,c,cp, m1,m2,n1,n2; l1 := op(1,shyp); l2 := op(2,shyp); z := op(3,shyp); A := op(up1,l1); B := op(up2,l1); C := op(dw1,l2); D := op(dw2,l2); a := A; b := B; c := C+A; cp := D+B; if `HYPERG/Egalite`(c=cp)=false then ERROR(`Enable to apply C79 with parameters`,A,B,C,D); fi: l1 := subsop(up1=NULL,up2=NULL,l1); l2 := subsop(dw1=NULL,dw2=NULL,l2); m1 := [ a-1, b+1, op(l1) ]; m2 := [ 1-a+c, c-b-1, op(l2) ]; n1 := [ a-1, b, plus+1, c-plus, op(l1) ]; n2 := [ 1-a+c, c-b, plus, c-plus-1, op(l2) ]; b*(c-b-1)*(a-plus-1)*(c-a-plus) /(a-1)/(c-a)/(b-plus)/(c-b-1-plus) * HYP[m1,m2,z] + (1-a+b)*(c-a-b)*(c-plus-1)*plus /(a-1)/(c-a)/(b-plus)/(c-b-1-plus) * HYP[n1,n2,z]; end: `HYPERG/C80`:=proc(shyp,up1,up2,dw1,dw2) local l1,l2,z,A,B,C,D,a,b,c,cp, m1,m2,n1,n2; l1 := op(1,shyp); l2 := op(2,shyp); z := op(3,shyp); A := op(up1,l1); B := op(up2,l1); C := op(dw1,l2); D := op(dw2,l2); a := A; b := C; c := A+B; cp := C+D; if `HYPERG/Egalite`(c=cp)=false then ERROR(`Enable to apply C80 with parameters`,A,B,C,D); fi: l1 := subsop(up1=NULL,up2=NULL,l1); l2 := subsop(dw1=NULL,dw2=NULL,l2); m1 := [ a-1, c-a-1, op(l1) ]; m2 := [ b-1, c-b-1, op(l2) ]; n1 := [ a-1, c-a-1, op(l1) ]; n2 := [ b, -b+c, op(l2) ]; (b-1)*(c-b-1)/(a-1)/(c-a-1) * HYP[m1,m2,z] + (a-b)*(c-a-b)/(a-1)/(c-a-1) * HYP[n1,n2,z]; end: `HYPERG/C81`:=proc(shyp,up1,up2,dw1,dw2) local l1,l2,z,A,B,C,D,a,b,c,cp, m1,m2,n1,n2; l1 := op(1,shyp); l2 := op(2,shyp); z := op(3,shyp); A := op(up1,l1); B := op(up2,l1); C := op(dw1,l2); D := op(dw2,l2); a := A; b := C; c := A+B; cp := C+D; if `HYPERG/Egalite`(c=cp)=false then ERROR(`Enable to apply C81 with parameters`,A,B,C,D); fi: l1 := subsop(up1=NULL,up2=NULL,l1); l2 := subsop(dw1=NULL,dw2=NULL,l2); m1 := [ a+1, 1-a+c, op(l1) ]; m2 := [ b+1, 1-b+c, op(l2) ]; n1 := [ a, c-a, op(l1) ]; n2 := [ b+1, 1-b+c, op(l2) ]; a*(c-a)/b/(c-b) * HYP[m1,m2,z] - (a-b)*(c-a-b)/b/(c-b) * HYP[n1,n2,z]; end: `HYPERG/C82`:=proc(shyp,up1,up2,dw1,dw2) local l1,l2,z,A,B,C,D,a,b,c,cp, m1,m2,n1,n2; l1 := op(1,shyp); l2 := op(2,shyp); z := op(3,shyp); A := op(up1,l1); B := op(up2,l1); C := op(dw1,l2); D := op(dw2,l2); a := A; b := C; c := A+B; cp := C+D-2; if `HYPERG/Egalite`(c=cp)=false then ERROR(`Enable to apply C82 with parameters`,A,B,C,D); fi: l1 := subsop(up1=NULL,up2=NULL,l1); l2 := subsop(dw1=NULL,dw2=NULL,l2); m1 := [ a+1, 1-a+c, op(l1) ]; m2 := [ b, 2-b+c, op(l2) ]; n1 := [ a, c-a, op(l1) ]; n2 := [ b-1, 1-b+c, op(l2) ]; a*(c-a)/(1+a-b)/(1-a-b+c) * HYP[m1,m2,z] - (b-1)*(1-b+c)/(1+a-b)/(1-a-b+c) * HYP[n1,n2,z]; end: `HYPERG/C83`:=proc(shyp,up1,up2,dw1,dw2) local l1,l2,z,A,B,C,D,a,b,c,cp, m1,m2,n1,n2; l1 := op(1,shyp); l2 := op(2,shyp); z := op(3,shyp); A := op(up1,l1); B := op(up2,l1); C := op(dw1,l2); D := op(dw2,l2); a := A; b := C; c := A+B; cp := C+D; if `HYPERG/Egalite`(c=cp)=false then ERROR(`Enable to apply C83 with parameters`,A,B,C,D); fi: l1 := subsop(up1=NULL,up2=NULL,l1); l2 := subsop(dw1=NULL,dw2=NULL,l2); m1 := [ a+1, -1-a+c, op(l1) ]; m2 := [ b-1, 1-b+c, op(l2) ]; n1 := [ 1+(c-1)/2, a, -1-a+c, op(l1) ]; n2 := [ (c-1)/2, b, 1-b+c, op(l2) ]; a*(b-1)/(c-a-1)/(c-b) * HYP[m1,m2,z] + (c-1)*(c-a-b)/(c-a-1)/(c-b) * HYP[n1,n2,z]; end: `HYPERG/C84`:=proc(shyp,up1,up2,dw1,dw2) local l1,l2,z,A,B,C,D,a,b,c,cp, m1,m2,n1,n2,prod1,prod2,i; l1 := op(1,shyp); l2 := op(2,shyp); z := op(3,shyp); A := op(up1,l1); B := op(up2,l1); C := op(dw1,l2); D := op(dw2,l2); a := A; b := B; c := C+A; cp := D+B; if `HYPERG/Egalite`(c=cp)=false then ERROR(`Enable to apply C84 with parameters`,A,B,C,D); fi: l1 := subsop(up1=NULL,up2=NULL,l1); l2 := subsop(dw1=NULL,dw2=NULL,l2); prod1 := convert(l1,`*`); prod2 := convert(l2,`*`); m1 := [ a+1, 1-a+c, op(l1) ]; m2 := [ b+1, 1-b+c, op(l2) ]; n1 := [ a+1, 1-a+c, c+2, seq(op(i,l1)+1,i=1..nops(l1)) ]; n2 := [ b+2, 2-b+c, c+1, seq(op(i,l2)+1,i=1..nops(l2)) ]; HYP[m1,m2,z] + (a-b)*(1+c)*(c-a-b)*z/b/(1+b)/(c-b)/(1-b+c)*prod1/prod2 * HYP[n1,n2,z]; end: `HYPERG/C85`:=proc(shyp,up1,up2,dw1,dw2) local l1,l2,z,A,B,C,D,a,b,c,cp, m1,m2,n1,n2,prod1,prod2,i; l1 := op(1,shyp); l2 := op(2,shyp); z := op(3,shyp); A := op(up1,l1); B := op(up2,l1); C := op(dw1,l2); D := op(dw2,l2); a := A; b := B; c := C+A; cp := D+B; if `HYPERG/Egalite`(c=cp)=false then ERROR(`Enable to apply C85 with parameters`,A,B,C,D); fi: l1 := subsop(up1=NULL,up2=NULL,l1); l2 := subsop(dw1=NULL,dw2=NULL,l2); prod1 := convert(l1,`*`); prod2 := convert(l2,`*`); m1 := [ a-1, c-a-1, op(l1) ]; m2 := [ b-1, -1-b+c, op(l2) ]; n1 := [ a, c-a, c, seq(op(i,l1)+1,i=1..nops(l1)) ]; n2 := [ 1+b, 1-b+c, c-1, seq(op(i,l2)+1,i=1..nops(l2)) ]; HYP[m1,m2,z] - (a-b)*(c-1)*(c-a-b)*z/(b-1)/b/(c-b-1)/(c-b)*prod1/prod2 * HYP[n1,n2,z]; end: `HYPERG/C86`:=proc(shyp,up1,up2,dw1,dw2,plus) local l1,l2,z,A,B,C,D,a,b,c,cp, m1,m2,n1,n2; l1 := op(1,shyp); l2 := op(2,shyp); z := op(3,shyp); A := op(up1,l1); B := op(up2,l1); C := op(dw1,l2); D := op(dw2,l2); a := A; b := C; c := A+B; cp := C+D; if `HYPERG/Egalite`(c=cp)=false then ERROR(`Enable to apply C86 with parameters`,A,B,C,D); fi: l1 := subsop(up1=NULL,up2=NULL,l1); l2 := subsop(dw1=NULL,dw2=NULL,l2); m1 := [ a-1, c-a-1, op(l1) ]; m2 := [ b-1, c-b-1, op(l2) ]; n1 := [ a-1, c-a-1, plus+1, c-plus-1, op(l1) ]; n2 := [ b, c-b, plus, c-plus-2, op(l2) ]; (b-1)*(c-b-1)*(a-plus-1)*(c-a-1-plus) /(a-1)/(c-a-1)/(b-plus-1)/(c-b-1-plus) * HYP[m1,m2,z] + (b-a)*(c-a-b)*(c-plus-2)*plus /(a-1)/(c-a-1)/(b-plus-1)/(c-b-1-plus) * HYP[n1,n2,z]; end: `HYPERG/C87`:=proc(shyp,up1,up2,dw1,dw2,plus) local l1,l2,z,A,B,C,D,a,b,c,cp, m1,m2,n1,n2; l1 := op(1,shyp); l2 := op(2,shyp); z := op(3,shyp); A := op(up1,l1); B := op(up2,l1); C := op(dw1,l2); D := op(dw2,l2); a := A; b := C; c := A+B; cp := C+D; if `HYPERG/Egalite`(c=cp)=false then ERROR(`Enable to apply C87 with parameters`,A,B,C,D); fi: l1 := subsop(up1=NULL,up2=NULL,l1); l2 := subsop(dw1=NULL,dw2=NULL,l2); m1 := [ a+1, 1-a+c, op(l1) ]; m2 := [ b+1, 1-b+c, op(l2) ]; n1 := [ a, c-a, plus+1, 1+c-plus, op(l1) ]; n2 := [ b+1, 1-b+c, plus, c-plus, op(l2) ]; a*(c-a)*(b-plus)*(c-b-plus)/b/(c-b)/(a-plus)/(c-a-plus) * HYP[m1,m2,z] - (b-a)*(c-a-b)*(c-plus)*plus/b/(c-b)/(a-plus)/(c-a-plus) * HYP[n1,n2,z]; end: `HYPERG/C88`:=proc(shyp,up1,up2,dw1,dw2) local l1,l2,z,A,B,C,D,a,b, tmp1,tmp2,m1,m2,n1,n2,prod1,prod2,i; l1 := op(1,shyp); l2 := op(2,shyp); z := op(3,shyp); A := op(up1,l1); B := op(up2,l1); C := op(dw1,l2); D := op(dw2,l2); a := A; b := C-1; if `HYPERG/Egalite`(B=a+b)=false or `HYPERG/Egalite`(D=b-a+1)=false then ERROR(`Enable to apply C88 with parameters`,A,B,C,D); fi: l1 := subsop(up1=NULL,up2=NULL,l1); l2 := subsop(dw1=NULL,dw2=NULL,l2); tmp1 := [ seq(op(i,l1)-1,i=1..nops(l1)) ]; tmp2 := [ seq(op(i,l2)-1,i=1..nops(l2)) ]; prod1 := convert(tmp1,`*`); prod2 := convert(tmp2,`*`); m1 := [ a, op(tmp1) ]; m2 := [ b-1, op(tmp2) ]; n1 := [ a-1, op(tmp1) ]; n2 := [ b, op(tmp2) ]; (b-1)*b/(a+b-1)/z * prod2/prod1 * HYP[m1,m2,z] - (b-1)*b/(a+b-1)/z * prod2/prod1 * HYP[n1,n2,z]; end: `HYPERG/C89`:=proc(shyp,up1,dw1,dw2,dw3) local l1,l2,z,A,B,C,D,a,b,c,cp, m1,m2,n1,n2; l1 := op(1,shyp); l2 := op(2,shyp); z := op(3,shyp); A := op(up1,l1); B := op(dw1,l2); C := op(dw2,l2); D := op(dw3,l2); a := A; b := C; c := B+A; if `HYPERG/Egalite`(D=1-b+c)=false then ERROR(`Enable to apply C89 with parameters`,A,B,C,D); fi: l1 := subsop(up1=NULL,l1); l2 := subsop(dw1=NULL,dw2=NULL,dw3=NULL,l2); m1 := [ a-1, op(l1) ]; m2 := [ 1-a+c, b-1, c-b, op(l2) ]; n1 := [ a-1, op(l1) ]; n2 := [ 1-a+c, b, 1-b+c, op(l2) ]; (b-1)*(c-b)/(a-1)/(c-a) * HYP[m1,m2,z] + (a-b)*(1-a-b+c)/(a-1)/(c-a) * HYP[n1,n2,z]; end: `HYPERG/C90`:=proc(shyp,up1,dw1,dw2,dw3) local l1,l2,z,A,B,C,D,a,b,c,cp, m1,m2,n1,n2; l1 := op(1,shyp); l2 := op(2,shyp); z := op(3,shyp); A := op(up1,l1); B := op(dw1,l2); C := op(dw2,l2); D := op(dw3,l2); a := A; b := C; c := B+A-1; if `HYPERG/Egalite`(D=c-b)=false then ERROR(`Enable to apply C90 with parameters`,A,B,C,D); fi: l1 := subsop(up1=NULL,l1); l2 := subsop(dw1=NULL,dw2=NULL,dw3=NULL,l2); m1 := [ a+1, op(l1) ]; m2 := [ c-a, b+1, 1-b+c, op(l2) ]; n1 := [ a, op(l1) ]; n2 := [ 1-a+c, b+1, 1-b+c, op(l2) ]; a*(c-a)/b/(c-b) * HYP[m1,m2,z] + (a-b)*(c-a-b)/b/(c-b) * HYP[n1,n2,z]; end: `HYPERG/C91`:=proc(shyp,up1,dw1,dw2,dw3) local l1,l2,z,A,B,C,D,a,b,c,cp, m1,m2,n1,n2; l1 := op(1,shyp); l2 := op(2,shyp); z := op(3,shyp); A := op(up1,l1); B := op(dw1,l2); C := op(dw2,l2); D := op(dw3,l2); a := A; b := C; c := B+A; if `HYPERG/Egalite`(D=1-b+c)=false then ERROR(`Enable to apply C91 with parameters`,A,B,C,D); fi: l1 := subsop(up1=NULL,l1); l2 := subsop(dw1=NULL,dw2=NULL,dw3=NULL,l2); m1 := [ a+1, op(l1) ]; m2 := [ c-a-1, b, 1-b+c, op(l2) ]; n1 := [ a, op(l1) ]; n2 := [ c-a, b-1, c-b, op(l2) ]; a*(c-a-1)/(1+a-b)/(c-a-b) * HYP[m1,m2,z] - (b-1)*(c-b)/(1+a-b)/(c-a-b) * HYP[n1,n2,z]; end: `HYPERG/C92`:=proc(shyp,up1,dw1,dw2,dw3) local l1,l2,z,A,B,C,D,a,b,c,cp, m1,m2,n1,n2; l1 := op(1,shyp); l2 := op(2,shyp); z := op(3,shyp); A := op(up1,l1); B := op(dw1,l2); C := op(dw2,l2); D := op(dw3,l2); a := A; b := C; c := B+A; if `HYPERG/Egalite`(D=1-b+c)=false then ERROR(`Enable to apply C92 with parameters`,A,B,C,D); fi: l1 := subsop(up1=NULL,l1); l2 := subsop(dw1=NULL,dw2=NULL,dw3=NULL,l2); m1 := [ a+1, op(l1) ]; m2 := [ 1-a+c, b-1, 2-b+c, op(l2) ]; n1 := [ 1+c/2, a, op(l1) ]; n2 := [ c/2, 1-a+c, b, 2-b+c, op(l2) ]; a*(b-1)/(c-a)/(1-b+c) * HYP[m1,m2,z] + c*(1-a-b+c)/(c-a)/(1-b+c) * HYP[n1,n2,z]; end: `HYPERG/C93`:=proc(shyp,up1,dw1,dw2,dw3) local l1,l2,z,A,B,C,D,a,b,c,cp, m1,m2,n1,n2; l1 := op(1,shyp); l2 := op(2,shyp); z := op(3,shyp); A := op(up1,l1); B := op(dw1,l2); C := op(dw2,l2); D := op(dw3,l2); a := A; b := C; c := B+A-1; if `HYPERG/Egalite`(D=c-b)=false then ERROR(`Enable to apply C93 with parameters`,A,B,C,D); fi: l1 := subsop(up1=NULL,l1); l2 := subsop(dw1=NULL,dw2=NULL,dw3=NULL,l2); m1 := [ a-1, op(l1) ]; m2 := [ c-a, b+1, -1-b+c, op(l2) ]; n1 := [ 1+(c-1)/2, -1+a, op(l1) ]; n2 := [ (c-1)/2, 1-a+c, b+1, c-b, op(l2) ]; (c-a)*(c-b-1)/(a-1)/b * HYP[m1,m2,z] - (c-1)*(c-a-b)/(a-1)/b * HYP[n1,n2,z]; end: `HYPERG/C94`:=proc(shyp,up1,dw1,dw2,dw3) local l1,l2,z,A,B,C,D,a,b,c,cp, m1,m2,n1,n2,prod1,prod2,i; l1 := op(1,shyp); l2 := op(2,shyp); z := op(3,shyp); A := op(up1,l1); B := op(dw1,l2); C := op(dw2,l2); D := op(dw3,l2); a := A; b := C; c := B+A-1; if `HYPERG/Egalite`(D=c-b)=false then ERROR(`Enable to apply C94 with parameters`,A,B,C,D); fi: l1 := subsop(up1=NULL,l1); l2 := subsop(dw1=NULL,dw2=NULL,dw3=NULL,l2); prod1 := convert(l1,`*`); prod2 := convert(l2,`*`); m1 := [ a+1, op(l1) ]; m2 := [ c-a, b+1, 1-b+c, op(l2) ]; n1 := [ a+1, c+2, seq(op(i,l1)+1,i=1..nops(l1)) ]; n2 := [ 2-a+c, b+2, 2-b+c, c+1, seq(op(i,l2)+1,i=1..nops(l2)) ]; HYP[m1,m2,z] + (a-b)*(1+c)*(c-a-b)*z/b/(1+b)/(c-a)/(1-a+c)/(c-b)/(1-b+c) * prod1/prod2 * HYP[n1,n2,z]; end: `HYPERG/C95`:=proc(shyp,up1,dw1,dw2,dw3) local l1,l2,z,A,B,C,D,a,b,c,cp, m1,m2,n1,n2,prod1,prod2,i; l1 := op(1,shyp); l2 := op(2,shyp); z := op(3,shyp); A := op(up1,l1); B := op(dw1,l2); C := op(dw2,l2); D := op(dw3,l2); a := A; b := C; c := B+A; if `HYPERG/Egalite`(D=1-b+c)=false then ERROR(`Enable to apply C95 with parameters`,A,B,C,D); fi: l1 := subsop(up1=NULL,l1); l2 := subsop(dw1=NULL,dw2=NULL,dw3=NULL,l2); prod1 := convert(l1,`*`); prod2 := convert(l2,`*`); m1 := [ a-1, op(l1) ]; m2 := [ 1-a+c, b-1, -b+c, op(l2) ]; n1 := [ a, c+1, seq(op(i,l1)+1,i=1..nops(l1)) ]; n2 := [ 2-a+c, b+1, 2-b+c, c, seq(op(i,l2)+1,i=1..nops(l2)) ]; HYP[m1,m2,z] - (a-b)*c*(1-a-b+c)*z/(b-1)/b/(c-a)/(1-a+c)/(c-b)/(1-b+c) * prod1/prod2 * HYP[n1,n2,z]; end: `HYPERG/C96`:=proc(shyp,up1,dw1,dw2,dw3,plus) local l1,l2,z,A,B,C,D,a,b,c,cp, m1,m2,n1,n2; l1 := op(1,shyp); l2 := op(2,shyp); z := op(3,shyp); A := op(up1,l1); B := op(dw1,l2); C := op(dw2,l2); D := op(dw3,l2); a := A; b := C; c := B+A; if `HYPERG/Egalite`(D=1-b+c)=false then ERROR(`Enable to apply C96 with parameters`,A,B,C,D); fi: l1 := subsop(up1=NULL,l1); l2 := subsop(dw1=NULL,dw2=NULL,dw3=NULL,l2); m1 := [ a-1, op(l1) ]; m2 := [ 1-a+c, b-1, c-b, op(l2) ]; n1 := [ a-1, plus+1, c-plus, op(l1) ]; n2 := [ 1-a+c, b, 1-b+c, plus, c-plus-1, op(l2) ]; (b-1)*(c-b)*(a-plus-1)*(c-a-plus) /(a-1)/(c-a)/(b-plus-1)/(c-b-plus) * HYP[m1,m2,z] + (b-a)*(1-a-b+c)*(c-plus-1)*plus /(a-1)/(c-a)/(b-plus-1)/(c-b-plus) * HYP[n1,n2,z]; end: `HYPERG/C97`:=proc(shyp,up1,dw1,dw2,dw3,plus) local l1,l2,z,A,B,C,D,a,b,c,cp, m1,m2,n1,n2; l1 := op(1,shyp); l2 := op(2,shyp); z := op(3,shyp); A := op(up1,l1); B := op(dw1,l2); C := op(dw2,l2); D := op(dw3,l2); a := A; b := C; c := B+A-1; if `HYPERG/Egalite`(D=c-b)=false then ERROR(`Enable to apply C97 with parameters`,A,B,C,D); fi: l1 := subsop(up1=NULL,l1); l2 := subsop(dw1=NULL,dw2=NULL,dw3=NULL,l2); m1 := [ a+1, op(l1) ]; m2 := [ c-a, b+1, 1-b+c, op(l2) ]; n1 := [ a, plus+1, 1+c-plus, op(l1) ]; n2 := [ 1-a+c, b+1, 1-b+c, plus, c-plus, op(l2) ]; a*(c-a)*(b-plus)*(c-b-plus)/b/(c-b)/(a-plus)/(c-a-plus) * HYP[m1,m2,z] - (b-a)*(c-a-b)*(c-plus)*plus/b/(c-b)/(a-plus)/(c-a-plus) * HYP[n1,n2,z]; end: `HYPERG/C98`:=proc(shyp,up1,dw1,dw2,dw3) local l1,l2,z,A,B,C,D,a,b, tmp1,tmp2,m1,m2,n1,n2,prod1,prod2,i; l1 := op(1,shyp); l2 := op(2,shyp); z := op(3,shyp); A := op(up1,l1); B := op(dw1,l2); C := op(dw2,l2); D := op(dw3,l2); a := B-1; b := C-1; if `HYPERG/Egalite`(A=a+b)=false or `HYPERG/Egalite`(D=b-a+1)=false then ERROR(`Enable to apply C98 with parameters`,A,B,C,D); fi: l1 := subsop(up1=NULL,l1); l2 := subsop(dw1=NULL,dw2=NULL,dw3=NULL,l2); tmp1 := [ seq(op(i,l1)-1,i=1..nops(l1)) ]; tmp2 := [ seq(op(i,l2)-1,i=1..nops(l2)) ]; prod1 := convert(tmp1,`*`); prod2 := convert(tmp2,`*`); m1 := tmp1; m2 := [ a-1, b-1, op(tmp2) ]; n1 := tmp1; n2 := [ a, b, op(tmp2) ]; (a-1)*a*(b-1)*b/(a+b-1)/z * prod2/prod1 * HYP[m1,m2,z] - (a-1)*a*(b-1)*b/(a+b-1)/z * prod2/prod1 * HYP[n1,n2,z]; end: `HYPERG/C99`:=proc(shyp,dw1,dw2,dw3,dw4) local l1,l2,z,A,B,C,D,a,b,c, m1,m2,n1,n2; l1 := op(1,shyp); l2 := op(2,shyp); z := op(3,shyp); A := op(dw1,l2); B := op(dw2,l2); C := op(dw3,l2); D := op(dw4,l2); a := A; b := C; c := A+B; if `HYPERG/Egalite`(D=2-b+c)=false then ERROR(`Enable to apply C99 with parameters`,A,B,C,D); fi: l2 := subsop(dw1=NULL,dw2=NULL,dw3=NULL,dw4=NULL,l2); m1 := l1; m2 := [ a+1, 1-a+c, b-1, 1-b+c, op(l2) ]; n1 := l1; n2 := [ a+1, 1-a+c, b, 2-b+c, op(l2) ]; (b-1)*(1-b+c)/a/(c-a) * HYP[m1,m2,z] + (1+a-b)*(1-a-b+c)/a/(c-a) * HYP[n1,n2,z]; end: `HYPERG/C100`:=proc(shyp,dw1,dw2,dw3,dw4) local l1,l2,z,A,B,C,D,a,b,c, m1,m2,n1,n2; l1 := op(1,shyp); l2 := op(2,shyp); z := op(3,shyp); A := op(dw1,l2); B := op(dw2,l2); C := op(dw3,l2); D := op(dw4,l2); a := A; b := C; c := A+B; if `HYPERG/Egalite`(D=c-b)=false then ERROR(`Enable to apply C100 with parameters`,A,B,C,D); fi: l2 := subsop(dw1=NULL,dw2=NULL,dw3=NULL,dw4=NULL,l2); m1 := l1; m2 := [ a-1, c-a-1, b-1, 1-b+c, op(l2) ]; n1 := l1; n2 := [ a, c-a, b-1, -1-b+c, op(l2) ]; (a-1)*(c-a-1)/(a-b)/(c-a-b) * HYP[m1,m2,z] - (b-1)*(c-b-1)/(a-b)/(c-a-b) * HYP[n1,n2,z]; end: `HYPERG/C101`:=proc(shyp,dw1,dw2,dw3,dw4) local l1,l2,z,A,B,C,D,a,b,c, m1,m2,n1,n2; l1 := op(1,shyp); l2 := op(2,shyp); z := op(3,shyp); A := op(dw1,l2); B := op(dw2,l2); C := op(dw3,l2); D := op(dw4,l2); a := A; b := C; c := A+B; if `HYPERG/Egalite`(D=c-b)=false then ERROR(`Enable to apply C101 with parameters`,A,B,C,D); fi: l2 := subsop(dw1=NULL,dw2=NULL,dw3=NULL,dw4=NULL,l2); m1 := l1; m2 := [ a-1, 1-a+c, b-1, 1-b+c, op(l2) ]; n1 := [ 1+(c-1)/2, op(l1) ]; n2 := [ (c-1)/2, a, 1-a+c, b, 1-b+c, op(l2) ]; (a-1)*(b-1)/(c-a)/(c-b) * HYP[m1,m2,z] + (c-1)*(1-a-b+c)/(c-a)/(c-b) * HYP[n1,n2,z]; end: `HYPERG/C102`:=proc(shyp,dw1,dw2,dw3,dw4) local l1,l2,z,A,B,C,D,a,b,c, tmp1,tmp2,m1,m2,n1,n2,prod1,prod2,i; l1 := op(1,shyp); l2 := op(2,shyp); z := op(3,shyp); A := op(dw1,l2); B := op(dw2,l2); C := op(dw3,l2); D := op(dw4,l2); a := A; b := C; c := A+B-2; if `HYPERG/Egalite`(D=c-b)=false then ERROR(`Enable to apply C102 with parameters`,A,B,C,D); fi: l2 := subsop(dw1=NULL,dw2=NULL,dw3=NULL,dw4=NULL,l2); prod1 := convert(l1,`*`); prod2 := convert(l2,`*`); tmp1 := [ seq(op(i,l1)+1,i=1..nops(l1)) ]; tmp2 := [ seq(op(i,l2)+1,i=1..nops(l2)) ]; m1 := l1; m2 := [ a-1, 1-a+c, b+1, 1-b+c, op(l2) ]; n1 := [ c+2, op(tmp1) ]; n2 := [ a+1, 3-a+c, b+2, 2-b+c, c+1, op(tmp2) ]; HYP[m1,m2,z] + (a-b-1)*(1+c)*(1-a-b+c)*z/(a-1)/a/b/(1+b)/(1-a+c)/(2-a+c)/(c-b)/(1-b+c) * prod1 / prod2 * HYP[n1,n2,z]; end: `HYPERG/C103`:=proc(shyp,dw1,dw2,dw3,dw4,plus) local l1,l2,z,A,B,C,D,a,b,c, m1,m2,n1,n2; l1 := op(1,shyp); l2 := op(2,shyp); z := op(3,shyp); A := op(dw1,l2); B := op(dw2,l2); C := op(dw3,l2); D := op(dw4,l2); a := A; b := C; c := A+B; if `HYPERG/Egalite`(D=2-b+c)=false then ERROR(`Enable to apply C103 with parameters`,A,B,C,D); fi: l2 := subsop(dw1=NULL,dw2=NULL,dw3=NULL,dw4=NULL,l2); m1 := l1; m2 := [ a+1, 1-a+c, b-1, 1-b+c, op(l2) ]; n1 := [ plus+1, 1+c-plus, op(l1) ]; n2 := [ 1+a, 1-a+c, b, 2-b+c, plus, c-plus, op(l2) ]; (b-1)*(1-b+c)*(a-plus)*(c-a-plus)/a/(c-a)/(b-plus-1)/(1-b+c-plus) * HYP[m1,m2,z] + (b-a-1)*(1-a-b+c)*(c-plus)*plus/a/(c-a)/(b-plus-1)/(1-b+c-plus) * HYP[n1,n2,z]; end: `HYPERG/C104`:=proc(shyp,up1,up2,up3,up4,up5,dw1) local l1,l2,z,A,B,C,D,E,F,a,b,c, tmp1,tmp2,m1,m2,n1,n2,prod1,prod2,i; l1 := op(1,shyp); l2 := op(2,shyp); z := op(3,shyp); A := op(up1,l1); B := op(up2,l1); C := op(up3,l1); D := op(up4,l1); E := op(up5,l1); F := op(dw1,l2); a := A; b := C; c := A+B; if `HYPERG/Egalite`(D=c-b)=false or `HYPERG/Egalite`(E=c)=false or `HYPERG/Egalite`(F=c-1)=false then ERROR(`Enable to apply C104 with parameters`,A,B,C,D,E,F); fi: l1 := subsop(up1=NULL,up2=NULL,up3=NULL,up4=NULL,up5=NULL,l1); l2 := subsop(dw1=NULL,l2); tmp1 := [ seq(op(i,l1)-1,i=1..nops(l1)) ]; tmp2 := [ seq(op(i,l2)-1,i=1..nops(l2)) ]; prod1 := convert(tmp1,`*`); prod2 := convert(tmp2,`*`); m1 := [ a-1, c-a-1, b, -b+c, op(tmp1) ]; m2 := tmp2; n1 := [ a, c-a, b-1, -1-b+c, op(tmp1) ]; n2 := tmp2; 1/(a-b)/(c-1)/(c-a-b)/z * prod2/prod1 * HYP[m1,m2,z] - 1/(a-b)/(c-1)/(c-a-b)/z * prod2/prod1 * HYP[n1,n2,z]; end: `HYPERG/C110`:=proc(shyp,up1,up2,up3,up4,up5,dw1) local l1,l2,z,A,B,C,D,E,F,a,b,c, m1,m2,n1,n2; l1 := op(1,shyp); l2 := op(2,shyp); z := op(3,shyp); A := op(up1,l1); B := op(up2,l1); C := op(up3,l1); D := op(up4,l1); E := op(up5,l1); F := op(dw1,l2); a := B; b := D; c := 2*F; if `HYPERG/Egalite`(A=1+c/2)=false or `HYPERG/Egalite`(C=c-a)=false or `HYPERG/Egalite`(E=c-b)=false then ERROR(`Enable to apply C110 with parameters`,A,B,C,D,E,F); fi: l1 := subsop(up1=NULL,up2=NULL,up3=NULL,up4=NULL,up5=NULL,l1); l2 := subsop(dw1=NULL,l2); m1 := [ a, 1-a+c, b, 1-b+c, op(l1) ]; m2 := l2; n1 := [ a+1, c-a, b+1, c-b, op(l1) ]; n2 := l2; (c-a)*(c-b)/c/(c-a-b) * HYP[m1,m2,z] - a*b/c/(c-a-b) * HYP[n1,n2,z]; end: `HYPERG/C105`:=proc(shyp,up1,up2,up3,up4,dw1,dw2) local l1,l2,z,A,B,C,D,E,F,a,b,c, tmp1,tmp2,m1,m2,n1,n2,prod1,prod2,i; l1 := op(1,shyp); l2 := op(2,shyp); z := op(3,shyp); A := op(up1,l1); B := op(up2,l1); C := op(up3,l1); D := op(up4,l1); E := op(dw1,l2); F := op(dw2,l2); a := A; b := C; c := A+B; if `HYPERG/Egalite`(D=c)=false or `HYPERG/Egalite`(E=1-b+c)=false or `HYPERG/Egalite`(F=-1+c)=false then ERROR(`Enable to apply C105 with parameters`,A,B,C,D,E,F); fi: l1 := subsop(up1=NULL,up2=NULL,up3=NULL,up4=NULL,l1); l2 := subsop(dw1=NULL,dw2=NULL,l2); tmp1 := [ seq(op(i,l1)-1,i=1..nops(l1)) ]; tmp2 := [ seq(op(i,l2)-1,i=1..nops(l2)) ]; prod1 := convert(tmp1,`*`); prod2 := convert(tmp2,`*`); m1 := [ a-1, c-a-1, b, op(tmp1) ]; m2 := [ c-b-1, op(tmp2) ]; n1 := [ a, c-a, b-1, op(tmp1) ]; n2 := [ c-b, op(tmp2) ]; (c-b-1)*(c-b)/(a-b)/(c-1)/(c-a-b)/z * prod2/prod1 * HYP[m1,m2,z] - (c-b-1)*(c-b)/(a-b)/(c-1)/(c-a-b)/z * prod2/prod1 * HYP[n1,n2,z]; end: `HYPERG/C112`:=proc(shyp,up1,up2,up3,up4,dw1,dw2) local l1,l2,z,A,B,C,D,E,F,a,b,c, m1,m2,n1,n2; l1 := op(1,shyp); l2 := op(2,shyp); z := op(3,shyp); A := op(up1,l1); B := op(up2,l1); C := op(up3,l1); D := op(up4,l1); E := op(dw1,l2); F := op(dw2,l2); a := B; b := D; c := 2*E; if `HYPERG/Egalite`(A=1+c/2)=false or `HYPERG/Egalite`(C=c-a)=false or `HYPERG/Egalite`(F=1-b+c)=false then ERROR(`Enable to apply C112 with parameters`,A,B,C,D,E,F); fi: l1 := subsop(up1=NULL,up2=NULL,up3=NULL,up4=NULL,l1); l2 := subsop(dw1=NULL,dw2=NULL,l2); m1 := [ a, 1-a+c, b, op(l1) ]; m2 := [ c-b, op(l2) ]; n1 := [ a+1, c-a, b+1, op(l1) ]; n2 := [ 1-b+c, op(l2) ]; (c-a)*(c-b)/c/(c-a-b) * HYP[m1,m2,z] - ab/c/(c-a-b) * HYP[n1,n2,z]; end: `HYPERG/C106`:=proc(shyp,up1,up2,up3,dw1,dw2,dw3) local l1,l2,z,A,B,C,D,E,F,a,b,c, tmp1,tmp2,m1,m2,n1,n2,prod1,prod2,i; l1 := op(1,shyp); l2 := op(2,shyp); z := op(3,shyp); A := op(up1,l1); B := op(up2,l1); C := op(up3,l1); D := op(dw1,l2); E := op(dw2,l2); F := op(dw3,l2); a := A; b := B; c := C; if `HYPERG/Egalite`(D=1-a+c)=false or `HYPERG/Egalite`(E=1-b+c)=false or `HYPERG/Egalite`(F=-1+c)=false then ERROR(`Enable to apply C106 with parameters`,A,B,C,D,E,F); fi: l1 := subsop(up1=NULL,up2=NULL,up3=NULL,l1); l2 := subsop(dw1=NULL,dw2=NULL,dw3=NULL,l2); tmp1 := [ seq(op(i,l1)-1,i=1..nops(l1)) ]; tmp2 := [ seq(op(i,l2)-1,i=1..nops(l2)) ]; prod1 := convert(tmp1,`*`); prod2 := convert(tmp2,`*`); m1 := [ a-1, b, op(tmp1) ]; m2 := [ -a+c, c-b-1, op(tmp2) ]; n1 := [ a, b-1, op(tmp1) ]; n2 := [ -1-a+c, c-b, op(tmp2) ]; (c-a-1)*(c-a)*(c-b-1)*(c-b)/(a-b)/(c-1)/(c-a-b)/z * prod2/prod1 * HYP[m1,m2,z] - (c-a-1)*(c-a)*(c-b-1)*(c-b)/(a-b)/(c-1)/(c-a-b)/z * prod2/prod1 * HYP[n1,n2,z]; end: `HYPERG/C107`:=proc(shyp,up1,up2,up3,dw1,dw2,dw3) local l1,l2,z,A,B,C,D,E,F,a,b,c, tmp1,tmp2,m1,m2,n1,n2,prod1,prod2,i; l1 := op(1,shyp); l2 := op(2,shyp); z := op(3,shyp); A := op(up1,l1); B := op(up2,l1); C := op(up3,l1); D := op(dw1,l2); E := op(dw2,l2); F := op(dw3,l2); a := A; b := D-1; c := C; if `HYPERG/Egalite`(B=c-a)=false or `HYPERG/Egalite`(E=1-b+c)=false or `HYPERG/Egalite`(F=-1+c)=false then ERROR(`Enable to apply C107 with parameters`,A,B,C,D,E,F); fi: l1 := subsop(up1=NULL,up2=NULL,up3=NULL,l1); l2 := subsop(dw1=NULL,dw2=NULL,dw3=NULL,l2); tmp1 := [ seq(op(i,l1)-1,i=1..nops(l1)) ]; tmp2 := [ seq(op(i,l2)-1,i=1..nops(l2)) ]; prod1 := convert(tmp1,`*`); prod2 := convert(tmp2,`*`); m1 := [ -1+a, c-a-1, op(tmp1) ]; m2 := [ b-1, c-b-1, op(tmp2) ]; n1 := [ a, c-a, op(tmp1) ]; n2 := [ b, c-b, op(tmp2) ]; (b-1)*b*(c-b-1)*(c-b)/(a-b)/(c-1)/(c-a-b)/z * prod2/prod1 * HYP[m1,m2,z] - (b-1)*b*(c-b-1)*(c-b)/(a-b)/(c-1)/(c-a-b)/z * prod2/prod1 * HYP[n1,n2,z]; end: `HYPERG/C114`:=proc(shyp,up1,up2,up3,dw1,dw2,dw3) local l1,l2,z,A,B,C,D,E,F,a,b,c, m1,m2,n1,n2; l1 := op(1,shyp); l2 := op(2,shyp); z := op(3,shyp); A := op(up1,l1); B := op(up2,l1); C := op(up3,l1); D := op(dw1,l2); E := op(dw2,l2); F := op(dw3,l2); a := B; b := C; c := 2*D; if `HYPERG/Egalite`(A=1+c/2)=false or `HYPERG/Egalite`(E=1-a+c)=false or `HYPERG/Egalite`(F=1-b+c)=false then ERROR(`Enable to apply C114 with parameters`,A,B,C,D,E,F); fi: l1 := subsop(up1=NULL,up2=NULL,up3=NULL,l1); l2 := subsop(dw1=NULL,dw2=NULL,dw3=NULL,l2); m1 := [ a, b, op(l1) ]; m2 := [ c-a, -b+c, op(l2) ]; n1 := [ a+1, b+1, op(l1) ]; n2 := [ 1-a+c, 1-b+c, op(l2) ]; (c-a)*(c-b)/c/(c-a-b) * HYP[m1,m2,z] - a*b/c/(c-a-b) * HYP[n1,n2,z]; end: `HYPERG/C115`:=proc(shyp,up1,up2,up3,dw1,dw2,dw3) local l1,l2,z,A,B,C,D,E,F,a,b,c, m1,m2,n1,n2; l1 := op(1,shyp); l2 := op(2,shyp); z := op(3,shyp); A := op(up1,l1); B := op(up2,l1); C := op(up3,l1); D := op(dw1,l2); E := op(dw2,l2); F := op(dw3,l2); a := B; b := E; c := 2*D; if `HYPERG/Egalite`(A=1+c/2)=false or `HYPERG/Egalite`(C=c-a)=false or `HYPERG/Egalite`(F=2-b+c)=false then ERROR(`Enable to apply C115 with parameters`,A,B,C,D,E,F); fi: l1 := subsop(up1=NULL,up2=NULL,up3=NULL,l1); l2 := subsop(dw1=NULL,dw2=NULL,dw3=NULL,l2); m1 := [ a, 1-a+c, op(l1) ]; m2 := [ b, 1-b+c, op(l2) ]; n1 := [ a+1, c-a, op(l1) ]; n2 := [ -1+b, 2-b+c, op(l2) ]; (c-a)*(1-b+c)/c/(1-a-b+c) * HYP[m1,m2,z] - a*(b-1)/c/(1-a-b+c) * HYP[n1,n2,z]; end: `HYPERG/C108`:=proc(shyp,up1,up2,dw1,dw2,dw3,dw4) local l1,l2,z,A,B,C,D,E,F,a,b,c, tmp1,tmp2,m1,m2,n1,n2,prod1,prod2,i; l1 := op(1,shyp); l2 := op(2,shyp); z := op(3,shyp); A := op(up1,l1); B := op(up2,l1); C := op(dw1,l2); D := op(dw2,l2); E := op(dw3,l2); F := op(dw4,l2); a := A; b := D; c := B; if `HYPERG/Egalite`(C=1-a+c)=false or `HYPERG/Egalite`(E=2-b+c)=false or `HYPERG/Egalite`(F=-1+c)=false then ERROR(`Enable to apply C108 with parameters`,A,B,C,D,E,F); fi: l1 := subsop(up1=NULL,up2=NULL,l1); l2 := subsop(dw1=NULL,dw2=NULL,dw3=NULL,dw4=NULL,l2); tmp1 := [ seq(op(i,l1)-1,i=1..nops(l1)) ]; tmp2 := [ seq(op(i,l2)-1,i=1..nops(l2)) ]; prod1 := convert(tmp1,`*`); prod2 := convert(tmp2,`*`); m1 := [ a-1, op(tmp1) ]; m2 := [ c-a, b-2, c-b, op(tmp2) ]; n1 := [ a, op(tmp1) ]; n2 := [ c-a-1, b-1, 1-b+c, op(tmp2) ]; (b-2)*(b-1)*(c-a-1)*(c-a)*(c-b)*(1-b+c)/(1+a-b)/(c-1)/(1-a-b+c)/z * prod2/prod1 * HYP[m1,m2,z] - (b-2)*(b-1)*(c-a-1)*(c-a)*(c-b)*(1-b+c)/(1+a-b)/(c-1)/(1-a-b+c)/z * prod2/prod1 * HYP[n1,n2,z]; end: `HYPERG/C118`:=proc(shyp,up1,up2,dw1,dw2,dw3,dw4) local l1,l2,z,A,B,C,D,E,F,a,b,c, m1,m2,n1,n2; l1 := op(1,shyp); l2 := op(2,shyp); z := op(3,shyp); A := op(up1,l1); B := op(up2,l1); C := op(dw1,l2); D := op(dw2,l2); E := op(dw3,l2); F := op(dw4,l2); a := B; b := E; c := 2*C; if `HYPERG/Egalite`(A=1+c/2)=false or `HYPERG/Egalite`(D=1-a+c)=false or `HYPERG/Egalite`(F=2-b+c)=false then ERROR(`Enable to apply C118 with parameters`,A,B,C,D,E,F); fi: l1 := subsop(up1=NULL,up2=NULL,l1); l2 := subsop(dw1=NULL,dw2=NULL,dw3=NULL,dw4=NULL,l2); m1 := [ a, op(l1) ]; m2 := [ c-a, b, 1-b+c, op(l2) ]; n1 := [ a+1, op(l1) ]; n2 := [ 1-a+c, b-1, 2-b+c, op(l2) ]; (c-a)*(1-b+c)/c/(1-a-b+c) * HYP[m1,m2,z] - a*(b-1)/c/(1-a-b+c) * HYP[n1,n2,z]; end: `HYPERG/C109`:=proc(shyp,up1,dw1,dw2,dw3,dw4,dw5) local l1,l2,z,A,B,C,D,E,F,a,b,c, tmp1,tmp2,m1,m2,n1,n2,prod1,prod2,i; l1 := op(1,shyp); l2 := op(2,shyp); z := op(3,shyp); A := op(up1,l1); B := op(dw1,l2); C := op(dw2,l2); D := op(dw3,l2); E := op(dw4,l2); F := op(dw5,l2); a := B; b := D; c := A; if `HYPERG/Egalite`(C=2-a+c)=false or `HYPERG/Egalite`(E=2-b+c)=false or `HYPERG/Egalite`(F=-1+c)=false then ERROR(`Enable to apply C109 with parameters`,A,B,C,D,E,F); fi: l1 := subsop(up1=NULL,l1); l2 := subsop(dw1=NULL,dw2=NULL,dw3=NULL,dw4=NULL,dw5=NULL,l2); tmp1 := [ seq(op(i,l1)-1,i=1..nops(l1)) ]; tmp2 := [ seq(op(i,l2)-1,i=1..nops(l2)) ]; prod1 := convert(tmp1,`*`); prod2 := convert(tmp2,`*`); m1 := tmp1; m2 := [ a-1, 1-a+c, b-2, c-b, op(tmp2) ]; n1 := tmp1; n2 := [ a-2, c-a, b-1, 1-b+c, op(tmp2) ]; (a-2)*(a-1)*(b-2)*(b-1)*(c-a)*(1-a+c)*(c-b)*(1-b+c)/(a-b)/(c-1)/(2-a-b+c)/z * prod2/prod1 * HYP[m1,m2,z] - (a-2)*(a-1)*(b-2)*(b-1)*(c-a)*(1-a+c)*(c-b)*(1-b+c)/(a-b)/(c-1)/(2-a-b+c)/z * prod2/prod1 * HYP[n1,n2,z]; end: `HYPERG/C120`:=proc(shyp,up1,dw1,dw2,dw3,dw4,dw5) local l1,l2,z,A,B,C,D,E,F,a,b,c, m1,m2,n1,n2; l1 := op(1,shyp); l2 := op(2,shyp); z := op(3,shyp); A := op(up1,l1); B := op(dw1,l2); C := op(dw2,l2); D := op(dw3,l2); E := op(dw4,l2); F := op(dw5,l2); a := C; b := E; c := 2*B; if `HYPERG/Egalite`(A=1+c/2)=false or `HYPERG/Egalite`(D=2-a+c)=false or `HYPERG/Egalite`(F=2-b+c)=false then ERROR(`Enable to apply C120 with parameters`,A,B,C,D,E,F); fi: l1 := subsop(up1=NULL,l1); l2 := subsop(dw1=NULL,dw2=NULL,dw3=NULL,dw4=NULL,dw5=NULL,l2); m1 := l1; m2 := [ a, 1-a+c, b, 1-b+c, op(l2) ]; n1 := l1; n2 := [ a-1, 2-a+c, b-1, 2-b+c, op(l2) ]; (1-a+c)*(1-b+c)/c/(2-a-b+c) * HYP[m1,m2,z] - (a-1)*(b-1)/c/(2-a-b+c) * HYP[n1,n2,z]; end: `HYPERG/C111`:=proc(shyp,up1,up2,up3,up4,up5,up6,dw1,dw2) local l1,l2,z,A,B,C,D,E,F,G,H,a,b,c,d, m1,m2,n1,n2; l1 := op(1,shyp); l2 := op(2,shyp); z := op(3,shyp); A := op(up1,l1); B := op(up2,l1); C := op(up3,l1); D := op(up4,l1); E := op(up5,l1); F := op(up6,l1); G := op(dw1,l2); H := op(dw2,l2); a := A; b := C; c := A+B; d := G; if `HYPERG/Egalite`(D=c-b)=false or `HYPERG/Egalite`(E=d+1)=false or `HYPERG/Egalite`(F=1+c-d)=false or `HYPERG/Egalite`(H=c-d)=false then ERROR(`Enable to apply C111 with parameters`,A,B,C,D,E,F,G,H); fi: l1 := subsop(up1=NULL,up2=NULL,up3=NULL,up4=NULL,up5=NULL,up6=NULL,l1); l2 := subsop(dw1=NULL,dw2=NULL,l2); m1 := [ a+1, 1-a+c, b, -b+c, op(l1) ]; m2 := l2; n1 := [ a, c-a, b+1, 1-b+c, op(l1) ]; n2 := l2; a*(c-a)*(b-d)*(c-b-d)/(b-a)/(c-a-b)/(c-d)/d * HYP[m1,m2,z] - b*(c-b)*(a-d)*(c-a-d)/(b-a)/(c-a-b)/(c-d)/d * HYP[n1,n2,z]; end: `HYPERG/C113`:=proc(shyp,up1,up2,up3,up4,up5,dw1,dw2,dw3) local l1,l2,z,A,B,C,D,E,F,G,H,a,b,c,d, m1,m2,n1,n2; l1 := op(1,shyp); l2 := op(2,shyp); z := op(3,shyp); A := op(up1,l1); B := op(up2,l1); C := op(up3,l1); D := op(up4,l1); E := op(up5,l1); F := op(dw1,l2); G := op(dw2,l2); H := op(dw3,l2); a := A; b := C; c := A+B; d := G; if `HYPERG/Egalite`(D=d+1)=false or `HYPERG/Egalite`(E=1+c-d)=false or `HYPERG/Egalite`(F=1-b+c)=false or `HYPERG/Egalite`(H=c-d)=false then ERROR(`Enable to apply C113 with parameters`,A,B,C,D,E,F,G,H); fi: l1 := subsop(up1=NULL,up2=NULL,up3=NULL,up4=NULL,up5=NULL,l1); l2 := subsop(dw1=NULL,dw2=NULL,dw3=NULL,l2); m1 := [ a+1, 1-a+c, b, op(l1) ]; m2 := [ 1-b+c, op(l2) ]; n1 := [ a, c-a, b+1, op(l1) ]; n2 := [ c-b, op(l2) ]; a*(c-a)*(b-d)*(c-b-d)/(b-a)/(c-a-b)/(c-d)/d * HYP[m1,m2,z] - b*(c-b)*(a-d)*(c-a-d)/(b-a)/(c-a-b)/(c-d)/d * HYP[n1,n2,z]; end: `HYPERG/C116`:=proc(shyp,up1,up2,up3,up4,dw1,dw2,dw3,dw4) local l1,l2,z,A,B,C,D,E,F,G,H,a,b,c,d, m1,m2,n1,n2; l1 := op(1,shyp); l2 := op(2,shyp); z := op(3,shyp); A := op(up1,l1); B := op(up2,l1); C := op(up3,l1); D := op(up4,l1); E := op(dw1,l2); F := op(dw2,l2); G := op(dw3,l2); H := op(dw4,l2); a := A; b := B; c := A+E-1; d := G; if `HYPERG/Egalite`(C=d+1)=false or `HYPERG/Egalite`(D=1+c-d)=false or `HYPERG/Egalite`(F=1-b+c)=false or `HYPERG/Egalite`(H=c-d)=false then ERROR(`Enable to apply C116 with parameters`,A,B,C,D,E,F,G,H); fi: l1 := subsop(up1=NULL,up2=NULL,up3=NULL,up4=NULL,l1); l2 := subsop(dw1=NULL,dw2=NULL,dw3=NULL,dw4=NULL,l2); m1 := [ a+1, b, op(l1) ]; m2 := [ c-a, 1-b+c, op(l2) ]; n1 := [ a, b+1, op(l1) ]; n2 := [ 1-a+c, c-b, op(l2) ]; a*(c-a)*(b-d)*(c-b-d)/(b-a)/(c-a-b)/(c-d)/d * HYP[m1,m2,z] - b*(c-b)*(a-d)*(c-a-d)/(b-a)/(c-a-b)/(c-d)/d * HYP[n1,n2,z]; end: `HYPERG/C117`:=proc(shyp,up1,up2,up3,up4,dw1,dw2,dw3,dw4) local l1,l2,z,A,B,C,D,E,F,G,H,a,b,c,d, m1,m2,n1,n2; l1 := op(1,shyp); l2 := op(2,shyp); z := op(3,shyp); A := op(up1,l1); B := op(up2,l1); C := op(up3,l1); D := op(up4,l1); E := op(dw1,l2); F := op(dw2,l2); G := op(dw3,l2); H := op(dw4,l2); a := A; b := E; c := A+B; d := G; if `HYPERG/Egalite`(C=d+1)=false or `HYPERG/Egalite`(D=1+c-d)=false or `HYPERG/Egalite`(F=2-b+c)=false or `HYPERG/Egalite`(H=c-d)=false then ERROR(`Enable to apply C117 with parameters`,A,B,C,D,E,F,G,H); fi: l1 := subsop(up1=NULL,up2=NULL,up3=NULL,up4=NULL,l1); l2 := subsop(dw1=NULL,dw2=NULL,dw3=NULL,dw4=NULL,l2); m1 := [ a+1, 1-a+c, op(l1) ]; m2 := [ b, 2-b+c, op(l2) ]; n1 := [ a, c-a, op(l1) ]; n2 := [ -1+b, 1-b+c, op(l2) ]; a*(c-a)*(b-d-1)*(1-b+c-d)/(b-a-1)/(1-a-b+c)/(c-d)/d * HYP[m1,m2,z] - (b-1)*(1-b+c)*(a-d)*(c-a-d)/(b-a-1)/(1-a-b+c)/(c-d)/d * HYP[n1,n2,z]; end: `HYPERG/C119`:=proc(shyp,up1,up2,up3,dw1,dw2,dw3,dw4,dw5) local l1,l2,z,A,B,C,D,E,F,G,H,a,b,c,d, m1,m2,n1,n2; l1 := op(1,shyp); l2 := op(2,shyp); z := op(3,shyp); A := op(up1,l1); B := op(up2,l1); C := op(up3,l1); D := op(dw1,l2); E := op(dw2,l2); F := op(dw3,l2); G := op(dw4,l2); H := op(dw5,l2); a := A; b := E; c := A+D-1; d := G; if `HYPERG/Egalite`(B=d+1)=false or `HYPERG/Egalite`(C=1+c-d)=false or `HYPERG/Egalite`(F=2-b+c)=false or `HYPERG/Egalite`(H=c-d)=false then ERROR(`Enable to apply C119 with parameters`,A,B,C,D,E,F,G,H); fi: l1 := subsop(up1=NULL,up2=NULL,up3=NULL,l1); l2 := subsop(dw1=NULL,dw2=NULL,dw3=NULL,dw4=NULL,dw5=NULL,l2); m1 := [ a+1, op(l1) ]; m2 := [ c-a, b, 2-b+c, op(l2) ]; n1 := [ a, op(l1) ]; n2 := [ 1-a+c, -1+b, 1-b+c, op(l2) ]; a*(c-a)*(b-d-1)*(1-b+c-d)/(b-a-1)/(1-a-b+c)/(c-d)/d * HYP[m1,m2,z] - (b-1)*(1-b+c)*(a-d)*(c-a-d)/(b-a-1)/(1-a-b+c)/(c-d)/d * HYP[n1,n2,z]; end: `HYPERG/C121`:=proc(shyp,up1,up2,dw1,dw2,dw3,dw4,dw5,dw6) local l1,l2,z,A,B,C,D,E,F,G,H,a,b,c,d, m1,m2,n1,n2; l1 := op(1,shyp); l2 := op(2,shyp); z := op(3,shyp); A := op(up1,l1); B := op(up2,l1); C := op(dw1,l2); D := op(dw2,l2); E := op(dw3,l2); F := op(dw4,l2); G := op(dw5,l2); H := op(dw6,l2); a := C; b := E; c := a+D-2; d := G; if `HYPERG/Egalite`(A=d+1)=false or `HYPERG/Egalite`(B=1+c-d)=false or `HYPERG/Egalite`(F=2-b+c)=false or `HYPERG/Egalite`(H=c-d)=false then ERROR(`Enable to apply C121 with parameters`,A,B,C,D,E,F,G,H); fi: l1 := subsop(up1=NULL,up2=NULL,l1); l2 := subsop(dw1=NULL,dw2=NULL,dw3=NULL,dw4=NULL,dw5=NULL,dw6=NULL,l2); m1 := l1; m2 := [ a-1, 1-a+c, b, 2-b+c, op(l2) ]; n1 := l1; n2 := [ a, 2-a+c, -1+b, 1-b+c, op(l2) ]; (a-1)*(1-a+c)*(b-d-1)*(1-b+c-d)/(b-a)/(2-a-b+c)/(c-d)/d * HYP[m1,m2,z] - (b-1)*(1-b+c)*(a-d-1)*(1-a+c-d)/(b-a)/(2-a-b+c)/(c-d)/d * HYP[n1,n2,z]; end: `HYPERG/HypContig/heart`:=proc() local shyp,sup,inf,nb,p1,p2,p3,p4,p5,p6,p7,p8,plus,res; if ( nargs < 2 ) then ERROR(`Wrong number of arguments`); fi: shyp := args[1]; nb := args[2]; if ( nb <= 0 ) then ERROR(`Wrong number of formula`); elif ( nb >=1 ) and ( nb <= 2 ) # no parameter then if ( nargs <> 2 ) then ERROR(`Wrong number of parameters`); fi: elif ( nb >= 14 ) and ( nb <= 25 ) # one parameter then if ( nargs = 3 ) then p1 := args[3]; else ERROR(`Wrong number of parameters`); fi: elif ( nb >= 26 ) and ( nb <= 52 ) # two parameters then if ( nargs = 4 ) then p1 := args[3]; p2 := args[4]; else ERROR(`Wrong number of parameters`); fi: elif ( nb >= 53 ) and ( nb <= 58 ) # three parameters then if ( nargs = 5 ) then p1 := args[3]; p2 := args[4]; p3 := args[5]; else ERROR(`Wrong number of parameters`); fi: elif ( ( nb >= 59 ) and ( nb <= 62 ) ) # four parameters or ( ( nb >= 64 ) and ( nb <= 70 ) ) or ( ( nb >= 73 ) and ( nb <= 78 ) ) or ( ( nb >= 80 ) and ( nb <= 85 ) ) or ( ( nb >= 88 ) and ( nb <= 95 ) ) or ( ( nb >= 98 ) and ( nb <= 102 ) ) then if ( nargs = 6 ) then p1 := args[3]; p2 := args[4]; p3 := args[5]; p4 := args[6]; else ERROR(`Wrong number of parameters`); fi: elif ( nb = 63 ) or ( nb = 71 ) or ( nb = 72 ) # four parameters or ( nb = 79 ) or ( nb = 86 ) or ( nb = 87 ) # + additional parameter or ( nb = 96 ) or ( nb = 97 ) or ( nb = 103 ) then if ( nargs = 7 ) then p1 := args[3]; p2 := args[4]; p3 := args[5]; p4 := args[6]; plus := args[7]; else ERROR(`Wrong number of parameters`); fi: elif ( ( nb >= 104 ) and ( nb <= 110 ) ) # six parameters or ( nb = 112 ) or ( nb = 114 ) or ( nb = 115 ) or ( nb = 118 ) or ( nb = 120 ) then if ( nargs = 8 ) then p1 := args[3]; p2 := args[4]; p3 := args[5]; p4 := args[6]; p5 := args[7]; p6 := args[8]; else ERROR(`Wrong number of parameters`); fi: elif ( nb = 111 ) or ( nb = 113 ) or ( nb = 116 ) # height parameters or ( nb = 117 ) or ( nb = 119 ) or ( nb = 121 ) then if ( nargs = 10 ) then p1 := args[3]; p2 := args[4]; p3 := args[5]; p4 := args[6]; p5 := args[7]; p6 := args[8]; p7 := args[9]; p8 := args[10]; else ERROR(`Wrong number of parameters`); fi: fi: sup := nops(op(1,shyp)); inf := nops(op(2,shyp)); if ( nb = 1 ) then res := `HYPERG/C01`(shyp); elif ( nb = 2 ) then res := `HYPERG/C02`(shyp); # Three-term relations with one parameter [up1] # elif ( nb >= 14 ) and ( nb <= 19 ) then `HYPERG/VerifPos`(p1,1,sup); res := cat(`HYPERG/C`,nb)(shyp,p1); # Three-term relations with one parameter [dw1] # elif ( nb >= 20 ) and ( nb <= 25 ) then `HYPERG/VerifPos`(p1,1,inf); res := cat(`HYPERG/C`,nb)(shyp,p1); # Three-term relations with two parameters [up1,up2] # elif ( ( nb >= 26 ) and ( nb <= 27 ) ) or ( ( nb >= 30 ) and ( nb <= 33 ) ) then if ( p1 = p2 ) then ERROR(`Wrong parameter positions`); fi: `HYPERG/VerifPos`(p1,1,sup); `HYPERG/Verifpos`(p2,1,sup); res := cat(`HYPERG/C`,nb)(shyp,p1,p2); # Three-term relations with two parameters [up1,dw1] # elif ( ( nb >= 34 ) and ( nb <= 36 ) ) or ( ( nb >= 40 ) and ( nb <= 44 ) ) then `HYPERG/VerifPos`(p1,1,sup); `HYPERG/VerifPos`(p2,1,inf); res := cat(`HYPERG/C`,nb)(shyp,p1,p2); # Three-term relations with two parameters [dw1,dw2] # elif ( ( nb >= 45 ) and ( nb <= 46 ) ) or ( ( nb >= 49 ) and ( nb <= 52 ) ) then if ( p1 = p2 ) then ERROR(`Wrong parameter positions`); fi: `HYPERG/VerifPos`(p1,1,inf); `HYPERG/VerifPos`(p2,1,inf); res := cat(`HYPERG/C`,nb)(shyp,p1,p2); # Three-term relations with three parameters [up1,up2,up3] # elif ( nb = 53 ) then if ( nops({p1,p2,p3}) <> 3 ) then ERROR(`Wrong parameter positions`); fi: `HYPERG/VerifPos`(p1,1,sup); `HYPERG/VerifPos`(p2,1,sup); `HYPERG/VerifPos`(p3,1,sup); res := cat(`HYPERG/C`,nb)(shyp,p1,p2,p3); # Three-term relations with three parameters [up1,up2,dw1] # elif ( nb >= 54 ) and ( nb <= 55 ) then if ( p1 = p2 ) then ERROR(`Wrong parameter positions`); fi: `HYPERG/VerifPos`(p1,1,sup); `HYPERG/VerifPos`(p2,1,sup); `HYPERG/VerifPos`(p3,1,inf); res := cat(`HYPERG/C`,nb)(shyp,p1,p2,p3); # Three-term relations with three parameters [up1,dw1,dw2] # elif ( nb >= 56 ) and ( nb <= 57 ) then if ( p2 = p3 ) then ERROR(`Wrong parameter positions`); fi: `HYPERG/VerifPos`(p1,1,sup); `HYPERG/VerifPos`(p2,1,inf); `HYPERG/VerifPos`(p3,1,inf); res := cat(`HYPERG/C`,nb)(shyp,p1,p2,p3); # Three-term relations with three parameters [dw1,dw2,dw3] # elif ( nb = 58 ) then if ( nops({p1,p2,p3}) <> 3 ) then ERROR(`Wrong parameter positions`); fi: `HYPERG/VerifPos`(p1,1,inf); `HYPERG/VerifPos`(p2,1,inf); `HYPERG/VerifPos`(p3,1,inf); res := cat(`HYPERG/C`,nb)(shyp,p1,p2,p3); # Three-term relations with four parameters [up1,up2,up3,up4] # elif ( nb >= 59 ) and ( nb <= 62 ) then if ( nops({p1,p2,p3,p4}) <> 4 ) then ERROR(`Wrong parameter positions`); fi: `HYPERG/VerifPos`(p1,1,sup); `HYPERG/VerifPos`(p2,1,sup); `HYPERG/VerifPos`(p3,1,sup); `HYPERG/VerifPos`(p4,1,sup); res := cat(`HYPERG/C`,nb)(shyp,p1,p2,p3,p4); # Three-term relations with four parameters # + additionnal parameter [up1,up2,up3,up4,plus] # elif ( nb = 63 ) then if ( nops({p1,p2,p3,p4}) <> 4 ) then ERROR(`Wrong parameter positions`); fi: `HYPERG/VerifPos`(p1,1,sup); `HYPERG/VerifPos`(p2,1,sup); `HYPERG/VerifPos`(p3,1,sup); `HYPERG/VerifPos`(p4,1,sup); res := cat(`HYPERG/C`,nb)(shyp,p1,p2,p3,p4,plus); # Three-term relations with four parameters [up1,up2,up3,dw1] # elif ( ( nb >= 64 ) and ( nb <= 70 ) ) or ( nb = 73 ) then if ( nops({p1,p2,p3}) <> 3 ) then ERROR(`Wrong parameter positions`); fi: `HYPERG/VerifPos`(p1,1,sup); `HYPERG/VerifPos`(p2,1,sup); `HYPERG/VerifPos`(p3,1,sup); `HYPERG/VerifPos`(p4,1,inf); res := cat(`HYPERG/C`,nb)(shyp,p1,p2,p3,p4); # Three-term relations with four parameters # + additionnal parameter [up1,up2,up3,dw1,plus] # elif ( nb = 71 ) or ( nb = 72 ) then if ( nops({p1,p2,p3}) <> 3 ) then ERROR(`Wrong parameter positions`); fi: `HYPERG/VerifPos`(p1,1,sup); `HYPERG/VerifPos`(p2,1,sup); `HYPERG/VerifPos`(p3,1,sup); `HYPERG/VerifPos`(p4,1,inf); res := cat(`HYPERG/C`,nb)(shyp,p1,p2,p3,p4,plus); # Three-term relations with four parameters [up1,up2,dw1,dw2] # elif ( ( nb >= 74 ) and ( nb <= 78 ) ) or ( ( nb >= 80 ) and ( nb <= 85 ) ) or ( nb = 88 ) then if ( p1 = p2 ) or ( p3 = p4 ) then ERROR(`Wrong parameter positions`); fi: `HYPERG/VerifPos`(p1,1,sup); `HYPERG/VerifPos`(p2,1,sup); `HYPERG/VerifPos`(p3,1,inf); `HYPERG/VerifPos`(p4,1,inf); res := cat(`HYPERG/C`,nb)(shyp,p1,p2,p3,p4); # Three-term relations with four parameters # + additionnal parameter [up1,up2,dw1,dw2,plus] # elif ( nb = 79 ) or ( nb = 86 ) or ( nb = 87 ) then if ( p1 = p2 ) or ( p3 = p4 ) then ERROR(`Wrong parameter positions`); fi: `HYPERG/VerifPos`(p1,1,sup); `HYPERG/VerifPos`(p2,1,sup); `HYPERG/VerifPos`(p3,1,inf); `HYPERG/VerifPos`(p4,1,inf); res := cat(`HYPERG/C`,nb)(shyp,p1,p2,p3,p4,plus); # Three-term relations with four parameters [up1,dw1,dw2,dw3] # elif ( ( nb >= 89 ) and ( nb <= 95 ) ) or ( nb = 98 ) then if ( nops({p2,p3,p4}) <> 3 ) then ERROR(`Wrong parameter positions`); fi: `HYPERG/VerifPos`(p1,1,sup); `HYPERG/VerifPos`(p2,1,inf); `HYPERG/VerifPos`(p3,1,inf); `HYPERG/VerifPos`(p4,1,inf); res := cat(`HYPERG/C`,nb)(shyp,p1,p2,p3,p4); # Three-term relations with four parameters # + additionnal parameter [up1,dw1,dw2,dw3,plus] # elif ( nb = 96 ) or ( nb = 97 ) then if ( nops({p2,p3,p4}) <> 3 ) then ERROR(`Wrong parameter positions`); fi: `HYPERG/VerifPos`(p1,1,sup); `HYPERG/VerifPos`(p2,1,inf); `HYPERG/VerifPos`(p3,1,inf); `HYPERG/VerifPos`(p4,1,inf); res := cat(`HYPERG/C`,nb)(shyp,p1,p2,p3,p4,plus); # Three-term relations with four parameters [dw1,dw2,dw3,dw4] # elif ( ( nb >= 99 ) and ( nb <= 102 ) ) then if ( nops({p1,p2,p3,p4}) <> 4 ) then ERROR(`Wrong parameter positions`); fi: `HYPERG/VerifPos`(p1,1,inf); `HYPERG/VerifPos`(p2,1,inf); `HYPERG/VerifPos`(p3,1,inf); `HYPERG/VerifPos`(p4,1,inf); res := cat(`HYPERG/C`,nb)(shyp,p1,p2,p3,p4); # Three-term relations with four parameters # + additionnal parameter [dw1,dw2,dw3,dw4,plus] # elif ( nb = 103 ) then if ( nops({p1,p2,p3,p4}) <> 4 ) then ERROR(`Wrong parameter positions`); fi: `HYPERG/VerifPos`(p1,1,inf); `HYPERG/VerifPos`(p2,1,inf); `HYPERG/VerifPos`(p3,1,inf); `HYPERG/VerifPos`(p4,1,inf); res := cat(`HYPERG/C`,nb)(shyp,p1,p2,p3,p4,plus); # Three-term relations with six parameters [up1,up2,up3,up4,up5,dw1] # elif ( ( nb = 104 ) or ( nb = 110 ) ) then if ( nops({p1,p2,p3,p4,p5}) <> 5 ) then ERROR(`Wrong parameter positions`); fi: `HYPERG/VerifPos`(p1,1,sup); `HYPERG/VerifPos`(p2,1,sup); `HYPERG/VerifPos`(p3,1,sup); `HYPERG/VerifPos`(p4,1,sup); `HYPERG/VerifPos`(p5,1,sup); `HYPERG/VerifPos`(p6,1,inf); res := cat(`HYPERG/C`,nb)(shyp,p1,p2,p3,p4,p5,p6); # Three-term relations with six parameters [up1,up2,up3,up4,dw1,dw2] # elif ( ( nb = 105 ) or ( nb = 112 ) ) then if ( nops({p1,p2,p3,p4}) <> 4 ) or ( p5 = p6 ) then ERROR(`Wrong parameter positions`); fi: `HYPERG/VerifPos`(p1,1,sup); `HYPERG/VerifPos`(p2,1,sup); `HYPERG/VerifPos`(p3,1,sup); `HYPERG/VerifPos`(p4,1,sup); `HYPERG/VerifPos`(p5,1,inf); `HYPERG/VerifPos`(p6,1,inf); res := cat(`HYPERG/C`,nb)(shyp,p1,p2,p3,p4,p5,p6); # Three-term relations with six parameters [up1,up2,up3,dw1,dw2,dw3] # elif ( ( nb = 106 ) or ( nb = 107 ) or ( nb = 114 ) or ( nb = 115 ) ) then if ( nops({p1,p2,p3}) <> 3 ) or ( nops({p4,p5,p6}) <> 3 ) then ERROR(`Wrong parameter positions`); fi: `HYPERG/VerifPos`(p1,1,sup); `HYPERG/VerifPos`(p2,1,sup); `HYPERG/VerifPos`(p3,1,sup); `HYPERG/VerifPos`(p4,1,inf); `HYPERG/VerifPos`(p5,1,inf); `HYPERG/VerifPos`(p6,1,inf); res := cat(`HYPERG/C`,nb)(shyp,p1,p2,p3,p4,p5,p6); # Three-term relations with six parameters [up1,up2,dw1,dw2,dw3,dw4] # elif ( ( nb = 108 ) or ( nb = 118 ) ) then if ( p1 = p2 ) or ( nops({p3,p4,p5,p6}) <> 4 ) then ERROR(`Wrong parameter positions`); fi: `HYPERG/VerifPos`(p1,1,sup); `HYPERG/VerifPos`(p2,1,sup); `HYPERG/VerifPos`(p3,1,inf); `HYPERG/VerifPos`(p4,1,inf); `HYPERG/VerifPos`(p5,1,inf); `HYPERG/VerifPos`(p6,1,inf); res := cat(`HYPERG/C`,nb)(shyp,p1,p2,p3,p4,p5,p6); # Three-term relations with six parameters [up1,dw1,dw2,dw3,dw4,dw5] # elif ( ( nb = 109 ) or ( nb = 120 ) ) then if ( nops({p2,p3,p4,p5,p6}) <> 5 ) then ERROR(`Wrong parameter positions`); fi: `HYPERG/VerifPos`(p1,1,sup); `HYPERG/VerifPos`(p2,1,inf); `HYPERG/VerifPos`(p3,1,inf); `HYPERG/VerifPos`(p4,1,inf); `HYPERG/VerifPos`(p5,1,inf); `HYPERG/VerifPos`(p6,1,inf); res := cat(`HYPERG/C`,nb)(shyp,p1,p2,p3,p4,p5,p6); # Three-term relations with height parameters [up1,up2,up3,up4,up5,up6,dw1,dw2] # elif ( nb = 111 ) then if ( nops({p1,p2,p3,p4,p5,p6}) <> 6 ) or ( p7 = p8 ) then ERROR(`Wrong parameter positions`); fi: `HYPERG/VerifPos`(p1,1,sup); `HYPERG/VerifPos`(p2,1,sup); `HYPERG/VerifPos`(p3,1,sup); `HYPERG/VerifPos`(p4,1,sup); `HYPERG/VerifPos`(p5,1,sup); `HYPERG/VerifPos`(p6,1,sup); `HYPERG/VerifPos`(p7,1,inf); `HYPERG/VerifPos`(p8,1,inf); res := cat(`HYPERG/C`,nb)(shyp,p1,p2,p3,p4,p5,p6); # Three-term relations with height parameters [up1,up2,up3,up4,up5,dw1,dw2,dw3] # elif ( nb = 113 ) then if ( nops({p1,p2,p3,p4,p5}) <> 5 ) or ( nops({p6,p7,p8}) <> 3 ) then ERROR(`Wrong parameter positions`); fi: `HYPERG/VerifPos`(p1,1,sup); `HYPERG/VerifPos`(p2,1,sup); `HYPERG/VerifPos`(p3,1,sup); `HYPERG/VerifPos`(p4,1,sup); `HYPERG/VerifPos`(p5,1,sup); `HYPERG/VerifPos`(p6,1,inf); `HYPERG/VerifPos`(p7,1,inf); `HYPERG/VerifPos`(p8,1,inf); res := cat(`HYPERG/C`,nb)(shyp,p1,p2,p3,p4,p5,p6,p7,p8); # Three-term relations with height parameters [up1,up2,up3,up4,dw1,dw2,dw3,dw4] # elif ( ( nb = 116 ) or ( nb = 117 ) ) then if ( nops({p1,p2,p3,p4}) <> 4 ) or ( nops({p5,p6,p7,p8}) <> 4 ) then ERROR(`Wrong parameter positions`); fi: `HYPERG/VerifPos`(p1,1,sup); `HYPERG/VerifPos`(p2,1,sup); `HYPERG/VerifPos`(p3,1,sup); `HYPERG/VerifPos`(p4,1,sup); `HYPERG/VerifPos`(p5,1,inf); `HYPERG/VerifPos`(p6,1,inf); `HYPERG/VerifPos`(p7,1,inf); `HYPERG/VerifPos`(p8,1,inf); res := cat(`HYPERG/C`,nb)(shyp,p1,p2,p3,p4,p5,p6,p7,p8); # Three-term relations with height parameters [up1,up2,up3,dw1,dw2,dw3,dw4,dw5] # elif ( nb = 119 ) then if ( nops({p1,p2,p3}) <> 3 ) or ( nops({p4,p5,p6,p7,p8}) <> 5 ) then ERROR(`Wrong parameter positions`); fi: `HYPERG/VerifPos`(p1,1,sup); `HYPERG/VerifPos`(p2,1,sup); `HYPERG/VerifPos`(p3,1,sup); `HYPERG/VerifPos`(p4,1,inf); `HYPERG/VerifPos`(p5,1,inf); `HYPERG/VerifPos`(p6,1,inf); `HYPERG/VerifPos`(p7,1,inf); `HYPERG/VerifPos`(p8,1,inf); res := cat(`HYPERG/C`,nb)(shyp,p1,p2,p3,p4,p5,p6,p7,p8); # Three-term relations with height parameters [up1,up2,dw1,dw2,dw3,dw4,dw5,dw6] # elif ( nb = 121 ) then if ( p1 = p2 ) or ( nops({p3,p4,p5,p6,p7,p8}) <> 6 ) then ERROR(`Wrong parameter positions`); fi: `HYPERG/VerifPos`(p1,1,sup); `HYPERG/VerifPos`(p2,1,sup); `HYPERG/VerifPos`(p3,1,inf); `HYPERG/VerifPos`(p4,1,inf); `HYPERG/VerifPos`(p5,1,inf); `HYPERG/VerifPos`(p6,1,inf); `HYPERG/VerifPos`(p7,1,inf); `HYPERG/VerifPos`(p8,1,inf); res := cat(`HYPERG/C`,nb)(shyp,p1,p2,p3,p4,p5,p6,p7,p8); else ERROR(`Contiguous formula not implemented`); fi: end: HYPERG[HypContig] := proc() local nb,shyp,p1,p2,p3,p4,p5,p6,p7,p8,ret; option `Copyright by Bruno Gauthier, IGM, Universite Marne-la-Vallee, France`; shyp := args[1]; nb := args[2]; if ( nargs = 2 ) then ret := `HYPERG/Mapping`(shyp,false,{`HYP`},`HYPERG/HypContig/heart`,[nb]); elif ( nargs = 3 ) then p1 := args[3]; ret := `HYPERG/Mapping`(shyp,false,{`HYP`},`HYPERG/HypContig/heart`,[nb,p1]); elif ( nargs = 4 ) then p1 := args[3]; p2 := args[4]; ret := `HYPERG/Mapping`(shyp,false,{`HYP`},`HYPERG/HypContig/heart`,[nb,p1,p2]); elif ( nargs = 5 ) then p1 := args[3]; p2 := args[4]; p3 := args[5]; ret := `HYPERG/Mapping`(shyp,false,{`HYP`},`HYPERG/HypContig/heart`,[nb,p1,p2,p3]); elif ( nargs = 6 ) then p1 := args[3]; p2 := args[4]; p3 := args[5]; p4 := args[6]; ret := `HYPERG/Mapping`(shyp,false,{`HYP`},`HYPERG/HypContig/heart`,[nb,p1,p2,p3,p4]); elif ( nargs = 7 ) then p1 := args[3]; p2 := args[4]; p3 := args[5]; p4 := args[6]; p5 := args[7]; ret := `HYPERG/Mapping`(shyp,false,{`HYP`},`HYPERG/HypContig/heart`,[nb,p1,p2,p3,p4,p5]); elif ( nargs = 8 ) then p1 := args[3]; p2 := args[4]; p3 := args[5]; p4 := args[6]; p5 := args[7]; p6 := args[8]; ret := `HYPERG/Mapping`(shyp,false,{`HYP`},`HYPERG/HypContig/heart`,[nb,p1,p2,p3,p4,p5,p6]); elif ( nargs = 10 ) then p1 := args[3]; p2 := args[4]; p3 := args[5]; p4 := args[6]; p5 := args[7]; p6 := args[8]; p7 := args[9]; p8 := args[10]; ret := `HYPERG/Mapping`(shyp,false,{`HYP`},`HYPERG/HypContig/heart`,[nb,p1,p2,p3,p4,p5,p6,p7,8]); fi: ret; end: HYPERG[HypContigPrint] := proc() args[1] = HYPERG[HypContig](args); end: ########## # File @(#) HypConverg (HYPERG PACKAGE) Mon Feb 15 08:12:11 MET 1999 ########## # # HYPERG[HypConverg] # `HYPERG/GreaterThan` # # BG150298 `HYPERG/GreaterThan` := proc(mysum,val) if type(mysum,numeric) then if ( mysum <= val ) then RETURN(false); fi: else `HYPERG/Print`(mysum,` must be greater than `,val); fi: true; end: HYPERG[HypConverg] := proc() local shyp,l1,l2,n1,n2,z,s; option `Copyright by Bruno Gauthier, IGM, Universite Marne-la-Vallee, France`; if ( nargs <> 1 ) then ERROR(`Expecting only one argument`); fi: shyp := args[1]; if ( IsVHYP(shyp) ) then shyp := VHypToHyp(shyp); fi: if ( not IsHYP(shyp) ) then ERROR(`Expecting a hypergeometric series:`,shyp): fi: l1 := op(1,shyp); l2 := op(2,shyp); z := op(3,shyp); n1 := nops(l1); n2 := nops(l2); s := convert(l2,`+`)-convert(l1,`+`); if ( n1 <= n2 ) then RETURN(true); elif ( n1 = n2+1 ) then if type(z,numeric) then if ( abs(z) < 1 ) then RETURN(true); else if ( z = 1 ) then if ( `HYPERG/GreaterThan`(s,0) ) then RETURN(true); else RETURN(false); fi: elif ( z = -1 ) then if ( `HYPERG/GreaterThan`(s,-1) ) then RETURN(true); else RETURN(false); fi: else # |z| > 1 RETURN(false); fi: fi: else `HYPERG/Print`(abs(z),` must be less than `,1); if type(s,numeric) then if (s>0) then `HYPERG/Print`(`or `,z,` must be egal to `,1); fi: if (s>-1) then `HYPERG/Print`(`or `,z,` must be egal to `,-1); fi: else `HYPERG/Print`(`or `,z,` must be egal to `,1,` and `,s>0); `HYPERG/Print`(`or `,z,` must be egal to `,-1,` and `,s>-1); fi: RETURN(true); fi: else # n1 > n2+1 if type(z,numeric) then if ( z = 0 ) then RETURN(true); else RETURN(false); fi: else `HYPERG/Print`(z,` must be egal to `,0); RETURN(true); fi: fi: end: ########## # File @(#) HypDiff (HYPERG PACKAGE) Fri Feb 13 08:03:19 MET 1998 ########## # # HYPERG[HypDiff] # # BG130298 BG230998 BG160399 BG140499 HYPERG[HypDiff] := proc() local shyp,var,co,l1,l2,z,i,prod; option `Copyright by Bruno Gauthier, IGM, Universite Marne-la-Vallee, France`; if ( nargs <> 2 ) then ERROR(`Expecting two arguments`); fi: shyp := args[1]; var := args[2]; if ( IsVHYP(shyp) ) then shyp := VHypToHyp(shyp); fi: if ( not IsHYP(shyp) ) then ERROR(`Expecting a hypergeometric series:`,shyp): fi: l1 := op(1,shyp); l2 := op(2,shyp); z := op(3,shyp); co := diff(z,var); if ( not(has(z,var)) or has(l1,var) or has(l2,var) ) then ERROR(`Can't compute this derivation`): fi: prod := convert(l1,`*`) / convert(l2,`*`); l1 := [ seq(op(i,l1)+1 , i=1..nops(l1))]; l2 := [ seq(op(i,l2)+1 , i=1..nops(l2))]; co*prod*HYP[l1,l2,z]; end: ########## # File @(#) HypOrder (HYPERG PACKAGE) Tue Sep 16 08:18:56 METDST 1997 ########## # # HYPERG[HypOrder] # `HYPERG/HypOrder/Elementary` # # BG160997 `HYPERG/HypOrder/Elementary` := proc(li1,li2,li3,li4,x,y) local l1,l2,l3,l4,i,j; l1 := li1; l2 := li2; l3 := li3; l4 := li4; if ( member(x,l1,'i') and member(y,l2,'j') ) then l1 := subsop(i=NULL,l1); l3 := [ op(l3), x ]; l2 := subsop(j=NULL,l2); l4 := [ op(l4), y ]; fi: [l1,l2,l3,l4]; end: HYPERG[HypOrder] := proc(arg) local l1,l2,z,l1plus1,DeuxADeux,intsec,intsecmult, newl1,newl2,oldl1,oldl2, i,j,var1,var2,maxi,maxel,posx,retour; option `Copyright by Bruno Gauthier, IGM, Universite Marne-la-Vallee, France`; if ( not IsHYP(arg) ) then RETURN(arg): fi: l1 := op(1,arg); l2 := op(2,arg); z := op(3,arg); if ( nops(l1) <> nops(l2)+1 ) then RETURN(arg); fi; l1plus1:= [ seq( op(i,l1)+1,i=1..nops(l1) ) ]; DeuxADeux := NULL; for i from 1 to nops(l1) do for j from 1 to nops(l2) do DeuxADeux := DeuxADeux, op(i,l1)+op(j,l2): od: od: DeuxADeux := [DeuxADeux]; # intersection entre l1plus1 et DeuxADeux intsec := `HYPERG/ListeInter`(DeuxADeux,l1plus1); if ( intsec = [] ) then RETURN (arg); fi: # idem (avec multiplicite des elements) intsecmult := []; for i from 1 to nops(intsec) do var1 := op(i,intsec); var2 := 0; for j from 1 to nops(DeuxADeux) do if ( op(j,DeuxADeux) = var1 ) then var2 := var2+1; fi: od: intsecmult := [ op(intsecmult), [var1,var2] ]; od: # recherche de l'element de intsecmult qui possede une multiplicite maxi maxi := 0; for i from 1 to nops(intsecmult) do if ( op(2,op(i,intsecmult)) > maxi ) then maxi := op(2,op(i,intsecmult)); maxel := op(1,op(i,intsecmult)); fi: od: # on essaye d'ordonner les parametres t.q. "well" poised # construction des futurs listes de parametres newl1 := [maxel-1]; newl2 := []; # destruction des anciennes listes de parametres member(maxel-1,l1,'posx'); oldl1 := subsop(posx=NULL,l1); oldl2 := l2; # on essaye d'ordonner les parametres t.q. "very"-well poised retour := `HYPERG/HypOrder/Elementary`(oldl1,oldl2,newl1,newl2, expand((maxel+1)/2),expand((maxel-1)/2)); oldl1 := op(1,retour); oldl2 := op(2,retour); newl1 := op(3,retour); newl2 := op(4,retour); DeuxADeux := oldl1; for i from 1 to nops(DeuxADeux) do retour := `HYPERG/HypOrder/Elementary`(oldl1,oldl2,newl1,newl2, op(i,DeuxADeux),maxel-op(i,DeuxADeux)); oldl1 := op(1,retour); oldl2 := op(2,retour); newl1 := op(3,retour); newl2 := op(4,retour); od: # s'il reste des elements dans oldl[1|2], la serie n'est pas well-poised, # on ajoute les elements restants newl1 := [ op(newl1), op(oldl1) ]; newl2 := [ op(newl2), op(oldl2) ]; HYP[newl1,newl2,z]; end: ########## # File @(#) HypSimplify (HYPERG PACKAGE) Mon Mar 10 18:27:42 MET 1997 ########## # # HYPERG[HypSimplify] # `HYPERG/HypSimplify/heart` # `HYPERG/HypSimplify/heart/WithFactor` # `HYPERG/HypSimplify/heart/WithCombPow` # `HYPERG/ListeInter` # `HYPERG/Complement` # # BG100397 BG021097 BG090698 BG240998 BG170399 BG200499 `HYPERG/ListeInter` := proc(li1,li2) local i,res,k,l1,l2;; l1 := li1; l2 := li2; res := NULL; i:=1; while ( i <= nops(l1) and l2 <> [] ) do if ( member(op(i,l1),l2,'k') ) then res := res,op(i,l1); l2 := subsop(k=NULL,l2); fi: i := i+1; od: [res]; end: `HYPERG/Complement` := proc(li,e) local i,res,k; res := li; i:=1; while member(e,res,'k') do res := subsop(k=NULL,res); od: res; end: `HYPERG/HypSimplify/heart` := proc(shyp) local l1,l2, intersec,supp,k,var,i; l1 := map(expand,op(1,shyp)); l2 := map(expand,op(2,shyp)); #l1 := op(1,shyp); #l2 := op(2,shyp); intersec := `HYPERG/ListeInter`(l1,l2); while ( intersec <> [] ) do supp := op(1,intersec); member(supp,l1,'k'); l1 := subsop(k=NULL,l1); member(supp,l2,'k'); l2 := subsop(k=NULL,l2); intersec := subsop(1=NULL,intersec); od: #l1 := map(factor,l1); #l2 := map(factor,l2); if ( op(0,shyp) = HYP ) then RETURN( HYP[ l1,l2,normal(op(3,shyp)) ] ); fi: if ( op(0,shyp) = QHYP ) then RETURN( QHYP[ l1,l2,op(3,shyp),normal(op(4,shyp)) ] ); fi: end: `HYPERG/HypSimplify/heart/WithFactor` := proc(shyp) local ret; ret:=`HYPERG/HypSimplify/heart`(shyp); if ( op(0,ret) = HYP ) then RETURN( HYP[ op(1..2,ret),factor(op(3,ret)) ] ); fi: if ( op(0,ret) = QHYP ) then RETURN( QHYP[ op(1..3,ret),factor(op(4,ret)) ] ); fi: end: `HYPERG/HypSimplify/heart/WithCombPow` := proc(shyp) local ret; ret:=`HYPERG/HypSimplify/heart`(shyp); if ( op(0,ret) = HYP ) then RETURN( HYP[ op(1..2,ret),combine(op(3,ret),power) ] ); fi: if ( op(0,ret) = QHYP ) then RETURN( QHYP[ op(1..3,ret),combine(op(4,ret),power) ] ); fi: end: HYPERG[HypSimplify] := proc() option `Copyright by Bruno Gauthier, IGM, Universite Marne-la-Vallee, France`; if ( nargs=1 ) then `HYPERG/Mapping`(args[1],false,{`HYP`,`QHYP`}, `HYPERG/HypSimplify/heart`,[]); elif ( nargs=2 ) then if (args[2]='factor') then `HYPERG/Mapping`(args[1],false,{`HYP`,`QHYP`}, `HYPERG/HypSimplify/heart/WithFactor`,[]); elif (args[2]='combpow') then `HYPERG/Mapping`(args[1],false,{`HYP`,`QHYP`}, `HYPERG/HypSimplify/heart/WithCombPow`,[]); else ERROR(`Invalid option`,args[2]); fi: else ERROR(`Wrong number of arguments`); fi: end: ########## # File @(#) HypSolRec (HYPERG PACKAGE) Thu May 22 08:30:52 METDST 1997 ########## # # HYPERG[HypSolRec] # `HYPERG/MonicFactor` # # BG220597 BG300399 `HYPERG/MonicFactor` := proc(expr,nn) # INPUT : <-- expr : expression # <-- nn : variable de "expr" # OUTPUT : --> res : liste contenant les facteurs moniques de "expr" local exprf, # expression initiale factorisee liste, # liste contenant initiallement les differents facteurs # de "exprf", res, # liste construite pendant le deroulement de la fonction, # contenant finalement tous les facteurs moniques de "exprf" ret, # idem, mais avec toutes les combinaisons possibles # de produit entre chaque facteur monique tmp, # facteur de "exprf" (tmp = exprf^p) t, # terme de "exprf" p, # puissance de "tmp" c, # coefficient de tete d'un facteur i,j; # variables de boucle `HYPERG/IsPoly`(expr,nn); #exprf := factor(expr); exprf := factor(expr,{solve(expr,nn)}); res := []; if ( type(exprf,`*`) ) then liste := [op(exprf)]; else liste := [exprf]; fi: for i from 1 to nops(liste) do tmp := op(i,liste); if ( indets(tmp) intersect {nn} <> {} ) then if ( type(tmp,`^`) ) then t := op(1,tmp); p := op(2,tmp); else t := tmp; p := 1; fi: c := coeff(t,nn,degree(t,nn)); for j from 1 to p do res := [(t/c)^j, op(res)]; od: fi: od: #MAPLEVR2+ #MAPLEVR2+ res := combinat[choose](res); #MAPLEVR2+ ret := []; for i from 1 to nops(res) do ret := [op(ret),convert(op(i,res),`*`)]; od: ret; end: HYPERG[HypSolRec] := proc(eq,suite) # Petkovsek's HYPER algorithm # INPUT : <-- eq : equation de recurrence a coefficients polynomiaux # <-- suite : suite verifiant la recurrence [U(n)] # OUTPUT : --> solution rationnelle de "eq" local neq, # equation de recurrence solutions, new, nh, # terme de l'eq. de recurrence ne faisant pas # intervenir de U(n+i) [=0 si l'eq. est homogene] nn, # variable de l'equation de recurrence ordre, # ordre de la recurrence CO, # tableau CO[i]... coefficients de U(n+i) l1,l2, # facteurs moniques de a0 et de ak(n-k+1) mini,maxi, # variables utilisees pour determiner "ordre" li, # liste des indets de l'eq [n,U(n),...,U(n+i),...] i,j,k,x,y,z, # variables de boucle indice, A,B, # facteurs moniques respect. de CO[0](nn) et CO[k](nn-k+1) M, # tableau M[i]... ALPHA, # tableau ALPHA[i]... pp, # degre max. des Mi(nn) eqz,zz, sol,zsol, eqc,C,solC, vari; option `Copyright by Bruno Gauthier, IGM, Universite Marne-la-Vallee, France`; if ( nargs <> 2 ) then ERROR(`Expecting two arguments`); fi: if ( not type(suite,function) ) then ERROR(suite,`is not a sequence`); fi: solutions := {}; if type(eq,`=`) then neq := HYPERG[RfEval](op(1,eq)-op(2,eq)); else neq := eq; fi: mini := infinity; maxi := -infinity; nn := op(1,suite); li := [op(indets(neq))]; for i from 1 to nops(li) do vari := op(i,li); if `HYPERG/IsSeq`(vari,suite) then mini := `HYPERG/Mymin`(mini,op(1,vari)-nn); maxi := `HYPERG/Mymax`(maxi,op(1,vari)-nn); fi: od: # "decalage" de la recurrence en 0 ordre:=maxi-mini; neq := subs(nn=nn-mini,neq); li := [op(indets(neq))]; #mise a jour nh := neq; CO := array[0..ordre]; for i from 0 to ordre do CO[i] := 0; od; for i from 1 to nops(li) do vari := op(i,li); if `HYPERG/IsSeq`(vari,suite) then indice := op(1,vari)-nn; CO[indice] := CO[indice] + coeff(neq,vari); nh := nh - coeff(neq,vari)*vari; fi: od: nh := simplify(nh); if ( nh <> 0 ) then ERROR(`Not homogeneous recurrence equation`); fi: l1:=`HYPERG/MonicFactor`(CO[0],nn); l2:=`HYPERG/MonicFactor`(subs(nn=nn-ordre+1,CO[ordre]),nn); M := array[0..ordre]; ALPHA := array[0..ordre]; # pour tous les couples (A,B) de facteurs moniques de CO[0] et CO[k](n-k+1) # faire for x from 1 to nops(l1) do for y from 1 to nops(l2) do A := op(x,l1); B := op(y,l2); `HYPERG/Verbose/Print`(1,`\n Searching hypergeometric solutions with %a and %a\n`,A,B); # on determine les valeurs de M[i] i=0..ordre for i from 0 to ordre do M[i] := expand( CO[i] * product(subs(nn=nn+z,A),z=0..i-1) * product(subs(nn=nn+z,B),z=i..ordre-1) ); od: # on determine pp pp := -1; for i from 0 to ordre do pp := max ( degree(M[i],nn),pp ); od: # on determine les valeurs de ALPHA[i] i=0..ordre for i from 0 to ordre do ALPHA[i] := coeff(M[i],nn,pp); od: # construction de l'eq. \sum_i ALPHA[i] z^i = 0 eqz := 0; for i from 0 to ordre do eqz := eqz + ALPHA[i] * zz^i; od: sol := [op({solve(eqz,zz)})]; for j from 1 to nops(sol) do zsol := op(j,sol); eqc := M[0]*C(nn); for i from 1 to ordre do eqc := eqc + zsol^i*M[i]*C(nn+i); od: solC := traperror(HYPERG[PolySolRec](eqc=0,C(nn)) ); if ( solC <> lasterror ) and ( solC <> 0 ) then new := zsol*A/B*subs(nn=nn+1,solC)/solC; solutions := solutions union {new}; fi: od: od: od: solutions; end: ########## # File @(#) HypSum (HYPERG PACKAGE) Thu Aug 21 08:51:17 METDST 1997 ########## # # HYPERG[HypSum] # HYPERG[HypSumPrint] # `HYPERG/EvalPointEgalTo` # `HYPERG/MustBeNeg` # `HYPERG/Egalite` # `HYPERG/Inegalite` # `HYPERG/Summation1001`, `HYPERG/Summation2101`, `HYPERG/Summation2103`, # `HYPERG/Summation2104`, `HYPERG/Summation2105`, `HYPERG/Summation2106`, # `HYPERG/Summation2131`, `HYPERG/Summation2132`, # `HYPERG/HypSum/heart` # # BG220697 BG180897 BG170498 BG080698 BG021098 `HYPERG/EvalPointEgalTo` := proc(evalpt,val) if type(evalpt,numeric) then if ( evalpt <> val ) then RETURN(false); fi: else `HYPERG/Print`(evalpt,` must be equal to `,val); fi: true; end: `HYPERG/MustBeNeg` := proc(param) if type(param,numeric) then if ( param > 0 ) or ( not type(param,integer) ) then RETURN(false); fi: else `HYPERG/Print`(param,` must be an integer <= 0`); fi: true; end: `HYPERG/Egalite` := proc(eg) local g,d; g := simplify(op(1,eg)); d := simplify(op(2,eg)); if type(g,numeric) and type(d,numeric) then if ( g <> d ) then RETURN(false); fi: else if not evalb( g=d ) then `HYPERG/Print`(g,` must be equal to `,d); fi: fi: true; end: `HYPERG/Inegalite` := proc(eg) local g,d; g := simplify(op(1,eg)); d := simplify(op(2,eg)); if type(g,numeric) and type(d,numeric) then if ( g > d ) then RETURN(false); fi: else `HYPERG/Print`(g,` must be < to `,d); fi: true; end: `HYPERG/Summation1001`:=proc(shyp) #Theoreme Binomial local l1,z,a; l1 := op(1,shyp); a := op(1,l1); z := op(3,shyp); (1-z)^(-a); end: `HYPERG/Summation2101`:=proc(shyp) #Vandermonde's theorem local l1,l2,z,a,b,c; l1 := op(1,shyp); l2 := op(2,shyp); a := op(1,l1); b := op(2,l1); c := op(1,l2); z := op(3,shyp); if `HYPERG/EvalPointEgalTo`(z,1)=false then ERROR(`Enable to apply S2101 with the evaluation point`,z); fi: if `HYPERG/MustBeNeg`(b)=false then ERROR(`Enable to apply S2101 with upper parameters`,a,b); fi: RF[c-a,-b]/RF[c,-b]; end: `HYPERG/Summation2103`:=proc(shyp) #Gauss's theorem local l1,l2,z,a,b,c; l1 := op(1,shyp); l2 := op(2,shyp); a := op(1,l1); b := op(2,l1); c := op(1,l2); z := op(3,shyp); if `HYPERG/EvalPointEgalTo`(z,1)=false then ERROR(`Enable to apply S2103 with the evaluation point`,z); fi: if `HYPERG/Inegalite`(c>a+b)=true then GAMMA(c)*GAMMA(c-a-b)/GAMMA(c-a)/GAMMA(-b+c); else ERROR(`Enable to apply S2103 with parameters`,a,b,c); fi: end: `HYPERG/Summation2104`:=proc(shyp) #Kummer's theorem local l1,l2,z,a,b,c; l1 := op(1,shyp); l2 := op(2,shyp); a := op(1,l1); b := op(2,l1); c := op(1,l2); z := op(3,shyp); if `HYPERG/EvalPointEgalTo`(z,-1)=false then ERROR(`Enable to apply S2104 with the evaluation point`,z); fi: if `HYPERG/Egalite`(c=1+a-b)=false then ERROR(`Enable to apply S2104 with parameters`,a,b,c); fi: GAMMA(1+a/2) * GAMMA(1+a-b) / GAMMA(1+a) / GAMMA(1+a/2-b); end: `HYPERG/Summation2105`:=proc(shyp) local l1,l2,z,a,b,c; l1 := op(1,shyp); l2 := op(2,shyp); a := op(1,l1); b := op(2,l1); c := op(1,l2); z := op(3,shyp); if `HYPERG/EvalPointEgalTo`(z,1)=false then ERROR(`Enable to apply S2105 with the evaluation point`,z); fi: if `HYPERG/MustBeNeg`(a)=false then ERROR(`Enable to apply S2105 with the upper parameter`,a); fi: if `HYPERG/Egalite`(a+1/2=b)=false then ERROR(`Enable to apply S2105 with upper parameters`,a,b); fi: 2^(-2*a) * RF[c-1/2,-2*a] / RF[2*c-1,-2*a]; end: `HYPERG/Summation2106`:=proc(shyp) local vhyp,a,l,z; vhyp := HYPERG[HypToVHyp](shyp); if not HYPERG[IsVHYP](vhyp) then ERROR(`Enable to apply S2106 with this series`,shyp); fi: a := op(1,vhyp); l := op(2,vhyp); if ( l != [] ) then ERROR(`Enable to apply S2106 with this series`,shyp); fi: z := op(3,vhyp); (1+z) / (1-z)^(a+1); end: `HYPERG/Summation2131`:=proc(shyp) #Bailey's theorem local l1,l2,z,a,b,c; l1 := op(1,shyp); l2 := op(2,shyp); a := op(1,l1); b := op(2,l1); c := op(1,l2); z := op(3,shyp); if `HYPERG/EvalPointEgalTo`(z,1/2)=false then ERROR(`Enable to apply S2131 with the evaluation point`,z); fi: if `HYPERG/Egalite`(1-a=b)=false then ERROR(`Enable to apply S2131 with upper parameters`,a,b); fi: GAMMA(c/2)*GAMMA(1/2+c/2)/GAMMA(a/2+c/2)/GAMMA(1/2-a/2+c/2); end: `HYPERG/Summation2132`:=proc(shyp) #Gauss's second theorem local l1,l2,z,a,b,c; l1 := op(1,shyp); l2 := op(2,shyp); a := op(1,l1); b := op(2,l1); c := op(1,l2); z := op(3,shyp); if `HYPERG/EvalPointEgalTo`(z,1/2)=false then ERROR(`Enable to apply S2132 with the evaluation point`,z); fi: if `HYPERG/Egalite`(1/2+a/2+b/2=c)=false then ERROR(`Enable to apply S2132 with the lower parameter`,c); fi: GAMMA(1/2) * GAMMA(1/2+a/2+b/2) / GAMMA(1/2+a/2) / GAMMA(1/2+b/2); end: `HYPERG/HypSum/heart`:=proc() local shyp,nb,n1,n2,res; if ( nargs <> 2 ) then ERROR(`Expecting two arguments`); fi: shyp := args[1]; nb := args[2]; n1 := nops(op(1,shyp)); n2 := nops(op(2,shyp)); if ( ( n1 = 1 ) and ( n2 = 0 ) and ( nb = 1 ) ) then res := `HYPERG/Summation1001`(shyp); elif ( ( n1 = 2 ) and ( n2 = 1 ) and ( nb = 1 ) ) then res := `HYPERG/Summation2101`(shyp); elif ( ( n1 = 2 ) and ( n2 = 1 ) and ( nb = 3 ) ) then res := `HYPERG/Summation2103`(shyp); elif ( ( n1 = 2 ) and ( n2 = 1 ) and ( nb = 4 ) ) then res := `HYPERG/Summation2104`(shyp); elif ( ( n1 = 2 ) and ( n2 = 1 ) and ( nb = 5 ) ) then res := `HYPERG/Summation2105`(shyp); elif ( ( n1 = 2 ) and ( n2 = 1 ) and ( nb = 6 ) ) ### HYP --> VHYP then res := `HYPERG/Summation2106`(shyp); elif ( ( n1 = 2 ) and ( n2 = 1 ) and ( nb = 31 ) ) then res := `HYPERG/Summation2131`(shyp); elif ( ( n1 = 2 ) and ( n2 = 1 ) and ( nb = 32 ) ) then res := `HYPERG/Summation2132`(shyp); elif ( ( n1 = 3 ) and ( n2 = 2 ) and ( nb = 1 ) ) then res := `HYPERG/Summation3201`(shyp); elif ( ( n1 = 3 ) and ( n2 = 2 ) and ( nb = 2 ) ) then res := `HYPERG/Summation3202`(shyp); elif ( ( n1 = 3 ) and ( n2 = 2 ) and ( nb = 4 ) ) then res := `HYPERG/Summation3204`(shyp); elif ( ( n1 = 3 ) and ( n2 = 2 ) and ( nb = 31 ) ) then res := `HYPERG/Summation3231`(shyp); elif ( ( n1 = 3 ) and ( n2 = 2 ) and ( nb = 32 ) ) then res := `HYPERG/Summation3232`(shyp); elif ( ( n1 = 3 ) and ( n2 = 2 ) and ( nb = 33 ) ) then res := `HYPERG/Summation3233`(shyp); elif ( ( n1 = 3 ) and ( n2 = 2 ) and ( nb = 34 ) ) then res := `HYPERG/Summation3234`(shyp); elif ( ( n1 = 3 ) and ( n2 = 2 ) and ( nb = 35 ) ) then res := `HYPERG/Summation3235`(shyp); elif ( ( n1 = 3 ) and ( n2 = 2 ) and ( nb = 61 ) ) then res := `HYPERG/Summation3261`(shyp); elif ( ( n1 = 3 ) and ( n2 = 2 ) and ( nb = 91 ) ) then res := `HYPERG/Summation3291`(shyp); elif ( ( n1 = 4 ) and ( n2 = 3 ) and ( nb = 6 ) ) then res := `HYPERG/Summation4306`(shyp); elif ( ( n1 = 4 ) and ( n2 = 3 ) and ( nb = 7 ) ) ### HYP --> VHYP then res := `HYPERG/Summation4307`(shyp); elif ( ( n1 = 4 ) and ( n2 = 3 ) and ( nb = 31 ) ) ### HYP --> VHYP then res := `HYPERG/Summation4331`(shyp); elif ( ( n1 = 4 ) and ( n2 = 3 ) and ( nb = 32 ) ) then res := `HYPERG/Summation4332`(shyp); elif ( ( n1 = 5 ) and ( n2 = 4 ) and ( nb = 31 ) ) ### HYP --> VHYP then res := `HYPERG/Summation5431`(shyp); elif ( ( n1 = 5 ) and ( n2 = 4 ) and ( nb = 32 ) ) ### HYP --> VHYP then res := `HYPERG/Summation5432`(shyp); elif ( ( n1 = 6 ) and ( n2 = 5 ) and ( nb = 31 ) ) ### HYP --> VHYP then res := `HYPERG/Summation6531`(shyp); elif ( ( n1 = 6 ) and ( n2 = 5 ) and ( nb = 32 ) ) ### HYP --> VHYP then res := `HYPERG/Summation6532`(shyp); elif ( ( n1 = 7 ) and ( n2 = 6 ) and ( nb = 31 ) ) ### HYP --> VHYP then res := `HYPERG/Summation7631`(shyp); elif ( ( n1 = 7 ) and ( n2 = 6 ) and ( nb = 32 ) ) ### HYP --> VHYP then res := `HYPERG/Summation7632`(shyp); elif ( ( n1 = 7 ) and ( n2 = 6 ) and ( nb = 91 ) ) ### HYP --> VHYP then res := `HYPERG/Summation7691`(shyp); else ERROR(`Summation formula not yet implemented`); fi: end: HYPERG[HypSum] := proc() local nb,shyp,ret; option `Copyright by Bruno Gauthier, IGM, Universite Marne-la-Vallee, France`; if ( nargs <> 2 ) then ERROR(`Expecting two arguments`); fi: shyp := args[1]; nb := args[2]; if ( nargs = 2 ) then ret := `HYPERG/Mapping`(shyp,false,{`HYP`},`HYPERG/HypSum/heart`,[nb]); fi: ret; end: HYPERG[HypSumPrint] := proc(shyp,number) option `Copyright by Bruno Gauthier, IGM, Universite Marne-la-Vallee, France`; shyp = HYPERG[HypSum](shyp,number); end: ########## # File @(#) HypSumList (HYPERG PACKAGE) Fri Jun 12 08:37:23 METDST 1998 ########## # # HYPERG[HypSumList] # # BG120698 BG060898 HYPERG[HypSumList] := proc() local shyp,shypwork,n1,n2, ok,li,ret,new, p1,p2,j,k, i,s,numero,fun,result; global `HYPERG/PrintBool`; option `Copyright by Bruno Gauthier, IGM, Universite Marne-la-Vallee, France`; if ( nargs <> 1 ) then ERROR(`Expecting only one argument`); fi: shyp := args[1]; if ( not HYPERG[IsHYP](shyp) ) then ERROR(`Not a hypergeometric series`,shyp); fi: n1 := nops(op(1,shyp)); n2 := nops(op(2,shyp)); ok := false; ret := []; if ( ( n1 = 1 ) and ( n2 = 0 ) ) then ok := true; li := [1]; elif ( ( n1 = 2 ) and ( n2 = 1 ) ) then ok := true; li := [1,3,4,5,6,31,32]; elif ( ( n1 = 3 ) and ( n2 = 2 ) ) then ok := true; li := [1,2,4,31,32,33,34,35,61,91]; elif ( ( n1 = 4 ) and ( n2 = 3 ) ) then ok := true; li := [6,7,31,32]; elif ( ( n1 = 5 ) and ( n2 = 4 ) ) then ok := true; li := [31,32]; elif ( ( n1 = 6 ) and ( n2 = 5 ) ) then ok := true; li := [31,32]; elif ( ( n1 = 7 ) and ( n2 = 6 ) ) then ok := true; li := [31,32,91]; fi: `HYPERG/PrintBool` := false; if (ok) then for i from 1 to nops(li) do numero := convert(op(i,li),string); if ( length(numero)=1 ) then numero := cat(0,numero); fi: numero := cat(n1,n2,numero); fun := cat(`HYPERG/Summation`,numero); p1 := combinat[permute](n1); p2 := combinat[permute](n2); for j in p1 do for k in p2 do new := []; shypwork := shyp; # if the permutation on the upper parameters is not trivial if ( nops(j)>1 and j<>[seq(s,s=1..n1)] ) then shypwork := HypPermUp(shypwork,j); new := [ op(new),'HypPermUp',j ]; fi: # if the permutation on the lower parameters is not trivial if ( nops(k)>1 and k<>[seq(s,s=1..n2)] ) then shypwork := HypPermLow(shypwork,k); new := [ op(new),'HypPermLow',k ]; fi: new := [ op(new),cat(`S`,numero) ]; result := traperror(fun(shypwork)); if ( result <> lasterror ) then ret := [ op(ret), new ]; fi: od; od; od: fi: `HYPERG/PrintBool` := true; ret; end: ########## # File @(#) HypTransf (HYPERG PACKAGE) Tue Apr 14 08:18:45 METDST 1998 ########## # # HYPERG[HypTransf] # `HYPERG/Transform1101`, `HYPERG/Transform2103`, `HYPERG/Transform2104`, # `HYPERG/Transform2106`, `HYPERG/Transform2107`, `HYPERG/Transform2110`, # `HYPERG/Transform2111`, `HYPERG/Transform2112`, `HYPERG/Transform2131`, # `HYPERG/Transform2133`, `HYPERG/Transform2134`, # `HYPERG/Transform2135`, `HYPERG/Transform2136`, `HYPERG/Transform2137`, # `HYPERG/Transform2138`, `HYPERG/Transform2139`, `HYPERG/Transform2140`, # `HYPERG/Transform2141`, `HYPERG/Transform2163`, `HYPERG/Transform2191`, # `HYPERG/Transform2192`, # `HYPERG/HypTransf/heart` # # BG140498 BG170498 BG080698 BG170698 BG141098 BG150399 `HYPERG/Transform1101`:=proc(shyp) local l1,l2,z,a,b; l1 := op(1,shyp); l2 := op(2,shyp); a := op(1,l1); b := op(1,l2); z := op(3,shyp); exp(-z) * HYP[[b-a],[b],-z]; end: `HYPERG/Transform2103`:=proc(shyp) local l1,l2,z,a,b,c; l1 := op(1,shyp); l2 := op(2,shyp); a := op(1,l1); b := op(2,l1); c := op(1,l2); z := op(3,shyp); (1-z)^(c-a-b) * HYP[[c-a,c-b],[c],z]; end: `HYPERG/Transform2104`:=proc(shyp) local l1,l2,z,a,b,c; l1 := op(1,shyp); l2 := op(2,shyp); a := op(1,l1); b := op(2,l1); c := op(1,l2); z := op(3,shyp); (1-z)^(-a) * HYP[[a,c-b],[c],-z/(1-z)]; end: `HYPERG/Transform2106`:=proc(shyp) local l1,l2,z,a,b,c,n; l1 := op(1,shyp); l2 := op(2,shyp); a := op(1,l1); b := op(2,l1); c := op(1,l2); z := op(3,shyp); if `HYPERG/MustBeNeg`(b)=false then ERROR(`Enable to apply T2106 with the upper parameter`,b); fi: n := -b; z^n * RF[c-a,n] / RF[c,n] * HYP[[-n,1-c-n],[1+a-c-n],-(1-z)/z]; end: `HYPERG/Transform2107`:=proc(shyp) local l1,l2,z,a,b,c,n; l1 := op(1,shyp); l2 := op(2,shyp); a := op(1,l1); b := op(2,l1); c := op(1,l2); z := op(3,shyp); if `HYPERG/MustBeNeg`(b)=false then ERROR(`Enable to apply T2107 with the upper parameter`,b); fi: n := -b; RF[c-a,n] / RF[c,n] * HYP[[-n,a],[1+a-c-n],1-z]; end: `HYPERG/Transform2110`:=proc(shyp) local l1,l2,z,a,b,c; l1 := op(1,shyp); l2 := op(2,shyp); a := op(1,l1); b := op(2,l1); c := op(1,l2); z := op(3,shyp); if `HYPERG/Egalite`(1+a-b=c)=false then ERROR(`Enable to apply T2110 with parameters`,a,b,c); fi: (1+z)^(-a) * HYP[[a/2,(1+a)/2],[1+a-b],(4*z)/(1+z)^2]; end: `HYPERG/Transform2111`:=proc(shyp) local l1,l2,z,a,b,c; l1 := op(1,shyp); l2 := op(2,shyp); a := op(1,l1); b := op(2,l1); c := op(1,l2); z := op(3,shyp); if `HYPERG/Egalite`(1+a-b=c)=false then ERROR(`Enable to apply T2111 with parameters`,a,b,c); fi: (1-z)^(-a) * HYP[[a/2,(1+a)/2-b],[1+a-b],(-4*z)/(1-z)^2]; end: `HYPERG/Transform2112`:=proc(shyp) local l1,l2,z,a,b,c,B,Z; l1 := op(1,shyp); l2 := op(2,shyp); a := op(1,l1); b := op(2,l1); c := op(1,l2); z := op(3,shyp); Z := sqrt(z); B := c-1/2; if `HYPERG/Egalite`(b=1/2+a)=false then ERROR(`Enable to apply T2112 with parameters`,a,b); fi: (1-Z)^(-2*a) * HYP[[2*a,B],[2*B],2*Z/(-1+Z)]; end: `HYPERG/Transform2131`:=proc(shyp) local l1,l2,z,a,b,c,n; l1 := op(1,shyp); l2 := op(2,shyp); a := op(1,l1); b := op(2,l1); c := op(1,l2); z := op(3,shyp); if `HYPERG/MustBeNeg`(b)=false then ERROR(`Enable to apply T2131 with the upper parameter`,b); fi: n := -b; (1-z)^n * RF[a,n] / RF[c,n] * HYP[[-n,c-a],[1-a-n],1/(1-z)]; end: `HYPERG/Transform2133`:=proc(shyp) local l1,l2,z,a,b,c,Z; l1 := op(1,shyp); l2 := op(2,shyp); a := op(1,l1); b := op(2,l1); c := op(1,l2); z := op(3,shyp); Z := simplify( sqrt(z/(z-1)) ); if `HYPERG/Egalite`(c=1/2+a+b)=false then ERROR(`Enable to apply T2133 with parameters`,a,b,c); fi: (1-Z)^a / (1+Z)^a * HYP[[2*a,a+b],[2*a+2*b],2*Z/(1+Z)]; end: `HYPERG/Transform2134`:=proc(shyp) local l1,l2,z,a,b,c; l1 := op(1,shyp); l2 := op(2,shyp); a := op(1,l1); b := op(2,l1); c := op(1,l2); z := op(3,shyp); if `HYPERG/Egalite`(c=1/2+a/2+b/2)=false then ERROR(`Enable to apply T2134 with parameters`,a,b,c); fi: HYP[[a/2,b/2],[1/2+a/2+b/2],4*z*(1-z)]; end: `HYPERG/Transform2135`:=proc(shyp) local l1,l2,z,a,b,c; l1 := op(1,shyp); l2 := op(2,shyp); a := op(1,l1); b := op(2,l1); c := op(1,l2); z := op(3,shyp); if `HYPERG/Egalite`(c=1/2+a+b)=false then ERROR(`Enable to apply T2135 with parameters`,a,b,c); fi: HYP[[2*a,2*b],[1/2+a+b],(1-sqrt(1-z))/2]; end: `HYPERG/Transform2136`:=proc(shyp) local l1,l2,z,a,b,c; l1 := op(1,shyp); l2 := op(2,shyp); a := op(1,l1); b := op(2,l1); c := op(1,l2); z := op(3,shyp); if `HYPERG/Egalite`(c=2*b)=false then ERROR(`Enable to apply T2136 with parameters`,b,c); fi: (2/(2-z))^a * HYP[[a/2,1/2+a/2],[1/2+b],z^2/(z-2)^2]; end: `HYPERG/Transform2137`:=proc(shyp) local l1,l2,z,a,b,c; l1 := op(1,shyp); l2 := op(2,shyp); a := op(1,l1); b := op(2,l1); c := op(1,l2); z := op(3,shyp); if `HYPERG/Egalite`(c=2*b)=false then ERROR(`Enable to apply T2137 with parameters`,b,c); fi: (1-z)^(-a/2) * HYP[[a/2,-a/2+b],[1/2+b],z^2/(4*(z-1))]; end: `HYPERG/Transform2138`:=proc(shyp) local l1,l2,z,a,b,c; l1 := op(1,shyp); l2 := op(2,shyp); a := op(1,l1); b := op(2,l1); c := op(1,l2); z := op(3,shyp); if `HYPERG/Egalite`(b=1-a)=false then ERROR(`Enable to apply T2138 with parameters`,a,b); fi: (1-z)^(c-1) * HYP[[c/2-a/2,a/2+c/2-1/2],[c],4*z*(1-z)]; end: `HYPERG/Transform2139`:=proc(shyp) local l1,l2,z,a,b,c; l1 := op(1,shyp); l2 := op(2,shyp); c := op(1,l1); b := op(2,l1); a := op(1,l2); z := op(3,shyp); if `HYPERG/Egalite`(b=-1/2+a-c)=false then ERROR(`Enable to apply T2139 with parameters`,a,b,c); fi: ((1+sqrt(1-z))/2)^(1-a) * HYP[[a-2*c,1-a+2*c],[a],(1-sqrt(1-z))/2]; end: `HYPERG/Transform2140`:=proc(shyp) local l1,l2,z,a,b,c,Z; l1 := op(1,shyp); l2 := op(2,shyp); a := op(1,l1); b := op(2,l1); c := op(1,l2); z := op(3,shyp); Z := (-z+2+2*sqrt(1-z))/z; if `HYPERG/Egalite`(b=1/2+a)=false then ERROR(`Enable to apply T2140 with parameters`,a,b); fi: (1+Z)^(2*a) * HYP[[2*a,1+2*a-c],[c],Z]; end: `HYPERG/Transform2141`:=proc(shyp) local l1,l2,z,a,b,c,Z; l1 := op(1,shyp); l2 := op(2,shyp); a := op(1,l1); b := op(2,l1); c := op(1,l2); z := op(3,shyp); Z := (-z+2+2*sqrt(1-z))/z; if `HYPERG/Egalite`(b=1/2+a)=false then ERROR(`Enable to apply T2141 with parameters`,a,b); fi: (1+Z)^(2*a)/(1-Z) * HYP[[-1+2*a,1/2+a,2*a-c],[-1/2+a,c],Z]; end: `HYPERG/Transform2163`:=proc(shyp) local l1,l2,z,a,b,c; l1 := op(1,shyp); l2 := op(2,shyp); a := op(1,l1); b := op(2,l1); c := op(1,l2); z := op(3,shyp); (1+z)^(-b) * GAMMA(a-b) * GAMMA(c)/ GAMMA(a) / GAMMA(-b+c) * HYP[[b,-a+c],[1-a+b],1/(1-z)] + (1-z)^(-a) * GAMMA(-a+b) *GAMMA(c) / GAMMA(b) / GAMMA(-a+c) * HYP[[a,-b+c],[1+a-b],1/(1-z)]; end: `HYPERG/Transform2191`:=proc(shyp) local l1,l2,z,a,b,c; l1 := op(1,shyp); l2 := op(2,shyp); a := op(1,l1); b := op(2,l1); c := op(1,l2); z := op(3,shyp); (1-z)^(c-a-b) * GAMMA(c) * GAMMA(a+b-c)/ GAMMA(a) / GAMMA(b) * HYP[[c-b,c-a],[1-a-b+c],1-z] + GAMMA(c) * GAMMA(c-a-b) / GAMMA(c-b) / GAMMA(c-a) * HYP[[a,b],[1+a+b-c],1-z]; end: `HYPERG/Transform2192`:=proc(shyp) local l1,l2,z,a,b,c; l1 := op(1,shyp); l2 := op(2,shyp); a := op(1,l1); b := op(2,l1); c := op(1,l2); z := op(3,shyp); z^(-a) * GAMMA(1+a-c) * GAMMA(1+b-c)/ GAMMA(1-c) / GAMMA(1+a+b-c) * HYP[[a,1+a-c],[1+a+b-c],(z-1)/z] - z^(1-c) * GAMMA(1+a-c) * GAMMA(1+b-c) * GAMMA(-1+c) / GAMMA(a) / GAMMA(b) / GAMMA(1-c) * HYP[[1+a-c,1+b-c],[2-c],z]; end: `HYPERG/HypTransf/heart`:=proc() local shyp,nb,n1,n2,res; if ( nargs <> 2 ) then ERROR(`Expecting two arguments`); fi: shyp := args[1]; nb := args[2]; n1 := nops(op(1,shyp)); n2 := nops(op(2,shyp)); if ( ( n1 = 1 ) and ( n2 = 1 ) and ( nb = 1 ) ) then res := `HYPERG/Transform1101`(shyp); elif ( ( n1 = 2 ) and ( n2 = 1 ) and ( nb = 3 ) ) then res := `HYPERG/Transform2103`(shyp); elif ( ( n1 = 2 ) and ( n2 = 1 ) and ( nb = 4 ) ) then res := `HYPERG/Transform2104`(shyp); elif ( ( n1 = 2 ) and ( n2 = 1 ) and ( nb = 6 ) ) then res := `HYPERG/Transform2106`(shyp); elif ( ( n1 = 2 ) and ( n2 = 1 ) and ( nb = 7 ) ) then res := `HYPERG/Transform2107`(shyp); elif ( ( n1 = 2 ) and ( n2 = 1 ) and ( nb = 10 ) ) then res := `HYPERG/Transform2110`(shyp); elif ( ( n1 = 2 ) and ( n2 = 1 ) and ( nb = 11 ) ) then res := `HYPERG/Transform2111`(shyp); elif ( ( n1 = 2 ) and ( n2 = 1 ) and ( nb = 12 ) ) then res := `HYPERG/Transform2112`(shyp); elif ( ( n1 = 2 ) and ( n2 = 1 ) and ( nb = 31 ) ) then res := `HYPERG/Transform2131`(shyp); elif ( ( n1 = 2 ) and ( n2 = 1 ) and ( nb = 33 ) ) then res := `HYPERG/Transform2133`(shyp); elif ( ( n1 = 2 ) and ( n2 = 1 ) and ( nb = 34 ) ) then res := `HYPERG/Transform2134`(shyp); elif ( ( n1 = 2 ) and ( n2 = 1 ) and ( nb = 35 ) ) then res := `HYPERG/Transform2135`(shyp); elif ( ( n1 = 2 ) and ( n2 = 1 ) and ( nb = 36 ) ) then res := `HYPERG/Transform2136`(shyp); elif ( ( n1 = 2 ) and ( n2 = 1 ) and ( nb = 37 ) ) then res := `HYPERG/Transform2137`(shyp); elif ( ( n1 = 2 ) and ( n2 = 1 ) and ( nb = 38 ) ) then res := `HYPERG/Transform2138`(shyp); elif ( ( n1 = 2 ) and ( n2 = 1 ) and ( nb = 39 ) ) then res := `HYPERG/Transform2139`(shyp); elif ( ( n1 = 2 ) and ( n2 = 1 ) and ( nb = 40 ) ) then res := `HYPERG/Transform2140`(shyp); elif ( ( n1 = 2 ) and ( n2 = 1 ) and ( nb = 41 ) ) ### VHYP --> HYP then res := `HYPERG/Transform2141`(shyp); elif ( ( n1 = 2 ) and ( n2 = 1 ) and ( nb = 63 ) ) then res := `HYPERG/Transform2163`(shyp); elif ( ( n1 = 2 ) and ( n2 = 1 ) and ( nb = 91 ) ) then res := `HYPERG/Transform2191`(shyp); elif ( ( n1 = 2 ) and ( n2 = 1 ) and ( nb = 92 ) ) then res := `HYPERG/Transform2192`(shyp); elif ( ( n1 = 3 ) and ( n2 = 2 ) and ( nb = 4 ) ) then res := `HYPERG/Transform3204`(shyp); elif ( ( n1 = 3 ) and ( n2 = 2 ) and ( nb = 5 ) ) then res := `HYPERG/Transform3205`(shyp); elif ( ( n1 = 3 ) and ( n2 = 2 ) and ( nb = 6 ) ) then res := `HYPERG/Transform3206`(shyp); elif ( ( n1 = 3 ) and ( n2 = 2 ) and ( nb = 7 ) ) then res := `HYPERG/Transform3207`(shyp); elif ( ( n1 = 3 ) and ( n2 = 2 ) and ( nb = 31 ) ) then res := `HYPERG/Transform3231`(shyp); elif ( ( n1 = 3 ) and ( n2 = 2 ) and ( nb = 34 ) ) then res := `HYPERG/Transform3234`(shyp); elif ( ( n1 = 3 ) and ( n2 = 2 ) and ( nb = 35 ) ) then res := `HYPERG/Transform3235`(shyp); elif ( ( n1 = 3 ) and ( n2 = 2 ) and ( nb = 36 ) ) ### HYP --> VHYP then res := `HYPERG/Transform3236`(shyp); elif ( ( n1 = 3 ) and ( n2 = 2 ) and ( nb = 37 ) ) then res := `HYPERG/Transform3237`(shyp); elif ( ( n1 = 3 ) and ( n2 = 2 ) and ( nb = 39 ) ) then res := `HYPERG/Transform3239`(shyp); elif ( ( n1 = 3 ) and ( n2 = 2 ) and ( nb = 40 ) ) then res := `HYPERG/Transform3240`(shyp); elif ( ( n1 = 3 ) and ( n2 = 2 ) and ( nb = 61 ) ) then res := `HYPERG/Transform3261`(shyp); elif ( ( n1 = 3 ) and ( n2 = 2 ) and ( nb = 62 ) ) then res := `HYPERG/Transform3262`(shyp); elif ( ( n1 = 3 ) and ( n2 = 2 ) and ( nb = 63 ) ) then res := `HYPERG/Transform3263`(shyp); elif ( ( n1 = 3 ) and ( n2 = 2 ) and ( nb = 64 ) ) then res := `HYPERG/Transform3264`(shyp); elif ( ( n1 = 3 ) and ( n2 = 2 ) and ( nb = 67 ) ) then res := `HYPERG/Transform3267`(shyp); elif ( ( n1 = 3 ) and ( n2 = 2 ) and ( nb = 68 ) ) then res := `HYPERG/Transform3268`(shyp); elif ( ( n1 = 4 ) and ( n2 = 3 ) and ( nb = 1 ) ) then res := `HYPERG/Transform4301`(shyp); elif ( ( n1 = 4 ) and ( n2 = 3 ) and ( nb = 2 ) ) then res := `HYPERG/Transform4302`(shyp); elif ( ( n1 = 4 ) and ( n2 = 3 ) and ( nb = 3 ) ) then res := `HYPERG/Transform4303`(shyp); elif ( ( n1 = 4 ) and ( n2 = 3 ) and ( nb = 4 ) ) then res := `HYPERG/Transform4304`(shyp); elif ( ( n1 = 4 ) and ( n2 = 3 ) and ( nb = 6 ) ) then res := `HYPERG/Transform4306`(shyp); elif ( ( n1 = 4 ) and ( n2 = 3 ) and ( nb = 9 ) ) then res := `HYPERG/Transform4309`(shyp); elif ( ( n1 = 4 ) and ( n2 = 3 ) and ( nb = 10 ) ) then res := `HYPERG/Transform4310`(shyp); elif ( ( n1 = 4 ) and ( n2 = 3 ) and ( nb = 12 ) ) then res := `HYPERG/Transform4312`(shyp); elif ( ( n1 = 4 ) and ( n2 = 3 ) and ( nb = 31 ) ) ### HYP --> VHYP then res := `HYPERG/Transform4331`(shyp); elif ( ( n1 = 4 ) and ( n2 = 3 ) and ( nb = 32 ) ) then res := `HYPERG/Transform4332`(shyp); elif ( ( n1 = 4 ) and ( n2 = 3 ) and ( nb = 62 ) ) then res := `HYPERG/Transform4362`(shyp); elif ( ( n1 = 4 ) and ( n2 = 3 ) and ( nb = 91 ) ) then res := `HYPERG/Transform4391`(shyp); elif ( ( n1 = 5 ) and ( n2 = 4 ) and ( nb = 1 ) ) then res := `HYPERG/Transform5401`(shyp); elif ( ( n1 = 5 ) and ( n2 = 4 ) and ( nb = 2 ) ) then res := `HYPERG/Transform5402`(shyp); elif ( ( n1 = 5 ) and ( n2 = 4 ) and ( nb = 3 ) ) then res := `HYPERG/Transform5403`(shyp); elif ( ( n1 = 6 ) and ( n2 = 5 ) and ( nb = 1 ) ) then res := `HYPERG/Transform6501`(shyp); elif ( ( n1 = 6 ) and ( n2 = 5 ) and ( nb = 31 ) ) then res := `HYPERG/Transform6531`(shyp); elif ( ( n1 = 6 ) and ( n2 = 5 ) and ( nb = 32 ) ) then res := `HYPERG/Transform6532`(shyp); elif ( ( n1 = 6 ) and ( n2 = 5 ) and ( nb = 33 ) ) then res := `HYPERG/Transform6533`(shyp); elif ( ( n1 = 7 ) and ( n2 = 6 ) and ( nb = 31 ) ) then res := `HYPERG/Transform7631`(shyp); elif ( ( n1 = 7 ) and ( n2 = 6 ) and ( nb = 32 ) ) then res := `HYPERG/Transform7632`(shyp); elif ( ( n1 = 7 ) and ( n2 = 6 ) and ( nb = 32 ) ) then res := `HYPERG/Transform7632`(shyp); elif ( ( n1 = 7 ) and ( n2 = 6 ) and ( nb = 33 ) ) then res := `HYPERG/Transform7633`(shyp); elif ( ( n1 = 7 ) and ( n2 = 6 ) and ( nb = 34 ) ) then res := `HYPERG/Transform7634`(shyp); elif ( ( n1 = 7 ) and ( n2 = 6 ) and ( nb = 35 ) ) then res := `HYPERG/Transform7635`(shyp); elif ( ( n1 = 7 ) and ( n2 = 6 ) and ( nb = 36 ) ) then res := `HYPERG/Transform7636`(shyp); elif ( ( n1 = 7 ) and ( n2 = 6 ) and ( nb = 37 ) ) then res := `HYPERG/Transform7637`(shyp); elif ( ( n1 = 7 ) and ( n2 = 6 ) and ( nb = 91 ) ) then res := `HYPERG/Transform7691`(shyp); elif ( ( n1 = 7 ) and ( n2 = 6 ) and ( nb = 92 ) ) then res := `HYPERG/Transform7692`(shyp); elif ( ( n1 = 7 ) and ( n2 = 6 ) and ( nb = 93 ) ) then res := `HYPERG/Transform7693`(shyp); elif ( ( n1 = 7 ) and ( n2 = 6 ) and ( nb = 94 ) ) then res := `HYPERG/Transform7694`(shyp); elif ( ( n1 = 8 ) and ( n2 = 7 ) and ( nb = 31 ) ) then res := `HYPERG/Transform8731`(shyp); elif ( ( n1 = 8 ) and ( n2 = 7 ) and ( nb = 32 ) ) then res := `HYPERG/Transform8732`(shyp); else ERROR(`Transformation formula not yet implemented`); fi: end: HYPERG[HypTransf] := proc() local nb,shyp,ret; option `Copyright by Bruno Gauthier, IGM, Universite Marne-la-Vallee, France`; if ( nargs <> 2 ) then ERROR(`Expecting two arguments`); fi: shyp := args[1]; nb := args[2]; if ( nargs = 2 ) then ret := `HYPERG/Mapping`(shyp,false,{`HYP`},`HYPERG/HypTransf/heart`,[nb]); fi: ret; end: HYPERG[HypTransfPrint] := proc(shyp,number) option `Copyright by Bruno Gauthier, IGM, Universite Marne-la-Vallee, France`; shyp = HYPERG[HypTransf](shyp,number); end: ########## # File @(#) HypTransfList (HYPERG PACKAGE) Fri Jun 12 12:58:13 METDST 1998 ########## # # HYPERG[HypTransfList] # # BG120698 BG060898 BG151098 HYPERG[HypTransfList] := proc() local shyp,shypwork,n1,n2, ok,li,ret,new, p1,p2,j,k, i,s,numero,fun,result; global `HYPERG/PrintBool`; option `Copyright by Bruno Gauthier, IGM, Universite Marne-la-Vallee, France`; if ( nargs <> 1 ) then ERROR(`Expecting only one argument`); fi: shyp := args[1]; if ( not HYPERG[IsHYP](shyp) ) then ERROR(`Not a hypergeometric series`,shyp); fi: n1 := nops(op(1,shyp)); n2 := nops(op(2,shyp)); ok := false; ret := []; if ( ( n1 = 1 ) and ( n2 = 1 ) ) then ok := true; li := [1]; elif ( ( n1 = 2 ) and ( n2 = 1 ) ) then ok := true; li := [3,4,6,7,10,11,12,31,33,34,35,36,37,38,39,40,41,63,91,92]; elif ( ( n1 = 3 ) and ( n2 = 2 ) ) then ok := true; elif ( ( n1 = 4 ) and ( n2 = 3 ) ) then ok := true; li := [1,2,3,4,6,9,10,12,31,32,62,91]; elif ( ( n1 = 5 ) and ( n2 = 4 ) ) then ok := true; li := [1,2,3]; elif ( ( n1 = 6 ) and ( n2 = 5 ) ) then ok := true; li := [1,31,32,33]; elif ( ( n1 = 7 ) and ( n2 = 6 ) ) then ok := true; li := [31,32,33,34,35,36,37,91,92,93,94]; elif ( ( n1 = 8 ) and ( n2 = 7 ) ) then ok := true; li := [31,32]; fi: `HYPERG/PrintBool` := false; if (ok) then for i from 1 to nops(li) do numero := convert(op(i,li),string); if ( length(numero)=1 ) then numero := cat(0,numero); fi: numero := cat(n1,n2,numero); fun := cat(`HYPERG/Transform`,numero); p1 := combinat[permute](n1); p2 := combinat[permute](n2); for j in p1 do for k in p2 do new := []; shypwork := shyp; # if the permutation on the upper parameters is not trivial if ( nops(j)>1 and j<>[seq(s,s=1..n1)] ) then shypwork := HypPermUp(shypwork,j); new := [ op(new),'HypPermUp',j ]; fi: # if the permutation on the lower parameters is not trivial if ( nops(k)>1 and k<>[seq(s,s=1..n2)] ) then shypwork := HypPermLow(shypwork,k); new := [ op(new),'HypPermLow',k ]; fi: new := [ op(new),cat(`T`,numero) ]; result := traperror(fun(shypwork)); if ( result <> lasterror ) then ret := [ op(ret), new ]; fi: od; od; od: fi: `HYPERG/PrintBool` := true; ret; end: ########## # File @(#) HypType (HYPERG PACKAGE) Wed Jul 8 18:08:32 METDST 1998 ########## # # HYPERG[HypType] # # BG080798 BG030898 HYPERG[HypType] := proc(arg) local v, # ToVHyp n1,n2,l1,l2, # description of the hypergeometric series i,s,l,c,r; global `HYPERG/PrintBool`; option `Copyright by Bruno Gauthier, IGM, Universite Marne-la-Vallee, France`; `HYPERG/PrintBool` := false; if ( HYPERG[IsVHYP](arg) ) then # very-well-poised print(`Very-well poised hypergeometric series`); elif ( HYPERG[IsHYP](arg) ) then v := HYPERG[HypToVHyp](arg); if ( HYPERG[IsVHYP](v) ) then # very-well-poised print(`Very-well poised hypergeometric series`); else v := HYPERG[HypOrder](arg); l1 := op(1,v); l2 := op(2,v); n1 := nops(l1); n2 := nops(l2); if ( n1=2 and n2=1 ) then if ( 1+op(1,l1) = op(2,l1)+op(1,l2) ) then print(`Well-poised hypergeometric series`); else print(`Ordinary hypergeometric series`); fi: elif ( n1<3 or n1<>n2+1 ) then print(`Ordinary hypergeometric series`); else # well-poised # nearly-poised first kind # nearly-poised second kind l := true; c := true; r := true; s := op(2,l1)+op(1,l2); for i from 3 to n1-1 do if ( op(i,l1)+op(i-1,l2)<>s ) then c := false; fi: od: if ( 1+op(1,l1) <> s ) then l := false; fi: if ( op(n1,l1)+op(n2,l2) <> s ) then r := false; fi: if ( l and c and r ) then # well-poised print(`Well-poised hypergeometric series`); elif ( l and c ) then # nearly-poised of the first kind print(`Nearly-poised (first kind) hypergeometric series`); elif ( c and r ) then # nearly-poised of the second kind print(`Nearly-poised (second kind) hypergeometric series`); else # ordinary hypergeometric series print(`Ordinary hypergeometric series`); fi: fi: fi: else print(`Not a hypergeometric series`); fi: `HYPERG/PrintBool` := true; RETURN(NULL); end: ########## # File @(#) IsGAMMA (HYPERG PACKAGE) Wed Jun 25 08:10:12 METDST 1997 ########## # # `HYPERG/IsGAMMA` # # BG100397 `HYPERG/IsGAMMA` := proc(g) local a; if ( ( nargs <> 1 ) or not ( type(g,function) ) or ( op(0,g) <> GAMMA ) ) then false; elif ( nops(rf) <> 1 ) then false; else true; fi: end: ########## # File @(#) IsHYP (HYPERG PACKAGE) Mon Mar 10 18:27:42 MET 1997 ########## # # HYPERG[IsHYP] # `HYPERG/IsHYP` # # BG100397 BG041197 `HYPERG/IsHYP` := proc(hyp) local l1,l2,z,i,r; if ( ( nargs <> 1 ) or not ( type(hyp,indexed) ) or ( op(0,hyp) <> HYP ) ) then RETURN(false); fi: if ( nops(hyp) <> 3 ) then RETURN(false); else l1 := op(1,hyp); l2 := op(2,hyp); z := op(3,hyp); if not ( type(l1,list) and type(l2,list) ) then RETURN(false); fi: if ( type(z,list) or type(z,set) ) then RETURN(false); fi: r := map( proc(x) if ( type(x,numeric) and frac(x) = 0 and x <= 0 ) then true fi end, l2 ); if ( has(r,true) ) then `HYPERG/Print`(`warning HYP: denominator values must not be nonpositive integers`); fi; fi: true; end: HYPERG[IsHYP] := proc() option `Copyright by Bruno Gauthier, IGM, Universite Marne-la-Vallee, France`; `HYPERG/IsHYP`(args); end: ########## # File @(#) IsRF (HYPERG PACKAGE) Mon Mar 10 18:27:42 MET 1997 ########## # # HYPERG[IsRF] # `HYPERG/IsRF` # # BG031097 `HYPERG/IsRF`:=proc(rf) local a,b; if ( ( nargs <> 1 ) or not ( type(rf,indexed) ) or ( op(0,rf) <> RF ) ) then RETURN(false); fi: if ( nops(rf) <> 2 ) then RETURN(false); else a := op(1,rf); b := op(2,rf); if ( type(b,numeric) and not type(b,integer) ) then `HYPERG/Print`(`warning RF: the second argument is not an integer `,b); RETURN(false); fi: fi: true; end: HYPERG[IsRF] := proc() option `Copyright by Bruno Gauthier, IGM, Universite Marne-la-Vallee, France`; `HYPERG/IsRF`(args); end: ########## # File @(#) IsVHYP (HYPERG PACKAGE) Tue Sep 16 18:19:16 METDST 1997 ########## # # HYPERG[IsVHYP] # `HYPERG/IsVHYP` # # BG160997 BG090798 BG250299 `HYPERG/IsVHYP` := proc(vhyp) local a,l,z,l1,l2,i,r; if ( ( nargs <> 1 ) or not ( type(vhyp,indexed) ) or ( op(0,vhyp) <> VHYP ) ) then RETURN(false); fi: if ( nops(vhyp) <> 3 ) then RETURN(false); else a := op(1,vhyp); l := op(2,vhyp); z := op(3,vhyp); if type(a,list) then RETURN(false); fi: if not type(l,list) then RETURN(false); fi: if ( type(z,list) or type(z,set) ) then RETURN(false); fi: l1 := [a,a/2+1]; l2 := [a/2]; for i from 1 to nops(l) do l1 := [ op(l1), op(i,l) ]; l2 := [ op(l2), 1+a-op(i,l) ]; od: r := map( proc(x) if ( type(x,numeric) and frac(x) = 0 and x <= 0 ) then true fi end, l2 ); if ( has(r,true) ) then `HYPERG/Print`(`warning VHYP: denominator values must not be nonpositive integers`); fi; fi: true; end: HYPERG[IsVHYP] := proc() option `Copyright by Bruno Gauthier, IGM, Universite Marne-la-Vallee, France`; `HYPERG/IsVHYP`(args); end: ########## # File @(#) IsHyperg (HYPERG PACKAGE) Fri Feb 27 08:08:51 MET 1998 ########## # # HYPERG[IsHyperg] # # BG270298 BG200598 HYPERG[IsHyperg] := proc() local term,n, rapport,num,den; option `Copyright by Bruno Gauthier, IGM, Universite Marne-la-Vallee, France`; if ( nargs <> 2 ) then ERROR(`Expecting two arguments`); fi: term := args[1]; n := args[2]; term := HYPERG[RfEval](term); rapport := normal(expand(subs(n=n+1,term)/term)); num := numer(rapport); den := denom(rapport); if ( not type(rapport,ratpoly(anything,n)) ) then false; else true; fi: end: ########## # File @(#) IsSeq (HYPERG PACKAGE) Tue May 6 18:17:37 METDST 1997 ########## # # `HYPERG/IsSeq` # # BG060597 BG120398 BG020499 `HYPERG/IsSeq`:=proc(s,v) if ( type(s,function) and (op(0,s)=op(0,v)) and (nops(s)=1) and member(op(1,v),indets(op(1,s))) ) then true; else false; fi: end: ########## # File @(#) Lim (HYPERG PACKAGE) Tue Jul 1 08:18:03 METDST 1997 ########## # # HYPERG[Lim] # `HYPERG/Limit/GLim` # `HYPERG/Limit/HYPLim` # `HYPERG/Limit/heart` # # BG010797 BG021098 BG201098 BG170399 BG290999 `HYPERG/Limit/GLim`:=proc(expr,lim) local a,c,x,l; x := op(1,lim); l := op(2,lim); if ( has(expr,x) ) then a := expand(op(1,expr)); c := lcoeff(a,x); ## uniquement si limite vers + l'infinie ## if (l = infinity) #then (x*c)^(a); then (x*c)^(a-1/2) * sqrt(2*Pi) / E^(x*c); ## uniquement si limite vers - l'infinie ## elif (l = -infinity) then sqrt(Pi/2) * csc(Pi*a) * (-1)^(a-1/2) * x^(a-1/2)/E^(x); fi: else expr; fi: end: `HYPERG/Limit/HYPLim`:=proc(expr,lim) local x,l, l1,l2,z, oldl1,oldl2, p1,p2,pos, flag,i,res, coefficient,calc,tmp; x := op(1,lim); l := op(2,lim); coefficient := 1; oldl1 := op(1,expr); oldl2 := op(2,expr); l1 := []; for i from 1 to nops(oldl1) do calc := limit(op(i,oldl1),lim); # si un parametre tend vers +/-infty, on met a jour le point # d'evaluation [multiplication par le lcoeff de op(i,oldl1)] if ( has(calc,infinity) ) then coefficient := coefficient*lcoeff(expand(op(i,oldl1)),x); #then coefficient := coefficient*coeff(expand(op(i,oldl1)),x); fi: # si un parametre tend vers 0 et si le parametre est de la forme cc*x # on met a jour le point d'evaluation [multiplication par cc] #if ( has(calc,0) and type(op(i,old1),monomial(polynom,x)) ) # then coefficient := coefficient*lcoeff(expand(op(i,oldl1)),x); #fi: l1 := [op(l1),calc]; od: l2 := []; for i from 1 to nops(oldl2) do calc := limit(op(i,oldl2),lim); # si un parametre tend vers +/-infty, on met a jour le point # d'evaluation [division par le lcoeff de op(i,oldl1)] if ( has(calc,infinity) ) then coefficient := coefficient/lcoeff(expand(op(i,oldl2)),x); #then coefficient := coefficient/coeff(expand(op(i,oldl2)),x); fi: # si un parametre tend vers 0 et si le parametre est de la forme cc*x # on met a jour le point d'evaluation [multiplication par cc] #if ( has(calc,0) and type(op(i,old2),monomial(polynom,x)) ) # then coefficient := coefficient/lcoeff(expand(op(i,oldl2)),x); #fi: l2 := [op(l2),calc]; od: res := map( proc(x) if ( type(x,numeric) and frac(x) = 0 and x <= 0 ) then true fi end, l2 ); if has(res,true) then `HYPERG/Print`(`warning HYP: denominator values must not be nonpositive integers`); fi: z := coefficient*op(3,expr); tmp := HYPERG[HypSimplify](HYP[l1,l2,z]); l1 := op(1,tmp); l2 := op(2,tmp); z := op(3,tmp); flag := true; while ( flag ) do # on supprime les "infinity" deux a deux (haut et bas) if ( member(infinity,l1,'p1') or member(-infinity,l1,'p1') ) and ( member(infinity,l2,'p2') or member(-infinity,l2,'p2') ) then l1 := subsop(p1=NULL,l1); l2 := subsop(p2=NULL,l2); else flag := false; fi: od: # on fait passer les "infty" dans le point d'evaluation while `HYPERG/MemberHas`(infinity,l1,'pos') do z:=normal(z*x); l1 := subsop(pos=NULL,l1); od: while `HYPERG/MemberHas`(infinity,l2,'pos') do z:=normal(z/x); l2 := subsop(pos=NULL,l2); od: z := limit(z,lim); if ( has(l1,0) or has(l2,infinity) or (z=0) ) then RETURN(1); fi: HYP[l1,l2,z]; end: `HYPERG/Limit/heart`:=proc(expr,lim) if ( op(0,expr) = `HYP` ) then RETURN(`HYPERG/Limit/HYPLim`(expr,lim)); elif ( op(0,expr) = `GAMMA` ) then if ( op(2,lim)=infinity or op(2,lim)=-infinity ) then RETURN(`HYPERG/Limit/GLim`(expr,lim)); else RETURN(limit(expr,lim)); fi: else RETURN(limit(expr,lim)); fi: end: HYPERG[Lim] := proc(expr,lim) local val,x,l, # variable and limit value mapleres,ret; option `Copyright by Bruno Gauthier, IGM, Universite Marne-la-Vallee, France`; if ( nargs <> 2 ) then ERROR(`Expecting two arguments`); fi: if type(expr,`=`) then RETURN( HYPERG[Lim](op(1,expr),lim) = HYPERG[Lim](op(2,expr),lim) ); fi: x := op(1,lim); l := op(2,lim); if not has(expr,x) then RETURN(expr) fi; # si possible: calcul par maple (fonction limit) mapleres := limit(expr,lim); if not has(mapleres,limit) then RETURN(mapleres); fi: # sinon val := HYPERG[RfEval](expr); val := simplify(val,GAMMA); ret := `HYPERG/Mapping`(val,false,{`HYP`,`GAMMA`},`HYPERG/Limit/heart`,[lim]); ret := normal(simplify(ret)); ret := limit(ret,lim); if has(ret,limit) then RETURN(ret); #ERROR(ret,`Not Determined`); elif has(ret,infinity) then RETURN(ret); else RETURN( HYPERG[HypSimplify](ret) ); fi; end: ########## # File @(#) Map (HYPERG PACKAGE) Thu Sep 18 08:02:40 METDST 1997 ########## # # HYPERG[MapList] # HYPERG[MapApply] # `HYPERG/MapList/heart` # # BG180997 BG221098 BG031298 `HYPERG/MapList/heart` := proc(argu,niv) local i,expr,li,res; if ( niv = 0 ) then RETURN( argu ); fi: expr := op(1,argu); li := op(2,argu); if not ( type(expr,`+`) or type(expr,`*`) ) then RETURN( [expr,[op(li),1]] ); fi: res := []; for i from 1 to nops(expr) do if not ( type(op(i,expr),`+`) or type(op(i,expr),`*`) ) then res := [ op(res), [op(i,expr),[op(li),i]] ]; else res := [ op(res), `HYPERG/MapList/heart`([op(i,expr),[op(li),i]],niv-1) ]; fi: od: res; end: HYPERG[MapList] := proc() local expr,niv; option `Copyright by Bruno Gauthier, IGM, Universite Marne-la-Vallee, France`; if ( nargs > 2 ) then ERROR(`Wrong number of arguments`); fi: expr := args[1]; if ( nargs = 2 ) then niv := args[2]; else niv := 1; fi: if ( niv < 1 ) then ERROR(`The level value must be a positive integer`,niv); fi: {op(`HYPERG/MapList/heart`([expr,[]],niv))}; end: HYPERG[MapApply] := proc() local expr,fun,seq_args,pos,i,posi,j,posj,tmp,k,res; option `Copyright by Bruno Gauthier, IGM, Universite Marne-la-Vallee, France`; if ( nargs < 3 ) then ERROR(`Wrong number of arguments`); fi: fun := args[1]; pos := args[2]; expr := args[3]; seq_args := args[4..nargs]; if not type(pos,set) then ERROR(`Expecting a set of positions`); fi: pos := [op(pos)]; for i from 1 to nops(pos) do posi := op(i,pos); if not type(posi,list(integer)) then ERROR(`Expecting a list of integers`); fi: res := expr; for j from 1 to nops(posi) do posj := op(j,posi); res := op(posj,res); od: res := evaln(fun(res,seq_args)); for k from 1 to nops(posi) do tmp := expr; for j from 1 to nops(posi)-k do posj := op(j,posi); tmp := op(posj,tmp); od: if (k=1) then res := subsop(op(nops(posi)+1-k,posi)=res,tmp); else res := subsop(op(nops(posi)+1-k,posi)=res,tmp); fi: od: expr := res; od: RETURN(eval(res)); end: ########## # File @(#) Mapping (HYPERG PACKAGE) Wed Jul 2 08:13:09 METDST 1997 ########## # # Mapping(hyp,bases,fun_name,[arg]) # # BG010797 `HYPERG/Mapping/work`:=proc(ent,fun_name,args) local ret; if type(ent,indexed) or (type(ent,function) and op(0,ent)=`GAMMA`) then ret := fun_name(ent,op(args)); elif type(ent,`*`) then ret := map(`HYPERG/Mapping/work`,ent,fun_name,args); elif type(ent,`^`) then if type(op(2,ent),numeric) then ret := fun_name(op(1,ent),op(args))^op(2,ent); else ret := map(`HYPERG/Mapping/work`,ent,fun_name,args); fi: fi: ret; end: # BG210497 BG260697 `HYPERG/Mapping/heart`:=proc(hyp,bases,fun_name,args) local t, # a table representing a monomial... i,r; if (type(hyp,`+`)) then # we convert each monomial... RETURN(map(`HYPERG/Mapping/heart`,hyp,bases,fun_name,args)) fi; # else this is a monomial... t:=`HYPERG/Monomial`(hyp,bases); # we treat the table... for i in indices(t) do if member(op(i),bases) then t[op(i)] := `HYPERG/Mapping/work` ( t[op(i)],fun_name,args ) fi: od: convert(map(op,[entries(t)]),`*`); end: # BG210497 `HYPERG/Mapping`:=proc(hyp,flag,bases,fun_name,args) # INPUT : # hyp : expression a traiter # flag : faut-il "expand" l'expression hyp avant de la traiter ? # bases : HYP, RF, GAMMA,... # fun_name : nom de la fonction a appliquer sur les composantes de hyp # args : [eventuels] arguments de la fonction fun_name # [sous forme de liste] if ( nargs <> 5 ) then ERROR(`Expecting five arguments`); elif ( flag = true ) then `HYPERG/Mapping/heart`(expand(hyp),bases,fun_name,args); else `HYPERG/Mapping/heart`(hyp,bases,fun_name,args); fi: end: ########## # File @(#) Monomial (HYPERG PACKAGE) Wed Mar 1 17:55:37 Frh 1995 ########## # # Monomial(monom,bases) returns a table whose entries describe the sets of # variables from bases that occur in monom. # bases may be a list or set of string names. # An entry 'coeff' is reserved for the rest of the monomial # in the table. # # retourne une table dont les entrees decrivent l'ensemble # des occurrences des bases qui apparaissent dans monom. # bases peut etre une liste ou un ensemble de chaines # de caracteres. # Une entree 'coeff' est reservee pour le reste du monome # dans la table. # # SV010395 SV020296 BG150497 `HYPERG/Monomial`:=proc(monom,bases) local test, # the test function...IsHYP, IsRF, ... getv, # the current element has been treated... v,v1, # current elements... i,j, # variables for loops... t; # the table... if (type(bases,name)) then # we init the table... t:=table(['coeff'=1, bases=1]); test:=cat(`HYPERG/Is`,bases); # we test the structure of the monomial... if (type(monom,`*`)) then for i from 1 to nops(monom) do v:=op(i,monom); if (type(v,`^`)) then if (test(op(1,v))) then t[bases]:=t[bases]*v; else t['coeff']:=t['coeff']*v fi else if (test(v)) then t[bases]:=t[bases]*v else t['coeff']:=t['coeff']*v fi fi od elif (type(monom,`^`)) then if (test(op(1,monom))) then t[bases]:=monom else t['coeff']:=t['coeff']*monom fi else # the monomial is made of one term... if (test(monom)) then t[bases]:=monom else t['coeff']:=t['coeff']*monom fi fi else # not only one basis specified... # we test the structure of the monomial... # we init the table... t:=table(['coeff'=1, op(map(b -> b=1,bases))]); if (type(monom,`*`)) then for i from 1 to nops(monom) do v:=op(i,monom); if (type(v,`^`)) then v1:=op(1,v) else v1:=v fi; getv:=false; for j in bases do test:=cat(`HYPERG/Is`,j); if (test(v1)) then getv:=true; t[j]:=t[j]*v; break fi od; if (not getv) then # the current element is a coefficient... t['coeff']:=t['coeff']*v fi od elif (type(monom,`^`)) then getv:=false; for j in bases do test:=cat(`HYPERG/Is`,j); if (test(op(1,monom))) then t[j]:=monom; getv:=true; break fi od; if (not getv) then # the current element is a coefficient... t['coeff']:=t['coeff']*monom fi else # the monomial is made of one term... getv:=false; for j in bases do test:=cat(`HYPERG/Is`,j); if (test(monom)) then t[j]:=monom; getv:=true; break fi od; if (not getv) then # the current element is a coefficient... t['coeff']:=t['coeff']*monom fi fi fi; for j in bases do if (t[j]=1) then t[j]:=evaln(t[j]) fi od; RETURN(op(t)) end: ########## # File @(#) PolySolRec (HYPERG PACKAGE) Tue May 6 18:17:37 METDST 1997 ########## # # HYPERG[PolySolRec] # # `HYPERG/IsPoly` # `HYPERG/MyDegree` # # BG050697 BG230498 BG120598 BG130399 `HYPERG/IsPoly` := proc(p,n) if not type(p,polynom(anything,n)) then ERROR(`Not a polynomial coefficient`,p); fi: end: `HYPERG/MyDegree` := proc(p,n) if (p=0) then -infinity; else degree(p,n); fi: end: HYPERG[PolySolRec] := proc() # INPUT : <-- eq : equation de recurrence a coefficients polynomiaux # (equation homogene ou non) # <-- suite : suite verifiant la recurrence [U(n)] # <-- ens : ensemble de conditions initiales # OUTPUT : --> solution polynomiale de "eq" local eq, # equation de recurrence suite, # suite verifiant la recurrence nn, # variable de l'equation de recurrence nh, # terme de l'eq. de recurrence ne faisant pas intervenir # de U(n+i) [=0 si l'eq. est homogene] mini, # k t.q. U(n+k) avec k minimal maxi, # k t.q. U(n+k) avec k maximal vari, ordre, # ordre de la recurrence (maxi-mini) CO, # tableau CO[i]... coefficients de U(n+i) QQ, # tableau QQ[j]... # t.q. QQ[j] = Sum(binomial(k,j)*CO[k],k=j..ordre) indice, bb, # max((deg(QQ[i])-i)) pour i allant de 0 a ordre aa,xx, # aa(xx) : (polynome) coefficient du terme de tete resol, # racines du polynome aa(xx) nb_rac, dd, # maximum des racines entieres du polynome aa(xx) soldeg, # degre du polynome solution de la recurrence [borne sup.] psol, # forme generique de la sol. poly. de l'eq. de recurrence li, # liste des indets de l'eq [n,U(n),...,U(n+i),...] ensemble, # ensemble des indeterminees {_x0,_x1,...} de la sol. poly. rempl, # eq. de recurrence utilisee pour determiner # les indeterminees de la solution polynomiale psol ret, # variable utilisee pour determiner psol i,j,k, # variables de boucle ens, # ensemble de conditions initiales condi, # condition initiale : U(i) condv, # condition initiale : val ensembis, # ensemble des indeterminees {_xa,_xb,...} presentes # dans la sol. poly. generique ci; # conditions initiales pour la resolution option `Copyright by Bruno Gauthier, IGM, Universite Marne-la-Vallee, France`; if ( nargs < 2 ) or ( nargs > 3 ) then ERROR(`Wrong number of arguments`); fi: eq := args[1]; suite := args[2]; if ( not type(suite,function) ) then ERROR(suite,`is not a sequence`); fi: if ( nargs = 3 ) then if type(args[3],set) then ens := [op(args[3])]; else ERROR(`Expecting a set`); fi: else ens := []; fi: if type(eq,`=`) then eq := HYPERG[RfEval](op(1,eq)-op(2,eq)); else eq := eq; fi: mini := infinity; maxi := -infinity; nn := op(1,suite); li := [op(indets(eq))]; for i from 1 to nops(li) do vari := op(i,li); if `HYPERG/IsSeq`(vari,suite) then mini := `HYPERG/Mymin`(mini,op(1,vari)-nn); maxi := `HYPERG/Mymax`(maxi,op(1,vari)-nn); fi: od: # "decalage" de la recurrence en 0 ordre:=maxi-mini; eq := subs(nn=nn-mini,eq); li := [op(indets(eq))]; #mise a jour nh := eq; CO := array[0..ordre]; for i from 0 to ordre do CO[i] := 0; od; for i from 1 to nops(li) do vari := op(i,li); if `HYPERG/IsSeq`(vari,suite) then indice := op(1,vari)-nn; CO[indice] := CO[indice] + coeff(eq,vari); nh := nh - coeff(eq,vari)*vari; fi: od: nh := simplify(nh); # verification que les coefficients sont des polynomes for i from 0 to ordre do `HYPERG/IsPoly`(CO[i],nn); od: bb := -infinity; # on determine "bb" for j from 0 to ordre do QQ[j] := expand(sum(binomial(k,j)*CO[k],k=j..ordre)); bb := max(bb,`HYPERG/MyDegree`(QQ[j],nn)-j); od: aa := 0; # on determine "aa(xx)" for j from 0 to ordre do if ( `HYPERG/MyDegree`(QQ[j],nn)-j = bb ) then aa := aa + lcoeff(expand(QQ[j]),nn)*product(xx-k,k=0..j-1); fi: od: resol := map(simplify,[solve(aa=0,xx)]); # solutions de aa(xx)=0 nb_rac := nops(resol); # on supprime toutes les racines non entieres i := 1; while ( i <= nb_rac ) do if ( not type(op(i,resol),integer) and (op(i,resol)<>xx) ) then resol := subsop(i=NULL,resol); nb_rac := nb_rac-1; else i := i+1; fi: od: resol := op(resol); if ( resol = NULL ) then dd := -infinity; else dd := max(resol); fi: soldeg := max(`HYPERG/MyDegree`(expand(nh),nn)-bb,-bb-1,dd); soldeg := max(soldeg,0); `HYPERG/Verbose/Print`(1,`\n Degree bound of polynomial solutions: %d\n`,soldeg); # solution d'ordre "soldeg" # _x.soldeg * n^(soldeg) + _x.(soldeg-1)*n^(soldeg-1) + ... # + ................ + _x2*n^2 + _x1*n + _x0 psol := convert( [seq((_x.i)*nn^i,i=0..soldeg)], `+` ); # on insere cette solution dans l'eq. # (en pratique, on reconstruit une nouvelle equation) : rempl rempl := 0; for i from 0 to ordre do rempl := rempl + CO[i]*subs(nn=nn+i,psol); od: rempl := simplify(rempl+nh); if ( rempl = 0 ) then RETURN(psol); fi: ensemble := { seq(_x.i,i=0..soldeg) }; # on determine les coefficients _x.i ( i=0..(soldeg) ) ret:=solve(identity(rempl=0,nn),ensemble); if ( ret = NULL ) then ERROR(`No polynomial solution..`); fi: # et on reinjecte les valeurs des _x.i dans la solution generale for i from 1 to nops(ret) do psol := subs( op(1,op(i,ret))=op(2,op(i,ret)),psol ); od: # Conditions Initiales if ( ens <> [] ) then ci := {}; for i from 1 to nops(ens) do condi := op(1,op(i,ens)); condv := op(2,op(i,ens)); if not ( type(condi,function) and (op(0,condi)=op(0,suite)) and type(op(1,condi),integer) ) then ERROR(`incorrect initial condition`,op(i,ens)); fi: ci := ci union {subs(nn=op(1,condi),psol)=condv} od; ensembis := indets(psol) intersect ensemble; ret := solve(ci,ensembis); if ( ret = NULL ) then ERROR(`No polynomial solution...`); fi; psol := subs( ret, psol ); else psol := factor(psol); fi: psol; end: ########## # File @(#) Prove (HYPERG PACKAGE) Fri Aug 7 08:40:30 METDST 1998 ########## # # HYPERG[Prove] # # BG070898 HYPERG[Prove] := proc() local i,fname,txtmode,k,n,S,cert,res; if ( nargs<3 ) then ERROR(`Wrong number of arguments`); fi: fname := `HYPERG.proof`; txtmode := true; for i from 4 to nargs do if not type(args[i],`=`) then ERROR(`Invalid option`,args[i]); else if (op(1,args[i]) = 'filename') then fname := op(2,args[i]); elif (op(1,args[i]) = 'mode') then if (op(2,args[i]) = 'txt') then txtmode := true; elif (op(2,args[i]) = 'latex') then txtmode := false; else ERROR(`Invalid option`,args[i]); fi: else ERROR(`Invalid option`,args[i]); fi: fi; od: res := HYPERG[SumToRec](Sum(args[1],args[2]),args[3],SUM,'cert'); k := args[2]; n := args[3]; print(cat(`Creating automatic proof in file `,fname)); if ( txtmode ) then # Begin of TXT writeto(fname); printf(`AUTOMATIC PROOF\n \n`); printf(`Let F(%s,%s) be given by:\n`,n,k); print(args[1]); printf(`and let SUM(%s) be the sum of F(%s,%s) `,n,n,k); printf(`with respect to %s.\n \n`,k); printf(`Then SUM(%s) satisfies the following `,n); printf(`linear recurrence equation: (I)\n \n`); print(res); printf(`PROOF: We cleverly construct G(%s,%s):\n \n`,n,k); print(cert*args[1]); printf(`with the motive that\n \n`); print(subs(SUM=F,op(1,res))=G(n,k+1)-G(n,k)); printf(`(check!)\n \n`); printf(`and the identity (I) follows upon summing with respect to %s.`,k); print(); writeto(terminal); # End of TXT else # Begin of LaTeX writeto(fname); printf(`\\documentclass{article}\n`); printf(`\\begin{document}\n`); printf(`\\centerline{\\textbf{Automatic proof}}\n`); printf(`\\bigskip\n`); printf(`Let $F(%s,%s)$ be given by:\n`,n,k); printf(`$$`); latex(args[1]); printf(`$$\n`); printf(`and let $SUM(%s)$ be the sum of $F(%s,%s)$ `,n,n,k); printf(`with respect to $%s$.\n \n`,k); printf(`Then $SUM(%s)$ satisfies the following `,n); printf(`linear recurrence equation:\n`); printf(`\\begin{equation} \\label{identity}\n`); latex(res); print(`\\end{equation}\n`); printf(`\\bigskip\n`); printf(`\\textbf{PROOF}: We cleverly construct $G(%s,%s)=\n`,n,k); latex(cert*args[1]); printf(`$, with the motive that\n`); printf(`$$`); latex(subs(SUM=F,op(1,res))=G(n,k+1)-G(n,k)); printf(`$$\n`); printf(`(check!)\n`); printf(`and the identity (\\ref{identity}) follows upon summing `); printf(`with respect to $%s$.`,k); print(); printf(`\\end{document}\n`); writeto(terminal); # End of LaTeX fi: NULL; end: ########## # File @(#) RatioSolRec (HYPERG PACKAGE) Tue May 6 18:17:37 METDST 1997 ########## # # HYPERG[RatioSolRec] # `HYPERG/Abramov` # # BG050697 BG230498 BG260598 `HYPERG/Abramov` := proc(a0,ak,ordre,nn) # INPUT : <-- a0 : terme de tete de la recurrence : a_0(n) # <-- ak : terme de queue de la recurrence : a_k(n) # <-- ordre : ordre de la recurrence : k # <-- nn : variable de l'eq. de recurrence : n # OUTPUT : --> denominateur de la solution de l'eq. de recurrence local A,B, # ak(n-ordre) et a0(n) UU, # denominator of the rational solution racines,nb_rac, # racines of resultant NN, # greatest (integer and positive) racine of resultant D, # gcd i,j; # var for loops UU := 1; A := subs(nn=nn-ordre,ak); B := a0; `HYPERG/IsPoly`(A,nn); `HYPERG/IsPoly`(B,nn); racines := [solve(resultant(A,subs(nn=nn+p,B),nn),p)]; nb_rac := nops(racines); i := 1; # on supprime toutes les racines non entieres while ( i <= nb_rac ) do if ( not type(op(i,racines),integer) ) then racines := subsop(i=NULL,racines); nb_rac := nb_rac-1; else i := i+1; fi: od: if ( nops(racines) = 0 ) then RETURN(UU); # retour 1 else NN := max(op(racines)); fi: for i from NN by -1 to 0 #for i from 0 to NN do D := gcd(A,subs(nn=nn+i,B)); A := simplify(A/D); B := simplify(B/subs(nn=nn-i,D)); for j from 0 to i do UU := UU * subs(nn=nn-j,D); od od: UU; end: HYPERG[RatioSolRec] := proc() # Abramov's algorithm # INPUT : <-- eq : equation de recurrence a coefficients polynomiaux # <-- suite : suite verifiant la recurrence [U(n)] # OUTPUT : --> solution rationnelle de "eq" local eq, suite, rsol, # solution rationnelle numsol,densol, # numerateur et denominateur de la solution neq, # equation de recurrence nh, # terme de l'eq. de recurrence ne faisant pas # intervenir de U(n+i) [=0 si l'eq. est homogene] nn, # variable de l'equation de recurrence ordre, # ordre de la recurrence a0,ak, # coefficients de U(n) et de U(n+ordre) mini,maxi, # variables utilisees pour determiner c_mini,c_maxi, # les variables a0 et ak li, # liste des indets de l'eq [n,U(n),...,U(n+i),...] polyeq, # eq. de recurrence dont on cherche une sol. poly. polynum,polyden, i, # variable de boucle vari,coef,ret, ens, # ensemble de conditions initiales condi, # condition initiale : U(i) condv, # condition initiale : val ensembis, # ensemble des indeterminees {_xa,_xb,...} presentes # dans la sol. poly. generique ci; # conditions initiales pour la resolution option `Copyright by Bruno Gauthier, IGM, Universite Marne-la-Vallee, France`; if ( ( nargs < 2 ) or ( nargs > 3 ) ) then ERROR(`Wrong number of arguments`); fi: eq := args[1]; suite := args[2]; if ( not type(suite,function) ) then ERROR(suite,`is not a sequence`); fi: if ( nargs = 3 ) then if type(args[3],set) then ens := [op(args[3])]; else ERROR(`Expecting a set`); fi: else ens := []; # pas de condition initiale fi: if type(eq,`=`) then neq := HYPERG[RfEval](op(1,eq)-op(2,eq)); else neq := eq; fi: if ( not type(suite,function) ) then ERROR(suite,`is not a sequence`); fi: nn := op(1,suite); mini := INFINITY; maxi := -INFINITY; li := [op(indets(neq))]; for i from 1 to nops(li) do vari := op(i,li); if `HYPERG/IsSeq`(vari,suite) then if ( op(1,vari)-nn < mini ) then mini := op(1,vari)-nn; c_mini := coeff(neq,vari); fi: if ( op(1,vari)-nn > maxi ) then maxi := op(1,vari)-nn; c_maxi := coeff(neq,vari); fi: fi: od: ordre := maxi-mini; a0 := c_mini; ak := c_maxi; densol := `HYPERG/Abramov`(a0,ak,ordre,nn); densol := subs(nn=nn-mini,densol); #decalage `HYPERG/Verbose/Print`(1,`\n Denominator of rational solutions: %a\n`,densol); polyeq := 0; nh := neq; for i from 1 to nops(li) do vari := op(i,li); if `HYPERG/IsSeq`(vari,suite) then coef := coeff(neq,vari); polyeq := polyeq + vari * coef / subs(nn=nn+(op(1,vari)-nn),densol); nh := nh - coef * vari; fi: od: nh := simplify(nh); polyeq := simplify(polyeq); polyden := denom(polyeq); polynum := numer(polyeq); numsol := traperror(HYPERG[PolySolRec](polynum+(nh*polyden)=0,suite)); if (numsol=lasterror) then ERROR(`No rational solution..`); fi: rsol := numsol/densol; # Conditions Initiales if ( ens <> [] ) then ci := {}; for i from 1 to nops(ens) do condi := op(1,op(i,ens)); condv := op(2,op(i,ens)); if not ( type(condi,function) and (op(0,condi)=op(0,suite)) and type(op(1,condi),integer) ) then ERROR(`Incorrect initial condition`,op(i,ens)); elif ( subs(nn=op(1,condi),densol)=0 ) then ERROR(`Solution not defined in`,op(1,condi)); fi: ci := ci union {subs(nn=op(1,condi),rsol)=condv} od; ensembis := indets(rsol) minus indets(neq); ret := solve(ci,ensembis); if ( ret = NULL ) then ERROR(`No rational solution...`); fi; rsol := subs( ret, rsol ); else rsol := factor(rsol); fi: rsol; end: ########## # File @(#) RecOrder (HYPERG PACKAGE) Thu Apr 9 08:06:22 METDST 1998 ########## # # HYPERG[RecOrder] # # BG090498 HYPERG[RecOrder] := proc() # INPUT : <-- rec : recurrence equation # <-- U(n) : sequence # OUTPUT : --> order : order of the recurrence equation local rec, suite, U,n, ok,mini,maxi,ordre, i,li,vari; option `Copyright by Bruno Gauthier, IGM, Universite Marne-la-Vallee, France`; if ( nargs <> 2 ) then ERROR(`Expecting two arguments`); fi: rec := args[1]; if type(rec,`=`) then rec := op(1,rec)-op(2,rec); fi: rec := expand(rec); suite := args[2]; if ( not type(suite,function) ) then ERROR(suite,`is not a sequence`); fi: U := op(0,suite); n := op(1,suite); mini := infinity; maxi := -infinity; ok := false; li := [op(indets(rec))]; for i from 1 to nops(li) do vari := op(i,li); if `HYPERG/IsSeq`(vari,suite) then mini := `HYPERG/Mymin`(mini,op(1,vari)-n); maxi := `HYPERG/Mymax`(maxi,op(1,vari)-n); ok := true; fi: od: if (ok) then ordre := maxi-mini; else ERROR(args[1],`is not a recurrence on`,args[2]); fi: end: ########## # File @(#) Rules (HYPERG PACKAGE) Tue Jun 24 17:51:46 METDST 1997 ########## # # HYPERG[BaseSplit], HYPERG[Ext1], HYPERG[Ext2], HYPERG[Inv], # HYPERG[Linear1], HYPERG[Linear2], HYPERG[Neg1], HYPERG[Neg2], # HYPERG[Trans], HYPERG[Split] # # `HYPERG/BaseSplit/heart`, `HYPERG/Ext1/heart`, `HYPERG/Ext2/heart` # `HYPERG/Inv/heart`, `HYPERG/Linear1/heart`, `HYPERG/Linear2/heart` # `HYPERG/Neg1/heart`, `HYPERG/Neg2/heart`, `HYPERG/Trans/heart` # `HYPERG/Split/heart` # # BG240697 BG161098 `HYPERG/BaseSplit/heart`:=proc(expr,split) #RF[a,n] = split^n * product(RF[(a+k)/split,n/split], k=0..split-1); #GAMMA(a) = split^(a-1/2) * (2*Pi)^((1-split)/2) # * product(GAMMA((a+k)/split),k=0..split-1); local a,n; if (op(0,expr) = RF) then a := op(1,expr); n := op(2,expr); split^n * product( RF[(a+k)/split,n/split], k=0..split-1); elif (op(0,expr) = GAMMA) then a := op(1,expr); split^(a-1/2) * (2*Pi)^((1-split)/2) * product( GAMMA((a+k)/split),k=0..split-1); fi: end: `HYPERG/Ext1/heart`:=proc(expr,textend) #RF[a,n] = RF[a,textend+n]/RF[a+n,textend] #RF[a,n] = GAMMA(a+n)/GAMMA(a) if textend = infinity local a,n; a := op(1,expr); n := op(2,expr); if ( textend = infinity ) then GAMMA(a+n)/GAMMA(a); elif ( type(textend,numeric) and not type(textend,integer) ) then ERROR(`The second argument is not an integer`,textend); else RF[a,textend+n]/RF[a+n,textend]; fi: end: `HYPERG/Ext2/heart`:=proc(expr,bextend) #RF[a,n] = RF[a-bextend,bextend+n]/RF[a-bextend,bextend] #GAMMA(a) = GAMMA(a-bextend)*RF[a-bextend,bextend] local a,n; if ( type(bextend,numeric) and not type(bextend,integer) ) then ERROR(`The second argument is not an integer`,bextend); fi: if (op(0,expr) = RF) then a := op(1,expr); n := op(2,expr); RF[a-bextend,bextend+n]/RF[a-bextend,bextend] elif (op(0,expr) = GAMMA) then a := op(1,expr); GAMMA(a-bextend)*RF[a-bextend,bextend] fi: end: `HYPERG/Inv/heart`:=proc(expr) #GAMMA(a) = Pi/sin(Pi*a)/GAMMA(1-a) local a; a := op(1,expr); Pi/sin(Pi*a)/GAMMA(1-a); end: `HYPERG/Linear1/heart`:=proc(expr) #RF[a,n] = a*RF[a+1,n-1] #GAMMA(a) = (a-1)*GAMMA(a-1) local a,n; if (op(0,expr) = RF) then a := op(1,expr); n := op(2,expr); a*RF[a+1,n-1]; elif (op(0,expr) = GAMMA) then a := op(1,expr); (a-1) * GAMMA(a-1); fi: end: `HYPERG/Linear2/heart`:=proc(expr) #RF[a,n] = (a+n-1)*RF[a,n-1] local a,n; a := op(1,expr); n := op(2,expr); (a+n-1)*RF[a,n-1]; end: `HYPERG/Neg1/heart`:=proc(expr) #RF[a,n] = 1/RF[a+n,-n] local a,n; a := op(1,expr); n := op(2,expr); 1/RF[a+n,-n]; end: `HYPERG/Neg2/heart`:=proc(expr) #RF[a,n] = (-1)^n/RF[1-a,-n] local a,n; a := op(1,expr); n := op(2,expr); (-1)^n/RF[1-a,-n]; end: `HYPERG/Trans/heart`:=proc(expr) #RF[a,n] = (-1)^n*RF[1-n-a,n] local a,n; a := op(1,expr); n := op(2,expr); (-1)^n*RF[1-n-a,n]; end: `HYPERG/Split/heart`:=proc(expr,bsplit) #RF[a,n] = RF[a,bsplit]*RF[a+bsplit,n-bsplit] #GAMMA(a) = GAMMA(a+bsplit)/RF[a,bsplit] local a,n; if ( type(bsplit,numeric) and not type(bsplit,integer) ) then ERROR(`The second argument is not an integer`,bsplit); fi: if (op(0,expr) = RF) then a := op(1,expr); n := op(2,expr); RF[a,bsplit]*RF[a+bsplit,n-bsplit] elif (op(0,expr) = GAMMA) then a := op(1,expr); GAMMA(a+bsplit)/RF[a,bsplit]; fi: end: HYPERG[BaseSplit] := proc(expr,split) # BASZERL option `Copyright by Bruno Gauthier, IGM, Universite Marne-la-Vallee, France`; `HYPERG/Mapping`(expr,true,{`RF`,`GAMMA`},`HYPERG/BaseSplit/heart`,[split]); end: HYPERG[Ext1] := proc(expr,textend) # ERW1 option `Copyright by Bruno Gauthier, IGM, Universite Marne-la-Vallee, France`; `HYPERG/Mapping`(expr,true,{`RF`},`HYPERG/Ext1/heart`,[textend]); end: HYPERG[Ext2] := proc(expr,bextend) # ERW2 option `Copyright by Bruno Gauthier, IGM, Universite Marne-la-Vallee, France`; `HYPERG/Mapping`(expr,true,{`RF`,`GAMMA`},`HYPERG/Ext2/heart`,[bextend]); end: HYPERG[Inv] := proc(expr) #INV option `Copyright by Bruno Gauthier, IGM, Universite Marne-la-Vallee, France`; `HYPERG/Mapping`(expr,true,{`GAMMA`},`HYPERG/Inv/heart`,[]); end: HYPERG[Linear1] := proc(expr) # LINA1 option `Copyright by Bruno Gauthier, IGM, Universite Marne-la-Vallee, France`; `HYPERG/Mapping`(expr,true,{`RF`,`GAMMA`},`HYPERG/Linear1/heart`,[]); end: HYPERG[Linear2] := proc(expr) # LINA2 option `Copyright by Bruno Gauthier, IGM, Universite Marne-la-Vallee, France`; `HYPERG/Mapping`(expr,true,{`RF`},`HYPERG/Linear2/heart`,[]); end: HYPERG[Neg1] :=proc(expr) option `Copyright by Bruno Gauthier, IGM, Universite Marne-la-Vallee, France`; `HYPERG/Mapping`(expr,true,{`RF`},`HYPERG/Neg1/heart`,[]); end: HYPERG[Neg2] := proc(expr) option `Copyright by Bruno Gauthier, IGM, Universite Marne-la-Vallee, France`; `HYPERG/Mapping`(expr,true,{`RF`},`HYPERG/Neg2/heart`,[]); end: HYPERG[Trans] := proc(expr) option `Copyright by Bruno Gauthier, IGM, Universite Marne-la-Vallee, France`; `HYPERG/Mapping`(expr,true,{`RF`},`HYPERG/Trans/heart`,[]); end: HYPERG[Split] := proc(expr,bsplit) # ZERL option `Copyright by Bruno Gauthier, IGM, Universite Marne-la-Vallee, France`; `HYPERG/Mapping`(expr,true,{`RF`,`GAMMA`},`HYPERG/Split/heart`,[bsplit]); end: ########## # File @(#) ShiftRec (HYPERG PACKAGE) Fri Mar 27 08:08:34 MET 1998 ########## # # HYPERG[ShiftRec] # # BG270398 HYPERG[ShiftRec] := proc() # INPUT : <-- rec : recurrence equation with polynomial coefficients # <-- U(n) : sequence # <-- sh : shift value # OUTPUT : --> new = nh : recurrence equation shifted by 'sh' local rec, suite, U,n, sh; option `Copyright by Bruno Gauthier, IGM, Universite Marne-la-Vallee, France`; if ( ( nargs < 2 ) or ( nargs > 3 ) ) then ERROR(`Wrong number of arguments`); fi: rec := args[1]; if type(rec,`=`) then rec := op(1,rec)-op(2,rec); fi: suite := args[2]; if ( not type(suite,function) ) then ERROR(suite,`is not a sequence`); fi: U := op(0,suite); n := op(1,suite); if ( nargs = 3 ) then sh := args[3]; if not type(sh,integer) then ERROR(`The shift value must be an integer`); fi: else sh := 1; fi: rec := subs(n=n+sh,rec); HYPERG[SimplifyRec](rec=0,U(n)); end: ########## # File @(#) SubsRec (HYPERG PACKAGE) Tue Mar 31 08:03:54 METDST 1998 ########## # # HYPERG[SubsRec] # # BG310398 BG231098 HYPERG[SubsRec] := proc() # INPUT : <-- rec : recurrence equation with polynomial coefficients # <-- U(n) : sequence # <-- term : term # OUTPUT : --> evaluation of the recurrence for U(n)=term local rec, suite, U,n, term, i,indice,li,vari, nh,new; option `Copyright by Bruno Gauthier, IGM, Universite Marne-la-Vallee, France`; if ( nargs <> 3 ) then ERROR(`Expecting three arguments`); fi: rec := args[1]; if type(rec,`=`) then rec := op(1,rec)-op(2,rec); fi: suite := args[2]; if ( not type(suite,function) ) then ERROR(suite,`is not a sequence`); fi: U := op(0,suite); n := op(1,suite); term := args[3]; nh := `HYPERG/NonHomogTerm`(rec,suite); rec := rec-nh; li := [op(indets(rec))]; for i from 1 to nops(li) do vari := op(i,li); if `HYPERG/IsSeq`(vari,suite) then indice := op(1,vari); rec := subs(vari=subs(n=indice,term),rec); fi: od: rec := simplify(normal(rec)); RETURN( rec=-nh ); end: ########## # File @(#) Sum32 (HYPERG PACKAGE) Mon Aug 18 08:52:05 METDST 1997 ########## # # `HYPERG/Summation3201`, `HYPERG/Summation3202`, `HYPERG/Summation3204`, # `HYPERG/Summation3231`, `HYPERG/Summation3232`, `HYPERG/Summation3234`, # `HYPERG/Summation3234`, `HYPERG/Summation3235`, `HYPERG/Summation3261`, # `HYPERG/Summation3291`, # # BG180897 BG021098 `HYPERG/Summation3201`:=proc(shyp) #Saalschutz's theorem local l1,l2,z,a,b,c,d,e; l1 := op(1,shyp); l2 := op(2,shyp); a := op(1,l1); b := op(2,l1); c := op(3,l1); d := op(1,l2); e := op(2,l2); z := op(3,shyp); if `HYPERG/EvalPointEgalTo`(z,1)=false then ERROR(`Enable to apply S3201 with the evalution point`,z); fi: if `HYPERG/MustBeNeg`(c)=false then ERROR(`Enable to apply S3201 with the upper parameter`,a); fi: if `HYPERG/Egalite`(1+a+b-d+c=e)=false then ERROR(`Enable to apply S3201 with parameters`,a,b,c,d,e); fi: RF[d-a,-c] * RF[d-b,-c] / RF[d,-c] / RF[d-a-b,-c]; end: `HYPERG/Summation3202`:=proc(shyp) local l1,l2,z,a,b,c,d,e; l1 := op(1,shyp); l2 := op(2,shyp); a := op(1,l1); b := op(2,l1); c := op(3,l1); d := op(1,l2); e := op(2,l2); z := op(3,shyp); if `HYPERG/EvalPointEgalTo`(z,1)=false then ERROR(`Enable to apply S3202 with the evalution point`,z); fi: if `HYPERG/MustBeNeg`(a)=false then ERROR(`Enable to apply S3202 with the upper parameter`,a); fi: if ( `HYPERG/Egalite`(1-b+a=d)=true and `HYPERG/Egalite`(1-c+a=e)=true ) or ( `HYPERG/Egalite`(1-b+a=e)=true and `HYPERG/Egalite`(1-c+a=d)=true ) then RETURN( RF[1,-a] * RF[b,-a/2] * RF[c,-a/2] * RF[b+c,-a] / RF[1,-a/2] / RF[b,-a] / RF[c,-a] / RF[b+c,-a/2] ); fi: ERROR(`Enable to apply S3202 with parameters`,a,b,c,d,e); end: `HYPERG/Summation3204`:=proc(shyp) local l1,l2,z,a,b,c,d,e,lbd; l1 := op(1,shyp); l2 := op(2,shyp); a := op(1,l1); b := op(2,l1); lbd := (b-1)*2; c := op(3,l1); d := op(1,l2); e := op(2,l2); z := op(3,shyp); if `HYPERG/EvalPointEgalTo`(z,1)=false then ERROR(`Enable to apply S3204 with the evalution point`,z); fi: if ( `HYPERG/Egalite`(b-1=d)=true and `HYPERG/Egalite`(1-c+lbd=e)=true ) or ( `HYPERG/Egalite`(b-1=e)=true and `HYPERG/Egalite`(1-c+lbd=d)=true ) then RETURN( GAMMA(lbd) * GAMMA(1-a+lbd) * GAMMA(-a-2*b+lbd) * GAMMA(1-b+lbd) / GAMMA(1+lbd) / GAMMA(-a+lbd) / GAMMA(-2*c+lbd) / GMMA(1-a-c+lbd) ); fi: ERROR(`Enable to apply S3204 with parameters`,a,b,c,d,e); end: `HYPERG/Summation3231`:=proc(shyp) #Dixon's theorem local l1,l2,z,a,b,c,d,e; l1 := op(1,shyp); l2 := op(2,shyp); a := op(1,l1); b := op(2,l1); c := op(3,l1); d := op(1,l2); e := op(2,l2); z := op(3,shyp); if `HYPERG/EvalPointEgalTo`(z,1)=false then ERROR(`Enable to apply S3231 with the evalution point`,z); fi: if ( `HYPERG/Egalite`(1+a-b=d)=true and `HYPERG/Egalite`(1+a-c=e)=true ) or ( `HYPERG/Egalite`(1+a-b=e)=true and `HYPERG/Egalite`(1+a-c=d)=true ) then RETURN( GAMMA(1+a-b) * GAMMA(1+a-c) * GAMMA(1+a/2) * GAMMA(1+a/2-b-c) / GAMMA(1+a) / GAMMA(1+a/2-b) / GAMMA(1+a/2-c) / GAMMA(1+a-b-c) ); fi: ERROR(`Enable to apply S3231 with parameters`,a,b,c,d,e); end: `HYPERG/Summation3232`:=proc(shyp) #Dixon's theorem local l1,l2,z,a,b,c,d,e; l1 := op(1,shyp); l2 := op(2,shyp); a := op(1,l1); b := op(2,l1); c := op(3,l1); d := op(1,l2); e := op(2,l2); z := op(3,shyp); if `HYPERG/EvalPointEgalTo`(z,1)=false then ERROR(`Enable to apply S3232 with the evalution point`,z); fi: if `HYPERG/MustBeNeg`(c)=false then ERROR(`Enable to apply S3232 with the upper parameter`,c); fi: if ( `HYPERG/Egalite`(1+a-b=d)=true and `HYPERG/Egalite`(1+a-c=e)=true ) or ( `HYPERG/Egalite`(1+a-b=e)=true and `HYPERG/Egalite`(1+a-c=d)=true ) then RETURN( RF[1+a,-c] * RF[1+a/2-b,-c] / RF[1+a/2,-c] / RF[1+a-b,-c] ); fi: ERROR(`Enable to apply S3232 with parameters`,a,b,c,d,e); end: `HYPERG/Summation3233`:=proc(shyp) #Watson's theorem local l1,l2,z,a,b,c,d,e; l1 := op(1,shyp); l2 := op(2,shyp); a := op(1,l1); b := op(2,l1); c := op(3,l1); d := op(1,l2); e := op(2,l2); z := op(3,shyp); if `HYPERG/EvalPointEgalTo`(z,1)=false then ERROR(`Enable to apply S3233 with the evalution point`,z); fi: if ( `HYPERG/Egalite`((1+a+b)/2=d)=true and `HYPERG/Egalite`(2*c=e)=true ) or ( `HYPERG/Egalite`((1+a+b)/2=e)=true and `HYPERG/Egalite`(2*c=d)=true ) then RETURN( GAMMA(1/2) * GAMMA(1/2+c) * GAMMA(1/2+a/2+b/2) * GAMMA(1/2-a/2-b/2+c) / GAMMA(1/2+a/2) / GAMMA(1/2+b/2) / GAMMA(1/2-a/2+c) / GAMMA(1/2-b/2+c) ); fi: ERROR(`Enable to apply S3233 with parameters`,a,b,c,d,e); end: `HYPERG/Summation3234`:=proc(shyp) #Whipple's theorem local l1,l2,z,a,b,c,d,e; l1 := op(1,shyp); l2 := op(2,shyp); a := op(1,l1); b := op(2,l1); c := op(3,l1); d := op(1,l2); e := op(2,l2); z := op(3,shyp); if `HYPERG/EvalPointEgalTo`(z,1)=false then ERROR(`Enable to apply S3234 with the evalution point`,z); fi: if ( `HYPERG/Egalite`(a+b=1)=true and `HYPERG/Egalite`(d+e=1+2*c)=true ) then RETURN( Pi * 2^(1-2*c) * GAMMA(d) * GAMMA(e) / GAMMA(a/2+e/2) / GAMMA(a/2+d/2) / GAMMA(b/2+e/2) / GAMMA(b/2+d/2) ); fi: ERROR(`Enable to apply S3234 with parameters`,a,b,c,d,e); end: `HYPERG/Summation3235`:=proc(shyp) local l1,l2,z,a,b,c,d,e; l1 := op(1,shyp); l2 := op(2,shyp); a := op(1,l1); b := op(2,l1); c := op(3,l1); d := op(1,l2); e := op(2,l2); z := op(3,shyp); if `HYPERG/EvalPointEgalTo`(z,1)=false then ERROR(`Enable to apply S3235 with the evalution point`,z); fi: if `HYPERG/MustBeNeg`(c)=false then ERROR(`Enable to apply S3235 with the upper parameter`,c); fi: if ( `HYPERG/Egalite`(1+a-b=d)=true and `HYPERG/Egalite`(1+2*b+c=e)=true ) or ( `HYPERG/Egalite`(1+a-b=e)=true and `HYPERG/Egalite`(1+2*b+c=d)=true ) then RETURN( RF[1+a/2-b,-c] * RF[a-2*b,-c] * RF[-b,-c] / RF[a/2-b,-c] / RF[1+a-b,-c] / RF[-2*b,-c] ); fi: ERROR(`Enable to apply S3235 with parameters`,a,b,c,d,e); end: `HYPERG/Summation3261`:=proc(shyp) #Saalschutz's theorem (in the non-terminating form) local l1,l2,z,a,b,c,d,e; l1 := op(1,shyp); l2 := op(2,shyp); a := op(1,l1); b := op(2,l1); c := op(3,l1); d := op(1,l2); e := op(2,l2); z := op(3,shyp); if `HYPERG/EvalPointEgalTo`(z,1)=false then ERROR(`Enable to apply S3261 with the evalution point`,z); fi: if `HYPERG/Egalite`(1+a+b+c-d=e)=true then RETURN( GAMMA(1+a-d) * GAMMA(1+b-d) * GAMMA(1+c-d) * GAMMA(1+a+b+c-d) / GAMMA(1-d) / GAMMA(1+b+c-d) / GAMMA(1+a+c-d) / GAMMA(1+a+b-d) - GAMMA(d-1) * GAMMA(1+a-d) * GAMMA(1+b-d) * GAMMA(1+c-d) * GAMMA(1+a+b+c-d) / GAMMA(1-d) / GAMMA(a) / GAMMA(b) / GAMMA(c) / GAMMA(2+a+b+c-2*d) * HYP[[1+a-d,1+b-d,1+c-d],[2-d,2+a+b+c-2*d],1] ); fi: ERROR(`Enable to apply S3261 with parameters`,a,b,c,d,e); end: `HYPERG/Summation3291`:=proc(shyp) local l1,l2,z,a,b,c,d,e,C; l1 := op(1,shyp); l2 := op(2,shyp); a := op(1,l1); b := op(2,l1); c := op(3,l1); d := op(1,l2); e := op(2,l2); z := op(3,shyp); if `HYPERG/EvalPointEgalTo`(z,1)=false then ERROR(`Enable to apply S3291 with the evalution point`,z); fi: if `HYPERG/Egalite`(d=1/2+a/2+c/2)=true and `HYPERG/Egalite`(e=2*b)=true then C := d-c; RETURN( GAMMA(1/2) * GAMMA(1/2+a/2-b) * GAMMA(1+a-C) * GAMMA(1+a/2-b-C) / GAMMA(1/2+a/2) / GAMMA(1/2-b) / GAMMA(1+a/2-C) / GAMMA(1+a-b-C) - HYP[[1-b,1+a-2*b,2+a-2*b-2*C],[2+a-2*b-C,2-2*b],1] * GAMMA(1/2+a/2-b) * GAMMA(1+a/2-b) * GAMMA(-1/2+b) * GAMMA(1+a-C) * GAMMA(1+a/2-b-C) * GAMMA(3/2+a/2-b-C) / GAMMA(1/2+a/2) / GAMMA(a/2) / GAMMA(1/2-b) / GAMMA(1/2+a/2-C) / GAMMA(1+a/2-C) / GAMMA(2+a-2*b-C) ); fi: ERROR(`Enable to apply S3291 with the parameters`,b,e); end: ########## # File @(#) Sum43 (HYPERG PACKAGE) Fri Apr 10 07:54:29 METDST 1998 ########## # # `HYPERG/Summation4306`, `HYPERG/Summation4307`, `HYPERG/Summation4331`, # `HYPERG/Summation4332`, # # BG100498 `HYPERG/Summation4306`:=proc(shyp) local l1,l2,z,a,b,c,d,e,f,g; l1 := op(1,shyp); l2 := op(2,shyp); a := op(1,l1); b := op(2,l1); c := op(3,l1); d := op(4,l1); e := op(1,l2); f := op(2,l2); g := op(3,l2); z := op(3,shyp); if `HYPERG/EvalPointEgalTo`(z,1)=false then ERROR(`Enable to apply S4306 with the evalution point`,z); fi: if `HYPERG/MustBeNeg`(d)=false then ERROR(`Enable to apply S4306 with the upper parameter`,d); fi: if `HYPERG/Egalite`(b=1+a/2)=true and `HYPERG/Egalite`(e=a/2)=true and `HYPERG/Egalite`(f=1+a-c)=true and `HYPERG/Egalite`(g=1+2*c+d)=true then RETURN( RF[a-2*c,-d] * RF[-c,-d] / RF[1+a-c,-d] / RF[-2*c,-d] ); fi: ERROR(`Enable to apply S4306 with the parameters`,a,b,c,d,e,f,g); end: `HYPERG/Summation4307`:=proc(shyp) #Dixon's theorem local vhyp,a,l,b,c,z; vhyp := HYPERG[HypToVHyp](shyp); if not HYPERG[IsVHYP](vhyp) then ERROR(`Enable to apply S4307 with this series`,shyp); fi: a := op(1,vhyp); l := op(2,vhyp); b := op(1,l); c := op(2,l); z := op(3,vhyp); if `HYPERG/EvalPointEgalTo`(z,-1)=false then ERROR(`Enable to apply S4307 with the evalution point`,z); fi: GAMMA(1+a-b) * GAMMA(1+a-c) / GAMMA(1+a) / GAMMA(1+a-b-c); end: `HYPERG/Summation4331`:=proc(shyp) local vhyp,a,l,b,c,z; vhyp := HYPERG[HypToVHyp](shyp); if not HYPERG[IsVHYP](vhyp) then ERROR(`Enable to apply S4331 with this series`,shyp); fi: a := op(1,vhyp); l := op(2,vhyp); b := op(1,l); c := op(2,l); z := op(3,vhyp); if `HYPERG/EvalPointEgalTo`(z,1)=false then ERROR(`Enable to apply S4331 with the evalution point`,z); fi: GAMMA(1+a-b) * GAMMA(1+a-c) * GAMMA(1/2+a/2) * GAMMA(1/2+a/2-b-c) / GAMMA(1+a) / GAMMA(1+a-b-c) / GAMMA(1/2+a/2-b) / GAMMA(1/2+a/2-c); end: `HYPERG/Summation4332`:=proc(shyp) local l1,l2,z,a,b,c,d,e,f,g; l1 := op(1,shyp); l2 := op(2,shyp); a := op(1,l1); b := op(2,l1); c := op(3,l1); d := op(4,l1); e := op(1,l2); f := op(2,l2); g := op(3,l2); z := op(3,shyp); if `HYPERG/EvalPointEgalTo`(z,1)=false then ERROR(`Enable to apply S4332 with the evalution point`,z); fi: if `HYPERG/MustBeNeg`(d)=false then ERROR(`Enable to apply S4332 with the upper parameter`,d); fi: if `HYPERG/Egalite`(b=1+a/2)=true and `HYPERG/Egalite`(e=a/2)=true and `HYPERG/Egalite`(f=1+a-c)=true and `HYPERG/Egalite`(g=2+2*c+d)=true then RETURN( RF[1/2+a/2-b,-d] * RF[-1+a-2*c,-d] * RF[-1-c,-d] / RF[-1/2+a/2-c,-d] / RF[1+a-c,-d] / RF[-1-2*c,-d] ); fi: ERROR(`Enable to apply S4332 with the parameters`,a,b,c,d,e,f,g); end: ########## # File @(#) Sum54 (HYPERG PACKAGE) Fri Apr 10 08:12:29 METDST 1998 ########## # # `HYPERG/Summation5431`, `HYPERG/Summation5432`, # # BG100498 `HYPERG/Summation5431`:=proc(shyp) local vhyp,a,l,b,c,d,z; vhyp := HYPERG[HypToVHyp](shyp); if not HYPERG[IsVHYP](vhyp) then ERROR(`Enable to apply S5431 with this series`,shyp); fi: a := op(1,vhyp); l := op(2,vhyp); b := op(1,l); c := op(2,l); d := op(3,l); z := op(3,vhyp); if `HYPERG/EvalPointEgalTo`(z,1)=false then ERROR(`Enable to apply S5431 with the evalution point`,z); fi: GAMMA(1+a-b) * GAMMA(1+a-c) * GAMMA(1+a-d) * GAMMA(1+a-b-c-d) / GAMMA(1+a) / GAMMA(1+a-b-c) / GAMMA(1+a-b-d) / GAMMA(1+a-c-d); end: `HYPERG/Summation5432`:=proc(shyp) local vhyp,a,l,b,c,d,z; vhyp := HYPERG[HypToVHyp](shyp); if not HYPERG[IsVHYP](vhyp) then ERROR(`Enable to apply S5432 with this series`,shyp); fi: a := op(1,vhyp); l := op(2,vhyp); b := op(1,l); c := op(2,l); d := op(3,l); z := op(3,vhyp); if `HYPERG/EvalPointEgalTo`(z,1)=false then ERROR(`Enable to apply S5432 with the evalution point`,z); fi: if `HYPERG/MustBeNeg`(d)=false then ERROR(`Enable to apply S5432 with the upper parameter`,d); fi: RF[1+a,-d] * RF[1+a-b-c,-d] / RF[1+a-b,-d] / RF[1+a-c,-d]; end: ########## # File @(#) Sum65 (HYPERG PACKAGE) Tue Apr 14 13:45:48 METDST 1998 ########## # # `HYPERG/Summation6531`, `HYPERG/Summation6532`, # # BG140498 `HYPERG/Summation6531`:=proc(shyp) local vhyp,a,l,b,c,d,e,z,A,B,C; vhyp := HYPERG[HypToVHyp](shyp); if not HYPERG[IsVHYP](vhyp) then ERROR(`Enable to apply S6531 with this series`,shyp); fi: a := op(1,vhyp); l := op(2,vhyp); b := op(1,l); c := op(2,l); d := op(3,l); e := op(4,l); z := op(3,vhyp); A := b; B := c; C := d; if `HYPERG/Egalite`(a=-1/2+b/2+c/2+d)=false then ERROR(`Enable to apply S6531 with parameters`,a,b,c,d); fi: if `HYPERG/Egalite`(e=1/2+b/2+c/2-d)=false then ERROR(`Enable to apply S6531 with parameters`,a,b,c,d,e); fi: if `HYPERG/EvalPointEgalTo`(z,-1)=false then ERROR(`Enable to apply S6531 with the evalution point`,z); fi: GAMMA(1/2) * GAMMA(1/2+A/2+B/2) * GAMMA(1/2+C) * GAMMA(1/2+A/2-B/2+C) * GAMMA(1/2-A/2+B/2+C) / GAMMA(1/2+A/2) / GAMMA(1/2+B/2) / GAMMA(1/2-A/2+C) / GAMMA(1/2-B/2+C) / GAMMA(1/2+A/2+B/2+C); end: `HYPERG/Summation6532`:=proc(shyp) local vhyp,a,l,b,c,d,e,z; vhyp := HYPERG[HypToVHyp](shyp); if not HYPERG[IsVHYP](vhyp) then ERROR(`Enable to apply S6532 with this series`,shyp); fi: a := op(1,vhyp); l := op(2,vhyp); b := op(1,l); c := op(2,l); d := op(3,l); e := op(4,l); z := op(3,vhyp); if `HYPERG/Egalite`(c=1-b)=false then ERROR(`Enable to apply S6532 with parameters`,b,c); fi: if `HYPERG/Egalite`(e=1-d)=false then ERROR(`Enable to apply S6532 with parameters`,d,e); fi: if `HYPERG/EvalPointEgalTo`(z,-1)=false then ERROR(`Enable to apply S6532 with the evalution point`,z); fi: 2^(2*b) * GAMMA(1+a-b) * GAMMA(a+b) * GAMMA(1+a-d) * GAMMA(1+a/2+b/2-d/2) * GAMMA(1/2+a/2+b/2+d/2) * GAMMA(a+d) / GAMMA(a) / GAMMA(1+a) / GAMMA(1+a+b-d) / GAMMA(1+a/2-b/2-d/2) / GAMMA(1/2+a/2-b/2+d/2) / GMMA(a+b+d); end: ########## # File @(#) Sum76 (HYPERG PACKAGE) Wed Apr 15 12:04:45 METDST 1998 ########## # # `HYPERG/Summation7631`, `HYPERG/Summation7632`, `HYPERG/Summation7691`, # # BG150498 `HYPERG/Summation7631`:=proc(shyp) #Dougall's theorem local vhyp,a,l,b,c,d,e,f,z,n; vhyp := HYPERG[HypToVHyp](shyp); if not HYPERG[IsVHYP](vhyp) then ERROR(`Enable to apply S7631 with this series`,shyp); fi: a := op(1,vhyp); l := op(2,vhyp); b := op(1,l); c := op(2,l); d := op(3,l); e := op(4,l); f := op(5,l); z := op(3,vhyp); if `HYPERG/MustBeNeg`(f)=false then ERROR(`Enable to apply S7631 with the upper parameter`,f); fi: if `HYPERG/Egalite`(e=1+2*a-b-c-d-f)=false then ERROR(`Enable to apply S7631 with parameters`,a,b,c,d,e,f); fi: if `HYPERG/EvalPointEgalTo`(z,1)=false then ERROR(`Enable to apply S7631 with the evalution point`,z); fi: n := -f; RF[1+a,n] * RF[1+a-b-c,n] * RF[1+a-b-d,n] * RF[1+a-c-d,n] / RF[1+a-b,n] / RF[1+a-c,n] / RF[1+a-d,n] / RF[1+a-b-c-d,n]; end: `HYPERG/Summation7632`:=proc(shyp) local vhyp,a,l,b,c,d,e,f,z,n; vhyp := HYPERG[HypToVHyp](shyp); if not HYPERG[IsVHYP](vhyp) then ERROR(`Enable to apply S7632 with this series`,shyp); fi: a := op(1,vhyp); l := op(2,vhyp); b := op(1,l); c := op(2,l); d := op(3,l); e := op(4,l); f := op(5,l); z := op(3,vhyp); if `HYPERG/MustBeNeg`(f)=false then ERROR(`Enable to apply S7632 with the upper parameter`,f); fi: if `HYPERG/Egalite`(c=1/2+b)=false then ERROR(`Enable to apply S7632 with parameters`,b,c); fi: if `HYPERG/Egalite`(d=a-2*b)=false then ERROR(`Enable to apply S7632 with parameters`,a,b,d); fi: if `HYPERG/Egalite`(e=1+2*a-2*b-f)=false then ERROR(`Enable to apply S7632 with parameters`,a,b,e,f); fi: if `HYPERG/EvalPointEgalTo`(z,1)=false then ERROR(`Enable to apply S7632 with the evalution point`,z); fi: n := -f; RF[1+a,n] * RF[1+2*a-4*b,n] / RF[1+a-2*b,n] / RF[1+2*a-2*b,n]; end: `HYPERG/Summation7691`:=proc(shyp) local vhyp,a,l,b,c,d,e,f,z; vhyp := HYPERG[HypToVHyp](shyp); if not HYPERG[IsVHYP](vhyp) then ERROR(`Enable to apply S7691 with this series`,shyp); fi: a := op(1,vhyp); l := op(2,vhyp); b := op(1,l); c := op(2,l); d := op(3,l); e := op(4,l); f := op(5,l); z := op(3,vhyp); if `HYPERG/Egalite`(f=1+2*a-b-c-d-e)=false then ERROR(`Enable to apply S7691 with parameters`,a,b,c,d,e,f); fi: if `HYPERG/EvalPointEgalTo`(z,1)=false then ERROR(`Enable to apply S7691 with the evalution point`,z); fi: GAMMA(1+a-c) * GAMMA(1+a-d) * GAMMA(1+a-e) * GAMMA(-a+b+c+d+e) * GAMMA(-a+b+c) * GAMMA(-a+b+d) * GAMMA(-a+b+e) * GAMMA(1+a-c-d-e) / GAMMA(1+a) / GAMMA(-a+b) / GAMMA(1+a-c-d) / GAMMA(1+a-c-e) / GAMMA(-a+b+d+e) / GAMMA(1+a-d-e) / GAMMA(-a+b+c+e) / GAMMA(-a+b+c+d) - GAMMA(a-b) * GAMMA(1+a-c) * GAMMA(1+a-d) * GAMMA(1+a-e) * GAMMA(-a+B+c+d+e) * GAMMA(-a+b+c) * GAMMA(-a+b+d) * GAMMA(-a+b+e) * GAMMA(1+a-c-d-e) * GAMMA(1-a+2*b) / GAMMA(1+a) / GAMMA(c) / GAMMA(d) / GAMMA(e) / GAMMA(1+2*a-b-c-d-e) / GAMMA(-a+b) / GAMMA(1+b-c) / GAMMA(1+b-d) / GAMMA(1+b-e) / GAMMA(-2*a+2*b+c+d+e) * VHYP[-a+2*b,[b,-a+b+c,-a+b+d,-a+b+e,1+a-c-d-e],1]; end: ########## # File @(#) SimplifyRec (HYPERG PACKAGE) Fri Mar 27 08:07:34 MET 1998 ########## # # HYPERG[SimplifyRec] # `HYPERG/SimplifyRec/Heart` # # BG270398 BG060598 BG200598 BG170898 `HYPERG/SimplifyRec/Heart` := proc() # INPUT : <-- rec : recurrence equation with polynomial coefficients # <-- U(n) : sequence # OUTPUT : --> new = -nh : recurrence equation simplified local rec, suite, U,n, mini,maxi,ok,ordre, i,indice,li,vari, COEFF, nh,new; if ( nargs <> 2 ) then ERROR(`Expecting two arguments`); fi: rec := args[1]; if type(rec,`=`) then rec := op(1,rec)-op(2,rec); fi: rec := expand(rec); suite := args[2]; if ( not type(suite,function) ) then ERROR(suite,`is not a sequence`); fi: U := op(0,suite); n := op(1,suite); mini := infinity; maxi := -infinity; ok := false; li := [op(indets(rec))]; for i from 1 to nops(li) do vari := op(i,li); if `HYPERG/IsSeq`(vari,suite) then mini := `HYPERG/Mymin`(mini,op(1,vari)-n); maxi := `HYPERG/Mymax`(maxi,op(1,vari)-n); ok := true; fi: od: if ( not(ok) ) then RETURN(args[1]); fi: ordre := maxi-mini; li := [op(indets(rec))]; #mise a jour COEFF := array[0..ordre]; for i from 0 to ordre do COEFF[i] := 0; od; nh := rec; # terme non homogene for i from 1 to nops(li) do vari := op(i,li); if `HYPERG/IsSeq`(vari,suite) then indice := op(1,vari)-n-mini; COEFF[indice] := COEFF[indice] + coeff(rec,vari); nh := nh - coeff(rec,vari)*vari; fi: od: for i from 0 to ordre do COEFF[i] := simplify(COEFF[i]); COEFF[i] := factor(COEFF[i]); # ne factorise pas 3*n+3=3*(n+1) !! od: nh := simplify(nh); new := 0; for i from 0 to ordre do new := new + COEFF[i]*U(n+i+mini); od: RETURN( new = -nh ); ####### # rec := collect(rec,[seq(U(n+i),i=0..10)]); ####### end: HYPERG[SimplifyRec] := proc() # INPUT : <-- rec : recurrence equation with polynomial coefficients # <-- U(n) : sequence # OUTPUT : --> new = -nh : recurrence equation simplified local rec,rec_source, suite, U,n, tf,i; option `Copyright by Bruno Gauthier, IGM, Universite Marne-la-Vallee, France`; if ( nargs > 3 ) then ERROR(`Expecting two or three arguments`); fi: rec_source := args[1]; if type(rec_source,`=`) then rec_source := op(1,rec_source)-op(2,rec_source); fi: rec := expand(rec_source); suite := args[2]; if ( not type(suite,function) ) then ERROR(suite,`is not a sequence`); fi: U := op(0,suite); n := op(1,suite); if ( nargs = 3 ) then if ( args[3]='factor' ) then rec := factor(rec); if not type(rec,`*`) then RETURN(rec_source=0); fi; rec := [op(rec)]; tf := map(has,rec,U); i := 1; while (i<=nops(tf)) do if ( op(i,tf)=false ) then rec := subsop(i=NULL,rec); tf := subsop(i=NULL,tf); else i := i+1; fi: od: rec := convert(rec,`*`); else ERROR(`Invalid option`,args[3]); fi: fi: `HYPERG/SimplifyRec/Heart`(rec=0,suite); end: ########## # File @(#) ToHyp (HYPERG PACKAGE) Mon Mar 10 10:27:42 MET 1997 ########## # # HYPERG[SumToHyp] # `HYPERG/SumShift` # # BG100397 BG150997 BG180898 BG271098 BG050799 `HYPERG/SumShift`:=proc(argu) # shits the index in a Sum() such that the sum begins at 0 local expr,egalite,v,interv,b1,b2; # on suppose que argu est bien une somme (Sum(....)) expr := op(1,argu); egalite := op(2,argu); if ( not type(egalite,`=`) ) then RETURN(argu); fi: v := op(1,egalite); interv := op(2,egalite); b1 := op(1,interv); b2 := op(2,interv); if ( b1 <> 0 ) then expr := subs(v=v+b1,expr); if ( b2 <> infinity ) then b2 := b2-b1; fi: fi: Sum(expr,v=0..b2); end: HYPERG[SumToHyp]:=proc(argument) local argu,interv,k,expr,newexpr, borneInf,borneSup, # bornes de la somme rapport,n,d,Cste, l1,l2,z, retour,res; option `Copyright by Bruno Gauthier, IGM, Universite Marne-la-Vallee, France`; if ( nargs <> 1 ) then ERROR(`Expecting one argument`); fi: argu := combine(argument); # on fait passer les termes externes dans la somme if ( (op(0,argu)<>Sum) and (op(0,argu)<>sum) ) then ERROR(argument,`is not a Sum`); fi: #sommation a partir de 0 argu := `HYPERG/SumShift`(argu); expr := op(1,argu); expr := HYPERG[RfEval](expr); expr := convert(expr,GAMMA); interv := op(2,argu); if type(interv,`=`) then k := op(1,interv); borneInf := op(1,op(2,interv)); borneSup := op(2,op(2,interv)); else k := interv; borneInf := 0; borneSup := infinity; fi: if ( borneInf <> 0 ) or ( borneSup <> infinity ) then ERROR(`Impossible : incorrect bounds`); fi: while ( subs(k=0,expr) = 0 ) # la somme doit commencer par un terme non nul do expr:=subs(k=k+1,expr); od; newexpr := simplify(factor(expand(expr))); rapport := subs(k=k+1,newexpr)/newexpr; rapport := simplify(rapport); `HYPERG/Verbose/Print`(1,`\n Ratio of two consecutive terms: %a\n`,rapport); Cste := subs(k=0,expr); Cste := simplify(Cste); `HYPERG/Verbose/Print`(1,`\n Free of index summation: %a\n`,Cste); z := 1; n := expand(numer(rapport)); d := expand(denom(rapport)); if ( not type(n,polynom(anything,k)) ) then ERROR(`Not a hypergeometric series`); fi: if ( not type(d,polynom(anything,k)) ) then ERROR(`Not a hypergeometric series`); fi: z := z * lcoeff(n,k); retour := [solve(n=0,k)]; # resolution dans le corps des complexes l1 := map( proc(x) normal(-x); end, retour ); l1 := [ op(l1), 1 ]; `HYPERG/Verbose/Print`(1,`\n Upper parameters: %a\n`,l1); z := z / lcoeff(d,k); retour := [solve(d=0,k)]; # resolution dans le corps des complexes l2 := map( proc(x) normal(-x); end, retour ); `HYPERG/Verbose/Print`(1,`\n Lower parameters: %a\n`,l2); res := HYPERG[HypSimplify]( HYP[l1,l2,z] ); res := HYPERG[HypOrder]( res ); #MAPLEVR2+ #MAPLEVR2+ RETURN( convert(Cste,binomial) * res ); #MAPLEVR2+ end: ########## # File @(#) ToRec (HYPERG PACKAGE) Tue Jun 24 08:09:58 METDST 1997 ########## # # HYPERG[HypergToRec] # HYPERG[SummandToRec] # HYPERG[SumToRec] # HYPERG[HypToRec] # `HYPERG/ToRecOrder` # `HYPERG/ToRec` # # BG240697 BG170997 BG291297 BG110298 BG040898 BG140898 `HYPERG/ToRecOrder` := proc(f,k,n,A,order,cert) # INPUT : <-- f : hypergeometric sequence (in n and k) # <-- k, n : variables # <-- A : sequence name [A = sum_k f] # <-- order : order of the searched recurrence satisfied by A # (order >= 1) # <-- cert : certificate of the recurrence (call by name) # OUTPUT : --> rrec : recurrence satisfied by A local UF,P,Q,V, a,b,c, rap, soldeg,psol, rempl,ens, certif, # certificat de l'identite ret, rec,denom_rec,rrec, i; if ( order < 1 ) then ERROR(`Order must be an integer >= 1`); fi: `HYPERG/Verbose/Print`(1,`\n Searching recurrence of order %d\n`,order); UF := 0; rec := 0; for i from 0 to order do UF := UF + s.i * expand(subs(n=n+i,f)/f); rec := rec + s.i * A(n+i); od: UF := normal(UF); P := numer(UF); Q := denom(UF); V := f/Q; rap := simplify(expand( subs(k=k+1,V)/V )); ret := factor(`HYPERG/Gosper/Decomp`(rap,k)); `HYPERG/Verbose/Print`(2,`\n Gosper form: %a\n`,ret); a := op(1,ret); b := op(2,ret); c := op(3,ret); soldeg := `HYPERG/Gosper/DegreePolyBound`(a,b,c*P,k); if (soldeg < 0) then ERROR(`No nonzero polynomial solution`); fi: # solution d'ordre "soldeg" # x.soldeg * k^(soldeg) + x.(soldeg-1)*k^(soldeg-1) + ... # + ... + x2*k^2 + x1*k + x0 psol := convert( [seq((x.i)*k^i,i=0..soldeg)], `+` ); # on insere cette solution dans l'eq. # (on reconstruit une nouvelle equation) : rempl rempl := a*subs(k=k+1,psol) - subs(k=k-1,b) * psol -c*P; rempl := simplify(rempl); if ( rempl = 0 ) then RETURN(psol); fi: ens := { seq(x.i,i=0..soldeg),seq(s.i,i=0..order) }; # on determine les coefficients x.i ( i=0..soldeg) ) ret := solve(identity(rempl=0,k),ens); if ( ret = NULL ) then ERROR(`No solution`); fi: ens := [op(ens)]; # on reinjecte les valeurs des x.i et des s.i dans la solution generale # et dans la recurrence for i from 1 to nops(ret) do psol := subs( op(1,op(i,ret))=op(2,op(i,ret)),psol ); rec := subs( op(1,op(i,ret))=op(2,op(i,ret)),rec ); od: # on pose toutes les eventuelles constantes restantes a 1 for i from 1 to nops(ens) do psol := subs( op(i,ens)=1, psol ); rec := subs( op(i,ens)=1, rec ); od: psol := factor(psol); if ( rec=0 ) then ERROR(cat(`No recurrence equation of order `,order)); fi: rec := normal(rec); denom_rec := factor(denom(rec)); rec := numer(rec); rec := expand(rec); rrec := 0; for i from 0 to order do rrec := rrec + factor(coeff(rec,A(n+i))) * A(n+i); od: certif := denom_rec * psol*subs(k=k-1,b)/c/Q; cert := factor(certif); rrec=0; end: `HYPERG/ToRec` := proc(summand,k,n,A,order,cert) # INPUT : <-- summand : hypergeometric function (in n and k) # <-- k, n : variables # <-- A : nom d'une suite [A=sum_k f] # <-- order : ordre maxi de la recurrence verifiee par A # <-- cert : certificat (call by name) # OUTPUT : --> rec : recurrence verifiee par A local tmp, # 1..order ret, # retour de `HYPERG/ToRecOrder`(summand,k,n,A,tmp) ok, # existe-t-il une recurrence sur A(n) d'ordre tmp ? rec; # recurrence verifiee par A(n) ok := false; tmp := 1; while (not ok) and (tmp <=order) do ret := traperror( `HYPERG/ToRecOrder`(summand,k,n,A,tmp,cert) ); if ( ret<>lasterror ) then ok := true; fi: tmp := tmp+1; od: if not(ok) then ERROR(cat(`No recurrence equation of order <= `,order)); else RETURN(ret); fi: end: HYPERG[SummandToRec] := proc() # INPUT : <-- summand : hypergeometric summand # <-- k,n : variable: # <-- F,G : sequence names # <-- [maxorder = max_order] : ordre maxi de la recurrence cherchee # [default value: 6] # <-- [recorder = rec_order] : ordre de la recurrence cherchee # <-- ['cert'] : certificat (call by name) # OUTPUT : --> rec : recurrence verifiee par A(n) local max_order, # ordre maxi de la recurrence rec_order, # ordre `suppose` de la recurrence cert,tmp, # certificat summand, # summand F,G, # sequence names k,n, # names s, # set of indets res, # recurrence result i; # variable for loop option `Copyright by Bruno Gauthier, IGM, Universite Marne-la-Vallee, France`; if ( nargs < 5 ) then ERROR(`Wrong number of arguments`); fi: max_order := NULL; rec_order := NULL; cert := tmp; for i from 6 to nargs do if type(args[i],`=`) and (op(1,args[i]) = 'maxorder') then max_order := op(2,args[i]); elif type(args[i],`=`) and (op(1,args[i]) = 'recorder') then rec_order := op(2,args[i]); elif type(args[i],name) then cert := args[i]; else ERROR(`Invalid option`,args[i]); fi; od: if ( max_order<>NULL ) and ( rec_order<>NULL ) then ERROR(`Invalid option`); fi: if ( max_order=NULL ) and ( rec_order=NULL ) then max_order := 6; #default value fi: summand := HYPERG[RfEval](args[1]); k := args[2]; n := args[3]; F := args[4]; G := args[5]; # L'algo de Zeilberger est-il applicable ? if not HYPERG[IsHyperg](summand,n) then ERROR(`The summand`,summand,`is not hypergeometric in`,n); fi: if not HYPERG[IsHyperg](summand,k) then ERROR(`The summand`,summand,`is not hypergeometric in`,k); fi: if ( rec_order<>NULL ) then res := `HYPERG/ToRecOrder`(summand,k,n,F,rec_order,cert); else res := `HYPERG/ToRec`(summand,k,n,F,max_order,cert); fi: res := op(1,res)-op(2,res); s := indets(res); for i in s do if has(i,F) then res := subs(i=F(op(1,i),k),res); fi: od: res := res=G(n,k+1)-G(n,k); end: HYPERG[SumToRec] := proc() # INPUT : <-- Sum(summand,k) : sum of summand on k # <-- n : variable # <-- A : sequence name [A=sum_k f] # <-- [maxorder = max_order] : ordre maxi de la recurrence cherchee # [default value: 6] # <-- [recorder = rec_order] : ordre de la recurrence cherchee # <-- ['cert'] : certificat (call by name) # OUTPUT : --> rec : recurrence verifiee par A(n) local max_order, # ordre maxi de la recurrence rec_order, # ordre `suppose` de la recurrence cert,tmp, # certificat expr, # sum summand, # summand A, # sequence name k,n, # names deja, # boolean variable i; # variable for loop option `Copyright by Bruno Gauthier, IGM, Universite Marne-la-Vallee, France`; if ( nargs < 3 ) then ERROR(`Wrong number of arguments`); fi: max_order := NULL; rec_order := NULL; cert := tmp; for i from 4 to nargs do if type(args[i],`=`) and (op(1,args[i]) = 'maxorder') then max_order := op(2,args[i]); elif type(args[i],`=`) and (op(1,args[i]) = 'recorder') then rec_order := op(2,args[i]); elif type(args[i],name) then cert := args[i]; else ERROR(`Invalid option`,args[i]); fi; od: if ( max_order<>NULL ) and ( rec_order<>NULL ) then ERROR(`Invalid option`); fi: if ( max_order=NULL ) and ( rec_order=NULL ) then max_order := 6; #default value fi: expr := combine(args[1]); # on fait passer les termes externes dans la somme expr := HYPERG[RfEval](expr); if type(expr,`*`) then summand := 1; deja := false; for i in expr do if ( type(i,function) and (op(0,i)=`Sum` or op(0,i)=`sum`) ) then if ( deja ) then ERROR(`Two sums in the expression`); else summand := summand * op(1,i); k := op(2,i); deja := true; fi: else summand := summand * i; fi: od: elif ( type(expr,function) and (op(0,expr)=`Sum` or op(0,expr)=`sum`) ) then summand := op(1,expr); k := op(2,expr); else ERROR(`Impossible`); fi: if type(k,`=`) then k := op(1,k); # we suppose that it is from 0 to infinity fi: n := args[2]; A := args[3]; # L'algo de Zeilberger est-il applicable ? if not HYPERG[IsHyperg](summand,n) then ERROR(`The summand`,summand,`is not hypergeometric in`,n); fi: if not HYPERG[IsHyperg](summand,k) then ERROR(`The summand`,summand,`is not hypergeometric in`,k); fi: if ( rec_order<>NULL ) then `HYPERG/ToRecOrder`(summand,k,n,A,rec_order,cert); else `HYPERG/ToRec`(summand,k,n,A,max_order,cert); fi: end: HYPERG[HypToRec] := proc() # INPUT : <-- shyp : hypergeometric series # <-- n : variable # <-- A : sequence name [A=sum_k f] # <-- [maxorder = max_order] : ordre maxi de la recurrence cherchee # [default value: 6] # <-- [recorder = rec_order] : ordre de la recurrence cherchee # <-- ['cert'] : certificat (call by name) # OUTPUT : --> rec : recurrence verifiee par A(n) local shyp, # hypergeometric series max_order, # ordre maxi de la recurrence rec_order, # ordre `suppose` de la recurrence cert,tmp, # certificat s, # sum summand, # summand A, # sequence name k,n, # names deja, # boolean expr, # i; # variable for loop option `Copyright by Bruno Gauthier, IGM, Universite Marne-la-Vallee, France`; if ( nargs < 3 ) then ERROR(`Wrong number of arguments`); fi: max_order := NULL; rec_order := NULL; cert := tmp; for i from 4 to nargs do if type(args[i],`=`) and (op(1,args[i]) = 'maxorder') then max_order := op(2,args[i]); elif type(args[i],`=`) and (op(1,args[i]) = 'recorder') then rec_order := op(2,args[i]); elif type(args[i],name) then cert := args[i]; else ERROR(`Invalid option`,args[i]); fi; od: if ( max_order<>NULL ) and ( rec_order<>NULL ) then ERROR(`Invalid option`); fi: if ( max_order=NULL ) and ( rec_order=NULL ) then max_order := 6; #default value fi: shyp := args[1]; expr := ( HYPERG[RfEval](HYPERG[HypEval](shyp)) ); expr := normal(expand(expr)); expr := combine(expr); if type(expr,`*`) then summand := 1; deja := false; for i in expr do if ( type(i,function) and (op(0,i)=`Sum` or op(0,i)=`sum`) ) then if ( deja ) then ERROR(`Two sums in the expression`); else summand := summand * op(1,i); k := op(2,i); deja := true; fi: else summand := summand * i; fi: od: elif ( type(expr,function) and (op(0,expr)=`Sum` or op(0,expr)=`sum`) ) then summand := op(1,expr); k := op(2,expr); else ERROR(`Impossible`); fi: if type(k,`=`) then k := op(1,k); fi: n := args[2]; A := args[3]; if ( rec_order<>NULL ) then `HYPERG/ToRecOrder`(summand,k,n,A,rec_order,cert); else `HYPERG/ToRec`(summand,k,n,A,max_order,cert); fi: end: HYPERG[HypergToRec] := proc() # INPUT : <-- expr : hypergeometric sequence (in n) # <-- U(n) : sequence # OUTPUT : --> rec : recurrence satisfied by U(n) local expr, suite, U,n, rapport, # expr(n+1)/expr(n) rec; option `Copyright by Bruno Gauthier, IGM, Universite Marne-la-Vallee, France`; if ( nargs <> 2 ) then ERROR(`Expecting two arguments`); fi: expr := args[1]; suite := args[2]; if ( not type(suite,function) ) then ERROR(suite,`is not a sequence`); fi: U := op(0,suite); n := op(1,suite); if ( not HYPERG[IsHyperg](expr,n) ) then ERROR(expr,`is not a hypergeometric term`); fi: expr := HYPERG[RfEval](expr); rapport := subs(n=n+1,expr)/expr; rapport := simplify(expand(rapport)); rec := factor(numer(rapport))*U(n)-factor(denom(rapport))*U(n+1)=0; end: ########## # File @(#) Transf32 (HYPERG PACKAGE) Wed Apr 15 08:41:13 METDST 1998 ########## # # `HYPERG/Transform3204`, `HYPERG/Transform3205`, `HYPERG/Transform3206`, # `HYPERG/Transform3207`, `HYPERG/Transform3231`, `HYPERG/Transform3232`, # `HYPERG/Transform3233`, `HYPERG/Transform3234`, `HYPERG/Transform3235`, # `HYPERG/Transform3236`, `HYPERG/Transform3237`, # `HYPERG/Transform3239`, `HYPERG/Transform3240`, `HYPERG/Transform3261`, # `HYPERG/Transform3262`, `HYPERG/Transform3263`, `HYPERG/Transform3264`, # `HYPERG/Transform3267`, `HYPERG/Transform3268`, # # BG150498 BG250998 `HYPERG/Transform3204`:=proc(shyp) local l1,l2,z,a,b,c,d,e; l1 := op(1,shyp); l2 := op(2,shyp); a := op(1,l1); b := op(2,l1); c := op(3,l1); d := op(1,l2); e := op(2,l2); z := op(3,shyp); if `HYPERG/EvalPointEgalTo`(z,1)=false then ERROR(`Enable to apply T3204 with the evaluation point`,z); fi: GAMMA(e) * GAMMA(-a-b-c+d+e) / GAMMA(-a+e) / GAMMA(-b-c+d+e) * HYP[[a,-b+d,-c+d],[d,-b-c+d+e],1]; end: `HYPERG/Transform3205`:=proc(shyp) local l1,l2,z,a,b,c,d,e; l1 := op(1,shyp); l2 := op(2,shyp); a := op(1,l1); b := op(2,l1); c := op(3,l1); d := op(1,l2); e := op(2,l2); z := op(3,shyp); if `HYPERG/EvalPointEgalTo`(z,1)=false then ERROR(`Enable to apply T3205 with the evaluation point`,z); fi: GAMMA(d) * GAMMA(e) * GAMMA(-a-b-c+d+e) / GAMMA(b) / GAMMA(-a-b+d+e) / GAMMA(-b-c+d+e) * HYP[[-b+d,-b+e,-a-b-c+d+e],[-a-b+d+e,-b-c+d+e],1]; end: `HYPERG/Transform3206`:=proc(shyp) local l1,l2,z,a,b,c,d,e; l1 := op(1,shyp); l2 := op(2,shyp); a := op(1,l1); b := op(2,l1); c := op(3,l1); d := op(1,l2); e := op(2,l2); z := op(3,shyp); if `HYPERG/MustBeNeg`(c)=false then ERROR(`Enable to apply T3206 with the upper parameter`,c); fi: if `HYPERG/EvalPointEgalTo`(z,1)=false then ERROR(`Enable to apply T3206 with the evaluation point`,z); fi: RF[-a-b+d+e,-c] / RF[e,-c] * HYP[[c,-a+d,-b+d],[d,-a-b+d+e],1]; end: `HYPERG/Transform3207`:=proc(shyp) local l1,l2,z,a,b,c,d,e; l1 := op(1,shyp); l2 := op(2,shyp); a := op(1,l1); b := op(2,l1); c := op(3,l1); d := op(1,l2); e := op(2,l2); z := op(3,shyp); if `HYPERG/MustBeNeg`(c)=false then ERROR(`Enable to apply T3207 with the upper parameter`,c); fi: if `HYPERG/EvalPointEgalTo`(z,1)=false then ERROR(`Enable to apply T3207 with the evaluation point`,z); fi: RF[-b+e,-c] / RF[e,-c] * HYP[[c,b,-a+d],[d,1+b-e+c],1]; end: `HYPERG/Transform3231`:=proc(shyp) local l1,l2,z,a,b,c,d,e; l1 := op(1,shyp); l2 := op(2,shyp); a := op(1,l1); b := op(2,l1); c := op(3,l1); d := op(1,l2); e := op(2,l2); z := op(3,shyp); if `HYPERG/Egalite`(d=1/2+a/2+b/2)=false then ERROR(`Enable to apply T3231 with parameters`,a,b,d); fi: if `HYPERG/EvalPointEgalTo`(z,1)=false then ERROR(`Enable to apply T3231 with the evaluation point`,z); fi: HYP[[a/2,b/2,c,-c+e],[1/2+a/2+b/2,e/2,(1+e)/2],1]; end: `HYPERG/Transform3234`:=proc(shyp) local l1,l2,z,a,b,c,d,e; l1 := op(1,shyp); l2 := op(2,shyp); a := op(1,l1); b := op(2,l1); c := op(3,l1); d := op(1,l2); e := op(2,l2); z := op(3,shyp); if `HYPERG/Egalite`(c=a/2+b/2)=false then ERROR(`Enable to apply T3234 with parameters`,a,b,c); fi: if `HYPERG/Egalite`(d=2*c)=false then ERROR(`Enable to apply T3234 with parameters`,c,d); fi: if `HYPERG/Egalite`(e=1/2+a/2+b/2)=false then ERROR(`Enable to apply T3234 with parameters`,a,b,e); fi: HYP[[a/2,b/2],[1/2+a/2+b/2],z]^2; end: `HYPERG/Transform3235`:=proc(shyp) local l1,l2,z,a,b,c,d,e; l1 := op(1,shyp); l2 := op(2,shyp); a := op(1,l1); b := op(2,l1); c := op(3,l1); d := op(1,l2); e := op(2,l2); z := op(3,shyp); if `HYPERG/Egalite`(e=2*b)=false then ERROR(`Enable to apply T3235 with parameters`,b,e); fi: if `HYPERG/EvalPointEgalTo`(z,2)=false then ERROR(`Enable to apply T3235 with the evaluation point`,z); fi: RF[-a+d,-c] / RF[d,-c] * HYP[[a/2,1/2+a/2,1/2-n/2,-n/2],[1/2+a/2-d/2-n/2,1+a/2-d/2-n/2,1/2+b],1]; end: `HYPERG/Transform3236`:=proc(shyp) local vhyp,l,z,a,b; vhyp := HYPERG[HypToVHyp](shyp); if not HYPERG[IsVHYP](vhyp) then ERROR(`Enable to apply T3236 with this series`,shyp); fi: a := op(1,vhyp); l := op(2,vhyp); b := op(1,l); z := op(3,vhyp); (1-z)/(1+z)^(1+a) * HYP[[1/2+a/2,1/2+a/2],[1+a-b],(4*z)/(1+z)^2]; end: `HYPERG/Transform3237`:=proc(shyp) local l1,l2,x,y,n,z,a,b; l1 := op(1,shyp); l2 := op(2,shyp); x := op(1,l1); y := op(2,l1); n := -op(3,l1); b := op(1,l2); a := op(2,l2); z := op(3,shyp); if `HYPERG/EvalPointEgalTo`(z,1)=false then ERROR(`Enable to apply T3237 with the evaluation point`,z); fi: RF[a-x,n] * RF[a-y,n] / RF[a,n] / RF[a-x-y,n] * VHYP[-a-n+x+y,[1-a-b-n+x+y,x,y,-n],-1]; end: `HYPERG/Transform3239`:=proc(shyp) local l1,l2,z,a,b,c,d,e; l1 := op(1,shyp); l2 := op(2,shyp); a := op(1,l1); b := op(2,l1); c := op(3,l1); d := op(1,l2); e := op(2,l2); z := op(3,shyp); if `HYPERG/Egalite`(d=1+a-b)=false then ERROR(`Enable to apply T3239 with parameters`,a,b,d); fi: if `HYPERG/Egalite`(e=1+a-c)=false then ERROR(`Enable to apply T3239 with parameters`,a,c,e); fi: (1-z)^(-a) * HYP[[a/2,(1+a)/2,1+a-b-c],[1+a-b,1+a-c],(-4*z)/(1-z)^2]; end: `HYPERG/Transform3240`:=proc(shyp) local l1,l2,z,a,b,c,d,e; l1 := op(1,shyp); l2 := op(2,shyp); c := op(1,l1); b := op(2,l1); d := op(3,l1); a := op(1,l2); e := op(2,l2); z := op(3,shyp); if `HYPERG/Egalite`(e=a-b+d)=false then ERROR(`Enable to apply T3240 with parameters`,a,b,d,e); fi: if `HYPERG/EvalPointEgalTo`(z,1)=false then ERROR(`Enable to apply T3240 with the evaluation point`,z); fi: GAMMA(2*a) * GAMMA(2*a-2*b-c) * GAMMA(a-b+d) * GAMMA(a-c+d) / GAMMA(2*a-2*b) / GAMMA(2*a-c) / GAMMA(a+d) / GAMMA(a-b-c+d) * VHYP[1/2+a,[b,c/2,1/2+c/2,a/2-d/2,1/2+a/2-d/2],1]; end: `HYPERG/Transform3261`:=proc(shyp) local l1,l2,z,a,b,c,d,e; l1 := op(1,shyp); l2 := op(2,shyp); a := op(1,l1); b := op(2,l1); c := op(3,l1); d := op(1,l2); e := op(2,l2); z := op(3,shyp); if `HYPERG/EvalPointEgalTo`(z,1)=false then ERROR(`Enable to apply T3261 with the evaluation point`,z); fi: GAMMA(c) * GAMMA(1+c-d) * GAMMA(1-a) * GAMMA(-b-c+e) / GAMMA(-b+e) / GAMMA(-c+e) / GAMMA(1-a+c) / GAMMA(1-d) * HYP[[c,-a+d,1+c-e],[1-a+c,1+b+c-e],1] - GAMMA(-1+d) * GAMMA(e) * GAMMA(1+b-d) * GAMMA(1+c-d) * GAMMA(1-a) * GAMMA(-b-c+e) * GAMMA(1+b+c-e) / GAMMA(1-d) / GAMMA(1-d+e) / GAMMA(b) / GAMMA(c) / GAMMA(-a+d) / GAMMA(-1-b-c+d+e) / GAMMA(2+b+c-d-e) * HYP[[1+a-d,1+b-d,1+c-d],[2-d,1-d+e],1]; end: `HYPERG/Transform3262`:=proc(shyp) local l1,l2,z,a,b,c,d,e; l1 := op(1,shyp); l2 := op(2,shyp); a := op(1,l1); b := op(2,l1); c := op(3,l1); d := op(1,l2); e := op(2,l2); z := op(3,shyp); if `HYPERG/EvalPointEgalTo`(z,1)=false then ERROR(`Enable to apply T3262 with the evaluation point`,z); fi: GAMMA(e) * GAMMA(-b-c+e) / GAMMA(-b+e) / GAMMA(-c+e) * HYP[[-a+d,b,c],[d,1+b+c-e],1] + GAMMA(d) * GAMMA(e) * GAMMA(b+c-e) * GAMMA(-a-b-c+d+e) / GAMMA(-b-c+d+e) / GAMMA(-1-b-c+e) * HYP[[-b+e,-c+e,-a-b-c+d+e],[-b-c+d+e,1-b-c+e],1]; end: `HYPERG/Transform3263`:=proc(shyp) local l1,l2,z,a,b,c,d,e; l1 := op(1,shyp); l2 := op(2,shyp); a := op(1,l1); b := op(2,l1); c := op(3,l1); d := op(1,l2); e := op(2,l2); z := op(3,shyp); if `HYPERG/EvalPointEgalTo`(z,1)=false then ERROR(`Enable to apply T3263 with the evaluation point`,z); fi: GAMMA(1-c) * GAMMA(d) * GAMMA(-a-b+d) * GAMMA(1+a-e) / GAMMA(1+a-c) / GAMMA(-a+d) / GAMMA(-b+d) / GAMMA(1-e) * HYP[[1+a-d,-c+e,a],[1+a+b-d,1+a-c],1] + GAMMA(1-c) * GAMMA(a+b-d) * GAMMA(d) * GAMMA(1+a-e) * GAMMA(e) * GAMMA(-a-b-c+d+e) / GAMMA(a) / GAMMA(b) / GAMMA(1-b-c+d) / GAMMA(1+a+b-d-e) / GAMMA(-c+e) / GAMMA(-a-b+d+e) * HYP[[1-b,-a-b-c+d+e,-b+d],[1-a-b+d,1-b-c+d],1]; end: `HYPERG/Transform3264`:=proc(shyp) local l1,l2,z,a,b,c,d,e; l1 := op(1,shyp); l2 := op(2,shyp); a := op(1,l1); b := op(2,l1); c := op(3,l1); d := op(1,l2); e := op(2,l2); z := op(3,shyp); if `HYPERG/EvalPointEgalTo`(z,1)=false then ERROR(`Enable to apply T3264 with the evaluation point`,z); fi: GAMMA(1+b-e) * GAMMA(1+c-e) / GAMMA(1-e) / GAMMA(1+b+c-e) * HYP[[-a+d,b,c],[d,1+b+c-e],1] - GAMMA(d) * GAMMA(1+a-e) * GAMMA(1+b-e) * GAMMA(1+c-e) * GAMMA(-1+e) / GAMMA(a) / GAMMA(b) / GAMMA(c) / GAMMA(1-e) / GAMMA(1+d-e) * HYP[[1+c-e,1+b-e,1+a-e],[1+d-e,2-e],1]; end: `HYPERG/Transform3267`:=proc(shyp) local l1,l2,z,a,b,c,d,e; l1 := op(1,shyp); l2 := op(2,shyp); a := op(1,l1); b := op(2,l1); c := op(3,l1); d := op(1,l2); e := op(2,l2); z := op(3,shyp); if `HYPERG/EvalPointEgalTo`(z,1)=false then ERROR(`Enable to apply T3267 with the evaluation point`,z); fi: GAMMA(d) * GAMMA(1+a-e) * GAMMA(1+b-e) * GAMMA(1+c-e) / GAMMA(-a+d) / GAMMA(1-e) / GAMMA(1+a+b-e) / GAMMA(1+a+c-e) * HYP[[a,1+a-e,1+a+b+c-e-d],[1+a+b-e,1+a+c-e],1] - GAMMA(d) * GAMMA(1+a-e) * GAMMA(1+b-e) * GAMMA(1+c-e) * GAMMA(-1+e) / GAMMA(a) / GAMMA(b) / GAMMA(c) / GAMMA(1-e) / GAMMA(1+d-e) * HYP[[1+a-e,1+b-e,1+c-e],[2-e,1+d-e],1]; end: `HYPERG/Transform3268`:=proc(shyp) local l1,l2,z,a,b,c,d,e; l1 := op(1,shyp); l2 := op(2,shyp); a := op(1,l1); b := op(2,l1); c := op(3,l1); d := op(1,l2); e := op(2,l2); z := op(3,shyp); if `HYPERG/EvalPointEgalTo`(z,1)=false then ERROR(`Enable to apply T3268 with the evaluation point`,z); fi: GAMMA(a-b) * GAMMA(d) * GAMMA(e) * GAMMA(-a-b-c+d+e) / GAMMA(a) / GAMMA(-b+d) / GAMMA(-b+e) / GAMMA(-a-c+d+e) * HYP[[b,-a+d,-a+e],[1-a+b,-a-c+d+e],1] + GAMMA(-a+b) * GAMMA(d) * GAMMA(e) * GAMMA(-a-b-c+d+e) / GAMMA(b) / GAMMA(-a+d) / GAMMA(-a+e) / GAMMA(-b-c+d+e) * HYP[[a,-b+d,-b+e],[-b-c+d+e,1+a-b],1]; end: ########## # File @(#) Transf43 (HYPERG PACKAGE) Mon Apr 27 08:11:29 METDST 1998 ########## # # `HYPERG/Transform4301`, `HYPERG/Transform4302`, `HYPERG/Transform4303`, # `HYPERG/Transform4304`, `HYPERG/Transform4306`, `HYPERG/Transform4309`, # `HYPERG/Transform4310`, `HYPERG/Transform4312`, `HYPERG/Transform4331`, # `HYPERG/Transform4332`, `HYPERG/Transform4362`, `HYPERG/Transform4391`, # # BG270498 `HYPERG/Transform4301`:=proc(shyp) local l1,l2,z,a,b,c,d,e,f,g,n; l1 := op(1,shyp); l2 := op(2,shyp); a := op(1,l1); b := op(2,l1); c := op(3,l1); d := op(4,l1); e := op(1,l2); f := op(2,l2); g := op(3,l2); z := op(3,shyp); if `HYPERG/MustBeNeg`(d)=false then ERROR(`Enable to apply T4301 with the upper parameter`,d); fi: n := -d; if `HYPERG/Egalite`(g=1+a+b+c-e-f-n)=false then ERROR(`Enable to apply T4301 with parameters`,a,b,c,d,e,f,g); fi: if `HYPERG/EvalPointEgalTo`(z,1)=false then ERROR(`Enable to apply T4301 with the evaluation point`,z); fi: RF[-a+e,n] * RF[-a+f,n] / RF[e,n] / RF[f,n] * HYP[[-n,a,1+a+c-e-f-n,1+a+b-e-f-n],[1+a+b+c-e-f-n,1+a-e-n,1+a-f-n],1]; end: `HYPERG/Transform4302`:=proc(shyp) local l1,l2,z,a,b,c,d,e,f,g,n; l1 := op(1,shyp); l2 := op(2,shyp); a := op(1,l1); b := op(2,l1); c := op(3,l1); d := op(4,l1); e := op(1,l2); f := op(2,l2); g := op(3,l2); z := op(3,shyp); if `HYPERG/MustBeNeg`(d)=false then ERROR(`Enable to apply T4302 with the upper parameter`,d); fi: n := -d; if `HYPERG/Egalite`(g=1+a+b+c-e-f-n)=false then ERROR(`Enable to apply T4302 with parameters`,a,b,c,d,e,f,g); fi: if `HYPERG/EvalPointEgalTo`(z,1)=false then ERROR(`Enable to apply T4302 with the evaluation point`,z); fi: RF[a,n] * RF[-a-b+e+f,n] * RF[-a-c+e+f,n] / RF[e,n] / RF[f,n] / RF[-a-b-c+e+f,n] * HYP[[-n,-a+e,-a+f,-a-b-c+e+f],[-a-b+e+f,-a-c+e+f,1-a-n],1]; end: `HYPERG/Transform4303`:=proc(shyp) local l1,l2,z,a,b,c,d,e,f,g,n; l1 := op(1,shyp); l2 := op(2,shyp); a := op(1,l1); b := op(2,l1); c := op(3,l1); d := op(4,l1); e := op(1,l2); f := op(2,l2); g := op(3,l2); z := op(3,shyp); if `HYPERG/MustBeNeg`(d)=false then ERROR(`Enable to apply T4303 with the upper parameter`,d); fi: n := -d; if `HYPERG/Egalite`(g=1+a+b+c-e-f-n)=false then ERROR(`Enable to apply T4303 with parameters`,a,b,c,e,d,f,g); fi: if `HYPERG/EvalPointEgalTo`(z,1)=false then ERROR(`Enable to apply T4303 with the evaluation point`,z); fi: RF[-a-b+e+f,n] * RF[-a-c+e+f,n] / RF[-a+e+f,n] / RF[-a-b-c+e+f,n] * VHYP[-1-a+e+f,[-a+f,-a+e,b,c-n],1]; end: `HYPERG/Transform4304`:=proc(shyp) local l1,l2,z,a,b,c,d,e,f,g,n; l1 := op(1,shyp); l2 := op(2,shyp); a := op(1,l1); b := op(2,l1); c := op(3,l1); d := op(4,l1); e := op(1,l2); f := op(2,l2); g := op(3,l2); z := op(3,shyp); if `HYPERG/MustBeNeg`(d)=false then ERROR(`Enable to apply T4304 with the upper parameter`,d); fi: n := -d; if `HYPERG/Egalite`(g=1+a+b+c-e-f-n)=false then ERROR(`Enable to apply T4304 with parameters`,a,b,c,d,e,f,g); fi: if `HYPERG/EvalPointEgalTo`(z,1)=false then ERROR(`Enable to apply T4304 with the evaluation point`,z); fi: GAMMA(-b-c+e+f+n) * GAMMA(-a-c+e+f+n) * GAMMA(-a-b+e+f+n) * GAMMA(e+f+n) / GAMMA(-c+e+f+n) / GAMMA(-b+e+f+n) / GAMMA(-a+e+f+n) / GAMMA(-a-b-c+e+f+n) * VHYP[-1+e+f+n,[a,b,c,e+n,f+n],1]; end: `HYPERG/Transform4306`:=proc(shyp) local l1,l2,z,a,b,c,d,e,f,g; l1 := op(1,shyp); l2 := op(2,shyp); a := op(1,l1); b := op(2,l1); c := op(3,l1); d := op(4,l1); e := op(1,l2); f := op(2,l2); g := op(3,l2); z := op(3,shyp); if `HYPERG/Egalite`(e=1/2+a+b)=false then ERROR(`Enable to apply T4306 with parameters`,a,b,e); fi: if `HYPERG/Egalite`(f=(c+d)/2)=false then ERROR(`Enable to apply T4306 with parameters`,c,d,f); fi: if `HYPERG/Egalite`(g=(1+c+d)/2)=false then ERROR(`Enable to apply T4306 with parameters`,c,d,g); fi: if `HYPERG/EvalPointEgalTo`(z,1)=false then ERROR(`Enable to apply T4306 with the evaluation point`,z); fi: HYP[[2*a,2*b,c],[1/2+a+b,c+d],1]; end: `HYPERG/Transform4309`:=proc(shyp) local l1,l2,z,a,b,c,d,e,f,g; l1 := op(1,shyp); l2 := op(2,shyp); a := op(1,l1); b := op(2,l1); c := op(3,l1); d := op(4,l1); e := op(1,l2); f := op(2,l2); g := op(3,l2); z := op(3,shyp); if `HYPERG/Egalite`(e=1+a-b)=false then ERROR(`Enable to apply T4309 with parameters`,a,b,e); fi: if `HYPERG/Egalite`(f=1+a-c)=false then ERROR(`Enable to apply T4309 with parameters`,a,c,f); fi: if `HYPERG/Egalite`(g=1+a-d)=false then ERROR(`Enable to apply T4309 with parameters`,a,d,g); fi: if `HYPERG/EvalPointEgalTo`(z,1)=false then ERROR(`Enable to apply T4309 with the evaluation point`,z); fi: GAMMA(3+2*a-2*b-2*c-2*d) * GAMMA(2+2*a-b-c-d) / GAMMA(3+3*a-2*b-2*c-2*d) / GAMMA(2+a-b-c-d) * VHYP[1+2*a-b-c-d,[a/2,1/2+a/2,1+a-c-d,1+a-b-d,1+a-b-c],1]; end: `HYPERG/Transform4310`:=proc(shyp) local l1,l2,z,a,b,c,d,e,f,g; l1 := op(1,shyp); l2 := op(2,shyp); a := op(1,l1); b := op(2,l1); c := op(3,l1); d := op(4,l1); e := op(1,l2); f := op(2,l2); g := op(3,l2); z := op(3,shyp); if `HYPERG/Egalite`(e=1+a-b)=false then ERROR(`Enable to apply T4310 with parameters`,a,b,e); fi: if `HYPERG/Egalite`(f=1+a-c)=false then ERROR(`Enable to apply T4310 with parameters`,a,c,f); fi: if `HYPERG/Egalite`(g=1+a-d)=false then ERROR(`Enable to apply T4310 with parameters`,a,d,g); fi: if `HYPERG/EvalPointEgalTo`(z,-1)=false then ERROR(`Enable to apply T4310 with the evaluation point`,z); fi: GAMMA(2+2*a-b-c-d) * GAMMA(1+a/2) / GAMMA(1+a) / GAMMA(2+(3*a/2)-b-c-d) * VHYP[1+2*a-b-c-d,[a/2,1+a-c-d,1+a-b-d,1+a-b-c],-1]; end: `HYPERG/Transform4312`:=proc(shyp) local l1,l2,z,a,b,c,d,e,f,g; l1 := op(1,shyp); l2 := op(2,shyp); a := op(1,l1); b := op(2,l1); c := op(3,l1); d := op(4,l1); e := op(1,l2); f := op(2,l2); g := op(3,l2); z := op(3,shyp); if `HYPERG/Egalite`(b=1/2+a)=false then ERROR(`Enable to apply T4312 with parameters`,a,b); fi: if `HYPERG/Egalite`(c=1/2+d)=false then ERROR(`Enable to apply T4312 with parameters`,c,d); fi: if `HYPERG/Egalite`(f=1/2+e)=false then ERROR(`Enable to apply T4312 with parameters`,e,f); fi: if `HYPERG/EvalPointEgalTo`(z,1)=false then ERROR(`Enable to apply T4312 with the evaluation point`,z); fi: RF[e*2-a*2,-d*2] / RF[e*2,-d*2] * HYP[[a*2,g-1/2,d*2],[1+2*a-2*e+2*d,2*(g-1/2)],2]; end: `HYPERG/Transform4331`:=proc(shyp) local vhyp,a,l,b,c,z; vhyp := HYPERG[HypToVHyp](shyp); if not HYPERG[IsVHYP](vhyp) then ERROR(`Enable to apply T4331 with this series`,shyp); fi: a := op(1,vhyp); l := op(2,vhyp); b := op(1,l); c := op(2,l); z := op(3,vhyp); (1+z)/(1-z)^(a+1) * HYP[[1/2+a/2,1+a/2,1+a-b-c],[1+a-b,1+a-c],-4*z/(1-z)^2]; end: `HYPERG/Transform4332`:=proc(shyp) local l1,l2,z,A,B,C,D,E,F,G,a,b,x,y,n; l1 := op(1,shyp); l2 := op(2,shyp); A := op(1,l1); B := op(2,l1); C := op(3,l1); D := op(4,l1); E := op(1,l2); F := op(2,l2); G := op(3,l2); z := op(3,shyp); n := -D; x := B; y := C; b := A; a := E+B; if `HYPERG/MustBeNeg`(D)=false then ERROR(`Enable to apply T4332 with the upper parameter`,d); fi: if `HYPERG/Egalite`(E=a-x)=false then ERROR(`Enable to apply T4332 with parameters`,a,b,c,d,e,f,g); fi: if `HYPERG/Egalite`(F=a-y)=false then ERROR(`Enable to apply T4332 with parameters`,a,b,c,d,e,f,g); fi: if `HYPERG/Egalite`(G=a+n)=false then ERROR(`Enable to apply T4332 with parameters`,a,b,c,d,e,f,g); fi: if `HYPERG/EvalPointEgalTo`(z,1)=false then ERROR(`Enable to apply T4332 with the evaluation point`,z); fi: RF[a,n] * RF[a-x-y,n] / RF[a-x,n] / RF[a-y,n] * HYP[[x,y,a/2-b/2,1/2+a/2-b/2,-n],[a-b,a/2,1/2+a/2,1-a-n+x+y],1]; end: `HYPERG/Transform4362`:=proc(shyp) local l1,l2,z,a,b,c,d,e,f,g; l1 := op(1,shyp); l2 := op(2,shyp); a := op(1,l1); b := op(2,l1); c := op(3,l1); d := op(4,l1); e := op(1,l2); f := op(2,l2); g := op(3,l2); z := op(3,shyp); if `HYPERG/Egalite`(g=1+a+b+c+d-e-f)=false then ERROR(`Enable to apply T4362 with parameters`,a,d,g); fi: if `HYPERG/EvalPointEgalTo`(z,1)=false then ERROR(`Enable to apply T4362 with the evaluation point`,z); fi: GAMMA(-a+e+f) * GAMMA(-a-b-c+e+f) * GAMMA(-a-b-d+e+f) * GAMMA(-a-c-d+e+f) / GAMMA(-a-b+e+f) / GAMMA(-a-c+e+f) / GAMMA(-a-d+e+f) / GAMMA(-a-b-c-d+e+f) * VHYP[-1-a+e+f,[-a+f,-a+e,b,c,d],1] - GAMMA(e) * GAMMA(a+b+c+d-e-f) * GAMMA(f) * GAMMA(-a-b-c+e+f) * GAMMA(-a-b-d+e+f) * GAMMA(-a-c-d+e+f) * GAMMA(-b-c-d+e+f) / GAMMA(a) / GAMMA(b) / GAMMA(c) / GAMMA(d) / GAMMA(-a-b-c-d+e+f) / GAMMA(-a-b-c-d+2*e+f) / GAMMA(-a-b-c-d+e+2*f) * HYP[[-a-b-c+e+f,-a-b-d+e+f,-a-c-d+e+f,-b-c-d+e+f], [-a-b-c-d+2*e+f,-a-b-c-d+e+2*f,1-a-b-c-d+e+f],1]; end: `HYPERG/Transform4391`:=proc(shyp) local l1,l2,z,a,b,c,d,e,f,g; l1 := op(1,shyp); l2 := op(2,shyp); a := op(1,l1); c := op(2,l1); d := op(3,l1); e := op(4,l1); b := op(1,l2); f := op(2,l2); g := op(3,l2); z := op(3,shyp); if `HYPERG/Egalite`(f=2*a)=false then ERROR(`Enable to apply T4391 with parameters`,a,f); fi: if `HYPERG/Egalite`(g=1-2*b+c+d+e)=false then ERROR(`Enable to apply T4391 with parameters`,b,c,d,e,g); fi: if `HYPERG/EvalPointEgalTo`(z,1)=false then ERROR(`Enable to apply T4391 with the evaluation point`,z); fi: GAMMA(b) * GAMMA(1/2+b) * GAMMA(b-c/2-d/2) * GAMMA(1/2+b-c/2-d/2) * GAMMA(b-c/2-e/2) * GAMMA(1/2+b-c/2-e/2) * GAMMA(b-d/2-e/2) * GAMMA(1/2+b-d/2-e/2) / GAMMA(b-c/2) / GAMMA(1/2+b-c/2) / GAMMA(b-d/2) / GAMMA(1/2+b-d/2) / GAMMA(b-e/2) / GAMMA(1/2+b-e/2) / GAMMA(b-c/2-d/2-e/2) / GAMMA(1/2+b-c/2-d/2-e/2) * VHYP[-1/2+b,[-a+b,c/2,1/2+c/2,d/2,1/2+d/2,e/2,1/2+e/2],1] - GAMMA(1/2+a) * GAMMA(b) * GAMMA(b-c/2-d/2) * GAMMA(1/2+b-c/2-d/2) * GAMMA(a+2*b-c-d-e) * GAMMA(b-c/2-e/2) * GAMMA(1/2+b-c/2-e/2) * GAMMA(b-d/2-e/2) * GAMMA(1/2+b-d/2-e/2) * GAMMA(-b+c/2+d/2+e/2) * GAMMA(1/2-b+c/2+d/2+e/2) / GAMMA(c/2) / GAMMA(1/2+c/2) / GAMMA(d/2) / GAMMA(1/2+d/2) / GAMMA(3*b-c-d-e) / GAMMA(b-c/2-d/2-e/2) / GAMMA(1/2+b-c/2-d/2-e/2) / GAMMA(a+b-c/2-d/2-e/2) / GAMMA(1/2+a+b-c/2-d/2-e/2) / GAMMA(e/2) / GAMMA(1/2+e/2) * HYP[[a+2*b-c-d-e,2*b-c-d,2*b-c-d,2*b-c-e,2*b-d-e], [3*b-c-d-e,2*a+2*b-c-d-e,1+2*b-c-d-e],1]; end: ########## # File @(#) Transf54 (HYPERG PACKAGE) Tue Apr 28 08:21:29 METDST 1998 ########## # # `HYPERG/Transform5401`, `HYPERG/Transform5402`, `HYPERG/Transform5403`, # # BG280498 `HYPERG/Transform5401`:=proc(shyp) local l1,l2,z,a,b,c,d,e,f,g,h,i,n; l1 := op(1,shyp); l2 := op(2,shyp); a := op(1,l1); b := op(2,l1); c := op(3,l1); d := op(4,l1); e := op(5,l1); f := op(1,l2); g := op(2,l2); h := op(3,l2); i := op(4,l2); z := op(3,shyp); if `HYPERG/MustBeNeg`(e)=false then ERROR(`Enable to apply T5401 with the upper parameter`,e); fi: n := -e; if `HYPERG/Egalite`(f=1+a-b)=false then ERROR(`Enable to apply T5401 with parameters`,a,b,f); fi: if `HYPERG/Egalite`(g=1+a-c)=false then ERROR(`Enable to apply T5401 with parameters`,a,c,g); fi: if `HYPERG/Egalite`(h=1+a-d)=false then ERROR(`Enable to apply T5401 with parameters`,a,d,h); fi: if `HYPERG/Egalite`(i=-2-2*a+2*b+2*c+2*d-n)=false then ERROR(`Enable to apply T5401 with parameters`,a,b,c,d,n,i); fi: if `HYPERG/EvalPointEgalTo`(z,1)=false then ERROR(`Enable to apply T5401 with the evaluation point`,z); fi: RF[2+a-b-c-d,n] * RF[3+3*a-2*b-2*c-2*d,n] / RF[2+2*a-b-c-d,n] / RF[3+2*a-2*b-2*c-2*d,n] * VHYP[1+2*a-b-c-d, [1+a-c-d,1+a-b-d,1+a-b-c,a/2,1/2+a/2,3+3*a-2*b-2*c-2*d+n,-n],1]; end: `HYPERG/Transform5402`:=proc(shyp) local l1,l2,z,a,b,c,d,e,f,g,h,i,n; l1 := op(1,shyp); l2 := op(2,shyp); a := op(1,l1); b := op(2,l1); c := op(3,l1); d := op(4,l1); e := op(5,l1); f := op(1,l2); g := op(2,l2); h := op(3,l2); i := op(4,l2); z := op(3,shyp); if `HYPERG/MustBeNeg`(a)=false then ERROR(`Enable to apply T5402 with the upper parameter`,a); fi: n := -a; if `HYPERG/Egalite`(f=1-b-n)=false then ERROR(`Enable to apply T5402 with parameters`,a,b,f); fi: if `HYPERG/Egalite`(g=1-c-n)=false then ERROR(`Enable to apply T5402 with parameters`,a,c,g); fi: if `HYPERG/Egalite`(h=1-d-n)=false then ERROR(`Enable to apply T5402 with parameters`,a,d,h); fi: if `HYPERG/Egalite`(i=-2+2*b+2*c+2*d+e+2*n)=false then ERROR(`Enable to apply T5402 with parameters`,a,b,c,d,e,i); fi: if `HYPERG/EvalPointEgalTo`(z,1)=false then ERROR(`Enable to apply T5402 with the evaluation point`,z); fi: RF[2-b-c-d-e-2*n,n] * RF[3-2*b-2*c-2*d-3*n,n] / RF[2-b-c-d-2*n,n] / RF[3-2*b-2*c-2*d-e-3*n,n] * VHYP[1-b-c-d-2*n, [1-c-d-n,1-b-d-n,1-b-c-n,-n/2,1/2-n/2,e,3-2*b-2*c-2*d-e-3*n],1]; end: `HYPERG/Transform5403`:=proc(shyp) local l1,l2,z,a,b,e,x,y,A,B,C,D,n; l1 := op(1,shyp); l2 := op(2,shyp); x := op(1,l1); y := op(2,l1); a := op(3,l1); A := op(4,l1); e := op(5,l1); B := op(1,l2); b := op(2,l2); C := op(3,l2); D := op(4,l2); z := op(3,shyp); if `HYPERG/MustBeNeg`(e)=false then ERROR(`Enable to apply T5403 with the upper parameter`,e); fi: n := -e; if `HYPERG/Egalite`(A=1/2+a)=false then ERROR(`Enable to apply T5403 with parameters`,a,A); fi: if `HYPERG/Egalite`(B=2*a)=false then ERROR(`Enable to apply T5403 with parameters`,a,B); fi: if `HYPERG/Egalite`(C=1/2+b)=false then ERROR(`Enable to apply T5403 with parameters`,b,C); fi: if `HYPERG/Egalite`(D=1-2*b-n+x+y)=false then ERROR(`Enable to apply T5403 with parameters`,x,y,b,e,D); fi: if `HYPERG/EvalPointEgalTo`(z,1)=false then ERROR(`Enable to apply T5403 with the evaluation point`,z); fi: RF[2*b-x,n] * RF[2*b-y,n] / RF[2*b,n] / RF[2*b-x-y,n] * HYP[[-2*a+2*b,x,y,-n],[2*b-x,2*b-y,2*b+n],1]; end: ########## # File @(#) Transf65 (HYPERG PACKAGE) Tue May 5 18:19:41 METDST 1998 ########## # # `HYPERG/Transform6501`, `HYPERG/Transform6531`, `HYPERG/Transform6532`, # `HYPERG/Transform6533`, # # BG050598 BG110598 `HYPERG/Transform6501`:=proc(shyp) local l1,l2,z,a,b,c,d,e,f,g,h,i,j,k,n; l1 := op(1,shyp); l2 := op(2,shyp); a := op(1,l1); e := op(2,l1); b := op(3,l1); c := op(4,l1); d := op(5,l1); f := op(6,l1); g := op(1,l2); h := op(2,l2); i := op(3,l2); j := op(4,l2); k := op(5,l2); z := op(3,shyp); n := -f; if `HYPERG/Egalite`(e=1+a/2)=false then ERROR(`Enable to apply T6501 with parameters`,a,e); fi: if `HYPERG/Egalite`(g=a/2)=false then ERROR(`Enable to apply T6501 with parameters`,a,g); fi: if `HYPERG/Egalite`(h=1+a-b)=false then ERROR(`Enable to apply T6501 with parameters`,a,b,h); fi: if `HYPERG/Egalite`(i=1+a-c)=false then ERROR(`Enable to apply T6501 with parameters`,a,c,i); fi: if `HYPERG/Egalite`(j=1+a-d)=false then ERROR(`Enable to apply T6501 with parameters`,a,d,j); fi: if `HYPERG/Egalite`(k=-1-2*a+2*b+2*c+2*d-n)=false then ERROR(`Enable to apply T6501 with parameters`,a,b,c,d,n,k); fi: if `HYPERG/EvalPointEgalTo`(z,1)=false then ERROR(`Enable to apply T6501 with the evaluation point`,z); fi: RF[2+3*a-2*b-2*c-2*d,n] * RF[1+a-b-c-d,n] / RF[2+2*a-2*b-2*c-2*d,n] / RF[2+2*a-b-c-d,n] * VHYP[1+2*a-b-c-d, [1+a-c-d,1+a-b-d,1+a-b-c,1+a/2,1/2+a/2,2+3*a-2*b-2*c-2*d+n,-n],1]; end: `HYPERG/Transform6531`:=proc(shyp) local l1,l2,z,a,b,c,d,e,f,g,h,i,j,k,n; l1 := op(1,shyp); l2 := op(2,shyp); a := op(1,l1); e := op(2,l1); b := op(3,l1); c := op(4,l1); d := op(5,l1); f := op(6,l1); g := op(1,l2); h := op(2,l2); i := op(3,l2); j := op(4,l2); k := op(5,l2); z := op(3,shyp); n := -f; if `HYPERG/Egalite`(e=1+a/2)=false then ERROR(`Enable to apply T6531 with parameters`,a,e); fi: if `HYPERG/Egalite`(g=a/2)=false then ERROR(`Enable to apply T6531 with parameters`,a,g); fi: if `HYPERG/Egalite`(h=1+a-b)=false then ERROR(`Enable to apply T6531 with parameters`,a,b,h); fi: if `HYPERG/Egalite`(i=1+a-c)=false then ERROR(`Enable to apply T6531 with parameters`,a,c,i); fi: if `HYPERG/Egalite`(j=1+a-d)=false then ERROR(`Enable to apply T6531 with parameters`,a,d,j); fi: if `HYPERG/Egalite`(k=-2*a+2*b+2*c+2*d-n)=false then ERROR(`Enable to apply T6531 with parameters`,a,b,c,d,n,k); fi: if `HYPERG/EvalPointEgalTo`(z,1)=false then ERROR(`Enable to apply T6531 with the evaluation point`,z); fi: (1+3*a-2*b-2*c-2*d+2*n) * RF[a-b-c-d,n] * RF[1+3*a-2*b-2*c-2*d,n] / (1+3*a-2*b-2*c-2*d) / RF[2+2*a-b-c-d,n] / RF[1+2*a-2*b-2*c-2*d,n] * VHYP[1+2*a-b-c-d, [1+a-c-d,1+a-b-d,1+a-b-c,1/2+a/2,1+a/2,1+3*a-2*b-2*c-2*d+n,-n],1]; end: `HYPERG/Transform6532`:=proc(shyp) local vhyp,a,l,b,c,d,e,z; vhyp := HYPERG[HypToVHyp](shyp); if not HYPERG[IsVHYP](vhyp) then ERROR(`Enable to apply T6532 with this series`,shyp); fi: a := op(1,vhyp); l := op(2,vhyp); b := op(1,l); c := op(2,l); d := op(3,l); e := op(4,l); z := op(3,vhyp); if `HYPERG/Egalite`(e=1+2*a-2*b-c-d)=false then ERROR(`Enable to apply T6532 with parameters`,a,b,c,d,e); fi: if `HYPERG/EvalPointEgalTo`(z,-1)=false then ERROR(`Enable to apply T6532 with the evaluation point`,z); fi: GAMMA(1+2*b) * GAMMA(1+a-b) / GAMMA(1+b) / GAMMA(1+a) * HYP[[2*b,-a+2*b+c,-a+2*b+d,1+a-c-d],[1+a-c,1+a-d,-a+2*b+c+d],-1]; end: `HYPERG/Transform6533`:=proc(shyp) local vhyp,a,l,b,x,y,e,n,z; vhyp := HYPERG[HypToVHyp](shyp); if not HYPERG[IsVHYP](vhyp) then ERROR(`Enable to apply T6533 with this series`,shyp); fi: a := op(1,vhyp); l := op(2,vhyp); b := op(1,l); x := op(2,l); y := op(3,l); e := op(4,l); n := -e; z := op(3,vhyp); if `HYPERG/EvalPointEgalTo`(z,-1)=false then ERROR(`Enable to apply T6533 with the evaluation point`,z); fi: RF[1+a,n] * RF[1+a-x-y,n] / RF[1+a-x,n] / RF[1+a-y,n] * HYP[[-n,x,y],[-a-n+x+y,1+a-b],1]; end: ########## # File @(#) Transf76 (HYPERG PACKAGE) Tue May 12 07:50:31 METDST 1998 ########## # # `HYPERG/Transform7631`, `HYPERG/Transform7632`, `HYPERG/Transform7633`, # `HYPERG/Transform7634`, `HYPERG/Transform7635`, `HYPERG/Transform7636`, # `HYPERG/Transform7637`, `HYPERG/Transform7691`, `HYPERG/Transform7692`, # `HYPERG/Transform7693`, `HYPERG/Transform7694`, # # BG120598 BG050698 `HYPERG/Transform7631`:=proc(shyp) local vhyp,a,l,b,c,d,e,f,z; vhyp := HYPERG[HypToVHyp](shyp); if not HYPERG[IsVHYP](vhyp) then ERROR(`Enable to apply T7631 with this series`,shyp); fi: a := op(1,vhyp); l := op(2,vhyp); b := op(1,l); c := op(2,l); d := op(3,l); e := op(4,l); f := op(5,l); z := op(3,vhyp); if `HYPERG/EvalPointEgalTo`(z,1)=false then ERROR(`Enable to apply T7631 with the evaluation point`,z); fi: GAMMA(1+a-d) * GAMMA(1+a-e) * GAMMA(1+a-f) * GAMMA(1+a-d-e-f) / GAMMA(1+a) / GAMMA(1+a-d-e) / GAMMA(1+a-d-f) / GAMMA(1+a-e-f) * HYP[[1+a-b-c,d,e,f],[1+a-b,1+a-c,-a+d+e+f],1]; end: `HYPERG/Transform7632`:=proc(shyp) local vhyp,a,l,b,c,d,e,f,n,z; vhyp := HYPERG[HypToVHyp](shyp); if not HYPERG[IsVHYP](vhyp) then ERROR(`Enable to apply T7632 with this series`,shyp); fi: a := op(1,vhyp); l := op(2,vhyp); b := op(1,l); c := op(2,l); d := op(3,l); e := op(4,l); f := op(5,l); z := op(3,vhyp); if `HYPERG/MustBeNeg`(f)=false then ERROR(`Enable to apply T7632 with the upper parameter`,f); fi: n := -f; if `HYPERG/EvalPointEgalTo`(z,1)=false then ERROR(`Enable to apply T7632 with the evaluation point`,z); fi: RF[1+a,n] * RF[1+a-d-e,n] / RF[1+a-d,n] / RF[1+a-e,n] * HYP[[1+a-b-c,d,e,-n],[1+a-b,1+a-c,-a+d+e-n],1]; end: `HYPERG/Transform7633`:=proc(shyp) local vhyp,a,l,b,c,d,e,f,n,z; vhyp := HYPERG[HypToVHyp](shyp); if not HYPERG[IsVHYP](vhyp) then ERROR(`Enable to apply T7633 with this series`,shyp); fi: a := op(1,vhyp); l := op(2,vhyp); b := op(1,l); c := op(2,l); d := op(3,l); e := op(4,l); f := op(5,l); z := op(3,vhyp); n := f-1-a+e; if `HYPERG/MustBeNeg`(-n)=false then ERROR(`Enable to apply T7633 with parameters`,a,e,f); fi: if `HYPERG/EvalPointEgalTo`(z,1)=false then ERROR(`Enable to apply T7633 with the evaluation point`,z); fi: GAMMA(1+a-d) * GAMMA(1+a-c) * GAMMA(1+a-b) * GAMMA(1+a-b-c-d) / GAMMA(1+a-c-d) / GAMMA(1+a-b-d) / GAMMA(1+a-b-c) / GAMMA(1+a) * HYP[[b,c,d,-n],[1+a-e,-a+b+c+d,e-n],1]; end: `HYPERG/Transform7634`:=proc(shyp) local vhyp,a,l,b,c,d,e,f,z; vhyp := HYPERG[HypToVHyp](shyp); if not HYPERG[IsVHYP](vhyp) then ERROR(`Enable to apply T7634 with this series`,shyp); fi: a := op(1,vhyp); l := op(2,vhyp); b := op(1,l); c := op(2,l); d := op(3,l); e := op(4,l); f := op(5,l); z := op(3,vhyp); if `HYPERG/EvalPointEgalTo`(z,1)=false then ERROR(`Enable to apply T7634 with the evaluation point`,z); fi: GAMMA(1+a-e) * GAMMA(1+a-f) * GAMMA(2+2*a-b-c-d) * GAMMA(2+2*a-b-c-d-e-f) / GAMMA(1+a) / GAMMA(1+a-e-f) / GAMMA(2+2*a-b-c-d-e) / GAMMA(2+2*a-b-c-d-f) * VHYP[1+2*a-b-c-d,[1+a-c-d,1+a-b-d,1+a-b-c,e,f],1]; end: `HYPERG/Transform7635`:=proc(shyp) local vhyp,a,l,b,c,d,e,f,z; vhyp := HYPERG[HypToVHyp](shyp); if not HYPERG[IsVHYP](vhyp) then ERROR(`Enable to apply T7635 with this series`,shyp); fi: a := op(1,vhyp); l := op(2,vhyp); b := op(1,l); c := op(2,l); d := op(3,l); e := op(4,l); f := op(5,l); z := op(3,vhyp); if `HYPERG/EvalPointEgalTo`(z,1)=false then ERROR(`Enable to apply T7635 with the evaluation point`,z); fi: GAMMA(1+a-c) * GAMMA(1+a-d) * GAMMA(1+a-e) * GAMMA(1+a-f) * GAMMA(3+3*a-2*b-c-d-e-f) * GAMMA(2+2*a-b-c-d-e-f) / GAMMA(1+a) / GAMMA(b) / GAMMA(2+2*a-b-d-e-f) / GAMMA(2+2*a-b-c-e-f) / GAMMA(2+2*a-b-c-d-f) / GAMMA(2+2*a-b-c-d-e) * VHYP[2+3*a-2*b-c-d-e-f,[1+a-b-c,1+a-b-d,1+a-b-e,1+a-b-f,2+2*a-b-c-d-e-f],1]; end: `HYPERG/Transform7636`:=proc(shyp) local vhyp,a,l,b,c,d,e,f,z; vhyp := HYPERG[HypToVHyp](shyp); if not HYPERG[IsVHYP](vhyp) then ERROR(`Enable to apply T7636 with this series`,shyp); fi: a := op(1,vhyp); l := op(2,vhyp); b := op(1,l); c := op(2,l); e := op(3,l); d := op(4,l); f := op(5,l); z := op(3,vhyp); if `HYPERG/EvalPointEgalTo`(z,1)=false then ERROR(`Enable to apply T7636 with the evaluation point`,z); fi: if `HYPERG/Egalite`(e=1/2+c)=false then ERROR(`Enable to apply T7636 with parameters`,c,e); fi: if `HYPERG/Egalite`(f=1/2+d)=false then ERROR(`Enable to apply T7636 with parameters`,d,f); fi: GAMMA(1+2*a-2*b) * GAMMA(1+2*a-2*c) * GAMMA(1+2*a-2*d) * GAMMA(1+2*a-b-2*c-2*d) / GAMMA(1+2*a) / GAMMA(1+2*a-2*b-2*c) / GAMMA(1+2*a-b-2*d) / GAMMA(1+2*a-2*c-2*d) * HYP[[2*c,b,1/2+a-2*d],[1+2*a-b-2*d,1/2+a],1]; end: `HYPERG/Transform7637`:=proc(shyp) local vhyp,a,l,b,c,d,e,f,z; vhyp := HYPERG[HypToVHyp](shyp); if not HYPERG[IsVHYP](vhyp) then ERROR(`Enable to apply T7637 with this series`,shyp); fi: a := op(1,vhyp); l := op(2,vhyp); b := op(1,l); e := op(2,l); c := op(3,l); d := op(4,l); f := op(5,l); z := op(3,vhyp); if `HYPERG/EvalPointEgalTo`(z,1)=false then ERROR(`Enable to apply T7637 with the evaluation point`,z); fi: if `HYPERG/Egalite`(e=1/2+b)=false then ERROR(`Enable to apply T7637 with parameters`,b,c); fi: if `HYPERG/Egalite`(f=1+2*a-2*b-c-d)=false then ERROR(`Enable to apply T7637 with parameters`,a,b,c,d,f); fi: GAMMA(1+a-2*b) * GAMMA(1+2*a-2*b) / GAMMA(1+a) / GAMMA(1+2*a-4*b) * HYP[[2*b,-a+2*b+c,-a+2*b+d,1+a-c-d],[1+a-c,1+a-d,-a+2*b+c+d],1]; end: `HYPERG/Transform7691`:=proc(shyp) local vhyp,a,l,b,c,d,e,f,z; vhyp := HYPERG[HypToVHyp](shyp); if not HYPERG[IsVHYP](vhyp) then ERROR(`Enable to apply T7691 with this series`,shyp); fi: a := op(1,vhyp); l := op(2,vhyp); b := op(1,l); c := op(2,l); d := op(3,l); e := op(4,l); f := op(5,l); z := op(3,vhyp); if `HYPERG/EvalPointEgalTo`(z,1)=false then ERROR(`Enable to apply T7691 with the evaluation point`,z); fi: GAMMA(1+a-d) * GAMMA(1+a-e) * GAMMA(1+a-f) * GAMMA(1+a-d-e-f) / GAMMA(1+a) / GAMMA(1+a-d-e) / GAMMA(1+a-d-f) / GAMMA(1+a-e-f) * HYP[[1+a-b-c,d,e,f],[1+a-b,1+a-c,-a+d+e+f],1] + GAMMA(1+a-b) * GAMMA(1+a-c) * GAMMA(1+a-d) * GAMMA(1+a-e) * GAMMA(1+a-f) * GAMMA(2+2*a-b-c-d-e-f) * GAMMA(-1-a+d+e+f) / GAMMA(1+a) / GAMMA(1+a-b-c) / GAMMA(d) / GAMMA(e) / GAMMA(f) / GAMMA(2+2*a-b-d-e-f) / GAMMA(2+2*a-c-d-e-f) * HYP[[1+a-d-e,1+a-d-f,1+a-e-f,2+2*a-b-c-d-e-f], [2+2*a-b-d-e-f,2+2*a-c-d-e-f,2+a-d-e-f],1]; end: `HYPERG/Transform7692`:=proc(shyp) local vhyp,a,l,b,c,d,e,f,z; vhyp := HYPERG[HypToVHyp](shyp); if not HYPERG[IsVHYP](vhyp) then ERROR(`Enable to apply T7692 with this series`,shyp); fi: a := op(1,vhyp); l := op(2,vhyp); b := op(1,l); c := op(2,l); d := op(3,l); e := op(4,l); f := op(5,l); z := op(3,vhyp); if `HYPERG/EvalPointEgalTo`(z,1)=false then ERROR(`Enable to apply T7692 with the evaluation point`,z); fi: - GAMMA(a-b) * GAMMA(1+a-c) * GAMMA(1+a-d) * GAMMA(1+a-e) * GAMMA(1+a-f) * GAMMA(-a+b+d) * GAMMA(-a+b+e) * GAMMA(-a+b+f) * GAMMA(-a+d+e+f) * GAMMA(a+1-d-e-f) * GAMMA(1-c) * GAMMA(1-a+2*b) / GAMMA(1+a) / GAMMA(-a+b) / GAMMA(1+b-c) / GAMMA(1+b-d) / GAMMA(1+b-e) / GAMMA(1+b-f) / GAMMA(d) / GAMMA(e) / GAMMA(f) / GAMMA(1+a-b-c) / GAMMA(-2*a+b+d+e+f) / GAMMA(1+2*a-b-d-e-f) * VHYP[-a+2*b,[b,-a+b+c,-a+b+d,-a+b+e,-a+b+f],1] + GAMMA(1+a-d) * GAMMA(1+a-e) * GAMMA(1+a-f) * GAMMA(1+a-d-e-f) * GAMMA(1-c) * GAMMA(1-c+e+f) * GAMMA(-a+b+e) * GAMMA(-a+b+f) / GAMMA(1+a) / GAMMA(1+a-d-e) / GAMMA(1+a-d-f) / GAMMA(1+a-e-f) / GAMMA(1-c+e) / GAMMA(1-c+f) / GAMMA(-a+b+e+f) * VHYP[-c+e+f,[1+a-b-c,1+a-c-d,-a+e+f,e,f],1]; end: `HYPERG/Transform7693`:=proc(shyp) local vhyp,a,l,b,c,d,e,f,z,A,B,C,D,E,F; vhyp := HYPERG[HypToVHyp](shyp); if not HYPERG[IsVHYP](vhyp) then ERROR(`Enable to apply T7693 with this series`,shyp); fi: A := op(1,vhyp); l := op(2,vhyp); B := op(1,l); C := op(2,l); D := op(3,l); E := op(4,l); F := op(5,l); z := op(3,vhyp); a := A/2; b := B-a; c := C-a; d := D-a; e := E-a; f := F-a; if `HYPERG/EvalPointEgalTo`(z,1)=false then ERROR(`Enable to apply T7693 with the evaluation point`,z); fi: - GAMMA(a-b) * GAMMA(1+2*b) * GAMMA(-b+c) * GAMMA(b+c) * GAMMA(1-a-d) * GAMMA(1+a-d) * GAMMA(1-a-e) * GAMMA(1+a-e) * GAMMA(1-a-f) * GAMMA(1+a-f) / GAMMA(1+2*a) / GAMMA(-a+b) / GAMMA(-a+c) / GAMMA(a+c) / GAMMA(1-b-d) / GAMMA(1+b-d) / GAMMA(1-b-e) / GAMMA(1+b-e) / GAMMA(1-b-f) / GAMMA(1+b-f) * VHYP[2*b,[a+b,b+c,b+d,b+e,b+f],1] - GAMMA(a-c) * GAMMA(b-c) * GAMMA(b+c) * GAMMA(1+2*c) * GAMMA(1-a-d) * GAMMA(1+a-d) * GAMMA(1-a-e) * GAMMA(1+a-e) * GAMMA(1-a-f) * GAMMA(1+a-f) / GAMMA(1+2*a) / GAMMA(-a+b) / GAMMA(a+b) / GAMMA(-a+c) / GAMMA(1-c-d) / GAMMA(1+c-d) / GAMMA(1-c-e) / GAMMA(1+c+e) / GAMMA(1-c-f) / GAMMA(1+c-f) * VHYP[2*c,[a+c,b+c,c+d,c+e,c+f],1]; end: `HYPERG/Transform7694`:=proc(shyp) local vhyp,a,l,b,c,d,e,f,z; vhyp := HYPERG[HypToVHyp](shyp); if not HYPERG[IsVHYP](vhyp) then ERROR(`Enable to apply T7694 with this series`,shyp); fi: a := op(1,vhyp); l := op(2,vhyp); b := op(1,l); c := op(2,l); d := op(3,l); e := op(4,l); f := op(5,l); z := op(3,vhyp); if `HYPERG/EvalPointEgalTo`(z,1)=false then ERROR(`Enable to apply T7694 with the evaluation point`,z); fi: GAMMA(1+a-b) * GAMMA(1-d) * GAMMA(1+a-e) * GAMMA(-a+c+e) * GAMMA(1+a-f) * GAMMA(1+a-b-e-f) * GAMMA(-a+c+f) * GAMMA(1-d+e+f) / GAMMA(1+a) / GAMMA(-a+c) / GAMMA(1+a-b-e) / GAMMA(1-d+e) / GAMMA(1+a-b-f) / GAMMA(1+a-e-f) / GAMMA(1-d+f) / GAMMA(-a+c+e+f) * VHYP[-d+e+f,[1+a-b-d,-a+e+f,1+a-c-d,e,f],1] + GAMMA(1+a-b) * GAMMA(1+a-c) * GAMMA(1-d) * GAMMA(1+a-d) * GAMMA(1+a-e) * GAMMA(-a+c+e) * GAMMA(1+a-f) * GAMMA(3+2*a-2*b-d-e-f) * GAMMA(2+2*a-b-c-d-e-f) * GAMMA(-a+c-f) * GAMMA(-1-a+b+e+f) / GAMMA(1+a) / GAMMA(b) / GAMMA(1-b+c) / GAMMA(1+a-c-d) / GAMMA(2+a-b-d-e) / GAMMA(e) / GAMMA(2+a-b-d-f) / GAMMA(2+2*a-b-c-e-f) / GAMMA(2+2*a-b-d-e-f) / GAMMA(f) / GAMMA(-1-2*a+b+c+e+f) * VHYP[2+2*a-2*b-d-e-f,[1+a-b-d,1-b,2+2*a-b-c-d-e-f,1+a-b-f,1+a-b-e],1]; end: ########## # File @(#) Transf87 (HYPERG PACKAGE) Mon Jun 15 09:18:06 METDST 1998 ########## # # `HYPERG/Transform8731`, `HYPERG/Transform8732`, # # BG150698 `HYPERG/Transform8731`:=proc(shyp) local vhyp,A,l,B,C,W,E,F,G,a,b,c,d,e,n,z; vhyp := HYPERG[HypToVHyp](shyp); if not HYPERG[IsVHYP](vhyp) then ERROR(`Enable to apply T8731 with this series`,shyp); fi: A := op(1,vhyp); l := op(2,vhyp); B := op(1,l); C := op(2,l); W := op(3,l); E := op(4,l); F := op(5,l); G := op(6,l); z := op(3,vhyp); if `HYPERG/EvalPointEgalTo`(z,-1)=false then ERROR(`Enable to apply T8731 with the evaluation point`,z); fi: n := -G; a := (A-n)/2; c := B; d := C; e := W; if `HYPERG/Egalite`(E=1/2+a+n)=false then ERROR(`Enable to apply T8731 with parameters`,a,n,E); fi: if `HYPERG/Egalite`(F=1+4*a-c-d-e+n)=false then ERROR(`Enable to apply T8732 with parameters`,a,c,d,e,n,F); fi: RF[1+2*a-c,n] * RF[1+2*a-d,n] * RF[1+2*a-e,n] * RF[1+2*a-c-d-e,n] / RF[1+2*a,n] / RF[1+2*a-c-d,n] / RF[1+2*a-c-e,n] / RF[1+2*a-d-e,n] * VHYP[a,[-n,c/2,1/2+c/2,d/2,1/2+d/2,e/2,1/2+e/2,1/2+2*a-c/2-d/2-e/2+n/2, 1+2*a-c/2-d/2-e/2+n/2],1]; end: `HYPERG/Transform8732`:=proc(shyp) local vhyp,A,l,B,C,W,E,F,G,a,c,d,e,n,z; vhyp := HYPERG[HypToVHyp](shyp); if not HYPERG[IsVHYP](vhyp) then ERROR(`Enable to apply T8732 with this series`,shyp); fi: A := op(1,vhyp); l := op(2,vhyp); B := op(1,l); C := op(2,l); W := op(3,l); E := op(4,l); F := op(5,l); G := op(6,l); z := op(3,vhyp); if `HYPERG/EvalPointEgalTo`(z,-1)=false then ERROR(`Enable to apply T8732 with the evaluation point`,z); fi: n := -G; c := C; d := W; e := E; a := (A+e)/2; if `HYPERG/Egalite`(B=1/2+a-e)=false then ERROR(`Enable to apply T8732 with parameters`,a,e,B); fi: if `HYPERG/Egalite`(F=1+4*a-c-d-e+n)=false then ERROR(`Enable to apply T8732 with parameters`,a,c,d,e,n,F); fi: RF[1+2*a-c,n] * RF[1+2*a-d,n] * RF[1+2*a-e,n] * RF[1+2*a-c-d-e,n] / RF[1+2*a,n] / RF[1+2*a-c-d,n] / RF[1+2*a-c-e,n] / RF[1+2*a-d-e,n] * VHYP[a,[e,c/2,1/2+c/2,d/2,1/2+d/2,1/2+2*a-c/2-d/2-e/2+n/2, 1+2*a-c/2-d/2-e/2+n/2,1/2-n/2,-n/2],1]; end: ########## # File @(#) VHYP (HYPERG PACKAGE) Tue Sep 16 18:19:16 METDST 1997 ########## # # HYPERG[VHypToHyp] # HYPERG[HypToVHyp] # `HYPERG/HypToVHyp/No` # # BG160997 BG240898 HYPERG[VHypToHyp] := proc(vhyp) local a,l,z,l1,l2,i; option `Copyright by Bruno Gauthier, IGM, Universite Marne-la-Vallee, France`; if not HYPERG[IsVHYP](vhyp) then ERROR(`Not a hypergeometric series in very-well poised order`,vhyp); fi: a := op(1,vhyp); l := op(2,vhyp); z := op(3,vhyp); l1 := [a,a/2+1]; l2 := [a/2]; for i from 1 to nops(l) do l1 := [ op(l1), op(i,l) ]; l2 := [ op(l2), 1+a-op(i,l) ]; od: HYP[l1,l2,z]; end: `HYPERG/HypToVHyp/No`:=proc(shyp) `HYPERG/Print`(`warning: not a Very-well poised hypergeometric series`); shyp; end: HYPERG[HypToVHyp] := proc(shyp) local l,z,l1,l2,i,a1,a2,b1,ss,hyporder; option `Copyright by Bruno Gauthier, IGM, Universite Marne-la-Vallee, France`; if not HYPERG[IsHYP](shyp) then ERROR(`Not a hypergeometric series in standard notation`,shyp); fi: hyporder := HYPERG[HypOrder](shyp); l1 := op(1,hyporder); l2 := op(2,hyporder); z := op(3,hyporder); if ( nops(l1) < 2 ) or ( nops(l1) <> nops(l2)+1 ) then RETURN(`HYPERG/HypToVHyp/No`(shyp)); fi: a1 := op(1,l1); a2 := op(2,l1); if ( a2 <> a1/2+1 ) then RETURN(`HYPERG/HypToVHyp/No`(shyp)); fi: b1 := op(1,l2); ss := normal(1+a1); for i from 2 to nops(l1) do if ( normal(op(i,l1)+op(i-1,l2)) <> ss ) then RETURN(`HYPERG/HypToVHyp/No`(shyp)); fi: od: l := subsop(1=NULL,2=NULL,l1); VHYP[a1,l,z]; end: ########## # File @(#) EvalQFun (HYPERG PACKAGE) Mon Sep 15 08:16:44 METDST 1997 ########## # # HYPERG[QHypEval] # `HYPERG/QHypEval/basic` # # HYPERG[QRfEval] # `HYPERG/QRfEval/basic` # # HYPERG[QBinEval] # `HYPERG/BinEval/basic` # # BG150997 BG031097 BG250598 BG020798 BG111298 BG310399 `HYPERG/QHypEval/basic`:=proc(sqhyp,k) local ssqhyp,l1,l2,q,z,summand,i; global `HYPERG/PrintBool`; `HYPERG/PrintBool` := false; ssqhyp := HYPERG[HypSimplify](sqhyp); `HYPERG/PrintBool` := true; l1 := op(1,ssqhyp); l2 := op(2,ssqhyp); q := op(3,ssqhyp); z := op(4,ssqhyp); if has(l1,0) or (z=0) then RETURN(1); fi: summand := convert( [seq(QRF[op(i,l1),q,k],i=1..nops(l1))],`*` ); summand := summand / convert( [seq(QRF[op(i,l2),q,k],i=1..nops(l2))],`*` ); summand := summand / QRF[q,q,k] * z^(k) * ( (-1)^k * q^(k*(k-1)/2) )^(1+nops(l2)-nops(l1)); Sum(summand,k=0..infinity); end: HYPERG[QHypEval] := proc() # this function evaluates q-hypergeometric series QHYP and WHYP local i, # loop variable expr, # any expression tsi, # index summation (by default: k) res; # final result option `Copyright by Bruno Gauthier, IGM, Universite Marne-la-Vallee, France`; if ( nargs > 2 ) then ERROR(`Wrong number of arguments`); fi: expr := args[1]; if ( nargs = 2 ) then tsi := args[2]; else tsi := k; #[default value] global variable fi: if ( not type(tsi,name) ) then ERROR(`Expecting a name as summation index`,tsi); fi: if ( type(expr,function) and ( op(0,expr)=Sum or op(0,expr)=sum ) ) then res := Sum(HYPERG[QHypEval](op(1,expr),tsi),op(2,expr)); elif type(expr,`*`) then res := convert([seq(HYPERG[QHypEval](op(i,expr),tsi),i=1..nops(expr))],`*`); elif type(expr,`+`) then res := convert([seq(HYPERG[QHypEval](op(i,expr),tsi),i=1..nops(expr))],`+`); elif type(expr,`^`) then res := HYPERG[QHypEval](op(1,expr),tsi)^(op(2,expr)); elif ( `HYPERG/IsQHYP`(expr) = true ) then res := `HYPERG/QHypEval/basic`(expr,tsi); elif ( `HYPERG/IsWHYP`(expr) = true ) then res := `HYPERG/QHypEval/basic`(HYPERG[WHypToQHyp](expr,tsi)); else RETURN (expr); fi; res; end: `HYPERG/QRfEval/basic`:=proc(qrf) local a,n,q; # i must be a global variable a := op(1,qrf); q := op(2,qrf); n := op(3,qrf); if ( type(n,numeric) and not type(n,integer) ) then ERROR(`q-Rising factorial: the second argument is not an integer`,n); fi: if type(n,integer) then if ( n=0 ) then RETURN(1); elif ( n>0 ) then RETURN(product(1-a*q^i,i=0..n-1)); else RETURN(1/product(1-a*q^(-i),i=1..-n)); fi: else if ( a=1 ) then RETURN(qrf); #nothing to return else RETURN(product(1-a*q^i,i=0..n-1)); # qGAMMA ## page 16 GasperRahman fi: fi: end: HYPERG[QRfEval] := proc(expr) # this function evaluates q-rising factorials RF local i,res; option `Copyright by Bruno Gauthier, IGM, Universite Marne-la-Vallee, France`; if ( nargs <> 1 ) then ERROR(`Expecting only one argument`); elif ( type(expr,function) and ( op(0,expr)=Sum or op(0,expr)=sum ) ) then res := Sum(HYPERG[QRfEval](op(1,expr)),op(2,expr)); elif type(expr,`*`) then res := convert([seq(HYPERG[QRfEval](op(i,expr)),i=1..nops(expr))],`*`); elif type(expr,`+`) then res := convert([seq(HYPERG[QRfEval](op(i,expr)),i=1..nops(expr))],`+`); elif type(expr,`^`) then res := HYPERG[QRfEval](op(1,expr))^(op(2,expr)); elif ( `HYPERG/IsQRF`(expr) = true ) then res := `HYPERG/QRfEval/basic`(expr); else RETURN (expr); fi: res; end: `HYPERG/QBinEval/basic`:=proc(qrf) local n,m,q; # i must be a global variable n := op(1,qrf); m := op(2,qrf); q := op(3,qrf); if ( type(m,`numeric`) and type(m,`integer`) and (m<0) ) then RETURN(0); fi: if ( type(n,`integer`) and type(m,`integer`) and (n 1 ) then ERROR(`Expecting only one argument`); elif ( type(expr,function) and ( op(0,expr)=Sum or op(0,expr)=sum ) ) then res := Sum(HYPERG[QBinEval](op(1,expr)),op(2,expr)); elif type(expr,`*`) then res := convert([seq(HYPERG[QBinEval](op(i,expr)),i=1..nops(expr))],`*`); elif type(expr,`+`) then res := convert([seq(HYPERG[QBinEval](op(i,expr)),i=1..nops(expr))],`+`); elif type(expr,`^`) then res := HYPERG[QBinEval](op(1,expr))^(op(2,expr)); elif ( `HYPERG/IsQBIN`(expr) = true ) then res := `HYPERG/QBinEval/basic`(expr); else RETURN (expr); fi: res; end: ########## # File @(#) GenQRec (HYPERG PACKAGE) Fri Sep 18 08:09:22 METDST 1998 ########## # # HYPERG[GenQRec] # # BG190997 BG110298 BG280498 HYPERG[GenQRec] := proc() # INPUT : <-- solutions : set of solutions {s1,s2,...,sp} # <-- yn : suite [y(n)] # OUTPUT : --> rec : q-recurrence lineaire a coefficients polynomiaux # dont s1, s2, ..., et sp sont des solutions local yn, solutions, rec, yy, nn, in_mat, i, k, MAT, dim, d; # Casoratian determinant option `Copyright by Bruno Gauthier, IGM, Universite Marne-la-Vallee, France`; if (nargs<>2) then ERROR(`Expecting two arguments`); fi: solutions := args[1]; if ( not type(solutions,set) ) then ERROR(solutions,`is not a set`); fi: solutions := [ op(solutions) ]; solutions := map(HYPERG[QRfEval],solutions); yn := args[2]; if ( not type(yn,function) ) then ERROR(yn,`is not a sequence`); fi: yy := op(0,yn); nn := op(1,yn); in_mat := [ yn, op(solutions) ]; dim := nops(in_mat); MAT := linalg[matrix](dim,dim,[in_mat, seq(map((argu,qs,dec)->subs(qs=qs*q^dec,argu), in_mat,nn,k), k=1..dim-1)]); d := linalg[det](MAT); d := normal(expand(d/convert(solutions,`*`))); # si la simplification n'est pas complete, on ne conserve que le numerateur d := numer(d); for i from 0 to dim-1 do d := collect(d,yy(nn*q^i)); od: d=0; end: ########## # File @(#) QHypOrder (HYPERG PACKAGE) Mon Sep 29 18:09:36 METDST 1997 ########## # # HYPERG[QHypOrder] # # BG160997 HYPERG[QHypOrder] := proc(arg) local l1,l2,base,z,l1foisq,DeuxADeux,intsec,intsecmult, newl1,newl2,oldl1,oldl2, i,j,var1,var2,maxi,maxel,posx,retour,compteur,tmp; option `Copyright by Bruno Gauthier, IGM, Universite Marne-la-Vallee, France`; if ( not IsQHYP(arg) ) then RETURN(arg): fi: l1 := op(1,arg); l2 := op(2,arg); base := op(3,arg); z := op(4,arg); if ( nops(l1) <> nops(l2)+1 ) then RETURN(arg); fi; l1foisq:= [ seq( op(i,l1)*base,i=1..nops(l1) ) ]; DeuxADeux := []: for i from 1 to nops(l1) do for j from 1 to nops(l2) do DeuxADeux := [ op(DeuxADeux), op(i,l1)*op(j,l2) ]: od: od: # intersection entre l1foisq et DeuxADeux intsec := `HYPERG/ListeInter`(DeuxADeux,l1foisq); # Suppression des elements "0" de intsec #intsec := `HYPERG/Complement`(intsec,0); if ( intsec = [] ) then RETURN (arg); fi: # idem (avec multiplicite des elements) intsecmult := []; compteur := 1; for i from 1 to nops(intsec) do var1 := op(i,intsec); var2 := 0; for j from 1 to nops(DeuxADeux) do if ( op(j,DeuxADeux) = var1 ) then var2 := var2+1; fi: od: intsecmult := [ op(intsecmult), [var1,var2] ]; od: # recherche de l'element de intsecmult qui possede une multiplicite maxi maxi := 0; for i from 1 to nops(intsecmult) do if ( op(2,op(i,intsecmult)) > maxi ) then maxi := op(2,op(i,intsecmult)); maxel := op(1,op(i,intsecmult)); fi: od: # on essaye d'ordonner les parametres t.q. "well" poised # construction des futurs listes de parametres newl1 := [maxel/base]; newl2 := []; # destruction des anciennes listes de parametres member(maxel/base,l1,'posx'); oldl1 := subsop(posx=NULL,l1); oldl2 := l2; # on essaye d'ordonner les parametres t.q. "very"-well poised retour := `HYPERG/HypOrder/Elementary`(oldl1,oldl2,newl1,newl2, base*sqrt(maxel/base),sqrt(maxel/base)); oldl1 := op(1,retour); oldl2 := op(2,retour); newl1 := op(3,retour); newl2 := op(4,retour); retour := `HYPERG/HypOrder/Elementary`(oldl1,oldl2,newl1,newl2, -base*sqrt(maxel/base),-sqrt(maxel/base)); oldl1 := op(1,retour); oldl2 := op(2,retour); newl1 := op(3,retour); newl2 := op(4,retour); DeuxADeux := oldl1; for i from 1 to nops(DeuxADeux) do retour := `HYPERG/HypOrder/Elementary`(oldl1,oldl2,newl1,newl2, op(i,DeuxADeux),maxel/op(i,DeuxADeux)); oldl1 := op(1,retour); oldl2 := op(2,retour); newl1 := op(3,retour); newl2 := op(4,retour); od: # s'il reste des elements dans oldl[1|2], la serie n'est pas well-poised, # on ajoute les elements restants newl1 := [ op(newl1), op(oldl1) ]; newl2 := [ op(newl2), op(oldl2) ]; if ( op(2,newl1)=base*sqrt(maxel/base) and op(2,newl1) = base*op(1,newl2) ) then compteur := compteur+1; fi: if ( op(3,newl1)=-base*sqrt(maxel/base) and op(3,newl1) = base*op(2,newl2) ) then compteur := compteur+1; fi: i := compteur+1; while ( i < nops(newl1) ) do tmp := simplify(op(i,newl1)); if ( type(tmp,`^`) and op(1,tmp)=base ) then newl1 := [ op(subsop(i=NULL,newl1)), tmp ]; if ( nops(newl2) <> 0 ) then j := max(1,min(nops(l2),i-1)); tmp := op(j,newl2); newl2 := [ op(subsop(j=NULL,newl2)), tmp ]; fi: i := i+nops(newl1); fi: i := i+1; od: QHYP[newl1,newl2,base,z]; end: ########## # File @(#) QHypType (HYPERG PACKAGE) Wed Sep 9 08:47:00 METDST 1998 ########## # # HYPERG[QHypType] # # BG090998 HYPERG[QHypType] := proc(arg) local w, # ToWHyp n1,n2,l1,l2, # description of the hypergeometric q-series i,p,l,c,r; global `HYPERG/PrintBool`; option `Copyright by Bruno Gauthier, IGM, Universite Marne-la-Vallee, France`; `HYPERG/PrintBool` := false; if ( HYPERG[IsWHYP](arg) ) then # very-well-poised print(`Very-well poised hypergeometric q-series`); elif ( HYPERG[IsQHYP](arg) ) then w := HYPERG[QHypToWHyp](arg); if ( HYPERG[IsWHYP](w) ) then # very-well-poised print(`Very-well poised hypergeometric q-series`); else w := HYPERG[QHypOrder](arg); l1 := op(1,w); l2 := op(2,w); n1 := nops(l1); n2 := nops(l2); if ( n1=2 and n2=1 ) then if ( q*op(1,l1) = op(2,l1)*op(1,l2) ) then print(`Well-poised hypergeometric q-series`); else print(`Ordinary hypergeometric q-series`); fi: elif ( n1<3 or n1<>n2+1 ) then print(`Ordinary hypergeometric q-series`); else # well-poised # nearly-poised first kind # nearly-poised second kind l := true; c := true; r := true; p := op(2,l1)*op(1,l2); for i from 3 to n1-1 do if ( op(i,l1)*op(i-1,l2)<>p ) then c := false; fi: od: if ( q*op(1,l1) <> p ) then l := false; fi: if ( op(n1,l1)*op(n2,l2) <> p ) then r := false; fi: if ( l and c and r ) then # well-poised print(`Well-poised hypergeometric q-series`); elif ( l and c ) then # nearly-poised of the first kind print(`Nearly-poised (first kind) hypergeometric q-series`); elif ( c and r ) then # nearly-poised of the second kind print(`Nearly-poised (second kind) hypergeometric q-series`); else # ordinary hypergeometric q-series print(`Ordinary hypergeometric q-series`); fi: fi: fi: else print(`Not a hypergeometric q-series`); fi: `HYPERG/PrintBool` := true; RETURN(NULL); end: ########## # File @(#) HypSolQRec (HYPERG PACKAGE) Wed Sep 16 18:09:27 METDST 1998 ########## # # HYPERG[HypSolQRec] # `HYPERG/Q_MonicFactor` # # BG110997 BG051197 `HYPERG/Q_MonicFactor` := proc(expr,nn) # INPUT : <-- expr : expression # <-- nn : variable de "expr" # OUTPUT : --> res : liste contenant les facteurs moniques de "expr" local exprf, # expression initiale factorisee liste, # liste contenant initiallement les differents facteurs # de "exprf", res, # liste construite pendant le deroulement de la fonction, # contenant finalement tous les facteurs moniques de "exprf" ret, # idem, mais avec toutes les combinaisons possibles # de produit entre chaque facteur monique top, # degree de "exprf" tmp, # facteur de "exprf" (tmp = exprf^p) t, # terme de "exprf" p, # puissance de "tmp" c, # coefficient de tete d'un facteur i,j; # variables de boucle top := degree(expand(expr),nn); exprf := subs(q=q^top,expr); exprf := factor(exprf); res := []; if ( type(exprf,`*`) ) then liste := [op(exprf)]; else liste := [exprf]; fi: for i from 1 to nops(liste) do tmp := op(i,liste); if ( indets(tmp) intersect {nn} <> {} ) then if ( type(tmp,`^`) ) then t := op(1,tmp); p := op(2,tmp); else t := tmp; p := 1; fi: c := coeff(t,nn,degree(t,nn)); for j from 1 to p do res := [(t/c)^j, op(res)]; od: fi: od: #MAPLEVR2+ #MAPLEVR2+ res := combinat[choose](res); #MAPLEVR2+ ret := []; for i from 1 to nops(res) do ret := [op(ret),convert(op(i,res),`*`)]; od: if ( top <> 0 ) then ret := map(proc(x,top) subs(q=q^(1/top),x) end, ret, top); fi: RETURN(ret); end: HYPERG[HypSolQRec] := proc(eq,suite) # INPUT : <-- eq : equation de q-recurrence a coefficients polynomiaux # <-- suite : suite verifiant la q-recurrence [U(n)] # OUTPUT : --> solution rationnelle de "eq" local neq, # equation de q-recurrence qsolutions, new, nh, # terme de l'eq. de q-recurrence ne faisant pas # intervenir de U(n*q^i) [=0 si l'eq. est homogene] nn, # variable de l'equation de q-recurrence ordre, # ordre de la q-recurrence CO, # tableau CO[i]... coefficients de U(n*q^i) l1,l2, # facteurs moniques de a0 et de ak(n*q^(1-k)) mini,maxi, # variables utilisees pour determiner "ordre" dec, li, # liste des indets de l'eq [n,U(n),...,U(n*q^i),...] i,j,k,x,y,z, # variables de boucle indice, A,B, # facteurs moniques respectifs # de CO[0](nn) et CO[k](nn*q^(1-k)) M, # tableau M[i]... ALPHA, # tableau ALPHA[i]... pp, # degre max. des Mi(nn) eqz,zz, sol,zsol, eqc,C,solC, vari; option `Copyright by Bruno Gauthier, IGM, Universite Marne-la-Vallee, France`; if ( not type(suite,function) ) then ERROR(suite,`is not a sequence`); fi: qsolutions := {}; if type(eq,`=`) then neq := op(1,eq)-op(2,eq); else neq := eq; fi: nn := op(1,suite); neq := expand(neq); #decalage a l'origine de la q-recurrence (calcul des bornes) mini := infinity; maxi := -infinity; nn := op(1,suite); li := [op(indets(neq))]; # mise a jour for i from 1 to nops(li) do vari := op(i,li); if `HYPERG/IsSeq`(vari,suite) then dec := degree(op(1,vari)/nn); mini := `HYPERG/Mymin`(mini,dec); maxi := `HYPERG/Mymax`(maxi,dec); fi: od: # "decalage" de la q-recurrence en 0 ordre:=maxi-mini; neq := subs(nn=nn/q^mini,neq); li := [op(indets(neq))]; # re-mise a jour nh := neq; CO := array[0..ordre]; for i from 0 to ordre do CO[i] := 0; od; for i from 1 to nops(li) do vari := op(i,li); if `HYPERG/IsSeq`(vari,suite) then indice := degree(op(1,vari)/nn,q); CO[indice] := CO[indice] + coeff(neq,vari); nh := nh - coeff(neq,vari)*vari; fi: od: nh := simplify(nh); if ( nh <> 0 ) then ERROR(`Not homogeneous recurrence equation`); fi: l1:=`HYPERG/Q_MonicFactor`(CO[0],nn); l2:=`HYPERG/Q_MonicFactor`(subs(nn=nn*q^(1-ordre),CO[ordre]),nn); M := array[0..ordre]; ALPHA := array[0..ordre]; # pour tous les couples (A,B) # de facteurs moniques (A,B) de CO[0] et CO[k](n*q^(-k+1)) # faire for x from 1 to nops(l1) do for y from 1 to nops(l2) do A := op(x,l1); B := op(y,l2); # on determine les valeurs de M[i] i=0..ordre for i from 0 to ordre do M[i] := expand( CO[i] * product(subs(nn=nn*q^z,A),z=0..i-1) * product(subs(nn=nn*q^z,B),z=i..ordre-1) ); od: # on determine pp pp := -1; for i from 0 to ordre do pp := max ( degree(M[i],nn),pp ); od: # on determine les valeurs de ALPHA[i] i=0..ordre for i from 0 to ordre do ALPHA[i] := coeff(expand(M[i]),nn,pp); od: # construction de l'eq. \sum_i ALPHA[i] z^i = 0 eqz := 0; for i from 0 to ordre do eqz := eqz + ALPHA[i] * zz^i; od: sol := [op({solve(eqz,zz)})]; for j from 1 to nops(sol) do zsol := op(j,sol); eqc := M[0]*C(nn); for i from 1 to ordre do eqc := eqc + zsol^i*M[i]*C(nn*q^i); od: #on passe en notation classique (non exponentielle) solC := traperror( HYPERG[PolySolQRec](eqc=0,C(nn)) ); #on repasse en notation exponentielle #solC := subs(q^nn=nn,solC); if ( solC <> lasterror ) and ( solC <> 0 ) then new := zsol*A/B*subs(nn=nn*q,solC)/solC; qsolutions := qsolutions union {simplify(new)}; fi: od: od: od: #qsolutions := subs(nn=q^nn,qsolutions); RETURN(qsolutions); end: ########## # File @(#) IsQBIN (HYPERG PACKAGE) Thu Jul 2 17:16:20 METDST 1998 ########## # # HYPERG[IsQBIN] # `HYPERG/IsQBIN` # # BG020798 `HYPERG/IsQBIN`:=proc(qrf) local a,b,base; if ( ( nargs <> 1 ) or not ( type(qrf,indexed) ) or ( op(0,qrf) <> QBIN ) ) then RETURN(false); fi: if ( nops(qrf) <> 3 ) then RETURN(false); else a := op(1,qrf); b := op(2,qrf); base := op(3,qrf); fi: RETURN(true); end: HYPERG[IsQBIN] := proc() option `Copyright by Bruno Gauthier, IGM, Universite Marne-la-Vallee, France`; `HYPERG/IsQBIN`(args); end: ########## # File @(#) IsQHYP (HYPERG PACKAGE) Mon Sep 15 08:16:44 METDST 1997 ########## # # HYPERG[IsQHYP] # `HYPERG/IsQHYP` # # BG150997 `HYPERG/IsQHYP` := proc(qhyp) local l1,l2,q,z,i,r; if ( ( nargs <> 1 ) or not ( type(qhyp,indexed) ) or ( op(0,qhyp) <> QHYP ) ) then RETURN(false); fi: if ( nops(qhyp) <> 4 ) then RETURN(false); else l1 := op(1,qhyp); l2 := op(2,qhyp); q := op(3,qhyp); z := op(4,qhyp); if not ( type(l1,list) and type(l2,list) ) then RETURN(false); fi: if ( type(q,list) or type(q,set) ) then RETURN(false); fi: if ( type(z,list) or type(z,set) ) then RETURN(false); fi: r := map( proc(x) if ( type(x,'numeric') and x = 1 ) then true fi end, l2 ); if ( has(r,true) ) then `HYPERG/Print`(`warning QHYP: denominator values must be different of 1`); fi; fi: RETURN(true); end: HYPERG[IsQHYP] := proc() option `Copyright by Bruno Gauthier, IGM, Universite Marne-la-Vallee, France`; `HYPERG/IsQHYP`(args); end: ########## # File @(#) IsQRF (HYPERG PACKAGE) Mon Sep 15 08:16:44 METDST 1997 ########## # # HYPERG[IsQRF] # `HYPERG/IsQRF` # # BG150997 BG111298 `HYPERG/IsQRF`:=proc(qrf) local a,b,base; if ( ( nargs <> 1 ) or not ( type(qrf,indexed) ) or ( op(0,qrf) <> QRF ) ) then RETURN(false); fi: if ( nops(qrf) <> 3 ) then RETURN(false); else a := op(1,qrf); base := op(2,qrf); b := op(3,qrf); fi: RETURN(true); end: HYPERG[IsQRF] := proc() option `Copyright by Bruno Gauthier, IGM, Universite Marne-la-Vallee, France`; `HYPERG/IsQRF`(args); end: ########## # File @(#) PolySolQRec (HYPERG PACKAGE) Mon Sep 14 18:13:26 METDST 1998 ########## # # HYPERG[PolySolQRec] # `HYPERG/QFact` # # BG100997 BG051197 BG080798 BG120399 `HYPERG/QFact` := proc(k) local i; product(1-q^i,i=1..k); end: HYPERG[PolySolQRec] := proc() # INPUT : <-- eq : equation de q-recurrence a coefficients polynomiaux # (equation homogene ou non) # <-- suite : suite verifiant la q-recurrence [U(n)] # OUTPUT : --> solution polynomiale de "eq" local eq, # equation [initiale] de q-recurrence suite, # suite verifiant la q-recurrence neq, # equation de q-recurrence pp, # variables de l'equation de q-recurrence (pp=q^nn) nh, # terme de l'eq. de q-recurrence ne faisant pas intervenir # de U(n*q^i) [=0 si l'eq. est homogene] mini, # k t.q. U(n*q^k) avec k minimal maxi, # k t.q. U(n*q^k) avec k maximal dec, vari, ordre, # ordre de la q-recurrence (maxi-mini) CO, # tableau CO[i]... coefficients de U(n*q^i) QQ, # tableau QQ[j]... # t.q. QQ[j] = Sum(q_binomial(k,j)*CO[k],k=j..ordre) indice, bb, # max(deg(QQ[i])) pour i allant de 0 a ordre aa,yy, # aa(yy) : (polynome) coefficient du terme de tete resol, # racines du polynome aa(yy) nb_rac, dd, # maximum des racines entieres du polynome aa(yy) soldeg, # degre du polynome solution de la recurrence [borne sup.] psol, # forme generique de la sol. poly. de l'eq. de q-recurrence li, # liste des indets de l'eq [n,U(n),...,U(n*q^i),...] ensemble, # ensemble des indeterminees {_x0,_x1,...} de la sol. poly. rempl, # eq. de q-recurrence utilisee pour determiner # les indeterminees de la solution polynomiale psol ret, # variable utilisee pour determiner psol i,j; # variables de boucle option `Copyright by Bruno Gauthier, IGM, Universite Marne-la-Vallee, France`; if (nargs<>2) then ERROR(`Expecting two arguments`); fi: eq := args[1]; suite := args[2]; if ( not type(suite,function) ) then ERROR(suite,`is not a sequence`); fi: if type(eq,`=`) then neq := op(1,eq)-op(2,eq); else neq := eq; fi: pp := op(1,suite); neq := expand(neq); #on considere que l'eq est sous la forme: Sum_i a[i] * U(q^i * x) = b(n,x) #decalage a l'origine de la q-recurrence (calcul des bornes) mini := infinity; maxi := -infinity; li := [op(indets(neq))]; # mise a jour for i from 1 to nops(li) do vari := op(i,li); if `HYPERG/IsSeq`(vari,suite) then dec := `HYPERG/MyDegree`(op(1,vari)/pp,q); mini := `HYPERG/Mymin`(mini,dec); maxi := `HYPERG/Mymax`(maxi,dec); fi: od: # "decalage" de la q-recurrence en 0 ordre:=maxi-mini; neq := subs(pp=pp/q^mini,neq); li := [op(indets(neq))]; # re-mise a jour nh := neq; CO := array[0..ordre]; for i from 0 to ordre do CO[i] := 0; od; for i from 1 to nops(li) do vari := op(i,li); if `HYPERG/IsSeq`(vari,suite) then indice := `HYPERG/MyDegree`(op(1,vari)/pp,q); CO[indice] := CO[indice] + coeff(neq,vari); nh := nh - coeff(neq,vari)*vari; fi: od: nh := simplify(nh); bb := 0; # on determine "bb" for j from 0 to ordre do QQ[j] := expand(sum( `HYPERG/QFact`(k) / `HYPERG/QFact`(j) / `HYPERG/QFact`(k-j) * CO[k], k=j..ordre)); bb := max(bb,`HYPERG/MyDegree`(QQ[j],pp)); od: aa := 0; # on determine "aa(yy)" for j from 0 to ordre do if ( `HYPERG/MyDegree`(QQ[j],pp) = bb ) then aa := aa + lcoeff(expand(QQ[j]),pp) * q^(j*(j-1)/2) * (-1)^j * product(1-q^(yy-j+1+k),k=0..j-1); fi: od: resol := map(simplify,[solve(aa=0,yy)]); # solutions de aa(yy)=0 nb_rac := nops(resol); # on supprime toutes les racines non entieres i := 1; while ( i <= nb_rac ) do if ( not type(op(i,resol),integer) and (op(i,resol)<>yy) ) then resol := subsop(i=NULL,resol); nb_rac := nb_rac-1; else i := i+1; fi: od: resol := op(resol); if ( resol = NULL ) then dd := -infinity; else dd := max(resol); fi: soldeg := max(0,`HYPERG/MyDegree`(expand(nh),pp)-bb,-bb-1,dd); `HYPERG/Verbose/Print`(1,`\n Degree bound of polynomial solutions: %d\n`,soldeg); #print(`degre de la solution`,soldeg); # solution d'ordre "soldeg" # _x.soldeg * n^(soldeg) + _x.(soldeg-1)*n^(soldeg-1) + ... # + ... + _x2*n^2 + _x1*n + _x0 psol := convert( [seq((_x.i)*pp^i,i=0..soldeg)], `+` ); # on insere cette solution dans l'eq. # (en pratique, on reconstruit une nouvelle equation) : rempl rempl := 0; for i from 0 to ordre do rempl := rempl + CO[i]*subs(pp=pp*q^i,psol); od: rempl := simplify(rempl+nh); if ( rempl = 0 ) then RETURN(psol); fi: ensemble := { seq(_x.i,i=0..soldeg) }; # on determine les coefficients _x.i ( i=0..(soldeg) ) ret:=solve(identity(rempl=0,pp),ensemble); if ( ret = NULL ) then ERROR(`No solution`); fi: # et on reinjecte les valeurs des _x.i dans la solution generale for i from 1 to nops(ret) do psol := subs( op(1,op(i,ret))=op(2,op(i,ret)),psol ); od: RETURN(psol); end: ########## # File @(#) RatioSolQRec (HYPERG PACKAGE) Tue Sep 15 18:02:17 METDST 1998 ########## # # HYPERG[RatioSolQRec] # `HYPERG/Q_Abramov` # # BG110997 BG051197 `HYPERG/Q_Abramov` := proc(a0,ak,ordre,nn) # INPUT : <-- a0 : terme de tete de la q-recurrence : a_0(n) # <-- ak : terme de queue de la q-recurrence : a_k(n) # <-- ordre : ordre de la q-recurrence : k # <-- nn : variable de l'eq. de q-recurrence : n # OUTPUT : --> denominateur de la solution de l'eq. de q-recurrence local A,B, # ak(n*q^ordre) et a0(n) UU, # denominateur de la solution rationnelle racines,nb_rac, # racines du resultant NN, # plus grande racine entiere positive du resultant D, # pgcd i,j; # variables de boucle UU := 1; A := subs(nn=nn*q^(-ordre),ak); B := a0; racines := [solve(resultant(A,subs(nn=nn*q^p,B),nn),p)]; nb_rac := nops(racines); i := 1; # on supprime toutes les racines non entieres while ( i <= nb_rac ) do if ( not type(op(i,racines),integer) ) then racines := subsop(i=NULL,racines); nb_rac := nb_rac-1; else i := i+1; fi: od: if ( nops(racines) = 0 ) then RETURN(UU); # retour 1 else NN := max(op(racines)); fi: for i from NN by -1 to 0 #for i from 0 to NN do D := gcd(expand(A),expand(subs(nn=nn*q^i,B))); A := simplify(A/D); B := simplify(B/subs(nn=nn*q^(-i),D)); for j from 0 to i do UU := UU * subs(nn=nn*q^(-j),D); od od: RETURN(UU); end: HYPERG[RatioSolQRec] := proc(eq,suite) # INPUT : <-- eq : equation de q-recurrence a coefficients polynomiaux # <-- suite : suite verifiant la q-recurrence [U(n)] # OUTPUT : --> solution rationnelle de "eq" local numsol,densol, # numerateur et denominateur de la solution neq, # equation de q-recurrence nh, # terme de l'eq. de q-recurrence ne faisant pas # intervenir de U(n*q^i) [=0 si l'eq. est homogene] nn, # variable de l'equation de q-recurrence ordre, # ordre de la q-recurrence a0,ak, # coefficients de U(n) et de U(n*q^ordre) mini,maxi, # variables utilisees pour determiner c_mini,c_maxi, # les variables a0 et ak li, # liste des indets de l'eq [n,U(n),...,U(n*q^i),...] polypoly, # eq. de q-recurrence dont on cherche une sol. poly. polyeq, polynum,polyden, i, # variable de boucle vari,dec,coef; option `Copyright by Bruno Gauthier, IGM, Universite Marne-la-Vallee, France`; if type(eq,`=`) then neq := op(1,eq)-op(2,eq); else neq := eq; fi: if ( not type(suite,function) ) then ERROR(suite,`is not a sequence`); fi: nn := op(1,suite); neq := expand(neq); li := [op(indets(neq))]; #decalage a l'origine de la q-recurrence (calcul des bornes) mini := INFINITY; maxi := -INFINITY; li := [op(indets(neq))]; # mise a jour for i from 1 to nops(li) do vari := op(i,li); if `HYPERG/IsSeq`(vari,suite) then dec := degree(op(1,vari)/nn,q); if ( dec < mini ) then mini := dec; c_mini := coeff(neq,vari); fi: if ( dec > maxi ) then maxi := dec; c_maxi := coeff(neq,vari); fi: fi: od: ordre := maxi-mini; a0 := c_mini; ak := c_maxi; densol := `HYPERG/Q_Abramov`(a0,ak,ordre,nn); densol := subs(nn=nn/q^mini,densol); #decalage #densol := nn * subs(nn=nn/q^mini,densol); #decalage polyeq := 0; nh := neq; for i from 1 to nops(li) do vari := op(i,li); if `HYPERG/IsSeq`(vari,suite) then coef := coeff(neq,vari); polyeq := polyeq + vari * coef / subs(nn=op(1,vari),densol); nh := nh - coef * vari; fi: od: nh := simplify(nh); polyeq := simplify(polyeq); polyden := denom(polyeq); polynum := numer(polyeq); polypoly := polynum+(nh*polyden); numsol := traperror(HYPERG[PolySolQRec](polypoly=0,suite)); if (numsol=lasterror) then ERROR(`No rational solution`); fi: RETURN(numsol/densol); end: ########## # File @(#) IsWHYP (HYPERG PACKAGE) Tue Sep 16 18:19:16 METDST 1997 ########## # # HYPERG[IsWHYP] # `HYPERG/IsWHYP` # # BG120198 BG250299 `HYPERG/IsWHYP` := proc(whyp) local a,l,z,l1,l2,i,r; if ( ( nargs <> 1 ) or not ( type(whyp,indexed) ) or ( op(0,whyp) <> WHYP ) ) then RETURN(false); fi: if ( nops(whyp) <> 4 ) then RETURN(false); else a := op(1,whyp); l := op(2,whyp); z := op(3,whyp); if type(a,list) then RETURN(false); fi: if not type(l,list) then RETURN(false); fi: if ( type(z,list) or type(z,set) ) then RETURN(false); fi: l1 := [a,q*sqrt(a),-q*sqrt(a)]; l2 := [sqrt(a),-sqrt(a)]; for i from 1 to nops(l) do l1 := [ op(l1), op(i,l) ]; l2 := [ op(l2), q*a/op(i,l) ]; od: r := map( proc(x) if ( type(x,'numeric') and x = 1 ) then true fi end, l2 ); if ( has(r,true) ) then `HYPERG/Print`(`warning WHYP: denominator values must be different of 1`); # and different of q^foo .... fi; fi: RETURN(true); end: HYPERG[IsWHYP] := proc() option `Copyright by Bruno Gauthier, IGM, Universite Marne-la-Vallee, France`; `HYPERG/IsWHYP`(args); end: ########## # File @(#) WHYP (HYPERG PACKAGE) Tue Sep 16 18:19:16 METDST 1997 ########## # # HYPERG[WHypToQHyp] # HYPERG[QHypToWHyp] # `HYPERG/QHypToWHyp/No` # # BG120198 BG240898 BG090998 HYPERG[WHypToQHyp] := proc(whyp) local a,l,q,z,l1,l2,i; option `Copyright by Bruno Gauthier, IGM, Universite Marne-la-Vallee, France`; if not IsWHYP(whyp) then ERROR(`Not a q-hypergeometric series in very-well poised order`,whyp); fi: a := op(1,whyp); l := op(2,whyp); q := op(3,whyp); z := op(4,whyp); l1 := [a,q*sqrt(a),-q*sqrt(a)]; l2 := [sqrt(a),-sqrt(a)]; for i from 1 to nops(l) do l1 := [ op(l1), op(i,l) ]; l2 := [ op(l2), normal(q*a/op(i,l)) ]; od: QHYP[l1,l2,q,z]; end: `HYPERG/QHypToWHyp/No`:=proc(sqhyp) `HYPERG/Print`(`warning: not a very-Well poised q-hypergeometric series`); sqhyp; end: HYPERG[QHypToWHyp] := proc(sqhyp) local l,q,z,l1,l2,i,a1,a2,a3,b1,ss,qhyporder; option `Copyright by Bruno Gauthier, IGM, Universite Marne-la-Vallee, France`; if not IsQHYP(sqhyp) then ERROR(`Not a q-hypergeometric series in standard notation`,sqhyp); fi: qhyporder := HYPERG[QHypOrder](sqhyp); l1 := op(1,qhyporder); l2 := op(2,qhyporder); q := op(3,qhyporder); z := op(4,qhyporder); if ( nops(l1) < 3 ) or ( nops(l1) <> nops(l2)+1 ) then RETURN(`HYPERG/QHypToWHyp/No`(sqhyp)); fi: a1 := op(1,l1); a2 := op(2,l1); a3 := op(3,l1); if ( a2 <> q*sqrt(a1) ) or ( a3 <> -q*sqrt(a1) ) then RETURN(`HYPERG/QHypToWHyp/No`(sqhyp)); fi: b1 := op(1,l2); ss := normal(q*a1); for i from 2 to nops(l1) do if ( normal(expand(op(i,l1)*op(i-1,l2))) <> ss ) then RETURN(`HYPERG/QHypToWHyp/No`(sqhyp)); fi: od: l := subsop(1=NULL,2=NULL,3=NULL,l1); WHYP[a1,l,q,z]; end: ########## # File @(#) HYPERG (HYPERG PACKAGE) Wed Jul 9 08:12:51 METDST 1997 ########## `help/text/HYPERG` := TEXT( ` `, `HELP FOR: A package for hypergeometric functions.`, ` `, `CALLING SEQUENCE:`, ` HYPERG[](args)`, ` (args)`, ` `, `SYNOPSIS:`, `- This package provides functions to manipulate hypergeometric functions.`, ` `, `- Whenever there is a conflict between a function name in HYPERG and`, ` another name used in the same session, use the long form`, ` HYPERG[].`, ` `, `- The available objects are:`, ` `, ` HYP VHYP RF`, ` `, `- To get more information on Hypergeometric Series and Rising Factorials,`, ` type ?HYPERG,HYP (or ?HYPERG[HYP]), ?HYPERG,VHYP (or ?HYPERG[VHYP]) and`, ` ?HYPERG,RF (or ?HYPERG[RF]).`, ` `, `- The available functions are:`, ` `, ` AddParam CheckRec FirstTerms Homog`, ` HypConverg HypDiff HypEval HypOrder`, ` HypPermBoth HypPermLow HypPermUp HypSimplify`, ` HypToVHyp HypType HypergToRec IsHYP`, ` IsHomog IsHyperg IsRF IsVHYP`, ` Lim MapApply MapList RecOrder`, ` RfEval ShiftRec SimplifyRec SubsRec`, ` SumToHyp Time VHypToHyp`, ` `, `- The rules for manipulating factorial expressions are:`, ` `, ` BaseSplit Ext1 Ext2 Inv`, ` Linear1 Linear2 Neg1 Neg2`, ` Split Trans`, ` `, `- The rules for manipulating hypergeometric series are:`, ` `, ` HypContig HypContigPrint HypSum HypSumList`, ` HypSumPrint HypTransf HypTransfList HypTransfPrint`, ` `, `- The functions for applying the Gosper and Zeilberger algorithms:`, ` `, ` Gosper HypToRec Prove SumToRec`, ` SummandToRec`, ` `, `- The functions for finding solutions of recurrences:`, ` `, ` GenRec HypSolRec PolySolRec RatioSolRec`, ` `, `- The available q-objects are:`, ` `, ` QHYP WHYP QRF QBIN`, ` `, `- The functions for manipulating q-series:`, ` `, ` IsQBIN IsQHYP IsQRF IsWHYP`, ` QBinEval QHypEval QHypOrder QHypToWHyp`, ` QHypType QRfEval WHypToQHyp`, ` `, `- The functions for finding solutions of q-recurrences:`, ` `, ` HypSolQRec PolySolQRec RatioSolQRec`, ` `, `- For help with a particular function, type either ?HYPERG[] or`, ` ?HYPERG, where is one from the above list.`, ` `, `EXAMPLES:`, `> with(HYPERG):`, `> mysum := Sum( binomial(M,k)*binomial(N,R-k), k ):`, `> expr := SumToHyp( mysum );`, ` `, ` expr := binomial(N, R) HYP[[- R, - M], [N - R + 1], 1]`, ` `, `> expr := HypSum( expr, 1 ); # Vandermonde's theorem`, ` - R, must be <= 0.`, ` `, ` binomial(N, R) RF[N + 1, M]`, ` expr := ---------------------------`, ` RF[N - R + 1, M]`, ` `, `> expr := RfEval( expr );`, ` `, ` binomial(N, R) GAMMA(N + 1 + M) GAMMA(N - R + 1)`, ` expr := ------------------------------------------------`, ` GAMMA(N + 1) GAMMA(N - R + 1 + M)`, ` `, `> simplify( expr );`, ` `, ` GAMMA(N + 1 + M)`, ` ---------------------------------`, ` GAMMA(R + 1) GAMMA(N - R + 1 + M)`, ` ` ): ########## # File @(#) HYP (HYPERG PACKAGE) Mon Mar 10 10:27:42 MET 1997 ########## `help/HYPERG/text/HYP` := TEXT( ` `, `FUNCTION: HYP - how generalized HYPergeometric series are coded`, ` `, `SYNOPSIS:`, `- HYP is an indexed name: HYP[ l1, l2, z ] with`, ` `, ` - l1, the list of upper parameters,`, ` - l2, the list of lower parameters,`, ` - z, the evaluation point.`, ` `, `EXAMPLES:`, `> with(HYPERG):`, `> H := HYP[[a,b,c],[d,e],z]:`, `> IsHYP( H );`, ` `, ` true`, ` `, `SEE ALSO: HYPERG, IsHYP, VHYP, RF, HypConverg, HypDiff, HypEval,`, ` HypOrder, HypPerm, HypSimplify, HypToVHyp, AddParam` ): ########## # File @(#) VHYP (HYPERG PACKAGE) Wed Sep 17 08:04:20 METDST 1997 ########## `help/HYPERG/text/VHYP` := TEXT( ` `, `FUNCTION: VHYP - how HYPergeometric series (in Very-well-poised) are coded`, ` `, `SYNOPSIS:`, `- VHYP is an indexed name: HYP[ a, l, z ] with`, ` `, ` - a, the first upper parameter the hypergeometric series,`, ` - l, a list of parameters,`, ` - z, the evaluation point.`, ` `, `- VHYP[ a, [p_1,...,p_r], z ] is equivalent to`, ` HYP[ [a, 1+a/2, p_1, ..., p_r], [1/2,1+a-p_1, ..., 1+a-p_r], z]`, ` `, `EXAMPLES:`, `> with(HYPERG):`, `> v := VHYP[a,[3,b-1],z]:`, `> VHypToHyp( v );`, ` `, ` HYP[[a, 1/2 a + 1, 3, b - 1], [1/2 a, - 2 + a, 2 + a - b], z]`, ` `, `SEE ALSO: HYPERG, IsVHYP, HYP, RF, HypConverg, HypEval,`, ` VHyptoHyp, HypToVHyp` ): ########## # File @(#) RF (HYPERG PACKAGE) Mon Mar 10 10:27:42 MET 1997 ########## `help/HYPERG/text/RF` := TEXT( ` `, `FUNCTION: RF - how Rising Factorials are coded`, ` `, `SYNOPSIS:`, `- RF is an indexed name: RF[a, k] where a and k are names (or numerical`, ` values).`, ` `, `- The mathematical notation is (a)_k.`, ` `, `EXAMPLES:`, `> with(HYPERG):`, `> rf := RF[a,4];`, ` `, ` rf := RF[a, 4]`, ` `, `> RfEval( rf );`, ` `, ` a (a + 1) (a + 2) (a + 3)`, ` `, `SEE ALSO: HYPERG, IsRF, RfEval, HYP, VHYP` ): ########## # File @(#) AddParam (HYPERG PACKAGE) Tue Aug 12 08:44:19 METDST 1997 ########## `help/HYPERG/text/AddParam` := TEXT( ` `, `FUNCTION: AddParam - add a parameter to a [basic] hypergeometric series`, ` - in standard notation`, ` `, `CALLING SEQUENCE:`, ` AddParam( shyp, p )`, ` HYPERG[AddParam]( shyp, p )`, ` `, `PARAMETERS:`, ` shyp - a [basic] hypergeometric series in standard notation`, ` p - a parameter`, ` `, `SYNOPSIS:`, `- Add the parameter p to the list of upper parameters, and to the list`, ` of lower parameters.`, ` `, `- p must be a nonnegative integer.`, ` `, `- Whenever there is a conflict between the function name AddParam and`, ` another name used in the same session, use the form HYPERG['AddParam'].`, ` `, `EXAMPLES:`, `> with(HYPERG):`, `> AddParam( HYP[[a,b],[d],1], c );`, ` `, ` c, must be an integer > 0.`, ` `, ` HYP[[c, a, b], [c, d], 1]`, ` `, `SEE ALSO: HYPERG, IsHYP, HypConverg, HypDiff, HypEval, HypOrder, HypPerm,`, ` HypSimplify, IsQHYP, QHypEval, QHypOrder` ): ########## # File @(#) CheckRec (HYPERG PACKAGE) Fri Mar 27 08:37:28 MET 1998 ########## `help/HYPERG/text/CheckRec` := TEXT( ` `, `FUNCTION: CheckRec - tests if an expression satisfies`, ` - a recurrence relation`, ` `, `CALLING SEQUENCE:`, ` `, ` CheckRec( rec, u(n), expr )`, ` HYPERG[CheckRec]( rec, u(n), expr )`, ` `, `PARAMETERS:`, ` rec - a linear recurrence equation with polynomial coefficients`, ` u,n - the name and the index of the recurrence`, ` expr - an expression`, ` `, `SYNOPSIS:`, `- The CheckRec function tests if an expression 'expr' satisfies the`, ` recurrence equation 'rec'. The return value is "true" or "false".`, ` `, `- Whenever there is a conflict between the function name CheckRec and`, ` another name use in the same session, use the form HYPERG['CheckRec'].`, ` `, `EXAMPLES:`, `> with(HYPERG):`, `> CheckRec( (n+2)*U(n+1)-n*U(n)=n, U(n), 2^n );`, ` `, ` false`, ` `, `> CheckRec( C(n)-2*C(n+1)+C(n+2)=0, C(n), n );`, ` `, ` true`, ` `, `SEE ALSO: HYPERG, RecOrder, SubsRec, SimplifyRec, ShiftRec`, ` Ishomog, Homog, GenRec, HypergToRec` ): ########## # File @(#) FirstTerms (HYPERG PACKAGE) Fri Mar 27 08:37:28 MET 1998 ########## `help/HYPERG/text/FirstTerms` := TEXT( ` `, `FUNCTION: FirstTerms - extracts first terms of a summation`, ` `, `CALLING SEQUENCE:`, ` FirstTerms( s, n )`, ` HYPERG[FirstTerms]( s, n )`, ` `, `PARAMETERS:`, ` s - a Sum -or- a HYPergeometric series`, ` n - a positive integer`, ` `, `SYNOPSIS:`, `- The FirstTerms function extracts the 'n' first terms of a summation.`, ` `, `- Whenever there is a conflict between the function name FirstTerms and`, ` another name use in the same session, use the form HYPERG['FirstTerms'].`, ` `, `EXAMPLES:`, `> with(HYPERG):`, `> h1 := Sum(a[i],i=5..N):`, `> FirstTerms( h1, 3);`, ` `, ` / N \\`, ` |----- |`, ` | \\ |`, ` a[5] + a[6] + a[7] + | ) a[i]|`, ` | / |`, ` |----- |`, ` \\i = 8 /`, ` `, `> h2 := HYP[[a,2],[3],z]:`, `> FirstTerms( h2, 4);`, ` `, ` 2`, ` RF[a, 0] RF[2, 0] RF[a, 1] RF[2, 1] z RF[a, 2] RF[2, 2] z`, ` ----------------- + ------------------- + 1/2 --------------------`, ` RF[3, 0] RF[3, 1] RF[3, 2]`, ` `, ` /infinity \\`, ` 3 | ----- k|`, ` RF[a, 3] RF[2, 3] z | \\ RF[a, k] RF[2, k] z |`, ` + 1/6 -------------------- + | ) --------------------|`, ` RF[3, 3] | / RF[3, k] k! |`, ` | ----- |`, ` \\ k = 4 /`, ` `, `SEE ALSO: HYPERG, HYP, IsHYP, HypConverg, HypEval, Sum` ): ########## # File @(#) GenRec (HYPERG PACKAGE) Mon Jun 23 14:32:27 METDST 1997 ########## `help/HYPERG/text/GenRec` := TEXT( ` `, `FUNCTION: GenRec - generate a recurrence`, ` `, `CALLING SEQUENCE:`, ` GenRec( sols, u(n) )`, ` HYPERG[GenRec]( sols, u(n) )`, ` `, `PARAMETERS:`, ` sols - a set of 'p' terms {s1, s2, ..., sp}`, ` u,n - the name and the index of the recurrence`, ` `, `SYNOPSIS:`, `- The function GenRec generates a p-order homogeneous recurrence satisfied`, ` by u(n) such that s1, s2, ..., and sp are its solutions.`, ` `, `- The s1, s2, ..., sp terms must be products of rational functions`, ` factorials, rising factorials, binomial coefficients and`, ` power functions.`, ` `, `- The output is a recurrence in n with polynomial coefficients.`, ` `, `- If GenRec is unable to compute a recurrence, it returns 0 = 0.`, ` `, `- Whenever there is a conflict between the function name GenRec and`, ` another name used in the same session, use the form HYPERG['GenRec'].`, ` `, `EXAMPLES:`, `> with(HYPERG):`, `> GenRec( {2^n,n}, V(n) );`, ` `, ` 2 V(n) n + (- 3 n + 2) V(n + 1) + (n - 1) V(n + 2) = 0`, ` `, `> GenRec( {k,k^2/(k+1)/(k-1)}, U(k) );`, ` `, ` 2`, ` - (k - 1) (k + 2) (k + 1) (k + 3 k + 3) U(k)`, ` `, ` 2 2`, ` + 2 k (k + 1) (k + 2) U(k + 1)`, ` `, ` 2`, ` - k (k + 3) (k + 1) (k + k + 1) U(k + 2) = 0`, ` `, `SEE ALSO: HYPERG, RecOrder, SubsRec, CheckRec, ShiftRec,`, ` SimplifyRec, PolySolRec, RatioSolRec, HypSolRec` ): ########## # File @(#) Gosper (HYPERG PACKAGE) Mon Jun 23 14:32:27 METDST 1997 ########## `help/HYPERG/text/Gosper` := TEXT( ` `, `FUNCTION: Gosper - Gosper's algorithm for summation`, ` `, `CALLING SEQUENCE:`, ` Gosper(f, k)`, ` HYPERG[Gosper](f, k)`, ` `, `PARAMETERS:`, ` f - an expression`, ` k - a name`, ` `, `SYNOPSIS:`, `- This function is an implementation of Gosper's algorithm, it computes`, ` an upward antidifference of a the expression f.`, ` `, `- An expression g is called 'antidifference' of f if`, ` f = subs(k=k+1,g) - g`, ` `, `- Whenever there is a conflict between the function name Gosper and`, ` another name used in the same session, use the form HYPERG['Gosper'].`, ` `, `EXAMPLES:`, `> with(HYPERG):`, `> Gosper( binomial(n,k), n );`, ` `, ` (n - k) n!`, ` -------------------`, ` (k + 1) k! (n - k)!`, ` `, `> Gosper(1/k,k);`, ` `, ` FAIL`, ` `, `SEE ALSO: HYPERG, HypToRec, Prove, SummandToRec, SumToRec` ): ########## # File @(#) Homog (HYPERG PACKAGE) Thu Mar 26 08:03:05 MET 1998 ########## `help/HYPERG/text/Homog` := TEXT( ` `, `FUNCTION: Homog - Homogenizes a recurrence equation`, ` `, `CALLING SEQUENCE:`, ` Homog( rec, u(n) )`, ` HYPERG[Homog]( rec, u(n) )`, ` `, `PARAMETERS:`, ` rec - a linear recurrence equation with polynomial coefficients`, ` u,n - the name and the index of the recurrence`, ` `, `SYNOPSIS:`, `- The Homog function homogenizes the recurrence equation.`, ` `, `- Whenever there is a conflict between the function name Homog and`, ` another name used in the same session, use the form HYPERG['Homog'].`, ` `, `EXAMPLES:`, `> with(HYPERG):`, `> Homog( (n+2)*U(n+1)-n*U(n)=n, U(n) );`, ` `, ` 2`, ` n (n + 1) U(n) - 2 (n + 1) U(n + 1) + n (n + 3) U(n + 2) = 0`, ` `, `SEE ALSO: HYPERG, Ishomog, RecOrder, CheckRec, SubsRec, ShiftRec`, ` SimplifyRec, GenRec, HypergToRec` ): ########## # File @(#) Homog (HYPERG PACKAGE) Thu Mar 26 18:03:05 MET 1998 ########## `help/HYPERG/text/IsHomog` := TEXT( ` `, `FUNCTION: IsHomog - tests if a recurrence equation is homogeneous`, ` `, `CALLING SEQUENCE:`, ` IsHomog( rec, u(n) )`, ` HYPERG[IsHomog]( rec, u(n) )`, ` `, `PARAMETERS:`, ` rec - a linear recurrence equation with polynomial coefficients`, ` u,n - the name and the index of the recurrence`, ` `, `SYNOPSIS:`, `- The IsHomog function tests if a recurrence equation is homogeneous. The`, ` return value is "true" or "false".`, ` `, `- Whenever there is a conflict between the function name IsHomog and`, ` another name used in the same session, use the form HYPERG['IsHomog'].`, ` `, `EXAMPLES:`, `> with(HYPERG):`, `> IsHomog( 2*S(n)-S(n+1)=0, S(n) );`, ` `, ` true`, ` `, `> IsHomog( (n+2)*T(n+1)-n*T(n)=n, T(n) );`, ` `, ` false`, ` `, `SEE ALSO: HYPERG, Homog, RecOrder, CheckRec, SubsRec, SimplifyRec,`, ` ShiftRec, GenRec, HypergToRec` ): ########## # File @(#) HypContig (HYPERG PACKAGE) Tue Aug 19 17:24:27 METDST 1997 ########## `help/HYPERG/text/HypContig` := TEXT( ` `, `FUNCTION: HypContig - Contiguous formula in form of rules`, ` `, `CALLING SEQUENCE:`, ` HypContig( shyp, nb )`, ` HYPERG[HypContig]( shyp, nb )`, ` `, ` HypContig( shyp, nb, pos_1, ..., pos_i )`, ` HYPERG[HypContig]( shyp, nb, pos_1, ..., pos_i )`, ` `, `PARAMETERS:`, ` shyp - a hypergeometric series in standard notation`, ` nb - a formula number`, ` pos_j, ... - upper/lower parameter positions`, ` `, `SYNOPSIS:`, `- This function applies a contiguous formula on a hypergeometric series.`, ` `, `- Each contiguous formula has its own number (see details in the user's`, ` reference manual).`, ` `, `- The variables pos_i are the positions of the 'special' (upper or/and`, ` lower) parameters.`, ` `, `- Whenever there is a conflict between the function name HypContig and`, ` another name used in the same session, use the form HYPERG['HypContig'].`, ` `, `EXAMPLES:`, `> with(HYPERG):`, `> HypContig( HYP[[a,b,c],[d,e],z], 26, 1,3 );`, ` `, ` c HYP[[a, c + 1, b], [d, e], z] a HYP[[a + 1, c, b], [d, e], z]`, ` ------------------------------- + -------------------------------`, ` c - a a - c`, ` `, `SEE ALSO: HYPERG, HYP, IsHYP, HypContigPrint, HypConverg, HypSum,`, ` HypSumPrint, HypTransf, HypTransfPrint, MapList, MapApply` ): `help/HYPERG/text/C01` := `help/HYPERG/text/HypContig`: `help/HYPERG/text/C02` := `help/HYPERG/text/HypContig`: `help/HYPERG/text/C14` := `help/HYPERG/text/HypContig`: `help/HYPERG/text/C15` := `help/HYPERG/text/HypContig`: `help/HYPERG/text/C16` := `help/HYPERG/text/HypContig`: `help/HYPERG/text/C17` := `help/HYPERG/text/HypContig`: `help/HYPERG/text/C18` := `help/HYPERG/text/HypContig`: `help/HYPERG/text/C19` := `help/HYPERG/text/HypContig`: `help/HYPERG/text/C20` := `help/HYPERG/text/HypContig`: `help/HYPERG/text/C21` := `help/HYPERG/text/HypContig`: `help/HYPERG/text/C22` := `help/HYPERG/text/HypContig`: `help/HYPERG/text/C23` := `help/HYPERG/text/HypContig`: `help/HYPERG/text/C24` := `help/HYPERG/text/HypContig`: `help/HYPERG/text/C25` := `help/HYPERG/text/HypContig`: `help/HYPERG/text/C26` := `help/HYPERG/text/HypContig`: `help/HYPERG/text/C27` := `help/HYPERG/text/HypContig`: `help/HYPERG/text/C30` := `help/HYPERG/text/HypContig`: `help/HYPERG/text/C31` := `help/HYPERG/text/HypContig`: `help/HYPERG/text/C32` := `help/HYPERG/text/HypContig`: `help/HYPERG/text/C33` := `help/HYPERG/text/HypContig`: `help/HYPERG/text/C34` := `help/HYPERG/text/HypContig`: `help/HYPERG/text/C35` := `help/HYPERG/text/HypContig`: `help/HYPERG/text/C36` := `help/HYPERG/text/HypContig`: `help/HYPERG/text/C40` := `help/HYPERG/text/HypContig`: `help/HYPERG/text/C41` := `help/HYPERG/text/HypContig`: `help/HYPERG/text/C42` := `help/HYPERG/text/HypContig`: `help/HYPERG/text/C43` := `help/HYPERG/text/HypContig`: `help/HYPERG/text/C44` := `help/HYPERG/text/HypContig`: `help/HYPERG/text/C45` := `help/HYPERG/text/HypContig`: `help/HYPERG/text/C46` := `help/HYPERG/text/HypContig`: `help/HYPERG/text/C49` := `help/HYPERG/text/HypContig`: `help/HYPERG/text/C50` := `help/HYPERG/text/HypContig`: `help/HYPERG/text/C51` := `help/HYPERG/text/HypContig`: `help/HYPERG/text/C52` := `help/HYPERG/text/HypContig`: `help/HYPERG/text/C53` := `help/HYPERG/text/HypContig`: `help/HYPERG/text/C54` := `help/HYPERG/text/HypContig`: `help/HYPERG/text/C55` := `help/HYPERG/text/HypContig`: `help/HYPERG/text/C56` := `help/HYPERG/text/HypContig`: `help/HYPERG/text/C57` := `help/HYPERG/text/HypContig`: `help/HYPERG/text/C58` := `help/HYPERG/text/HypContig`: `help/HYPERG/text/C59` := `help/HYPERG/text/HypContig`: `help/HYPERG/text/C60` := `help/HYPERG/text/HypContig`: `help/HYPERG/text/C61` := `help/HYPERG/text/HypContig`: `help/HYPERG/text/C62` := `help/HYPERG/text/HypContig`: `help/HYPERG/text/C63` := `help/HYPERG/text/HypContig`: `help/HYPERG/text/C64` := `help/HYPERG/text/HypContig`: `help/HYPERG/text/C65` := `help/HYPERG/text/HypContig`: `help/HYPERG/text/C66` := `help/HYPERG/text/HypContig`: `help/HYPERG/text/C67` := `help/HYPERG/text/HypContig`: `help/HYPERG/text/C68` := `help/HYPERG/text/HypContig`: `help/HYPERG/text/C69` := `help/HYPERG/text/HypContig`: `help/HYPERG/text/C70` := `help/HYPERG/text/HypContig`: `help/HYPERG/text/C71` := `help/HYPERG/text/HypContig`: `help/HYPERG/text/C72` := `help/HYPERG/text/HypContig`: `help/HYPERG/text/C73` := `help/HYPERG/text/HypContig`: `help/HYPERG/text/C74` := `help/HYPERG/text/HypContig`: `help/HYPERG/text/C75` := `help/HYPERG/text/HypContig`: `help/HYPERG/text/C76` := `help/HYPERG/text/HypContig`: `help/HYPERG/text/C77` := `help/HYPERG/text/HypContig`: `help/HYPERG/text/C78` := `help/HYPERG/text/HypContig`: `help/HYPERG/text/C79` := `help/HYPERG/text/HypContig`: `help/HYPERG/text/C80` := `help/HYPERG/text/HypContig`: `help/HYPERG/text/C81` := `help/HYPERG/text/HypContig`: `help/HYPERG/text/C82` := `help/HYPERG/text/HypContig`: `help/HYPERG/text/C83` := `help/HYPERG/text/HypContig`: `help/HYPERG/text/C84` := `help/HYPERG/text/HypContig`: `help/HYPERG/text/C85` := `help/HYPERG/text/HypContig`: `help/HYPERG/text/C86` := `help/HYPERG/text/HypContig`: `help/HYPERG/text/C87` := `help/HYPERG/text/HypContig`: `help/HYPERG/text/C88` := `help/HYPERG/text/HypContig`: `help/HYPERG/text/C89` := `help/HYPERG/text/HypContig`: `help/HYPERG/text/C90` := `help/HYPERG/text/HypContig`: `help/HYPERG/text/C91` := `help/HYPERG/text/HypContig`: `help/HYPERG/text/C92` := `help/HYPERG/text/HypContig`: `help/HYPERG/text/C93` := `help/HYPERG/text/HypContig`: `help/HYPERG/text/C94` := `help/HYPERG/text/HypContig`: `help/HYPERG/text/C95` := `help/HYPERG/text/HypContig`: `help/HYPERG/text/C96` := `help/HYPERG/text/HypContig`: `help/HYPERG/text/C97` := `help/HYPERG/text/HypContig`: `help/HYPERG/text/C98` := `help/HYPERG/text/HypContig`: `help/HYPERG/text/C99` := `help/HYPERG/text/HypContig`: `help/HYPERG/text/C100` := `help/HYPERG/text/HypContig`: `help/HYPERG/text/C101` := `help/HYPERG/text/HypContig`: `help/HYPERG/text/C102` := `help/HYPERG/text/HypContig`: `help/HYPERG/text/C103` := `help/HYPERG/text/HypContig`: `help/HYPERG/text/C104` := `help/HYPERG/text/HypContig`: `help/HYPERG/text/C105` := `help/HYPERG/text/HypContig`: `help/HYPERG/text/C106` := `help/HYPERG/text/HypContig`: `help/HYPERG/text/C107` := `help/HYPERG/text/HypContig`: `help/HYPERG/text/C108` := `help/HYPERG/text/HypContig`: `help/HYPERG/text/C109` := `help/HYPERG/text/HypContig`: `help/HYPERG/text/C110` := `help/HYPERG/text/HypContig`: `help/HYPERG/text/C111` := `help/HYPERG/text/HypContig`: `help/HYPERG/text/C112` := `help/HYPERG/text/HypContig`: `help/HYPERG/text/C113` := `help/HYPERG/text/HypContig`: `help/HYPERG/text/C114` := `help/HYPERG/text/HypContig`: `help/HYPERG/text/C115` := `help/HYPERG/text/HypContig`: `help/HYPERG/text/C116` := `help/HYPERG/text/HypContig`: `help/HYPERG/text/C117` := `help/HYPERG/text/HypContig`: `help/HYPERG/text/C118` := `help/HYPERG/text/HypContig`: `help/HYPERG/text/C119` := `help/HYPERG/text/HypContig`: `help/HYPERG/text/C120` := `help/HYPERG/text/HypContig`: `help/HYPERG/text/C121` := `help/HYPERG/text/HypContig`: ########## # File @(#) HypContigPrint (HYPERG PACKAGE) Thu Aug 13 18:02:57 METDST 1998 ########## `help/HYPERG/text/HypContigPrint` := TEXT( ` `, `FUNCTION: HypContigPrint - Print a contiguous formula`, ` - in form of an equation`, ` `, `CALLING SEQUENCE:`, ` HypContigPrint( shyp, nb )`, ` HYPERG[HypContigPrint]( shyp, nb )`, ` `, ` HypContigPrint( shyp, nb, pos_1, ..., pos_i )`, ` HYPERG[HypContigPrint]( shyp, nb, pos_1, ..., pos_i )`, ` `, `PARAMETERS:`, ` shyp - a hypergeometric series in standard notation`, ` nb - a formula number`, ` pos_j, ... - upper/lower parameter positions`, ` `, `SYNOPSIS:`, `- The HypContigPrint function prints a contiguous formula in form of an`, ` equation.`, ` `, `- Each contiguous formula has its own number (see details in the user's`, ` reference manual).`, ` `, `- The variables pos_i are the positions of the 'special' (upper or/and`, ` lower) parameters.`, ` `, `- Whenever there is a conflict between the function name HypContigPrint`, ` and another name used in the same session, use the long form`, ` HYPERG['HypContigPrint'].`, ` `, `EXAMPLES:`, `> with(HYPERG):`, `> HypContigPrint(HYP[[a,b],[c],z], 21, 1);`, ` `, ` HYP[[a, b], [c], z] =`, ` `, ` z a b HYP[[a + 1, b + 1], [c + 1], z]`, ` HYP[[a, b], [c - 1], z] - -------------------------------------`, ` (c - 1) c`, ` `, `SEE ALSO: HYPERG, HYP, IsHYP, HypContig, HypConverg, HypSum,`, ` HypTransf, HypSumPrint, HypTransfPrint, MapList, MapApply` ): ########## # File @(#) HypConverg (HYPERG PACKAGE) Mon Feb 15 17:59:15 MET 1999 ########## `help/HYPERG/text/HypConverg` := TEXT( ` `, `FUNCTION: HypConverg - test if is a convergent hypergeometric series`, ` `, `CALLING SEQUENCE:`, ` HypConverg( shyp )`, ` HYPERG[HypConverg]( shyp )`, ` `, `PARAMETERS:`, ` shyp - a hypergeometric series in standard notation (HYP or VHYP)`, ` `, `SYNOPSIS:`, `- The HypConverg function tests whether a hypergeometric series is`, ` convergent. The return value is "true" or "false".`, ` `, `- When it is imprecis, the function prints restrictions in order for the`, ` series to be convergent. `, ` `, `- Whenever there is a conflict between the function name HypConverg`, ` and another name used in the same session, use the long form`, ` HYPERG['HypConverg'].`, ` `, `EXAMPLES:`, `> with(HYPERG):`, `> HypConverg( HYP[[a,b],[c],z] );`, `# abs(z) must be less than 1`, `# or z must be egal to 1 and 0 < c-a-b`, `# or z must be egal to -1 and -1 < c-a-b`, ` `, ` true`, ` `, `> HypConverg( HYP[[1,3],[4],z] );`, `# abs(z) must be less than 1`, `# or z must be egal to -1`, ` `, ` true`, ` `, `> HypConverg( HYP[[a],[b,c],z] );`, ` `, ` true`, ` `, `> HypConverg( HYP[[a,b,c],[d],z] );`, `# z must be egal to 0`, ` `, ` true`, ` `, `SEE ALSO: HYPERG, IsHYP, IsVHYP, HypDiff, HypEval, HypOrder, HypType` ): ########## # File @(#) HypDiff (HYPERG PACKAGE) Fri Feb 13 08:21:55 MET 1998 ########## `help/HYPERG/text/HypDiff` := TEXT( ` `, `FUNCTION: HypDiff - Differentiation of a hypergeometric series`, ` `, `CALLING SEQUENCE:`, ` HypDiff( shyp, var )`, ` HYPERG[HypDiff]( shyp, var )`, ` `, `PARAMETERS:`, ` shyp - a hypergeometric series in standard notation (HYP or VHYP)`, ` var - a name`, ` `, `SYNOPSIS:`, `- The HypDiff function computes the derivative of a hypergeometric series`, ` with respect to var.`, ` `, `- Whenever there is a conflict between the function name HypDiff and`, ` another name used in the same session, use the form HYPERG['HypDiff'].`, ` `, `EXAMPLES:`, `> with(HYPERG):`, `> HypDiff( HYP[[a,b,c],[d,e],z], z );`, ` `, ` a b c HYP[[a + 1, b + 1, c + 1], [d + 1, e + 1], z]`, ` ---------------------------------------------------`, ` d e`, ` `, `> HypDiff( HYP[[a,b],[c],3*z^4], z );`, ` `, ` 3 4`, ` z a b HYP[[a + 1, b + 1], [c + 1], 3 z ]`, ` 12 -----------------------------------------`, ` c`, ` `, `SEE ALSO: HYPERG, IsHYP, IsVHYP, HypConverg, HypEval, HypOrder, HypType` ): ########## # File @(#) HypEval (HYPERG PACKAGE) Tue May 19 07:57:04 METDST 1998 ########## `help/HYPERG/text/HypEval` := TEXT( ` `, `FUNCTION: HypEval - Rule that transforms a HYP[] into a Sum()`, ` `, `CALLING SEQUENCE:`, ` HypEval( expr )`, ` HYPERG[HypEval]( expr )`, ` `, ` HypEval( expr, tsi )`, ` HYPERG[HypEval]( expr, tsi )`, ` `, `PARAMETERS:`, ` expr - any expression`, ` tsi - a name, the summation index`, ` `, `SYNOPSIS:`, `- The HypEval function expands hypergeometric series into sums. It takes`, ` in input any expression involving HYP (generalized HYPergeometric`, ` series) and VHYP (HYPergeometric series in Very-well-poised order).`, ` `, `- The optional second argument (tsi) allows you to choose the name of the`, ` summation index. The default value is k.`, ` `, `- Whenever there is a conflict between the function name HypEval and`, ` another name used in the same session, use the form HYPERG['HypEval'].`, ` `, `EXAMPLES:`, `> with(HYPERG):`, `> HypEval( c * d! * HYP[[a,b],[c],z] );`, ` `, ` /infinity \\`, ` | ----- k|`, ` | \\ RF[a, k] RF[b, k] z |`, ` c d! | ) --------------------|`, ` | / RF[c, k] k! |`, ` | ----- |`, ` \\ k = 0 /`, ` `, `> HypEval( term * VHYP[a,[e,f],z^2] );`, ` `, ` /infinity \\`, ` | ----- 2 k|`, ` | \\ RF[a, k] RF[1/2 a + 1, k] RF[e, k] RF[f, k] (z ) |`, ` term | ) -------------------------------------------------|`, ` | / RF[1/2 a, k] RF[1 + a - e, k] RF[1 + a - f, k] k!|`, ` | ----- |`, ` \\ k = 0 /`, ` `, `> #special case:`, `> HypEval( HYP[[],[],z] );`, ` `, ` exp(z)`, ` `, `SEE ALSO: HYPERG, HYP, IsHYP, VHYP, IsVHYP, AddParam, HypContig,`, ` HypConverg, HypDiff, HypOrder, HypPerm, HypSimplify, HypType` ): ########## # File @(#) HypOrder (HYPERG PACKAGE) Tue Aug 12 08:44:19 METDST 1997 ########## `help/HYPERG/text/HypOrder` := TEXT( ` `, `FUNCTION: HypOrder - Order parameters of a hypergeometric series`, ` `, `CALLING SEQUENCE:`, ` HypOrder( shyp )`, ` HYPERG[HypOrder]( shyp )`, ` `, `PARAMETERS:`, ` shyp - a hypergeometric series in standard notation`, ` `, `SYNOPSIS:`, `- The HypOrder function is used to order the parameters of a`, ` hypergeometric series in 'well-poised', 'very-well-poised', and`, ` 'nearly-well poised order'.`, ` `, `- Whenever there is a conflict between the function name HypOrder and`, ` another name used in the same session, use the form HYPERG['HypOrder'].`, ` `, `EXAMPLES:`, `> with(HYPERG):`, `> # well-poised order`, `> HypOrder( HYP[[a,b,c,1],[a,a+1-c,a+1-b],z] );`, ` `, ` HYP[[a, b, c, 1], [a + 1 - b, a + 1 - c, a], z]`, ` `, `> # very-well-poised order`, `> HypOrder( HYP[[-n,b,1+a/2,a],[a+1-b,a/2,a+1+n],z] );`, ` `, ` HYP[[a, 1 + 1/2 a, - n, b], [1/2 a, n + a + 1, a + 1 - b], z]`, ` `, `> # nearly-poised order`, `> HypOrder( HYP[[x+1,-n-1/2,-n],[x-2*n,3/2],1] );`, ` `, ` HYP[[- n, - n - 1/2, x + 1], [3/2, x - 2 n], 1]`, ` `, `SEE ALSO: HYPERG, IsHYP, IsVHYP, HypConverg, HypEval, HypPerm, HypType,`, ` AddParam` ): ########## # File @(#) HypPerm (HYPERG PACKAGE) Tue Aug 12 08:44:19 METDST 1997 ########## `help/HYPERG/text/HypPerm` := TEXT( ` `, `FUNCTION: HypPermBoth - Rules for permuting parameters`, ` HypPermUp - in [basic] hypergeometric series`, ` HypPermLow`, ` `, `CALLING SEQUENCE:`, ` HypPermUp( shyp, p )`, ` HYPERG[HypPermUp]( shyp, p )`, ` `, ` HypPermLow( shyp, p )`, ` HYPERG[HypPermLow]( shyp, p )`, ` `, ` HypPermBoth( shyp, p )`, ` HYPERG[HypPermBoth]( shyp, p )`, ` `, `PARAMETERS:`, ` shyp - a [basic] hypergeometric series in standard notation`, ` p - a permutation`, ` `, `SYNOPSIS:`, `- p must be a list of positive numbers forming a permutation.`, ` `, `- The effect is that the new (upper/lower) parameter at position i is the`, ` old parameter form position p[i].`, ` `, `- For the HypPermBoth function, the hypergeometric series must have one`, ` more upper parameter than it has lower parameters.`, ` `, `- Whenever there is a conflict between the function name HypPermXX and`, ` another name used in the same session, use the form HYPERG['HypPermXX'].`, ` `, `EXAMPLES:`, `> with(HYPERG):`, `> HypPermLow( HYP[[a,b,d,c],[e,f,g],z], [2,3,1] );`, ` `, ` HYP[[a, b, d, c], [f, g, e], z]`, ` `, `> HypPermBoth( QHYP[[a,b,c],[d,e],q,z], [2,1] );`, ` `, ` QHYP[[a, c, b], [e, d], q, z]`, ` `, `SEE ALSO: HYPERG, HYP, AddParam, HypConverg, HypDiff, HypSimplify,`, ` HypEval, HypOrder, HypType, QHYP, QHypEval, QHypOrder, QHypType` ): `help/HYPERG/text/HypPermBoth` := `help/HYPERG/text/HypPerm`: `help/HYPERG/text/HypPermUp` := `help/HYPERG/text/HypPerm`: `help/HYPERG/text/HypPermLow` := `help/HYPERG/text/HypPerm`: ########## # File @(#) HypSimplify (HYPERG PACKAGE) Tue Aug 12 08:44:19 METDST 1997 ########## `help/HYPERG/text/HypSimplify` := TEXT( ` `, `FUNCTION: HypSimplify - Apply simplification rules`, ` - to [basic] hypergeometric series`, ` `, `CALLING SEQUENCE:`, ` HypSimplify( expr )`, ` HYPERG[HypSimplify]( expr )`, ` `, ` HypSimplify( expr, 'factor' )`, ` HYPERG[HypSimplify]( expr, 'factor' )`, ` `, ` HypSimplify( expr, 'combpow' )`, ` HYPERG[HypSimplify]( expr, 'combpow' )`, ` `, `PARAMETERS:`, ` expr - any expression`, ` `, `SYNOPSIS:`, `- The HypSimplify function cancels equal upper and lower parameters of`, ` ordinary (and basic) hypergeometric series. Moreover, this function`, ` expands all upper and lower parameters.`, ` `, `- It is also used to simplify any [q] hypergeometric expression.`, ` `, `- The 'combpow' option is used to combine terms with powers in the`, ` evaluation point of hypergeometric [q]-series.`, ` `, `- The 'factor' option is used to factorize evaluation point`, ` of hypergeometric [q]-series.`, ` `, `- Whenever there is a conflict between the function name HypSimplify`, ` and another name used in the same session, use the long form`, ` HYPERG['HypSimplify'].`, ` `, `EXAMPLES:`, `> with(HYPERG):`, `> HypSimplify( QHYP[[a,b],[b],q,z] );`, ` `, ` QHYP[[a], [], q, z]`, ` `, `> HypSimplify( HYP[[a,b,c],[c],z] + HYP[[a,b,d],[d],z] );`, ` `, ` 2 HYP[[a, b], [], z]`, ` `, `> HypSimplify( HYP[[a,b,c],[d,c],1/4*(-4*x+4*x^2+1)/(x*(x-1))],'factor' );`, ` `, ` 2`, ` (2 x - 1)`, ` HYP[[a, b], [d], 1/4 ----------]`, ` x (x - 1)`, ` `, `> hyp := HYP[[a, b],[d],1/4*((2*x-1)^2)^(1/2)/x/(x-1)];`, ` `, ` 2 1/2`, ` ((2 x - 1) )`, ` hyp := HYP[[a, b], [d], 1/4 ---------------]`, ` x (x - 1)`, ` `, `> HypSimplify( hyp, 'combpow' );`, ` `, ` 2 x - 1`, ` HYP[[a, b], [d], 1/4 ---------]`, ` x (x - 1)`, ` `, `SEE ALSO: HYPERG, IsHYP, AddParam, HypConverg, HypDiff, HypEval,`, ` HypOrder, HypPerm` ): ########## # File @(#) HypSolRec (HYPERG PACKAGE) Fri Jun 27 18:13:58 METDST 1997 ########## `help/HYPERG/text/HypSolRec` := TEXT( ` `, `FUNCTION: HypSolRec - linear recurrence equation solver`, ` - hypergeometric solutions`, ` `, `CALLING SEQUENCE:`, ` HypSolRec(eqn, u(n))`, ` HYPERG[HypSolRec](eq, u(n))`, ` `, `PARAMETERS:`, ` eqn - a linear recurrence equation with polynomial coefficients`, ` u,n - the name and the index of the recurrence`, ` `, `SYNOPSIS:`, `- The function HypSolRec finds all hypergeometric solutions of the`, ` recurrence relation.`, ` `, `- The first argument should be a single recurrence equation with`, ` polynomial coefficients. Any expressions which is not an equation will`, ` be understood to be equal to zero.`, ` `, ` This recurrence must be homogeneous.`, ` `, `- The second argument indicates the sequence that HypSolRec should solve`, ` for. (A sequence is represented by a name and an index).`, ` `, `- The output is a generating set (not necessarily linearly independent) of`, ` hypergeometric solutions (with constant coefficients _x0, _x1, ...) of`, ` the recurrence relation. These solutions u(n) are given by their`, ` rational representations u(n+1)/u(n).`, ` `, `- Whenever there is a conflict between the function name HypSolRec and`, ` another name used in the same session, use the form HYPERG['HypSolRec'].`, ` `, `EXAMPLES:`, `> with(HYPERG):`, `> HypSolRec( n*(1+n)*U(2+n)-2*n*(1+k+n)*U(1+n)+(k+n)*(1+k+n)*U(n), U(n) );`, ` `, ` (k + n) (_x0 + _x1 (1 + n)) 1 + k + n k + n`, ` {---------------------------, ---------, -----}`, ` n (_x0 + _x1 n) n n - 1`, ` `, `SEE ALSO: HYPERG, SimplifyRec, ShiftRec, SubsRec, CheckRec, GenRec,`, ` PolySolRec, RatioSolRec` ): ########## # File @(#) HypSum (HYPERG PACKAGE) Tue Aug 19 18:13:27 METDST 1997 ########## `help/HYPERG/text/HypSum` := TEXT( ` `, `FUNCTION: HypSum - Summation formula in form of rules`, ` `, `CALLING SEQUENCE:`, ` HypSum( shyp, nb )`, ` HYPERG[HypSum]( shyp, nb )`, ` `, `PARAMETERS:`, ` shyp - a hypergeometric series in standard notation`, ` nb - a formula number`, ` `, `SYNOPSIS:`, `- The HypSum function applies a summation formula on a hypergeometric`, ` series.`, ` `, `- Each summation formula has its own number (see details in the user's`, ` reference manual).`, ` `, `- Several formulas has 'special' parameters, so it can be useful to`, ` modify the parameters' position with the functions HypPermLow, HypPermUp`, ` or HypPermBoth before apply HypSum.`, ` `, `- The HypSum function also displays the condition(s) about the`, ` evaluation point and/or the parameters of hypergeometric series in order`, ` for the formula to be valid.`, ` `, `- Whenever there is a conflict between the function name HypSum and`, ` another name used in the same session, use the form HYPERG['HypSum'].`, ` `, `EXAMPLES:`, `> with(HYPERG):`, `> #Gauss's theorem`, `> HypSum( HYP[[a,b],[c],z], 3 );`, ` `, ` z, must be equal to, 1`, ` `, ` a + b, must be < to, c`, ` `, ` `, ` GAMMA[c] GAMMA[c - a - b]`, ` -------------------------`, ` GAMMA[c - a] GAMMA[c - b]`, ` `, `SEE ALSO: HYPERG, HYP, IsHYP, HypSumList, HypSumPrint, HypPerm, HypConverg`, ` HypContig, HypContigPrint, HypTransf, HypTransfList,`, ` HypTransfPrint, MapList, MapApply` ): `help/HYPERG/text/S1001` := `help/HYPERG/text/HypSum`: `help/HYPERG/text/S2101` := `help/HYPERG/text/HypSum`: `help/HYPERG/text/S2103` := `help/HYPERG/text/HypSum`: `help/HYPERG/text/S2104` := `help/HYPERG/text/HypSum`: `help/HYPERG/text/S2105` := `help/HYPERG/text/HypSum`: `help/HYPERG/text/S2106` := `help/HYPERG/text/HypSum`: `help/HYPERG/text/S2131` := `help/HYPERG/text/HypSum`: `help/HYPERG/text/S2132` := `help/HYPERG/text/HypSum`: `help/HYPERG/text/S3201` := `help/HYPERG/text/HypSum`: `help/HYPERG/text/S3202` := `help/HYPERG/text/HypSum`: `help/HYPERG/text/S3204` := `help/HYPERG/text/HypSum`: `help/HYPERG/text/S3231` := `help/HYPERG/text/HypSum`: `help/HYPERG/text/S3232` := `help/HYPERG/text/HypSum`: `help/HYPERG/text/S3233` := `help/HYPERG/text/HypSum`: `help/HYPERG/text/S3234` := `help/HYPERG/text/HypSum`: `help/HYPERG/text/S3235` := `help/HYPERG/text/HypSum`: `help/HYPERG/text/S3261` := `help/HYPERG/text/HypSum`: `help/HYPERG/text/S3291` := `help/HYPERG/text/HypSum`: `help/HYPERG/text/S4306` := `help/HYPERG/text/HypSum`: `help/HYPERG/text/S4307` := `help/HYPERG/text/HypSum`: `help/HYPERG/text/S4331` := `help/HYPERG/text/HypSum`: `help/HYPERG/text/S4332` := `help/HYPERG/text/HypSum`: `help/HYPERG/text/S5431` := `help/HYPERG/text/HypSum`: `help/HYPERG/text/S5432` := `help/HYPERG/text/HypSum`: `help/HYPERG/text/S6531` := `help/HYPERG/text/HypSum`: `help/HYPERG/text/S6532` := `help/HYPERG/text/HypSum`: `help/HYPERG/text/S7631` := `help/HYPERG/text/HypSum`: `help/HYPERG/text/S7632` := `help/HYPERG/text/HypSum`: `help/HYPERG/text/S7691` := `help/HYPERG/text/HypSum`: ########## # File @(#) HypSumList (HYPERG PACKAGE) Fri Jun 12 08:40:31 METDST 1998 ########## `help/HYPERG/text/HypSumList` := TEXT( ` `, `FUNCTION: HypSumList - gives a list of applicable summation formulas`, ` `, `CALLING SEQUENCE:`, ` HypSumList( shyp )`, ` HYPERG[HypSumList]( shyp )`, ` `, `PARAMETERS:`, ` shyp - a hypergeometric series in standard notation`, ` `, `SYNOPSIS:`, `- The HypSumList function returns (for a given hypergeometric series)`, ` a list of applicable summation formulas.`, ` `, `- See the user's reference manual for details on formula numbering.`, ` `, `- Whenever there is a conflict between the function name HypSumList and`, ` another name used in the same session, use the long form`, ` HYPERG['HypSumList'].`, ` `, `EXAMPLES:`, `> with(HYPERG):`, `> HypSumList( HYP[[a,b],[d],1] );`, ` `, ` [[S2101], [HypPermUp, [2, 1], S2101], [S2103], [HypPermUp, [2, 1], S2103],`, ` `, ` [S2105], [HypPermUp, [2, 1], S2105]]`, ` `, `SEE ALSO: HYPERG, HYP, IsHYP, HypSum, HypSumPrint, HypContig,`, ` HypContigPrint, HypConverg, HypTransf, HypTransfList,`, ` HypTransfPrint` ): ########## # File @(#) HypSumPrint (HYPERG PACKAGE) Tue Aug 19 18:24:27 METDST 1997 ########## `help/HYPERG/text/HypSumPrint` := TEXT( ` `, `FUNCTION: HypSumPrint - Print a summation formula in form of an equation`, ` `, `CALLING SEQUENCE:`, ` HypSumPrint( shyp, nb )`, ` HYPERG[HypSumPrint]( shyp, nb )`, ` `, `PARAMETERS:`, ` shyp - a hypergeometric series in standard notation`, ` nb - a formula number`, ` `, `SYNOPSIS:`, `- The HypSumPrint function prints a summation formula in form of an`, ` equation.`, ` `, `- Each summation formula has its own number (see the user's reference`, ` manual). It is the same numbering as that in HypSum(shyp, nb).`, ` `, `- Whenever there is a conflict between the function name HypSumPrint and`, ` another name used in the same session, use the long form`, ` HYPERG['HypSumPrint'].`, ` `, `EXAMPLES:`, `> with(HYPERG):`, `> HypSumPrint( HYP[[a,b,c],[d,e],z], 2 );`, ` `, ` z, must be equal to, 1`, ` `, ` a, must be an integer <= 0`, ` `, ` 1 + a - b, must be = to, d`, ` `, ` 1 + a - c, must be = to, e`, ` `, ` HYP[[a, b, c], [d, e], z] =`, ` `, ` RF[1, - a] RF[b, - 1/2 a] RF[c, - 1/2 a] RF[b + c, - a]`, ` -------------------------------------------------------`, ` RF[1, - 1/2 a] RF[b, - a] RF[c, - a] RF[b + c, - 1/2 a]`, ` `, `SEE ALSO: HYPERG, HYP, IsHYP, HypSum, HypSumList, HypContig,`, ` HypContigPrint, HypConverg, HypTransf, HypTransfList,`, ` HypTransfPrint` ): ########## # File @(#) HypToRec (HYPERG PACKAGE) Mon Jun 23 14:32:27 METDST 1997 ########## `help/HYPERG/text/HypToRec` := TEXT( ` `, `FUNCTION: HypToRec - Zeilberger's algorithm`, ` `, `CALLING SEQUENCE:`, ` HypToRec(shyp, n, s, 'cert')`, ` HYPERG[HypToRec](shyp, n, s, 'cert')`, ` `, ` HypToRec(shyp, n, s, 'maxorder=m_o', 'cert')`, ` HYPERG[HypToRec](shyp, n, s, 'maxorder=m_o', 'cert')`, ` `, ` HypToRec(shyp, n, s, 'recorder=r_o', 'cert')`, ` HYPERG[HypToRec](shyp, n, s, 'recorder=r_o', 'cert')`, ` `, `PARAMETERS:`, ` shyp - a standard hypergeometric series`, ` n - a name`, ` s - a name`, ` m_o, r_o - integers`, ` cert - an optional name (formal parameter)`, ` `, `SYNOPSIS:`, `- This function is an implementation of Zeilberger's algorithm, computing`, ` a recurrence equation for the standard hypergeometric series shyp.`, ` `, `- The output 'rec(n)' is a linear recurrence equation with polynomial`, ` coefficients. The optional name 'cert' is called the certificate.`, ` `, `- The output rec(n) is a recurrence satisfied by the series shyp.`, ` The order of the recurrence is:`, ` o either less or equals to m_o (where the default value of m_o is 6),`, ` o either equals to r_o.`, ` `, `- If this algorithm can't deliver a such recurrence, then it returns`, ` the message 'No recurrence equation of order XXX'.`, ` `, `- Whenever there is a conflict between the function name HypToRec and`, ` another name used in the same session, use the form HYPERG['HypToRec'].`, ` `, `EXAMPLES:`, `> with(HYPERG):`, `> HypToRec( HYP[[a,b],[d],1], a, A );`, ` `, ` (d - 1 - a) A(a) + (b - d + 1 + a) A(a + 1) = 0`, ` `, `SEE ALSO: HYPERG, Gosper, Prove, SummandToRec, SumToRec` ): ########## # File @(#) HypToVHyp (HYPERG PACKAGE) Wed Sep 17 18:11:14 METDST 1997 ########## `help/HYPERG/text/HypToVHyp` := TEXT( ` `, `FUNCTION: HypToVHyp - convert hypergeometric series`, ` - into hypergeometric series in very-well-poised order`, ` `, `CALLING SEQUENCE:`, ` HypToVHyp( shyp )`, ` HYPERG[HypToVHyp]( shyp )`, ` `, `PARAMETERS:`, ` shyp - a hypergeometric series in standard notation`, ` `, `SYNOPSIS:`, `- This function tries to convert (if possible) a hypergeometric series`, ` into a hypergeometric series in well-poised order.`, ` `, `- If the convertion is impossible, the return value of the function is the`, ` initial hypergeometric series.`, ` `, `- Whenever there is a conflict between the function name HypToVHyp and`, ` another name used in the same session, use the form HYPERG['HypToVHyp'].`, ` `, `EXAMPLES:`, `> with(HYPERG):`, `> HypToVHyp( HYP[[a,a/2+1,b,c],[a/2,1+a-b,1+a-c],z] );`, ` `, ` VHYP[a, [b, c], z]`, ` `, `> HypToVHyp( HYP[[a,b,c],[d,e],z] );`, ` `, ` warning: not a Very-well poised hypergeometric series`, ` `, ` HYP[[a, b, c], [d, e], z]`, ` `, `SEE ALSO: HYPERG, HYP, IsHYP, VHYP, IsVHYP, VHypToHyp, HypConverg, HypEval` ): ########## # File @(#) HypTransf (HYPERG PACKAGE) Wed Apr 15 08:12:40 METDST 1998 ########## `help/HYPERG/text/HypTransf` := TEXT( ` `, `FUNCTION: HypTransf - Transformation formula in form of rules`, ` `, `CALLING SEQUENCE:`, ` HypTransf( shyp, nb )`, ` HYPERG[HypTransf]( shyp, nb )`, ` `, `PARAMETERS:`, ` shyp - a hypergeometric series in standard notation`, ` nb - a formula number`, ` `, `SYNOPSIS:`, `- The HypTransf function applies a transformation formula`, ` on a hypergeometric series.`, ` `, `- Each transformation formula has its own number (see details in the`, ` user's reference manual).`, ` `, `- Several formulas has 'special' parameters, so it can be useful to`, ` modify the parameters' position with the functions HypPermLow, HypPermUp`, ` or HypPermBoth before apply HypTransf.`, ` `, `- The HypTransf function also displays the condition(s) about the`, ` evaluation point and/or the parameters of hypergeometric series in order`, ` for the formula to be valid.`, ` `, `- Whenever there is a conflict between the function name HypTransf and`, ` another name used in the same session, use the form HYPERG['HypTransf'].`, ` `, `EXAMPLES:`, `> with(HYPERG):`, `> HypTransf( HYP[[a,b,c],[d,e],z], 7 );`, ` `, ` c, must be an integer <= 0`, ` `, ` z, must be equal to, 1`, ` `, ` RF[- b + e, - c] HYP[[c, b, d - a], [d, 1 + b - e + c], 1]`, ` ----------------------------------------------------------`, ` RF[e, - c]`, ` `, `SEE ALSO: HYPERG, HYP, IsHYP, HypTransfList, HypTransfPrint, HypContig,`, ` HypContigPrint, HypConverg, HypPerm, HypSum, HypSumList,`, ` HypSumPrint, MapList, MapApply` ): `help/HYPERG/text/T1101` := `help/HYPERG/text/HypTransf`: `help/HYPERG/text/T2103` := `help/HYPERG/text/HypTransf`: `help/HYPERG/text/T2104` := `help/HYPERG/text/HypTransf`: `help/HYPERG/text/T2106` := `help/HYPERG/text/HypTransf`: `help/HYPERG/text/T2107` := `help/HYPERG/text/HypTransf`: `help/HYPERG/text/T2110` := `help/HYPERG/text/HypTransf`: `help/HYPERG/text/T2111` := `help/HYPERG/text/HypTransf`: `help/HYPERG/text/T2112` := `help/HYPERG/text/HypTransf`: `help/HYPERG/text/T2131` := `help/HYPERG/text/HypTransf`: `help/HYPERG/text/T2133` := `help/HYPERG/text/HypTransf`: `help/HYPERG/text/T2134` := `help/HYPERG/text/HypTransf`: `help/HYPERG/text/T2135` := `help/HYPERG/text/HypTransf`: `help/HYPERG/text/T2136` := `help/HYPERG/text/HypTransf`: `help/HYPERG/text/T2137` := `help/HYPERG/text/HypTransf`: `help/HYPERG/text/T2138` := `help/HYPERG/text/HypTransf`: `help/HYPERG/text/T2139` := `help/HYPERG/text/HypTransf`: `help/HYPERG/text/T2140` := `help/HYPERG/text/HypTransf`: `help/HYPERG/text/T2141` := `help/HYPERG/text/HypTransf`: `help/HYPERG/text/T2163` := `help/HYPERG/text/HypTransf`: `help/HYPERG/text/T2191` := `help/HYPERG/text/HypTransf`: `help/HYPERG/text/T2192` := `help/HYPERG/text/HypTransf`: `help/HYPERG/text/T3204` := `help/HYPERG/text/HypTransf`: `help/HYPERG/text/T3205` := `help/HYPERG/text/HypTransf`: `help/HYPERG/text/T3206` := `help/HYPERG/text/HypTransf`: `help/HYPERG/text/T3207` := `help/HYPERG/text/HypTransf`: `help/HYPERG/text/T3231` := `help/HYPERG/text/HypTransf`: `help/HYPERG/text/T3234` := `help/HYPERG/text/HypTransf`: `help/HYPERG/text/T3235` := `help/HYPERG/text/HypTransf`: `help/HYPERG/text/T3236` := `help/HYPERG/text/HypTransf`: `help/HYPERG/text/T3237` := `help/HYPERG/text/HypTransf`: `help/HYPERG/text/T3239` := `help/HYPERG/text/HypTransf`: `help/HYPERG/text/T3240` := `help/HYPERG/text/HypTransf`: `help/HYPERG/text/T3261` := `help/HYPERG/text/HypTransf`: `help/HYPERG/text/T3262` := `help/HYPERG/text/HypTransf`: `help/HYPERG/text/T3263` := `help/HYPERG/text/HypTransf`: `help/HYPERG/text/T3264` := `help/HYPERG/text/HypTransf`: `help/HYPERG/text/T3267` := `help/HYPERG/text/HypTransf`: `help/HYPERG/text/T3268` := `help/HYPERG/text/HypTransf`: `help/HYPERG/text/T4301` := `help/HYPERG/text/HypTransf`: `help/HYPERG/text/T4302` := `help/HYPERG/text/HypTransf`: `help/HYPERG/text/T4303` := `help/HYPERG/text/HypTransf`: `help/HYPERG/text/T4304` := `help/HYPERG/text/HypTransf`: `help/HYPERG/text/T4306` := `help/HYPERG/text/HypTransf`: `help/HYPERG/text/T4309` := `help/HYPERG/text/HypTransf`: `help/HYPERG/text/T4310` := `help/HYPERG/text/HypTransf`: `help/HYPERG/text/T4312` := `help/HYPERG/text/HypTransf`: `help/HYPERG/text/T4331` := `help/HYPERG/text/HypTransf`: `help/HYPERG/text/T4332` := `help/HYPERG/text/HypTransf`: `help/HYPERG/text/T4362` := `help/HYPERG/text/HypTransf`: `help/HYPERG/text/T4391` := `help/HYPERG/text/HypTransf`: `help/HYPERG/text/T5401` := `help/HYPERG/text/HypTransf`: `help/HYPERG/text/T5402` := `help/HYPERG/text/HypTransf`: `help/HYPERG/text/T5403` := `help/HYPERG/text/HypTransf`: `help/HYPERG/text/T6501` := `help/HYPERG/text/HypTransf`: `help/HYPERG/text/T6531` := `help/HYPERG/text/HypTransf`: `help/HYPERG/text/T6532` := `help/HYPERG/text/HypTransf`: `help/HYPERG/text/T6533` := `help/HYPERG/text/HypTransf`: `help/HYPERG/text/T7631` := `help/HYPERG/text/HypTransf`: `help/HYPERG/text/T7632` := `help/HYPERG/text/HypTransf`: `help/HYPERG/text/T7633` := `help/HYPERG/text/HypTransf`: `help/HYPERG/text/T7634` := `help/HYPERG/text/HypTransf`: `help/HYPERG/text/T7635` := `help/HYPERG/text/HypTransf`: `help/HYPERG/text/T7636` := `help/HYPERG/text/HypTransf`: `help/HYPERG/text/T7637` := `help/HYPERG/text/HypTransf`: `help/HYPERG/text/T7691` := `help/HYPERG/text/HypTransf`: `help/HYPERG/text/T7692` := `help/HYPERG/text/HypTransf`: `help/HYPERG/text/T7693` := `help/HYPERG/text/HypTransf`: `help/HYPERG/text/T7694` := `help/HYPERG/text/HypTransf`: `help/HYPERG/text/T8731` := `help/HYPERG/text/HypTransf`: `help/HYPERG/text/T8732` := `help/HYPERG/text/HypTransf`: ########## # File @(#) HypTransfList (HYPERG PACKAGE) Mon Jun 15 08:04:13 METDST 1998 ########## `help/HYPERG/text/HypTransfList` := TEXT( ` `, `FUNCTION: HypTransfList - gives a list of applicable transform. formulas`, ` `, `CALLING SEQUENCE:`, ` HypTransfList( shyp )`, ` HYPERG[HypTransfList]( shyp )`, ` `, `PARAMETERS:`, ` shyp - a hypergeometric series in standard notation`, ` `, `SYNOPSIS:`, `- The HypTransfList function returns (for a given hypergeometric series)`, ` a list of applicable transformation formulas.`, ` `, `- See the user's reference manual for details on formula numbering.`, ` `, `- Whenever there is a conflict between the function name HypTransfList and`, ` another name used in the same session, use the long form`, ` HYPERG['HypTransfList'].`, ` `, `EXAMPLES:`, `> with(HYPERG):`, `> HypTransfList( HYP[[1,1],[2],z] );`, ` `, `[[T2103], [HypPermUp, [2, 1], T2103], [T2104], [HypPermUp, [2, 1], T2104],`, ` `, ` [T2136], [HypPermUp, [2, 1], T2136], [T2137], [HypPermUp, [2, 1], T2137]]`, ` `, `SEE ALSO: HYPERG, HYP, IsHYP, HypTransf, HypTransfPrint, HypContig,`, ` HypContigPrint, HypConverg, HypSum, HypSumList, HypSumPrint` ): ########## # File @(#) HypTransfPrint (HYPERG PACKAGE) Tue Aug 19 18:24:27 METDST 1997 ########## `help/HYPERG/text/HypTransfPrint` := TEXT( ` `, `FUNCTION: HypTransfPrint - Print a transformation formula`, ` - in form of an equation`, ` `, `CALLING SEQUENCE:`, ` HypTransfPrint( shyp, nb )`, ` HYPERG[HypTransfPrint]( shyp, nb )`, ` `, `PARAMETERS:`, ` shyp - a hypergeometric series in standard notation`, ` nb - a formula number`, ` `, `SYNOPSIS:`, `- The HypTransfPrint function prints a transformation formula in form`, ` of an equation.`, ` `, `- Each transformation formula has its own number (see details in`, ` the user's reference manual). It is the same numbering as that`, ` in HypTransf(shyp, nb).`, ` `, `- Whenever there is a conflict between the function name HypTransfPrint`, ` and another name used in the same session, use the long form`, ` HYPERG['HypTransfPrint'].`, ` `, `EXAMPLES:`, `> with(HYPERG):`, `> HypTransfPrint( HYP[[a,b,c],[d,e],z], 4 );`, ` `, ` z, must be equal to, 1`, ` `, ` HYP[[a, b, c], [d, e], z] = GAMMA(e) GAMMA(- a - b - c + d + e)`, ` `, ` HYP[[a, d - b, d - c], [d, - b - c + d + e], 1]/`, ` `, ` (GAMMA(- a + e) GAMMA(- b - c + d + e))`, ` `, `SEE ALSO: HYPERG, HYP, IsHYP, HypTransf, HypTransfList, HypContig,`, ` HypContigPrint, HypConverg, HypSum, HypSumList, HypSumPrint` ): ########## # File @(#) HypType (HYPERG PACKAGE) Thu Jul 9 08:07:35 METDST 1998 ########## `help/HYPERG/text/HypType` := TEXT( ` `, `FUNCTION: HypType - Print the type of a hypergeometric series`, ` `, `CALLING SEQUENCE:`, ` HypType( shyp )`, ` HYPERG[HypType]( shyp )`, ` `, `PARAMETERS:`, ` shyp - a hypergeometric series in standard notation (HYP or VHYP)`, ` `, `SYNOPSIS:`, `- The HypType function is used to know the type of a hypergeometric`, ` series ('well-poised', 'very-well-poised', 'nearly-well poised order',`, ` or 'ordinay').`, ` `, `- The function prints the type of the series, and the return value`, ` is always NULL.`, ` `, `- Whenever there is a conflict between the function name HypType and`, ` another name used in the same session, use the form HYPERG['HypType'].`, ` `, `EXAMPLES:`, `> with(HYPERG):`, `> # very-well poised order`, `> HypType( HYP[[-n,b,1+a/2,a],[a+1-b,a/2,a+1+n],z] );`, ` `, ` Very-well poised hypergeometric series`, ` `, `> # well-poised order`, `> HypType( HYP[[a,b,c,1],[a,a+1-c,a+1-b],z] );`, ` `, ` Well-poised hypergeometric series`, ` `, `> # nearly-poised order`, `> HypType( HYP[[x+1,-n-1/2,-n],[x-2*n,3/2],1] );`, ` `, ` Nearly-poised (first kind) hypergeometric series`, ` `, `> # very-well poised order`, `> HypType( VHYP[a,[b,2+c,d],z] );`, ` `, ` Very-well poised hypergeometric series`, ` `, `SEE ALSO: HYPERG, IsHYP, IsVHYP, HypConverg, HypEval, HypOrder, HypPerm,`, ` AddParam` ): ########## # File @(#) HypergToRec (HYPERG PACKAGE) Wed Feb 11 18:22:07 MET 1998 ########## `help/HYPERG/text/HypergToRec` := TEXT( ` `, `FUNCTION: HypergToRec - return a linear first-order homogeneous recurrence`, ` - satisfied by a hypergeometric term`, ` `, `CALLING SEQUENCE:`, ` HypergToRec(term, u(n))`, ` HYPERG[HypergToRec](term, u(n))`, ` `, `PARAMETERS:`, ` term - a hypergeometric term`, ` u,n - the name and the index of a sequence`, ` `, `SYNOPSIS:`, `- By definition of hypergeometric term, it is trivial to find a recurrence`, ` relation satisfied by a hypergeometric term:`, ` U(n+1)/U(n) = P(n)/Q(n) where P and Q are polynomials in n,`, ` so, P(n) * U(n) - Q(n) * U(n+1) = 0.`, ` `, `- The hypergeometric term must be a product of rational functions`, ` factorials, rising factorials, binomial coefficients and`, ` power functions.`, ` `, `- The output is a linear first-order homogeneous recurrence satisfied`, ` by the hypergeometric term.`, ` `, `- Whenever there is a conflict between the function name HypergToRec and`, ` another name used in the same session, use the long form`, ` HYPERG['HypergToRec'].`, ` `, `EXAMPLES:`, `> with(HYPERG):`, `> HypergToRec( binomial(3*k,k), T(k) );`, ` `, ` 3 (3 k + 1) (3 k + 2) T(k) - 2 (2 k + 1) (k + 1) T(k + 1) = 0`, ` `, `> HypergToRec( (-1)^n * RF[n,3] * 2^n / (n+b), U(n) );`, ` `, ` - 2 (n + 3) (n + b) U(n) - (n + 1 + b) n U(n + 1) = 0`, ` `, `SEE ALSO: HYPERG, IsHyperg` ): ########## # File @(#) IsHYP (HYPERG PACKAGE) Mon Mar 10 10:27:42 MET 1997 ########## `help/HYPERG/text/IsHYP` := TEXT( ` `, `FUNCTION: IsHYP - test if is a hypergeometric series`, ` `, `CALLING SEQUENCE:`, ` IsHYP(shyp)`, ` HYPERG[IsHYP](shyp)`, ` `, `PARAMETERS:`, ` shyp - one term`, ` `, `SYNOPSIS:`, `- The IsHYP function tests whether a term is a hypergeometric series.`, ` `, `- If a lower parameter is a negative or null integer, the function gives a`, ` warning.`, ` `, `- Whenever there is a conflict between the function name IsHYP and`, ` another name used in the same session, use the form HYPERG['IsHYP'].`, ` `, `EXAMPLES:`, `> with(HYPERG):`, `> IsHYP( HYP[[a,b,c],[d,e],z] );`, ` `, ` true`, ` `, `> IsHYP( HYP[[a,2,c],[d,-3],z] );`, ` `, ` warning HYP: denominator values must not be nonpositive integers`, ` `, ` true`, ` `, `SEE ALSO: HYPERG, HYP, VHYP, RF, HypConverg, HypDiff, HypEval, HypOrder,`, ` HypPerm, HypSimplify, HypToVHyp, AddParam, IsVHYP, IsRF` ): ########## # File @(#) IsRF (HYPERG PACKAGE) Mon Mar 10 10:27:42 MET 1997 ########## `help/HYPERG/text/IsRF` := TEXT( ` `, `FUNCTION: IsRF - test if is a rising factorial`, ` `, `CALLING SEQUENCE:`, ` IsRF(rf)`, ` HYPERG[IsRF](rf)`, ` `, `PARAMETERS:`, ` rf - one term`, ` `, `SYNOPSIS:`, `- The IsRF function tests whether a term is a rising factorial.`, ` `, `- Whenever there is a conflict between the function name IsRF and`, ` another name used in the same session, use the long form HYPERG['IsRF'].`, ` `, `EXAMPLES:`, `> with(HYPERG):`, `> IsRF( RF[a,b] );`, ` `, ` true`, `> IsRF( RF[a,-3] ); `, ` `, ` true`, ` `, `> IsRF( RF[a,3.2] );`, ` `, ` warning RF: the second argument is not an integer, 3.2`, ` `, ` false`, ` `, `SEE ALSO: HYPERG, RF, RfEval, IsHYP, IsVHYP` ): ########## # File @(#) IsVHYP (HYPERG PACKAGE) Wed Sep 17 08:04:20 METDST 1997 ########## `help/HYPERG/text/IsVHYP` := TEXT( ` `, `FUNCTION: IsVHYP - test if is a hypergeometric series`, ` - in very-well-poised order`, ` `, `CALLING SEQUENCE:`, ` IsVHYP(hyp)`, ` HYPERG[IsVHYP](hyp)`, ` `, `PARAMETERS:`, ` hyp - one term`, ` `, `SYNOPSIS:`, `- The IsVHYP function tests whether a term is a hypergeometric series in`, ` 'very-well-poised' order.`, ` `, `- If a lower parameter is a negative or null integer, the function gives a`, ` warning.`, ` `, `- Whenever there is a conflict between the function name IsVHYP and`, ` another name used in the same session, use the form HYPERG['IsVHYP'].`, ` `, `EXAMPLES:`, `> with(HYPERG):`, `> v1 := VHYP[a,[b,c],z];`, ` `, ` v1 := VHYP[a, [b, c], z]`, ` `, `> IsVHYP( v1 );`, ` `, ` true`, ` `, `> v2 := VHYP[-3,[2,4,-3],z];`, ` `, ` v2 := VHYP[-3, [2, 4, -3], z]`, ` `, `> IsVHYP( v2 );`, ` `, ` false`, ` `, `SEE ALSO: HYPERG, VHYP, HYP, RF, HypConverg, HypDiff, HypEval, VHypToHyp,`, ` HypToVHyp, IsHYP, IsRF` ): ########## # File @(#) IsHyperg (HYPERG PACKAGE) Fri Feb 27 08:22:01 MET 1998 ########## `help/HYPERG/text/IsHyperg` := TEXT( ` `, `FUNCTION: IsHyperg - test if is a hypergeometric term`, ` `, `CALLING SEQUENCE:`, ` IsHyperg(s,n)`, ` HYPERG[IsHyperg](s,n)`, ` `, `PARAMETERS:`, ` s - a term (considered as a sequence)`, ` n - the index of the sequence`, ` `, `SYNOPSIS:`, `- The IsHyperg function tests whether a sequence is hypergeometric in n.`, ` `, `- Whenever there is a conflict between the function name IsHyperg and`, ` another name used in the same session, use the form HYPERG['IsHyperg'].`, ` `, `EXAMPLES:`, `> with(HYPERG):`, `> IsHyperg( 2^p*p!, p );`, ` `, ` true`, ` `, `> IsHyperg( sin(n), n );`, ` false`, ` `, `SEE ALSO: HYPERG, HYP, IsHYP, VHYP, IsVHYP, RF, IsRF, HypergToRec` ): ########## # File @(#) Lim (HYPERG PACKAGE) Fri Sep 5 16:11:12 METDST 1997 ########## `help/HYPERG/text/Lim` := TEXT( ` `, `FUNCTION: Lim - compute formal limit of hypergeometric expressions`, ` `, `CALLING SEQUENCE:`, ` Lim( f, x=a )`, ` HYPERG[Lim]( f, x=a )`, ` `, `PARAMETERS:`, ` f - an algebraic expression`, ` x - a name`, ` a - an algebraic expression (limit point, possibly + or -infinity)`, ` `, `SYNOPSIS:`, `- The Lim function attempts to compute the limiting value of f as x`, ` approaches a.`, ` `, `- If Lim cannot find a closed form for the limit, then the prettyprinter`, ` displays the limit function using a two-dimensional format (with an`, ` asympotic estimate for f).`, ` `, `- Whenever there is a conflict between the function name Lim and`, ` another name used in the same session, use the long form HYPERG['Lim'].`, ` `, `EXAMPLES:`, `> with(HYPERG):`, `> Lim( HYP[[a,b,-n],[c,1+a+b-c-n],1], b=infinity );`, ` `, ` HYP[[a, - n], [c], 1]`, ` `, `> Lim( HYP[[a1,a2,lbd*u],[b1,b2],z/lbd], lbd=infinity );`, ` `, ` HYP[[a1, a2], [b1, b2], u z]`, ` `, `> Lim( GAMMA(a+m)/GAMMA(b+m), m=infinity );`, ` `, ` (a - b)`, ` limit m`, ` m -> infinity`, ` `, `SEE ALSO: HYPERG, HYP, IsHYP, HypEval, RfEval` ): ########## # File @(#) Map (HYPERG PACKAGE) Fri Sep 19 08:16:04 METDST 1997 ########## `help/HYPERG/text/Map` := TEXT( ` `, `FUNCTIONS: MapList & MapApply`, ` - Functions for controlled application of rules and functions`, ` `, `CALLING SEQUENCE:`, ` MapList( expr )`, ` HYPERG[MapList]( expr )`, ` `, ` MapList( expr, level )`, ` HYPERG[MapList]( expr, level )`, ` `, ` MapApply( fun, pos, expr, seq_args )`, ` HYPERG[MapApply]( fun, pos, expr, seq_args )`, ` `, `PARAMETERS:`, ` expr - any expression`, ` level - an optional positive integer`, ` fun - a function`, ` pos - a set of list of integers`, ` seq_args - an optional sequence of parameters`, ` `, `SYNOPSIS:`, `- The MapList function returns a set of subexpressions of 'expr'`, ` together with their respective positions in 'expr'. You can choose the`, ` depth in the analysis expression with 'level' (the default value is 1).`, ` `, `- This helps to apply rules or functions to specific subexpressions with`, ` MapApply (see below).`, ` `, `- Let 'seq_args' be the following sequence a_1, a_2, a_3, ..., a_n and`, ` let 'pos' be the following set {p_1,p_2,...,p_k} where p_i is a list of`, ` integers. Let 'pi' be [e1,e2,...,eS] (for example), then the MapApply`, ` function applies the 'fun' function to the following subexpression`, ` op(e1,op(e2,...,op(eS,expr)...)) with the optional arguments a_1, a_2,`, ` a_3, ... and a_n.`, ` `, `- Whenever there is a conflict between a function name MapApply or`, ` MapList and another name used in the same session, use the long form`, ` HYPERG['MapApply'] or HYPERG['MapList'].`, ` `, `EXAMPLES:`, `> with(HYPERG):`, `> expr := RF[a,3] * HYP[[a,b,c],[d,e],z] * RF[b,-2]:`, `> MapList( expr );`, ` `, ` {[RF[a, 3], [1]], [HYP[[a, b, c], [d, e], z], [2]], [RF[b, -2], [3]]}`, ` `, `> MapApply( RfEval, {[1],[3]}, expr );`, ` `, ` a (a + 1) (a + 2) HYP[[a, b, c], [d, e], z]`, ` -------------------------------------------`, ` (b - 2) (b - 1)`, ` `, `> exprbis := HYP[[a,b],[e],1] + HYP[[a,c],[d],1]:`, `> MapList( exprbis );`, ` `, ` {[HYP[[a, b], [e], 1], [1]], [HYP[[a, c], [d], 1], [2]]}`, ` `, `> # apply Vandermonde's theorem (S2101) to the second term`, `> res := MapApply( HypSum, {[2]}, exprbis, 1 );`, ` `, ` c, must be an integer <= 0`, ` `, ` RF[d - a, - c]`, ` res := HYP[[a, b], [e], 1] + --------------`, ` RF[d, - c]`, ` `, `> MapList( res, 2 );`, ` `, ` 1`, ` {[HYP[[a, b], [e], 1], [1]], [[RF[d-a,-c], [2, 1]], [--------, [2, 2]]]}`, ` RF[d,-c]`, ` `, `> MapApply( RfEval, {[2,2]}, res );`, ` `, ` RF[d - a, - c] GAMMA(d)`, ` HYP[[a, b], [e], 1] + -----------------------`, ` GAMMA(d - c)`, ` `, `SEE ALSO: HYPERG, HypEval, RfEval` ): `help/HYPERG/text/MapApply` := `help/HYPERG/text/Map`: `help/HYPERG/text/MapList` := `help/HYPERG/text/Map`: ########## # File @(#) PolySolRec (HYPERG PACKAGE) Mon Jun 23 14:32:27 METDST 1997 ########## `help/HYPERG/text/PolySolRec` := TEXT( ` `, `FUNCTION: PolySolRec - linear recurrence equation solver`, ` - polynomial solutions`, ` `, `CALLING SEQUENCE:`, ` PolySolRec(eqn, u(n))`, ` HYPERG[PolySolRec](eq, u(n))`, ` `, ` PolySolRec(eqn, u(n), inits)`, ` HYPERG[PolySolRec](eq, u(n), inits)`, ` `, `PARAMETERS:`, ` eqn - a linear recurrence equation with polynomial coefficients`, ` u,n - the name and the index of the recurrence`, ` inits - a set of initial conditions`, ` `, `SYNOPSIS:`, `- The function PolySolRec finds all polynomial solutions of the recurrence`, ` relation.`, ` `, `- The first argument should be a single recurrence equation with`, ` polynomial coefficients. This recurrence isn't necessarily homogeneous.`, ` `, ` Any expressions which is not an equation will be understood to be equal`, ` to zero.`, ` `, `- The second argument indicates the sequence that PolySolRec should solve`, ` for. A sequence is represented by a name and an index.`, ` `, `- The output is a polynom in n with constant coefficients _x0, _x1, ...`, ` `, `- The optional inits argument is a set of initial conditions. Each one`, ` may be specified in the following way: u(a)=v. If insufficient boundary`, ` conditions are given, PolySolRec uses symbolic names as default values.`, ` `, `- If PolySolRec is unable to compute a polynomial solution, it returns the`, ` message 'No polynomial solution'. This means that there is no solution.`, ` `, `- Whenever there is a conflict between the function name PolySolRec and`, ` another name used in the same session, use the form HYPERG['PolySolRec'].`, ` `, `EXAMPLES:`, `> with(HYPERG):`, `> PolySolRec( 3*U(n+2)-2*U(n+1)-U(n)=-1, U(n) );`, ` `, ` _x0 - 1/4 n`, ` `, `> PolySolRec( n*U(n+1)-(n+8)*U(n), U(n) );`, ` `, ` _x8 n (n + 7) (n + 6) (n + 5) (n + 4) (n + 3) (n + 2) (1 + n)`, ` `, `> PolySolRec( r(n+2)-2*r(n+1)+r(n)=2, r(n), {r(0)=-1,r(1)=m} );`, ` `, ` 2`, ` - 1 + m n + n `, ` `, `SEE ALSO: HYPERG, SimplifyRec, ShiftRec, SubsRec, CheckRec, GenRec,`, ` RatioSolRec, HypSolRec` ): ########## # File @(#) Prove (HYPERG PACKAGE) Mon Jun 23 14:32:27 METDST 1997 ########## `help/HYPERG/text/Prove` := TEXT( ` `, `FUNCTION: Prove - Zeilberger's algorithm (automatic proof)`, ` `, `CALLING SEQUENCE:`, ` Prove(F, k, n)`, ` HYPERG[Prove](F, k, n)`, ` `, ` Prove(F, k, n, 'filename=fname')`, ` HYPERG[Prove](F, k, n, 'filename=fname')`, ` `, ` Prove(F, k, n, 'mode=out')`, ` HYPERG[Prove](F, k, n, 'mode=out')`, ` `, `PARAMETERS:`, ` F - a summand`, ` k, - a name`, ` n, - a name`, ` fname - a (optional) name`, ` out - a (optional) name`, ` `, `SYNOPSIS:`, `- This function is similar of 'SumToRec' function but writes a proof`, ` in a txt or latex file.`, ` `, `- The first option is the output file name, (by default, 'HYPERG.proof').`, ` `, `- The other option is the file type: txt or latex (the default one is txt)`, ` `, `- This function is an implementation of Zeilberger's algorithm, computing`, ` a recurrence equation for the sum`, ` `, ` -----`, ` \\`, ` SUM(n) := a := ) F(n, k)`, ` /`, ` -----`, ` k`, ` `, `- The required condition is that F(n,k) is hypergeometric in n and k.`, ` `, `- Whenever there is a conflict between the function name Prove and`, ` another name used in the same session, use the form HYPERG['Prove'].`, ` `, `EXAMPLES:`, `> with(HYPERG):`, `> Prove(binomial(n,k),k,n);`, ` `, ` Creating automatic proof in file HYPERG.proof`, ` `, `> Prove(binomial(x,k)*binomial(y,n-k),k,n,'Myproof');`, ` `, ` Creating automatic proof in file Myproof`, ` `, `SEE ALSO: HYPERG, Gosper, HypToRec, SummandToRec, SumToRec` ): ########## # File @(#) RatioSolRec (HYPERG PACKAGE) Fri Jun 27 09:43:58 METDST 1997 ########## `help/HYPERG/text/RatioSolRec` := TEXT( ` `, `FUNCTION: RatioSolRec - linear recurrence equation solver`, ` - rational solutions`, ` `, `CALLING SEQUENCE:`, ` RatioSolRec(eqn, u(n))`, ` HYPERG[RatioSolRec](eq, u(n))`, ` `, ` RatioSolRec(eqn, u(n), inits)`, ` HYPERG[RatioSolRec](eq, u(n), inits)`, ` `, `PARAMETERS:`, ` eqn - a linear recurrence equation with polynomial coefficients`, ` u,n - the name and the index of the recurrence`, ` inits - a set of initial conditions`, ` `, `SYNOPSIS:`, `- The function RatioSolRec finds all rational solutions of the recurrence`, ` relation.`, ` `, `- The first argument should be a single recurrence equation with`, ` polynomial coefficients. This recurrence isn't necessarily homogeneous.`, ` `, ` Any expressions which is not an equation will be understood to be equal`, ` to zero.`, ` `, `- The second argument indicates the sequence that RatioSolRec should`, ` solve for. A sequence is represented by a name and an index.`, ` `, `- The output is a rational function in n with constant coefficients _x0,`, ` _x1, _x2, _x3, ...`, ` `, `- The optional third argument is a set of initial conditions. Each one`, ` may be specified in the following way: u(a)=v. If insufficient boundary`, ` conditions are given, RatioSolRec uses symbolic names as default values.`, ` `, `- If RatioSolRec is unable to compute a rational solution, it returns`, ` the message 'No rational solution'. This means that there is no`, ` solution.`, ` `, `- Whenever there is a conflict between the function name RatioSolRec and`, ` another name used in the same session, use the long form`, ` HYPERG['RatioSolRec'].`, ` `, `EXAMPLES:`, `> with(HYPERG):`, `> RatioSolRec( (n+4)*U(n+2)+U(n+1)-(n+1)*U(n), U(n) );`, ` `, ` _x0`, ` ---------------`, ` (n + 2) (n + 1)`, ` `, `> RatioSolRec( (n+4)*U(n+2)+U(n+1)-(n+1)*U(n), U(n), {U(1)=1} );`, ` `, ` 6`, ` ---------------`, ` (n + 2) (n + 1)`, ` `, `SEE ALSO: HYPERG, SimplifyRec, ShiftRec, SubsRec, CheckRec, GenRec,`, ` PolySolRec, HypSolRec` ): ########## # File @(#) RecOrder (HYPERG PACKAGE) Thu Apr 9 08:34:18 METDST 1998 ########## `help/HYPERG/text/RecOrder` := TEXT( ` `, `FUNCTION: RecOrder - computes the order of a recurrence equation`, ` `, `CALLING SEQUENCE:`, ` RecOrder( rec, u(n) )`, ` HYPERG[RecOrder]( rec, u(n) )`, ` `, `PARAMETERS:`, ` rec - a linear recurrence equation with polynomial coefficients`, ` u,n - the name and the index of the recurrence`, ` `, `SYNOPSIS:`, `- The RecOrder function takes as input a recurrence equation 'rec'`, ` and a sequence 'u(n)'. It computes the order of the recurrence equation.`, ` `, `- Whenever there is a conflict between the function name RecOrder and`, ` another name use in the same session, use the form HYPERG['RecOrder'].`, ` `, `EXAMPLES:`, `> with(HYPERG):`, `> RecOrder( U(n-1)+n*U(n+1)+3*n*U(n+2)=2*n, U(n) );`, ` `, ` 3`, ` `, `SEE ALSO: HYPERG, SubsRec, CheckRec, SimplifyRec, ShiftRec,`, ` Ishomog, Homog, GenRec, HypergToRec` ): ########## # File @(#) RfEval (HYPERG PACKAGE) Wed May 20 08:17:04 METDST 1998 ########## `help/HYPERG/text/RfEval` := TEXT( ` `, `FUNCTION: RfEval - Rule that evals rising factorials`, ` `, `CALLING SEQUENCE:`, ` RfEval( expr )`, ` HYPERG[RfEval]( expr )`, ` `, `PARAMETERS:`, ` expr - any expression`, ` `, `SYNOPSIS:`, `- The RfEval function evals (if possible) rising factorial (RF[]).`, ` `, `- Whenever there is a conflict between the function name RfEval and`, ` another name used in the same session, use the form HYPERG['RfEval'].`, ` `, `EXAMPLES:`, `> with(HYPERG):`, `> RfEval( RF[a,k] );`, ` `, ` GAMMA(a + k)`, ` ------------`, ` GAMMA(a)`, ` `, `> RfEval( RF[b,-3] * RF[a,4] );`, ` `, ` a (a + 1) (a + 2) (a + 3)`, ` -------------------------`, ` (b - 3) (b - 2) (b - 1)`, ` `, `> RfEval( RF[4,-4] ); # 1/((4-1)*(4-2)*(4-3)*(4-4))`, `Error, (in HYPERG/RfEval/basic) division by zero`, ` `, `> RfEval( RF[4,3] ); # 4*(4+1)*(4+2) = 120`, ` `, ` 120`, `> RfEval( RF[0,k] );`, ` `, ` RF[0, k]`, ` `, `> RfEval( RF[0,0] );`, ` `, ` 1`, ` `, `> RfEval( RF[0,-3] );`, ` `, ` -1/6`, ` `, `> RfEval( RF[0,5] );`, ` `, ` 0`, ` `, `SEE ALSO: HYPERG, RF, IsRF, HYP, IsHYP, VHYP, IsVHYP, HypEval, HypSimplify` ): ########## # File @(#) Rules (HYPERG PACKAGE) Tue May 5 07:55:33 METDST 1998 ########## `help/HYPERG/text/Rules` := TEXT( ` `, `FUNCTIONS: BaseSplit Ext1 Ext2 Inv`, ` Linear1 Linear2 Neg1 Neg2`, ` Split Trans`, ` - Rules to handle any factorial expression (Gamma function,`, ` - and Rising Factorial)`, ` `, `CALLING SEQUENCE:`, ` BaseSplit( expr, split ) HYPERG[BaseSplit]( expr, split )`, ` Ext1( expr, top_ext ) HYPERG[Ext1]( expr, top_ext )`, ` Ext2( expr, bottom_ext ) HYPERG[Ext2]( expr, bottom_ext )`, ` Inv( expr ) HYPERG[Inv]( expr )`, ` Linear1( expr ) HYPERG[Linear1]( expr )`, ` Linear2( expr ) HYPERG[Linear2]( expr )`, ` Neg1( expr ) HYPERG[Neg1]( expr )`, ` Neg2( expr ) HYPERG[Neg2]( expr )`, ` Trans( expr ) HYPERG[Trans]( expr )`, ` Split( expr, bottom_split ) HYPERG[Split]( expr, bottom_split )`, ` `, `PARAMETERS:`, ` expr - any (factorial) expression`, ` split, top_ext, bottom_ext, bottom_split - an integer (or a name)`, ` `, `SYNOPSIS:`, `- These functions apply basic rules:`, ` `, ` x BaseSplit( expr, split )`, ` o RF[a,n] = split^n * product(RF[(a+k)/split,n/split], k=0..split-1);`, ` o GAMMA(a) = split^(a-1/2) * (2*Pi)^((1-split)/2)`, ` * product(GAMMA((a+k)/split),k=0..split-1);`, ` `, ` x Ext1( expr, top_ext )`, ` o RF[a,n] = GAMMA(a+n)/GAMMA(a) if top_ext = infinity`, ` o RF[a,n] = RF[a,top_ext+n]/RF[a+n,top_ext] if top_ext in an integer`, ` `, ` x Ext2( expr, bottom_ext )`, ` o RF[a,n] = RF[a-bottom_ext,bottom_ext+n]/RF[a-bottom_ext,bottom_ext]`, ` o GAMMA(a) = GAMMA(a-bottom_ext)*RF[a-bottom_ext,bottom_ext]`, ` `, ` x Inv( expr )`, ` o GAMMA(z) = Pi/sin(Pi*z)/GAMMA(1-z)`, ` `, ` x Linear1( expr )`, ` o RF[a,n] = a*RF[a+1,n-1]`, ` o GAMMA(a) = (a-1)*GAMMA(a-1)`, ` `, ` x Linear2( expr )`, ` o RF[a,n] = (a+n-1)*RF[a,n-1]`, ` `, ` x Neg1( expr )`, ` o RF[a,n] = 1/RF[a+n,-n]`, ` `, ` x Neg2( expr )`, ` o RF[a,n] = (-1)^n/RF[1-a,-n]`, ` `, ` x Trans( expr )`, ` o RF[a,n] = (-1)^n*RF[1-n-a,n]`, ` `, ` x Split( expr, bottom_split )`, ` o RF[a,n] = RF[a,bottom_split]*RF[a+bottom_split,n-bottom_split]`, ` o GAMMA(a) = GAMMA(a+bottom_split)/RF[a,bottom_split]`, ` `, `- Whenever there is a conflict between a function name XX and another name`, ` used in the same session, use the long form HYPERG['XX']`, ` `, `EXAMPLES:`, `> with(HYPERG):`, `> BaseSplit( GAMMA(2*c), 3 );`, ` `, ` (2 c - 1/2)`, ` 3 GAMMA(2/3 c) GAMMA(2/3 c + 1/3) GAMMA(2/3 c + 2/3)`, ` 1/2 ---------------------------------------------------------------`, ` Pi`, ` `, `> Neg1( 3/RF[a,n] );`, ` `, ` 3 RF[a + n, - n]`, ` `, `> Split( a*GAMMA(a)*RF[a,b]*GAMMA(b), m );`, ` `, ` a GAMMA(a + m) GAMMA(b + m) RF[a + m, b - m]`, ` --------------------------------------------`, ` RF[b, m]`, ` `, `SEE ALSO: HYPERG, HypEval, HypSimplify, RfEval` ): `help/HYPERG/text/BaseSplit` := `help/HYPERG/text/Rules`: `help/HYPERG/text/Ext1` := `help/HYPERG/text/Rules`: `help/HYPERG/text/Ext2` := `help/HYPERG/text/Rules`: `help/HYPERG/text/Inv` := `help/HYPERG/text/Rules`: `help/HYPERG/text/Linear1` := `help/HYPERG/text/Rules`: `help/HYPERG/text/Linear2` := `help/HYPERG/text/Rules`: `help/HYPERG/text/Neg1` := `help/HYPERG/text/Rules`: `help/HYPERG/text/Neg2` := `help/HYPERG/text/Rules`: `help/HYPERG/text/Split` := `help/HYPERG/text/Rules`: `help/HYPERG/text/Trans` := `help/HYPERG/text/Rules`: ########## # File @(#) ShiftRec (HYPERG PACKAGE) Fri Mar 27 08:37:28 MET 1998 ########## `help/HYPERG/text/ShiftRec` := TEXT( ` `, `FUNCTION: ShiftRec - shifts a recurrence equation`, ` `, `CALLING SEQUENCE:`, ` ShiftRec( rec, u(n) )`, ` HYPERG[ShiftRec]( rec, u(n) )`, ` `, ` ShiftRec( rec, u(n), shift )`, ` HYPERG[ShiftRec]( rec, u(n), shift )`, ` `, `PARAMETERS:`, ` rec - a linear recurrence equation with polynomial coefficients`, ` u,n - the name and the index of the recurrence`, ` shift - an integer`, ` `, `SYNOPSIS:`, `- The ShiftRec function shifts the recurrence equation. It returns the`, ` recurrence with variable 'n' replaced by variable 'n + shift'.`, ` `, `- The optional third argument indicates the shift value. It can be`, ` a positive or negative value (for a forward or a backward shift). The`, ` default value is 1. `, ` `, `- Whenever there is a conflict between the function name ShiftRec and`, ` another name use in the same session, use the form HYPERG['ShiftRec'].`, ` `, `EXAMPLES:`, `> with(HYPERG):`, `> ShiftRec( (n+2)*U(n+1)-n*U(n)=n, U(n) );`, ` `, ` (- n - 1) U(n + 1) + (n + 3) U(n + 2) = n + 1`, ` `, `> ShiftRec( U(n-1)+n*U(n+1)+3*n*U(n+2)=2*n, U(n), 3 );`, ` `, ` U(n + 2) + (n + 3) U(n + 4) + (3 n + 9) U(n + 5) = 2 n + 6`, ` `, `SEE ALSO: HYPERG, RecOrder, SubsRec, CheckRec, SimplifyRec,`, ` Ishomog, Homog, GenRec, HypergToRec` ): ########## # File @(#) SimplifyRec (HYPERG PACKAGE) Fri Mar 27 08:37:28 MET 1998 ########## `help/HYPERG/text/SimplifyRec` := TEXT( ` `, `FUNCTION: SimplifyRec - simplifies a recurrence equation`, ` `, `CALLING SEQUENCE:`, ` SimplifyRec( rec, u(n) )`, ` HYPERG[SimplifyRec]( rec, u(n) )`, ` `, ` SimplifyRec( rec, u(n), 'factor' )`, ` HYPERG[SimplifyRec]( rec, u(n), 'factor' )`, ` `, `PARAMETERS:`, ` rec - a linear recurrence equation with polynomial coefficients`, ` u,n - the name and the index of the recurrence`, ` `, `SYNOPSIS:`, `- The SimplifyRec function simplifies the recurrence equation. It takes`, ` as input a recurrence equation 'rec' and a sequence 'u(n)' and makes a`, ` recurrence relation simpler: combines equal recurrence terms and factors`, ` the polynomial coefficients.`, ` `, `- The 'factor' option is used to delete factors not dependent`, ` of the sequence 'u(n)'.`, ` `, `- Whenever there is a conflict between the function name SimplifyRec and`, ` another name use in the same session, use the form HYPERG['SimplifyRec'].`, ` `, `EXAMPLES:`, `> with(HYPERG):`, `> SimplifyRec( U(n)+U(n+2)+n*U(n)=3*n, U(n) );`, ` `, ` (n + 1) U(n) + U(n + 2) = 3 n`, ` `, `> SimplifyRec( (-1+4*n)*(n-2)*C(n)+(n-2)*C(n+2)=-3*n^2+3*n+6,`, ` C(n), 'factor');`, ` `, ` (- 1 + 4 n) C(n) + C(n + 2) = - 3 n - 3,`, ` `, `SEE ALSO: HYPERG, RecOrder, CheckRec, ShiftRec, Ishomog, Homog, GenRec,`, ` HypergToRec` ): ########## # File @(#) SubsRec (HYPERG PACKAGE) Tue Mar 31 08:04:52 METDST 1998 ########## `help/HYPERG/text/SubsRec` := TEXT( ` `, `FUNCTION: SubsRec - substitutes (in a recurrence relation)`, ` - the sequence by an expression `, ` `, `CALLING SEQUENCE:`, ` `, ` SubsRec( rec, u(n), expr )`, ` HYPERG[SubsRec]( rec, u(n), expr )`, ` `, `PARAMETERS:`, ` rec - a linear recurrence equation with polynomial coefficients`, ` u,n - the name and the index of the recurrence`, ` expr - an expression`, ` `, `SYNOPSIS:`, `- The SubsRec function substitutes (in the recurrence relation) the`, ` sequence 'u(n)' by the expression 'expr'.`, ` `, `- The 'expr' expression must not involve the sequence u(n).`, ` `, `- Whenever there is a conflict between the function name SubsRec and`, ` another name use in the same session, use the form HYPERG['SubsRec'].`, ` `, `EXAMPLES:`, `> with(HYPERG):`, `> rec := SubsRec( (n+2)*U(n+1)-n*U(n)=n, U(n), V(n-1)*n ):`, `> SimplifyRec( rec, V(n) );`, ` `, ` 2`, ` (n + 2) V(n) (n + 1) - n V(n - 1) = n`, ` `, `> SubsRec( (n+2)*U(n+1)-n*U(n)=n, U(n), 2^n );`, ` `, ` n n`, ` n 2 + 4 2 = n`, ` `, `SEE ALSO: HYPERG, RecOrder, CheckRec, SimplifyRec, ShiftRec,`, ` Ishomog, Homog, GenRec, HypergToRec` ): ########## # File @(#) SumToHyp (HYPERG PACKAGE) Mon Mar 10 08:27:42 MET 1997 ########## `help/HYPERG/text/SumToHyp` := TEXT( ` `, `FUNCTION: SumToHyp - convert summations into hypergeometric series`, ` `, `CALLING SEQUENCE:`, ` SumToHyp( expr )`, ` HYPERG[SumToHyp]( expr )`, ` `, `PARAMETERS:`, ` expr - a summation (Sum)`, ` `, `SYNOPSIS:`, `- The SumToHyp function converts (if possible) a Sum into hypergeometric`, ` standard notation (precisely into an expression involving`, ` a hypergeometric series with real or complex parameters).`, ` `, `- It also applies the HypOrder function to order the parameters of the`, ` hypergeometric series in 'well-poised', 'very-well-poised' or`, ` 'nearly-poised' order.`, ` `, `- Whenever there is a conflict between the function name SumToHyp and`, ` another name used in the same session, use the form HYPERG['SumToHyp'].`, ` `, `EXAMPLES:`, `> with(HYPERG):`, `> SumToHyp( Sum((-1)^k*binomial(2*n,k)^2,k=0..infinity) );`, ` `, ` HYP[[- 2 n, - 2 n], [1], -1]`, ` `, `> SumToHyp( Sum((k^2+4)/(k+2),k) );`, ` `, ` 2 HYP[[1 - 2 I, 2, 1 + 2 I, 1], [- 2 I, 3, 2 I], 1]`, ` `, `SEE ALSO: HYPERG, HYP, IsHYP, HypConverg, HypEval` ): ########## # File @(#) SummandToRec (HYPERG PACKAGE) Fri Aug 14 08:43:57 METDST 1998 ########## `help/HYPERG/text/SummandToRec` := TEXT( ` `, `FUNCTION: SummandToRec - Zeilberger's algorithm`, ` `, `CALLING SEQUENCE:`, ` SummandToRec(s, k, n, F, G, 'cert')`, ` HYPERG[SummandToRec](s, k, n, F, G, 'cert')`, ` `, ` SummandToRec(s, k, n, F, G, 'maxorder=m_o', 'cert')`, ` HYPERG[SummandToRec](s, k, n, F, G, 'maxorder=m_o', 'cert')`, ` `, ` SummandToRec(s, k, n, F, G, 'recorder=r_o', 'cert')`, ` HYPERG[SummandToRec](s, k, n, F, G, 'recorder=r_o', 'cert')`, ` `, `PARAMETERS:`, ` s - a summand`, ` k, n - names`, ` F,G, - names`, ` m_o, r_o - integers`, ` cert - an optional name (formal parameter)`, ` `, `SYNOPSIS:`, `- This function is an implementation of Zeilberger's algorithm, computing`, ` a recurrence equation for the summand 's'.`, ` `, `- The required condition is that the summand is hypergeometric in n and k.`, ` `, `- The output 'rec(n)' is a linear recurrence equation with polynomial`, ` coefficients such that:`, ` `, ` rec(n) F(n,k) = G(n, k + 1) - G(n, k),`, ` `, ` where G(n,k)=cert(n,k)*F(n,k).`, ` `, `- The optional name cert(n,k) is called the certificate.`, ` `, `- The output rec(n) is a recurrence satisfied by s(n).`, ` The order of the recurrence is:`, ` o either less or equals to m_o (where the default value of m_o is 6),`, ` o either equals to r_o.`, ` `, `- If this algorithm can't deliver a such recurrence, then it returns`, ` the message 'No recurrence equation of order XXX'.`, ` `, `- Whenever there is a conflict between the function name SummandToRec`, ` and another name used in the same session, use the long form`, ` HYPERG['SummandToRec'].`, ` `, `EXAMPLES:`, `> with(HYPERG):`, `> SummandToRec(k*binomial(2*n+1,2*k+1),k,n,F,G,'certificate');`, ` `, ` - 4 n (2 n + 1) F(n, k) + n (2 n - 1) F(n + 1, k) = G(n, k + 1) - G(n, k)`, ` `, `> certificate;`, ` `, ` 2`, ` (2 k + 1) (k - 1) (- 6 n - 1 - 7 n + 4 n k + 2 k)`, ` --------------------------------------------------`, ` (- n - 1 + k) (- 2 n - 1 + 2 k)`, ` `, `SEE ALSO: HYPERG, Gosper, HypToRec, Prove, SumToRec` ): ########## # File @(#) SumToRec (HYPERG PACKAGE) Mon Jun 23 14:32:27 METDST 1997 ########## `help/HYPERG/text/SumToRec` := TEXT( ` `, `FUNCTION: SumToRec - Zeilberger's algorithm`, ` `, `CALLING SEQUENCE:`, ` SumToRec(a, n, s, 'cert')`, ` HYPERG[SumToRec](a, n, s, 'cert')`, ` `, ` SumToRec(a, n, s, 'maxorder=m_o', 'cert')`, ` HYPERG[SumToRec](a, n, s, 'maxorder=m_o', 'cert')`, ` `, ` SumToRec(a, n, s, 'recorder=r_o', 'cert')`, ` HYPERG[SumToRec](a, n, s, 'recorder=r_o', 'cert')`, ` `, `PARAMETERS:`, ` a - a summation`, ` n, - a name`, ` s, - a name`, ` m_o, r_o - integers`, ` cert - an optional name (formal parameter)`, ` `, `SYNOPSIS:`, `- This function is an implementation of Zeilberger's algorithm, computing`, ` a recurrence equation for the sum`, ` `, ` -----`, ` \\`, ` s(n) := a := ) F(n, k)`, ` /`, ` -----`, ` k`, ` `, `- The required condition is that F(n,k) is hypergeometric in n and k.`, ` `, `- The output 'rec(n)' is a linear recurrence equation with polynomial`, ` coefficients such that:`, ` `, ` rec(n) F(n,k) = G(n, k + 1) - G(n, k),`, ` `, ` where G(n,k)=cert(n,k)*F(n,k).`, ` `, `- The optional name 'cert(n,k)' is called the certificate.`, ` `, `- The output rec(n) is a recurrence satisfied by s(n).`, ` The order of the recurrence is:`, ` o either less or equals to m_o (where the default value of m_o is 6),`, ` o either equals to r_o.`, ` `, `- If this algorithm can't deliver a such recurrence, then it returns`, ` the message 'No recurrence equation of order XXX'.`, ` `, `- Whenever there is a conflict between the function name SumToRec and`, ` another name used in the same session, use the form HYPERG['SumToRec'].`, ` `, `EXAMPLES:`, `> with(HYPERG):`, `> SumToRec( Sum(binomial(n,k),k), n, A );`, ` `, ` 2 A(n) - A(n + 1) = 0`, ` `, `> SumToRec( Sum(binomial(n,k),k), n, A, 'recorder=2' );`, ` `, ` - 2 A(n) - A(n + 1) + A(n + 2) = 0`, ` `, `> SumToRec( Sum(binomial(n,k),k), n, A, 'recorder=3', 'certificate' );`, ` `, ` 2 A(n) - 7 A(n + 1) + A(n + 2) + A(n + 3) = 0`, ` `, `> certificate;`, ` `, ` 2 2`, ` (5 + 10 n + 3 n - n k + 2 k - k ) k`, ` - ------------------------------------`, ` (n + 3 - k) (n + 2 - k) (n + 1 - k)`, ` `, `> SumToRec( Sum(binomial(n,k)*binomial(a,k)*binomial(b,k),k), n, A );`, ` `, ` - 2 (n + 2) (n + 1) A(n) - (n + 2) (a + b - 9 - 5 n) A(n + 1)`, ` `, ` 2`, ` + (2 b - 19 n - 4 n + n b - a b + n a + 2 a - 23) A(n + 2)`, ` `, ` 2`, ` + (n + 3) A(n + 3) = 0`, ` `, `SEE ALSO: HYPERG, Gosper, HypToRec, Prove, SummandToRec` ): ########## # File @(#) Time (HYPERG PACKAGE) Wed Mar 1 14:13:48 Frh 1995 ########## `help/HYPERG/text/Time` := TEXT( ` `, `FUNCTION: Time - gives time information`, ` `, `CALLING SEQUENCE:`, ` Time(f, 't', arg_1, ..., arg_k)`, ` HYPERG[Time](f, 't', arg_1, ..., arg_k)`, ` `, `PARAMETERS:`, ` f - any name of function`, ` t - any name of variable (formal parameter)`, ` arg_1, ..., arg_k - optional extra arguments`, ` `, `SYNOPSIS:`, `- The Time function runs f(arg_1,...,arg_k) and saves in the parameter 't'`, ` the computation time.`, ` `, `- The return value of Time(f,'t',arg_1,...,arg_k) is f(arg_1,...,arg_k).`, ` `, `- For composite functions, transform it into a single function in order to`, ` use Time.`, ` `, `- Whenever there is a conflict between the function name Time and`, ` another name used in the same session, use the long form HYPERG['Time'].`, ` `, `EXAMPLES:`, `> with(HYPERG):`, `> Time( HypSolRec, 't', y(n) = (n-1)*y(n-1) + (n-1)*y(n-2), y(n) );`, ` `, ` {n + 1}`, ` `, `> t;`, ` `, ` .167`, ` `, `SEE ALSO: HYPERG, HYP, RF` ): ########## # File @(#) VHypToHyp (HYPERG PACKAGE) Wed Sep 17 18:11:14 METDST 1997 ########## `help/HYPERG/text/VHypToHyp` := TEXT( ` `, `FUNCTION: VHypToHyp - convert hypergeometric series in very-well-poised order`, ` - into hypergeometric series in standard notation`, ` `, `CALLING SEQUENCE:`, ` VHypToHyp( vhyp )`, ` HYPERG[VHypToHyp]( vhyp )`, ` `, `PARAMETERS:`, ` vhyp - a hypergeometric series in very-well-poised order`, ` `, `SYNOPSIS:`, `- This function converts a hypergeometric series in 'very-well-poised'`, ` order into a hypergeometric series in standard notation.`, ` `, `- Whenever there is a conflict between the function name VHypToHyp and`, ` another name used in the same session, use the form HYPERG['VHypToHyp'].`, ` `, `EXAMPLES:`, `> with(HYPERG):`, `> VHypToHyp( VHYP[a,[],z] );`, ` `, ` HYP[[a, 1/2 a + 1], [1/2 a], z]`, ` `, `> VHypToHyp( VHYP[x+1,[b,c],z] );`, ` `, ` HYP[[x + 1, 1/2 x + 3/2, b, c], [1/2 x + 1/2, 2 + x - b, 2 + x - c], z]`, ` `, `SEE ALSO: HYPERG, VHYP, IsVHYP, HYP, IsHYP, HypToVHyp, HypConverg, HypEval` ): ########## # File @(#) HYP (HYPERG PACKAGE) Mon Mar 10 10:27:42 MET 1997 ########## `help/HYPERG/text/QHYP` := TEXT( ` `, `FUNCTION: QHYP - how generalized QHYPergeometric series are coded`, ` `, `SYNOPSIS:`, `- QHYP is an indexed name: HYP[ l1, l2, q, z ] with`, ` `, ` - l1, the list of upper parameters,`, ` - l2, the list of lower parameters,`, ` - q, the base,`, ` - z, the evaluation point.`, ` `, `EXAMPLES:`, `> with(HYPERG):`, `> qhyp := QHYP[[a,b,c],[d,e],q,z]:`, `> IsQHYP( qhyp );`, ` `, ` true`, ` `, `SEE ALSO: HYPERG, IsQHYP, WHYP, IsWHYP, QRF, QBIN, QHypEval, QHypOrder,`, ` HypPerm, QHypToWHyp, AddParam` ): ########## # File @(#) QRF (HYPERG PACKAGE) Tue May 26 07:56:28 METDST 1998 ########## `help/HYPERG/text/QRF` := TEXT( ` `, `FUNCTION: QRF - how Q-Rising Factorials are coded`, ` `, `SYNOPSIS:`, `- QRF is an indexed name: QRF[a, q, k] where a, q and k are names`, ` (or numerical values).`, ` `, `- The mathematical notation is (a;q)_k.`, ` `, `EXAMPLES:`, `> with(HYPERG):`, `> qrf := QRF[a,q,k]:`, `> QRfEval( qrf );`, ` `, ` k - 1`, ` --------'`, ` ' | | i`, ` | | (1 - a q )`, ` | |`, ` | |`, ` i = 0`, ` `, `SEE ALSO: HYPERG, IsQRF, QRfEval, QBIN, QHYP, WHYP` ): ########## # File @(#) QBIN (HYPERG PACKAGE) Thu Jul 2 17:29:43 METDST 1998 ########## `help/HYPERG/text/QBIN` := TEXT( ` `, `FUNCTION: QBIN - how Q-binomial coefficients are coded`, ` `, `SYNOPSIS:`, `- QBIN is an indexed name: QBIN[n, m, q] where n, m and q are names`, ` (or numerical values).`, ` `, `- q-binomial coefficients are also called Gaussian polynomials.`, ` `, `EXAMPLES:`, `> with(HYPERG):`, `> qbin := QBIN[n,m,q]:`, `> QBinEval( qbin );`, ` `, ` QRF[q, q, n]`, ` -----------------------------`, ` QRF[q, q, m] QRF[q, q, n - m]`, ` `, `SEE ALSO: HYPERG, IsQBIN, QBinEval, QRF, QHYP, WHYP` ): ########## # File @(#) WHYP (HYPERG PACKAGE) Tue May 26 08:34:31 METDST 1998 ########## `help/HYPERG/text/WHYP` := TEXT( ` `, `FUNCTION: WHYP - how HYPergeometric series (in Very-well-poised) are coded`, ` `, `SYNOPSIS:`, `- WHYP is an indexed name: HYP[ a, l, z ] with`, ` `, ` - a, the first upper parameter the hypergeometric series,`, ` - l, a list of parameters,`, ` - q, the base.`, ` - z, the evaluation point.`, ` `, `- WHYP[ a, [p_1,...,p_r], q, z ] is equivalent to`, ` QHYP[ [a, q*a^(1/2), -q*a^(1/2), p_1, ..., p_r],`, ` [a^(1/2), -a^(1/2), q*a/p_1, ..., q*a/p_r],q,z]`, ` `, `EXAMPLES:`, `> with(HYPERG):`, `> w := WHYP[a,[n,q],q,z]:`, `> WHypToQHyp( w );`, ` `, ` 1/2 1/2 1/2 1/2 q a`, ` QHYP[[a, q a , - q a , n, q], [a , - a , ---, a], q, z]`, ` n`, ` `, `SEE ALSO: HYPERG, IsWHYP, QHYP, IsQHYP, QRF, QBIN, QHypEval,`, ` WHyptoQHyp, QHypToWHyp` ): ########## # File @(#) GenQRec (HYPERG PACKAGE) Thu May 28 08:03:51 METDST 1998 ########## `help/HYPERG/text/GenQRec` := TEXT( ` `, `FUNCTION: GenQRec - generate a q-recurrence`, ` `, `CALLING SEQUENCE:`, ` GenQRec( sols, u(n) )`, ` HYPERG[GenQRec]( sols, u(n) )`, ` `, `PARAMETERS:`, ` sols - a set of 'p' terms {s1, s2, ..., sp}`, ` u,n - the name and the index of the recurrence`, ` `, `SYNOPSIS:`, `- The function GenQRec generates a p-order homogeneous q-recurrence`, ` satisfied by u(n) such that s1, s2, ..., and sp are its solutions.`, ` `, `- A q-recurrence is a relation between u(n) and successive q-shifts u(q*n)`, ` u(q^2*n), ...`, ` `, `- The output is a q-recurrence in n with polynomial coefficients.`, ` `, `- If GenQRec is unable to compute a recurrence, it returns 0 = 0.`, ` `, `- Whenever there is a conflict between the function name GenQRec and`, ` another name used in the same session, use the form HYPERG['GenQRec'].`, ` `, `EXAMPLES:`, `> with(HYPERG):`, `> GenQRec( {n*q,1}, y(n) );`, ` `, ` 2 2 2`, ` (q - 1) y(n q ) + (- q + 1) y(n q) + (q - q) y(n) = 0`, ` `, `> GenQRec( {x^2*q,x}, y(x) );`, ` `, ` 2 3 4 3`, ` q (q - 1) y(x q ) + q (- q + q) y(x q) + q (q - q ) y(x) = 0`, ` `, `SEE ALSO: HYPERG, QHYP, PolySolQRec, RatioSolQRec, HypSolQRec` ): ########## # File @(#) HypSolQRec (HYPERG PACKAGE) Wed Sep 16 17:58:37 METDST 1998 ########## `help/HYPERG/text/HypSolQRec` := TEXT( ` `, `FUNCTION: HypSolQRec - linear q-recurrence equation solver`, ` - hypergeometric solutions`, ` `, `CALLING SEQUENCE:`, ` HypSolQRec(eqn, u(n))`, ` HYPERG[HypSolQRec](eq, u(n))`, ` `, `PARAMETERS:`, ` eqn - a linear q-recurrence equation with polynomial coefficients`, ` u,n - the name and the index of the recurrence`, ` `, `SYNOPSIS:`, `- The function HypSolQRec finds all hypergeometric solutions of the`, ` q-recurrence relation.`, ` `, `- The first argument should be a single q-recurrence equation with`, ` polynomial coefficients. Any expressions which is not an equation will`, ` be understood to be equal to zero.`, ` `, ` This recurrence must be homogeneous.`, ` `, `- The second argument indicates the sequence that HypSolQRec should solve`, ` for. (A sequence is represented by a name and an index).`, ` `, `- The output is a generating set (not necessarily linearly independent) of`, ` hypergeometric solutions (with constant coefficients _x0, _x1, ...) of`, ` the recurrence relation. These solutions u(n) are given by their`, ` rational representations u(n+1)/u(n).`, ` `, `- Whenever there is a conflict between the function name HypSolQRec and`, ` another name used in the same session, use the form HYPERG['HypSolQRec'].`, ` `, `EXAMPLES:`, `> with(HYPERG):`, `> rec := x*y(q^3*x) - q^3*x^2*y(q^2*x) - (x^2+q)*y(q*x)+q*x*(x^2+q)*y(x):`, `> HypSolQRec( rec, y(x) );`, ` `, ` {q x}`, ` `, `> HypSolQRec( y(q^2*x)-(1+q)*y(q*x)+q*(1-q*x^2)*y(x)=0, y(x) );`, ` `, ` 1/2 1/2`, ` {1 - q x, 1 + q x}`, ` `, `SEE ALSO: HYPERG, GenQRec, PolySolQRec, RatioSolQRec` ): ########## # File @(#) IsQBIN (HYPERG PACKAGE) Thu Jul 2 17:36:10 METDST 1998 ########## `help/HYPERG/text/IsQBIN` := TEXT( ` `, `FUNCTION: IsQBIN - test if is a q-binomial coefficient`, ` `, `CALLING SEQUENCE:`, ` IsQBIN(qbin)`, ` HYPERG[IsQBIN](qbin)`, ` `, `PARAMETERS:`, ` qbin - one term`, ` `, `SYNOPSIS:`, `- The IsQBIN function tests whether a term is a q-binomial coefficient.`, ` `, `- Whenever there is a conflict between the function name IsQBIN and`, ` another name used in the same session, use the form HYPERG['IsQBIN'].`, ` `, `EXAMPLES:`, `> with(HYPERG):`, `> IsQBIN( QBIN[a,b,c,d] );`, ` `, ` false`, ` `, `> IsQBIN( QBIN[a,k,q] );`, ` `, ` true`, ` `, `SEE ALSO: HYPERG, QBIN, QRF, QBinEval, QRfEval, IsQHYP, IsWHYP, IsQRF` ): ########## # File @(#) IsQHYP (HYPERG PACKAGE) Mon May 25 97:50:10 METDST 1998 ########## `help/HYPERG/text/IsQHYP` := TEXT( ` `, `FUNCTION: IsQHYP - test if is a basic hypergeometric series`, ` `, `CALLING SEQUENCE:`, ` IsQHYP(qhyp)`, ` HYPERG[IsQHYP](qhyp)`, ` `, `PARAMETERS:`, ` qhyp - one term`, ` `, `SYNOPSIS:`, `- The IsQHYP function tests whether a term is a basic hypergeometric`, ` series.`, ` `, `- If a lower parameter is egal to 1, then the function gives a warning.`, ` `, `- Whenever there is a conflict between the function name IsQHYP and`, ` another name used in the same session, use the form HYPERG['IsQHYP'].`, ` `, `EXAMPLES:`, `> with(HYPERG):`, `> IsQHYP( QHYP[[a,b,c],[d,e],q,z] );`, ` `, ` true`, ` `, `> IsQHYP( QHYP[[a,q,c],[d,1],q,z] );`, ` `, ` warning QHYP: denominator values must be different of 1`, ` `, ` true`, ` `, `SEE ALSO: HYPERG, QHYP, QRF, QBIN, WHYP, QHypEval, QHypOrder,`, ` HypPerm, QHypToVHyp, AddParam, IsQRF, IsQBIN, IsWHYP` ): ########## # File @(#) IsQRF (HYPERG PACKAGE) Tue May 26 08:12:49 METDST 1998 ########## `help/HYPERG/text/IsQRF` := TEXT( ` `, `FUNCTION: IsQRF - test if is a q-rising factorial`, ` `, `CALLING SEQUENCE:`, ` IsQRF(qrf)`, ` HYPERG[IsQRF](qrf)`, ` `, `PARAMETERS:`, ` qrf - one term`, ` `, `SYNOPSIS:`, `- The IsQRF function tests whether a term is a q-rising factorial.`, ` `, `- Whenever there is a conflict between the function name IsQRF and`, ` another name used in the same session, use the long form HYPERG['IsQRF'].`, ` `, `EXAMPLES:`, `> with(HYPERG):`, `> IsQRF( QRF[a] );`, ` `, ` false`, ` `, `> IsQRF( QRF[a,q,5] );`, ` `, ` true`, ` `, `SEE ALSO: HYPERG, QRF, QRfEval, QBIN, QBinEval, IsQBin, IsQHYP, IsWHYP` ): ########## # File @(#) IsWHYP (HYPERG PACKAGE) Wed Sep 17 08:04:20 METDST 1997 ########## `help/HYPERG/text/IsWHYP` := TEXT( ` `, `FUNCTION: IsWHYP - test if is a basic hypergeometric series`, ` - in very-well-poised order`, ` `, `CALLING SEQUENCE:`, ` IsWHYP(hyp)`, ` HYPERG[IsWHYP](hyp)`, ` `, `PARAMETERS:`, ` hyp - one term`, ` `, `SYNOPSIS:`, `- The IsWHYP function tests whether a term is a basic hypergeometric`, ` series in very-well-poised' order.`, ` `, `- If a lower parameter is egal to 1, then the function gives a warning.`, ` `, `- Whenever there is a conflict between the function name IsWHYP and`, ` another name used in the same session, use the form HYPERG['IsWHYP'].`, ` `, `EXAMPLES:`, `> with(HYPERG):`, `> IsWHYP( WHYP[a,[b,c,q*a,e],q,z] );`, ` `, ` warning WHYP: denominator values must be different of 1`, ` `, ` true`, ` `, `SEE ALSO: HYPERG, WHYP, QHYP, QRF, QBIN, QHypEval, WHypToQHyp,`, ` QHypToWHyp, IsQHYP, IsQRF, IsQBIN` ): ########## # File @(#) PolySolRec (HYPERG PACKAGE) Tue Sep 15 08:17:13 METDST 1998 ########## `help/HYPERG/text/PolySolQRec` := TEXT( ` `, `FUNCTION: PolySolQRec - linear q-recurrence equation solver`, ` - polynomial solutions`, ` `, `CALLING SEQUENCE:`, ` PolySolQRec(eqn, u(n))`, ` HYPERG[PolySolQRec](eq, u(n))`, ` `, `PARAMETERS:`, ` eqn - a linear q-recurrence equation with polynomial coefficients`, ` u,n - the name and the index of the recurrence`, ` `, `SYNOPSIS:`, `- The function PolySolQRec finds all polynomial solutions of the`, ` q-recurrence relation.`, ` `, `- The first argument should be a single q-recurrence equation with`, ` polynomial coefficients. This recurrence isn't necessarily homogeneous.`, ` `, ` Any expressions which is not an equation will be understood to be equal`, ` to zero.`, ` `, `- The second argument indicates the sequence that PolySolQRec should solve`, ` for. A sequence is represented by a name and an index.`, ` `, `- The output is a polynom in n with constant coefficients _x0, _x1, ...`, ` `, `- If PolySolQRec is unable to compute a polynomial solution, it returns the`, ` message 'No polynomial solution'. This means that there is no solution.`, ` `, `- Whenever there is a conflict between the function name PolySolQRec and`, ` another name used in the same session, use the long form`, ` HYPERG['PolySolQRec'].`, ` `, `EXAMPLES:`, `> with(HYPERG):`, `> PolySolQRec( U(q^2*n)-2*U(q*n)+U(n)`, ` = (q^6-2*q^3+1)*n^3+(q^5-2*q^3+q)*q*n^2, U(n) );`, ` `, ` 2 2 3`, ` _x0 + q n + n`, ` `, `SEE ALSO: HYPERG, GenQRec, RatioSolQRec, HypSolQRec` ): ########## # File @(#) QBinEval (HYPERG PACKAGE) Thu Jul 2 17:39:27 METDST 1998 ########## `help/HYPERG/text/QBinEval` := TEXT( ` `, `FUNCTION: QBinEval - Rule that evals q-binomial coefficients`, ` `, `CALLING SEQUENCE:`, ` QBinEval( expr )`, ` HYPERG[QBinEval]( expr )`, ` `, `PARAMETERS:`, ` expr - any expression`, ` `, `SYNOPSIS:`, `- The QBinEval function evals (if possible) q-binomial coefficient QBIN[].`, ` `, `- Whenever there is a conflict between the function name QBinEval and`, ` another name used in the same session, use the form HYPERG['QBinEval'].`, ` `, `EXAMPLES:`, `> with(HYPERG):`, `> QBinEval( QBIN[n,m,q] );`, ` `, ` QRF[q, q, n]`, ` -----------------------------`, ` QRF[q, q, m] QRF[q, q, n - m]`, ` `, `> QBinEval( QBIN[5,3,q] );`, ` `, ` QRF[q, q, 5]`, ` -------------------------`, ` QRF[q, q, 3] QRF[q, q, 2]`, ` `, `> QBinEval( QBIN[3,5,q] );`, ` `, ` 0`, ` `, `> QBinEval( QBIN[3,3,q] );`, ` `, ` 1`, ` `, `> QBinEval( QBIN[n,n,q] );`, ` `, ` 1`, ` `, `> QBinEval( QBIN[0,0,q] );`, ` `, ` 1`, ` `, `> QBinEval( QBIN[k,0,q] );`, ` `, ` 1`, ` `, `SEE ALSO: HYPERG, QBIN, IsQBin, QRF, IsQRF, QRfEval, QHYP, IsQHYP, WHYP,`, ` IsWHYP, QHypEval` ): ########## # File @(#) QHypEval (HYPERG PACKAGE) Tue May 19 07:57:04 METDST 1998 ########## `help/HYPERG/text/QHypEval` := TEXT( ` `, `FUNCTION: QHypEval - Rule that transforms a QHYP[] into a Sum()`, ` `, `CALLING SEQUENCE:`, ` QHypEval( expr )`, ` HYPERG[QHypEval]( expr )`, ` `, ` QHypEval( expr, tsi )`, ` HYPERG[QHypEval]( expr, tsi )`, ` `, `PARAMETERS:`, ` expr - any expression`, ` tsi - a name, the summation index`, ` `, `SYNOPSIS:`, `- The QHypEval function expands basic hypergeometric series into sums.`, ` It takes in input any expression involving QHYP (generalized basic`, ` HYPergeometric series) and WHYP (basic HYPergeometric series in`, ` Very-Well-poised order).`, ` `, `- The optional second argument (tsi) allows you to choose the name of the`, ` summation index. The default value is k.`, ` `, `- Whenever there is a conflict between the function name QHypEval and`, ` another name used in the same session, use the form HYPERG['QHypEval'].`, ` `, `EXAMPLES:`, `> with(HYPERG):`, `> QHypEval( QHYP[[a,b],[e,f,g],q,z] );`, ` `, ` infinity`, ` ----- k k 2 (1/2 k (k - 1)) 2`, ` \\ QRF[a, q, k] QRF[b, q, k] z ((-1) ) (q )`, ` ) ---------------------------------------------------------`, ` / QRF[e, q, k] QRF[f, q, k] QRF[g, q, k] QRF[q, q, k]`, ` -----`, ` k = 0`, ` `, `SEE ALSO: HYPERG, QHYP, IsQHYP, WHYP, IsWHyp, AddParam, HypSimplify,`, ` QHypOrder, HypPerm, QHypType` ): ########## # File @(#) QHypOrder (HYPERG PACKAGE) Tue Aug 12 08:44:19 METDST 1997 ########## `help/HYPERG/text/QHypOrder` := TEXT( ` `, `FUNCTION: QHypOrder - Order parameters of a basic hypergeometric series`, ` `, `CALLING SEQUENCE:`, ` QHypOrder( sqhyp )`, ` HYPERG[QHypOrder]( sqhyp )`, ` `, `PARAMETERS:`, ` sqhyp - a basic hypergeometric series in standard notation`, ` `, `SYNOPSIS:`, `- The QHypOrder function is used to order the parameters of a basic`, ` hypergeometric series in 'well-poised', 'very-well-poised', and`, ` 'nearly-well poised order'.`, ` `, `- Whenever there is a conflict between the function name QHypOrder and`, ` another name used in the same session, use the form HYPERG['QHypOrder'].`, ` `, `EXAMPLES:`, `> with(HYPERG):`, `> #very-well poised order`, `> qhyp := QHypOrder( QHYP[[q^(-n),b,q*sqrt(a),a,-q*sqrt(a)],`, `> [a*q/b,-sqrt(a),sqrt(a),a*q^(n+1)],q,z] );`, ` `, `qhyp :=`, ` `, ` 1/2 1/2 (- n) 1/2 1/2 a q (n + 1)`, `QHYP[[a, q a , - q a , b, q ],[a , - a , ---, a q ],q,z]`, ` b`, ` `, `> QHypToWHyp( qhyp );`, ` `, ` (- n)`, ` WHYP[a, [b, q ], q, z]`, ` `, `SEE ALSO: HYPERG, IsQHYP, IsWHYP, QHypEval, HypPerm, QHypType, AddParam` ): ########## # File @(#) QHypToWHyp (HYPERG PACKAGE) Wed Sep 17 18:11:14 METDST 1997 ########## `help/HYPERG/text/QHypToWHyp` := TEXT( ` `, `FUNCTION: QHypToWHyp`, ` - convert basic hypergeometric series`, ` - into basic hypergeometric series in very-well-poised order`, ` `, `CALLING SEQUENCE:`, ` QHypToWHyp( sqhyp )`, ` HYPERG[QHypToWHyp]( sqhyp )`, ` `, `PARAMETERS:`, ` sqhyp - a basic hypergeometric series in standard notation`, ` `, `SYNOPSIS:`, `- This function tries to convert (if possible) a q-hypergeometric series`, ` into a basic hypergeometric series in well-poised order.`, ` `, `- If the convertion is impossible, the return value of the function is the`, ` initial basic hypergeometric series.`, ` `, `- Whenever there is a conflict between the function name QHypToWHyp and`, ` another name used in the same session, use the form HYPERG['QHypToWHyp'].`, ` `, `EXAMPLES:`, `> with(HYPERG):`, `> qhyp := QHYP[ [q^(-n),b,q*sqrt(a),a,-q*sqrt(a)],`, ` [a*q/b,-sqrt(a),sqrt(a),a*q^(n+1)], q, z]:`, `> QHypToWHyp( qhyp );`, ` `, ` (- n)`, ` WHYP[a, [b, q ], q, z]`, ` `, `SEE ALSO: HYPERG, QHYP, IsQHYP, WHYP, IsWHYP, WHypToQHyp, QHypEval` ): ########## # File @(#) QHypType (HYPERG PACKAGE) Wed Sep 9 12:56:33 METDST 1998 ########## `help/HYPERG/text/QHypType` := TEXT( ` `, `FUNCTION: QHypType - Print the type of a basic hypergeometric series`, ` `, `CALLING SEQUENCE:`, ` QHypType( sqhyp )`, ` HYPERG[HQypType]( sqhyp )`, ` `, `PARAMETERS:`, ` sqhyp - a hypergeometric q-series in standard notation (QHYP or WHYP)`, ` `, `SYNOPSIS:`, `- The QHypType function is used to know the type of a hypergeometric`, ` q-series ('well-poised', 'very-well-poised', 'nearly-well poised order',`, ` or 'ordinay').`, ` `, `- The function prints the type of the series, and the return value`, ` is always NULL.`, ` `, `- Whenever there is a conflict between the function name QHypType and`, ` another name used in the same session, use the form HYPERG['QHypType'].`, ` `, `EXAMPLES:`, `> with(HYPERG):`, `> # very-well poised order`, `> QHypType( QHYP[[q^(-n),b,q*sqrt(a),a,-q*sqrt(a)],`, `> [a*q/b,-sqrt(a),sqrt(a),a*q^(n+1)],q,z] );`, ` `, ` Very-well poised hypergeometric q-series`, ` `, `> # well-poised order`, `> QHypType( QHYP[[b,a,c,q],[a,a*q/c,a*q/b],q,z] );`, ` `, ` Well-poised hypergeometric q-series`, ` `, `SEE ALSO: HYPERG, IsQHYP, IsWHYP, QHypEval, QHypOrder, HypPerm, AddParam` ): ########## # File @(#) QRfEval (HYPERG PACKAGE) Wed May 20 08:07:04 METDST 1998 ########## `help/HYPERG/text/QRfEval` := TEXT( ` `, `FUNCTION: QRfEval - Rule that evals q-rising factorials`, ` `, `CALLING SEQUENCE:`, ` QRfEval( expr )`, ` HYPERG[QRfEval]( expr )`, ` `, `PARAMETERS:`, ` expr - any expression`, ` `, `SYNOPSIS:`, `- The QRfEval function evals (if possible) q-rising factorial (QRF[]).`, ` `, `- Whenever there is a conflict between the function name QRfEval and`, ` another name used in the same session, use the form HYPERG['QRfEval'].`, ` `, `EXAMPLES:`, `> with(HYPERG):`, `> QRfEval( QRF[a,q,3] );`, ` `, ` 2`, ` (1 - a) (1 - a q) (1 - a q )`, ` `, `> QRfEval( QRF[q,q,4] );`, ` `, ` 2 3 4`, ` (1 - q) (1 - q ) (1 - q ) (1 - q )`, ` `, `> QRfEval( QRF[a,q,-3] );`, ` `, ` 1`, ` -------------------------------`, ` / a \\ / a \\`, ` (1 - a/q) |1 - ----| |1 - ----|`, ` | 2 | | 3 |`, ` \\ q / \\ q /`, ` `, `> QRfEval( QRF[q,q,-3] );`, `Error, (in HYPERG/QRfEval/basic) division by zero`, ` `, `SEE ALSO: HYPERG, QRF, IsQRf, QBIN, IsQBin, QBinEval, QHYP, IsQHYP, WHYP,`, ` IsWhyp, QHypEval` ): ########## # File @(#) RatioSolQRec (HYPERG PACKAGE) Wed Sep 16 08:09:41 METDST 1998 ########## `help/HYPERG/text/RatioSolQRec` := TEXT( ` `, `FUNCTION: RatioSolQRec - linear q-recurrence equation solver`, ` - rational solutions`, ` `, `CALLING SEQUENCE:`, ` RatioSolQRec(eqn, u(n))`, ` HYPERG[RatioSolQRec](eq, u(n))`, ` `, `PARAMETERS:`, ` eqn - a linear q-recurrence equation with polynomial coefficients`, ` u,n - the name and the index of the recurrence`, ` inits - a set of initial conditions`, ` `, `SYNOPSIS:`, `- The function RatioSolQRec finds all rational solutions of the`, ` q-recurrence relation.`, ` `, `- The first argument should be a single q-recurrence equation with`, ` polynomial coefficients. This recurrence isn't necessarily homogeneous.`, ` `, ` Any expressions which is not an equation will be understood to be equal`, ` to zero.`, ` `, `- The second argument indicates the sequence that RatioSolQRec should`, ` solve for. A sequence is represented by a name and an index.`, ` `, `- The output is a rational function in n with constant coefficients _x0,`, ` _x1, _x2, _x3, ...`, ` `, `- If RatioSolQRec is unable to compute a rational solution, it returns`, ` the message 'No rational solution'. This means that there is no`, ` solution.`, ` `, `- Whenever there is a conflict between the function name RatioSolQRec and`, ` another name used in the same session, use the long form`, ` HYPERG['RatioSolQRec'].`, ` `, `EXAMPLES:`, `> with(HYPERG):`, `> RatioSolQRec( q^3*(q*n+1)*y(q^2*n)-2*q^2*(n+1)*y(q*n)+(n+q)*y(n)`, `> = (q^6-2*q^3+1)*n^2+(q^5-2*q^3+q)*n, y(n) );`, ` `, ` 2`, ` q n + n`, ` --------`, ` n + q`, ` `, `SEE ALSO: HYPERG, GenQRec, PolySolQRec, HypSolQRec` ): ########## # File @(#) WHypToQHyp (HYPERG PACKAGE) Wed Sep 17 18:11:14 METDST 1997 ########## `help/HYPERG/text/WHypToQHyp` := TEXT( ` `, `FUNCTION: WHypToQHyp`, ` - convert basic hypergeometric series in very-well-poised order`, ` - into basic hypergeometric series in standard notation`, ` `, `CALLING SEQUENCE:`, ` WHypToQHyp( whyp )`, ` HYPERG[WHypToQHyp]( whyp )`, ` `, `PARAMETERS:`, ` whyp - a basic hypergeometric series in very-well-poised order`, ` `, `SYNOPSIS:`, `- This function converts a q-hypergeometric series in 'very-well-poised'`, ` order into a basic hypergeometric series in standard notation.`, ` `, `- Whenever there is a conflict between the function name WHypToQHyp and`, ` another name used in the same session, use the form HYPERG['WHypToQHyp'].`, ` `, `EXAMPLES:`, `> with(HYPERG):`, `> w := WHYP[a,[b,q^(-n)],q,z]:`, `> WHypToQHyp( w );`, ` `, ` 1/2 1/2 (- n) 1/2 1/2 q a (1 + n)`, `QHYP[[a, q a , - q a , b, q ],[a , - a , ---, q a],q,z]`, ` b`, ` `, `SEE ALSO: HYPERG, WHYP, IsWHYP, QHYP, IsQHYP, QHypToWHyp, QHypEval` ): save `HYPERG.m`; quit