Summary of the Main Features of HYP and HYPQ

1. The package HYP.

1.1. The basic objects. Of course, the basic objects of HYP are the binomial coefficient \binom{n}{k}, the Pochhammer symbol (a)_{n} = a(a+1) ⋯ (a+n−1), the Gamma function Γ(x), and the (generalized) hypergeometric series

rF_{s}[ \begin{matrix}a_{1}, …, a_{r} \\ b_{1}, …, b_{s} \end{matrix}; z] = ∑_{n=0}^{∞} \frac{(a_{1})_{n} ⋯ (a_{r})_{n}}{n! (b_{1})_{n} ⋯ (b_{s})_{n}} z^{n} .

(All the notation and terminology is adopted from [2, pp. 1–6].) The example below shows how to enter these basic objects.

In[1]:= Binomial[n,k]*p[a,n]*GAMMA[x]*F[{a,b,c},{d,e},z]
        (   )
        ( n )      a, b, c
Out[1]= (   )  F          ; z Γ(x) (a)
        ( k ) 3 2   d, e                n
        (   )

1.2. Converting binomial sums into hypergeometric notation. As is well-known, “almost all” binomial sums can be written in hypergeometric notation, which is sort of a “normal form” for binomial series. For accomplishing this task quickly there is the rule SUMF. As an example we consider the Vandermonde sum.

In[2]:= SUM[Binomial[N,l]*Binomial[M,K-l],{l,0,Infinity}]

∞

             (       ) (   )
         \ (   M   ) ( N )
Out[2]= ⟩ (       ) (   )
         /   ( K - l ) ( l )
             (       ) (   )
         l=0

and convert it into hypergeometric notation

In[3]:= %/.SUMF

              -K, -N
         F            ; 1   (1 - K + M)
        2 1  1 - K + M                 K
Out[3]= --------------------------------
                      (1)
                         K

1.3. Summations for hypergeometric series. The package HYP includes 29 summation formulas in form of rules. All the available summations (with references) are listed and displayed in the manual. Besides, there is the rule SListe which for a hypergeometric series gives a list of applicable summations. First we ask which summations might be (directly) applicable to our sum.

In[4]:= %3/.SListe
Is N a nonnegative integer?
[y|n]:    y
Be sure to apply "FOrdne" before using the following information!
          S2101 (1 - K + M)     S2103 (1 - K + M)
                           K                     K
Out[4]= {{------------------}, {------------------}}
                 (1)                   (1)
                    K                     K

There are two of them. If we want to know how they look like and what they are we could consult the manual, or display the information on the screen as shown below.

In[5]:= Sgl2101
Do you want to set values for the equation?  [y|n]:  n
                           (-a + c)
             a, -n                 n
Out[5]=  F        ; 1   == ---------
        2 1    c             (c)
                                n
In[6]:= ?S2101
Summation formula (Slater, Appendix (III.4)) in form of a rule.
See also:  SListe, SUMListe, Ers, PosListe.

Let us apply S2101 (the Vandermonde summation [5, (1.7.7), Appendix (III.4)]; S2103 is Gauss’ 2F_{1}[1]-evaluation [5, (1.7.6)]).

In[6]:= %3/.FOrdne/.S2101
Is N a nonnegative integer?
[y|n]:    y
        (1 + M)  (1 - K + M)
               N            K
Out[6]= ---------------------
          (1)  (1 - K + M)
             K            N

1.4. Manipulations of hypergeometric expressions. The result in Out[6] is not completely convincing since everybody knows that the result for the Vandermonde sum Out[2] should read \binom{M+N}{K}. To do simplifications of hypergeometric expressions there are 15 rules which allow to do all the manipulations which are the contents of Appendix I in [5]. Besides, there are two functions, PosListe and Ers, for controlled application of rules: PosListe gives a list of all subexpressions of an expression, together with their respective positions. Ers allows the application of a rule to a specified subexpression.

Now starting with Out[6], we first want to replace (1+M)_{N} (1−K +M)_{K} by (1−K +M)_{K+N}. This is done with the help of the rule erw1, which replaces (a)_{n} by (a)_{n+m}/(a + n)_{m} where m has to be entered on request.

