Proof with try solve [simpl; auto; try congruence; try inversion A
| destruct (join_assoc B (join_comm C)) as [q1 [q2 Q]];
apply listd_pure_atomdi with (s0 := q1); [ | eexists; eauto ];
solve [apply IHsigma with (s2 := w2); auto] ].
intros A B C. revert s s2 B C; induction sigma... intros s s2 B C.
simpl in B; destruct B as [w1 [w2 [B [D E]]]]. destruct a...
destruct e... unfold lseg_in_dom_atoms. if_tac...
try unfold Ident.eq in H.
subst x. split...
rewrite <- order_eqv_sound. simpl in A, D.
inversion D; subst. simpl. destruct (join_assoc B (join_comm C)) as [q [Q1 Q2]].
solve [eapply state_join_var_eq; eauto].
cut (stk w1 = stk s1); [ intro Heq; rewrite Heq in * | ].
rewrite H0 in A; destruct A as [A _].
exfalso. destruct B as [_ B]. destruct (join_assoc H3 B) as [q [Q1 Q2]].
eapply next_next_join_False with
(s0 := h0) (s0' := hp s2) (s2 := hp s1) (s1 := hp s1); eauto.
econstructor; eauto.
apply join_sub_refl.
destruct (join_assoc (join_comm B) (join_comm C)) as [q [Q1 Q2]].
destruct (join_stacks_eq _ _ _ Q1)...
Qed.

(* Specifications: *)
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.