"Source: Text/Ring/Char.text";
"Line: 551";
"Date: Fri Sep 26 12:10:11 2025";
"Main: Fri Sep 26 14:29:19 2025";
// original file: Text/Ring/Char.text, line: 551
// Example: H43E3 ()
print "Example: H43E3";
ei := GetEchoInput();
SetEchoInput(true);
K := QuadraticField(-23);
I := 5*IntegerRing(K);
chi, SG := DirichletCharacter
          (I, <<K.1, Integers(8)!2>> : RequireGenerators := false);
chi(K.1);
(SG.1 * chi)(K.1);
data := <<K.1, Integers(8)!6>, <3+2*K.1,Integers(24)!8>>;
chi, SG := DirichletCharacter(I, data);
chi(K.1);
chi(3+2*K.1);
#SG; // this subgroup SG is trivial, as the data determine chi
assert $1 eq 1;
C<zeta8> := CyclotomicField(8);
data2 := <<K.1, zeta8^6>, <3+2*K.1,Integers(24)!8>>;
chi2 := DirichletCharacter(I, data2);
chi eq chi2;
assert $1;
_<x> := PolynomialRing(Integers());
K<s> := NumberField(x^3-x^2+7*x-6); // #ClassGroup(K) is 5
I := Factorization(11*IntegerRing(K))[2][1]; // norm 121
HG := HeckeCharacterGroup(I,[1]); // has 20 elements
f3 := Factorization(3*IntegerRing(K))[1][1]; // order 10
data := < <f3, Integers(10)!7> >;
psi := HeckeCharacter(HG, data : RequireGenerators := false);
psi(f3);
psi(f3) eq CyclotomicField(10).1^7;
assert $1;
'@'(f3,psi : Raw); // get Raw form of evaluation
assert $1 eq 14;
Parent($1);
f113 := Factorization(113*IntegerRing(K))[1][1]; // order 4
data2 := < <f113, Integers(4)!3> >;
psi := HeckeCharacter(HG, <data[1], data2[1]>);
psi(f113);
SetEchoInput(ei);
