author | wenzelm |
Sat, 08 Apr 2006 22:51:06 +0200 | |
changeset 19363 | 667b5ea637dd |
parent 19086 | 1b3780be6cc2 |
child 19380 | b808efaa5828 |
permissions | -rw-r--r-- |
1269 | 1 |
(* Title: HOL/Lambda/Lambda.thy |
1120 | 2 |
ID: $Id$ |
3 |
Author: Tobias Nipkow |
|
4 |
Copyright 1995 TU Muenchen |
|
5 |
*) |
|
6 |
||
9811
39ffdb8cab03
HOL/Lambda: converted into new-style theory and document;
wenzelm
parents:
6453
diff
changeset
|
7 |
header {* Basic definitions of Lambda-calculus *} |
39ffdb8cab03
HOL/Lambda: converted into new-style theory and document;
wenzelm
parents:
6453
diff
changeset
|
8 |
|
16417 | 9 |
theory Lambda imports Main begin |
9811
39ffdb8cab03
HOL/Lambda: converted into new-style theory and document;
wenzelm
parents:
6453
diff
changeset
|
10 |
|
1120 | 11 |
|
9811
39ffdb8cab03
HOL/Lambda: converted into new-style theory and document;
wenzelm
parents:
6453
diff
changeset
|
12 |
subsection {* Lambda-terms in de Bruijn notation and substitution *} |
39ffdb8cab03
HOL/Lambda: converted into new-style theory and document;
wenzelm
parents:
6453
diff
changeset
|
13 |
|
39ffdb8cab03
HOL/Lambda: converted into new-style theory and document;
wenzelm
parents:
6453
diff
changeset
|
14 |
datatype dB = |
39ffdb8cab03
HOL/Lambda: converted into new-style theory and document;
wenzelm
parents:
6453
diff
changeset
|
15 |
Var nat |
12011 | 16 |
| App dB dB (infixl "\<degree>" 200) |
9811
39ffdb8cab03
HOL/Lambda: converted into new-style theory and document;
wenzelm
parents:
6453
diff
changeset
|
17 |
| Abs dB |
1120 | 18 |
|
19 |
consts |
|
9811
39ffdb8cab03
HOL/Lambda: converted into new-style theory and document;
wenzelm
parents:
6453
diff
changeset
|
20 |
subst :: "[dB, dB, nat] => dB" ("_[_'/_]" [300, 0, 0] 300) |
39ffdb8cab03
HOL/Lambda: converted into new-style theory and document;
wenzelm
parents:
6453
diff
changeset
|
21 |
lift :: "[dB, nat] => dB" |
1153 | 22 |
|
5184 | 23 |
primrec |
9811
39ffdb8cab03
HOL/Lambda: converted into new-style theory and document;
wenzelm
parents:
6453
diff
changeset
|
24 |
"lift (Var i) k = (if i < k then Var i else Var (i + 1))" |
12011 | 25 |
"lift (s \<degree> t) k = lift s k \<degree> lift t k" |
9811
39ffdb8cab03
HOL/Lambda: converted into new-style theory and document;
wenzelm
parents:
6453
diff
changeset
|
26 |
"lift (Abs s) k = Abs (lift s (k + 1))" |
39ffdb8cab03
HOL/Lambda: converted into new-style theory and document;
wenzelm
parents:
6453
diff
changeset
|
27 |
|
39ffdb8cab03
HOL/Lambda: converted into new-style theory and document;
wenzelm
parents:
6453
diff
changeset
|
28 |
primrec (* FIXME base names *) |
39ffdb8cab03
HOL/Lambda: converted into new-style theory and document;
wenzelm
parents:
6453
diff
changeset
|
29 |
subst_Var: "(Var i)[s/k] = |
39ffdb8cab03
HOL/Lambda: converted into new-style theory and document;
wenzelm
parents:
6453
diff
changeset
|
30 |
(if k < i then Var (i - 1) else if i = k then s else Var i)" |
12011 | 31 |
subst_App: "(t \<degree> u)[s/k] = t[s/k] \<degree> u[s/k]" |
9811
39ffdb8cab03
HOL/Lambda: converted into new-style theory and document;
wenzelm
parents:
6453
diff
changeset
|
32 |
subst_Abs: "(Abs t)[s/k] = Abs (t[lift s 0 / k+1])" |
39ffdb8cab03
HOL/Lambda: converted into new-style theory and document;
wenzelm
parents:
6453
diff
changeset
|
33 |
|
39ffdb8cab03
HOL/Lambda: converted into new-style theory and document;
wenzelm
parents:
6453
diff
changeset
|
34 |
declare subst_Var [simp del] |
39ffdb8cab03
HOL/Lambda: converted into new-style theory and document;
wenzelm
parents:
6453
diff
changeset
|
35 |
|
39ffdb8cab03
HOL/Lambda: converted into new-style theory and document;
wenzelm
parents:
6453
diff
changeset
|
36 |
text {* Optimized versions of @{term subst} and @{term lift}. *} |
39ffdb8cab03
HOL/Lambda: converted into new-style theory and document;
wenzelm
parents:
6453
diff
changeset
|
37 |
|
39ffdb8cab03
HOL/Lambda: converted into new-style theory and document;
wenzelm
parents:
6453
diff
changeset
|
38 |
consts |
39ffdb8cab03
HOL/Lambda: converted into new-style theory and document;
wenzelm
parents:
6453
diff
changeset
|
39 |
substn :: "[dB, dB, nat] => dB" |
39ffdb8cab03
HOL/Lambda: converted into new-style theory and document;
wenzelm
parents:
6453
diff
changeset
|
40 |
liftn :: "[nat, dB, nat] => dB" |
39ffdb8cab03
HOL/Lambda: converted into new-style theory and document;
wenzelm
parents:
6453
diff
changeset
|
41 |
|
39ffdb8cab03
HOL/Lambda: converted into new-style theory and document;
wenzelm
parents:
6453
diff
changeset
|
42 |
primrec |
39ffdb8cab03
HOL/Lambda: converted into new-style theory and document;
wenzelm
parents:
6453
diff
changeset
|
43 |
"liftn n (Var i) k = (if i < k then Var i else Var (i + n))" |
12011 | 44 |
"liftn n (s \<degree> t) k = liftn n s k \<degree> liftn n t k" |
9811
39ffdb8cab03
HOL/Lambda: converted into new-style theory and document;
wenzelm
parents:
6453
diff
changeset
|
45 |
"liftn n (Abs s) k = Abs (liftn n s (k + 1))" |
1120 | 46 |
|
5184 | 47 |
primrec |
9811
39ffdb8cab03
HOL/Lambda: converted into new-style theory and document;
wenzelm
parents:
6453
diff
changeset
|
48 |
"substn (Var i) s k = |
39ffdb8cab03
HOL/Lambda: converted into new-style theory and document;
wenzelm
parents:
6453
diff
changeset
|
49 |
(if k < i then Var (i - 1) else if i = k then liftn k s 0 else Var i)" |
12011 | 50 |
"substn (t \<degree> u) s k = substn t s k \<degree> substn u s k" |
9811
39ffdb8cab03
HOL/Lambda: converted into new-style theory and document;
wenzelm
parents:
6453
diff
changeset
|
51 |
"substn (Abs t) s k = Abs (substn t s (k + 1))" |
1120 | 52 |
|
9811
39ffdb8cab03
HOL/Lambda: converted into new-style theory and document;
wenzelm
parents:
6453
diff
changeset
|
53 |
|
39ffdb8cab03
HOL/Lambda: converted into new-style theory and document;
wenzelm
parents:
6453
diff
changeset
|
54 |
subsection {* Beta-reduction *} |
1153 | 55 |
|
9811
39ffdb8cab03
HOL/Lambda: converted into new-style theory and document;
wenzelm
parents:
6453
diff
changeset
|
56 |
consts |
39ffdb8cab03
HOL/Lambda: converted into new-style theory and document;
wenzelm
parents:
6453
diff
changeset
|
57 |
beta :: "(dB \<times> dB) set" |
1120 | 58 |
|
19363 | 59 |
abbreviation |
19086 | 60 |
beta_red :: "[dB, dB] => bool" (infixl "->" 50) |
19363 | 61 |
"s -> t == (s, t) \<in> beta" |
19086 | 62 |
beta_reds :: "[dB, dB] => bool" (infixl "->>" 50) |
19363 | 63 |
"s ->> t == (s, t) \<in> beta^*" |
19086 | 64 |
|
19363 | 65 |
abbreviation (latex) |
19086 | 66 |
beta_red :: "[dB, dB] => bool" (infixl "\<rightarrow>\<^sub>\<beta>" 50) |
19363 | 67 |
"op \<rightarrow>\<^sub>\<beta> == op ->" |
19086 | 68 |
beta_reds :: "[dB, dB] => bool" (infixl "\<rightarrow>\<^sub>\<beta>\<^sup>*" 50) |
19363 | 69 |
"op \<rightarrow>\<^sub>\<beta>\<^sup>* == op ->>" |
1120 | 70 |
|
1789 | 71 |
inductive beta |
11638 | 72 |
intros |
14065 | 73 |
beta [simp, intro!]: "Abs s \<degree> t \<rightarrow>\<^sub>\<beta> s[t/0]" |
74 |
appL [simp, intro!]: "s \<rightarrow>\<^sub>\<beta> t ==> s \<degree> u \<rightarrow>\<^sub>\<beta> t \<degree> u" |
|
75 |
appR [simp, intro!]: "s \<rightarrow>\<^sub>\<beta> t ==> u \<degree> s \<rightarrow>\<^sub>\<beta> u \<degree> t" |
|
76 |
abs [simp, intro!]: "s \<rightarrow>\<^sub>\<beta> t ==> Abs s \<rightarrow>\<^sub>\<beta> Abs t" |
|
9811
39ffdb8cab03
HOL/Lambda: converted into new-style theory and document;
wenzelm
parents:
6453
diff
changeset
|
77 |
|
39ffdb8cab03
HOL/Lambda: converted into new-style theory and document;
wenzelm
parents:
6453
diff
changeset
|
78 |
inductive_cases beta_cases [elim!]: |
14065 | 79 |
"Var i \<rightarrow>\<^sub>\<beta> t" |
80 |
"Abs r \<rightarrow>\<^sub>\<beta> s" |
|
81 |
"s \<degree> t \<rightarrow>\<^sub>\<beta> u" |
|
9811
39ffdb8cab03
HOL/Lambda: converted into new-style theory and document;
wenzelm
parents:
6453
diff
changeset
|
82 |
|
39ffdb8cab03
HOL/Lambda: converted into new-style theory and document;
wenzelm
parents:
6453
diff
changeset
|
83 |
declare if_not_P [simp] not_less_eq [simp] |
39ffdb8cab03
HOL/Lambda: converted into new-style theory and document;
wenzelm
parents:
6453
diff
changeset
|
84 |
-- {* don't add @{text "r_into_rtrancl[intro!]"} *} |
39ffdb8cab03
HOL/Lambda: converted into new-style theory and document;
wenzelm
parents:
6453
diff
changeset
|
85 |
|
39ffdb8cab03
HOL/Lambda: converted into new-style theory and document;
wenzelm
parents:
6453
diff
changeset
|
86 |
|
39ffdb8cab03
HOL/Lambda: converted into new-style theory and document;
wenzelm
parents:
6453
diff
changeset
|
87 |
subsection {* Congruence rules *} |
39ffdb8cab03
HOL/Lambda: converted into new-style theory and document;
wenzelm
parents:
6453
diff
changeset
|
88 |
|
39ffdb8cab03
HOL/Lambda: converted into new-style theory and document;
wenzelm
parents:
6453
diff
changeset
|
89 |
lemma rtrancl_beta_Abs [intro!]: |
14065 | 90 |
"s \<rightarrow>\<^sub>\<beta>\<^sup>* s' ==> Abs s \<rightarrow>\<^sub>\<beta>\<^sup>* Abs s'" |
18241 | 91 |
by (induct set: rtrancl) (blast intro: rtrancl_into_rtrancl)+ |
9811
39ffdb8cab03
HOL/Lambda: converted into new-style theory and document;
wenzelm
parents:
6453
diff
changeset
|
92 |
|
39ffdb8cab03
HOL/Lambda: converted into new-style theory and document;
wenzelm
parents:
6453
diff
changeset
|
93 |
lemma rtrancl_beta_AppL: |
14065 | 94 |
"s \<rightarrow>\<^sub>\<beta>\<^sup>* s' ==> s \<degree> t \<rightarrow>\<^sub>\<beta>\<^sup>* s' \<degree> t" |
18241 | 95 |
by (induct set: rtrancl) (blast intro: rtrancl_into_rtrancl)+ |
9811
39ffdb8cab03
HOL/Lambda: converted into new-style theory and document;
wenzelm
parents:
6453
diff
changeset
|
96 |
|
39ffdb8cab03
HOL/Lambda: converted into new-style theory and document;
wenzelm
parents:
6453
diff
changeset
|
97 |
lemma rtrancl_beta_AppR: |
14065 | 98 |
"t \<rightarrow>\<^sub>\<beta>\<^sup>* t' ==> s \<degree> t \<rightarrow>\<^sub>\<beta>\<^sup>* s \<degree> t'" |
18241 | 99 |
by (induct set: rtrancl) (blast intro: rtrancl_into_rtrancl)+ |
9811
39ffdb8cab03
HOL/Lambda: converted into new-style theory and document;
wenzelm
parents:
6453
diff
changeset
|
100 |
|
39ffdb8cab03
HOL/Lambda: converted into new-style theory and document;
wenzelm
parents:
6453
diff
changeset
|
101 |
lemma rtrancl_beta_App [intro]: |
14065 | 102 |
"[| s \<rightarrow>\<^sub>\<beta>\<^sup>* s'; t \<rightarrow>\<^sub>\<beta>\<^sup>* t' |] ==> s \<degree> t \<rightarrow>\<^sub>\<beta>\<^sup>* s' \<degree> t'" |
9811
39ffdb8cab03
HOL/Lambda: converted into new-style theory and document;
wenzelm
parents:
6453
diff
changeset
|
103 |
apply (blast intro!: rtrancl_beta_AppL rtrancl_beta_AppR |
39ffdb8cab03
HOL/Lambda: converted into new-style theory and document;
wenzelm
parents:
6453
diff
changeset
|
104 |
intro: rtrancl_trans) |
39ffdb8cab03
HOL/Lambda: converted into new-style theory and document;
wenzelm
parents:
6453
diff
changeset
|
105 |
done |
39ffdb8cab03
HOL/Lambda: converted into new-style theory and document;
wenzelm
parents:
6453
diff
changeset
|
106 |
|
39ffdb8cab03
HOL/Lambda: converted into new-style theory and document;
wenzelm
parents:
6453
diff
changeset
|
107 |
|
39ffdb8cab03
HOL/Lambda: converted into new-style theory and document;
wenzelm
parents:
6453
diff
changeset
|
108 |
subsection {* Substitution-lemmas *} |
39ffdb8cab03
HOL/Lambda: converted into new-style theory and document;
wenzelm
parents:
6453
diff
changeset
|
109 |
|
39ffdb8cab03
HOL/Lambda: converted into new-style theory and document;
wenzelm
parents:
6453
diff
changeset
|
110 |
lemma subst_eq [simp]: "(Var k)[u/k] = u" |
18241 | 111 |
by (simp add: subst_Var) |
9811
39ffdb8cab03
HOL/Lambda: converted into new-style theory and document;
wenzelm
parents:
6453
diff
changeset
|
112 |
|
39ffdb8cab03
HOL/Lambda: converted into new-style theory and document;
wenzelm
parents:
6453
diff
changeset
|
113 |
lemma subst_gt [simp]: "i < j ==> (Var j)[u/i] = Var (j - 1)" |
18241 | 114 |
by (simp add: subst_Var) |
9811
39ffdb8cab03
HOL/Lambda: converted into new-style theory and document;
wenzelm
parents:
6453
diff
changeset
|
115 |
|
39ffdb8cab03
HOL/Lambda: converted into new-style theory and document;
wenzelm
parents:
6453
diff
changeset
|
116 |
lemma subst_lt [simp]: "j < i ==> (Var j)[u/i] = Var j" |
18241 | 117 |
by (simp add: subst_Var) |
9811
39ffdb8cab03
HOL/Lambda: converted into new-style theory and document;
wenzelm
parents:
6453
diff
changeset
|
118 |
|
18241 | 119 |
lemma lift_lift: |
120 |
"i < k + 1 \<Longrightarrow> lift (lift t i) (Suc k) = lift (lift t k) i" |
|
121 |
by (induct t fixing: i k) auto |
|
9811
39ffdb8cab03
HOL/Lambda: converted into new-style theory and document;
wenzelm
parents:
6453
diff
changeset
|
122 |
|
39ffdb8cab03
HOL/Lambda: converted into new-style theory and document;
wenzelm
parents:
6453
diff
changeset
|
123 |
lemma lift_subst [simp]: |
18241 | 124 |
"j < i + 1 \<Longrightarrow> lift (t[s/j]) i = (lift t (i + 1)) [lift s i / j]" |
125 |
by (induct t fixing: i j s) |
|
126 |
(simp_all add: diff_Suc subst_Var lift_lift split: nat.split) |
|
9811
39ffdb8cab03
HOL/Lambda: converted into new-style theory and document;
wenzelm
parents:
6453
diff
changeset
|
127 |
|
39ffdb8cab03
HOL/Lambda: converted into new-style theory and document;
wenzelm
parents:
6453
diff
changeset
|
128 |
lemma lift_subst_lt: |
18241 | 129 |
"i < j + 1 \<Longrightarrow> lift (t[s/j]) i = (lift t i) [lift s i / j + 1]" |
130 |
by (induct t fixing: i j s) (simp_all add: subst_Var lift_lift) |
|
9811
39ffdb8cab03
HOL/Lambda: converted into new-style theory and document;
wenzelm
parents:
6453
diff
changeset
|
131 |
|
39ffdb8cab03
HOL/Lambda: converted into new-style theory and document;
wenzelm
parents:
6453
diff
changeset
|
132 |
lemma subst_lift [simp]: |
18241 | 133 |
"(lift t k)[s/k] = t" |
134 |
by (induct t fixing: k s) simp_all |
|
9811
39ffdb8cab03
HOL/Lambda: converted into new-style theory and document;
wenzelm
parents:
6453
diff
changeset
|
135 |
|
18241 | 136 |
lemma subst_subst: |
137 |
"i < j + 1 \<Longrightarrow> t[lift v i / Suc j][u[v/j]/i] = t[u/i][v/j]" |
|
138 |
by (induct t fixing: i j u v) |
|
139 |
(simp_all add: diff_Suc subst_Var lift_lift [symmetric] lift_subst_lt |
|
9811
39ffdb8cab03
HOL/Lambda: converted into new-style theory and document;
wenzelm
parents:
6453
diff
changeset
|
140 |
split: nat.split) |
39ffdb8cab03
HOL/Lambda: converted into new-style theory and document;
wenzelm
parents:
6453
diff
changeset
|
141 |
|
39ffdb8cab03
HOL/Lambda: converted into new-style theory and document;
wenzelm
parents:
6453
diff
changeset
|
142 |
|
39ffdb8cab03
HOL/Lambda: converted into new-style theory and document;
wenzelm
parents:
6453
diff
changeset
|
143 |
subsection {* Equivalence proof for optimized substitution *} |
39ffdb8cab03
HOL/Lambda: converted into new-style theory and document;
wenzelm
parents:
6453
diff
changeset
|
144 |
|
18241 | 145 |
lemma liftn_0 [simp]: "liftn 0 t k = t" |
146 |
by (induct t fixing: k) (simp_all add: subst_Var) |
|
9811
39ffdb8cab03
HOL/Lambda: converted into new-style theory and document;
wenzelm
parents:
6453
diff
changeset
|
147 |
|
18241 | 148 |
lemma liftn_lift [simp]: "liftn (Suc n) t k = lift (liftn n t k) k" |
149 |
by (induct t fixing: k) (simp_all add: subst_Var) |
|
9811
39ffdb8cab03
HOL/Lambda: converted into new-style theory and document;
wenzelm
parents:
6453
diff
changeset
|
150 |
|
18241 | 151 |
lemma substn_subst_n [simp]: "substn t s n = t[liftn n s 0 / n]" |
152 |
by (induct t fixing: n) (simp_all add: subst_Var) |
|
9811
39ffdb8cab03
HOL/Lambda: converted into new-style theory and document;
wenzelm
parents:
6453
diff
changeset
|
153 |
|
39ffdb8cab03
HOL/Lambda: converted into new-style theory and document;
wenzelm
parents:
6453
diff
changeset
|
154 |
theorem substn_subst_0: "substn t s 0 = t[s/0]" |
18241 | 155 |
by simp |
9811
39ffdb8cab03
HOL/Lambda: converted into new-style theory and document;
wenzelm
parents:
6453
diff
changeset
|
156 |
|
39ffdb8cab03
HOL/Lambda: converted into new-style theory and document;
wenzelm
parents:
6453
diff
changeset
|
157 |
|
39ffdb8cab03
HOL/Lambda: converted into new-style theory and document;
wenzelm
parents:
6453
diff
changeset
|
158 |
subsection {* Preservation theorems *} |
39ffdb8cab03
HOL/Lambda: converted into new-style theory and document;
wenzelm
parents:
6453
diff
changeset
|
159 |
|
39ffdb8cab03
HOL/Lambda: converted into new-style theory and document;
wenzelm
parents:
6453
diff
changeset
|
160 |
text {* Not used in Church-Rosser proof, but in Strong |
39ffdb8cab03
HOL/Lambda: converted into new-style theory and document;
wenzelm
parents:
6453
diff
changeset
|
161 |
Normalization. \medskip *} |
39ffdb8cab03
HOL/Lambda: converted into new-style theory and document;
wenzelm
parents:
6453
diff
changeset
|
162 |
|
13915
28ccb51bd2f3
Eliminated most occurrences of rule_format attribute.
berghofe
parents:
13187
diff
changeset
|
163 |
theorem subst_preserves_beta [simp]: |
18257 | 164 |
"r \<rightarrow>\<^sub>\<beta> s ==> r[t/i] \<rightarrow>\<^sub>\<beta> s[t/i]" |
165 |
by (induct fixing: t i set: beta) (simp_all add: subst_subst [symmetric]) |
|
9811
39ffdb8cab03
HOL/Lambda: converted into new-style theory and document;
wenzelm
parents:
6453
diff
changeset
|
166 |
|
14065 | 167 |
theorem subst_preserves_beta': "r \<rightarrow>\<^sub>\<beta>\<^sup>* s ==> r[t/i] \<rightarrow>\<^sub>\<beta>\<^sup>* s[t/i]" |
18241 | 168 |
apply (induct set: rtrancl) |
169 |
apply (rule rtrancl_refl) |
|
14065 | 170 |
apply (erule rtrancl_into_rtrancl) |
171 |
apply (erule subst_preserves_beta) |
|
172 |
done |
|
173 |
||
13915
28ccb51bd2f3
Eliminated most occurrences of rule_format attribute.
berghofe
parents:
13187
diff
changeset
|
174 |
theorem lift_preserves_beta [simp]: |
18257 | 175 |
"r \<rightarrow>\<^sub>\<beta> s ==> lift r i \<rightarrow>\<^sub>\<beta> lift s i" |
176 |
by (induct fixing: i set: beta) auto |
|
9811
39ffdb8cab03
HOL/Lambda: converted into new-style theory and document;
wenzelm
parents:
6453
diff
changeset
|
177 |
|
14065 | 178 |
theorem lift_preserves_beta': "r \<rightarrow>\<^sub>\<beta>\<^sup>* s ==> lift r i \<rightarrow>\<^sub>\<beta>\<^sup>* lift s i" |
18241 | 179 |
apply (induct set: rtrancl) |
180 |
apply (rule rtrancl_refl) |
|
14065 | 181 |
apply (erule rtrancl_into_rtrancl) |
182 |
apply (erule lift_preserves_beta) |
|
183 |
done |
|
184 |
||
18241 | 185 |
theorem subst_preserves_beta2 [simp]: "r \<rightarrow>\<^sub>\<beta> s ==> t[r/i] \<rightarrow>\<^sub>\<beta>\<^sup>* t[s/i]" |
186 |
apply (induct t fixing: r s i) |
|
9811
39ffdb8cab03
HOL/Lambda: converted into new-style theory and document;
wenzelm
parents:
6453
diff
changeset
|
187 |
apply (simp add: subst_Var r_into_rtrancl) |
39ffdb8cab03
HOL/Lambda: converted into new-style theory and document;
wenzelm
parents:
6453
diff
changeset
|
188 |
apply (simp add: rtrancl_beta_App) |
39ffdb8cab03
HOL/Lambda: converted into new-style theory and document;
wenzelm
parents:
6453
diff
changeset
|
189 |
apply (simp add: rtrancl_beta_Abs) |
39ffdb8cab03
HOL/Lambda: converted into new-style theory and document;
wenzelm
parents:
6453
diff
changeset
|
190 |
done |
39ffdb8cab03
HOL/Lambda: converted into new-style theory and document;
wenzelm
parents:
6453
diff
changeset
|
191 |
|
14065 | 192 |
theorem subst_preserves_beta2': "r \<rightarrow>\<^sub>\<beta>\<^sup>* s ==> t[r/i] \<rightarrow>\<^sub>\<beta>\<^sup>* t[s/i]" |
18241 | 193 |
apply (induct set: rtrancl) |
194 |
apply (rule rtrancl_refl) |
|
14065 | 195 |
apply (erule rtrancl_trans) |
196 |
apply (erule subst_preserves_beta2) |
|
197 |
done |
|
198 |
||
11638 | 199 |
end |