"Source: Text/Ring/RngLoc.text";
"Line: 3122";
"Date: Fri Sep 26 14:29:19 2025";
"Main: Fri Sep 26 14:29:19 2025";
// original file: Text/Ring/RngLoc.text, line: 3122
// Example: H49E19 ()
print "Example: H49E19";
ei := GetEchoInput();
SetEchoInput(true);
SetSeed(1);
Z3 := pAdicRing(3, 30);
R<y> := PolynomialRing(Z3);
pi := UniformizingElement(Z3);
roots := [ pi^Random([0..3]) * Random(Z3) : i in [1..10] ];
[ Valuation(r) : r in roots ];
g := &* [ y - r : r in roots ];
N := NewtonPolygon(g);
N;
F := Faces(N);
F;
[GradientVector(F[i]) : i in [1 .. #F]];
[$1[i][1]/$1[i][2] : i in [1 ..#$1]];
[EndVertices(F[i]) : i in [1 .. #F]];
[$1[i][2][1] - $1[i][1][1] : i in [1 .. #$1]];
ValuationsOfRoots(g);
SetEchoInput(ei);
