You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
(\<nexists>x e. MatchVar x e \<in> set_alt_list alts) \<longrightarrow>
207
-
(\<forall>D \<tau> ks.
208
-
(AxCtor D \<tau> \<in> set \<Delta> \<and> ctor_type \<tau> = Some (T, ks)) \<longrightarrow>
209
-
(\<exists>tys vals e. MatchCtor D tys vals e \<in> set_alt_list alts)
210
-
)"
212
+
"exhaustive alts \<Delta> T \<equiv> \<forall>D \<tau> ks. (AxCtor D \<tau> \<in> set \<Delta> \<and> ctor_type \<tau> = Some (T, ks)) \<longrightarrow> (\<exists>tys vals e. MatchCtor D tys vals e |\<in>| set_alts alts)"
211
213
212
214
nominal_functionzip_with::"('a::pt \<Rightarrow> 'b::pt \<Rightarrow> 'c::pt) \<Rightarrow> 'a list \<Rightarrow> 'b list \<Rightarrow> 'c list"where
213
215
"zip_with _ [] _ = []"
214
216
|"zip_with _ _ [] = []"
215
217
|"zip_with f (a#as) (b#bs) = f a b # zip_with f as bs"
|"subst_alt_list (ACons alt alts) e x = ACons (subst_alt alt e x) (subst_alt_list alts e x)"
263
270
264
-
|"atom y \<sharp> (e, x) \<Longrightarrow> subst_alt (MatchVar y t) e x = MatchVar y (subst_term t e x)"
265
271
|"set (map atom tys @ map atom vals) \<sharp>* (e, x) \<Longrightarrow> subst_alt (MatchCtor D tys vals t) e x = MatchCtor D tys vals (subst_term t e x)"
266
272
proof(goal_cases)
267
273
@@ -308,31 +314,26 @@ proof (goal_cases)
308
314
next
309
315
case(Inrc)
310
316
thenobtainmeywhere"c = (m, e, y)"by(metisprod.exhaust)
have"(\<Lambda> y : k . subst_term e2 e x) = (\<Lambda> y' : k' . subst_term e2' e' x')"usingAbs_sumC[OF61(5,6)eqvt_at_term[OF61(1)]eqvt_at_term[OF61(2)]]61(7)byfastforce
323
+
case(49yex\<tau>e2y'e'x'\<tau>'e2')
324
+
have"(\<lambda> y : \<tau> . subst_term e2 e x) = (\<lambda> y' : \<tau>' . subst_term e2' e' x')"usingAbs_sumC[OF49(5,6)eqvt_at_term[OF49(1)]eqvt_at_term[OF49(2)]]49(7)byfastforce
have"Let y \<tau> (subst_term e1 e x) (subst_term e2 e x) = Let y' \<tau>' (subst_term e1' e' x') (subst_term e2' e' x')"usingAbs_sumC[OF67(9,10)eqvt_at_term[OF67(2)]eqvt_at_term[OF67(4)]]67(11)byfastforce
327
+
case(55yexke2y'e'x'k'e2')
328
+
have"(\<Lambda> y : k . subst_term e2 e x) = (\<Lambda> y' : k' . subst_term e2' e' x')"usingAbs_sumC[OF55(5,6)eqvt_at_term[OF55(1)]eqvt_at_term[OF55(2)]]55(7)byfastforce
have"MatchVar y (subst_term t e x) = MatchVar y' (subst_term t' e' x')"usingAbs_sumC[OF79(5,6)eqvt_at_term[OF79(1)]eqvt_at_term[OF79(2)]]79(7)byfastforce
331
+
case(60yex\<tau>e1e2y'e'x'\<tau>'e1'e2')
332
+
have"Let y \<tau> (subst_term e1 e x) (subst_term e2 e x) = Let y' \<tau>' (subst_term e1' e' x') (subst_term e2' e' x')"usingAbs_sumC[OF60(9,10)eqvt_at_term[OF60(2)]eqvt_at_term[OF60(4)]]60(11)byfastforce
have"MatchCtor D tys vals (subst_term t e x) = MatchCtor D' tys' vals' (subst_term t' e' x')"usingAbs_sumC_star[OF81(5,6)eqvt_at_term[OF81(1)]eqvt_at_term[OF81(2)]]81(7)byfastforce
335
+
case(69tysvalsexDttys'vals'e'x'D't')
336
+
have"MatchCtor D tys vals (subst_term t e x) = MatchCtor D' tys' vals' (subst_term t' e' x')"usingAbs_sumC_star[OF69(5,6)eqvt_at_term[OF69(1)]eqvt_at_term[OF69(2)]]69(7)byfastforce
|"subst_alt_list_type (ACons alt alts) \<tau> a = ACons (subst_alt_type alt \<tau> a) (subst_alt_list_type alts \<tau> a)"
375
376
376
-
|"atom y \<sharp> (\<tau>, a) \<Longrightarrow> subst_alt_type (MatchVar y e) \<tau> a = MatchVar y (subst_term_type e \<tau> a)"
377
377
|"set (map atom tys @ map atom vals) \<sharp>* (\<tau>, a) \<Longrightarrow> subst_alt_type (MatchCtor D tys vals e) \<tau> a = MatchCtor D tys vals (subst_term_type e \<tau> a)"
378
378
proofgoal_cases
379
379
@@ -420,31 +420,26 @@ proof goal_cases
420
420
next
421
421
case(Inrc)
422
422
thenobtainmeywhereP:"c = (m, e, y)"by(metisprod.exhaust)
have"(\<Lambda> b : k . subst_term_type e2 \<tau> a) = (\<Lambda> b' : k' . subst_term_type e2' \<tau>' a')"usingAbs_sumC[OF61(5,6)eqvt_at_term[OF61(1)]eqvt_at_term[OF61(2)]]61(7)byfastforce
432
+
case(55b\<tau>ake2b'\<tau>'a'k'e2')
433
+
have"(\<Lambda> b : k . subst_term_type e2 \<tau> a) = (\<Lambda> b' : k' . subst_term_type e2' \<tau>' a')"usingAbs_sumC[OF55(5,6)eqvt_at_term[OF55(1)]eqvt_at_term[OF55(2)]]55(7)byfastforce
have"MatchVar y (subst_term_type e \<tau> a) = MatchVar y' (subst_term_type e' \<tau>' a')"usingAbs_sumC[OF79(5,6)eqvt_at_term[OF79(1)]eqvt_at_term[OF79(2)]]79(7)byfastforce
have"MatchCtor D tys vals (subst_term_type e \<tau> a) = MatchCtor D' tys' vals' (subst_term_type e' \<tau>' a')"usingAbs_sumC_star[OF81(5,6)eqvt_at_term[OF81(1)]eqvt_at_term[OF81(2)]]81(7)byfastforce
441
+
case(69tysvals\<tau>aDetys'vals'\<tau>'a'D'e')
442
+
have"MatchCtor D tys vals (subst_term_type e \<tau> a) = MatchCtor D' tys' vals' (subst_term_type e' \<tau>' a')"usingAbs_sumC_star[OF69(5,6)eqvt_at_term[OF69(1)]eqvt_at_term[OF69(2)]]69(7)byfastforce
|"ctor_args (TyApp (TyApp (TyForall a k e) \<tau>1) \<tau>2) = (if ctor_data_app_subst (TyApp (TyApp (TyForall a k e) \<tau>1) \<tau>2) then Some [] else None)"
28
+
|"ctor_args (TyApp (TyVar a) \<tau>2) = (if ctor_data_app_subst (TyApp (TyVar a) \<tau>2) then Some [] else None)"
29
+
|"ctor_args (TyApp (TyData T) \<tau>2) = (if ctor_data_app_subst (TyApp (TyData T) \<tau>2) then Some [] else None)"
30
+
|"ctor_args (TyApp TyArrow \<tau>2) = (if ctor_data_app_subst (TyApp TyArrow \<tau>2) then Some [] else None)"
31
+
|"ctor_args (TyApp (TyForall a k e) \<tau>2) = (if ctor_data_app_subst (TyApp (TyForall a k e) \<tau>2) then Some [] else None)"
Copy file name to clipboardExpand all lines: Nominal2_Lemmas.thy
+5Lines changed: 5 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -102,4 +102,9 @@ lemma Projr_permute: "\<exists>y. f = Inr y \<Longrightarrow> p \<bullet> projr
102
102
lemmapair3_eqvt[simp]:"(a \<leftrightarrow> b) \<bullet> (x, y, z) = ((a \<leftrightarrow> b) \<bullet> x, (a \<leftrightarrow> b) \<bullet> y, (a \<leftrightarrow> b) \<bullet> z)"
103
103
by(simpsplit:prod.splits)
104
104
105
+
lemmaeqvt_fBall[eqvt]:"p \<bullet> fBall s f = fBall (p \<bullet> s) (p \<bullet> f)"
0 commit comments