src/HOLCF/Up3.ML
author wenzelm
Sun, 15 Oct 2000 19:50:35 +0200
changeset 10220 2a726de6e124
parent 9248 e1dee89de037
child 10230 5eb935d6cc69
permissions -rw-r--r--
proper symbol markup with \isamath, \isatext; support sub/super scripts:
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
9248
e1dee89de037 massive tidy-up: goal -> Goal, remove use of prems, etc.
paulson
parents: 9245
diff changeset
   135
Goalw [up_def] "z = UU | (? x. z = up`x)";
9245
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
9248
e1dee89de037 massive tidy-up: goal -> Goal, remove use of prems, etc.
paulson
parents: 9245
diff changeset
   141
Goalw [up_def] "up`x=up`y ==> x=y";
9245
428385c4bc50 removed most batch-style proofs
paulson
parents: 9169
diff changeset
   142
by (rtac inject_Iup 1);
428385c4bc50 removed most batch-style proofs
paulson
parents: 9169
diff changeset
   143
by (etac box_equals 1);
428385c4bc50 removed most batch-style proofs
paulson
parents: 9169
diff changeset
   144
by (simp_tac (Up0_ss addsimps [cont_Iup]) 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
qed "inject_up";
2278
d63ffafce255 *** empty log message ***
oheimb
parents:
diff changeset
   147
9248
e1dee89de037 massive tidy-up: goal -> Goal, remove use of prems, etc.
paulson
parents: 9245
diff changeset
   148
Goalw [up_def] " up`x ~= UU";
9245
428385c4bc50 removed most batch-style proofs
paulson
parents: 9169
diff changeset
   149
by (simp_tac (Up0_ss addsimps [cont_Iup]) 1);
428385c4bc50 removed most batch-style proofs
paulson
parents: 9169
diff changeset
   150
by (rtac defined_Iup2 1);
428385c4bc50 removed most batch-style proofs
paulson
parents: 9169
diff changeset
   151
qed "defined_up";
2278
d63ffafce255 *** empty log message ***
oheimb
parents:
diff changeset
   152
9248
e1dee89de037 massive tidy-up: goal -> Goal, remove use of prems, etc.
paulson
parents: 9245
diff changeset
   153
val prems = Goalw [up_def] 
9245
428385c4bc50 removed most batch-style proofs
paulson
parents: 9169
diff changeset
   154
        "[| p=UU ==> Q; !!x. p=up`x==>Q|] ==>Q";
428385c4bc50 removed most batch-style proofs
paulson
parents: 9169
diff changeset
   155
by (rtac upE 1);
428385c4bc50 removed most batch-style proofs
paulson
parents: 9169
diff changeset
   156
by (resolve_tac prems 1);
428385c4bc50 removed most batch-style proofs
paulson
parents: 9169
diff changeset
   157
by (etac (inst_up_pcpo RS ssubst) 1);
428385c4bc50 removed most batch-style proofs
paulson
parents: 9169
diff changeset
   158
by (resolve_tac (tl prems) 1);
428385c4bc50 removed most batch-style proofs
paulson
parents: 9169
diff changeset
   159
by (asm_simp_tac (Up0_ss addsimps [cont_Iup]) 1);
428385c4bc50 removed most batch-style proofs
paulson
parents: 9169
diff changeset
   160
qed "upE1";
2278
d63ffafce255 *** empty log message ***
oheimb
parents:
diff changeset
   161
4098
71e05eb27fb6 isatool fixclasimp;
wenzelm
parents: 3842
diff changeset
   162
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
   163
                cont_Ifup2,cont2cont_CF1L]) 1);
2278
d63ffafce255 *** empty log message ***
oheimb
parents:
diff changeset
   164
9248
e1dee89de037 massive tidy-up: goal -> Goal, remove use of prems, etc.
paulson
parents: 9245
diff changeset
   165
Goalw [up_def,fup_def] "fup`f`UU=UU";
9245
428385c4bc50 removed most batch-style proofs
paulson
parents: 9169
diff changeset
   166
