Ltac prop_right_cautious :=
try solve [simple apply prop_right; auto].
(**********************************************************)
(* testing Parameter f: nat -> Prop. Parameter g h : mpred.  Goal ( !! f 1 && ((h && !! f 2) && h ) && (!! f 3 && (g && (!!f 4 && !! f 5) && !! f 6)) |-- FF).  *)
(*****************************************************************)
Ltac subst_any :=
repeat match goal with
| H: ?x = ?y |- _ => first [ subst x | subst y ]
end.

(* Specifications: *)
Lemma prop_and_right {A}{NA: NatDed A}:
forall (U: A) (X Y: Prop),
X ->
U |-- !! Y ->
U |-- !! (X /\ Y).
Lemma fold_right_sepcon_subst:
forall i e R, fold_right sepcon emp (map (subst i e) R) = subst i e (fold_right sepcon emp R).
Lemma unsigned_eq_eq: forall i j, Int.unsigned i = Int.unsigned j -> i = j.
Ltac solve_mod_eq :=
unfold Int.add, Int.mul;
repeat rewrite Int.unsigned_repr_eq;
repeat
(repeat rewrite Zmod_mod;
repeat rewrite Zmult_mod_idemp_l;
repeat rewrite Zmult_mod_idemp_r;
repeat rewrite Zplus_mod_idemp_l;
repeat rewrite Zplus_mod_idemp_r).
Lemma prop_false_andp {A}{NA :NatDed A}:
forall P Q, ~P -> !! P && Q = FF.
Lemma wand_join {A}{NA: NatDed A}{SA: SepLog A}:
forall x1 x2 y1 y2: A,
(x1 -* y1) * (x2 -* y2) |-- ((x1 * x2) -* (y1 * y2)).
Lemma wand_sepcon:
forall {A} {NA: NatDed A}{SA: SepLog A} P Q,
(P -* Q * P) * P = Q * P.
Lemma wand_sepcon':
forall {A} {NA: NatDed A}{SA: SepLog A} P Q,
P * (P -* Q * P) = P * Q.