"Source: Text/Ring/RngSlope.text";
"Line: 803";
"Date: Fri Sep 26 12:10:11 2025";
"Main: Fri Sep 26 14:29:19 2025";
// original file: Text/Ring/RngSlope.text, line: 803
// Example: H57E4 ()
print "Example: H57E4";
ei := GetEchoInput();
SetEchoInput(true);
S<u> := SuRing (pAdicField (5, 15), 2/3); // slope 2/3
M := SuMatrix (2, 3, [ S | 5^2/u,0,u^2, u,5*u^2,5^3/u^2 ]);
E, T := EchelonForm (M : Transform); assert E eq T*M;
LeadingTerms (E);
WeierstrassTerms (E); // not the same, in lower right
A := [S | 25/u,u,u^2/5,0,0, 0,0,25,125/u^2,50*u, 0,0,0,0,5*u^2];
M := SuMatrix (3, 5, A);
H, T := HermiteForm (M : Transform); assert H eq T*M;
W := WeierstrassTerms(H); W;
assert CanonicalElement (S, 4/3) eq S!W[1,1];
assert CanonicalElement (S, 2) eq S!W[2,3];
assert CanonicalElement (S, 7/3) eq S!W[3,5];
X, P, Q := SmithForm (M : Transform); assert X eq P*M*Q;
WeierstrassTerms(X);
SetEchoInput(ei);
