Previous Up Next

15.3.11  Short basis of a lattice

The lll command finds a short basis for the ℤ-modules generated by the rows of a matrix.

Examples

(S,A,L,O):=lll(M:=[[2,1],[1,2]])
     


−11
21


,


−11
10


,





10
1
2
1





,





−11
3
2
3
2





          

So the original basis is v1=[2,1], v2=[1,2] and the short basis is w1=[−1,1], w2=[2,1]. Since w1=−v1+v2 and w2=v1 then AM=S and LO=S.

As another example, input:

M:=[[3,2,1],[1,2,3],[2,3,1]]:; S,A,L,O:=lll(M)
     



−110
−1−12
321



,



−101
01−1
100



,






100
010
1
2
1
2
1






,



−110
−1−12
222



          

Properties: AM=S and LO=S.


Previous Up Next