(** *** Exercise [subst_exp_intro] *)
(** This next lemma states that opening can be replaced with variable opening and substitution.  This lemma, like many about [open_exp_wrt_exp], should be proven via induction on the term [e]. However, during this induction, the binding depth of the term changes, so to make sure that we have a flexible enough induction hypothesis, we must generalize the argument to [open_exp_wrt_exp_rec].  *)

Lemma subst_exp_intro : forall (x : var) u e,
x `notin` (fv_exp e) ->
open e u = [x ~> u](e ^ x).