src/HOLCF/Up3.ML
author paulson
Tue, 04 Jul 2000 15:58:11 +0200
changeset 9245 428385c4bc50
parent 9169 85a47aa21f74
child 9248 e1dee89de037
permissions -rw-r--r--
removed most batch-style proofs
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
2278
d63ffafce255 *** empty log message ***
oheimb
parents:
diff changeset
     1
(*  Title:      HOLCF/Up3.ML
d63ffafce255 *** empty log message ***
oheimb
parents:
diff changeset
     2
    ID:         $Id$
d63ffafce255 *** empty log message ***
oheimb
parents:
diff changeset
     3
    Author:     Franz Regensburger
d63ffafce255 *** empty log message ***
oheimb
parents:
diff changeset
     4
    Copyright   1993 Technische Universitaet Muenchen
d63ffafce255 *** empty log message ***
oheimb
parents:
diff changeset
     5
9169
85a47aa21f74 tidying and unbatchifying
paulson
parents: 8161
diff changeset
     6
Class instance of  ('a)u for class pcpo
2278
d63ffafce255 *** empty log message ***
oheimb
parents:
diff changeset
     7
*)
d63ffafce255 *** empty log message ***
oheimb
parents:
diff changeset
     8
2640
ee4dfce170a0 Changes of HOLCF from Oscar Slotosch:
slotosch
parents: 2566
diff changeset
     9
(* for compatibility with old HOLCF-Version *)
9169
85a47aa21f74 tidying and unbatchifying
paulson
parents: 8161
diff changeset
    10
Goal "UU = Abs_Up(Inl ())";
85a47aa21f74 tidying and unbatchifying
paulson
parents: 8161
diff changeset
    11
by (simp_tac (HOL_ss addsimps [UU_def,UU_up_def]) 1);
85a47aa21f74 tidying and unbatchifying
paulson
parents: 8161
diff changeset
    12
qed "inst_up_pcpo";
2640
ee4dfce170a0 Changes of HOLCF from Oscar Slotosch:
slotosch
parents: 2566
diff changeset
    13
2278
d63ffafce255 *** empty log message ***
oheimb
parents:
diff changeset
    14
(* -------------------------------------------------------------------------*)
d63ffafce255 *** empty log message ***
oheimb
parents:
diff changeset
    15
(* some lemmas restated for class pcpo                                      *)
d63ffafce255 *** empty log message ***
oheimb
parents:
diff changeset
    16
(* ------------------------------------------------------------------------ *)
d63ffafce255 *** empty log message ***
oheimb
parents:
diff changeset
    17
9169
85a47aa21f74 tidying and unbatchifying
paulson
parents: 8161
diff changeset
    18
Goal "~ Iup(x) << UU";
85a47aa21f74 tidying and unbatchifying
paulson
parents: 8161
diff changeset
    19
by (stac inst_up_pcpo 1);
85a47aa21f74 tidying and unbatchifying
paulson
parents: 8161
diff changeset
    20
by (rtac less_up2b 1);
85a47aa21f74 tidying and unbatchifying
paulson
parents: 8161
diff changeset
    21
qed "less_up3b";
2278
d63ffafce255 *** empty log message ***
oheimb
parents:
diff changeset
    22
9169
85a47aa21f74 tidying and unbatchifying
paulson
parents: 8161
diff changeset
    23
Goal "Iup(x) ~= UU";
85a47aa21f74 tidying and unbatchifying
paulson
parents: 8161
diff changeset
    24
by (stac inst_up_pcpo 1);
85a47aa21f74 tidying and unbatchifying
paulson
parents: 8161
diff changeset
    25
by (rtac defined_Iup 1);
85a47aa21f74 tidying and unbatchifying
paulson
parents: 8161
diff changeset
    26
qed "defined_Iup2";
2278
d63ffafce255 *** empty log message ***
oheimb
parents:
diff changeset
    27
d63ffafce255 *** empty log message ***
oheimb
parents:
diff changeset
    28
(* ------------------------------------------------------------------------ *)
d63ffafce255 *** empty log message ***
oheimb
parents:
diff changeset
    29
(* continuity for Iup                                                       *)
d63ffafce255 *** empty log message ***
oheimb
parents:
diff changeset
    30
(* ------------------------------------------------------------------------ *)
d63ffafce255 *** empty log message ***
oheimb
parents:
diff changeset
    31
9169
85a47aa21f74 tidying and unbatchifying
paulson
parents: 8161
diff changeset
    32
Goal "contlub(Iup)";
85a47aa21f74 tidying and unbatchifying
paulson
parents: 8161
diff changeset
    33
by (rtac contlubI 1);
85a47aa21f74 tidying and unbatchifying
paulson
parents: 8161
diff changeset
    34
by (strip_tac 1);
85a47aa21f74 tidying and unbatchifying
paulson
parents: 8161
diff changeset
    35
by (rtac trans 1);
85a47aa21f74 tidying and unbatchifying
paulson
parents: 8161
diff changeset
    36
by (rtac (thelub_up1a RS sym) 2);
85a47aa21f74 tidying and unbatchifying
paulson
parents: 8161
diff changeset
    37
by (fast_tac HOL_cs 3);
85a47aa21f74 tidying and unbatchifying
paulson
parents: 8161
diff changeset
    38
by (etac (monofun_Iup RS ch2ch_monofun) 2);
85a47aa21f74 tidying and unbatchifying
paulson
parents: 8161
diff changeset
    39
by (res_inst_tac [("f","Iup")] arg_cong  1);
85a47aa21f74 tidying and unbatchifying
paulson
parents: 8161
diff changeset
    40
by (rtac lub_equal 1);
85a47aa21f74 tidying and unbatchifying
paulson
parents: 8161
diff changeset
    41
by (atac 1);
85a47aa21f74 tidying and unbatchifying
paulson
parents: 8161
diff changeset
    42
by (rtac (monofun_Ifup2 RS ch2ch_monofun) 1);
85a47aa21f74 tidying and unbatchifying
paulson
parents: 8161
diff changeset
    43
by (etac (monofun_Iup RS ch2ch_monofun) 1);
85a47aa21f74 tidying and unbatchifying
paulson
parents: 8161
diff changeset
    44
by (asm_simp_tac Up0_ss 1);
85a47aa21f74 tidying and unbatchifying
paulson
parents: 8161
diff changeset
    45
qed "contlub_Iup";
2278
d63ffafce255 *** empty log message ***
oheimb
parents:
diff changeset
    46
9169
85a47aa21f74 tidying and unbatchifying
paulson
parents: 8161
diff changeset
    47
Goal "cont(Iup)";
85a47aa21f74 tidying and unbatchifying
paulson
parents: 8161
diff changeset
    48
by (rtac monocontlub2cont 1);
85a47aa21f74 tidying and unbatchifying
paulson
parents: 8161
diff changeset
    49
by (rtac monofun_Iup 1);
85a47aa21f74 tidying and unbatchifying
paulson
parents: 8161
diff changeset
    50
by (rtac contlub_Iup 1);
85a47aa21f74 tidying and unbatchifying
paulson
parents: 8161
diff changeset
    51
qed "cont_Iup";
2278
d63ffafce255 *** empty log message ***
oheimb
parents:
diff changeset
    52
d63ffafce255 *** empty log message ***
oheimb
parents:
diff changeset
    53
d63ffafce255 *** empty log message ***
oheimb
parents:
diff changeset
    54
(* ------------------------------------------------------------------------ *)
d63ffafce255 *** empty log message ***
oheimb
parents:
diff changeset
    55
(* continuity for Ifup                                                     *)
d63ffafce255 *** empty log message ***
oheimb
parents:
diff changeset
    56
(* ------------------------------------------------------------------------ *)
d63ffafce255 *** empty log message ***
oheimb
parents:
diff changeset
    57
9169
85a47aa21f74 tidying and unbatchifying
paulson
parents: 8161
diff changeset
    58
Goal "contlub(Ifup)";
85a47aa21f74 tidying and unbatchifying
paulson
parents: 8161
diff changeset
    59
by (rtac contlubI 1);
85a47aa21f74 tidying and unbatchifying
paulson
parents: 8161
diff changeset
    60
by (strip_tac 1);
85a47aa21f74 tidying and unbatchifying
paulson
parents: 8161
diff changeset
    61
by (rtac trans 1);
85a47aa21f74 tidying and unbatchifying
paulson
parents: 8161
diff changeset
    62
by (rtac (thelub_fun RS sym) 2);
85a47aa21f74 tidying and unbatchifying
paulson
parents: 8161
diff changeset
    63
by (etac (monofun_Ifup1 RS ch2ch_monofun) 2);
85a47aa21f74 tidying and unbatchifying
paulson
parents: 8161
diff changeset
    64
by (rtac ext 1);
85a47aa21f74 tidying and unbatchifying
paulson
parents: 8161
diff changeset
    65
by (res_inst_tac [("p","x")] upE 1);
85a47aa21f74 tidying and unbatchifying
paulson
parents: 8161
diff changeset
    66
by (asm_simp_tac Up0_ss 1);
85a47aa21f74 tidying and unbatchifying
paulson
parents: 8161
diff changeset
    67
by (rtac (lub_const RS thelubI RS sym) 1);
85a47aa21f74 tidying and unbatchifying
paulson
parents: 8161
diff changeset
    68
by (asm_simp_tac Up0_ss 1);
85a47aa21f74 tidying and unbatchifying
paulson
parents: 8161
diff changeset
    69
by (etac contlub_cfun_fun 1);
85a47aa21f74 tidying and unbatchifying
paulson
parents: 8161
diff changeset
    70
qed "contlub_Ifup1";
2278
d63ffafce255 *** empty log message ***
oheimb
parents:
diff changeset
    71
d63ffafce255 *** empty log message ***
oheimb
parents:
diff changeset
    72
8161
bde1391fd0a5 added range_composition (also to simpset)
oheimb
parents: 5291
diff changeset
    73
Goal "contlub(Ifup(f))";
bde1391fd0a5 added range_composition (also to simpset)
oheimb
parents: 5291
diff changeset
    74
by (rtac contlubI 1);
bde1391fd0a5 added range_composition (also to simpset)
oheimb
parents: 5291
diff changeset
    75
by (strip_tac 1);
bde1391fd0a5 added range_composition (also to simpset)
oheimb
parents: 5291
diff changeset
    76
by (rtac disjE 1);
bde1391fd0a5 added range_composition (also to simpset)
oheimb
parents: 5291
diff changeset
    77
by   (stac thelub_up1a 2);
bde1391fd0a5 added range_composition (also to simpset)
oheimb
parents: 5291
diff changeset
    78
by     (atac 2);
bde1391fd0a5 added range_composition (also to simpset)
oheimb
parents: 5291
diff changeset
    79
by    (atac 2);
bde1391fd0a5 added range_composition (also to simpset)
oheimb
parents: 5291
diff changeset
    80
by   (asm_simp_tac Up0_ss 2);
bde1391fd0a5 added range_composition (also to simpset)
oheimb
parents: 5291
diff changeset
    81
by   (stac thelub_up1b 3);
bde1391fd0a5 added range_composition (also to simpset)
oheimb
parents: 5291
diff changeset
    82
by     (atac 3);
bde1391fd0a5 added range_composition (also to simpset)
oheimb
parents: 5291
diff changeset
    83
by    (atac 3);
bde1391fd0a5 added range_composition (also to simpset)
oheimb
parents: 5291
diff changeset
    84
by   (fast_tac HOL_cs 1);
bde1391fd0a5 added range_composition (also to simpset)
oheimb
parents: 5291
diff changeset
    85
by  (asm_simp_tac Up0_ss 2);
bde1391fd0a5 added range_composition (also to simpset)
oheimb
parents: 5291
diff changeset
    86
by  (rtac (chain_UU_I_inverse RS sym) 2);
bde1391fd0a5 added range_composition (also to simpset)
oheimb
parents: 5291
diff changeset
    87
by  (rtac allI 2);
bde1391fd0a5 added range_composition (also to simpset)
oheimb
parents: 5291
diff changeset
    88
by  (res_inst_tac [("p","Y(i)")] upE 2);
bde1391fd0a5 added range_composition (also to simpset)
oheimb
parents: 5291
diff changeset
    89
by   (asm_simp_tac Up0_ss 2);
bde1391fd0a5 added range_composition (also to simpset)
oheimb
parents: 5291
diff changeset
    90
by  (rtac notE 2);
bde1391fd0a5 added range_composition (also to simpset)
oheimb
parents: 5291
diff changeset
    91
by   (dtac spec 2);
bde1391fd0a5 added range_composition (also to simpset)
oheimb
parents: 5291
diff changeset
    92
by   (etac spec 2);
bde1391fd0a5 added range_composition (also to simpset)
oheimb
parents: 5291
diff changeset
    93
by  (atac 2);
bde1391fd0a5 added range_composition (also to simpset)
oheimb
parents: 5291
diff changeset
    94
by (stac contlub_cfun_arg 1);
bde1391fd0a5 added range_composition (also to simpset)
oheimb
parents: 5291
diff changeset
    95
by  (etac (monofun_Ifup2 RS ch2ch_monofun) 1);
bde1391fd0a5 added range_composition (also to simpset)
oheimb
parents: 5291
diff changeset
    96
by (rtac lub_equal2 1);
bde1391fd0a5 added range_composition (also to simpset)
oheimb
parents: 5291
diff changeset
    97
by   (rtac (monofun_Rep_CFun2 RS ch2ch_monofun) 2);
bde1391fd0a5 added range_composition (also to simpset)
oheimb
parents: 5291
diff changeset
    98
by   (etac (monofun_Ifup2 RS ch2ch_monofun) 2);
bde1391fd0a5 added range_composition (also to simpset)
oheimb
parents: 5291
diff changeset
    99
by  (etac (monofun_Ifup2 RS ch2ch_monofun) 2);
bde1391fd0a5 added range_composition (also to simpset)
oheimb
parents: 5291
diff changeset
   100
by (rtac (chain_mono2 RS exE) 1);
bde1391fd0a5 added range_composition (also to simpset)
oheimb
parents: 5291
diff changeset
   101
by   (atac 2);
bde1391fd0a5 added range_composition (also to simpset)
oheimb
parents: 5291
diff changeset
   102
by  (etac exE 1);
bde1391fd0a5 added range_composition (also to simpset)
oheimb
parents: 5291
diff changeset
   103
by  (etac exE 1);
bde1391fd0a5 added range_composition (also to simpset)
oheimb
parents: 5291
diff changeset
   104
by  (rtac exI 1);
bde1391fd0a5 added range_composition (also to simpset)
oheimb
parents: 5291
diff changeset
   105
by  (res_inst_tac [("s","Iup(x)"),("t","Y(i)")] ssubst 1);
bde1391fd0a5 added range_composition (also to simpset)
oheimb
parents: 5291
diff changeset
   106
by   (atac 1);
bde1391fd0a5 added range_composition (also to simpset)
oheimb
parents: 5291
diff changeset
   107
by  (rtac defined_Iup2 1);
bde1391fd0a5 added range_composition (also to simpset)
oheimb
parents: 5291
diff changeset
   108
by (rtac exI 1);
bde1391fd0a5 added range_composition (also to simpset)
oheimb
parents: 5291
diff changeset
   109
by (strip_tac 1);
bde1391fd0a5 added range_composition (also to simpset)
oheimb
parents: 5291
diff changeset
   110
by (res_inst_tac [("p","Y(i)")] upE 1);
bde1391fd0a5 added range_composition (also to simpset)
oheimb
parents: 5291
diff changeset
   111
by  (asm_simp_tac Up0_ss 2);
bde1391fd0a5 added range_composition (also to simpset)
oheimb
parents: 5291
diff changeset
   112
by (res_inst_tac [("P","Y(i) = UU")] notE 1);
bde1391fd0a5 added range_composition (also to simpset)
oheimb
parents: 5291
diff changeset
   113
by  (fast_tac HOL_cs 1);
bde1391fd0a5 added range_composition (also to simpset)
oheimb
parents: 5291
diff changeset
   114
by (stac inst_up_pcpo 1);
bde1391fd0a5 added range_composition (also to simpset)
oheimb
parents: 5291
diff changeset
   115
by (atac 1);
bde1391fd0a5 added range_composition (also to simpset)
oheimb
parents: 5291
diff changeset
   116
qed "contlub_Ifup2";
2278
d63ffafce255 *** empty log message ***
oheimb
parents:
diff changeset
   117
9169
85a47aa21f74 tidying and unbatchifying
paulson
parents: 8161
diff changeset
   118
Goal "cont(Ifup)";
85a47aa21f74 tidying and unbatchifying
paulson
parents: 8161
diff changeset
   119
by (rtac monocontlub2cont 1);
85a47aa21f74 tidying and unbatchifying
paulson
parents: 8161
diff changeset
   120
by (rtac monofun_Ifup1 1);
85a47aa21f74 tidying and unbatchifying
paulson
parents: 8161
diff changeset
   121
by (rtac contlub_Ifup1 1);
85a47aa21f74 tidying and unbatchifying
paulson
parents: 8161
diff changeset
   122
qed "cont_Ifup1";
2278
d63ffafce255 *** empty log message ***
oheimb
parents:
diff changeset
   123
9169
85a47aa21f74 tidying and unbatchifying
paulson
parents: 8161
diff changeset
   124
Goal "cont(Ifup(f))";
85a47aa21f74 tidying and unbatchifying
paulson
parents: 8161
diff changeset
   125
by (rtac monocontlub2cont 1);
85a47aa21f74 tidying and unbatchifying
paulson
parents: 8161
diff changeset
   126
by (rtac monofun_Ifup2 1);
85a47aa21f74 tidying and unbatchifying
paulson
parents: 8161
diff changeset
   127
by (rtac contlub_Ifup2 1);
85a47aa21f74 tidying and unbatchifying
paulson
parents: 8161
diff changeset
   128
qed "cont_Ifup2";
2278
d63ffafce255 *** empty log message ***
oheimb
parents:
diff changeset
   129
d63ffafce255 *** empty log message ***
oheimb
parents:
diff changeset
   130
d63ffafce255 *** empty log message ***
oheimb
parents:
diff changeset
   131
(* ------------------------------------------------------------------------ *)
d63ffafce255 *** empty log message ***
oheimb
parents:
diff changeset
   132
(* continuous versions of lemmas for ('a)u                                  *)
d63ffafce255 *** empty log message ***
oheimb
parents:
diff changeset
   133
(* ------------------------------------------------------------------------ *)
d63ffafce255 *** empty log message ***
oheimb
parents:
diff changeset
   134
9245
428385c4bc50 removed most batch-style proofs
paulson
parents: 9169
diff changeset
   135
val prems = goalw thy [up_def] "z = UU | (? x. z = up`x)";
428385c4bc50 removed most batch-style proofs
paulson
parents: 9169
diff changeset
   136
by (simp_tac (Up0_ss addsimps [cont_Iup]) 1);
428385c4bc50 removed most batch-style proofs
paulson
parents: 9169
diff changeset
   137
by (stac inst_up_pcpo 1);
428385c4bc50 removed most batch-style proofs
paulson
parents: 9169
diff changeset
   138
by (rtac Exh_Up 1);
428385c4bc50 removed most batch-style proofs
paulson
parents: 9169
diff changeset
   139
qed "Exh_Up1";
2278
d63ffafce255 *** empty log message ***
oheimb
parents:
diff changeset
   140
9245
428385c4bc50 removed most batch-style proofs
paulson
parents: 9169
diff changeset
   141
val prems = goalw thy [up_def] "up`x=up`y ==> x=y";
428385c4bc50 removed most batch-style proofs
paulson
parents: 9169
diff changeset
   142
by (cut_facts_tac prems 1);
428385c4bc50 removed most batch-style proofs
paulson
parents: 9169
diff changeset
   143
by (rtac inject_Iup 1);
428385c4bc50 removed most batch-style proofs
paulson
parents: 9169
diff changeset
   144
by (etac box_equals 1);
428385c4bc50 removed most batch-style proofs
paulson
parents: 9169
diff changeset
   145
by (simp_tac (Up0_ss addsimps [cont_Iup]) 1);
428385c4bc50 removed most batch-style proofs
paulson
parents: 9169
diff changeset
   146
by (simp_tac (Up0_ss addsimps [cont_Iup]) 1);
428385c4bc50 removed most batch-style proofs
paulson
parents: 9169
diff changeset
   147
qed "inject_up";
2278
d63ffafce255 *** empty log message ***
oheimb
parents:
diff changeset
   148
9245
428385c4bc50 removed most batch-style proofs
paulson
parents: 9169
diff changeset
   149
val prems = goalw thy [up_def] " up`x ~= UU";
428385c4bc50 removed most batch-style proofs
paulson
parents: 9169
diff changeset
   150
by (simp_tac (Up0_ss addsimps [cont_Iup]) 1);
428385c4bc50 removed most batch-style proofs
paulson
parents: 9169
diff changeset
   151
by (rtac defined_Iup2 1);
428385c4bc50 removed most batch-style proofs
paulson
parents: 9169
diff changeset
   152
qed "defined_up";
2278
d63ffafce255 *** empty log message ***
oheimb
parents:
diff changeset
   153
9245
428385c4bc50 removed most batch-style proofs
paulson
parents: 9169
diff changeset
   154
val prems = goalw thy [up_def] 
428385c4bc50 removed most batch-style proofs
paulson
parents: 9169
diff changeset
   155
        "[| p=UU ==> Q; !!x. p=up`x==>Q|] ==>Q";
428385c4bc50 removed most batch-style proofs
paulson
parents: 9169
diff changeset
   156
by (rtac upE 1);
428385c4bc50 removed most batch-style proofs
paulson
parents: 9169
diff changeset
   157
by (resolve_tac prems 1);
428385c4bc50 removed most batch-style proofs
paulson
parents: 9169
diff changeset
   158
by (etac (inst_up_pcpo RS ssubst) 1);
428385c4bc50 removed most batch-style proofs
paulson
parents: 9169
diff changeset
   159
by (resolve_tac (tl prems) 1);
428385c4bc50 removed most batch-style proofs
paulson
parents: 9169
diff changeset
   160
by (asm_simp_tac (Up0_ss addsimps [cont_Iup]) 1);
428385c4bc50 removed most batch-style proofs
paulson
parents: 9169
diff changeset
   161
qed "upE1";
2278
d63ffafce255 *** empty log message ***
oheimb
parents:
diff changeset
   162
4098
71e05eb27fb6 isatool fixclasimp;
wenzelm
parents: 3842
diff changeset
   163
val tac = (simp_tac (simpset() addsimps [cont_Iup,cont_Ifup1,
2566
cbf02fc74332 changed handling of cont_lemmas and adm_lemmas
oheimb
parents: 2278
diff changeset
   164
                cont_Ifup2,cont2cont_CF1L]) 1);
2278
d63ffafce255 *** empty log message ***
oheimb
parents:
diff changeset
   165
9245
428385c4bc50 removed most batch-style proofs
paulson
parents: 9169
diff changeset
   166
val prems = goalw thy [up_def,fup_def] "fup`f`UU=UU";
428385c4bc50 removed most batch-style proofs
paulson
parents: 9169
diff changeset
   167
by (stac inst_up_pcpo 1);
428385c4bc50 removed most batch-style proofs
paulson
parents: 9169
diff changeset
   168
by (stac beta_cfun 1);
428385c4bc50 removed most batch-style proofs
paulson
parents: 9169
diff changeset
   169
by tac;
428385c4bc50 removed most batch-style proofs
paulson
parents: 9169
diff changeset
   170
by (stac beta_cfun 1);
428385c4bc50 removed most batch-style proofs
paulson
parents: 9169
diff changeset
   171
by tac;
428385c4bc50 removed most batch-style proofs
paulson
parents: 9169
diff changeset
   172
by (simp_tac (Up0_ss addsimps [cont_Iup,cont_Ifup1,cont_Ifup2]) 1);
428385c4bc50 removed most batch-style proofs
paulson
parents: 9169
diff changeset
   173
qed "fup1";
2278
d63ffafce255 *** empty log message ***
oheimb
parents:
diff changeset
   174
9245
428385c4bc50 removed most batch-style proofs
paulson
parents: 9169
diff changeset
   175
val prems = goalw thy [up_def,fup_def] "fup`f`(up`x)=f`x";
428385c4bc50 removed most batch-style proofs
paulson
parents: 9169
diff changeset
   176
by (stac beta_cfun 1);
428385c4bc50 removed most batch-style proofs
paulson
parents: 9169
diff changeset
   177
by (rtac cont_Iup 1);
428385c4bc50 removed most batch-style proofs
paulson
parents: 9169
diff changeset
   178
by (stac beta_cfun 1);
428385c4bc50 removed most batch-style proofs
paulson
parents: 9169
diff changeset
   179
by tac;
428385c4bc50 removed most batch-style proofs
paulson
parents: 9169
diff changeset
   180
by (stac beta_cfun 1);
428385c4bc50 removed most batch-style proofs
paulson
parents: 9169
diff changeset
   181
by (rtac cont_Ifup2 1);
428385c4bc50 removed most batch-style proofs
paulson
parents: 9169
diff changeset
   182
by (simp_tac (Up0_ss addsimps [cont_Iup,cont_Ifup1,cont_Ifup2]) 1);
428385c4bc50 removed most batch-style proofs
paulson
parents: 9169
diff changeset
   183
qed "fup2";
2278
d63ffafce255 *** empty log message ***
oheimb
parents:
diff changeset
   184
9245
428385c4bc50 removed most batch-style proofs
paulson
parents: 9169
diff changeset
   185
val prems = goalw thy [up_def,fup_def] "~ up`x << UU";
428385c4bc50 removed most batch-style proofs
paulson
parents: 9169
diff changeset
   186
by (simp_tac (Up0_ss addsimps [cont_Iup]) 1);
428385c4bc50 removed most batch-style proofs
paulson
parents: 9169
diff changeset
   187
by (rtac less_up3b 1);
428385c4bc50 removed most batch-style proofs
paulson
parents: 9169
diff changeset
   188
qed "less_up4b";
2278
d63ffafce255 *** empty log message ***
oheimb
parents:
diff changeset
   189
9245
428385c4bc50 removed most batch-style proofs
paulson
parents: 9169
diff changeset
   190
val prems = goalw thy [up_def,fup_def]
428385c4bc50 removed most batch-style proofs
paulson
parents: 9169
diff changeset
   191
         "(up`x << up`y) = (x<<y)";
428385c4bc50 removed most batch-style proofs
paulson
parents: 9169
diff changeset
   192
by (simp_tac (Up0_ss addsimps [cont_Iup]) 1);
428385c4bc50 removed most batch-style proofs
paulson
parents: 9169
diff changeset
   193
by (rtac less_up2c 1);
428385c4bc50 removed most batch-style proofs
paulson
parents: 9169
diff changeset
   194
qed "less_up4c";
2278
d63ffafce255 *** empty log message ***
oheimb
parents:
diff changeset
   195
9245
428385c4bc50 removed most batch-style proofs
paulson
parents: 9169
diff changeset
   196
val prems = goalw thy [up_def,fup_def] 
4721
c8a8482a8124 renamed is_chain to chain, is_tord to tord, replaced chain_finite by chfin
oheimb
parents: 4098
diff changeset
   197
"[| chain(Y); ? i x. Y(i) = up`x |] ==>\
9245
428385c4bc50 removed most batch-style proofs
paulson
parents: 9169
diff changeset
   198
\      lub(range(Y)) = up`(lub(range(%i. fup`(LAM x. x)`(Y i))))";
428385c4bc50 removed most batch-style proofs
paulson
parents: 9169
diff changeset
   199
by (cut_facts_tac prems 1);
428385c4bc50 removed most batch-style proofs
paulson
parents: 9169
diff changeset
   200
by (stac beta_cfun 1);
428385c4bc50 removed most batch-style proofs
paulson
parents: 9169
diff changeset
   201
by tac;
428385c4bc50 removed most batch-style proofs
paulson
parents: 9169
diff changeset
   202
by (stac beta_cfun 1);
428385c4bc50 removed most batch-style proofs
paulson
parents: 9169
diff changeset
   203
by tac;
428385c4bc50 removed most batch-style proofs
paulson
parents: 9169
diff changeset
   204
by (stac (beta_cfun RS ext) 1);
428385c4bc50 removed most batch-style proofs
paulson
parents: 9169
diff changeset
   205
by tac;
428385c4bc50 removed most batch-style proofs
paulson
parents: 9169
diff changeset
   206
by (rtac thelub_up1a 1);
428385c4bc50 removed most batch-style proofs
paulson
parents: 9169
diff changeset
   207
by (atac 1);
428385c4bc50 removed most batch-style proofs
paulson
parents: 9169
diff changeset
   208
by (etac exE 1);
428385c4bc50 removed most batch-style proofs
paulson
parents: 9169
diff changeset
   209
by (etac exE 1);
428385c4bc50 removed most batch-style proofs
paulson
parents: 9169
diff changeset
   210
by (rtac exI 1);
428385c4bc50 removed most batch-style proofs
paulson
parents: 9169
diff changeset
   211
by (rtac exI 1);
428385c4bc50 removed most batch-style proofs
paulson
parents: 9169
diff changeset
   212
by (etac box_equals 1);
428385c4bc50 removed most batch-style proofs
paulson
parents: 9169
diff changeset
   213
by (rtac refl 1);
428385c4bc50 removed most batch-style proofs
paulson
parents: 9169
diff changeset
   214
by (simp_tac (Up0_ss addsimps [cont_Iup]) 1);
428385c4bc50 removed most batch-style proofs
paulson
parents: 9169
diff changeset
   215
qed "thelub_up2a";
2278
d63ffafce255 *** empty log message ***
oheimb
parents:
diff changeset
   216
d63ffafce255 *** empty log message ***
oheimb
parents:
diff changeset
   217
d63ffafce255 *** empty log message ***
oheimb
parents:
diff changeset
   218
9245
428385c4bc50 removed most batch-style proofs
paulson
parents: 9169
diff changeset
   219
val prems = goalw thy [up_def,fup_def] 
428385c4bc50 removed most batch-style proofs
paulson
parents: 9169
diff changeset
   220
"[| chain(Y); ! i x. Y(i) ~= up`x |] ==> lub(range(Y)) = UU";
428385c4bc50 removed most batch-style proofs
paulson
parents: 9169
diff changeset
   221
by (cut_facts_tac prems 1);
428385c4bc50 removed most batch-style proofs
paulson
parents: 9169
diff changeset
   222
by (stac inst_up_pcpo 1);
428385c4bc50 removed most batch-style proofs
paulson
parents: 9169
diff changeset
   223
by (rtac thelub_up1b 1);
428385c4bc50 removed most batch-style proofs
paulson
parents: 9169
diff changeset
   224
by (atac 1);
428385c4bc50 removed most batch-style proofs
paulson
parents: 9169
diff changeset
   225
by (strip_tac 1);
428385c4bc50 removed most batch-style proofs
paulson
parents: 9169
diff changeset
   226
by (dtac spec 1);
428385c4bc50 removed most batch-style proofs
paulson
parents: 9169
diff changeset
   227
by (dtac spec 1);
428385c4bc50 removed most batch-style proofs
paulson
parents: 9169
diff changeset
   228
by (rtac swap 1);
428385c4bc50 removed most batch-style proofs
paulson
parents: 9169
diff changeset
   229
by (atac 1);
428385c4bc50 removed most batch-style proofs
paulson
parents: 9169
diff changeset
   230
by (dtac notnotD 1);
428385c4bc50 removed most batch-style proofs
paulson
parents: 9169
diff changeset
   231
by (etac box_equals 1);
428385c4bc50 removed most batch-style proofs
paulson
parents: 9169
diff changeset
   232
by (rtac refl 1);
428385c4bc50 removed most batch-style proofs
paulson
parents: 9169
diff changeset
   233
by (simp_tac (Up0_ss addsimps [cont_Iup]) 1);
428385c4bc50 removed most batch-style proofs
paulson
parents: 9169
diff changeset
   234
qed "thelub_up2b";
2278
d63ffafce255 *** empty log message ***
oheimb
parents:
diff changeset
   235
d63ffafce255 *** empty log message ***
oheimb
parents:
diff changeset
   236
9169
85a47aa21f74 tidying and unbatchifying
paulson
parents: 8161
diff changeset
   237
Goal "(? x. z = up`x) = (z~=UU)";
85a47aa21f74 tidying and unbatchifying
paulson
parents: 8161
diff changeset
   238
by (rtac iffI 1);
85a47aa21f74 tidying and unbatchifying
paulson
parents: 8161
diff changeset
   239
by (etac exE 1);
85a47aa21f74 tidying and unbatchifying
paulson
parents: 8161
diff changeset
   240
by (hyp_subst_tac 1);
85a47aa21f74 tidying and unbatchifying
paulson
parents: 8161
diff changeset
   241
by (rtac defined_up 1);
85a47aa21f74 tidying and unbatchifying
paulson
parents: 8161
diff changeset
   242
by (res_inst_tac [("p","z")] upE1 1);
85a47aa21f74 tidying and unbatchifying
paulson
parents: 8161
diff changeset
   243
by (etac notE 1);
85a47aa21f74 tidying and unbatchifying
paulson
parents: 8161
diff changeset
   244
by (atac 1);
85a47aa21f74 tidying and unbatchifying
paulson
parents: 8161
diff changeset
   245
by (etac exI 1);
85a47aa21f74 tidying and unbatchifying
paulson
parents: 8161
diff changeset
   246
qed "up_lemma2";
2278
d63ffafce255 *** empty log message ***
oheimb
parents:
diff changeset
   247
d63ffafce255 *** empty log message ***
oheimb
parents:
diff changeset
   248
9169
85a47aa21f74 tidying and unbatchifying
paulson
parents: 8161
diff changeset
   249
Goal "[| chain(Y); lub(range(Y)) = up`x |] ==> ? i x. Y(i) = up`x";
85a47aa21f74 tidying and unbatchifying
paulson
parents: 8161
diff changeset
   250
by (rtac exE 1);
85a47aa21f74 tidying and unbatchifying
paulson
parents: 8161
diff changeset
   251
by (rtac chain_UU_I_inverse2 1);
85a47aa21f74 tidying and unbatchifying
paulson
parents: 8161
diff changeset
   252
by (rtac (up_lemma2 RS iffD1) 1);
85a47aa21f74 tidying and unbatchifying
paulson
parents: 8161
diff changeset
   253
by (etac exI 1);
85a47aa21f74 tidying and unbatchifying
paulson
parents: 8161
diff changeset
   254
by (rtac exI 1);
85a47aa21f74 tidying and unbatchifying
paulson
parents: 8161
diff changeset
   255
by (rtac (up_lemma2 RS iffD2) 1);
85a47aa21f74 tidying and unbatchifying
paulson
parents: 8161
diff changeset
   256
by (atac 1);
85a47aa21f74 tidying and unbatchifying
paulson
parents: 8161
diff changeset
   257
qed "thelub_up2a_rev";
2278
d63ffafce255 *** empty log message ***
oheimb
parents:
diff changeset
   258
9169
85a47aa21f74 tidying and unbatchifying
paulson
parents: 8161
diff changeset
   259
Goal "[| chain(Y); lub(range(Y)) = UU |] ==> ! i x.  Y(i) ~= up`x";
85a47aa21f74 tidying and unbatchifying
paulson
parents: 8161
diff changeset
   260
by (rtac allI 1);
85a47aa21f74 tidying and unbatchifying
paulson
parents: 8161
diff changeset
   261
by (rtac (not_ex RS iffD1) 1);
85a47aa21f74 tidying and unbatchifying
paulson
parents: 8161
diff changeset
   262
by (rtac contrapos 1);
85a47aa21f74 tidying and unbatchifying
paulson
parents: 8161
diff changeset
   263
by (etac (up_lemma2 RS iffD1) 2);
85a47aa21f74 tidying and unbatchifying
paulson
parents: 8161
diff changeset
   264
by (fast_tac (HOL_cs addSDs [chain_UU_I RS spec]) 1);
85a47aa21f74 tidying and unbatchifying
paulson
parents: 8161
diff changeset
   265
qed "thelub_up2b_rev";
2278
d63ffafce255 *** empty log message ***
oheimb
parents:
diff changeset
   266
d63ffafce255 *** empty log message ***
oheimb
parents:
diff changeset
   267
9169
85a47aa21f74 tidying and unbatchifying
paulson
parents: 8161
diff changeset
   268
Goal "chain(Y) ==> lub(range(Y)) = UU | \
85a47aa21f74 tidying and unbatchifying
paulson
parents: 8161
diff changeset
   269
\                  lub(range(Y)) = up`(lub(range(%i. fup`(LAM x. x)`(Y i))))";
85a47aa21f74 tidying and unbatchifying
paulson
parents: 8161
diff changeset
   270
by (rtac disjE 1);
85a47aa21f74 tidying and unbatchifying
paulson
parents: 8161
diff changeset
   271
by (rtac disjI1 2);
85a47aa21f74 tidying and unbatchifying
paulson
parents: 8161
diff changeset
   272
by (rtac thelub_up2b 2);
85a47aa21f74 tidying and unbatchifying
paulson
parents: 8161
diff changeset
   273
by (atac 2);
85a47aa21f74 tidying and unbatchifying
paulson
parents: 8161
diff changeset
   274
by (atac 2);
85a47aa21f74 tidying and unbatchifying
paulson
parents: 8161
diff changeset
   275
by (rtac disjI2 2);
85a47aa21f74 tidying and unbatchifying
paulson
parents: 8161
diff changeset
   276
by (rtac thelub_up2a 2);
85a47aa21f74 tidying and unbatchifying
paulson
parents: 8161
diff changeset
   277
by (atac 2);
85a47aa21f74 tidying and unbatchifying
paulson
parents: 8161
diff changeset
   278
by (atac 2);
85a47aa21f74 tidying and unbatchifying
paulson
parents: 8161
diff changeset
   279
by (fast_tac HOL_cs 1);
85a47aa21f74 tidying and unbatchifying
paulson
parents: 8161
diff changeset
   280
qed "thelub_up3";
2278
d63ffafce255 *** empty log message ***
oheimb
parents:
diff changeset
   281
9169
85a47aa21f74 tidying and unbatchifying
paulson
parents: 8161
diff changeset
   282
Goal "fup`up`x=x";
85a47aa21f74 tidying and unbatchifying
paulson
parents: 8161
diff changeset
   283
by (res_inst_tac [("p","x")] upE1 1);
85a47aa21f74 tidying and unbatchifying
paulson
parents: 8161
diff changeset
   284
by (asm_simp_tac ((simpset_of Cfun3.thy) addsimps [fup1,fup2]) 1);
85a47aa21f74 tidying and unbatchifying
paulson
parents: 8161
diff changeset
   285
by (asm_simp_tac ((simpset_of Cfun3.thy) addsimps [fup1,fup2]) 1);
85a47aa21f74 tidying and unbatchifying
paulson
parents: 8161
diff changeset
   286
qed "fup3";
2278
d63ffafce255 *** empty log message ***
oheimb
parents:
diff changeset
   287
d63ffafce255 *** empty log message ***
oheimb
parents:
diff changeset
   288
(* ------------------------------------------------------------------------ *)
d63ffafce255 *** empty log message ***
oheimb
parents:
diff changeset
   289
(* install simplifier for ('a)u                                             *)
d63ffafce255 *** empty log message ***
oheimb
parents:
diff changeset
   290
(* ------------------------------------------------------------------------ *)
d63ffafce255 *** empty log message ***
oheimb
parents:
diff changeset
   291
3327
9b8e638f8602 Eliminated ccc1. Moved ID,oo into Cfun.
slotosch
parents: 2640
diff changeset
   292
Addsimps [fup1,fup2,defined_up];