 # D-finite Numbers

D-finite functions and P-recursive sequences are defined in terms of linear differential and recurrence equations with polynomial coefficients. In this paper, we introduce a class of numbers closely related to D-finite functions and P-recursive sequences. It consists of the limits of convergent P-recursive sequences. Typically, this class contains many well-known mathematical constants in addition to the algebraic numbers. Our definition of the class of D-finite numbers depends on two subrings of the field of complex numbers. We investigate how difference choices of these two subrings affect the class. Moreover, we show that D-finite numbers over the Gaussian rational field are essentially the same as the values of D-finite functions at non-singular algebraic number arguments. This result makes it easier to recognize certain numbers as D-finite.

Comments

There are no comments yet.

## Authors

##### This week in AI

Get the week's most popular data science and artificial intelligence research sent straight to your inbox every Saturday.

## 1 Introduction

D-finite functions have been recognized long ago [23, 15, 30, 19, 16, 24] as an especially attractive class of functions. They are interesting on the one hand because each of them can be easily described by a finite amount of data, and efficient algorithms are available to do exact as well as approximate computations with them. On the other hand, the class is interesting because it covers a lot of special functions which naturally appear in various different context, both within mathematics as well as in applications.

The defining property of a D-finite function is that it satisfies a linear differential equation with polynomial coefficients. This differential equation, together with an appropriate number of initial terms, uniquely determines the function at hand. Similarly, a sequence is called P-recursive (or rarely, D-finite) if it satisfies a linear recurrence equation with polynomial coefficients. Also in this case, the equation together with an appropriate number of initial terms uniquely determines the object.

In a sense, the theory of D-finite functions generalizes the theory of algebraic functions. Many concepts that have first been introduced for the latter have later been formulated also for the former. In particular, every algebraic function is D-finite (Abel’s theorem), and many properties the class of algebraic function enjoys carry over to the class of D-finite functions.

The theory of algebraic functions in turn may be considered as a generalization of the classical and well-understood class of algebraic numbers. The class of algebraic numbers suffers from being relatively small. There are many important numbers, most prominently the numbers and , which are not algebraic.

Many larger classes of numbers have been proposed, let us just mention three examples. The first is the class of periods (in the sense of Kontsevich and Zagier ). These numbers are defined as the values of multivariate definite integrals of algebraic functions over a semi-algebraic set. In addition to all the algebraic numbers, this class contains important numbers such as , all zeta constants (the Riemann zeta function evaluated at an integer) and multiple zeta values, but it is so far not known whether for example , or Euler’s constant  are periods (conjecturally they are not). The second example is the class of all numbers that appear as values of so-called G-functions (in the sense of Siegel ) at algebraic number arguments [4, 5]. The class of G-functions is a subclass of the class of D-finite functions, and it inherits some useful properties of that class. Among the values that G-functions can assume are , , values of elliptic integrals, and multiple zeta values, but it is so far not known whether for example , Euler’s constant or a Liouville number are such a value (conjecturally they are not).

Another class of numbers is the class of holonomic constants, studied by Flajolet and Vallée [9, §4]. (We thank Marc Mezzarobba for pointing us to this reference.) A constant that is the value of a D-finite function at an algebraic point where is regular (i.e., analytic) is called a regular holonomic constant. Classical examples are , and the polylogarithm value . A singular holonomic constant is defined to be the value of a D-finite function at a Fuchsian singularity (also known as regular singularity ) of a defining differential equation for . Note that the classes of regular and singular holonomic constants are not completely opposite to each other, since a constant can be of both types. A typical example is Apéry’s constant . This constant is of singular type since where the polylogarithm function is D-finite and has a singularity at one of the Fuchsian type. On the other hand, is also a regular holonomic constant, because is a G-function and values of G-functions at algebraic numbers are all of regular type by [4, Theorem 1].

It is tempting to believe that there is a strong relation between holonomic constants and limits of convergent P-recursive sequences. To make this relation precise, we introduce the class of D-finite numbers in this paper.

###### Definition 1.

Let be a subring of  and let be a subfield of .

1. A number is called D-finite (with respect to and ) if there exists a convergent sequence in with and some polynomials , , such that

 p0(n)an+p1(n)an+1+⋯+pr(n)an+r=0

for all .

2. The set of all D-finite numbers with respect to and is denoted by . If , we also write for short.

