(* Checking use of retyping in w_unify0 in the presence of unification problems of the form \x:Meta.Meta = \x:ind.match x with ... end *)
Set Implicit Arguments.
Inductive dynamic : Type :=
| Dyn : forall T, T -> dynamic.
Definition perm := Qc.
Locate Qle_bool.
Definition compatibleb (p1 p2 : perm) : bool :=
let p1pos := Qle_bool 0 p1 in
let p2pos := Qle_bool 0 p2 in
negb (
(p1pos && p2pos)
|| ((p1pos || p2pos) && (negb (Qle_bool 0 ((p1 + p2)%Qc)))))%Qc.
Definition compatible (p1 p2 : perm) := compatibleb p1 p2 = true.
Definition perm_plus (p1 p2 : perm) : option perm :=
if compatibleb p1 p2 then Some (p1 + p2) else None.
Infix "+p" := perm_plus (at level 60, no associativity).

Axiom axiom_ptr : Set.