Definition unify_list
  (s : list (variable * value)) (lv : list value) (lp : list pattern) :
  option (variable -> value) :=
  option_map (assoc_default (variable_beq variable_eq_dec) value_default) (unify_list_aux s lv lp).

Lemma unify_list_sound : forall (lp : list pattern) (lv : list value) (s : variable -> value), unify_list [] lv lp = Some s -> map (psubst s) lp = lv.