by (stac inst_up_pcpo 1);
428385c4bc50 removed most batch-style proofs
paulson
parents: 9169
diff changeset
   167
by (stac beta_cfun 1);
428385c4bc50 removed most batch-style proofs
paulson
parents: 9169
diff changeset
   168
by tac;
428385c4bc50 removed most batch-style proofs
paulson
parents: 9169
diff changeset
   169
by (stac beta_cfun 1);
428385c4bc50 removed most batch-style proofs
paulson
parents: 9169
diff changeset
   170
by tac;
428385c4bc50 removed most batch-style proofs
paulson
parents: 9169
diff changeset
   171
by (simp_tac (Up0_ss addsimps [cont_Iup,cont_Ifup1,cont_Ifup2]) 1);
428385c4bc50 removed most batch-style proofs
paulson
parents: 9169
diff changeset
   172
qed "fup1";
2278
d63ffafce255 *** empty log message ***
oheimb
parents:
diff changeset
   173
9248
e1dee89de037 massive tidy-up: goal -> Goal, remove use of prems, etc.
paulson
parents: 9245
diff changeset
   174
Goalw [up_def,fup_def] "fup`f`(up`x)=f`x";
9245
428385c4bc50 removed most batch-style proofs
paulson
parents: 9169
diff changeset
   175
by (stac beta_cfun 1);
428385c4bc50 removed most batch-style proofs
paulson
parents: 9169
diff changeset
   176
by (rtac cont_Iup 1);
428385c4bc50 removed most batch-style proofs
paulson
parents: 9169
diff changeset
   177
by (stac beta_cfun 1);
428385c4bc50 removed most batch-style proofs
paulson
parents: 9169
diff changeset
   178
by tac;
428385c4bc50 removed most batch-style proofs
paulson
parents: 9169
diff changeset
   179
by (stac beta_cfun 1);
428385c4bc50 removed most batch-style proofs
paulson
parents: 9169
diff changeset
   180
by (rtac cont_Ifup2 1);
428385c4bc50 removed most batch-style proofs
paulson
parents: 9169
diff changeset
   181
by (simp_tac (Up0_ss addsimps [cont_Iup,cont_Ifup1,cont_Ifup2]) 1);
428385c4bc50 removed most batch-style proofs
paulson
parents: 9169
diff changeset
   182
qed "fup2";
2278
d63ffafce255 *** empty log message ***
oheimb
parents:
diff changeset
   183
9248
e1dee89de037 massive tidy-up: goal -> Goal, remove use of prems, etc.
paulson
parents: 9245
diff changeset
   184
Goalw [up_def,fup_def] "~ up`x << UU";
9245
428385c4bc50 removed most batch-style proofs
paulson
parents: 9169
diff changeset
   185
by (simp_tac (Up0_ss addsimps [cont_Iup]) 1);
428385c4bc50 removed most batch-style proofs
paulson
parents: 9169
diff changeset
   186
by (rtac less_up3b 1);
428385c4bc50 removed most batch-style proofs
paulson
parents: 9169
diff changeset
   187
qed "less_up4b";
2278
d63ffafce255 *** empty log message ***
oheimb
parents:
diff changeset
   188
9248
e1dee89de037 massive tidy-up: goal -> Goal, remove use of prems, etc.
paulson
parents: 9245
diff changeset
   189
Goalw [up_def,fup_def]
9245
428385c4bc50 removed most batch-style proofs
paulson
parents: 9169
diff changeset
   190
         "(up`x << up`y) = (x<<y)";
428385c4bc50 removed most batch-style proofs
paulson
parents: 9169
diff changeset
   191
by (simp_tac (Up0_ss addsimps [cont_Iup]) 1);
428385c4bc50 removed most batch-style proofs
paulson
parents: 9169
diff changeset
   192
by (rtac less_up2c 1);
428385c4bc50 removed most batch-style proofs
paulson
parents: 9169
diff changeset
   193
qed "less_up4c";
2278
d63ffafce255 *** empty log message ***
oheimb
parents:
diff changeset
   194