In[7]:= PosListe[%6]
           1
Out[7]= {{----, {{1}}}, {(1 + M) , {{2}}}, {(1 - K + M) , {{3}}},
          (1)                   N                      K
             K
           1
⟩  {------------, {{4}}}}
      (1 - K + M)
                 N
In[8]:= Ers[%6,erw1,{3}]
top-extend by:  N

        (1 - K + M)
                   K + N
Out[8]= -----------------
        (1)  (1 - K + M)
           K            N

Next we want to replace (1−K +M)_{K+N}/(1−K +M)_{N} by (1−K +M +N)_{K}. This is done with the help of zerl which splits (a)_{n} into (a)_{m} (a + m)_{n−m} where m has to be entered on request.

In[9]:= PosListe[%]
           1                  1
Out[9]= {{----, {{1}}}, {------------, {{2}}}, {(1 - K + M)     , {{3}}}}
          (1)            (1 - K + M)                       K + N
             K                      N
In[10]:= Ers[%%,zerl,{3}]
bottom-split by:  N
         (1 - K + M + N)
                        K
Out[10]= ----------------
               (1)
                  K

The last expression clearly is identical with \binom{M+N}{K}.

Additional tools are provided for reversing finite summations, for splitting summations, for shifting summation indices, for exchanging sums, etc.

1.5. Transformations of hypergeometric series. The package HYP includes 86 transformation formulas in form of rules. All the available transformations (with references) are listed and displayed in the manual. Besides, there is the rule TListe which for a hypergeometric series gives a list of applicable transformations.

As an example, we find a proof for

In[11]:= SUM[Binomial[n,j]^{∧}3,{j,0,Infinity}]==
         SUM[Binomial[n,k]^{∧}2*Binomial[2*(n-k),n],{k,0,Infinity}]

∞  ∞

              (   )          (   )  (            )
          \ ( n )3  \ ( n )2 ( 2 (-k + n) )
Out[11]= ⟩ (   )  == ⟩ (   )  (            )
          /   ( j )      /   ( k )  (     n      )
              (   )          (   )  (            )
          j=0            k=0

an identity that occured in the work of V. Strehl [6]. Of course, the first step is to transform Out[11] into hypergeometric notation.

In[12]:= %/.SUMF
                                           1   n  -n
                                       -n, - - -, --
                                           2   2  2
                                   F                ; 1   (1 + n)
                                  3 2       1                    n
                                         1, - - n
              -n, -n, -n                    2
Out[12]=  F             ; -1   == --------------------------------
         3 2     1, 1                           (1)
                                                   n

Now, let us continue with the left-hand side,

In[13]:= %[[1]]

              -n, -n, -n
Out[13]=  F             ; -1
         3 2     1, 1

We apply TListe to find out which transformation might be applicable.

In[14]:= %/.TListe
Be sure to apply "FOrdne" before using the following information!
Out[14]= {{T3239}}

There is only a single transformation provided by HYP (namely [1, Ex. 4.(iv), p. 97]) which can be applied. Again we may display the identity and a reference on the screen.

In[15]:= Tgl3239
Do you want to set values for the equation?  [y|n]:  n

                    a, b, c
Out[15]=  F                       ; z   ==
         3 2  1 + a - b, 1 + a - c

          a  1   a
          -, - + -, 1 + a - b - c    -4 z
      F   2  2   2               ; ---------
     3 2                                   2
           1 + a - b, 1 + a - c    (-1 + z)
⟩  -----------------------------------------
                            a
                     (1 - z)
In[16]:= ?T3239
Transformation formula (Bailey, Ex.  4.(iv), p.  97) in form of a rule.
See also:  TListe, TransListe, Ers, PosListe.

Now, let us apply this transformation.

In[16]:= %13/.T3239
                 -n  1 - n
          n      --, -----, 1 + n
Out[16]= 2   F   2     2         ; 1
            3 2
                       1, 1

Now there are several _{3}F_{2}[1]-transformations which can be applied.

