| author | wenzelm | 
| Mon, 28 Dec 2009 23:34:36 +0100 | |
| changeset 34204 | fd76bc33b89b | 
| parent 33590 | 1806f58a3651 | 
| child 34941 | 156925dd67af | 
| permissions | -rw-r--r-- | 
| 2640 | 1  | 
(* Title: HOLCF/Fix.thy  | 
| 1479 | 2  | 
Author: Franz Regensburger  | 
| 
243
 
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
 
nipkow 
parents:  
diff
changeset
 | 
3  | 
*)  | 
| 
 
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
 
nipkow 
parents:  
diff
changeset
 | 
4  | 
|
| 15577 | 5  | 
header {* Fixed point operator and admissibility *}
 | 
6  | 
||
7  | 
theory Fix  | 
|
| 
27316
 
9e74019041d4
use new-style abbreviation/notation for fix syntax
 
huffman 
parents: 
27270 
diff
changeset
 | 
8  | 
imports Cfun Cprod  | 
| 15577 | 9  | 
begin  | 
| 
243
 
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
 
nipkow 
parents:  
diff
changeset
 | 
10  | 
|
| 16082 | 11  | 
defaultsort pcpo  | 
12  | 
||
| 
18093
 
587692219f69
put iterate and fix in separate sections; added Letrec
 
huffman 
parents: 
18092 
diff
changeset
 | 
13  | 
subsection {* Iteration *}
 | 
| 16005 | 14  | 
|
| 
243
 
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
 
nipkow 
parents:  
diff
changeset
 | 
15  | 
consts  | 
| 
18093
 
587692219f69
put iterate and fix in separate sections; added Letrec
 
huffman 
parents: 
18092 
diff
changeset
 | 
16  | 
  iterate :: "nat \<Rightarrow> ('a::cpo \<rightarrow> 'a) \<rightarrow> ('a \<rightarrow> 'a)"
 | 
| 
243
 
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
 
nipkow 
parents:  
diff
changeset
 | 
17  | 
|
| 5192 | 18  | 
primrec  | 
| 
18074
 
a92b7c5133de
reorganized; removed intermediate constant Ifix; changed iterate to a continuous type; added theorem fix_least_less
 
huffman 
parents: 
17816 
diff
changeset
 | 
19  | 
"iterate 0 = (\<Lambda> F x. x)"  | 
| 
 
a92b7c5133de
reorganized; removed intermediate constant Ifix; changed iterate to a continuous type; added theorem fix_least_less
 
huffman 
parents: 
17816 
diff
changeset
 | 
20  | 
"iterate (Suc n) = (\<Lambda> F x. F\<cdot>(iterate n\<cdot>F\<cdot>x))"  | 
| 5192 | 21  | 
|
| 
18093
 
587692219f69
put iterate and fix in separate sections; added Letrec
 
huffman 
parents: 
18092 
diff
changeset
 | 
22  | 
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
 | 
23  | 
|
| 
18074
 
a92b7c5133de
reorganized; removed intermediate constant Ifix; changed iterate to a continuous type; added theorem fix_least_less
 
huffman 
parents: 
17816 
diff
changeset
 | 
24  | 
lemma iterate_0 [simp]: "iterate 0\<cdot>F\<cdot>x = x"  | 
| 
 
a92b7c5133de
reorganized; removed intermediate constant Ifix; changed iterate to a continuous type; added theorem fix_least_less
 
huffman 
parents: 
17816 
diff
changeset
 | 
25  | 
by simp  | 
| 
 
a92b7c5133de
reorganized; removed intermediate constant Ifix; changed iterate to a continuous type; added theorem fix_least_less
 
huffman 
parents: 
17816 
diff
changeset
 | 
26  | 
|
| 
 
a92b7c5133de
reorganized; removed intermediate constant Ifix; changed iterate to a continuous type; added theorem fix_least_less
 
huffman 
parents: 
17816 
diff
changeset
 | 
27  | 
lemma iterate_Suc [simp]: "iterate (Suc n)\<cdot>F\<cdot>x = F\<cdot>(iterate n\<cdot>F\<cdot>x)"  | 
| 
 
a92b7c5133de
reorganized; removed intermediate constant Ifix; changed iterate to a continuous type; added theorem fix_least_less
 
huffman 
parents: 
17816 
diff
changeset
 | 
28  | 
by simp  | 
| 
 
a92b7c5133de
reorganized; removed intermediate constant Ifix; changed iterate to a continuous type; added theorem fix_least_less
 
huffman 
parents: 
17816 
diff
changeset
 | 
29  | 
|
| 
 
a92b7c5133de
reorganized; removed intermediate constant Ifix; changed iterate to a continuous type; added theorem fix_least_less
 
huffman 
parents: 
17816 
diff
changeset
 | 
30  | 
declare iterate.simps [simp del]  | 
| 
 
a92b7c5133de
reorganized; removed intermediate constant Ifix; changed iterate to a continuous type; added theorem fix_least_less
 
huffman 
parents: 
17816 
diff
changeset
 | 
31  | 
|
| 
 
a92b7c5133de
reorganized; removed intermediate constant Ifix; changed iterate to a continuous type; added theorem fix_least_less
 
huffman 
parents: 
17816 
diff
changeset
 | 
32  | 
lemma iterate_Suc2: "iterate (Suc n)\<cdot>F\<cdot>x = iterate n\<cdot>F\<cdot>(F\<cdot>x)"  | 
| 27270 | 33  | 
by (induct n) simp_all  | 
34  | 
||
35  | 
lemma iterate_iterate:  | 
|
36  | 
"iterate m\<cdot>F\<cdot>(iterate n\<cdot>F\<cdot>x) = iterate (m + n)\<cdot>F\<cdot>x"  | 
|
37  | 
by (induct m) simp_all  | 
|
| 
15576
 
efb95d0d01f7
converted to new-style theories, and combined numbered files
 
huffman 
parents: 
14981 
diff
changeset
 | 
38  | 
|
| 
15637
 
d2a06007ebfa
changed comments to text blocks, cleaned up a few proofs
 
huffman 
parents: 
15577 
diff
changeset
 | 
39  | 
text {*
 | 
| 
 
d2a06007ebfa
changed comments to text blocks, cleaned up a few proofs
 
huffman 
parents: 
15577 
diff
changeset
 | 
40  | 
The sequence of function iterations is a chain.  | 
| 
 
d2a06007ebfa
changed comments to text blocks, cleaned up a few proofs
 
huffman 
parents: 
15577 
diff
changeset
 | 
41  | 
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
 | 
42  | 
*}  | 
| 
15576
 
