(* extract a value from a distribution arbitrarily, in this case taking the first elt of the underlying list *)
Definition peek {X} (d : dist X) : X :=
match d with
| {| dist_pmf := dist; dist_law := law |} =>
match dist as l return ((sum_dist l == 1)%Q -> X) with
| [] => fun law =>
match zero_one_neq law with end
| (x,_) :: _ => fun _ => x
end law
end.
(* WARNING: distribution should contain non-zero weighted support *)
Definition dist_lift {X} (P : X -> Prop) (d : dist X) : Prop.

Lemma dist_true {X} (d : dist X) : dist_lift (fun _ => True) d.