(** There is no inteference in the thread pool *)
    (* Per-thread disjointness definition*)
    Definition disjoint_threads tp :=
      forall i j (cnti : containsThread tp i)
        (cntj: containsThread tp j) (Hneq: i <> j),
        joins (getThreadR(resources:=LockInvsAndResources) cnti)
              (getThreadR cntj).(* Per-lock disjointness definition*)
    Definition disjoint_locks tp :=
      forall loc1 loc2 R1 R2 r1 r2,
        lockRes tp loc1 = Some (R1, Some r1) ->
        lockRes tp loc2 = Some (R2, Some r2) ->
        joins r1 r2.(* lock-thread disjointness definition*)
    Definition disjoint_lock_thread tp :=
      forall i loc R r (cnti : containsThread tp i),
        lockRes tp loc = Some (R, Some r) ->
        joins (getThreadR cnti) r.Variant invariant' (tp:t) := True.Variant invariant' (tp:t) := True.(* The invariant has been absorbed my mem_compat*)

    Definition invariant := invariant'.

Lemma juice2Perm_canon: forall phi m, isCanonical (juice2Perm phi m).