efb95d0d01f7
converted to new-style theories, and combined numbered files
 
huffman 
parents: 
14981 
diff
changeset
 | 
43  | 
|
| 
18074
 
a92b7c5133de
reorganized; removed intermediate constant Ifix; changed iterate to a continuous type; added theorem fix_least_less
 
huffman 
parents: 
17816 
diff
changeset
 | 
44  | 
lemma chain_iterate2: "x \<sqsubseteq> F\<cdot>x \<Longrightarrow> chain (\<lambda>i. iterate i\<cdot>F\<cdot>x)"  | 
| 16214 | 45  | 
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
 | 
46  | 
|
| 
18074
 
a92b7c5133de
reorganized; removed intermediate constant Ifix; changed iterate to a continuous type; added theorem fix_least_less
 
huffman 
parents: 
17816 
diff
changeset
 | 
47  | 
lemma chain_iterate [simp]: "chain (\<lambda>i. iterate i\<cdot>F\<cdot>\<bottom>)"  | 
| 16005 | 48  | 
by (rule chain_iterate2 [OF minimal])  | 
| 
15576
 
efb95d0d01f7
converted to new-style theories, and combined numbered files
 
huffman 
parents: 
14981 
diff
changeset
 | 
49  | 
|
| 
18093
 
587692219f69
put iterate and fix in separate sections; added Letrec
 
huffman 
parents: 
18092 
diff
changeset
 | 
50  | 
|
| 
 
587692219f69
put iterate and fix in separate sections; added Letrec
 
huffman 
parents: 
18092 
diff
changeset
 | 
51  | 
subsection {* Least fixed point operator *}
 | 
| 
 
587692219f69
put iterate and fix in separate sections; added Letrec
 
huffman 
parents: 
18092 
diff
changeset
 | 
52  | 
|
| 
25131
 
2c8caac48ade
modernized specifications ('definition', 'abbreviation', 'notation');
 
wenzelm 
parents: 
18095 
diff
changeset
 | 
53  | 
definition  | 
| 
 
2c8caac48ade
modernized specifications ('definition', 'abbreviation', 'notation');
 
wenzelm 
parents: 
18095 
diff
changeset
 | 
54  | 
  "fix" :: "('a \<rightarrow> 'a) \<rightarrow> 'a" where
 | 
| 
 
2c8caac48ade
modernized specifications ('definition', 'abbreviation', 'notation');
 
wenzelm 
parents: 
18095 
diff
changeset
 | 
55  | 
"fix = (\<Lambda> F. \<Squnion>i. iterate i\<cdot>F\<cdot>\<bottom>)"  | 
| 
18093
 
587692219f69
put iterate and fix in separate sections; added Letrec
 
huffman 
parents: 
18092 
diff
changeset
 | 
56  | 
|
| 
 
587692219f69
put iterate and fix in separate sections; added Letrec
 
huffman 
parents: 
18092 
diff
changeset
 | 
57  | 
text {* Binder syntax for @{term fix} *}
 | 
| 
 
587692219f69
put iterate and fix in separate sections; added Letrec
 
huffman 
parents: 
18092 
diff
changeset
 | 
58  | 
|
| 
27316
 
9e74019041d4
use new-style abbreviation/notation for fix syntax
 
huffman 
parents: 
27270 
diff
changeset
 | 
59  | 
abbreviation  | 
| 
 
9e74019041d4
use new-style abbreviation/notation for fix syntax
 
huffman 
parents: 
27270 
diff
changeset
 | 
60  | 
  fix_syn :: "('a \<Rightarrow> 'a) \<Rightarrow> 'a"  (binder "FIX " 10) where
 | 
| 
 
9e74019041d4
use new-style abbreviation/notation for fix syntax
 
huffman 
parents: 
27270 
diff
changeset
 | 
61  | 
"fix_syn (\<lambda>x. f x) \<equiv> fix\<cdot>(\<Lambda> x. f x)"  | 
| 
18093
 
587692219f69
put iterate and fix in separate sections; added Letrec
 
huffman 
parents: 
18092 
diff
changeset
 | 
62  | 
|
| 
27316
 
9e74019041d4
use new-style abbreviation/notation for fix syntax
 
huffman 
parents: 
27270 
diff
changeset
 | 
63  | 
notation (xsymbols)  | 
| 
 
9e74019041d4
use new-style abbreviation/notation for fix syntax
 
huffman 
parents: 
27270 
diff
changeset
 | 
64  | 
fix_syn (binder "\<mu> " 10)  | 
| 
18093
 
587692219f69
put iterate and fix in separate sections; added Letrec
 
huffman 
parents: 
18092 
diff
changeset
 | 
65  | 
|
| 
 
587692219f69
put iterate and fix in separate sections; added Letrec
 
huffman 
parents: 
18092 
diff
changeset
 | 
66  | 
text {* Properties of @{term fix} *}
 | 
| 
18074
 
a92b7c5133de
reorganized; removed intermediate constant Ifix; changed iterate to a continuous type; added theorem fix_least_less
 
huffman 
parents: 
17816 
diff
changeset
 | 
67  | 
|
| 
18090
 
9d5cfd71f510
moved adm_chfindom from Fix.thy to Cfun.thy; moved admw-related stuff to its own section
 
huffman 
parents: 
18078 
diff
changeset
 | 
68  | 
text {* direct connection between @{term fix} and iteration *}
 | 
| 
18074
 
a92b7c5133de
reorganized; removed intermediate constant Ifix; changed iterate to a continuous type; added theorem fix_least_less
 
huffman 
parents: 
17816 
diff
changeset
 | 
69  | 
|
| 
 
a92b7c5133de
reorganized; removed intermediate constant Ifix; changed iterate to a continuous type; added theorem fix_least_less
 
huffman 
parents: 
17816 
diff
changeset
 | 
70  | 
lemma fix_def2: "fix\<cdot>F = (\<Squnion>i. iterate i\<cdot>F\<cdot>\<bottom>)"  | 
| 
 
a92b7c5133de
reorganized; removed intermediate constant Ifix; changed iterate to a continuous type; added theorem fix_least_less
 
huffman 
parents: 
17816 
diff
changeset
 | 
71  | 
apply (unfold fix_def)  | 
| 
 
