author | wenzelm |
Tue, 16 Aug 2005 13:42:40 +0200 | |
changeset 17069 | ee08b2466a09 |
parent 16917 | 1fe50b19daba |
child 17585 | f12d7ac88eb4 |
permissions | -rw-r--r-- |
2640 | 1 |
(* Title: HOLCF/Fix.thy |
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
2 |
ID: $Id$ |
1479 | 3 |
Author: Franz Regensburger |
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
4 |
|
16070
4a83dd540b88
removed LICENCE note -- everything is subject to Isabelle licence as
wenzelm
parents:
16056
diff
changeset
|
5 |
Definitions for fixed point operator and admissibility. |
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
6 |
*) |
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
7 |
|
15577 | 8 |
header {* Fixed point operator and admissibility *} |
9 |
||
10 |
theory Fix |
|
16056
32c3b7188c28
Moved admissibility definitions and lemmas to a separate theory
huffman
parents:
16006
diff
changeset
|
11 |
imports Cfun Cprod Adm |
15577 | 12 |
begin |
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
13 |
|
16082 | 14 |
defaultsort pcpo |
15 |
||
16005 | 16 |
subsection {* Definitions *} |
17 |
||
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
18 |
consts |
16214 | 19 |
iterate :: "nat \<Rightarrow> ('a \<rightarrow> 'a) \<Rightarrow> 'a \<Rightarrow> 'a" |
20 |
Ifix :: "('a \<rightarrow> 'a) \<Rightarrow> 'a" |
|
21 |
"fix" :: "('a \<rightarrow> 'a) \<rightarrow> 'a" |
|
22 |
admw :: "('a \<Rightarrow> bool) \<Rightarrow> bool" |
|
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
23 |
|
5192 | 24 |
primrec |
15576
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
14981
diff
changeset
|
25 |
iterate_0: "iterate 0 F x = x" |
16214 | 26 |
iterate_Suc: "iterate (Suc n) F x = F\<cdot>(iterate n F x)" |
5192 | 27 |
|
1168
74be52691d62
The curried version of HOLCF is now just called HOLCF. The old
regensbu
parents:
1150
diff
changeset
|
28 |
defs |
16214 | 29 |
Ifix_def: "Ifix \<equiv> \<lambda>F. \<Squnion>i. iterate i F \<bottom>" |
30 |
fix_def: "fix \<equiv> \<Lambda> F. Ifix F" |
|
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
31 |
|
16917 | 32 |
admw_def: "admw P \<equiv> \<forall>F. (\<forall>n. P (iterate n F \<bottom>)) \<longrightarrow> |
33 |
P (\<Squnion>i. iterate i F \<bottom>)" |
|
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
34 |
|
16005 | 35 |
subsection {* Binder syntax for @{term fix} *} |
15857 | 36 |
|
37 |
syntax |
|
38 |
"@FIX" :: "('a => 'a) => 'a" (binder "FIX " 10) |
|
39 |
"@FIXP" :: "[patterns, 'a] => 'a" ("(3FIX <_>./ _)" [0, 10] 10) |
|
40 |
||
41 |
syntax (xsymbols) |
|
42 |
"FIX " :: "[idt, 'a] => 'a" ("(3\<mu>_./ _)" [0, 10] 10) |
|
43 |
"@FIXP" :: "[patterns, 'a] => 'a" ("(3\<mu>()<_>./ _)" [0, 10] 10) |
|
44 |
||
45 |
translations |
|
46 |
"FIX x. LAM y. t" == "fix\<cdot>(LAM x y. t)" |
|
47 |
"FIX x. t" == "fix\<cdot>(LAM x. t)" |
|
48 |
"FIX <xs>. t" == "fix\<cdot>(LAM <xs>. t)" |
|
49 |
||
16005 | 50 |
subsection {* Properties of @{term iterate} and @{term fix} *} |
51 |
||
15637
d2a06007ebfa
changed comments to text blocks, cleaned up a few proofs
huffman
parents:
15577
diff
changeset
|
52 |
text {* derive inductive properties of iterate from primitive recursion *} |
15576
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
14981
diff
changeset
|
53 |
|
16214 | 54 |
lemma iterate_Suc2: "iterate (Suc n) F x = iterate n F (F\<cdot>x)" |
55 |
by (induct_tac n, auto) |
|
15576
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
14981
diff
changeset
|
56 |
|
15637
d2a06007ebfa
changed comments to text blocks, cleaned up a few proofs
huffman
parents:
15577
diff
changeset
|
57 |
text {* |
d2a06007ebfa
changed comments to text blocks, cleaned up a few proofs
huffman
parents:
15577
diff
changeset
|
58 |
The sequence of function iterations is a chain. |
d2a06007ebfa
changed comments to text blocks, cleaned up a few proofs
huffman
parents:
15577
diff
changeset
|
59 |
This property is essential since monotonicity of iterate makes no sense. |
d2a06007ebfa
changed comments to text blocks, cleaned up a few proofs
huffman
parents:
15577
diff
changeset
|
60 |
*} |
15576
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
14981
diff
changeset
|
61 |
|
16214 | 62 |
lemma chain_iterate2: "x \<sqsubseteq> F\<cdot>x \<Longrightarrow> chain (\<lambda>i. iterate i F x)" |
63 |
by (rule chainI, induct_tac i, auto elim: monofun_cfun_arg) |
|
15576
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
14981
diff
changeset
|
64 |
|
16214 | 65 |
lemma chain_iterate: "chain (\<lambda>i. iterate i F \<bottom>)" |
16005 | 66 |
by (rule chain_iterate2 [OF minimal]) |
15576
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
14981
diff
changeset
|
67 |
|
15637
d2a06007ebfa
changed comments to text blocks, cleaned up a few proofs
huffman
parents:
15577
diff
changeset
|
68 |
text {* |
d2a06007ebfa
changed comments to text blocks, cleaned up a few proofs
huffman
parents:
15577
diff
changeset
|
69 |
Kleene's fixed point theorems for continuous functions in pointed |
d2a06007ebfa
changed comments to text blocks, cleaned up a few proofs
huffman
parents:
15577
diff
changeset
|
70 |
omega cpo's |
d2a06007ebfa
changed comments to text blocks, cleaned up a few proofs
huffman
parents:
15577
diff
changeset
|
71 |
*} |
15576
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
14981
diff
changeset
|
72 |
|
16214 | 73 |
lemma Ifix_eq: "Ifix F = F\<cdot>(Ifix F)" |
15576
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
14981
diff
changeset
|
74 |
apply (unfold Ifix_def) |
16005 | 75 |
apply (subst lub_range_shift [of _ 1, symmetric]) |
76 |
apply (rule chain_iterate) |
|
15576
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
14981
diff
changeset
|
77 |
apply (subst contlub_cfun_arg) |
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
14981
diff
changeset
|
78 |
apply (rule chain_iterate) |
16005 | 79 |
apply simp |
15576
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
14981
diff
changeset
|
80 |
done |
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
14981
diff
changeset
|
81 |
|
16214 | 82 |
lemma Ifix_least: "F\<cdot>x = x \<Longrightarrow> Ifix F \<sqsubseteq> x" |
15576
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
14981
diff
changeset
|
83 |
apply (unfold Ifix_def) |
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
14981
diff
changeset
|
84 |
apply (rule is_lub_thelub) |
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
14981
diff
changeset
|
85 |
apply (rule chain_iterate) |
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
14981
diff
changeset
|
86 |
apply (rule ub_rangeI) |
16005 | 87 |
apply (induct_tac i) |
88 |
apply simp |
|
89 |
apply simp |
|
16214 | 90 |
apply (erule subst) |
91 |
apply (erule monofun_cfun_arg) |
|
15576
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
14981
diff
changeset
|
92 |
done |
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
14981
diff
changeset
|
93 |
|
16214 | 94 |
text {* continuity of @{term iterate} *} |
15576
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
14981
diff
changeset
|
95 |
|
16214 | 96 |
lemma cont_iterate1: "cont (\<lambda>F. iterate n F x)" |
97 |
by (induct_tac n, simp_all) |
|
15576
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
14981
diff
changeset
|
98 |
|
16214 | 99 |
lemma cont_iterate2: "cont (\<lambda>x. iterate n F x)" |
100 |
by (induct_tac n, simp_all) |
|
15576
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
14981
diff
changeset
|
101 |
|
16214 | 102 |
lemma cont_iterate: "cont (iterate n)" |
16388
1ff571813848
renamed theorem cont2cont_CF1L_rev2 to cont2cont_lambda
huffman
parents:
16214
diff
changeset
|
103 |
by (rule cont_iterate1 [THEN cont2cont_lambda]) |
15576
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
14981
diff
changeset
|
104 |
|
16214 | 105 |
lemmas monofun_iterate2 = cont_iterate2 [THEN cont2mono, standard] |
106 |
lemmas contlub_iterate2 = cont_iterate2 [THEN cont2contlub, standard] |
|
107 |
||
108 |
text {* continuity of @{term Ifix} *} |
|
15576
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
14981
diff
changeset
|
109 |
|
16214 | 110 |
lemma cont_Ifix: "cont Ifix" |
111 |
apply (unfold Ifix_def) |
|
112 |
apply (rule cont2cont_lub) |
|
113 |
apply (rule ch2ch_fun_rev) |
|
16005 | 114 |
apply (rule chain_iterate) |
16214 | 115 |
apply (rule cont_iterate1) |
15576
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
14981
diff
changeset
|
116 |
done |
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
14981
diff
changeset
|
117 |
|
15637
d2a06007ebfa
changed comments to text blocks, cleaned up a few proofs
huffman
parents:
15577
diff
changeset
|
118 |
text {* propagate properties of @{term Ifix} to its continuous counterpart *} |
15576
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
14981
diff
changeset
|
119 |
|
16214 | 120 |
lemma fix_eq: "fix\<cdot>F = F\<cdot>(fix\<cdot>F)" |
15576
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
14981
diff
changeset
|
121 |
apply (unfold fix_def) |
15637
d2a06007ebfa
changed comments to text blocks, cleaned up a few proofs
huffman
parents:
15577
diff
changeset
|
122 |
apply (simp add: cont_Ifix) |
15576
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
14981
diff
changeset
|
123 |
apply (rule Ifix_eq) |
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
14981
diff
changeset
|
124 |
done |
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
14981
diff
changeset
|
125 |
|
16214 | 126 |
lemma fix_least: "F\<cdot>x = x \<Longrightarrow> fix\<cdot>F \<sqsubseteq> x" |
15576
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
14981
diff
changeset
|
127 |
apply (unfold fix_def) |
15637
d2a06007ebfa
changed comments to text blocks, cleaned up a few proofs
huffman
parents:
15577
diff
changeset
|
128 |
apply (simp add: cont_Ifix) |
15576
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
14981
diff
changeset
|
129 |
apply (erule Ifix_least) |
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
14981
diff
changeset
|
130 |
done |
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
14981
diff
changeset
|
131 |
|
16214 | 132 |
lemma fix_eqI: "\<lbrakk>F\<cdot>x = x; \<forall>z. F\<cdot>z = z \<longrightarrow> x \<sqsubseteq> z\<rbrakk> \<Longrightarrow> x = fix\<cdot>F" |
15576
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
14981
diff
changeset
|
133 |
apply (rule antisym_less) |
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
14981
diff
changeset
|
134 |
apply (erule allE) |
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
14981
diff
changeset
|
135 |
apply (erule mp) |
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
14981
diff
changeset
|
136 |
apply (rule fix_eq [symmetric]) |
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
14981
diff
changeset
|
137 |
apply (erule fix_least) |
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
14981
diff
changeset
|
138 |
done |
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
14981
diff
changeset
|
139 |
|
16214 | 140 |
lemma fix_eq2: "f \<equiv> fix\<cdot>F \<Longrightarrow> f = F\<cdot>f" |
15637
d2a06007ebfa
changed comments to text blocks, cleaned up a few proofs
huffman
parents:
15577
diff
changeset
|
141 |
by (simp add: fix_eq [symmetric]) |
15576
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
14981
diff
changeset
|
142 |
|
16214 | 143 |
lemma fix_eq3: "f \<equiv> fix\<cdot>F \<Longrightarrow> f\<cdot>x = F\<cdot>f\<cdot>x" |
15637
d2a06007ebfa
changed comments to text blocks, cleaned up a few proofs
huffman
parents:
15577
diff
changeset
|
144 |
by (erule fix_eq2 [THEN cfun_fun_cong]) |
15576
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
14981
diff
changeset
|
145 |
|
16214 | 146 |
lemma fix_eq4: "f = fix\<cdot>F \<Longrightarrow> f = F\<cdot>f" |
15576
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
14981
diff
changeset
|
147 |
apply (erule ssubst) |
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
14981
diff
changeset
|
148 |
apply (rule fix_eq) |
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
14981
diff
changeset
|
149 |
done |
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
14981
diff
changeset
|
150 |
|
16214 | 151 |
lemma fix_eq5: "f = fix\<cdot>F \<Longrightarrow> f\<cdot>x = F\<cdot>f\<cdot>x" |
152 |
by (erule fix_eq4 [THEN cfun_fun_cong]) |
|
15576
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
14981
diff
changeset
|
153 |
|
15637
d2a06007ebfa
changed comments to text blocks, cleaned up a few proofs
huffman
parents:
15577
diff
changeset
|
154 |
text {* direct connection between @{term fix} and iteration without @{term Ifix} *} |
15576
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
14981
diff
changeset
|
155 |
|
16214 | 156 |
lemma fix_def2: "fix\<cdot>F = (\<Squnion>i. iterate i F \<bottom>)" |
15576
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
14981
diff
changeset
|
157 |
apply (unfold fix_def) |
16214 | 158 |
apply (simp add: cont_Ifix) |
159 |
apply (simp add: Ifix_def) |
|
15576
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
14981
diff
changeset
|
160 |
done |
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
14981
diff
changeset
|
161 |
|
16556
a0c8d0499b5f
added theorems fix_strict, fix_defined, fix_id, fix_const
huffman
parents:
16388
diff
changeset
|
162 |
text {* strictness of @{term fix} *} |
a0c8d0499b5f
added theorems fix_strict, fix_defined, fix_id, fix_const
huffman
parents:
16388
diff
changeset
|
163 |
|
16917 | 164 |
lemma fix_defined_iff: "(fix\<cdot>F = \<bottom>) = (F\<cdot>\<bottom> = \<bottom>)" |
165 |
apply (rule iffI) |
|
166 |
apply (erule subst) |
|
167 |
apply (rule fix_eq [symmetric]) |
|
168 |
apply (erule fix_least [THEN UU_I]) |
|
169 |
done |
|
170 |
||
16556
a0c8d0499b5f
added theorems fix_strict, fix_defined, fix_id, fix_const
huffman
parents:
16388
diff
changeset
|
171 |
lemma fix_strict: "F\<cdot>\<bottom> = \<bottom> \<Longrightarrow> fix\<cdot>F = \<bottom>" |
16917 | 172 |
by (simp add: fix_defined_iff) |
16556
a0c8d0499b5f
added theorems fix_strict, fix_defined, fix_id, fix_const
huffman
parents:
16388
diff
changeset
|
173 |
|
a0c8d0499b5f
added theorems fix_strict, fix_defined, fix_id, fix_const
huffman
parents:
16388
diff
changeset
|
174 |
lemma fix_defined: "F\<cdot>\<bottom> \<noteq> \<bottom> \<Longrightarrow> fix\<cdot>F \<noteq> \<bottom>" |
16917 | 175 |
by (simp add: fix_defined_iff) |
16556
a0c8d0499b5f
added theorems fix_strict, fix_defined, fix_id, fix_const
huffman
parents:
16388
diff
changeset
|
176 |
|
a0c8d0499b5f
added theorems fix_strict, fix_defined, fix_id, fix_const
huffman
parents:
16388
diff
changeset
|
177 |
text {* @{term fix} applied to identity and constant functions *} |
a0c8d0499b5f
added theorems fix_strict, fix_defined, fix_id, fix_const
huffman
parents:
16388
diff
changeset
|
178 |
|
a0c8d0499b5f
added theorems fix_strict, fix_defined, fix_id, fix_const
huffman
parents:
16388
diff
changeset
|
179 |
lemma fix_id: "(\<mu> x. x) = \<bottom>" |
a0c8d0499b5f
added theorems fix_strict, fix_defined, fix_id, fix_const
huffman
parents:
16388
diff
changeset
|
180 |
by (simp add: fix_strict) |
a0c8d0499b5f
added theorems fix_strict, fix_defined, fix_id, fix_const
huffman
parents:
16388
diff
changeset
|
181 |
|
a0c8d0499b5f
added theorems fix_strict, fix_defined, fix_id, fix_const
huffman
parents:
16388
diff
changeset
|
182 |
lemma fix_const: "(\<mu> x. c) = c" |
a0c8d0499b5f
added theorems fix_strict, fix_defined, fix_id, fix_const
huffman
parents:
16388
diff
changeset
|
183 |
by (rule fix_eq [THEN trans], simp) |
a0c8d0499b5f
added theorems fix_strict, fix_defined, fix_id, fix_const
huffman
parents:
16388
diff
changeset
|
184 |
|
16005 | 185 |
subsection {* Admissibility and fixed point induction *} |
15576
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
14981
diff
changeset
|
186 |
|
15637
d2a06007ebfa
changed comments to text blocks, cleaned up a few proofs
huffman
parents:
15577
diff
changeset
|
187 |
text {* an admissible formula is also weak admissible *} |
15576
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
14981
diff
changeset
|
188 |
|
16214 | 189 |
lemma adm_impl_admw: "adm P \<Longrightarrow> admw P" |
15576
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
14981
diff
changeset
|
190 |
apply (unfold admw_def) |
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
14981
diff
changeset
|
191 |
apply (intro strip) |
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
14981
diff
changeset
|
192 |
apply (erule admD) |
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
14981
diff
changeset
|
193 |
apply (rule chain_iterate) |
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
14981
diff
changeset
|
194 |
apply assumption |
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
14981
diff
changeset
|
195 |
done |
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
14981
diff
changeset
|
196 |
|
16079
757e1c4a8081
moved adm_chfindom from Adm.thy to Fix.thy, to remove dependence on Cfun
huffman
parents:
16070
diff
changeset
|
197 |
text {* some lemmata for functions with flat/chfin domain/range types *} |
757e1c4a8081
moved adm_chfindom from Adm.thy to Fix.thy, to remove dependence on Cfun
huffman
parents:
16070
diff
changeset
|
198 |
|
16214 | 199 |
lemma adm_chfindom: "adm (\<lambda>(u::'a::cpo \<rightarrow> 'b::chfin). P(u\<cdot>s))" |
16079
757e1c4a8081
moved adm_chfindom from Adm.thy to Fix.thy, to remove dependence on Cfun
huffman
parents:
16070
diff
changeset
|
200 |
apply (unfold adm_def) |
757e1c4a8081
moved adm_chfindom from Adm.thy to Fix.thy, to remove dependence on Cfun
huffman
parents:
16070
diff
changeset
|
201 |
apply (intro strip) |
757e1c4a8081
moved adm_chfindom from Adm.thy to Fix.thy, to remove dependence on Cfun
huffman
parents:
16070
diff
changeset
|
202 |
apply (drule chfin_Rep_CFunR) |
757e1c4a8081
moved adm_chfindom from Adm.thy to Fix.thy, to remove dependence on Cfun
huffman
parents:
16070
diff
changeset
|
203 |
apply (erule_tac x = "s" in allE) |
757e1c4a8081
moved adm_chfindom from Adm.thy to Fix.thy, to remove dependence on Cfun
huffman
parents:
16070
diff
changeset
|
204 |
apply clarsimp |
757e1c4a8081
moved adm_chfindom from Adm.thy to Fix.thy, to remove dependence on Cfun
huffman
parents:
16070
diff
changeset
|
205 |
done |
757e1c4a8081
moved adm_chfindom from Adm.thy to Fix.thy, to remove dependence on Cfun
huffman
parents:
16070
diff
changeset
|
206 |
|
757e1c4a8081
moved adm_chfindom from Adm.thy to Fix.thy, to remove dependence on Cfun
huffman
parents:
16070
diff
changeset
|
207 |
(* adm_flat not needed any more, since it is a special case of adm_chfindom *) |
757e1c4a8081
moved adm_chfindom from Adm.thy to Fix.thy, to remove dependence on Cfun
huffman
parents:
16070
diff
changeset
|
208 |
|
15637
d2a06007ebfa
changed comments to text blocks, cleaned up a few proofs
huffman
parents:
15577
diff
changeset
|
209 |
text {* fixed point induction *} |
15576
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
14981
diff
changeset
|
210 |
|
16214 | 211 |
lemma fix_ind: "\<lbrakk>adm P; P \<bottom>; \<And>x. P x \<Longrightarrow> P (F\<cdot>x)\<rbrakk> \<Longrightarrow> P (fix\<cdot>F)" |
15576
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
14981
diff
changeset
|
212 |
apply (subst fix_def2) |
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
14981
diff
changeset
|
213 |
apply (erule admD) |
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
14981
diff
changeset
|
214 |
apply (rule chain_iterate) |
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
14981
diff
changeset
|
215 |
apply (rule allI) |
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
14981
diff
changeset
|
216 |
apply (induct_tac "i") |
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
14981
diff
changeset
|
217 |
apply simp |
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
14981
diff
changeset
|
218 |
apply simp |
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
14981
diff
changeset
|
219 |
done |
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
14981
diff
changeset
|
220 |
|
16214 | 221 |
lemma def_fix_ind: |
222 |
"\<lbrakk>f \<equiv> fix\<cdot>F; adm P; P \<bottom>; \<And>x. P x \<Longrightarrow> P (F\<cdot>x)\<rbrakk> \<Longrightarrow> P f" |
|
15576
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
14981
diff
changeset
|
223 |
apply simp |
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
14981
diff
changeset
|
224 |
apply (erule fix_ind) |
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
14981
diff
changeset
|
225 |
apply assumption |
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
14981
diff
changeset
|
226 |
apply fast |
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
14981
diff
changeset
|
227 |
done |
15637
d2a06007ebfa
changed comments to text blocks, cleaned up a few proofs
huffman
parents:
15577
diff
changeset
|
228 |
|
d2a06007ebfa
changed comments to text blocks, cleaned up a few proofs
huffman
parents:
15577
diff
changeset
|
229 |
text {* computational induction for weak admissible formulae *} |
15576
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
14981
diff
changeset
|
230 |
|
16214 | 231 |
lemma wfix_ind: "\<lbrakk>admw P; \<forall>n. P (iterate n F UU)\<rbrakk> \<Longrightarrow> P (fix\<cdot>F)" |
232 |
by (simp add: fix_def2 admw_def) |
|
15576
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
14981
diff
changeset
|
233 |
|
16214 | 234 |
lemma def_wfix_ind: |
235 |
"\<lbrakk>f \<equiv> fix\<cdot>F; admw P; \<forall>n. P (iterate n F \<bottom>)\<rbrakk> \<Longrightarrow> P f" |
|
236 |
by (simp, rule wfix_ind) |
|
15576
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
14981
diff
changeset
|
237 |
|
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
238 |
end |