Definition split_resource r :=
  match r with YES sh rsh k pp => 
               (YES (fst (cleave sh)) (cleave_readable1 _ rsh) k pp , 
                YES (snd (cleave sh)) (cleave_readable2 _ rsh) k pp)
             | PURE k pp => (PURE k pp, PURE k pp)
             | NO sh nsh => (NO (fst (cleave sh)) (cleave_nonreadable1 _ nsh),
                             NO (snd (cleave sh)) (cleave_nonreadable2 _ nsh))
  end.

Lemma split_resource_join: forall r, join (fst (split_resource r)) (snd (split_resource r)) r.