a92b7c5133de
reorganized; removed intermediate constant Ifix; changed iterate to a continuous type; added theorem fix_least_less
 
huffman 
parents: 
17816 
diff
changeset
 | 
72  | 
apply (rule beta_cfun)  | 
| 
 
a92b7c5133de
reorganized; removed intermediate constant Ifix; changed iterate to a continuous type; added theorem fix_least_less
 
huffman 
parents: 
17816 
diff
changeset
 | 
73  | 
apply (rule cont2cont_lub)  | 
| 
18092
 
2c5d5da79a1e
renamed and added ch2ch, cont2cont, mono2mono theorems ending in _fun, _lambda, _LAM
 
huffman 
parents: 
18090 
diff
changeset
 | 
74  | 
apply (rule ch2ch_lambda)  | 
| 
18074
 
a92b7c5133de
reorganized; removed intermediate constant Ifix; changed iterate to a continuous type; added theorem fix_least_less
 
huffman 
parents: 
17816 
diff
changeset
 | 
75  | 
apply (rule chain_iterate)  | 
| 
 
a92b7c5133de
reorganized; removed intermediate constant Ifix; changed iterate to a continuous type; added theorem fix_least_less
 
huffman 
parents: 
17816 
diff
changeset
 | 
76  | 
apply simp  | 
| 
 
a92b7c5133de
reorganized; removed intermediate constant Ifix; changed iterate to a continuous type; added theorem fix_least_less
 
huffman 
parents: 
17816 
diff
changeset
 | 
77  | 
done  | 
| 
 
a92b7c5133de
reorganized; removed intermediate constant Ifix; changed iterate to a continuous type; added theorem fix_least_less
 
huffman 
parents: 
17816 
diff
changeset
 | 
78  | 
|
| 
15637
 
d2a06007ebfa
changed comments to text blocks, cleaned up a few proofs
 
huffman 
parents: 
15577 
diff
changeset
 | 
79  | 
text {*
 | 
| 
 
d2a06007ebfa
changed comments to text blocks, cleaned up a few proofs
 
huffman 
parents: 
15577 
diff
changeset
 | 
80  | 
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
 | 
81  | 
omega cpo's  | 
| 
 
d2a06007ebfa
changed comments to text blocks, cleaned up a few proofs
 
huffman 
parents: 
15577 
diff
changeset
 | 
82  | 
*}  | 
| 
15576
 
efb95d0d01f7
converted to new-style theories, and combined numbered files
 
huffman 
parents: 
14981 
diff
changeset
 | 
83  | 
|
| 
18074
 
a92b7c5133de
reorganized; removed intermediate constant Ifix; changed iterate to a continuous type; added theorem fix_least_less
 
huffman 
parents: 
17816 
diff
changeset
 | 
84  | 
lemma fix_eq: "fix\<cdot>F = F\<cdot>(fix\<cdot>F)"  | 
| 
 
a92b7c5133de
reorganized; removed intermediate constant Ifix; changed iterate to a continuous type; added theorem fix_least_less
 
huffman 
parents: 
17816 
diff
changeset
 | 
85  | 
apply (simp add: fix_def2)  | 
| 16005 | 86  | 
apply (subst lub_range_shift [of _ 1, symmetric])  | 
87  | 
apply (rule chain_iterate)  | 
|
| 
15576
 
efb95d0d01f7
converted to new-style theories, and combined numbered files
 
huffman 
parents: 
14981 
diff
changeset
 | 
88  | 
apply (subst contlub_cfun_arg)  | 
| 
 
efb95d0d01f7
converted to new-style theories, and combined numbered files
 
huffman 
parents: 
14981 
diff
changeset
 | 
89  | 
apply (rule chain_iterate)  | 
| 16005 | 90  | 
apply simp  | 
| 
15576
 
efb95d0d01f7
converted to new-style theories, and combined numbered files
 
huffman 
parents: 
14981 
diff
changeset
 | 
91  | 
done  | 
| 
 
efb95d0d01f7
converted to new-style theories, and combined numbered files
 
huffman 
parents: 
14981 
diff
changeset
 | 
92  | 
|
| 
31076
 
99fe356cbbc2
rename constant sq_le to below; rename class sq_ord to below; less->below in many lemma names
 
huffman 
parents: 
29138 
diff
changeset
 | 
93  | 
lemma fix_least_below: "F\<cdot>x \<sqsubseteq> x \<Longrightarrow> fix\<cdot>F \<sqsubseteq> x"  | 
| 
18074
 
a92b7c5133de
reorganized; removed intermediate constant Ifix; changed iterate to a continuous type; added theorem fix_least_less
 
huffman 
parents: 
17816 
diff
changeset
 | 
94  | 
apply (simp add: fix_def2)  | 
| 
15576
 
efb95d0d01f7
converted to new-style theories, and combined numbered files
 
huffman 
parents: 
14981 
diff
changeset
 | 
95  | 
apply (rule is_lub_thelub)  | 
| 
 
efb95d0d01f7
converted to new-style theories, and combined numbered files
 
huffman 
parents: 
14981 
diff
changeset
 | 
96  | 
apply (rule chain_iterate)  | 
| 
 
efb95d0d01f7
converted to new-style theories, and combined numbered files
 
huffman 
parents: 
14981 
diff
changeset
 | 
97  | 
apply (rule ub_rangeI)  | 
| 16005 | 98  | 
apply (induct_tac i)  | 
99  | 
apply simp  | 
|
100  | 
apply simp  | 
|
| 
31076
 
99fe356cbbc2
rename constant sq_le to below; rename class sq_ord to below; less->below in many lemma names
 
huffman 
parents: 
29138 
diff
changeset
 | 
101  | 
apply (erule rev_below_trans)  | 
| 16214 | 102  | 
apply (erule monofun_cfun_arg)  | 
| 
15576
 
efb95d0d01f7
converted to new-style theories, and combined numbered files
 
huffman 
parents: 
14981 
diff
changeset
 | 
103  | 
done  | 
| 
 
efb95d0d01f7
converted to new-style theories, and combined numbered files
 
huffman 
parents: 
14981 
diff
changeset
 | 
104  | 
|
| 16214 | 105  | 
lemma fix_least: "F\<cdot>x = x \<Longrightarrow> fix\<cdot>F \<sqsubseteq> x"  | 
| 
31076
 
99fe356cbbc2
rename constant sq_le to below; rename class sq_ord to below; less->below in many lemma names
 
