Definition Rule_U2 (nc pc : clause) :=
match nc , pc with
PosSpaceClause Gamma Delta ((Next x y)::Sigma) ,
NegSpaceClause Gamma' (Lseg x' z::Sigma') Delta' =>
match expr_cmp x x' with
Eq => Some (NegSpaceClause Gamma' (Next x y::Lseg y z::Sigma')
(Eqv x z :: Delta'))
|_ => None
end
| _ , _ => None
end.

(* Specifications: *)
(*The axiom schema for U2 from Figure 2, used as an auxiliary lemma for the proof of U2*)
Lemma U2_axiomSchema: forall x y z Sigma s,
space_denote (Next x y::Lseg y z::Sigma) s ->
pure_atom_denote (Eqv x z) s \/ space_denote (Lseg x z::Sigma) s.
Lemma U2_sound: forall nc pc c s,
clause_denote nc s -> clause_denote pc s ->
Rule_U2 nc pc = Some c ->
clause_denote c s.
Lemma U2_sound': forall nc pc c s,
clause_denote pc s ->
Rule_U2 nc pc = Some c ->
clause_denote c s.
Lemma unfolding2'_sound: forall  sigma2 sigma0 sigma1 p sig2' s,
In (p,sig2') (unfolding2' sigma0 sigma1 sigma2) ->
space_denote sig2' s ->
(pure_atom_denote p s \/ space_denote (sigma0++sigma2) s).
Lemma unfolding2_sound: forall sc1 sc2,
forall s, clause_denote sc2 s ->
listd clause_denote inter TT (unfolding2 sc1 sc2) s.