cokernel of a map between modules over polynomial rings
Define a polynomial ring R as F2[x1,x−11,....xD,x−1D] where D is the dimension and F2 is a binary field.
Let G be a free R-module of some labels and has rank t. P
be a free R-module of Pauli operators. σ is a map from
G to P. I want to write a snippet to calculate the cokernel
of this map.
Just for example (taken from page 54 of arxiv.1305.6973),
arxiv.1305.6973 or page 41 of arxiv.1607.01387),
though this is not essential for the question, I can have two ``interaction''
terms in terms of 2-dimensional Pauli operators X, Z and Identity
operator I on 4 sites with two 2-dimensional systems per site as
II(0,0)−IX(0,1)−XI(1,0)−XX(1,1)
and
ZZ(0,0)−IZ(0,1)−ZI(1,0)−II(1,1)
where on each site (x,y) (mentioned in the bracket after
the Pauli operators), the first(second) Pauli acts on the first(second)
two dimensional system on that site. The map σ can be written
as
σ=(y+xy0 x+xy0 01+y 01+x)
where for example, y+xy is a polynomial that specifies the action
on the first two dimensional system as
y+xy=0x0y0+1x0y1+0x1y0+1x1y1
where the exponents are the coordinates of the sites and coefficients
0 and 1 imply whether there is a Pauli acting or not.