Local Notation "'un'" := (@orp _).

(* Specifications: *)
Lemma pure_atomd_pure atm s0 s : pure_atom_denote atm s0 -> join_sub s0 s -> pure_atom_denote atm s.
Lemma listd_pure_atomdi atms s0 s : listd pure_atom_denote inter TT atms s0 -> join_sub s0 s -> listd pure_atom_denote inter TT atms s.
Lemma listd_pure_atomdu atms s0 s : listd pure_atom_denote un FF atms s0 -> join_sub s0 s -> listd pure_atom_denote un FF atms s.
Lemma listd_pure_atomd_purei atms s0 s : listd (fun atms : list pure_atom => listd pure_atom_denote inter TT atms) inter TT atms s0 -> join_sub s0 s -> listd (fun atms : list pure_atom => listd pure_atom_denote inter TT atms) inter TT atms s.
Lemma listd_pure_atomd_pureu atms s0 s : listd (fun atms : list pure_atom => listd pure_atom_denote un FF atms) inter TT atms s0 -> join_sub s0 s -> listd (fun atms : list pure_atom => listd pure_atom_denote un FF atms) inter TT atms s.
Lemma do_well1_2_sound sigma s : space_denote sigma s -> listd (fun atms => listd pure_atom_denote un FF atms) inter TT (do_well1_2 sigma) s.
Lemma do_well3_sound sigma s : space_denote sigma s -> listd (fun atms => listd pure_atom_denote un FF atms) inter TT (do_well3 sigma) s.
Lemma nl_lseg_in_sound x y sigma s1 s2 s : space_atom_denote (Next (Var x) y) s1 -> space_denote sigma s2 -> join s1 s2 s -> listd pure_atom_denote inter TT (lseg_in_dom_atoms x sigma) s.
Lemma ll_spooky x y z s1 s2 s1' s2' s : lseg (env_get (stk s1) x) (expr_denote y s1) (hp s1) -> lseg (env_get (stk s1') x) (expr_denote z s1') (hp s1') -> join_sub s1 s2 -> join_sub s1' s2' -> join s2 s2' s -> (pure_atom_denote (Eqv (Var x) y) || pure_atom_denote (Eqv (Var x) z))%pred s.
Lemma do_well4_5_sound sigma s : space_denote sigma s -> listd (fun atms => listd pure_atom_denote un FF atms) inter TT (do_well4_5 sigma) s.
Lemma do_well_sound sigma s : space_denote sigma s -> listd (fun atms => listd pure_atom_denote un FF atms) inter TT (do_well sigma) s.
Lemma factor_hyp_lem gamma delta l s : (listd pure_atom_denote inter TT gamma s -> listd (fun atms s => listd pure_atom_denote un FF (atms ++ delta) s) inter TT l s) -> listd (fun (atms : list pure_atom) (s' : state) => listd pure_atom_denote inter TT gamma s' -> listd pure_atom_denote un FF (atms ++ delta) s') inter TT l s.
Lemma factor_hyp_lem_aux delta l s : (listd (listd pure_atom_denote un FF) inter TT l || listd pure_atom_denote un FF delta)%pred s -> listd (fun atms s' => listd pure_atom_denote un FF (atms ++ delta) s') inter TT l s.