In[17]:= %/.TListe
Is -1 - n a nonnegative integer?
[y|n]:    y
Be sure to apply "FOrdne" before using the following information!

            n           n           n           n           n
Out[17]= {{2  T3204}, {2  T3205}, {2  T3206}, {2  T3207}, {2  T3217},
       n                     n           n                     n
⟩  {2  FPerm[2, 1, 3, u], 2  T3232}, {2  FPerm[2, 1, 3, u], 2  T3233},
       n           n           n           n           n           n
⟩  {2  T3237}, {2  T3261}, {2  T3262}, {2  T3263}, {2  T3264}, {2  T3267},
       n
⟩  {2  T3268}}

This seems to be too much. However a short inspection reveals that only T3204–T3207 make sense in this context. (T3261, T3262, T3263, T3264, T3267 are three-term transformations, T3232 and T3233 would lead back, and T3237 transforms our _{3}F_{2} into a _{6}F_{5}.) The task is to apply T23–T26 and parameter permutations (being performed by the rules FPerm and FTausche) in some order until we arrive at the right-hand side of Out[12]. Even this seems to be a time-consuming task. However, there is another feature of HYP which can be used here. For each transformation included in the package there is also a rule that finds all possible outcomes when combining this transformation with parameter permutations. So let us try T3204 first.

In[18]:= %16/.Tli3204
                     -n  1 - n
              n      --, -----, 1 + n
Out[18]= {1, 2   F   2     2         ; 1  ,
                3 2
                           1, 1
               1 - n          n                1 - n   n
               -----, -n, 1 + -         1, 1 - ----- - -
        n        2            2                  2     2
⟩  {{2   F                   ; 1 Γ  },
          3 2             n                 1 - n      n
                   1, 1 - -             1 - -----, 1 - -
                          2                   2        2
⟩  {FPerm[2, 3, 1, u], T3204}},

               -n      1 - n                      1 - n   n
               --, 1 - -----, -n           1, 1 - ----- - -
        n      2         2                          2     2
⟩  {{2   F                    ; 1 Γ  }, T3204},
          3 2         1 - n                  n      1 - n
               1, 1 - ----- - n          1 + -, 1 - ----- - n
                        2                    2        2
                          n      1 - n                1 - n   n
               1 + n, 1 + -, 1 - -----         1, 1 - ----- - -
        n                 2        2                    2     2
⟩  {{2   F                          ; 1 Γ  },
          3 2            1 - n   n                     1 - n   n
                  1, 2 - ----- + -             -n, 2 - ----- + -
                           2     2                       2     2
⟩  {FPerm[3, 1, 2, u], T3204}}}

And now T3207.

In[19]:= %/.Tli3207
Is -1 - n/2 a nonnegative integer?
[y|n]:    n
Is n a nonnegative integer?
[y|n]:    y
Is -1/2 - n/2 a nonnegative integer?
[y|n]:    n
Is -1 - n a nonnegative integer?
[y|n]:    n
Is -1/2 + n/2 a nonnegative integer?
[y|n]:    n
Is n/2 a nonnegative integer?
[y|n]:    n

Finally the result Out[19] is displayed, which is simplified in the next step.

In[20]:= ExpandAll[%19]
                     -n  1   n
              n      --, - - -, 1 + n
