Definition resource_share_split (p q r: address -> pred rmap): Prop :=
  exists p' q' r' p_sh q_sh r_sh,
    is_resource_pred p p' /\
    is_resource_pred q q' /\
    is_resource_pred r r' /\
    join q_sh r_sh p_sh /\
    (forall res l n, p' res l n ->
      resource_share res = Some p_sh /\
      q' (slice_resource q_sh res) l n /\
      r' (slice_resource r_sh res) l n) /\
    (forall p_res q_res r_res l n,
      join q_res r_res p_res ->
      q' q_res l n ->
      r' r_res l n ->
      p' p_res l n).

Lemma allp_jam_share_split: forall (P: address -> Prop) (p q r: address -> pred rmap) (P_DEC: forall l, {P l} + {~ P l}), resource_share_split p q r -> allp (jam P_DEC p noat) && noghost = (allp (jam P_DEC q noat) && noghost) * (allp (jam P_DEC r noat) && noghost).