62 | Cast "trm" "ty" --"ty is supposed to be a coercion type only" |
62 | Cast "trm" "ty" --"ty is supposed to be a coercion type only" |
63 and assoc_lst = |
63 and assoc_lst = |
64 ANil |
64 ANil |
65 | ACons p::"pat" t::"trm" "assoc_lst" bind "bv p" in t |
65 | ACons p::"pat" t::"trm" "assoc_lst" bind "bv p" in t |
66 and pat = |
66 and pat = |
67 Kpat "string" "tvtk_lst" "tvck_lst" "vt_lst" |
67 Kpat "string" "tvars" "cvars" "vars" |
68 and vt_lst = |
68 and vars = |
69 VTNil |
69 VsNil |
70 | VTCons "var" "ty" "vt_lst" |
70 | VsCons "var" "ty" "vars" |
71 and tvtk_lst = |
71 and tvars = |
72 TVTKNil |
72 TvsNil |
73 | TVTKCons "tvar" "tkind" "tvtk_lst" |
73 | TvsCons "tvar" "tkind" "tvars" |
74 and tvck_lst = |
74 and cvars = |
75 TVCKNil |
75 CvsNil |
76 | TVCKCons "cvar" "ckind" "tvck_lst" |
76 | CvsCons "cvar" "ckind" "cvars" |
77 binder |
77 binder |
78 bv :: "pat \<Rightarrow> atom list" |
78 bv :: "pat \<Rightarrow> atom list" |
79 and bv_vt :: "vt_lst \<Rightarrow> atom list" |
79 and bv_vs :: "vars \<Rightarrow> atom list" |
80 and bv_tvtk :: "tvtk_lst \<Rightarrow> atom list" |
80 and bv_tvs :: "tvars \<Rightarrow> atom list" |
81 and bv_tvck :: "tvck_lst \<Rightarrow> atom list" |
81 and bv_cvs :: "cvars \<Rightarrow> atom list" |
82 where |
82 where |
83 "bv (K s tvts tvcs vs) = append (bv_tvtk tvts) (append (bv_tvck tvcs) (bv_vt vs))" |
83 "bv (Kpat s tvts tvcs vs) = append (bv_tvs tvts) (append (bv_cvs tvcs) (bv_vs vs))" |
84 | "bv_vt VTNil = []" |
84 | "bv_vs VsNil = []" |
85 | "bv_vt (VTCons v k t) = (atom v) # bv_vt t" |
85 | "bv_vs (VsCons v k t) = (atom v) # bv_vs t" |
86 | "bv_tvtk TVTKNil = []" |
86 | "bv_tvs TvsNil = []" |
87 | "bv_tvtk (TVTKCons v k t) = (atom v) # bv_tvtk t" |
87 | "bv_tvs (TvsCons v k t) = (atom v) # bv_tvs t" |
88 | "bv_tvck TVCKNil = []" |
88 | "bv_cvs CvsNil = []" |
89 | "bv_tvck (TVCKCons v k t) = (atom v) # bv_tvck t" |
89 | "bv_cvs (CvsCons v k t) = (atom v) # bv_cvs t" |
90 |
90 |
91 lemmas fv_supp=tkind_ckind_ty_ty_lst_co_co_lst_trm_assoc_lst_pat_vt_lst_tvtk_lst_tvck_lst.supp(1-9,11,13,15) |
91 lemmas fv_supp=tkind_ckind_ty_ty_lst_co_co_lst_trm_assoc_lst_pat_vars_tvars_cvars.supp(1-9,11,13,15) |
92 lemmas supp=tkind_ckind_ty_ty_lst_co_co_lst_trm_assoc_lst_pat_vt_lst_tvtk_lst_tvck_lst.fv[simplified fv_supp] |
92 lemmas supp=tkind_ckind_ty_ty_lst_co_co_lst_trm_assoc_lst_pat_vars_tvars_cvars.fv[simplified fv_supp] |
93 lemmas perm=tkind_ckind_ty_ty_lst_co_co_lst_trm_assoc_lst_pat_vt_lst_tvtk_lst_tvck_lst.perm |
93 lemmas perm=tkind_ckind_ty_ty_lst_co_co_lst_trm_assoc_lst_pat_vars_tvars_cvars.perm |
94 lemmas eq_iff=tkind_ckind_ty_ty_lst_co_co_lst_trm_assoc_lst_pat_vt_lst_tvtk_lst_tvck_lst.eq_iff |
94 lemmas eq_iff=tkind_ckind_ty_ty_lst_co_co_lst_trm_assoc_lst_pat_vars_tvars_cvars.eq_iff |
95 lemmas inducts=tkind_ckind_ty_ty_lst_co_co_lst_trm_assoc_lst_pat_vt_lst_tvtk_lst_tvck_lst.inducts |
95 lemmas inducts=tkind_ckind_ty_ty_lst_co_co_lst_trm_assoc_lst_pat_vars_tvars_cvars.inducts |
96 |
96 |
97 lemmas alpha_inducts=alpha_tkind_raw_alpha_ckind_raw_alpha_ty_raw_alpha_ty_lst_raw_alpha_co_raw_alpha_co_lst_raw_alpha_trm_raw_alpha_assoc_lst_raw_alpha_pat_raw_alpha_vt_lst_raw_alpha_tvtk_lst_raw_alpha_tvck_lst_raw_alpha_bv_raw_alpha_bv_vt_raw_alpha_bv_tvtk_raw_alpha_bv_tvck_raw.inducts |
97 lemmas alpha_inducts=alpha_tkind_raw_alpha_ckind_raw_alpha_ty_raw_alpha_ty_lst_raw_alpha_co_raw_alpha_co_lst_raw_alpha_trm_raw_alpha_assoc_lst_raw_alpha_pat_raw_alpha_vars_raw_alpha_tvars_raw_alpha_cvars_raw_alpha_bv_raw_alpha_bv_vs_raw_alpha_bv_tvs_raw_alpha_bv_cvs_raw.inducts |
98 lemmas alpha_intros=alpha_tkind_raw_alpha_ckind_raw_alpha_ty_raw_alpha_ty_lst_raw_alpha_co_raw_alpha_co_lst_raw_alpha_trm_raw_alpha_assoc_lst_raw_alpha_pat_raw_alpha_vt_lst_raw_alpha_tvtk_lst_raw_alpha_tvck_lst_raw_alpha_bv_raw_alpha_bv_vt_raw_alpha_bv_tvtk_raw_alpha_bv_tvck_raw.intros |
98 lemmas alpha_intros=alpha_tkind_raw_alpha_ckind_raw_alpha_ty_raw_alpha_ty_lst_raw_alpha_co_raw_alpha_co_lst_raw_alpha_trm_raw_alpha_assoc_lst_raw_alpha_pat_raw_alpha_vars_raw_alpha_tvars_raw_alpha_cvars_raw_alpha_bv_raw_alpha_bv_vs_raw_alpha_bv_tvs_raw_alpha_bv_cvs_raw.intros |
99 |
99 |
100 lemma fresh_star_minus_perm: "as \<sharp>* - p = as \<sharp>* (p :: perm)" |
100 lemma fresh_star_minus_perm: "as \<sharp>* - p = as \<sharp>* (p :: perm)" |
101 unfolding fresh_star_def Ball_def |
101 unfolding fresh_star_def Ball_def |
102 by auto (simp_all add: fresh_minus_perm) |
102 by auto (simp_all add: fresh_minus_perm) |
103 |
103 |
104 primrec permute_bv_vt_raw |
104 primrec permute_bv_vs_raw |
105 where "permute_bv_vt_raw p VTNil_raw = VTNil_raw" |
105 where "permute_bv_vs_raw p VsNil_raw = VsNil_raw" |
106 | "permute_bv_vt_raw p (VTCons_raw v t l) = VTCons_raw (p \<bullet> v) t (permute_bv_vt_raw p l)" |
106 | "permute_bv_vs_raw p (VsCons_raw v t l) = VsCons_raw (p \<bullet> v) t (permute_bv_vs_raw p l)" |
107 primrec permute_bv_tvck_raw |
107 primrec permute_bv_cvs_raw |
108 where "permute_bv_tvck_raw p TVCKNil_raw = TVCKNil_raw" |
108 where "permute_bv_cvs_raw p CvsNil_raw = CvsNil_raw" |
109 | "permute_bv_tvck_raw p (TVCKCons_raw v t l) = TVCKCons_raw (p \<bullet> v) t (permute_bv_tvck_raw p l)" |
109 | "permute_bv_cvs_raw p (CvsCons_raw v t l) = CvsCons_raw (p \<bullet> v) t (permute_bv_cvs_raw p l)" |
110 primrec permute_bv_tvtk_raw |
110 primrec permute_bv_tvs_raw |
111 where "permute_bv_tvtk_raw p TVTKNil_raw = TVTKNil_raw" |
111 where "permute_bv_tvs_raw p TvsNil_raw = TvsNil_raw" |
112 | "permute_bv_tvtk_raw p (TVTKCons_raw v t l) = TVTKCons_raw (p \<bullet> v) t (permute_bv_tvtk_raw p l)" |
112 | "permute_bv_tvs_raw p (TvsCons_raw v t l) = TvsCons_raw (p \<bullet> v) t (permute_bv_tvs_raw p l)" |
113 primrec permute_bv_raw |
113 primrec permute_bv_raw |
114 where "permute_bv_raw p (K_raw c l1 l2 l3) = |
114 where "permute_bv_raw p (Kpat_raw c l1 l2 l3) = |
115 K_raw c (permute_bv_tvtk_raw p l1) (permute_bv_tvck_raw p l2) (permute_bv_vt_raw p l3)" |
115 Kpat_raw c (permute_bv_tvs_raw p l1) (permute_bv_cvs_raw p l2) (permute_bv_vs_raw p l3)" |
116 |
116 |
117 quotient_definition "permute_bv_vt :: perm \<Rightarrow> vt_lst \<Rightarrow> vt_lst" |
117 quotient_definition "permute_bv_vs :: perm \<Rightarrow> vars \<Rightarrow> vars" |
118 is "permute_bv_vt_raw" |
118 is "permute_bv_vs_raw" |
119 quotient_definition "permute_bv_tvck :: perm \<Rightarrow> tvck_lst \<Rightarrow> tvck_lst" |
119 quotient_definition "permute_bv_cvs :: perm \<Rightarrow> cvars \<Rightarrow> cvars" |
120 is "permute_bv_tvck_raw" |
120 is "permute_bv_cvs_raw" |
121 quotient_definition "permute_bv_tvtk :: perm \<Rightarrow> tvtk_lst \<Rightarrow> tvtk_lst" |
121 quotient_definition "permute_bv_tvs :: perm \<Rightarrow> tvars \<Rightarrow> tvars" |
122 is "permute_bv_tvtk_raw" |
122 is "permute_bv_tvs_raw" |
123 quotient_definition "permute_bv :: perm \<Rightarrow> pat \<Rightarrow> pat" |
123 quotient_definition "permute_bv :: perm \<Rightarrow> pat \<Rightarrow> pat" |
124 is "permute_bv_raw" |
124 is "permute_bv_raw" |
125 |
125 |
126 lemma rsp_pre: |
126 lemma rsp_pre: |
127 "alpha_tvtk_lst_raw d a \<Longrightarrow> alpha_tvtk_lst_raw (permute_bv_tvtk_raw x d) (permute_bv_tvtk_raw x a)" |
127 "alpha_tvars_raw d a \<Longrightarrow> alpha_tvars_raw (permute_bv_tvs_raw x d) (permute_bv_tvs_raw x a)" |
128 "alpha_tvck_lst_raw e b \<Longrightarrow> alpha_tvck_lst_raw (permute_bv_tvck_raw x e) (permute_bv_tvck_raw x b)" |
128 "alpha_cvars_raw e b \<Longrightarrow> alpha_cvars_raw (permute_bv_cvs_raw x e) (permute_bv_cvs_raw x b)" |
129 "alpha_vt_lst_raw f c \<Longrightarrow> alpha_vt_lst_raw (permute_bv_vt_raw x f) (permute_bv_vt_raw x c)" |
129 "alpha_vars_raw f c \<Longrightarrow> alpha_vars_raw (permute_bv_vs_raw x f) (permute_bv_vs_raw x c)" |
130 apply (erule_tac [!] alpha_inducts) |
130 apply (erule_tac [!] alpha_inducts) |
131 apply simp_all |
131 apply simp_all |
132 apply (rule_tac [!] alpha_intros) |
132 apply (rule_tac [!] alpha_intros) |
133 apply simp_all |
133 apply simp_all |
134 done |
134 done |
135 |
135 |
136 lemma [quot_respect]: |
136 lemma [quot_respect]: |
137 "(op = ===> alpha_pat_raw ===> alpha_pat_raw) permute_bv_raw permute_bv_raw" |
137 "(op = ===> alpha_pat_raw ===> alpha_pat_raw) permute_bv_raw permute_bv_raw" |
138 "(op = ===> alpha_tvtk_lst_raw ===> alpha_tvtk_lst_raw) permute_bv_tvtk_raw permute_bv_tvtk_raw" |
138 "(op = ===> alpha_tvars_raw ===> alpha_tvars_raw) permute_bv_tvs_raw permute_bv_tvs_raw" |
139 "(op = ===> alpha_tvck_lst_raw ===> alpha_tvck_lst_raw) permute_bv_tvck_raw permute_bv_tvck_raw" |
139 "(op = ===> alpha_cvars_raw ===> alpha_cvars_raw) permute_bv_cvs_raw permute_bv_cvs_raw" |
140 "(op = ===> alpha_vt_lst_raw ===> alpha_vt_lst_raw) permute_bv_vt_raw permute_bv_vt_raw" |
140 "(op = ===> alpha_vars_raw ===> alpha_vars_raw) permute_bv_vs_raw permute_bv_vs_raw" |
141 apply (simp_all add: rsp_pre) |
141 apply (simp_all add: rsp_pre) |
142 apply clarify |
142 apply clarify |
143 apply (erule_tac alpha_inducts) |
143 apply (erule_tac alpha_inducts) |
144 apply (simp_all) |
144 apply (simp_all) |
145 apply (rule alpha_intros) |
145 apply (rule alpha_intros) |
146 apply (simp_all add: rsp_pre) |
146 apply (simp_all add: rsp_pre) |
147 done |
147 done |
148 |
148 |
149 thm permute_bv_raw.simps[no_vars] |
149 thm permute_bv_raw.simps[no_vars] |
150 permute_bv_vt_raw.simps[quot_lifted] |
150 permute_bv_vs_raw.simps[quot_lifted] |
151 permute_bv_tvck_raw.simps[quot_lifted] |
151 permute_bv_cvs_raw.simps[quot_lifted] |
152 permute_bv_tvtk_raw.simps[quot_lifted] |
152 permute_bv_tvs_raw.simps[quot_lifted] |
153 |
153 |
154 lemma permute_bv_pre: |
154 lemma permute_bv_pre: |
155 "permute_bv p (K c l1 l2 l3) = |
155 "permute_bv p (Kpat c l1 l2 l3) = |
156 K c (permute_bv_tvtk p l1) (permute_bv_tvck p l2) (permute_bv_vt p l3)" |
156 Kpat c (permute_bv_tvs p l1) (permute_bv_cvs p l2) (permute_bv_vs p l3)" |
157 by (lifting permute_bv_raw.simps) |
157 by (lifting permute_bv_raw.simps) |
158 |
158 |
159 lemmas permute_bv[simp] = |
159 lemmas permute_bv[simp] = |
160 permute_bv_pre |
160 permute_bv_pre |
161 permute_bv_vt_raw.simps[quot_lifted] |
161 permute_bv_vs_raw.simps[quot_lifted] |
162 permute_bv_tvck_raw.simps[quot_lifted] |
162 permute_bv_cvs_raw.simps[quot_lifted] |
163 permute_bv_tvtk_raw.simps[quot_lifted] |
163 permute_bv_tvs_raw.simps[quot_lifted] |
164 |
164 |
165 lemma perm_bv1: |
165 lemma perm_bv1: |
166 "p \<bullet> bv_tvck b = bv_tvck (permute_bv_tvck p b)" |
166 "p \<bullet> bv_cvs b = bv_cvs (permute_bv_cvs p b)" |
167 "p \<bullet> bv_tvtk c = bv_tvtk (permute_bv_tvtk p c)" |
167 "p \<bullet> bv_tvs c = bv_tvs (permute_bv_tvs p c)" |
168 "p \<bullet> bv_vt d = bv_vt (permute_bv_vt p d)" |
168 "p \<bullet> bv_vs d = bv_vs (permute_bv_vs p d)" |
169 apply(induct b rule: inducts(12)) |
169 apply(induct b rule: inducts(12)) |
170 apply(rule TrueI) |
170 apply(rule TrueI) |
171 apply(simp_all add:permute_bv eqvts) |
171 apply(simp_all add:permute_bv eqvts) |
172 apply(induct c rule: inducts(11)) |
172 apply(induct c rule: inducts(11)) |
173 apply(rule TrueI) |
173 apply(rule TrueI) |
241 apply(induct a rule: inducts(9)) |
241 apply(induct a rule: inducts(9)) |
242 apply(rule TrueI) |
242 apply(rule TrueI) |
243 apply(simp_all add:permute_bv eqvts permute_bv_zero1) |
243 apply(simp_all add:permute_bv eqvts permute_bv_zero1) |
244 done |
244 done |
245 |
245 |
246 lemma fv_alpha1: "fv_bv_tvtk x \<sharp>* pa \<Longrightarrow> alpha_bv_tvtk (pa \<bullet> x) x" |
246 lemma fv_alpha1: "fv_bv_tvs x \<sharp>* pa \<Longrightarrow> alpha_bv_tvs (pa \<bullet> x) x" |
247 apply (induct x rule: inducts(11)) |
247 apply (induct x rule: inducts(11)) |
248 apply (tactic {* ALLGOALS (TRY o rtac @{thm TrueI}) *}) |
248 apply (tactic {* ALLGOALS (TRY o rtac @{thm TrueI}) *}) |
249 apply (simp_all add: eq_iff fresh_star_union) |
249 apply (simp_all add: eq_iff fresh_star_union) |
250 apply (subst supp_perm_eq) |
250 apply (subst supp_perm_eq) |
251 apply (simp_all add: fv_supp) |
251 apply (simp_all add: fv_supp) |
252 done |
252 done |
253 |
253 |
254 lemma fv_alpha2: "fv_bv_tvck x \<sharp>* pa \<Longrightarrow> alpha_bv_tvck (pa \<bullet> x) x" |
254 lemma fv_alpha2: "fv_bv_cvs x \<sharp>* pa \<Longrightarrow> alpha_bv_cvs (pa \<bullet> x) x" |
255 apply (induct x rule: inducts(12)) |
255 apply (induct x rule: inducts(12)) |
256 apply (tactic {* ALLGOALS (TRY o rtac @{thm TrueI}) *}) |
256 apply (tactic {* ALLGOALS (TRY o rtac @{thm TrueI}) *}) |
257 apply (simp_all add: eq_iff fresh_star_union) |
257 apply (simp_all add: eq_iff fresh_star_union) |
258 apply (subst supp_perm_eq) |
258 apply (subst supp_perm_eq) |
259 apply (simp_all add: fv_supp) |
259 apply (simp_all add: fv_supp) |
260 done |
260 done |
261 |
261 |
262 lemma fv_alpha3: "fv_bv_vt x \<sharp>* pa \<Longrightarrow> alpha_bv_vt (pa \<bullet> x) x" |
262 lemma fv_alpha3: "fv_bv_vs x \<sharp>* pa \<Longrightarrow> alpha_bv_vs (pa \<bullet> x) x" |
263 apply (induct x rule: inducts(10)) |
263 apply (induct x rule: inducts(10)) |
264 apply (tactic {* ALLGOALS (TRY o rtac @{thm TrueI}) *}) |
264 apply (tactic {* ALLGOALS (TRY o rtac @{thm TrueI}) *}) |
265 apply (simp_all add: eq_iff fresh_star_union) |
265 apply (simp_all add: eq_iff fresh_star_union) |
266 apply (subst supp_perm_eq) |
266 apply (subst supp_perm_eq) |
267 apply (simp_all add: fv_supp) |
267 apply (simp_all add: fv_supp) |
366 and a35: "\<And>trm assoc_lst b. \<lbrakk>\<And>c. P7 c trm; \<And>c. P8 c assoc_lst\<rbrakk> \<Longrightarrow> P7 b (Case trm assoc_lst)" |
366 and a35: "\<And>trm assoc_lst b. \<lbrakk>\<And>c. P7 c trm; \<And>c. P8 c assoc_lst\<rbrakk> \<Longrightarrow> P7 b (Case trm assoc_lst)" |
367 and a36: "\<And>trm ty b. \<lbrakk>\<And>c. P7 c trm; \<And>c. P3 c ty\<rbrakk> \<Longrightarrow> P7 b (Cast trm ty)" |
367 and a36: "\<And>trm ty b. \<lbrakk>\<And>c. P7 c trm; \<And>c. P3 c ty\<rbrakk> \<Longrightarrow> P7 b (Cast trm ty)" |
368 and a37: "\<And>b. P8 b ANil" |
368 and a37: "\<And>b. P8 b ANil" |
369 and a38: "\<And>pat trm assoc_lst b. \<lbrakk>\<And>c. P9 c pat; \<And>c. P7 c trm; \<And>c. P8 c assoc_lst; set (bv (pat)) \<sharp>* b\<rbrakk> |
369 and a38: "\<And>pat trm assoc_lst b. \<lbrakk>\<And>c. P9 c pat; \<And>c. P7 c trm; \<And>c. P8 c assoc_lst; set (bv (pat)) \<sharp>* b\<rbrakk> |
370 \<Longrightarrow> P8 b (ACons pat trm assoc_lst)" |
370 \<Longrightarrow> P8 b (ACons pat trm assoc_lst)" |
371 and a39: "\<And>string tvtk_lst tvck_lst vt_lst b. \<lbrakk>\<And>c. P11 c tvtk_lst; \<And>c. P12 c tvck_lst; \<And>c. P10 c vt_lst\<rbrakk> |
371 and a39: "\<And>string tvars cvars vars b. \<lbrakk>\<And>c. P11 c tvars; \<And>c. P12 c cvars; \<And>c. P10 c vars\<rbrakk> |
372 \<Longrightarrow> P9 b (K string tvtk_lst tvck_lst vt_lst)" |
372 \<Longrightarrow> P9 b (K string tvars cvars vars)" |
373 and a40: "\<And>b. P10 b VTNil" |
373 and a40: "\<And>b. P10 b VsNil" |
374 and a41: "\<And>var ty vt_lst b. \<lbrakk>\<And>c. P3 c ty; \<And>c. P10 c vt_lst\<rbrakk> \<Longrightarrow> P10 b (VTCons var ty vt_lst)" |
374 and a41: "\<And>var ty vars b. \<lbrakk>\<And>c. P3 c ty; \<And>c. P10 c vars\<rbrakk> \<Longrightarrow> P10 b (VsCons var ty vars)" |
375 and a42: "\<And>b. P11 b TVTKNil" |
375 and a42: "\<And>b. P11 b TvsNil" |
376 and a43: "\<And>tvar tkind tvtk_lst b. \<lbrakk>\<And>c. P1 c tkind; \<And>c. P11 c tvtk_lst\<rbrakk> |
376 and a43: "\<And>tvar tkind tvars b. \<lbrakk>\<And>c. P1 c tkind; \<And>c. P11 c tvars\<rbrakk> |
377 \<Longrightarrow> P11 b (TVTKCons tvar tkind tvtk_lst)" |
377 \<Longrightarrow> P11 b (TvsCons tvar tkind tvars)" |
378 and a44: "\<And>b. P12 b TVCKNil" |
378 and a44: "\<And>b. P12 b CvsNil" |
379 and a45: "\<And>tvar ckind tvck_lst b. \<lbrakk>\<And>c. P2 c ckind; \<And>c. P12 c tvck_lst\<rbrakk> |
379 and a45: "\<And>tvar ckind cvars b. \<lbrakk>\<And>c. P2 c ckind; \<And>c. P12 c cvars\<rbrakk> |
380 \<Longrightarrow> P12 b (TVCKCons tvar ckind tvck_lst)" |
380 \<Longrightarrow> P12 b (CvsCons tvar ckind cvars)" |
381 shows "P1 (a :: 'a :: pt) tkind \<and> |
381 shows "P1 (a :: 'a :: pt) tkind \<and> |
382 P2 (b :: 'b :: pt) ckind \<and> |
382 P2 (b :: 'b :: pt) ckind \<and> |
383 P3 (c :: 'c :: {pt,fs}) ty \<and> |
383 P3 (c :: 'c :: {pt,fs}) ty \<and> |
384 P4 (d :: 'd :: pt) ty_lst \<and> |
384 P4 (d :: 'd :: pt) ty_lst \<and> |
385 P5 (e :: 'e :: {pt,fs}) co \<and> |
385 P5 (e :: 'e :: {pt,fs}) co \<and> |
386 P6 (f :: 'f :: pt) co_lst \<and> |
386 P6 (f :: 'f :: pt) co_lst \<and> |
387 P7 (g :: 'g :: {pt,fs}) trm \<and> |
387 P7 (g :: 'g :: {pt,fs}) trm \<and> |
388 P8 (h :: 'h :: {pt,fs}) assoc_lst \<and> |
388 P8 (h :: 'h :: {pt,fs}) assoc_lst \<and> |
389 P9 (i :: 'i :: pt) pat \<and> |
389 P9 (i :: 'i :: pt) pat \<and> |
390 P10 (j :: 'j :: pt) vt_lst \<and> |
390 P10 (j :: 'j :: pt) vars \<and> |
391 P11 (k :: 'k :: pt) tvtk_lst \<and> |
391 P11 (k :: 'k :: pt) tvars \<and> |
392 P12 (l :: 'l :: pt) tvck_lst" |
392 P12 (l :: 'l :: pt) cvars" |
393 proof - |
393 proof - |
394 have a1: "(\<forall>p a. P1 a (p \<bullet> tkind))" and "(\<forall>p b. P2 b (p \<bullet> ckind))" and "(\<forall>p c. P3 c (p \<bullet> ty))" and "(\<forall>p d. P4 d (p \<bullet> ty_lst))" and "(\<forall>p e. P5 e (p \<bullet> co))" and " (\<forall>p f. P6 f (p \<bullet> co_lst))" and "(\<forall>p g. P7 g (p \<bullet> trm))" and "(\<forall>p h. P8 h (p \<bullet> assoc_lst))" and a1:"(\<forall>p q i. P9 i (permute_bv p (q \<bullet> pat)))" and a2:"(\<forall>p q j. P10 j (permute_bv_vt q (p \<bullet> vt_lst)))" and a3:"(\<forall>p q k. P11 k ( permute_bv_tvtk q (p \<bullet> tvtk_lst)))" and a4:"(\<forall>p q l. P12 l (permute_bv_tvck q (p \<bullet> tvck_lst)))" |
394 have a1: "(\<forall>p a. P1 a (p \<bullet> tkind))" and "(\<forall>p b. P2 b (p \<bullet> ckind))" and "(\<forall>p c. P3 c (p \<bullet> ty))" and "(\<forall>p d. P4 d (p \<bullet> ty_lst))" and "(\<forall>p e. P5 e (p \<bullet> co))" and " (\<forall>p f. P6 f (p \<bullet> co_lst))" and "(\<forall>p g. P7 g (p \<bullet> trm))" and "(\<forall>p h. P8 h (p \<bullet> assoc_lst))" and a1:"(\<forall>p q i. P9 i (permute_bv p (q \<bullet> pat)))" and a2:"(\<forall>p q j. P10 j (permute_bv_vs q (p \<bullet> vars)))" and a3:"(\<forall>p q k. P11 k ( permute_bv_tvs q (p \<bullet> tvars)))" and a4:"(\<forall>p q l. P12 l (permute_bv_cvs q (p \<bullet> cvars)))" |
395 apply (induct rule: tkind_ckind_ty_ty_lst_co_co_lst_trm_assoc_lst_pat_vt_lst_tvtk_lst_tvck_lst.inducts) |
395 apply (induct rule: tkind_ckind_ty_ty_lst_co_co_lst_trm_assoc_lst_pat_vars_tvars_cvars.inducts) |
396 apply (tactic {* ALLGOALS (REPEAT o rtac allI) *}) |
396 apply (tactic {* ALLGOALS (REPEAT o rtac allI) *}) |
397 apply (tactic {* ALLGOALS (TRY o SOLVED' (simp_tac @{simpset} THEN_ALL_NEW resolve_tac @{thms assms} THEN_ALL_NEW asm_full_simp_tac @{simpset})) *}) |
397 apply (tactic {* ALLGOALS (TRY o SOLVED' (simp_tac @{simpset} THEN_ALL_NEW resolve_tac @{thms assms} THEN_ALL_NEW asm_full_simp_tac @{simpset})) *}) |
398 |
398 |
399 (* GOAL1 *) |
399 (* GOAL1 *) |
400 apply(subgoal_tac "\<exists>pa. ((pa \<bullet> (atom (p \<bullet> tvar))) \<sharp> c \<and> |
400 apply(subgoal_tac "\<exists>pa. ((pa \<bullet> (atom (p \<bullet> tvar))) \<sharp> c \<and> |