Out[20]= {2, 2   F   2   2   2       ; 1  ,
                3 2
                           1, 1

                            n  1   n              1
                 1 + n, 1 + -, - + -           1, -
          n                 2  2   2              2

⟩  {{{{2   F                      ; 1 Γ  },

            3 2          3                       3
                      1, - + n               -n, - + n
                         2                       2
⟩  {FPerm[3, 1, 2, u], T3204}}}, T3207},
                            n  1   n              1
                 1 + n, 1 + -, - + -           1, -
          n                 2  2   2              2

⟩  {{{{2   F                      ; 1 Γ  },

            3 2          3                       3
                      1, - + n               -n, - + n
                         2                       2
⟩  {FPerm[3, 1, 2, u], T3204}}}, T3207},
                                                 1
                     1   n      n             1, -
          n      -n, - + -, 1 + -                2
         2   F       2   2      2; 1 Γ  (-n)
            3 2                               n  1   n       n
                       1, 1               1 + -, - - -
                                              2  2   2
⟩  {{{{-----------------------------------------------------}, T3204}},
                                1   n
                               (- - -)
                                2   2 n
                                                          1
                                  n  1   n             1, -
                   n      -n, 1 + -, - + -                2
                  2   F           2  2   2; 1 Γ  (-n)
                     3 2                           1   n      n       n
                                1, 1               - + -, 1 - -
                                                   2   2      2
⟩  T3207}, {{{{-----------------------------------------------------},
                                             n
                                        (1 - -)
                                             2 n

⟩  {FPerm[2, 3, 1, u], T3204}}}, T3207},
                    1   n                     1
                -n, - - -, -n              1, -
         n          2   2                     2        1   n
        2   F                 ; 1 Γ  (- + -)
           3 2      n  1   3 n         1   n      n    2   2 n
                1 - -, - - ---         - + -, 1 - -
                    2  2    2          2   2      2
⟩  {{{------------------------------------------------------},
                                 (1)
                                    n
⟩  {FPerm[2, 3, 1, u], T3204}},
⟩  {FPerm[2, 1, 3, u], FPerm[2, 1, l], T3207}},
                    1   n  1                1
                -n, - + -, -             1, -
         n          2   2  2                2        1   n
        2   F               ; 1 Γ  (- - -)
           3 2  1   n  1   n             n  1   n    2   2 n
                - - -, - - -         1 + -, - - -
                2   2  2   2             2  2   2
⟩  {{{----------------------------------------------------}, T3204},
                                (1)
                                   n
⟩  {FPerm[2, 1, l], T3207}},
                    -n  1   n                1
                -n, --, - - -             1, -
         n          2   2   2                2        1
        2   F                ; 1 Γ  (-)
           3 2       1                    n  1   n    2 n
                  1, - - n            1 + -, - - -
                     2                    2  2   2
⟩  {{{-------------------------------------------------}, T3204},
                             1   n
                            (- - -)
                             2   2 n
⟩  {FPerm[2, 1, 3, u], T3207}},

                    1   n  -n                1
                -n, - - -, --             1, -
         n          2   2  2                 2        1
        2   F                ; 1 Γ  (-)
           3 2       1                1   n      n    2 n
                  1, - - n            - + -, 1 - -
                     2                2   2      2
⟩  {{{-------------------------------------------------},
                                 n
                            (1 - -)
                                 2 n
⟩  {FPerm[2, 3, 1, u], T3204}}, {FPerm[2, 1, 3, u], T3207}},
                    -n                     1
                -n, --, -n              1, -
         n          2                      2            n
        2   F              ; 1 Γ  (1 + -)
           3 2  1   n  -3 n             n  1   n        2 n
                - - -, ----         1 + -, - - -
                2   2   2               2  2   2
⟩  {{{---------------------------------------------------}, T3204},
                               (1)
                                  n
⟩  {FPerm[2, 1, 3, u], FPerm[2, 1, l], T3207}},
                                                 1
                     1   n      n             1, -
          n      -n, - + -, 1 + -                2
         2   F       2   2      2; 1 Γ  (-n)
            3 2                               n  1   n       n
                       1, 1               1 + -, - - -
                                              2  2   2
⟩  {{{{-----------------------------------------------------}, T3204}},
                                1   n
                               (- - -)
                                2   2 n

                                  n  1   n             1, -
                   n      -n, 1 + -, - + -                2
                  2   F           2  2   2; 1 Γ  (-n)
                     3 2                           1   n      n       n
                                1, 1               - + -, 1 - -
                                                   2   2      2
⟩  T3207}, {{{{-----------------------------------------------------},
                                             n
                                        (1 - -)
                                             2 n
⟩  {FPerm[2, 3, 1, u], T3204}}}, T3207},
                        n  1                1
                -n, 1 + -, -             1, -
         n              2  2                2        -n
        2   F               ; 1 Γ  (--)
           3 2      n      n         1   n      n    2  n
                1 - -, 1 - -         - + -, 1 - -
                    2      2         2   2      2
⟩  {{{-------------------------------------------------},
                              (1)
                                 n
⟩  {FPerm[2, 3, 1, u], T3204}}, {FPerm[2, 1, l], T3207}}}

