dalgebra: Difference and Differential Algebra

Difference and Differential Algebra

dalgebra is a SageMath package that allow to create, manipulate, and study differential and difference structures.

Some information about the repository

Main use-case

Let \(R\) be a ring and \(\sigma: R \rightarrow R\) a map such that \(\sigma(r+s) = \sigma(r) + \sigma(r)\). The package dalgebra allows to create the combined structure \((R,\sigma)\) and their elements will know about this operation over themselves. The main cases for this \(\sigma\) are the shifts and the derivations, which defines the behavior of \(\sigma\) with respect to the multiplication of \(R\):

  • Shifts: \(\sigma(rs) = \sigma(r) \sigma(s)\).

  • Derivations: \(\sigma(rs) = \sigma(r) s + r \sigma(s)\).

  • Skew-Derivations: given an homomorphism \(\tau: R \rightarrow R\), \(\sigma(rs) = \sigma(r) s + \tau(r) \sigma(s)\).

From these structures there is plenty of theory about how to perform symbolic integration or summation, how to manipulate difference/differential polynomials, study monomial extension, etc. This software will allow to create these structures and perform some of the algorithms described in the references mentioned above to study these structures.

Using dalgebra is a straight-forward process to work with these type of operators over a ring:

sage: from dalgebra import *
sage: R = DifferentialRing(QQ[x], diff); R
Differential Ring [[Univariate Polynomial Ring in x over Rational Field], (d/dx,)]
sage: p = R(x^3 + 3*x - 1)
sage: p.derivative()
3*x^2 + 3

We can also define more elaborated derivations or differences. For example, we can create a Differential ring with the exponential function:

sage: R = DifferentialRing(QQ['ex'], lambda p : QQ['ex']('ex')*p.derivative()) # ex is the exponential
sage: ex = R.gens()[0]
sage: ex.derivative()
ex

Or we can create a differential ring with two elements that mimic the behavior of the sine and cosine functions:

sage: R.<s,c> = QQ[]; ds,dc = R.derivation_module().gens()
sage: DR = DifferentialRing(R, c*ds - s*dc); s,c = DR.gens()
sage: s.derivative()
c
sage: c.derivative()
-s
sage: (s^2 + c^2).derivative()
0

Installation

This package can be installed, used, modified and distributed freely under the conditions of the GNU General Public License v3 (see the file LICENSE).

There are two different ways of installing the package into your SageMath distribution:

Install from source code

The package can be obtained from the public git repository on GitHub:

  • by clicking here for the webpage view,

  • or by cloning the repository by https,

  • or downloading the latest version in zip format.

After cloning or downloading the source code, you may install it by running the following command line from the main folder of the repository:

>> make install

Install via pip

Another option to install this package is to use the pip functionality within SageMath. This will install the latest stable version of the package and will take care of any dependencies that may be required.

To install it via pip, run the following in a terminal where sage can be executed:

>> sage -pip install [--user] git+https://github.com/Antonio-JP/dalgebra.git

The optional argument –user allows to install the package just for the current user instead of a global installation.

Pre-refactor version

This repository has suffered a big refactor and has lost some of its functionalities (temporary). The version fo the code before this refactoring can be obtained from the tag Tag:v0.0.3.pre-refactor. This version of the software (\(v0.0.20220513.1339\)) can be obtained using the same procedures as described above but with small differences:

  • From source code: use this .zip file.

  • From pip: sage -pip install [--user] git+https://github.com/Antonio-JP/dalgebra.git@v0.0.3.pre-refactor.

Loading the package

Once installed, the full functionality of the package can be used after importing it with the command:

sage: from dalgebra import *

Dependencies

This package has been developed on top of SageMath and currently has no other dependency. However, there are related packages available online that will be connected in future versions:

Package under active development

This package is still under an active development and further features will be included in future version of the code. This means that several bugs may exist or appear. We would thank anyone that, after detecting any error, would post it in the issues page of the repository using the label bug.

Moreover, any requested feature can be post in the issues page of the repository using the label enhancement.

References

This package is based on the work of the following research articles and books:

Acknowledgements

This package has been developed with the financial support of the following institutions:

  • The Austrian Science Fund (FWF): by W1214-N15, project DK15.

  • The Oberösterreich region: by the Innovatives OÖ-2010 plus program.

  • The Île-de-France region: by the project “XOR”.

  • The Spanish Ministry of Science and Innovation (MICINN): by the grant PID2021-124473NB-I00, “Algorithmic Differential Algebra and Integrability” (ADAI)

List of Packages

Indices and Tables