# intersection of two free submodules

I have two modules found as follows

 F=GF(2);R.<x,y,z> = PolynomialRing(F)
f1 = 1+z;g1=1+y;h1=0;
I1 = Ideal([f1,g1,h1])
M1 = I1.syzygy_module(); M1


[ 0 0 1]

[y + 1 z + 1 0]

 F=GF(2);R.<x,y,z> = PolynomialRing(F)
f2 = 0;g2=1+y;h2=1+x;
I2 = Ideal([f2,g2,h2])
M2 = I2.syzygy_module(); M2


[ 1 0 0]

[ 0 x + 1 y + 1]

Is it possible to find the intersection of two such submodules $M_1$ and $M_2$ in sage? Another possibility would be to find the syzygy of the module generated by vectors (f1,g1,h1) and (f2,g2,h2).

edit retag close merge delete

Sort by » oldest newest most voted

SageMath uses Singular for this, and Singular can compute intersections of modules over polynomial rings.

I don't think this functionality has been exposed to SageMath, but we can easily do that ourselves:

def intersection(M1,M2):
return singular.intersect(M1.transpose(),M2.transpose()).sage().transpose()


Then we can do:

sage: M3 = intersection(M1,M2); M3
[x*y + x + y + 1 x*z + x + z + 1 y*z + y + z + 1]
sage: M3[0]
(x*y + x + y + 1, x*z + x + z + 1, y*z + y + z + 1)
sage: [f.factor() for f in M3[0]]
[(y + 1) * (x + 1), (z + 1) * (x + 1), (z + 1) * (y + 1)]


Indeed, this single generator lies in the intersection:

sage: sum(a*b for (a,b) in zip(M3[0], I1.gens()))
0
sage: sum(a*b for (a,b) in zip(M3[0], I2.gens()))
0

more