Inductive res_join (PRED : Type) : f_res PRED -> f_res PRED -> f_res PRED -> Prop :=
| res_join_NO1 : forall sh1 nsh1 sh2 nsh2 sh3 nsh3,
join sh1 sh2 sh3 ->
res_join PRED (NO' PRED sh1 nsh1) (NO' PRED sh2 nsh2)
(NO' PRED sh3 nsh3)
| res_join_NO2 : forall sh1 nsh1 sh2 rsh2 sh3 rsh3 k p,
join sh1 sh2 sh3 ->
res_join PRED (NO' PRED sh1 nsh1) (YES' PRED sh2 rsh2 k p)
(YES' PRED sh3 rsh3 k p)
| res_join_NO3 : forall sh1 rsh1 sh2 nsh2 sh3 rsh3 k p,
join sh1 sh2 sh3 ->
res_join PRED (YES' PRED sh1 rsh1 k p) (NO' PRED sh2 nsh2)
(YES' PRED sh3 rsh3 k p)
| res_join_YES : forall sh1 rsh1 sh2 rsh2 sh3 rsh3 k p,
join sh1 sh2 sh3 ->
res_join PRED (YES' PRED sh1 rsh1 k p) (YES' PRED sh2 rsh2 k p) (YES' PRED sh3 rsh3 k p)
| res_join_PURE : forall k p, res_join PRED (PURE' PRED k p) (PURE' PRED k p) (PURE' PRED k p).

Axiom pa_rj : forall PRED, @Perm_alg _ (res_join PRED).
Instance sa_rj : forall PRED, @Sep_alg _ (res_join PRED).