End CLAUSIFY_SOUND.
Module Clausify_Sound (VSM : VERISTAR_MODEL) : CLAUSIFY_SOUND
with Module VSM := VSM.
Module VSM := VSM.
Module SPredLems := SPredLemmas VSM. Import SPredLems.

(* Specifications: *)
Lemma clausify_single_purepos : forall purea,
listd pure_atom_denote (@andp state) TT (purea :: nil) =
clause_denote (mkPureClause nil (order_eqv_pure_atom purea :: nil)).
Lemma clausify_single_pureneg : forall purea,
list_denote (neg oo pure_atom_denote) (@andp state) TT (purea :: nil) =
clause_denote (mkPureClause (order_eqv_pure_atom purea :: nil) nil).
Lemma clausify_purepos : forall l : list pure_atom,
list_denote pure_atom_denote (@andp state) TT l =
list_denote clause_denote (@andp state) TT
(map (fun a => mkPureClause nil (order_eqv_pure_atom a::nil)) l).
Lemma clausify_pureposP : forall (l : list pure_atom) P,
list_denote pure_atom_denote (@andp state) P l =
list_denote clause_denote (@andp state) P
(map (fun a => mkPureClause nil (order_eqv_pure_atom a::nil)) l).
Lemma clausify_pureneg : forall l : list pure_atom,
list_denote (neg oo pure_atom_denote) (@andp state) TT l =
list_denote clause_denote (@andp state) TT
(map (fun a => mkPureClause (order_eqv_pure_atom a::nil) nil) l).
Lemma clausify_space : forall l : list space_atom,
space_denote l = clause_denote (PosSpaceClause nil nil l).
Lemma pure_atom_list_neg2 : forall (l: list pure_atom) s,
(~(list_denote pure_atom_denote (@orp state) FF l s)) =
list_denote (neg oo pure_atom_denote) (@andp state) TT l s.
Lemma mk_pureR_denote1: forall pnatoms purepos pureneg P s,
mk_pureR pnatoms = (purepos, pureneg) ->
listd pn_atom_denote inter P pnatoms s ->
(listd pure_atom_denote inter P purepos s /\
~listd pure_atom_denote (@orp state) FF pureneg s).
Lemma mk_pureR_denote2: forall pnatoms purepos pureneg P s,
mk_pureR pnatoms = (purepos, pureneg) ->
listd pure_atom_denote inter P purepos s ->
~ listd pure_atom_denote (@orp state) FF pureneg s ->
listd pn_atom_denote inter P pnatoms s.
Lemma mk_pureR_denote: forall pnatoms purepos pureneg P s,
mk_pureR pnatoms = (purepos, pureneg) ->
listd pn_atom_denote inter P pnatoms s =
(listd pure_atom_denote inter P purepos s /\
~listd pure_atom_denote (@orp state) FF pureneg s).
Lemma mk_pureR_denote3: forall pnatoms purepos pureneg P s,
mk_pureR pnatoms = (purepos, pureneg) ->
listd pure_atom_denote inter P purepos s ->
~ listd pn_atom_denote inter P pnatoms s ->
listd pure_atom_denote (@orp state) FF pureneg s.
Lemma clausify_succ : forall pnatoms (purepos pureneg : list pure_atom)
(space : list space_atom) (s : state)
(Hyp: mk_pureR pnatoms = (purepos, pureneg)),
(~assertion_denote (Assertion pnatoms space) s) =
(clause_denote (NegSpaceClause purepos space pureneg) s).
Lemma clausify_succClassic : forall pnatoms (purepos pureneg : list pure_atom)
(space : list space_atom) (s : state)
(Hyp: mk_pureR pnatoms = (purepos, pureneg)),
(assertion_denote (Assertion pnatoms space) s) =
(~clause_denote (NegSpaceClause purepos space pureneg) s).
Lemma mk_pureL_denote: forall a s,
clause_denote (mk_pureL a) s -> pn_atom_denote a s.
Lemma mk_pureL_denoteInv: forall a s,
pn_atom_denote a s -> clause_denote (mk_pureL a) s.
Lemma mk_pureL_denoteEq: forall a,
pn_atom_denote a = clause_denote (mk_pureL a).
Lemma mk_pureL_clause_denote: forall pi P s,
listd clause_denote inter P (map mk_pureL pi) s ->
listd pn_atom_denote inter P pi s.
Lemma mk_pureL_clause_denoteInv: forall pi P s,
listd pn_atom_denote inter P pi s ->
listd clause_denote inter P (map mk_pureL pi) s.
Lemma mk_pureL_clause_denoteEq:forall pi P,
listd pn_atom_denote inter P pi =
listd clause_denote inter P (map mk_pureL pi).
Lemma listd_pure_atoms_heap_expand atms :
listd pure_atom_denote inter emp atms |--
listd pure_atom_denote inter TT atms.