Skip to content

Commit f71e899

Browse files
author
Andrei Popescu
committed
more
1 parent 0337333 commit f71e899

File tree

2 files changed

+16
-14
lines changed

2 files changed

+16
-14
lines changed

thys/POPLmark/POPLmark_1A.thy

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,20 @@ begin
44

55
(********************* Actual formalization ************************)
66

7+
declare ty.intros[intro]
8+
9+
lemma well_scoped:
10+
assumes "\<Gamma> \<turnstile> S <: T"
11+
shows "S closed_in \<Gamma>" "T closed_in \<Gamma>"
12+
using assms proof (induction \<Gamma> S T rule: ty.induct)
13+
case (SA_Trans_TVar x U \<Gamma> T) {
14+
case 1 then show ?case using SA_Trans_TVar
15+
by (metis fst_conv imageI singletonD subsetI sftypeP.set(1))
16+
next
17+
case 2 then show ?case using SA_Trans_TVar by simp
18+
} qed auto
19+
20+
721
lemma ty_refl: "\<lbrakk>wf \<Gamma> ; T closed_in \<Gamma> \<rbrakk> \<Longrightarrow> \<Gamma> \<turnstile> T <: T"
822
proof (binder_induction T arbitrary: \<Gamma> avoiding: "dom \<Gamma>" rule: sftypeP.strong_induct)
923
case (TVr x \<Gamma>)

thys/POPLmark/SystemFSub.thy

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -93,24 +93,12 @@ and
9393
and
9494
SA_AllEL: "\<Gamma> \<turnstile> \<forall>Z<:S\<^sub>1. S\<^sub>2 <: T "
9595

96+
9697
lemma wf_context: "\<Gamma> \<turnstile> S <: T \<Longrightarrow> wf \<Gamma>"
9798
by (induction \<Gamma> S T rule: ty.induct)
9899

99-
lemma well_scoped:
100-
assumes "\<Gamma> \<turnstile> S <: T"
101-
shows "S closed_in \<Gamma>" "T closed_in \<Gamma>"
102-
using assms proof (induction \<Gamma> S T rule: ty.induct)
103-
case (SA_Trans_TVar x U \<Gamma> T) {
104-
case 1 then show ?case using SA_Trans_TVar
105-
by (metis fst_conv imageI singletonD subsetI sftypeP.set(1))
106-
next
107-
case 2 then show ?case using SA_Trans_TVar by simp
108-
} qed auto
109-
110-
declare ty.intros[intro]
111-
112100
lemma ty_fresh_extend: "\<Gamma>,, x <: U \<turnstile> S <: T \<Longrightarrow> x \<notin> dom \<Gamma> \<union> FFVars_ctxt \<Gamma> \<and> x \<notin> FFVars_sftypeP U"
113-
by (metis (no_types, lifting) UnE fst_conv snd_conv subsetD wf_ConsE wf_FFVars wf_context)
101+
by (metis (no_types, lifting) UnE fst_conv snd_conv subsetD wf_ConsE wf_FFVars wf_context)
114102

115103
make_binder_inductive ty
116104
subgoal for R B \<sigma> \<Gamma> T1 T2

0 commit comments

Comments
 (0)