Overview of the IntegerRelations Package
Calling Sequence
Description
List of IntegerRelations Package Commands
Examples
IntegerRelations:-command(arguments)
command(arguments)
The IntegerRelations package contains two routines, LLL, and PSLQ, which are used to solve specific computational problems. LLL is the Lenstra, Lenstra, Lovasz lattice basis reduction. PSLQ is Bailey and Ferguson's partial sum of least squares algorithm. The LinearDependency routine is a user-level routine for applying PSLQ or LLL to solve the integer relation problem, defined as follows.
Given decimal approximations for n real or complex numbers x1,x2,...,xn, find an integer relation between them, that is, find integers u1,u2,...,un such that u1⁢x1+u2⁢x2+...+un⁢xn is small, if such ui exist.
Each command in the IntegerRelations package can be accessed by using either the long form or the short form of the command name in the command calling sequence.
The long form, IntegerRelations:-command, is always available. The short form can be used after loading the package.
The following is a list of available commands.
LinearDependency
LLL
PSLQ
To display the help page for a particular IntegerRelations command, see Getting Help with a Command in a Package.
The identify Command and the IntegerRelations Package
The identify command uses the LLL and PSLQ routines to identify exact constants from decimal numbers, for example, given x=4.555806216,identify⁡x outputs π+2
The process is described as follows. Consider x=2.414213562. The identify command first tests if x is close to a small rational constant. Next identify tests if x is close to an algebraic number. To do this, identify first tests if x is a root of a quadratic polynomial. It computes PSLQ⁡1,x,x2. PSLQ outputs −1,−2,1 an integer relation with small integer coefficients satisfying x2−2⁢x−1=11000000000, which is small. From this relation you have the minimal polynomial for x, namely x2−2⁢x−1. The identify command then solves for x to obtain x=1+−2 from which it determines that x=1+2. The algorithms in the identify routine can find other relations, for example:
with⁡IntegerRelations
LLL,LinearDependency,PSLQ
Digits≔20
x≔0.31783724519578224473
PSLQ⁡1,x,x2,x3,x4
1,0,−10,0,1
solve⁡y4−10⁢y2+1,y
3−2,−3+2,3+2,−3−2
identify⁡x
3−2
See Also
help
identify
module
PolynomialTools:-MinimalPolynomial
UsingPackages
with
Download Help Document