Indeed, our _{3}F_{2}[ \begin{matrix}−n,1/2−n/2,−n/2 \\ 1,1/2−n \end{matrix}; 1] which is at the right-hand side of Out[12] appears in this list (even several times), for instance on page 11. And we are also given information how this expression was actually obtained. So we may use this information.

In[21]:= %16/.T3204/.FPerm[2,1,3,u]/.T3207
Is n a nonnegative integer?
[y|n]:    y

                     -n  1 - n                  1 - n   n
                 -n, --, -----           1, 1 - ----- - -
          n          2     2                      2     2          1 - n   n
         2   F                ; 1 Γ  (1 - ----- - -)
            3 2     1 - n   n              n      1 - n              2     2 n
                 1, ----- - -          1 + -, 1 - ----- - n
                      2     2              2        2
Out[21]= ---------------------------------------------------------------------
                                        1 - n
                                   (1 - ----- - n)
                                          2       n

The _{3}F_{2} agrees with the _{3}F_{2} at the right-hand side of Out[12]. It is easy to show that the other terms simplify to (1 + n)_{n}/n!. Hence Out[11] is proved.

1.6. Explicit evaluation. Very often one wants to compute special values of hypergeometric expressions, in particular when checking if some identity might be true or not. For this purpose one should use the evaluation mode of HYP. So far, all examples were done in the symbolic mode of HYP. In symbolic mode even expressions like (a)_{3} are kept unchanged (though it could be evaluated to a(a + 1)(a + 2)). In evaluation mode every expression (that can be evaluated) is evaluated explicitely. There is the switch P that toggles between the two modes of HYP. For example, let us evaluate the Vandermonde sum Out[3] for K = 2 (which must result into \binom{M+N}{2}).

In[22]:= %3/.K-⟩2

              -2, -N
          F         ; 1   (-1 + M)
         2 1  -1 + M              2
Out[22]= --------------------------
                    (1)
                       2
In[23]:= P
In[24]:= %22
Is N a nonnegative integer?
[y|n]:    n

                          2 N     (1 - N) N
         (-1 + M) M (1 + ------ - ----------)
                         -1 + M   (-1 + M) M
Out[24]= ------------------------------------
                          2
In[25]:= Factor[%]
         (-1 + M + N) (M + N)
Out[25]= --------------------
                  2
In[26]:= P

The last P was entered to switch back to symbolic mode.

1.7. Contiguous relations. A collection of about 50 contiguous relations in form of rules is provided. The application of these rules is very similar to the application of summation and transformation rules as discussed before in subsections 1.3 and 1.5.

1.8. Formal limits of hypergeometric expressions. The function Limes enables the user to do formal limits of hypergeometric expressions fast. However, it is left to the user to check in each particular situation if taking the limit in a formal way is actually allowed. As an example we derive Bailey’s [5, Appendix, (III.7)] _{2}F_{1}[\frac{1}{2}]-sum from Whipple’s [5, Appendix, (III.24)] _{3}F_{2}-sum.

In[27]:= Sgl3234
Do you want to set values for the equation?  [y|n]:  n

               a, 1 - a, c
Out[27]=  F                 ; 1   ==
         3 2  d, 1 + 2 c - d

                                       d, 1 + 2 c - d
      1 - 2 c
⟩  2  π Γ a   d  a   1 + 2 c - d  1   a   d  1   a   1 + 2 c - d
                   - + -, - + -----------, - - - + -, - - - + -----------
                   2   2  2        2       2   2   2  2   2        2
In[28]:= Limes[%,c-⟩Infinity]

                                 1 - d
              a, 1 - a  1       2      Sqrt[π] Γ(d)
Out[28]=  F           ; -   == ---------------------
         2 1     d      2        1   a   d    a   d
                               Γ(- - - + -) Γ(- + -)
                                 2   2   2    2   2

Incidentally, this example shows another feature of the packages: The objects Sgl* and Tgl* do not only display a formula on the screen, it is also possible to work with it (or with subexpressions). This saves a lot of typing in many situations.

