# Revision history [back]

In Sage, you first create a matrix. Then, each matrix has a method which allows to do lattice reduction to find the short vectors. For example, you may do:

sage: N2t = randint(0, 10^10)
sage: tau = randint(0, 10^10)
sage: m = matrix(QQ, [(N2t,0,tau,1), (1,0,0,1)])
sage: m.LLL()
[          1           0           0           1]
[ 3930321261           0  1228166902 -3930321261]


Beware that the word lattice has many meanings in mathematics. LatticePoset in sage refers to something else : https://en.wikipedia.org/wiki/Lattice_(order).