Module VSM := VSM.

(* Specifications: *)
Lemma order_eqv_sound a : pure_atom_denote a = pure_atom_denote (order_eqv_pure_atom a).
Lemma list_denote_intersection_filter_nonreflex (B: spred) (l: list pure_atom) : listd pure_atom_denote inter B l = listd pure_atom_denote inter B (filter nonreflex_atom l).
Lemma list_denote_normalize_pure_atoms : forall Q (B:spred) (l:list pure_atom) (Qassoc: forall x y z , Q x (Q y z) = Q (Q x y) z) (Qsymm: forall x y, Q x y = Q y x) (Hcmp: forall x y, Eq = pure_atom_cmp x y -> (forall P, Q (pure_atom_denote x) (Q (pure_atom_denote y) P) = Q (pure_atom_denote y) P)), list_denote pure_atom_denote Q B l = list_denote pure_atom_denote Q B (normalize_atoms l).
Lemma list_denote_intersection_normalize_pure_atoms B l : list_denote pure_atom_denote inter B l = list_denote pure_atom_denote inter B (normalize_atoms l).
Lemma list_denote_union_normalize_pure_atoms B l : list_denote pure_atom_denote un B l = list_denote pure_atom_denote un B (normalize_atoms l).
Lemma list_denote_normalize_filter_nonreflex_atom B l : list_denote pure_atom_denote inter B (normalize_atoms (filter nonreflex_atom l)) = list_denote pure_atom_denote inter B l.
Lemma order_eqv_clause_sound c s : clause_denote (order_eqv_clause c) s <-> clause_denote c s.
Lemma clause_setd_listd l b s : listd clause_denote inter b l s -> setd clause_denote inter b (clause_list2set l) s.
Lemma rev_cmp_eq {A:Type} (f : A -> A -> comparison) (a1 a2 : A) : Eq = rev_cmp f a1 a2 -> rev_cmp f a1 a2 = f a1 a2.
Lemma in_insert_uniq c c' l : In c (insert_uniq (rev_cmp compare_clause) c' l) -> c' = c \/ In c l.
Lemma compare_clause_refl d : Eq = rev_cmp compare_clause d d.
Lemma in_sort_uniq c l : In c (rsort_uniq (rev_cmp compare_clause) l) -> In c l.
Lemma positive_base_case: forall n, 0 = nat_of_P n - 1 -> n=1%positive.
Lemma normalize1_3_sound pc sc s : clause_denote pc s -> clause_denote sc s -> clause_denote (normalize1_3 pc sc) s.
Lemma empty_state (s : state) : exists s0, emp s0 /\ join s0 s s.
Lemma lseg_nilnil sigma s : space_denote sigma s = (space_atom_denote (Lseg Nil Nil) * space_denote sigma)%pred s.
Lemma lseg_vv sigma v s : space_denote sigma s = (space_atom_denote (Lseg (Var v) (Var v)) * space_denote sigma)%pred s.
Lemma drop_reflex_lseg_sound sigma s : space_denote sigma s = space_denote (drop_reflex_lseg sigma) s.
Lemma normalize2_4_sound sc s : clause_denote sc s -> clause_denote (normalize2_4 sc) s.
Lemma norm_sound sigma sc s : clause_denote sc s -> setd clause_denote (@andp _) TT sigma s -> clause_denote (norm sigma sc) s.
Lemma andpN : x && TT = x.
Lemma andpS : x && y = y && x.
Lemma andpA : x && (y && z) = (x && y) && z.
Lemma orpN : x || FF = x.
Lemma orpS : x || y = y || x.
Lemma orpA : x || (y || z) = (x || y) || z.
Lemma sepconS : sepcon x y = sepcon y x.
Lemma sepconA : x * (y * z) = (x * y) * z.
Lemma emp_sep_emp h h1 h2 : join h h1 h2 -> emp h -> emp h1 -> emp h2.
Lemma space_denote_permute l l' : Permutation l l' -> space_denote l = space_denote l'.
Lemma space_insert sa l : space_denote (insert (rev_cmp compare_space_atom) sa l) = space_denote (sa :: l).
Lemma eq_space_atomlist_sound (al bl : list space_atom) : true = eq_space_atomlist al bl -> space_denote al = space_denote bl.
Lemma expr_eq_eq' : forall e1 e2, true = expr_eq e1 e2 -> e1=e2.
Lemma pure_atom_denote_order_eqv_pure_atom : forall a, pure_atom_denote a = pure_atom_denote (order_eqv_pure_atom a).
Lemma list_denote_normalize_pure_atoms: forall Q (B:spred) (l:list pure_atom) (Qassoc: forall x y z , Q x (Q y z) = Q (Q x y) z) (Qsymm: forall x y, Q x y = Q y x) (Hcmp: forall x y, Eq = pure_atom_cmp x y -> (forall P, Q (pure_atom_denote x) (Q (pure_atom_denote y) P) = Q (pure_atom_denote y) P)), list_denote pure_atom_denote Q B l = list_denote pure_atom_denote Q B (normalize_atoms l).
Lemma union_contractive: forall {A} x, (@orp A) x x = x.
Lemma list_denote_union_normalize_pure_atoms: forall(B:spred) (l:list pure_atom), list_denote pure_atom_denote (@orp state) B l = list_denote pure_atom_denote (@orp state) B (normalize_atoms l).
Lemma intersection_contractive: forall {A} x, (@andp A) x x = x.
Lemma list_denote_intersection_normalize_pure_atoms: forall(B:spred) (l:list pure_atom), list_denote pure_atom_denote (@andp state) B l = list_denote pure_atom_denote (@andp state) B (normalize_atoms l).
Lemma list_denote_intersection_filter_nonreflex: forall(B:spred) (l:list pure_atom), list_denote pure_atom_denote (@andp state) B l = list_denote pure_atom_denote (@andp state) B (filter nonreflex_atom l).
Lemma list_denote_normalize_filter_nonreflex_atom: forall B l, list_denote pure_atom_denote (@andp state) B (normalize_atoms (filter nonreflex_atom l)) = list_denote pure_atom_denote (@andp state) B l.
Lemma list_denote_inter_app : forall {A} (f: A -> spred) cs1 cs2 s, list_denote f (@andp state) TT (cs1 ++ cs2) s -> (list_denote f (@andp state) TT cs1 s /\ list_denote f (@andp state) TT cs2 s).
Lemma list_denote_assoc_sym_id : forall {A T} (E: A -> T) Q B C l (CID : forall x, Q x C = x) (QSYM : forall x y, Q x y = Q y x) (QASSOC : forall x y z, Q x (Q y z) = Q (Q x y) z), list_denote E Q B l = Q B (list_denote E Q C l).
Lemma list_denote_union_left : forall {A} (f: A -> spred) cs1 cs2 s, list_denote f (@orp state) FF cs1 s -> list_denote f (@orp state) FF (cs1 ++ cs2) s.
Lemma list_denote_union_right : forall {A} (f: A -> spred) cs1 cs2 s, list_denote f (@orp state) FF cs2 s -> list_denote f (@orp state) FF (cs1 ++ cs2) s.
Lemma list_denote_sepcon_sort : forall {A} (E:A -> spred) (B:spred) (l:list A) cmp s, list_denote E sepcon B l s <-> list_denote E sepcon B (rsort cmp l) s.
Lemma empty_not_singleton: forall c, M.empty <> M.singleton c.
Lemma singleton_inv: forall x y, M.singleton x = M.singleton y -> x=y.
Lemma join_stacks_eq : forall s0 s1 s : state, join s0 s1 s -> stk s0=stk s1 /\ stk s0=stk s.
Lemma expr_denote_join: forall e s r t, join s r t -> expr_denote e t = expr_denote e s.
Lemma expr_denote_eq_dec_loc: forall x y s, nil_or_loc (expr_denote x s) -> Decidable.decidable (expr_denote x s = expr_denote y s).
Lemma expr_denote_heap_ind : forall x s h h', expr_denote x (State s h)=expr_denote x (State s h').
Lemma unXX {A:Type} (P: pred A) b : un P (un P b) = un P b.
Lemma lseg_appN: forall x y s r t, lseg x y s -> lseg y nil_val r -> join s r t -> lseg x nil_val t.
Lemma pure_atom_denote_heap_ind: forall a s h h', pure_atom_denote a (State s h) = pure_atom_denote a (State s h').
Lemma pure_atoms_denote_intersection_heap_ind: forall Delta s h h', list_denote pure_atom_denote (@andp state) TT Delta (State s h) = list_denote pure_atom_denote (@andp state) TT Delta (State s h').
Lemma pure_atoms_denote_union_heap_ind: forall Delta s h h', list_denote pure_atom_denote (@orp state) FF Delta (State s h) = list_denote pure_atom_denote (@orp state) FF Delta (State s h').
Lemma lseg_nil_or_loc: forall x y h, lseg x y h -> nil_or_loc y.
Lemma lseg_end: forall x y h, lseg x y h -> (x = y /\ emp h) \/ y = nil_val \/ (exists l, val2loc y = Some l /\ emp_at l h).
Lemma lseg_lseg_app: forall x y z h1 h2 h tz, lseg x y h1 -> lseg y z h2 -> join h2 h1 h -> val2loc z = Some tz -> emp_at tz h -> lseg x z h.
Lemma Space_denote_cons: forall a L, space_denote (a::L) = sepcon (space_atom_denote a) (space_denote L).
Lemma Space_denote_app: forall M L, space_denote (M ++ L) = sepcon (space_denote M) (space_denote L).
Lemma Space_denote_rev: forall L, space_denote (rev L) = (space_denote L).