# Singular

#### D.4.13.3 modIntersect

Procedure from library `modstd.lib` (see modstd_lib).

Usage:
modIntersect(I,J); I,J ideal/module

Return:
a generating set of the intersection of I and J

Note:
The procedure computes a the intersection of I and J
(over the rational numbers) by using modular methods
with high probability.

Example:
 ```LIB "modstd.lib"; ring R1 = 0, (x,y,z,t), dp; ideal I = 3x3+x2+1, 11y5+y3+2, 5z4+z2+4; ideal J = maxideal(2); modIntersect(I,J); ==> _[1]=z4-12/5x3-4/5x2+1/5z2 ==> _[2]=x3t2+1/3x2t2+1/3t2 ==> _[3]=x3zt+1/3x2zt+1/3zt ==> _[4]=x3yt+1/3x2yt+1/3yt ==> _[5]=x4t+1/3x3t+1/3xt ==> _[6]=x3z2+1/3x2z2+1/3z2 ==> _[7]=x3yz+1/3x2yz+1/3yz ==> _[8]=x4z+1/3x3z+1/3xz ==> _[9]=y5-6/11x3+1/11y3-2/11x2 ==> _[10]=x3y2+1/3x2y2+1/3y2 ==> _[11]=x4y+1/3x3y+1/3xy ==> _[12]=x5+1/3x4+1/3x2 simplify(intersect(I,J),1); ==> _[1]=z4-12/5x3-4/5x2+1/5z2 ==> _[2]=x3t2+1/3x2t2+1/3t2 ==> _[3]=x3zt+1/3x2zt+1/3zt ==> _[4]=x3yt+1/3x2yt+1/3yt ==> _[5]=x4t+1/3x3t+1/3xt ==> _[6]=x3z2+1/3x2z2+1/3z2 ==> _[7]=x3yz+1/3x2yz+1/3yz ==> _[8]=x4z+1/3x3z+1/3xz ==> _[9]=y5-6/11x3+1/11y3-2/11x2 ==> _[10]=x3y2+1/3x2y2+1/3y2 ==> _[11]=x4y+1/3x3y+1/3xy ==> _[12]=x5+1/3x4+1/3x2 ```