Module Clausify := Clausify_Sound VSM. Import Clausify.
Proof with simpl; auto; try solve[congruence].
intros H1 H2 H3.
remember (spatial_resolution c1 c2) as l.
case_eq (M.is_empty l); intros.
rewrite M.is_empty_spec in H.
rewrite (@setd_base_separate state); auto.
split; auto.
unfold setd.
rewrite empty_set_elems' in H. rewrite H. simpl; auto.
assert (exists c, l = M.singleton c).
subst l.
rewrite is_empty_spec' in H.
clear - H.
destruct c1; simpl in *; try (contradiction H; apply M.empty_spec).
destruct c2; simpl in *; try (contradiction H; apply M.empty_spec).
if_tac in H;simpl in *; try (contradiction H; apply M.empty_spec).
econstructor; eauto.
destruct H0 as [c ?].
subst l.
rewrite H0.
clear H.
eapply spatial_resolution_sound in H0; eauto.
unfold setd.
rewrite elements_singleton; simpl; split; auto.
Qed.
Definition Rule_U1 (nc pc : clause) :=
match nc , pc with
PosSpaceClause Gamma Delta ((Next x z)::Sigma) ,
NegSpaceClause Gamma' (Lseg x' z'::Sigma') Delta' =>
match expr_cmp x x', expr_cmp z z' with
Eq, Eq => Some (NegSpaceClause Gamma' (Next x' z'::Sigma')
(Eqv x z :: Delta'))
| _, _ => None
end
| _ , _ => None
end.

Lemma U1_sound': forall nc pc c s,
clause_denote pc s ->
Rule_U1 nc pc = Some c ->
clause_denote c s.