# Invariant Fields

If $G$ is a group acting on a polynomial ring $K[x_1,\ldots,x_n]$, it also acts on the rational function field $K(x_1,\ldots,x_n)$ by homomorphic extension. The invariants field $K(x_1,\ldots,x_n)^G$ is the field consisting of all functions which are fixed by $G$. Magma allows the construction of the invariant field by the function `InvariantField`. All that was said above about possible arguments of `InvariantRing` and access functions for invariant rings carries over to invariant fields. The category of invariant fields is `FldInvar`.

## Creation

### `InvariantField(G, K): GrpPerm, Fld -> FldInvar`

### `InvariantField(G): GrpMat -> RngInvar`

### `InvariantField(I, A): RngMPol, Mtrx -> FldInvar`

```magma
Reductive        : BoolElt                      Default: false
LinearlyReductive: BoolElt                      Default: false
FunctionField    : FldFunRat                    Default: 
```

Create the invariant field for the group $G$ over the field $K$. The arguments and parameters are the same as for the function [`InvariantRing`](invariant-ring.md#function-rnginvar-invariantring), in the three cases of permutation groups, matrix groups, and algebraic groups.

## Access

### `FunctionField(F): FldInvar -> FldFunRat`

Given an invariant field $F$, return the underlying function field of $F$.

### `Group(F): FldInvar -> Grp`

Given an invariant field $F$, return the underlying group of $F$.

### `GroupIdeal(F): FldInvar -> RngMPol`

Given an invariant field $F$ defined over an algebraic group $G$, return the ideal $I$ defining $G$.

### `Representation(F): FldInvar -> Mtrx`

Given an invariant field $F$ defined over an algebraic group $G$, return the representation matrix $A$ for $G$.

## Functions for Invariant Fields

This section describes functions that apply to invariant fields.

### `FundamentalInvariants(F): FldInvar -> RngMPol`

```magma
Al        : MonStgElt                    Default: {"BethMuellerQuade" }
Minimize  : BoolElt                      Default: true
Min       : RngIntElt                    Default: 0
BottomUpTo: RngIntElt                    Default: 0
```

Given an invariant field $F$, return a sequence of fundamental invariants of $F$ which generate $F$ as an algebra over the base field of the ambient rational function field of $F$.

By default this function uses the algorithm of Beth and Müller-Quade [[Müller-Quade and Beth, 1999](../../references.md#cite-mqb99)]. By setting the parameter `Al` to `"FleischmannKemperWoodcock"`, an alternative algorithm of Fleischmann, Kemper and Woodcock will be used.

By default the returned invariants will be minimal (in the sense of ‘non-redundant’). By setting the parameter `Minimize` to `false`, no minimization will be attempted. The other parameters apply to the minimization and are as in the function [`MinimizeGenerators`](#function-rnginvar-minimizegenerators) below.

### `DerksenIdeal(F): FldInvar -> RngMPol`

Given an invariant field $F$, return the Derksen ideal of $F$. This is an ideal $D$ in $K[y_1 \ldots y_n]$, where $K = k(x_1 \ldots x_n)$ is the ambient rational function field of $F$, and the $y_i$ are new indeterminates. By definition, $D$ is the intersection of all the ideals

$$
<y_1 - g(x_1), \ldots, y_n - g(x_n)>
$$

for $g \in G$, the group of $R$. The function returns $D$ as an ideal with a Groebner basis.

### `MinimizeGenerators(L): [FldFunRatElt] -> [FldFunRatElt]`

```magma
Min       : RngIntElt                    Default: 0
BottomUpTo: RngIntElt                    Default: 0
```

Suppose $L$ is a set or sequence of non-constant elements of a rational function field. This function selects a minimal (in the sense of ‘irredundant’) subset of $L$ which generates the same subfield as $L$. The function returns a sequence of such minimal generators.

If the parameter `Min` is set to $m>0$, then the function stops when a generating set with $m$ elements is reached ($m=0$ is the default and implies no limit).

If the parameter `BottomUpTo` is set to $b>0$, then the function first tries to eliminate generators by testing if they lie in the subfield generated by a small number of elements from L. This small number is limited by $b$.

### `QuadeIdeal(L): [FldFunRatElt] -> RngMPol`

```magma
Fy        : BoolElt                    Default: 
LargeIdeal: BoolElt                    Default: false
```

Suppose $L$ is a non-empty set or sequence of non-constant elements from a rational function field $F = k(x_1,\ldots,x_n)$, generating a subfield $K = k(L)$. The Quade ideal, introduced in [[Müller-Quade and Steinwandt, 1999](../../references.md#cite-muellerquadesteinwandt)], is the ideal in $F[y_1,\dots,y_n]$ generated by the kernel of the map $K[y_1,\ldots,y_n] \rightarrow F$ given by $y_i \mapsto x_i$. This function returns the Quade ideal (with its basis being a Groebner basis).

The parameter `Fy` may be set to a polynomial ring $P$ of rank $n$ over $F$, so that the result is an ideal of $P$. If the parameter `LargeIdeal` is set to `true`, then an ideal in a larger polynomial ring is returned, whose intersection with $F[y_1,\ldots,y_n]$ is the Quade ideal.

### `Example: Invar Field1 (ex-41006c)`

This example works with the invariant field of the finite group $C_3$ over the rational field.

```magma
> IF := InvariantField(CyclicGroup(3), RationalField());
> time L := FundamentalInvariants(IF);
Time: 1.780
> L;
[
    x1 + x2 + x3,
    (x1^2*x2 - 3*x1*x2*x3 + x1*x3^2 + x2^2*x3)/(x1^2 - x1*x2 - x1*x3 + x2^2 -
        x2*x3 + x3^2),
    (x1^3 - x1^2*x3 - x1*x2^2 + x2^3 - x2*x3^2 + x3^3)/(x1^2 - x1*x2 - x1*x3 +
        x2^2 - x2*x3 + x3^2)
]
> time DerksenIdeal(IF);
Ideal of Polynomial ring of rank 3 over Multivariate rational function field of
    rank 3 over Rational Field
Graded Reverse Lexicographical Order
Variables: y1, y2, y3
Dimension 0
Groebner basis:
[
    y2^2 + (-x1^3 + x1^2*x3 + x1*x2^2 - x2^3 + x2*x3^2 - x3^3)/(x1^2 - x1*x2 -
        x1*x3 + x2^2 - x2*x3 + x3^2)*y2 + (-x1^2*x2 + x1^2*x3 + x1*x2^2 -
        x1*x3^2 - x2^2*x3 + x2*x3^2)/(x1^2 - x1*x2 - x1*x3 + x2^2 - x2*x3 +
        x3^2)*y3 + (x1^3*x2 - x1^2*x2^2 - x1^2*x3^2 + x1*x3^3 + x2^3*x3 -
        x2^2*x3^2)/(x1^2 - x1*x2 - x1*x3 + x2^2 - x2*x3 + x3^2),
    y2*y3 + (-x1^2*x2 + 3*x1*x2*x3 - x1*x3^2 - x2^2*x3)/(x1^2 - x1*x2 - x1*x3 +
        x2^2 - x2*x3 + x3^2)*y2 + (-x1^2*x3 - x1*x2^2 + 3*x1*x2*x3 -
        x2*x3^2)/(x1^2 - x1*x2 - x1*x3 + x2^2 - x2*x3 + x3^2)*y3 + (x1^2*x2^2 -
        x1^2*x2*x3 + x1^2*x3^2 - x1*x2^2*x3 - x1*x2*x3^2 + x2^2*x3^2)/(x1^2 -
        x1*x2 - x1*x3 + x2^2 - x2*x3 + x3^2),
    y3^2 + (x1^2*x2 - x1^2*x3 - x1*x2^2 + x1*x3^2 + x2^2*x3 - x2*x3^2)/(x1^2 -
        x1*x2 - x1*x3 + x2^2 - x2*x3 + x3^2)*y2 + (-x1^3 + x1^2*x2 + x1*x3^2 -
        x2^3 + x2^2*x3 - x3^3)/(x1^2 - x1*x2 - x1*x3 + x2^2 - x2*x3 + x3^2)*y3 +
        (x1^3*x3 - x1^2*x2^2 - x1^2*x3^2 + x1*x2^3 - x2^2*x3^2 + x2*x3^3)/(x1^2
        - x1*x2 - x1*x3 + x2^2 - x2*x3 + x3^2),
    y1 + y2 + y3 - x1 - x2 - x3
]

```

### `Example: Invar Field2 (ex-27b1e3)`

We can compute with the invariant field of the non-reductive group presented above.

```magma
> K := RationalField();
> Pa<a,b> := PolynomialRing(K, 2);
> IG := ideal<Pa|>;
> A := Matrix(7,
> [1, 0, 0, 0, 0, 0, 0, a, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0,
> 0, 0, 0, 0, a, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0,
> a, 1, 0, 0, 0, 0, 0, b, 0, 1 ]);
> A;
[1 0 0 0 0 0 0]
[a 1 0 0 0 0 0]
[0 0 1 0 0 0 0]
[0 0 a 1 0 0 0]
[0 0 0 0 1 0 0]
[0 0 0 0 a 1 0]
[0 0 0 0 b 0 1]
> IF := InvariantField(IG, A);
> IF;
Invariant field of algebraic group
Field of definition: Rational Field
> time FundamentalInvariants(IF);
[
    x5,
    x3/x5,
    x1,
    (x1*x6 - x2*x5)/x5,
    (x3*x6 - x4*x5)/x5
]
Time: 0.010
> DerksenIdeal(IF);
Ideal of Polynomial ring of rank 7 over Multivariate rational function field of
    rank 7 over Rational Field
Graded Reverse Lexicographical Order
Variables: y1, y2, y3, y4, y5, y6, y7
Groebner basis:
[
    y1 - x1,
    y2 - x1/x5*y6 + (x1*x6 - x2*x5)/x5,
    y3 - x3,
    y4 - x3/x5*y6 + (x3*x6 - x4*x5)/x5,
    y5 - x5
]

```
