proposition: Lemma enum_compnE n : n != 0 -> enum_compn n = flatten [seq [seq i :: p | p <- enum_compn (n - i) ] | i <- iota 1 n].
proof: Proof. rewrite -(enum_compn_any (leqnSn n)) /= => /negbTE ->. congr flatten; apply eq_in_map => i. rewrite mem_iota add1n ltnS => /andP[Hi _]. congr map; apply enum_compn_any. by rewrite leq_subLR; apply: leq_addl. Qed.
imports: HB(structures) mathcomp(all_ssreflect) tools combclass sorted partition subseq ordtype