proposition: Lemma qlogp_qX (p : qT) : p != 0 -> 'qX ^+ (qlogp p) = p.
proof: Proof. move=> p_neq0. have Up : p \in GRing.unit by rewrite unitfE. pose gp : {unit qT}:= FinRing.unit _ Up. have /cyclePmin[i iLc iX] : gp \in <[gX]>%g by rewrite gX_all inE. rewrite gX_order in iLc. rewrite /qlogp; case: pickP => [j /eqP//|/(_ (Ordinal iLc))] /eqP[]. by have /val_eqP/eqP/= := iX; rewrite FinRing.val_unitX. Qed.
imports: HB(structures) mathcomp(ssreflect ssrfun ssrbool eqtype ssrnat seq choice fintype tuple) mathcomp(div bigop binomial finset finfun ssralg countalg finalg) mathcomp(poly polydiv qpoly perm fingroup falgebra fieldext finfield galois) mathcomp(finalg zmodp matrix vector)