(*************************************************************************)
(** ** Properties about basic operations *)
(*************************************************************************)
(** The most important properties about open and lc_exp concern their relationship with the free variable and subst functions.  For example, one important property is shown below: that we can commute free and bound variable substitution.  We won't prove this lemma as part of the tutorial (it is proved in [Lemmas.v]), but it is an important building block for reasoning about LN terms.  NOTE: the name of this lemma was automatically generated by LNgen. If we have multiple syntactic classes and multiple sorts of variables, we need to distinguish the different forms of substitution from eachother.  *)

Lemma subst_exp_open_exp_wrt_exp :
forall e3 e1 e2 x1,
lc_exp e1 ->
[x1 ~> e1] (open e3 e2) = open ([x1 ~> e1] e3) ([x1 ~> e1] e2).