proposition: Lemma mxval_genV : {morph mxval : x / genV x >-> invmx x}.
proof: Proof. move=> x; rewrite /mxval [pval _]poly_rV_K ?size_poly ?mx_inv_hornerK //. pose m B : 'M[F]_(n * n) := lin_mx (mulmxr B); set B := mxval x. case uB: (B \is a GRing.unit); last by rewrite invr_out ?uB ?horner_mx_mem. have defAd: Ad = Ad *m m B *m m B^-1. apply/row_matrixP=> i. by rewrite !row_mul mul_rV_lin /= mx_rV_lin /= mulmxK ?vec_mxK. rewrite -[B^-1]mul1mx -(mul_vec_lin (mulmxr B^-1)) defAd submxMr //. rewrite -mxval_gen1 (submx_trans (horner_mx_mem _ _)) // {1}defAd. rewrite -(geq_leqif (mxrank_leqif_sup _)) ?mxrankM_maxl // -{}defAd. apply/row_subP=> i; rewrite row_mul rowK mul_vec_lin /= -{2}[A]horner_mx_X. by rewrite -rmorphXn mulmxE -rmorphM horner_mx_mem. Qed.
imports: HB(structures) mathcomp(ssreflect ssrbool ssrfun eqtype ssrnat seq path) mathcomp(div choice fintype tuple finfun bigop prime) mathcomp(ssralg poly polydiv finset fingroup morphism) mathcomp(perm automorphism quotient finalg action zmodp) mathcomp(commutator cyclic center pgroup matrix mxalgebra) mathcomp(mxpoly)