The latticereduce command performs lattice basis reduction. A should be a matrix of integers of full rank. Progress information is available by setting info();
A = [[1,1,0,1],[1,2,-1,1],[1,-1,3,1]]; latticereduce(A); [[0, 1, 0, 0], [1, 0, 0, 1], [0, 0, -1, 0]]