(*Got this ltac from permission.v maybe should factor*)
Ltac if_simpl:=
  repeat match goal with
         | [ H: ?X = true |- context[if ?X then _ else _] ] => rewrite H; simpl 
         | [ H: ?X = false |- context[if ?X then _ else _] ] => rewrite H; simpl 
         | [ H: ?X = left _ |- context[match ?X with left _ => _ | right _ => _ end] ]=>
           rewrite H; simpl 
         | [ H: ?X = right _ |- context[match ?X with left _ => _ | right _ => _ end] ]=>
           rewrite H; simpl 
         end.

Lemma writable0_share_top: writable0_share Tsh.