i1 : R = ZZ[a..d]; |
i2 : M = image matrix {{a,b}} o2 = image | a b | 1 o2 : R-module, submodule of R |
i3 : N = image matrix {{c,d}} o3 = image | c d | 1 o3 : R-module, submodule of R |
i4 : M ** N o4 = cokernel {2} | -d 0 -b 0 | {2} | c 0 0 -b | {2} | 0 -d a 0 | {2} | 0 c 0 a | 4 o4 : R-module, quotient of R |
i5 : N ** M o5 = cokernel {2} | -b 0 -d 0 | {2} | a 0 0 -d | {2} | 0 -b c 0 | {2} | 0 a 0 c | 4 o5 : R-module, quotient of R |
Use flip(Module,Module) to produce the isomorphism M ** N --> N ** M.
To recover the factors from the tensor product, use the function formation.