Definition pushdown_left_inv (b_res: val) (t_res: tree val): environ -> mpred :=
EX b: val, EX ta: tree val, EX x: nat, EX v: val, EX tb: tree val, EX P: tree val -> tree val,
PROP  (P (pushdown_left ta tb) = t_res)
LOCAL (temp _t b)
SEP   (treebox_rep (T ta x v tb) b; partial_treebox_rep P b_res b).
Definition delete_inv (b0: val) (t0: tree val) (x: nat): environ -> mpred :=
EX b: val, EX t: tree val, EX P: tree val -> tree val,
PROP(P (delete x t) = delete x t0)
LOCAL(temp _t b; temp _x (Vint (Int.repr (Z.of_nat x))))
SEP(treebox_rep t b; partial_treebox_rep P b0 b).

Lemma body_delete: semax_body Vprog Gprog f_delete delete_spec.