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_closedl_cast: forall S e t,
expr_closed_wrt_lvars S e ->
expr_closed_wrt_lvars S (Ecast e t).