"Source: Text/Algebra/AlgQuat.text";
"Line: 1187";
"Date: Thu Sep 25 14:47:46 2025";
"Main: Fri Sep 26 14:29:19 2025";
// original file: Text/Algebra/AlgQuat.text, line: 1187
// Example: H95E12 ()
print "Example: H95E12";
ei := GetEchoInput();
SetEchoInput(true);
QQ := Rationals();
for a,b in [1..8] do
  bl := HilbertSymbol(QQ ! a, QQ ! b,2 : Al := "Evaluate") 
               eq NormResidueSymbol(a,b,2);
  print <a,b,bl>;
  if not bl then
    break a;
  end if;
end for;
P<x> := PolynomialRing(Rationals());
F<b> := NumberField(x^3-3*x-1);
Z_F := MaximalOrder(F);
A := QuaternionAlgebra<F | -3,b>;
symbols := [];
for p in [p : p in [2..100] | IsPrime(p)] do
  pps := Decomposition(Z_F,p);
  for pp in pps do
    Append(~symbols,HilbertSymbol(A,pp[1]));
  end for; 
end for;
symbols;
for c in [2,-2,6,-6,-1,3,-3] do
  K<s> := NumberField(x^2-c);
  Z_K := MaximalOrder(K);
  Z_Kmod8, f8 := quo<Z_K | 8>;
  PPK<xK> := PolynomialRing(K);
  for i := 1 to 10 do
    S := [x+y*Z_K.2 : x,y in [0..7] | x*y ne 0];
    a := Random(S);
    b := Random(S);
    A := QuaternionAlgebra<K | a,b>;
    for pp in Decomposition(Z_K,2) do
      hsym := HilbertSymbol(A,pp[1]);
      if not IsIrreducible(xK^2-a) then
        print <c, a, b, hsym eq 1>;
        if hsym ne 1 then
          break c;
        end if;
      else
        lclsym := IsLocalNorm(AbelianExtension(ext<K | xK^2-a>),Z_K ! b,pp[1]);
        bl := (hsym eq 1) eq lclsym;
        print <c, a, b, bl>;
        if not bl then
          break c;
        end if;
      end if;
    end for;
  end for;
end for;
SetEchoInput(ei);
