[STATEMENT]
lemma (in constants) veval'_welldefined':
  assumes "\<Gamma> \<turnstile>\<^sub>v t \<down> v" "fdisjnt C (fmdom \<Gamma>)"
  assumes "consts t |\<subseteq>| fmdom \<Gamma> |\<union>| C" "fmpred (\<lambda>_. vwelldefined') \<Gamma>"
  assumes "wellformed t" "wellformed_venv \<Gamma>"
  assumes "\<not> shadows_consts t" "not_shadows_vconsts_env \<Gamma>"
  shows "vwelldefined' v"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. vwelldefined' v
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
\<Gamma> \<turnstile>\<^sub>v t \<down> v
fdisjnt C (fmdom \<Gamma>)
consts t |\<subseteq>| fmdom \<Gamma> |\<union>| C
fmpred (\<lambda>_. vwelldefined') \<Gamma>
pre_strong_term_class.wellformed t
wellformed_venv \<Gamma>
\<not> shadows_consts t
not_shadows_vconsts_env \<Gamma>

goal (1 subgoal):
 1. vwelldefined' v
[PROOF STEP]
proof induction
[PROOF STATE]
proof (state)
goal (6 subgoals):
 1. \<And>name \<Gamma> val. \<lbrakk>name |\<notin>| C; fmlookup \<Gamma> name = Some val; fdisjnt C (fmdom \<Gamma>); consts (Sconst name) |\<subseteq>| fmdom \<Gamma> |\<union>| C; fmpred (\<lambda>_. vwelldefined') \<Gamma>; pre_strong_term_class.wellformed (Sconst name); wellformed_venv \<Gamma>; \<not> shadows_consts (Sconst name); not_shadows_vconsts_env \<Gamma>\<rbrakk> \<Longrightarrow> vwelldefined' val
 2. \<And>\<Gamma> name val. \<lbrakk>fmlookup \<Gamma> name = Some val; fdisjnt C (fmdom \<Gamma>); consts (Svar name) |\<subseteq>| fmdom \<Gamma> |\<union>| C; fmpred (\<lambda>_. vwelldefined') \<Gamma>; pre_strong_term_class.wellformed (Svar name); wellformed_venv \<Gamma>; \<not> shadows_consts (Svar name); not_shadows_vconsts_env \<Gamma>\<rbrakk> \<Longrightarrow> vwelldefined' val
 3. \<And>\<Gamma> cs. \<lbrakk>fdisjnt C (fmdom \<Gamma>); consts (Sabs cs) |\<subseteq>| fmdom \<Gamma> |\<union>| C; fmpred (\<lambda>_. vwelldefined') \<Gamma>; pre_strong_term_class.wellformed (Sabs cs); wellformed_venv \<Gamma>; \<not> shadows_consts (Sabs cs); not_shadows_vconsts_env \<Gamma>\<rbrakk> \<Longrightarrow> vwelldefined' (Vabs cs \<Gamma>)
 4. \<And>\<Gamma> t cs \<Gamma>' u u' env uu_ rhs val. \<lbrakk>\<Gamma> \<turnstile>\<^sub>v t \<down> Vabs cs \<Gamma>'; \<lbrakk>fdisjnt C (fmdom \<Gamma>); consts t |\<subseteq>| fmdom \<Gamma> |\<union>| C; fmpred (\<lambda>_. vwelldefined') \<Gamma>; pre_strong_term_class.wellformed t; wellformed_venv \<Gamma>; \<not> shadows_consts t; not_shadows_vconsts_env \<Gamma>\<rbrakk> \<Longrightarrow> vwelldefined' (Vabs cs \<Gamma>'); \<Gamma> \<turnstile>\<^sub>v u \<down> u'; \<lbrakk>fdisjnt C (fmdom \<Gamma>); consts u |\<subseteq>| fmdom \<Gamma> |\<union>| C; fmpred (\<lambda>_. vwelldefined') \<Gamma>; pre_strong_term_class.wellformed u; wellformed_venv \<Gamma>; \<not> shadows_consts u; not_shadows_vconsts_env \<Gamma>\<rbrakk> \<Longrightarrow> vwelldefined' u'; vfind_match cs u' = Some (env, uu_, rhs); \<Gamma>' ++\<^sub>f env \<turnstile>\<^sub>v rhs \<down> val; \<lbrakk>fdisjnt C (fmdom (\<Gamma>' ++\<^sub>f env)); consts rhs |\<subseteq>| fmdom (\<Gamma>' ++\<^sub>f env) |\<union>| C; fmpred (\<lambda>_. vwelldefined') (\<Gamma>' ++\<^sub>f env); pre_strong_term_class.wellformed rhs; wellformed_venv (\<Gamma>' ++\<^sub>f env); \<not> shadows_consts rhs; not_shadows_vconsts_env (\<Gamma>' ++\<^sub>f env)\<rbrakk> \<Longrightarrow> vwelldefined' val; fdisjnt C (fmdom \<Gamma>); consts (t $\<^sub>s u) |\<subseteq>| fmdom \<Gamma> |\<union>| C; fmpred (\<lambda>_. vwelldefined') \<Gamma>; pre_strong_term_class.wellformed (t $\<^sub>s u); wellformed_venv \<Gamma>; \<not> shadows_consts (t $\<^sub>s u); not_shadows_vconsts_env \<Gamma>\<rbrakk> \<Longrightarrow> vwelldefined' val
 5. \<And>\<Gamma> t css name \<Gamma>' cs u u' env uv_ rhs val. \<lbrakk>\<Gamma> \<turnstile>\<^sub>v t \<down> Vrecabs css name \<Gamma>'; \<lbrakk>fdisjnt C (fmdom \<Gamma>); consts t |\<subseteq>| fmdom \<Gamma> |\<union>| C; fmpred (\<lambda>_. vwelldefined') \<Gamma>; pre_strong_term_class.wellformed t; wellformed_venv \<Gamma>; \<not> shadows_consts t; not_shadows_vconsts_env \<Gamma>\<rbrakk> \<Longrightarrow> vwelldefined' (Vrecabs css name \<Gamma>'); fmlookup css name = Some cs; \<Gamma> \<turnstile>\<^sub>v u \<down> u'; \<lbrakk>fdisjnt C (fmdom \<Gamma>); consts u |\<subseteq>| fmdom \<Gamma> |\<union>| C; fmpred (\<lambda>_. vwelldefined') \<Gamma>; pre_strong_term_class.wellformed u; wellformed_venv \<Gamma>; \<not> shadows_consts u; not_shadows_vconsts_env \<Gamma>\<rbrakk> \<Longrightarrow> vwelldefined' u'; vfind_match cs u' = Some (env, uv_, rhs); \<Gamma>' ++\<^sub>f mk_rec_env css \<Gamma>' ++\<^sub>f env \<turnstile>\<^sub>v rhs \<down> val; \<lbrakk>fdisjnt C (fmdom (\<Gamma>' ++\<^sub>f mk_rec_env css \<Gamma>' ++\<^sub>f env)); consts rhs |\<subseteq>| fmdom (\<Gamma>' ++\<^sub>f mk_rec_env css \<Gamma>' ++\<^sub>f env) |\<union>| C; fmpred (\<lambda>_. vwelldefined') (\<Gamma>' ++\<^sub>f mk_rec_env css \<Gamma>' ++\<^sub>f env); pre_strong_term_class.wellformed rhs; wellformed_venv (\<Gamma>' ++\<^sub>f mk_rec_env css \<Gamma>' ++\<^sub>f env); \<not> shadows_consts rhs; not_shadows_vconsts_env (\<Gamma>' ++\<^sub>f mk_rec_env css \<Gamma>' ++\<^sub>f env)\<rbrakk> \<Longrightarrow> vwelldefined' val; fdisjnt C (fmdom \<Gamma>); consts (t $\<^sub>s u) |\<subseteq>| fmdom \<Gamma> |\<union>| C; fmpred (\<lambda>_. vwelldefined') \<Gamma>; pre_strong_term_class.wellformed (t $\<^sub>s u); wellformed_venv \<Gamma>; \<not> shadows_consts (t $\<^sub>s u); not_shadows_vconsts_env \<Gamma>\<rbrakk> \<Longrightarrow> vwelldefined' val
 6. \<And>name \<Gamma> ts us. \<lbrakk>name |\<in>| C; list_all2 (\<lambda>x1 x2. \<Gamma> \<turnstile>\<^sub>v x1 \<down> x2 \<and> (fdisjnt C (fmdom \<Gamma>) \<longrightarrow> consts x1 |\<subseteq>| fmdom \<Gamma> |\<union>| C \<longrightarrow> fmpred (\<lambda>_. vwelldefined') \<Gamma> \<longrightarrow> pre_strong_term_class.wellformed x1 \<longrightarrow> wellformed_venv \<Gamma> \<longrightarrow> \<not> shadows_consts x1 \<longrightarrow> not_shadows_vconsts_env \<Gamma> \<longrightarrow> vwelldefined' x2)) ts us; fdisjnt C (fmdom \<Gamma>); consts (name $$ ts) |\<subseteq>| fmdom \<Gamma> |\<union>| C; fmpred (\<lambda>_. vwelldefined') \<Gamma>; pre_strong_term_class.wellformed (name $$ ts); wellformed_venv \<Gamma>; \<not> shadows_consts (name $$ ts); not_shadows_vconsts_env \<Gamma>\<rbrakk> \<Longrightarrow> vwelldefined' (Vconstr name us)
[PROOF STEP]
case (abs \<Gamma> cs)
[PROOF STATE]
proof (state)
this:
fdisjnt C (fmdom \<Gamma>)
consts (Sabs cs) |\<subseteq>| fmdom \<Gamma> |\<union>| C
fmpred (\<lambda>_. vwelldefined') \<Gamma>
pre_strong_term_class.wellformed (Sabs cs)
wellformed_venv \<Gamma>
\<not> shadows_consts (Sabs cs)
not_shadows_vconsts_env \<Gamma>

goal (6 subgoals):
 1. \<And>name \<Gamma> val. \<lbrakk>name |\<notin>| C; fmlookup \<Gamma> name = Some val; fdisjnt C (fmdom \<Gamma>); consts (Sconst name) |\<subseteq>| fmdom \<Gamma> |\<union>| C; fmpred (\<lambda>_. vwelldefined') \<Gamma>; pre_strong_term_class.wellformed (Sconst name); wellformed_venv \<Gamma>; \<not> shadows_consts (Sconst name); not_shadows_vconsts_env \<Gamma>\<rbrakk> \<Longrightarrow> vwelldefined' val
 2. \<And>\<Gamma> name val. \<lbrakk>fmlookup \<Gamma> name = Some val; fdisjnt C (fmdom \<Gamma>); consts (Svar name) |\<subseteq>| fmdom \<Gamma> |\<union>| C; fmpred (\<lambda>_. vwelldefined') \<Gamma>; pre_strong_term_class.wellformed (Svar name); wellformed_venv \<Gamma>; \<not> shadows_consts (Svar name); not_shadows_vconsts_env \<Gamma>\<rbrakk> \<Longrightarrow> vwelldefined' val
 3. \<And>\<Gamma> cs. \<lbrakk>fdisjnt C (fmdom \<Gamma>); consts (Sabs cs) |\<subseteq>| fmdom \<Gamma> |\<union>| C; fmpred (\<lambda>_. vwelldefined') \<Gamma>; pre_strong_term_class.wellformed (Sabs cs); wellformed_venv \<Gamma>; \<not> shadows_consts (Sabs cs); not_shadows_vconsts_env \<Gamma>\<rbrakk> \<Longrightarrow> vwelldefined' (Vabs cs \<Gamma>)
 4. \<And>\<Gamma> t cs \<Gamma>' u u' env uu_ rhs val. \<lbrakk>\<Gamma> \<turnstile>\<^sub>v t \<down> Vabs cs \<Gamma>'; \<lbrakk>fdisjnt C (fmdom \<Gamma>); consts t |\<subseteq>| fmdom \<Gamma> |\<union>| C; fmpred (\<lambda>_. vwelldefined') \<Gamma>; pre_strong_term_class.wellformed t; wellformed_venv \<Gamma>; \<not> shadows_consts t; not_shadows_vconsts_env \<Gamma>\<rbrakk> \<Longrightarrow> vwelldefined' (Vabs cs \<Gamma>'); \<Gamma> \<turnstile>\<^sub>v u \<down> u'; \<lbrakk>fdisjnt C (fmdom \<Gamma>); consts u |\<subseteq>| fmdom \<Gamma> |\<union>| C; fmpred (\<lambda>_. vwelldefined') \<Gamma>; pre_strong_term_class.wellformed u; wellformed_venv \<Gamma>; \<not> shadows_consts u; not_shadows_vconsts_env \<Gamma>\<rbrakk> \<Longrightarrow> vwelldefined' u'; vfind_match cs u' = Some (env, uu_, rhs); \<Gamma>' ++\<^sub>f env \<turnstile>\<^sub>v rhs \<down> val; \<lbrakk>fdisjnt C (fmdom (\<Gamma>' ++\<^sub>f env)); consts rhs |\<subseteq>| fmdom (\<Gamma>' ++\<^sub>f env) |\<union>| C; fmpred (\<lambda>_. vwelldefined') (\<Gamma>' ++\<^sub>f env); pre_strong_term_class.wellformed rhs; wellformed_venv (\<Gamma>' ++\<^sub>f env); \<not> shadows_consts rhs; not_shadows_vconsts_env (\<Gamma>' ++\<^sub>f env)\<rbrakk> \<Longrightarrow> vwelldefined' val; fdisjnt C (fmdom \<Gamma>); consts (t $\<^sub>s u) |\<subseteq>| fmdom \<Gamma> |\<union>| C; fmpred (\<lambda>_. vwelldefined') \<Gamma>; pre_strong_term_class.wellformed (t $\<^sub>s u); wellformed_venv \<Gamma>; \<not> shadows_consts (t $\<^sub>s u); not_shadows_vconsts_env \<Gamma>\<rbrakk> \<Longrightarrow> vwelldefined' val
 5. \<And>\<Gamma> t css name \<Gamma>' cs u u' env uv_ rhs val. \<lbrakk>\<Gamma> \<turnstile>\<^sub>v t \<down> Vrecabs css name \<Gamma>'; \<lbrakk>fdisjnt C (fmdom \<Gamma>); consts t |\<subseteq>| fmdom \<Gamma> |\<union>| C; fmpred (\<lambda>_. vwelldefined') \<Gamma>; pre_strong_term_class.wellformed t; wellformed_venv \<Gamma>; \<not> shadows_consts t; not_shadows_vconsts_env \<Gamma>\<rbrakk> \<Longrightarrow> vwelldefined' (Vrecabs css name \<Gamma>'); fmlookup css name = Some cs; \<Gamma> \<turnstile>\<^sub>v u \<down> u'; \<lbrakk>fdisjnt C (fmdom \<Gamma>); consts u |\<subseteq>| fmdom \<Gamma> |\<union>| C; fmpred (\<lambda>_. vwelldefined') \<Gamma>; pre_strong_term_class.wellformed u; wellformed_venv \<Gamma>; \<not> shadows_consts u; not_shadows_vconsts_env \<Gamma>\<rbrakk> \<Longrightarrow> vwelldefined' u'; vfind_match cs u' = Some (env, uv_, rhs); \<Gamma>' ++\<^sub>f mk_rec_env css \<Gamma>' ++\<^sub>f env \<turnstile>\<^sub>v rhs \<down> val; \<lbrakk>fdisjnt C (fmdom (\<Gamma>' ++\<^sub>f mk_rec_env css \<Gamma>' ++\<^sub>f env)); consts rhs |\<subseteq>| fmdom (\<Gamma>' ++\<^sub>f mk_rec_env css \<Gamma>' ++\<^sub>f env) |\<union>| C; fmpred (\<lambda>_. vwelldefined') (\<Gamma>' ++\<^sub>f mk_rec_env css \<Gamma>' ++\<^sub>f env); pre_strong_term_class.wellformed rhs; wellformed_venv (\<Gamma>' ++\<^sub>f mk_rec_env css \<Gamma>' ++\<^sub>f env); \<not> shadows_consts rhs; not_shadows_vconsts_env (\<Gamma>' ++\<^sub>f mk_rec_env css \<Gamma>' ++\<^sub>f env)\<rbrakk> \<Longrightarrow> vwelldefined' val; fdisjnt C (fmdom \<Gamma>); consts (t $\<^sub>s u) |\<subseteq>| fmdom \<Gamma> |\<union>| C; fmpred (\<lambda>_. vwelldefined') \<Gamma>; pre_strong_term_class.wellformed (t $\<^sub>s u); wellformed_venv \<Gamma>; \<not> shadows_consts (t $\<^sub>s u); not_shadows_vconsts_env \<Gamma>\<rbrakk> \<Longrightarrow> vwelldefined' val
 6. \<And>name \<Gamma> ts us. \<lbrakk>name |\<in>| C; list_all2 (\<lambda>x1 x2. \<Gamma> \<turnstile>\<^sub>v x1 \<down> x2 \<and> (fdisjnt C (fmdom \<Gamma>) \<longrightarrow> consts x1 |\<subseteq>| fmdom \<Gamma> |\<union>| C \<longrightarrow> fmpred (\<lambda>_. vwelldefined') \<Gamma> \<longrightarrow> pre_strong_term_class.wellformed x1 \<longrightarrow> wellformed_venv \<Gamma> \<longrightarrow> \<not> shadows_consts x1 \<longrightarrow> not_shadows_vconsts_env \<Gamma> \<longrightarrow> vwelldefined' x2)) ts us; fdisjnt C (fmdom \<Gamma>); consts (name $$ ts) |\<subseteq>| fmdom \<Gamma> |\<union>| C; fmpred (\<lambda>_. vwelldefined') \<Gamma>; pre_strong_term_class.wellformed (name $$ ts); wellformed_venv \<Gamma>; \<not> shadows_consts (name $$ ts); not_shadows_vconsts_env \<Gamma>\<rbrakk> \<Longrightarrow> vwelldefined' (Vconstr name us)
[PROOF STEP]
thus ?case
[PROOF STATE]
proof (prove)
using this:
fdisjnt C (fmdom \<Gamma>)
consts (Sabs cs) |\<subseteq>| fmdom \<Gamma> |\<union>| C
fmpred (\<lambda>_. vwelldefined') \<Gamma>
pre_strong_term_class.wellformed (Sabs cs)
wellformed_venv \<Gamma>
\<not> shadows_consts (Sabs cs)
not_shadows_vconsts_env \<Gamma>

goal (1 subgoal):
 1. vwelldefined' (Vabs cs \<Gamma>)
[PROOF STEP]
unfolding sconsts_sabs
[PROOF STATE]
proof (prove)
using this:
fdisjnt C (fmdom \<Gamma>)
list_all (\<lambda>(uu_, t). consts t |\<subseteq>| fmdom \<Gamma> |\<union>| C) cs
fmpred (\<lambda>_. vwelldefined') \<Gamma>
pre_strong_term_class.wellformed (Sabs cs)
wellformed_venv \<Gamma>
\<not> shadows_consts (Sabs cs)
not_shadows_vconsts_env \<Gamma>

goal (1 subgoal):
 1. vwelldefined' (Vabs cs \<Gamma>)
[PROOF STEP]
by (auto simp: list_all_iff list_ex_iff)
[PROOF STATE]
proof (state)
this:
vwelldefined' (Vabs cs \<Gamma>)

goal (5 subgoals):
 1. \<And>name \<Gamma> val. \<lbrakk>name |\<notin>| C; fmlookup \<Gamma> name = Some val; fdisjnt C (fmdom \<Gamma>); consts (Sconst name) |\<subseteq>| fmdom \<Gamma> |\<union>| C; fmpred (\<lambda>_. vwelldefined') \<Gamma>; pre_strong_term_class.wellformed (Sconst name); wellformed_venv \<Gamma>; \<not> shadows_consts (Sconst name); not_shadows_vconsts_env \<Gamma>\<rbrakk> \<Longrightarrow> vwelldefined' val
 2. \<And>\<Gamma> name val. \<lbrakk>fmlookup \<Gamma> name = Some val; fdisjnt C (fmdom \<Gamma>); consts (Svar name) |\<subseteq>| fmdom \<Gamma> |\<union>| C; fmpred (\<lambda>_. vwelldefined') \<Gamma>; pre_strong_term_class.wellformed (Svar name); wellformed_venv \<Gamma>; \<not> shadows_consts (Svar name); not_shadows_vconsts_env \<Gamma>\<rbrakk> \<Longrightarrow> vwelldefined' val
 3. \<And>\<Gamma> t cs \<Gamma>' u u' env uu_ rhs val. \<lbrakk>\<Gamma> \<turnstile>\<^sub>v t \<down> Vabs cs \<Gamma>'; \<lbrakk>fdisjnt C (fmdom \<Gamma>); consts t |\<subseteq>| fmdom \<Gamma> |\<union>| C; fmpred (\<lambda>_. vwelldefined') \<Gamma>; pre_strong_term_class.wellformed t; wellformed_venv \<Gamma>; \<not> shadows_consts t; not_shadows_vconsts_env \<Gamma>\<rbrakk> \<Longrightarrow> vwelldefined' (Vabs cs \<Gamma>'); \<Gamma> \<turnstile>\<^sub>v u \<down> u'; \<lbrakk>fdisjnt C (fmdom \<Gamma>); consts u |\<subseteq>| fmdom \<Gamma> |\<union>| C; fmpred (\<lambda>_. vwelldefined') \<Gamma>; pre_strong_term_class.wellformed u; wellformed_venv \<Gamma>; \<not> shadows_consts u; not_shadows_vconsts_env \<Gamma>\<rbrakk> \<Longrightarrow> vwelldefined' u'; vfind_match cs u' = Some (env, uu_, rhs); \<Gamma>' ++\<^sub>f env \<turnstile>\<^sub>v rhs \<down> val; \<lbrakk>fdisjnt C (fmdom (\<Gamma>' ++\<^sub>f env)); consts rhs |\<subseteq>| fmdom (\<Gamma>' ++\<^sub>f env) |\<union>| C; fmpred (\<lambda>_. vwelldefined') (\<Gamma>' ++\<^sub>f env); pre_strong_term_class.wellformed rhs; wellformed_venv (\<Gamma>' ++\<^sub>f env); \<not> shadows_consts rhs; not_shadows_vconsts_env (\<Gamma>' ++\<^sub>f env)\<rbrakk> \<Longrightarrow> vwelldefined' val; fdisjnt C (fmdom \<Gamma>); consts (t $\<^sub>s u) |\<subseteq>| fmdom \<Gamma> |\<union>| C; fmpred (\<lambda>_. vwelldefined') \<Gamma>; pre_strong_term_class.wellformed (t $\<^sub>s u); wellformed_venv \<Gamma>; \<not> shadows_consts (t $\<^sub>s u); not_shadows_vconsts_env \<Gamma>\<rbrakk> \<Longrightarrow> vwelldefined' val
 4. \<And>\<Gamma> t css name \<Gamma>' cs u u' env uv_ rhs val. \<lbrakk>\<Gamma> \<turnstile>\<^sub>v t \<down> Vrecabs css name \<Gamma>'; \<lbrakk>fdisjnt C (fmdom \<Gamma>); consts t |\<subseteq>| fmdom \<Gamma> |\<union>| C; fmpred (\<lambda>_. vwelldefined') \<Gamma>; pre_strong_term_class.wellformed t; wellformed_venv \<Gamma>; \<not> shadows_consts t; not_shadows_vconsts_env \<Gamma>\<rbrakk> \<Longrightarrow> vwelldefined' (Vrecabs css name \<Gamma>'); fmlookup css name = Some cs; \<Gamma> \<turnstile>\<^sub>v u \<down> u'; \<lbrakk>fdisjnt C (fmdom \<Gamma>); consts u |\<subseteq>| fmdom \<Gamma> |\<union>| C; fmpred (\<lambda>_. vwelldefined') \<Gamma>; pre_strong_term_class.wellformed u; wellformed_venv \<Gamma>; \<not> shadows_consts u; not_shadows_vconsts_env \<Gamma>\<rbrakk> \<Longrightarrow> vwelldefined' u'; vfind_match cs u' = Some (env, uv_, rhs); \<Gamma>' ++\<^sub>f mk_rec_env css \<Gamma>' ++\<^sub>f env \<turnstile>\<^sub>v rhs \<down> val; \<lbrakk>fdisjnt C (fmdom (\<Gamma>' ++\<^sub>f mk_rec_env css \<Gamma>' ++\<^sub>f env)); consts rhs |\<subseteq>| fmdom (\<Gamma>' ++\<^sub>f mk_rec_env css \<Gamma>' ++\<^sub>f env) |\<union>| C; fmpred (\<lambda>_. vwelldefined') (\<Gamma>' ++\<^sub>f mk_rec_env css \<Gamma>' ++\<^sub>f env); pre_strong_term_class.wellformed rhs; wellformed_venv (\<Gamma>' ++\<^sub>f mk_rec_env css \<Gamma>' ++\<^sub>f env); \<not> shadows_consts rhs; not_shadows_vconsts_env (\<Gamma>' ++\<^sub>f mk_rec_env css \<Gamma>' ++\<^sub>f env)\<rbrakk> \<Longrightarrow> vwelldefined' val; fdisjnt C (fmdom \<Gamma>); consts (t $\<^sub>s u) |\<subseteq>| fmdom \<Gamma> |\<union>| C; fmpred (\<lambda>_. vwelldefined') \<Gamma>; pre_strong_term_class.wellformed (t $\<^sub>s u); wellformed_venv \<Gamma>; \<not> shadows_consts (t $\<^sub>s u); not_shadows_vconsts_env \<Gamma>\<rbrakk> \<Longrightarrow> vwelldefined' val
 5. \<And>name \<Gamma> ts us. \<lbrakk>name |\<in>| C; list_all2 (\<lambda>x1 x2. \<Gamma> \<turnstile>\<^sub>v x1 \<down> x2 \<and> (fdisjnt C (fmdom \<Gamma>) \<longrightarrow> consts x1 |\<subseteq>| fmdom \<Gamma> |\<union>| C \<longrightarrow> fmpred (\<lambda>_. vwelldefined') \<Gamma> \<longrightarrow> pre_strong_term_class.wellformed x1 \<longrightarrow> wellformed_venv \<Gamma> \<longrightarrow> \<not> shadows_consts x1 \<longrightarrow> not_shadows_vconsts_env \<Gamma> \<longrightarrow> vwelldefined' x2)) ts us; fdisjnt C (fmdom \<Gamma>); consts (name $$ ts) |\<subseteq>| fmdom \<Gamma> |\<union>| C; fmpred (\<lambda>_. vwelldefined') \<Gamma>; pre_strong_term_class.wellformed (name $$ ts); wellformed_venv \<Gamma>; \<not> shadows_consts (name $$ ts); not_shadows_vconsts_env \<Gamma>\<rbrakk> \<Longrightarrow> vwelldefined' (Vconstr name us)
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (5 subgoals):
 1. \<And>name \<Gamma> val. \<lbrakk>name |\<notin>| C; fmlookup \<Gamma> name = Some val; fdisjnt C (fmdom \<Gamma>); consts (Sconst name) |\<subseteq>| fmdom \<Gamma> |\<union>| C; fmpred (\<lambda>_. vwelldefined') \<Gamma>; pre_strong_term_class.wellformed (Sconst name); wellformed_venv \<Gamma>; \<not> shadows_consts (Sconst name); not_shadows_vconsts_env \<Gamma>\<rbrakk> \<Longrightarrow> vwelldefined' val
 2. \<And>\<Gamma> name val. \<lbrakk>fmlookup \<Gamma> name = Some val; fdisjnt C (fmdom \<Gamma>); consts (Svar name) |\<subseteq>| fmdom \<Gamma> |\<union>| C; fmpred (\<lambda>_. vwelldefined') \<Gamma>; pre_strong_term_class.wellformed (Svar name); wellformed_venv \<Gamma>; \<not> shadows_consts (Svar name); not_shadows_vconsts_env \<Gamma>\<rbrakk> \<Longrightarrow> vwelldefined' val
 3. \<And>\<Gamma> t cs \<Gamma>' u u' env uu_ rhs val. \<lbrakk>\<Gamma> \<turnstile>\<^sub>v t \<down> Vabs cs \<Gamma>'; \<lbrakk>fdisjnt C (fmdom \<Gamma>); consts t |\<subseteq>| fmdom \<Gamma> |\<union>| C; fmpred (\<lambda>_. vwelldefined') \<Gamma>; pre_strong_term_class.wellformed t; wellformed_venv \<Gamma>; \<not> shadows_consts t; not_shadows_vconsts_env \<Gamma>\<rbrakk> \<Longrightarrow> vwelldefined' (Vabs cs \<Gamma>'); \<Gamma> \<turnstile>\<^sub>v u \<down> u'; \<lbrakk>fdisjnt C (fmdom \<Gamma>); consts u |\<subseteq>| fmdom \<Gamma> |\<union>| C; fmpred (\<lambda>_. vwelldefined') \<Gamma>; pre_strong_term_class.wellformed u; wellformed_venv \<Gamma>; \<not> shadows_consts u; not_shadows_vconsts_env \<Gamma>\<rbrakk> \<Longrightarrow> vwelldefined' u'; vfind_match cs u' = Some (env, uu_, rhs); \<Gamma>' ++\<^sub>f env \<turnstile>\<^sub>v rhs \<down> val; \<lbrakk>fdisjnt C (fmdom (\<Gamma>' ++\<^sub>f env)); consts rhs |\<subseteq>| fmdom (\<Gamma>' ++\<^sub>f env) |\<union>| C; fmpred (\<lambda>_. vwelldefined') (\<Gamma>' ++\<^sub>f env); pre_strong_term_class.wellformed rhs; wellformed_venv (\<Gamma>' ++\<^sub>f env); \<not> shadows_consts rhs; not_shadows_vconsts_env (\<Gamma>' ++\<^sub>f env)\<rbrakk> \<Longrightarrow> vwelldefined' val; fdisjnt C (fmdom \<Gamma>); consts (t $\<^sub>s u) |\<subseteq>| fmdom \<Gamma> |\<union>| C; fmpred (\<lambda>_. vwelldefined') \<Gamma>; pre_strong_term_class.wellformed (t $\<^sub>s u); wellformed_venv \<Gamma>; \<not> shadows_consts (t $\<^sub>s u); not_shadows_vconsts_env \<Gamma>\<rbrakk> \<Longrightarrow> vwelldefined' val
 4. \<And>\<Gamma> t css name \<Gamma>' cs u u' env uv_ rhs val. \<lbrakk>\<Gamma> \<turnstile>\<^sub>v t \<down> Vrecabs css name \<Gamma>'; \<lbrakk>fdisjnt C (fmdom \<Gamma>); consts t |\<subseteq>| fmdom \<Gamma> |\<union>| C; fmpred (\<lambda>_. vwelldefined') \<Gamma>; pre_strong_term_class.wellformed t; wellformed_venv \<Gamma>; \<not> shadows_consts t; not_shadows_vconsts_env \<Gamma>\<rbrakk> \<Longrightarrow> vwelldefined' (Vrecabs css name \<Gamma>'); fmlookup css name = Some cs; \<Gamma> \<turnstile>\<^sub>v u \<down> u'; \<lbrakk>fdisjnt C (fmdom \<Gamma>); consts u |\<subseteq>| fmdom \<Gamma> |\<union>| C; fmpred (\<lambda>_. vwelldefined') \<Gamma>; pre_strong_term_class.wellformed u; wellformed_venv \<Gamma>; \<not> shadows_consts u; not_shadows_vconsts_env \<Gamma>\<rbrakk> \<Longrightarrow> vwelldefined' u'; vfind_match cs u' = Some (env, uv_, rhs); \<Gamma>' ++\<^sub>f mk_rec_env css \<Gamma>' ++\<^sub>f env \<turnstile>\<^sub>v rhs \<down> val; \<lbrakk>fdisjnt C (fmdom (\<Gamma>' ++\<^sub>f mk_rec_env css \<Gamma>' ++\<^sub>f env)); consts rhs |\<subseteq>| fmdom (\<Gamma>' ++\<^sub>f mk_rec_env css \<Gamma>' ++\<^sub>f env) |\<union>| C; fmpred (\<lambda>_. vwelldefined') (\<Gamma>' ++\<^sub>f mk_rec_env css \<Gamma>' ++\<^sub>f env); pre_strong_term_class.wellformed rhs; wellformed_venv (\<Gamma>' ++\<^sub>f mk_rec_env css \<Gamma>' ++\<^sub>f env); \<not> shadows_consts rhs; not_shadows_vconsts_env (\<Gamma>' ++\<^sub>f mk_rec_env css \<Gamma>' ++\<^sub>f env)\<rbrakk> \<Longrightarrow> vwelldefined' val; fdisjnt C (fmdom \<Gamma>); consts (t $\<^sub>s u) |\<subseteq>| fmdom \<Gamma> |\<union>| C; fmpred (\<lambda>_. vwelldefined') \<Gamma>; pre_strong_term_class.wellformed (t $\<^sub>s u); wellformed_venv \<Gamma>; \<not> shadows_consts (t $\<^sub>s u); not_shadows_vconsts_env \<Gamma>\<rbrakk> \<Longrightarrow> vwelldefined' val
 5. \<And>name \<Gamma> ts us. \<lbrakk>name |\<in>| C; list_all2 (\<lambda>x1 x2. \<Gamma> \<turnstile>\<^sub>v x1 \<down> x2 \<and> (fdisjnt C (fmdom \<Gamma>) \<longrightarrow> consts x1 |\<subseteq>| fmdom \<Gamma> |\<union>| C \<longrightarrow> fmpred (\<lambda>_. vwelldefined') \<Gamma> \<longrightarrow> pre_strong_term_class.wellformed x1 \<longrightarrow> wellformed_venv \<Gamma> \<longrightarrow> \<not> shadows_consts x1 \<longrightarrow> not_shadows_vconsts_env \<Gamma> \<longrightarrow> vwelldefined' x2)) ts us; fdisjnt C (fmdom \<Gamma>); consts (name $$ ts) |\<subseteq>| fmdom \<Gamma> |\<union>| C; fmpred (\<lambda>_. vwelldefined') \<Gamma>; pre_strong_term_class.wellformed (name $$ ts); wellformed_venv \<Gamma>; \<not> shadows_consts (name $$ ts); not_shadows_vconsts_env \<Gamma>\<rbrakk> \<Longrightarrow> vwelldefined' (Vconstr name us)
[PROOF STEP]
case (comb \<Gamma> t cs \<Gamma>' u u' env pat rhs val)
[PROOF STATE]
proof (state)
this:
\<Gamma> \<turnstile>\<^sub>v t \<down> Vabs cs \<Gamma>'
\<Gamma> \<turnstile>\<^sub>v u \<down> u'
vfind_match cs u' = Some (env, pat, rhs)
\<Gamma>' ++\<^sub>f env \<turnstile>\<^sub>v rhs \<down> val
\<lbrakk>fdisjnt C (fmdom \<Gamma>); consts t |\<subseteq>| fmdom \<Gamma> |\<union>| C; fmpred (\<lambda>_. vwelldefined') \<Gamma>; pre_strong_term_class.wellformed t; wellformed_venv \<Gamma>; \<not> shadows_consts t; not_shadows_vconsts_env \<Gamma>\<rbrakk> \<Longrightarrow> vwelldefined' (Vabs cs \<Gamma>')
\<lbrakk>fdisjnt C (fmdom \<Gamma>); consts u |\<subseteq>| fmdom \<Gamma> |\<union>| C; fmpred (\<lambda>_. vwelldefined') \<Gamma>; pre_strong_term_class.wellformed u; wellformed_venv \<Gamma>; \<not> shadows_consts u; not_shadows_vconsts_env \<Gamma>\<rbrakk> \<Longrightarrow> vwelldefined' u'
\<lbrakk>fdisjnt C (fmdom (\<Gamma>' ++\<^sub>f env)); consts rhs |\<subseteq>| fmdom (\<Gamma>' ++\<^sub>f env) |\<union>| C; fmpred (\<lambda>_. vwelldefined') (\<Gamma>' ++\<^sub>f env); pre_strong_term_class.wellformed rhs; wellformed_venv (\<Gamma>' ++\<^sub>f env); \<not> shadows_consts rhs; not_shadows_vconsts_env (\<Gamma>' ++\<^sub>f env)\<rbrakk> \<Longrightarrow> vwelldefined' val
fdisjnt C (fmdom \<Gamma>)
consts (t $\<^sub>s u) |\<subseteq>| fmdom \<Gamma> |\<union>| C
fmpred (\<lambda>_. vwelldefined') \<Gamma>
pre_strong_term_class.wellformed (t $\<^sub>s u)
wellformed_venv \<Gamma>
\<not> shadows_consts (t $\<^sub>s u)
not_shadows_vconsts_env \<Gamma>

goal (5 subgoals):
 1. \<And>name \<Gamma> val. \<lbrakk>name |\<notin>| C; fmlookup \<Gamma> name = Some val; fdisjnt C (fmdom \<Gamma>); consts (Sconst name) |\<subseteq>| fmdom \<Gamma> |\<union>| C; fmpred (\<lambda>_. vwelldefined') \<Gamma>; pre_strong_term_class.wellformed (Sconst name); wellformed_venv \<Gamma>; \<not> shadows_consts (Sconst name); not_shadows_vconsts_env \<Gamma>\<rbrakk> \<Longrightarrow> vwelldefined' val
 2. \<And>\<Gamma> name val. \<lbrakk>fmlookup \<Gamma> name = Some val; fdisjnt C (fmdom \<Gamma>); consts (Svar name) |\<subseteq>| fmdom \<Gamma> |\<union>| C; fmpred (\<lambda>_. vwelldefined') \<Gamma>; pre_strong_term_class.wellformed (Svar name); wellformed_venv \<Gamma>; \<not> shadows_consts (Svar name); not_shadows_vconsts_env \<Gamma>\<rbrakk> \<Longrightarrow> vwelldefined' val
 3. \<And>\<Gamma> t cs \<Gamma>' u u' env uu_ rhs val. \<lbrakk>\<Gamma> \<turnstile>\<^sub>v t \<down> Vabs cs \<Gamma>'; \<lbrakk>fdisjnt C (fmdom \<Gamma>); consts t |\<subseteq>| fmdom \<Gamma> |\<union>| C; fmpred (\<lambda>_. vwelldefined') \<Gamma>; pre_strong_term_class.wellformed t; wellformed_venv \<Gamma>; \<not> shadows_consts t; not_shadows_vconsts_env \<Gamma>\<rbrakk> \<Longrightarrow> vwelldefined' (Vabs cs \<Gamma>'); \<Gamma> \<turnstile>\<^sub>v u \<down> u'; \<lbrakk>fdisjnt C (fmdom \<Gamma>); consts u |\<subseteq>| fmdom \<Gamma> |\<union>| C; fmpred (\<lambda>_. vwelldefined') \<Gamma>; pre_strong_term_class.wellformed u; wellformed_venv \<Gamma>; \<not> shadows_consts u; not_shadows_vconsts_env \<Gamma>\<rbrakk> \<Longrightarrow> vwelldefined' u'; vfind_match cs u' = Some (env, uu_, rhs); \<Gamma>' ++\<^sub>f env \<turnstile>\<^sub>v rhs \<down> val; \<lbrakk>fdisjnt C (fmdom (\<Gamma>' ++\<^sub>f env)); consts rhs |\<subseteq>| fmdom (\<Gamma>' ++\<^sub>f env) |\<union>| C; fmpred (\<lambda>_. vwelldefined') (\<Gamma>' ++\<^sub>f env); pre_strong_term_class.wellformed rhs; wellformed_venv (\<Gamma>' ++\<^sub>f env); \<not> shadows_consts rhs; not_shadows_vconsts_env (\<Gamma>' ++\<^sub>f env)\<rbrakk> \<Longrightarrow> vwelldefined' val; fdisjnt C (fmdom \<Gamma>); consts (t $\<^sub>s u) |\<subseteq>| fmdom \<Gamma> |\<union>| C; fmpred (\<lambda>_. vwelldefined') \<Gamma>; pre_strong_term_class.wellformed (t $\<^sub>s u); wellformed_venv \<Gamma>; \<not> shadows_consts (t $\<^sub>s u); not_shadows_vconsts_env \<Gamma>\<rbrakk> \<Longrightarrow> vwelldefined' val
 4. \<And>\<Gamma> t css name \<Gamma>' cs u u' env uv_ rhs val. \<lbrakk>\<Gamma> \<turnstile>\<^sub>v t \<down> Vrecabs css name \<Gamma>'; \<lbrakk>fdisjnt C (fmdom \<Gamma>); consts t |\<subseteq>| fmdom \<Gamma> |\<union>| C; fmpred (\<lambda>_. vwelldefined') \<Gamma>; pre_strong_term_class.wellformed t; wellformed_venv \<Gamma>; \<not> shadows_consts t; not_shadows_vconsts_env \<Gamma>\<rbrakk> \<Longrightarrow> vwelldefined' (Vrecabs css name \<Gamma>'); fmlookup css name = Some cs; \<Gamma> \<turnstile>\<^sub>v u \<down> u'; \<lbrakk>fdisjnt C (fmdom \<Gamma>); consts u |\<subseteq>| fmdom \<Gamma> |\<union>| C; fmpred (\<lambda>_. vwelldefined') \<Gamma>; pre_strong_term_class.wellformed u; wellformed_venv \<Gamma>; \<not> shadows_consts u; not_shadows_vconsts_env \<Gamma>\<rbrakk> \<Longrightarrow> vwelldefined' u'; vfind_match cs u' = Some (env, uv_, rhs); \<Gamma>' ++\<^sub>f mk_rec_env css \<Gamma>' ++\<^sub>f env \<turnstile>\<^sub>v rhs \<down> val; \<lbrakk>fdisjnt C (fmdom (\<Gamma>' ++\<^sub>f mk_rec_env css \<Gamma>' ++\<^sub>f env)); consts rhs |\<subseteq>| fmdom (\<Gamma>' ++\<^sub>f mk_rec_env css \<Gamma>' ++\<^sub>f env) |\<union>| C; fmpred (\<lambda>_. vwelldefined') (\<Gamma>' ++\<^sub>f mk_rec_env css \<Gamma>' ++\<^sub>f env); pre_strong_term_class.wellformed rhs; wellformed_venv (\<Gamma>' ++\<^sub>f mk_rec_env css \<Gamma>' ++\<^sub>f env); \<not> shadows_consts rhs; not_shadows_vconsts_env (\<Gamma>' ++\<^sub>f mk_rec_env css \<Gamma>' ++\<^sub>f env)\<rbrakk> \<Longrightarrow> vwelldefined' val; fdisjnt C (fmdom \<Gamma>); consts (t $\<^sub>s u) |\<subseteq>| fmdom \<Gamma> |\<union>| C; fmpred (\<lambda>_. vwelldefined') \<Gamma>; pre_strong_term_class.wellformed (t $\<^sub>s u); wellformed_venv \<Gamma>; \<not> shadows_consts (t $\<^sub>s u); not_shadows_vconsts_env \<Gamma>\<rbrakk> \<Longrightarrow> vwelldefined' val
 5. \<And>name \<Gamma> ts us. \<lbrakk>name |\<in>| C; list_all2 (\<lambda>x1 x2. \<Gamma> \<turnstile>\<^sub>v x1 \<down> x2 \<and> (fdisjnt C (fmdom \<Gamma>) \<longrightarrow> consts x1 |\<subseteq>| fmdom \<Gamma> |\<union>| C \<longrightarrow> fmpred (\<lambda>_. vwelldefined') \<Gamma> \<longrightarrow> pre_strong_term_class.wellformed x1 \<longrightarrow> wellformed_venv \<Gamma> \<longrightarrow> \<not> shadows_consts x1 \<longrightarrow> not_shadows_vconsts_env \<Gamma> \<longrightarrow> vwelldefined' x2)) ts us; fdisjnt C (fmdom \<Gamma>); consts (name $$ ts) |\<subseteq>| fmdom \<Gamma> |\<union>| C; fmpred (\<lambda>_. vwelldefined') \<Gamma>; pre_strong_term_class.wellformed (name $$ ts); wellformed_venv \<Gamma>; \<not> shadows_consts (name $$ ts); not_shadows_vconsts_env \<Gamma>\<rbrakk> \<Longrightarrow> vwelldefined' (Vconstr name us)
[PROOF STEP]
hence "(pat, rhs) \<in> set cs"
[PROOF STATE]
proof (prove)
using this:
\<Gamma> \<turnstile>\<^sub>v t \<down> Vabs cs \<Gamma>'
\<Gamma> \<turnstile>\<^sub>v u \<down> u'
vfind_match cs u' = Some (env, pat, rhs)
\<Gamma>' ++\<^sub>f env \<turnstile>\<^sub>v rhs \<down> val
\<lbrakk>fdisjnt C (fmdom \<Gamma>); consts t |\<subseteq>| fmdom \<Gamma> |\<union>| C; fmpred (\<lambda>_. vwelldefined') \<Gamma>; pre_strong_term_class.wellformed t; wellformed_venv \<Gamma>; \<not> shadows_consts t; not_shadows_vconsts_env \<Gamma>\<rbrakk> \<Longrightarrow> vwelldefined' (Vabs cs \<Gamma>')
\<lbrakk>fdisjnt C (fmdom \<Gamma>); consts u |\<subseteq>| fmdom \<Gamma> |\<union>| C; fmpred (\<lambda>_. vwelldefined') \<Gamma>; pre_strong_term_class.wellformed u; wellformed_venv \<Gamma>; \<not> shadows_consts u; not_shadows_vconsts_env \<Gamma>\<rbrakk> \<Longrightarrow> vwelldefined' u'
\<lbrakk>fdisjnt C (fmdom (\<Gamma>' ++\<^sub>f env)); consts rhs |\<subseteq>| fmdom (\<Gamma>' ++\<^sub>f env) |\<union>| C; fmpred (\<lambda>_. vwelldefined') (\<Gamma>' ++\<^sub>f env); pre_strong_term_class.wellformed rhs; wellformed_venv (\<Gamma>' ++\<^sub>f env); \<not> shadows_consts rhs; not_shadows_vconsts_env (\<Gamma>' ++\<^sub>f env)\<rbrakk> \<Longrightarrow> vwelldefined' val
fdisjnt C (fmdom \<Gamma>)
consts (t $\<^sub>s u) |\<subseteq>| fmdom \<Gamma> |\<union>| C
fmpred (\<lambda>_. vwelldefined') \<Gamma>
pre_strong_term_class.wellformed (t $\<^sub>s u)
wellformed_venv \<Gamma>
\<not> shadows_consts (t $\<^sub>s u)
not_shadows_vconsts_env \<Gamma>

goal (1 subgoal):
 1. (pat, rhs) \<in> set cs
[PROOF STEP]
by (auto dest: vfind_match_elem)
[PROOF STATE]
proof (state)
this:
(pat, rhs) \<in> set cs

goal (5 subgoals):
 1. \<And>name \<Gamma> val. \<lbrakk>name |\<notin>| C; fmlookup \<Gamma> name = Some val; fdisjnt C (fmdom \<Gamma>); consts (Sconst name) |\<subseteq>| fmdom \<Gamma> |\<union>| C; fmpred (\<lambda>_. vwelldefined') \<Gamma>; pre_strong_term_class.wellformed (Sconst name); wellformed_venv \<Gamma>; \<not> shadows_consts (Sconst name); not_shadows_vconsts_env \<Gamma>\<rbrakk> \<Longrightarrow> vwelldefined' val
 2. \<And>\<Gamma> name val. \<lbrakk>fmlookup \<Gamma> name = Some val; fdisjnt C (fmdom \<Gamma>); consts (Svar name) |\<subseteq>| fmdom \<Gamma> |\<union>| C; fmpred (\<lambda>_. vwelldefined') \<Gamma>; pre_strong_term_class.wellformed (Svar name); wellformed_venv \<Gamma>; \<not> shadows_consts (Svar name); not_shadows_vconsts_env \<Gamma>\<rbrakk> \<Longrightarrow> vwelldefined' val
 3. \<And>\<Gamma> t cs \<Gamma>' u u' env uu_ rhs val. \<lbrakk>\<Gamma> \<turnstile>\<^sub>v t \<down> Vabs cs \<Gamma>'; \<lbrakk>fdisjnt C (fmdom \<Gamma>); consts t |\<subseteq>| fmdom \<Gamma> |\<union>| C; fmpred (\<lambda>_. vwelldefined') \<Gamma>; pre_strong_term_class.wellformed t; wellformed_venv \<Gamma>; \<not> shadows_consts t; not_shadows_vconsts_env \<Gamma>\<rbrakk> \<Longrightarrow> vwelldefined' (Vabs cs \<Gamma>'); \<Gamma> \<turnstile>\<^sub>v u \<down> u'; \<lbrakk>fdisjnt C (fmdom \<Gamma>); consts u |\<subseteq>| fmdom \<Gamma> |\<union>| C; fmpred (\<lambda>_. vwelldefined') \<Gamma>; pre_strong_term_class.wellformed u; wellformed_venv \<Gamma>; \<not> shadows_consts u; not_shadows_vconsts_env \<Gamma>\<rbrakk> \<Longrightarrow> vwelldefined' u'; vfind_match cs u' = Some (env, uu_, rhs); \<Gamma>' ++\<^sub>f env \<turnstile>\<^sub>v rhs \<down> val; \<lbrakk>fdisjnt C (fmdom (\<Gamma>' ++\<^sub>f env)); consts rhs |\<subseteq>| fmdom (\<Gamma>' ++\<^sub>f env) |\<union>| C; fmpred (\<lambda>_. vwelldefined') (\<Gamma>' ++\<^sub>f env); pre_strong_term_class.wellformed rhs; wellformed_venv (\<Gamma>' ++\<^sub>f env); \<not> shadows_consts rhs; not_shadows_vconsts_env (\<Gamma>' ++\<^sub>f env)\<rbrakk> \<Longrightarrow> vwelldefined' val; fdisjnt C (fmdom \<Gamma>); consts (t $\<^sub>s u) |\<subseteq>| fmdom \<Gamma> |\<union>| C; fmpred (\<lambda>_. vwelldefined') \<Gamma>; pre_strong_term_class.wellformed (t $\<^sub>s u); wellformed_venv \<Gamma>; \<not> shadows_consts (t $\<^sub>s u); not_shadows_vconsts_env \<Gamma>\<rbrakk> \<Longrightarrow> vwelldefined' val
 4. \<And>\<Gamma> t css name \<Gamma>' cs u u' env uv_ rhs val. \<lbrakk>\<Gamma> \<turnstile>\<^sub>v t \<down> Vrecabs css name \<Gamma>'; \<lbrakk>fdisjnt C (fmdom \<Gamma>); consts t |\<subseteq>| fmdom \<Gamma> |\<union>| C; fmpred (\<lambda>_. vwelldefined') \<Gamma>; pre_strong_term_class.wellformed t; wellformed_venv \<Gamma>; \<not> shadows_consts t; not_shadows_vconsts_env \<Gamma>\<rbrakk> \<Longrightarrow> vwelldefined' (Vrecabs css name \<Gamma>'); fmlookup css name = Some cs; \<Gamma> \<turnstile>\<^sub>v u \<down> u'; \<lbrakk>fdisjnt C (fmdom \<Gamma>); consts u |\<subseteq>| fmdom \<Gamma> |\<union>| C; fmpred (\<lambda>_. vwelldefined') \<Gamma>; pre_strong_term_class.wellformed u; wellformed_venv \<Gamma>; \<not> shadows_consts u; not_shadows_vconsts_env \<Gamma>\<rbrakk> \<Longrightarrow> vwelldefined' u'; vfind_match cs u' = Some (env, uv_, rhs); \<Gamma>' ++\<^sub>f mk_rec_env css \<Gamma>' ++\<^sub>f env \<turnstile>\<^sub>v rhs \<down> val; \<lbrakk>fdisjnt C (fmdom (\<Gamma>' ++\<^sub>f mk_rec_env css \<Gamma>' ++\<^sub>f env)); consts rhs |\<subseteq>| fmdom (\<Gamma>' ++\<^sub>f mk_rec_env css \<Gamma>' ++\<^sub>f env) |\<union>| C; fmpred (\<lambda>_. vwelldefined') (\<Gamma>' ++\<^sub>f mk_rec_env css \<Gamma>' ++\<^sub>f env); pre_strong_term_class.wellformed rhs; wellformed_venv (\<Gamma>' ++\<^sub>f mk_rec_env css \<Gamma>' ++\<^sub>f env); \<not> shadows_consts rhs; not_shadows_vconsts_env (\<Gamma>' ++\<^sub>f mk_rec_env css \<Gamma>' ++\<^sub>f env)\<rbrakk> \<Longrightarrow> vwelldefined' val; fdisjnt C (fmdom \<Gamma>); consts (t $\<^sub>s u) |\<subseteq>| fmdom \<Gamma> |\<union>| C; fmpred (\<lambda>_. vwelldefined') \<Gamma>; pre_strong_term_class.wellformed (t $\<^sub>s u); wellformed_venv \<Gamma>; \<not> shadows_consts (t $\<^sub>s u); not_shadows_vconsts_env \<Gamma>\<rbrakk> \<Longrightarrow> vwelldefined' val
 5. \<And>name \<Gamma> ts us. \<lbrakk>name |\<in>| C; list_all2 (\<lambda>x1 x2. \<Gamma> \<turnstile>\<^sub>v x1 \<down> x2 \<and> (fdisjnt C (fmdom \<Gamma>) \<longrightarrow> consts x1 |\<subseteq>| fmdom \<Gamma> |\<union>| C \<longrightarrow> fmpred (\<lambda>_. vwelldefined') \<Gamma> \<longrightarrow> pre_strong_term_class.wellformed x1 \<longrightarrow> wellformed_venv \<Gamma> \<longrightarrow> \<not> shadows_consts x1 \<longrightarrow> not_shadows_vconsts_env \<Gamma> \<longrightarrow> vwelldefined' x2)) ts us; fdisjnt C (fmdom \<Gamma>); consts (name $$ ts) |\<subseteq>| fmdom \<Gamma> |\<union>| C; fmpred (\<lambda>_. vwelldefined') \<Gamma>; pre_strong_term_class.wellformed (name $$ ts); wellformed_venv \<Gamma>; \<not> shadows_consts (name $$ ts); not_shadows_vconsts_env \<Gamma>\<rbrakk> \<Longrightarrow> vwelldefined' (Vconstr name us)
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
(pat, rhs) \<in> set cs

goal (5 subgoals):
 1. \<And>name \<Gamma> val. \<lbrakk>name |\<notin>| C; fmlookup \<Gamma> name = Some val; fdisjnt C (fmdom \<Gamma>); consts (Sconst name) |\<subseteq>| fmdom \<Gamma> |\<union>| C; fmpred (\<lambda>_. vwelldefined') \<Gamma>; pre_strong_term_class.wellformed (Sconst name); wellformed_venv \<Gamma>; \<not> shadows_consts (Sconst name); not_shadows_vconsts_env \<Gamma>\<rbrakk> \<Longrightarrow> vwelldefined' val
 2. \<And>\<Gamma> name val. \<lbrakk>fmlookup \<Gamma> name = Some val; fdisjnt C (fmdom \<Gamma>); consts (Svar name) |\<subseteq>| fmdom \<Gamma> |\<union>| C; fmpred (\<lambda>_. vwelldefined') \<Gamma>; pre_strong_term_class.wellformed (Svar name); wellformed_venv \<Gamma>; \<not> shadows_consts (Svar name); not_shadows_vconsts_env \<Gamma>\<rbrakk> \<Longrightarrow> vwelldefined' val
 3. \<And>\<Gamma> t cs \<Gamma>' u u' env uu_ rhs val. \<lbrakk>\<Gamma> \<turnstile>\<^sub>v t \<down> Vabs cs \<Gamma>'; \<lbrakk>fdisjnt C (fmdom \<Gamma>); consts t |\<subseteq>| fmdom \<Gamma> |\<union>| C; fmpred (\<lambda>_. vwelldefined') \<Gamma>; pre_strong_term_class.wellformed t; wellformed_venv \<Gamma>; \<not> shadows_consts t; not_shadows_vconsts_env \<Gamma>\<rbrakk> \<Longrightarrow> vwelldefined' (Vabs cs \<Gamma>'); \<Gamma> \<turnstile>\<^sub>v u \<down> u'; \<lbrakk>fdisjnt C (fmdom \<Gamma>); consts u |\<subseteq>| fmdom \<Gamma> |\<union>| C; fmpred (\<lambda>_. vwelldefined') \<Gamma>; pre_strong_term_class.wellformed u; wellformed_venv \<Gamma>; \<not> shadows_consts u; not_shadows_vconsts_env \<Gamma>\<rbrakk> \<Longrightarrow> vwelldefined' u'; vfind_match cs u' = Some (env, uu_, rhs); \<Gamma>' ++\<^sub>f env \<turnstile>\<^sub>v rhs \<down> val; \<lbrakk>fdisjnt C (fmdom (\<Gamma>' ++\<^sub>f env)); consts rhs |\<subseteq>| fmdom (\<Gamma>' ++\<^sub>f env) |\<union>| C; fmpred (\<lambda>_. vwelldefined') (\<Gamma>' ++\<^sub>f env); pre_strong_term_class.wellformed rhs; wellformed_venv (\<Gamma>' ++\<^sub>f env); \<not> shadows_consts rhs; not_shadows_vconsts_env (\<Gamma>' ++\<^sub>f env)\<rbrakk> \<Longrightarrow> vwelldefined' val; fdisjnt C (fmdom \<Gamma>); consts (t $\<^sub>s u) |\<subseteq>| fmdom \<Gamma> |\<union>| C; fmpred (\<lambda>_. vwelldefined') \<Gamma>; pre_strong_term_class.wellformed (t $\<^sub>s u); wellformed_venv \<Gamma>; \<not> shadows_consts (t $\<^sub>s u); not_shadows_vconsts_env \<Gamma>\<rbrakk> \<Longrightarrow> vwelldefined' val
 4. \<And>\<Gamma> t css name \<Gamma>' cs u u' env uv_ rhs val. \<lbrakk>\<Gamma> \<turnstile>\<^sub>v t \<down> Vrecabs css name \<Gamma>'; \<lbrakk>fdisjnt C (fmdom \<Gamma>); consts t |\<subseteq>| fmdom \<Gamma> |\<union>| C; fmpred (\<lambda>_. vwelldefined') \<Gamma>; pre_strong_term_class.wellformed t; wellformed_venv \<Gamma>; \<not> shadows_consts t; not_shadows_vconsts_env \<Gamma>\<rbrakk> \<Longrightarrow> vwelldefined' (Vrecabs css name \<Gamma>'); fmlookup css name = Some cs; \<Gamma> \<turnstile>\<^sub>v u \<down> u'; \<lbrakk>fdisjnt C (fmdom \<Gamma>); consts u |\<subseteq>| fmdom \<Gamma> |\<union>| C; fmpred (\<lambda>_. vwelldefined') \<Gamma>; pre_strong_term_class.wellformed u; wellformed_venv \<Gamma>; \<not> shadows_consts u; not_shadows_vconsts_env \<Gamma>\<rbrakk> \<Longrightarrow> vwelldefined' u'; vfind_match cs u' = Some (env, uv_, rhs); \<Gamma>' ++\<^sub>f mk_rec_env css \<Gamma>' ++\<^sub>f env \<turnstile>\<^sub>v rhs \<down> val; \<lbrakk>fdisjnt C (fmdom (\<Gamma>' ++\<^sub>f mk_rec_env css \<Gamma>' ++\<^sub>f env)); consts rhs |\<subseteq>| fmdom (\<Gamma>' ++\<^sub>f mk_rec_env css \<Gamma>' ++\<^sub>f env) |\<union>| C; fmpred (\<lambda>_. vwelldefined') (\<Gamma>' ++\<^sub>f mk_rec_env css \<Gamma>' ++\<^sub>f env); pre_strong_term_class.wellformed rhs; wellformed_venv (\<Gamma>' ++\<^sub>f mk_rec_env css \<Gamma>' ++\<^sub>f env); \<not> shadows_consts rhs; not_shadows_vconsts_env (\<Gamma>' ++\<^sub>f mk_rec_env css \<Gamma>' ++\<^sub>f env)\<rbrakk> \<Longrightarrow> vwelldefined' val; fdisjnt C (fmdom \<Gamma>); consts (t $\<^sub>s u) |\<subseteq>| fmdom \<Gamma> |\<union>| C; fmpred (\<lambda>_. vwelldefined') \<Gamma>; pre_strong_term_class.wellformed (t $\<^sub>s u); wellformed_venv \<Gamma>; \<not> shadows_consts (t $\<^sub>s u); not_shadows_vconsts_env \<Gamma>\<rbrakk> \<Longrightarrow> vwelldefined' val
 5. \<And>name \<Gamma> ts us. \<lbrakk>name |\<in>| C; list_all2 (\<lambda>x1 x2. \<Gamma> \<turnstile>\<^sub>v x1 \<down> x2 \<and> (fdisjnt C (fmdom \<Gamma>) \<longrightarrow> consts x1 |\<subseteq>| fmdom \<Gamma> |\<union>| C \<longrightarrow> fmpred (\<lambda>_. vwelldefined') \<Gamma> \<longrightarrow> pre_strong_term_class.wellformed x1 \<longrightarrow> wellformed_venv \<Gamma> \<longrightarrow> \<not> shadows_consts x1 \<longrightarrow> not_shadows_vconsts_env \<Gamma> \<longrightarrow> vwelldefined' x2)) ts us; fdisjnt C (fmdom \<Gamma>); consts (name $$ ts) |\<subseteq>| fmdom \<Gamma> |\<union>| C; fmpred (\<lambda>_. vwelldefined') \<Gamma>; pre_strong_term_class.wellformed (name $$ ts); wellformed_venv \<Gamma>; \<not> shadows_consts (name $$ ts); not_shadows_vconsts_env \<Gamma>\<rbrakk> \<Longrightarrow> vwelldefined' (Vconstr name us)
[PROOF STEP]
have "vwelldefined' (Vabs cs \<Gamma>')"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. vwelldefined' (Vabs cs \<Gamma>')
[PROOF STEP]
using comb
[PROOF STATE]
proof (prove)
using this:
\<Gamma> \<turnstile>\<^sub>v t \<down> Vabs cs \<Gamma>'
\<Gamma> \<turnstile>\<^sub>v u \<down> u'
vfind_match cs u' = Some (env, pat, rhs)
\<Gamma>' ++\<^sub>f env \<turnstile>\<^sub>v rhs \<down> val
\<lbrakk>fdisjnt C (fmdom \<Gamma>); consts t |\<subseteq>| fmdom \<Gamma> |\<union>| C; fmpred (\<lambda>_. vwelldefined') \<Gamma>; pre_strong_term_class.wellformed t; wellformed_venv \<Gamma>; \<not> shadows_consts t; not_shadows_vconsts_env \<Gamma>\<rbrakk> \<Longrightarrow> vwelldefined' (Vabs cs \<Gamma>')
\<lbrakk>fdisjnt C (fmdom \<Gamma>); consts u |\<subseteq>| fmdom \<Gamma> |\<union>| C; fmpred (\<lambda>_. vwelldefined') \<Gamma>; pre_strong_term_class.wellformed u; wellformed_venv \<Gamma>; \<not> shadows_consts u; not_shadows_vconsts_env \<Gamma>\<rbrakk> \<Longrightarrow> vwelldefined' u'
\<lbrakk>fdisjnt C (fmdom (\<Gamma>' ++\<^sub>f env)); consts rhs |\<subseteq>| fmdom (\<Gamma>' ++\<^sub>f env) |\<union>| C; fmpred (\<lambda>_. vwelldefined') (\<Gamma>' ++\<^sub>f env); pre_strong_term_class.wellformed rhs; wellformed_venv (\<Gamma>' ++\<^sub>f env); \<not> shadows_consts rhs; not_shadows_vconsts_env (\<Gamma>' ++\<^sub>f env)\<rbrakk> \<Longrightarrow> vwelldefined' val
fdisjnt C (fmdom \<Gamma>)
consts (t $\<^sub>s u) |\<subseteq>| fmdom \<Gamma> |\<union>| C
fmpred (\<lambda>_. vwelldefined') \<Gamma>
pre_strong_term_class.wellformed (t $\<^sub>s u)
wellformed_venv \<Gamma>
\<not> shadows_consts (t $\<^sub>s u)
not_shadows_vconsts_env \<Gamma>

goal (1 subgoal):
 1. vwelldefined' (Vabs cs \<Gamma>')
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
vwelldefined' (Vabs cs \<Gamma>')

goal (5 subgoals):
 1. \<And>name \<Gamma> val. \<lbrakk>name |\<notin>| C; fmlookup \<Gamma> name = Some val; fdisjnt C (fmdom \<Gamma>); consts (Sconst name) |\<subseteq>| fmdom \<Gamma> |\<union>| C; fmpred (\<lambda>_. vwelldefined') \<Gamma>; pre_strong_term_class.wellformed (Sconst name); wellformed_venv \<Gamma>; \<not> shadows_consts (Sconst name); not_shadows_vconsts_env \<Gamma>\<rbrakk> \<Longrightarrow> vwelldefined' val
 2. \<And>\<Gamma> name val. \<lbrakk>fmlookup \<Gamma> name = Some val; fdisjnt C (fmdom \<Gamma>); consts (Svar name) |\<subseteq>| fmdom \<Gamma> |\<union>| C; fmpred (\<lambda>_. vwelldefined') \<Gamma>; pre_strong_term_class.wellformed (Svar name); wellformed_venv \<Gamma>; \<not> shadows_consts (Svar name); not_shadows_vconsts_env \<Gamma>\<rbrakk> \<Longrightarrow> vwelldefined' val
 3. \<And>\<Gamma> t cs \<Gamma>' u u' env uu_ rhs val. \<lbrakk>\<Gamma> \<turnstile>\<^sub>v t \<down> Vabs cs \<Gamma>'; \<lbrakk>fdisjnt C (fmdom \<Gamma>); consts t |\<subseteq>| fmdom \<Gamma> |\<union>| C; fmpred (\<lambda>_. vwelldefined') \<Gamma>; pre_strong_term_class.wellformed t; wellformed_venv \<Gamma>; \<not> shadows_consts t; not_shadows_vconsts_env \<Gamma>\<rbrakk> \<Longrightarrow> vwelldefined' (Vabs cs \<Gamma>'); \<Gamma> \<turnstile>\<^sub>v u \<down> u'; \<lbrakk>fdisjnt C (fmdom \<Gamma>); consts u |\<subseteq>| fmdom \<Gamma> |\<union>| C; fmpred (\<lambda>_. vwelldefined') \<Gamma>; pre_strong_term_class.wellformed u; wellformed_venv \<Gamma>; \<not> shadows_consts u; not_shadows_vconsts_env \<Gamma>\<rbrakk> \<Longrightarrow> vwelldefined' u'; vfind_match cs u' = Some (env, uu_, rhs); \<Gamma>' ++\<^sub>f env \<turnstile>\<^sub>v rhs \<down> val; \<lbrakk>fdisjnt C (fmdom (\<Gamma>' ++\<^sub>f env)); consts rhs |\<subseteq>| fmdom (\<Gamma>' ++\<^sub>f env) |\<union>| C; fmpred (\<lambda>_. vwelldefined') (\<Gamma>' ++\<^sub>f env); pre_strong_term_class.wellformed rhs; wellformed_venv (\<Gamma>' ++\<^sub>f env); \<not> shadows_consts rhs; not_shadows_vconsts_env (\<Gamma>' ++\<^sub>f env)\<rbrakk> \<Longrightarrow> vwelldefined' val; fdisjnt C (fmdom \<Gamma>); consts (t $\<^sub>s u) |\<subseteq>| fmdom \<Gamma> |\<union>| C; fmpred (\<lambda>_. vwelldefined') \<Gamma>; pre_strong_term_class.wellformed (t $\<^sub>s u); wellformed_venv \<Gamma>; \<not> shadows_consts (t $\<^sub>s u); not_shadows_vconsts_env \<Gamma>\<rbrakk> \<Longrightarrow> vwelldefined' val
 4. \<And>\<Gamma> t css name \<Gamma>' cs u u' env uv_ rhs val. \<lbrakk>\<Gamma> \<turnstile>\<^sub>v t \<down> Vrecabs css name \<Gamma>'; \<lbrakk>fdisjnt C (fmdom \<Gamma>); consts t |\<subseteq>| fmdom \<Gamma> |\<union>| C; fmpred (\<lambda>_. vwelldefined') \<Gamma>; pre_strong_term_class.wellformed t; wellformed_venv \<Gamma>; \<not> shadows_consts t; not_shadows_vconsts_env \<Gamma>\<rbrakk> \<Longrightarrow> vwelldefined' (Vrecabs css name \<Gamma>'); fmlookup css name = Some cs; \<Gamma> \<turnstile>\<^sub>v u \<down> u'; \<lbrakk>fdisjnt C (fmdom \<Gamma>); consts u |\<subseteq>| fmdom \<Gamma> |\<union>| C; fmpred (\<lambda>_. vwelldefined') \<Gamma>; pre_strong_term_class.wellformed u; wellformed_venv \<Gamma>; \<not> shadows_consts u; not_shadows_vconsts_env \<Gamma>\<rbrakk> \<Longrightarrow> vwelldefined' u'; vfind_match cs u' = Some (env, uv_, rhs); \<Gamma>' ++\<^sub>f mk_rec_env css \<Gamma>' ++\<^sub>f env \<turnstile>\<^sub>v rhs \<down> val; \<lbrakk>fdisjnt C (fmdom (\<Gamma>' ++\<^sub>f mk_rec_env css \<Gamma>' ++\<^sub>f env)); consts rhs |\<subseteq>| fmdom (\<Gamma>' ++\<^sub>f mk_rec_env css \<Gamma>' ++\<^sub>f env) |\<union>| C; fmpred (\<lambda>_. vwelldefined') (\<Gamma>' ++\<^sub>f mk_rec_env css \<Gamma>' ++\<^sub>f env); pre_strong_term_class.wellformed rhs; wellformed_venv (\<Gamma>' ++\<^sub>f mk_rec_env css \<Gamma>' ++\<^sub>f env); \<not> shadows_consts rhs; not_shadows_vconsts_env (\<Gamma>' ++\<^sub>f mk_rec_env css \<Gamma>' ++\<^sub>f env)\<rbrakk> \<Longrightarrow> vwelldefined' val; fdisjnt C (fmdom \<Gamma>); consts (t $\<^sub>s u) |\<subseteq>| fmdom \<Gamma> |\<union>| C; fmpred (\<lambda>_. vwelldefined') \<Gamma>; pre_strong_term_class.wellformed (t $\<^sub>s u); wellformed_venv \<Gamma>; \<not> shadows_consts (t $\<^sub>s u); not_shadows_vconsts_env \<Gamma>\<rbrakk> \<Longrightarrow> vwelldefined' val
 5. \<And>name \<Gamma> ts us. \<lbrakk>name |\<in>| C; list_all2 (\<lambda>x1 x2. \<Gamma> \<turnstile>\<^sub>v x1 \<down> x2 \<and> (fdisjnt C (fmdom \<Gamma>) \<longrightarrow> consts x1 |\<subseteq>| fmdom \<Gamma> |\<union>| C \<longrightarrow> fmpred (\<lambda>_. vwelldefined') \<Gamma> \<longrightarrow> pre_strong_term_class.wellformed x1 \<longrightarrow> wellformed_venv \<Gamma> \<longrightarrow> \<not> shadows_consts x1 \<longrightarrow> not_shadows_vconsts_env \<Gamma> \<longrightarrow> vwelldefined' x2)) ts us; fdisjnt C (fmdom \<Gamma>); consts (name $$ ts) |\<subseteq>| fmdom \<Gamma> |\<union>| C; fmpred (\<lambda>_. vwelldefined') \<Gamma>; pre_strong_term_class.wellformed (name $$ ts); wellformed_venv \<Gamma>; \<not> shadows_consts (name $$ ts); not_shadows_vconsts_env \<Gamma>\<rbrakk> \<Longrightarrow> vwelldefined' (Vconstr name us)
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
(pat, rhs) \<in> set cs
vwelldefined' (Vabs cs \<Gamma>')
[PROOF STEP]
have "consts rhs |\<subseteq>| fmdom \<Gamma>' |\<union>| C"
[PROOF STATE]
proof (prove)
using this:
(pat, rhs) \<in> set cs
vwelldefined' (Vabs cs \<Gamma>')

goal (1 subgoal):
 1. consts rhs |\<subseteq>| fmdom \<Gamma>' |\<union>| C
[PROOF STEP]
by (auto simp: list_all_iff)
[PROOF STATE]
proof (state)
this:
consts rhs |\<subseteq>| fmdom \<Gamma>' |\<union>| C

goal (5 subgoals):
 1. \<And>name \<Gamma> val. \<lbrakk>name |\<notin>| C; fmlookup \<Gamma> name = Some val; fdisjnt C (fmdom \<Gamma>); consts (Sconst name) |\<subseteq>| fmdom \<Gamma> |\<union>| C; fmpred (\<lambda>_. vwelldefined') \<Gamma>; pre_strong_term_class.wellformed (Sconst name); wellformed_venv \<Gamma>; \<not> shadows_consts (Sconst name); not_shadows_vconsts_env \<Gamma>\<rbrakk> \<Longrightarrow> vwelldefined' val
 2. \<And>\<Gamma> name val. \<lbrakk>fmlookup \<Gamma> name = Some val; fdisjnt C (fmdom \<Gamma>); consts (Svar name) |\<subseteq>| fmdom \<Gamma> |\<union>| C; fmpred (\<lambda>_. vwelldefined') \<Gamma>; pre_strong_term_class.wellformed (Svar name); wellformed_venv \<Gamma>; \<not> shadows_consts (Svar name); not_shadows_vconsts_env \<Gamma>\<rbrakk> \<Longrightarrow> vwelldefined' val
 3. \<And>\<Gamma> t cs \<Gamma>' u u' env uu_ rhs val. \<lbrakk>\<Gamma> \<turnstile>\<^sub>v t \<down> Vabs cs \<Gamma>'; \<lbrakk>fdisjnt C (fmdom \<Gamma>); consts t |\<subseteq>| fmdom \<Gamma> |\<union>| C; fmpred (\<lambda>_. vwelldefined') \<Gamma>; pre_strong_term_class.wellformed t; wellformed_venv \<Gamma>; \<not> shadows_consts t; not_shadows_vconsts_env \<Gamma>\<rbrakk> \<Longrightarrow> vwelldefined' (Vabs cs \<Gamma>'); \<Gamma> \<turnstile>\<^sub>v u \<down> u'; \<lbrakk>fdisjnt C (fmdom \<Gamma>); consts u |\<subseteq>| fmdom \<Gamma> |\<union>| C; fmpred (\<lambda>_. vwelldefined') \<Gamma>; pre_strong_term_class.wellformed u; wellformed_venv \<Gamma>; \<not> shadows_consts u; not_shadows_vconsts_env \<Gamma>\<rbrakk> \<Longrightarrow> vwelldefined' u'; vfind_match cs u' = Some (env, uu_, rhs); \<Gamma>' ++\<^sub>f env \<turnstile>\<^sub>v rhs \<down> val; \<lbrakk>fdisjnt C (fmdom (\<Gamma>' ++\<^sub>f env)); consts rhs |\<subseteq>| fmdom (\<Gamma>' ++\<^sub>f env) |\<union>| C; fmpred (\<lambda>_. vwelldefined') (\<Gamma>' ++\<^sub>f env); pre_strong_term_class.wellformed rhs; wellformed_venv (\<Gamma>' ++\<^sub>f env); \<not> shadows_consts rhs; not_shadows_vconsts_env (\<Gamma>' ++\<^sub>f env)\<rbrakk> \<Longrightarrow> vwelldefined' val; fdisjnt C (fmdom \<Gamma>); consts (t $\<^sub>s u) |\<subseteq>| fmdom \<Gamma> |\<union>| C; fmpred (\<lambda>_. vwelldefined') \<Gamma>; pre_strong_term_class.wellformed (t $\<^sub>s u); wellformed_venv \<Gamma>; \<not> shadows_consts (t $\<^sub>s u); not_shadows_vconsts_env \<Gamma>\<rbrakk> \<Longrightarrow> vwelldefined' val
 4. \<And>\<Gamma> t css name \<Gamma>' cs u u' env uv_ rhs val. \<lbrakk>\<Gamma> \<turnstile>\<^sub>v t \<down> Vrecabs css name \<Gamma>'; \<lbrakk>fdisjnt C (fmdom \<Gamma>); consts t |\<subseteq>| fmdom \<Gamma> |\<union>| C; fmpred (\<lambda>_. vwelldefined') \<Gamma>; pre_strong_term_class.wellformed t; wellformed_venv \<Gamma>; \<not> shadows_consts t; not_shadows_vconsts_env \<Gamma>\<rbrakk> \<Longrightarrow> vwelldefined' (Vrecabs css name \<Gamma>'); fmlookup css name = Some cs; \<Gamma> \<turnstile>\<^sub>v u \<down> u'; \<lbrakk>fdisjnt C (fmdom \<Gamma>); consts u |\<subseteq>| fmdom \<Gamma> |\<union>| C; fmpred (\<lambda>_. vwelldefined') \<Gamma>; pre_strong_term_class.wellformed u; wellformed_venv \<Gamma>; \<not> shadows_consts u; not_shadows_vconsts_env \<Gamma>\<rbrakk> \<Longrightarrow> vwelldefined' u'; vfind_match cs u' = Some (env, uv_, rhs); \<Gamma>' ++\<^sub>f mk_rec_env css \<Gamma>' ++\<^sub>f env \<turnstile>\<^sub>v rhs \<down> val; \<lbrakk>fdisjnt C (fmdom (\<Gamma>' ++\<^sub>f mk_rec_env css \<Gamma>' ++\<^sub>f env)); consts rhs |\<subseteq>| fmdom (\<Gamma>' ++\<^sub>f mk_rec_env css \<Gamma>' ++\<^sub>f env) |\<union>| C; fmpred (\<lambda>_. vwelldefined') (\<Gamma>' ++\<^sub>f mk_rec_env css \<Gamma>' ++\<^sub>f env); pre_strong_term_class.wellformed rhs; wellformed_venv (\<Gamma>' ++\<^sub>f mk_rec_env css \<Gamma>' ++\<^sub>f env); \<not> shadows_consts rhs; not_shadows_vconsts_env (\<Gamma>' ++\<^sub>f mk_rec_env css \<Gamma>' ++\<^sub>f env)\<rbrakk> \<Longrightarrow> vwelldefined' val; fdisjnt C (fmdom \<Gamma>); consts (t $\<^sub>s u) |\<subseteq>| fmdom \<Gamma> |\<union>| C; fmpred (\<lambda>_. vwelldefined') \<Gamma>; pre_strong_term_class.wellformed (t $\<^sub>s u); wellformed_venv \<Gamma>; \<not> shadows_consts (t $\<^sub>s u); not_shadows_vconsts_env \<Gamma>\<rbrakk> \<Longrightarrow> vwelldefined' val
 5. \<And>name \<Gamma> ts us. \<lbrakk>name |\<in>| C; list_all2 (\<lambda>x1 x2. \<Gamma> \<turnstile>\<^sub>v x1 \<down> x2 \<and> (fdisjnt C (fmdom \<Gamma>) \<longrightarrow> consts x1 |\<subseteq>| fmdom \<Gamma> |\<union>| C \<longrightarrow> fmpred (\<lambda>_. vwelldefined') \<Gamma> \<longrightarrow> pre_strong_term_class.wellformed x1 \<longrightarrow> wellformed_venv \<Gamma> \<longrightarrow> \<not> shadows_consts x1 \<longrightarrow> not_shadows_vconsts_env \<Gamma> \<longrightarrow> vwelldefined' x2)) ts us; fdisjnt C (fmdom \<Gamma>); consts (name $$ ts) |\<subseteq>| fmdom \<Gamma> |\<union>| C; fmpred (\<lambda>_. vwelldefined') \<Gamma>; pre_strong_term_class.wellformed (name $$ ts); wellformed_venv \<Gamma>; \<not> shadows_consts (name $$ ts); not_shadows_vconsts_env \<Gamma>\<rbrakk> \<Longrightarrow> vwelldefined' (Vconstr name us)
[PROOF STEP]
have "vwellformed (Vabs cs \<Gamma>')"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. vwellformed (Vabs cs \<Gamma>')
[PROOF STEP]
apply (rule veval'_wellformed)
[PROOF STATE]
proof (prove)
goal (3 subgoals):
 1. ?\<Gamma> \<turnstile>\<^sub>v ?t \<down> Vabs cs \<Gamma>'
 2. pre_strong_term_class.wellformed ?t
 3. wellformed_venv ?\<Gamma>
[PROOF STEP]
using comb
[PROOF STATE]
proof (prove)
using this:
\<Gamma> \<turnstile>\<^sub>v t \<down> Vabs cs \<Gamma>'
\<Gamma> \<turnstile>\<^sub>v u \<down> u'
vfind_match cs u' = Some (env, pat, rhs)
\<Gamma>' ++\<^sub>f env \<turnstile>\<^sub>v rhs \<down> val
\<lbrakk>fdisjnt C (fmdom \<Gamma>); consts t |\<subseteq>| fmdom \<Gamma> |\<union>| C; fmpred (\<lambda>_. vwelldefined') \<Gamma>; pre_strong_term_class.wellformed t; wellformed_venv \<Gamma>; \<not> shadows_consts t; not_shadows_vconsts_env \<Gamma>\<rbrakk> \<Longrightarrow> vwelldefined' (Vabs cs \<Gamma>')
\<lbrakk>fdisjnt C (fmdom \<Gamma>); consts u |\<subseteq>| fmdom \<Gamma> |\<union>| C; fmpred (\<lambda>_. vwelldefined') \<Gamma>; pre_strong_term_class.wellformed u; wellformed_venv \<Gamma>; \<not> shadows_consts u; not_shadows_vconsts_env \<Gamma>\<rbrakk> \<Longrightarrow> vwelldefined' u'
\<lbrakk>fdisjnt C (fmdom (\<Gamma>' ++\<^sub>f env)); consts rhs |\<subseteq>| fmdom (\<Gamma>' ++\<^sub>f env) |\<union>| C; fmpred (\<lambda>_. vwelldefined') (\<Gamma>' ++\<^sub>f env); pre_strong_term_class.wellformed rhs; wellformed_venv (\<Gamma>' ++\<^sub>f env); \<not> shadows_consts rhs; not_shadows_vconsts_env (\<Gamma>' ++\<^sub>f env)\<rbrakk> \<Longrightarrow> vwelldefined' val
fdisjnt C (fmdom \<Gamma>)
consts (t $\<^sub>s u) |\<subseteq>| fmdom \<Gamma> |\<union>| C
fmpred (\<lambda>_. vwelldefined') \<Gamma>
pre_strong_term_class.wellformed (t $\<^sub>s u)
wellformed_venv \<Gamma>
\<not> shadows_consts (t $\<^sub>s u)
not_shadows_vconsts_env \<Gamma>

goal (3 subgoals):
 1. ?\<Gamma> \<turnstile>\<^sub>v ?t \<down> Vabs cs \<Gamma>'
 2. pre_strong_term_class.wellformed ?t
 3. wellformed_venv ?\<Gamma>
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
vwellformed (Vabs cs \<Gamma>')

goal (5 subgoals):
 1. \<And>name \<Gamma> val. \<lbrakk>name |\<notin>| C; fmlookup \<Gamma> name = Some val; fdisjnt C (fmdom \<Gamma>); consts (Sconst name) |\<subseteq>| fmdom \<Gamma> |\<union>| C; fmpred (\<lambda>_. vwelldefined') \<Gamma>; pre_strong_term_class.wellformed (Sconst name); wellformed_venv \<Gamma>; \<not> shadows_consts (Sconst name); not_shadows_vconsts_env \<Gamma>\<rbrakk> \<Longrightarrow> vwelldefined' val
 2. \<And>\<Gamma> name val. \<lbrakk>fmlookup \<Gamma> name = Some val; fdisjnt C (fmdom \<Gamma>); consts (Svar name) |\<subseteq>| fmdom \<Gamma> |\<union>| C; fmpred (\<lambda>_. vwelldefined') \<Gamma>; pre_strong_term_class.wellformed (Svar name); wellformed_venv \<Gamma>; \<not> shadows_consts (Svar name); not_shadows_vconsts_env \<Gamma>\<rbrakk> \<Longrightarrow> vwelldefined' val
 3. \<And>\<Gamma> t cs \<Gamma>' u u' env uu_ rhs val. \<lbrakk>\<Gamma> \<turnstile>\<^sub>v t \<down> Vabs cs \<Gamma>'; \<lbrakk>fdisjnt C (fmdom \<Gamma>); consts t |\<subseteq>| fmdom \<Gamma> |\<union>| C; fmpred (\<lambda>_. vwelldefined') \<Gamma>; pre_strong_term_class.wellformed t; wellformed_venv \<Gamma>; \<not> shadows_consts t; not_shadows_vconsts_env \<Gamma>\<rbrakk> \<Longrightarrow> vwelldefined' (Vabs cs \<Gamma>'); \<Gamma> \<turnstile>\<^sub>v u \<down> u'; \<lbrakk>fdisjnt C (fmdom \<Gamma>); consts u |\<subseteq>| fmdom \<Gamma> |\<union>| C; fmpred (\<lambda>_. vwelldefined') \<Gamma>; pre_strong_term_class.wellformed u; wellformed_venv \<Gamma>; \<not> shadows_consts u; not_shadows_vconsts_env \<Gamma>\<rbrakk> \<Longrightarrow> vwelldefined' u'; vfind_match cs u' = Some (env, uu_, rhs); \<Gamma>' ++\<^sub>f env \<turnstile>\<^sub>v rhs \<down> val; \<lbrakk>fdisjnt C (fmdom (\<Gamma>' ++\<^sub>f env)); consts rhs |\<subseteq>| fmdom (\<Gamma>' ++\<^sub>f env) |\<union>| C; fmpred (\<lambda>_. vwelldefined') (\<Gamma>' ++\<^sub>f env); pre_strong_term_class.wellformed rhs; wellformed_venv (\<Gamma>' ++\<^sub>f env); \<not> shadows_consts rhs; not_shadows_vconsts_env (\<Gamma>' ++\<^sub>f env)\<rbrakk> \<Longrightarrow> vwelldefined' val; fdisjnt C (fmdom \<Gamma>); consts (t $\<^sub>s u) |\<subseteq>| fmdom \<Gamma> |\<union>| C; fmpred (\<lambda>_. vwelldefined') \<Gamma>; pre_strong_term_class.wellformed (t $\<^sub>s u); wellformed_venv \<Gamma>; \<not> shadows_consts (t $\<^sub>s u); not_shadows_vconsts_env \<Gamma>\<rbrakk> \<Longrightarrow> vwelldefined' val
 4. \<And>\<Gamma> t css name \<Gamma>' cs u u' env uv_ rhs val. \<lbrakk>\<Gamma> \<turnstile>\<^sub>v t \<down> Vrecabs css name \<Gamma>'; \<lbrakk>fdisjnt C (fmdom \<Gamma>); consts t |\<subseteq>| fmdom \<Gamma> |\<union>| C; fmpred (\<lambda>_. vwelldefined') \<Gamma>; pre_strong_term_class.wellformed t; wellformed_venv \<Gamma>; \<not> shadows_consts t; not_shadows_vconsts_env \<Gamma>\<rbrakk> \<Longrightarrow> vwelldefined' (Vrecabs css name \<Gamma>'); fmlookup css name = Some cs; \<Gamma> \<turnstile>\<^sub>v u \<down> u'; \<lbrakk>fdisjnt C (fmdom \<Gamma>); consts u |\<subseteq>| fmdom \<Gamma> |\<union>| C; fmpred (\<lambda>_. vwelldefined') \<Gamma>; pre_strong_term_class.wellformed u; wellformed_venv \<Gamma>; \<not> shadows_consts u; not_shadows_vconsts_env \<Gamma>\<rbrakk> \<Longrightarrow> vwelldefined' u'; vfind_match cs u' = Some (env, uv_, rhs); \<Gamma>' ++\<^sub>f mk_rec_env css \<Gamma>' ++\<^sub>f env \<turnstile>\<^sub>v rhs \<down> val; \<lbrakk>fdisjnt C (fmdom (\<Gamma>' ++\<^sub>f mk_rec_env css \<Gamma>' ++\<^sub>f env)); consts rhs |\<subseteq>| fmdom (\<Gamma>' ++\<^sub>f mk_rec_env css \<Gamma>' ++\<^sub>f env) |\<union>| C; fmpred (\<lambda>_. vwelldefined') (\<Gamma>' ++\<^sub>f mk_rec_env css \<Gamma>' ++\<^sub>f env); pre_strong_term_class.wellformed rhs; wellformed_venv (\<Gamma>' ++\<^sub>f mk_rec_env css \<Gamma>' ++\<^sub>f env); \<not> shadows_consts rhs; not_shadows_vconsts_env (\<Gamma>' ++\<^sub>f mk_rec_env css \<Gamma>' ++\<^sub>f env)\<rbrakk> \<Longrightarrow> vwelldefined' val; fdisjnt C (fmdom \<Gamma>); consts (t $\<^sub>s u) |\<subseteq>| fmdom \<Gamma> |\<union>| C; fmpred (\<lambda>_. vwelldefined') \<Gamma>; pre_strong_term_class.wellformed (t $\<^sub>s u); wellformed_venv \<Gamma>; \<not> shadows_consts (t $\<^sub>s u); not_shadows_vconsts_env \<Gamma>\<rbrakk> \<Longrightarrow> vwelldefined' val
 5. \<And>name \<Gamma> ts us. \<lbrakk>name |\<in>| C; list_all2 (\<lambda>x1 x2. \<Gamma> \<turnstile>\<^sub>v x1 \<down> x2 \<and> (fdisjnt C (fmdom \<Gamma>) \<longrightarrow> consts x1 |\<subseteq>| fmdom \<Gamma> |\<union>| C \<longrightarrow> fmpred (\<lambda>_. vwelldefined') \<Gamma> \<longrightarrow> pre_strong_term_class.wellformed x1 \<longrightarrow> wellformed_venv \<Gamma> \<longrightarrow> \<not> shadows_consts x1 \<longrightarrow> not_shadows_vconsts_env \<Gamma> \<longrightarrow> vwelldefined' x2)) ts us; fdisjnt C (fmdom \<Gamma>); consts (name $$ ts) |\<subseteq>| fmdom \<Gamma> |\<union>| C; fmpred (\<lambda>_. vwelldefined') \<Gamma>; pre_strong_term_class.wellformed (name $$ ts); wellformed_venv \<Gamma>; \<not> shadows_consts (name $$ ts); not_shadows_vconsts_env \<Gamma>\<rbrakk> \<Longrightarrow> vwelldefined' (Vconstr name us)
[PROOF STEP]
hence "linear pat"
[PROOF STATE]
proof (prove)
using this:
vwellformed (Vabs cs \<Gamma>')

goal (1 subgoal):
 1. linear pat
[PROOF STEP]
using \<open>(pat, rhs) \<in> set cs\<close>
[PROOF STATE]
proof (prove)
using this:
vwellformed (Vabs cs \<Gamma>')
(pat, rhs) \<in> set cs

goal (1 subgoal):
 1. linear pat
[PROOF STEP]
by (auto simp: list_all_iff)
[PROOF STATE]
proof (state)
this:
linear pat

goal (5 subgoals):
 1. \<And>name \<Gamma> val. \<lbrakk>name |\<notin>| C; fmlookup \<Gamma> name = Some val; fdisjnt C (fmdom \<Gamma>); consts (Sconst name) |\<subseteq>| fmdom \<Gamma> |\<union>| C; fmpred (\<lambda>_. vwelldefined') \<Gamma>; pre_strong_term_class.wellformed (Sconst name); wellformed_venv \<Gamma>; \<not> shadows_consts (Sconst name); not_shadows_vconsts_env \<Gamma>\<rbrakk> \<Longrightarrow> vwelldefined' val
 2. \<And>\<Gamma> name val. \<lbrakk>fmlookup \<Gamma> name = Some val; fdisjnt C (fmdom \<Gamma>); consts (Svar name) |\<subseteq>| fmdom \<Gamma> |\<union>| C; fmpred (\<lambda>_. vwelldefined') \<Gamma>; pre_strong_term_class.wellformed (Svar name); wellformed_venv \<Gamma>; \<not> shadows_consts (Svar name); not_shadows_vconsts_env \<Gamma>\<rbrakk> \<Longrightarrow> vwelldefined' val
 3. \<And>\<Gamma> t cs \<Gamma>' u u' env uu_ rhs val. \<lbrakk>\<Gamma> \<turnstile>\<^sub>v t \<down> Vabs cs \<Gamma>'; \<lbrakk>fdisjnt C (fmdom \<Gamma>); consts t |\<subseteq>| fmdom \<Gamma> |\<union>| C; fmpred (\<lambda>_. vwelldefined') \<Gamma>; pre_strong_term_class.wellformed t; wellformed_venv \<Gamma>; \<not> shadows_consts t; not_shadows_vconsts_env \<Gamma>\<rbrakk> \<Longrightarrow> vwelldefined' (Vabs cs \<Gamma>'); \<Gamma> \<turnstile>\<^sub>v u \<down> u'; \<lbrakk>fdisjnt C (fmdom \<Gamma>); consts u |\<subseteq>| fmdom \<Gamma> |\<union>| C; fmpred (\<lambda>_. vwelldefined') \<Gamma>; pre_strong_term_class.wellformed u; wellformed_venv \<Gamma>; \<not> shadows_consts u; not_shadows_vconsts_env \<Gamma>\<rbrakk> \<Longrightarrow> vwelldefined' u'; vfind_match cs u' = Some (env, uu_, rhs); \<Gamma>' ++\<^sub>f env \<turnstile>\<^sub>v rhs \<down> val; \<lbrakk>fdisjnt C (fmdom (\<Gamma>' ++\<^sub>f env)); consts rhs |\<subseteq>| fmdom (\<Gamma>' ++\<^sub>f env) |\<union>| C; fmpred (\<lambda>_. vwelldefined') (\<Gamma>' ++\<^sub>f env); pre_strong_term_class.wellformed rhs; wellformed_venv (\<Gamma>' ++\<^sub>f env); \<not> shadows_consts rhs; not_shadows_vconsts_env (\<Gamma>' ++\<^sub>f env)\<rbrakk> \<Longrightarrow> vwelldefined' val; fdisjnt C (fmdom \<Gamma>); consts (t $\<^sub>s u) |\<subseteq>| fmdom \<Gamma> |\<union>| C; fmpred (\<lambda>_. vwelldefined') \<Gamma>; pre_strong_term_class.wellformed (t $\<^sub>s u); wellformed_venv \<Gamma>; \<not> shadows_consts (t $\<^sub>s u); not_shadows_vconsts_env \<Gamma>\<rbrakk> \<Longrightarrow> vwelldefined' val
 4. \<And>\<Gamma> t css name \<Gamma>' cs u u' env uv_ rhs val. \<lbrakk>\<Gamma> \<turnstile>\<^sub>v t \<down> Vrecabs css name \<Gamma>'; \<lbrakk>fdisjnt C (fmdom \<Gamma>); consts t |\<subseteq>| fmdom \<Gamma> |\<union>| C; fmpred (\<lambda>_. vwelldefined') \<Gamma>; pre_strong_term_class.wellformed t; wellformed_venv \<Gamma>; \<not> shadows_consts t; not_shadows_vconsts_env \<Gamma>\<rbrakk> \<Longrightarrow> vwelldefined' (Vrecabs css name \<Gamma>'); fmlookup css name = Some cs; \<Gamma> \<turnstile>\<^sub>v u \<down> u'; \<lbrakk>fdisjnt C (fmdom \<Gamma>); consts u |\<subseteq>| fmdom \<Gamma> |\<union>| C; fmpred (\<lambda>_. vwelldefined') \<Gamma>; pre_strong_term_class.wellformed u; wellformed_venv \<Gamma>; \<not> shadows_consts u; not_shadows_vconsts_env \<Gamma>\<rbrakk> \<Longrightarrow> vwelldefined' u'; vfind_match cs u' = Some (env, uv_, rhs); \<Gamma>' ++\<^sub>f mk_rec_env css \<Gamma>' ++\<^sub>f env \<turnstile>\<^sub>v rhs \<down> val; \<lbrakk>fdisjnt C (fmdom (\<Gamma>' ++\<^sub>f mk_rec_env css \<Gamma>' ++\<^sub>f env)); consts rhs |\<subseteq>| fmdom (\<Gamma>' ++\<^sub>f mk_rec_env css \<Gamma>' ++\<^sub>f env) |\<union>| C; fmpred (\<lambda>_. vwelldefined') (\<Gamma>' ++\<^sub>f mk_rec_env css \<Gamma>' ++\<^sub>f env); pre_strong_term_class.wellformed rhs; wellformed_venv (\<Gamma>' ++\<^sub>f mk_rec_env css \<Gamma>' ++\<^sub>f env); \<not> shadows_consts rhs; not_shadows_vconsts_env (\<Gamma>' ++\<^sub>f mk_rec_env css \<Gamma>' ++\<^sub>f env)\<rbrakk> \<Longrightarrow> vwelldefined' val; fdisjnt C (fmdom \<Gamma>); consts (t $\<^sub>s u) |\<subseteq>| fmdom \<Gamma> |\<union>| C; fmpred (\<lambda>_. vwelldefined') \<Gamma>; pre_strong_term_class.wellformed (t $\<^sub>s u); wellformed_venv \<Gamma>; \<not> shadows_consts (t $\<^sub>s u); not_shadows_vconsts_env \<Gamma>\<rbrakk> \<Longrightarrow> vwelldefined' val
 5. \<And>name \<Gamma> ts us. \<lbrakk>name |\<in>| C; list_all2 (\<lambda>x1 x2. \<Gamma> \<turnstile>\<^sub>v x1 \<down> x2 \<and> (fdisjnt C (fmdom \<Gamma>) \<longrightarrow> consts x1 |\<subseteq>| fmdom \<Gamma> |\<union>| C \<longrightarrow> fmpred (\<lambda>_. vwelldefined') \<Gamma> \<longrightarrow> pre_strong_term_class.wellformed x1 \<longrightarrow> wellformed_venv \<Gamma> \<longrightarrow> \<not> shadows_consts x1 \<longrightarrow> not_shadows_vconsts_env \<Gamma> \<longrightarrow> vwelldefined' x2)) ts us; fdisjnt C (fmdom \<Gamma>); consts (name $$ ts) |\<subseteq>| fmdom \<Gamma> |\<union>| C; fmpred (\<lambda>_. vwelldefined') \<Gamma>; pre_strong_term_class.wellformed (name $$ ts); wellformed_venv \<Gamma>; \<not> shadows_consts (name $$ ts); not_shadows_vconsts_env \<Gamma>\<rbrakk> \<Longrightarrow> vwelldefined' (Vconstr name us)
[PROOF STEP]
hence "frees pat = patvars (mk_pat pat)"
[PROOF STATE]
proof (prove)
using this:
linear pat

goal (1 subgoal):
 1. frees pat = patvars (mk_pat pat)
[PROOF STEP]
by (simp add: mk_pat_frees)
[PROOF STATE]
proof (state)
this:
frees pat = patvars (mk_pat pat)

goal (5 subgoals):
 1. \<And>name \<Gamma> val. \<lbrakk>name |\<notin>| C; fmlookup \<Gamma> name = Some val; fdisjnt C (fmdom \<Gamma>); consts (Sconst name) |\<subseteq>| fmdom \<Gamma> |\<union>| C; fmpred (\<lambda>_. vwelldefined') \<Gamma>; pre_strong_term_class.wellformed (Sconst name); wellformed_venv \<Gamma>; \<not> shadows_consts (Sconst name); not_shadows_vconsts_env \<Gamma>\<rbrakk> \<Longrightarrow> vwelldefined' val
 2. \<And>\<Gamma> name val. \<lbrakk>fmlookup \<Gamma> name = Some val; fdisjnt C (fmdom \<Gamma>); consts (Svar name) |\<subseteq>| fmdom \<Gamma> |\<union>| C; fmpred (\<lambda>_. vwelldefined') \<Gamma>; pre_strong_term_class.wellformed (Svar name); wellformed_venv \<Gamma>; \<not> shadows_consts (Svar name); not_shadows_vconsts_env \<Gamma>\<rbrakk> \<Longrightarrow> vwelldefined' val
 3. \<And>\<Gamma> t cs \<Gamma>' u u' env uu_ rhs val. \<lbrakk>\<Gamma> \<turnstile>\<^sub>v t \<down> Vabs cs \<Gamma>'; \<lbrakk>fdisjnt C (fmdom \<Gamma>); consts t |\<subseteq>| fmdom \<Gamma> |\<union>| C; fmpred (\<lambda>_. vwelldefined') \<Gamma>; pre_strong_term_class.wellformed t; wellformed_venv \<Gamma>; \<not> shadows_consts t; not_shadows_vconsts_env \<Gamma>\<rbrakk> \<Longrightarrow> vwelldefined' (Vabs cs \<Gamma>'); \<Gamma> \<turnstile>\<^sub>v u \<down> u'; \<lbrakk>fdisjnt C (fmdom \<Gamma>); consts u |\<subseteq>| fmdom \<Gamma> |\<union>| C; fmpred (\<lambda>_. vwelldefined') \<Gamma>; pre_strong_term_class.wellformed u; wellformed_venv \<Gamma>; \<not> shadows_consts u; not_shadows_vconsts_env \<Gamma>\<rbrakk> \<Longrightarrow> vwelldefined' u'; vfind_match cs u' = Some (env, uu_, rhs); \<Gamma>' ++\<^sub>f env \<turnstile>\<^sub>v rhs \<down> val; \<lbrakk>fdisjnt C (fmdom (\<Gamma>' ++\<^sub>f env)); consts rhs |\<subseteq>| fmdom (\<Gamma>' ++\<^sub>f env) |\<union>| C; fmpred (\<lambda>_. vwelldefined') (\<Gamma>' ++\<^sub>f env); pre_strong_term_class.wellformed rhs; wellformed_venv (\<Gamma>' ++\<^sub>f env); \<not> shadows_consts rhs; not_shadows_vconsts_env (\<Gamma>' ++\<^sub>f env)\<rbrakk> \<Longrightarrow> vwelldefined' val; fdisjnt C (fmdom \<Gamma>); consts (t $\<^sub>s u) |\<subseteq>| fmdom \<Gamma> |\<union>| C; fmpred (\<lambda>_. vwelldefined') \<Gamma>; pre_strong_term_class.wellformed (t $\<^sub>s u); wellformed_venv \<Gamma>; \<not> shadows_consts (t $\<^sub>s u); not_shadows_vconsts_env \<Gamma>\<rbrakk> \<Longrightarrow> vwelldefined' val
 4. \<And>\<Gamma> t css name \<Gamma>' cs u u' env uv_ rhs val. \<lbrakk>\<Gamma> \<turnstile>\<^sub>v t \<down> Vrecabs css name \<Gamma>'; \<lbrakk>fdisjnt C (fmdom \<Gamma>); consts t |\<subseteq>| fmdom \<Gamma> |\<union>| C; fmpred (\<lambda>_. vwelldefined') \<Gamma>; pre_strong_term_class.wellformed t; wellformed_venv \<Gamma>; \<not> shadows_consts t; not_shadows_vconsts_env \<Gamma>\<rbrakk> \<Longrightarrow> vwelldefined' (Vrecabs css name \<Gamma>'); fmlookup css name = Some cs; \<Gamma> \<turnstile>\<^sub>v u \<down> u'; \<lbrakk>fdisjnt C (fmdom \<Gamma>); consts u |\<subseteq>| fmdom \<Gamma> |\<union>| C; fmpred (\<lambda>_. vwelldefined') \<Gamma>; pre_strong_term_class.wellformed u; wellformed_venv \<Gamma>; \<not> shadows_consts u; not_shadows_vconsts_env \<Gamma>\<rbrakk> \<Longrightarrow> vwelldefined' u'; vfind_match cs u' = Some (env, uv_, rhs); \<Gamma>' ++\<^sub>f mk_rec_env css \<Gamma>' ++\<^sub>f env \<turnstile>\<^sub>v rhs \<down> val; \<lbrakk>fdisjnt C (fmdom (\<Gamma>' ++\<^sub>f mk_rec_env css \<Gamma>' ++\<^sub>f env)); consts rhs |\<subseteq>| fmdom (\<Gamma>' ++\<^sub>f mk_rec_env css \<Gamma>' ++\<^sub>f env) |\<union>| C; fmpred (\<lambda>_. vwelldefined') (\<Gamma>' ++\<^sub>f mk_rec_env css \<Gamma>' ++\<^sub>f env); pre_strong_term_class.wellformed rhs; wellformed_venv (\<Gamma>' ++\<^sub>f mk_rec_env css \<Gamma>' ++\<^sub>f env); \<not> shadows_consts rhs; not_shadows_vconsts_env (\<Gamma>' ++\<^sub>f mk_rec_env css \<Gamma>' ++\<^sub>f env)\<rbrakk> \<Longrightarrow> vwelldefined' val; fdisjnt C (fmdom \<Gamma>); consts (t $\<^sub>s u) |\<subseteq>| fmdom \<Gamma> |\<union>| C; fmpred (\<lambda>_. vwelldefined') \<Gamma>; pre_strong_term_class.wellformed (t $\<^sub>s u); wellformed_venv \<Gamma>; \<not> shadows_consts (t $\<^sub>s u); not_shadows_vconsts_env \<Gamma>\<rbrakk> \<Longrightarrow> vwelldefined' val
 5. \<And>name \<Gamma> ts us. \<lbrakk>name |\<in>| C; list_all2 (\<lambda>x1 x2. \<Gamma> \<turnstile>\<^sub>v x1 \<down> x2 \<and> (fdisjnt C (fmdom \<Gamma>) \<longrightarrow> consts x1 |\<subseteq>| fmdom \<Gamma> |\<union>| C \<longrightarrow> fmpred (\<lambda>_. vwelldefined') \<Gamma> \<longrightarrow> pre_strong_term_class.wellformed x1 \<longrightarrow> wellformed_venv \<Gamma> \<longrightarrow> \<not> shadows_consts x1 \<longrightarrow> not_shadows_vconsts_env \<Gamma> \<longrightarrow> vwelldefined' x2)) ts us; fdisjnt C (fmdom \<Gamma>); consts (name $$ ts) |\<subseteq>| fmdom \<Gamma> |\<union>| C; fmpred (\<lambda>_. vwelldefined') \<Gamma>; pre_strong_term_class.wellformed (name $$ ts); wellformed_venv \<Gamma>; \<not> shadows_consts (name $$ ts); not_shadows_vconsts_env \<Gamma>\<rbrakk> \<Longrightarrow> vwelldefined' (Vconstr name us)
[PROOF STEP]
hence "fmdom env = frees pat"
[PROOF STATE]
proof (prove)
using this:
frees pat = patvars (mk_pat pat)

goal (1 subgoal):
 1. fmdom env = frees pat
[PROOF STEP]
apply simp
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. frees pat = patvars (mk_pat pat) \<Longrightarrow> fmdom env = patvars (mk_pat pat)
[PROOF STEP]
apply (rule vmatch_dom)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. frees pat = patvars (mk_pat pat) \<Longrightarrow> vmatch (mk_pat pat) ?v1 = Some env
[PROOF STEP]
apply (rule vfind_match_elem)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. frees pat = patvars (mk_pat pat) \<Longrightarrow> vfind_match ?cs3 ?v1 = Some (env, pat, ?rhs3)
[PROOF STEP]
apply (rule comb)
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done
[PROOF STATE]
proof (state)
this:
fmdom env = frees pat

goal (5 subgoals):
 1. \<And>name \<Gamma> val. \<lbrakk>name |\<notin>| C; fmlookup \<Gamma> name = Some val; fdisjnt C (fmdom \<Gamma>); consts (Sconst name) |\<subseteq>| fmdom \<Gamma> |\<union>| C; fmpred (\<lambda>_. vwelldefined') \<Gamma>; pre_strong_term_class.wellformed (Sconst name); wellformed_venv \<Gamma>; \<not> shadows_consts (Sconst name); not_shadows_vconsts_env \<Gamma>\<rbrakk> \<Longrightarrow> vwelldefined' val
 2. \<And>\<Gamma> name val. \<lbrakk>fmlookup \<Gamma> name = Some val; fdisjnt C (fmdom \<Gamma>); consts (Svar name) |\<subseteq>| fmdom \<Gamma> |\<union>| C; fmpred (\<lambda>_. vwelldefined') \<Gamma>; pre_strong_term_class.wellformed (Svar name); wellformed_venv \<Gamma>; \<not> shadows_consts (Svar name); not_shadows_vconsts_env \<Gamma>\<rbrakk> \<Longrightarrow> vwelldefined' val
 3. \<And>\<Gamma> t cs \<Gamma>' u u' env uu_ rhs val. \<lbrakk>\<Gamma> \<turnstile>\<^sub>v t \<down> Vabs cs \<Gamma>'; \<lbrakk>fdisjnt C (fmdom \<Gamma>); consts t |\<subseteq>| fmdom \<Gamma> |\<union>| C; fmpred (\<lambda>_. vwelldefined') \<Gamma>; pre_strong_term_class.wellformed t; wellformed_venv \<Gamma>; \<not> shadows_consts t; not_shadows_vconsts_env \<Gamma>\<rbrakk> \<Longrightarrow> vwelldefined' (Vabs cs \<Gamma>'); \<Gamma> \<turnstile>\<^sub>v u \<down> u'; \<lbrakk>fdisjnt C (fmdom \<Gamma>); consts u |\<subseteq>| fmdom \<Gamma> |\<union>| C; fmpred (\<lambda>_. vwelldefined') \<Gamma>; pre_strong_term_class.wellformed u; wellformed_venv \<Gamma>; \<not> shadows_consts u; not_shadows_vconsts_env \<Gamma>\<rbrakk> \<Longrightarrow> vwelldefined' u'; vfind_match cs u' = Some (env, uu_, rhs); \<Gamma>' ++\<^sub>f env \<turnstile>\<^sub>v rhs \<down> val; \<lbrakk>fdisjnt C (fmdom (\<Gamma>' ++\<^sub>f env)); consts rhs |\<subseteq>| fmdom (\<Gamma>' ++\<^sub>f env) |\<union>| C; fmpred (\<lambda>_. vwelldefined') (\<Gamma>' ++\<^sub>f env); pre_strong_term_class.wellformed rhs; wellformed_venv (\<Gamma>' ++\<^sub>f env); \<not> shadows_consts rhs; not_shadows_vconsts_env (\<Gamma>' ++\<^sub>f env)\<rbrakk> \<Longrightarrow> vwelldefined' val; fdisjnt C (fmdom \<Gamma>); consts (t $\<^sub>s u) |\<subseteq>| fmdom \<Gamma> |\<union>| C; fmpred (\<lambda>_. vwelldefined') \<Gamma>; pre_strong_term_class.wellformed (t $\<^sub>s u); wellformed_venv \<Gamma>; \<not> shadows_consts (t $\<^sub>s u); not_shadows_vconsts_env \<Gamma>\<rbrakk> \<Longrightarrow> vwelldefined' val
 4. \<And>\<Gamma> t css name \<Gamma>' cs u u' env uv_ rhs val. \<lbrakk>\<Gamma> \<turnstile>\<^sub>v t \<down> Vrecabs css name \<Gamma>'; \<lbrakk>fdisjnt C (fmdom \<Gamma>); consts t |\<subseteq>| fmdom \<Gamma> |\<union>| C; fmpred (\<lambda>_. vwelldefined') \<Gamma>; pre_strong_term_class.wellformed t; wellformed_venv \<Gamma>; \<not> shadows_consts t; not_shadows_vconsts_env \<Gamma>\<rbrakk> \<Longrightarrow> vwelldefined' (Vrecabs css name \<Gamma>'); fmlookup css name = Some cs; \<Gamma> \<turnstile>\<^sub>v u \<down> u'; \<lbrakk>fdisjnt C (fmdom \<Gamma>); consts u |\<subseteq>| fmdom \<Gamma> |\<union>| C; fmpred (\<lambda>_. vwelldefined') \<Gamma>; pre_strong_term_class.wellformed u; wellformed_venv \<Gamma>; \<not> shadows_consts u; not_shadows_vconsts_env \<Gamma>\<rbrakk> \<Longrightarrow> vwelldefined' u'; vfind_match cs u' = Some (env, uv_, rhs); \<Gamma>' ++\<^sub>f mk_rec_env css \<Gamma>' ++\<^sub>f env \<turnstile>\<^sub>v rhs \<down> val; \<lbrakk>fdisjnt C (fmdom (\<Gamma>' ++\<^sub>f mk_rec_env css \<Gamma>' ++\<^sub>f env)); consts rhs |\<subseteq>| fmdom (\<Gamma>' ++\<^sub>f mk_rec_env css \<Gamma>' ++\<^sub>f env) |\<union>| C; fmpred (\<lambda>_. vwelldefined') (\<Gamma>' ++\<^sub>f mk_rec_env css \<Gamma>' ++\<^sub>f env); pre_strong_term_class.wellformed rhs; wellformed_venv (\<Gamma>' ++\<^sub>f mk_rec_env css \<Gamma>' ++\<^sub>f env); \<not> shadows_consts rhs; not_shadows_vconsts_env (\<Gamma>' ++\<^sub>f mk_rec_env css \<Gamma>' ++\<^sub>f env)\<rbrakk> \<Longrightarrow> vwelldefined' val; fdisjnt C (fmdom \<Gamma>); consts (t $\<^sub>s u) |\<subseteq>| fmdom \<Gamma> |\<union>| C; fmpred (\<lambda>_. vwelldefined') \<Gamma>; pre_strong_term_class.wellformed (t $\<^sub>s u); wellformed_venv \<Gamma>; \<not> shadows_consts (t $\<^sub>s u); not_shadows_vconsts_env \<Gamma>\<rbrakk> \<Longrightarrow> vwelldefined' val
 5. \<And>name \<Gamma> ts us. \<lbrakk>name |\<in>| C; list_all2 (\<lambda>x1 x2. \<Gamma> \<turnstile>\<^sub>v x1 \<down> x2 \<and> (fdisjnt C (fmdom \<Gamma>) \<longrightarrow> consts x1 |\<subseteq>| fmdom \<Gamma> |\<union>| C \<longrightarrow> fmpred (\<lambda>_. vwelldefined') \<Gamma> \<longrightarrow> pre_strong_term_class.wellformed x1 \<longrightarrow> wellformed_venv \<Gamma> \<longrightarrow> \<not> shadows_consts x1 \<longrightarrow> not_shadows_vconsts_env \<Gamma> \<longrightarrow> vwelldefined' x2)) ts us; fdisjnt C (fmdom \<Gamma>); consts (name $$ ts) |\<subseteq>| fmdom \<Gamma> |\<union>| C; fmpred (\<lambda>_. vwelldefined') \<Gamma>; pre_strong_term_class.wellformed (name $$ ts); wellformed_venv \<Gamma>; \<not> shadows_consts (name $$ ts); not_shadows_vconsts_env \<Gamma>\<rbrakk> \<Longrightarrow> vwelldefined' (Vconstr name us)
[PROOF STEP]
have "not_shadows_vconsts (Vabs cs \<Gamma>')"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. not_shadows_vconsts (Vabs cs \<Gamma>')
[PROOF STEP]
apply (rule veval'_shadows)
[PROOF STATE]
proof (prove)
goal (3 subgoals):
 1. ?\<Gamma> \<turnstile>\<^sub>v ?t \<down> Vabs cs \<Gamma>'
 2. not_shadows_vconsts_env ?\<Gamma>
 3. \<not> shadows_consts ?t
[PROOF STEP]
using comb
[PROOF STATE]
proof (prove)
using this:
\<Gamma> \<turnstile>\<^sub>v t \<down> Vabs cs \<Gamma>'
\<Gamma> \<turnstile>\<^sub>v u \<down> u'
vfind_match cs u' = Some (env, pat, rhs)
\<Gamma>' ++\<^sub>f env \<turnstile>\<^sub>v rhs \<down> val
\<lbrakk>fdisjnt C (fmdom \<Gamma>); consts t |\<subseteq>| fmdom \<Gamma> |\<union>| C; fmpred (\<lambda>_. vwelldefined') \<Gamma>; pre_strong_term_class.wellformed t; wellformed_venv \<Gamma>; \<not> shadows_consts t; not_shadows_vconsts_env \<Gamma>\<rbrakk> \<Longrightarrow> vwelldefined' (Vabs cs \<Gamma>')
\<lbrakk>fdisjnt C (fmdom \<Gamma>); consts u |\<subseteq>| fmdom \<Gamma> |\<union>| C; fmpred (\<lambda>_. vwelldefined') \<Gamma>; pre_strong_term_class.wellformed u; wellformed_venv \<Gamma>; \<not> shadows_consts u; not_shadows_vconsts_env \<Gamma>\<rbrakk> \<Longrightarrow> vwelldefined' u'
\<lbrakk>fdisjnt C (fmdom (\<Gamma>' ++\<^sub>f env)); consts rhs |\<subseteq>| fmdom (\<Gamma>' ++\<^sub>f env) |\<union>| C; fmpred (\<lambda>_. vwelldefined') (\<Gamma>' ++\<^sub>f env); pre_strong_term_class.wellformed rhs; wellformed_venv (\<Gamma>' ++\<^sub>f env); \<not> shadows_consts rhs; not_shadows_vconsts_env (\<Gamma>' ++\<^sub>f env)\<rbrakk> \<Longrightarrow> vwelldefined' val
fdisjnt C (fmdom \<Gamma>)
consts (t $\<^sub>s u) |\<subseteq>| fmdom \<Gamma> |\<union>| C
fmpred (\<lambda>_. vwelldefined') \<Gamma>
pre_strong_term_class.wellformed (t $\<^sub>s u)
wellformed_venv \<Gamma>
\<not> shadows_consts (t $\<^sub>s u)
not_shadows_vconsts_env \<Gamma>

goal (3 subgoals):
 1. ?\<Gamma> \<turnstile>\<^sub>v ?t \<down> Vabs cs \<Gamma>'
 2. not_shadows_vconsts_env ?\<Gamma>
 3. \<not> shadows_consts ?t
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
not_shadows_vconsts (Vabs cs \<Gamma>')

goal (5 subgoals):
 1. \<And>name \<Gamma> val. \<lbrakk>name |\<notin>| C; fmlookup \<Gamma> name = Some val; fdisjnt C (fmdom \<Gamma>); consts (Sconst name) |\<subseteq>| fmdom \<Gamma> |\<union>| C; fmpred (\<lambda>_. vwelldefined') \<Gamma>; pre_strong_term_class.wellformed (Sconst name); wellformed_venv \<Gamma>; \<not> shadows_consts (Sconst name); not_shadows_vconsts_env \<Gamma>\<rbrakk> \<Longrightarrow> vwelldefined' val
 2. \<And>\<Gamma> name val. \<lbrakk>fmlookup \<Gamma> name = Some val; fdisjnt C (fmdom \<Gamma>); consts (Svar name) |\<subseteq>| fmdom \<Gamma> |\<union>| C; fmpred (\<lambda>_. vwelldefined') \<Gamma>; pre_strong_term_class.wellformed (Svar name); wellformed_venv \<Gamma>; \<not> shadows_consts (Svar name); not_shadows_vconsts_env \<Gamma>\<rbrakk> \<Longrightarrow> vwelldefined' val
 3. \<And>\<Gamma> t cs \<Gamma>' u u' env uu_ rhs val. \<lbrakk>\<Gamma> \<turnstile>\<^sub>v t \<down> Vabs cs \<Gamma>'; \<lbrakk>fdisjnt C (fmdom \<Gamma>); consts t |\<subseteq>| fmdom \<Gamma> |\<union>| C; fmpred (\<lambda>_. vwelldefined') \<Gamma>; pre_strong_term_class.wellformed t; wellformed_venv \<Gamma>; \<not> shadows_consts t; not_shadows_vconsts_env \<Gamma>\<rbrakk> \<Longrightarrow> vwelldefined' (Vabs cs \<Gamma>'); \<Gamma> \<turnstile>\<^sub>v u \<down> u'; \<lbrakk>fdisjnt C (fmdom \<Gamma>); consts u |\<subseteq>| fmdom \<Gamma> |\<union>| C; fmpred (\<lambda>_. vwelldefined') \<Gamma>; pre_strong_term_class.wellformed u; wellformed_venv \<Gamma>; \<not> shadows_consts u; not_shadows_vconsts_env \<Gamma>\<rbrakk> \<Longrightarrow> vwelldefined' u'; vfind_match cs u' = Some (env, uu_, rhs); \<Gamma>' ++\<^sub>f env \<turnstile>\<^sub>v rhs \<down> val; \<lbrakk>fdisjnt C (fmdom (\<Gamma>' ++\<^sub>f env)); consts rhs |\<subseteq>| fmdom (\<Gamma>' ++\<^sub>f env) |\<union>| C; fmpred (\<lambda>_. vwelldefined') (\<Gamma>' ++\<^sub>f env); pre_strong_term_class.wellformed rhs; wellformed_venv (\<Gamma>' ++\<^sub>f env); \<not> shadows_consts rhs; not_shadows_vconsts_env (\<Gamma>' ++\<^sub>f env)\<rbrakk> \<Longrightarrow> vwelldefined' val; fdisjnt C (fmdom \<Gamma>); consts (t $\<^sub>s u) |\<subseteq>| fmdom \<Gamma> |\<union>| C; fmpred (\<lambda>_. vwelldefined') \<Gamma>; pre_strong_term_class.wellformed (t $\<^sub>s u); wellformed_venv \<Gamma>; \<not> shadows_consts (t $\<^sub>s u); not_shadows_vconsts_env \<Gamma>\<rbrakk> \<Longrightarrow> vwelldefined' val
 4. \<And>\<Gamma> t css name \<Gamma>' cs u u' env uv_ rhs val. \<lbrakk>\<Gamma> \<turnstile>\<^sub>v t \<down> Vrecabs css name \<Gamma>'; \<lbrakk>fdisjnt C (fmdom \<Gamma>); consts t |\<subseteq>| fmdom \<Gamma> |\<union>| C; fmpred (\<lambda>_. vwelldefined') \<Gamma>; pre_strong_term_class.wellformed t; wellformed_venv \<Gamma>; \<not> shadows_consts t; not_shadows_vconsts_env \<Gamma>\<rbrakk> \<Longrightarrow> vwelldefined' (Vrecabs css name \<Gamma>'); fmlookup css name = Some cs; \<Gamma> \<turnstile>\<^sub>v u \<down> u'; \<lbrakk>fdisjnt C (fmdom \<Gamma>); consts u |\<subseteq>| fmdom \<Gamma> |\<union>| C; fmpred (\<lambda>_. vwelldefined') \<Gamma>; pre_strong_term_class.wellformed u; wellformed_venv \<Gamma>; \<not> shadows_consts u; not_shadows_vconsts_env \<Gamma>\<rbrakk> \<Longrightarrow> vwelldefined' u'; vfind_match cs u' = Some (env, uv_, rhs); \<Gamma>' ++\<^sub>f mk_rec_env css \<Gamma>' ++\<^sub>f env \<turnstile>\<^sub>v rhs \<down> val; \<lbrakk>fdisjnt C (fmdom (\<Gamma>' ++\<^sub>f mk_rec_env css \<Gamma>' ++\<^sub>f env)); consts rhs |\<subseteq>| fmdom (\<Gamma>' ++\<^sub>f mk_rec_env css \<Gamma>' ++\<^sub>f env) |\<union>| C; fmpred (\<lambda>_. vwelldefined') (\<Gamma>' ++\<^sub>f mk_rec_env css \<Gamma>' ++\<^sub>f env); pre_strong_term_class.wellformed rhs; wellformed_venv (\<Gamma>' ++\<^sub>f mk_rec_env css \<Gamma>' ++\<^sub>f env); \<not> shadows_consts rhs; not_shadows_vconsts_env (\<Gamma>' ++\<^sub>f mk_rec_env css \<Gamma>' ++\<^sub>f env)\<rbrakk> \<Longrightarrow> vwelldefined' val; fdisjnt C (fmdom \<Gamma>); consts (t $\<^sub>s u) |\<subseteq>| fmdom \<Gamma> |\<union>| C; fmpred (\<lambda>_. vwelldefined') \<Gamma>; pre_strong_term_class.wellformed (t $\<^sub>s u); wellformed_venv \<Gamma>; \<not> shadows_consts (t $\<^sub>s u); not_shadows_vconsts_env \<Gamma>\<rbrakk> \<Longrightarrow> vwelldefined' val
 5. \<And>name \<Gamma> ts us. \<lbrakk>name |\<in>| C; list_all2 (\<lambda>x1 x2. \<Gamma> \<turnstile>\<^sub>v x1 \<down> x2 \<and> (fdisjnt C (fmdom \<Gamma>) \<longrightarrow> consts x1 |\<subseteq>| fmdom \<Gamma> |\<union>| C \<longrightarrow> fmpred (\<lambda>_. vwelldefined') \<Gamma> \<longrightarrow> pre_strong_term_class.wellformed x1 \<longrightarrow> wellformed_venv \<Gamma> \<longrightarrow> \<not> shadows_consts x1 \<longrightarrow> not_shadows_vconsts_env \<Gamma> \<longrightarrow> vwelldefined' x2)) ts us; fdisjnt C (fmdom \<Gamma>); consts (name $$ ts) |\<subseteq>| fmdom \<Gamma> |\<union>| C; fmpred (\<lambda>_. vwelldefined') \<Gamma>; pre_strong_term_class.wellformed (name $$ ts); wellformed_venv \<Gamma>; \<not> shadows_consts (name $$ ts); not_shadows_vconsts_env \<Gamma>\<rbrakk> \<Longrightarrow> vwelldefined' (Vconstr name us)
[PROOF STEP]
have "vwelldefined' (Vabs cs \<Gamma>')"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. vwelldefined' (Vabs cs \<Gamma>')
[PROOF STEP]
using comb
[PROOF STATE]
proof (prove)
using this:
\<Gamma> \<turnstile>\<^sub>v t \<down> Vabs cs \<Gamma>'
\<Gamma> \<turnstile>\<^sub>v u \<down> u'
vfind_match cs u' = Some (env, pat, rhs)
\<Gamma>' ++\<^sub>f env \<turnstile>\<^sub>v rhs \<down> val
\<lbrakk>fdisjnt C (fmdom \<Gamma>); consts t |\<subseteq>| fmdom \<Gamma> |\<union>| C; fmpred (\<lambda>_. vwelldefined') \<Gamma>; pre_strong_term_class.wellformed t; wellformed_venv \<Gamma>; \<not> shadows_consts t; not_shadows_vconsts_env \<Gamma>\<rbrakk> \<Longrightarrow> vwelldefined' (Vabs cs \<Gamma>')
\<lbrakk>fdisjnt C (fmdom \<Gamma>); consts u |\<subseteq>| fmdom \<Gamma> |\<union>| C; fmpred (\<lambda>_. vwelldefined') \<Gamma>; pre_strong_term_class.wellformed u; wellformed_venv \<Gamma>; \<not> shadows_consts u; not_shadows_vconsts_env \<Gamma>\<rbrakk> \<Longrightarrow> vwelldefined' u'
\<lbrakk>fdisjnt C (fmdom (\<Gamma>' ++\<^sub>f env)); consts rhs |\<subseteq>| fmdom (\<Gamma>' ++\<^sub>f env) |\<union>| C; fmpred (\<lambda>_. vwelldefined') (\<Gamma>' ++\<^sub>f env); pre_strong_term_class.wellformed rhs; wellformed_venv (\<Gamma>' ++\<^sub>f env); \<not> shadows_consts rhs; not_shadows_vconsts_env (\<Gamma>' ++\<^sub>f env)\<rbrakk> \<Longrightarrow> vwelldefined' val
fdisjnt C (fmdom \<Gamma>)
consts (t $\<^sub>s u) |\<subseteq>| fmdom \<Gamma> |\<union>| C
fmpred (\<lambda>_. vwelldefined') \<Gamma>
pre_strong_term_class.wellformed (t $\<^sub>s u)
wellformed_venv \<Gamma>
\<not> shadows_consts (t $\<^sub>s u)
not_shadows_vconsts_env \<Gamma>

goal (1 subgoal):
 1. vwelldefined' (Vabs cs \<Gamma>')
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
vwelldefined' (Vabs cs \<Gamma>')

goal (5 subgoals):
 1. \<And>name \<Gamma> val. \<lbrakk>name |\<notin>| C; fmlookup \<Gamma> name = Some val; fdisjnt C (fmdom \<Gamma>); consts (Sconst name) |\<subseteq>| fmdom \<Gamma> |\<union>| C; fmpred (\<lambda>_. vwelldefined') \<Gamma>; pre_strong_term_class.wellformed (Sconst name); wellformed_venv \<Gamma>; \<not> shadows_consts (Sconst name); not_shadows_vconsts_env \<Gamma>\<rbrakk> \<Longrightarrow> vwelldefined' val
 2. \<And>\<Gamma> name val. \<lbrakk>fmlookup \<Gamma> name = Some val; fdisjnt C (fmdom \<Gamma>); consts (Svar name) |\<subseteq>| fmdom \<Gamma> |\<union>| C; fmpred (\<lambda>_. vwelldefined') \<Gamma>; pre_strong_term_class.wellformed (Svar name); wellformed_venv \<Gamma>; \<not> shadows_consts (Svar name); not_shadows_vconsts_env \<Gamma>\<rbrakk> \<Longrightarrow> vwelldefined' val
 3. \<And>\<Gamma> t cs \<Gamma>' u u' env uu_ rhs val. \<lbrakk>\<Gamma> \<turnstile>\<^sub>v t \<down> Vabs cs \<Gamma>'; \<lbrakk>fdisjnt C (fmdom \<Gamma>); consts t |\<subseteq>| fmdom \<Gamma> |\<union>| C; fmpred (\<lambda>_. vwelldefined') \<Gamma>; pre_strong_term_class.wellformed t; wellformed_venv \<Gamma>; \<not> shadows_consts t; not_shadows_vconsts_env \<Gamma>\<rbrakk> \<Longrightarrow> vwelldefined' (Vabs cs \<Gamma>'); \<Gamma> \<turnstile>\<^sub>v u \<down> u'; \<lbrakk>fdisjnt C (fmdom \<Gamma>); consts u |\<subseteq>| fmdom \<Gamma> |\<union>| C; fmpred (\<lambda>_. vwelldefined') \<Gamma>; pre_strong_term_class.wellformed u; wellformed_venv \<Gamma>; \<not> shadows_consts u; not_shadows_vconsts_env \<Gamma>\<rbrakk> \<Longrightarrow> vwelldefined' u'; vfind_match cs u' = Some (env, uu_, rhs); \<Gamma>' ++\<^sub>f env \<turnstile>\<^sub>v rhs \<down> val; \<lbrakk>fdisjnt C (fmdom (\<Gamma>' ++\<^sub>f env)); consts rhs |\<subseteq>| fmdom (\<Gamma>' ++\<^sub>f env) |\<union>| C; fmpred (\<lambda>_. vwelldefined') (\<Gamma>' ++\<^sub>f env); pre_strong_term_class.wellformed rhs; wellformed_venv (\<Gamma>' ++\<^sub>f env); \<not> shadows_consts rhs; not_shadows_vconsts_env (\<Gamma>' ++\<^sub>f env)\<rbrakk> \<Longrightarrow> vwelldefined' val; fdisjnt C (fmdom \<Gamma>); consts (t $\<^sub>s u) |\<subseteq>| fmdom \<Gamma> |\<union>| C; fmpred (\<lambda>_. vwelldefined') \<Gamma>; pre_strong_term_class.wellformed (t $\<^sub>s u); wellformed_venv \<Gamma>; \<not> shadows_consts (t $\<^sub>s u); not_shadows_vconsts_env \<Gamma>\<rbrakk> \<Longrightarrow> vwelldefined' val
 4. \<And>\<Gamma> t css name \<Gamma>' cs u u' env uv_ rhs val. \<lbrakk>\<Gamma> \<turnstile>\<^sub>v t \<down> Vrecabs css name \<Gamma>'; \<lbrakk>fdisjnt C (fmdom \<Gamma>); consts t |\<subseteq>| fmdom \<Gamma> |\<union>| C; fmpred (\<lambda>_. vwelldefined') \<Gamma>; pre_strong_term_class.wellformed t; wellformed_venv \<Gamma>; \<not> shadows_consts t; not_shadows_vconsts_env \<Gamma>\<rbrakk> \<Longrightarrow> vwelldefined' (Vrecabs css name \<Gamma>'); fmlookup css name = Some cs; \<Gamma> \<turnstile>\<^sub>v u \<down> u'; \<lbrakk>fdisjnt C (fmdom \<Gamma>); consts u |\<subseteq>| fmdom \<Gamma> |\<union>| C; fmpred (\<lambda>_. vwelldefined') \<Gamma>; pre_strong_term_class.wellformed u; wellformed_venv \<Gamma>; \<not> shadows_consts u; not_shadows_vconsts_env \<Gamma>\<rbrakk> \<Longrightarrow> vwelldefined' u'; vfind_match cs u' = Some (env, uv_, rhs); \<Gamma>' ++\<^sub>f mk_rec_env css \<Gamma>' ++\<^sub>f env \<turnstile>\<^sub>v rhs \<down> val; \<lbrakk>fdisjnt C (fmdom (\<Gamma>' ++\<^sub>f mk_rec_env css \<Gamma>' ++\<^sub>f env)); consts rhs |\<subseteq>| fmdom (\<Gamma>' ++\<^sub>f mk_rec_env css \<Gamma>' ++\<^sub>f env) |\<union>| C; fmpred (\<lambda>_. vwelldefined') (\<Gamma>' ++\<^sub>f mk_rec_env css \<Gamma>' ++\<^sub>f env); pre_strong_term_class.wellformed rhs; wellformed_venv (\<Gamma>' ++\<^sub>f mk_rec_env css \<Gamma>' ++\<^sub>f env); \<not> shadows_consts rhs; not_shadows_vconsts_env (\<Gamma>' ++\<^sub>f mk_rec_env css \<Gamma>' ++\<^sub>f env)\<rbrakk> \<Longrightarrow> vwelldefined' val; fdisjnt C (fmdom \<Gamma>); consts (t $\<^sub>s u) |\<subseteq>| fmdom \<Gamma> |\<union>| C; fmpred (\<lambda>_. vwelldefined') \<Gamma>; pre_strong_term_class.wellformed (t $\<^sub>s u); wellformed_venv \<Gamma>; \<not> shadows_consts (t $\<^sub>s u); not_shadows_vconsts_env \<Gamma>\<rbrakk> \<Longrightarrow> vwelldefined' val
 5. \<And>name \<Gamma> ts us. \<lbrakk>name |\<in>| C; list_all2 (\<lambda>x1 x2. \<Gamma> \<turnstile>\<^sub>v x1 \<down> x2 \<and> (fdisjnt C (fmdom \<Gamma>) \<longrightarrow> consts x1 |\<subseteq>| fmdom \<Gamma> |\<union>| C \<longrightarrow> fmpred (\<lambda>_. vwelldefined') \<Gamma> \<longrightarrow> pre_strong_term_class.wellformed x1 \<longrightarrow> wellformed_venv \<Gamma> \<longrightarrow> \<not> shadows_consts x1 \<longrightarrow> not_shadows_vconsts_env \<Gamma> \<longrightarrow> vwelldefined' x2)) ts us; fdisjnt C (fmdom \<Gamma>); consts (name $$ ts) |\<subseteq>| fmdom \<Gamma> |\<union>| C; fmpred (\<lambda>_. vwelldefined') \<Gamma>; pre_strong_term_class.wellformed (name $$ ts); wellformed_venv \<Gamma>; \<not> shadows_consts (name $$ ts); not_shadows_vconsts_env \<Gamma>\<rbrakk> \<Longrightarrow> vwelldefined' (Vconstr name us)
[PROOF STEP]
show ?case
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. vwelldefined' val
[PROOF STEP]
proof (rule comb)
[PROOF STATE]
proof (state)
goal (7 subgoals):
 1. fdisjnt C (fmdom (\<Gamma>' ++\<^sub>f env))
 2. consts rhs |\<subseteq>| fmdom (\<Gamma>' ++\<^sub>f env) |\<union>| C
 3. fmpred (\<lambda>_. vwelldefined') (\<Gamma>' ++\<^sub>f env)
 4. pre_strong_term_class.wellformed rhs
 5. wellformed_venv (\<Gamma>' ++\<^sub>f env)
 6. \<not> shadows_consts rhs
 7. not_shadows_vconsts_env (\<Gamma>' ++\<^sub>f env)
[PROOF STEP]
show "consts rhs |\<subseteq>| fmdom (\<Gamma>' ++\<^sub>f env) |\<union>| C"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. consts rhs |\<subseteq>| fmdom (\<Gamma>' ++\<^sub>f env) |\<union>| C
[PROOF STEP]
using \<open>consts rhs |\<subseteq>| fmdom \<Gamma>' |\<union>| C\<close>
[PROOF STATE]
proof (prove)
using this:
consts rhs |\<subseteq>| fmdom \<Gamma>' |\<union>| C

goal (1 subgoal):
 1. consts rhs |\<subseteq>| fmdom (\<Gamma>' ++\<^sub>f env) |\<union>| C
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
consts rhs |\<subseteq>| fmdom (\<Gamma>' ++\<^sub>f env) |\<union>| C

goal (6 subgoals):
 1. fdisjnt C (fmdom (\<Gamma>' ++\<^sub>f env))
 2. fmpred (\<lambda>_. vwelldefined') (\<Gamma>' ++\<^sub>f env)
 3. pre_strong_term_class.wellformed rhs
 4. wellformed_venv (\<Gamma>' ++\<^sub>f env)
 5. \<not> shadows_consts rhs
 6. not_shadows_vconsts_env (\<Gamma>' ++\<^sub>f env)
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (6 subgoals):
 1. fdisjnt C (fmdom (\<Gamma>' ++\<^sub>f env))
 2. fmpred (\<lambda>_. vwelldefined') (\<Gamma>' ++\<^sub>f env)
 3. pre_strong_term_class.wellformed rhs
 4. wellformed_venv (\<Gamma>' ++\<^sub>f env)
 5. \<not> shadows_consts rhs
 6. not_shadows_vconsts_env (\<Gamma>' ++\<^sub>f env)
[PROOF STEP]
have "vwelldefined' u'"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. vwelldefined' u'
[PROOF STEP]
using comb
[PROOF STATE]
proof (prove)
using this:
\<Gamma> \<turnstile>\<^sub>v t \<down> Vabs cs \<Gamma>'
\<Gamma> \<turnstile>\<^sub>v u \<down> u'
vfind_match cs u' = Some (env, pat, rhs)
\<Gamma>' ++\<^sub>f env \<turnstile>\<^sub>v rhs \<down> val
\<lbrakk>fdisjnt C (fmdom \<Gamma>); consts t |\<subseteq>| fmdom \<Gamma> |\<union>| C; fmpred (\<lambda>_. vwelldefined') \<Gamma>; pre_strong_term_class.wellformed t; wellformed_venv \<Gamma>; \<not> shadows_consts t; not_shadows_vconsts_env \<Gamma>\<rbrakk> \<Longrightarrow> vwelldefined' (Vabs cs \<Gamma>')
\<lbrakk>fdisjnt C (fmdom \<Gamma>); consts u |\<subseteq>| fmdom \<Gamma> |\<union>| C; fmpred (\<lambda>_. vwelldefined') \<Gamma>; pre_strong_term_class.wellformed u; wellformed_venv \<Gamma>; \<not> shadows_consts u; not_shadows_vconsts_env \<Gamma>\<rbrakk> \<Longrightarrow> vwelldefined' u'
\<lbrakk>fdisjnt C (fmdom (\<Gamma>' ++\<^sub>f env)); consts rhs |\<subseteq>| fmdom (\<Gamma>' ++\<^sub>f env) |\<union>| C; fmpred (\<lambda>_. vwelldefined') (\<Gamma>' ++\<^sub>f env); pre_strong_term_class.wellformed rhs; wellformed_venv (\<Gamma>' ++\<^sub>f env); \<not> shadows_consts rhs; not_shadows_vconsts_env (\<Gamma>' ++\<^sub>f env)\<rbrakk> \<Longrightarrow> vwelldefined' val
fdisjnt C (fmdom \<Gamma>)
consts (t $\<^sub>s u) |\<subseteq>| fmdom \<Gamma> |\<union>| C
fmpred (\<lambda>_. vwelldefined') \<Gamma>
pre_strong_term_class.wellformed (t $\<^sub>s u)
wellformed_venv \<Gamma>
\<not> shadows_consts (t $\<^sub>s u)
not_shadows_vconsts_env \<Gamma>

goal (1 subgoal):
 1. vwelldefined' u'
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
vwelldefined' u'

goal (6 subgoals):
 1. fdisjnt C (fmdom (\<Gamma>' ++\<^sub>f env))
 2. fmpred (\<lambda>_. vwelldefined') (\<Gamma>' ++\<^sub>f env)
 3. pre_strong_term_class.wellformed rhs
 4. wellformed_venv (\<Gamma>' ++\<^sub>f env)
 5. \<not> shadows_consts rhs
 6. not_shadows_vconsts_env (\<Gamma>' ++\<^sub>f env)
[PROOF STEP]
hence "fmpred (\<lambda>_. vwelldefined') env"
[PROOF STATE]
proof (prove)
using this:
vwelldefined' u'

goal (1 subgoal):
 1. fmpred (\<lambda>_. vwelldefined') env
[PROOF STEP]
using comb
[PROOF STATE]
proof (prove)
using this:
vwelldefined' u'
\<Gamma> \<turnstile>\<^sub>v t \<down> Vabs cs \<Gamma>'
\<Gamma> \<turnstile>\<^sub>v u \<down> u'
vfind_match cs u' = Some (env, pat, rhs)
\<Gamma>' ++\<^sub>f env \<turnstile>\<^sub>v rhs \<down> val
\<lbrakk>fdisjnt C (fmdom \<Gamma>); consts t |\<subseteq>| fmdom \<Gamma> |\<union>| C; fmpred (\<lambda>_. vwelldefined') \<Gamma>; pre_strong_term_class.wellformed t; wellformed_venv \<Gamma>; \<not> shadows_consts t; not_shadows_vconsts_env \<Gamma>\<rbrakk> \<Longrightarrow> vwelldefined' (Vabs cs \<Gamma>')
\<lbrakk>fdisjnt C (fmdom \<Gamma>); consts u |\<subseteq>| fmdom \<Gamma> |\<union>| C; fmpred (\<lambda>_. vwelldefined') \<Gamma>; pre_strong_term_class.wellformed u; wellformed_venv \<Gamma>; \<not> shadows_consts u; not_shadows_vconsts_env \<Gamma>\<rbrakk> \<Longrightarrow> vwelldefined' u'
\<lbrakk>fdisjnt C (fmdom (\<Gamma>' ++\<^sub>f env)); consts rhs |\<subseteq>| fmdom (\<Gamma>' ++\<^sub>f env) |\<union>| C; fmpred (\<lambda>_. vwelldefined') (\<Gamma>' ++\<^sub>f env); pre_strong_term_class.wellformed rhs; wellformed_venv (\<Gamma>' ++\<^sub>f env); \<not> shadows_consts rhs; not_shadows_vconsts_env (\<Gamma>' ++\<^sub>f env)\<rbrakk> \<Longrightarrow> vwelldefined' val
fdisjnt C (fmdom \<Gamma>)
consts (t $\<^sub>s u) |\<subseteq>| fmdom \<Gamma> |\<union>| C
fmpred (\<lambda>_. vwelldefined') \<Gamma>
pre_strong_term_class.wellformed (t $\<^sub>s u)
wellformed_venv \<Gamma>
\<not> shadows_consts (t $\<^sub>s u)
not_shadows_vconsts_env \<Gamma>

goal (1 subgoal):
 1. fmpred (\<lambda>_. vwelldefined') env
[PROOF STEP]
by (auto intro: vmatch_welldefined' dest: vfind_match_elem)
[PROOF STATE]
proof (state)
this:
fmpred (\<lambda>_. vwelldefined') env

goal (6 subgoals):
 1. fdisjnt C (fmdom (\<Gamma>' ++\<^sub>f env))
 2. fmpred (\<lambda>_. vwelldefined') (\<Gamma>' ++\<^sub>f env)
 3. pre_strong_term_class.wellformed rhs
 4. wellformed_venv (\<Gamma>' ++\<^sub>f env)
 5. \<not> shadows_consts rhs
 6. not_shadows_vconsts_env (\<Gamma>' ++\<^sub>f env)
[PROOF STEP]
thus "fmpred (\<lambda>_. vwelldefined') (\<Gamma>' ++\<^sub>f env)"
[PROOF STATE]
proof (prove)
using this:
fmpred (\<lambda>_. vwelldefined') env

goal (1 subgoal):
 1. fmpred (\<lambda>_. vwelldefined') (\<Gamma>' ++\<^sub>f env)
[PROOF STEP]
using \<open>vwelldefined' (Vabs cs \<Gamma>')\<close>
[PROOF STATE]
proof (prove)
using this:
fmpred (\<lambda>_. vwelldefined') env
vwelldefined' (Vabs cs \<Gamma>')

goal (1 subgoal):
 1. fmpred (\<lambda>_. vwelldefined') (\<Gamma>' ++\<^sub>f env)
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
fmpred (\<lambda>_. vwelldefined') (\<Gamma>' ++\<^sub>f env)

goal (5 subgoals):
 1. fdisjnt C (fmdom (\<Gamma>' ++\<^sub>f env))
 2. pre_strong_term_class.wellformed rhs
 3. wellformed_venv (\<Gamma>' ++\<^sub>f env)
 4. \<not> shadows_consts rhs
 5. not_shadows_vconsts_env (\<Gamma>' ++\<^sub>f env)
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (5 subgoals):
 1. fdisjnt C (fmdom (\<Gamma>' ++\<^sub>f env))
 2. pre_strong_term_class.wellformed rhs
 3. wellformed_venv (\<Gamma>' ++\<^sub>f env)
 4. \<not> shadows_consts rhs
 5. not_shadows_vconsts_env (\<Gamma>' ++\<^sub>f env)
[PROOF STEP]
have "fdisjnt C (fmdom \<Gamma>')"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. fdisjnt C (fmdom \<Gamma>')
[PROOF STEP]
using \<open>vwelldefined' (Vabs cs \<Gamma>')\<close>
[PROOF STATE]
proof (prove)
using this:
vwelldefined' (Vabs cs \<Gamma>')

goal (1 subgoal):
 1. fdisjnt C (fmdom \<Gamma>')
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
fdisjnt C (fmdom \<Gamma>')

goal (5 subgoals):
 1. fdisjnt C (fmdom (\<Gamma>' ++\<^sub>f env))
 2. pre_strong_term_class.wellformed rhs
 3. wellformed_venv (\<Gamma>' ++\<^sub>f env)
 4. \<not> shadows_consts rhs
 5. not_shadows_vconsts_env (\<Gamma>' ++\<^sub>f env)
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
fdisjnt C (fmdom \<Gamma>')

goal (5 subgoals):
 1. fdisjnt C (fmdom (\<Gamma>' ++\<^sub>f env))
 2. pre_strong_term_class.wellformed rhs
 3. wellformed_venv (\<Gamma>' ++\<^sub>f env)
 4. \<not> shadows_consts rhs
 5. not_shadows_vconsts_env (\<Gamma>' ++\<^sub>f env)
[PROOF STEP]
have "fdisjnt C (fmdom env)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. fdisjnt C (fmdom env)
[PROOF STEP]
unfolding \<open>fmdom env = frees pat\<close>
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. fdisjnt C (frees pat)
[PROOF STEP]
using \<open>(pat, rhs) \<in> set cs\<close> \<open>not_shadows_vconsts (Vabs cs \<Gamma>')\<close>
[PROOF STATE]
proof (prove)
using this:
(pat, rhs) \<in> set cs
not_shadows_vconsts (Vabs cs \<Gamma>')

goal (1 subgoal):
 1. fdisjnt C (frees pat)
[PROOF STEP]
by (auto simp: list_all_iff all_consts_def fdisjnt_alt_def)
[PROOF STATE]
proof (state)
this:
fdisjnt C (fmdom env)

goal (5 subgoals):
 1. fdisjnt C (fmdom (\<Gamma>' ++\<^sub>f env))
 2. pre_strong_term_class.wellformed rhs
 3. wellformed_venv (\<Gamma>' ++\<^sub>f env)
 4. \<not> shadows_consts rhs
 5. not_shadows_vconsts_env (\<Gamma>' ++\<^sub>f env)
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
fdisjnt C (fmdom \<Gamma>')
fdisjnt C (fmdom env)
[PROOF STEP]
show "fdisjnt C (fmdom (\<Gamma>' ++\<^sub>f env))"
[PROOF STATE]
proof (prove)
using this:
fdisjnt C (fmdom \<Gamma>')
fdisjnt C (fmdom env)

goal (1 subgoal):
 1. fdisjnt C (fmdom (\<Gamma>' ++\<^sub>f env))
[PROOF STEP]
unfolding fdisjnt_alt_def
[PROOF STATE]
proof (prove)
using this:
C |\<inter>| fmdom \<Gamma>' = {||}
C |\<inter>| fmdom env = {||}

goal (1 subgoal):
 1. C |\<inter>| fmdom (\<Gamma>' ++\<^sub>f env) = {||}
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
fdisjnt C (fmdom (\<Gamma>' ++\<^sub>f env))

goal (4 subgoals):
 1. pre_strong_term_class.wellformed rhs
 2. wellformed_venv (\<Gamma>' ++\<^sub>f env)
 3. \<not> shadows_consts rhs
 4. not_shadows_vconsts_env (\<Gamma>' ++\<^sub>f env)
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (4 subgoals):
 1. pre_strong_term_class.wellformed rhs
 2. wellformed_venv (\<Gamma>' ++\<^sub>f env)
 3. \<not> shadows_consts rhs
 4. not_shadows_vconsts_env (\<Gamma>' ++\<^sub>f env)
[PROOF STEP]
show "wellformed rhs"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. pre_strong_term_class.wellformed rhs
[PROOF STEP]
using \<open>(pat, rhs) \<in> set cs\<close> \<open>vwellformed (Vabs cs \<Gamma>')\<close>
[PROOF STATE]
proof (prove)
using this:
(pat, rhs) \<in> set cs
vwellformed (Vabs cs \<Gamma>')

goal (1 subgoal):
 1. pre_strong_term_class.wellformed rhs
[PROOF STEP]
by (auto simp: list_all_iff)
[PROOF STATE]
proof (state)
this:
pre_strong_term_class.wellformed rhs

goal (3 subgoals):
 1. wellformed_venv (\<Gamma>' ++\<^sub>f env)
 2. \<not> shadows_consts rhs
 3. not_shadows_vconsts_env (\<Gamma>' ++\<^sub>f env)
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (3 subgoals):
 1. wellformed_venv (\<Gamma>' ++\<^sub>f env)
 2. \<not> shadows_consts rhs
 3. not_shadows_vconsts_env (\<Gamma>' ++\<^sub>f env)
[PROOF STEP]
have "wellformed_venv \<Gamma>'"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. wellformed_venv \<Gamma>'
[PROOF STEP]
using \<open>vwellformed (Vabs cs \<Gamma>')\<close>
[PROOF STATE]
proof (prove)
using this:
vwellformed (Vabs cs \<Gamma>')

goal (1 subgoal):
 1. wellformed_venv \<Gamma>'
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
wellformed_venv \<Gamma>'

goal (3 subgoals):
 1. wellformed_venv (\<Gamma>' ++\<^sub>f env)
 2. \<not> shadows_consts rhs
 3. not_shadows_vconsts_env (\<Gamma>' ++\<^sub>f env)
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
wellformed_venv \<Gamma>'

goal (3 subgoals):
 1. wellformed_venv (\<Gamma>' ++\<^sub>f env)
 2. \<not> shadows_consts rhs
 3. not_shadows_vconsts_env (\<Gamma>' ++\<^sub>f env)
[PROOF STEP]
have "wellformed_venv env"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. wellformed_venv env
[PROOF STEP]
apply (rule vwellformed.vmatch_env)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. vmatch ?pat ?v = Some env
 2. vwellformed ?v
[PROOF STEP]
apply (rule vfind_match_elem)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. vfind_match ?cs3 ?v = Some (env, ?pat3, ?rhs3)
 2. vwellformed ?v
[PROOF STEP]
apply fact
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. vwellformed u'
[PROOF STEP]
apply (rule veval'_wellformed)
[PROOF STATE]
proof (prove)
goal (3 subgoals):
 1. ?\<Gamma>6 \<turnstile>\<^sub>v ?t6 \<down> u'
 2. pre_strong_term_class.wellformed ?t6
 3. wellformed_venv ?\<Gamma>6
[PROOF STEP]
using comb
[PROOF STATE]
proof (prove)
using this:
\<Gamma> \<turnstile>\<^sub>v t \<down> Vabs cs \<Gamma>'
\<Gamma> \<turnstile>\<^sub>v u \<down> u'
vfind_match cs u' = Some (env, pat, rhs)
\<Gamma>' ++\<^sub>f env \<turnstile>\<^sub>v rhs \<down> val
\<lbrakk>fdisjnt C (fmdom \<Gamma>); consts t |\<subseteq>| fmdom \<Gamma> |\<union>| C; fmpred (\<lambda>_. vwelldefined') \<Gamma>; pre_strong_term_class.wellformed t; wellformed_venv \<Gamma>; \<not> shadows_consts t; not_shadows_vconsts_env \<Gamma>\<rbrakk> \<Longrightarrow> vwelldefined' (Vabs cs \<Gamma>')
\<lbrakk>fdisjnt C (fmdom \<Gamma>); consts u |\<subseteq>| fmdom \<Gamma> |\<union>| C; fmpred (\<lambda>_. vwelldefined') \<Gamma>; pre_strong_term_class.wellformed u; wellformed_venv \<Gamma>; \<not> shadows_consts u; not_shadows_vconsts_env \<Gamma>\<rbrakk> \<Longrightarrow> vwelldefined' u'
\<lbrakk>fdisjnt C (fmdom (\<Gamma>' ++\<^sub>f env)); consts rhs |\<subseteq>| fmdom (\<Gamma>' ++\<^sub>f env) |\<union>| C; fmpred (\<lambda>_. vwelldefined') (\<Gamma>' ++\<^sub>f env); pre_strong_term_class.wellformed rhs; wellformed_venv (\<Gamma>' ++\<^sub>f env); \<not> shadows_consts rhs; not_shadows_vconsts_env (\<Gamma>' ++\<^sub>f env)\<rbrakk> \<Longrightarrow> vwelldefined' val
fdisjnt C (fmdom \<Gamma>)
consts (t $\<^sub>s u) |\<subseteq>| fmdom \<Gamma> |\<union>| C
fmpred (\<lambda>_. vwelldefined') \<Gamma>
pre_strong_term_class.wellformed (t $\<^sub>s u)
wellformed_venv \<Gamma>
\<not> shadows_consts (t $\<^sub>s u)
not_shadows_vconsts_env \<Gamma>

goal (3 subgoals):
 1. ?\<Gamma>6 \<turnstile>\<^sub>v ?t6 \<down> u'
 2. pre_strong_term_class.wellformed ?t6
 3. wellformed_venv ?\<Gamma>6
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
wellformed_venv env

goal (3 subgoals):
 1. wellformed_venv (\<Gamma>' ++\<^sub>f env)
 2. \<not> shadows_consts rhs
 3. not_shadows_vconsts_env (\<Gamma>' ++\<^sub>f env)
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
wellformed_venv \<Gamma>'
wellformed_venv env
[PROOF STEP]
show "wellformed_venv (\<Gamma>' ++\<^sub>f env)"
[PROOF STATE]
proof (prove)
using this:
wellformed_venv \<Gamma>'
wellformed_venv env

goal (1 subgoal):
 1. wellformed_venv (\<Gamma>' ++\<^sub>f env)
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
wellformed_venv (\<Gamma>' ++\<^sub>f env)

goal (2 subgoals):
 1. \<not> shadows_consts rhs
 2. not_shadows_vconsts_env (\<Gamma>' ++\<^sub>f env)
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. \<not> shadows_consts rhs
 2. not_shadows_vconsts_env (\<Gamma>' ++\<^sub>f env)
[PROOF STEP]
have "not_shadows_vconsts_env \<Gamma>'"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. not_shadows_vconsts_env \<Gamma>'
[PROOF STEP]
using \<open>not_shadows_vconsts (Vabs cs \<Gamma>')\<close>
[PROOF STATE]
proof (prove)
using this:
not_shadows_vconsts (Vabs cs \<Gamma>')

goal (1 subgoal):
 1. not_shadows_vconsts_env \<Gamma>'
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
not_shadows_vconsts_env \<Gamma>'

goal (2 subgoals):
 1. \<not> shadows_consts rhs
 2. not_shadows_vconsts_env (\<Gamma>' ++\<^sub>f env)
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
not_shadows_vconsts_env \<Gamma>'

goal (2 subgoals):
 1. \<not> shadows_consts rhs
 2. not_shadows_vconsts_env (\<Gamma>' ++\<^sub>f env)
[PROOF STEP]
have "not_shadows_vconsts_env env"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. not_shadows_vconsts_env env
[PROOF STEP]
apply (rule not_shadows_vconsts.vmatch_env)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. vmatch ?pat ?v = Some env
 2. not_shadows_vconsts ?v
[PROOF STEP]
apply (rule vfind_match_elem)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. vfind_match ?cs3 ?v = Some (env, ?pat3, ?rhs3)
 2. not_shadows_vconsts ?v
[PROOF STEP]
apply fact
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. not_shadows_vconsts u'
[PROOF STEP]
apply (rule veval'_shadows)
[PROOF STATE]
proof (prove)
goal (3 subgoals):
 1. ?\<Gamma>6 \<turnstile>\<^sub>v ?t6 \<down> u'
 2. not_shadows_vconsts_env ?\<Gamma>6
 3. \<not> shadows_consts ?t6
[PROOF STEP]
using comb
[PROOF STATE]
proof (prove)
using this:
\<Gamma> \<turnstile>\<^sub>v t \<down> Vabs cs \<Gamma>'
\<Gamma> \<turnstile>\<^sub>v u \<down> u'
vfind_match cs u' = Some (env, pat, rhs)
\<Gamma>' ++\<^sub>f env \<turnstile>\<^sub>v rhs \<down> val
\<lbrakk>fdisjnt C (fmdom \<Gamma>); consts t |\<subseteq>| fmdom \<Gamma> |\<union>| C; fmpred (\<lambda>_. vwelldefined') \<Gamma>; pre_strong_term_class.wellformed t; wellformed_venv \<Gamma>; \<not> shadows_consts t; not_shadows_vconsts_env \<Gamma>\<rbrakk> \<Longrightarrow> vwelldefined' (Vabs cs \<Gamma>')
\<lbrakk>fdisjnt C (fmdom \<Gamma>); consts u |\<subseteq>| fmdom \<Gamma> |\<union>| C; fmpred (\<lambda>_. vwelldefined') \<Gamma>; pre_strong_term_class.wellformed u; wellformed_venv \<Gamma>; \<not> shadows_consts u; not_shadows_vconsts_env \<Gamma>\<rbrakk> \<Longrightarrow> vwelldefined' u'
\<lbrakk>fdisjnt C (fmdom (\<Gamma>' ++\<^sub>f env)); consts rhs |\<subseteq>| fmdom (\<Gamma>' ++\<^sub>f env) |\<union>| C; fmpred (\<lambda>_. vwelldefined') (\<Gamma>' ++\<^sub>f env); pre_strong_term_class.wellformed rhs; wellformed_venv (\<Gamma>' ++\<^sub>f env); \<not> shadows_consts rhs; not_shadows_vconsts_env (\<Gamma>' ++\<^sub>f env)\<rbrakk> \<Longrightarrow> vwelldefined' val
fdisjnt C (fmdom \<Gamma>)
consts (t $\<^sub>s u) |\<subseteq>| fmdom \<Gamma> |\<union>| C
fmpred (\<lambda>_. vwelldefined') \<Gamma>
pre_strong_term_class.wellformed (t $\<^sub>s u)
wellformed_venv \<Gamma>
\<not> shadows_consts (t $\<^sub>s u)
not_shadows_vconsts_env \<Gamma>

goal (3 subgoals):
 1. ?\<Gamma>6 \<turnstile>\<^sub>v ?t6 \<down> u'
 2. not_shadows_vconsts_env ?\<Gamma>6
 3. \<not> shadows_consts ?t6
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
not_shadows_vconsts_env env

goal (2 subgoals):
 1. \<not> shadows_consts rhs
 2. not_shadows_vconsts_env (\<Gamma>' ++\<^sub>f env)
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
not_shadows_vconsts_env \<Gamma>'
not_shadows_vconsts_env env
[PROOF STEP]
show "not_shadows_vconsts_env (\<Gamma>' ++\<^sub>f env)"
[PROOF STATE]
proof (prove)
using this:
not_shadows_vconsts_env \<Gamma>'
not_shadows_vconsts_env env

goal (1 subgoal):
 1. not_shadows_vconsts_env (\<Gamma>' ++\<^sub>f env)
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
not_shadows_vconsts_env (\<Gamma>' ++\<^sub>f env)

goal (1 subgoal):
 1. \<not> shadows_consts rhs
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<not> shadows_consts rhs
[PROOF STEP]
show "\<not> shadows_consts rhs"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<not> shadows_consts rhs
[PROOF STEP]
using \<open>not_shadows_vconsts (Vabs cs \<Gamma>')\<close> \<open>(pat, rhs) \<in> set cs\<close>
[PROOF STATE]
proof (prove)
using this:
not_shadows_vconsts (Vabs cs \<Gamma>')
(pat, rhs) \<in> set cs

goal (1 subgoal):
 1. \<not> shadows_consts rhs
[PROOF STEP]
by (auto simp: list_all_iff)
[PROOF STATE]
proof (state)
this:
\<not> shadows_consts rhs

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
vwelldefined' val

goal (4 subgoals):
 1. \<And>name \<Gamma> val. \<lbrakk>name |\<notin>| C; fmlookup \<Gamma> name = Some val; fdisjnt C (fmdom \<Gamma>); consts (Sconst name) |\<subseteq>| fmdom \<Gamma> |\<union>| C; fmpred (\<lambda>_. vwelldefined') \<Gamma>; pre_strong_term_class.wellformed (Sconst name); wellformed_venv \<Gamma>; \<not> shadows_consts (Sconst name); not_shadows_vconsts_env \<Gamma>\<rbrakk> \<Longrightarrow> vwelldefined' val
 2. \<And>\<Gamma> name val. \<lbrakk>fmlookup \<Gamma> name = Some val; fdisjnt C (fmdom \<Gamma>); consts (Svar name) |\<subseteq>| fmdom \<Gamma> |\<union>| C; fmpred (\<lambda>_. vwelldefined') \<Gamma>; pre_strong_term_class.wellformed (Svar name); wellformed_venv \<Gamma>; \<not> shadows_consts (Svar name); not_shadows_vconsts_env \<Gamma>\<rbrakk> \<Longrightarrow> vwelldefined' val
 3. \<And>\<Gamma> t css name \<Gamma>' cs u u' env uv_ rhs val. \<lbrakk>\<Gamma> \<turnstile>\<^sub>v t \<down> Vrecabs css name \<Gamma>'; \<lbrakk>fdisjnt C (fmdom \<Gamma>); consts t |\<subseteq>| fmdom \<Gamma> |\<union>| C; fmpred (\<lambda>_. vwelldefined') \<Gamma>; pre_strong_term_class.wellformed t; wellformed_venv \<Gamma>; \<not> shadows_consts t; not_shadows_vconsts_env \<Gamma>\<rbrakk> \<Longrightarrow> vwelldefined' (Vrecabs css name \<Gamma>'); fmlookup css name = Some cs; \<Gamma> \<turnstile>\<^sub>v u \<down> u'; \<lbrakk>fdisjnt C (fmdom \<Gamma>); consts u |\<subseteq>| fmdom \<Gamma> |\<union>| C; fmpred (\<lambda>_. vwelldefined') \<Gamma>; pre_strong_term_class.wellformed u; wellformed_venv \<Gamma>; \<not> shadows_consts u; not_shadows_vconsts_env \<Gamma>\<rbrakk> \<Longrightarrow> vwelldefined' u'; vfind_match cs u' = Some (env, uv_, rhs); \<Gamma>' ++\<^sub>f mk_rec_env css \<Gamma>' ++\<^sub>f env \<turnstile>\<^sub>v rhs \<down> val; \<lbrakk>fdisjnt C (fmdom (\<Gamma>' ++\<^sub>f mk_rec_env css \<Gamma>' ++\<^sub>f env)); consts rhs |\<subseteq>| fmdom (\<Gamma>' ++\<^sub>f mk_rec_env css \<Gamma>' ++\<^sub>f env) |\<union>| C; fmpred (\<lambda>_. vwelldefined') (\<Gamma>' ++\<^sub>f mk_rec_env css \<Gamma>' ++\<^sub>f env); pre_strong_term_class.wellformed rhs; wellformed_venv (\<Gamma>' ++\<^sub>f mk_rec_env css \<Gamma>' ++\<^sub>f env); \<not> shadows_consts rhs; not_shadows_vconsts_env (\<Gamma>' ++\<^sub>f mk_rec_env css \<Gamma>' ++\<^sub>f env)\<rbrakk> \<Longrightarrow> vwelldefined' val; fdisjnt C (fmdom \<Gamma>); consts (t $\<^sub>s u) |\<subseteq>| fmdom \<Gamma> |\<union>| C; fmpred (\<lambda>_. vwelldefined') \<Gamma>; pre_strong_term_class.wellformed (t $\<^sub>s u); wellformed_venv \<Gamma>; \<not> shadows_consts (t $\<^sub>s u); not_shadows_vconsts_env \<Gamma>\<rbrakk> \<Longrightarrow> vwelldefined' val
 4. \<And>name \<Gamma> ts us. \<lbrakk>name |\<in>| C; list_all2 (\<lambda>x1 x2. \<Gamma> \<turnstile>\<^sub>v x1 \<down> x2 \<and> (fdisjnt C (fmdom \<Gamma>) \<longrightarrow> consts x1 |\<subseteq>| fmdom \<Gamma> |\<union>| C \<longrightarrow> fmpred (\<lambda>_. vwelldefined') \<Gamma> \<longrightarrow> pre_strong_term_class.wellformed x1 \<longrightarrow> wellformed_venv \<Gamma> \<longrightarrow> \<not> shadows_consts x1 \<longrightarrow> not_shadows_vconsts_env \<Gamma> \<longrightarrow> vwelldefined' x2)) ts us; fdisjnt C (fmdom \<Gamma>); consts (name $$ ts) |\<subseteq>| fmdom \<Gamma> |\<union>| C; fmpred (\<lambda>_. vwelldefined') \<Gamma>; pre_strong_term_class.wellformed (name $$ ts); wellformed_venv \<Gamma>; \<not> shadows_consts (name $$ ts); not_shadows_vconsts_env \<Gamma>\<rbrakk> \<Longrightarrow> vwelldefined' (Vconstr name us)
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (4 subgoals):
 1. \<And>name \<Gamma> val. \<lbrakk>name |\<notin>| C; fmlookup \<Gamma> name = Some val; fdisjnt C (fmdom \<Gamma>); consts (Sconst name) |\<subseteq>| fmdom \<Gamma> |\<union>| C; fmpred (\<lambda>_. vwelldefined') \<Gamma>; pre_strong_term_class.wellformed (Sconst name); wellformed_venv \<Gamma>; \<not> shadows_consts (Sconst name); not_shadows_vconsts_env \<Gamma>\<rbrakk> \<Longrightarrow> vwelldefined' val
 2. \<And>\<Gamma> name val. \<lbrakk>fmlookup \<Gamma> name = Some val; fdisjnt C (fmdom \<Gamma>); consts (Svar name) |\<subseteq>| fmdom \<Gamma> |\<union>| C; fmpred (\<lambda>_. vwelldefined') \<Gamma>; pre_strong_term_class.wellformed (Svar name); wellformed_venv \<Gamma>; \<not> shadows_consts (Svar name); not_shadows_vconsts_env \<Gamma>\<rbrakk> \<Longrightarrow> vwelldefined' val
 3. \<And>\<Gamma> t css name \<Gamma>' cs u u' env uv_ rhs val. \<lbrakk>\<Gamma> \<turnstile>\<^sub>v t \<down> Vrecabs css name \<Gamma>'; \<lbrakk>fdisjnt C (fmdom \<Gamma>); consts t |\<subseteq>| fmdom \<Gamma> |\<union>| C; fmpred (\<lambda>_. vwelldefined') \<Gamma>; pre_strong_term_class.wellformed t; wellformed_venv \<Gamma>; \<not> shadows_consts t; not_shadows_vconsts_env \<Gamma>\<rbrakk> \<Longrightarrow> vwelldefined' (Vrecabs css name \<Gamma>'); fmlookup css name = Some cs; \<Gamma> \<turnstile>\<^sub>v u \<down> u'; \<lbrakk>fdisjnt C (fmdom \<Gamma>); consts u |\<subseteq>| fmdom \<Gamma> |\<union>| C; fmpred (\<lambda>_. vwelldefined') \<Gamma>; pre_strong_term_class.wellformed u; wellformed_venv \<Gamma>; \<not> shadows_consts u; not_shadows_vconsts_env \<Gamma>\<rbrakk> \<Longrightarrow> vwelldefined' u'; vfind_match cs u' = Some (env, uv_, rhs); \<Gamma>' ++\<^sub>f mk_rec_env css \<Gamma>' ++\<^sub>f env \<turnstile>\<^sub>v rhs \<down> val; \<lbrakk>fdisjnt C (fmdom (\<Gamma>' ++\<^sub>f mk_rec_env css \<Gamma>' ++\<^sub>f env)); consts rhs |\<subseteq>| fmdom (\<Gamma>' ++\<^sub>f mk_rec_env css \<Gamma>' ++\<^sub>f env) |\<union>| C; fmpred (\<lambda>_. vwelldefined') (\<Gamma>' ++\<^sub>f mk_rec_env css \<Gamma>' ++\<^sub>f env); pre_strong_term_class.wellformed rhs; wellformed_venv (\<Gamma>' ++\<^sub>f mk_rec_env css \<Gamma>' ++\<^sub>f env); \<not> shadows_consts rhs; not_shadows_vconsts_env (\<Gamma>' ++\<^sub>f mk_rec_env css \<Gamma>' ++\<^sub>f env)\<rbrakk> \<Longrightarrow> vwelldefined' val; fdisjnt C (fmdom \<Gamma>); consts (t $\<^sub>s u) |\<subseteq>| fmdom \<Gamma> |\<union>| C; fmpred (\<lambda>_. vwelldefined') \<Gamma>; pre_strong_term_class.wellformed (t $\<^sub>s u); wellformed_venv \<Gamma>; \<not> shadows_consts (t $\<^sub>s u); not_shadows_vconsts_env \<Gamma>\<rbrakk> \<Longrightarrow> vwelldefined' val
 4. \<And>name \<Gamma> ts us. \<lbrakk>name |\<in>| C; list_all2 (\<lambda>x1 x2. \<Gamma> \<turnstile>\<^sub>v x1 \<down> x2 \<and> (fdisjnt C (fmdom \<Gamma>) \<longrightarrow> consts x1 |\<subseteq>| fmdom \<Gamma> |\<union>| C \<longrightarrow> fmpred (\<lambda>_. vwelldefined') \<Gamma> \<longrightarrow> pre_strong_term_class.wellformed x1 \<longrightarrow> wellformed_venv \<Gamma> \<longrightarrow> \<not> shadows_consts x1 \<longrightarrow> not_shadows_vconsts_env \<Gamma> \<longrightarrow> vwelldefined' x2)) ts us; fdisjnt C (fmdom \<Gamma>); consts (name $$ ts) |\<subseteq>| fmdom \<Gamma> |\<union>| C; fmpred (\<lambda>_. vwelldefined') \<Gamma>; pre_strong_term_class.wellformed (name $$ ts); wellformed_venv \<Gamma>; \<not> shadows_consts (name $$ ts); not_shadows_vconsts_env \<Gamma>\<rbrakk> \<Longrightarrow> vwelldefined' (Vconstr name us)
[PROOF STEP]
case (rec_comb \<Gamma> t css name \<Gamma>' cs u u' env pat rhs val)
[PROOF STATE]
proof (state)
this:
\<Gamma> \<turnstile>\<^sub>v t \<down> Vrecabs css name \<Gamma>'
fmlookup css name = Some cs
\<Gamma> \<turnstile>\<^sub>v u \<down> u'
vfind_match cs u' = Some (env, pat, rhs)
\<Gamma>' ++\<^sub>f mk_rec_env css \<Gamma>' ++\<^sub>f env \<turnstile>\<^sub>v rhs \<down> val
\<lbrakk>fdisjnt C (fmdom \<Gamma>); consts t |\<subseteq>| fmdom \<Gamma> |\<union>| C; fmpred (\<lambda>_. vwelldefined') \<Gamma>; pre_strong_term_class.wellformed t; wellformed_venv \<Gamma>; \<not> shadows_consts t; not_shadows_vconsts_env \<Gamma>\<rbrakk> \<Longrightarrow> vwelldefined' (Vrecabs css name \<Gamma>')
\<lbrakk>fdisjnt C (fmdom \<Gamma>); consts u |\<subseteq>| fmdom \<Gamma> |\<union>| C; fmpred (\<lambda>_. vwelldefined') \<Gamma>; pre_strong_term_class.wellformed u; wellformed_venv \<Gamma>; \<not> shadows_consts u; not_shadows_vconsts_env \<Gamma>\<rbrakk> \<Longrightarrow> vwelldefined' u'
\<lbrakk>fdisjnt C (fmdom (\<Gamma>' ++\<^sub>f mk_rec_env css \<Gamma>' ++\<^sub>f env)); consts rhs |\<subseteq>| fmdom (\<Gamma>' ++\<^sub>f mk_rec_env css \<Gamma>' ++\<^sub>f env) |\<union>| C; fmpred (\<lambda>_. vwelldefined') (\<Gamma>' ++\<^sub>f mk_rec_env css \<Gamma>' ++\<^sub>f env); pre_strong_term_class.wellformed rhs; wellformed_venv (\<Gamma>' ++\<^sub>f mk_rec_env css \<Gamma>' ++\<^sub>f env); \<not> shadows_consts rhs; not_shadows_vconsts_env (\<Gamma>' ++\<^sub>f mk_rec_env css \<Gamma>' ++\<^sub>f env)\<rbrakk> \<Longrightarrow> vwelldefined' val
fdisjnt C (fmdom \<Gamma>)
consts (t $\<^sub>s u) |\<subseteq>| fmdom \<Gamma> |\<union>| C
fmpred (\<lambda>_. vwelldefined') \<Gamma>
pre_strong_term_class.wellformed (t $\<^sub>s u)
wellformed_venv \<Gamma>
\<not> shadows_consts (t $\<^sub>s u)
not_shadows_vconsts_env \<Gamma>

goal (4 subgoals):
 1. \<And>name \<Gamma> val. \<lbrakk>name |\<notin>| C; fmlookup \<Gamma> name = Some val; fdisjnt C (fmdom \<Gamma>); consts (Sconst name) |\<subseteq>| fmdom \<Gamma> |\<union>| C; fmpred (\<lambda>_. vwelldefined') \<Gamma>; pre_strong_term_class.wellformed (Sconst name); wellformed_venv \<Gamma>; \<not> shadows_consts (Sconst name); not_shadows_vconsts_env \<Gamma>\<rbrakk> \<Longrightarrow> vwelldefined' val
 2. \<And>\<Gamma> name val. \<lbrakk>fmlookup \<Gamma> name = Some val; fdisjnt C (fmdom \<Gamma>); consts (Svar name) |\<subseteq>| fmdom \<Gamma> |\<union>| C; fmpred (\<lambda>_. vwelldefined') \<Gamma>; pre_strong_term_class.wellformed (Svar name); wellformed_venv \<Gamma>; \<not> shadows_consts (Svar name); not_shadows_vconsts_env \<Gamma>\<rbrakk> \<Longrightarrow> vwelldefined' val
 3. \<And>\<Gamma> t css name \<Gamma>' cs u u' env uv_ rhs val. \<lbrakk>\<Gamma> \<turnstile>\<^sub>v t \<down> Vrecabs css name \<Gamma>'; \<lbrakk>fdisjnt C (fmdom \<Gamma>); consts t |\<subseteq>| fmdom \<Gamma> |\<union>| C; fmpred (\<lambda>_. vwelldefined') \<Gamma>; pre_strong_term_class.wellformed t; wellformed_venv \<Gamma>; \<not> shadows_consts t; not_shadows_vconsts_env \<Gamma>\<rbrakk> \<Longrightarrow> vwelldefined' (Vrecabs css name \<Gamma>'); fmlookup css name = Some cs; \<Gamma> \<turnstile>\<^sub>v u \<down> u'; \<lbrakk>fdisjnt C (fmdom \<Gamma>); consts u |\<subseteq>| fmdom \<Gamma> |\<union>| C; fmpred (\<lambda>_. vwelldefined') \<Gamma>; pre_strong_term_class.wellformed u; wellformed_venv \<Gamma>; \<not> shadows_consts u; not_shadows_vconsts_env \<Gamma>\<rbrakk> \<Longrightarrow> vwelldefined' u'; vfind_match cs u' = Some (env, uv_, rhs); \<Gamma>' ++\<^sub>f mk_rec_env css \<Gamma>' ++\<^sub>f env \<turnstile>\<^sub>v rhs \<down> val; \<lbrakk>fdisjnt C (fmdom (\<Gamma>' ++\<^sub>f mk_rec_env css \<Gamma>' ++\<^sub>f env)); consts rhs |\<subseteq>| fmdom (\<Gamma>' ++\<^sub>f mk_rec_env css \<Gamma>' ++\<^sub>f env) |\<union>| C; fmpred (\<lambda>_. vwelldefined') (\<Gamma>' ++\<^sub>f mk_rec_env css \<Gamma>' ++\<^sub>f env); pre_strong_term_class.wellformed rhs; wellformed_venv (\<Gamma>' ++\<^sub>f mk_rec_env css \<Gamma>' ++\<^sub>f env); \<not> shadows_consts rhs; not_shadows_vconsts_env (\<Gamma>' ++\<^sub>f mk_rec_env css \<Gamma>' ++\<^sub>f env)\<rbrakk> \<Longrightarrow> vwelldefined' val; fdisjnt C (fmdom \<Gamma>); consts (t $\<^sub>s u) |\<subseteq>| fmdom \<Gamma> |\<union>| C; fmpred (\<lambda>_. vwelldefined') \<Gamma>; pre_strong_term_class.wellformed (t $\<^sub>s u); wellformed_venv \<Gamma>; \<not> shadows_consts (t $\<^sub>s u); not_shadows_vconsts_env \<Gamma>\<rbrakk> \<Longrightarrow> vwelldefined' val
 4. \<And>name \<Gamma> ts us. \<lbrakk>name |\<in>| C; list_all2 (\<lambda>x1 x2. \<Gamma> \<turnstile>\<^sub>v x1 \<down> x2 \<and> (fdisjnt C (fmdom \<Gamma>) \<longrightarrow> consts x1 |\<subseteq>| fmdom \<Gamma> |\<union>| C \<longrightarrow> fmpred (\<lambda>_. vwelldefined') \<Gamma> \<longrightarrow> pre_strong_term_class.wellformed x1 \<longrightarrow> wellformed_venv \<Gamma> \<longrightarrow> \<not> shadows_consts x1 \<longrightarrow> not_shadows_vconsts_env \<Gamma> \<longrightarrow> vwelldefined' x2)) ts us; fdisjnt C (fmdom \<Gamma>); consts (name $$ ts) |\<subseteq>| fmdom \<Gamma> |\<union>| C; fmpred (\<lambda>_. vwelldefined') \<Gamma>; pre_strong_term_class.wellformed (name $$ ts); wellformed_venv \<Gamma>; \<not> shadows_consts (name $$ ts); not_shadows_vconsts_env \<Gamma>\<rbrakk> \<Longrightarrow> vwelldefined' (Vconstr name us)
[PROOF STEP]
hence "(pat, rhs) \<in> set cs"
[PROOF STATE]
proof (prove)
using this:
\<Gamma> \<turnstile>\<^sub>v t \<down> Vrecabs css name \<Gamma>'
fmlookup css name = Some cs
\<Gamma> \<turnstile>\<^sub>v u \<down> u'
vfind_match cs u' = Some (env, pat, rhs)
\<Gamma>' ++\<^sub>f mk_rec_env css \<Gamma>' ++\<^sub>f env \<turnstile>\<^sub>v rhs \<down> val
\<lbrakk>fdisjnt C (fmdom \<Gamma>); consts t |\<subseteq>| fmdom \<Gamma> |\<union>| C; fmpred (\<lambda>_. vwelldefined') \<Gamma>; pre_strong_term_class.wellformed t; wellformed_venv \<Gamma>; \<not> shadows_consts t; not_shadows_vconsts_env \<Gamma>\<rbrakk> \<Longrightarrow> vwelldefined' (Vrecabs css name \<Gamma>')
\<lbrakk>fdisjnt C (fmdom \<Gamma>); consts u |\<subseteq>| fmdom \<Gamma> |\<union>| C; fmpred (\<lambda>_. vwelldefined') \<Gamma>; pre_strong_term_class.wellformed u; wellformed_venv \<Gamma>; \<not> shadows_consts u; not_shadows_vconsts_env \<Gamma>\<rbrakk> \<Longrightarrow> vwelldefined' u'
\<lbrakk>fdisjnt C (fmdom (\<Gamma>' ++\<^sub>f mk_rec_env css \<Gamma>' ++\<^sub>f env)); consts rhs |\<subseteq>| fmdom (\<Gamma>' ++\<^sub>f mk_rec_env css \<Gamma>' ++\<^sub>f env) |\<union>| C; fmpred (\<lambda>_. vwelldefined') (\<Gamma>' ++\<^sub>f mk_rec_env css \<Gamma>' ++\<^sub>f env); pre_strong_term_class.wellformed rhs; wellformed_venv (\<Gamma>' ++\<^sub>f mk_rec_env css \<Gamma>' ++\<^sub>f env); \<not> shadows_consts rhs; not_shadows_vconsts_env (\<Gamma>' ++\<^sub>f mk_rec_env css \<Gamma>' ++\<^sub>f env)\<rbrakk> \<Longrightarrow> vwelldefined' val
fdisjnt C (fmdom \<Gamma>)
consts (t $\<^sub>s u) |\<subseteq>| fmdom \<Gamma> |\<union>| C
fmpred (\<lambda>_. vwelldefined') \<Gamma>
pre_strong_term_class.wellformed (t $\<^sub>s u)
wellformed_venv \<Gamma>
\<not> shadows_consts (t $\<^sub>s u)
not_shadows_vconsts_env \<Gamma>

goal (1 subgoal):
 1. (pat, rhs) \<in> set cs
[PROOF STEP]
by (auto dest: vfind_match_elem)
[PROOF STATE]
proof (state)
this:
(pat, rhs) \<in> set cs

goal (4 subgoals):
 1. \<And>name \<Gamma> val. \<lbrakk>name |\<notin>| C; fmlookup \<Gamma> name = Some val; fdisjnt C (fmdom \<Gamma>); consts (Sconst name) |\<subseteq>| fmdom \<Gamma> |\<union>| C; fmpred (\<lambda>_. vwelldefined') \<Gamma>; pre_strong_term_class.wellformed (Sconst name); wellformed_venv \<Gamma>; \<not> shadows_consts (Sconst name); not_shadows_vconsts_env \<Gamma>\<rbrakk> \<Longrightarrow> vwelldefined' val
 2. \<And>\<Gamma> name val. \<lbrakk>fmlookup \<Gamma> name = Some val; fdisjnt C (fmdom \<Gamma>); consts (Svar name) |\<subseteq>| fmdom \<Gamma> |\<union>| C; fmpred (\<lambda>_. vwelldefined') \<Gamma>; pre_strong_term_class.wellformed (Svar name); wellformed_venv \<Gamma>; \<not> shadows_consts (Svar name); not_shadows_vconsts_env \<Gamma>\<rbrakk> \<Longrightarrow> vwelldefined' val
 3. \<And>\<Gamma> t css name \<Gamma>' cs u u' env uv_ rhs val. \<lbrakk>\<Gamma> \<turnstile>\<^sub>v t \<down> Vrecabs css name \<Gamma>'; \<lbrakk>fdisjnt C (fmdom \<Gamma>); consts t |\<subseteq>| fmdom \<Gamma> |\<union>| C; fmpred (\<lambda>_. vwelldefined') \<Gamma>; pre_strong_term_class.wellformed t; wellformed_venv \<Gamma>; \<not> shadows_consts t; not_shadows_vconsts_env \<Gamma>\<rbrakk> \<Longrightarrow> vwelldefined' (Vrecabs css name \<Gamma>'); fmlookup css name = Some cs; \<Gamma> \<turnstile>\<^sub>v u \<down> u'; \<lbrakk>fdisjnt C (fmdom \<Gamma>); consts u |\<subseteq>| fmdom \<Gamma> |\<union>| C; fmpred (\<lambda>_. vwelldefined') \<Gamma>; pre_strong_term_class.wellformed u; wellformed_venv \<Gamma>; \<not> shadows_consts u; not_shadows_vconsts_env \<Gamma>\<rbrakk> \<Longrightarrow> vwelldefined' u'; vfind_match cs u' = Some (env, uv_, rhs); \<Gamma>' ++\<^sub>f mk_rec_env css \<Gamma>' ++\<^sub>f env \<turnstile>\<^sub>v rhs \<down> val; \<lbrakk>fdisjnt C (fmdom (\<Gamma>' ++\<^sub>f mk_rec_env css \<Gamma>' ++\<^sub>f env)); consts rhs |\<subseteq>| fmdom (\<Gamma>' ++\<^sub>f mk_rec_env css \<Gamma>' ++\<^sub>f env) |\<union>| C; fmpred (\<lambda>_. vwelldefined') (\<Gamma>' ++\<^sub>f mk_rec_env css \<Gamma>' ++\<^sub>f env); pre_strong_term_class.wellformed rhs; wellformed_venv (\<Gamma>' ++\<^sub>f mk_rec_env css \<Gamma>' ++\<^sub>f env); \<not> shadows_consts rhs; not_shadows_vconsts_env (\<Gamma>' ++\<^sub>f mk_rec_env css \<Gamma>' ++\<^sub>f env)\<rbrakk> \<Longrightarrow> vwelldefined' val; fdisjnt C (fmdom \<Gamma>); consts (t $\<^sub>s u) |\<subseteq>| fmdom \<Gamma> |\<union>| C; fmpred (\<lambda>_. vwelldefined') \<Gamma>; pre_strong_term_class.wellformed (t $\<^sub>s u); wellformed_venv \<Gamma>; \<not> shadows_consts (t $\<^sub>s u); not_shadows_vconsts_env \<Gamma>\<rbrakk> \<Longrightarrow> vwelldefined' val
 4. \<And>name \<Gamma> ts us. \<lbrakk>name |\<in>| C; list_all2 (\<lambda>x1 x2. \<Gamma> \<turnstile>\<^sub>v x1 \<down> x2 \<and> (fdisjnt C (fmdom \<Gamma>) \<longrightarrow> consts x1 |\<subseteq>| fmdom \<Gamma> |\<union>| C \<longrightarrow> fmpred (\<lambda>_. vwelldefined') \<Gamma> \<longrightarrow> pre_strong_term_class.wellformed x1 \<longrightarrow> wellformed_venv \<Gamma> \<longrightarrow> \<not> shadows_consts x1 \<longrightarrow> not_shadows_vconsts_env \<Gamma> \<longrightarrow> vwelldefined' x2)) ts us; fdisjnt C (fmdom \<Gamma>); consts (name $$ ts) |\<subseteq>| fmdom \<Gamma> |\<union>| C; fmpred (\<lambda>_. vwelldefined') \<Gamma>; pre_strong_term_class.wellformed (name $$ ts); wellformed_venv \<Gamma>; \<not> shadows_consts (name $$ ts); not_shadows_vconsts_env \<Gamma>\<rbrakk> \<Longrightarrow> vwelldefined' (Vconstr name us)
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
(pat, rhs) \<in> set cs

goal (4 subgoals):
 1. \<And>name \<Gamma> val. \<lbrakk>name |\<notin>| C; fmlookup \<Gamma> name = Some val; fdisjnt C (fmdom \<Gamma>); consts (Sconst name) |\<subseteq>| fmdom \<Gamma> |\<union>| C; fmpred (\<lambda>_. vwelldefined') \<Gamma>; pre_strong_term_class.wellformed (Sconst name); wellformed_venv \<Gamma>; \<not> shadows_consts (Sconst name); not_shadows_vconsts_env \<Gamma>\<rbrakk> \<Longrightarrow> vwelldefined' val
 2. \<And>\<Gamma> name val. \<lbrakk>fmlookup \<Gamma> name = Some val; fdisjnt C (fmdom \<Gamma>); consts (Svar name) |\<subseteq>| fmdom \<Gamma> |\<union>| C; fmpred (\<lambda>_. vwelldefined') \<Gamma>; pre_strong_term_class.wellformed (Svar name); wellformed_venv \<Gamma>; \<not> shadows_consts (Svar name); not_shadows_vconsts_env \<Gamma>\<rbrakk> \<Longrightarrow> vwelldefined' val
 3. \<And>\<Gamma> t css name \<Gamma>' cs u u' env uv_ rhs val. \<lbrakk>\<Gamma> \<turnstile>\<^sub>v t \<down> Vrecabs css name \<Gamma>'; \<lbrakk>fdisjnt C (fmdom \<Gamma>); consts t |\<subseteq>| fmdom \<Gamma> |\<union>| C; fmpred (\<lambda>_. vwelldefined') \<Gamma>; pre_strong_term_class.wellformed t; wellformed_venv \<Gamma>; \<not> shadows_consts t; not_shadows_vconsts_env \<Gamma>\<rbrakk> \<Longrightarrow> vwelldefined' (Vrecabs css name \<Gamma>'); fmlookup css name = Some cs; \<Gamma> \<turnstile>\<^sub>v u \<down> u'; \<lbrakk>fdisjnt C (fmdom \<Gamma>); consts u |\<subseteq>| fmdom \<Gamma> |\<union>| C; fmpred (\<lambda>_. vwelldefined') \<Gamma>; pre_strong_term_class.wellformed u; wellformed_venv \<Gamma>; \<not> shadows_consts u; not_shadows_vconsts_env \<Gamma>\<rbrakk> \<Longrightarrow> vwelldefined' u'; vfind_match cs u' = Some (env, uv_, rhs); \<Gamma>' ++\<^sub>f mk_rec_env css \<Gamma>' ++\<^sub>f env \<turnstile>\<^sub>v rhs \<down> val; \<lbrakk>fdisjnt C (fmdom (\<Gamma>' ++\<^sub>f mk_rec_env css \<Gamma>' ++\<^sub>f env)); consts rhs |\<subseteq>| fmdom (\<Gamma>' ++\<^sub>f mk_rec_env css \<Gamma>' ++\<^sub>f env) |\<union>| C; fmpred (\<lambda>_. vwelldefined') (\<Gamma>' ++\<^sub>f mk_rec_env css \<Gamma>' ++\<^sub>f env); pre_strong_term_class.wellformed rhs; wellformed_venv (\<Gamma>' ++\<^sub>f mk_rec_env css \<Gamma>' ++\<^sub>f env); \<not> shadows_consts rhs; not_shadows_vconsts_env (\<Gamma>' ++\<^sub>f mk_rec_env css \<Gamma>' ++\<^sub>f env)\<rbrakk> \<Longrightarrow> vwelldefined' val; fdisjnt C (fmdom \<Gamma>); consts (t $\<^sub>s u) |\<subseteq>| fmdom \<Gamma> |\<union>| C; fmpred (\<lambda>_. vwelldefined') \<Gamma>; pre_strong_term_class.wellformed (t $\<^sub>s u); wellformed_venv \<Gamma>; \<not> shadows_consts (t $\<^sub>s u); not_shadows_vconsts_env \<Gamma>\<rbrakk> \<Longrightarrow> vwelldefined' val
 4. \<And>name \<Gamma> ts us. \<lbrakk>name |\<in>| C; list_all2 (\<lambda>x1 x2. \<Gamma> \<turnstile>\<^sub>v x1 \<down> x2 \<and> (fdisjnt C (fmdom \<Gamma>) \<longrightarrow> consts x1 |\<subseteq>| fmdom \<Gamma> |\<union>| C \<longrightarrow> fmpred (\<lambda>_. vwelldefined') \<Gamma> \<longrightarrow> pre_strong_term_class.wellformed x1 \<longrightarrow> wellformed_venv \<Gamma> \<longrightarrow> \<not> shadows_consts x1 \<longrightarrow> not_shadows_vconsts_env \<Gamma> \<longrightarrow> vwelldefined' x2)) ts us; fdisjnt C (fmdom \<Gamma>); consts (name $$ ts) |\<subseteq>| fmdom \<Gamma> |\<union>| C; fmpred (\<lambda>_. vwelldefined') \<Gamma>; pre_strong_term_class.wellformed (name $$ ts); wellformed_venv \<Gamma>; \<not> shadows_consts (name $$ ts); not_shadows_vconsts_env \<Gamma>\<rbrakk> \<Longrightarrow> vwelldefined' (Vconstr name us)
[PROOF STEP]
have "vwelldefined' (Vrecabs css name \<Gamma>')"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. vwelldefined' (Vrecabs css name \<Gamma>')
[PROOF STEP]
using rec_comb
[PROOF STATE]
proof (prove)
using this:
\<Gamma> \<turnstile>\<^sub>v t \<down> Vrecabs css name \<Gamma>'
fmlookup css name = Some cs
\<Gamma> \<turnstile>\<^sub>v u \<down> u'
vfind_match cs u' = Some (env, pat, rhs)
\<Gamma>' ++\<^sub>f mk_rec_env css \<Gamma>' ++\<^sub>f env \<turnstile>\<^sub>v rhs \<down> val
\<lbrakk>fdisjnt C (fmdom \<Gamma>); consts t |\<subseteq>| fmdom \<Gamma> |\<union>| C; fmpred (\<lambda>_. vwelldefined') \<Gamma>; pre_strong_term_class.wellformed t; wellformed_venv \<Gamma>; \<not> shadows_consts t; not_shadows_vconsts_env \<Gamma>\<rbrakk> \<Longrightarrow> vwelldefined' (Vrecabs css name \<Gamma>')
\<lbrakk>fdisjnt C (fmdom \<Gamma>); consts u |\<subseteq>| fmdom \<Gamma> |\<union>| C; fmpred (\<lambda>_. vwelldefined') \<Gamma>; pre_strong_term_class.wellformed u; wellformed_venv \<Gamma>; \<not> shadows_consts u; not_shadows_vconsts_env \<Gamma>\<rbrakk> \<Longrightarrow> vwelldefined' u'
\<lbrakk>fdisjnt C (fmdom (\<Gamma>' ++\<^sub>f mk_rec_env css \<Gamma>' ++\<^sub>f env)); consts rhs |\<subseteq>| fmdom (\<Gamma>' ++\<^sub>f mk_rec_env css \<Gamma>' ++\<^sub>f env) |\<union>| C; fmpred (\<lambda>_. vwelldefined') (\<Gamma>' ++\<^sub>f mk_rec_env css \<Gamma>' ++\<^sub>f env); pre_strong_term_class.wellformed rhs; wellformed_venv (\<Gamma>' ++\<^sub>f mk_rec_env css \<Gamma>' ++\<^sub>f env); \<not> shadows_consts rhs; not_shadows_vconsts_env (\<Gamma>' ++\<^sub>f mk_rec_env css \<Gamma>' ++\<^sub>f env)\<rbrakk> \<Longrightarrow> vwelldefined' val
fdisjnt C (fmdom \<Gamma>)
consts (t $\<^sub>s u) |\<subseteq>| fmdom \<Gamma> |\<union>| C
fmpred (\<lambda>_. vwelldefined') \<Gamma>
pre_strong_term_class.wellformed (t $\<^sub>s u)
wellformed_venv \<Gamma>
\<not> shadows_consts (t $\<^sub>s u)
not_shadows_vconsts_env \<Gamma>

goal (1 subgoal):
 1. vwelldefined' (Vrecabs css name \<Gamma>')
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
vwelldefined' (Vrecabs css name \<Gamma>')

goal (4 subgoals):
 1. \<And>name \<Gamma> val. \<lbrakk>name |\<notin>| C; fmlookup \<Gamma> name = Some val; fdisjnt C (fmdom \<Gamma>); consts (Sconst name) |\<subseteq>| fmdom \<Gamma> |\<union>| C; fmpred (\<lambda>_. vwelldefined') \<Gamma>; pre_strong_term_class.wellformed (Sconst name); wellformed_venv \<Gamma>; \<not> shadows_consts (Sconst name); not_shadows_vconsts_env \<Gamma>\<rbrakk> \<Longrightarrow> vwelldefined' val
 2. \<And>\<Gamma> name val. \<lbrakk>fmlookup \<Gamma> name = Some val; fdisjnt C (fmdom \<Gamma>); consts (Svar name) |\<subseteq>| fmdom \<Gamma> |\<union>| C; fmpred (\<lambda>_. vwelldefined') \<Gamma>; pre_strong_term_class.wellformed (Svar name); wellformed_venv \<Gamma>; \<not> shadows_consts (Svar name); not_shadows_vconsts_env \<Gamma>\<rbrakk> \<Longrightarrow> vwelldefined' val
 3. \<And>\<Gamma> t css name \<Gamma>' cs u u' env uv_ rhs val. \<lbrakk>\<Gamma> \<turnstile>\<^sub>v t \<down> Vrecabs css name \<Gamma>'; \<lbrakk>fdisjnt C (fmdom \<Gamma>); consts t |\<subseteq>| fmdom \<Gamma> |\<union>| C; fmpred (\<lambda>_. vwelldefined') \<Gamma>; pre_strong_term_class.wellformed t; wellformed_venv \<Gamma>; \<not> shadows_consts t; not_shadows_vconsts_env \<Gamma>\<rbrakk> \<Longrightarrow> vwelldefined' (Vrecabs css name \<Gamma>'); fmlookup css name = Some cs; \<Gamma> \<turnstile>\<^sub>v u \<down> u'; \<lbrakk>fdisjnt C (fmdom \<Gamma>); consts u |\<subseteq>| fmdom \<Gamma> |\<union>| C; fmpred (\<lambda>_. vwelldefined') \<Gamma>; pre_strong_term_class.wellformed u; wellformed_venv \<Gamma>; \<not> shadows_consts u; not_shadows_vconsts_env \<Gamma>\<rbrakk> \<Longrightarrow> vwelldefined' u'; vfind_match cs u' = Some (env, uv_, rhs); \<Gamma>' ++\<^sub>f mk_rec_env css \<Gamma>' ++\<^sub>f env \<turnstile>\<^sub>v rhs \<down> val; \<lbrakk>fdisjnt C (fmdom (\<Gamma>' ++\<^sub>f mk_rec_env css \<Gamma>' ++\<^sub>f env)); consts rhs |\<subseteq>| fmdom (\<Gamma>' ++\<^sub>f mk_rec_env css \<Gamma>' ++\<^sub>f env) |\<union>| C; fmpred (\<lambda>_. vwelldefined') (\<Gamma>' ++\<^sub>f mk_rec_env css \<Gamma>' ++\<^sub>f env); pre_strong_term_class.wellformed rhs; wellformed_venv (\<Gamma>' ++\<^sub>f mk_rec_env css \<Gamma>' ++\<^sub>f env); \<not> shadows_consts rhs; not_shadows_vconsts_env (\<Gamma>' ++\<^sub>f mk_rec_env css \<Gamma>' ++\<^sub>f env)\<rbrakk> \<Longrightarrow> vwelldefined' val; fdisjnt C (fmdom \<Gamma>); consts (t $\<^sub>s u) |\<subseteq>| fmdom \<Gamma> |\<union>| C; fmpred (\<lambda>_. vwelldefined') \<Gamma>; pre_strong_term_class.wellformed (t $\<^sub>s u); wellformed_venv \<Gamma>; \<not> shadows_consts (t $\<^sub>s u); not_shadows_vconsts_env \<Gamma>\<rbrakk> \<Longrightarrow> vwelldefined' val
 4. \<And>name \<Gamma> ts us. \<lbrakk>name |\<in>| C; list_all2 (\<lambda>x1 x2. \<Gamma> \<turnstile>\<^sub>v x1 \<down> x2 \<and> (fdisjnt C (fmdom \<Gamma>) \<longrightarrow> consts x1 |\<subseteq>| fmdom \<Gamma> |\<union>| C \<longrightarrow> fmpred (\<lambda>_. vwelldefined') \<Gamma> \<longrightarrow> pre_strong_term_class.wellformed x1 \<longrightarrow> wellformed_venv \<Gamma> \<longrightarrow> \<not> shadows_consts x1 \<longrightarrow> not_shadows_vconsts_env \<Gamma> \<longrightarrow> vwelldefined' x2)) ts us; fdisjnt C (fmdom \<Gamma>); consts (name $$ ts) |\<subseteq>| fmdom \<Gamma> |\<union>| C; fmpred (\<lambda>_. vwelldefined') \<Gamma>; pre_strong_term_class.wellformed (name $$ ts); wellformed_venv \<Gamma>; \<not> shadows_consts (name $$ ts); not_shadows_vconsts_env \<Gamma>\<rbrakk> \<Longrightarrow> vwelldefined' (Vconstr name us)
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
(pat, rhs) \<in> set cs
vwelldefined' (Vrecabs css name \<Gamma>')
[PROOF STEP]
have "consts rhs |\<subseteq>| fmdom \<Gamma>' |\<union>| (C |\<union>| fmdom css)"
[PROOF STATE]
proof (prove)
using this:
(pat, rhs) \<in> set cs
vwelldefined' (Vrecabs css name \<Gamma>')

goal (1 subgoal):
 1. consts rhs |\<subseteq>| fmdom \<Gamma>' |\<union>| (C |\<union>| fmdom css)
[PROOF STEP]
using \<open>fmlookup css name = Some cs\<close>
[PROOF STATE]
proof (prove)
using this:
(pat, rhs) \<in> set cs
vwelldefined' (Vrecabs css name \<Gamma>')
fmlookup css name = Some cs

goal (1 subgoal):
 1. consts rhs |\<subseteq>| fmdom \<Gamma>' |\<union>| (C |\<union>| fmdom css)
[PROOF STEP]
by (auto simp: list_all_iff dest!: fmpredD[where m = css])
[PROOF STATE]
proof (state)
this:
consts rhs |\<subseteq>| fmdom \<Gamma>' |\<union>| (C |\<union>| fmdom css)

goal (4 subgoals):
 1. \<And>name \<Gamma> val. \<lbrakk>name |\<notin>| C; fmlookup \<Gamma> name = Some val; fdisjnt C (fmdom \<Gamma>); consts (Sconst name) |\<subseteq>| fmdom \<Gamma> |\<union>| C; fmpred (\<lambda>_. vwelldefined') \<Gamma>; pre_strong_term_class.wellformed (Sconst name); wellformed_venv \<Gamma>; \<not> shadows_consts (Sconst name); not_shadows_vconsts_env \<Gamma>\<rbrakk> \<Longrightarrow> vwelldefined' val
 2. \<And>\<Gamma> name val. \<lbrakk>fmlookup \<Gamma> name = Some val; fdisjnt C (fmdom \<Gamma>); consts (Svar name) |\<subseteq>| fmdom \<Gamma> |\<union>| C; fmpred (\<lambda>_. vwelldefined') \<Gamma>; pre_strong_term_class.wellformed (Svar name); wellformed_venv \<Gamma>; \<not> shadows_consts (Svar name); not_shadows_vconsts_env \<Gamma>\<rbrakk> \<Longrightarrow> vwelldefined' val
 3. \<And>\<Gamma> t css name \<Gamma>' cs u u' env uv_ rhs val. \<lbrakk>\<Gamma> \<turnstile>\<^sub>v t \<down> Vrecabs css name \<Gamma>'; \<lbrakk>fdisjnt C (fmdom \<Gamma>); consts t |\<subseteq>| fmdom \<Gamma> |\<union>| C; fmpred (\<lambda>_. vwelldefined') \<Gamma>; pre_strong_term_class.wellformed t; wellformed_venv \<Gamma>; \<not> shadows_consts t; not_shadows_vconsts_env \<Gamma>\<rbrakk> \<Longrightarrow> vwelldefined' (Vrecabs css name \<Gamma>'); fmlookup css name = Some cs; \<Gamma> \<turnstile>\<^sub>v u \<down> u'; \<lbrakk>fdisjnt C (fmdom \<Gamma>); consts u |\<subseteq>| fmdom \<Gamma> |\<union>| C; fmpred (\<lambda>_. vwelldefined') \<Gamma>; pre_strong_term_class.wellformed u; wellformed_venv \<Gamma>; \<not> shadows_consts u; not_shadows_vconsts_env \<Gamma>\<rbrakk> \<Longrightarrow> vwelldefined' u'; vfind_match cs u' = Some (env, uv_, rhs); \<Gamma>' ++\<^sub>f mk_rec_env css \<Gamma>' ++\<^sub>f env \<turnstile>\<^sub>v rhs \<down> val; \<lbrakk>fdisjnt C (fmdom (\<Gamma>' ++\<^sub>f mk_rec_env css \<Gamma>' ++\<^sub>f env)); consts rhs |\<subseteq>| fmdom (\<Gamma>' ++\<^sub>f mk_rec_env css \<Gamma>' ++\<^sub>f env) |\<union>| C; fmpred (\<lambda>_. vwelldefined') (\<Gamma>' ++\<^sub>f mk_rec_env css \<Gamma>' ++\<^sub>f env); pre_strong_term_class.wellformed rhs; wellformed_venv (\<Gamma>' ++\<^sub>f mk_rec_env css \<Gamma>' ++\<^sub>f env); \<not> shadows_consts rhs; not_shadows_vconsts_env (\<Gamma>' ++\<^sub>f mk_rec_env css \<Gamma>' ++\<^sub>f env)\<rbrakk> \<Longrightarrow> vwelldefined' val; fdisjnt C (fmdom \<Gamma>); consts (t $\<^sub>s u) |\<subseteq>| fmdom \<Gamma> |\<union>| C; fmpred (\<lambda>_. vwelldefined') \<Gamma>; pre_strong_term_class.wellformed (t $\<^sub>s u); wellformed_venv \<Gamma>; \<not> shadows_consts (t $\<^sub>s u); not_shadows_vconsts_env \<Gamma>\<rbrakk> \<Longrightarrow> vwelldefined' val
 4. \<And>name \<Gamma> ts us. \<lbrakk>name |\<in>| C; list_all2 (\<lambda>x1 x2. \<Gamma> \<turnstile>\<^sub>v x1 \<down> x2 \<and> (fdisjnt C (fmdom \<Gamma>) \<longrightarrow> consts x1 |\<subseteq>| fmdom \<Gamma> |\<union>| C \<longrightarrow> fmpred (\<lambda>_. vwelldefined') \<Gamma> \<longrightarrow> pre_strong_term_class.wellformed x1 \<longrightarrow> wellformed_venv \<Gamma> \<longrightarrow> \<not> shadows_consts x1 \<longrightarrow> not_shadows_vconsts_env \<Gamma> \<longrightarrow> vwelldefined' x2)) ts us; fdisjnt C (fmdom \<Gamma>); consts (name $$ ts) |\<subseteq>| fmdom \<Gamma> |\<union>| C; fmpred (\<lambda>_. vwelldefined') \<Gamma>; pre_strong_term_class.wellformed (name $$ ts); wellformed_venv \<Gamma>; \<not> shadows_consts (name $$ ts); not_shadows_vconsts_env \<Gamma>\<rbrakk> \<Longrightarrow> vwelldefined' (Vconstr name us)
[PROOF STEP]
have "vwellformed (Vrecabs css name \<Gamma>')"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. vwellformed (Vrecabs css name \<Gamma>')
[PROOF STEP]
apply (rule veval'_wellformed)
[PROOF STATE]
proof (prove)
goal (3 subgoals):
 1. ?\<Gamma> \<turnstile>\<^sub>v ?t \<down> Vrecabs css name \<Gamma>'
 2. pre_strong_term_class.wellformed ?t
 3. wellformed_venv ?\<Gamma>
[PROOF STEP]
using rec_comb
[PROOF STATE]
proof (prove)
using this:
\<Gamma> \<turnstile>\<^sub>v t \<down> Vrecabs css name \<Gamma>'
fmlookup css name = Some cs
\<Gamma> \<turnstile>\<^sub>v u \<down> u'
vfind_match cs u' = Some (env, pat, rhs)
\<Gamma>' ++\<^sub>f mk_rec_env css \<Gamma>' ++\<^sub>f env \<turnstile>\<^sub>v rhs \<down> val
\<lbrakk>fdisjnt C (fmdom \<Gamma>); consts t |\<subseteq>| fmdom \<Gamma> |\<union>| C; fmpred (\<lambda>_. vwelldefined') \<Gamma>; pre_strong_term_class.wellformed t; wellformed_venv \<Gamma>; \<not> shadows_consts t; not_shadows_vconsts_env \<Gamma>\<rbrakk> \<Longrightarrow> vwelldefined' (Vrecabs css name \<Gamma>')
\<lbrakk>fdisjnt C (fmdom \<Gamma>); consts u |\<subseteq>| fmdom \<Gamma> |\<union>| C; fmpred (\<lambda>_. vwelldefined') \<Gamma>; pre_strong_term_class.wellformed u; wellformed_venv \<Gamma>; \<not> shadows_consts u; not_shadows_vconsts_env \<Gamma>\<rbrakk> \<Longrightarrow> vwelldefined' u'
\<lbrakk>fdisjnt C (fmdom (\<Gamma>' ++\<^sub>f mk_rec_env css \<Gamma>' ++\<^sub>f env)); consts rhs |\<subseteq>| fmdom (\<Gamma>' ++\<^sub>f mk_rec_env css \<Gamma>' ++\<^sub>f env) |\<union>| C; fmpred (\<lambda>_. vwelldefined') (\<Gamma>' ++\<^sub>f mk_rec_env css \<Gamma>' ++\<^sub>f env); pre_strong_term_class.wellformed rhs; wellformed_venv (\<Gamma>' ++\<^sub>f mk_rec_env css \<Gamma>' ++\<^sub>f env); \<not> shadows_consts rhs; not_shadows_vconsts_env (\<Gamma>' ++\<^sub>f mk_rec_env css \<Gamma>' ++\<^sub>f env)\<rbrakk> \<Longrightarrow> vwelldefined' val
fdisjnt C (fmdom \<Gamma>)
consts (t $\<^sub>s u) |\<subseteq>| fmdom \<Gamma> |\<union>| C
fmpred (\<lambda>_. vwelldefined') \<Gamma>
pre_strong_term_class.wellformed (t $\<^sub>s u)
wellformed_venv \<Gamma>
\<not> shadows_consts (t $\<^sub>s u)
not_shadows_vconsts_env \<Gamma>

goal (3 subgoals):
 1. ?\<Gamma> \<turnstile>\<^sub>v ?t \<down> Vrecabs css name \<Gamma>'
 2. pre_strong_term_class.wellformed ?t
 3. wellformed_venv ?\<Gamma>
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
vwellformed (Vrecabs css name \<Gamma>')

goal (4 subgoals):
 1. \<And>name \<Gamma> val. \<lbrakk>name |\<notin>| C; fmlookup \<Gamma> name = Some val; fdisjnt C (fmdom \<Gamma>); consts (Sconst name) |\<subseteq>| fmdom \<Gamma> |\<union>| C; fmpred (\<lambda>_. vwelldefined') \<Gamma>; pre_strong_term_class.wellformed (Sconst name); wellformed_venv \<Gamma>; \<not> shadows_consts (Sconst name); not_shadows_vconsts_env \<Gamma>\<rbrakk> \<Longrightarrow> vwelldefined' val
 2. \<And>\<Gamma> name val. \<lbrakk>fmlookup \<Gamma> name = Some val; fdisjnt C (fmdom \<Gamma>); consts (Svar name) |\<subseteq>| fmdom \<Gamma> |\<union>| C; fmpred (\<lambda>_. vwelldefined') \<Gamma>; pre_strong_term_class.wellformed (Svar name); wellformed_venv \<Gamma>; \<not> shadows_consts (Svar name); not_shadows_vconsts_env \<Gamma>\<rbrakk> \<Longrightarrow> vwelldefined' val
 3. \<And>\<Gamma> t css name \<Gamma>' cs u u' env uv_ rhs val. \<lbrakk>\<Gamma> \<turnstile>\<^sub>v t \<down> Vrecabs css name \<Gamma>'; \<lbrakk>fdisjnt C (fmdom \<Gamma>); consts t |\<subseteq>| fmdom \<Gamma> |\<union>| C; fmpred (\<lambda>_. vwelldefined') \<Gamma>; pre_strong_term_class.wellformed t; wellformed_venv \<Gamma>; \<not> shadows_consts t; not_shadows_vconsts_env \<Gamma>\<rbrakk> \<Longrightarrow> vwelldefined' (Vrecabs css name \<Gamma>'); fmlookup css name = Some cs; \<Gamma> \<turnstile>\<^sub>v u \<down> u'; \<lbrakk>fdisjnt C (fmdom \<Gamma>); consts u |\<subseteq>| fmdom \<Gamma> |\<union>| C; fmpred (\<lambda>_. vwelldefined') \<Gamma>; pre_strong_term_class.wellformed u; wellformed_venv \<Gamma>; \<not> shadows_consts u; not_shadows_vconsts_env \<Gamma>\<rbrakk> \<Longrightarrow> vwelldefined' u'; vfind_match cs u' = Some (env, uv_, rhs); \<Gamma>' ++\<^sub>f mk_rec_env css \<Gamma>' ++\<^sub>f env \<turnstile>\<^sub>v rhs \<down> val; \<lbrakk>fdisjnt C (fmdom (\<Gamma>' ++\<^sub>f mk_rec_env css \<Gamma>' ++\<^sub>f env)); consts rhs |\<subseteq>| fmdom (\<Gamma>' ++\<^sub>f mk_rec_env css \<Gamma>' ++\<^sub>f env) |\<union>| C; fmpred (\<lambda>_. vwelldefined') (\<Gamma>' ++\<^sub>f mk_rec_env css \<Gamma>' ++\<^sub>f env); pre_strong_term_class.wellformed rhs; wellformed_venv (\<Gamma>' ++\<^sub>f mk_rec_env css \<Gamma>' ++\<^sub>f env); \<not> shadows_consts rhs; not_shadows_vconsts_env (\<Gamma>' ++\<^sub>f mk_rec_env css \<Gamma>' ++\<^sub>f env)\<rbrakk> \<Longrightarrow> vwelldefined' val; fdisjnt C (fmdom \<Gamma>); consts (t $\<^sub>s u) |\<subseteq>| fmdom \<Gamma> |\<union>| C; fmpred (\<lambda>_. vwelldefined') \<Gamma>; pre_strong_term_class.wellformed (t $\<^sub>s u); wellformed_venv \<Gamma>; \<not> shadows_consts (t $\<^sub>s u); not_shadows_vconsts_env \<Gamma>\<rbrakk> \<Longrightarrow> vwelldefined' val
 4. \<And>name \<Gamma> ts us. \<lbrakk>name |\<in>| C; list_all2 (\<lambda>x1 x2. \<Gamma> \<turnstile>\<^sub>v x1 \<down> x2 \<and> (fdisjnt C (fmdom \<Gamma>) \<longrightarrow> consts x1 |\<subseteq>| fmdom \<Gamma> |\<union>| C \<longrightarrow> fmpred (\<lambda>_. vwelldefined') \<Gamma> \<longrightarrow> pre_strong_term_class.wellformed x1 \<longrightarrow> wellformed_venv \<Gamma> \<longrightarrow> \<not> shadows_consts x1 \<longrightarrow> not_shadows_vconsts_env \<Gamma> \<longrightarrow> vwelldefined' x2)) ts us; fdisjnt C (fmdom \<Gamma>); consts (name $$ ts) |\<subseteq>| fmdom \<Gamma> |\<union>| C; fmpred (\<lambda>_. vwelldefined') \<Gamma>; pre_strong_term_class.wellformed (name $$ ts); wellformed_venv \<Gamma>; \<not> shadows_consts (name $$ ts); not_shadows_vconsts_env \<Gamma>\<rbrakk> \<Longrightarrow> vwelldefined' (Vconstr name us)
[PROOF STEP]
hence "wellformed_clauses cs"
[PROOF STATE]
proof (prove)
using this:
vwellformed (Vrecabs css name \<Gamma>')

goal (1 subgoal):
 1. wellformed_clauses cs
[PROOF STEP]
using rec_comb
[PROOF STATE]
proof (prove)
using this:
vwellformed (Vrecabs css name \<Gamma>')
\<Gamma> \<turnstile>\<^sub>v t \<down> Vrecabs css name \<Gamma>'
fmlookup css name = Some cs
\<Gamma> \<turnstile>\<^sub>v u \<down> u'
vfind_match cs u' = Some (env, pat, rhs)
\<Gamma>' ++\<^sub>f mk_rec_env css \<Gamma>' ++\<^sub>f env \<turnstile>\<^sub>v rhs \<down> val
\<lbrakk>fdisjnt C (fmdom \<Gamma>); consts t |\<subseteq>| fmdom \<Gamma> |\<union>| C; fmpred (\<lambda>_. vwelldefined') \<Gamma>; pre_strong_term_class.wellformed t; wellformed_venv \<Gamma>; \<not> shadows_consts t; not_shadows_vconsts_env \<Gamma>\<rbrakk> \<Longrightarrow> vwelldefined' (Vrecabs css name \<Gamma>')
\<lbrakk>fdisjnt C (fmdom \<Gamma>); consts u |\<subseteq>| fmdom \<Gamma> |\<union>| C; fmpred (\<lambda>_. vwelldefined') \<Gamma>; pre_strong_term_class.wellformed u; wellformed_venv \<Gamma>; \<not> shadows_consts u; not_shadows_vconsts_env \<Gamma>\<rbrakk> \<Longrightarrow> vwelldefined' u'
\<lbrakk>fdisjnt C (fmdom (\<Gamma>' ++\<^sub>f mk_rec_env css \<Gamma>' ++\<^sub>f env)); consts rhs |\<subseteq>| fmdom (\<Gamma>' ++\<^sub>f mk_rec_env css \<Gamma>' ++\<^sub>f env) |\<union>| C; fmpred (\<lambda>_. vwelldefined') (\<Gamma>' ++\<^sub>f mk_rec_env css \<Gamma>' ++\<^sub>f env); pre_strong_term_class.wellformed rhs; wellformed_venv (\<Gamma>' ++\<^sub>f mk_rec_env css \<Gamma>' ++\<^sub>f env); \<not> shadows_consts rhs; not_shadows_vconsts_env (\<Gamma>' ++\<^sub>f mk_rec_env css \<Gamma>' ++\<^sub>f env)\<rbrakk> \<Longrightarrow> vwelldefined' val
fdisjnt C (fmdom \<Gamma>)
consts (t $\<^sub>s u) |\<subseteq>| fmdom \<Gamma> |\<union>| C
fmpred (\<lambda>_. vwelldefined') \<Gamma>
pre_strong_term_class.wellformed (t $\<^sub>s u)
wellformed_venv \<Gamma>
\<not> shadows_consts (t $\<^sub>s u)
not_shadows_vconsts_env \<Gamma>

goal (1 subgoal):
 1. wellformed_clauses cs
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
wellformed_clauses cs

goal (4 subgoals):
 1. \<And>name \<Gamma> val. \<lbrakk>name |\<notin>| C; fmlookup \<Gamma> name = Some val; fdisjnt C (fmdom \<Gamma>); consts (Sconst name) |\<subseteq>| fmdom \<Gamma> |\<union>| C; fmpred (\<lambda>_. vwelldefined') \<Gamma>; pre_strong_term_class.wellformed (Sconst name); wellformed_venv \<Gamma>; \<not> shadows_consts (Sconst name); not_shadows_vconsts_env \<Gamma>\<rbrakk> \<Longrightarrow> vwelldefined' val
 2. \<And>\<Gamma> name val. \<lbrakk>fmlookup \<Gamma> name = Some val; fdisjnt C (fmdom \<Gamma>); consts (Svar name) |\<subseteq>| fmdom \<Gamma> |\<union>| C; fmpred (\<lambda>_. vwelldefined') \<Gamma>; pre_strong_term_class.wellformed (Svar name); wellformed_venv \<Gamma>; \<not> shadows_consts (Svar name); not_shadows_vconsts_env \<Gamma>\<rbrakk> \<Longrightarrow> vwelldefined' val
 3. \<And>\<Gamma> t css name \<Gamma>' cs u u' env uv_ rhs val. \<lbrakk>\<Gamma> \<turnstile>\<^sub>v t \<down> Vrecabs css name \<Gamma>'; \<lbrakk>fdisjnt C (fmdom \<Gamma>); consts t |\<subseteq>| fmdom \<Gamma> |\<union>| C; fmpred (\<lambda>_. vwelldefined') \<Gamma>; pre_strong_term_class.wellformed t; wellformed_venv \<Gamma>; \<not> shadows_consts t; not_shadows_vconsts_env \<Gamma>\<rbrakk> \<Longrightarrow> vwelldefined' (Vrecabs css name \<Gamma>'); fmlookup css name = Some cs; \<Gamma> \<turnstile>\<^sub>v u \<down> u'; \<lbrakk>fdisjnt C (fmdom \<Gamma>); consts u |\<subseteq>| fmdom \<Gamma> |\<union>| C; fmpred (\<lambda>_. vwelldefined') \<Gamma>; pre_strong_term_class.wellformed u; wellformed_venv \<Gamma>; \<not> shadows_consts u; not_shadows_vconsts_env \<Gamma>\<rbrakk> \<Longrightarrow> vwelldefined' u'; vfind_match cs u' = Some (env, uv_, rhs); \<Gamma>' ++\<^sub>f mk_rec_env css \<Gamma>' ++\<^sub>f env \<turnstile>\<^sub>v rhs \<down> val; \<lbrakk>fdisjnt C (fmdom (\<Gamma>' ++\<^sub>f mk_rec_env css \<Gamma>' ++\<^sub>f env)); consts rhs |\<subseteq>| fmdom (\<Gamma>' ++\<^sub>f mk_rec_env css \<Gamma>' ++\<^sub>f env) |\<union>| C; fmpred (\<lambda>_. vwelldefined') (\<Gamma>' ++\<^sub>f mk_rec_env css \<Gamma>' ++\<^sub>f env); pre_strong_term_class.wellformed rhs; wellformed_venv (\<Gamma>' ++\<^sub>f mk_rec_env css \<Gamma>' ++\<^sub>f env); \<not> shadows_consts rhs; not_shadows_vconsts_env (\<Gamma>' ++\<^sub>f mk_rec_env css \<Gamma>' ++\<^sub>f env)\<rbrakk> \<Longrightarrow> vwelldefined' val; fdisjnt C (fmdom \<Gamma>); consts (t $\<^sub>s u) |\<subseteq>| fmdom \<Gamma> |\<union>| C; fmpred (\<lambda>_. vwelldefined') \<Gamma>; pre_strong_term_class.wellformed (t $\<^sub>s u); wellformed_venv \<Gamma>; \<not> shadows_consts (t $\<^sub>s u); not_shadows_vconsts_env \<Gamma>\<rbrakk> \<Longrightarrow> vwelldefined' val
 4. \<And>name \<Gamma> ts us. \<lbrakk>name |\<in>| C; list_all2 (\<lambda>x1 x2. \<Gamma> \<turnstile>\<^sub>v x1 \<down> x2 \<and> (fdisjnt C (fmdom \<Gamma>) \<longrightarrow> consts x1 |\<subseteq>| fmdom \<Gamma> |\<union>| C \<longrightarrow> fmpred (\<lambda>_. vwelldefined') \<Gamma> \<longrightarrow> pre_strong_term_class.wellformed x1 \<longrightarrow> wellformed_venv \<Gamma> \<longrightarrow> \<not> shadows_consts x1 \<longrightarrow> not_shadows_vconsts_env \<Gamma> \<longrightarrow> vwelldefined' x2)) ts us; fdisjnt C (fmdom \<Gamma>); consts (name $$ ts) |\<subseteq>| fmdom \<Gamma> |\<union>| C; fmpred (\<lambda>_. vwelldefined') \<Gamma>; pre_strong_term_class.wellformed (name $$ ts); wellformed_venv \<Gamma>; \<not> shadows_consts (name $$ ts); not_shadows_vconsts_env \<Gamma>\<rbrakk> \<Longrightarrow> vwelldefined' (Vconstr name us)
[PROOF STEP]
hence "linear pat"
[PROOF STATE]
proof (prove)
using this:
wellformed_clauses cs

goal (1 subgoal):
 1. linear pat
[PROOF STEP]
using \<open>(pat, rhs) \<in> set cs\<close>
[PROOF STATE]
proof (prove)
using this:
wellformed_clauses cs
(pat, rhs) \<in> set cs

goal (1 subgoal):
 1. linear pat
[PROOF STEP]
by (auto simp: list_all_iff)
[PROOF STATE]
proof (state)
this:
linear pat

goal (4 subgoals):
 1. \<And>name \<Gamma> val. \<lbrakk>name |\<notin>| C; fmlookup \<Gamma> name = Some val; fdisjnt C (fmdom \<Gamma>); consts (Sconst name) |\<subseteq>| fmdom \<Gamma> |\<union>| C; fmpred (\<lambda>_. vwelldefined') \<Gamma>; pre_strong_term_class.wellformed (Sconst name); wellformed_venv \<Gamma>; \<not> shadows_consts (Sconst name); not_shadows_vconsts_env \<Gamma>\<rbrakk> \<Longrightarrow> vwelldefined' val
 2. \<And>\<Gamma> name val. \<lbrakk>fmlookup \<Gamma> name = Some val; fdisjnt C (fmdom \<Gamma>); consts (Svar name) |\<subseteq>| fmdom \<Gamma> |\<union>| C; fmpred (\<lambda>_. vwelldefined') \<Gamma>; pre_strong_term_class.wellformed (Svar name); wellformed_venv \<Gamma>; \<not> shadows_consts (Svar name); not_shadows_vconsts_env \<Gamma>\<rbrakk> \<Longrightarrow> vwelldefined' val
 3. \<And>\<Gamma> t css name \<Gamma>' cs u u' env uv_ rhs val. \<lbrakk>\<Gamma> \<turnstile>\<^sub>v t \<down> Vrecabs css name \<Gamma>'; \<lbrakk>fdisjnt C (fmdom \<Gamma>); consts t |\<subseteq>| fmdom \<Gamma> |\<union>| C; fmpred (\<lambda>_. vwelldefined') \<Gamma>; pre_strong_term_class.wellformed t; wellformed_venv \<Gamma>; \<not> shadows_consts t; not_shadows_vconsts_env \<Gamma>\<rbrakk> \<Longrightarrow> vwelldefined' (Vrecabs css name \<Gamma>'); fmlookup css name = Some cs; \<Gamma> \<turnstile>\<^sub>v u \<down> u'; \<lbrakk>fdisjnt C (fmdom \<Gamma>); consts u |\<subseteq>| fmdom \<Gamma> |\<union>| C; fmpred (\<lambda>_. vwelldefined') \<Gamma>; pre_strong_term_class.wellformed u; wellformed_venv \<Gamma>; \<not> shadows_consts u; not_shadows_vconsts_env \<Gamma>\<rbrakk> \<Longrightarrow> vwelldefined' u'; vfind_match cs u' = Some (env, uv_, rhs); \<Gamma>' ++\<^sub>f mk_rec_env css \<Gamma>' ++\<^sub>f env \<turnstile>\<^sub>v rhs \<down> val; \<lbrakk>fdisjnt C (fmdom (\<Gamma>' ++\<^sub>f mk_rec_env css \<Gamma>' ++\<^sub>f env)); consts rhs |\<subseteq>| fmdom (\<Gamma>' ++\<^sub>f mk_rec_env css \<Gamma>' ++\<^sub>f env) |\<union>| C; fmpred (\<lambda>_. vwelldefined') (\<Gamma>' ++\<^sub>f mk_rec_env css \<Gamma>' ++\<^sub>f env); pre_strong_term_class.wellformed rhs; wellformed_venv (\<Gamma>' ++\<^sub>f mk_rec_env css \<Gamma>' ++\<^sub>f env); \<not> shadows_consts rhs; not_shadows_vconsts_env (\<Gamma>' ++\<^sub>f mk_rec_env css \<Gamma>' ++\<^sub>f env)\<rbrakk> \<Longrightarrow> vwelldefined' val; fdisjnt C (fmdom \<Gamma>); consts (t $\<^sub>s u) |\<subseteq>| fmdom \<Gamma> |\<union>| C; fmpred (\<lambda>_. vwelldefined') \<Gamma>; pre_strong_term_class.wellformed (t $\<^sub>s u); wellformed_venv \<Gamma>; \<not> shadows_consts (t $\<^sub>s u); not_shadows_vconsts_env \<Gamma>\<rbrakk> \<Longrightarrow> vwelldefined' val
 4. \<And>name \<Gamma> ts us. \<lbrakk>name |\<in>| C; list_all2 (\<lambda>x1 x2. \<Gamma> \<turnstile>\<^sub>v x1 \<down> x2 \<and> (fdisjnt C (fmdom \<Gamma>) \<longrightarrow> consts x1 |\<subseteq>| fmdom \<Gamma> |\<union>| C \<longrightarrow> fmpred (\<lambda>_. vwelldefined') \<Gamma> \<longrightarrow> pre_strong_term_class.wellformed x1 \<longrightarrow> wellformed_venv \<Gamma> \<longrightarrow> \<not> shadows_consts x1 \<longrightarrow> not_shadows_vconsts_env \<Gamma> \<longrightarrow> vwelldefined' x2)) ts us; fdisjnt C (fmdom \<Gamma>); consts (name $$ ts) |\<subseteq>| fmdom \<Gamma> |\<union>| C; fmpred (\<lambda>_. vwelldefined') \<Gamma>; pre_strong_term_class.wellformed (name $$ ts); wellformed_venv \<Gamma>; \<not> shadows_consts (name $$ ts); not_shadows_vconsts_env \<Gamma>\<rbrakk> \<Longrightarrow> vwelldefined' (Vconstr name us)
[PROOF STEP]
hence "frees pat = patvars (mk_pat pat)"
[PROOF STATE]
proof (prove)
using this:
linear pat

goal (1 subgoal):
 1. frees pat = patvars (mk_pat pat)
[PROOF STEP]
by (simp add: mk_pat_frees)
[PROOF STATE]
proof (state)
this:
frees pat = patvars (mk_pat pat)

goal (4 subgoals):
 1. \<And>name \<Gamma> val. \<lbrakk>name |\<notin>| C; fmlookup \<Gamma> name = Some val; fdisjnt C (fmdom \<Gamma>); consts (Sconst name) |\<subseteq>| fmdom \<Gamma> |\<union>| C; fmpred (\<lambda>_. vwelldefined') \<Gamma>; pre_strong_term_class.wellformed (Sconst name); wellformed_venv \<Gamma>; \<not> shadows_consts (Sconst name); not_shadows_vconsts_env \<Gamma>\<rbrakk> \<Longrightarrow> vwelldefined' val
 2. \<And>\<Gamma> name val. \<lbrakk>fmlookup \<Gamma> name = Some val; fdisjnt C (fmdom \<Gamma>); consts (Svar name) |\<subseteq>| fmdom \<Gamma> |\<union>| C; fmpred (\<lambda>_. vwelldefined') \<Gamma>; pre_strong_term_class.wellformed (Svar name); wellformed_venv \<Gamma>; \<not> shadows_consts (Svar name); not_shadows_vconsts_env \<Gamma>\<rbrakk> \<Longrightarrow> vwelldefined' val
 3. \<And>\<Gamma> t css name \<Gamma>' cs u u' env uv_ rhs val. \<lbrakk>\<Gamma> \<turnstile>\<^sub>v t \<down> Vrecabs css name \<Gamma>'; \<lbrakk>fdisjnt C (fmdom \<Gamma>); consts t |\<subseteq>| fmdom \<Gamma> |\<union>| C; fmpred (\<lambda>_. vwelldefined') \<Gamma>; pre_strong_term_class.wellformed t; wellformed_venv \<Gamma>; \<not> shadows_consts t; not_shadows_vconsts_env \<Gamma>\<rbrakk> \<Longrightarrow> vwelldefined' (Vrecabs css name \<Gamma>'); fmlookup css name = Some cs; \<Gamma> \<turnstile>\<^sub>v u \<down> u'; \<lbrakk>fdisjnt C (fmdom \<Gamma>); consts u |\<subseteq>| fmdom \<Gamma> |\<union>| C; fmpred (\<lambda>_. vwelldefined') \<Gamma>; pre_strong_term_class.wellformed u; wellformed_venv \<Gamma>; \<not> shadows_consts u; not_shadows_vconsts_env \<Gamma>\<rbrakk> \<Longrightarrow> vwelldefined' u'; vfind_match cs u' = Some (env, uv_, rhs); \<Gamma>' ++\<^sub>f mk_rec_env css \<Gamma>' ++\<^sub>f env \<turnstile>\<^sub>v rhs \<down> val; \<lbrakk>fdisjnt C (fmdom (\<Gamma>' ++\<^sub>f mk_rec_env css \<Gamma>' ++\<^sub>f env)); consts rhs |\<subseteq>| fmdom (\<Gamma>' ++\<^sub>f mk_rec_env css \<Gamma>' ++\<^sub>f env) |\<union>| C; fmpred (\<lambda>_. vwelldefined') (\<Gamma>' ++\<^sub>f mk_rec_env css \<Gamma>' ++\<^sub>f env); pre_strong_term_class.wellformed rhs; wellformed_venv (\<Gamma>' ++\<^sub>f mk_rec_env css \<Gamma>' ++\<^sub>f env); \<not> shadows_consts rhs; not_shadows_vconsts_env (\<Gamma>' ++\<^sub>f mk_rec_env css \<Gamma>' ++\<^sub>f env)\<rbrakk> \<Longrightarrow> vwelldefined' val; fdisjnt C (fmdom \<Gamma>); consts (t $\<^sub>s u) |\<subseteq>| fmdom \<Gamma> |\<union>| C; fmpred (\<lambda>_. vwelldefined') \<Gamma>; pre_strong_term_class.wellformed (t $\<^sub>s u); wellformed_venv \<Gamma>; \<not> shadows_consts (t $\<^sub>s u); not_shadows_vconsts_env \<Gamma>\<rbrakk> \<Longrightarrow> vwelldefined' val
 4. \<And>name \<Gamma> ts us. \<lbrakk>name |\<in>| C; list_all2 (\<lambda>x1 x2. \<Gamma> \<turnstile>\<^sub>v x1 \<down> x2 \<and> (fdisjnt C (fmdom \<Gamma>) \<longrightarrow> consts x1 |\<subseteq>| fmdom \<Gamma> |\<union>| C \<longrightarrow> fmpred (\<lambda>_. vwelldefined') \<Gamma> \<longrightarrow> pre_strong_term_class.wellformed x1 \<longrightarrow> wellformed_venv \<Gamma> \<longrightarrow> \<not> shadows_consts x1 \<longrightarrow> not_shadows_vconsts_env \<Gamma> \<longrightarrow> vwelldefined' x2)) ts us; fdisjnt C (fmdom \<Gamma>); consts (name $$ ts) |\<subseteq>| fmdom \<Gamma> |\<union>| C; fmpred (\<lambda>_. vwelldefined') \<Gamma>; pre_strong_term_class.wellformed (name $$ ts); wellformed_venv \<Gamma>; \<not> shadows_consts (name $$ ts); not_shadows_vconsts_env \<Gamma>\<rbrakk> \<Longrightarrow> vwelldefined' (Vconstr name us)
[PROOF STEP]
hence "fmdom env = frees pat"
[PROOF STATE]
proof (prove)
using this:
frees pat = patvars (mk_pat pat)

goal (1 subgoal):
 1. fmdom env = frees pat
[PROOF STEP]
apply simp
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. frees pat = patvars (mk_pat pat) \<Longrightarrow> fmdom env = patvars (mk_pat pat)
[PROOF STEP]
apply (rule vmatch_dom)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. frees pat = patvars (mk_pat pat) \<Longrightarrow> vmatch (mk_pat pat) ?v1 = Some env
[PROOF STEP]
apply (rule vfind_match_elem)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. frees pat = patvars (mk_pat pat) \<Longrightarrow> vfind_match ?cs3 ?v1 = Some (env, pat, ?rhs3)
[PROOF STEP]
apply (rule rec_comb)
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done
[PROOF STATE]
proof (state)
this:
fmdom env = frees pat

goal (4 subgoals):
 1. \<And>name \<Gamma> val. \<lbrakk>name |\<notin>| C; fmlookup \<Gamma> name = Some val; fdisjnt C (fmdom \<Gamma>); consts (Sconst name) |\<subseteq>| fmdom \<Gamma> |\<union>| C; fmpred (\<lambda>_. vwelldefined') \<Gamma>; pre_strong_term_class.wellformed (Sconst name); wellformed_venv \<Gamma>; \<not> shadows_consts (Sconst name); not_shadows_vconsts_env \<Gamma>\<rbrakk> \<Longrightarrow> vwelldefined' val
 2. \<And>\<Gamma> name val. \<lbrakk>fmlookup \<Gamma> name = Some val; fdisjnt C (fmdom \<Gamma>); consts (Svar name) |\<subseteq>| fmdom \<Gamma> |\<union>| C; fmpred (\<lambda>_. vwelldefined') \<Gamma>; pre_strong_term_class.wellformed (Svar name); wellformed_venv \<Gamma>; \<not> shadows_consts (Svar name); not_shadows_vconsts_env \<Gamma>\<rbrakk> \<Longrightarrow> vwelldefined' val
 3. \<And>\<Gamma> t css name \<Gamma>' cs u u' env uv_ rhs val. \<lbrakk>\<Gamma> \<turnstile>\<^sub>v t \<down> Vrecabs css name \<Gamma>'; \<lbrakk>fdisjnt C (fmdom \<Gamma>); consts t |\<subseteq>| fmdom \<Gamma> |\<union>| C; fmpred (\<lambda>_. vwelldefined') \<Gamma>; pre_strong_term_class.wellformed t; wellformed_venv \<Gamma>; \<not> shadows_consts t; not_shadows_vconsts_env \<Gamma>\<rbrakk> \<Longrightarrow> vwelldefined' (Vrecabs css name \<Gamma>'); fmlookup css name = Some cs; \<Gamma> \<turnstile>\<^sub>v u \<down> u'; \<lbrakk>fdisjnt C (fmdom \<Gamma>); consts u |\<subseteq>| fmdom \<Gamma> |\<union>| C; fmpred (\<lambda>_. vwelldefined') \<Gamma>; pre_strong_term_class.wellformed u; wellformed_venv \<Gamma>; \<not> shadows_consts u; not_shadows_vconsts_env \<Gamma>\<rbrakk> \<Longrightarrow> vwelldefined' u'; vfind_match cs u' = Some (env, uv_, rhs); \<Gamma>' ++\<^sub>f mk_rec_env css \<Gamma>' ++\<^sub>f env \<turnstile>\<^sub>v rhs \<down> val; \<lbrakk>fdisjnt C (fmdom (\<Gamma>' ++\<^sub>f mk_rec_env css \<Gamma>' ++\<^sub>f env)); consts rhs |\<subseteq>| fmdom (\<Gamma>' ++\<^sub>f mk_rec_env css \<Gamma>' ++\<^sub>f env) |\<union>| C; fmpred (\<lambda>_. vwelldefined') (\<Gamma>' ++\<^sub>f mk_rec_env css \<Gamma>' ++\<^sub>f env); pre_strong_term_class.wellformed rhs; wellformed_venv (\<Gamma>' ++\<^sub>f mk_rec_env css \<Gamma>' ++\<^sub>f env); \<not> shadows_consts rhs; not_shadows_vconsts_env (\<Gamma>' ++\<^sub>f mk_rec_env css \<Gamma>' ++\<^sub>f env)\<rbrakk> \<Longrightarrow> vwelldefined' val; fdisjnt C (fmdom \<Gamma>); consts (t $\<^sub>s u) |\<subseteq>| fmdom \<Gamma> |\<union>| C; fmpred (\<lambda>_. vwelldefined') \<Gamma>; pre_strong_term_class.wellformed (t $\<^sub>s u); wellformed_venv \<Gamma>; \<not> shadows_consts (t $\<^sub>s u); not_shadows_vconsts_env \<Gamma>\<rbrakk> \<Longrightarrow> vwelldefined' val
 4. \<And>name \<Gamma> ts us. \<lbrakk>name |\<in>| C; list_all2 (\<lambda>x1 x2. \<Gamma> \<turnstile>\<^sub>v x1 \<down> x2 \<and> (fdisjnt C (fmdom \<Gamma>) \<longrightarrow> consts x1 |\<subseteq>| fmdom \<Gamma> |\<union>| C \<longrightarrow> fmpred (\<lambda>_. vwelldefined') \<Gamma> \<longrightarrow> pre_strong_term_class.wellformed x1 \<longrightarrow> wellformed_venv \<Gamma> \<longrightarrow> \<not> shadows_consts x1 \<longrightarrow> not_shadows_vconsts_env \<Gamma> \<longrightarrow> vwelldefined' x2)) ts us; fdisjnt C (fmdom \<Gamma>); consts (name $$ ts) |\<subseteq>| fmdom \<Gamma> |\<union>| C; fmpred (\<lambda>_. vwelldefined') \<Gamma>; pre_strong_term_class.wellformed (name $$ ts); wellformed_venv \<Gamma>; \<not> shadows_consts (name $$ ts); not_shadows_vconsts_env \<Gamma>\<rbrakk> \<Longrightarrow> vwelldefined' (Vconstr name us)
[PROOF STEP]
have "not_shadows_vconsts (Vrecabs css name \<Gamma>')"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. not_shadows_vconsts (Vrecabs css name \<Gamma>')
[PROOF STEP]
apply (rule veval'_shadows)
[PROOF STATE]
proof (prove)
goal (3 subgoals):
 1. ?\<Gamma> \<turnstile>\<^sub>v ?t \<down> Vrecabs css name \<Gamma>'
 2. not_shadows_vconsts_env ?\<Gamma>
 3. \<not> shadows_consts ?t
[PROOF STEP]
using rec_comb
[PROOF STATE]
proof (prove)
using this:
\<Gamma> \<turnstile>\<^sub>v t \<down> Vrecabs css name \<Gamma>'
fmlookup css name = Some cs
\<Gamma> \<turnstile>\<^sub>v u \<down> u'
vfind_match cs u' = Some (env, pat, rhs)
\<Gamma>' ++\<^sub>f mk_rec_env css \<Gamma>' ++\<^sub>f env \<turnstile>\<^sub>v rhs \<down> val
\<lbrakk>fdisjnt C (fmdom \<Gamma>); consts t |\<subseteq>| fmdom \<Gamma> |\<union>| C; fmpred (\<lambda>_. vwelldefined') \<Gamma>; pre_strong_term_class.wellformed t; wellformed_venv \<Gamma>; \<not> shadows_consts t; not_shadows_vconsts_env \<Gamma>\<rbrakk> \<Longrightarrow> vwelldefined' (Vrecabs css name \<Gamma>')
\<lbrakk>fdisjnt C (fmdom \<Gamma>); consts u |\<subseteq>| fmdom \<Gamma> |\<union>| C; fmpred (\<lambda>_. vwelldefined') \<Gamma>; pre_strong_term_class.wellformed u; wellformed_venv \<Gamma>; \<not> shadows_consts u; not_shadows_vconsts_env \<Gamma>\<rbrakk> \<Longrightarrow> vwelldefined' u'
\<lbrakk>fdisjnt C (fmdom (\<Gamma>' ++\<^sub>f mk_rec_env css \<Gamma>' ++\<^sub>f env)); consts rhs |\<subseteq>| fmdom (\<Gamma>' ++\<^sub>f mk_rec_env css \<Gamma>' ++\<^sub>f env) |\<union>| C; fmpred (\<lambda>_. vwelldefined') (\<Gamma>' ++\<^sub>f mk_rec_env css \<Gamma>' ++\<^sub>f env); pre_strong_term_class.wellformed rhs; wellformed_venv (\<Gamma>' ++\<^sub>f mk_rec_env css \<Gamma>' ++\<^sub>f env); \<not> shadows_consts rhs; not_shadows_vconsts_env (\<Gamma>' ++\<^sub>f mk_rec_env css \<Gamma>' ++\<^sub>f env)\<rbrakk> \<Longrightarrow> vwelldefined' val
fdisjnt C (fmdom \<Gamma>)
consts (t $\<^sub>s u) |\<subseteq>| fmdom \<Gamma> |\<union>| C
fmpred (\<lambda>_. vwelldefined') \<Gamma>
pre_strong_term_class.wellformed (t $\<^sub>s u)
wellformed_venv \<Gamma>
\<not> shadows_consts (t $\<^sub>s u)
not_shadows_vconsts_env \<Gamma>

goal (3 subgoals):
 1. ?\<Gamma> \<turnstile>\<^sub>v ?t \<down> Vrecabs css name \<Gamma>'
 2. not_shadows_vconsts_env ?\<Gamma>
 3. \<not> shadows_consts ?t
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
not_shadows_vconsts (Vrecabs css name \<Gamma>')

goal (4 subgoals):
 1. \<And>name \<Gamma> val. \<lbrakk>name |\<notin>| C; fmlookup \<Gamma> name = Some val; fdisjnt C (fmdom \<Gamma>); consts (Sconst name) |\<subseteq>| fmdom \<Gamma> |\<union>| C; fmpred (\<lambda>_. vwelldefined') \<Gamma>; pre_strong_term_class.wellformed (Sconst name); wellformed_venv \<Gamma>; \<not> shadows_consts (Sconst name); not_shadows_vconsts_env \<Gamma>\<rbrakk> \<Longrightarrow> vwelldefined' val
 2. \<And>\<Gamma> name val. \<lbrakk>fmlookup \<Gamma> name = Some val; fdisjnt C (fmdom \<Gamma>); consts (Svar name) |\<subseteq>| fmdom \<Gamma> |\<union>| C; fmpred (\<lambda>_. vwelldefined') \<Gamma>; pre_strong_term_class.wellformed (Svar name); wellformed_venv \<Gamma>; \<not> shadows_consts (Svar name); not_shadows_vconsts_env \<Gamma>\<rbrakk> \<Longrightarrow> vwelldefined' val
 3. \<And>\<Gamma> t css name \<Gamma>' cs u u' env uv_ rhs val. \<lbrakk>\<Gamma> \<turnstile>\<^sub>v t \<down> Vrecabs css name \<Gamma>'; \<lbrakk>fdisjnt C (fmdom \<Gamma>); consts t |\<subseteq>| fmdom \<Gamma> |\<union>| C; fmpred (\<lambda>_. vwelldefined') \<Gamma>; pre_strong_term_class.wellformed t; wellformed_venv \<Gamma>; \<not> shadows_consts t; not_shadows_vconsts_env \<Gamma>\<rbrakk> \<Longrightarrow> vwelldefined' (Vrecabs css name \<Gamma>'); fmlookup css name = Some cs; \<Gamma> \<turnstile>\<^sub>v u \<down> u'; \<lbrakk>fdisjnt C (fmdom \<Gamma>); consts u |\<subseteq>| fmdom \<Gamma> |\<union>| C; fmpred (\<lambda>_. vwelldefined') \<Gamma>; pre_strong_term_class.wellformed u; wellformed_venv \<Gamma>; \<not> shadows_consts u; not_shadows_vconsts_env \<Gamma>\<rbrakk> \<Longrightarrow> vwelldefined' u'; vfind_match cs u' = Some (env, uv_, rhs); \<Gamma>' ++\<^sub>f mk_rec_env css \<Gamma>' ++\<^sub>f env \<turnstile>\<^sub>v rhs \<down> val; \<lbrakk>fdisjnt C (fmdom (\<Gamma>' ++\<^sub>f mk_rec_env css \<Gamma>' ++\<^sub>f env)); consts rhs |\<subseteq>| fmdom (\<Gamma>' ++\<^sub>f mk_rec_env css \<Gamma>' ++\<^sub>f env) |\<union>| C; fmpred (\<lambda>_. vwelldefined') (\<Gamma>' ++\<^sub>f mk_rec_env css \<Gamma>' ++\<^sub>f env); pre_strong_term_class.wellformed rhs; wellformed_venv (\<Gamma>' ++\<^sub>f mk_rec_env css \<Gamma>' ++\<^sub>f env); \<not> shadows_consts rhs; not_shadows_vconsts_env (\<Gamma>' ++\<^sub>f mk_rec_env css \<Gamma>' ++\<^sub>f env)\<rbrakk> \<Longrightarrow> vwelldefined' val; fdisjnt C (fmdom \<Gamma>); consts (t $\<^sub>s u) |\<subseteq>| fmdom \<Gamma> |\<union>| C; fmpred (\<lambda>_. vwelldefined') \<Gamma>; pre_strong_term_class.wellformed (t $\<^sub>s u); wellformed_venv \<Gamma>; \<not> shadows_consts (t $\<^sub>s u); not_shadows_vconsts_env \<Gamma>\<rbrakk> \<Longrightarrow> vwelldefined' val
 4. \<And>name \<Gamma> ts us. \<lbrakk>name |\<in>| C; list_all2 (\<lambda>x1 x2. \<Gamma> \<turnstile>\<^sub>v x1 \<down> x2 \<and> (fdisjnt C (fmdom \<Gamma>) \<longrightarrow> consts x1 |\<subseteq>| fmdom \<Gamma> |\<union>| C \<longrightarrow> fmpred (\<lambda>_. vwelldefined') \<Gamma> \<longrightarrow> pre_strong_term_class.wellformed x1 \<longrightarrow> wellformed_venv \<Gamma> \<longrightarrow> \<not> shadows_consts x1 \<longrightarrow> not_shadows_vconsts_env \<Gamma> \<longrightarrow> vwelldefined' x2)) ts us; fdisjnt C (fmdom \<Gamma>); consts (name $$ ts) |\<subseteq>| fmdom \<Gamma> |\<union>| C; fmpred (\<lambda>_. vwelldefined') \<Gamma>; pre_strong_term_class.wellformed (name $$ ts); wellformed_venv \<Gamma>; \<not> shadows_consts (name $$ ts); not_shadows_vconsts_env \<Gamma>\<rbrakk> \<Longrightarrow> vwelldefined' (Vconstr name us)
[PROOF STEP]
have "vwelldefined' (Vrecabs css name \<Gamma>')"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. vwelldefined' (Vrecabs css name \<Gamma>')
[PROOF STEP]
using rec_comb
[PROOF STATE]
proof (prove)
using this:
\<Gamma> \<turnstile>\<^sub>v t \<down> Vrecabs css name \<Gamma>'
fmlookup css name = Some cs
\<Gamma> \<turnstile>\<^sub>v u \<down> u'
vfind_match cs u' = Some (env, pat, rhs)
\<Gamma>' ++\<^sub>f mk_rec_env css \<Gamma>' ++\<^sub>f env \<turnstile>\<^sub>v rhs \<down> val
\<lbrakk>fdisjnt C (fmdom \<Gamma>); consts t |\<subseteq>| fmdom \<Gamma> |\<union>| C; fmpred (\<lambda>_. vwelldefined') \<Gamma>; pre_strong_term_class.wellformed t; wellformed_venv \<Gamma>; \<not> shadows_consts t; not_shadows_vconsts_env \<Gamma>\<rbrakk> \<Longrightarrow> vwelldefined' (Vrecabs css name \<Gamma>')
\<lbrakk>fdisjnt C (fmdom \<Gamma>); consts u |\<subseteq>| fmdom \<Gamma> |\<union>| C; fmpred (\<lambda>_. vwelldefined') \<Gamma>; pre_strong_term_class.wellformed u; wellformed_venv \<Gamma>; \<not> shadows_consts u; not_shadows_vconsts_env \<Gamma>\<rbrakk> \<Longrightarrow> vwelldefined' u'
\<lbrakk>fdisjnt C (fmdom (\<Gamma>' ++\<^sub>f mk_rec_env css \<Gamma>' ++\<^sub>f env)); consts rhs |\<subseteq>| fmdom (\<Gamma>' ++\<^sub>f mk_rec_env css \<Gamma>' ++\<^sub>f env) |\<union>| C; fmpred (\<lambda>_. vwelldefined') (\<Gamma>' ++\<^sub>f mk_rec_env css \<Gamma>' ++\<^sub>f env); pre_strong_term_class.wellformed rhs; wellformed_venv (\<Gamma>' ++\<^sub>f mk_rec_env css \<Gamma>' ++\<^sub>f env); \<not> shadows_consts rhs; not_shadows_vconsts_env (\<Gamma>' ++\<^sub>f mk_rec_env css \<Gamma>' ++\<^sub>f env)\<rbrakk> \<Longrightarrow> vwelldefined' val
fdisjnt C (fmdom \<Gamma>)
consts (t $\<^sub>s u) |\<subseteq>| fmdom \<Gamma> |\<union>| C
fmpred (\<lambda>_. vwelldefined') \<Gamma>
pre_strong_term_class.wellformed (t $\<^sub>s u)
wellformed_venv \<Gamma>
\<not> shadows_consts (t $\<^sub>s u)
not_shadows_vconsts_env \<Gamma>

goal (1 subgoal):
 1. vwelldefined' (Vrecabs css name \<Gamma>')
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
vwelldefined' (Vrecabs css name \<Gamma>')

goal (4 subgoals):
 1. \<And>name \<Gamma> val. \<lbrakk>name |\<notin>| C; fmlookup \<Gamma> name = Some val; fdisjnt C (fmdom \<Gamma>); consts (Sconst name) |\<subseteq>| fmdom \<Gamma> |\<union>| C; fmpred (\<lambda>_. vwelldefined') \<Gamma>; pre_strong_term_class.wellformed (Sconst name); wellformed_venv \<Gamma>; \<not> shadows_consts (Sconst name); not_shadows_vconsts_env \<Gamma>\<rbrakk> \<Longrightarrow> vwelldefined' val
 2. \<And>\<Gamma> name val. \<lbrakk>fmlookup \<Gamma> name = Some val; fdisjnt C (fmdom \<Gamma>); consts (Svar name) |\<subseteq>| fmdom \<Gamma> |\<union>| C; fmpred (\<lambda>_. vwelldefined') \<Gamma>; pre_strong_term_class.wellformed (Svar name); wellformed_venv \<Gamma>; \<not> shadows_consts (Svar name); not_shadows_vconsts_env \<Gamma>\<rbrakk> \<Longrightarrow> vwelldefined' val
 3. \<And>\<Gamma> t css name \<Gamma>' cs u u' env uv_ rhs val. \<lbrakk>\<Gamma> \<turnstile>\<^sub>v t \<down> Vrecabs css name \<Gamma>'; \<lbrakk>fdisjnt C (fmdom \<Gamma>); consts t |\<subseteq>| fmdom \<Gamma> |\<union>| C; fmpred (\<lambda>_. vwelldefined') \<Gamma>; pre_strong_term_class.wellformed t; wellformed_venv \<Gamma>; \<not> shadows_consts t; not_shadows_vconsts_env \<Gamma>\<rbrakk> \<Longrightarrow> vwelldefined' (Vrecabs css name \<Gamma>'); fmlookup css name = Some cs; \<Gamma> \<turnstile>\<^sub>v u \<down> u'; \<lbrakk>fdisjnt C (fmdom \<Gamma>); consts u |\<subseteq>| fmdom \<Gamma> |\<union>| C; fmpred (\<lambda>_. vwelldefined') \<Gamma>; pre_strong_term_class.wellformed u; wellformed_venv \<Gamma>; \<not> shadows_consts u; not_shadows_vconsts_env \<Gamma>\<rbrakk> \<Longrightarrow> vwelldefined' u'; vfind_match cs u' = Some (env, uv_, rhs); \<Gamma>' ++\<^sub>f mk_rec_env css \<Gamma>' ++\<^sub>f env \<turnstile>\<^sub>v rhs \<down> val; \<lbrakk>fdisjnt C (fmdom (\<Gamma>' ++\<^sub>f mk_rec_env css \<Gamma>' ++\<^sub>f env)); consts rhs |\<subseteq>| fmdom (\<Gamma>' ++\<^sub>f mk_rec_env css \<Gamma>' ++\<^sub>f env) |\<union>| C; fmpred (\<lambda>_. vwelldefined') (\<Gamma>' ++\<^sub>f mk_rec_env css \<Gamma>' ++\<^sub>f env); pre_strong_term_class.wellformed rhs; wellformed_venv (\<Gamma>' ++\<^sub>f mk_rec_env css \<Gamma>' ++\<^sub>f env); \<not> shadows_consts rhs; not_shadows_vconsts_env (\<Gamma>' ++\<^sub>f mk_rec_env css \<Gamma>' ++\<^sub>f env)\<rbrakk> \<Longrightarrow> vwelldefined' val; fdisjnt C (fmdom \<Gamma>); consts (t $\<^sub>s u) |\<subseteq>| fmdom \<Gamma> |\<union>| C; fmpred (\<lambda>_. vwelldefined') \<Gamma>; pre_strong_term_class.wellformed (t $\<^sub>s u); wellformed_venv \<Gamma>; \<not> shadows_consts (t $\<^sub>s u); not_shadows_vconsts_env \<Gamma>\<rbrakk> \<Longrightarrow> vwelldefined' val
 4. \<And>name \<Gamma> ts us. \<lbrakk>name |\<in>| C; list_all2 (\<lambda>x1 x2. \<Gamma> \<turnstile>\<^sub>v x1 \<down> x2 \<and> (fdisjnt C (fmdom \<Gamma>) \<longrightarrow> consts x1 |\<subseteq>| fmdom \<Gamma> |\<union>| C \<longrightarrow> fmpred (\<lambda>_. vwelldefined') \<Gamma> \<longrightarrow> pre_strong_term_class.wellformed x1 \<longrightarrow> wellformed_venv \<Gamma> \<longrightarrow> \<not> shadows_consts x1 \<longrightarrow> not_shadows_vconsts_env \<Gamma> \<longrightarrow> vwelldefined' x2)) ts us; fdisjnt C (fmdom \<Gamma>); consts (name $$ ts) |\<subseteq>| fmdom \<Gamma> |\<union>| C; fmpred (\<lambda>_. vwelldefined') \<Gamma>; pre_strong_term_class.wellformed (name $$ ts); wellformed_venv \<Gamma>; \<not> shadows_consts (name $$ ts); not_shadows_vconsts_env \<Gamma>\<rbrakk> \<Longrightarrow> vwelldefined' (Vconstr name us)
[PROOF STEP]
show ?case
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. vwelldefined' val
[PROOF STEP]
proof (rule rec_comb)
[PROOF STATE]
proof (state)
goal (7 subgoals):
 1. fdisjnt C (fmdom (\<Gamma>' ++\<^sub>f mk_rec_env css \<Gamma>' ++\<^sub>f env))
 2. consts rhs |\<subseteq>| fmdom (\<Gamma>' ++\<^sub>f mk_rec_env css \<Gamma>' ++\<^sub>f env) |\<union>| C
 3. fmpred (\<lambda>_. vwelldefined') (\<Gamma>' ++\<^sub>f mk_rec_env css \<Gamma>' ++\<^sub>f env)
 4. pre_strong_term_class.wellformed rhs
 5. wellformed_venv (\<Gamma>' ++\<^sub>f mk_rec_env css \<Gamma>' ++\<^sub>f env)
 6. \<not> shadows_consts rhs
 7. not_shadows_vconsts_env (\<Gamma>' ++\<^sub>f mk_rec_env css \<Gamma>' ++\<^sub>f env)
[PROOF STEP]
show "consts rhs |\<subseteq>| fmdom (\<Gamma>' ++\<^sub>f mk_rec_env css \<Gamma>' ++\<^sub>f env) |\<union>| C"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. consts rhs |\<subseteq>| fmdom (\<Gamma>' ++\<^sub>f mk_rec_env css \<Gamma>' ++\<^sub>f env) |\<union>| C
[PROOF STEP]
using \<open>consts rhs |\<subseteq>| _\<close>
[PROOF STATE]
proof (prove)
using this:
consts rhs |\<subseteq>| fmdom \<Gamma>' |\<union>| (C |\<union>| fmdom css)

goal (1 subgoal):
 1. consts rhs |\<subseteq>| fmdom (\<Gamma>' ++\<^sub>f mk_rec_env css \<Gamma>' ++\<^sub>f env) |\<union>| C
[PROOF STEP]
unfolding mk_rec_env_def
[PROOF STATE]
proof (prove)
using this:
consts rhs |\<subseteq>| fmdom \<Gamma>' |\<union>| (C |\<union>| fmdom css)

goal (1 subgoal):
 1. consts rhs |\<subseteq>| fmdom (\<Gamma>' ++\<^sub>f fmmap_keys (\<lambda>name cs. Vrecabs css name \<Gamma>') css ++\<^sub>f env) |\<union>| C
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
consts rhs |\<subseteq>| fmdom (\<Gamma>' ++\<^sub>f mk_rec_env css \<Gamma>' ++\<^sub>f env) |\<union>| C

goal (6 subgoals):
 1. fdisjnt C (fmdom (\<Gamma>' ++\<^sub>f mk_rec_env css \<Gamma>' ++\<^sub>f env))
 2. fmpred (\<lambda>_. vwelldefined') (\<Gamma>' ++\<^sub>f mk_rec_env css \<Gamma>' ++\<^sub>f env)
 3. pre_strong_term_class.wellformed rhs
 4. wellformed_venv (\<Gamma>' ++\<^sub>f mk_rec_env css \<Gamma>' ++\<^sub>f env)
 5. \<not> shadows_consts rhs
 6. not_shadows_vconsts_env (\<Gamma>' ++\<^sub>f mk_rec_env css \<Gamma>' ++\<^sub>f env)
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (6 subgoals):
 1. fdisjnt C (fmdom (\<Gamma>' ++\<^sub>f mk_rec_env css \<Gamma>' ++\<^sub>f env))
 2. fmpred (\<lambda>_. vwelldefined') (\<Gamma>' ++\<^sub>f mk_rec_env css \<Gamma>' ++\<^sub>f env)
 3. pre_strong_term_class.wellformed rhs
 4. wellformed_venv (\<Gamma>' ++\<^sub>f mk_rec_env css \<Gamma>' ++\<^sub>f env)
 5. \<not> shadows_consts rhs
 6. not_shadows_vconsts_env (\<Gamma>' ++\<^sub>f mk_rec_env css \<Gamma>' ++\<^sub>f env)
[PROOF STEP]
have "fmpred (\<lambda>_. vwelldefined') \<Gamma>'"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. fmpred (\<lambda>_. vwelldefined') \<Gamma>'
[PROOF STEP]
using \<open>vwelldefined' (Vrecabs css name \<Gamma>')\<close>
[PROOF STATE]
proof (prove)
using this:
vwelldefined' (Vrecabs css name \<Gamma>')

goal (1 subgoal):
 1. fmpred (\<lambda>_. vwelldefined') \<Gamma>'
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
fmpred (\<lambda>_. vwelldefined') \<Gamma>'

goal (6 subgoals):
 1. fdisjnt C (fmdom (\<Gamma>' ++\<^sub>f mk_rec_env css \<Gamma>' ++\<^sub>f env))
 2. fmpred (\<lambda>_. vwelldefined') (\<Gamma>' ++\<^sub>f mk_rec_env css \<Gamma>' ++\<^sub>f env)
 3. pre_strong_term_class.wellformed rhs
 4. wellformed_venv (\<Gamma>' ++\<^sub>f mk_rec_env css \<Gamma>' ++\<^sub>f env)
 5. \<not> shadows_consts rhs
 6. not_shadows_vconsts_env (\<Gamma>' ++\<^sub>f mk_rec_env css \<Gamma>' ++\<^sub>f env)
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
fmpred (\<lambda>_. vwelldefined') \<Gamma>'

goal (6 subgoals):
 1. fdisjnt C (fmdom (\<Gamma>' ++\<^sub>f mk_rec_env css \<Gamma>' ++\<^sub>f env))
 2. fmpred (\<lambda>_. vwelldefined') (\<Gamma>' ++\<^sub>f mk_rec_env css \<Gamma>' ++\<^sub>f env)
 3. pre_strong_term_class.wellformed rhs
 4. wellformed_venv (\<Gamma>' ++\<^sub>f mk_rec_env css \<Gamma>' ++\<^sub>f env)
 5. \<not> shadows_consts rhs
 6. not_shadows_vconsts_env (\<Gamma>' ++\<^sub>f mk_rec_env css \<Gamma>' ++\<^sub>f env)
[PROOF STEP]
have "fmpred (\<lambda>_. vwelldefined') (mk_rec_env css \<Gamma>')"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. fmpred (\<lambda>_. vwelldefined') (mk_rec_env css \<Gamma>')
[PROOF STEP]
unfolding mk_rec_env_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. fmpred (\<lambda>_. vwelldefined') (fmmap_keys (\<lambda>name cs. Vrecabs css name \<Gamma>') css)
[PROOF STEP]
using rec_comb
[PROOF STATE]
proof (prove)
using this:
\<Gamma> \<turnstile>\<^sub>v t \<down> Vrecabs css name \<Gamma>'
fmlookup css name = Some cs
\<Gamma> \<turnstile>\<^sub>v u \<down> u'
vfind_match cs u' = Some (env, pat, rhs)
\<Gamma>' ++\<^sub>f mk_rec_env css \<Gamma>' ++\<^sub>f env \<turnstile>\<^sub>v rhs \<down> val
\<lbrakk>fdisjnt C (fmdom \<Gamma>); consts t |\<subseteq>| fmdom \<Gamma> |\<union>| C; fmpred (\<lambda>_. vwelldefined') \<Gamma>; pre_strong_term_class.wellformed t; wellformed_venv \<Gamma>; \<not> shadows_consts t; not_shadows_vconsts_env \<Gamma>\<rbrakk> \<Longrightarrow> vwelldefined' (Vrecabs css name \<Gamma>')
\<lbrakk>fdisjnt C (fmdom \<Gamma>); consts u |\<subseteq>| fmdom \<Gamma> |\<union>| C; fmpred (\<lambda>_. vwelldefined') \<Gamma>; pre_strong_term_class.wellformed u; wellformed_venv \<Gamma>; \<not> shadows_consts u; not_shadows_vconsts_env \<Gamma>\<rbrakk> \<Longrightarrow> vwelldefined' u'
\<lbrakk>fdisjnt C (fmdom (\<Gamma>' ++\<^sub>f mk_rec_env css \<Gamma>' ++\<^sub>f env)); consts rhs |\<subseteq>| fmdom (\<Gamma>' ++\<^sub>f mk_rec_env css \<Gamma>' ++\<^sub>f env) |\<union>| C; fmpred (\<lambda>_. vwelldefined') (\<Gamma>' ++\<^sub>f mk_rec_env css \<Gamma>' ++\<^sub>f env); pre_strong_term_class.wellformed rhs; wellformed_venv (\<Gamma>' ++\<^sub>f mk_rec_env css \<Gamma>' ++\<^sub>f env); \<not> shadows_consts rhs; not_shadows_vconsts_env (\<Gamma>' ++\<^sub>f mk_rec_env css \<Gamma>' ++\<^sub>f env)\<rbrakk> \<Longrightarrow> vwelldefined' val
fdisjnt C (fmdom \<Gamma>)
consts (t $\<^sub>s u) |\<subseteq>| fmdom \<Gamma> |\<union>| C
fmpred (\<lambda>_. vwelldefined') \<Gamma>
pre_strong_term_class.wellformed (t $\<^sub>s u)
wellformed_venv \<Gamma>
\<not> shadows_consts (t $\<^sub>s u)
not_shadows_vconsts_env \<Gamma>

goal (1 subgoal):
 1. fmpred (\<lambda>_. vwelldefined') (fmmap_keys (\<lambda>name cs. Vrecabs css name \<Gamma>') css)
[PROOF STEP]
by (auto intro: fmdomI)
[PROOF STATE]
proof (state)
this:
fmpred (\<lambda>_. vwelldefined') (mk_rec_env css \<Gamma>')

goal (6 subgoals):
 1. fdisjnt C (fmdom (\<Gamma>' ++\<^sub>f mk_rec_env css \<Gamma>' ++\<^sub>f env))
 2. fmpred (\<lambda>_. vwelldefined') (\<Gamma>' ++\<^sub>f mk_rec_env css \<Gamma>' ++\<^sub>f env)
 3. pre_strong_term_class.wellformed rhs
 4. wellformed_venv (\<Gamma>' ++\<^sub>f mk_rec_env css \<Gamma>' ++\<^sub>f env)
 5. \<not> shadows_consts rhs
 6. not_shadows_vconsts_env (\<Gamma>' ++\<^sub>f mk_rec_env css \<Gamma>' ++\<^sub>f env)
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
fmpred (\<lambda>_. vwelldefined') (mk_rec_env css \<Gamma>')

goal (6 subgoals):
 1. fdisjnt C (fmdom (\<Gamma>' ++\<^sub>f mk_rec_env css \<Gamma>' ++\<^sub>f env))
 2. fmpred (\<lambda>_. vwelldefined') (\<Gamma>' ++\<^sub>f mk_rec_env css \<Gamma>' ++\<^sub>f env)
 3. pre_strong_term_class.wellformed rhs
 4. wellformed_venv (\<Gamma>' ++\<^sub>f mk_rec_env css \<Gamma>' ++\<^sub>f env)
 5. \<not> shadows_consts rhs
 6. not_shadows_vconsts_env (\<Gamma>' ++\<^sub>f mk_rec_env css \<Gamma>' ++\<^sub>f env)
[PROOF STEP]
have "fmpred (\<lambda>_. vwelldefined') env"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. fmpred (\<lambda>_. vwelldefined') env
[PROOF STEP]
using rec_comb
[PROOF STATE]
proof (prove)
using this:
\<Gamma> \<turnstile>\<^sub>v t \<down> Vrecabs css name \<Gamma>'
fmlookup css name = Some cs
\<Gamma> \<turnstile>\<^sub>v u \<down> u'
vfind_match cs u' = Some (env, pat, rhs)
\<Gamma>' ++\<^sub>f mk_rec_env css \<Gamma>' ++\<^sub>f env \<turnstile>\<^sub>v rhs \<down> val
\<lbrakk>fdisjnt C (fmdom \<Gamma>); consts t |\<subseteq>| fmdom \<Gamma> |\<union>| C; fmpred (\<lambda>_. vwelldefined') \<Gamma>; pre_strong_term_class.wellformed t; wellformed_venv \<Gamma>; \<not> shadows_consts t; not_shadows_vconsts_env \<Gamma>\<rbrakk> \<Longrightarrow> vwelldefined' (Vrecabs css name \<Gamma>')
\<lbrakk>fdisjnt C (fmdom \<Gamma>); consts u |\<subseteq>| fmdom \<Gamma> |\<union>| C; fmpred (\<lambda>_. vwelldefined') \<Gamma>; pre_strong_term_class.wellformed u; wellformed_venv \<Gamma>; \<not> shadows_consts u; not_shadows_vconsts_env \<Gamma>\<rbrakk> \<Longrightarrow> vwelldefined' u'
\<lbrakk>fdisjnt C (fmdom (\<Gamma>' ++\<^sub>f mk_rec_env css \<Gamma>' ++\<^sub>f env)); consts rhs |\<subseteq>| fmdom (\<Gamma>' ++\<^sub>f mk_rec_env css \<Gamma>' ++\<^sub>f env) |\<union>| C; fmpred (\<lambda>_. vwelldefined') (\<Gamma>' ++\<^sub>f mk_rec_env css \<Gamma>' ++\<^sub>f env); pre_strong_term_class.wellformed rhs; wellformed_venv (\<Gamma>' ++\<^sub>f mk_rec_env css \<Gamma>' ++\<^sub>f env); \<not> shadows_consts rhs; not_shadows_vconsts_env (\<Gamma>' ++\<^sub>f mk_rec_env css \<Gamma>' ++\<^sub>f env)\<rbrakk> \<Longrightarrow> vwelldefined' val
fdisjnt C (fmdom \<Gamma>)
consts (t $\<^sub>s u) |\<subseteq>| fmdom \<Gamma> |\<union>| C
fmpred (\<lambda>_. vwelldefined') \<Gamma>
pre_strong_term_class.wellformed (t $\<^sub>s u)
wellformed_venv \<Gamma>
\<not> shadows_consts (t $\<^sub>s u)
not_shadows_vconsts_env \<Gamma>

goal (1 subgoal):
 1. fmpred (\<lambda>_. vwelldefined') env
[PROOF STEP]
by (auto dest: vfind_match_elem intro: vmatch_welldefined')
[PROOF STATE]
proof (state)
this:
fmpred (\<lambda>_. vwelldefined') env

goal (6 subgoals):
 1. fdisjnt C (fmdom (\<Gamma>' ++\<^sub>f mk_rec_env css \<Gamma>' ++\<^sub>f env))
 2. fmpred (\<lambda>_. vwelldefined') (\<Gamma>' ++\<^sub>f mk_rec_env css \<Gamma>' ++\<^sub>f env)
 3. pre_strong_term_class.wellformed rhs
 4. wellformed_venv (\<Gamma>' ++\<^sub>f mk_rec_env css \<Gamma>' ++\<^sub>f env)
 5. \<not> shadows_consts rhs
 6. not_shadows_vconsts_env (\<Gamma>' ++\<^sub>f mk_rec_env css \<Gamma>' ++\<^sub>f env)
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
fmpred (\<lambda>_. vwelldefined') \<Gamma>'
fmpred (\<lambda>_. vwelldefined') (mk_rec_env css \<Gamma>')
fmpred (\<lambda>_. vwelldefined') env
[PROOF STEP]
show "fmpred (\<lambda>_. vwelldefined') (\<Gamma>' ++\<^sub>f mk_rec_env css \<Gamma>' ++\<^sub>f env)"
[PROOF STATE]
proof (prove)
using this:
fmpred (\<lambda>_. vwelldefined') \<Gamma>'
fmpred (\<lambda>_. vwelldefined') (mk_rec_env css \<Gamma>')
fmpred (\<lambda>_. vwelldefined') env

goal (1 subgoal):
 1. fmpred (\<lambda>_. vwelldefined') (\<Gamma>' ++\<^sub>f mk_rec_env css \<Gamma>' ++\<^sub>f env)
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
fmpred (\<lambda>_. vwelldefined') (\<Gamma>' ++\<^sub>f mk_rec_env css \<Gamma>' ++\<^sub>f env)

goal (5 subgoals):
 1. fdisjnt C (fmdom (\<Gamma>' ++\<^sub>f mk_rec_env css \<Gamma>' ++\<^sub>f env))
 2. pre_strong_term_class.wellformed rhs
 3. wellformed_venv (\<Gamma>' ++\<^sub>f mk_rec_env css \<Gamma>' ++\<^sub>f env)
 4. \<not> shadows_consts rhs
 5. not_shadows_vconsts_env (\<Gamma>' ++\<^sub>f mk_rec_env css \<Gamma>' ++\<^sub>f env)
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (5 subgoals):
 1. fdisjnt C (fmdom (\<Gamma>' ++\<^sub>f mk_rec_env css \<Gamma>' ++\<^sub>f env))
 2. pre_strong_term_class.wellformed rhs
 3. wellformed_venv (\<Gamma>' ++\<^sub>f mk_rec_env css \<Gamma>' ++\<^sub>f env)
 4. \<not> shadows_consts rhs
 5. not_shadows_vconsts_env (\<Gamma>' ++\<^sub>f mk_rec_env css \<Gamma>' ++\<^sub>f env)
[PROOF STEP]
have "fdisjnt C (fmdom \<Gamma>')"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. fdisjnt C (fmdom \<Gamma>')
[PROOF STEP]
using rec_comb
[PROOF STATE]
proof (prove)
using this:
\<Gamma> \<turnstile>\<^sub>v t \<down> Vrecabs css name \<Gamma>'
fmlookup css name = Some cs
\<Gamma> \<turnstile>\<^sub>v u \<down> u'
vfind_match cs u' = Some (env, pat, rhs)
\<Gamma>' ++\<^sub>f mk_rec_env css \<Gamma>' ++\<^sub>f env \<turnstile>\<^sub>v rhs \<down> val
\<lbrakk>fdisjnt C (fmdom \<Gamma>); consts t |\<subseteq>| fmdom \<Gamma> |\<union>| C; fmpred (\<lambda>_. vwelldefined') \<Gamma>; pre_strong_term_class.wellformed t; wellformed_venv \<Gamma>; \<not> shadows_consts t; not_shadows_vconsts_env \<Gamma>\<rbrakk> \<Longrightarrow> vwelldefined' (Vrecabs css name \<Gamma>')
\<lbrakk>fdisjnt C (fmdom \<Gamma>); consts u |\<subseteq>| fmdom \<Gamma> |\<union>| C; fmpred (\<lambda>_. vwelldefined') \<Gamma>; pre_strong_term_class.wellformed u; wellformed_venv \<Gamma>; \<not> shadows_consts u; not_shadows_vconsts_env \<Gamma>\<rbrakk> \<Longrightarrow> vwelldefined' u'
\<lbrakk>fdisjnt C (fmdom (\<Gamma>' ++\<^sub>f mk_rec_env css \<Gamma>' ++\<^sub>f env)); consts rhs |\<subseteq>| fmdom (\<Gamma>' ++\<^sub>f mk_rec_env css \<Gamma>' ++\<^sub>f env) |\<union>| C; fmpred (\<lambda>_. vwelldefined') (\<Gamma>' ++\<^sub>f mk_rec_env css \<Gamma>' ++\<^sub>f env); pre_strong_term_class.wellformed rhs; wellformed_venv (\<Gamma>' ++\<^sub>f mk_rec_env css \<Gamma>' ++\<^sub>f env); \<not> shadows_consts rhs; not_shadows_vconsts_env (\<Gamma>' ++\<^sub>f mk_rec_env css \<Gamma>' ++\<^sub>f env)\<rbrakk> \<Longrightarrow> vwelldefined' val
fdisjnt C (fmdom \<Gamma>)
consts (t $\<^sub>s u) |\<subseteq>| fmdom \<Gamma> |\<union>| C
fmpred (\<lambda>_. vwelldefined') \<Gamma>
pre_strong_term_class.wellformed (t $\<^sub>s u)
wellformed_venv \<Gamma>
\<not> shadows_consts (t $\<^sub>s u)
not_shadows_vconsts_env \<Gamma>

goal (1 subgoal):
 1. fdisjnt C (fmdom \<Gamma>')
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
fdisjnt C (fmdom \<Gamma>')

goal (5 subgoals):
 1. fdisjnt C (fmdom (\<Gamma>' ++\<^sub>f mk_rec_env css \<Gamma>' ++\<^sub>f env))
 2. pre_strong_term_class.wellformed rhs
 3. wellformed_venv (\<Gamma>' ++\<^sub>f mk_rec_env css \<Gamma>' ++\<^sub>f env)
 4. \<not> shadows_consts rhs
 5. not_shadows_vconsts_env (\<Gamma>' ++\<^sub>f mk_rec_env css \<Gamma>' ++\<^sub>f env)
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
fdisjnt C (fmdom \<Gamma>')

goal (5 subgoals):
 1. fdisjnt C (fmdom (\<Gamma>' ++\<^sub>f mk_rec_env css \<Gamma>' ++\<^sub>f env))
 2. pre_strong_term_class.wellformed rhs
 3. wellformed_venv (\<Gamma>' ++\<^sub>f mk_rec_env css \<Gamma>' ++\<^sub>f env)
 4. \<not> shadows_consts rhs
 5. not_shadows_vconsts_env (\<Gamma>' ++\<^sub>f mk_rec_env css \<Gamma>' ++\<^sub>f env)
[PROOF STEP]
have "fdisjnt C (fmdom env)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. fdisjnt C (fmdom env)
[PROOF STEP]
unfolding \<open>fmdom env = frees pat\<close>
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. fdisjnt C (frees pat)
[PROOF STEP]
using \<open>fmlookup css name = Some cs\<close> \<open>(pat, rhs) \<in> set cs\<close> \<open>not_shadows_vconsts (Vrecabs css name \<Gamma>')\<close>
[PROOF STATE]
proof (prove)
using this:
fmlookup css name = Some cs
(pat, rhs) \<in> set cs
not_shadows_vconsts (Vrecabs css name \<Gamma>')

goal (1 subgoal):
 1. fdisjnt C (frees pat)
[PROOF STEP]
apply auto
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>fmlookup css name = Some cs; (pat, rhs) \<in> set cs; not_shadows_vconsts_env \<Gamma>'; fmpred (\<lambda>_. list_all (\<lambda>(pat, t). fdisjnt all_consts (frees pat) \<and> \<not> shadows_consts t)) css; name |\<in>| fmdom css\<rbrakk> \<Longrightarrow> fdisjnt C (frees pat)
[PROOF STEP]
apply (drule fmpredD[where m = css])
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<lbrakk>fmlookup css name = Some cs; (pat, rhs) \<in> set cs; not_shadows_vconsts_env \<Gamma>'; name |\<in>| fmdom css\<rbrakk> \<Longrightarrow> fmlookup css ?x5 = Some ?y5
 2. \<lbrakk>fmlookup css name = Some cs; (pat, rhs) \<in> set cs; not_shadows_vconsts_env \<Gamma>'; name |\<in>| fmdom css; list_all (\<lambda>(pat, t). fdisjnt all_consts (frees pat) \<and> \<not> shadows_consts t) ?y5\<rbrakk> \<Longrightarrow> fdisjnt C (frees pat)
[PROOF STEP]
by (auto simp: list_all_iff all_consts_def fdisjnt_alt_def)
[PROOF STATE]
proof (state)
this:
fdisjnt C (fmdom env)

goal (5 subgoals):
 1. fdisjnt C (fmdom (\<Gamma>' ++\<^sub>f mk_rec_env css \<Gamma>' ++\<^sub>f env))
 2. pre_strong_term_class.wellformed rhs
 3. wellformed_venv (\<Gamma>' ++\<^sub>f mk_rec_env css \<Gamma>' ++\<^sub>f env)
 4. \<not> shadows_consts rhs
 5. not_shadows_vconsts_env (\<Gamma>' ++\<^sub>f mk_rec_env css \<Gamma>' ++\<^sub>f env)
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
fdisjnt C (fmdom env)

goal (5 subgoals):
 1. fdisjnt C (fmdom (\<Gamma>' ++\<^sub>f mk_rec_env css \<Gamma>' ++\<^sub>f env))
 2. pre_strong_term_class.wellformed rhs
 3. wellformed_venv (\<Gamma>' ++\<^sub>f mk_rec_env css \<Gamma>' ++\<^sub>f env)
 4. \<not> shadows_consts rhs
 5. not_shadows_vconsts_env (\<Gamma>' ++\<^sub>f mk_rec_env css \<Gamma>' ++\<^sub>f env)
[PROOF STEP]
have "fdisjnt C (fmdom (mk_rec_env css \<Gamma>'))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. fdisjnt C (fmdom (mk_rec_env css \<Gamma>'))
[PROOF STEP]
unfolding mk_rec_env_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. fdisjnt C (fmdom (fmmap_keys (\<lambda>name cs. Vrecabs css name \<Gamma>') css))
[PROOF STEP]
using \<open>vwelldefined' (Vrecabs css name \<Gamma>')\<close>
[PROOF STATE]
proof (prove)
using this:
vwelldefined' (Vrecabs css name \<Gamma>')

goal (1 subgoal):
 1. fdisjnt C (fmdom (fmmap_keys (\<lambda>name cs. Vrecabs css name \<Gamma>') css))
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
fdisjnt C (fmdom (mk_rec_env css \<Gamma>'))

goal (5 subgoals):
 1. fdisjnt C (fmdom (\<Gamma>' ++\<^sub>f mk_rec_env css \<Gamma>' ++\<^sub>f env))
 2. pre_strong_term_class.wellformed rhs
 3. wellformed_venv (\<Gamma>' ++\<^sub>f mk_rec_env css \<Gamma>' ++\<^sub>f env)
 4. \<not> shadows_consts rhs
 5. not_shadows_vconsts_env (\<Gamma>' ++\<^sub>f mk_rec_env css \<Gamma>' ++\<^sub>f env)
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
fdisjnt C (fmdom \<Gamma>')
fdisjnt C (fmdom env)
fdisjnt C (fmdom (mk_rec_env css \<Gamma>'))
[PROOF STEP]
show "fdisjnt C (fmdom (\<Gamma>' ++\<^sub>f mk_rec_env css \<Gamma>' ++\<^sub>f env))"
[PROOF STATE]
proof (prove)
using this:
fdisjnt C (fmdom \<Gamma>')
fdisjnt C (fmdom env)
fdisjnt C (fmdom (mk_rec_env css \<Gamma>'))

goal (1 subgoal):
 1. fdisjnt C (fmdom (\<Gamma>' ++\<^sub>f mk_rec_env css \<Gamma>' ++\<^sub>f env))
[PROOF STEP]
unfolding fdisjnt_alt_def
[PROOF STATE]
proof (prove)
using this:
C |\<inter>| fmdom \<Gamma>' = {||}
C |\<inter>| fmdom env = {||}
C |\<inter>| fmdom (mk_rec_env css \<Gamma>') = {||}

goal (1 subgoal):
 1. C |\<inter>| fmdom (\<Gamma>' ++\<^sub>f mk_rec_env css \<Gamma>' ++\<^sub>f env) = {||}
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
fdisjnt C (fmdom (\<Gamma>' ++\<^sub>f mk_rec_env css \<Gamma>' ++\<^sub>f env))

goal (4 subgoals):
 1. pre_strong_term_class.wellformed rhs
 2. wellformed_venv (\<Gamma>' ++\<^sub>f mk_rec_env css \<Gamma>' ++\<^sub>f env)
 3. \<not> shadows_consts rhs
 4. not_shadows_vconsts_env (\<Gamma>' ++\<^sub>f mk_rec_env css \<Gamma>' ++\<^sub>f env)
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (4 subgoals):
 1. pre_strong_term_class.wellformed rhs
 2. wellformed_venv (\<Gamma>' ++\<^sub>f mk_rec_env css \<Gamma>' ++\<^sub>f env)
 3. \<not> shadows_consts rhs
 4. not_shadows_vconsts_env (\<Gamma>' ++\<^sub>f mk_rec_env css \<Gamma>' ++\<^sub>f env)
[PROOF STEP]
show "wellformed rhs"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. pre_strong_term_class.wellformed rhs
[PROOF STEP]
using \<open>(pat, rhs) \<in> set cs\<close> \<open>wellformed_clauses cs\<close>
[PROOF STATE]
proof (prove)
using this:
(pat, rhs) \<in> set cs
wellformed_clauses cs

goal (1 subgoal):
 1. pre_strong_term_class.wellformed rhs
[PROOF STEP]
by (auto simp: list_all_iff)
[PROOF STATE]
proof (state)
this:
pre_strong_term_class.wellformed rhs

goal (3 subgoals):
 1. wellformed_venv (\<Gamma>' ++\<^sub>f mk_rec_env css \<Gamma>' ++\<^sub>f env)
 2. \<not> shadows_consts rhs
 3. not_shadows_vconsts_env (\<Gamma>' ++\<^sub>f mk_rec_env css \<Gamma>' ++\<^sub>f env)
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (3 subgoals):
 1. wellformed_venv (\<Gamma>' ++\<^sub>f mk_rec_env css \<Gamma>' ++\<^sub>f env)
 2. \<not> shadows_consts rhs
 3. not_shadows_vconsts_env (\<Gamma>' ++\<^sub>f mk_rec_env css \<Gamma>' ++\<^sub>f env)
[PROOF STEP]
have "wellformed_venv \<Gamma>'"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. wellformed_venv \<Gamma>'
[PROOF STEP]
using \<open>vwellformed (Vrecabs css name \<Gamma>')\<close>
[PROOF STATE]
proof (prove)
using this:
vwellformed (Vrecabs css name \<Gamma>')

goal (1 subgoal):
 1. wellformed_venv \<Gamma>'
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
wellformed_venv \<Gamma>'

goal (3 subgoals):
 1. wellformed_venv (\<Gamma>' ++\<^sub>f mk_rec_env css \<Gamma>' ++\<^sub>f env)
 2. \<not> shadows_consts rhs
 3. not_shadows_vconsts_env (\<Gamma>' ++\<^sub>f mk_rec_env css \<Gamma>' ++\<^sub>f env)
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
wellformed_venv \<Gamma>'

goal (3 subgoals):
 1. wellformed_venv (\<Gamma>' ++\<^sub>f mk_rec_env css \<Gamma>' ++\<^sub>f env)
 2. \<not> shadows_consts rhs
 3. not_shadows_vconsts_env (\<Gamma>' ++\<^sub>f mk_rec_env css \<Gamma>' ++\<^sub>f env)
[PROOF STEP]
have "wellformed_venv (mk_rec_env css \<Gamma>')"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. wellformed_venv (mk_rec_env css \<Gamma>')
[PROOF STEP]
unfolding mk_rec_env_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. wellformed_venv (fmmap_keys (\<lambda>name cs. Vrecabs css name \<Gamma>') css)
[PROOF STEP]
using \<open>vwellformed (Vrecabs css name \<Gamma>')\<close>
[PROOF STATE]
proof (prove)
using this:
vwellformed (Vrecabs css name \<Gamma>')

goal (1 subgoal):
 1. wellformed_venv (fmmap_keys (\<lambda>name cs. Vrecabs css name \<Gamma>') css)
[PROOF STEP]
by (auto intro: fmdomI)
[PROOF STATE]
proof (state)
this:
wellformed_venv (mk_rec_env css \<Gamma>')

goal (3 subgoals):
 1. wellformed_venv (\<Gamma>' ++\<^sub>f mk_rec_env css \<Gamma>' ++\<^sub>f env)
 2. \<not> shadows_consts rhs
 3. not_shadows_vconsts_env (\<Gamma>' ++\<^sub>f mk_rec_env css \<Gamma>' ++\<^sub>f env)
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
wellformed_venv (mk_rec_env css \<Gamma>')

goal (3 subgoals):
 1. wellformed_venv (\<Gamma>' ++\<^sub>f mk_rec_env css \<Gamma>' ++\<^sub>f env)
 2. \<not> shadows_consts rhs
 3. not_shadows_vconsts_env (\<Gamma>' ++\<^sub>f mk_rec_env css \<Gamma>' ++\<^sub>f env)
[PROOF STEP]
have "wellformed_venv env"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. wellformed_venv env
[PROOF STEP]
apply (rule vwellformed.vmatch_env)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. vmatch ?pat ?v = Some env
 2. vwellformed ?v
[PROOF STEP]
apply (rule vfind_match_elem)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. vfind_match ?cs3 ?v = Some (env, ?pat3, ?rhs3)
 2. vwellformed ?v
[PROOF STEP]
apply fact
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. vwellformed u'
[PROOF STEP]
apply (rule veval'_wellformed)
[PROOF STATE]
proof (prove)
goal (3 subgoals):
 1. ?\<Gamma>6 \<turnstile>\<^sub>v ?t6 \<down> u'
 2. pre_strong_term_class.wellformed ?t6
 3. wellformed_venv ?\<Gamma>6
[PROOF STEP]
using rec_comb
[PROOF STATE]
proof (prove)
using this:
\<Gamma> \<turnstile>\<^sub>v t \<down> Vrecabs css name \<Gamma>'
fmlookup css name = Some cs
\<Gamma> \<turnstile>\<^sub>v u \<down> u'
vfind_match cs u' = Some (env, pat, rhs)
\<Gamma>' ++\<^sub>f mk_rec_env css \<Gamma>' ++\<^sub>f env \<turnstile>\<^sub>v rhs \<down> val
\<lbrakk>fdisjnt C (fmdom \<Gamma>); consts t |\<subseteq>| fmdom \<Gamma> |\<union>| C; fmpred (\<lambda>_. vwelldefined') \<Gamma>; pre_strong_term_class.wellformed t; wellformed_venv \<Gamma>; \<not> shadows_consts t; not_shadows_vconsts_env \<Gamma>\<rbrakk> \<Longrightarrow> vwelldefined' (Vrecabs css name \<Gamma>')
\<lbrakk>fdisjnt C (fmdom \<Gamma>); consts u |\<subseteq>| fmdom \<Gamma> |\<union>| C; fmpred (\<lambda>_. vwelldefined') \<Gamma>; pre_strong_term_class.wellformed u; wellformed_venv \<Gamma>; \<not> shadows_consts u; not_shadows_vconsts_env \<Gamma>\<rbrakk> \<Longrightarrow> vwelldefined' u'
\<lbrakk>fdisjnt C (fmdom (\<Gamma>' ++\<^sub>f mk_rec_env css \<Gamma>' ++\<^sub>f env)); consts rhs |\<subseteq>| fmdom (\<Gamma>' ++\<^sub>f mk_rec_env css \<Gamma>' ++\<^sub>f env) |\<union>| C; fmpred (\<lambda>_. vwelldefined') (\<Gamma>' ++\<^sub>f mk_rec_env css \<Gamma>' ++\<^sub>f env); pre_strong_term_class.wellformed rhs; wellformed_venv (\<Gamma>' ++\<^sub>f mk_rec_env css \<Gamma>' ++\<^sub>f env); \<not> shadows_consts rhs; not_shadows_vconsts_env (\<Gamma>' ++\<^sub>f mk_rec_env css \<Gamma>' ++\<^sub>f env)\<rbrakk> \<Longrightarrow> vwelldefined' val
fdisjnt C (fmdom \<Gamma>)
consts (t $\<^sub>s u) |\<subseteq>| fmdom \<Gamma> |\<union>| C
fmpred (\<lambda>_. vwelldefined') \<Gamma>
pre_strong_term_class.wellformed (t $\<^sub>s u)
wellformed_venv \<Gamma>
\<not> shadows_consts (t $\<^sub>s u)
not_shadows_vconsts_env \<Gamma>

goal (3 subgoals):
 1. ?\<Gamma>6 \<turnstile>\<^sub>v ?t6 \<down> u'
 2. pre_strong_term_class.wellformed ?t6
 3. wellformed_venv ?\<Gamma>6
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
wellformed_venv env

goal (3 subgoals):
 1. wellformed_venv (\<Gamma>' ++\<^sub>f mk_rec_env css \<Gamma>' ++\<^sub>f env)
 2. \<not> shadows_consts rhs
 3. not_shadows_vconsts_env (\<Gamma>' ++\<^sub>f mk_rec_env css \<Gamma>' ++\<^sub>f env)
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
wellformed_venv \<Gamma>'
wellformed_venv (mk_rec_env css \<Gamma>')
wellformed_venv env
[PROOF STEP]
show "wellformed_venv (\<Gamma>' ++\<^sub>f mk_rec_env css \<Gamma>' ++\<^sub>f env)"
[PROOF STATE]
proof (prove)
using this:
wellformed_venv \<Gamma>'
wellformed_venv (mk_rec_env css \<Gamma>')
wellformed_venv env

goal (1 subgoal):
 1. wellformed_venv (\<Gamma>' ++\<^sub>f mk_rec_env css \<Gamma>' ++\<^sub>f env)
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
wellformed_venv (\<Gamma>' ++\<^sub>f mk_rec_env css \<Gamma>' ++\<^sub>f env)

goal (2 subgoals):
 1. \<not> shadows_consts rhs
 2. not_shadows_vconsts_env (\<Gamma>' ++\<^sub>f mk_rec_env css \<Gamma>' ++\<^sub>f env)
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. \<not> shadows_consts rhs
 2. not_shadows_vconsts_env (\<Gamma>' ++\<^sub>f mk_rec_env css \<Gamma>' ++\<^sub>f env)
[PROOF STEP]
have "not_shadows_vconsts_env \<Gamma>'"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. not_shadows_vconsts_env \<Gamma>'
[PROOF STEP]
using \<open>not_shadows_vconsts (Vrecabs css name \<Gamma>')\<close>
[PROOF STATE]
proof (prove)
using this:
not_shadows_vconsts (Vrecabs css name \<Gamma>')

goal (1 subgoal):
 1. not_shadows_vconsts_env \<Gamma>'
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
not_shadows_vconsts_env \<Gamma>'

goal (2 subgoals):
 1. \<not> shadows_consts rhs
 2. not_shadows_vconsts_env (\<Gamma>' ++\<^sub>f mk_rec_env css \<Gamma>' ++\<^sub>f env)
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
not_shadows_vconsts_env \<Gamma>'

goal (2 subgoals):
 1. \<not> shadows_consts rhs
 2. not_shadows_vconsts_env (\<Gamma>' ++\<^sub>f mk_rec_env css \<Gamma>' ++\<^sub>f env)
[PROOF STEP]
have "not_shadows_vconsts_env (mk_rec_env css \<Gamma>')"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. not_shadows_vconsts_env (mk_rec_env css \<Gamma>')
[PROOF STEP]
unfolding mk_rec_env_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. not_shadows_vconsts_env (fmmap_keys (\<lambda>name cs. Vrecabs css name \<Gamma>') css)
[PROOF STEP]
using \<open>not_shadows_vconsts (Vrecabs css name \<Gamma>')\<close>
[PROOF STATE]
proof (prove)
using this:
not_shadows_vconsts (Vrecabs css name \<Gamma>')

goal (1 subgoal):
 1. not_shadows_vconsts_env (fmmap_keys (\<lambda>name cs. Vrecabs css name \<Gamma>') css)
[PROOF STEP]
by (auto intro: fmdomI)
[PROOF STATE]
proof (state)
this:
not_shadows_vconsts_env (mk_rec_env css \<Gamma>')

goal (2 subgoals):
 1. \<not> shadows_consts rhs
 2. not_shadows_vconsts_env (\<Gamma>' ++\<^sub>f mk_rec_env css \<Gamma>' ++\<^sub>f env)
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
not_shadows_vconsts_env (mk_rec_env css \<Gamma>')

goal (2 subgoals):
 1. \<not> shadows_consts rhs
 2. not_shadows_vconsts_env (\<Gamma>' ++\<^sub>f mk_rec_env css \<Gamma>' ++\<^sub>f env)
[PROOF STEP]
have "not_shadows_vconsts_env env"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. not_shadows_vconsts_env env
[PROOF STEP]
apply (rule not_shadows_vconsts.vmatch_env)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. vmatch ?pat ?v = Some env
 2. not_shadows_vconsts ?v
[PROOF STEP]
apply (rule vfind_match_elem)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. vfind_match ?cs3 ?v = Some (env, ?pat3, ?rhs3)
 2. not_shadows_vconsts ?v
[PROOF STEP]
apply fact
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. not_shadows_vconsts u'
[PROOF STEP]
apply (rule veval'_shadows)
[PROOF STATE]
proof (prove)
goal (3 subgoals):
 1. ?\<Gamma>6 \<turnstile>\<^sub>v ?t6 \<down> u'
 2. not_shadows_vconsts_env ?\<Gamma>6
 3. \<not> shadows_consts ?t6
[PROOF STEP]
using rec_comb
[PROOF STATE]
proof (prove)
using this:
\<Gamma> \<turnstile>\<^sub>v t \<down> Vrecabs css name \<Gamma>'
fmlookup css name = Some cs
\<Gamma> \<turnstile>\<^sub>v u \<down> u'
vfind_match cs u' = Some (env, pat, rhs)
\<Gamma>' ++\<^sub>f mk_rec_env css \<Gamma>' ++\<^sub>f env \<turnstile>\<^sub>v rhs \<down> val
\<lbrakk>fdisjnt C (fmdom \<Gamma>); consts t |\<subseteq>| fmdom \<Gamma> |\<union>| C; fmpred (\<lambda>_. vwelldefined') \<Gamma>; pre_strong_term_class.wellformed t; wellformed_venv \<Gamma>; \<not> shadows_consts t; not_shadows_vconsts_env \<Gamma>\<rbrakk> \<Longrightarrow> vwelldefined' (Vrecabs css name \<Gamma>')
\<lbrakk>fdisjnt C (fmdom \<Gamma>); consts u |\<subseteq>| fmdom \<Gamma> |\<union>| C; fmpred (\<lambda>_. vwelldefined') \<Gamma>; pre_strong_term_class.wellformed u; wellformed_venv \<Gamma>; \<not> shadows_consts u; not_shadows_vconsts_env \<Gamma>\<rbrakk> \<Longrightarrow> vwelldefined' u'
\<lbrakk>fdisjnt C (fmdom (\<Gamma>' ++\<^sub>f mk_rec_env css \<Gamma>' ++\<^sub>f env)); consts rhs |\<subseteq>| fmdom (\<Gamma>' ++\<^sub>f mk_rec_env css \<Gamma>' ++\<^sub>f env) |\<union>| C; fmpred (\<lambda>_. vwelldefined') (\<Gamma>' ++\<^sub>f mk_rec_env css \<Gamma>' ++\<^sub>f env); pre_strong_term_class.wellformed rhs; wellformed_venv (\<Gamma>' ++\<^sub>f mk_rec_env css \<Gamma>' ++\<^sub>f env); \<not> shadows_consts rhs; not_shadows_vconsts_env (\<Gamma>' ++\<^sub>f mk_rec_env css \<Gamma>' ++\<^sub>f env)\<rbrakk> \<Longrightarrow> vwelldefined' val
fdisjnt C (fmdom \<Gamma>)
consts (t $\<^sub>s u) |\<subseteq>| fmdom \<Gamma> |\<union>| C
fmpred (\<lambda>_. vwelldefined') \<Gamma>
pre_strong_term_class.wellformed (t $\<^sub>s u)
wellformed_venv \<Gamma>
\<not> shadows_consts (t $\<^sub>s u)
not_shadows_vconsts_env \<Gamma>

goal (3 subgoals):
 1. ?\<Gamma>6 \<turnstile>\<^sub>v ?t6 \<down> u'
 2. not_shadows_vconsts_env ?\<Gamma>6
 3. \<not> shadows_consts ?t6
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
not_shadows_vconsts_env env

goal (2 subgoals):
 1. \<not> shadows_consts rhs
 2. not_shadows_vconsts_env (\<Gamma>' ++\<^sub>f mk_rec_env css \<Gamma>' ++\<^sub>f env)
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
not_shadows_vconsts_env \<Gamma>'
not_shadows_vconsts_env (mk_rec_env css \<Gamma>')
not_shadows_vconsts_env env
[PROOF STEP]
show "not_shadows_vconsts_env (\<Gamma>' ++\<^sub>f mk_rec_env css \<Gamma>' ++\<^sub>f env)"
[PROOF STATE]
proof (prove)
using this:
not_shadows_vconsts_env \<Gamma>'
not_shadows_vconsts_env (mk_rec_env css \<Gamma>')
not_shadows_vconsts_env env

goal (1 subgoal):
 1. not_shadows_vconsts_env (\<Gamma>' ++\<^sub>f mk_rec_env css \<Gamma>' ++\<^sub>f env)
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
not_shadows_vconsts_env (\<Gamma>' ++\<^sub>f mk_rec_env css \<Gamma>' ++\<^sub>f env)

goal (1 subgoal):
 1. \<not> shadows_consts rhs
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<not> shadows_consts rhs
[PROOF STEP]
show "\<not> shadows_consts rhs"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<not> shadows_consts rhs
[PROOF STEP]
using rec_comb \<open>not_shadows_vconsts (Vrecabs css name \<Gamma>')\<close> \<open>(pat, rhs) \<in> set cs\<close>
[PROOF STATE]
proof (prove)
using this:
\<Gamma> \<turnstile>\<^sub>v t \<down> Vrecabs css name \<Gamma>'
fmlookup css name = Some cs
\<Gamma> \<turnstile>\<^sub>v u \<down> u'
vfind_match cs u' = Some (env, pat, rhs)
\<Gamma>' ++\<^sub>f mk_rec_env css \<Gamma>' ++\<^sub>f env \<turnstile>\<^sub>v rhs \<down> val
\<lbrakk>fdisjnt C (fmdom \<Gamma>); consts t |\<subseteq>| fmdom \<Gamma> |\<union>| C; fmpred (\<lambda>_. vwelldefined') \<Gamma>; pre_strong_term_class.wellformed t; wellformed_venv \<Gamma>; \<not> shadows_consts t; not_shadows_vconsts_env \<Gamma>\<rbrakk> \<Longrightarrow> vwelldefined' (Vrecabs css name \<Gamma>')
\<lbrakk>fdisjnt C (fmdom \<Gamma>); consts u |\<subseteq>| fmdom \<Gamma> |\<union>| C; fmpred (\<lambda>_. vwelldefined') \<Gamma>; pre_strong_term_class.wellformed u; wellformed_venv \<Gamma>; \<not> shadows_consts u; not_shadows_vconsts_env \<Gamma>\<rbrakk> \<Longrightarrow> vwelldefined' u'
\<lbrakk>fdisjnt C (fmdom (\<Gamma>' ++\<^sub>f mk_rec_env css \<Gamma>' ++\<^sub>f env)); consts rhs |\<subseteq>| fmdom (\<Gamma>' ++\<^sub>f mk_rec_env css \<Gamma>' ++\<^sub>f env) |\<union>| C; fmpred (\<lambda>_. vwelldefined') (\<Gamma>' ++\<^sub>f mk_rec_env css \<Gamma>' ++\<^sub>f env); pre_strong_term_class.wellformed rhs; wellformed_venv (\<Gamma>' ++\<^sub>f mk_rec_env css \<Gamma>' ++\<^sub>f env); \<not> shadows_consts rhs; not_shadows_vconsts_env (\<Gamma>' ++\<^sub>f mk_rec_env css \<Gamma>' ++\<^sub>f env)\<rbrakk> \<Longrightarrow> vwelldefined' val
fdisjnt C (fmdom \<Gamma>)
consts (t $\<^sub>s u) |\<subseteq>| fmdom \<Gamma> |\<union>| C
fmpred (\<lambda>_. vwelldefined') \<Gamma>
pre_strong_term_class.wellformed (t $\<^sub>s u)
wellformed_venv \<Gamma>
\<not> shadows_consts (t $\<^sub>s u)
not_shadows_vconsts_env \<Gamma>
not_shadows_vconsts (Vrecabs css name \<Gamma>')
(pat, rhs) \<in> set cs

goal (1 subgoal):
 1. \<not> shadows_consts rhs
[PROOF STEP]
by (auto simp: list_all_iff)
[PROOF STATE]
proof (state)
this:
\<not> shadows_consts rhs

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
vwelldefined' val

goal (3 subgoals):
 1. \<And>name \<Gamma> val. \<lbrakk>name |\<notin>| C; fmlookup \<Gamma> name = Some val; fdisjnt C (fmdom \<Gamma>); consts (Sconst name) |\<subseteq>| fmdom \<Gamma> |\<union>| C; fmpred (\<lambda>_. vwelldefined') \<Gamma>; pre_strong_term_class.wellformed (Sconst name); wellformed_venv \<Gamma>; \<not> shadows_consts (Sconst name); not_shadows_vconsts_env \<Gamma>\<rbrakk> \<Longrightarrow> vwelldefined' val
 2. \<And>\<Gamma> name val. \<lbrakk>fmlookup \<Gamma> name = Some val; fdisjnt C (fmdom \<Gamma>); consts (Svar name) |\<subseteq>| fmdom \<Gamma> |\<union>| C; fmpred (\<lambda>_. vwelldefined') \<Gamma>; pre_strong_term_class.wellformed (Svar name); wellformed_venv \<Gamma>; \<not> shadows_consts (Svar name); not_shadows_vconsts_env \<Gamma>\<rbrakk> \<Longrightarrow> vwelldefined' val
 3. \<And>name \<Gamma> ts us. \<lbrakk>name |\<in>| C; list_all2 (\<lambda>x1 x2. \<Gamma> \<turnstile>\<^sub>v x1 \<down> x2 \<and> (fdisjnt C (fmdom \<Gamma>) \<longrightarrow> consts x1 |\<subseteq>| fmdom \<Gamma> |\<union>| C \<longrightarrow> fmpred (\<lambda>_. vwelldefined') \<Gamma> \<longrightarrow> pre_strong_term_class.wellformed x1 \<longrightarrow> wellformed_venv \<Gamma> \<longrightarrow> \<not> shadows_consts x1 \<longrightarrow> not_shadows_vconsts_env \<Gamma> \<longrightarrow> vwelldefined' x2)) ts us; fdisjnt C (fmdom \<Gamma>); consts (name $$ ts) |\<subseteq>| fmdom \<Gamma> |\<union>| C; fmpred (\<lambda>_. vwelldefined') \<Gamma>; pre_strong_term_class.wellformed (name $$ ts); wellformed_venv \<Gamma>; \<not> shadows_consts (name $$ ts); not_shadows_vconsts_env \<Gamma>\<rbrakk> \<Longrightarrow> vwelldefined' (Vconstr name us)
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (3 subgoals):
 1. \<And>name \<Gamma> val. \<lbrakk>name |\<notin>| C; fmlookup \<Gamma> name = Some val; fdisjnt C (fmdom \<Gamma>); consts (Sconst name) |\<subseteq>| fmdom \<Gamma> |\<union>| C; fmpred (\<lambda>_. vwelldefined') \<Gamma>; pre_strong_term_class.wellformed (Sconst name); wellformed_venv \<Gamma>; \<not> shadows_consts (Sconst name); not_shadows_vconsts_env \<Gamma>\<rbrakk> \<Longrightarrow> vwelldefined' val
 2. \<And>\<Gamma> name val. \<lbrakk>fmlookup \<Gamma> name = Some val; fdisjnt C (fmdom \<Gamma>); consts (Svar name) |\<subseteq>| fmdom \<Gamma> |\<union>| C; fmpred (\<lambda>_. vwelldefined') \<Gamma>; pre_strong_term_class.wellformed (Svar name); wellformed_venv \<Gamma>; \<not> shadows_consts (Svar name); not_shadows_vconsts_env \<Gamma>\<rbrakk> \<Longrightarrow> vwelldefined' val
 3. \<And>name \<Gamma> ts us. \<lbrakk>name |\<in>| C; list_all2 (\<lambda>x1 x2. \<Gamma> \<turnstile>\<^sub>v x1 \<down> x2 \<and> (fdisjnt C (fmdom \<Gamma>) \<longrightarrow> consts x1 |\<subseteq>| fmdom \<Gamma> |\<union>| C \<longrightarrow> fmpred (\<lambda>_. vwelldefined') \<Gamma> \<longrightarrow> pre_strong_term_class.wellformed x1 \<longrightarrow> wellformed_venv \<Gamma> \<longrightarrow> \<not> shadows_consts x1 \<longrightarrow> not_shadows_vconsts_env \<Gamma> \<longrightarrow> vwelldefined' x2)) ts us; fdisjnt C (fmdom \<Gamma>); consts (name $$ ts) |\<subseteq>| fmdom \<Gamma> |\<union>| C; fmpred (\<lambda>_. vwelldefined') \<Gamma>; pre_strong_term_class.wellformed (name $$ ts); wellformed_venv \<Gamma>; \<not> shadows_consts (name $$ ts); not_shadows_vconsts_env \<Gamma>\<rbrakk> \<Longrightarrow> vwelldefined' (Vconstr name us)
[PROOF STEP]
case (constr name \<Gamma> ts us)
[PROOF STATE]
proof (state)
this:
name |\<in>| C
list_all2 (\<lambda>x1 x2. \<Gamma> \<turnstile>\<^sub>v x1 \<down> x2 \<and> (fdisjnt C (fmdom \<Gamma>) \<longrightarrow> consts x1 |\<subseteq>| fmdom \<Gamma> |\<union>| C \<longrightarrow> fmpred (\<lambda>_. vwelldefined') \<Gamma> \<longrightarrow> pre_strong_term_class.wellformed x1 \<longrightarrow> wellformed_venv \<Gamma> \<longrightarrow> \<not> shadows_consts x1 \<longrightarrow> not_shadows_vconsts_env \<Gamma> \<longrightarrow> vwelldefined' x2)) ts us
fdisjnt C (fmdom \<Gamma>)
consts (name $$ ts) |\<subseteq>| fmdom \<Gamma> |\<union>| C
fmpred (\<lambda>_. vwelldefined') \<Gamma>
pre_strong_term_class.wellformed (name $$ ts)
wellformed_venv \<Gamma>
\<not> shadows_consts (name $$ ts)
not_shadows_vconsts_env \<Gamma>

goal (3 subgoals):
 1. \<And>name \<Gamma> val. \<lbrakk>name |\<notin>| C; fmlookup \<Gamma> name = Some val; fdisjnt C (fmdom \<Gamma>); consts (Sconst name) |\<subseteq>| fmdom \<Gamma> |\<union>| C; fmpred (\<lambda>_. vwelldefined') \<Gamma>; pre_strong_term_class.wellformed (Sconst name); wellformed_venv \<Gamma>; \<not> shadows_consts (Sconst name); not_shadows_vconsts_env \<Gamma>\<rbrakk> \<Longrightarrow> vwelldefined' val
 2. \<And>\<Gamma> name val. \<lbrakk>fmlookup \<Gamma> name = Some val; fdisjnt C (fmdom \<Gamma>); consts (Svar name) |\<subseteq>| fmdom \<Gamma> |\<union>| C; fmpred (\<lambda>_. vwelldefined') \<Gamma>; pre_strong_term_class.wellformed (Svar name); wellformed_venv \<Gamma>; \<not> shadows_consts (Svar name); not_shadows_vconsts_env \<Gamma>\<rbrakk> \<Longrightarrow> vwelldefined' val
 3. \<And>name \<Gamma> ts us. \<lbrakk>name |\<in>| C; list_all2 (\<lambda>x1 x2. \<Gamma> \<turnstile>\<^sub>v x1 \<down> x2 \<and> (fdisjnt C (fmdom \<Gamma>) \<longrightarrow> consts x1 |\<subseteq>| fmdom \<Gamma> |\<union>| C \<longrightarrow> fmpred (\<lambda>_. vwelldefined') \<Gamma> \<longrightarrow> pre_strong_term_class.wellformed x1 \<longrightarrow> wellformed_venv \<Gamma> \<longrightarrow> \<not> shadows_consts x1 \<longrightarrow> not_shadows_vconsts_env \<Gamma> \<longrightarrow> vwelldefined' x2)) ts us; fdisjnt C (fmdom \<Gamma>); consts (name $$ ts) |\<subseteq>| fmdom \<Gamma> |\<union>| C; fmpred (\<lambda>_. vwelldefined') \<Gamma>; pre_strong_term_class.wellformed (name $$ ts); wellformed_venv \<Gamma>; \<not> shadows_consts (name $$ ts); not_shadows_vconsts_env \<Gamma>\<rbrakk> \<Longrightarrow> vwelldefined' (Vconstr name us)
[PROOF STEP]
have "list_all vwelldefined' us"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. list_all vwelldefined' us
[PROOF STEP]
using \<open>list_all2 _ _ _\<close> \<open>consts (name $$ ts) |\<subseteq>| _\<close>
[PROOF STATE]
proof (prove)
using this:
list_all2 (\<lambda>x1 x2. \<Gamma> \<turnstile>\<^sub>v x1 \<down> x2 \<and> (fdisjnt C (fmdom \<Gamma>) \<longrightarrow> consts x1 |\<subseteq>| fmdom \<Gamma> |\<union>| C \<longrightarrow> fmpred (\<lambda>_. vwelldefined') \<Gamma> \<longrightarrow> pre_strong_term_class.wellformed x1 \<longrightarrow> wellformed_venv \<Gamma> \<longrightarrow> \<not> shadows_consts x1 \<longrightarrow> not_shadows_vconsts_env \<Gamma> \<longrightarrow> vwelldefined' x2)) ts us
consts (name $$ ts) |\<subseteq>| fmdom \<Gamma> |\<union>| C

goal (1 subgoal):
 1. list_all vwelldefined' us
[PROOF STEP]
using \<open>wellformed (name $$ ts)\<close> \<open>\<not> shadows_consts (name $$ ts)\<close>
[PROOF STATE]
proof (prove)
using this:
list_all2 (\<lambda>x1 x2. \<Gamma> \<turnstile>\<^sub>v x1 \<down> x2 \<and> (fdisjnt C (fmdom \<Gamma>) \<longrightarrow> consts x1 |\<subseteq>| fmdom \<Gamma> |\<union>| C \<longrightarrow> fmpred (\<lambda>_. vwelldefined') \<Gamma> \<longrightarrow> pre_strong_term_class.wellformed x1 \<longrightarrow> wellformed_venv \<Gamma> \<longrightarrow> \<not> shadows_consts x1 \<longrightarrow> not_shadows_vconsts_env \<Gamma> \<longrightarrow> vwelldefined' x2)) ts us
consts (name $$ ts) |\<subseteq>| fmdom \<Gamma> |\<union>| C
pre_strong_term_class.wellformed (name $$ ts)
\<not> shadows_consts (name $$ ts)

goal (1 subgoal):
 1. list_all vwelldefined' us
[PROOF STEP]
proof (induction ts us rule: list.rel_induct)
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. \<lbrakk>consts (name $$ []) |\<subseteq>| fmdom \<Gamma> |\<union>| C; pre_strong_term_class.wellformed (name $$ []); \<not> shadows_consts (name $$ [])\<rbrakk> \<Longrightarrow> list_all vwelldefined' []
 2. \<And>a21 a22 b21 b22. \<lbrakk>\<Gamma> \<turnstile>\<^sub>v a21 \<down> b21 \<and> (fdisjnt C (fmdom \<Gamma>) \<longrightarrow> consts a21 |\<subseteq>| fmdom \<Gamma> |\<union>| C \<longrightarrow> fmpred (\<lambda>_. vwelldefined') \<Gamma> \<longrightarrow> pre_strong_term_class.wellformed a21 \<longrightarrow> wellformed_venv \<Gamma> \<longrightarrow> \<not> shadows_consts a21 \<longrightarrow> not_shadows_vconsts_env \<Gamma> \<longrightarrow> vwelldefined' b21); \<lbrakk>consts (name $$ a22) |\<subseteq>| fmdom \<Gamma> |\<union>| C; pre_strong_term_class.wellformed (name $$ a22); \<not> shadows_consts (name $$ a22)\<rbrakk> \<Longrightarrow> list_all vwelldefined' b22; consts (name $$ (a21 # a22)) |\<subseteq>| fmdom \<Gamma> |\<union>| C; pre_strong_term_class.wellformed (name $$ (a21 # a22)); \<not> shadows_consts (name $$ (a21 # a22))\<rbrakk> \<Longrightarrow> list_all vwelldefined' (b21 # b22)
[PROOF STEP]
case (Cons v vs u us)
[PROOF STATE]
proof (state)
this:
\<Gamma> \<turnstile>\<^sub>v v \<down> u \<and> (fdisjnt C (fmdom \<Gamma>) \<longrightarrow> consts v |\<subseteq>| fmdom \<Gamma> |\<union>| C \<longrightarrow> fmpred (\<lambda>_. vwelldefined') \<Gamma> \<longrightarrow> pre_strong_term_class.wellformed v \<longrightarrow> wellformed_venv \<Gamma> \<longrightarrow> \<not> shadows_consts v \<longrightarrow> not_shadows_vconsts_env \<Gamma> \<longrightarrow> vwelldefined' u)
\<lbrakk>consts (name $$ vs) |\<subseteq>| fmdom \<Gamma> |\<union>| C; pre_strong_term_class.wellformed (name $$ vs); \<not> shadows_consts (name $$ vs)\<rbrakk> \<Longrightarrow> list_all vwelldefined' us
consts (name $$ (v # vs)) |\<subseteq>| fmdom \<Gamma> |\<union>| C
pre_strong_term_class.wellformed (name $$ (v # vs))
\<not> shadows_consts (name $$ (v # vs))

goal (2 subgoals):
 1. \<lbrakk>consts (name $$ []) |\<subseteq>| fmdom \<Gamma> |\<union>| C; pre_strong_term_class.wellformed (name $$ []); \<not> shadows_consts (name $$ [])\<rbrakk> \<Longrightarrow> list_all vwelldefined' []
 2. \<And>a21 a22 b21 b22. \<lbrakk>\<Gamma> \<turnstile>\<^sub>v a21 \<down> b21 \<and> (fdisjnt C (fmdom \<Gamma>) \<longrightarrow> consts a21 |\<subseteq>| fmdom \<Gamma> |\<union>| C \<longrightarrow> fmpred (\<lambda>_. vwelldefined') \<Gamma> \<longrightarrow> pre_strong_term_class.wellformed a21 \<longrightarrow> wellformed_venv \<Gamma> \<longrightarrow> \<not> shadows_consts a21 \<longrightarrow> not_shadows_vconsts_env \<Gamma> \<longrightarrow> vwelldefined' b21); \<lbrakk>consts (name $$ a22) |\<subseteq>| fmdom \<Gamma> |\<union>| C; pre_strong_term_class.wellformed (name $$ a22); \<not> shadows_consts (name $$ a22)\<rbrakk> \<Longrightarrow> list_all vwelldefined' b22; consts (name $$ (a21 # a22)) |\<subseteq>| fmdom \<Gamma> |\<union>| C; pre_strong_term_class.wellformed (name $$ (a21 # a22)); \<not> shadows_consts (name $$ (a21 # a22))\<rbrakk> \<Longrightarrow> list_all vwelldefined' (b21 # b22)
[PROOF STEP]
with constr
[PROOF STATE]
proof (chain)
picking this:
name |\<in>| C
list_all2 (\<lambda>x1 x2. \<Gamma> \<turnstile>\<^sub>v x1 \<down> x2 \<and> (fdisjnt C (fmdom \<Gamma>) \<longrightarrow> consts x1 |\<subseteq>| fmdom \<Gamma> |\<union>| C \<longrightarrow> fmpred (\<lambda>_. vwelldefined') \<Gamma> \<longrightarrow> pre_strong_term_class.wellformed x1 \<longrightarrow> wellformed_venv \<Gamma> \<longrightarrow> \<not> shadows_consts x1 \<longrightarrow> not_shadows_vconsts_env \<Gamma> \<longrightarrow> vwelldefined' x2)) ts us__
fdisjnt C (fmdom \<Gamma>)
consts (name $$ ts) |\<subseteq>| fmdom \<Gamma> |\<union>| C
fmpred (\<lambda>_. vwelldefined') \<Gamma>
pre_strong_term_class.wellformed (name $$ ts)
wellformed_venv \<Gamma>
\<not> shadows_consts (name $$ ts)
not_shadows_vconsts_env \<Gamma>
\<Gamma> \<turnstile>\<^sub>v v \<down> u \<and> (fdisjnt C (fmdom \<Gamma>) \<longrightarrow> consts v |\<subseteq>| fmdom \<Gamma> |\<union>| C \<longrightarrow> fmpred (\<lambda>_. vwelldefined') \<Gamma> \<longrightarrow> pre_strong_term_class.wellformed v \<longrightarrow> wellformed_venv \<Gamma> \<longrightarrow> \<not> shadows_consts v \<longrightarrow> not_shadows_vconsts_env \<Gamma> \<longrightarrow> vwelldefined' u)
\<lbrakk>consts (name $$ vs) |\<subseteq>| fmdom \<Gamma> |\<union>| C; pre_strong_term_class.wellformed (name $$ vs); \<not> shadows_consts (name $$ vs)\<rbrakk> \<Longrightarrow> list_all vwelldefined' us
consts (name $$ (v # vs)) |\<subseteq>| fmdom \<Gamma> |\<union>| C
pre_strong_term_class.wellformed (name $$ (v # vs))
\<not> shadows_consts (name $$ (v # vs))
[PROOF STEP]
show ?case
[PROOF STATE]
proof (prove)
using this:
name |\<in>| C
list_all2 (\<lambda>x1 x2. \<Gamma> \<turnstile>\<^sub>v x1 \<down> x2 \<and> (fdisjnt C (fmdom \<Gamma>) \<longrightarrow> consts x1 |\<subseteq>| fmdom \<Gamma> |\<union>| C \<longrightarrow> fmpred (\<lambda>_. vwelldefined') \<Gamma> \<longrightarrow> pre_strong_term_class.wellformed x1 \<longrightarrow> wellformed_venv \<Gamma> \<longrightarrow> \<not> shadows_consts x1 \<longrightarrow> not_shadows_vconsts_env \<Gamma> \<longrightarrow> vwelldefined' x2)) ts us__
fdisjnt C (fmdom \<Gamma>)
consts (name $$ ts) |\<subseteq>| fmdom \<Gamma> |\<union>| C
fmpred (\<lambda>_. vwelldefined') \<Gamma>
pre_strong_term_class.wellformed (name $$ ts)
wellformed_venv \<Gamma>
\<not> shadows_consts (name $$ ts)
not_shadows_vconsts_env \<Gamma>
\<Gamma> \<turnstile>\<^sub>v v \<down> u \<and> (fdisjnt C (fmdom \<Gamma>) \<longrightarrow> consts v |\<subseteq>| fmdom \<Gamma> |\<union>| C \<longrightarrow> fmpred (\<lambda>_. vwelldefined') \<Gamma> \<longrightarrow> pre_strong_term_class.wellformed v \<longrightarrow> wellformed_venv \<Gamma> \<longrightarrow> \<not> shadows_consts v \<longrightarrow> not_shadows_vconsts_env \<Gamma> \<longrightarrow> vwelldefined' u)
\<lbrakk>consts (name $$ vs) |\<subseteq>| fmdom \<Gamma> |\<union>| C; pre_strong_term_class.wellformed (name $$ vs); \<not> shadows_consts (name $$ vs)\<rbrakk> \<Longrightarrow> list_all vwelldefined' us
consts (name $$ (v # vs)) |\<subseteq>| fmdom \<Gamma> |\<union>| C
pre_strong_term_class.wellformed (name $$ (v # vs))
\<not> shadows_consts (name $$ (v # vs))

goal (1 subgoal):
 1. list_all vwelldefined' (u # us)
[PROOF STEP]
unfolding wellformed.list_comb shadows.list_comb
[PROOF STATE]
proof (prove)
using this:
name |\<in>| C
list_all2 (\<lambda>x1 x2. \<Gamma> \<turnstile>\<^sub>v x1 \<down> x2 \<and> (fdisjnt C (fmdom \<Gamma>) \<longrightarrow> consts x1 |\<subseteq>| fmdom \<Gamma> |\<union>| C \<longrightarrow> fmpred (\<lambda>_. vwelldefined') \<Gamma> \<longrightarrow> pre_strong_term_class.wellformed x1 \<longrightarrow> wellformed_venv \<Gamma> \<longrightarrow> \<not> shadows_consts x1 \<longrightarrow> not_shadows_vconsts_env \<Gamma> \<longrightarrow> vwelldefined' x2)) ts us__
fdisjnt C (fmdom \<Gamma>)
consts (name $$ ts) |\<subseteq>| fmdom \<Gamma> |\<union>| C
fmpred (\<lambda>_. vwelldefined') \<Gamma>
pre_strong_term_class.wellformed (const name) \<and> list_all pre_strong_term_class.wellformed ts
wellformed_venv \<Gamma>
\<not> (shadows_consts (const name) \<or> list_ex shadows_consts ts)
not_shadows_vconsts_env \<Gamma>
\<Gamma> \<turnstile>\<^sub>v v \<down> u \<and> (fdisjnt C (fmdom \<Gamma>) \<longrightarrow> consts v |\<subseteq>| fmdom \<Gamma> |\<union>| C \<longrightarrow> fmpred (\<lambda>_. vwelldefined') \<Gamma> \<longrightarrow> pre_strong_term_class.wellformed v \<longrightarrow> wellformed_venv \<Gamma> \<longrightarrow> \<not> shadows_consts v \<longrightarrow> not_shadows_vconsts_env \<Gamma> \<longrightarrow> vwelldefined' u)
\<lbrakk>consts (name $$ vs) |\<subseteq>| fmdom \<Gamma> |\<union>| C; pre_strong_term_class.wellformed (const name) \<and> list_all pre_strong_term_class.wellformed vs; \<not> (shadows_consts (const name) \<or> list_ex shadows_consts vs)\<rbrakk> \<Longrightarrow> list_all vwelldefined' us
consts (name $$ (v # vs)) |\<subseteq>| fmdom \<Gamma> |\<union>| C
pre_strong_term_class.wellformed (const name) \<and> list_all pre_strong_term_class.wellformed (v # vs)
\<not> (shadows_consts (const name) \<or> list_ex shadows_consts (v # vs))

goal (1 subgoal):
 1. list_all vwelldefined' (u # us)
[PROOF STEP]
by (auto simp: consts_list_comb)
[PROOF STATE]
proof (state)
this:
list_all vwelldefined' (u # us)

goal (1 subgoal):
 1. \<lbrakk>consts (name $$ []) |\<subseteq>| fmdom \<Gamma> |\<union>| C; pre_strong_term_class.wellformed (name $$ []); \<not> shadows_consts (name $$ [])\<rbrakk> \<Longrightarrow> list_all vwelldefined' []
[PROOF STEP]
qed simp
[PROOF STATE]
proof (state)
this:
list_all vwelldefined' us

goal (3 subgoals):
 1. \<And>name \<Gamma> val. \<lbrakk>name |\<notin>| C; fmlookup \<Gamma> name = Some val; fdisjnt C (fmdom \<Gamma>); consts (Sconst name) |\<subseteq>| fmdom \<Gamma> |\<union>| C; fmpred (\<lambda>_. vwelldefined') \<Gamma>; pre_strong_term_class.wellformed (Sconst name); wellformed_venv \<Gamma>; \<not> shadows_consts (Sconst name); not_shadows_vconsts_env \<Gamma>\<rbrakk> \<Longrightarrow> vwelldefined' val
 2. \<And>\<Gamma> name val. \<lbrakk>fmlookup \<Gamma> name = Some val; fdisjnt C (fmdom \<Gamma>); consts (Svar name) |\<subseteq>| fmdom \<Gamma> |\<union>| C; fmpred (\<lambda>_. vwelldefined') \<Gamma>; pre_strong_term_class.wellformed (Svar name); wellformed_venv \<Gamma>; \<not> shadows_consts (Svar name); not_shadows_vconsts_env \<Gamma>\<rbrakk> \<Longrightarrow> vwelldefined' val
 3. \<And>name \<Gamma> ts us. \<lbrakk>name |\<in>| C; list_all2 (\<lambda>x1 x2. \<Gamma> \<turnstile>\<^sub>v x1 \<down> x2 \<and> (fdisjnt C (fmdom \<Gamma>) \<longrightarrow> consts x1 |\<subseteq>| fmdom \<Gamma> |\<union>| C \<longrightarrow> fmpred (\<lambda>_. vwelldefined') \<Gamma> \<longrightarrow> pre_strong_term_class.wellformed x1 \<longrightarrow> wellformed_venv \<Gamma> \<longrightarrow> \<not> shadows_consts x1 \<longrightarrow> not_shadows_vconsts_env \<Gamma> \<longrightarrow> vwelldefined' x2)) ts us; fdisjnt C (fmdom \<Gamma>); consts (name $$ ts) |\<subseteq>| fmdom \<Gamma> |\<union>| C; fmpred (\<lambda>_. vwelldefined') \<Gamma>; pre_strong_term_class.wellformed (name $$ ts); wellformed_venv \<Gamma>; \<not> shadows_consts (name $$ ts); not_shadows_vconsts_env \<Gamma>\<rbrakk> \<Longrightarrow> vwelldefined' (Vconstr name us)
[PROOF STEP]
thus ?case
[PROOF STATE]
proof (prove)
using this:
list_all vwelldefined' us

goal (1 subgoal):
 1. vwelldefined' (Vconstr name us)
[PROOF STEP]
by (simp add: list_all_iff)
[PROOF STATE]
proof (state)
this:
vwelldefined' (Vconstr name us)

goal (2 subgoals):
 1. \<And>name \<Gamma> val. \<lbrakk>name |\<notin>| C; fmlookup \<Gamma> name = Some val; fdisjnt C (fmdom \<Gamma>); consts (Sconst name) |\<subseteq>| fmdom \<Gamma> |\<union>| C; fmpred (\<lambda>_. vwelldefined') \<Gamma>; pre_strong_term_class.wellformed (Sconst name); wellformed_venv \<Gamma>; \<not> shadows_consts (Sconst name); not_shadows_vconsts_env \<Gamma>\<rbrakk> \<Longrightarrow> vwelldefined' val
 2. \<And>\<Gamma> name val. \<lbrakk>fmlookup \<Gamma> name = Some val; fdisjnt C (fmdom \<Gamma>); consts (Svar name) |\<subseteq>| fmdom \<Gamma> |\<union>| C; fmpred (\<lambda>_. vwelldefined') \<Gamma>; pre_strong_term_class.wellformed (Svar name); wellformed_venv \<Gamma>; \<not> shadows_consts (Svar name); not_shadows_vconsts_env \<Gamma>\<rbrakk> \<Longrightarrow> vwelldefined' val
[PROOF STEP]
qed auto