"Source: Text/Ring/RngSlope.text";
"Line: 342";
"Date: Fri Sep 26 12:10:11 2025";
"Main: Fri Sep 26 14:29:19 2025";
// original file: Text/Ring/RngSlope.text, line: 342
// Example: H57E1 ()
print "Example: H57E1";
ei := GetEchoInput();
SetEchoInput(true);
S<u> := SnuRing (pAdicField (5, 15), 1); // slope 1 over 5-adics
assert Slope(S) eq 1;
f := 5*u + u^2 + 2*u^3 + u^5 + O(u^10);
g := u^4/25 + u^6 + u^8 + O(u^10);
GaussValuation (f); // both have Gauss valuation 2
assert $1 eq 2;
GaussValuation (g); // both have Gauss valuation 2
assert $1 eq 2;
q := g/f; q; // g has degree 4, so this division works
LeadingTerm (q); // returned as a power series ring element
Sp<uu> := SpRing (pAdicField (5, 15), 1/2); // slope 1/2 over 5-adics
assert Slope(Sp) eq 1/2;
ff := 1/5 + uu + 5*uu^2 + O(uu^10);
GaussValuation (ff);
assert $1 eq -1;
gg := uu + 5^2*uu^2 + uu^3 - uu^6 + uu^9 + O(uu^10);
h := S ! (ff * S!gg); // coerced back to the Snu-ring
assert IsDistinguished (h);
LeadingTerm (ff) * LeadingTerm (gg) eq LeadingTerm (h);
assert $1;
Su<z> := SuRing (pAdicField (7, 25), 2/3); // slope 2/3 over 7-adics
F := 7/z + 3*7 + z^2/7 + 7^2*z^3 + O(z^10);
GaussValuation (F);
WeierstrassTerm (F);
SR<t> := SnuRing (Su);
t*z/7; // automatic coercion into Su
SetEchoInput(ei);
