proposition: Lemma size_m2s n (m : 'X_{1..n}): size (m2s m) = mdeg m.
proof: Proof. rewrite /m2s size_flatten /shape -map_comp /=. rewrite (eq_map (_ : _ =1 m)); first by rewrite mdegE sumnE !big_map. by move=> i /=; rewrite size_nseq. Qed.
imports: HB(structures) mathcomp(ssreflect ssrfun ssrbool eqtype ssrnat seq path) mathcomp(choice fintype tuple finfun bigop finset binomial) mathcomp(order fingroup perm ssralg zmodp poly ssrint) mathcomp(matrix vector) mathcomp(bigenough) ssrcomplements freeg