Hint Resolve tree_rep_nullval: saturate_local.

Lemma if_trueb: forall {A: Type} b (a1 a2: A), b = true -> (if b then a1 else a2) = a1.
Definition lookup_inv (b0 p0: val) (t0: tree val) (x: Z): environ -> mpred :=
EX p: val, EX t: tree val,
PROP(lookup nullval x t = lookup nullval x t0)
LOCAL(temp _p p; temp _x (Vint (Int.repr x)))
SEP(tree_rep t p;  (tree_rep t p -* tree_rep t0 p0)).