huffman 
parents: 
29138 
diff
changeset
 | 
106  | 
by (rule fix_least_below, simp)  | 
| 
15576
 
efb95d0d01f7
converted to new-style theories, and combined numbered files
 
huffman 
parents: 
14981 
diff
changeset
 | 
107  | 
|
| 
27185
 
0407630909ef
change orientation of fix_eqI and convert to rule_format;
 
huffman 
parents: 
25927 
diff
changeset
 | 
108  | 
lemma fix_eqI:  | 
| 
 
0407630909ef
change orientation of fix_eqI and convert to rule_format;
 
huffman 
parents: 
25927 
diff
changeset
 | 
109  | 
assumes fixed: "F\<cdot>x = x" and least: "\<And>z. F\<cdot>z = z \<Longrightarrow> x \<sqsubseteq> z"  | 
| 
 
0407630909ef
change orientation of fix_eqI and convert to rule_format;
 
huffman 
parents: 
25927 
diff
changeset
 | 
110  | 
shows "fix\<cdot>F = x"  | 
| 
31076
 
99fe356cbbc2
rename constant sq_le to below; rename class sq_ord to below; less->below in many lemma names
 
huffman 
parents: 
29138 
diff
changeset
 | 
111  | 
apply (rule below_antisym)  | 
| 
27185
 
0407630909ef
change orientation of fix_eqI and convert to rule_format;
 
huffman 
parents: 
25927 
diff
changeset
 | 
112  | 
apply (rule fix_least [OF fixed])  | 
| 
 
0407630909ef
change orientation of fix_eqI and convert to rule_format;
 
huffman 
parents: 
25927 
diff
changeset
 | 
113  | 
apply (rule least [OF fix_eq [symmetric]])  | 
| 
15576
 
efb95d0d01f7
converted to new-style theories, and combined numbered files
 
huffman 
parents: 
14981 
diff
changeset
 | 
114  | 
done  | 
| 
 
efb95d0d01f7
converted to new-style theories, and combined numbered files
 
huffman 
parents: 
14981 
diff
changeset
 | 
115  | 
|
| 16214 | 116  | 
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
 | 
117  | 
by (simp add: fix_eq [symmetric])  | 
| 
15576
 
efb95d0d01f7
converted to new-style theories, and combined numbered files
 
huffman 
parents: 
14981 
diff
changeset
 | 
118  | 
|
| 16214 | 119  | 
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
 | 
120  | 
by (erule fix_eq2 [THEN cfun_fun_cong])  | 
| 
15576
 
efb95d0d01f7
converted to new-style theories, and combined numbered files
 
huffman 
parents: 
14981 
diff
changeset
 | 
121  | 
|
| 16214 | 122  | 
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
 | 
123  | 
apply (erule ssubst)  | 
| 
 
efb95d0d01f7
converted to new-style theories, and combined numbered files
 
huffman 
parents: 
14981 
diff
changeset
 | 
124  | 
apply (rule fix_eq)  | 
| 
 
efb95d0d01f7
converted to new-style theories, and combined numbered files
 
huffman 
parents: 
14981 
diff
changeset
 | 
125  | 
done  | 
| 
 
efb95d0d01f7
converted to new-style theories, and combined numbered files
 
huffman 
parents: 
14981 
diff
changeset
 | 
126  | 
|
| 16214 | 127  | 
lemma fix_eq5: "f = fix\<cdot>F \<Longrightarrow> f\<cdot>x = F\<cdot>f\<cdot>x"  | 
128  | 
by (erule fix_eq4 [THEN cfun_fun_cong])  | 
|
| 
15576
 
efb95d0d01f7
converted to new-style theories, and combined numbered files
 
huffman 
parents: 
14981 
diff
changeset
 | 
129  | 
|
| 
16556
 
a0c8d0499b5f
added theorems fix_strict, fix_defined, fix_id, fix_const
 
huffman 
parents: 
16388 
diff
changeset
 | 
130  | 
text {* strictness of @{term fix} *}
 | 
| 
 
a0c8d0499b5f
added theorems fix_strict, fix_defined, fix_id, fix_const
 
huffman 
parents: 
16388 
diff
changeset
 | 
131  | 
|
| 16917 | 132  | 
lemma fix_defined_iff: "(fix\<cdot>F = \<bottom>) = (F\<cdot>\<bottom> = \<bottom>)"  | 
133  | 
apply (rule iffI)  | 
|
134  | 
apply (erule subst)  | 
|
135  | 
apply (rule fix_eq [symmetric])  | 
|
136  | 
apply (erule fix_least [THEN UU_I])  | 
|
137  | 
done  | 
|
138  | 
||
| 
16556
 
a0c8d0499b5f
added theorems fix_strict, fix_defined, fix_id, fix_const
 
huffman 
parents: 
16388 
diff
changeset
 | 
139  | 
lemma fix_strict: "F\<cdot>\<bottom> = \<bottom> \<Longrightarrow> fix\<cdot>F = \<bottom>"  | 
| 16917 | 140  | 
by (simp add: fix_defined_iff)  | 
| 
16556
 
a0c8d0499b5f
added theorems fix_strict, fix_defined, fix_id, fix_const
 
huffman 
parents: 
16388 
diff
changeset
 | 
141  | 
|
| 
 
a0c8d0499b5f
added theorems fix_strict, fix_defined, fix_id, fix_const
 
huffman 
parents: 
16388 
diff
changeset
 | 
142  | 
lemma fix_defined: "F\<cdot>\<bottom> \<noteq> \<bottom> \<Longrightarrow> fix\<cdot>F \<noteq> \<bottom>"  | 
| 16917 | 143  | 
by (simp add: fix_defined_iff)  | 
| 
16556
 
a0c8d0499b5f
added theorems fix_strict, fix_defined, fix_id, fix_const
 
huffman 
parents: 
16388 
diff
changeset
 | 
144  | 
|
| 
 
a0c8d0499b5f
added theorems fix_strict, fix_defined, fix_id, fix_const
 
huffman 
parents: 
16388 
diff
changeset
 | 
145  | 
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
 | 
146  | 
|
| 
 
a0c8d0499b5f
added theorems fix_strict, fix_defined, fix_id, fix_const
 
huffman 
parents: 
16388 
diff
changeset
 | 
147  | 
lemma fix_id: "(\<mu> x. x) = \<bottom>"  | 
| 
 
