Fixpoint constm_list {A : Type} {M : Type -> Type} `{Monad M} (xM : M A) (n : nat) : M (list A) :=
match n with
| O => mreturn (@nil A)
| S n' =>
x <- xM ;;
xs <- constm_list xM n' ;;
mreturn (cons x xs)
end.

(* Specifications: *)
Lemma constm_list_length {A} {M} `{PredLift M} (m : M A) n :
plift (fun _ => True) m ->
plift (fun p => length p = n) (constm_list m n).