(*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.

(* Specifications: *)
Lemma top_aint_bot: eq_dec Share.top Share.bot = right Share.nontrivial.
Lemma writable0_share_top: writable0_share Tsh.