1.9. Gosper’s and Zeilberger’s algorithms. The Gosper and Zeilberger algorithms can be used within HYP, provided one gets Peter Paule and Markus Schorn’s Mathematica implementation of these algorithms. This implementation can be received via e-mail request to peter.paule@risc.unilinz.ac.at. (See also [4].) The Gosper algorithm [3] does definite summation. The Zeilberger algorithm [7, 9] finds a polynomial recurrence for a binomial or hypergeometric series (which necessarily exists for a sufficiently large order [8]). For instance, let us find a second order recurrence for the following expression.

In[29]:= p[a,n]*F[{a,b,-n},{c,d},1]

              a, b, -n
Out[29]=  F           ; 1   (a)
         3 2    c, d           n

In[30]:= %/.ZB[n,2]

    Peter Paule and Markus Schorn's implementation of the
             Zeilberger algorithm.  (Version 1.1)
Is -a a nonnegative integer?
[y|n]:    n
Is -b a nonnegative integer?
[y|n]:    n

Out[30]= {(a + b - c - d - n) (1 + n) (a + n) (1 + a + n) SUM[n] +
⟩  (1 + a + n) (1 - a - b - a b + 2 c + 2 d + c d + 3 n - a n - b n +
                             2
⟩  2 c n + 2 d n + 2 n ) SUM[1 + n] -
⟩  (1 + c + n) (1 + d + n) SUM[2 + n] == 0}

where SUM[n] is the expression in Out[29].

1.10. Transforming hypergeometric and basic hypergeometric Mathematica expressions into TEX-code. Of course, the package HYP gives full support for writing binomial or hypergeometric expressions in TEX-code. Besides, the user may choose between PlainTEX-, LaTEX-, or AMS-TEX-compatibility.

2. The package HYPQ. All the features and the organization of the package HYPQ are completely analogous to those of HYP.

Of course, the basic objects of HYPQ are the q-binomial coefficient \left[{n \atop k}\right]_{q}, the upper q-factorial (a; q)_{n} = (1 − a)(1 − aq) ⋯ (1 − aq^{n−1}), the infinite q-factorial (a; q)_{∞} = ∏_{i=0}^{∞}(1 − aq^{i}), and the basic hypergeometric series

rϕ_{s}[ \begin{matrix}a_{1}, …, a_{r} \\ b_{1}, …, b_{s} \end{matrix}; q, z] = ∑_{n=0}^{∞} \frac{(a_{1}; q)_{n} ⋯ (a_{r}; q)_{n}}{(q; q)_{n}(b_{1}; q)_{n} ⋯ (b_{s}; q)_{n}} ((−1)^{n}q^{\binom{n}{2}})^{s−r+1} z^{n} .

(Cf. [2, pp. 1–6].) These objects are entered as follows,

In[1]:= Binomialq[n,k]*pq[a,n,q^{∧}2]*pqinf[x,1/q]*ph[{a,b,c},{d,e},q,z]

          n       1        a, b, c              2
Out[1]=        (x;-) ϕ  ; q, z   (a; q )
          k       q ∞ 3 2   d, e                  n
             q

The conversion of q-binomal sums into basic hypergeometric notation is accomplished by the rule SUMph (see the example below).

The package HYPQ includes 18 rules for the simplification of q-factorial expressions, 37 summations in form of rules, 106 transformations in form of rules, about 100 contiguous relations in form of rules, and of course the same rules for reversing, splitting, exchanging, etc., sums, and the functions PosListe and Ers for the controlled application of rules. Also the writing of q-binomial or basic hypergeometric expressions in TEX-code is fully supported, again leaving the user the choice between PlainTEX-, LaTEX-, or AMS-TEX-compatibility.

Once being introduced to HYP, a single example should suffice for a demonstration of the abilities of HYPQ. It concerns the q-Vandermonde sum ([2, (1.2.3)]; compare with subsections 1.2–1.3).

In[2]:= SUM[q^{∧}((N-k)*(L-k))*Binomialq[N,k]*Binomialq[M,L-k],{k,0,Infinity}]

