Use this function to recover the rank of the torus factor of a diagonal action.
The following example defines an action of a two-dimensional torus on a polynomial ring in four variables.
i1 : R = QQ[x_1..x_4] o1 = R o1 : PolynomialRing |
i2 : W = matrix{{0,1,-1,1},{1,0,-1,-1}}
o2 = | 0 1 -1 1 |
| 1 0 -1 -1 |
2 4
o2 : Matrix ZZ <--- ZZ
|
i3 : T = diagonalAction(W, R)
* 2
o3 = R <- (QQ ) via
| 0 1 -1 1 |
| 1 0 -1 -1 |
o3 : DiagonalAction
|
i4 : rank T o4 = 2 |