"Source: Text/Commut/RngInvar.text";
"Line: 1925";
"Date: Thu Sep 25 14:47:46 2025";
"Main: Fri Sep 26 14:29:19 2025";
// original file: Text/Commut/RngInvar.text, line: 1925
// Example: H120E17 ()
print "Example: H120E17";
ei := GetEchoInput();
SetEchoInput(true);
// Create group G and subgroup H of G and invariant rings
// RG and RH of G and H respectively.
G := CyclicGroup(4);
H := sub<G|G.1^2>;
RG := InvariantRing(G, GF(2));
RH := InvariantRing(H, GF(2));
// Create Hilbert Series S of RG and set it in RG.
F<t> := FunctionField(IntegerRing());
S := (t^3 + t^2 - t + 1)/(t^8 - 2*t^7 + 2*t^5 - 2*t^4 +
    2*t^3 - 2*t + 1);
RG`HilbertSeries := S;
// Note RG has no primary invariants yet so let Magma compute them as PG.
PG := PrimaryInvariants(RG);
PG;
// Set primary invariants of RH to PG and compute secondary
// invariants of RH with respect to PG.
RH`PrimaryInvariants := PG;
SecondaryInvariants(RH);
SetEchoInput(ei);
