Unprotect[C,D,N]; Clear[C]; Format[C,TeXForm]="C"; Format[D,TeXForm]="D"; Format[N,TeXForm]="N"; If[$VersionNumber>=2.,$Messages=OutputStream["",1],$Messages={}] (*Abfrage, ob DOS-Version*) DOSFrage=MemberQ[{"MS-DOS 386","387","DOS 387"},$System]; BeginPackage["Hyp`m`"] hypAttributes::usage = "\nDescription: Shows the current setup of the session. The setup can be \n changed by the switches \"P\", \"FCancel\", \"TeX\", and \"TeXFV\". The \n default-setup is shown in the following Example. \nUsage: hypAttributes. \nSee also: P, FCancel, AmSTeX, AmSLaTeX, LaTeX, TeX, TeXFV." SumRegeln::usage = "\nDescription: Rule that transforms the expressions in a Sum[] into a \n form that could also be expressed in hypergeometric notation. \n This is useful, if you want to convert a Sum[] into hypergeometric \n notation but without using the F[]-notation. In particular, expressions \n of the form (-1)^(d*k), where d is an integer and k is the summation \n index, will simplify. \nUsage: Expr/.SumRegeln \nSee also: F, SumF, FSum, MinusOne, Ers, PosListe."; SumSammle::usage = "\nDescription: Rule that causes all terms of an expression Expr, which involves \na Sum[] to be put into the Sum[]. \nUsage: Expr/.SumSammle. \nSee also: SumRegeln, SumErw1, SumErw2, SumZerl, SumShift, SumTausche, \n pzus, Gzus, Ers, PosListe." SumF::usage = "\nDescription: Rule that transforms a Sum[] into hypergeometric notation, \nif possible. If the upper bound is not \"Infinity\" you have to apply \n\"SumInfinity\" first (if allowed). \nUsage: Expr/.SumF. \nSee also: SumRegeln, SumInfinity, F, FSum, Ers, PosListe." SumH::usage="ja" FSum::usage = "\nDescription: Rule that transforms a F[] into a Sum[]. \nUsage: Expr/.FSum. \nSee also: F, SumF, Ers, PosListe." HSum::usage = "\nDescription: Rule that transforms a H[] into a Sum[]. \nUsage: Expr/.HSum. \nSee also: H, SumH, Ers, PosListe." HF::usage="ja" FH::usage="ja" SumInfinity::usage = "\nDescription: Rule that changes the upper bound of a Sum[] into \"Infinity\". \nUsage: Expr/.SumInfinity. \nSee also: SumF, Ers, PosListe."; Gleichung::usage = "\nDescription: Is a variable which stores equations. The equation \"Gleichung\" \n can be manipulated using the functions \"Add\", \"Sub\", \"Mal\", \"Div\", \n \"Hoch\", \"Ers\", and Sum[m_Integer,n_Integer]. The last command causes \n the equation to be summed from m to n. \nUsage: Gleichung. \nSee also: SumListe$gl, TransListe$gl, LS, RS, Mal, Add, Div, Sub, Hoch, \n GlTausche, Ers, Subst, PSort."; LS::usage = "\nDescription: \"LS\" is the left-hand side in \"Gleichung\". \nUsage: LS. \nSee also: Gleichung, SumListe$gl, TransListe$gl, RS, Mal, Add, Div, Sub, \n Hoch, GlTausche, Ers, Subst."; RS::usage = "\nDescription: \"RS\" is the right-hand side in \"Gleichung\". \nUsage: RS. \nSee also: Gleichung, SumListe$gl, TransListe$gl, LS, Mal, Add, Div, Sub, \n Hoch, GlTausche, Ers, Subst."; GlTausche::usage = "\nDescription: \"GlTausche\" interchanges right-hand and left-hand sides in \n \"Gleichung\". \nUsage: GlTausche. \nSee also: Gleichung, SumListe$gl, TransListe$gl, LS, RS, Mal, Add, Div, \n Sub, Hoch, Ers, Subst."; Mal::usage = "\nDescription: Function that multiplies \"Gleichung\" by Expr. \nUsage: Mal[Expr]. \nSee also: Gleichung, SumListe$gl, TransListe$gl, LS, RS, Add, Div, Sub, \n Hoch, GlTausche, Ers."; Add::usage = "\nDescription: Function that adds Expr to \"Gleichung\". \nUsage: Add[Expr]. \nSee also: Gleichung, SumListe$gl, TransListe$gl, LS, RS, Mal, Div, Sub, \n Hoch, GlTausche, Ers."; Div::usage = "\nDescription: Function that divides \"Gleichung\" by Expr. \nUsage: Div[Expr]. \nSee also: Gleichung, SumListe$gl, TransListe$gl LS, RS, Mal, Add, Sub, \n Hoch, GlTausche, Ers."; Sub::usage = "\nDescription: Function that subtracts Expr from \"Gleichung\". \nUsage: Sub[Expr]. \nSee also: Gleichung, SumListe$gl, TransListe$gl, LS, RS, Mal, Add, Div, \n Hoch, GlTausche, Ers."; Hoch::usage = "\nDescription: Function that takes \"Gleichung\" to the Expr-th power. \nUsage: Hoch[Expr]. \nSee also: Gleichung, SumListe$gl, TransListe$gl, LS, RS, Mal, Add, Div, \n Sub, GlTausche, Ers."; Subst::usage = "\nDescription: Function that substitutes RS instead of LS at position \n Position in Expr. The parameters LS and RS are optional. If they are \n omitted, the right-hand side \"RS\" of \"Gleichung\" is substituted \n instead of the left-hand side \"LS\" of \"Gleichung\". \nUsage: Subst[Expr,Position,LS,RS]. \nSee also: Gleichung, SumListe$gl, TransListe$gl, LS, RS, GlTausche, Ers, \n PosListe." (*negpos::usage = "\nDescription: \nUsage: Default-Variable \nSee also: " Freek::usage = "\nDescription: \nUsage: Default-Variable \nSee also: " baszerl$aut::usage = "\nDescription: \nUsage: Default-Variable \nSee also: " IntegerTest::usage = "\nDescription: \nUsage: Default-Variable \nSee also: "*) Expandq::usage = "\nDescription: Rule that expands all the exponents in powers. \nUsage: Expr/.Expandq. \nSee also: SimplifyP, MinusOne, SumExpand, Ers, PosListe." p::usage = "\nDescription: p[x,n] is the upper-factorial symbol (x)_n. \n p[List1,List2,n] is also provided as the usual abbreviation for the \n quotient of upper-factorial symbols (see Slater's book). \nUsage: p[x,n] \n or: p[List1,List2,n]. \nSee also: F, GAMMA, Binomialp, Factorialp, P, paufl, pzerl, pzus, \n FFormat." Binomialp::usage = "\nDescription: Binomialp[n,k] is the binomial coefficient, written in terms \n of upper-factorial symbols \"p\". \nUsage: Binomialp[n,k]. \nSee also: Factorialp." Factorialp::usage = "\nDescription: Factorialp[n,k] is the usual factorial, written in terms \n of upper-factorial symbols \"p\". \nUsage: Factorialp[n,k]. \nSee also: Binomialp." paufl::usage = "\nDescription: Rule that writes p[x,n] as the defining product \n Product[x+i,{i,0,n-1}], if n is an integer. \nUsage: Expr/.paufl. \nSee also: pzerl, pzus, p, Gzerl, Gzus, Ers, PosListe." pzerl::usage = "\nDescription: Rule that splits p[List1,List2,n] into a quotient of \n products of upper-factorial symbols. \nUsage: Expr/.pzerl. \nSee also: paufl, pzus, p, Gzerl, Gzus, Ers, PosListe." pzus::usage = "\nDescription: Rule that collects several upper-factorial symbols p[x_i,n] to \n an expression p[List1,List2,n]. \nUsage: Expr/.pzus[n]. \nSee also: paufl, pzerl, p, Gzus, Gzerl, Ers, PosListe." GAMMA::usage = "\nDescription: GAMMA[x] is the Gamma-function. \n GAMMA[List1,List2] is also provided as the usual abbreviation for the \n quotient of Gamma-functions (see Slater's book). \nUsage: GAMMA[x], \n or: GAMMA[List1,List2]. \nSee also: p, F, P, Gzerl, Gzus, FFormat." Gzerl::usage = "\nDescription: Rule that splits GAMMA[List1,List2] into a quotient of \n products of Gamma-functions. \nUsage: Expr/.Gzerl. \nSee also: paufl, pzerl, pzus, GAMMA, Gzus, Ers, PosListe." Gzus::usage = "\nDescription: Rule that collects several Gamma-functions \n GAMMA[x_i] to an expression GAMMA[List1,List2]. \nUsage: Expr/.Gzus. \nSee also: paufl, pzerl, pzus, GAMMA, Gzerl, Ers, PosListe." F::usage = "\nDescription: F[List1,List2,z] is the hypergeometric series with \n upper parameters List1, lower parameters List2, and argument z. \nUsage: F[List1,List2,z]. \nSee also: SListe, TListe, SumRegeln, SumF, FSum, p, GAMMA, FCancel, \n FOrdne, FPerm, FTausche, P, FFormat." V::usage = "\nDescription: V[a,List,z] is the very well-poised hypergeometric \n series. \nUsage: V[a,List,z]. \nSee also: F, TeXFV, P, FFormat." H::usage = "\nDescription: H[List1,List2,z] is the bilateral hypergeometric series \n with upper parameters List1, lower parameters List2, and argument z. \nUsage: H[List1,List2,z]. \nSee also: SListe, TListe, SumRegeln, SumH, HSum, F, p, GAMMA, FCancel, \n FOrdne, FPerm, FTausche, P, FFormat." P::usage = "\nDescription: Is a switch that activates automatic evaluating of upper-factorial \n symbols p and hypergeometric series F, or makes it inactive, \n respectively. By default automatic evaluating is inactive. \nUsage: P. \nSee also: F, p, hypAttributes." TeXFV::usage = "\nDescription: Switch that toggles between writing very well-poised \n hypergeometric series in terms of \"V\" and in terms of \"F\", respectively, \n when written in TeXForm. By default very well-poised hypergeometric series \n are written in terms of \"V\". \nUsage: TeXFV. \nSee also: F, V, hypAttributes." FCancel::usage = "\nDescription: Switch that activates automatic cancelling of the upper and \n lower parameters in F[], or makes it inactive, respectively. By default \n automatic cancelling is active. \nUsage: FCancel. \nSee also: F, V, hypAttributes." FFormat::usage = "\nDescription: Switch that activates hypergeometric output, or makes \n it inactive, respectively. By default hypergeometric output is \n active. \nUsage: FFormat." TeX::usage = "\nDescription: Switch that changes the output of TeXForm to be usable with \n Plain-TeX and LaTeX. By default the output of TeXForm is usable with \n AmS-TeX. \nUsage: TeX. \nSee also: AmSTeX, AmSLaTeX, LaTeX, TeXMat, TeXphW." LaTeX::usage = "\nDescription: Switch that changes the output of TeXForm to be usable with \n Plain-TeX and LaTeX. By default the output of TeXForm is usable with \n AmS-TeX. \nUsage: LaTeX. \nSee also: AmSTeX, AmSLaTeX, TeX, TeXMat, TeXphW." AmSTeX::usage = "\nDescription: Switch that changes the output of TeXForm to be usable with \n AmS-TeX. By default the output of TeXForm is usable with AmS-TeX. \nUsage: AmSTeX. \nSee also: AmSLaTeX, LaTeX, TeX, TeXMat, TeXphW." AmSLaTeX::usage = "\nDescription: Switch that changes the output of TeXForm to be usable with \n AmS-LaTeX. By default the output of TeXForm is usable with AmS-TeX. \nUsage: AmSLaTeX. \nSee also: AmSTeX, LaTeX, TeX, TeXMat, TeXphW." ManipulationsListe::usage = "\nDescription: Gives a list of all available rules for manipulating \n upper-factorial symbols and Gamma-functions. \nUsage: ManipulationsListe."; neg1::usage = "\nDescription: (a)_n -> 1/(a+n)_(-n). \nUsage: Expr/.neg1. \nSee also: neg2, Ers, PosListe, ManipulationsListe."; neg2::usage = "\nDescription: (a)_n -> (-1)^n/(1-a)_(-n)). \nUsage: Expr/.neg2. \nSee also: neg1, Ers, PosListe, ManipulationsListe."; trans::usage = "\nDescription: (a)_n -> (1-n-a)_n*(-1)^n. \nUsage: Expr/.trans. \nSee also: Ers, PosListe, ManipulationsListe."; inv::usage = "\nDescription: GAMMA[a] -> Pi/(Sin[Pi*a]*GAMMA[1-a]), \nUsage: Expr/.inv. \nSee also: Ers, PosListe, ManipulationsListe."; lina1::usage = "\nDescription: (a)_n -> a*(a+1)_(n-1), \n GAMMA[a] -> (a-1)*GAMMA[a-1]. \nUsage: Expr/.lina1. \nSee also: lina2, linz, Ers, PosListe, ManipulationsListe."; lina2::usage = "\nDescription: (a)_n -> (a+n-1)*(a)_(n-1). \nUsage: Expr/.lina2. \nSee also: lina1, linz, Ers, PosListe, ManipulationsListe."; linz::usage = "\nDescription: Rule that absorbs linear terms. \nUsage: Expr/.linz. \nSee also: lina1, lina2, Ers, PosListe, ManipulationsListe."; zus1::usage = "\nDescription: (a)_n*(a+n)_m -> (a)_(n+m), \n (a)_n/GAMMA[a+n] -> 1/GAMMA[a]. \nUsage: Expr/.zus1. \nSee also: zus2, zus3, erw1, erw2, Ers, PosListe, ManipulationsListe."; zus2::usage = "\nDescription: (a)_n/(a)_m -> (a+m)_(n-m), \n GAMMA[a]*(a)_m -> GAMMA[a+m]. \nUsage: Expr/.zus2. \nSee also: zus1, zus3, erw1, erw2, Ers, PosListe, ManipulationsListe."; zus3::usage = "\nDescription: (a)_n/(b)_m -> (a)_(n-m), \n provided a+n=b+m, and \n GAMMA[a+n]/GAMMA[a] -> (a)_(n). \nUsage: Expr/.zus3. \nSee also: zus1, zus2, erw1, erw2, Ers, PosListe, ManipulationsListe."; erw1::usage = "\nDescription: (a)_n -> (a)_(m+n)/(a+n)_m, \n (a)_n -> GAMMA[a+n]/GAMMA[a]. \n The parameter m has to be entered on request. To apply the second rule, \n m has to be \"Infinity\". \nUsage: Expr/.erw1. \nSee also: erw2, zus1, zus2, zus3, Ers, PosListe, ManipulationsListe."; erw2::usage = "\nDescription: (a)_n -> (a-m)_(m+n)/(a-m)_m, \n GAMMA[a] -> GAMMA[a-m]*(a-m)_m. \n The parameter m has to be entered on request. To apply the second rule, \n m has to be \"Infinity\". \nUsage: Expr/.erw2. \nSee also: erw1, zus1, zus2, zus3, Ers, PosListe, ManipulationsListe."; zerl::usage = "\nDescription: (a)_n -> (a)_m*(a+m)_(n-m), \n GAMMA[a] -> GAMMA[a+m]/(a)_m. \n The parameter m has to be entered on request. \nUsage: Expr/.zerl. \nSee also: Ers, PosListe, ManipulationsListe."; baszerl::usage = "\nDescription: (a)_n -> m^n*Product[((a+k)/m)_(n/m),{k,0,m-1}], \n GAMMA[a] -> m^(a-1/2)*(2*Pi)^((1-m)/2)* Product[GAMMA[(a+k)/m],{k,0,m-1}]. \n The parameter m has to be entered on request. \nUsage: Expr/.baszerl. \nSee also: baszerl2, baszus, baszus2, Ers, PosListe, ManipulationsListe."; baszus::usage = "\nDescription: (a)_n -> m^(-m*n)*(a*m)_(m*n)/ \n Product[(a+k/m)_n,{k,1,m-1}], \n GAMMA[a] -> m^(1/2-a*m)*(2*Pi)^((m-1)/2)*GAMMA[a*m]/ \n Product[GAMMA[a+k/m],{k,1,m-1}]. \n The parameter m has to be entered on request. \n This operation is basically the inverse of baszerl. \nUsage: Expr/.baszus. \nSee also: Ers, PosListe, ManipulationsListe."; Ers::usage = "\nDescription: Function for controlled application of rules and functions. \nUsage: Ers[Expr,Rules,PosList]. \n \"Rules\" can be a rule, a list of rules, or a function. PosList must \n be a list of positions in Expr to which \"Rules\" should be applied. \n For instance, if PosList={{1,2},{4}}, then \"Rules\" is applied to \n Expr[[1,2]] and Expr[[4]] in Expr. If PosList={2,3}, then \"Rules\" is \n applied to Expr[[2]] and Expr[[3]] in Expr. The positions of \n subexpressions can be found by the function \"PosListe\". \nSee also: PosListe, ManipulationsListe, Subst."; PosListe::usage = "\nDescription: Function that provides a list of subexpressions of Expr \n together with the respective positions in Expr. This helps to use \n controlled application of rules or functions by means of \"Ers\". \nUsage: PosListe[Expr]. \nSee also: Ers, Subst."; SimplifyP::usage = "\nDescription: Rule that simplifies arguments in p, GAMMA, F, Sum, and \n expands exponents in powers. \nUsage: Expr/.SimplifyP. \nSee also: Expandq, MinusOne, SumExpand, PSort." SumExpand::usage = "\nDescription: Rule that expands Sums. \nUsage: Expr/.SumExpand. \nSee also: SimplifyP, Expandq, MinusOne, PSort." PSort::usage = "\nDescription: Rule that orders the parameters of hypergeometric series \n F[List1,List2,z], of \"multiple\" Pochhammer symbols p[List1,List2,n], \n and of \"multiple\" Gamma functions GAMMA[List1,List2] in a standard \n order. This function should be used for a quick test of the validity \n of an equation. \nUsage: Expr/.PSort. \nSee also: SimplifyP, SumExpand, FEinf, FOrdne, FPerm, FTausche, F, V, p, \n GAMMA." FEinf::usage = "\nDescription: Rule that inactivates automatic cancelling in F[] and then \n adds a parameter which has to be entered on request to the upper and \n lower parameters of F[]. \nUsage: Expr/.FEinf. \nSee also: FOrdne, FPerm, FTausche, PSort, SumRegeln, SumUmkehr, Ers, PosListe." FOrdne::usage = "\nDescription: Rule that tries to order the parameters of a \n hypergeometric series in \"well-poised\" order. If there is an \n upper parameter of the form (-n_NonnegativeInteger), then it \n is put at the very last place in the upper list. If the parameters \n could be paired such that the sum of each pair equals A, however A is \n missing in the upper parameters, then you have to add A to the upper \n and lower parameters by \"FEinf\" before applying \"FOrdne\". \nUsage: Expr/.FOrdne. \nSee also: FEinf, FPerm, FTausche, F, V, PSort, Ers, PosListe." HOrdne::usage="ja" HShift::usage="ja" FPerm::usage = "\nDescription: Rule for permuting parameters in hypergeometric series. \nUsage: Expr/.FPerm[,x]. \n x can be u,l,b. u causes a permutation of upper parameters, l causes a \n permutation of lower parameters, b causes a simultaneous permutation \n of respective upper and lower parameters. \"Permutation\" must be a \n sequence of positive numbers forming a permutation. The effect is that \n the new parameter at position i is the old parameter from position \n Permutation[i]. \nSee also: FOrdne, F, V, PSort, Ers, PosListe, HPerm." HPerm::usage = "\nDescription: Rule for permuting parameters in bilateral hypergeometric \n series. \nUsage: Expr/.HPerm[,x]. \n x can be u,l,b. u causes a permutation of upper parameters, l causes a \n permutation of lower parameters, b causes a simultaneous permutation \n of respective upper and lower parameters. \"Permutation\" must be a \n sequence of positive numbers forming a permutation. The effect is that \n the new parameter at position i is the old parameter from position \n Permutation[i]. \nSee also: HOrdne, H, PSort, Ers, PosListe, FPerm." FTausche::usage = "\nDescription: Rule for reordering parameters in hypergeometric series. \nUsage: Expr/.FTausche[n1,n2,x]. \n x can be u,l,b. u causes a reordering of upper parameters, l causes a \n reordering of lower parameters, b causes a simultaneous reordering \n of respective upper and lower parameters. n1 is the position of the \n parameter to be reordered, n2 is the new position. \nSee also: FPerm, FOrdne, F, V, PSort, Ers, PosListe." SumErw1::usage = "\nDescription: Rule that extends a Sum[] at the top. \n Sum[Expr,{k,l,n}] -> Sum[Expr,{k,l,n+m}]-Sum[Expr,{k,n+1,n+m}]. \n The parameter m has to be entered on request. \nUsage: Expr/.SumErw1. \nSee also: SumErw2, SumZerl, SumShift, SumTausche, SumRegeln, SumUmkehr, \n Ers, PosListe." SumErw2::usage = "\nDescription: Rule that extends a Sum[] at the bottom. \n Sum[Expr,{k,l,n}] -> Sum[Expr,{k,l-m,n}]-Sum[Expr,{k,l-m,l-1}]. \n The parameter m has to be entered on request. \nUsage: Expr/.SumErw2. \nSee also: SumErw1, SumZerl, SumShift, SumTausche, SumRegeln, SumUmkehr, \n Ers, PosListe." SumTausche::usage = "\nDescription: Rule that exchanges summations. \n Sum[Sum[Expr,{k1,l1,n1}],{k2,l2,n2}] \n -> Sum[Sum[Expr,{k2,l2,n2}],{k1,l1,n1}]. \nUsage: Expr/.SumTausche. \nSee also: SumErw1, SumErw2, SumSammle, SumShift, SumZerl, SumRegeln, \n SumUmkehr, Ers, PosListe." SumZerl::usage = "\nDescription: Rule that splits a Sum[] into two parts. \n Sum[Expr,{k,l,n}] -> Sum[Expr,{k,l,l+m-1}]+Sum[Expr,{k,l+m,n}]. \n The parameter m has to be entered on request. \nUsage: Expr/.SumZerl. \nSee also: SumErw1, SumErw2, SumShift, SumTausche, SumRegeln, SumUmkehr, \n Ers, PosListe." SumShift::usage = "\nDescription: Rule that shifts the index in a Sum[]. \n Sum[Expr[k],{k,l,n}] -> Sum[Expr[k+m],{k,l-m,n-m}]. \n The parameter m has to be entered on request. \nUsage: Expr/.SumShift. \nSee also: SumErw1, SumErw2, SumTausche, SumZerl, SumRegeln, SumUmkehr, \n Ers, PosListe." SumUmkehr::usage = "\nDescription: Rule that reverses the order of summation. \"SumUmkehr\" \n applies to Sum[] as well as F[]. \nUsage: Expr/.SumUmkehr. \nSee also: SumErw1, SumErw2, SumZerl, SumShift, SumTausche, SumRegeln, \n Ers, PosListe."; TeXMat::usage = "\nDescription: Function that writes (to be precise: appends) an expression \n Expr in InputForm to a file \"[name].m\" and the TeXForm of Expr to the \n file \"[name].tex\". The expressions are numbered automatically. The \n number can be reset by \"SchreibeZahl\". The string \"comment\" is \n optional. It allows to place the comment \"comment\" above the expression \n in each of the two files. \nUsage: TeXMat[Expr,name,comment]. \nSee also: AmSTeX, AmSLaTeX, LaTeX, TeX, TeXFV, SchreibeZahl."; SchreibeZahl::usage = "\nDescription: Variable that counts the number of expressions already written \n by using \"TeXMat\". Can be reset by defining a new value. \nUsage: SchreibeZahl=n_Integer. \nSee also: TeXMat."; Drucke::usage = "\nDescription: Function that directly sends an expression Expr in the \n Form PrintedForm to the printer. PrintedForm is an optional parameter \n which can be any of the format types (\"InputForm\", \"OutputForm\", \n \"TeXForm\", ...). The default is \"OutputForm\". \nUsage: Drucke[Expr,PrintedForm]. \nSee also: TeXMat, AmSTeX, AmSLaTeX, LaTeX, TeX, TeXFV."; Limes::usage = "\nDescription: Function for doing formal limits of hypergeometric \n expressions. If required for taking the limit, you will be asked whether \n or not the absolute value of some variable or expression is smaller than \n 1. Your decision is stored for the rest of your MATHEMATICA session. If \n you want to change your decision later, use \"AbsGreater\", \"AbsSmaller\", \n or \"AbsUndetermined\", respectively. \nWarning: This function uses primitive algebraic techniques to do the \n limit. There is no check if taking the limit is actually allowed. So it \n is left to you to check the validity of a result of \"Limes\". \nUsage: Limes[Expr, x->x0]. \nSee also: AbsGreater, AbsSmaller, AbsUndetermined, MinusOne."; AbsGreater::usage = "\nDescription: Function for declaring the absolute value of a variable or \n expression to be greater than 1. This declaration is used by \"Limes\". \nUsage: AbsGreater[Expr]. \nSee also: AbsSmaller, AbsUndetermined, Limes."; AbsSmaller::usage = "\nDescription: Function for declaring the absolute value of a variable or \n expression to be smaller than 1. This declaration is used by \"Limes\". \nUsage: AbsSmaller[Expr]. \nSee also: AbsGreater, AbsUndetermined, Limes."; AbsUndetermined::usage = "\nDescription: Function for declaring the absolute value of a variable or \n expression to be neither smaller nor greater than 1. This declaration \n is used by \"Limes\". \nUsage: AbsUndetermined[Expr]. \nSee also: AbsGreater, AbsSmaller, Limes."; MinusOne::usage = "\nDescription: Rule for getting rid of expressions of the form (-1)^N where \n N is an even or odd integer. \nUsage: Expr/.MinusOne. \nSee also: SimplifyP, Expandq, SumExpand." Begin["`Private`"] (*Hilfsdefinition fr den Durchschnitt zur Umgehung des Bugs in Version 1.2*) intersection[L1_List,L2_List]:=If[$VersionNumber<2., Select[Intersection[L1,L2],(MemberQ[L1,#]&&MemberQ[L2,#])&], Intersection[L1,L2]] (*Belegen von Module durch Block fr Versionen 1.?*) If[$VersionNumber<2.,Module=Block] Unprotect[Power]; Power[a_*b_,m_]:=a^m*b^m/;(a=!=Pi&&b=!=Pi); Power[Power[q_,n_],m_]:=Power[q,Expand[n*m]]; Protect[Power]; (*Definieren der OutputForm und TeXForm von p, F und GAMMA*) (*Der TeX-Switch ist auf Plain-TeX, LaTeX eingestellt, falls ifTeX=TeXtrue, auf AmS-TeX, falls ifTeX=AmSTeXtrue, auf AmS-LaTeX, falls ifTeX=AmSLaTeXtrue.*) ifTeX=AmSTeXtrue; TeX:=(ifTeX=TeXtrue;); LaTeX:=(ifTeX=TeXtrue;); AmSTeX:=(ifTeX=AmSTeXtrue;); AmSLaTeX:=(ifTeX=AmSLaTeXtrue;); Argument[List[x___]]:=x; Beistrich[B_]:=Sequence[B,", "]; pOutput[x__]:=Apply[SequenceForm,Drop[Map[Beistrich,{x}],-1]]; pOutput[]:="-"; pTeXForm[]:="-"; pTeXForm[x__]:=(X=Map[ToString[TeXForm[#]]&,{x}]; X=Argument[X]; ToString[StringForm[StringJoin[Argument[Table["``, ",{Length[{x}]-1}]],"``"],X]] ); TeXRules:= (Format[p[{a__},{},n_]]:= SequenceForm["(",pOutput[a],")",Subscript[n]]; Format[p[{},{b__},n_]]:= 1/SequenceForm["(",pOutput[b],")",Subscript[n]]; Format[p[{a__},{b__},n_]]:= SequenceForm["(",pOutput[a],")",Subscript[n]]/ SequenceForm["(",pOutput[b],")",Subscript[n]]; Format[p[{a__},{},n_],TeXForm]:= StringJoin["({ \\textstyle ",pTeXForm[a],"}) _{",ToString[TeXForm[n]],"} "]; Format[p[{},{b__},n_],TeXForm]:= StringJoin["{1 \\over {({ \\textstyle ",pTeXForm[b],"}) _{",ToString[TeXForm[n]],"}}} "]; Format[p[{a__},{b__},n_],TeXForm]:= StringJoin["{{({ \\textstyle ",pTeXForm[a],"}) _{",ToString[TeXForm[n]],"}} \\over ", "{({ \\textstyle ",pTeXForm[b],"}) _{",ToString[TeXForm[n]],"}}} "]; Format[p[{a__},n_]]:=SequenceForm["(",pOutput[a],")",Subscript[n]]; Format[p[{a__},n_],TeXForm]:= StringJoin["({ \\textstyle ",ToString[pTeXForm[a]],"}) _{",ToString[TeXForm[n]],"} "]; Format[p[a_,n_]]:=SequenceForm["(",a,")",Subscript[n]]; Format[p[a_,n_],TeXForm]:= StringJoin["({ \\textstyle ",ToString[TeXForm[a]],"}) _{",ToString[TeXForm[n]],"} "]; Format[GAMMA[{a___},{b___}]]:= If[Global`DOSFrage, SequenceForm["â", ColumnForm[{"Ú ","³ ","³ ","³ ","À "},Center,Center], ColumnForm[{pOutput[a]," ",pOutput[b]},Center,Center], ColumnForm[{" ¿"," ³"," ³"," ³"," Ù"},Center,Center]], SequenceForm["Ga", ColumnForm[{"[ ","| ","| ","| ","[ "},Center,Center], ColumnForm[{pOutput[a]," ",pOutput[b]},Center,Center], ColumnForm[{" ]"," |"," |"," |"," ]"},Center,Center]]]; Format[GAMMA[a_]]:=If[Global`DOSFrage, SequenceForm["â(",a,")"],SequenceForm["Ga(",a,")"]]; Format[GAMMA[{a___},{b___}],TeXForm]:= Switch[ifTeX, TeXtrue,StringJoin["\\Gamma \\left [ \\matrix { ", pTeXForm[a],"\\cr ", pTeXForm[b],"} \\right ]"], AmSTeXtrue,StringJoin["\\Gamma \\left [ \\matrix ", pTeXForm[a],"\\\\ ", pTeXForm[b],"\\endmatrix \\right ]"], AmSLaTeXtrue,StringJoin["\\Gamma \\left [ \\begin{matrix} ", pTeXForm[a],"\\\\ ", pTeXForm[b],"\\end{matrix} \\right ]"] ]; Format[GAMMA[a_],TeXForm]:= StringJoin["\\Gamma({ \\textstyle ",ToString[TeXForm[a]],"}) "]; Format[F[{La___},{Lb___},z_],TeXForm]:=Module[{ErgEx}, If[Switch[ifTeXFV,1,(Length[{La}]>=2&&Length[{Lb}]>=1&& Length[{La}]-Length[{Lb}]===1&& Factor[{La}[[1]]-({La}[[2]])*2+2]===0&& Factor[Map[(1+{La}[[1]]-#)&,Drop[{La},1]]-{Lb}]===Table[0,{Length[{Lb}]}]), 0,False], Unprotect[Power,Times]; Power[a_*b_,m_]=.; If[$VersionNumber>=2.,a_^m_*b_^m_ :=(a*b)^m/;Head[m]=!=Integer]; ErgEx=StringJoin["{} _{",ToString[TeXForm[Length[{La}]]],"} V _{", ToString[TeXForm[Length[{Lb}]]],"} ({\\displaystyle ",ToString[TeXForm[{La}[[1]]]],"; ", pTeXForm[Argument[Drop[{La},2]]],"}; {\\displaystyle ", ToString[TeXForm[z]],"})"]; If[$VersionNumber>=2.,a_^m_*b_^m_=.]; Power[a_*b_,m_]:=a^m*b^m; Protect[Power,Times]; ErgEx, Unprotect[Power,Times]; Power[a_*b_,m_]=.; If[$VersionNumber>=2.,a_^m_*b_^m_ :=(a*b)^m/;Head[m]=!=Integer]; ErgEx=Switch[ifTeX, TeXtrue,StringJoin["{} _{",ToString[TeXForm[Length[{La}]]],"} F _{", ToString[TeXForm[Length[{Lb}]]],"} \\!\\left [ \\matrix { ", pTeXForm[La],"\\cr ",pTeXForm[Lb],"} ; {\\displaystyle ", ToString[TeXForm[z]],"} \\right ] "], AmSTeXtrue,StringJoin["{} _{",ToString[TeXForm[Length[{La}]]],"} F _{", ToString[TeXForm[Length[{Lb}]]],"} \\!\\left [ \\matrix { ", pTeXForm[La],"}\\\\ { ",pTeXForm[Lb],"}\\endmatrix ; {\\displaystyle ", ToString[TeXForm[z]],"}\\right ] "], AmSLaTeXtrue,StringJoin["{} _{",ToString[TeXForm[Length[{La}]]],"} F _{", ToString[TeXForm[Length[{Lb}]]],"} \\!\\left [ \\begin{matrix} { ", pTeXForm[La],"}\\\\ { ",pTeXForm[Lb],"}\\end{matrix} ; {\\displaystyle ", ToString[TeXForm[z]],"}\\right ] "] ]; If[$VersionNumber>=2.,a_^m_*b_^m_=.]; Power[a_*b_,m_]:=a^m*b^m; Protect[Power,Times]; ErgEx ]]; Format[F[{a___},{b___},z_]]:= If[Global`DOSFrage, SequenceForm[Subscript[Length[{a}]],"F",Subscript[Length[{b}]], ColumnForm[{"Ú ","³ ","³ ","³ ","À "},Center,Center], ColumnForm[{pOutput[a]," ",pOutput[b]},Center,Center], "; ",z, ColumnForm[{" ¿"," ³"," ³"," ³"," Ù"},Center,Center]], SequenceForm[Subscript[Length[{a}]],"F",Subscript[Length[{b}]], ColumnForm[{"[ ","| ","| ","| ","[ "},Center,Center], ColumnForm[{pOutput[a]," ",pOutput[b]},Center,Center], "; ",z, ColumnForm[{" ]"," |"," |"," |"," ]"},Center,Center]]]; (*Definitionen fr bilaterale Reihen*) Format[H[{La___},{Lb___},z_],TeXForm]:=Module[{ErgEx}, If[Switch[ifTeXFV,1,(Length[{La}]>=2&&Length[{Lb}]>=1&& Length[{La}]-Length[{Lb}]===1&& Factor[{La}[[1]]-({La}[[2]])*2+2]===0&& Factor[Map[(1+{La}[[1]]-#)&,Drop[{La},1]]-{Lb}]===Table[0,{Length[{Lb}]}]), 0,False], Unprotect[Power,Times]; Power[a_*b_,m_]=.; If[$VersionNumber>=2.,a_^m_*b_^m_ :=(a*b)^m/;Head[m]=!=Integer]; ErgEx=StringJoin["{} _{",ToString[TeXForm[Length[{La}]]],"} V _{", ToString[TeXForm[Length[{Lb}]]],"} ({\\displaystyle ",ToString[TeXForm[{La}[[1]]]],"; ", pTeXForm[Argument[Drop[{La},2]]],"}; {\\displaystyle ", ToString[TeXForm[z]],"})"]; If[$VersionNumber>=2.,a_^m_*b_^m_=.]; Power[a_*b_,m_]:=a^m*b^m; Protect[Power,Times]; ErgEx, Unprotect[Power,Times]; Power[a_*b_,m_]=.; If[$VersionNumber>=2.,a_^m_*b_^m_ :=(a*b)^m/;Head[m]=!=Integer]; ErgEx=Switch[ifTeX, TeXtrue,StringJoin["{} _{",ToString[TeXForm[Length[{La}]]],"} H _{", ToString[TeXForm[Length[{Lb}]]],"} \\!\\left [ \\matrix { ", pTeXForm[La],"\\cr ",pTeXForm[Lb],"} ; {\\displaystyle ", ToString[TeXForm[z]],"} \\right ] "], AmSTeXtrue,StringJoin["{} _{",ToString[TeXForm[Length[{La}]]],"} H _{", ToString[TeXForm[Length[{Lb}]]],"} \\!\\left [ \\matrix { ", pTeXForm[La],"}\\\\ { ",pTeXForm[Lb],"}\\endmatrix ; {\\displaystyle ", ToString[TeXForm[z]],"}\\right ] "], AmSLaTeXtrue,StringJoin["{} _{",ToString[TeXForm[Length[{La}]]],"} H _{", ToString[TeXForm[Length[{Lb}]]],"} \\!\\left [ \\begin{matrix} { ", pTeXForm[La],"}\\\\ { ",pTeXForm[Lb],"}\\end{matrix} ; {\\displaystyle ", ToString[TeXForm[z]],"}\\right ] "] ]; If[$VersionNumber>=2.,a_^m_*b_^m_=.]; Power[a_*b_,m_]:=a^m*b^m; Protect[Power,Times]; ErgEx ]]; Format[H[{a___},{b___},z_]]:= If[Global`DOSFrage, SequenceForm[Subscript[Length[{a}]],"H",Subscript[Length[{b}]], ColumnForm[{"Ú ","³ ","³ ","³ ","À "},Center,Center], ColumnForm[{pOutput[a]," ",pOutput[b]},Center,Center], "; ",z, ColumnForm[{" ¿"," ³"," ³"," ³"," Ù"},Center,Center]], SequenceForm[Subscript[Length[{a}]],"H",Subscript[Length[{b}]], ColumnForm[{"[ ","| ","| ","| ","[ "},Center,Center], ColumnForm[{pOutput[a]," ",pOutput[b]},Center,Center], "; ",z, ColumnForm[{" ]"," |"," |"," |"," ]"},Center,Center]]]; ); TeXRules; Format::toobig="Expression too big for output.\nEnter \"FFormat\" and retry."; ifFFormat=1; FFormat:=(Switch[ifFFormat, 0,Unprotect[F,H,p,GAMMA]; Attributes[Format]={Protected,HoldAll}; TeXRules; Attributes[Format]={Protected}; Protect[F,H,p,GAMMA], 1,Unprotect[F,H,p,GAMMA]; Attributes[Format]={Protected,HoldAll}; Format[F[{a___},{b___},z_]]=.; Format[H[{a___},{b___},z_]]=.; Format[GAMMA[a_]]=.; Format[GAMMA[{a___},{b___}]]=.; Format[p[a_,n_]]=.; Format[p[{a__},n_]]=.; Format[p[{a__},{b__},n_]]=.; Format[p[{},{b__},n_]]=.; Format[p[{a__},{},n_]]=.; Attributes[Format]={Protected}; Protect[F,H,p,GAMMA]; ];ifFFormat=1-ifFFormat;) (*Rechenregeln fr p, F, V und GAMMA*) ListTest[Liste_]:=MemberQ[{Head[Liste]},List]; V[a_,x_List,z_]:=F[Join[{a,1+a/2},x], Join[{a/2},Map[Simplify[1+a-#]&,x]],z]; Rules:= (Unprotect[Times,Power]; p[x_,0]=1; p[0,n_]:=0/;n>0; p[x_List,y_List,0]=1; p[x_List,y_List,n_]:=Module[{POSX,POSY,Intsec,X=x,Y=y}, While[(Intsec=intersection[X,Y])!={}, Intsec=Intsec[[1]]; POSX=Select[Position[X,Intsec],(Length[#]<=1)&][[1,1]]; POSY=Select[Position[Y,Intsec],(Length[#]<=1)&][[1,1]]; X=Drop[X,{POSX,POSX}]; Y=Drop[Y,{POSY,POSY}]; ]; p[X,Y,n] ] /; intersection[x,y]!={}; p/: p[x_List,y_List,n_]*p[z_List,u_List,n_]:= p[Join[x,z],Join[y,u],n]; p/: p[x_List,y_List,n_]^(-1):=p[y,x,n]; p/: p[x_List,y_List,n_]*p[z_,n_]^(exp_:1):= p[Join[x,Table[z,{exp}]],y,n]/;exp>0; p/: p[x_List,y_List,n_]*p[z_,n_]^(exp_:1):= p[x,Join[y,Table[z,{-exp}]],n]/;exp<0; p[{},{},n_]:=1; GAMMA[x_List,y_List]:=Module[{POSX,POSY,Intsec,X=x,Y=y}, While[(Intsec=intersection[X,Y])!={}, Intsec=Intsec[[1]]; POSX=Select[Position[X,Intsec],(Length[#]<=1)&][[1,1]]; POSY=Select[Position[Y,Intsec],(Length[#]<=1)&][[1,1]]; X=Drop[X,{POSX,POSX}]; Y=Drop[Y,{POSY,POSY}]; ]; GAMMA[X,Y] ] /; intersection[x,y]!={}; GAMMA/: GAMMA[x_List,y_List]*GAMMA[z_List,u_List]:= GAMMA[Join[x,z],Join[y,u]]; GAMMA/: GAMMA[x_List,y_List]^(-1):=GAMMA[y,x]; GAMMA/: GAMMA[x_List,y_List]*GAMMA[z_]^(exp_:1):= GAMMA[Join[x,Table[z,{exp}]],y]/;exp>0; GAMMA/: GAMMA[x_List,y_List]*GAMMA[z_]^(exp_:1):= GAMMA[x,Join[y,Table[z,{-exp}]]]/;exp<0; GAMMA[{},{}]:=1; F[List1_List,List2_List,0]=1; F[List1_List,List2_List,z_]:=1/;MemberQ[List1,0]&& !(Apply[Or,Map[(#<=0)&&(IntegerQ[#])&,List2]]); FRun=False; F[x_,y_,v_]:=Module[{POSX,POSY,Intsec,X=x,Y=y,POSL}, While[(Intsec=intersection[X,Y])!={}, Intsec=Intsec[[1]]; POSL=Select[Position[X,Intsec],(Length[#]<=1)&]; POSX=POSL[[1,1]]; POSY=Select[Position[Y,Intsec],(Length[#]<=1)&][[1,1]]; If[!FRun, If[Length[POSL]<=1&&IntegerTest[Intsec], Print[""]; Print["Warning: The expression"]; Print[""]; FCancel; Print[F[x,y,v]]; FCancel; Print[""]; Print["was obtained, which contains ",Intsec,", a"]; Print["nonpositive integer, as top and bottom argument. The"]; Print["cancellation performed below might be incorrect."]; Print[""]; ] ]; X=Drop[X,{POSX,POSX}]; Y=Drop[Y,{POSY,POSY}]; ]; F[X,Y,v]/.FOrdne ] /; Switch[ifFCancel,1,intersection[x,y]!={},0,False]; H[x_,y_,v_]:=Module[{POSX,POSY,Intsec,X=x,Y=y,POSL}, While[(Intsec=intersection[X,Y])!={}, Intsec=Intsec[[1]]; POSL=Select[Position[X,Intsec],(Length[#]<=1)&]; POSX=POSL[[1,1]]; POSY=Select[Position[Y,Intsec],(Length[#]<=1)&][[1,1]]; If[!FRun, If[Length[POSL]<=1&&IntegerTest[Intsec], Print[""]; Print["Warning: The expression"]; Print[""]; FCancel; Print[H[x,y,v]]; FCancel; Print[""]; Print["was obtained, which contains ",Intsec,", a"]; Print["nonpositive integer, as top and bottom argument. The"]; Print["cancellation performed below might be incorrect."]; Print[""]; ] ]; X=Drop[X,{POSX,POSX}]; Y=Drop[Y,{POSY,POSY}]; ]; H[X,Y,v]/.HOrdne ] /; Switch[ifFCancel,1,intersection[x,y]!={},0,False]; Protect[Times,Power];); Rules; (*Definition der Binomialkoeffizienten und Faktoriellen*) Binomialp[n_,k_]:=p[n-k+1,k]/p[1,k]; Factorialp[n_]:=p[1,n] Unprotect[Product]; Product/: Product[t_, {x_, a_, n_, 1}]/Product[t_, {x_, a_, n1_, 1}] := (t /. x-> n)/; Factor[n1 - (n-1)]===0; Product/: Product[t_, {x_, a_, n1_, 1}]/Product[t_, {x_, a_, n_, 1}] := 1/(t /. x-> n)/; Factor[n1 - (n-1)]===0; Protect[Product]; (*Definition von paufl, pzerl, pzus, Gzerl und Gzus*) paufl:={p[{List1___},{List2___},k_]^(exp_:1):> Product[Product[{List1}[[jj]]+ii,{ii,0,k-1}],{jj,1,Length[{List1}]}]^exp/ Product[Product[{List2}[[jj]]+ii,{ii,0,k-1}],{jj,1,Length[{List2}]}]^exp/; IntegerQ[Factor[k]]&&k>=0, p[{List1___},{List2___},k_]^(exp_:1):> Product[Product[{List2}[[jj]]+ii,{ii,k,-1}],{jj,1,Length[{List2}]}]^exp/ Product[Product[{List1}[[jj]]+ii,{ii,k,-1}],{jj,1,Length[{List1}]}]^exp/; IntegerQ[Factor[k]]&&k<0, p[x_,k_]^(exp_:1):>Product[x+i,{i,0,k-1}]^exp/;IntegerQ[Factor[k]]&&k>=0, p[x_,k_]^(exp_:1):>1/Product[x+i,{i,k,-1}]^exp/;IntegerQ[Factor[k]]&&k<0 } pzerl:=(p[{List1___},{List2___},n_]:> Module[{jj},Product[p[{List1}[[jj]],n],{jj,1,Length[{List1}]}]/ Product[p[{List2}[[jj]],n],{jj,1,Length[{List2}]}]]); pzus[n_]:=(Expr_ :>pzusH[Expr,n]); pzusH[Expr_,n_]:=(Expr*pH[{},{},n]/.pH->p) pH/: pH[x_List,y_List,n_]*p[z_,n_]^(exp_:1):=pH[Join[x,Table[z,{exp}]],y,n]/;exp>0; pH/: pH[x_List,y_List,n_]*p[z_,n_]^(exp_:1):=pH[x,Join[y,Table[z,{-exp}]],n]/;exp<0; Gzerl:=(GAMMA[{List1___},{List2___}]:> Module[{jj},Product[GAMMA[{List1}[[jj]]],{jj,1,Length[{List1}]}]/ Product[GAMMA[{List2}[[jj]]],{jj,1,Length[{List2}]}]]); Gzus:=(Expr_ :>GzusH[Expr]); GzusH[Expr_]:=(Expr*GAMMAH[{},{}]/.GAMMAH->GAMMA); GAMMAH/: GAMMAH[x_List,y_List]*GAMMA[z_]^(exp_:1):=GAMMAH[Join[x,Table[z,{exp}]],y]/;exp>0; GAMMAH/: GAMMAH[x_List,y_List]*GAMMA[z_]^(exp_:1):=GAMMAH[x,Join[y,Table[z,{-exp}]]]/;exp<0; Expandq:=(bas_^exp_ :>bas^Expand[exp]); (*Ersetzungsregeln zum Rechnen mit p und GAMMA*) GrenzeO[x_]:=If[IntegerTest[x],{-x},{},{}]; GrenzeU[x_]:=If[IntegerTest[-x],{-x},{},{}]; P:=(If[ValueQ[p[PPP,1]], Unprotect[p,F,H,GAMMA];Clear[p,F,H,GAMMA];Rules;TeXRules; If[ifFFormat===0,ifFFormat=1;FFormat]; Protect[p,F,H,GAMMA];, Unprotect[p,F,H,GAMMA]; p[{List1___},{List2___},k_]:= Module[{jj},Product[p[{List1}[[jj]],k],{jj,1,Length[{List1}]}]/ Product[p[{List2}[[jj]],k],{jj,1,Length[{List2}]}]]; p[x_,k_]:=Product[x+i,{i,0,k-1}]/;IntegerQ[Factor[k]]&&k>=0; p[x_,k_]:=1/Product[x+i,{i,k,-1}]/;IntegerQ[Factor[k]]&&k<0; p[x_,k_]:=Gamma[x+k]/Gamma[x]/;!IntegerQ[Factor[k]]&&k>=0&&NumberQ[x]; p[x_,k_]:=Gamma[x]/Gamma[x+k]/;!IntegerQ[Factor[k]]&&k<0&&NumberQ[x]; GAMMA[x_]:=Gamma[x]/;NumberQ[x]; F[List1_,List2_,z_]:=Module[{SumGrenze,SumVar,SumVars}, SumGrenze=Min[Flatten[Map[GrenzeO,List1]]]; If[!IntegerQ[SumGrenze], SumVar=Input[StringJoin["A hypergeometric series is converted into a sum.\n", "Enter a variable for the summation index: "]]; ]; SumVars={SumVar,0,SumGrenze}; Sum[(p[List1,Join[List2,{1}],SumVar]/.pzerl)*z^SumVar, Release[SumVars]]]; H[List1_,List2_,z_]:=Module[{SumGrenzeO,SumGrenzeU,SumVar,SumVars}, SumGrenzeO=Min[Flatten[Map[GrenzeO,List1]]]; SumGrenzeU=Max[Flatten[Map[GrenzeU,List2]]]; If[!IntegerQ[SumGrenzeO]||!IntegerQ[SumGrenzeU], SumVar=Input[StringJoin["A bilateral hypergeometric series is converted into a sum.\n", "Enter a variable for the summation index: "]]; ]; SumVars={SumVar,SumGrenzeU+1,SumGrenzeO}; Sum[(p[List1,List2,SumVar]/.pzerl)*z^SumVar, Release[SumVars]]]; Protect[p,F,H,GAMMA]; ]); ifTeXFV=1; TeXFV:=(ifTeXFV=1-ifTeXFV;); ifFCancel=1; FCancel:=(ifFCancel=1-ifFCancel;); hypAttributes:=(Print[""]; If[ValueQ[p[PPP,1]], Print["Automatic evaluation of p and F is active."], Print["Automatic evaluation of p and F is inactive."]]; Switch[ifFCancel,0,Print["Automatic cancelling in F is inactive."], 1,Print["Automatic cancelling in F is active."]]; Switch[ifTeX,TeXtrue,Print["The output of TeXForm can be used with Plain-TeX and LaTeX."], AmSTeXtrue,Print["The output of TeXForm can be used with AmS-TeX."], AmSLaTeXtrue,Print["The output of TeXForm can be used with AmS-LaTeX."]]; Switch[ifTeXFV,0,Print["TeXForm uses F[] for very well-poised hypergeometric series."], 1,Print["TeXForm uses V[] for very well-poised hypergeometric series."]]; ) neg1:={p[a_,n_]^(exp_:1):>p[a+n,-n]^(-exp)}; neg2:={p[a_,n_]^(exp_:1):>(-1)^(-n*exp)*p[1-a,-n]^(-exp)}; trans:={p[a_,n_]^(exp_:1):>p[1-n-a,n]^exp*(-1)^(n*exp)}; inv:={GAMMA[a_]^(exp_:1):>Pi^exp/(Sin[Pi*a]*GAMMA[1-a])^exp}; lina1:={p[a_,n_]^(exp_:1):>(a)^exp*p[a+1,n-1]^exp, GAMMA[a_]^(exp_:1):>(a-1)^exp*GAMMA[a-1]^exp}; lina2:={p[a_,n_]^(exp_:1):>(a+n-1)^exp*p[a,n-1]^exp}; linz:={(b_*p[a_,n_])^(exp_:1):>p[a-1,n+1]^exp/;Factor[(b+1)-(a)]===0, (b_*GAMMA[a_])^(exp_:1):>GAMMA[a+1]^exp/;Factor[(b)-(a)]===0, (b_*p[a_,n_])^(exp_:1):>p[a,n+1]^exp/;Factor[(b)-(a+n)]===0, p[a_,n_]^(exp_:1)*(b_)^(nexp_:1):>p[a+1,n-1]^exp/; Factor[(b)-(a)]===0&&Factor[nexp+exp]===0, GAMMA[a_]^(exp_:1)*(b_)^(nexp_:1):>GAMMA[a-1]^exp/; Factor[(b)-(a-1)]===0&&Factor[nexp+exp]===0, p[a_,n_]^(exp_:1)*(b_)^(nexp_:1):>p[a,n-1]^exp/; Factor[(b)-(a+n-1)]===0&&Factor[nexp+exp]===0, (b_*p[a_,n_])^(exp_:1):>(-p[a-1,n+1])^exp/;Factor[(-b+1)-(a)]===0, (b_*GAMMA[a_])^(exp_:1):>(-GAMMA[a+1])^exp/;Factor[(-b)-(a)]===0, (b_*p[a_,n_])^(exp_:1):>(-p[a,n+1])^exp/;Factor[(-b)-(a+n)]===0, p[a_,n_]^(exp_:1)*(b_)^(nexp_:1):>(-p[a+1,n-1])^exp/; Factor[(-b)-(a)]===0&&Factor[nexp+exp]===0, GAMMA[a_]^(exp_:1)*(b_)^(nexp_:1):>(-GAMMA[a-1])^exp/; Factor[(-b)-(a-1)]===0&&Factor[nexp+exp]===0, p[a_,n_]^(exp_:1)*(b_)^(nexp_:1):>(-p[a,n-1])^exp/; Factor[(-b)-(a+n-1)]===0&&Factor[nexp+exp]===0}; zus1:={p[a_,n_]^(exp_:1)*p[b_,m_]^(exp_:1):>p[a,m+n]^exp/;Factor[(b)-(a+n)]===0, p[a_,n_]^(exp_:1)*GAMMA[b_]^(nexp_:1):>GAMMA[a]^nexp/; Factor[(b)-(a+n)]===0&&Factor[nexp+exp]===0}; zus2:={p[a_,n_]^(exp_:1)*p[b_,m_]^(nexp_:1):>p[a+m,n-m]^exp/; Factor[(b)-(a)]===0&&Factor[nexp+exp]===0, p[a_,n_]^(exp_:1)*GAMMA[b_]^(exp_:1):>GAMMA[a+n]^exp/;Factor[(b)-(a)]===0}; zus3:={p[a_,n_]^(exp_:1)*p[b_,m_]^(nexp_:1):>p[a,n-m]^exp/; Factor[(b+m)-(a+n)]===0&&Factor[nexp+exp]===0, GAMMA[a_]^(exp_:1)*GAMMA[b_]^(nexp_:1):>p[b,a-b]^exp/; Factor[nexp+exp]===0}; erw1:=Module[{m},m=Input["top-extend by: "]; If[m===Infinity, {p[a_,n_]^(exp_:1)->GAMMA[a+n]^exp/GAMMA[a]^exp}, {p[a_,n_]^(exp_:1)->p[a,n+m]^exp/p[a+n,m]^exp}, {p[a_,n_]^(exp_:1)->p[a,n+m]^exp/p[a+n,m]^exp}]]; erw2:=Module[{m},m=Input["bottom-extend by: "]; {p[a_,n_]^(exp_:1)->p[a-m,n+m]^exp/p[a-m,m]^exp, GAMMA[a_]^(exp_:1)->GAMMA[a-m]^exp*p[a-m,m]^exp}]; zerl:=Module[{m},m=Input["bottom-split by: "]; {p[a_,n_]^(exp_:1)->p[a,m]^exp*p[a+m,n-m]^exp, GAMMA[a_]^(exp_:1)->GAMMA[a+m]^exp/p[a,m]^exp}]; baszerl:=Module[{m,k},m=Input["split into ? terms: "]; {p[a_,n_]^(exp_:1)->m^(n*exp)*Product[p[(a+k)/m,n/m],{k,0,m-1}]^exp, GAMMA[a_]^(exp_:1)->m^(exp*(a-1/2))*(2*Pi)^(exp*(1-m)/2)* Product[GAMMA[(a+k)/m],{k,0,m-1}]^exp}]; baszus:=Module[{m,k},m=Input["put together ? terms: "]; {p[a_,nn_]^(exp_:1)->m^(-m*nn*exp)*p[a*m,m*nn]^exp/ (Product[p[a+k/m,nn],{k,1,m-1}])^exp, GAMMA[a_]^(exp_:1)->m^(exp*(1/2-a*m))*(2*Pi)^(exp*(m-1)/2)*GAMMA[a*m]^exp/ (Product[GAMMA[a+k/m],{k,1,m-1}])^exp} ]; ManipulationsListe={"neg1","neg2","trans","inv","lina1","lina2", "linz","zus1","zus2","zus3","erw1","erw2","zerl","baszerl","baszus"} (*Funktionen un Definitionen, die das Manipulieren von Ausdrcken und Gleichungen erm”glichen*) Listwrap[L_]:=If[ListTest[L],L,{L}]; Ers[Term_,Rules_,Positions_]:=Module[{Erg}, If[MemberQ[{List,Rule,RuleDelayed},Head[Rules]], Erg=MapAt[ReplaceAll[#,Rules]&,Term,Map[Listwrap,Positions]], Erg=MapAt[Rules,Term,Map[Listwrap,Positions]]]; If[Head[Erg]===Equal,LS=Erg[[1]];RS=Erg[[2]];]; Erg ]; Subst[Expr_,Pos_,LiS_:LS,ReS_:RS]:=Ers[Expr,Ausdr_ :>Ausdr*ReS/LiS,{Pos}] PosListe[Expr_]:=PosListe[Expr,1]; PosListe[Expr_,lev_]:=Module[{ZwErg,Var}, If[$VersionNumber==2., ZwErg=R[Cases[Expr,x_->{x,Hold[Select[Position[Expr,x], Function[Var,Length[Var]===lev]]]},{lev}]], ZwErg=Map[{#,Select[Position[Expr,#], Function[Var,Length[Var]===lev]]}&,Level[Expr,{lev}]]; ZwErg=Select[ZwErg,(Length[#[[2,1]]]===lev)&]; Union[ZwErg] ] ]; R:=Release; SimplifyP:=(Expr_ :>(Expr//.simplifyP/.MinusOne/.FOrdne)); simplifyP:={p[x_,y_]^(exp_:1):>p[Expand[x],Expand[y]]^exp, p[x_List,y_List,k_]^(exp_:1):>p[Expand[x],Expand[y],Expand[k]]^exp, GAMMA[x_]^(exp_:1):>GAMMA[Expand[x]]^exp, Binomial[x_,y_]^(exp_:1):>Binomial[Expand[x],Expand[y]]^exp, Factorial[x_]^(exp_:1):>Factorial[Expand[x]]^exp, Factorial2[x_]^(exp_:1):>Factorial2[Expand[x]]^exp, GAMMA[x_List,y_List]^(exp_:1):>GAMMA[Expand[x],Expand[y]]^exp, F[x_List,y_List,z_]^(exp_:1):>(F[Expand[x],Expand[y],Factor[z]])^exp, Sum[x_,{l1_,l2_,l3_}]^(exp_:1):>Sum[x,{l1,Expand[Factor[l2]],Expand[Factor[l3]]}]^exp/; Expand[Factor[l2]]=!=l2||Expand[Factor[l3]]=!=l3, Expandq} SumExpand:=(Expr_ :>(Expr//.sumExpand)); sumExpand:={Sum[x_,{l___}]:>Sum[Expand[x],{l}]/;Expand[x]=!=x, Sum[x_-y_,{l___}]:>Sum[x,{l}]-Sum[y,{l}], Sum[x_+y_,{l___}]:>Sum[x,{l}]+Sum[y,{l}], Sum[x_,{l1_,l2_,l3_}]^(exp_:1):>Sum[x,{l1,Expand[Factor[l2]],Expand[Factor[l3]]}]^exp/; Expand[Factor[l2]]=!=l2||Expand[Factor[l3]]=!=l3 } PSort:={F[List1_List,List2_List,z_]:>(F[Sort[List1],Sort[List2],z]/.SimplifyP), p[List1_List,List2_List,n_]:>(p[Sort[List1],Sort[List2],n]/.SimplifyP), GAMMA[List1_List,List2_List]:> (GAMMA[Sort[List1],Sort[List2]]/.SimplifyP)}; FEinf:=(F[List1_List,List2_List,z_]:> Module[{A},A=Input["Add the parameter: "]; If[ifFCancel===1,FCancel]; F[Join[{A},List1],Join[{A},List2],z]]); FPerm[Perm__,Wahl_]:=(F[List1_List,List2_List,z_]:> Module[{HPerm1,HPerm2,ii}, If[Sort[{Perm}]===Table[ii,{ii,Length[{Perm}]}], Switch[Wahl, Global`u, If[Length[List1] Module[{HPerm1,ii}, If[Sort[{Perm}]===Table[ii,{ii,Length[{Perm}]}], Switch[Wahl, Global`u, If[Length[List1] Switch[Wahl, Global`u,F[Insert[Drop[List1,{n1,n1}],List1[[n1]],n2],List2,z], Global`l,F[List1,Insert[Drop[List2,{n1,n1}],List2[[n1]],n2],z], Global`b,F[Insert[Drop[List1,{n1+1,n1+1}],List1[[n1+1]],n2+1], Insert[Drop[List2,{n1,n1}],List2[[n1]],n2],z] ]); POS[Liste_List,X_]:=Select[Position[Liste,X],(Length[#]<=1)&][[1,1]]; PoisEliminate[Liste1_List,Liste2_List,Liste3_List,Liste4_List,x_,y_]:= Module[{POSX,LIST1=Liste1,LIST2=Liste2,LIST3=Liste3,LIST4=Liste4,HList1,HList2}, HList1=Map[Factor[#-x]&,Liste1]; HList2=Map[Factor[#-y]&,Liste2]; If[MemberQ[HList1,0]&&MemberQ[HList2,0], POSX=POS[HList1,0]; LIST1=Drop[Liste1,{POSX,POSX}]; LIST3=Join[Liste3,{x}]; POSX=POS[HList2,0]; LIST2=Drop[Liste2,{POSX,POSX}]; LIST4=Join[Liste4,{y}]; ]; {LIST1,LIST2,LIST3,LIST4} ]; FOrdne:=(F[List1_List,List2_List,z_]:> Module[{Intsec,GesList,ii,Var1,Var2,MaxEl,POSX,NewList1=List1,NewList2=List2, ProvList1,ProvList2}, GesList=Table[Map[List1[[ii]]+#&,List2],{ii,1,Length[List1]}]; GesList=Apply[Join,GesList]; Intsec=intersection[GesList,1+List1]; If[Intsec=!={}, Intsec=Table[Var1=Intsec[[ii]]; {Var1,Count[GesList,Var1]}, {ii,1,Length[Intsec]}]; MaxEl=Max[Table[Intsec[[ii,2]],{ii,1,Length[Intsec]}]]; Intsec=Select[Intsec,(#[[2]]===MaxEl)&][[1,1]]; POSX=POS[List1,Intsec-1]; NewList1={Intsec-1};NewList2={}; ProvList1=Drop[List1,{POSX,POSX}];ProvList2=List2; {ProvList1,ProvList2,NewList1,NewList2}= PoisEliminate[ProvList1,ProvList2,NewList1,NewList2, Expand[(Intsec+1)/2],Expand[(Intsec-1)/2]]; GesList=ProvList1; For[ii=1,ii<=Length[GesList],ii++, {ProvList1,ProvList2,NewList1,NewList2}= PoisEliminate[ProvList1,ProvList2,NewList1,NewList2, GesList[[ii]],Intsec-GesList[[ii]]]]; Clear[ii]; NewList1=Join[NewList1,ProvList1]; NewList2=Join[NewList2,ProvList2]; ]; F[NewList1,NewList2,z] ]); HOrdne:=(H[List1_List,List2_List,z_]:> Module[{Intsec,GesList,ii,Var1,Var2,MaxEl,POSX,NewList1=List1,NewList2=List2, ProvList1,ProvList2}, GesList=Table[Map[List1[[ii]]+#&,List2],{ii,1,Length[List1]}]; Intsec=Apply[Join,GesList]; If[Intsec=!={}, Intsec=Table[Var1=Intsec[[ii]]; {Var1,Count[Intsec,Var1]}, {ii,1,Length[Intsec]}]; MaxEl=Max[Table[Intsec[[ii,2]],{ii,1,Length[Intsec]}]]; Intsec=Select[Intsec,(#[[2]]===MaxEl)&][[1,1]]; NewList1={};NewList2={}; ProvList1=List1;ProvList2=List2; {ProvList1,ProvList2,NewList1,NewList2}= PoisEliminate[ProvList1,ProvList2,NewList1,NewList2, Expand[(Intsec+1)/2],Expand[(Intsec-1)/2]]; GesList=ProvList1; For[ii=1,ii<=Length[GesList],ii++, {ProvList1,ProvList2,NewList1,NewList2}= PoisEliminate[ProvList1,ProvList2,NewList1,NewList2, GesList[[ii]],Intsec-GesList[[ii]]]]; Clear[ii]; NewList1=Join[NewList1,ProvList1]; NewList2=Join[NewList2,ProvList2]; ]; H[NewList1,NewList2,z] ]); HF:=(H[List1_List,List2_List,z_]:>Module[{m,TopL,BottomL}, m=Input["Split at: "]; p[List1,List2,m]*z^m*F[Join[List1+m,{1}],List2+m,z]+ p[List1,List2,m-1]*z^(m-1)* F[Join[-List2-(m-2),{1}],-List1-(m-2), 1/z*(-1)^(Length[List2]-Length[List1])] ]); FH:=(F[List1_List,List2_List,z_]:>Module[{m,TopL,BottomL}, TopL=List1; BottomL=Join[List2,{1}]; H[TopL,BottomL,z]- p[BottomL-1,TopL-1,1]*z^(-1)* F[Join[-BottomL+2,{1}],-TopL+2,1/z*(-1)^(Length[List1]-Length[List2]-1)] ]); HShift:=(H[List1_List,List2_List,z_]:>Module[{m}, m=Input["shift by: "]; p[List1,List2,m]*z^m*H[List1+m,List2+m,z] ]); Gleichung:=(LS==RS); GlTausche:=Module[{ZwExpr},ZwExpr=LS;LS=RS;RS=ZwExpr;Gleichung]; Mal[expr_]:=(LS=LS*expr;RS=RS*expr;Gleichung); Add[expr_]:=(LS=LS+expr;RS=RS+expr;Gleichung); Div[expr_]:=(LS=LS/expr;RS=RS/expr;Gleichung); Sub[expr_]:=(LS=LS-expr;RS=RS-expr;Gleichung); Hoch[expr_]:=(LS=LS^expr;RS=RS^expr;Gleichung); Ers[Regel_]:=(LS=(LS/.Regel);RS=(RS/.Regel);Gleichung); Unprotect[Sum]; SumDef:= ( Sum[x__,y_]:=Module[{SumVar,SumVars,bottom}, If[Length[{x}]<=1, Switch[{FreeQ[LS==RS,Global`kk],FreeQ[LS==RS,Global`ii], FreeQ[LS==RS,Global`jj],FreeQ[LS==RS,Global`ll], FreeQ[LS==RS,Global`mm]}, {True,___},SumVar=Global`kk, {False,True,___},SumVar=Global`ii, {False,False,True,___},SumVar=Global`jj, {False,False,False,True,___},SumVar=Global`ll, {False,False,False,False,True,___},SumVar=Global`mm, _,SumVar=Global`nn ]; bottom={x}[[1]], SumVar={x}[[1]]; bottom={x}[[2]] ]; SumVars={SumVar,bottom,y}; LS=Sum[LS,Release[SumVars]]; RS=Sum[RS,Release[SumVars]]; Gleichung/.SumRegeln ]/;If[Length[{x}]>=2,!ListTest[{x}[[2]]],!ListTest[y]]; Protect[Sum]; ); SumDef; ExprtoF[Expr_^(exp_:1),k_,SumFSumR_]:=Module[{Expo}, Expo=Expand[Factor[exp]]; If[Head[Expo]===Integer, Switch[Expr,p[a___],ptoF[Expr^Expo,k], GAMMA[a_],GAMMAtoF[Expr^Expo,k], Dummy,Null, Sum[a_,{l1_,l2_,l3_}],SumtoF[Expr^Expo,k,SumFSumR], _,factoF[Expr^Expo,k]], If[FreeQ[Expr,k]&&PolynomialQ[Expo,k]&&Exponent[Expo,k]<=1, ConstF=ConstF*Expr^(Expo/.k->0); ArgF=ArgF*Expr^Coefficient[Expo,k,1], TermF=TermF*Expr^Expo; TopF=Join[TopF,{ptoFfail}] ] ] ] SumtoF[Expr_^(exp_:1),k_,SumFSumR_]:=Module[{ConstH,TopH,BottomH,ArgH,TermH}, ConstH=ConstF; TopH=TopF; BottomH=BottomF; ArgH=ArgF; TermH=TermF; TermH=TermH*(Expr/.If[SumFSumR===SUMF,SumF,SumRegeln])^exp; ConstF=ConstH; TopF=TopH; BottomF=BottomH; ArgF=ArgH; TermF=TermH; TopF=Join[TopF,{ptoFfail}] ]; GAMMAtoF[GAMMA[x_]^(exp_:1),k_]:= (ConstF=ConstF*GAMMA[x/.k->0]^exp;ptoF[p[x/.k->0,x-(x/.k->0)]^exp,k]); ptoF[p[x_,y_]^(exp_:1),k_]:=Module[{COEFFx,ConstFx,COEFFy,ConstFy,aplusc,bplusd}, ConstFx=(x/.k->0); ConstFy=(y/.k->0); COEFFx=Expand[Cancel[x-ConstFx]]; COEFFy=Expand[Cancel[y-ConstFy]]; If[PolynomialQ[COEFFx,k]&&Exponent[COEFFx,k]<=1&& PolynomialQ[COEFFy,k]&&Exponent[COEFFy,k]<=1, COEFFx=Coefficient[COEFFx,k]; COEFFy=Coefficient[COEFFy,k]; ConstF=ConstF*p[ConstFx,ConstFy]^exp; aplusc=Expand[COEFFx+COEFFy]; bplusd=Expand[ConstFx+ConstFy]; If[IntegerQ[aplusc], If[aplusc=!=0, ArgF=ArgF*(aplusc^aplusc)^exp; If[aplusc>0, TermF=TermF*Product[p[(bplusd+ii)/aplusc,k],{ii,0,aplusc-1}]^exp; If[exp>0, TopF=Join[TopF,Flatten[Table[Table[(bplusd+ii)/aplusc,{exp}],{ii,0,aplusc-1}]]], BottomF=Join[BottomF,Flatten[Table[Table[(bplusd+ii)/aplusc,{-exp}],{ii,0,aplusc-1}]]]; ], TermF=TermF/Product[p[(1-bplusd+ii)/-aplusc,k],{ii,0,-aplusc-1}]^exp; If[exp>0, BottomF=Join[BottomF,Flatten[Table[Table[(1-bplusd+ii)/-aplusc,{exp}],{ii,0,-aplusc-1}]]], TopF=Join[TopF,Flatten[Table[Table[(1-bplusd+ii)/-aplusc,{-exp}],{ii,0,-aplusc-1}]]]; ] ] ], TopF=Join[TopF,{ptoFfail}]; TermF=TermF*p[bplusd,aplusc*k]^exp; ]; If[IntegerQ[COEFFx], If[COEFFx=!=0, ArgF=ArgF/(COEFFx^COEFFx)^exp; If[COEFFx>0, TermF=TermF/Product[p[(ConstFx+ii)/COEFFx,k],{ii,0,COEFFx-1}]^exp; If[exp>0, BottomF=Join[BottomF,Flatten[Table[Table[(ConstFx+ii)/COEFFx,{exp}],{ii,0,COEFFx-1}]]], TopF=Join[TopF,Flatten[Table[Table[(ConstFx+ii)/COEFFx,{-exp}],{ii,0,COEFFx-1}]]] ], TermF=TermF*Product[p[(1-ConstFx+ii)/-COEFFx,k],{ii,0,-COEFFx-1}]^exp; If[exp>0, TopF=Join[TopF,Flatten[Table[Table[(1-ConstFx+ii)/-COEFFx,{exp}],{ii,0,-COEFFx-1}]]], BottomF=Join[BottomF,Flatten[Table[Table[(1-ConstFx+ii)/-COEFFx,{-exp}],{ii,0,-COEFFx-1}]]]; ] ] ], BottomF=Join[BottomF,{ptoFfail}]; TermF=TermF/p[ConstFx,COEFFx*k]^exp; ], TermF=TermF*p[x,y]^exp; TopF=Join[TopF,{ptoFfail}]; ]; ] factoF[Expr_^(exp_:1),k_]:=Module[{ZwExpr,c0,c1,c2,x1,x2, ConstH,TopH,BottomH,ArgH,TermH}, If[FreeQ[Expr,k], ConstF=ConstF*Expr^exp, ZwExpr=Expand[Expr]; If[PolynomialQ[ZwExpr,k]&&Exponent[ZwExpr,k]<=2, c0=Coefficient[ZwExpr,k,0]; c1=Coefficient[ZwExpr,k,1]; c2=Coefficient[ZwExpr,k,2]; ConstF=ConstF*c0^exp; If[c2===0, TermF=TermF*p[c0/c1+1,k]^exp/p[c0/c1,k]^exp; If[exp>0, TopF=Join[TopF,Table[c0/c1+1,{exp}]]; BottomF=Join[BottomF,Table[c0/c1,{exp}]], BottomF=Join[BottomF,Table[c0/c1+1,{-exp}]]; TopF=Join[TopF,Table[c0/c1,{-exp}]] ], x1=(c1+Sqrt[c1^2-4*c0*c2])/2/c2; x2=(c1-Sqrt[c1^2-4*c0*c2])/2/c2; TermF=TermF*p[x1+1,k]^exp/p[x1,k]^exp*p[x2+1,k]^exp/p[x2,k]^exp; If[exp>0, TopF=Join[TopF,Table[x1+1,{exp}],Table[x2+1,{exp}]]; BottomF=Join[BottomF,Table[x1,{exp}],Table[x2,{exp}]], BottomF=Join[BottomF,Table[x1+1,{-exp}],Table[x2+1,{-exp}]]; TopF=Join[TopF,Table[x1,{-exp}],Table[x2,{-exp}]] ] ], TermF=TermF*Expr^exp; TopF=Join[TopF,{ptoFfail}]; ] ] ] sumRegeln:={ Sum[an_+bn_,{var_,n0_,n1_}]:> Sum[an,{var,n0,n1}]+Sum[bn,{var,n0,n1}] }; sumF:=(Sum[Expr_,{var_,n0_,n1_}]:>Module[{SExpr}, If[n1=!=Infinity, Print[" \nThe upper bound is not Infinity. Apply \"SumInfinity\" if possible."]; Sum[Expr,{var,n0,n1}], If[n0===-Infinity, Print[" \nThe lower bound is -Infinity. Specify a terminating lower bound \nif possible."]; Sum[Expr,{var,n0,n1}], SExpr=Factor[Expr]; SExpr=Dummy*(SExpr/.Binomial->Binomialp/.Factorial->Factorialp/.Gzerl/.pzerl/.Expandq/. Gamma->GAMMA/. Factorial2[x_]:>Module[{even}, Print["Is ",Factor[x]," even, odd, or neither of both?"]; even=Input["[e|o|n]: "]; Switch[even,Global`e,2^(x/2)*p[1,x/2], Global`o,2^((x+1)/2)*p[1/2,(x+1)/2], Global`n,Factorial2[x], _,Print["Warning: Erroneous input. Only e, o or n is allowed."]; Factorial2[x]]]); SExpr=Table[SExpr[[ii]],{ii,1,Length[SExpr]}]; ConstF=1; TopF={}; BottomF={}; ArgF=1; TermF=1; Map[ExprtoF[#,var,SUMF]&,SExpr]; If[MemberQ[TopF,0], Print[""]; Print["Warning: ",ExpandAll[p[0,var]]," was obtained in the numerator."]; Print[" The result might be incorrect. Maybe you should change"]; Print[" the lower boundary of the summation index and only then"]; Print[" apply \"SumF\"."]; ]; If[MemberQ[BottomF,0], Print[""]; Print["Warning: ",ExpandAll[p[0,var]]," was obtained in the denominator."]; Print[" The result might be incorrect. Maybe you should change"]; Print[" the lower boundary of the summation index and only then"]; Print[" apply \"SumF\"."]; ]; If[FreeQ[TopF,ptoFfail]&&FreeQ[BottomF,ptoFfail], ConstF*F[Join[TopF,{1}],BottomF,ArgF]/.SimplifyP/.FOrdne, ConstF*Sum[TermF*ArgF^var,{var,n0,n1}]/.SimplifyP ] ] ] ]); sumR:=(Sum[Expr_,{var_,n0_,n1_}]:>Module[{SExpr}, SExpr=Factor[Expr]; SExpr=Dummy*(SExpr/.Binomial->Binomialp/.Factorial->Factorialp/.Gzerl/.pzerl/.Expandq/. Gamma->GAMMA/. Factorial2[x_]:>Module[{even}, Print["Is ",Factor[x]," even, odd, or neither of both?"]; even=Input["[e|o|n]: "]; Switch[even,Global`e,2^x*p[1/2,x/2]*p[1,x/2], Global`o,2^x*p[1/2,(x+1)/2]*p[1,(x-1)/2], Global`n,Factorial2[x], _,Print["Warning: Erroneous input. Only e, o or n is allowed."]; Factorial2[x]]]); SExpr=Table[SExpr[[ii]],{ii,1,Length[SExpr]}]; ConstF=1; TopF={}; BottomF={}; ArgF=1; TermF=1; Map[ExprtoF[#,var,SUMREGELN]&,SExpr]; If[MemberQ[BottomF,0], Print[""]; Print["Warning: ",ExpandAll[p[0,var]]," was obtained in the denominator."]; Print[" The result might be incorrect. Maybe you should apply"]; Print[" \"SumShift\" before applying \"SumRegeln\"."]; ]; ConstF*Sum[TermF*ArgF^var,{var,n0,n1}]/.SimplifyP ]) sumshift:=(Sum[Expr_,{var_,n0_,n1_}]:>Sum[Expr/.var->var+n0,{var,0,n1-n0}]/; n0=!=0&&n0=!=-Infinity) SumF:=(Sum[Args___]:>(If[ValueQ[p[PPP,1]],P]; Sum[Args]//.Join[{sumshift},sumRegeln,{sumF}])); SumRegeln:=(Sum[Args___]:>(Sum[Args]//.Join[sumRegeln,{sumR}])); sumH:=(Sum[Expr_,{var_,n0_,n1_}]:>Module[{SExpr}, If[n1=!=Infinity, Print[" \nThe upper bound is not Infinity. Apply \"SumInfinity\" if possible."]; Sum[Expr,{var,n0,n1}], If[n0=!=-Infinity, Print[" \nThe lower bound is not -Infinity. The sum is converted into "]; Print["a hypergeometric series."]; Sum[Expr,{var,n0,n1}]/.SumF, SExpr=Factor[Expr]; SExpr=Dummy*(SExpr/.Binomial->Binomialp/.Factorial->Factorialp/.Gzerl/.pzerl/.Expandq/. Gamma->GAMMA/. Factorial2[x_]:>Module[{even}, Print["Is ",Factor[x]," even, odd, or neither of both?"]; even=Input["[e|o|n]: "]; Switch[even,Global`e,2^(x/2)*p[1,x/2], Global`o,2^((x+1)/2)*p[1/2,(x+1)/2], Global`n,Factorial2[x], _,Print["Warning: Erroneous input. Only e, o or n is allowed."]; Factorial2[x]]]); SExpr=Table[SExpr[[ii]],{ii,1,Length[SExpr]}]; ConstF=1; TopF={}; BottomF={}; ArgF=1; TermF=1; Map[ExprtoF[#,var,SUMF]&,SExpr]; (* If[MemberQ[TopF,0], Print[""]; Print["Warning: ",ExpandAll[p[0,var]]," was obtained in the numerator."]; Print[" The result might be incorrect. Maybe you should change"]; Print[" the lower boundary of the summation index and only then"]; Print[" apply \"SumF\"."]; ]; If[MemberQ[BottomF,0], Print[""]; Print["Warning: ",ExpandAll[p[0,var]]," was obtained in the denominator."]; Print[" The result might be incorrect. Maybe you should change"]; Print[" the lower boundary of the summation index and only then"]; Print[" apply \"SumF\"."]; ];*) If[FreeQ[TopF,ptoFfail]&&FreeQ[BottomF,ptoFfail], ConstF*H[TopF,BottomF,ArgF]/.SimplifyP/.HOrdne, ConstF*Sum[TermF*ArgF^var,{var,n0,n1}]/.SimplifyP ] ] ] ]); SumH:=(Sum[Args___]:>(If[ValueQ[p[PPP,1]],P]; Sum[Args]//.Join[sumRegeln,{sumH}])); SumSammle:=(c_*Sum[Expr_,{var_,n0_,n1_}]:>Sum[c*Expr,{var,n0,n1}]); SumInfinity:=(Sum[Expr_,{var_,n0_,n1_}]:>Sum[Expr,{var,n0,Infinity}]/; n1=!=Infinity); FSum:=(F[List1_List,List2_List,z_]:>Module[{SumGrenze,SumVar,SumVars}, SumGrenze=Min[Flatten[Map[GrenzeO[#]&,List1]]]; If[!IntegerQ[SumGrenze], SumVar=Input[StringJoin["A hypergeometric series is converted into a sum.\n", "Enter a variable for the summation index: "]]; ]; SumVars={SumVar,0,SumGrenze}; Sum[(p[List1,Join[List2,{1}],SumVar]/.pzerl)*z^SumVar, Release[SumVars]]]); HSum:=(H[List1_List,List2_List,z_]:>Module[{SumGrenzeO,SumGrenzeU,SumVar,SumVars}, SumGrenzeO=Min[Flatten[Map[GrenzeO,List1]]]; SumGrenzeU=Max[Flatten[Map[GrenzeU,List2]]]; If[!IntegerQ[SumGrenzeO]||!IntegerQ[SumGrenzeU], SumVar=Input[StringJoin["A basic hypergeometric series is converted into a sum.\n", "Enter a variable for the summation index: "]]; ]; SumVars={SumVar,SumGrenzeU+1,SumGrenzeO}; Sum[(p[List1,List2,SumVar]/.pzerl)* z^SumVar, Release[SumVars]]]); MComplement[x__]:=Module[{ZwErg={},i,j}, For[i=1,i<=Length[{x}[[1]]],i++, If[!MemberQ[ZwErg,{x}[[1,i]]], ZwErg=Join[ZwErg,Table[{x}[[1,i]], {Count[{x}[[1]],{x}[[1,i]]]- Max[Table[Count[{x}[[j]],{x}[[1,i]]],{j,2,Length[{x}]}]]}]] ] ]; ZwErg ] SumErw1:=Sum[Expr_,{var_,unt_,ob_}]:> Module[{m},m=Input["top-extend by: "]; Sum[Expr,{var,unt,ob+m}]-Sum[Expr,{var,ob+1,ob+m}] ] SumErw2:=Sum[Expr_,{var_,unt_,ob_}]:> Module[{m},m=Input["bottom-extend by: "]; Sum[Expr,{var,unt-m,ob}]-Sum[Expr,{var,unt-m,unt-1}] ] Idem[x_]:=x; SumTausche:=Sum[Sum[Expr_,{var2_,unt2_,ob2_}],{var1_,unt1_,ob1_}]:> Module[{jcd,jab,AA,BB,aa,bb,cc,dd,Var1,Var2,VarH,Iu,Io,Erg}, If[$VersionNumber>=2.,$Messages=OutputStream["",1],$Messages={}]; Var1=Expand[unt2]; Var2=Expand[ob2]; If[PolynomialQ[Var1,var1]&&PolynomialQ[Var2,var1]&& Exponent[Var1,var1]<=1&&Exponent[Var2,var1]<=1, aa=Coefficient[Var1,var1,1]; bb=Coefficient[Var1,var1,0]; cc=Coefficient[Var2,var1,1]; dd=Coefficient[Var2,var1,0]; AA=unt1; BB=ob1; jcd=If[cc===0, Dummy, (var2-dd)/cc ]; jab=If[aa===0, Dummy, (var2-bb)/aa ]; VarH=(aa*dd-cc*bb)/(aa-cc); Switch[{aa>=0,cc>=0}, {True,True}, If[cc=!=0, If[unt1<=If[aa===0,(bb-dd)/cc,(aa*unt1+bb-dd)/cc], AA=Dummy; ]; ]; If[aa=!=0, If[ob1>=If[cc===0,(dd-bb)/aa,(cc*ob1+dd-bb)/aa], BB=Dummy; ]; ]; Iu=Select[{AA,If[cc=!=0&&IntegerQ[1/cc],Idem,Ceiling][jcd]},FreeQ[#,Dummy]&]; Io=Select[{BB,If[aa=!=0&&IntegerQ[1/aa],Idem,Floor][jab]},FreeQ[#,Dummy]&]; Erg=Sum[Sum[Expr,{var1,Max[Iu],Min[Io]}], {var2,If[aa===0,bb,aa*unt1+bb],If[cc===0,dd,cc*ob1+dd]}], {True,False}, If[If[aa===0,bb,aa*AA+bb]>=VarH, jab=Dummy ]; If[cc*AA+dd<=VarH, jcd=Dummy ]; If[((aa=!=0)&&(BB>=If[cc===0,(dd-bb)/aa,(cc*AA+dd-bb)/aa]))||BB>=(aa*AA+bb-dd)/cc, BB=Dummy ]; Iu=AA; Io=Select[{BB,If[aa=!=0&&IntegerQ[1/aa],Idem,Floor][jab], If[IntegerQ[1/cc],Idem,Floor][jcd]},FreeQ[#,Dummy]&]; Erg=Sum[Sum[Expr,{var1,Iu,Min[Io]}], {var2,If[aa===0,bb,aa*unt1+bb],If[cc===0,dd,cc*unt1+dd]}], {False,True}, If[aa*BB+bb>=VarH, jab=Dummy ]; If[If[cc===0,dd,cc*BB+dd]<=VarH, jcd=Dummy ]; If[AA<=If[cc===0,(dd-bb)/aa,(cc*BB+dd-bb)/aa]||((cc=!=0)&&(AA<=(aa*BB+bb-dd)/cc)), AA=Dummy ]; Iu=Select[{AA,If[IntegerQ[1/aa],Idem,Ceiling][jab], If[cc=!=0&&IntegerQ[1/cc],Idem,Ceiling][jcd]},FreeQ[#,Dummy]&]; Io=BB; Erg=Sum[Sum[Expr,{var1,Max[Iu],Io}], {var2,If[aa===0,bb,aa*ob1+bb],If[cc===0,dd,cc*ob1+dd]}], {False,False}, If[unt1<=(cc*unt1+dd-bb)/aa, AA=Dummy; ]; If[ob1>=(aa*ob1+bb-dd)/cc, BB=Dummy; ]; Iu=Select[{AA,If[IntegerQ[1/aa],Idem,Ceiling][jab]},FreeQ[#,Dummy]&]; Io=Select[{BB,If[IntegerQ[1/cc],Idem,Floor][jcd]},FreeQ[#,Dummy]&]; Erg=Sum[Sum[Expr,{var1,Max[Iu],Min[Io]}], {var2,If[aa===0,bb,aa*ob1+bb],If[cc===0,dd,cc*unt1+dd]}], _,Erg=Sum[Sum[Expr,{var1,unt1,ob1}],{var2,unt2,ob2}] ], Erg=Sum[Sum[Expr,{var1,unt1,ob1}],{var2,unt2,ob2}], Erg=Sum[Sum[Expr,{var1,unt1,ob1}],{var2,unt2,ob2}] ]; If[$VersionNumber>=2.,$Messages=OutputStream["stdout",1],$Messages={"stdout"}]; Erg ] Summe[Expr_,{var_,low_,upp_}]:=If[Factor[upp-low]>=0,Sum[Expr,{var,low,upp}], -Sum[Expr,{var,upp+1,low-1}],Sum[Expr,{var,low,upp}]] SumZerl:=Sum[Expr_,{var_,unt_,ob_}]:> Module[{m},m=Input["bottom-split by: "]; Summe[Expr,{var,unt,unt+m-1}]+Summe[Expr,{var,unt+m,ob}] ] SumShift:=Sum[Expr_,{var_,unt_,ob_}]:> Module[{m},m=Input["shift summation index by: "]; Sum[Expr/.var->var+m,{var,unt-m,ob-m}] ] SumUmkehr:=(If[ValueQ[p[PPP,1]], Print[""]; Print["For your information:"]; Print["Automatic evaluation of p and F is active!"]; Print[""]; If[$VersionNumber>=2.,$Messages=OutputStream["",1],$Messages={}]; ]; {F[List1_List,List2_List,z_]:>Module[{SumGrenze,LIST1,LIST2}, SumGrenze=Min[Union[Flatten[Map[GrenzeO[#]&,List1]]]]; If[SumGrenze===Infinity||!FreeQ[SumGrenze,Min], F[List1,List2,z], LIST1=MComplement[List1,{(-SumGrenze)}]; LIST2=List2; p[LIST1,LIST2,SumGrenze]* (z)^SumGrenze*(-1)^SumGrenze* F[Join[{(-SumGrenze)},Map[(1-SumGrenze-#)&,LIST2]], Map[(1-SumGrenze-#)&,LIST1], (-1)^(1+Length[List2]-Length[List1])/z] ] ], Sum[Expr_,{var_,unt_,ob_}]:>Module[{SumGrenze,ExList}, ExList=Join[Cases[Dummy*Expr/.pzerl,p[vars__]]/.p[x_,y_]->{x}, Cases[Dummy*Expr/.pzerl,p[vars__]^y_?Positive]/. p[x_,y_]^z_->{x}]; SumGrenze=Min[Union[Flatten[Map[Apply[GrenzeO,#]&,ExList]]]]; SumGrenze=Min[Union[{SumGrenze,ob}]]; If[SumGrenze===Infinity||!FreeQ[SumGrenze,Min], Sum[Expr,{var,unt,ob}], Sum[ExpandAll[Expr/.var->(SumGrenze-var)], {var,0,SumGrenze-unt}]/.SumRegeln ] ]}); IntegerTest[x_]:=Module[{Var=x}, If[!MemberQ[{Rational,Real,Complex},Head[Var]], If[Head[Var]===Integer, If[Var<=0,True,False,False], Switch[ Input[StringJoin["Is ",ToString[InputForm[Expand[-Var]]], " a nonnegative integer?\n[y|n]: "]], Global`y,True,Global`n,False]], False ]]; (*Funktionen fr die Limes-Bildung*) Unprotect[DirectedInfinity] DirectedInfinity/: (-1)^DirectedInfinity[x___]:=Indeterminate; DirectedInfinity/: q_^DirectedInfinity[1]:=Module[{m}, Switch[AbsLimes[q], Global`n,ComplexInfinity, Global`y,0, Global`u,AbsLimes[q]=.; Switch[AbsLimes[q], Global`n,ComplexInfinity, Global`y,0, _,Indeterminate], _,Indeterminate] ]; DirectedInfinity/: q_^DirectedInfinity[-1]:=Module[{m}, Switch[AbsLimes[q], Global`n,0, Global`y,ComplexInfinity, Global`u,AbsLimes[q]=.; Switch[AbsLimes[q], Global`n,0, Global`y,ComplexInfinity, _,Indeterminate], _,Indeterminate] ]; Protect[DirectedInfinity]; p[Indeterminate,n_]=Indeterminate p[a_,Indeterminate]=Indeterminate F[Indeterminate,List2_List,z_]=Indeterminate F[List1_List,Indeterminate,z_]=Indeterminate F[List1_List,List2_list,Indeterminate]=Indeterminate p[DirectedInfinity[x___],n_]=Indeterminate p[a_,DirectedInfinity[x___]]=Indeterminate GAMMA[DirectedInfinity[x___],n_]=Indeterminate GAMMA[a_,DirectedInfinity[x___]]=Indeterminate F[DirectedInfinity[x___],List2_List,z_]=Indeterminate F[List1_List,DirectedInfinity[x___],z_]=Indeterminate F[List1_List,List2_List,DirectedInfinity[x___]]=Indeterminate AbsSmaller[x_]:=Module[{AbsDiff}, AbsDiff=Select[AbsList,!FreeQ[#,x]&]; Map[(AbsLimes[#]=.)&,AbsDiff]; AbsList=Complement[AbsList,AbsDiff]; AbsLimes[x]=Global`y; AbsList=Union[AbsList,{x}];]; AbsGreater[x_]:=Module[{AbsDiff}, AbsDiff=Select[AbsList,!FreeQ[#,x]&]; Map[(AbsLimes[#]=.)&,AbsDiff]; AbsList=Complement[AbsList,AbsDiff]; AbsLimes[x]=Global`n; AbsList=Union[AbsList,{x}];]; AbsUndetermined[x_]:=Module[{AbsDiff}, AbsDiff=Select[AbsList,!FreeQ[#,x]&]; Map[(AbsLimes[#]=.)&,AbsDiff]; AbsList=Complement[AbsList,AbsDiff]; AbsLimes[x]=Global`u;]; AbsList={}; AbsLimes[q_]:=Module[{Bas,Expo}, Bas=(q/.x_^exp_ :>x); If[NumberQ[Expo=Log[Bas,q]], If[MemberQ[AbsList,Bas], Switch[AbsLimes[Bas], Global`y,If[Expo>0,AbsSmaller[q],AbsGreater[q]], Global`n,If[Expo>0,AbsGreater[q],AbsSmaller[q]], Global`u,AbsUndetermined[q], _,Print["Error: AbsLimes[",Bas,"] is neither y, n nor u"] ], If[Global`DOSFrage, Print["Is ³",Bas,"³ smaller than 1?"], Print["Is |",Bas,"| smaller than 1?"]]; AbsLimes[Bas]=Input["[y|n|u]: "]; AbsList=Union[AbsList,{Bas}]; Switch[AbsLimes[Bas], Global`y,If[Expo>0,AbsSmaller[q],AbsGreater[q]], Global`n,If[Expo>0,AbsGreater[q],AbsSmaller[q]], Global`u,AbsUndetermined[q], _,Print["Warning: Erroneous input. Only y, n, or u is allowed."] ] ], If[Global`DOSFrage, Print["Is ³",q,"³ smaller than 1?"], Print["Is |",q,"| smaller than 1?"]]; AbsLimes[q]=Input["[y|n|u]: "]; ]; AbsLimes[q] ] pLimes[p[A_,N_],Regel_Rule]:=Module[{pExpr=p[Expand[A],Expand[N]],ZwExpr,mExt}, ZwExpr=(pExpr/.p[aa_,nn_]^(exp_:1):> p[aa/.Regel,nn/.Regel]^exp); If[FreeQ[ZwExpr,Indeterminate]&& FreeQ[ZwExpr,DirectedInfinity], Return[ZwExpr], ZwExpr=(Cases[Dummy*pExpr,p[aa_,nn_]^(exp_:1)][[1]]/. p[aa_,nn_]^(exp_:1):>nn/.Regel); If[FreeQ[ZwExpr,Indeterminate]&&FreeQ[ZwExpr,DirectedInfinity], Return[pExpr/.p[aa_,nn_]^(exp_:1):> (mExt=Limit[Log[Regel[[1]],aa],Regel]; (Limit[aa/Regel[[1]]^mExt,Regel]*Regel[[1]]^mExt)^(nn*exp))], Switch[ZwExpr, -Infinity,pExpr=ExpandAll[pExpr/.neg1], Infinity,1, _,Return[Indeterminate] ]; ZwExpr=(Cases[Dummy*pExpr,p[aa_,nn_]^(exp_:1)][[1]]/. p[aa_,nn_]^(exp_:1):>aa/.Regel); If[(!FreeQ[ZwExpr,Indeterminate]||!FreeQ[ZwExpr,DirectedInfinity])&& ZwExpr=!=Infinity, pExpr=ExpandAll[pExpr/.trans]; ]; pExpr/.p[aa_,nn_]^(exp_:1)->GAMMA[aa+nn]^exp/GAMMA[aa]^exp ] ] ]; GAMMALimes[GAMMA[A_],Regel_Rule]:=Module[{GAMMAExpr=GAMMA[Expand[A]],ZwExpr,mExt}, ZwExpr=(GAMMAExpr/.GAMMA[aa_]^(exp_:1):>aa/.Regel); If[FreeQ[ZwExpr,Indeterminate]&& FreeQ[ZwExpr,DirectedInfinity], Return[GAMMAExpr], mExt=Regel[[1]]; Switch[mExt/.Regel, Infinity,1,-Infinity,mExt=-mExt,_,Return[GAMMAExpr]]; If[ZwExpr===-Infinity,GAMMAExpr=GAMMAExpr/.inv]; ZwExpr=(Cases[Dummy*GAMMAExpr,GAMMA[aa_]^(exp_:1)][[1]]/. GAMMA[aa_]^(exp_:1):>aa-1); mExt=mExt*Limit[ZwExpr/mExt,Regel]; GAMMAExpr/.GAMMA[aa_]->Sqrt[2*Pi]*mExt^(ZwExpr+1/2)/E^mExt ] ]; FLimes[F[List1_,List2_,z_],Regel_Rule]:= Module[{FErg=F[List1,List2,z],Liste1,Liste2,FArgu}, FArgu=FErg[[3]]; parLimesoben[par_,Regel1_Rule]:= If[FreeQ[Expand[par]/.Regel1,Indeterminate]&&FreeQ[Expand[par]/.Regel1,DirectedInfinity], par/.Regel1, FArgu*=par;Empty]; parLimesunten[par_,Regel2_Rule]:= If[FreeQ[Expand[par]/.Regel2,Indeterminate]&&FreeQ[Expand[par]/.Regel2,DirectedInfinity], par/.Regel2, FArgu/=par;Empty]; Liste1=Map[parLimesoben[#,Regel]&,FErg[[1]]]; Liste1=Select[Liste1,(#=!=Empty)&]; Liste2=Map[parLimesunten[#,Regel]&,FErg[[2]]]; Liste2=Select[Liste2,(#=!=Empty)&]; F[Liste1,Liste2,Limit[FArgu,Regel]]/.FOrdne ]; MinusOne:=((-1)^exp_ :>Module[{even}, Print["Is ",Factor[exp]," even, odd, or neither of both?"]; even=Input["[e|o|n]: "]; Switch[even,Global`e,1,Global`o,-1,Global`n,(-1)^exp, _,Print["Warning: Erroneous input. Only e, o or n is allowed."]]]); MinusOneLim[var_]:=((-1)^exp_ :>Module[{even}, Print["Is ",Factor[exp]," even, odd, or neither of both?"]; even=Input["[e|o|n]: "]; Switch[even,Global`e,1,Global`o,-1,Global`n,(-1)^exp, _,Print["Warning: Erroneous input. Only e, o or n is allowed."]]]/; !FreeQ[exp,var]); Limes[Expr_,Regel_Rule]:=Module[{Eingabe,ZwAusgabe,Ausgabe,even}, If[$VersionNumber>=2.,$Messages=OutputStream["",1],$Messages={}]; Eingabe=Expr/.DirectedInfinity->SInfinity; ZwAusgabe=(Eingabe/.pzerl/.Gzerl /.(p[a_,n_]^(exp_:1):>pLimes[p[a,n],Regel]^exp) /.(GAMMA[a_]^(exp_:1):>GAMMALimes[GAMMA[a],Regel]^exp) /.(F[List1_,List2_,z_]^(exp_:1):>FLimes[F[List1,List2,z],Regel]^exp) /.(Sum[SExpr_,{Grenzen__}]^(exp_:1):>Sum[Limit[SExpr//.Expandq,Regel], {Limit[{Grenzen}[[1]],Regel],Limit[{Grenzen}[[2]]//.Expandq,Regel], Limit[{Grenzen}[[3]]//.Expandq/.DirectedInfinity->SInfinity,Regel]}]^exp) //.Expandq/.MinusOneLim[Regel[[1]]]); Ausgabe=Limit[ZwAusgabe,Regel]; If[!FreeQ[Ausgabe,Limit],Ausgabe=Ausgabe[[1]]/.Regel]; If[!FreeQ[Ausgabe,DirectedInfinity],Ausgabe=ZwAusgabe/.Regel]; If[$VersionNumber>=2.,$Messages=OutputStream["stdout",1],$Messages={"stdout"}]; If[FreeQ[Ausgabe,DirectedInfinity]&&FreeQ[Ausgabe,Indeterminate]&& FreeQ[Ausgabe,GDummy], If[Head[Expr]===Equal,LS=Ausgabe[[1]];RS=Ausgabe[[2]];]; Ausgabe/.SInfinity->DirectedInfinity, Print[""];Print["The expression"];Print[""]; Print[ZwAusgabe/.SInfinity->DirectedInfinity];Print[""];Print["was obtained."]; Print[""];Print["Therefore the limit ", Regel, " could not be determined."]; Print["Here is your expression:"];Expr] ] (*Funktionen fr das Schreiben in Dateien und zum Ausdrucken*) SchreibeZahl=0; TeXMat[Expr_,Datei_,Komment_:0]:=Module[{TeXExpr,MatDat,TeXDat}, SchreibeZahl+=1;TeXExpr=TeXForm[Expr]; MatDat=StringJoin[ToString[Datei],".m"]; TeXDat=StringJoin[ToString[Datei],".tex"]; If[Komment=!=0, PutAppend[Komment,MatDat]; ]; OpenAppend[MatDat]; Write[MatDat,OutputForm[StringJoin["A[",ToString[SchreibeZahl],"]:="]]]; Close[MatDat]; PutAppend[Expr,MatDat]; If[Komment=!=0, PutAppend[Komment,TeXDat]; ]; OpenAppend[TeXDat]; Write[TeXDat,OutputForm[StringJoin["A[",ToString[SchreibeZahl],"]:="]]]; Close[TeXDat]; PutAppend[TeXExpr,TeXDat]; ]; Drucke[x_,y_:OutputForm]:=Module[{}, OpenWrite["druck", FormatType -> y]; Write["druck",x]; Close["druck"]; Run["copy druck prn"]; Run["del druck"]; ]; End[] Protect[ hypAttributes, SumRegeln, SumSammle, SumF, SumH, FSum, HSum, HF, FH, HShift, SumInfinity, Gleichung, GlTausche, Mal, Add, Div, Sub, Hoch, negpos, Freek, IntegerTest, Expandq, p, Binomialp, Factorialp, paufl, pzerl, pzus, GAMMA, Gzerl, Gzus, F, H, V, P, TeXFV, FCancel, FFormat, TeX, LaTeX, AmSTeX, AmSLaTeX, ManipulationsListe, neg1, neg2, trans, inv, lina1, lina2, linz, zus1, zus2, zus3, erw1, erw2, zerl, baszerl, baszus, Ers, Subst, PSort, FEinf, FOrdne, HOrdne, FPerm, HPerm, FTausche, PosListe, SumErw1, SumErw2, SumShift, SumTausche, SumZerl, SumUmkehr, Limes, AbsGreater, AbsSmaller, AbsUndetermined, MinusOne, TeXMat, Drucke ] EndPackage[] (*Vorausdefinieren von summatio.m*) BeginPackage["Summatio`m`"] SListe::usage = "\nDescription: Rule that gives for a hypergeometric series a list of \n applicable summation formulas. Each entry of this list has the format \n {S}, where \"S\" is the name of the summation in form \n of a rule which can be applied subsequently. You should be aware that \n \"SListe\" automatically applies \"FOrdne\" before checking which \n summation could be applied. \nUsage: Expr/.SListe. \nSee also: TListe, FPerm, FTausche, SumListe." Srs01::usage = "\nSummation formula (Gasper, (1)) in form of a rule. \nSee also: SListe, SumListe, Ers, PosListe."; Srs03::usage = "\nSummation formula (Gasper, (2,3)) in form of a rule. \nSee also: SListe, SumListe, Ers, PosListe."; S1001::usage = "\nSummation formula (Slater, Appendix (III.1)) in form of a rule. \nSee also: SListe, SumListe, Ers, PosListe."; S2101::usage = "\nSummation formula (Slater, Appendix (III.4)) in form of a rule. \nSee also: SListe, SumListe, Ers, PosListe."; S2103::usage = "\nSummation formula (Slater, Appendix (III.3)) in form of a rule. \nSee also: SListe, SumListe, Ers, PosListe."; S2104::usage = "\nSummation formula (Slater, Appendix (III.5)) in form of a rule. \nSee also: SListe, SumListe, Ers, PosListe."; S2105::usage = "\nSummation formula (Gasper/Rahman, Ex. 1.6(i), q->1) in form of a rule. \nSee also: SListe, SumListe, Ers, PosListe."; S2106::usage = "\nSummation formula (Slater (1.5.21)) in form of a rule. \nSee also: SListe, SumListe, Ers, PosListe."; S2131::usage = "\nSummation formula (Slater, Appendix (III.7)) in form of a rule. \nSee also: SListe, SumListe, Ers, PosListe."; S2132::usage = "\nSummation formula (Slater, Appendix (III.6)) in form of a rule. \nSee also: SListe, SumListe, Ers, PosListe."; S3201::usage = "\nSummation formula (Slater, Appendix (III.2)) in form of a rule. \nSee also: SListe, SumListe, Ers, PosListe."; S3202::usage = "\nSummation formula (Slater, Appendix (III.8), terminated in the first \n variable) in form of a rule. \nSee also: SListe, SumListe, Ers, PosListe."; S3204::usage = "\nSummation formula (Gasper/Rahman, Ex. 3.9, q->1) in form of a rule. \nSee also: SListe, SumListe, Ers, PosListe."; S3231::usage = "\nSummation formula (Slater, Appendix (III.8)) in form of a rule. \nSee also: SListe, SumListe, Ers, PosListe."; S3232::usage = "\nSummation formula (Slater, Appendix (III.9)) in form of a rule. \nSee also: SListe, SumListe, Ers, PosListe."; S3233::usage = "\nSummation formula (Slater, Appendix (III.23)) in form of a rule. \nSee also: SListe, SumListe, Ers, PosListe."; S3234::usage = "\nSummation formula (Slater, Appendix (III.24)) in form of a rule. \nSee also: SListe, SumListe, Ers, PosListe."; S3235::usage = "\nSummation formula (Slater, Appendix (III.16)) in form of a rule. \nSee also: SListe, SumListe, Ers, PosListe."; S4306::usage = "\nSummation formula (Slater, Appendix (III.17)) in form of a rule. \nSee also: SListe, SumListe, Ers, PosListe."; S4307::usage = "\nSummation formula (Slater, Appendix (III.10)) in form of a rule. \nSee also: SListe, SumListe, Ers, PosListe."; S4331::usage = "\nSummation formula (Slater, Appendix (III.22)) in form of a rule. \nSee also: SListe, SumListe, Ers, PosListe."; S4332::usage = "\nSummation formula (Slater, Appendix (III.18)) in form of a rule. \nSee also: SListe, SumListe, Ers, PosListe."; S5431::usage = "\nSummation formula (Slater, Appendix (III.12)) in form of a rule. \nSee also: SListe, SumListe, Ers, PosListe."; S5432::usage = "\nSummation formula (Slater, Appendix (III.13)) in form of a rule. \nSee also: SListe, SumListe, Ers, PosListe."; S6531::usage = "\nSummation formula (Gasper/Rahman, Appendix (III.16), q->1) in form \n of a rule. \nSee also: SListe, SumListe, Ers, PosListe."; S6532::usage = "\nSummation formula (Slater, Appendix (III.27), corrected) in form \n of a rule. \nSee also: SListe, SumListe, Ers, PosListe."; S7631::usage = "\nSummation formula (Slater, Appendix (III.14)) in form of a rule. \nSee also: SListe, SumListe, Ers, PosListe."; S7632::usage = "\nSummation formula (Slater, Appendix (III.19)) in form of a rule. \nSee also: SListe, SumListe, Ers, PosListe."; S3261::usage = "\nSummation formula (Slater, Appendix (III.31)) in form of a rule. \nSee also: SListe, SumListe, Ers, PosListe."; S3291::usage = "\nSummation formula (Gasper/Rahman, Ex. 2.9, q->1) in form of a rule. \nSee also: SListe, SumListe, Ers, PosListe."; S7691::usage = "\nSummation formula (Slater, Appendix (III.32)) in form of a rule. \nSee also: SListe, SumListe, Ers, PosListe."; SumListe::usage = "\nList of all summation formulas. \nSee also: SumListe$gl, SListe."; SListe:=(<\" \n is the name of the transformation in form of a rule which can be applied \n subsequently. You should be aware that \"TListe\" automatically applies \n \"FOrdne\" before checking which transformation could be applied. \nUsage: Expr/.TListe. \nSee also: SListe, FPerm, FTausche, TransListe." T2103::usage = "\nTransformation formula (Slater, (1.3.15)) in form of a rule. \nSee also: TListe, TransListe, Ers, PosListe."; T2104::usage = "\nTransformation formula (Slater, (1.7.1.3)) in form of a rule. \nSee also: TListe, TransListe, Ers, PosListe."; T2106::usage = "\nTransformation formula (Slater, (1.7.1.3), sum reversed at the right-hand \n side) in form of a rule. \nSee also: TListe, TransListe, Ers, PosListe."; T2107::usage = "\nTransformation formula (Slater, (1.8.10), terminating form) in form \n of a rule. \nSee also: TListe, TransListe, Ers, PosListe."; T2131::usage = "\nTransformation formula (Slater, (1.8.10), terminating form, sum reversed \n at the right-hand side) in form of a rule. \nSee also: TListe, TransListe, Ers, PosListe."; T3204::usage = "\nTransformation formula (Bailey, Ex. 7, p. 98) in form of a rule. \nSee also: TListe, TransListe, Ers, PosListe."; T3205::usage = "\nTransformation formula (Slater, (2.3.3.7)) in form of a rule. \nSee also: TListe, TransListe, Ers, PosListe."; T3206::usage = "\nTransformation formula (Bailey, Ex. 7, p. 98, terminating form) in \n form of a rule. \nSee also: TListe, TransListe, Ers, PosListe."; T3207::usage = "\nTransformation formula (Thomae [1879], Gasper/Rahman (3.1.1)) in form of a rule. \nSee also: TListe, TransListe, Ers, PosListe."; T3217::usage = "\nTransformation formula (Bailey, 4.4(2), reversed) in form of a rule. \nSee also: TListe, TransListe, Ers, PosListe."; T3239::usage = "\nTransformation formula (Bailey, Ex. 4.(iv), p. 97) in form of a rule. \nSee also: TListe, TransListe, Ers, PosListe."; T4301::usage = "\nTransformation formula (Slater, (4.3.5.1)) in form of a rule. \nSee also: TListe, TransListe, Ers, PosListe."; T4302::usage = "\nTransformation formula (Gasper/Rahman, Appendix (III.16), q->1) in \n form of a rule. \nSee also: TListe, TransListe, Ers, PosListe."; T7631::usage = "\nTransformation formula (Slater, (2.4.1.1), reversed) in form of a rule. \nSee also: TListe, TransListe, Ers, PosListe."; T7632::usage = "\nTransformation formula (Slater, (2.4.1.1), reversed) in form of a rule. \nSee also: TListe, TransListe, Ers, PosListe."; T4303::usage = "\nTransformation formula (Slater, (2.4.1.1)) in form of a rule. \nSee also: TListe, TransListe, Ers, PosListe."; T4304::usage = "\nTransformation formula (Slater, (4.3.6.4)) in form of a rule. \nSee also: TListe, TransListe, Ers, PosListe."; T7633::usage = "\nTransformation formula (Slater, (4.3.6.4), reversed) in form \n of a rule. \nSee also: TListe, TransListe, Ers, PosListe."; T3231::usage = "\nTransformation formula (Gasper/Rahman, Appendix (III.21), q->1) in form \n of a rule. \nSee also: TListe, TransListe, Ers, PosListe."; T3232::usage = "\nTransformation formula (Bailey, Ex. 4.(iv), p. 97, reversed, first form) \n in form of a rule. \nSee also: TListe, TransListe, Ers, PosListe."; T3233::usage = "\nTransformation formula (Bailey, Ex. 4.(iv), p. 97, reversed, second form) \n in form of a rule. \nSee also: TListe, TransListe, Ers, PosListe."; T3234::usage = "\nTransformation formula (Slater, (2.5.7), reversed) in form \n of a rule. \nSee also: TListe, TransListe, Ers, PosListe."; T4306::usage = "\nTransformation formula (Gasper/Rahman, Appendix (III.21), q->1, reversed) \n in form of a rule. \nSee also: TListe, TransListe, Ers, PosListe."; T2132::usage = "\nTransformation formula (Slater, (2.5.7)) in form of a rule. \nSee also: TListe, TransListe, Ers, PosListe."; T7634::usage = "\nTransformation formula (Bailey, 7.5.(1)) in form of a rule. \nSee also: TListe, TransListe, Ers, PosListe."; T7635::usage = "\nTransformation formula (Bailey, 7.5.(2)) in form of a rule. \nSee also: TListe, TransListe, Ers, PosListe."; T5401::usage = "\nTransformation formula (Slater, (2.4.3.4)) in form of a rule. \nSee also: TListe, TransListe, Ers, PosListe."; T9832::usage = "\nTransformation formula (Slater, (2.4.3.4), reversed) in form \n of a rule. \nSee also: TListe, TransListe, Ers, PosListe."; T5402::usage = "\nTransformation formula (Gasper/Rahman, Appendix (III.26), q->1) in form \n of a rule. \nSee also: TListe, TransListe, Ers, PosListe."; T9833::usage = "\nTransformation formula (Gasper/Rahman, Appendix (III.26), q->1, reversed) \n in form of a rule. \nSee also: TListe, TransListe, Ers, PosListe."; T6531::usage = "\nTransformation formula (Slater, (2.4.3.5)) in form of a rule. \nSee also: TListe, TransListe, Ers, PosListe."; T6534::usage = "\nTransformation formula (Bailey, 4.4(2)) in form of a rule. \nSee also: TListe, TransListe, Ers, PosListe."; T9834::usage = "\nTransformation formula (Slater, (2.4.3.5), reversed) in form \n of a rule. \nSee also: TListe, TransListe, Ers, PosListe."; T9831::usage = "\nTransformation formula (Slater, (2.4.4.1)) in form of a rule. \nSee also: TListe, TransListe, Ers, PosListe."; T2191::usage = "\nTransformation formula (Slater, (1.8.10)) in form of a rule. \nSee also: TListe, TransListe, Ers, PosListe."; T3261::usage = "\nTransformation formula (Gasper/Rahman, (III.33), q->1) in form of a rule. \nSee also: TListe, TransListe, Ers, PosListe."; T3262::usage = "\nTransformation formula (Slater, (4.3.4.2)) in form of a rule. \nSee also: TListe, TransListe, Ers, PosListe."; T7691::usage = "\nTransformation formula (Slater, (2.4.4.3)) in form of a rule. \nSee also: TListe, TransListe, Ers, PosListe."; T7692::usage = "\nTransformation formula (Slater, (4.3.7.8)) in form of a rule. \nSee also: TListe, TransListe, Ers, PosListe."; T9891::usage = "\nTransformation formula (Gasper/Rahman, Appendix (III.39), q->1) in form \n of a rule. \nSee also: TListe, TransListe, Ers, PosListe."; T2110::usage = "\nTransformation formula (Rahman/Verma, (3.2)) in form of a rule. \nSee also: TListe, TransListe, Ers, PosListe."; T2112::usage = "\nTransformation formula (Rahman/Verma, (5.10)) in form of a rule. \nSee also: TListe, TransListe, Ers, PosListe."; T2133::usage = "\nTransformation formula (Rahman/Verma, (5.12)) in form of a rule. \nSee also: TListe, TransListe, Ers, PosListe."; T2134::usage = "\nTransformation formula (Bailey, Ex. 4.(iii), p. 97, reversed) in form of a rule. \nSee also: TListe, TransListe, Ers, PosListe."; T2135::usage = "\nTransformation formula (Bailey, Ex. 4.(iii), p. 97) in form of a rule. \nSee also: TListe, TransListe, Ers, PosListe."; T2136::usage = "\nTransformation formula (Rahman/Verma, (5.10), reversed) in form of a rule. \nSee also: TListe, TransListe, Ers, PosListe."; T2137::usage = "\nTransformation formula (Rahman/Verma, (5.12), reversed) in form of a rule. \nSee also: TListe, TransListe, Ers, PosListe."; T2138::usage = "\nTransformation formula (Rahman/Verma, (3.31), reversed) in form of a rule. \nSee also: TListe, TransListe, Ers, PosListe."; T2139::usage = "\nTransformation formula (Rahman/Verma, (3.31)) in form of a rule. \nSee also: TListe, TransListe, Ers, PosListe."; T2163::usage = "\nTransformation formula (Gasper/Rahman, Ex 3.8, q->1; Slater pp. 36/37) in form of a rule. \nSee also: TListe, TransListe, Ers, PosListe."; T3235::usage = "\nTransformation formula (Gasper/Rahman, Ex 3.4, q->1, reversed) in form of a rule. \nSee also: TListe, TransListe, Ers, PosListe."; T3236::usage = "\nTransformation formula (Gasper/Rahman, (3.4.8), q->1) in form of a rule. \nSee also: TListe, TransListe, Ers, PosListe."; T3263::usage = "\nTransformation formula (Gasper/Rahman, Appendix (III.33), q->1, reversed) in form of a rule. \nSee also: TListe, TransListe, Ers, PosListe."; T3264::usage = "\nTransformation formula (Gasper/Rahman, Appendix (III.34), q->1, reversed) in form of a rule. \nSee also: TListe, TransListe, Ers, PosListe."; T3267::usage = "\nTransformation formula (Gasper/Rahman, Ex. 3.6, q->1) in form of a rule. \nSee also: TListe, TransListe, Ers, PosListe."; T3268::usage = "\nTransformation formula (Gasper/Rahman, Ex. 3.6, q->1, reversed) in form of a rule. \nSee also: TListe, TransListe, Ers, PosListe."; T2192::usage = "\nTransformation formula (Gasper/Rahman, Ex 3.8, q->1, reversed; \n Slater pp. 36/37) in form of a rule. \nSee also: TListe, TransListe, Ers, PosListe."; T3238::usage = "\nTransformation formula (Bailey, Ex. 6, p. 97) in form of a rule. \nSee also: TListe, TransListe, Ers, PosListe."; T4309::usage = "\nTransformation formula (Gasper/Rahman, Ex. 2.13(i), q->1) in form of a rule. \nSee also: TListe, TransListe, Ers, PosListe."; T4310::usage = "\nTransformation formula (Gasper/Rahman, Ex. 2.13(ii), q->1) in form of a rule. \nSee also: TListe, TransListe, Ers, PosListe."; T4312::usage = "\nTransformation formula (Gasper/Rahman, Ex 3.4, q->1) in form of a rule. \nSee also: TListe, TransListe, Ers, PosListe."; T4362::usage = "\nTransformation formula (Slater, (2.4.4.3), reversed) in form of a rule. \nSee also: TListe, TransListe, Ers, PosListe."; T4391::usage = "\nTransformation formula (Gasper/Rahman, (3.5.7), q->1, reversed) in form of a rule. \nSee also: TListe, TransListe, Ers, PosListe."; T4331::usage = "\nTransformation formula (Bailey, Ex. 6, p. 97, reversed) in form of a rule. \nSee also: TListe, TransListe, Ers, PosListe."; T5403::usage = "\nTransformation formula (Bailey, 4.6(1), reversed) in form of a rule. \nSee also: TListe, TransListe, Ers, PosListe."; T5468::usage = "\nTransformation formula (Gasper/Rahman, Ex, 2.25, q->1) in form of a rule. \nSee also: TListe, TransListe, Ers, PosListe."; T6501::usage = "\nTransformation formula (Slater, (2.4.3.3)) in form of a rule. \nSee also: TListe, TransListe, Ers, PosListe."; T6532::usage = "\nTransformation formula (Gasper/Rahman, Ex. 2.13(ii), q->1, reversed) in form of a rule. \nSee also: TListe, TransListe, Ers, PosListe."; T6533::usage = "\nTransformation formula (Gasper/Rahman, (3.10.4), q->1) in form of a rule. \nSee also: TListe, TransListe, Ers, PosListe."; T7636::usage = "\nTransformation formula (Gasper/Rahman, (3.5.10), q->1) in form of a rule. \nSee also: TListe, TransListe, Ers, PosListe."; T7637::usage = "\nTransformation formula (Gasper/Rahman, Ex. 2.13(i), q->1, reversed) in form of a rule. \nSee also: TListe, TransListe, Ers, PosListe."; T7693::usage = "\nTransformation formula (Gasper/Rahman, Ex. 2.15, q->1) in form of a rule. \nSee also: TListe, TransListe, Ers, PosListe."; T7694::usage = "\nTransformation formula (Slater, (4.3.7.8), reversed) in form of a rule. \nSee also: TListe, TransListe, Ers, PosListe."; T8731::usage = "\nTransformation formula (Rahman/Verma, (7.7), q->1, reversed) in form of a rule. \nSee also: TListe, TransListe, Ers, PosListe."; T8732::usage = "\nTransformation formula (Rahman/Verma, (7.8), q->1, reversed) in form of a rule. \nSee also: TListe, TransListe, Ers, PosListe."; T9835::usage = "\nTransformation formula (Bailey, 7.6(1)) in form of a rule. \nSee also: TListe, TransListe, Ers, PosListe."; T9836::usage = "\nTransformation formula (Gasper/Rahman, Ex. 3.21(iii), q->1) in form of a rule. \nSee also: TListe, TransListe, Ers, PosListe."; T9837::usage = "\nTransformation formula (Slater, (2.4.3.3), reversed) in form of a rule. \nSee also: TListe, TransListe, Ers, PosListe."; T9892::usage = "\nTransformation formula (Gasper/Rahman, (3.5.7), q->1) in form of a rule. \nSee also: TListe, TransListe, Ers, PosListe."; T9893::usage = "\nTransformation formula (Gasper/Rahman, Ex. 2.30, q->1) in form of a rule. \nSee also: TListe, TransListe, Ers, PosListe."; T9894::usage = "\nTransformation formula (Gasper/Rahman, Ex, 2.25, q->1, reversed) in form of a rule. \nSee also: TListe, TransListe, Ers, PosListe."; T111031::usage = "\nTransformation formula (Rahman/Verma, (7.8), q->1) in form of a rule. \nSee also: TListe, TransListe, Ers, PosListe."; T111032::usage = "\nTransformation formula (Rahman/Verma, (7.7), q->1) in form of a rule. \nSee also: TListe, TransListe, Ers, PosListe."; T2140::usage = "\nTransformation formula (Rahman/Verma, (3.2), reversed) in form of a rule. \nSee also: TListe, TransListe, Ers, PosListe."; T2141::usage = "\nTransformation formula (Gasper/Rahman, (3.4.8), q->1, reversed) in form of a rule. \nSee also: TListe, TransListe, Ers, PosListe."; T3237::usage = "\nTransformation formula (Gasper/Rahman, (3.10.4), q->1, reversed) in form of a rule. \nSee also: TListe, TransListe, Ers, PosListe."; T3240::usage = "\nTransformation formula (Gasper/Rahman, (3.5.10), q->1, reversed) in form of a rule. \nSee also: TListe, TransListe, Ers, PosListe."; T4332::usage = "\nTransformation formula (Bailey, 4.6(1)) in form of a rule. \nSee also: TListe, TransListe, Ers, PosListe."; TransListe::usage = "\nList of all transformation formulas. \nSee also: TransListe$gl, TListe."; TListe:=(< \nSee also: ZB, RunMode." Prove::usage = "\nDescription: Entering \"Prove\" at the prompt creates a proof of the \n last example solved by ZB. \nUsage: Prove. \nSee also: ZB, RunMode, FileName." ZB[recvar_,order_]:=Module[{Zw1},Expr_ :> ( If[ValueQ[Hyp`m`p[PPP,1]], Zw1=(Expr/.Hyp`m`SumSammle/.Hyp`m`pzerl/.Hyp`m`Gzerl/.Hyp`m`GAMMA[xx_]:>(xx-1)!/. Hyp`m`p[xx_,nn_]:>(xx+nn-1)!/(xx-1)!/.Binomial[nn_,k_]:>nn!/k!/(nn-k)!); Unprotect[Sum]; Sum[Hyp`m`Private`x__,Hyp`m`Private`y_]=.; Zw1=(Zw1/.Sum[Summand_,{svar_,do_,up_}]:> fastZeil`Zb[Summand,{svar,If[Position[Denominator[Summand],Expand[svar-do]!]=!={},-Infinity,do],up},recvar,order]); Hyp`m`Private`SumDef; Zw1/.fastZeil`F->Hyp`m`F, Hyp`m`Private`GrenzeO[-recvar]={Infinity}; Hyp`m`P; Zw1=(Expr/.Hyp`m`SumSammle/.Hyp`m`pzerl/.Hyp`m`Gzerl/.Hyp`m`GAMMA[xx_]:>(xx-1)!/. Hyp`m`p[xx_,nn_]:>(xx+nn-1)!/(xx-1)!/.Binomial[nn_,k_]:>nn!/k!/(nn-k)!); Unprotect[Sum]; Sum[Hyp`m`Private`x__,Hyp`m`Private`y_]=.; Zw1=(Zw1/.Sum[Summand_,{svar_,do_,up_}]:> fastZeil`Zb[Summand,{svar,If[Position[Denominator[Summand],Expand[svar-do]!]=!={},-Infinity,do],up},recvar,order]); Hyp`m`Private`GrenzeO[-recvar]=.; Hyp`m`P; Hyp`m`Private`SumDef; Zw1/.fastZeil`F->Hyp`m`F ])] GOSPER[order_:0]:=Module[{Zw1},Expr_ :> ( If[ValueQ[Hyp`m`p[PPP,1]], Zw1=Expr/.Hyp`m`SumSammle/.Hyp`m`pzerl/.Hyp`m`Gzerl/.Hyp`m`GAMMA[xx_]:>(xx-1)!/. Hyp`m`p[xx_,nn_]:>(xx+nn-1)!/(xx-1)!; Unprotect[Sum]; Sum[Hyp`m`Private`x__,Hyp`m`Private`y_]=.; Zw1=(Zw1/.Sum[Summand_,{svar_,do_,up_}]:> fastZeil`Zb[Summand,{svar,If[Position[Denominator[Summand],Expand[svar-do]!]=!={},-Infinity,do],up},recvar,-order]); Hyp`m`Private`SumDef; Zw1, Hyp`m`Private`GrenzeO[-recvar]={Infinity}; Hyp`m`P; Zw1=Expr/.Hyp`m`SumSammle/.Hyp`m`pzerl/.Hyp`m`Gzerl/.Hyp`m`GAMMA[xx_]:>(xx-1)!/. Hyp`m`p[xx_,nn_]:>(xx+nn-1)!/(xx-1)!; Unprotect[Sum]; Sum[Hyp`m`Private`x__,Hyp`m`Private`y_]=.; Zw1=Zw1/.Sum[Summand_,{svar_,do_,up_}]:> fastZeil`Zb[Summand,{svar,If[Position[Denominator[Summand],Expand[svar-do]!]=!={},-Infinity,do],up},recvar,-order]; Hyp`m`Private`GrenzeO[-recvar]=.; Hyp`m`P; Hyp`m`Private`SumDef; Zw1 ])] Fnk:=fastZeil`Fnk; GoRat:=fastZeil`GoRat; GoSol:=fastZeil`GoSol; Cert:=fastZeil`Cert; DegBound:=fastZeil`DegBound; System:=fastZeil`System; SystemDimension:=fastZeil`SystemDimension; Prove:=fastZeil`Prove; RunMode:=fastZeil`RunMode; SolAmount:=fastZeil`SolAmount; FileName:=fastZeil`FileName; Protect[ ZB, GOSPER ] EndPackage[] BeginPackage["fastZeil`"] Zb[X___]:=(Clear[Zb]; If[$VersionNumber>=2.,$Messages=OutputStream["",1],$Messages={}]; <=2.,$Messages=OutputStream["stdout",1],$Messages={"stdout"}]; Zb[X]); Gosper[X___]:=(Clear[Gosper]; If[$VersionNumber>=2.,$Messages=OutputStream["",1],$Messages={}]; <=2.,$Messages=OutputStream["stdout",1],$Messages={"stdout"}]; Gosper[X]); EndPackage[] $ContextPath=Join[Drop[$ContextPath,1],{$ContextPath[[1]]}] <=2.,$Messages=OutputStream["stdout",1],$Messages={"stdout"}];