9248
e1dee89de037 massive tidy-up: goal -> Goal, remove use of prems, etc.
paulson
parents: 9245
diff changeset
   195
Goalw [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
   196
"[| chain(Y); ? i x. Y(i) = up`x |] ==>\
9245
428385c4bc50 removed most batch-style proofs
paulson
parents: 9169
diff changeset
   197
\      lub(range(Y)) = up`(lub(range(%i. fup`(LAM x. x)`(Y i))))";
428385c4bc50 removed most batch-style proofs
paulson
parents: 9169
diff changeset
   198
by (stac beta_cfun 1);
428385c4bc50 removed most batch-style proofs
paulson
parents: 9169
diff changeset
   199
by tac;
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 RS ext) 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 (rtac thelub_up1a 1);
428385c4bc50 removed most batch-style proofs
paulson
parents: 9169
diff changeset
   205
by (atac 1);
428385c4bc50 removed most batch-style proofs
paulson
parents: 9169
diff changeset
   206
by (etac exE 1);
428385c4bc50 removed most batch-style proofs
paulson
parents: 9169
diff changeset
   207
by (etac exE 1);
428385c4bc50 removed most batch-style proofs
paulson
parents: 9169
diff changeset
   208
by (rtac exI 1);
428385c4bc50 removed most batch-style proofs
paulson
parents: 9169
diff changeset
   209
by (rtac exI 1);
428385c4bc50 removed most batch-style proofs
paulson
parents: 9169
diff changeset
   210
by (etac box_equals 1);
428385c4bc50 removed most batch-style proofs
paulson
parents: 9169
diff changeset
   211
by (rtac refl 1);
428385c4bc50 removed most batch-style proofs
paulson
parents: 9169
diff changeset
   212
by (simp_tac (Up0_ss addsimps [cont_Iup]) 1);
428385c4bc50 removed most batch-style proofs
paulson
parents: 9169
diff changeset
   213
qed "thelub_up2a";
2278
d63ffafce255 *** empty log message ***
oheimb
parents:
diff changeset
   214
d63ffafce255 *** empty log message ***
oheimb
parents:
diff changeset
   215
d63ffafce255 *** empty log message ***
oheimb
parents:
diff changeset
   216
9248
e1dee89de037 massive tidy-up: goal -> Goal, remove use of prems, etc.
paulson
parents: 9245
diff changeset
   217
Goalw [up_def,fup_def] 
9245
428385c4bc50 removed most batch-style proofs
paulson
parents: 9169
diff changeset
   218
"[| chain(Y); ! i x. Y(i) ~= up`x |] ==> lub(range(Y)) = UU";
428385c4bc50 removed most batch-style proofs
paulson
parents: 9169
diff changeset
   219
by (stac inst_up_pcpo 1);
428385c4bc50 removed most batch-style proofs
paulson
parents: 9169
diff changeset
   220
by (rtac thelub_up1b 1);
428385c4bc50 removed most batch-style proofs
paulson
parents: 9169
diff changeset
   221
by (atac 1);
428385c4bc50 removed most batch-style proofs
paulson
parents: 9169
diff changeset
   222
by (strip_tac 1);
428385c4bc50 removed most batch-style proofs
paulson
parents: 9169
diff changeset
   223
by (dtac spec 1);
428385c4bc50 removed most batch-style proofs
paulson
parents: 9169
diff changeset
   224
by (dtac spec 1);
428385c4bc50 removed most batch-style proofs
paulson
parents: 9169
diff changeset
   225
by (rtac swap 1);
428385c4bc50 removed most batch-style proofs
paulson
parents: 9169
diff changeset
   226
by (atac 1);
428385c4bc50 removed most batch-style proofs
paulson
parents: 9169
diff changeset
   227
by (dtac notnotD 1);
428385c4bc50 removed most batch-style proofs
paulson
parents: 9169
diff changeset
   228
by (etac box_equals 1);
428385c4bc50 removed most batch-style proofs
paulson
parents: 9169
diff changeset
   229
