proposition: Lemma term_substitution_eq env t xs : Forall (fun '(v, v') => term_denote env v = term_denote env v') xs → term_denote env (subst_all subst_term t (substitutions xs)) = term_denote env t.
proof: Proof. induction xs as [|[] ?]; simpl; intros; auto. inversion H. destruct (substitution t0 t1) eqn:?; intuition. destruct p; simpl. rewrite term_denote_subst_term; auto. now apply (term_denote_substitution Heqo). Qed.
imports: Coq.NArith.NArith Coq.FSets.FMaps Coq.micromega.Lia Category.Lib Category.Lib.FMapExt