next | previous | forward | backward | up | top | index | toc | Macaulay2 web site
LLLBases > LLL

LLL -- compute an LLL basis

Synopsis

Description

This function is provided by the package LLLBases. If the optional argument ChangeMatrix=>true is given, then the output is a pair of matrices: the first is the LLL matrix as above, and the second is the change of basis matrix from the original basis to the new basis.

In this example, we compute the LLL basis of the nullspace of a matrix. This is an example of Havas et al.

m1 = map(ZZ^10, ZZ^10, (j,i) -> (i+1)^3 * (j+1)^2 + i + j + 2)
m = syz m1
LLL m
It is also possible to get the change of basis matrix from the original basis to the LLL basis. For example,
(n,c) = LLL(m, Strategy => NTL, ChangeMatrix=>true)
m * c == n

Caveat

If the strategy given is not an NTL strategy, then the columns of the matrix m must be linearly independent.In any case, the matrix must be defined over the ring ZZ.

See also

Ways to use LLL :