# Revision history [back]

### codimension of an ideal or free submodule

Is there an option to calculate the codimension of an ideal or submodule in Sage. For example, I have the following ideal

$I=(1+x+y+xy , 1+y+z+yz , 1+x+z+xz)$

in $\mathbb{Z}_{2}\left[x,y,z\right]$ or the following free submodule

\begin{align} \left(\begin{array}{cccccc} 0 & 0 & 0 & 1+x+y+xy & 1+y+z+yz & 1+x+z+xz\newline 1+z & 1+x & 0 & 0 & 0 & 0\newline 0 & 1+x& 1+y & 0 & 0 & 0 \end{array}\right) \end{align}

in $\left(\mathbb{Z}_{2}\left[x,y,z\right]\right)^{3}$

where $\mathbb{Z}_{2}\left[x,y,z\right]^{3}$ is a polynomial ring in variables $x,y,z$ over field $\mathbb{F}_2$.

### codimension of an ideal or free submodule

Is there an option to calculate the codimension of an ideal or submodule in Sage. Sage? For example, I have the following ideal

$I=(1+x+y+xy , 1+y+z+yz , 1+x+z+xz)$$I=(1+xy, x+y)$

in $\mathbb{Z}_{2}\left[x,y,z\right]$ or the following free submodule

\begin{align} \left(\begin{array}{cccccc} 0 & 0 & 0 & 1+x+y+xy & 1+y+z+yz & 1+x+z+xz\newline 1+z & 1+x & 0 & 0 & 0 & 0\newline 0 & 1+x& 1+y & 0 & 0 & 0 \end{array}\right) \end{align}

in $\left(\mathbb{Z}_{2}\left[x,y,z\right]\right)^{3}$

where $\mathbb{Z}_{2}\left[x,y,z\right]^{3}$ $\mathbb{Z}_{2}\left[x,y\right]$ which is a polynomial ring in variables $x,y,z$ over the field $\mathbb{F}_2$.$\mathbb{Z}_2$.

### codimension of an ideal or free submodule

Is there an option to calculate the codimension of an ideal Sage? For example, I have the following ideal

$I=(1+xy, x+y)$

in $\mathbb{Z}_{2}\left[x,y\right]$ which is a polynomial ring over the field $\mathbb{Z}_2$.$\mathbb{Z}_2$. How do I calculate the codimension for this simple example? I would like to generalize to free submodules if possible