"Source: Text/Ring/RngOrdGal.text";
"Line: 307";
"Date: Fri Sep 26 12:10:11 2025";
"Main: Fri Sep 26 14:29:19 2025";
// original file: Text/Ring/RngOrdGal.text, line: 307
// Example: H40E2 ()
print "Example: H40E2";
ei := GetEchoInput();
SetEchoInput(true);
o := MaximalOrder(ext<Rationals()|>.1^4-3);
os := MaximalOrder(SplittingField(NumberField(o)));
P := Decomposition(os, 2)[1][1];
G, M := RayClassGroup(P^3);
G;
A := AbelianExtension(M);
O := MaximalOrder(EquationOrder(A));
Oa := AbsoluteOrder(O);
Ka := NumberField(Oa);
Gal, _, Map := AutomorphismGroup(Ka);
Gal;
P2 := Decomposition(Oa, 2)[1][1];
P3 := Decomposition(Oa, 3)[1][1];
s := 0; i := 0;
repeat
  G := RamificationGroup(P2, i);
  s +:= #G-1;
  print i, "-th ramification group is of order ", #G;
  i +:= 1;
until #G eq 1;
s;
assert $1 eq 18;
Valuation(Different(Oa), P2);
assert $1 eq 18;
K2 := InertiaField(P2);
M2 := MaximalOrder(K2);
K2r := RelativeField(K2, Ka);
M2r := MaximalOrder(K2r);
p2 := M2 meet (MaximalOrder(K2r)!!P2);
IsInert(p2); 
assert $1;
IsTotallyRamified(M2r!!P2);
assert $1;
D3 := DecompositionField(P3);
D3M := MaximalOrder(D3);
IsTotallySplit(3, D3M);   
assert $1;
I3 := InertiaField(P3);
I3;
Discriminant($1);
I3M := MaximalOrder(EquationOrder(I3):
Discriminant := Discriminant(Oa));
I3M := MaximalOrder(I3);
IsSubfield(D3, I3);
I3r := RelativeField(D3, I3);
I3rM := MaximalOrder(I3r);
K3r := RelativeField(D3, Ka);
K3rM := MaximalOrder(K3r);
IsInert(K3rM!!P3 meet D3M, I3rM);
assert $1;
K3r := RelativeField(I3, Ka);
K3rM := MaximalOrder(K3r);
IsTotallyRamified(K3rM!!P3 meet I3M, K3rM);
assert $1;
L := SubgroupLattice(Gal);
[ IsNormal(Gal, L[x]) : x in [1..#L]];
U := L[5];
k := FixedField(Ka, U);
kM := MaximalOrder(EquationOrder(k) :
                   Discriminant := Discriminant(Oa));
kM := MaximalOrder(k);
Kr := RelativeField(k, Ka);
KrM := MaximalOrder(Kr);
P43 := Decomposition(Oa, 43)[1][1];
V := DecompositionGroup(P43);
f, I := CosetAction(Gal, U);
orbs := Orbits(f(V));
reps := [];
for o in orbs do 
  _, x := IsConjugate(I, 1, Rep(o));
  Append(~reps, x @@ f); 
end for;
reps;
#reps;
L := [ ];
for i in reps do
  Append(~L, kM meet KrM !! Map(i)(P43));
end for;
[ IsPrime(x) : x in L];
LL := Decomposition(kM, 43);#LL;
[ Position(L, x[1]) : x in LL];
SetEchoInput(ei);
