dim G
This function is provided by the package InvariantRing.
i1 : R = QQ[x_1..x_4] o1 = R o1 : PolynomialRing
i2 : T = diagonalAction(matrix {{0,1,-1,1},{1,0,-1,-1}}, R) * 2 o2 = R <- (QQ ) via | 0 1 -1 1 | | 1 0 -1 -1 | o2 : DiagonalAction
i3 : dim T == dim R o3 = true