Definition all_hom1 n l := fold_left (fun c x => c && hom n 1 x) l true.

(* Specifications: *)
Lemma all_hom1_cor n l : if all_hom1 n l then forall i, In i l -> hom n 1 i else exists i, In i l /\ ~ hom n 1 i.
Lemma decompose_cor n v : match decompose n v with | None => ~ is_decomposable n v | Some l => decomposable n l v end.