a0c8d0499b5f
added theorems fix_strict, fix_defined, fix_id, fix_const
 
huffman 
parents: 
16388 
diff
changeset
 | 
148  | 
by (simp add: fix_strict)  | 
| 
 
a0c8d0499b5f
added theorems fix_strict, fix_defined, fix_id, fix_const
 
huffman 
parents: 
16388 
diff
changeset
 | 
149  | 
|
| 
 
a0c8d0499b5f
added theorems fix_strict, fix_defined, fix_id, fix_const
 
huffman 
parents: 
16388 
diff
changeset
 | 
150  | 
lemma fix_const: "(\<mu> x. c) = c"  | 
| 
18074
 
a92b7c5133de
reorganized; removed intermediate constant Ifix; changed iterate to a continuous type; added theorem fix_least_less
 
huffman 
parents: 
17816 
diff
changeset
 | 
151  | 
by (subst fix_eq, simp)  | 
| 
16556
 
a0c8d0499b5f
added theorems fix_strict, fix_defined, fix_id, fix_const
 
huffman 
parents: 
16388 
diff
changeset
 | 
152  | 
|
| 
18090
 
9d5cfd71f510
moved adm_chfindom from Fix.thy to Cfun.thy; moved admw-related stuff to its own section
 
huffman 
parents: 
18078 
diff
changeset
 | 
153  | 
subsection {* Fixed point induction *}
 | 
| 
 
9d5cfd71f510
moved adm_chfindom from Fix.thy to Cfun.thy; moved admw-related stuff to its own section
 
huffman 
parents: 
18078 
diff
changeset
 | 
154  | 
|
| 
 
9d5cfd71f510
moved adm_chfindom from Fix.thy to Cfun.thy; moved admw-related stuff to its own section
 
huffman 
parents: 
18078 
diff
changeset
 | 
155  | 
lemma fix_ind: "\<lbrakk>adm P; P \<bottom>; \<And>x. P x \<Longrightarrow> P (F\<cdot>x)\<rbrakk> \<Longrightarrow> P (fix\<cdot>F)"  | 
| 
27185
 
0407630909ef
change orientation of fix_eqI and convert to rule_format;
 
huffman 
parents: 
25927 
diff
changeset
 | 
156  | 
unfolding fix_def2  | 
| 25925 | 157  | 
apply (erule admD)  | 
| 
18090
 
9d5cfd71f510
moved adm_chfindom from Fix.thy to Cfun.thy; moved admw-related stuff to its own section
 
huffman 
parents: 
18078 
diff
changeset
 | 
158  | 
apply (rule chain_iterate)  | 
| 
27185
 
0407630909ef
change orientation of fix_eqI and convert to rule_format;
 
huffman 
parents: 
25927 
diff
changeset
 | 
159  | 
apply (rule nat_induct, simp_all)  | 
| 
18090
 
9d5cfd71f510
moved adm_chfindom from Fix.thy to Cfun.thy; moved admw-related stuff to its own section
 
huffman 
parents: 
18078 
diff
changeset
 | 
160  | 
done  | 
| 
 
9d5cfd71f510
moved adm_chfindom from Fix.thy to Cfun.thy; moved admw-related stuff to its own section
 
huffman 
parents: 
18078 
diff
changeset
 | 
161  | 
|
| 
 
9d5cfd71f510
moved adm_chfindom from Fix.thy to Cfun.thy; moved admw-related stuff to its own section
 
huffman 
parents: 
18078 
diff
changeset
 | 
162  | 
lemma def_fix_ind:  | 
| 
 
9d5cfd71f510
moved adm_chfindom from Fix.thy to Cfun.thy; moved admw-related stuff to its own section
 
huffman 
parents: 
18078 
diff
changeset
 | 
163  | 
"\<lbrakk>f \<equiv> fix\<cdot>F; adm P; P \<bottom>; \<And>x. P x \<Longrightarrow> P (F\<cdot>x)\<rbrakk> \<Longrightarrow> P f"  | 
| 
 
9d5cfd71f510
moved adm_chfindom from Fix.thy to Cfun.thy; moved admw-related stuff to its own section
 
huffman 
parents: 
18078 
diff
changeset
 | 
164  | 
by (simp add: fix_ind)  | 
| 
 
9d5cfd71f510
moved adm_chfindom from Fix.thy to Cfun.thy; moved admw-related stuff to its own section
 
huffman 
parents: 
18078 
diff
changeset
 | 
165  | 
|
| 
27185
 
0407630909ef
change orientation of fix_eqI and convert to rule_format;
 
huffman 
parents: 
25927 
diff
changeset
 | 
166  | 
lemma fix_ind2:  | 
| 
 
0407630909ef
change orientation of fix_eqI and convert to rule_format;
 
huffman 
parents: 
25927 
diff
changeset
 | 
167  | 
assumes adm: "adm P"  | 
| 
 
0407630909ef
change orientation of fix_eqI and convert to rule_format;
 
huffman 
parents: 
25927 
diff
changeset
 | 
168  | 
assumes 0: "P \<bottom>" and 1: "P (F\<cdot>\<bottom>)"  | 
| 
 
0407630909ef
change orientation of fix_eqI and convert to rule_format;
 
huffman 
parents: 
25927 
diff
changeset
 | 
169  | 
assumes step: "\<And>x. \<lbrakk>P x; P (F\<cdot>x)\<rbrakk> \<Longrightarrow> P (F\<cdot>(F\<cdot>x))"  | 
| 
 
0407630909ef
change orientation of fix_eqI and convert to rule_format;
 
huffman 
parents: 
25927 
diff
changeset
 | 
170  | 
shows "P (fix\<cdot>F)"  | 
| 
 
0407630909ef
change orientation of fix_eqI and convert to rule_format;
 
huffman 
parents: 
25927 
diff
changeset
 | 
171  | 
unfolding fix_def2  | 
| 
 
0407630909ef
change orientation of fix_eqI and convert to rule_format;
 
huffman 
parents: 
25927 
diff
changeset
 | 
172  | 
apply (rule admD [OF adm chain_iterate])  | 
| 
 
0407630909ef
change orientation of fix_eqI and convert to rule_format;
 
huffman 
parents: 
25927 
diff
changeset
 | 
173  | 
apply (rule nat_less_induct)  | 
| 
 
0407630909ef
change orientation of fix_eqI and convert to rule_format;
 
huffman 
parents: 
25927 
diff
changeset
 | 