It is clear that contains all the elements of , but it typically contains many further elements. For example, let be the imaginary unit, then contains many (if not all) the periods and, as we will see below, all the values of G-functions as well as many (if not all) regular holonomic constants. In addition, it is not hard to see that and are D-finite numbers. According to Fischler and Rivoal’s work , also Euler’s constant  and any value of the Gamma function at a rational number are D-finite. (We thank Alin Bostan for pointing us to this reference.) We will show below that D-finite numbers are essentially the limiting values of D-finite functions at one. Moreover, the values D-finite functions can assume at non-singular algebraic points are in fact D-finite numbers. Together with the work on arbitrary-precision evaluation of D-finite functions [3, 25, 26, 27, 17, 18], it follows that D-finite numbers are computable in the sense that for every D-finite number  there exists an algorithm which for any given computes a numeric approximation of with a guaranteed precision of . Consequently, all non-computable numbers have no chance to be D-finite. Besides these artificial examples, we do not know of any explicit real numbers which are not in , and we believe that it may be very difficult to find some.

The definition of D-finite numbers given above involves two subrings of as parameters: the ring to which the sequence terms of the convergent sequences are supposed to belong, and the field to which the coefficients of the polynomials in the recurrence equations should belong. Obviously, these choices matter, because we have, for example, . Also, since is a countable set, we have . On the other hand, different choices of and may lead to the same classes. For example, we would not get more numbers by allowing to be a subring of  rather than a field, because we can always clear denominators in a defining recurrence. One of the goals of this article is to investigate how and can be modified without changing the resulting class of D-finite numbers.

As a long-term goal, we hope to establish the notion of D-finite numbers as a class that naturally relates to the class of D-finite functions in the same way as the classical class of algebraic numbers relates to the class of algebraic functions.

## 2 D-finite Functions and P-recursive Sequences

Throughout the paper, is a subring of and is a subfield of , as in Definition 1 above. We consider linear operators that act on sequences or power series and analytic functions. We write for the shift operator w.r.t.  which maps a sequence to . The set of all linear operators of the form , with , forms an Ore algebra; we denote it by . Analogously, we write for the derivation operator w.r.t.  which maps a power series or function to its derivative . Also the set of linear operators of the form , with , forms an Ore algebra; we denote it by . For an introduction to Ore algebras and their actions, see . When , we call the order of the operator and its leading coefficient.

###### Definition 2.

1. A sequence is called P-recursive or D-finite over if there exists a nonzero operator such that

 L⋅an=pr(n)an+r+⋯+p1(n)an+1+p0(n)an=0

for all .

2. A formal power series is called D-finite over if there exists a nonzero operator such that

 L⋅f(z)=pr(z)Drzf(z)+⋯+p1(z)Dzf(z)+p0(z)f(z)=0.
3. An analytic function defined in some open set is called D-finite over if there exists a nonzero operator such that

 L⋅f(z)=pr(z)Drzf(z)+⋯+p1(z)Dzf(z)+p0(z)f(z)=0

for all .

4. A formal power series is called algebraic over if there exists a nonzero bivariate polynomial such that .

5. An analytic function defined in some open set is called algebraic over  if there exists a nonzero bivariate polynomial such that for all .

Unless there is a danger of confusion, we will not strictly distinguish between complex functions that are analytic in some neighborhood of zero and the formal power series appearing as their Taylor expansions at zero. In particular, if the formal power series happens to be convergent, we may as well regard it as an analytic function defined in some open neighborhood of zero.

A formal power series (or function) is D-finite if and only if its coefficient sequence is P-recursive. Many functions like exponentials, logarithms, sine, arcsine and hypergeometric series, as well as many formal power series like , are D-finite. Hence their respective coefficient sequences are P-recursive.

The class of D-finite functions (resp. P-recursive sequences) is closed under certain operations: addition, multiplication, derivative (resp. forward shift) and integration (resp. summation). In particular, the set of D-finite functions (resp. P-recursive sequences) forms a left--module (resp. a left--module). Also, if is a D-finite function and is an algebraic function, then the composition is D-finite. These and further closure properties are easily proved by linear algebra arguments, proofs can be found for instance in [23, 19, 12]. We will make free use of these facts.

We will be considering singularities of D-finite functions. Recall from the classical theory of linear differential equations  that a linear differential equation with polynomial coefficients and has a basis of analytic solutions in a neighborhood of every point , except possibly at roots of . The roots of are therefore called the singularities of the equation (or the corresponding linear operator). All other points are ordinary points (or non-singular points) of the equation. The behaviour of a D-finite function near a singularity can in general not be described by a formal power series, but it is always a linear combination of generalized series of the form

 exp(P((z−z0)−1/s))(z−z0)αa((z−z0)1/s,log(z−z0))

