"Source: Text/Ring/RngLoc.text";
"Line: 3198";
"Date: Fri Sep 26 14:29:19 2025";
"Main: Fri Sep 26 14:29:19 2025";
// original file: Text/Ring/RngLoc.text, line: 3198
// Example: H49E20 ()
print "Example: H49E20";
ei := GetEchoInput();
SetEchoInput(true);
Zx<x> := PolynomialRing(Integers());
L1<a> := ext<pAdicRing(3, 20) | 2>;
L2<b> := ext<L1 | x^2 + 3*x + 3>;
R<y> := PolynomialRing(L2);
c := (a+b)^42;
r := L2 ! Sqrt(ResidueClassField(L2) ! c);
r;
rr := HenselLift(y^2-c, r);
rr;
Valuation(rr^2 - c);
assert $1 eq 40;
ChangePrecision(rr, 1);
Zx<x> := PolynomialRing(Integers());
L1<a> := ext<pAdicRing(2, 20) | 2>;
L2<b> := ext<L1 | x^2 + 2*x + 2>;
R<y> := PolynomialRing(L2);
c := (a+b)^42;
r := L2 ! Sqrt(ResidueClassField(L2) ! c);
r;
assert $1 eq 1;
for d in GF(2,2) do
    if Valuation((r + b*L2!d)^2 - c) gt 4 then
        print L2!d;
    end if;
end for;
r +:= b * (a+1);
HenselLift( y^2-c, r );
ChangePrecision($1, 1);
ChangePrecision($2, 2);
SetEchoInput(ei);
