"Source: Text/Ring/RngSlope.text";
"Line: 773";
"Date: Fri Sep 26 12:10:11 2025";
"Main: Fri Sep 26 14:29:19 2025";
// original file: Text/Ring/RngSlope.text, line: 773
// Example: H57E3 ()
print "Example: H57E3";
ei := GetEchoInput();
SetEchoInput(true);
S<u> := SpRing (pAdicField (3, 20), 1/2); // slope 1/2
M := SpMatrix (2, 3, [ S | u^2/3,u/3^2,0, u^3,3^2*u,3*u ]);
E, T := EchelonForm (M : Transform); assert E eq T*M;
LeadingTerms (E);
WeierstrassTerms (E); // not the same
S<u> := SpRing (pAdicField (5, 10), 3/2); // slope 3/2
M := SpMatrix (3,5,[S|5^3,u,u^2/5,0,0, 0,0,25,u^3/25,3*5, 0,0,0,0,5^2]);
H, T := HermiteForm (M : Transform); assert H eq T*M;
WeierstrassTerms(H);
X, P, Q := SmithForm (M : Transform); assert P*M*Q eq X;
WeierstrassTerms(X); // note that 5^3 divides 5^2 in this ring!
SetEchoInput(ei);
