In the previous post we reduced the problem of finding an expression of a Hypergeometric function to creating a suitably large “knowledge base” of suitable origins, and to find, given a suitable set of parameters an origin . This post is concerned with the latter problem.

Let us re-state the definitions. We are given two vectors of complex numbers . These parameters are called *suitable* if implies that . We assume are suitable, and also that , for all . All our origins also satisfy the same conditions. To every such set of parameters we associate three invariants:

- For , the number of , and similarly the number of .
- The number of .

We then know that are equivalent to (reachable from) if and only if these invariants all agree.

## Strictly Numerical Parameters

If all of the are concretely given, then this leads to an easy efficient algorithm. To every we can associate a tuple and similarly a tuple . Given parameters there exist finitely many and such that if and only if for some , and similarly if and only if for some . We can thus pack all invariants of into a single tuple:

Thus from our knowledge base we simply assemble a python dictionary that is indexed by the invariant . In this way strictly numerical parameters can be settled very quickly and easily.

## Parametric Hypergeometric Formulae

In particular for low orders, there are often parametric formulae for Hypergeometric functions, like this:

Clearly we want to support these kinds of formulae. This seems much harder, though. Part of the difficulty stems from the fact that is not even a ring, and part of the difficulty stems from the fact that the Hypergeometric function is symmetric in the numerator parameters and in the denominator parameters. The following strategy is the best I could come up with: Given (where the are parametric formulae) we call a choice of numbers for the free variables an *instantiation* of the parametric formula. So for example would be an instantiation of (here ). Now given , for every (where denotes the symmetric group acting on elements), we will try to find all inequivalent instantiations of that satisfy

- for all ,
- for all .

We then instantiate all of these formulae, and run the algorithm for numerical parameters on the instantiations.

It remains to find a way to solve the above system of equations. Here we make additional assumptions. First of all we will assume all formulae are *linear* in the free parameters. The formulae found in tables are all of this form. Moreover, they have the property that for every free parameter there exists at least one entry in the vector (or ) containing as the *only* free symbol. We will use this entry to make an initial guess of the value of , and then see what other values we should try. Thus to find the values of to try, do the following:

- Find the least common multiple of all denominators of coefficients of appearing in the equations.
- Of all entries that isolate , find the one in which appears with largest denominator, say .
- The right-hand side of the equation corresponding to that entry determines up to multiples of . Pick an initial choice .
- Let . Try also , , and so on, up to .

I think this should yield all possible solutions (and a lot of spurious ones). We then run these steps for all free parameters, and try all combinations of all possible solutions, and all permutations. Evidently this leads to combinatorial explosion, but it is important to keep in mind that the formulae we will be working with have free parameters and very small denominators. Efficient code will still be important.

## Finding Expressions for Hypergeometric Functions with Parameters

This is a different notion from the above: what if we want to find a formula for a Hypergeometric function where the *themselves* contain free symbols? This can happen when trying to evaluate general integrals (involving say the general order Bessel function), or when computing transforms (e.g. the Laplace transform). Clearly none of the “concrete” formulae are of help here. So we can only try to find an instantiation of some parametric Hypergeometric formula from which we can reach the function we are interested in in a finite number of steps independent of the free symbols. Clearly there are no huge tricks we can play here. We will just assume that everything that is not obviously congruent mod 1 is “generically incongruent” and return formulae that are valid for almost all values of the free parameters. With this in mind, running the above algorithm should also work in the case of free symbols.

In the first part, I only count two invariants.

It seems like you could do it even if each index has more than one free variable just by using some linear algebra.

I counted alpha_r, beta_r and gamma as three invariants.

As for doing linear algebra, I feel slightly shaky doing this (since Q/Z is not a ring, so we have to keep track of moduli etc), but yes it could be done. The point is that I don’t think we need it, and I don’t want to do more complicated than necessary (initially).

Of course if you can show me a clean linear algebra way to solve the entire problem then I would like that much more than my algorithm. I just couldn’t come up with one (again I’m blaming this in Q/Z not being a ring, but maybe I just don’t see it).

The last part sounds like a difficult problem in general. It’s like the difference between integrating when is given (like say it’s 3), and integrating when is symbolic and only given to be a positive integer. The Risch Algorithm can handle the first case pretty easily. But to do the second case would require being able to manipulate polynomials with symbolic exponents. However, if you run through the algorithm by hand, you will be able to derive a general expression for . But the answer will contain things like factorials and summations, and it isn’t something that you can produce just by running it through the program.

And for assuming that things are “generically incongruent,” we do similar things in CAS all the time. It’s like assuming that when solving . A more advanced example is in the Risch Algorithm, where we have to assume that symbolic constants are not rational multiples of each other. For example, when it says that is nonelementary, it is actually correct for all and except for . So my point is that I think that that’s a perfectly valid assumption to make.

It looks like I screwed up the LaTeX, which isn’t surprising due to WordPress’s lack of a preview function. Could you fix it for me?