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
obtainc::tyvarwhereP:"atom c \<sharp> (a, e, a', e', ctor_type_forall_sumC e, ctor_type_forall_sumC e')"by(ruleobtain_fresh)
120
+
thenhavec:"atom c \<sharp> a""atom c \<sharp> e""atom c \<sharp> a'""atom c \<sharp> e'""atom c \<sharp> ctor_type_forall_sumC e""atom c \<sharp> ctor_type_forall_sumC e'"byauto
121
+
have1:"(a \<leftrightarrow> c) \<bullet> e = (a' \<leftrightarrow> c) \<bullet> e'"usingAbs_lst_rename_bothc(1-4)18(5)byauto
122
+
thenhave2:"(a \<leftrightarrow> c) \<bullet> ctor_type_forall_sumC e = (a' \<leftrightarrow> c) \<bullet> ctor_type_forall_sumC e'"using18(1,2)eqvt_at_defbymetis
123
+
thenhave3:"ctor_type_forall_sumC e = None \<longleftrightarrow> ctor_type_forall_sumC e' = None"usingpermute_eq_iffbyfastforce
124
+
thenshow?case
125
+
proof(cases"ctor_type_forall_sumC e")
126
+
case(Somet)
127
+
thenobtainTswhereP1:"t = (T, s)"byfastforce
128
+
fromSomeobtainT's'whereP2:"ctor_type_forall_sumC e' = Some (T', s')"using3byauto
havesame:"(a \<leftrightarrow> c) \<bullet> s = (a' \<leftrightarrow> c) \<bullet> s'"using"2"P1P2Somebyauto
131
+
havex:"a \<in> set s \<longleftrightarrow> a' \<in> set s'"by(metisflip_at_simps(2)mem_permute_iffpermute_flip_cancelsameset_eqvt)
132
+
have4:"atom c \<sharp> s"usingc(5)SomeP1fresh_Somefresh_Pairbymetis
133
+
have5:"atom c \<sharp> s'"usingc(6)SomeP2fresh_Somefresh_Pairbymetis
134
+
have6:"atom a \<sharp> filter (\<lambda>x. x \<noteq> a) s""atom a' \<sharp> filter (\<lambda>x. x \<noteq> a') s'""atom c \<sharp> filter (\<lambda>x. x \<noteq> a) s""atom c \<sharp> filter (\<lambda>x. x \<noteq> a') s'"using45fresh_filterbyauto
135
+
have8:"filter (\<lambda>x. x \<noteq> a) s = (a \<leftrightarrow> c) \<bullet> filter (\<lambda>x. x \<noteq> a) s"using6flip_fresh_freshbymetis
136
+
alsohave"... = filter (\<lambda>x. x \<noteq> c) ((a \<leftrightarrow> c) \<bullet> s)"byauto
137
+
alsohave"... = filter (\<lambda>x. x \<noteq> c) ((a' \<leftrightarrow> c) \<bullet> s')"usingsamebyargo
138
+
alsohave"... = (a' \<leftrightarrow> c) \<bullet> filter (\<lambda>x. x \<noteq> a') s'"bysimp
139
+
alsohave"... = filter (\<lambda>x. x \<noteq> a') s'"using6flip_fresh_freshbyblast
140
+
finallyhave9:"Some (T, filter (\<lambda>x. x \<noteq> a) s) = Some (T', filter (\<lambda>x. x \<noteq> a') s')"using\<open>T = T'\<close>byblast
141
+
thenshow?thesisusingSomeP1P2xbysimp
142
+
qedsimp
143
+
qedauto
144
+
nominal_termination(eqvt)bylexicographic_order
145
+
146
+
(* This function checks if a type has the form \<forall>[a:k]. [\<tau>] \<rightarrow> T [a] *)
0 commit comments