author | huffman |
Thu, 10 Mar 2005 20:22:45 +0100 | |
changeset 15600 | a59f07556a8d |
parent 15589 | 69bea57212ef |
child 15641 | b389f108c485 |
permissions | -rw-r--r-- |
15600 | 1 |
(* Title: HOLCF/Cfun.thy |
15576
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
2 |
ID: $Id$ |
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
3 |
Author: Franz Regensburger |
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
4 |
License: GPL (GNU GENERAL PUBLIC LICENSE) |
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
5 |
|
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
6 |
Definition of the type -> of continuous functions. |
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
7 |
|
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
8 |
*) |
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
9 |
|
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
10 |
header {* The type of continuous functions *} |
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
11 |
|
15577 | 12 |
theory Cfun |
13 |
imports Cont |
|
14 |
begin |
|
15576
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
15 |
|
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
16 |
defaultsort cpo |
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
17 |
|
15589
69bea57212ef
reordered and arranged for document generation, cleaned up some proofs
huffman
parents:
15577
diff
changeset
|
18 |
subsection {* Definition of continuous function type *} |
69bea57212ef
reordered and arranged for document generation, cleaned up some proofs
huffman
parents:
15577
diff
changeset
|
19 |
|
15576
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
20 |
typedef (CFun) ('a, 'b) "->" (infixr 0) = "{f::'a => 'b. cont f}" |
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
21 |
by (rule exI, rule CfunI) |
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
22 |
|
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
23 |
syntax |
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
24 |
Rep_CFun :: "('a -> 'b) => ('a => 'b)" ("_$_" [999,1000] 999) |
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
25 |
(* application *) |
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
26 |
Abs_CFun :: "('a => 'b) => ('a -> 'b)" (binder "LAM " 10) |
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
27 |
(* abstraction *) |
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
28 |
less_cfun :: "[('a -> 'b),('a -> 'b)]=>bool" |
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
29 |
|
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
30 |
syntax (xsymbols) |
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
31 |
"->" :: "[type, type] => type" ("(_ \<rightarrow>/ _)" [1,0]0) |
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
32 |
"LAM " :: "[idts, 'a => 'b] => ('a -> 'b)" |
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
33 |
("(3\<Lambda>_./ _)" [0, 10] 10) |
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
34 |
Rep_CFun :: "('a -> 'b) => ('a => 'b)" ("(_\<cdot>_)" [999,1000] 999) |
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
35 |
|
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
36 |
syntax (HTML output) |
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
37 |
Rep_CFun :: "('a -> 'b) => ('a => 'b)" ("(_\<cdot>_)" [999,1000] 999) |
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
38 |
|
15589
69bea57212ef
reordered and arranged for document generation, cleaned up some proofs
huffman
parents:
15577
diff
changeset
|
39 |
text {* |
69bea57212ef
reordered and arranged for document generation, cleaned up some proofs
huffman
parents:
15577
diff
changeset
|
40 |
Derive old type definition rules for @{term Abs_CFun} \& @{term Rep_CFun}. |
69bea57212ef
reordered and arranged for document generation, cleaned up some proofs
huffman
parents:
15577
diff
changeset
|
41 |
@{term Rep_CFun} and @{term Abs_CFun} should be replaced by |
69bea57212ef
reordered and arranged for document generation, cleaned up some proofs
huffman
parents:
15577
diff
changeset
|
42 |
@{term Rep_Cfun} and @{term Abs_Cfun} in future. |
69bea57212ef
reordered and arranged for document generation, cleaned up some proofs
huffman
parents:
15577
diff
changeset
|
43 |
*} |
15576
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
44 |
|
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
45 |
lemma Rep_Cfun: "Rep_CFun fo : CFun" |
15589
69bea57212ef
reordered and arranged for document generation, cleaned up some proofs
huffman
parents:
15577
diff
changeset
|
46 |
by (rule Rep_CFun) |
15576
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
47 |
|
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
48 |
lemma Rep_Cfun_inverse: "Abs_CFun (Rep_CFun fo) = fo" |
15589
69bea57212ef
reordered and arranged for document generation, cleaned up some proofs
huffman
parents:
15577
diff
changeset
|
49 |
by (rule Rep_CFun_inverse) |
15576
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
50 |
|
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
51 |
lemma Abs_Cfun_inverse: "f:CFun==>Rep_CFun(Abs_CFun f)=f" |
15589
69bea57212ef
reordered and arranged for document generation, cleaned up some proofs
huffman
parents:
15577
diff
changeset
|
52 |
by (erule Abs_CFun_inverse) |
15576
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
53 |
|
15589
69bea57212ef
reordered and arranged for document generation, cleaned up some proofs
huffman
parents:
15577
diff
changeset
|
54 |
text {* Additional lemma about the isomorphism between |
69bea57212ef
reordered and arranged for document generation, cleaned up some proofs
huffman
parents:
15577
diff
changeset
|
55 |
@{typ "'a -> 'b"} and @{term Cfun} *} |
15576
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
56 |
|
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
57 |
lemma Abs_Cfun_inverse2: "cont f ==> Rep_CFun (Abs_CFun f) = f" |
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
58 |
apply (rule Abs_Cfun_inverse) |
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
59 |
apply (unfold CFun_def) |
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
60 |
apply (erule mem_Collect_eq [THEN ssubst]) |
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
61 |
done |
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
62 |
|
15589
69bea57212ef
reordered and arranged for document generation, cleaned up some proofs
huffman
parents:
15577
diff
changeset
|
63 |
text {* Simplification of application *} |
15576
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
64 |
|
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
65 |
lemma Cfunapp2: "cont f ==> (Abs_CFun f)$x = f x" |
15589
69bea57212ef
reordered and arranged for document generation, cleaned up some proofs
huffman
parents:
15577
diff
changeset
|
66 |
by (erule Abs_Cfun_inverse2 [THEN fun_cong]) |
15576
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
67 |
|
15589
69bea57212ef
reordered and arranged for document generation, cleaned up some proofs
huffman
parents:
15577
diff
changeset
|
68 |
text {* Beta - equality for continuous functions *} |
15576
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
69 |
|
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
70 |
lemma beta_cfun: "cont(c1) ==> (LAM x .c1 x)$u = c1 u" |
15589
69bea57212ef
reordered and arranged for document generation, cleaned up some proofs
huffman
parents:
15577
diff
changeset
|
71 |
by (rule Cfunapp2) |
69bea57212ef
reordered and arranged for document generation, cleaned up some proofs
huffman
parents:
15577
diff
changeset
|
72 |
|
69bea57212ef
reordered and arranged for document generation, cleaned up some proofs
huffman
parents:
15577
diff
changeset
|
73 |
subsection {* Type @{typ "'a -> 'b"} is a partial order *} |
69bea57212ef
reordered and arranged for document generation, cleaned up some proofs
huffman
parents:
15577
diff
changeset
|
74 |
|
69bea57212ef
reordered and arranged for document generation, cleaned up some proofs
huffman
parents:
15577
diff
changeset
|
75 |
instance "->" :: (cpo, cpo) sq_ord .. |
15576
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
76 |
|
15589
69bea57212ef
reordered and arranged for document generation, cleaned up some proofs
huffman
parents:
15577
diff
changeset
|
77 |
defs (overloaded) |
69bea57212ef
reordered and arranged for document generation, cleaned up some proofs
huffman
parents:
15577
diff
changeset
|
78 |
less_cfun_def: "(op <<) == (% fo1 fo2. Rep_CFun fo1 << Rep_CFun fo2 )" |
15576
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
79 |
|
15589
69bea57212ef
reordered and arranged for document generation, cleaned up some proofs
huffman
parents:
15577
diff
changeset
|
80 |
lemma refl_less_cfun: "(f::'a->'b) << f" |
69bea57212ef
reordered and arranged for document generation, cleaned up some proofs
huffman
parents:
15577
diff
changeset
|
81 |
by (unfold less_cfun_def, rule refl_less) |
15576
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
82 |
|
15589
69bea57212ef
reordered and arranged for document generation, cleaned up some proofs
huffman
parents:
15577
diff
changeset
|
83 |
lemma antisym_less_cfun: |
69bea57212ef
reordered and arranged for document generation, cleaned up some proofs
huffman
parents:
15577
diff
changeset
|
84 |
"[|(f1::'a->'b) << f2; f2 << f1|] ==> f1 = f2" |
69bea57212ef
reordered and arranged for document generation, cleaned up some proofs
huffman
parents:
15577
diff
changeset
|
85 |
by (unfold less_cfun_def, rule Rep_CFun_inject[THEN iffD1], rule antisym_less) |
15576
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
86 |
|
15589
69bea57212ef
reordered and arranged for document generation, cleaned up some proofs
huffman
parents:
15577
diff
changeset
|
87 |
lemma trans_less_cfun: |
69bea57212ef
reordered and arranged for document generation, cleaned up some proofs
huffman
parents:
15577
diff
changeset
|
88 |
"[|(f1::'a->'b) << f2; f2 << f3|] ==> f1 << f3" |
69bea57212ef
reordered and arranged for document generation, cleaned up some proofs
huffman
parents:
15577
diff
changeset
|
89 |
by (unfold less_cfun_def, rule trans_less) |
15576
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
90 |
|
15589
69bea57212ef
reordered and arranged for document generation, cleaned up some proofs
huffman
parents:
15577
diff
changeset
|
91 |
instance "->" :: (cpo, cpo) po |
69bea57212ef
reordered and arranged for document generation, cleaned up some proofs
huffman
parents:
15577
diff
changeset
|
92 |
by intro_classes |
69bea57212ef
reordered and arranged for document generation, cleaned up some proofs
huffman
parents:
15577
diff
changeset
|
93 |
(assumption | rule refl_less_cfun antisym_less_cfun trans_less_cfun)+ |
69bea57212ef
reordered and arranged for document generation, cleaned up some proofs
huffman
parents:
15577
diff
changeset
|
94 |
|
69bea57212ef
reordered and arranged for document generation, cleaned up some proofs
huffman
parents:
15577
diff
changeset
|
95 |
text {* for compatibility with old HOLCF-Version *} |
15576
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
96 |
lemma inst_cfun_po: "(op <<)=(%f1 f2. Rep_CFun f1 << Rep_CFun f2)" |
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
97 |
apply (fold less_cfun_def) |
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
98 |
apply (rule refl) |
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
99 |
done |
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
100 |
|
15589
69bea57212ef
reordered and arranged for document generation, cleaned up some proofs
huffman
parents:
15577
diff
changeset
|
101 |
text {* lemmas about application of continuous functions *} |
69bea57212ef
reordered and arranged for document generation, cleaned up some proofs
huffman
parents:
15577
diff
changeset
|
102 |
|
69bea57212ef
reordered and arranged for document generation, cleaned up some proofs
huffman
parents:
15577
diff
changeset
|
103 |
lemma cfun_cong: "[| f=g; x=y |] ==> f$x = g$y" |
69bea57212ef
reordered and arranged for document generation, cleaned up some proofs
huffman
parents:
15577
diff
changeset
|
104 |
by simp |
69bea57212ef
reordered and arranged for document generation, cleaned up some proofs
huffman
parents:
15577
diff
changeset
|
105 |
|
69bea57212ef
reordered and arranged for document generation, cleaned up some proofs
huffman
parents:
15577
diff
changeset
|
106 |
lemma cfun_fun_cong: "f=g ==> f$x = g$x" |
69bea57212ef
reordered and arranged for document generation, cleaned up some proofs
huffman
parents:
15577
diff
changeset
|
107 |
by simp |
69bea57212ef
reordered and arranged for document generation, cleaned up some proofs
huffman
parents:
15577
diff
changeset
|
108 |
|
69bea57212ef
reordered and arranged for document generation, cleaned up some proofs
huffman
parents:
15577
diff
changeset
|
109 |
lemma cfun_arg_cong: "x=y ==> f$x = f$y" |
69bea57212ef
reordered and arranged for document generation, cleaned up some proofs
huffman
parents:
15577
diff
changeset
|
110 |
by simp |
69bea57212ef
reordered and arranged for document generation, cleaned up some proofs
huffman
parents:
15577
diff
changeset
|
111 |
|
69bea57212ef
reordered and arranged for document generation, cleaned up some proofs
huffman
parents:
15577
diff
changeset
|
112 |
text {* access to @{term less_cfun} in class po *} |
15576
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
113 |
|
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
114 |
lemma less_cfun: "( f1 << f2 ) = (Rep_CFun(f1) << Rep_CFun(f2))" |
15589
69bea57212ef
reordered and arranged for document generation, cleaned up some proofs
huffman
parents:
15577
diff
changeset
|
115 |
by (simp add: inst_cfun_po) |
15576
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
116 |
|
15589
69bea57212ef
reordered and arranged for document generation, cleaned up some proofs
huffman
parents:
15577
diff
changeset
|
117 |
subsection {* Type @{typ "'a -> 'b"} is pointed *} |
15576
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
118 |
|
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
119 |
lemma minimal_cfun: "Abs_CFun(% x. UU) << f" |
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
120 |
apply (subst less_cfun) |
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
121 |
apply (subst Abs_Cfun_inverse2) |
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
122 |
apply (rule cont_const) |
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
123 |
apply (rule minimal_fun) |
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
124 |
done |
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
125 |
|
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
126 |
lemmas UU_cfun_def = minimal_cfun [THEN minimal2UU, symmetric, standard] |
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
127 |
|
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
128 |
lemma least_cfun: "? x::'a->'b::pcpo.!y. x<<y" |
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
129 |
apply (rule_tac x = "Abs_CFun (% x. UU) " in exI) |
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
130 |
apply (rule minimal_cfun [THEN allI]) |
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
131 |
done |
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
132 |
|
15589
69bea57212ef
reordered and arranged for document generation, cleaned up some proofs
huffman
parents:
15577
diff
changeset
|
133 |
subsection {* Monotonicity of application *} |
69bea57212ef
reordered and arranged for document generation, cleaned up some proofs
huffman
parents:
15577
diff
changeset
|
134 |
|
69bea57212ef
reordered and arranged for document generation, cleaned up some proofs
huffman
parents:
15577
diff
changeset
|
135 |
text {* |
69bea57212ef
reordered and arranged for document generation, cleaned up some proofs
huffman
parents:
15577
diff
changeset
|
136 |
@{term Rep_CFun} yields continuous functions in @{typ "'a => 'b"}. |
69bea57212ef
reordered and arranged for document generation, cleaned up some proofs
huffman
parents:
15577
diff
changeset
|
137 |
This is continuity of @{term Rep_CFun} in its 'second' argument: |
69bea57212ef
reordered and arranged for document generation, cleaned up some proofs
huffman
parents:
15577
diff
changeset
|
138 |
@{prop "cont_Rep_CFun2 ==> monofun_Rep_CFun2 & contlub_Rep_CFun2"} |
69bea57212ef
reordered and arranged for document generation, cleaned up some proofs
huffman
parents:
15577
diff
changeset
|
139 |
*} |
15576
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
140 |
|
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
141 |
lemma cont_Rep_CFun2: "cont(Rep_CFun(fo))" |
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
142 |
apply (rule_tac P = "cont" in CollectD) |
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
143 |
apply (fold CFun_def) |
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
144 |
apply (rule Rep_Cfun) |
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
145 |
done |
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
146 |
|
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
147 |
lemmas monofun_Rep_CFun2 = cont_Rep_CFun2 [THEN cont2mono, standard] |
15589
69bea57212ef
reordered and arranged for document generation, cleaned up some proofs
huffman
parents:
15577
diff
changeset
|
148 |
-- {* @{thm monofun_Rep_CFun2} *} (* monofun(Rep_CFun(?fo)) *) |
15576
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
149 |
|
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
150 |
lemmas contlub_Rep_CFun2 = cont_Rep_CFun2 [THEN cont2contlub, standard] |
15589
69bea57212ef
reordered and arranged for document generation, cleaned up some proofs
huffman
parents:
15577
diff
changeset
|
151 |
-- {* @{thm contlub_Rep_CFun2} *} (* contlub(Rep_CFun(?fo)) *) |
15576
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
152 |
|
15589
69bea57212ef
reordered and arranged for document generation, cleaned up some proofs
huffman
parents:
15577
diff
changeset
|
153 |
text {* expanded thms @{thm [source] cont_Rep_CFun2}, @{thm [source] contlub_Rep_CFun2} look nice with mixfix syntax *} |
15576
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
154 |
|
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
155 |
lemmas cont_cfun_arg = cont_Rep_CFun2 [THEN contE, THEN spec, THEN mp] |
15589
69bea57212ef
reordered and arranged for document generation, cleaned up some proofs
huffman
parents:
15577
diff
changeset
|
156 |
-- {* @{thm cont_cfun_arg} *} (* chain(x1) ==> range (%i. fo3$(x1 i)) <<| fo3$(lub (range ?x1)) *) |
15576
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
157 |
|
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
158 |
lemmas contlub_cfun_arg = contlub_Rep_CFun2 [THEN contlubE, THEN spec, THEN mp] |
15589
69bea57212ef
reordered and arranged for document generation, cleaned up some proofs
huffman
parents:
15577
diff
changeset
|
159 |
-- {* @{thm contlub_cfun_arg} *} (* chain(?x1) ==> ?fo4$(lub (range ?x1)) = lub (range (%i. ?fo4$(?x1 i))) *) |
15576
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
160 |
|
15589
69bea57212ef
reordered and arranged for document generation, cleaned up some proofs
huffman
parents:
15577
diff
changeset
|
161 |
text {* @{term Rep_CFun} is monotone in its 'first' argument *} |
15576
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
162 |
|
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
163 |
lemma monofun_Rep_CFun1: "monofun(Rep_CFun)" |
15589
69bea57212ef
reordered and arranged for document generation, cleaned up some proofs
huffman
parents:
15577
diff
changeset
|
164 |
apply (rule monofunI [rule_format]) |
15576
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
165 |
apply (erule less_cfun [THEN subst]) |
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
166 |
done |
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
167 |
|
15589
69bea57212ef
reordered and arranged for document generation, cleaned up some proofs
huffman
parents:
15577
diff
changeset
|
168 |
text {* monotonicity of application @{term Rep_CFun} in mixfix syntax @{text "[_]_"} *} |
15576
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
169 |
|
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
170 |
lemma monofun_cfun_fun: "f1 << f2 ==> f1$x << f2$x" |
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
171 |
apply (rule_tac x = "x" in spec) |
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
172 |
apply (rule less_fun [THEN subst]) |
15589
69bea57212ef
reordered and arranged for document generation, cleaned up some proofs
huffman
parents:
15577
diff
changeset
|
173 |
apply (erule monofun_Rep_CFun1 [THEN monofunE [rule_format]]) |
15576
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
174 |
done |
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
175 |
|
15589
69bea57212ef
reordered and arranged for document generation, cleaned up some proofs
huffman
parents:
15577
diff
changeset
|
176 |
lemmas monofun_cfun_arg = monofun_Rep_CFun2 [THEN monofunE [rule_format], standard] |
69bea57212ef
reordered and arranged for document generation, cleaned up some proofs
huffman
parents:
15577
diff
changeset
|
177 |
-- {* @{thm monofun_cfun_arg} *} (* ?x2 << ?x1 ==> ?fo5$?x2 << ?fo5$?x1 *) |
15576
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
178 |
|
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
179 |
lemma chain_monofun: "chain Y ==> chain (%i. f\<cdot>(Y i))" |
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
180 |
apply (rule chainI) |
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
181 |
apply (rule monofun_cfun_arg) |
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
182 |
apply (erule chainE) |
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
183 |
done |
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
184 |
|
15589
69bea57212ef
reordered and arranged for document generation, cleaned up some proofs
huffman
parents:
15577
diff
changeset
|
185 |
text {* monotonicity of @{term Rep_CFun} in both arguments in mixfix syntax @{text "[_]_"} *} |
15576
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
186 |
|
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
187 |
lemma monofun_cfun: "[|f1<<f2;x1<<x2|] ==> f1$x1 << f2$x2" |
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
188 |
apply (rule trans_less) |
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
189 |
apply (erule monofun_cfun_arg) |
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
190 |
apply (erule monofun_cfun_fun) |
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
191 |
done |
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
192 |
|
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
193 |
lemma strictI: "f$x = UU ==> f$UU = UU" |
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
194 |
apply (rule eq_UU_iff [THEN iffD2]) |
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
195 |
apply (erule subst) |
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
196 |
apply (rule minimal [THEN monofun_cfun_arg]) |
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
197 |
done |
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
198 |
|
15589
69bea57212ef
reordered and arranged for document generation, cleaned up some proofs
huffman
parents:
15577
diff
changeset
|
199 |
subsection {* Type @{typ "'a -> 'b"} is a cpo *} |
15576
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
200 |
|
15589
69bea57212ef
reordered and arranged for document generation, cleaned up some proofs
huffman
parents:
15577
diff
changeset
|
201 |
text {* ch2ch - rules for the type @{typ "'a -> 'b"} use MF2 lemmas from Cont.thy *} |
15576
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
202 |
|
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
203 |
lemma ch2ch_Rep_CFunR: "chain(Y) ==> chain(%i. f$(Y i))" |
15589
69bea57212ef
reordered and arranged for document generation, cleaned up some proofs
huffman
parents:
15577
diff
changeset
|
204 |
by (erule monofun_Rep_CFun2 [THEN ch2ch_MF2R]) |
15576
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
205 |
|
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
206 |
lemmas ch2ch_Rep_CFunL = monofun_Rep_CFun1 [THEN ch2ch_MF2L, standard] |
15589
69bea57212ef
reordered and arranged for document generation, cleaned up some proofs
huffman
parents:
15577
diff
changeset
|
207 |
-- {* @{thm ch2ch_Rep_CFunL} *} (* chain(?F) ==> chain (%i. ?F i$?x) *) |
15576
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
208 |
|
15589
69bea57212ef
reordered and arranged for document generation, cleaned up some proofs
huffman
parents:
15577
diff
changeset
|
209 |
text {* the lub of a chain of continous functions is monotone: uses MF2 lemmas from Cont.thy *} |
15576
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
210 |
|
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
211 |
lemma lub_cfun_mono: "chain(F) ==> monofun(% x. lub(range(% j.(F j)$x)))" |
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
212 |
apply (rule lub_MF2_mono) |
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
213 |
apply (rule monofun_Rep_CFun1) |
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
214 |
apply (rule monofun_Rep_CFun2 [THEN allI]) |
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
215 |
apply assumption |
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
216 |
done |
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
217 |
|
15589
69bea57212ef
reordered and arranged for document generation, cleaned up some proofs
huffman
parents:
15577
diff
changeset
|
218 |
text {* a lemma about the exchange of lubs for type @{typ "'a -> 'b"}: uses MF2 lemmas from Cont.thy *} |
15576
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
219 |
|
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
220 |
lemma ex_lubcfun: "[| chain(F); chain(Y) |] ==> |
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
221 |
lub(range(%j. lub(range(%i. F(j)$(Y i))))) = |
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
222 |
lub(range(%i. lub(range(%j. F(j)$(Y i)))))" |
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
223 |
apply (rule ex_lubMF2) |
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
224 |
apply (rule monofun_Rep_CFun1) |
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
225 |
apply (rule monofun_Rep_CFun2 [THEN allI]) |
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
226 |
apply assumption |
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
227 |
apply assumption |
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
228 |
done |
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
229 |
|
15589
69bea57212ef
reordered and arranged for document generation, cleaned up some proofs
huffman
parents:
15577
diff
changeset
|
230 |
text {* the lub of a chain of cont. functions is continuous *} |
15576
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
231 |
|
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
232 |
lemma cont_lubcfun: "chain(F) ==> cont(% x. lub(range(% j. F(j)$x)))" |
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
233 |
apply (rule monocontlub2cont) |
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
234 |
apply (erule lub_cfun_mono) |
15589
69bea57212ef
reordered and arranged for document generation, cleaned up some proofs
huffman
parents:
15577
diff
changeset
|
235 |
apply (rule contlubI [rule_format]) |
15576
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
236 |
apply (subst contlub_cfun_arg [THEN ext]) |
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
237 |
apply assumption |
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
238 |
apply (erule ex_lubcfun) |
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
239 |
apply assumption |
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
240 |
done |
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
241 |
|
15589
69bea57212ef
reordered and arranged for document generation, cleaned up some proofs
huffman
parents:
15577
diff
changeset
|
242 |
text {* type @{typ "'a -> 'b"} is chain complete *} |
15576
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
243 |
|
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
244 |
lemma lub_cfun: "chain(CCF) ==> range(CCF) <<| (LAM x. lub(range(% i. CCF(i)$x)))" |
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
245 |
apply (rule is_lubI) |
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
246 |
apply (rule ub_rangeI) |
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
247 |
apply (subst less_cfun) |
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
248 |
apply (subst Abs_Cfun_inverse2) |
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
249 |
apply (erule cont_lubcfun) |
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
250 |
apply (rule lub_fun [THEN is_lubD1, THEN ub_rangeD]) |
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
251 |
apply (erule monofun_Rep_CFun1 [THEN ch2ch_monofun]) |
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
252 |
apply (subst less_cfun) |
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
253 |
apply (subst Abs_Cfun_inverse2) |
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
254 |
apply (erule cont_lubcfun) |
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
255 |
apply (rule lub_fun [THEN is_lub_lub]) |
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
256 |
apply (erule monofun_Rep_CFun1 [THEN ch2ch_monofun]) |
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
257 |
apply (erule monofun_Rep_CFun1 [THEN ub2ub_monofun]) |
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
258 |
done |
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
259 |
|
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
260 |
lemmas thelub_cfun = lub_cfun [THEN thelubI, standard] |
15589
69bea57212ef
reordered and arranged for document generation, cleaned up some proofs
huffman
parents:
15577
diff
changeset
|
261 |
-- {* @{thm thelub_cfun} *} (* |
15576
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
262 |
chain(?CCF1) ==> lub (range ?CCF1) = (LAM x. lub (range (%i. ?CCF1 i$x))) |
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
263 |
*) |
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
264 |
|
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
265 |
lemma cpo_cfun: "chain(CCF::nat=>('a->'b)) ==> ? x. range(CCF) <<| x" |
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
266 |
apply (rule exI) |
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
267 |
apply (erule lub_cfun) |
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
268 |
done |
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
269 |
|
15589
69bea57212ef
reordered and arranged for document generation, cleaned up some proofs
huffman
parents:
15577
diff
changeset
|
270 |
instance "->" :: (cpo, cpo) cpo |
69bea57212ef
reordered and arranged for document generation, cleaned up some proofs
huffman
parents:
15577
diff
changeset
|
271 |
by intro_classes (rule cpo_cfun) |
15576
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
272 |
|
15589
69bea57212ef
reordered and arranged for document generation, cleaned up some proofs
huffman
parents:
15577
diff
changeset
|
273 |
subsection {* Miscellaneous *} |
69bea57212ef
reordered and arranged for document generation, cleaned up some proofs
huffman
parents:
15577
diff
changeset
|
274 |
|
69bea57212ef
reordered and arranged for document generation, cleaned up some proofs
huffman
parents:
15577
diff
changeset
|
275 |
text {* Extensionality in @{typ "'a -> 'b"} *} |
15576
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
276 |
|
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
277 |
lemma ext_cfun: "(!!x. f$x = g$x) ==> f = g" |
15589
69bea57212ef
reordered and arranged for document generation, cleaned up some proofs
huffman
parents:
15577
diff
changeset
|
278 |
apply (rule Rep_CFun_inject [THEN iffD1]) |
15576
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
279 |
apply (rule ext) |
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
280 |
apply simp |
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
281 |
done |
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
282 |
|
15589
69bea57212ef
reordered and arranged for document generation, cleaned up some proofs
huffman
parents:
15577
diff
changeset
|
283 |
text {* Monotonicity of @{term Abs_CFun} *} |
15576
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
284 |
|
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
285 |
lemma semi_monofun_Abs_CFun: "[| cont(f); cont(g); f<<g|] ==> Abs_CFun(f)<<Abs_CFun(g)" |
15589
69bea57212ef
reordered and arranged for document generation, cleaned up some proofs
huffman
parents:
15577
diff
changeset
|
286 |
by (simp add: less_cfun Abs_Cfun_inverse2) |
15576
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
287 |
|
15589
69bea57212ef
reordered and arranged for document generation, cleaned up some proofs
huffman
parents:
15577
diff
changeset
|
288 |
text {* Extensionality wrt. @{term "op <<"} in @{typ "'a -> 'b"} *} |
15576
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
289 |
|
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
290 |
lemma less_cfun2: "(!!x. f$x << g$x) ==> f << g" |
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
291 |
apply (rule_tac t = "f" in Rep_Cfun_inverse [THEN subst]) |
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
292 |
apply (rule_tac t = "g" in Rep_Cfun_inverse [THEN subst]) |
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
293 |
apply (rule semi_monofun_Abs_CFun) |
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
294 |
apply (rule cont_Rep_CFun2) |
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
295 |
apply (rule cont_Rep_CFun2) |
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
296 |
apply (rule less_fun [THEN iffD2]) |
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
297 |
apply simp |
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
298 |
done |
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
299 |
|
15589
69bea57212ef
reordered and arranged for document generation, cleaned up some proofs
huffman
parents:
15577
diff
changeset
|
300 |
subsection {* Class instance of @{typ "'a -> 'b"} for class pcpo *} |
15576
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
301 |
|
15589
69bea57212ef
reordered and arranged for document generation, cleaned up some proofs
huffman
parents:
15577
diff
changeset
|
302 |
instance "->" :: (cpo, pcpo) pcpo |
15576
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
303 |
by (intro_classes, rule least_cfun) |
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
304 |
|
15589
69bea57212ef
reordered and arranged for document generation, cleaned up some proofs
huffman
parents:
15577
diff
changeset
|
305 |
text {* for compatibility with old HOLCF-Version *} |
15576
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
306 |
lemma inst_cfun_pcpo: "UU = Abs_CFun(%x. UU)" |
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
307 |
apply (simp add: UU_def UU_cfun_def) |
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
308 |
done |
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
309 |
|
15589
69bea57212ef
reordered and arranged for document generation, cleaned up some proofs
huffman
parents:
15577
diff
changeset
|
310 |
defaultsort pcpo |
69bea57212ef
reordered and arranged for document generation, cleaned up some proofs
huffman
parents:
15577
diff
changeset
|
311 |
|
69bea57212ef
reordered and arranged for document generation, cleaned up some proofs
huffman
parents:
15577
diff
changeset
|
312 |
subsection {* Continuity of application *} |
69bea57212ef
reordered and arranged for document generation, cleaned up some proofs
huffman
parents:
15577
diff
changeset
|
313 |
|
69bea57212ef
reordered and arranged for document generation, cleaned up some proofs
huffman
parents:
15577
diff
changeset
|
314 |
text {* the contlub property for @{term Rep_CFun} its 'first' argument *} |
15576
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
315 |
|
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
316 |
lemma contlub_Rep_CFun1: "contlub(Rep_CFun)" |
15589
69bea57212ef
reordered and arranged for document generation, cleaned up some proofs
huffman
parents:
15577
diff
changeset
|
317 |
apply (rule contlubI [rule_format]) |
69bea57212ef
reordered and arranged for document generation, cleaned up some proofs
huffman
parents:
15577
diff
changeset
|
318 |
apply (rule ext) |
15576
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
319 |
apply (subst thelub_cfun) |
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
320 |
apply assumption |
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
321 |
apply (subst Cfunapp2) |
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
322 |
apply (erule cont_lubcfun) |
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
323 |
apply (subst thelub_fun) |
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
324 |
apply (erule monofun_Rep_CFun1 [THEN ch2ch_monofun]) |
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
325 |
apply (rule refl) |
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
326 |
done |
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
327 |
|
15589
69bea57212ef
reordered and arranged for document generation, cleaned up some proofs
huffman
parents:
15577
diff
changeset
|
328 |
text {* the cont property for @{term Rep_CFun} in its first argument *} |
15576
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
329 |
|
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
330 |
lemma cont_Rep_CFun1: "cont(Rep_CFun)" |
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
331 |
apply (rule monocontlub2cont) |
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
332 |
apply (rule monofun_Rep_CFun1) |
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
333 |
apply (rule contlub_Rep_CFun1) |
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
334 |
done |
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
335 |
|
15589
69bea57212ef
reordered and arranged for document generation, cleaned up some proofs
huffman
parents:
15577
diff
changeset
|
336 |
text {* contlub, cont properties of @{term Rep_CFun} in its first argument in mixfix @{text "_[_]"} *} |
15576
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
337 |
|
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
338 |
lemma contlub_cfun_fun: |
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
339 |
"chain(FY) ==> |
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
340 |
lub(range FY)$x = lub(range (%i. FY(i)$x))" |
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
341 |
apply (rule trans) |
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
342 |
apply (erule contlub_Rep_CFun1 [THEN contlubE, THEN spec, THEN mp, THEN fun_cong]) |
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
343 |
apply (subst thelub_fun) |
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
344 |
apply (erule monofun_Rep_CFun1 [THEN ch2ch_monofun]) |
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
345 |
apply (rule refl) |
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
346 |
done |
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
347 |
|
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
348 |
lemma cont_cfun_fun: |
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
349 |
"chain(FY) ==> |
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
350 |
range(%i. FY(i)$x) <<| lub(range FY)$x" |
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
351 |
apply (rule thelubE) |
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
352 |
apply (erule ch2ch_Rep_CFunL) |
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
353 |
apply (erule contlub_cfun_fun [symmetric]) |
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
354 |
done |
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
355 |
|
15589
69bea57212ef
reordered and arranged for document generation, cleaned up some proofs
huffman
parents:
15577
diff
changeset
|
356 |
text {* contlub, cont properties of @{term Rep_CFun} in both argument in mixfix @{text "_[_]"} *} |
15576
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
357 |
|
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
358 |
lemma contlub_cfun: |
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
359 |
"[|chain(FY);chain(TY)|] ==> |
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
360 |
(lub(range FY))$(lub(range TY)) = lub(range(%i. FY(i)$(TY i)))" |
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
361 |
apply (rule contlub_CF2) |
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
362 |
apply (rule cont_Rep_CFun1) |
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
363 |
apply (rule allI) |
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
364 |
apply (rule cont_Rep_CFun2) |
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
365 |
apply assumption |
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
366 |
apply assumption |
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
367 |
done |
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
368 |
|
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
369 |
lemma cont_cfun: |
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
370 |
"[|chain(FY);chain(TY)|] ==> |
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
371 |
range(%i.(FY i)$(TY i)) <<| (lub (range FY))$(lub(range TY))" |
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
372 |
apply (rule thelubE) |
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
373 |
apply (rule monofun_Rep_CFun1 [THEN ch2ch_MF2LR]) |
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
374 |
apply (rule allI) |
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
375 |
apply (rule monofun_Rep_CFun2) |
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
376 |
apply assumption |
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
377 |
apply assumption |
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
378 |
apply (erule contlub_cfun [symmetric]) |
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
379 |
apply assumption |
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
380 |
done |
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
381 |
|
15589
69bea57212ef
reordered and arranged for document generation, cleaned up some proofs
huffman
parents:
15577
diff
changeset
|
382 |
text {* cont2cont lemma for @{term Rep_CFun} *} |
15576
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
383 |
|
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
384 |
lemma cont2cont_Rep_CFun: "[|cont(%x. ft x);cont(%x. tt x)|] ==> cont(%x. (ft x)$(tt x))" |
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
385 |
apply (best intro: cont2cont_app2 cont_const cont_Rep_CFun1 cont_Rep_CFun2) |
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
386 |
done |
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
387 |
|
15589
69bea57212ef
reordered and arranged for document generation, cleaned up some proofs
huffman
parents:
15577
diff
changeset
|
388 |
text {* cont2mono Lemma for @{term "%x. LAM y. c1(x)(y)"} *} |
15576
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
389 |
|
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
390 |
lemma cont2mono_LAM: |
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
391 |
assumes p1: "!!x. cont(c1 x)" |
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
392 |
assumes p2: "!!y. monofun(%x. c1 x y)" |
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
393 |
shows "monofun(%x. LAM y. c1 x y)" |
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
394 |
apply (rule monofunI) |
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
395 |
apply (intro strip) |
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
396 |
apply (subst less_cfun) |
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
397 |
apply (subst less_fun) |
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
398 |
apply (rule allI) |
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
399 |
apply (subst beta_cfun) |
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
400 |
apply (rule p1) |
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
401 |
apply (subst beta_cfun) |
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
402 |
apply (rule p1) |
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
403 |
apply (erule p2 [THEN monofunE, THEN spec, THEN spec, THEN mp]) |
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
404 |
done |
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
405 |
|
15589
69bea57212ef
reordered and arranged for document generation, cleaned up some proofs
huffman
parents:
15577
diff
changeset
|
406 |
text {* cont2cont Lemma for @{term "%x. LAM y. c1 x y"} *} |
15576
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
407 |
|
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
408 |
lemma cont2cont_LAM: |
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
409 |
assumes p1: "!!x. cont(c1 x)" |
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
410 |
assumes p2: "!!y. cont(%x. c1 x y)" |
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
411 |
shows "cont(%x. LAM y. c1 x y)" |
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
412 |
apply (rule monocontlub2cont) |
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
413 |
apply (rule p1 [THEN cont2mono_LAM]) |
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
414 |
apply (rule p2 [THEN cont2mono]) |
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
415 |
apply (rule contlubI) |
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
416 |
apply (intro strip) |
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
417 |
apply (subst thelub_cfun) |
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
418 |
apply (rule p1 [THEN cont2mono_LAM, THEN ch2ch_monofun]) |
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
419 |
apply (rule p2 [THEN cont2mono]) |
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
420 |
apply assumption |
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
421 |
apply (rule_tac f = "Abs_CFun" in arg_cong) |
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
422 |
apply (rule ext) |
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
423 |
apply (subst p1 [THEN beta_cfun, THEN ext]) |
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
424 |
apply (erule p2 [THEN cont2contlub, THEN contlubE, THEN spec, THEN mp]) |
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
425 |
done |
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
426 |
|
15589
69bea57212ef
reordered and arranged for document generation, cleaned up some proofs
huffman
parents:
15577
diff
changeset
|
427 |
text {* cont2cont tactic *} |
15576
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
428 |
|
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
429 |
lemmas cont_lemmas1 = cont_const cont_id cont_Rep_CFun2 |
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
430 |
cont2cont_Rep_CFun cont2cont_LAM |
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
431 |
|
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
432 |
declare cont_lemmas1 [simp] |
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
433 |
|
15589
69bea57212ef
reordered and arranged for document generation, cleaned up some proofs
huffman
parents:
15577
diff
changeset
|
434 |
text {* HINT: @{text cont_tac} is now installed in simplifier in Lift.ML ! *} |
15576
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
435 |
|
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
436 |
(*val cont_tac = (fn i => (resolve_tac cont_lemmas i));*) |
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
437 |
(*val cont_tacR = (fn i => (REPEAT (cont_tac i)));*) |
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
438 |
|
15589
69bea57212ef
reordered and arranged for document generation, cleaned up some proofs
huffman
parents:
15577
diff
changeset
|
439 |
text {* function application @{text "_[_]"} is strict in its first arguments *} |
15576
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
440 |
|
15589
69bea57212ef
reordered and arranged for document generation, cleaned up some proofs
huffman
parents:
15577
diff
changeset
|
441 |
lemma strict_Rep_CFun1 [simp]: "(UU::'a::cpo->'b)$x = (UU::'b)" |
69bea57212ef
reordered and arranged for document generation, cleaned up some proofs
huffman
parents:
15577
diff
changeset
|
442 |
by (simp add: inst_cfun_pcpo beta_cfun) |
15576
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
443 |
|
15589
69bea57212ef
reordered and arranged for document generation, cleaned up some proofs
huffman
parents:
15577
diff
changeset
|
444 |
text {* Instantiate the simplifier *} |
69bea57212ef
reordered and arranged for document generation, cleaned up some proofs
huffman
parents:
15577
diff
changeset
|
445 |
|
69bea57212ef
reordered and arranged for document generation, cleaned up some proofs
huffman
parents:
15577
diff
changeset
|
446 |
declare beta_cfun [simp] |
15576
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
447 |
|
15589
69bea57212ef
reordered and arranged for document generation, cleaned up some proofs
huffman
parents:
15577
diff
changeset
|
448 |
text {* use @{text cont_tac} as autotac. *} |
15576
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
449 |
|
15589
69bea57212ef
reordered and arranged for document generation, cleaned up some proofs
huffman
parents:
15577
diff
changeset
|
450 |
text {* HINT: @{text cont_tac} is now installed in simplifier in Lift.ML ! *} |
15576
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
451 |
(*simpset_ref() := simpset() addsolver (K (DEPTH_SOLVE_1 o cont_tac));*) |
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
452 |
|
15589
69bea57212ef
reordered and arranged for document generation, cleaned up some proofs
huffman
parents:
15577
diff
changeset
|
453 |
text {* some lemmata for functions with flat/chfin domain/range types *} |
15576
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
454 |
|
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
455 |
lemma chfin_Rep_CFunR: "chain (Y::nat => 'a::cpo->'b::chfin) |
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
456 |
==> !s. ? n. lub(range(Y))$s = Y n$s" |
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
457 |
apply (rule allI) |
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
458 |
apply (subst contlub_cfun_fun) |
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
459 |
apply assumption |
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
460 |
apply (fast intro!: thelubI chfin lub_finch2 chfin2finch ch2ch_Rep_CFunL) |
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
461 |
done |
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
462 |
|
15589
69bea57212ef
reordered and arranged for document generation, cleaned up some proofs
huffman
parents:
15577
diff
changeset
|
463 |
subsection {* Continuous isomorphisms *} |
69bea57212ef
reordered and arranged for document generation, cleaned up some proofs
huffman
parents:
15577
diff
changeset
|
464 |
|
69bea57212ef
reordered and arranged for document generation, cleaned up some proofs
huffman
parents:
15577
diff
changeset
|
465 |
text {* Continuous isomorphisms are strict. A proof for embedding projection pairs is similar. *} |
15576
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
466 |
|
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
467 |
lemma iso_strict: |
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
468 |
"!!f g.[|!y. f$(g$y)=(y::'b) ; !x. g$(f$x)=(x::'a) |] |
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
469 |
==> f$UU=UU & g$UU=UU" |
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
470 |
apply (rule conjI) |
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
471 |
apply (rule UU_I) |
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
472 |
apply (rule_tac s = "f$ (g$ (UU::'b))" and t = "UU::'b" in subst) |
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
473 |
apply (erule spec) |
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
474 |
apply (rule minimal [THEN monofun_cfun_arg]) |
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
475 |
apply (rule UU_I) |
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
476 |
apply (rule_tac s = "g$ (f$ (UU::'a))" and t = "UU::'a" in subst) |
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
477 |
apply (erule spec) |
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
478 |
apply (rule minimal [THEN monofun_cfun_arg]) |
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
479 |
done |
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
480 |
|
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
481 |
lemma isorep_defined: "[|!x. rep$(ab$x)=x;!y. ab$(rep$y)=y; z~=UU|] ==> rep$z ~= UU" |
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
482 |
apply (erule contrapos_nn) |
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
483 |
apply (drule_tac f = "ab" in cfun_arg_cong) |
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
484 |
apply (erule box_equals) |
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
485 |
apply fast |
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
486 |
apply (erule iso_strict [THEN conjunct1]) |
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
487 |
apply assumption |
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
488 |
done |
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
489 |
|
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
490 |
lemma isoabs_defined: "[|!x. rep$(ab$x) = x;!y. ab$(rep$y)=y ; z~=UU|] ==> ab$z ~= UU" |
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
491 |
apply (erule contrapos_nn) |
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
492 |
apply (drule_tac f = "rep" in cfun_arg_cong) |
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
493 |
apply (erule box_equals) |
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
494 |
apply fast |
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
495 |
apply (erule iso_strict [THEN conjunct2]) |
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
496 |
apply assumption |
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
497 |
done |
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
498 |
|
15589
69bea57212ef
reordered and arranged for document generation, cleaned up some proofs
huffman
parents:
15577
diff
changeset
|
499 |
text {* propagation of flatness and chain-finiteness by continuous isomorphisms *} |
15576
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
500 |
|
15589
69bea57212ef
reordered and arranged for document generation, cleaned up some proofs
huffman
parents:
15577
diff
changeset
|
501 |
lemma chfin2chfin: "!!f g.[|! Y::nat=>'a. chain Y --> (? n. max_in_chain n Y); |
15576
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
502 |
!y. f$(g$y)=(y::'b) ; !x. g$(f$x)=(x::'a::chfin) |] |
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
503 |
==> ! Y::nat=>'b. chain Y --> (? n. max_in_chain n Y)" |
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
504 |
apply (unfold max_in_chain_def) |
15589
69bea57212ef
reordered and arranged for document generation, cleaned up some proofs
huffman
parents:
15577
diff
changeset
|
505 |
apply (clarify) |
15576
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
506 |
apply (rule exE) |
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
507 |
apply (rule_tac P = "chain (%i. g$ (Y i))" in mp) |
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
508 |
apply (erule spec) |
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
509 |
apply (erule ch2ch_Rep_CFunR) |
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
510 |
apply (rule exI) |
15589
69bea57212ef
reordered and arranged for document generation, cleaned up some proofs
huffman
parents:
15577
diff
changeset
|
511 |
apply (clarify) |
15576
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
512 |
apply (rule_tac s = "f$ (g$ (Y x))" and t = "Y (x) " in subst) |
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
513 |
apply (erule spec) |
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
514 |
apply (rule_tac s = "f$ (g$ (Y j))" and t = "Y (j) " in subst) |
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
515 |
apply (erule spec) |
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
516 |
apply (rule cfun_arg_cong) |
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
517 |
apply (rule mp) |
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
518 |
apply (erule spec) |
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
519 |
apply assumption |
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
520 |
done |
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
521 |
|
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
522 |
lemma flat2flat: "!!f g.[|!x y::'a. x<<y --> x=UU | x=y; |
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
523 |
!y. f$(g$y)=(y::'b); !x. g$(f$x)=(x::'a)|] ==> !x y::'b. x<<y --> x=UU | x=y" |
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
524 |
apply (intro strip) |
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
525 |
apply (rule disjE) |
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
526 |
apply (rule_tac P = "g$x<<g$y" in mp) |
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
527 |
apply (erule_tac [2] monofun_cfun_arg) |
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
528 |
apply (drule spec) |
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
529 |
apply (erule spec) |
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
530 |
apply (rule disjI1) |
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
531 |
apply (rule trans) |
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
532 |
apply (rule_tac s = "f$ (g$x) " and t = "x" in subst) |
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
533 |
apply (erule spec) |
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
534 |
apply (erule cfun_arg_cong) |
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
535 |
apply (rule iso_strict [THEN conjunct1]) |
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
536 |
apply assumption |
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
537 |
apply assumption |
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
538 |
apply (rule disjI2) |
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
539 |
apply (rule_tac s = "f$ (g$x) " and t = "x" in subst) |
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
540 |
apply (erule spec) |
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
541 |
apply (rule_tac s = "f$ (g$y) " and t = "y" in subst) |
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
542 |
apply (erule spec) |
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
543 |
apply (erule cfun_arg_cong) |
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
544 |
done |
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
545 |
|
15589
69bea57212ef
reordered and arranged for document generation, cleaned up some proofs
huffman
parents:
15577
diff
changeset
|
546 |
text {* a result about functions with flat codomain *} |
15576
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
547 |
|
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
548 |
lemma flat_codom: "f$(x::'a)=(c::'b::flat) ==> f$(UU::'a)=(UU::'b) | (!z. f$(z::'a)=c)" |
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
549 |
apply (case_tac "f$ (x::'a) = (UU::'b) ") |
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
550 |
apply (rule disjI1) |
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
551 |
apply (rule UU_I) |
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
552 |
apply (rule_tac s = "f$ (x) " and t = "UU::'b" in subst) |
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
553 |
apply assumption |
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
554 |
apply (rule minimal [THEN monofun_cfun_arg]) |
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
555 |
apply (case_tac "f$ (UU::'a) = (UU::'b) ") |
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
556 |
apply (erule disjI1) |
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
557 |
apply (rule disjI2) |
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
558 |
apply (rule allI) |
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
559 |
apply (erule subst) |
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
560 |
apply (rule_tac a = "f$ (UU::'a) " in refl [THEN box_equals]) |
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
561 |
apply (rule_tac fo5 = "f" in minimal [THEN monofun_cfun_arg, THEN ax_flat [THEN spec, THEN spec, THEN mp], THEN disjE]) |
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
562 |
apply simp |
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
563 |
apply assumption |
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
564 |
apply (rule_tac fo5 = "f" in minimal [THEN monofun_cfun_arg, THEN ax_flat [THEN spec, THEN spec, THEN mp], THEN disjE]) |
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
565 |
apply simp |
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
566 |
apply assumption |
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
567 |
done |
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
568 |
|
15589
69bea57212ef
reordered and arranged for document generation, cleaned up some proofs
huffman
parents:
15577
diff
changeset
|
569 |
subsection {* Strictified functions *} |
15576
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
570 |
|
15589
69bea57212ef
reordered and arranged for document generation, cleaned up some proofs
huffman
parents:
15577
diff
changeset
|
571 |
consts |
69bea57212ef
reordered and arranged for document generation, cleaned up some proofs
huffman
parents:
15577
diff
changeset
|
572 |
Istrictify :: "('a->'b)=>'a=>'b" |
69bea57212ef
reordered and arranged for document generation, cleaned up some proofs
huffman
parents:
15577
diff
changeset
|
573 |
strictify :: "('a->'b)->'a->'b" |
69bea57212ef
reordered and arranged for document generation, cleaned up some proofs
huffman
parents:
15577
diff
changeset
|
574 |
defs |
69bea57212ef
reordered and arranged for document generation, cleaned up some proofs
huffman
parents:
15577
diff
changeset
|
575 |
|
69bea57212ef
reordered and arranged for document generation, cleaned up some proofs
huffman
parents:
15577
diff
changeset
|
576 |
Istrictify_def: "Istrictify f x == if x=UU then UU else f$x" |
69bea57212ef
reordered and arranged for document generation, cleaned up some proofs
huffman
parents:
15577
diff
changeset
|
577 |
strictify_def: "strictify == (LAM f x. Istrictify f x)" |
69bea57212ef
reordered and arranged for document generation, cleaned up some proofs
huffman
parents:
15577
diff
changeset
|
578 |
|
69bea57212ef
reordered and arranged for document generation, cleaned up some proofs
huffman
parents:
15577
diff
changeset
|
579 |
text {* results about strictify *} |
69bea57212ef
reordered and arranged for document generation, cleaned up some proofs
huffman
parents:
15577
diff
changeset
|
580 |
|
69bea57212ef
reordered and arranged for document generation, cleaned up some proofs
huffman
parents:
15577
diff
changeset
|
581 |
lemma Istrictify1: |
69bea57212ef
reordered and arranged for document generation, cleaned up some proofs
huffman
parents:
15577
diff
changeset
|
582 |
"Istrictify(f)(UU)= (UU)" |
69bea57212ef
reordered and arranged for document generation, cleaned up some proofs
huffman
parents:
15577
diff
changeset
|
583 |
apply (unfold Istrictify_def) |
69bea57212ef
reordered and arranged for document generation, cleaned up some proofs
huffman
parents:
15577
diff
changeset
|
584 |
apply (simp (no_asm)) |
69bea57212ef
reordered and arranged for document generation, cleaned up some proofs
huffman
parents:
15577
diff
changeset
|
585 |
done |
69bea57212ef
reordered and arranged for document generation, cleaned up some proofs
huffman
parents:
15577
diff
changeset
|
586 |
|
69bea57212ef
reordered and arranged for document generation, cleaned up some proofs
huffman
parents:
15577
diff
changeset
|
587 |
lemma Istrictify2: |
69bea57212ef
reordered and arranged for document generation, cleaned up some proofs
huffman
parents:
15577
diff
changeset
|
588 |
"~x=UU ==> Istrictify(f)(x)=f$x" |
69bea57212ef
reordered and arranged for document generation, cleaned up some proofs
huffman
parents:
15577
diff
changeset
|
589 |
by (simp add: Istrictify_def) |
69bea57212ef
reordered and arranged for document generation, cleaned up some proofs
huffman
parents:
15577
diff
changeset
|
590 |
|
69bea57212ef
reordered and arranged for document generation, cleaned up some proofs
huffman
parents:
15577
diff
changeset
|
591 |
lemma monofun_Istrictify1: "monofun(Istrictify)" |
69bea57212ef
reordered and arranged for document generation, cleaned up some proofs
huffman
parents:
15577
diff
changeset
|
592 |
apply (rule monofunI [rule_format]) |
69bea57212ef
reordered and arranged for document generation, cleaned up some proofs
huffman
parents:
15577
diff
changeset
|
593 |
apply (rule less_fun [THEN iffD2, rule_format]) |
69bea57212ef
reordered and arranged for document generation, cleaned up some proofs
huffman
parents:
15577
diff
changeset
|
594 |
apply (case_tac "xa=UU") |
69bea57212ef
reordered and arranged for document generation, cleaned up some proofs
huffman
parents:
15577
diff
changeset
|
595 |
apply (simp add: Istrictify1) |
69bea57212ef
reordered and arranged for document generation, cleaned up some proofs
huffman
parents:
15577
diff
changeset
|
596 |
apply (simp add: Istrictify2) |
69bea57212ef
reordered and arranged for document generation, cleaned up some proofs
huffman
parents:
15577
diff
changeset
|
597 |
apply (erule monofun_cfun_fun) |
69bea57212ef
reordered and arranged for document generation, cleaned up some proofs
huffman
parents:
15577
diff
changeset
|
598 |
done |
69bea57212ef
reordered and arranged for document generation, cleaned up some proofs
huffman
parents:
15577
diff
changeset
|
599 |
|
69bea57212ef
reordered and arranged for document generation, cleaned up some proofs
huffman
parents:
15577
diff
changeset
|
600 |
lemma monofun_Istrictify2: "monofun(Istrictify(f))" |
69bea57212ef
reordered and arranged for document generation, cleaned up some proofs
huffman
parents:
15577
diff
changeset
|
601 |
apply (rule monofunI [rule_format]) |
69bea57212ef
reordered and arranged for document generation, cleaned up some proofs
huffman
parents:
15577
diff
changeset
|
602 |
apply (case_tac "x=UU") |
69bea57212ef
reordered and arranged for document generation, cleaned up some proofs
huffman
parents:
15577
diff
changeset
|
603 |
apply (simp add: Istrictify1) |
69bea57212ef
reordered and arranged for document generation, cleaned up some proofs
huffman
parents:
15577
diff
changeset
|
604 |
apply (frule notUU_I) |
69bea57212ef
reordered and arranged for document generation, cleaned up some proofs
huffman
parents:
15577
diff
changeset
|
605 |
apply assumption |
69bea57212ef
reordered and arranged for document generation, cleaned up some proofs
huffman
parents:
15577
diff
changeset
|
606 |
apply (simp add: Istrictify2) |
69bea57212ef
reordered and arranged for document generation, cleaned up some proofs
huffman
parents:
15577
diff
changeset
|
607 |
apply (erule monofun_cfun_arg) |
69bea57212ef
reordered and arranged for document generation, cleaned up some proofs
huffman
parents:
15577
diff
changeset
|
608 |
done |
69bea57212ef
reordered and arranged for document generation, cleaned up some proofs
huffman
parents:
15577
diff
changeset
|
609 |
|
69bea57212ef
reordered and arranged for document generation, cleaned up some proofs
huffman
parents:
15577
diff
changeset
|
610 |
lemma contlub_Istrictify1: "contlub(Istrictify)" |
69bea57212ef
reordered and arranged for document generation, cleaned up some proofs
huffman
parents:
15577
diff
changeset
|
611 |
apply (rule contlubI [rule_format]) |
69bea57212ef
reordered and arranged for document generation, cleaned up some proofs
huffman
parents:
15577
diff
changeset
|
612 |
apply (rule ext) |
69bea57212ef
reordered and arranged for document generation, cleaned up some proofs
huffman
parents:
15577
diff
changeset
|
613 |
apply (subst thelub_fun) |
69bea57212ef
reordered and arranged for document generation, cleaned up some proofs
huffman
parents:
15577
diff
changeset
|
614 |
apply (erule monofun_Istrictify1 [THEN ch2ch_monofun]) |
69bea57212ef
reordered and arranged for document generation, cleaned up some proofs
huffman
parents:
15577
diff
changeset
|
615 |
apply (case_tac "x=UU") |
69bea57212ef
reordered and arranged for document generation, cleaned up some proofs
huffman
parents:
15577
diff
changeset
|
616 |
apply (simp add: Istrictify1) |
69bea57212ef
reordered and arranged for document generation, cleaned up some proofs
huffman
parents:
15577
diff
changeset
|
617 |
apply (simp add: lub_const [THEN thelubI]) |
69bea57212ef
reordered and arranged for document generation, cleaned up some proofs
huffman
parents:
15577
diff
changeset
|
618 |
apply (simp add: Istrictify2) |
69bea57212ef
reordered and arranged for document generation, cleaned up some proofs
huffman
parents:
15577
diff
changeset
|
619 |
apply (erule contlub_cfun_fun) |
69bea57212ef
reordered and arranged for document generation, cleaned up some proofs
huffman
parents:
15577
diff
changeset
|
620 |
done |
15576
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
621 |
|
15589
69bea57212ef
reordered and arranged for document generation, cleaned up some proofs
huffman
parents:
15577
diff
changeset
|
622 |
lemma contlub_Istrictify2: "contlub(Istrictify(f::'a -> 'b))" |
69bea57212ef
reordered and arranged for document generation, cleaned up some proofs
huffman
parents:
15577
diff
changeset
|
623 |
apply (rule contlubI [rule_format]) |
69bea57212ef
reordered and arranged for document generation, cleaned up some proofs
huffman
parents:
15577
diff
changeset
|
624 |
apply (case_tac "lub (range (Y))=UU") |
69bea57212ef
reordered and arranged for document generation, cleaned up some proofs
huffman
parents:
15577
diff
changeset
|
625 |
apply (simp add: Istrictify1 chain_UU_I) |
69bea57212ef
reordered and arranged for document generation, cleaned up some proofs
huffman
parents:
15577
diff
changeset
|
626 |
apply (simp add: lub_const [THEN thelubI]) |
69bea57212ef
reordered and arranged for document generation, cleaned up some proofs
huffman
parents:
15577
diff
changeset
|
627 |
apply (simp add: Istrictify2) |
69bea57212ef
reordered and arranged for document generation, cleaned up some proofs
huffman
parents:
15577
diff
changeset
|
628 |
apply (rule_tac s = "lub (range (%i. f$ (Y i)))" in trans) |
69bea57212ef
reordered and arranged for document generation, cleaned up some proofs
huffman
parents:
15577
diff
changeset
|
629 |
apply (erule contlub_cfun_arg) |
69bea57212ef
reordered and arranged for document generation, cleaned up some proofs
huffman
parents:
15577
diff
changeset
|
630 |
apply (rule lub_equal2) |
69bea57212ef
reordered and arranged for document generation, cleaned up some proofs
huffman
parents:
15577
diff
changeset
|
631 |
apply (rule chain_mono2 [THEN exE]) |
69bea57212ef
reordered and arranged for document generation, cleaned up some proofs
huffman
parents:
15577
diff
changeset
|
632 |
apply (erule chain_UU_I_inverse2) |
69bea57212ef
reordered and arranged for document generation, cleaned up some proofs
huffman
parents:
15577
diff
changeset
|
633 |
apply (assumption) |
69bea57212ef
reordered and arranged for document generation, cleaned up some proofs
huffman
parents:
15577
diff
changeset
|
634 |
apply (blast intro: Istrictify2 [symmetric]) |
69bea57212ef
reordered and arranged for document generation, cleaned up some proofs
huffman
parents:
15577
diff
changeset
|
635 |
apply (erule chain_monofun) |
69bea57212ef
reordered and arranged for document generation, cleaned up some proofs
huffman
parents:
15577
diff
changeset
|
636 |
apply (erule monofun_Istrictify2 [THEN ch2ch_monofun]) |
69bea57212ef
reordered and arranged for document generation, cleaned up some proofs
huffman
parents:
15577
diff
changeset
|
637 |
done |
15576
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
638 |
|
15589
69bea57212ef
reordered and arranged for document generation, cleaned up some proofs
huffman
parents:
15577
diff
changeset
|
639 |
lemmas cont_Istrictify1 = contlub_Istrictify1 [THEN monofun_Istrictify1 [THEN monocontlub2cont], standard] |
69bea57212ef
reordered and arranged for document generation, cleaned up some proofs
huffman
parents:
15577
diff
changeset
|
640 |
|
69bea57212ef
reordered and arranged for document generation, cleaned up some proofs
huffman
parents:
15577
diff
changeset
|
641 |
lemmas cont_Istrictify2 = contlub_Istrictify2 [THEN monofun_Istrictify2 [THEN monocontlub2cont], standard] |
69bea57212ef
reordered and arranged for document generation, cleaned up some proofs
huffman
parents:
15577
diff
changeset
|
642 |
|
69bea57212ef
reordered and arranged for document generation, cleaned up some proofs
huffman
parents:
15577
diff
changeset
|
643 |
lemma strictify1 [simp]: "strictify$f$UU=UU" |
69bea57212ef
reordered and arranged for document generation, cleaned up some proofs
huffman
parents:
15577
diff
changeset
|
644 |
apply (unfold strictify_def) |
69bea57212ef
reordered and arranged for document generation, cleaned up some proofs
huffman
parents:
15577
diff
changeset
|
645 |
apply (subst beta_cfun) |
69bea57212ef
reordered and arranged for document generation, cleaned up some proofs
huffman
parents:
15577
diff
changeset
|
646 |
apply (simp add: cont_Istrictify2 cont_Istrictify1 cont2cont_CF1L) |
69bea57212ef
reordered and arranged for document generation, cleaned up some proofs
huffman
parents:
15577
diff
changeset
|
647 |
apply (subst beta_cfun) |
69bea57212ef
reordered and arranged for document generation, cleaned up some proofs
huffman
parents:
15577
diff
changeset
|
648 |
apply (rule cont_Istrictify2) |
69bea57212ef
reordered and arranged for document generation, cleaned up some proofs
huffman
parents:
15577
diff
changeset
|
649 |
apply (rule Istrictify1) |
69bea57212ef
reordered and arranged for document generation, cleaned up some proofs
huffman
parents:
15577
diff
changeset
|
650 |
done |
69bea57212ef
reordered and arranged for document generation, cleaned up some proofs
huffman
parents:
15577
diff
changeset
|
651 |
|
69bea57212ef
reordered and arranged for document generation, cleaned up some proofs
huffman
parents:
15577
diff
changeset
|
652 |
lemma strictify2 [simp]: "~x=UU ==> strictify$f$x=f$x" |
69bea57212ef
reordered and arranged for document generation, cleaned up some proofs
huffman
parents:
15577
diff
changeset
|
653 |
apply (unfold strictify_def) |
69bea57212ef
reordered and arranged for document generation, cleaned up some proofs
huffman
parents:
15577
diff
changeset
|
654 |
apply (subst beta_cfun) |
69bea57212ef
reordered and arranged for document generation, cleaned up some proofs
huffman
parents:
15577
diff
changeset
|
655 |
apply (simp add: cont_Istrictify2 cont_Istrictify1 cont2cont_CF1L) |
69bea57212ef
reordered and arranged for document generation, cleaned up some proofs
huffman
parents:
15577
diff
changeset
|
656 |
apply (subst beta_cfun) |
69bea57212ef
reordered and arranged for document generation, cleaned up some proofs
huffman
parents:
15577
diff
changeset
|
657 |
apply (rule cont_Istrictify2) |
69bea57212ef
reordered and arranged for document generation, cleaned up some proofs
huffman
parents:
15577
diff
changeset
|
658 |
apply (erule Istrictify2) |
69bea57212ef
reordered and arranged for document generation, cleaned up some proofs
huffman
parents:
15577
diff
changeset
|
659 |
done |
69bea57212ef
reordered and arranged for document generation, cleaned up some proofs
huffman
parents:
15577
diff
changeset
|
660 |
|
69bea57212ef
reordered and arranged for document generation, cleaned up some proofs
huffman
parents:
15577
diff
changeset
|
661 |
subsection {* Identity and composition *} |
69bea57212ef
reordered and arranged for document generation, cleaned up some proofs
huffman
parents:
15577
diff
changeset
|
662 |
|
69bea57212ef
reordered and arranged for document generation, cleaned up some proofs
huffman
parents:
15577
diff
changeset
|
663 |
consts |
69bea57212ef
reordered and arranged for document generation, cleaned up some proofs
huffman
parents:
15577
diff
changeset
|
664 |
ID :: "('a::cpo) -> 'a" |
69bea57212ef
reordered and arranged for document generation, cleaned up some proofs
huffman
parents:
15577
diff
changeset
|
665 |
cfcomp :: "('b->'c)->(('a::cpo)->('b::cpo))->'a->('c::cpo)" |
69bea57212ef
reordered and arranged for document generation, cleaned up some proofs
huffman
parents:
15577
diff
changeset
|
666 |
|
69bea57212ef
reordered and arranged for document generation, cleaned up some proofs
huffman
parents:
15577
diff
changeset
|
667 |
syntax "@oo" :: "('b->'c)=>('a->'b)=>'a->'c" ("_ oo _" [101,100] 100) |
69bea57212ef
reordered and arranged for document generation, cleaned up some proofs
huffman
parents:
15577
diff
changeset
|
668 |
|
69bea57212ef
reordered and arranged for document generation, cleaned up some proofs
huffman
parents:
15577
diff
changeset
|
669 |
translations "f1 oo f2" == "cfcomp$f1$f2" |
69bea57212ef
reordered and arranged for document generation, cleaned up some proofs
huffman
parents:
15577
diff
changeset
|
670 |
|
69bea57212ef
reordered and arranged for document generation, cleaned up some proofs
huffman
parents:
15577
diff
changeset
|
671 |
defs |
69bea57212ef
reordered and arranged for document generation, cleaned up some proofs
huffman
parents:
15577
diff
changeset
|
672 |
ID_def: "ID ==(LAM x. x)" |
69bea57212ef
reordered and arranged for document generation, cleaned up some proofs
huffman
parents:
15577
diff
changeset
|
673 |
oo_def: "cfcomp == (LAM f g x. f$(g$x))" |
69bea57212ef
reordered and arranged for document generation, cleaned up some proofs
huffman
parents:
15577
diff
changeset
|
674 |
|
69bea57212ef
reordered and arranged for document generation, cleaned up some proofs
huffman
parents:
15577
diff
changeset
|
675 |
lemma ID1 [simp]: "ID$x=x" |
15576
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
676 |
apply (unfold ID_def) |
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
677 |
apply (subst beta_cfun) |
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
678 |
apply (rule cont_id) |
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
679 |
apply (rule refl) |
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
680 |
done |
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
681 |
|
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
682 |
lemma cfcomp1: "(f oo g)=(LAM x. f$(g$x))" |
15589
69bea57212ef
reordered and arranged for document generation, cleaned up some proofs
huffman
parents:
15577
diff
changeset
|
683 |
by (simp add: oo_def) |
15576
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
684 |
|
15589
69bea57212ef
reordered and arranged for document generation, cleaned up some proofs
huffman
parents:
15577
diff
changeset
|
685 |
lemma cfcomp2 [simp]: "(f oo g)$x=f$(g$x)" |
69bea57212ef
reordered and arranged for document generation, cleaned up some proofs
huffman
parents:
15577
diff
changeset
|
686 |
by (simp add: cfcomp1) |
15576
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
687 |
|
15589
69bea57212ef
reordered and arranged for document generation, cleaned up some proofs
huffman
parents:
15577
diff
changeset
|
688 |
text {* |
69bea57212ef
reordered and arranged for document generation, cleaned up some proofs
huffman
parents:
15577
diff
changeset
|
689 |
Show that interpretation of (pcpo,@{text "_->_"}) is a category. |
69bea57212ef
reordered and arranged for document generation, cleaned up some proofs
huffman
parents:
15577
diff
changeset
|
690 |
The class of objects is interpretation of syntactical class pcpo. |
69bea57212ef
reordered and arranged for document generation, cleaned up some proofs
huffman
parents:
15577
diff
changeset
|
691 |
The class of arrows between objects @{typ 'a} and @{typ 'b} is interpret. of @{typ "'a -> 'b"}. |
69bea57212ef
reordered and arranged for document generation, cleaned up some proofs
huffman
parents:
15577
diff
changeset
|
692 |
The identity arrow is interpretation of @{term ID}. |
69bea57212ef
reordered and arranged for document generation, cleaned up some proofs
huffman
parents:
15577
diff
changeset
|
693 |
The composition of f and g is interpretation of @{text "oo"}. |
69bea57212ef
reordered and arranged for document generation, cleaned up some proofs
huffman
parents:
15577
diff
changeset
|
694 |
*} |
15576
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
695 |
|
15589
69bea57212ef
reordered and arranged for document generation, cleaned up some proofs
huffman
parents:
15577
diff
changeset
|
696 |
lemma ID2 [simp]: "f oo ID = f " |
69bea57212ef
reordered and arranged for document generation, cleaned up some proofs
huffman
parents:
15577
diff
changeset
|
697 |
by (rule ext_cfun, simp) |
15576
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
698 |
|
15589
69bea57212ef
reordered and arranged for document generation, cleaned up some proofs
huffman
parents:
15577
diff
changeset
|
699 |
lemma ID3 [simp]: "ID oo f = f " |
69bea57212ef
reordered and arranged for document generation, cleaned up some proofs
huffman
parents:
15577
diff
changeset
|
700 |
by (rule ext_cfun, simp) |
15576
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
701 |
|
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
702 |
lemma assoc_oo: "f oo (g oo h) = (f oo g) oo h" |
15589
69bea57212ef
reordered and arranged for document generation, cleaned up some proofs
huffman
parents:
15577
diff
changeset
|
703 |
by (rule ext_cfun, simp) |
15576
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
704 |
|
efb95d0d01f7
converted to new-style theories, and combined numbered files
huffman
parents:
diff
changeset
|
705 |
end |