174  | 
apply (case_tac n)  | 
| 
 
0407630909ef
change orientation of fix_eqI and convert to rule_format;
 
huffman 
parents: 
25927 
diff
changeset
 | 
175  | 
apply (simp add: 0)  | 
| 
 
0407630909ef
change orientation of fix_eqI and convert to rule_format;
 
huffman 
parents: 
25927 
diff
changeset
 | 
176  | 
apply (case_tac nat)  | 
| 
 
0407630909ef
change orientation of fix_eqI and convert to rule_format;
 
huffman 
parents: 
25927 
diff
changeset
 | 
177  | 
apply (simp add: 1)  | 
| 
 
0407630909ef
change orientation of fix_eqI and convert to rule_format;
 
huffman 
parents: 
25927 
diff
changeset
 | 
178  | 
apply (frule_tac x=nat in spec)  | 
| 
 
0407630909ef
change orientation of fix_eqI and convert to rule_format;
 
huffman 
parents: 
25927 
diff
changeset
 | 
179  | 
apply (simp add: step)  | 
| 
 
0407630909ef
change orientation of fix_eqI and convert to rule_format;
 
huffman 
parents: 
25927 
diff
changeset
 | 
180  | 
done  | 
| 
 
0407630909ef
change orientation of fix_eqI and convert to rule_format;
 
huffman 
parents: 
25927 
diff
changeset
 | 