for some , , , and . See  for details of this construction. Formal power series are in general also not sufficient to describe the behaviour for algebraic functions, but such functions are always linear combinations of so-called Puiseux series, which can be written in the form

 ∞∑n=n0an(z−z0)n/s

for some and some positive integer . See, e.g.,  for details.

It can happen that is a singularity of the equation but the equation nevertheless admits a basis of analytic solutions at this point. Such a singularity is called an apparent singularity. It is well-known [11, 2] that for any given linear differential equations with some apparent and some non-apparent singularities, we can always construct another linear differential equation (typically of higher order) whose solution space contains the solution space of the first equation and whose only singularities are the non-apparent singularities of the first equation. This process is known as desingularization. For later use, we will give a proof of the composition closure property for D-finite functions which pays attention to the singularities.

###### Theorem 3.

Let be a polynomial of degree  in , and let nonzero. Let  be such that defines distinct analytic algebraic functions with in a neighborhood of , and assume that for none of these functions, the value is a singularity of . Fix a solution  of  and an analytic solution of  defined in a neighborhood of . Then there exists a nonzero operator with which does not have among its singularities. Moreover, any point in the neighborhood with the property that none of the evaluations at this point of the solutions of near gives a singularity of , is an ordinary point of .

###### Proof.

(borrowed from ) Let be a root of near . If is constant, then so is and we can take . Suppose that is not constant. Without loss of generality, we may assume that is irreducible (if it is not, replace by the minimal polynomial of ). Then none of the solutions of is constant.

Consider the operator . Because of , we have if and only if . Therefore, if is a basis of the solution space of near , then is a basis of the solution space of near .

Let be all the solutions of near , and let be the least common left multiple of all the operators . Then the solution space of near  is generated by all the functions . The Galois group of consists of all automorphisms of the field which leave fixed. The Galois group respects the differential structure of the field  in the sense that for all and all we have . Therefore, the action of on naturally extends to an action of on the ring of linear differential operators. Since is the least common left multiple of all the operators , regardless of their order, we have for all . This implies that . (This argument already appears in Section 61 of .)

After clearing denominators (from the left) if necessary, we may assume that is an operator in whose solution space is generated by functions that are analytic at . Since are analytic at any point in the neighborhood , the functions that generate the solution space of  are also analytic at provided that none of the values is a singularity of . Therefore, by the remarks made about desingularization, it is possible to replace by an operator (possibly of higher order) which does not have and such among its singularities. ∎

By a similar argument, we see that algebraic extensions of the coefficient field of the recurrence operators are useless. Moreover, it is also not useful to make bigger than the quotient field of .

###### Lemma 4.

1. If is an algebraic extension field of and is P-recursive over , then it is also P-recursive over .

2. If and is P-recursive over , then it is also P-recursive over , the quotient field of .

3. If is closed under complex conjugation and is P-recursive over , then so are , , and .

###### Proof.
1. Let be an annihilating operator of . Then, since has only finitely many coefficients, for some . Let be the least common left multiple of all the conjugates of . Then is an annihilating operator of  which belongs to . The claim follows.

2. Let us write . Let be a nonzero annihilating operator of . Since is an extension field of

, it is a vector space over

. Write

 L=r∑m=0dm∑j=0pmjnjSmn,

where and not all zero. Then the set of the coefficients belongs to a finite dimensional subspace of . Let be a basis of this subspace over . Then for each pair , there exists such that , which gives

 0=L⋅an=s∑ℓ=1αℓ(r∑m=0dm∑j=0cmjℓnjan+m)=:bn∈K.

For all , it follows from the linear independence of that . Therefore

 r∑m=0(dm∑j=0cmjℓnj)∈K[n]Smn⋅an=0for all n∈N and ℓ=1,…,s.

Thus has a nonzero annihilating operator with coefficients in .

3. Since is P-recursive over , there exists a nonzero operator  in such that . Hence where is the operator obtained from by taking the complex conjugate of each coefficient. Since is closed under complex conjugation by assumption,  belongs to , and hence is P-recursive over . Because of

 Re(an)=12(an+¯an)andIm(an)=12i(an−¯an),

where is the imaginary unit, the assertions follow by closure properties.

Of course, all the statements hold analogously for D-finite formal power series instead of P-recursive sequences.