by (rtac refl 1);
428385c4bc50 removed most batch-style proofs
paulson
parents: 9169
diff changeset
   230
by (simp_tac (Up0_ss addsimps [cont_Iup]) 1);
428385c4bc50 removed most batch-style proofs
paulson
parents: 9169
diff changeset
   231
qed "thelub_up2b";
2278
d63ffafce255 *** empty log message ***
oheimb
parents:
diff changeset
   232
d63ffafce255 *** empty log message ***
oheimb
parents:
diff changeset
   233
9169
85a47aa21f74 tidying and unbatchifying
paulson
parents: 8161
diff changeset
   234
Goal "(? x. z = up`x) = (z~=UU)";
85a47aa21f74 tidying and unbatchifying
paulson
parents: 8161
diff changeset
   235
by (rtac iffI 1);
85a47aa21f74 tidying and unbatchifying
paulson
parents: 8161
diff changeset
   236
by (etac exE 1);
85a47aa21f74 tidying and unbatchifying
paulson
parents: 8161
diff changeset
   237
by (hyp_subst_tac 1);
85a47aa21f74 tidying and unbatchifying
paulson
parents: 8161
diff changeset
   238
by (rtac defined_up 1);
85a47aa21f74 tidying and unbatchifying
paulson
parents: 8161
diff changeset
   239
by (res_inst_tac [("p","z")] upE1 1);
85a47aa21f74 tidying and unbatchifying
paulson
parents: 8161
diff changeset
   240
by (etac notE 1);
85a47aa21f74 tidying and unbatchifying
paulson
parents: 8161
diff changeset
   241
by (atac 1);
85a47aa21f74 tidying and unbatchifying
paulson
parents: 8161
diff changeset
   242
by (etac exI 1);
85a47aa21f74 tidying and unbatchifying
paulson
parents: 8161
diff changeset
   243
qed "up_lemma2";
2278
d63ffafce255 *** empty log message ***
oheimb
parents:
diff changeset
   244
d63ffafce255 *** empty log message ***
oheimb
parents:
diff changeset
   245
9169
85a47aa21f74 tidying and unbatchifying
paulson
parents: 8161
diff changeset
   246
Goal "[| chain(Y); lub(range(Y)) = up`x |] ==> ? i x. Y(i) = up`x";
85a47aa21f74 tidying and unbatchifying
paulson
parents: 8161
diff changeset
   247
by (rtac exE 1);
85a47aa21f74 tidying and unbatchifying
paulson
parents: 8161
diff changeset
   248
by (rtac chain_UU_I_inverse2 1);
85a47aa21f74 tidying and unbatchifying
paulson
parents: 8161
diff changeset
   249
by (rtac (up_lemma2 RS iffD1) 1);
85a47aa21f74 tidying and unbatchifying
paulson
parents: 8161
diff changeset
   250
by (etac exI 1);
85a47aa21f74 tidying and unbatchifying
paulson
parents: 8161
diff changeset
   251
by (rtac exI 1);
85a47aa21f74 tidying and unbatchifying
paulson
parents: 8161
diff changeset
   252
by (rtac (up_lemma2 RS iffD2) 1);
85a47aa21f74 tidying and unbatchifying
paulson
parents: 8161
diff changeset
   253
by (atac 1);
85a47aa21f74 tidying and unbatchifying
paulson
parents: 8161
diff changeset
   254
qed "thelub_up2a_rev";
2278
d63ffafce255 *** empty log message ***
oheimb
parents:
diff changeset
   255
9169
85a47aa21f74 tidying and unbatchifying
paulson
parents: 8161
diff changeset
   256
Goal "[| chain(Y); lub(range(Y)) = UU |] ==> ! i x.  Y(i) ~= up`x";
85a47aa21f74 tidying and unbatchifying
paulson
parents: 8161
diff changeset
   257
by (rtac allI 1);
85a47aa21f74 tidying and unbatchifying
paulson
parents: 8161
diff changeset
   258
by (rtac (not_ex RS iffD1) 1);
85a47aa21f74 tidying and unbatchifying
paulson
parents: 8161
diff changeset
   259
