src/HOLCF/Cont.ML
changeset 2838 2e908f29bc3d
parent 2640 ee4dfce170a0
child 3326 930c9bed5a09
equal deleted inserted replaced
2837:dee1c7f1f576 2838:2e908f29bc3d
   227         (etac (is_chainE RS spec) 1)
   227         (etac (is_chainE RS spec) 1)
   228         ]);
   228         ]);
   229 
   229 
   230 
   230 
   231 qed_goal "ch2ch_lubMF2R" thy 
   231 qed_goal "ch2ch_lubMF2R" thy 
   232 "[|monofun(MF2::('a::po=>'b::po=>'c::pcpo));\
   232 "[|monofun(MF2::('a::po=>'b::po=>'c::cpo));\
   233 \  !f.monofun(MF2(f)::('b::po=>'c::pcpo));\
   233 \  !f.monofun(MF2(f)::('b::po=>'c::cpo));\
   234 \       is_chain(F);is_chain(Y)|] ==> \
   234 \       is_chain(F);is_chain(Y)|] ==> \
   235 \       is_chain(%j. lub(range(%i. MF2 (F j) (Y i))))"
   235 \       is_chain(%j. lub(range(%i. MF2 (F j) (Y i))))"
   236 (fn prems =>
   236 (fn prems =>
   237         [
   237         [
   238         (cut_facts_tac prems 1),
   238         (cut_facts_tac prems 1),
   247         (atac 1)
   247         (atac 1)
   248         ]);
   248         ]);
   249 
   249 
   250 
   250 
   251 qed_goal "ch2ch_lubMF2L" thy 
   251 qed_goal "ch2ch_lubMF2L" thy 
   252 "[|monofun(MF2::('a::po=>'b::po=>'c::pcpo));\
   252 "[|monofun(MF2::('a::po=>'b::po=>'c::cpo));\
   253 \  !f.monofun(MF2(f)::('b::po=>'c::pcpo));\
   253 \  !f.monofun(MF2(f)::('b::po=>'c::cpo));\
   254 \       is_chain(F);is_chain(Y)|] ==> \
   254 \       is_chain(F);is_chain(Y)|] ==> \
   255 \       is_chain(%i. lub(range(%j. MF2 (F j) (Y i))))"
   255 \       is_chain(%i. lub(range(%j. MF2 (F j) (Y i))))"
   256 (fn prems =>
   256 (fn prems =>
   257         [
   257         [
   258         (cut_facts_tac prems 1),
   258         (cut_facts_tac prems 1),
   267         (atac 1)
   267         (atac 1)
   268         ]);
   268         ]);
   269 
   269 
   270 
   270 
   271 qed_goal "lub_MF2_mono" thy 
   271 qed_goal "lub_MF2_mono" thy 
   272 "[|monofun(MF2::('a::po=>'b::po=>'c::pcpo));\
   272 "[|monofun(MF2::('a::po=>'b::po=>'c::cpo));\
   273 \  !f.monofun(MF2(f)::('b::po=>'c::pcpo));\
   273 \  !f.monofun(MF2(f)::('b::po=>'c::cpo));\
   274 \       is_chain(F)|] ==> \
   274 \       is_chain(F)|] ==> \
   275 \       monofun(% x.lub(range(% j.MF2 (F j) (x))))"
   275 \       monofun(% x.lub(range(% j.MF2 (F j) (x))))"
   276 (fn prems =>
   276 (fn prems =>
   277         [
   277         [
   278         (cut_facts_tac prems 1),
   278         (cut_facts_tac prems 1),
   287         ((rtac (monofunE RS spec RS spec RS mp) 1) THEN (etac spec 1)),
   287         ((rtac (monofunE RS spec RS spec RS mp) 1) THEN (etac spec 1)),
   288         (atac 1)
   288         (atac 1)
   289         ]);
   289         ]);
   290 
   290 
   291 qed_goal "ex_lubMF2" thy 
   291 qed_goal "ex_lubMF2" thy 
   292 "[|monofun(MF2::('a::po=>'b::po=>'c::pcpo));\
   292 "[|monofun(MF2::('a::po=>'b::po=>'c::cpo));\
   293 \  !f.monofun(MF2(f)::('b::po=>'c::pcpo));\
   293 \  !f.monofun(MF2(f)::('b::po=>'c::cpo));\
   294 \       is_chain(F); is_chain(Y)|] ==> \
   294 \       is_chain(F); is_chain(Y)|] ==> \
   295 \               lub(range(%j. lub(range(%i. MF2(F j) (Y i))))) =\
   295 \               lub(range(%j. lub(range(%i. MF2(F j) (Y i))))) =\
   296 \               lub(range(%i. lub(range(%j. MF2(F j) (Y i)))))"
   296 \               lub(range(%i. lub(range(%j. MF2(F j) (Y i)))))"
   297  (fn prems =>
   297  (fn prems =>
   298         [
   298         [
   326         (atac 1)
   326         (atac 1)
   327         ]);
   327         ]);
   328 
   328 
   329 
   329 
   330 qed_goal "diag_lubMF2_1" thy 
   330 qed_goal "diag_lubMF2_1" thy 
   331 "[|monofun(MF2::('a::po=>'b::po=>'c::pcpo));\
   331 "[|monofun(MF2::('a::po=>'b::po=>'c::cpo));\
   332 \  !f.monofun(MF2(f)::('b::po=>'c::pcpo));\
   332 \  !f.monofun(MF2(f)::('b::po=>'c::cpo));\
   333 \  is_chain(FY);is_chain(TY)|] ==>\
   333 \  is_chain(FY);is_chain(TY)|] ==>\
   334 \ lub(range(%i. lub(range(%j. MF2(FY(j))(TY(i)))))) =\
   334 \ lub(range(%i. lub(range(%j. MF2(FY(j))(TY(i)))))) =\
   335 \ lub(range(%i. MF2(FY(i))(TY(i))))"
   335 \ lub(range(%i. MF2(FY(i))(TY(i))))"
   336  (fn prems =>
   336  (fn prems =>
   337         [
   337         [
   370         (etac ch2ch_MF2L 1),
   370         (etac ch2ch_MF2L 1),
   371         (atac 1)
   371         (atac 1)
   372         ]);
   372         ]);
   373 
   373 
   374 qed_goal "diag_lubMF2_2" thy 
   374 qed_goal "diag_lubMF2_2" thy 
   375 "[|monofun(MF2::('a::po=>'b::po=>'c::pcpo));\
   375 "[|monofun(MF2::('a::po=>'b::po=>'c::cpo));\
   376 \  !f.monofun(MF2(f)::('b::po=>'c::pcpo));\
   376 \  !f.monofun(MF2(f)::('b::po=>'c::cpo));\
   377 \  is_chain(FY);is_chain(TY)|] ==>\
   377 \  is_chain(FY);is_chain(TY)|] ==>\
   378 \ lub(range(%j. lub(range(%i. MF2(FY(j))(TY(i)))))) =\
   378 \ lub(range(%j. lub(range(%i. MF2(FY(j))(TY(i)))))) =\
   379 \ lub(range(%i. MF2(FY(i))(TY(i))))"
   379 \ lub(range(%i. MF2(FY(i))(TY(i))))"
   380  (fn prems =>
   380  (fn prems =>
   381         [
   381         [
   384         (rtac ex_lubMF2 1),
   384         (rtac ex_lubMF2 1),
   385         (REPEAT (atac 1)),
   385         (REPEAT (atac 1)),
   386         (etac diag_lubMF2_1 1),
   386         (etac diag_lubMF2_1 1),
   387         (REPEAT (atac 1))
   387         (REPEAT (atac 1))
   388         ]);
   388         ]);
   389 
       
   390 
       
   391 
   389 
   392 
   390 
   393 (* ------------------------------------------------------------------------ *)
   391 (* ------------------------------------------------------------------------ *)
   394 (* The following results are about a curried function that is continuous    *)
   392 (* The following results are about a curried function that is continuous    *)
   395 (* in both arguments                                                        *)
   393 (* in both arguments                                                        *)
   518         (rtac 
   516         (rtac 
   519         ((hd prems) RS spec RS cont2contlub RS contlubE RS spec RS mp) 1),
   517         ((hd prems) RS spec RS cont2contlub RS contlubE RS spec RS mp) 1),
   520         (atac 1)
   518         (atac 1)
   521         ]);
   519         ]);
   522 
   520 
   523 
       
   524 (* ------------------------------------------------------------------------ *)
   521 (* ------------------------------------------------------------------------ *)
   525 (* What D.A.Schmidt calls continuity of abstraction                         *)
   522 (* What D.A.Schmidt calls continuity of abstraction                         *)
   526 (* never used here                                                          *)
   523 (* never used here                                                          *)
   527 (* ------------------------------------------------------------------------ *)
   524 (* ------------------------------------------------------------------------ *)
   528 
   525 
   529 qed_goal "contlub_abstraction" thy
   526 qed_goal "contlub_abstraction" thy
   530 "[|is_chain(Y::nat=>'a);!y.cont(%x.(c::'a=>'b=>'c) x y)|] ==>\
   527 "[|is_chain(Y::nat=>'a);!y.cont(%x.(c::'a::cpo=>'b::cpo=>'c::cpo) x y)|] ==>\
   531 \ (%y.lub(range(%i.c (Y i) y))) = (lub(range(%i.%y.c (Y i) y)))"
   528 \ (%y.lub(range(%i.c (Y i) y))) = (lub(range(%i.%y.c (Y i) y)))"
   532  (fn prems =>
   529  (fn prems =>
   533         [
   530         [
   534         (cut_facts_tac prems 1),
   531         (cut_facts_tac prems 1),
   535         (rtac trans 1),
   532         (rtac trans 1),
   540         (rtac (cont2contlub RS contlubE RS spec RS mp RS sym) 1),
   537         (rtac (cont2contlub RS contlubE RS spec RS mp RS sym) 1),
   541         (etac spec 1),
   538         (etac spec 1),
   542         (atac 1)
   539         (atac 1)
   543         ]);
   540         ]);
   544 
   541 
   545 
       
   546 qed_goal "mono2mono_app" thy 
   542 qed_goal "mono2mono_app" thy 
   547 "[|monofun(ft);!x.monofun(ft(x));monofun(tt)|] ==>\
   543 "[|monofun(ft);!x.monofun(ft(x));monofun(tt)|] ==>\
   548 \        monofun(%x.(ft(x))(tt(x)))"
   544 \        monofun(%x.(ft(x))(tt(x)))"
   549  (fn prems =>
   545  (fn prems =>
   550         [
   546         [