---
title: "Molien Series"
canonical: "https://docs.magma-maths.org/v2.30-1/CommutativeAlgebra/InvariantTheory/molien.html"
source: "https://docs.magma-maths.org/v2.30-1/CommutativeAlgebra/InvariantTheory/molien.md"
part: "Commutative Algebra"
chapter: "Invariant Theory"
breadcrumbs:
  - {"title": "Magma Handbook", "source": "https://docs.magma-maths.org/v2.30-1/index.md"}
  - {"title": "Commutative Algebra", "source": "https://docs.magma-maths.org/v2.30-1/CommutativeAlgebra/index-commutative-algebra.md"}
  - {"title": "Invariant Theory", "source": "https://docs.magma-maths.org/v2.30-1/CommutativeAlgebra/InvariantTheory/index-invariant-theory.md"}
prev: {"title": "Construction of $G$-modules", "source": "https://docs.magma-maths.org/v2.30-1/CommutativeAlgebra/InvariantTheory/gmodule.md"}
next: {"title": "Primary Invariants", "source": "https://docs.magma-maths.org/v2.30-1/CommutativeAlgebra/InvariantTheory/primary.md"}
intrinsics:
  - {"name": "MolienSeries", "signature": "MolienSeries(G): GrpMat -> FldFunUElt"}
  - {"name": "MolienSeries", "signature": "MolienSeries(G): GrpPerm -> FldFunUElt"}
  - {"name": "MolienSeriesApproximation", "signature": "MolienSeriesApproximation(G, n): GrpPerm, RngIntElt -> RngSerLaurElt"}
examples:
  - "ex-cbf09f"
---

<a id="molien"></a>
<a id="rnginvar-molien"></a>
# Molien Series

Let $R=K[V]^G$ be the invariant ring of the finite group $G$ over the field $K$. If $G$ is a finite matrix group in the non-modular case or a permutation group (in *either* the modular or non-modular case) then the Molien series of $G$ yields the Hilbert Series of $R$.

<a id="function-molienseries-grpmat"></a>
## `MolienSeries(G): GrpMat -> FldFunUElt`

<a id="function-molienseries-grpperm"></a>
## `MolienSeries(G): GrpPerm -> FldFunUElt`

The Molien series of $G$, returned as an element of the rational function field ${\mathbb{Z}}(t)$. If $G$ is a permutation group, the Molien series always exists and equals the Hilbert series of the invariant ring of $G$ for any field. If $G$ is a matrix group, the characteristic of the coefficient field of $G$ must be coprime with the order of $G$.

<a id="function-molienseriesapproximation-grpperm-rngintelt"></a>
## `MolienSeriesApproximation(G, n): GrpPerm, RngIntElt -> RngSerLaurElt`

The Molien series of a permutation group $G$, or more precisely, an approximation to it, as a Laurent series with $n$ known coefficients. In contrast to the `MolienSeries` function above, approximations can be computed for far larger groups.

<a id="example-ex-cbf09f"></a>
## `Example: Molien Series of a Matrix Group (ex-cbf09f)`

We compute the Molien series of a matrix $G$ and verify that the coefficients of the corresponding power series match the number of independent invariants for each degree.

```magma
> K<z> := CyclotomicField(5);
> w := -z^3 - z^2;
> G := MatrixGroup<3,K |
>    [1,0,-w, 0,0,-1, 0,1,-w],
>    [-1,-1,w, -w,0,w, -w,0,1]>;
> M<t> := MolienSeries(G);
> M;
(-t^8 - t^7 + t^5 + t^4 + t^3 - t - 1)/(t^11 + t^10 -
    t^9 - 2*t^8 - t^7 + t^4 + 2*t^3 + t^2 - t - 1)
> P<u> := PowerSeriesRing(IntegerRing());
> P ! M;
1 + u^2 + u^4 + 2*u^6 + 2*u^8 + 3*u^10 + 4*u^12 +
    4*u^14 + u^15 + 5*u^16 + u^17 + 6*u^18 + u^19 +
    O(u^20)
> Coefficients(P ! M);
[ 1, 0, 1, 0, 1, 0, 2, 0, 2, 0, 3, 0, 4, 0, 4, 1, 5, 1,
6, 1 ]
> time [#InvariantsOfDegree(G, i): i in [0 .. 19]];
[ 1, 0, 1, 0, 1, 0, 2, 0, 2, 0, 3, 0, 4, 0, 4, 1, 5, 1,
6, 1 ]
```
