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_cons_eq_unify_list : forall s s' c lv c' lp', unify s (c_capply c lv) (p_capply c' lp') = Some s' -> c = c' /\ unify_list_aux s lv lp' = Some s'.