(* These versions can sometimes take minutes, when A and B can't be unified Hint Extern 1 (_ |-- _) => (simple apply (@derives_refl mpred _) ) : cancel. Hint Extern 1 (_ |-- |> _) => (simple apply (@now_later mpred _ _) ) : cancel. *)
Hint Extern 2 (?A |-- ?B) => (constr_eq A B; simple apply derives_refl) : cancel.
Hint Extern 2 (?A |-- |> ?B) => (constr_eq A B; simple apply now_later) : cancel.

(* Specifications: *)
Lemma cancel1_start:
forall P Q : mpred,
P |-- Q * emp ->
P |-- Q.
Lemma cancel1_here:
forall P P' Q1 Q2 Q3 : mpred,
P' |-- Q2 ->
P |-- Q1 * Q3 ->
P * P' |-- Q1 * Q2 * Q3.
Lemma cancel1_next:
forall P Q1 Q2 Q3 : mpred,
P |-- Q1 * (Q2 * Q3) ->
P |-- Q1 * Q2 * Q3.
Lemma cancel1_finish1:
forall P Q1 Q2 Q3 : mpred,
P |-- Q1 * Q2 * Q3 ->
P |-- Q1 * (Q2 * Q3).
Lemma cancel1_finish2:
forall P Q : mpred,
P |-- Q ->
P |-- Q * emp.