intros. unfold THEN.
unfold THEN'.
apply THEN_sound; auto.
apply runOnGoals_sound; auto;
rtac_derive_soundness.
apply INSTANTIATE_sound.
apply runOnGoals_sound. auto.
Qed.
Definition APPLY_sound := (@APPLY_sound _ (expr typ func) _ _ _ _ _ _ _ _ _ _ _ ).
(*Definition APPLY_sound := (@APPLY_sound _ (expr typ func) _ _ _ _ _ _ _ _ _ _ _ _ (fun (subst : Type) (SS : Subst subst (expr typ func)) (SU : SubstUpdate subst (expr typ func)) (tus tvs : tenv typ) (n : nat) (l r : expr typ func) (t3 : typ) (s1 : subst) => @ExprUnify_simul.exprUnify subst typ func RType_typ (_) Typ2_tyArr SS SU (S (S (S (S (S (S (S (S (S (S O)))))))))) tus tvs n l r t3 s1) _ (ExprLift.vars_to_uvars_exprD')).*)
(*  (fun (subst : Type) (SS : Subst subst (expr typ func)) (SU : SubstUpdate subst (expr typ func)) (tus tvs : tenv typ) (n : nat) (l r : expr typ func) (t3 : typ) (s1 : subst) => @ExprUnify_simul.exprUnify subst typ func RType_typ (_) Typ2_tyArr SS SU (S (S (S (S (S (S (S (S (S (S O)))))))))) tus tvs n l r t3 s1) _ (* (ExprLift.vars_to_uvars_exprD')*)).*)
Definition EAPPLY_sound :=
(@EAPPLY_sound _ (expr typ func) _ _ _ _ _ _ _ _ _ _). (*_ _ (fun (subst : Type)
(SS : Subst subst (expr typ func))
(SU : SubstUpdate subst (expr typ func))
(tus tvs : tenv typ)
(n : nat) (l r : expr typ func)
(t3 : typ) (s1 : subst) =>
@ExprUnify_simul.exprUnify subst typ func
RType_typ (func_defs.RSym_sym symexe.tbl)
Typ2_tyArr SS SU
(S (S (S (S (S (S (S (S (S (S O))))))))))
tus tvs n l r t3 s1) (ExprLift.vars_to_uvars_exprD')).*)

Lemma APPLY_condition1: vars_to_uvars_spec vars_to_uvars.
apply vars_to_uvars_exprD'.