proposition: Lemma count_allpairs : count c (allpairs f en em) = (count a en * count b em)%nat.
proof: Proof. elim: en => [|? ? IH] //=; by rewrite count_cat IH mulnDl count_map_muln. Qed.
imports: mathcomp(all_ssreflect ssralg fingroup zmodp poly ssrnum) mathcomp(matrix perm) ssr_ext ssralg_ext fdist