181  | 
|
| 33590 | 182  | 
lemma parallel_fix_ind:  | 
183  | 
assumes adm: "adm (\<lambda>x. P (fst x) (snd x))"  | 
|
184  | 
assumes base: "P \<bottom> \<bottom>"  | 
|
185  | 
assumes step: "\<And>x y. P x y \<Longrightarrow> P (F\<cdot>x) (G\<cdot>y)"  | 
|
186  | 
shows "P (fix\<cdot>F) (fix\<cdot>G)"  | 
|
187  | 
proof -  | 
|
188  | 
from adm have adm': "adm (split P)"  | 
|
189  | 
unfolding split_def .  | 
|
190  | 
have "\<And>i. P (iterate i\<cdot>F\<cdot>\<bottom>) (iterate i\<cdot>G\<cdot>\<bottom>)"  | 
|
191  | 
by (induct_tac i, simp add: base, simp add: step)  | 
|
192  | 
hence "\<And>i. split P (iterate i\<cdot>F\<cdot>\<bottom>, iterate i\<cdot>G\<cdot>\<bottom>)"  | 
|
193  | 
by simp  | 
|
194  | 
hence "split P (\<Squnion>i. (iterate i\<cdot>F\<cdot>\<bottom>, iterate i\<cdot>G\<cdot>\<bottom>))"  | 
|
195  | 
by - (rule admD [OF adm'], simp, assumption)  | 
|
196  | 
hence "split P (\<Squnion>i. iterate i\<cdot>F\<cdot>\<bottom>, \<Squnion>i. iterate i\<cdot>G\<cdot>\<bottom>)"  | 
|
197  | 
by (simp add: thelub_Pair)  | 
|
198  | 
hence "P (\<Squnion>i. iterate i\<cdot>F\<cdot>\<bottom>) (\<Squnion>i. iterate i\<cdot>G\<cdot>\<bottom>)"  | 
|
199  | 
by simp  | 
|
200  | 
thus "P (fix\<cdot>F) (fix\<cdot>G)"  | 
|
201  | 
by (simp add: fix_def2)  | 
|
202  | 
qed  | 
|
203  | 
||
| 
18093
 
587692219f69
put iterate and fix in separate sections; added Letrec
 
huffman 
parents: 
18092 
diff
changeset
 | 
204  | 
subsection {* Recursive let bindings *}
 | 
| 
 
587692219f69
put iterate and fix in separate sections; added Letrec
 
huffman 
parents: 
18092 
diff
changeset
 | 
205  | 
|
| 
25131
 
2c8caac48ade
modernized specifications ('definition', 'abbreviation', 'notation');
 
wenzelm 
parents: 
18095 
diff
changeset
 | 
206  | 
definition  | 
| 
 
2c8caac48ade
modernized specifications ('definition', 'abbreviation', 'notation');
 
wenzelm 
parents: 
18095 
diff
changeset
 | 
207  | 
  CLetrec :: "('a \<rightarrow> 'a \<times> 'b) \<rightarrow> 'b" where
 | 
| 
 
2c8caac48ade
modernized specifications ('definition', 'abbreviation', 'notation');
 
wenzelm 
parents: 
18095 
diff
changeset
 | 
208  | 
"CLetrec = (\<Lambda> F. csnd\<cdot>(F\<cdot>(\<mu> x. cfst\<cdot>(F\<cdot>x))))"  | 
| 
18093
 
587692219f69
put iterate and fix in separate sections; added Letrec
 
huffman 
parents: 
18092 
diff
changeset
 | 
209  | 
|
| 
 
587692219f69
put iterate and fix in separate sections; added Letrec
 
huffman 
parents: 
18092 
diff
changeset
 | 
210  | 
nonterminals  | 
| 
 
587692219f69
put iterate and fix in separate sections; added Letrec
 
huffman 
parents: 
18092 
diff
changeset
 | 
211  | 
recbinds recbindt recbind  | 
| 
 
587692219f69
put iterate and fix in separate sections; added Letrec
 
huffman 
parents: 
18092 
diff
changeset
 | 
212  | 
|
| 
 
587692219f69
put iterate and fix in separate sections; added Letrec
 
huffman 
parents: 
18092 
diff
changeset
 | 
213  | 
syntax  | 
| 
 
587692219f69
put iterate and fix in separate sections; added Letrec
 
huffman 
parents: 
18092 
diff
changeset
 | 
214  | 
  "_recbind"  :: "['a, 'a] \<Rightarrow> recbind"               ("(2_ =/ _)" 10)
 | 
| 
 
587692219f69
put iterate and fix in separate sections; added Letrec
 
huffman 
parents: 
18092 
diff
changeset
 | 
215  | 
  ""          :: "recbind \<Rightarrow> recbindt"               ("_")
 | 
| 
 
587692219f69
put iterate and fix in separate sections; added Letrec
 
huffman 
parents: 
18092 
diff
changeset
 | 
216  | 
  "_recbindt" :: "[recbind, recbindt] \<Rightarrow> recbindt"   ("_,/ _")
 | 
| 
 
587692219f69
put iterate and fix in separate sections; added Letrec
 
huffman 
parents: 
18092 
diff
changeset
 | 
217  | 
  ""          :: "recbindt \<Rightarrow> recbinds"              ("_")
 | 
| 
 
587692219f69
put iterate and fix in separate sections; added Letrec
 
huffman 
parents: 
18092 
diff
changeset
 | 
218  | 
  "_recbinds" :: "[recbindt, recbinds] \<Rightarrow> recbinds"  ("_;/ _")
 | 
| 
 
587692219f69
put iterate and fix in separate sections; added Letrec
 
huffman 
parents: 
18092 
diff
changeset
 | 
219  | 
  "_Letrec"   :: "[recbinds, 'a] \<Rightarrow> 'a"      ("(Letrec (_)/ in (_))" 10)
 | 
| 
 
587692219f69
put iterate and fix in separate sections; added Letrec
 
huffman 
parents: 
18092 
diff
changeset
 | 
220  | 
|
| 
 
587692219f69
put iterate and fix in separate sections; added Letrec
 
huffman 
parents: 
18092 
diff
changeset
 | 
221  | 
translations  | 
| 
 
587692219f69
put iterate and fix in separate sections; added Letrec
 
huffman 
parents: 
18092 
diff
changeset
 | 
222  | 
(recbindt) "x = a, \<langle>y,ys\<rangle> = \<langle>b,bs\<rangle>" == (recbindt) "\<langle>x,y,ys\<rangle> = \<langle>a,b,bs\<rangle>"  | 
| 
25131
 
2c8caac48ade
modernized specifications ('definition', 'abbreviation', 'notation');
 
wenzelm 
parents: 
18095 
diff
changeset
 | 
223  | 
(recbindt) "x = a, y = b" == (recbindt) "\<langle>x,y\<rangle> = \<langle>a,b\<rangle>"  | 
| 
18093
 
587692219f69
put iterate and fix in separate sections; added Letrec
 
huffman 
parents: 
18092 
diff
changeset
 | 
224  | 
|
| 
 
587692219f69
put iterate and fix in separate sections; added Letrec
 
huffman 
parents: 
18092 
diff
changeset
 | 
225  | 
translations  | 
| 
 
587692219f69
put iterate and fix in separate sections; added Letrec
 
huffman 
parents: 
18092 
diff
changeset
 | 
226  | 
"_Letrec (_recbinds b bs) e" == "_Letrec b (_Letrec bs e)"  | 
| 
25131
 
2c8caac48ade
modernized specifications ('definition', 'abbreviation', 'notation');
 
wenzelm 
parents: 
18095 
diff
changeset
 | 
227  | 
"Letrec xs = a in \<langle>e,es\<rangle>" == "CONST CLetrec\<cdot>(\<Lambda> xs. \<langle>a,e,es\<rangle>)"  | 
| 
 
2c8caac48ade
modernized specifications ('definition', 'abbreviation', 'notation');
 
wenzelm 
parents: 
18095 
diff
changeset
 | 
228  | 
"Letrec xs = a in e" == "CONST CLetrec\<cdot>(\<Lambda> xs. \<langle>a,e\<rangle>)"  | 
| 
18093
 
587692219f69
put iterate and fix in separate sections; added Letrec
 
huffman 
parents: 
18092 
diff
changeset
 | 
229  | 
|
| 18095 | 230  | 
text {*
 | 
231  | 
Bekic's Theorem: Simultaneous fixed points over pairs  | 
|
232  | 
can be written in terms of separate fixed points.  | 
|
233  | 
*}  | 
|
234  | 
||
235  | 
lemma fix_cprod:  | 
|
236  | 
"fix\<cdot>(F::'a \<times> 'b \<rightarrow> 'a \<times> 'b) =  | 
|
237  | 
\<langle>\<mu> x. cfst\<cdot>(F\<cdot>\<langle>x, \<mu> y. csnd\<cdot>(F\<cdot>\<langle>x, y\<rangle>)\<rangle>),  | 
|
238  | 
\<mu> y. csnd\<cdot>(F\<cdot>\<langle>\<mu> x. cfst\<cdot>(F\<cdot>\<langle>x, \<mu> y. csnd\<cdot>(F\<cdot>\<langle>x, y\<rangle>)\<rangle>), y\<rangle>)\<rangle>"  | 
|
239  | 
(is "fix\<cdot>F = \<langle>?x, ?y\<rangle>")  | 
|
| 
27185
 
0407630909ef
change orientation of fix_eqI and convert to rule_format;
 
huffman 
parents: 
25927 
diff
changeset
 | 
240  | 
proof (rule fix_eqI)  | 
| 18095 | 241  | 
have 1: "cfst\<cdot>(F\<cdot>\<langle>?x, ?y\<rangle>) = ?x"  | 
242  | 
by (rule trans [symmetric, OF fix_eq], simp)  | 
|
243  | 
have 2: "csnd\<cdot>(F\<cdot>\<langle>?x, ?y\<rangle>) = ?y"  | 
|
244  | 
by (rule trans [symmetric, OF fix_eq], simp)  | 
|
245  | 
from 1 2 show "F\<cdot>\<langle>?x, ?y\<rangle> = \<langle>?x, ?y\<rangle>" by (simp add: eq_cprod)  | 
|
246  | 
next  | 
|
247  | 
fix z assume F_z: "F\<cdot>z = z"  | 
|
248  | 
then obtain x y where z: "z = \<langle>x,y\<rangle>" by (rule_tac p=z in cprodE)  | 
|
249  | 
from F_z z have F_x: "cfst\<cdot>(F\<cdot>\<langle>x, y\<rangle>) = x" by simp  | 
|
250  | 
from F_z z have F_y: "csnd\<cdot>(F\<cdot>\<langle>x, y\<rangle>) = y" by simp  | 
|
251  | 
let ?y1 = "\<mu> y. csnd\<cdot>(F\<cdot>\<langle>x, y\<rangle>)"  | 
|
252  | 
have "?y1 \<sqsubseteq> y" by (rule fix_least, simp add: F_y)  | 
|
253  | 
hence "cfst\<cdot>(F\<cdot>\<langle>x, ?y1\<rangle>) \<sqsubseteq> cfst\<cdot>(F\<cdot>\<langle>x, y\<rangle>)" by (simp add: monofun_cfun)  | 
|
254  | 
hence "cfst\<cdot>(F\<cdot>\<langle>x, ?y1\<rangle>) \<sqsubseteq> x" using F_x by simp  | 
|
| 
31076
 
99fe356cbbc2
rename constant sq_le to below; rename class sq_ord to below; less->below in many lemma names
 
huffman 
parents: 
29138 
diff
changeset
 | 
255  | 
hence 1: "?x \<sqsubseteq> x" by (simp add: fix_least_below)  | 
| 18095 | 256  | 
hence "csnd\<cdot>(F\<cdot>\<langle>?x, y\<rangle>) \<sqsubseteq> csnd\<cdot>(F\<cdot>\<langle>x, y\<rangle>)" by (simp add: monofun_cfun)  | 
257  | 
hence "csnd\<cdot>(F\<cdot>\<langle>?x, y\<rangle>) \<sqsubseteq> y" using F_y by simp  | 
|
| 
31076
 
99fe356cbbc2
rename constant sq_le to below; rename class sq_ord to below; less->below in many lemma names
 
huffman 
parents: 
29138 
diff
changeset
 | 
258  | 
hence 2: "?y \<sqsubseteq> y" by (simp add: fix_least_below)  | 
| 18095 | 259  | 
show "\<langle>?x, ?y\<rangle> \<sqsubseteq> z" using z 1 2 by simp  | 
260  | 
qed  | 
|
261  | 
||
| 
18090
 
9d5cfd71f510
moved adm_chfindom from Fix.thy to Cfun.thy; moved admw-related stuff to its own section
 
huffman 
parents: 
18078 
diff
changeset
 | 
262  | 
subsection {* Weak admissibility *}
 | 
| 
 
9d5cfd71f510
moved adm_chfindom from Fix.thy to Cfun.thy; moved admw-related stuff to its own section
 
huffman 
parents: 
18078 
diff
changeset
 | 
263  | 
|
| 
25131
 
2c8caac48ade
modernized specifications ('definition', 'abbreviation', 'notation');
 
wenzelm 
parents: 
18095 
diff
changeset
 | 
264  | 
definition  | 
| 
 
2c8caac48ade
modernized specifications ('definition', 'abbreviation', 'notation');
 
wenzelm 
parents: 
18095 
diff
changeset
 | 
265  | 
  admw :: "('a \<Rightarrow> bool) \<Rightarrow> bool" where
 | 
| 
 
2c8caac48ade
modernized specifications ('definition', 'abbreviation', 'notation');
 
wenzelm 
parents: 
18095 
diff
changeset
 | 
266  | 
"admw P = (\<forall>F. (\<forall>n. P (iterate n\<cdot>F\<cdot>\<bottom>)) \<longrightarrow> P (\<Squnion>i. iterate i\<cdot>F\<cdot>\<bottom>))"  | 
| 
15576
 
efb95d0d01f7
converted to new-style theories, and combined numbered files
 
huffman 
parents: 
14981 
diff
changeset
 | 
267  | 
|
| 
15637
 
d2a06007ebfa
changed comments to text blocks, cleaned up a few proofs
 
huffman 
parents: 
15577 
diff
changeset
 | 
268  | 
text {* an admissible formula is also weak admissible *}
 | 
| 
15576
 
efb95d0d01f7
converted to new-style theories, and combined numbered files
 
huffman 
parents: 
14981 
diff
changeset
 | 
269  | 
|
| 16214 | 270  | 
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
 | 
271  | 
apply (unfold admw_def)  | 
| 
 
efb95d0d01f7
converted to new-style theories, and combined numbered files
 
huffman 
parents: 
14981 
diff
changeset
 | 
272  | 
apply (intro strip)  | 
| 
 
efb95d0d01f7
converted to new-style theories, and combined numbered files
 
huffman 
parents: 
14981 
diff
changeset
 | 
273  | 
apply (erule admD)  | 
| 
 
efb95d0d01f7
converted to new-style theories, and combined numbered files
 
huffman 
parents: 
14981 
diff
changeset
 | 
274  | 
apply (rule chain_iterate)  | 
| 25925 | 275  | 
apply (erule spec)  | 
| 
15576
 
efb95d0d01f7
converted to new-style theories, and combined numbered files
 
huffman 
parents: 
14981 
diff
changeset
 | 
276  | 
done  | 
| 
 
efb95d0d01f7
converted to new-style theories, and combined numbered files
 
huffman 
parents: 
14981 
diff
changeset
 | 
277  | 
|
| 
15637
 
d2a06007ebfa
changed comments to text blocks, cleaned up a few proofs
 
huffman 
parents: 
15577 
diff
changeset
 | 
278  | 
text {* computational induction for weak admissible formulae *}
 | 
| 
15576
 
efb95d0d01f7
converted to new-style theories, and combined numbered files
 
huffman 
parents: 
14981 
diff
changeset
 | 
279  | 
|
| 
18074
 
a92b7c5133de
reorganized; removed intermediate constant Ifix; changed iterate to a continuous type; added theorem fix_least_less
 
huffman 
parents: 
17816 
diff
changeset
 | 
280  | 
lemma wfix_ind: "\<lbrakk>admw P; \<forall>n. P (iterate n\<cdot>F\<cdot>\<bottom>)\<rbrakk> \<Longrightarrow> P (fix\<cdot>F)"  | 
| 16214 | 281  | 
by (simp add: fix_def2 admw_def)  | 
| 
15576
 
efb95d0d01f7
converted to new-style theories, and combined numbered files
 
huffman 
parents: 
14981 
diff
changeset
 | 
282  | 
|
| 16214 | 283  | 
lemma def_wfix_ind:  | 
| 
18074
 
a92b7c5133de
reorganized; removed intermediate constant Ifix; changed iterate to a continuous type; added theorem fix_least_less
 
huffman 
parents: 
17816 
diff
changeset
 | 
284  | 
"\<lbrakk>f \<equiv> fix\<cdot>F; admw P; \<forall>n. P (iterate n\<cdot>F\<cdot>\<bottom>)\<rbrakk> \<Longrightarrow> P f"  | 
| 16214 | 285  | 
by (simp, rule wfix_ind)  | 
| 
15576
 
efb95d0d01f7
converted to new-style theories, and combined numbered files
 
huffman 
parents: 
14981 
diff
changeset
 | 
286  | 
|
| 
243
 
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
 
nipkow 
parents:  
diff
changeset
 | 
287  | 
end  |