Skip to content

Commit e21ea04

Browse files
committed
Seperate expession typing and use mutual induction
1 parent 769e697 commit e21ea04

File tree

4 files changed

+117
-144
lines changed

4 files changed

+117
-144
lines changed

Determinancy.thy

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ proof (nominal_induct e avoiding: \<Gamma> \<tau>1 \<tau>2 rule: term.strong_ind
2020
then show ?case using isin_split isin_same(2) by blast
2121
next
2222
case (TyApp e1 \<tau>)
23-
obtain a1 k1 \<sigma>1 where 1: "\<Gamma> \<turnstile> e1 : \<forall> a1:k1. \<sigma>1" "\<tau>1 = \<sigma>1[\<tau>/a1]" by (cases rule: Tm.cases[OF TyApp(2)]) auto
24-
obtain a2 k2 \<sigma>2 where 2: "\<Gamma> \<turnstile> e1 : \<forall> a2:k2. \<sigma>2" "\<tau>2 = \<sigma>2[\<tau>/a2]" by (cases rule: Tm.cases[OF TyApp(3)]) auto
23+
obtain a1 k1 \<sigma>1 where 1: "\<Gamma> \<turnstile> e1 : \<forall> a1:k1. \<sigma>1" "\<tau>1 = \<sigma>1[\<tau>/a1]" by (cases rule: Tm.cases[OF TyApp(2)]) auto
24+
obtain a2 k2 \<sigma>2 where 2: "\<Gamma> \<turnstile> e1 : \<forall> a2:k2. \<sigma>2" "\<tau>2 = \<sigma>2[\<tau>/a2]" by (cases rule: Tm.cases[OF TyApp(3)]) auto
2525
show ?case using TyApp(1)[OF 1(1) 2(1)] subst_type_same 1(2) 2(2) by simp
2626
next
2727
case (Lam x \<tau> e)

Soundness.thy

Lines changed: 74 additions & 78 deletions
Original file line numberDiff line numberDiff line change
@@ -9,23 +9,23 @@ declare term.fv_defs[simp]
99
declare \<tau>.fv_defs[simp]
1010

1111
theorem progress: "[] \<turnstile> e : \<tau> \<Longrightarrow> is_value e \<or> (\<exists>e'. e \<longrightarrow> e')"
12-
proof (induction "[] :: \<Gamma>" e \<tau> rule: Tm_induct)
13-
case (App e1 e2 \<tau>1 \<tau>2)
14-
note IH1 = App(2)
15-
note IH2 = App(4)
12+
proof (induction "[] :: \<Gamma>" e \<tau> rule: Tm.induct)
13+
case (Tm_App e1 \<tau>1 \<tau>2 e2)
14+
note IH1 = Tm_App(2)
15+
note IH2 = Tm_App(4)
1616

1717
from IH1 show ?case
1818
proof (elim disjE)
1919
assume "is_value e1"
2020
from IH2 show ?thesis
2121
proof (elim disjE)
2222
assume "is_value e2"
23-
from \<open>is_value e1\<close> App(1) have "\<exists>x e. e1 = (\<lambda>x:\<tau>1. e)" by (simp add: fun_ty_lam)
23+
from \<open>is_value e1\<close> Tm_App(1) have "\<exists>x e. e1 = (\<lambda>x:\<tau>1. e)" by (simp add: fun_ty_lam)
2424
then have "\<exists>e'. Step (App e1 e2) e'" using \<open>is_value e2\<close> ST_BetaI by blast
2525
then show ?thesis by simp
2626
next
2727
assume "\<exists>e2'. Step e2 e2'"
28-
then show ?thesis using ST_BetaI App.hyps(1) \<open>is_value e1\<close> fun_ty_lam by blast
28+
then show ?thesis using ST_BetaI Tm_App.hyps(1) \<open>is_value e1\<close> fun_ty_lam by blast
2929
qed
3030
next
3131
assume "\<exists>e1'. Step e1 e1'"
@@ -34,15 +34,15 @@ case (App e1 e2 \<tau>1 \<tau>2)
3434
then show ?thesis by blast
3535
qed
3636
next
37-
case (Let e1 e2 \<tau>1 \<tau>2 x)
37+
case (Tm_Let e1 \<tau>1 x e2 \<tau>2)
3838
then show ?case using ST_SubstI by blast
3939
next
40-
case (TApp a k e \<sigma> \<tau>)
41-
from TApp(2) show ?case
40+
case (Tm_TApp e a k \<sigma> \<tau>)
41+
from Tm_TApp(2) show ?case
4242
proof (elim disjE)
4343
assume "is_value e"
44-
then obtain b k e1 where "e = (\<Lambda> b : k . e1)" using TApp.hyps(1) forall_ty_lam by blast
45-
then show ?thesis using Step.ST_BetaTI TApp by blast
44+
then obtain b k e1 where "e = (\<Lambda> b : k . e1)" using Tm_TApp.hyps(1) forall_ty_lam by blast
45+
then show ?thesis using Step.ST_BetaTI Tm_TApp by blast
4646
next
4747
assume "\<exists>e'. Step e e'"
4848
then show ?thesis using ST_AppTI by fast
@@ -153,19 +153,17 @@ lemmas weaken = weaken_isin weaken_ty weaken_tm
153153

154154
lemma strengthen_aux:
155155
assumes "\<turnstile> \<Gamma>"
156-
shows "(\<turnstile> (\<Gamma>' @ BVar x \<tau> # \<Gamma>) \<longrightarrow> \<turnstile> (\<Gamma>' @ \<Gamma>)) \<and> ((\<Gamma>' @ BVar x \<tau> # \<Gamma>) \<turnstile>\<^sub>t\<^sub>y \<sigma> : k \<longrightarrow> (\<Gamma>' @ \<Gamma>) \<turnstile>\<^sub>t\<^sub>y \<sigma> : k)"
157-
proof (rule Ctx_Ty_induct)
158-
fix \<Gamma>' b k2
159-
assume a: "\<turnstile> \<Gamma>' @ BVar x \<tau> # \<Gamma>" "\<turnstile> \<Gamma>' @ \<Gamma>" "atom (b::tyvar) \<sharp> \<Gamma>' @ BVar x \<tau> # \<Gamma>"
160-
show "\<turnstile> (BTyVar b k2 # \<Gamma>') @ \<Gamma>" by (metis Ctx.simps a(2) a(3) append_Cons fresh_Cons fresh_append)
161-
next
162-
fix \<Gamma>' \<tau>' y
163-
assume a: "\<Gamma>' @ BVar x \<tau> # \<Gamma> \<turnstile>\<^sub>t\<^sub>y \<tau>' : \<star>" "\<Gamma>' @ \<Gamma> \<turnstile>\<^sub>t\<^sub>y \<tau>' : \<star>" "atom (y::var) \<sharp> \<Gamma>' @ BVar x \<tau> # \<Gamma>"
164-
show "\<turnstile> (BVar y \<tau>' # \<Gamma>') @ \<Gamma>" by (metis Ctx.simps a(2) a(3) append_Cons fresh_Cons fresh_append)
165-
next
166-
fix \<Gamma>' b k2
167-
assume a: "\<turnstile> \<Gamma>' @ BVar x \<tau> # \<Gamma>" "\<turnstile> \<Gamma>' @ \<Gamma>" "BTyVar b k2 \<in> (\<Gamma>' @ BVar x \<tau> # \<Gamma>)"
168-
show "\<Gamma>' @ \<Gamma> \<turnstile>\<^sub>t\<^sub>y TyVar b : k2" using Ty_Var a isin_superset_tyvar by blast
156+
shows "(\<turnstile> (\<Gamma>' @ BVar x \<tau> # \<Gamma>) \<longrightarrow> \<turnstile> (\<Gamma>' @ \<Gamma>))"
157+
and "((\<Gamma>' @ BVar x \<tau> # \<Gamma>) \<turnstile>\<^sub>t\<^sub>y \<sigma> : k \<longrightarrow> (\<Gamma>' @ \<Gamma>) \<turnstile>\<^sub>t\<^sub>y \<sigma> : k)"
158+
proof (induction rule: Ctx_Ty_induct_split)
159+
case (Ctx_TyVar \<Gamma>' b k2)
160+
then show ?case by (metis Ctx.simps append_Cons fresh_Cons fresh_append)
161+
next
162+
case (Ctx_Var \<Gamma>' \<tau> x)
163+
then show ?case by (metis Ctx.simps append_Cons fresh_Cons fresh_append)
164+
next
165+
case (Ty_Var \<Gamma>' b k2)
166+
then show ?case using Ctx_Ty.Ty_Var isin_superset_tyvar by blast
169167
qed (auto intro: Ty_intros simp: assms)
170168

171169
corollary strengthen_context: "\<turnstile> \<Gamma>' @ BVar x \<tau> # \<Gamma> \<Longrightarrow> \<turnstile> \<Gamma>' @ \<Gamma>"
@@ -176,40 +174,38 @@ lemmas strengthen = strengthen_context strengthen_ty
176174

177175
lemma type_substitution_aux:
178176
assumes "\<Gamma> \<turnstile>\<^sub>t\<^sub>y \<sigma> : k"
179-
shows "(\<turnstile> (\<Gamma>' @ BTyVar a k # \<Gamma>) \<longrightarrow> \<turnstile> (subst_context \<Gamma>' \<sigma> a @ \<Gamma>)) \<and> ((\<Gamma>' @ BTyVar a k # \<Gamma>) \<turnstile>\<^sub>t\<^sub>y \<tau> : k2 \<longrightarrow> (subst_context \<Gamma>' \<sigma> a @ \<Gamma>) \<turnstile>\<^sub>t\<^sub>y subst_type \<tau> \<sigma> a : k2)"
180-
proof (rule Ctx_Ty_induct)
181-
show "\<turnstile> [][\<sigma>/a] @ \<Gamma>" using context_valid(1)[OF assms] by simp
182-
next
183-
fix \<Gamma>' a2 k2
184-
assume a: "\<turnstile> \<Gamma>' @ BTyVar a k # \<Gamma>" "\<turnstile> \<Gamma>'[\<sigma>/a] @ \<Gamma>" "atom (a2::tyvar) \<sharp> \<Gamma>' @ BTyVar a k # \<Gamma>"
185-
then have "atom a2 \<sharp> \<sigma>" using assms fresh_Cons fresh_append fresh_in_context_ty by blast
186-
then have 1: "atom a2 \<sharp> \<Gamma>'[\<sigma>/a] @ \<Gamma>" by (meson a(3) fresh_Cons fresh_append fresh_subst_context_tyvar)
187-
show "\<turnstile> (BTyVar a2 k2 # \<Gamma>')[\<sigma>/a] @ \<Gamma>" using Ctx_TyVar[OF a(2) 1] assms by auto
188-
next
189-
fix \<Gamma>' \<tau> x
190-
assume a: "\<Gamma>' @ BTyVar a k # \<Gamma> \<turnstile>\<^sub>t\<^sub>y \<tau> : \<star>" "\<Gamma>'[\<sigma>/a] @ \<Gamma> \<turnstile>\<^sub>t\<^sub>y \<tau>[\<sigma>/a] : \<star>" "atom (x::var) \<sharp> \<Gamma>' @ BTyVar a k # \<Gamma>"
191-
have 1: "atom x \<sharp> \<Gamma>'[\<sigma>/a] @ \<Gamma>" by (meson a(3) fresh_Cons fresh_append fresh_subst_context_var)
192-
show "\<turnstile> (BVar x \<tau> # \<Gamma>')[\<sigma>/a] @ \<Gamma>" using Ctx_Var[OF a(2) 1] by simp
193-
next
194-
fix \<Gamma>' a2 k2
195-
assume a: "\<turnstile> \<Gamma>' @ BTyVar a k # \<Gamma>" "\<turnstile> \<Gamma>'[\<sigma>/a] @ \<Gamma>" "BTyVar a2 k2 \<in> (\<Gamma>' @ BTyVar a k # \<Gamma>)"
196-
then show "\<Gamma>'[\<sigma>/a] @ \<Gamma> \<turnstile>\<^sub>t\<^sub>y (TyVar a2)[\<sigma>/a] : k2"
197-
proof (cases "a2 = a")
177+
shows "(\<turnstile> (\<Gamma>' @ BTyVar a k # \<Gamma>) \<longrightarrow> \<turnstile> (subst_context \<Gamma>' \<sigma> a @ \<Gamma>))"
178+
and "((\<Gamma>' @ BTyVar a k # \<Gamma>) \<turnstile>\<^sub>t\<^sub>y \<tau> : k2 \<longrightarrow> (subst_context \<Gamma>' \<sigma> a @ \<Gamma>) \<turnstile>\<^sub>t\<^sub>y subst_type \<tau> \<sigma> a : k2)"
179+
proof (induction rule: Ctx_Ty_induct_split)
180+
case Ctx_Empty
181+
then show ?case using context_valid(1)[OF assms] by simp
182+
next
183+
case (Ctx_TyVar \<Gamma>' b k2)
184+
then have "atom b \<sharp> \<sigma>" using assms fresh_Cons fresh_append fresh_in_context_ty by blast
185+
then have 1: "atom b \<sharp> \<Gamma>'[\<sigma>/a] @ \<Gamma>" by (meson Ctx_TyVar(3) fresh_Cons fresh_append fresh_subst_context_tyvar)
186+
show ?case using Ctx_Ty.Ctx_TyVar[OF Ctx_TyVar(2) 1] assms by auto
187+
next
188+
case (Ctx_Var \<Gamma>' \<tau> x)
189+
have 1: "atom x \<sharp> \<Gamma>'[\<sigma>/a] @ \<Gamma>" by (meson Ctx_Var(3) fresh_Cons fresh_append fresh_subst_context_var)
190+
show "\<turnstile> (BVar x \<tau> # \<Gamma>')[\<sigma>/a] @ \<Gamma>" using Ctx_Ty.Ctx_Var[OF Ctx_Var(2) 1] by simp
191+
next
192+
case (Ty_Var \<Gamma>' b k2)
193+
then show ?case
194+
proof (cases "b = a")
198195
case True
199-
then have "k = k2" using isin_same(1) a by blast
200-
then have "\<Gamma> \<turnstile>\<^sub>t\<^sub>y (TyVar a2)[\<sigma>/a] : k2" using True assms(1) by simp
201-
then show ?thesis using weaken_ty[of "[]"] a(2) by auto
196+
then have "k = k2" using isin_same(1) Ty_Var by blast
197+
then have "\<Gamma> \<turnstile>\<^sub>t\<^sub>y (TyVar b)[\<sigma>/a] : k2" using True assms(1) by simp
198+
then show ?thesis using weaken_ty[of "[]"] Ty_Var(2) by auto
202199
next
203200
case False
204-
have 1: "BTyVar a2 k2 \<in> (\<Gamma>'[\<sigma>/a] @ \<Gamma>)" by (rule isin_subst_tyvar[OF a(3,1) False])
205-
show ?thesis using Ty_Var[OF a(2) 1] False by simp
201+
have 1: "BTyVar b k2 \<in> (\<Gamma>'[\<sigma>/a] @ \<Gamma>)" by (rule isin_subst_tyvar[OF Ty_Var(3,1) False])
202+
show ?thesis using Ctx_Ty.Ty_Var[OF Ty_Var(2) 1] False by simp
206203
qed
207204
next
208-
fix b k2 \<Gamma>' \<sigma>'
209-
assume a: "(BTyVar b k2 # \<Gamma>' @ BTyVar a k # \<Gamma>) \<turnstile>\<^sub>t\<^sub>y \<sigma>' : \<star>" "(BTyVar b k2 # \<Gamma>')[\<sigma>/a] @ \<Gamma> \<turnstile>\<^sub>t\<^sub>y \<sigma>'[\<sigma>/a] : \<star>"
210-
have 1: "a \<noteq> b" by (metis CtxE(1) a(1) binder.fresh(2) context_valid_ty fresh_Cons fresh_append fresh_at_base(2))
211-
then have 2: "BTyVar b k2 # \<Gamma>'[\<sigma>/a] @ \<Gamma> \<turnstile>\<^sub>t\<^sub>y \<sigma>'[\<sigma>/a] : \<star>" using a(2) by simp
212-
show "\<Gamma>'[\<sigma>/a] @ \<Gamma> \<turnstile>\<^sub>t\<^sub>y (\<forall> b : k2 . \<sigma>')[\<sigma>/a] : \<star>" using Ty_Forall[OF 2]
205+
case (Ty_Forall b k2 \<Gamma>' \<sigma>')
206+
have 1: "a \<noteq> b" by (metis CtxE(1) Ty_Forall(1) binder.fresh(2) context_valid_ty fresh_Cons fresh_append fresh_at_base(2))
207+
then have 2: "BTyVar b k2 # \<Gamma>'[\<sigma>/a] @ \<Gamma> \<turnstile>\<^sub>t\<^sub>y \<sigma>'[\<sigma>/a] : \<star>" using Ty_Forall(2) by simp
208+
show "\<Gamma>'[\<sigma>/a] @ \<Gamma> \<turnstile>\<^sub>t\<^sub>y (\<forall> b : k2 . \<sigma>')[\<sigma>/a] : \<star>" using Ctx_Ty.Ty_Forall[OF 2]
213209
by (metis "1" "2" CtxE(1) assms atom_eq_iff context_valid_ty fresh_Pair fresh_append fresh_at_base(2) fresh_in_context_ty subst_type.simps(5))
214210
qed (auto intro: Ty_intros)
215211

@@ -219,23 +215,23 @@ corollary type_substitution_ty: "\<lbrakk> \<Gamma>' @ BTyVar a k # \<Gamma> \<t
219215
using type_substitution_aux by blast
220216

221217
lemma typing_regularity: "\<Gamma> \<turnstile> e : \<tau> \<Longrightarrow> \<Gamma> \<turnstile>\<^sub>t\<^sub>y \<tau> : \<star>"
222-
proof (induction \<Gamma> e \<tau> rule: Tm_induct)
223-
case (Var \<Gamma> x \<tau>)
218+
proof (induction \<Gamma> e \<tau> rule: Tm.induct)
219+
case (Tm_Var \<Gamma> x \<tau>)
224220
then obtain \<Gamma>1 \<Gamma>2 where 1: "\<Gamma> = \<Gamma>1 @ BVar x \<tau> # \<Gamma>2" using isin_split by blast
225-
then have "\<Gamma>2 \<turnstile>\<^sub>t\<^sub>y \<tau> : \<star>" using context_regularity Var(1) by blast
226-
then show ?case using weaken_ty[of "[]" \<Gamma>2 \<tau> \<star> "\<Gamma>1 @ [BVar x \<tau>]"] Var(1) 1 by simp
221+
then have "\<Gamma>2 \<turnstile>\<^sub>t\<^sub>y \<tau> : \<star>" using context_regularity Tm_Var(1) by blast
222+
then show ?case using weaken_ty[of "[]" \<Gamma>2 \<tau> \<star> "\<Gamma>1 @ [BVar x \<tau>]"] Tm_Var(1) 1 by simp
227223
next
228-
case (Abs \<Gamma> x \<tau>1 e \<tau>2)
229-
have 1: "\<Gamma> \<turnstile>\<^sub>t\<^sub>y \<tau>1 : \<star>" using context_regularity context_valid(1)[OF Abs(2)] by blast
230-
have 2: "\<Gamma> \<turnstile>\<^sub>t\<^sub>y \<tau>2 : \<star>" using strengthen_ty[of "[]"] Abs(2) by force
224+
case (Tm_Abs x \<tau>1 \<Gamma> e \<tau>2)
225+
have 1: "\<Gamma> \<turnstile>\<^sub>t\<^sub>y \<tau>1 : \<star>" using context_regularity context_valid(1)[OF Tm_Abs(2)] by blast
226+
have 2: "\<Gamma> \<turnstile>\<^sub>t\<^sub>y \<tau>2 : \<star>" using strengthen_ty[of "[]"] Tm_Abs(2) by force
231227
show ?case by (rule Ty_FunArrow[OF 1 2])
232228
next
233-
case (TApp \<Gamma> a k e \<sigma> \<tau>)
234-
obtain a' \<sigma>' where P: "(\<forall> a:k. \<sigma>) = (\<forall> a':k. \<sigma>')" "BTyVar a' k # \<Gamma> \<turnstile>\<^sub>t\<^sub>y \<sigma>' : \<star>" by (cases rule: Ty.cases[OF TApp(3)]) auto
235-
have "\<Gamma> \<turnstile>\<^sub>t\<^sub>y \<sigma>'[\<tau>/a'] : \<star>" using type_substitution_ty[of "[]", OF _ TApp(2)] P by auto
229+
case (Tm_TApp \<Gamma> e a k \<sigma> \<tau>)
230+
obtain a' \<sigma>' where P: "(\<forall> a:k. \<sigma>) = (\<forall> a':k. \<sigma>')" "BTyVar a' k # \<Gamma> \<turnstile>\<^sub>t\<^sub>y \<sigma>' : \<star>" by (cases rule: Ty.cases[OF Tm_TApp(3)]) auto
231+
have "\<Gamma> \<turnstile>\<^sub>t\<^sub>y \<sigma>'[\<tau>/a'] : \<star>" using type_substitution_ty[of "[]", OF _ Tm_TApp(2)] P by auto
236232
then show ?case using P(1) subst_type_same by auto
237233
next
238-
case (Let \<Gamma> e1 e2 \<tau>1 \<tau>2 x)
234+
case (Tm_Let \<Gamma> e1 \<tau>1 x e2 \<tau>2)
239235
then show ?case using strengthen_ty[of "[]"] by force
240236
qed (auto intro: Ty_intros)
241237

@@ -356,27 +352,27 @@ theorem preservation:
356352
fixes e e'::"term"
357353
assumes "[] \<turnstile> e : \<tau>" "e \<longrightarrow> e'"
358354
shows "[] \<turnstile> e' : \<tau>"
359-
using assms beta_nf_def value_beta_nf proof (nominal_induct "[]::\<Gamma>" e \<tau> arbitrary: e' rule: Tm_strong_induct)
360-
case (App e1 e2 \<tau>1 \<tau>2)
361-
from App(5) show ?case
355+
using assms beta_nf_def value_beta_nf proof (nominal_induct "[]::\<Gamma>" e \<tau> arbitrary: e' rule: Tm.strong_induct)
356+
case (Tm_App e1 \<tau>1 \<tau>2 e2)
357+
from Tm_App(5) show ?case
362358
proof cases
363359
case (ST_BetaI x \<tau> e)
364-
then show ?thesis by (metis App.hyps(1) App.hyps(3) T_Abs_Inv \<tau>.eq_iff(3) append_Nil fresh_Nil substitution)
360+
then show ?thesis by (metis Tm_App.hyps(1,3) T_Abs_Inv \<tau>.eq_iff(3) append_Nil fresh_Nil substitution)
365361
next
366362
case (ST_AppI e2')
367-
then show ?thesis using App.hyps(2,3,6) Tm_App value_beta_nf by blast
363+
then show ?thesis using Tm_App.hyps(2,3,6) Tm.Tm_App value_beta_nf by blast
368364
qed
369365
next
370-
case (TApp a k e \<sigma> \<tau>)
371-
from TApp(4) show ?case
366+
case (Tm_TApp e a k \<sigma> \<tau>)
367+
from Tm_TApp(4) show ?case
372368
proof cases
373369
case (ST_BetaTI b k2 e2)
374370
obtain c::tyvar where "atom c \<sharp> (a, b, e2, \<sigma>)" using obtain_fresh by blast
375371
then have c: "atom c \<sharp> a" "atom c \<sharp> b" "atom c \<sharp> e2" "atom c \<sharp> \<sigma>" by auto
376372
obtain \<sigma>2 where c1: "(\<forall> a:k. \<sigma>) = (\<forall> c:k. \<sigma>2)" using Abs_lst_rename[OF c(4)] by auto
377-
have same: "k = k2" using TApp(1) forall_ty_lam ST_BetaTI(1) by fastforce
373+
have same: "k = k2" using Tm_TApp(1) forall_ty_lam ST_BetaTI(1) by fastforce
378374
obtain e2' where c2: "(\<Lambda> b:k2. e2) = (\<Lambda> c:k. e2')" using Abs_lst_rename[OF c(3)] same by auto
379-
have 1: "[] \<turnstile> (\<Lambda> c:k. e2') : \<forall> c:k. \<sigma>2" using TApp(1) ST_BetaTI(1) c2 c1 by simp
375+
have 1: "[] \<turnstile> (\<Lambda> c:k. e2') : \<forall> c:k. \<sigma>2" using Tm_TApp(1) ST_BetaTI(1) c2 c1 by simp
380376
have 2: "[BTyVar c k] \<turnstile> e2' : \<sigma>2"
381377
proof (cases rule: Tm.cases[OF 1])
382378
case (4 d _ _ e \<sigma>)
@@ -386,18 +382,18 @@ next
386382
by (metis "1" Abs1_eq_iff(3) T_AbsT_Inv \<tau>.eq_iff(5) fresh_Nil fresh_in_context_ty typing_regularity)
387383
qed auto
388384
then show ?thesis
389-
by (metis TApp.hyps(3) \<tau>.eq_iff(5) append_Nil c1 c2 local.ST_BetaTI(2) subst_context.simps(1) subst_term_type_same subst_type_same term.eq_iff(6) type_substitution(3))
385+
by (metis Tm_TApp.hyps(3) \<tau>.eq_iff(5) append_Nil c1 c2 local.ST_BetaTI(2) subst_context.simps(1) subst_term_type_same subst_type_same term.eq_iff(6) type_substitution(3))
390386
next
391387
case (ST_AppTI e2)
392-
then show ?thesis using TApp(2,3) Tm_TApp beta_nf_def value_beta_nf by blast
388+
then show ?thesis using Tm_TApp(2,3) Tm.Tm_TApp beta_nf_def value_beta_nf by blast
393389
qed
394390
next
395-
case (Let e1 e2 \<tau>1 \<tau>2 x)
396-
from Let(4) show ?case
391+
case (Tm_Let e1 \<tau>1 x e2 \<tau>2)
392+
from Tm_Let(4) show ?case
397393
proof cases
398394
case (ST_SubstI x e2)
399395
then show ?thesis
400-
by (metis Let.hyps(1,3,4) Step.ST_SubstI Step_deterministic append.left_neutral substitution)
396+
by (metis Tm_Let.hyps(1,3,4) Step.ST_SubstI Step_deterministic append.left_neutral substitution)
401397
qed
402398
qed auto
403399

0 commit comments

Comments
 (0)