If a D-finite function is analytic in a neighborhood of zero, then it can be extended by analytic continuation to any point in the complex plane except for finitely many ones, namely the singularities of the given function. Those closest to the origin are called dominant singularities of the function. In this sense, D-finite functions can be evaluated at any non-singular point by means of analytic continuation. Numerical evaluation algorithms for D-finite functions have been developed in [3, 25, 26, 27, 17, 18], where the last two references also provide a Maple implementation, namely the NumGfun package, for computing such evaluations. These algorithms perform arbitrary-precision evaluations with full error control.

## 3 Algebraic Numbers

Before turning to general D-finite numbers, let us consider the subclass of algebraic functions. We will show that in this case, the possible limits are precisely the algebraic numbers. For the purpose of this article, let us say that a sequence is algebraic over if the corresponding power series  is algebraic in the sense of Definition 2. Since algebraic functions are D-finite, it is clear that algebraic sequences are P-recursive. We will write for the set of all complex numbers which are limits of convergent algebraic sequences over .

Recall that two sequences , with at most finitely many zero terms are called asymptotically equivalent, written (), if the quotient converges to one as tends to infinity. Similarly, two complex functions and are called asymptotically equivalent at a point , written (), if the quotient converges to one as approaches . These notions are connected by the following classical theorem.

###### Theorem 5.

1. (Transfer theorem [7, 8]) Assume that is analytic at zero with the only dominant singularity and

 f(z)∼1(1−z)α(z→1)

with . Then

 [zn]f(z)∼nα−1Γ(α)(n→∞),

where stands for the Gamma function and the notation refers to the coefficient of in .

2. (Basic Abelian theorem ) Let

be a sequence that satisfies the asymptotic estimate

 an∼nα(n→∞),

where . Then the generating function satisfies the asymptotic estimate

 f(z)∼Γ(α+1)(1−z)α+1(z→1−).

This estimate remains valid when tends to one in any sector with vertex at one symmetric about the horizontal axis, and with opening angle less than .

Also recall the formal version of the implicit function theorem , which says that for any bivariate polynomial with and , there exists a unique formal power series with so that .

With the above preparations, we are ready to develop the following key lemma, which indicates that depending on whether is a real field or not, every real algebraic number or every algebraic number can appear as a limit of an algebraic sequence over .

###### Lemma 6.

Let be an irreducible polynomial of degree . Assume that are all the roots of . Then there exists a polynomial of degree in  admitting distinct roots in such that for each , there is exactly one with and . All these are analytic at zero with the only possible dominant singularity at , which can at most be a simple pole. Furthermore, if

 either(F⊆R and ζ1∈¯F∩R)or(F∖R≠∅),

then can be chosen in so that .

###### Proof.

If , then with . Letting yields the assertions.

Now assume that . Then for all since is irreducible. Let be such that any two (real or complex) roots of have a distance of more than  to each other. Such an exists because is an irreducible polynomial of degree greater than one, and thus has only finitely many distinct roots. The roots of a polynomial depend continuously on its coefficients. Therefore there exists a real number  so that perturbing the coefficients by up to won’t perturb the roots by more than . Any positive smaller number than will have the same property. By the choice of , any such perturbation of the polynomial will have exactly one root in each of the open balls of radius centered at the roots of .

For fixed nonzero with , consider the perturbation . We will show that

the polynomial has exactly distinct roots in for fixed with , and any two of them have a distance of more than . Moreover, there exist functions defined for such that and and for all with and .

In fact, since , for any  in the disk we have

 |−α(1−z)|≤2|α|<δ.

Therefore, for every with , each root of belongs to exactly one open ball of radius centered at a root of , and by continuity, as varies and tends to one in the disk , each root approaches the root  inside the corresponding open ball (Fig. 1).

Since any two roots of are separated by more than , the distance between any two roots of for fixed with is more than . We have thus shown .

Now, let be the distinct roots of , and let their indexing be such that for each . Note that is square-free because for . This means that . By , we have for all . It follows that

 ~Pα(0,ηj)=0and(Dy~Pα)(0,ηj)=p′(ηj)≠0.

Applying the implicit function theorem to each (with in place of ) yields that there exist distinct formal power series with each and such that . By , for each there exists a unique integer with so that and for any with . Hence since . By , we get . Thus because any two roots of are separated by more than .

Moreover, all annihilated by are analytic in the disk . Indeed, since the leading coefficient of  w.r.t.  is a nonzero constant, the singularities of the could only be branch points. However, the choices of  and make it impossible for the to have branch points in the disk , because in order to have a branch point, two roots of the polynomial  w.r.t.  would need to touch each other as varies, and we have ensured that they are always separated by more than as ranges over the unit disk (see and Fig. 1).

