Proof with try solve[simpl; auto|congruence].
apply main_ind.
intros. inversion H0. intros...
intros; inversion H0; subst; clear H0.
assert (H3 : listd clause_denote inter TT l' s).
unfold l'. apply listd_filter_pred. autounfold with DEBUG_UNFOLD.
apply listd_partition_pred with (f := clause_denote) (s0 := s) in e1...
destruct e1. apply listd_map_pred with (f := clause_denote)...
intros; apply simplify_sound...
unfold us'; apply cclose_sound...
apply partial_mod_sound1 with (s:=s) in e2...
unfold clause_list2set; apply setd_fold_left... 2: apply setd_empty_set.
solve[intros; apply setd_add; auto].
intros. apply H...
autounfold with DEBUG_UNFOLD.
rewrite (@listd_sort_inter _ state).
assert (H3 : listd clause_denote inter TT l' s).
unfold l'. apply listd_filter_pred. autounfold with DEBUG_UNFOLD.
apply listd_partition_pred with (f := clause_denote) (s0 := s) in e1...
destruct e1. apply listd_map_pred with (f := clause_denote)...
intros; apply simplify_sound...
unfold us'; apply cclose_sound...
rewrite listd_app, (@listd_unfold_inter _ state); split...
apply infer_list_sound...
apply partial_mod_sound2 with (R:=nil)(R':=R0)(acc:=nil)(l:=l')(ce:=cty)...
Qed.

(* Specifications: *)
Lemma empty_clause_False c s :
is_empty_clause c = true -> ~(clause_denote c s).