"Source: Text/Algebra/AlgMat.text";
"Line: 2249";
"Date: Thu Sep 25 14:47:46 2025";
"Main: Fri Sep 26 14:29:19 2025";
// original file: Text/Algebra/AlgMat.text, line: 2249
// Example: H92E8 ()
print "Example: H92E8";
ei := GetEchoInput();
SetEchoInput(true);
K := GF(5);
P<x> := PolynomialRing(K);    
A := MatrixAlgebra(K, 5);
a := A !
[
    0, 2, 4, 2, 0,
    2, 2, 2, 3, 3,
    3, 4, 4, 1, 3,
    0, 0, 0, 0, 1,
    0, 0, 0, 1, 0
];
a;
PrimaryInvariantFactors(a);
r, t, f := RationalForm(a);
r;
t;
f;
PA := MatrixAlgebra(P, 5);
ax := PA ! x - PA ! a;
ax;
SmithForm(ax);
ElementaryDivisors(ax);
SetEchoInput(ei);