Now define the polynomial

 Pα(z,y)=~Pα(z,(1−z)y)=p((1−z)y)−α(1−z)∈F(α)[z,y].

Observe that for any , we have is a root of  if and only if is a root of . Thus there exist exactly distinct formal power series

 fj(z)=gj(z)(1−z)∈F(α,ηj)[[z]]⊆¯F[[z]]

with and such that .

Since each is analytic in the disk and , the point is evidently the only singularity of in the disk , and thus it is the only dominant singularity. In addition, the point is further a simple pole of  and then

 fj(z)∼ζj1−z(z→1),

which gives by part 1 of Theorem 5 (with in place of ). Since , it follows that

Further assume that either and , or . In either case, is dense in the field since . Then by the continuity of at , with the above and , we always can find a number with so that . Fix such and let . Then is a root of . Since , we have . By we know . The lemma follows by setting to be . ∎

###### Example 7.

The irreducible polynomial has three real roots with approximate values , , , respectively. Consider the polynomial

 P(z,y)=p((1−z)y)−p(4)(1−z)∈Q[z,y].

This polynomial was found by the construction described in the proof, using the initial approximation . The equation has a solution

 f(z)=4+4611z+55381331z2+670794161051z3+8114479419487171z4+98192451302357947691z5+⋯∈Q[[z]],

the coefficients of which converge to the third root of . Note, for example, that the distance of the coefficient of to the root is already less than . The other two roots of are

 12(1−√5)+1110(45−41√5)z+166550(27925−24377√5)z2+⋯∈¯Q[[z]], 12(1+√5)+1110(45+41√5)z+166550(27925+24377√5)z2+⋯∈¯Q[[z]].

Their coefficient sequences converge to the two other roots of , but do not belong to .

The following theorem clarifies the converse direction for algebraic sequences. It turns out that every element in is algebraic over . Consequently, is a field.

###### Theorem 8.

Let be a subfield of .

1. If , then .

2. If , then .

###### Proof.
1. Let . Then there exists an irreducible polynomial such that . By Lemma 6, is equal to a limit of an algebraic sequence over , which implies that .

To show the converse inclusion, we let . When , there is nothing to show. Assume that . Then there is an algebraic sequence such that . Since , we have .

Let . Clearly is an algebraic function over . By part 2 of Theorem 5, . Since is algebraic, there exists a positive integer such that admits a Puiseux expansion

 f(z)=ξ1−z+∞∑n=−s+1bn(1−z)n/swith bn∈C for all n.

Setting establishes that

 g(z)=ξ+∞∑n=−s+1bn(1−z)n/s+1.

Note that , so is finite at . Sending to one gives . By closure properties, is again an algebraic function over . Thus .

2. By Lemma 6 and a similar argument as above, we have .

If we were to consider the class of limits of convergent sequences in satisfying linear recurrence equations with constant coefficients over , sometimes called C-finite sequences, then an argument analogous to the above proof would imply that , because the power series corresponding to such sequences are rational functions, and the values of rational functions over  at points in  evidently gives values in . The converse direction is trivial, so we have .

###### Corollary 9.

If , then , where is the imaginary unit.

###### Proof.

Since is a ring and , we have . Since and , the field is closed under complex conjugation and then

 ¯F=(¯F∩R)+i(¯F∩R)=AF+iAF,

by part 1 of Theorem 8. It follows from part 2 of Theorem 8 that . Since and ,

 ¯F=AF+iAF⊆AF(i)=¯¯¯¯¯¯¯¯¯F(i)=¯F,

The assertion holds. ∎

The following lemma says that every element in can be written as the value at one of an analytic algebraic function vanishing at zero, provided that is dense in . This will be used in the next section to restrict the evaluation domain.

###### Lemma 10.

Let be a subfield of with . Let be an irreducible polynomial of degree . Assume that are all the (distinct) roots of in . Then there is a polynomial of degree  in  admitting distinct roots and such that all are analytic in the disk with and, after reordering (if necessary), .

###### Proof.

If then with . Letting yields the assertion. Otherwise and all roots are nonzero.

By Lemma 6, there exists a polynomial in  of degree  in  admitting distinct roots and such that each is analytic in the disk except for a simple pole at and, after reordering (if necessary),

 limn→∞[zn]fj(z)=ζj,j=1,…d.

Hence, together with part 2 of Theorem 5, each admits an expansion at of the form

 fj(z)∼ζj1−z(z→1−).