Section MinPoly.
Variables (F : fieldType) (n' : nat).
Local Notation n := n'.+1.
Variable A : 'M[F]_n.
Implicit Types p q : {poly F}.
Fact degree_mxminpoly_proof : exists d, \rank (powers_mx A d.+1) <= d.

(* Specifications: *)
Lemma minpoly_mx1 : (1%:M \in Ad)%MS.
Lemma minpoly_mx_free : row_free Ad.
Lemma horner_mx_mem p : (horner_mx A p \in Ad)%MS.
Definition mx_inv_horner B := rVpoly (mxvec B *m pinvmx Ad).
Lemma mx_inv_horner0 :  mx_inv_horner 0 = 0.
Lemma minpoly_mx_ring : mxring Ad.
Definition mxminpoly := 'X^d - mx_inv_horner (A ^+ d).