Hint Resolve expr_closed_tempvar expr_closedl_tempvar : closed.
Hint Extern 1 (not (@eq ident _ _)) => (let Hx := fresh in intro Hx; inversion Hx) : closed.

Lemma expr_closed_cast: forall {cs: compspecs} S e t,
expr_closed_wrt_vars S e ->
expr_closed_wrt_vars S (Ecast e t).