∞

         \  (L - k) (N - k)     M        N

Out[2]= ⟩ q
         /                      L - k      k
         k=0                           q      q
In[3]:= %/.SUMph
                    -N   -L
         L N       q  , q              1 - L + M
        q  ϕ  ; q, q   (q         ; q)
             2 1   1 - L + M                        L
                  q
Out[3]= ---------------------------------------------
                           (q; q)
                                 L
In[4]:= %/.SListe
Is N a nonnegative integer?
[y|n]:    y
Is L a nonnegative integer?
[y|n]:    y
Be sure to apply "phOrdne" before using the following information!
                 L N   1 - L + M                L N   1 - L + M
          S2101 q    (q         ; q)     S2161 q    (q         ; q)
                                    L                              L
Out[4]= {{---------------------------}, {---------------------------}}
                    (q; q)                         (q; q)
                          L                              L
In[5]:= Sgl2101
Do you want to set values for the equation?  [y|n]:  n
Do you want to set a value for q in the equation?  [y|n]:  n

                                n  c
                               a  (-; q)
                 -n                a    n
Out[5]= ϕ a, q  ; q, q   == ----------
        2 1                     (c; q)
               c                      n
In[6]:= ?S2101
Summation formula (Gasper/Rahman, Appendix (II.6)) in form of a rule.
See also:  SListe, SUMListe, Ers, PosListe.
In[6]:= %3/.phOrdne/.S2101
Is N a nonnegative integer?
[y|n]:    y
          1 + M        1 - L + M
        (q     ; q)  (q         ; q)
                   N                L
Out[6]= -----------------------------
                    1 - L + M
          (q; q)  (q         ; q)
                L                N
In[7]:= PosListe[%]
             1                1 + M                  1 - L + M
Out[7]= {{-------, {{1}}}, {(q     ; q) , {{2}}}, {(q         ; q) , {{3}}},
          (q; q)                       N                          L
                L
             1
⟩  {----------------, {{4}}}}
        1 - L + M
      (q         ; q)
                     N
In[8]:= Ers[%%,erw1,{3}]
top-extend by:  N

           1 - L + M
         (q         ; q)
                        L + N
Out[8]= ------------------------
                 1 - L + M
       (q; q)  (q         ; q)
             L                N
In[9]:= PosListe[%]
            1                     1
Out[9]= {{-------, {{1}}}, {----------------, {{2}}},
         (q; q)              1 - L + M
               L           (q         ; q)
                                          N
       1 - L + M

⟩ {(q ; q) , {{3}}}}

                    L + N
In[10]:= Ers[%%,zerl,{3}]
bottom-split by:  N
          1 - L + M + N
        (q             ; q)
                           L
Out[10]= --------------------
              (q; q)
                    L

Clearly this equals the q-binomial coefficient \left[{M+N \atop R}\right]_{q}, as could also be shown by using tools of HYPQ (analogous to those being discussed before in subsection 1.4).

References

1. W. N. Bailey, Generalized hypergeometric series, Cambridge University Press, Cambridge, 1935.

2. G. Gasper and M. Rahman, Basic hypergeometric series, Encyclopedia of Mathematics And Its Applications 35, Cambridge University Press, Cambridge, 1990.

3. R. W. Gosper, Decision procedure for indefinite hypergeometric summation, Proc. Nat. Acad. Sci. USA 75 (1978), 40–42.

4. P. Paule and M. Schorn, A Mathematica version of Zeilberger’s algorithm for proving binomial coefficient identities, J. Symbolic Comput. (to appear).

5. L. J. Slater, Generalized hypergeometric functions, Cambridge University Press, Cambridge, 1966.

6. V. Strehl, Binomial identities — Combinatorial and algorithmic aspects.

7. D. Zeilberger, A fast algorithm for proving terminating hypergeometric identities, Discrete Math. 80 (1990), 207–211.

8. D. Zeilberger, A holonomic systems approach to special functiions identities, J. Comput. Appl. Math. 32 (1990), 321–368.

9. D. Zeilberger, The method of creative telescoping, J. Symbolic Comput. 11 (1991), 195–204.