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
lemmaty_permute:"\<lbrakk> \<Gamma> \<turnstile> S <: T ; wf \<Delta> ; set \<Gamma> = set \<Delta> \<rbrakk> \<Longrightarrow> \<Delta> \<turnstile> S <: T"
lemmaweaken_closed:"\<lbrakk> S closed_in \<Gamma> ; \<Gamma> \<bottom> \<Delta> \<rbrakk> \<Longrightarrow> S closed_in \<Gamma>,,\<Delta>"
47
+
lemmaweaken_closed:"\<lbrakk> FFVars_sftypeP S \<subseteq> dom \<Gamma> ; \<Gamma> \<bottom> \<Delta> \<rbrakk> \<Longrightarrow> FFVars_sftypeP S \<subseteq> dom (\<Gamma>,,\<Delta>)"
lemmawf_insert:"\<lbrakk> wf (\<Gamma>,,\<Delta>); x \<notin> dom \<Gamma> ; x \<notin> dom \<Delta> ; T closed_in \<Gamma> \<rbrakk> \<Longrightarrow> wf (\<Gamma>,,x<:T,,\<Delta>)"
57
+
lemmawf_insert:"\<lbrakk> wf (\<Gamma>,,\<Delta>); x \<notin> dom \<Gamma> ; x \<notin> dom \<Delta> ; FFVars_sftypeP T \<subseteq> dom \<Gamma> \<rbrakk> \<Longrightarrow> wf (\<Gamma>,,x<:T,,\<Delta>)"
43
58
by(induction\<Delta>)auto
44
59
45
60
lemmaty_weakening:
@@ -50,7 +65,8 @@ using assms proof (binder_induction \<Gamma> S T avoiding: "dom \<Delta>" \<Gamm
corollaryty_weakening_extend:"\<lbrakk> \<Gamma> \<turnstile> S <: T ; X \<notin> dom \<Gamma> ; Q closed_in \<Gamma> \<rbrakk> \<Longrightarrow> \<Gamma>,,X<:Q \<turnstile> S <: T"
79
+
corollaryty_weakening_extend:"\<lbrakk> \<Gamma> \<turnstile> S <: T ; X \<notin> dom \<Gamma> ; FFVars_sftypeP Q \<subseteq> dom \<Gamma> \<rbrakk> \<Longrightarrow> \<Gamma>,,X<:Q \<turnstile> S <: T"
assumes"\<Gamma> \<turnstile> S <: \<forall>X<:T\<^sub>1. T\<^sub>2""X \<notin> dom \<Gamma>"
122
-
andTyVar:"\<And>\<Gamma> x U. \<lbrakk> x<:U \<in> \<Gamma> ; \<Gamma> \<turnstile> U <: \<forall> X <: T\<^sub>1 . T\<^sub>2 ; R \<Gamma> U (\<forall>X<:T\<^sub>1. T\<^sub>2) \<rbrakk> \<Longrightarrow> R \<Gamma> (TyVar x) (\<forall> X <: T\<^sub>1 . T\<^sub>2)"
136
+
andTVr:"\<And>\<Gamma> x U. \<lbrakk> x<:U \<in> \<Gamma> ; \<Gamma> \<turnstile> U <: \<forall> X <: T\<^sub>1 . T\<^sub>2 ; R \<Gamma> U (\<forall>X<:T\<^sub>1. T\<^sub>2) \<rbrakk> \<Longrightarrow> R \<Gamma> (TVr x) (\<forall> X <: T\<^sub>1 . T\<^sub>2)"
lemmaty_transitivity:"\<lbrakk> \<Gamma> \<turnstile> S <: Q ; \<Gamma> \<turnstile> Q <: T \<rbrakk> \<Longrightarrow> \<Gamma> \<turnstile> S <: T"
157
171
andty_narrowing:"\<lbrakk> (\<Gamma> ,, X <: Q),, \<Delta> \<turnstile> M <: N ; \<Gamma> \<turnstile> R <: Q \<rbrakk> \<Longrightarrow> (\<Gamma>,, X <: R),, \<Delta> \<turnstile> M <: N"
158
172
proof-
159
173
have
160
174
ty_trans:"\<lbrakk> \<Gamma> \<turnstile> S <: Q ; \<Gamma> \<turnstile> Q <: T \<rbrakk> \<Longrightarrow> \<Gamma> \<turnstile> S <: T"
161
175
andty_narrow:"\<lbrakk> (\<Gamma>,, X <: Q),, \<Delta> \<turnstile> M <: N ; \<Gamma> \<turnstile> R <: Q ; wf (\<Gamma>,, X <: R,, \<Delta>) ;
162
-
M closed_in (\<Gamma>,, X <: R,, \<Delta>) ; N closed_in (\<Gamma>,, X <: R,, \<Delta>) \<rbrakk> \<Longrightarrow> (\<Gamma>,, X <: R),, \<Delta> \<turnstile> M <: N"
FFVars_sftypeP M \<subseteq> dom (\<Gamma>,, X <: R,, \<Delta>) ; FFVars_sftypeP N \<subseteq> dom (\<Gamma>,, X <: R,, \<Delta>) \<rbrakk> \<Longrightarrow> (\<Gamma>,, X <: R),, \<Delta> \<turnstile> M <: N"
havex:"U closed_in (\<Gamma>,, X <: R,, \<Delta>')"usingSA_Trans_TVar(2)well_scoped(1)byfastforce
290
+
havex:"FFVars_sftypeP U \<subseteq> dom (\<Gamma>,, X <: R,, \<Delta>')"usingSA_Trans_TVar(2)well_scoped(1)byfastforce
277
291
show?thesis
278
292
apply(rulety.SA_Trans_TVar)
279
293
usingSA_Trans_TVarFalsexbyauto
@@ -326,7 +340,7 @@ proof -
326
340
proof(cases"Y = Z")
327
341
caseTrue
328
342
thenhaveu:"U = \<forall> X <: Q\<^sub>1 . Q\<^sub>2"usingSA_Trans_TVar(1,2)context_determwf_contextbyblast
329
-
have"\<forall> X <: Q\<^sub>1 . Q\<^sub>2 closed_in \<Gamma>,, Z <: R,, \<Delta>'"usingSA_Trans_TVar(2)Trueuwell_scoped(1)byfastforce
343
+
have"FFVars_sftypeP (\<forall> X <: Q\<^sub>1 . Q\<^sub>2) \<subseteq> dom (\<Gamma>,, Z <: R,, \<Delta>')"usingSA_Trans_TVar(2)Trueuwell_scoped(1)byfastforce
330
344
thenhave"\<Gamma>,, Z <: R,, \<Delta>' \<turnstile> \<forall> X <: Q\<^sub>1 . Q\<^sub>2 <: T"usingSA_Trans_TVarTrueubyauto
331
345
moreoverhave"\<Gamma>,, Z <: R,, \<Delta>' \<turnstile> R <: \<forall> X <: Q\<^sub>1 . Q\<^sub>2"usingty_weakening[OFty_weakening_extend[OFSA_Trans_TVar(4)]]
332
346
by(metisSA_Trans_TVar(5)Truewf_ConsEwf_concatD)
@@ -394,10 +408,10 @@ proof -
394
408
qed
395
409
396
410
theoremty_transitivity2:"\<lbrakk> \<Gamma> \<turnstile> S <: Q ; \<Gamma> \<turnstile> Q <: T \<rbrakk> \<Longrightarrow> \<Gamma> \<turnstile> S <: T"
corollaryty_narrowing2:"\<lbrakk> \<Gamma>,, X <: Q,, \<Delta> \<turnstile> M <: N ; \<Gamma> \<turnstile> R <: Q \<rbrakk> \<Longrightarrow> \<Gamma>,, X <: R,, \<Delta> \<turnstile> M <: N"
0 commit comments