Ore_algebra, a Package for Skew Operators

by Frederic Chyzak, Algorithms Project, INRIA, France

Frederic.Chyzak@inria.fr

Several algorithms for integration and summation have a natural description in terms of linear differential and difference operators, which in turn are well described by skew (or Ore) polynomials. This was the starting point for the Ore_algebra package.

> with(Ore_algebra);

[Maple Math]
[Maple Math]
[Maple Math]

To work with an Ore algebra, we first have to declare it. The package creates a table which implements and remembers the
operations in this algebra. Here is the example of the algebra of linear differential operators in the differential operator
[Maple Math] with (rational) coefficients in [Maple Math] .

> A:=diff_algebra([Dx,x]);

[Maple Math]

(This is the name of the table.)

Although the usual product in Maple is commutative, we use [Maple Math] to denote skew products with the convention that powers of [Maple Math] are on the right.

Multiplication of operators is obtained by the function skew_product.

> P1:=x*Dx^2-1: P2:=Dx-x: P1_P2:=skew_product(P1,P2,A);

[Maple Math]

Remember that in skew algebras of linear operators, factorizations are seldom unique.

> DEtools[DFactor](P1_P2,[Dx,x]);

[Maple Math]

(Univariate) Ore polynomial rings have a Euclidean algorithm. This is implemented in the following routines: skew_pdiv , skew_prem , skew_gcdex and skew_elim . An extension to the multivariate case is available.

As a first application, we show how the package can be used to derive a proof of the Reed-Dawson identity:

> U[n]=Sum(binomial(n,k)*binomial(2*k,k)*(-2)^(n-k),k=0..n);

[Maple Math]

is

> binomial(n,n/2);

[Maple Math]

for even [Maple Math] and [Maple Math] for odd [Maple Math] .

Let us introduce an algebra of linear recurrence operators in [Maple Math] and [Maple Math] . [Maple Math] and [Maple Math] denote the shift operators in [Maple Math] and [Maple Math] respectively.

> A:=shift_algebra([Sn,n],[Sk,k]):

We compute first order recurrences satisfied by the summand (which we denote by [Maple Math] ).

> h:=binomial(n,k)*binomial(2*k,k)*(-2)^(n-k);

[Maple Math]

> Sn-normal(applyopr(Sn,h,A)/h,expanded);

[Maple Math]

> Sk-normal(applyopr(Sk,h,A)/h,expanded);

[Maple Math]

> G:=map(numer,{%%,%}):

We eliminate [Maple Math] between these operators by computing their greatest common right divisor.

> GCD:=skew_gcdex(op(G),k,A);

[Maple Math]
[Maple Math]
[Maple Math]
[Maple Math]
[Maple Math]

> series(GCD[1],Sk=1);

[Maple Math]
[Maple Math]

The factor [Maple Math] corresponds to taking a finite difference. Definite summation for [Maple Math] over all integers yields a telescoping series which collapses to 0. We thus get:

> Sum(applyopr(coeff(%,Sk-1,0),u[n,k],A),k=-infinity..infinity)=0;

[Maple Math]

Therefore, the sum [Maple Math] satisfies

> collect(primpart(coeff(%%,Sk-1,0),Sn),Sn,normal);

[Maple Math]

> applyopr(%,U[n],A);

[Maple Math]

Now, the announced result follows from initial conditions:

For [Maple Math] ,

> U[1]:=add(subs(n=1,h),k=0..1);

[Maple Math]

so that [Maple Math] for odd [Maple Math] .

For [Maple Math] ,

> U[0]:=add(subs(n=0,h),k=0..0);

[Maple Math]

so that [Maple Math] is given by

> 2*(p+1)*V(p+1)-4*(2*p+1)*V(p);

[Maple Math]

> LREtools[hypergeomsols](%,V(p),{V(0)=1},output=basis);

[Maple Math]

which is [Maple Math] .

As a more advanced application, we derive contiguity relations for Gauss hypergeometric function. This function is known to Maple as:

> f:=hypergeom([a,b],[c],z);

[Maple Math]

It is [Maple Math] for

> u:=pochhammer(a,n)*pochhammer(b,n)/pochhammer(c,n)/n!:

When considering the summand, we introduce the following algebra.

> A:=shift_algebra([Sn,n],[Sa,a],comm={b,c}):

The bivariate sequence [Maple Math] vanishes at both following operators:

> G:={(c+n)*(n+1)*Sn-(a+n)*(b+n),a*Sa-(a+n)}:

> normal(map(applyopr,G,u,A),expanded);

[Maple Math]

(There are general algorithms to find such operators.)

From the previous first order recurrences, we derive relations on [Maple Math] in the mixed differential difference algebra

> A:=skew_algebra(diff=[Dz,z],shift=[Sa,a],comm={b,c}):

The equations are obtained by multiplication of the recurrences by [Maple Math] , followed by summation over all non-negative [Maple Math] . Formally, this corresponds to changing [Maple Math] into [Maple Math] and [Maple Math] into [Maple Math] .

> map(proc(p)
collect(add(add(coeff(coeff(p,Sn,i),n,j)*
skew_product(skew_power(z*Dz,j,A),1/z^i,A),
j=0..degree(coeff(p,Sn,i),n)),
i=0..degree(p,Sn)),Dz,factor)
end,G);

[Maple Math]

Therefore, we set:

> P:=z*(1-z)*Dz^2+(c-(a+b+1)*z)*Dz-a*b:

> H:=z*Dz/a+1:

> G:={P,numer(Sa-H)};

[Maple Math]

The linear differential operator [Maple Math] is called a step-up operator. It relates the forward shift of [Maple Math] to derivatives of [Maple Math] by the following equation

> hypergeom([a+1,b],[c],z)=z/a*diff(hypergeom([a,b],[c],z),z)+hypergeom([a,b],[c],z);

[Maple Math]
[Maple Math]

The elimination of [Maple Math] between this step-up operator and the differential equation yields a contiguity relation for [Maple Math] , i.e., a purely recurrence equation. It is obtained by the extended skew gcd algorithm:

> C:=collect(skew_elim(P,numer(Sa-H),Dz,A),Sa,factor);

[Maple Math]

In other words, Gauss hypergeometric function satisfies the following equation:

> applyopr(C,hypergeom([a,b],[c],z),A)=0;

More interestingly, the extended Euclidean algorithm yields a step-down operator for [Maple Math] , i.e., a relation between an inverse shift of [Maple Math] and its derivatives. This is obtained by computing an inverse of [Maple Math] modulo [Maple Math] .

> GCD:=skew_gcdex(P,numer(H),Dz,A);

[Maple Math]
[Maple Math]

From this result, we have [Maple Math] and [Maple Math] . In particular,

> B:=collect((a-1)*subs(a=a-1,GCD[3]/GCD[1]),Dz,factor);

is the step-down operator:

> hypergeom([a-1,b],[c],z)=z*(1-z)*diff(hypergeom([a,b],[c],z),z)/(a-c)+(c-a-z*b)*hypergeom([a,b],[bc],z)/(c-a);

There is also an algorithm to compute (one-sided) Groebner bases in Ore algebras. This will be demonstrated in the presentation of the Groebner package.