106 |
106 |
107 typedecl ('a, 'b) tc |
107 typedecl ('a, 'b) tc |
108 arities tc:: (pcpo, pcpo) pcpo |
108 arities tc:: (pcpo, pcpo) pcpo |
109 |
109 |
110 consts |
110 consts |
111 |
111 Rf :: "('b stream * ('b,'c) tc stream * 'c stream * ('b,'c) tc stream) => bool" |
112 is_f :: |
112 |
113 "('b stream * ('b,'c) tc stream -> 'c stream * ('b,'c) tc stream) => bool" |
113 definition |
114 is_net_g :: "('b stream *('b,'c) tc stream -> 'c stream * ('b,'c) tc stream) => |
114 is_f :: "('b stream * ('b,'c) tc stream -> 'c stream * ('b,'c) tc stream) => bool" |
115 'b stream => 'c stream => bool" |
115 "is_f f = (!i1 i2 o1 o2. f$<i1,i2> = <o1,o2> --> Rf(i1,i2,o1,o2))" |
116 is_g :: "('b stream -> 'c stream) => bool" |
116 |
117 def_g :: "('b stream -> 'c stream) => bool" |
117 is_net_g :: "('b stream *('b,'c) tc stream -> 'c stream * ('b,'c) tc stream) => |
118 Rf :: |
118 'b stream => 'c stream => bool" |
119 "('b stream * ('b,'c) tc stream * 'c stream * ('b,'c) tc stream) => bool" |
119 "is_net_g f x y == (? z. |
120 |
|
121 defs |
|
122 |
|
123 is_f: "is_f f == (!i1 i2 o1 o2. |
|
124 f$<i1,i2> = <o1,o2> --> Rf(i1,i2,o1,o2))" |
|
125 |
|
126 is_net_g: "is_net_g f x y == (? z. |
|
127 <y,z> = f$<x,z> & |
120 <y,z> = f$<x,z> & |
128 (!oy hz. <oy,hz> = f$<x,hz> --> z << hz))" |
121 (!oy hz. <oy,hz> = f$<x,hz> --> z << hz))" |
129 |
122 |
130 is_g: "is_g g == (? f. |
123 is_g :: "('b stream -> 'c stream) => bool" |
131 is_f f & |
124 "is_g g == (? f. is_f f & (!x y. g$x = y --> is_net_g f x y))" |
132 (!x y. g$x = y --> is_net_g f x y))" |
125 |
133 |
126 def_g :: "('b stream -> 'c stream) => bool" |
134 |
127 "def_g g == (? f. is_f f & g = (LAM x. cfst$(f$<x,fix$(LAM k. csnd$(f$<x,k>))>)))" |
135 def_g: "def_g g == (? f. |
|
136 is_f f & |
|
137 g = (LAM x. cfst$(f$<x,fix$(LAM k. csnd$(f$<x,k>))>)))" |
|
138 |
128 |
139 |
129 |
140 (* first some logical trading *) |
130 (* first some logical trading *) |
141 |
131 |
142 lemma lemma1: |
132 lemma lemma1: |
143 "is_g(g) = |
133 "is_g(g) = |
144 (? f. is_f(f) & (!x.(? z. <g$x,z> = f$<x,z> & |
134 (? f. is_f(f) & (!x.(? z. <g$x,z> = f$<x,z> & |
145 (! w y. <y,w> = f$<x,w> --> z << w))))" |
135 (! w y. <y,w> = f$<x,w> --> z << w))))" |
146 apply (simp add: is_g is_net_g) |
136 apply (simp add: is_g_def is_net_g_def) |
147 apply fast |
137 apply fast |
148 done |
138 done |
149 |
139 |
150 lemma lemma2: |
140 lemma lemma2: |
151 "(? f. is_f(f) & (!x. (? z. <g$x,z> = f$<x,z> & |
141 "(? f. is_f(f) & (!x. (? z. <g$x,z> = f$<x,z> & |
260 lemma L2: |
250 lemma L2: |
261 "(? f. |
251 "(? f. |
262 is_f(f::'b stream * ('b,'c) tc stream -> 'c stream * ('b,'c) tc stream)) |
252 is_f(f::'b stream * ('b,'c) tc stream -> 'c stream * ('b,'c) tc stream)) |
263 --> |
253 --> |
264 (? g. def_g(g::'b stream -> 'c stream ))" |
254 (? g. def_g(g::'b stream -> 'c stream ))" |
265 apply (simp add: def_g) |
255 apply (simp add: def_g_def) |
266 done |
256 done |
267 |
257 |
268 theorem conservative_loopback: |
258 theorem conservative_loopback: |
269 "(? f. |
259 "(? f. |
270 is_f(f::'b stream * ('b,'c) tc stream -> 'c stream * ('b,'c) tc stream)) |
260 is_f(f::'b stream * ('b,'c) tc stream -> 'c stream * ('b,'c) tc stream)) |