Wolfram Function Repository
Instant-use add-on functions for the Wolfram Language
Function Repository Resource:
Find a unimodular conversion matrix corresponding to a lattice Gramian matrix
ResourceFunction["GramianReduce"][mat] treats mat as the Gram matrix of an integer lattice and returns matrices {u,b} where u is unimodular (invertible over the integers) and b satisfies b==u.mat.Transpose[u]. |
Reduce a 3×3 Gramian matrix:
In[1]:= | ![]() |
Out[1]= | ![]() |
Check unimodularity:
In[2]:= | ![]() |
Out[2]= | ![]() |
Check the matrix identity:
In[3]:= | ![]() |
Out[3]= | ![]() |
Reduce a larger Gramian:
In[4]:= | ![]() |
In[5]:= | ![]() |
Out[5]= | ![]() |
Check that the transformation matrix unimodularity and the matrix product identity properties both hold:
In[6]:= | ![]() |
Out[6]= | ![]() |
This matrix is the Gramian of a certain matrix:
In[7]:= | ![]() |
Out[7]= | ![]() |
Compute the lattice reduction and unimodular transformation of this lattice using the resource function ExtendedLatticeReduce:
In[8]:= | ![]() |
Out[8]= | ![]() |
The transformation is the same as the one obtained by GramianReduce:
In[9]:= | ![]() |
Out[9]= | ![]() |
In this example, the reduced lattice also gives rise to the reduced Gramian:
In[10]:= | ![]() |
Out[10]= | ![]() |
This work is licensed under a Creative Commons Attribution 4.0 International License