by (rtac contrapos 1);
85a47aa21f74 tidying and unbatchifying
paulson
parents: 8161
diff changeset
   260
by (etac (up_lemma2 RS iffD1) 2);
85a47aa21f74 tidying and unbatchifying
paulson
parents: 8161
diff changeset
   261
by (fast_tac (HOL_cs addSDs [chain_UU_I RS spec]) 1);
85a47aa21f74 tidying and unbatchifying
paulson
parents: 8161
diff changeset
   262
qed "thelub_up2b_rev";
2278
d63ffafce255 *** empty log message ***
oheimb
parents:
diff changeset
   263
d63ffafce255 *** empty log message ***
oheimb
parents:
diff changeset
   264
9169
85a47aa21f74 tidying and unbatchifying
paulson
parents: 8161
diff changeset
   265
Goal "chain(Y) ==> lub(range(Y)) = UU | \
85a47aa21f74 tidying and unbatchifying
paulson
parents: 8161
diff changeset
   266
\                  lub(range(Y)) = up`(lub(range(%i. fup`(LAM x. x)`(Y i))))";
85a47aa21f74 tidying and unbatchifying
paulson
parents: 8161
diff changeset
   267
by (rtac disjE 1);
85a47aa21f74 tidying and unbatchifying
paulson
parents: 8161
diff changeset
   268
by (rtac disjI1 2);
85a47aa21f74 tidying and unbatchifying
paulson
parents: 8161
diff changeset
   269
by (rtac thelub_up2b 2);
85a47aa21f74 tidying and unbatchifying
paulson
parents: 8161
diff changeset
   270
by (atac 2);
85a47aa21f74 tidying and unbatchifying
paulson
parents: 8161
diff changeset
   271
by (atac 2);
85a47aa21f74 tidying and unbatchifying
paulson
parents: 8161
diff changeset
   272
by (rtac disjI2 2);
85a47aa21f74 tidying and unbatchifying
paulson
parents: 8161
diff changeset
   273
by (rtac thelub_up2a 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 (atac 2);
85a47aa21f74 tidying and unbatchifying
paulson
parents: 8161
diff changeset
   276
by (fast_tac HOL_cs 1);
85a47aa21f74 tidying and unbatchifying
paulson
parents: 8161
diff changeset
   277
qed "thelub_up3";
2278
d63ffafce255 *** empty log message ***
oheimb
parents:
diff changeset
   278
9169
85a47aa21f74 tidying and unbatchifying
paulson
parents: 8161
diff changeset
   279
Goal "fup`up`x=x";
85a47aa21f74 tidying and unbatchifying
paulson
parents: 8161
diff changeset
   280
by (res_inst_tac [("p","x")] upE1 1);
85a47aa21f74 tidying and unbatchifying
paulson
parents: 8161
diff changeset
   281
by (asm_simp_tac ((simpset_of Cfun3.thy) addsimps [fup1,fup2]) 1);
85a47aa21f74 tidying and unbatchifying
paulson
parents: 8161
diff changeset
   282
by (asm_simp_tac ((simpset_of Cfun3.thy) addsimps [fup1,fup2]) 1);
85a47aa21f74 tidying and unbatchifying
paulson
parents: 8161
diff changeset
   283
qed "fup3";
2278
d63ffafce255 *** empty log message ***
oheimb
parents:
diff changeset
   284
d63ffafce255 *** empty log message ***
oheimb
parents:
diff changeset
   285
(* ------------------------------------------------------------------------ *)
d63ffafce255 *** empty log message ***
oheimb
parents:
diff changeset
   286
(* install simplifier for ('a)u                                             *)
d63ffafce255 *** empty log message ***
oheimb
parents:
diff changeset
   287
(* ------------------------------------------------------------------------ *)
d63ffafce255 *** empty log message ***
oheimb
parents:
diff changeset
   288
3327
9b8e638f8602 Eliminated ccc1. Moved ID,oo into Cfun.
slotosch
parents: 2640
diff changeset
   289
Addsimps [fup1,fup2,defined_up];