src/HOLCF/Fix.ML
author paulson
Thu, 26 Sep 1996 15:14:23 +0200
changeset 2033 639de962ded4
parent 1992 0256c8b71ff1
child 2275 dbce3dce821a
permissions -rw-r--r--
Ran expandshort; used stac instead of ssubst
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
1461
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
     1
(*  Title:      HOLCF/fix.ML
243
c22b85994e17 Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff changeset
     2
    ID:         $Id$
1461
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
     3
    Author:     Franz Regensburger
243
c22b85994e17 Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff changeset
     4
    Copyright   1993  Technische Universitaet Muenchen
c22b85994e17 Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff changeset
     5
c22b85994e17 Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff changeset
     6
Lemmas for fix.thy 
c22b85994e17 Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff changeset
     7
*)
c22b85994e17 Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff changeset
     8
c22b85994e17 Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff changeset
     9
open Fix;
c22b85994e17 Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff changeset
    10
c22b85994e17 Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff changeset
    11
(* ------------------------------------------------------------------------ *)
c22b85994e17 Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff changeset
    12
(* derive inductive properties of iterate from primitive recursion          *)
c22b85994e17 Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff changeset
    13
(* ------------------------------------------------------------------------ *)
c22b85994e17 Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff changeset
    14
1168
74be52691d62 The curried version of HOLCF is now just called HOLCF. The old
regensbu
parents: 892
diff changeset
    15
qed_goal "iterate_0" Fix.thy "iterate 0 F x = x"
243
c22b85994e17 Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff changeset
    16
 (fn prems =>
1461
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
    17
        [
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
    18
        (resolve_tac (nat_recs iterate_def) 1)
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
    19
        ]);
243
c22b85994e17 Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff changeset
    20
1168
74be52691d62 The curried version of HOLCF is now just called HOLCF. The old
regensbu
parents: 892
diff changeset
    21
qed_goal "iterate_Suc" Fix.thy "iterate (Suc n) F x  = F`(iterate n F x)"
243
c22b85994e17 Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff changeset
    22
 (fn prems =>
1461
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
    23
        [
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
    24
        (resolve_tac (nat_recs iterate_def) 1)
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
    25
        ]);
243
c22b85994e17 Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff changeset
    26
1267
bca91b4e1710 added local simpsets
clasohm
parents: 1168
diff changeset
    27
Addsimps [iterate_0, iterate_Suc];
243
c22b85994e17 Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff changeset
    28
1168
74be52691d62 The curried version of HOLCF is now just called HOLCF. The old
regensbu
parents: 892
diff changeset
    29
qed_goal "iterate_Suc2" Fix.thy "iterate (Suc n) F x = iterate n F (F`x)"
243
c22b85994e17 Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff changeset
    30
 (fn prems =>
1461
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
    31
        [
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
    32
        (nat_ind_tac "n" 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
    33
        (Simp_tac 1),
2033
639de962ded4 Ran expandshort; used stac instead of ssubst
paulson
parents: 1992
diff changeset
    34
        (stac iterate_Suc 1),
639de962ded4 Ran expandshort; used stac instead of ssubst
paulson
parents: 1992
diff changeset
    35
        (stac iterate_Suc 1),
639de962ded4 Ran expandshort; used stac instead of ssubst
paulson
parents: 1992
diff changeset
    36
        (etac ssubst 1),
639de962ded4 Ran expandshort; used stac instead of ssubst
paulson
parents: 1992
diff changeset
    37
        (rtac refl 1)
1461
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
    38
        ]);
243
c22b85994e17 Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff changeset
    39
c22b85994e17 Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff changeset
    40
(* ------------------------------------------------------------------------ *)
c22b85994e17 Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff changeset
    41
(* the sequence of function itertaions is a chain                           *)
c22b85994e17 Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff changeset
    42
(* This property is essential since monotonicity of iterate makes no sense  *)
c22b85994e17 Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff changeset
    43
(* ------------------------------------------------------------------------ *)
c22b85994e17 Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff changeset
    44
892
d0dc8d057929 added qed, qed_goal[w]
clasohm
parents: 628
diff changeset
    45
qed_goalw "is_chain_iterate2" Fix.thy [is_chain] 
1461
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
    46
        " x << F`x ==> is_chain (%i.iterate i F x)"
243
c22b85994e17 Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff changeset
    47
 (fn prems =>
1461
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
    48
        [
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
    49
        (cut_facts_tac prems 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
    50
        (strip_tac 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
    51
        (Simp_tac 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
    52
        (nat_ind_tac "i" 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
    53
        (Asm_simp_tac 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
    54
        (Asm_simp_tac 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
    55
        (etac monofun_cfun_arg 1)
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
    56
        ]);
243
c22b85994e17 Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff changeset
    57
c22b85994e17 Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff changeset
    58
892
d0dc8d057929 added qed, qed_goal[w]
clasohm
parents: 628
diff changeset
    59
qed_goal "is_chain_iterate" Fix.thy  
1461
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
    60
        "is_chain (%i.iterate i F UU)"
243
c22b85994e17 Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff changeset
    61
 (fn prems =>
1461
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
    62
        [
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
    63
        (rtac is_chain_iterate2 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
    64
        (rtac minimal 1)
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
    65
        ]);
243
c22b85994e17 Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff changeset
    66
c22b85994e17 Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff changeset
    67
c22b85994e17 Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff changeset
    68
(* ------------------------------------------------------------------------ *)
c22b85994e17 Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff changeset
    69
(* Kleene's fixed point theorems for continuous functions in pointed        *)
c22b85994e17 Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff changeset
    70
(* omega cpo's                                                              *)
c22b85994e17 Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff changeset
    71
(* ------------------------------------------------------------------------ *)
c22b85994e17 Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff changeset
    72
c22b85994e17 Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff changeset
    73
1168
74be52691d62 The curried version of HOLCF is now just called HOLCF. The old
regensbu
parents: 892
diff changeset
    74
qed_goalw "Ifix_eq" Fix.thy  [Ifix_def] "Ifix F =F`(Ifix F)"
243
c22b85994e17 Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff changeset
    75
 (fn prems =>
1461
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
    76
        [
2033
639de962ded4 Ran expandshort; used stac instead of ssubst
paulson
parents: 1992
diff changeset
    77
        (stac contlub_cfun_arg 1),
1461
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
    78
        (rtac is_chain_iterate 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
    79
        (rtac antisym_less 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
    80
        (rtac lub_mono 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
    81
        (rtac is_chain_iterate 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
    82
        (rtac ch2ch_fappR 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
    83
        (rtac is_chain_iterate 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
    84
        (rtac allI 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
    85
        (rtac (iterate_Suc RS subst) 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
    86
        (rtac (is_chain_iterate RS is_chainE RS spec) 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
    87
        (rtac is_lub_thelub 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
    88
        (rtac ch2ch_fappR 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
    89
        (rtac is_chain_iterate 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
    90
        (rtac ub_rangeI 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
    91
        (rtac allI 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
    92
        (rtac (iterate_Suc RS subst) 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
    93
        (rtac is_ub_thelub 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
    94
        (rtac is_chain_iterate 1)
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
    95
        ]);
243
c22b85994e17 Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff changeset
    96
c22b85994e17 Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff changeset
    97
1168
74be52691d62 The curried version of HOLCF is now just called HOLCF. The old
regensbu
parents: 892
diff changeset
    98
qed_goalw "Ifix_least" Fix.thy [Ifix_def] "F`x=x ==> Ifix(F) << x"
243
c22b85994e17 Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff changeset
    99
 (fn prems =>
1461
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   100
        [
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   101
        (cut_facts_tac prems 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   102
        (rtac is_lub_thelub 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   103
        (rtac is_chain_iterate 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   104
        (rtac ub_rangeI 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   105
        (strip_tac 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   106
        (nat_ind_tac "i" 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   107
        (Asm_simp_tac 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   108
        (Asm_simp_tac 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   109
        (res_inst_tac [("t","x")] subst 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   110
        (atac 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   111
        (etac monofun_cfun_arg 1)
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   112
        ]);
243
c22b85994e17 Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff changeset
   113
c22b85994e17 Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff changeset
   114
c22b85994e17 Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff changeset
   115
(* ------------------------------------------------------------------------ *)
c22b85994e17 Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff changeset
   116
(* monotonicity and continuity of iterate                                   *)
c22b85994e17 Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff changeset
   117
(* ------------------------------------------------------------------------ *)
c22b85994e17 Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff changeset
   118
892
d0dc8d057929 added qed, qed_goal[w]
clasohm
parents: 628
diff changeset
   119
qed_goalw "monofun_iterate" Fix.thy  [monofun] "monofun(iterate(i))"
243
c22b85994e17 Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff changeset
   120
 (fn prems =>
1461
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   121
        [
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   122
        (strip_tac 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   123
        (nat_ind_tac "i" 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   124
        (Asm_simp_tac 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   125
        (Asm_simp_tac 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   126
        (rtac (less_fun RS iffD2) 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   127
        (rtac allI 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   128
        (rtac monofun_cfun 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   129
        (atac 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   130
        (rtac (less_fun RS iffD1 RS spec) 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   131
        (atac 1)
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   132
        ]);
243
c22b85994e17 Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff changeset
   133
c22b85994e17 Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff changeset
   134
(* ------------------------------------------------------------------------ *)
c22b85994e17 Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff changeset
   135
(* the following lemma uses contlub_cfun which itself is based on a         *)
c22b85994e17 Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff changeset
   136
(* diagonalisation lemma for continuous functions with two arguments.       *)
c22b85994e17 Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff changeset
   137
(* In this special case it is the application function fapp                 *)
c22b85994e17 Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff changeset
   138
(* ------------------------------------------------------------------------ *)
c22b85994e17 Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff changeset
   139
892
d0dc8d057929 added qed, qed_goal[w]
clasohm
parents: 628
diff changeset
   140
qed_goalw "contlub_iterate" Fix.thy  [contlub] "contlub(iterate(i))"
243
c22b85994e17 Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff changeset
   141
 (fn prems =>
1461
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   142
        [
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   143
        (strip_tac 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   144
        (nat_ind_tac "i" 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   145
        (Asm_simp_tac 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   146
        (rtac (lub_const RS thelubI RS sym) 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   147
        (Asm_simp_tac 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   148
        (rtac ext 1),
2033
639de962ded4 Ran expandshort; used stac instead of ssubst
paulson
parents: 1992
diff changeset
   149
        (stac thelub_fun 1),
1461
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   150
        (rtac is_chainI 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   151
        (rtac allI 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   152
        (rtac (less_fun RS iffD2) 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   153
        (rtac allI 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   154
        (rtac (is_chainE RS spec) 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   155
        (rtac (monofun_fapp1 RS ch2ch_MF2LR) 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   156
        (rtac allI 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   157
        (rtac monofun_fapp2 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   158
        (atac 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   159
        (rtac ch2ch_fun 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   160
        (rtac (monofun_iterate RS ch2ch_monofun) 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   161
        (atac 1),
2033
639de962ded4 Ran expandshort; used stac instead of ssubst
paulson
parents: 1992
diff changeset
   162
        (stac thelub_fun 1),
1461
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   163
        (rtac (monofun_iterate RS ch2ch_monofun) 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   164
        (atac 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   165
        (rtac contlub_cfun  1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   166
        (atac 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   167
        (etac (monofun_iterate RS ch2ch_monofun RS ch2ch_fun) 1)
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   168
        ]);
243
c22b85994e17 Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff changeset
   169
c22b85994e17 Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff changeset
   170
1168
74be52691d62 The curried version of HOLCF is now just called HOLCF. The old
regensbu
parents: 892
diff changeset
   171
qed_goal "cont_iterate" Fix.thy "cont(iterate(i))"
243
c22b85994e17 Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff changeset
   172
 (fn prems =>
1461
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   173
        [
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   174
        (rtac monocontlub2cont 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   175
        (rtac monofun_iterate 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   176
        (rtac contlub_iterate 1)
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   177
        ]);
243
c22b85994e17 Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff changeset
   178
c22b85994e17 Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff changeset
   179
(* ------------------------------------------------------------------------ *)
c22b85994e17 Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff changeset
   180
(* a lemma about continuity of iterate in its third argument                *)
c22b85994e17 Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff changeset
   181
(* ------------------------------------------------------------------------ *)
c22b85994e17 Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff changeset
   182
1168
74be52691d62 The curried version of HOLCF is now just called HOLCF. The old
regensbu
parents: 892
diff changeset
   183
qed_goal "monofun_iterate2" Fix.thy "monofun(iterate n F)"
243
c22b85994e17 Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff changeset
   184
 (fn prems =>
1461
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   185
        [
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   186
        (rtac monofunI 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   187
        (strip_tac 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   188
        (nat_ind_tac "n" 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   189
        (Asm_simp_tac 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   190
        (Asm_simp_tac 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   191
        (etac monofun_cfun_arg 1)
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   192
        ]);
243
c22b85994e17 Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff changeset
   193
1168
74be52691d62 The curried version of HOLCF is now just called HOLCF. The old
regensbu
parents: 892
diff changeset
   194
qed_goal "contlub_iterate2" Fix.thy "contlub(iterate n F)"
243
c22b85994e17 Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff changeset
   195
 (fn prems =>
1461
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   196
        [
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   197
        (rtac contlubI 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   198
        (strip_tac 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   199
        (nat_ind_tac "n" 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   200
        (Simp_tac 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   201
        (Simp_tac 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   202
        (res_inst_tac [("t","iterate n1 F (lub(range(%u. Y u)))"),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   203
        ("s","lub(range(%i. iterate n1 F (Y i)))")] ssubst 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   204
        (atac 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   205
        (rtac contlub_cfun_arg 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   206
        (etac (monofun_iterate2 RS ch2ch_monofun) 1)
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   207
        ]);
243
c22b85994e17 Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff changeset
   208
1168
74be52691d62 The curried version of HOLCF is now just called HOLCF. The old
regensbu
parents: 892
diff changeset
   209
qed_goal "cont_iterate2" Fix.thy "cont (iterate n F)"
243
c22b85994e17 Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff changeset
   210
 (fn prems =>
1461
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   211
        [
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   212
        (rtac monocontlub2cont 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   213
        (rtac monofun_iterate2 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   214
        (rtac contlub_iterate2 1)
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   215
        ]);
243
c22b85994e17 Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff changeset
   216
c22b85994e17 Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff changeset
   217
(* ------------------------------------------------------------------------ *)
c22b85994e17 Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff changeset
   218
(* monotonicity and continuity of Ifix                                      *)
c22b85994e17 Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff changeset
   219
(* ------------------------------------------------------------------------ *)
c22b85994e17 Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff changeset
   220
892
d0dc8d057929 added qed, qed_goal[w]
clasohm
parents: 628
diff changeset
   221
qed_goalw "monofun_Ifix" Fix.thy  [monofun,Ifix_def] "monofun(Ifix)"
243
c22b85994e17 Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff changeset
   222
 (fn prems =>
1461
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   223
        [
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   224
        (strip_tac 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   225
        (rtac lub_mono 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   226
        (rtac is_chain_iterate 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   227
        (rtac is_chain_iterate 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   228
        (rtac allI 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   229
        (rtac (less_fun RS iffD1 RS spec) 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   230
        (etac (monofun_iterate RS monofunE RS spec RS spec RS mp) 1)
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   231
        ]);
243
c22b85994e17 Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff changeset
   232
c22b85994e17 Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff changeset
   233
c22b85994e17 Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff changeset
   234
(* ------------------------------------------------------------------------ *)
c22b85994e17 Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff changeset
   235
(* since iterate is not monotone in its first argument, special lemmas must *)
c22b85994e17 Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff changeset
   236
(* be derived for lubs in this argument                                     *)
c22b85994e17 Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff changeset
   237
(* ------------------------------------------------------------------------ *)
c22b85994e17 Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff changeset
   238
892
d0dc8d057929 added qed, qed_goal[w]
clasohm
parents: 628
diff changeset
   239
qed_goal "is_chain_iterate_lub" Fix.thy   
1168
74be52691d62 The curried version of HOLCF is now just called HOLCF. The old
regensbu
parents: 892
diff changeset
   240
"is_chain(Y) ==> is_chain(%i. lub(range(%ia. iterate ia (Y i) UU)))"
243
c22b85994e17 Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff changeset
   241
 (fn prems =>
1461
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   242
        [
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   243
        (cut_facts_tac prems 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   244
        (rtac is_chainI 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   245
        (strip_tac 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   246
        (rtac lub_mono 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   247
        (rtac is_chain_iterate 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   248
        (rtac is_chain_iterate 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   249
        (strip_tac 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   250
        (etac (monofun_iterate RS ch2ch_monofun RS ch2ch_fun RS is_chainE 
243
c22b85994e17 Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff changeset
   251
         RS spec) 1)
1461
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   252
        ]);
243
c22b85994e17 Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff changeset
   253
c22b85994e17 Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff changeset
   254
(* ------------------------------------------------------------------------ *)
c22b85994e17 Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff changeset
   255
(* this exchange lemma is analog to the one for monotone functions          *)
c22b85994e17 Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff changeset
   256
(* observe that monotonicity is not really needed. The propagation of       *)
c22b85994e17 Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff changeset
   257
(* chains is the essential argument which is usually derived from monot.    *)
c22b85994e17 Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff changeset
   258
(* ------------------------------------------------------------------------ *)
c22b85994e17 Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff changeset
   259
892
d0dc8d057929 added qed, qed_goal[w]
clasohm
parents: 628
diff changeset
   260
qed_goal "contlub_Ifix_lemma1" Fix.thy 
1168
74be52691d62 The curried version of HOLCF is now just called HOLCF. The old
regensbu
parents: 892
diff changeset
   261
"is_chain(Y) ==>iterate n (lub(range Y)) y = lub(range(%i. iterate n (Y i) y))"
243
c22b85994e17 Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff changeset
   262
 (fn prems =>
1461
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   263
        [
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   264
        (cut_facts_tac prems 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   265
        (rtac (thelub_fun RS subst) 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   266
        (rtac (monofun_iterate RS ch2ch_monofun) 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   267
        (atac 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   268
        (rtac fun_cong 1),
2033
639de962ded4 Ran expandshort; used stac instead of ssubst
paulson
parents: 1992
diff changeset
   269
        (stac (contlub_iterate RS contlubE RS spec RS mp) 1),
1461
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   270
        (atac 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   271
        (rtac refl 1)
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   272
        ]);
243
c22b85994e17 Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff changeset
   273
c22b85994e17 Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff changeset
   274
892
d0dc8d057929 added qed, qed_goal[w]
clasohm
parents: 628
diff changeset
   275
qed_goal "ex_lub_iterate" Fix.thy  "is_chain(Y) ==>\
1168
74be52691d62 The curried version of HOLCF is now just called HOLCF. The old
regensbu
parents: 892
diff changeset
   276
\         lub(range(%i. lub(range(%ia. iterate i (Y ia) UU)))) =\
74be52691d62 The curried version of HOLCF is now just called HOLCF. The old
regensbu
parents: 892
diff changeset
   277
\         lub(range(%i. lub(range(%ia. iterate ia (Y i) UU))))"
243
c22b85994e17 Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff changeset
   278
 (fn prems =>
1461
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   279
        [
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   280
        (cut_facts_tac prems 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   281
        (rtac antisym_less 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   282
        (rtac is_lub_thelub 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   283
        (rtac (contlub_Ifix_lemma1 RS ext RS subst) 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   284
        (atac 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   285
        (rtac is_chain_iterate 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   286
        (rtac ub_rangeI 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   287
        (strip_tac 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   288
        (rtac lub_mono 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   289
        (etac (monofun_iterate RS ch2ch_monofun RS ch2ch_fun) 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   290
        (etac is_chain_iterate_lub 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   291
        (strip_tac 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   292
        (rtac is_ub_thelub 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   293
        (rtac is_chain_iterate 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   294
        (rtac is_lub_thelub 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   295
        (etac is_chain_iterate_lub 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   296
        (rtac ub_rangeI 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   297
        (strip_tac 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   298
        (rtac lub_mono 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   299
        (rtac is_chain_iterate 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   300
        (rtac (contlub_Ifix_lemma1 RS ext RS subst) 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   301
        (atac 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   302
        (rtac is_chain_iterate 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   303
        (strip_tac 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   304
        (rtac is_ub_thelub 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   305
        (etac (monofun_iterate RS ch2ch_monofun RS ch2ch_fun) 1)
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   306
        ]);
243
c22b85994e17 Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff changeset
   307
c22b85994e17 Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff changeset
   308
892
d0dc8d057929 added qed, qed_goal[w]
clasohm
parents: 628
diff changeset
   309
qed_goalw "contlub_Ifix" Fix.thy  [contlub,Ifix_def] "contlub(Ifix)"
243
c22b85994e17 Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff changeset
   310
 (fn prems =>
1461
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   311
        [
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   312
        (strip_tac 1),
2033
639de962ded4 Ran expandshort; used stac instead of ssubst
paulson
parents: 1992
diff changeset
   313
        (stac (contlub_Ifix_lemma1 RS ext) 1),
1461
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   314
        (atac 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   315
        (etac ex_lub_iterate 1)
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   316
        ]);
243
c22b85994e17 Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff changeset
   317
c22b85994e17 Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff changeset
   318
1168
74be52691d62 The curried version of HOLCF is now just called HOLCF. The old
regensbu
parents: 892
diff changeset
   319
qed_goal "cont_Ifix" Fix.thy "cont(Ifix)"
243
c22b85994e17 Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff changeset
   320
 (fn prems =>
1461
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   321
        [
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   322
        (rtac monocontlub2cont 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   323
        (rtac monofun_Ifix 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   324
        (rtac contlub_Ifix 1)
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   325
        ]);
243
c22b85994e17 Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff changeset
   326
c22b85994e17 Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff changeset
   327
(* ------------------------------------------------------------------------ *)
c22b85994e17 Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff changeset
   328
(* propagate properties of Ifix to its continuous counterpart               *)
c22b85994e17 Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff changeset
   329
(* ------------------------------------------------------------------------ *)
c22b85994e17 Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff changeset
   330
1168
74be52691d62 The curried version of HOLCF is now just called HOLCF. The old
regensbu
parents: 892
diff changeset
   331
qed_goalw "fix_eq" Fix.thy  [fix_def] "fix`F = F`(fix`F)"
243
c22b85994e17 Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff changeset
   332
 (fn prems =>
1461
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   333
        [
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   334
        (asm_simp_tac (!simpset addsimps [cont_Ifix]) 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   335
        (rtac Ifix_eq 1)
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   336
        ]);
243
c22b85994e17 Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff changeset
   337
1168
74be52691d62 The curried version of HOLCF is now just called HOLCF. The old
regensbu
parents: 892
diff changeset
   338
qed_goalw "fix_least" Fix.thy [fix_def] "F`x = x ==> fix`F << x"
243
c22b85994e17 Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff changeset
   339
 (fn prems =>
1461
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   340
        [
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   341
        (cut_facts_tac prems 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   342
        (asm_simp_tac (!simpset addsimps [cont_Ifix]) 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   343
        (etac Ifix_least 1)
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   344
        ]);
243
c22b85994e17 Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff changeset
   345
c22b85994e17 Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff changeset
   346
1274
ea0668a1c0ba added 8bit pragmas
regensbu
parents: 1267
diff changeset
   347
qed_goal "fix_eqI" Fix.thy
ea0668a1c0ba added 8bit pragmas
regensbu
parents: 1267
diff changeset
   348
"[| F`x = x; !z. F`z = z --> x << z |] ==> x = fix`F"
ea0668a1c0ba added 8bit pragmas
regensbu
parents: 1267
diff changeset
   349
 (fn prems =>
1461
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   350
        [
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   351
        (cut_facts_tac prems 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   352
        (rtac antisym_less 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   353
        (etac allE 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   354
        (etac mp 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   355
        (rtac (fix_eq RS sym) 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   356
        (etac fix_least 1)
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   357
        ]);
1274
ea0668a1c0ba added 8bit pragmas
regensbu
parents: 1267
diff changeset
   358
ea0668a1c0ba added 8bit pragmas
regensbu
parents: 1267
diff changeset
   359
1168
74be52691d62 The curried version of HOLCF is now just called HOLCF. The old
regensbu
parents: 892
diff changeset
   360
qed_goal "fix_eq2" Fix.thy "f == fix`F ==> f = F`f"
243
c22b85994e17 Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff changeset
   361
 (fn prems =>
1461
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   362
        [
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   363
        (rewrite_goals_tac prems),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   364
        (rtac fix_eq 1)
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   365
        ]);
243
c22b85994e17 Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff changeset
   366
1168
74be52691d62 The curried version of HOLCF is now just called HOLCF. The old
regensbu
parents: 892
diff changeset
   367
qed_goal "fix_eq3" Fix.thy "f == fix`F ==> f`x = F`f`x"
243
c22b85994e17 Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff changeset
   368
 (fn prems =>
1461
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   369
        [
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   370
        (rtac trans 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   371
        (rtac ((hd prems) RS fix_eq2 RS cfun_fun_cong) 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   372
        (rtac refl 1)
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   373
        ]);
243
c22b85994e17 Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff changeset
   374
c22b85994e17 Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff changeset
   375
fun fix_tac3 thm i  = ((rtac trans i) THEN (rtac (thm RS fix_eq3) i)); 
c22b85994e17 Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff changeset
   376
1168
74be52691d62 The curried version of HOLCF is now just called HOLCF. The old
regensbu
parents: 892
diff changeset
   377
qed_goal "fix_eq4" Fix.thy "f = fix`F ==> f = F`f"
243
c22b85994e17 Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff changeset
   378
 (fn prems =>
1461
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   379
        [
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   380
        (cut_facts_tac prems 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   381
        (hyp_subst_tac 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   382
        (rtac fix_eq 1)
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   383
        ]);
243
c22b85994e17 Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff changeset
   384
1168
74be52691d62 The curried version of HOLCF is now just called HOLCF. The old
regensbu
parents: 892
diff changeset
   385
qed_goal "fix_eq5" Fix.thy "f = fix`F ==> f`x = F`f`x"
243
c22b85994e17 Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff changeset
   386
 (fn prems =>
1461
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   387
        [
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   388
        (rtac trans 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   389
        (rtac ((hd prems) RS fix_eq4 RS cfun_fun_cong) 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   390
        (rtac refl 1)
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   391
        ]);
243
c22b85994e17 Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff changeset
   392
c22b85994e17 Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff changeset
   393
fun fix_tac5 thm i  = ((rtac trans i) THEN (rtac (thm RS fix_eq5) i)); 
c22b85994e17 Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff changeset
   394
c22b85994e17 Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff changeset
   395
fun fix_prover thy fixdef thm = prove_goal thy thm
c22b85994e17 Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff changeset
   396
 (fn prems =>
c22b85994e17 Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff changeset
   397
        [
c22b85994e17 Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff changeset
   398
        (rtac trans 1),
c22b85994e17 Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff changeset
   399
        (rtac (fixdef RS fix_eq4) 1),
c22b85994e17 Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff changeset
   400
        (rtac trans 1),
c22b85994e17 Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff changeset
   401
        (rtac beta_cfun 1),
1168
74be52691d62 The curried version of HOLCF is now just called HOLCF. The old
regensbu
parents: 892
diff changeset
   402
        (cont_tacR 1),
243
c22b85994e17 Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff changeset
   403
        (rtac refl 1)
c22b85994e17 Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff changeset
   404
        ]);
c22b85994e17 Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff changeset
   405
1168
74be52691d62 The curried version of HOLCF is now just called HOLCF. The old
regensbu
parents: 892
diff changeset
   406
(* use this one for definitions! *)
297
5ef75ff3baeb Franz fragen
nipkow
parents: 271
diff changeset
   407
1168
74be52691d62 The curried version of HOLCF is now just called HOLCF. The old
regensbu
parents: 892
diff changeset
   408
fun fix_prover2 thy fixdef thm = prove_goal thy thm
74be52691d62 The curried version of HOLCF is now just called HOLCF. The old
regensbu
parents: 892
diff changeset
   409
 (fn prems =>
1461
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   410
        [
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   411
        (rtac trans 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   412
        (rtac (fix_eq2) 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   413
        (rtac fixdef 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   414
        (rtac beta_cfun 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   415
        (cont_tacR 1)
1168
74be52691d62 The curried version of HOLCF is now just called HOLCF. The old
regensbu
parents: 892
diff changeset
   416
        ]);
243
c22b85994e17 Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff changeset
   417
c22b85994e17 Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff changeset
   418
(* ------------------------------------------------------------------------ *)
c22b85994e17 Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff changeset
   419
(* better access to definitions                                             *)
c22b85994e17 Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff changeset
   420
(* ------------------------------------------------------------------------ *)
c22b85994e17 Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff changeset
   421
c22b85994e17 Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff changeset
   422
1168
74be52691d62 The curried version of HOLCF is now just called HOLCF. The old
regensbu
parents: 892
diff changeset
   423
qed_goal "Ifix_def2" Fix.thy "Ifix=(%x. lub(range(%i. iterate i x UU)))"
243
c22b85994e17 Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff changeset
   424
 (fn prems =>
1461
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   425
        [
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   426
        (rtac ext 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   427
        (rewtac Ifix_def),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   428
        (rtac refl 1)
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   429
        ]);
243
c22b85994e17 Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff changeset
   430
c22b85994e17 Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff changeset
   431
(* ------------------------------------------------------------------------ *)
c22b85994e17 Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff changeset
   432
(* direct connection between fix and iteration without Ifix                 *)
c22b85994e17 Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff changeset
   433
(* ------------------------------------------------------------------------ *)
c22b85994e17 Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff changeset
   434
892
d0dc8d057929 added qed, qed_goal[w]
clasohm
parents: 628
diff changeset
   435
qed_goalw "fix_def2" Fix.thy [fix_def]
1168
74be52691d62 The curried version of HOLCF is now just called HOLCF. The old
regensbu
parents: 892
diff changeset
   436
 "fix`F = lub(range(%i. iterate i F UU))"
243
c22b85994e17 Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff changeset
   437
 (fn prems =>
1461
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   438
        [
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   439
        (fold_goals_tac [Ifix_def]),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   440
        (asm_simp_tac (!simpset addsimps [cont_Ifix]) 1)
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   441
        ]);
243
c22b85994e17 Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff changeset
   442
c22b85994e17 Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff changeset
   443
c22b85994e17 Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff changeset
   444
(* ------------------------------------------------------------------------ *)
c22b85994e17 Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff changeset
   445
(* Lemmas about admissibility and fixed point induction                     *)
c22b85994e17 Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff changeset
   446
(* ------------------------------------------------------------------------ *)
c22b85994e17 Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff changeset
   447
c22b85994e17 Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff changeset
   448
(* ------------------------------------------------------------------------ *)
c22b85994e17 Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff changeset
   449
(* access to definitions                                                    *)
c22b85994e17 Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff changeset
   450
(* ------------------------------------------------------------------------ *)
c22b85994e17 Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff changeset
   451
892
d0dc8d057929 added qed, qed_goal[w]
clasohm
parents: 628
diff changeset
   452
qed_goalw "adm_def2" Fix.thy [adm_def]
1461
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   453
        "adm(P) = (!Y. is_chain(Y) --> (!i.P(Y(i))) --> P(lub(range(Y))))"
243
c22b85994e17 Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff changeset
   454
 (fn prems =>
1461
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   455
        [
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   456
        (rtac refl 1)
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   457
        ]);
243
c22b85994e17 Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff changeset
   458
892
d0dc8d057929 added qed, qed_goal[w]
clasohm
parents: 628
diff changeset
   459
qed_goalw "admw_def2" Fix.thy [admw_def]
1461
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   460
        "admw(P) = (!F.(!n.P(iterate n F UU)) -->\
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   461
\                        P (lub(range(%i.iterate i F UU))))"
243
c22b85994e17 Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff changeset
   462
 (fn prems =>
1461
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   463
        [
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   464
        (rtac refl 1)
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   465
        ]);
243
c22b85994e17 Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff changeset
   466
c22b85994e17 Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff changeset
   467
(* ------------------------------------------------------------------------ *)
c22b85994e17 Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff changeset
   468
(* an admissible formula is also weak admissible                            *)
c22b85994e17 Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff changeset
   469
(* ------------------------------------------------------------------------ *)
c22b85994e17 Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff changeset
   470
892
d0dc8d057929 added qed, qed_goal[w]
clasohm
parents: 628
diff changeset
   471
qed_goalw "adm_impl_admw"  Fix.thy [admw_def] "adm(P)==>admw(P)"
243
c22b85994e17 Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff changeset
   472
 (fn prems =>
1461
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   473
        [
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   474
        (cut_facts_tac prems 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   475
        (strip_tac 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   476
        (rtac (adm_def2 RS iffD1 RS spec RS mp RS mp) 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   477
        (atac 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   478
        (rtac is_chain_iterate 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   479
        (atac 1)
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   480
        ]);
243
c22b85994e17 Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff changeset
   481
c22b85994e17 Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff changeset
   482
(* ------------------------------------------------------------------------ *)
c22b85994e17 Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff changeset
   483
(* fixed point induction                                                    *)
c22b85994e17 Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff changeset
   484
(* ------------------------------------------------------------------------ *)
c22b85994e17 Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff changeset
   485
892
d0dc8d057929 added qed, qed_goal[w]
clasohm
parents: 628
diff changeset
   486
qed_goal "fix_ind"  Fix.thy  
1168
74be52691d62 The curried version of HOLCF is now just called HOLCF. The old
regensbu
parents: 892
diff changeset
   487
"[| adm(P);P(UU);!!x. P(x) ==> P(F`x)|] ==> P(fix`F)"
243
c22b85994e17 Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff changeset
   488
 (fn prems =>
1461
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   489
        [
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   490
        (cut_facts_tac prems 1),
2033
639de962ded4 Ran expandshort; used stac instead of ssubst
paulson
parents: 1992
diff changeset
   491
        (stac fix_def2 1),
1461
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   492
        (rtac (adm_def2 RS iffD1 RS spec RS mp RS mp) 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   493
        (atac 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   494
        (rtac is_chain_iterate 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   495
        (rtac allI 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   496
        (nat_ind_tac "i" 1),
2033
639de962ded4 Ran expandshort; used stac instead of ssubst
paulson
parents: 1992
diff changeset
   497
        (stac iterate_0 1),
1461
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   498
        (atac 1),
2033
639de962ded4 Ran expandshort; used stac instead of ssubst
paulson
parents: 1992
diff changeset
   499
        (stac iterate_Suc 1),
1461
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   500
        (resolve_tac prems 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   501
        (atac 1)
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   502
        ]);
243
c22b85994e17 Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff changeset
   503
c22b85994e17 Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff changeset
   504
(* ------------------------------------------------------------------------ *)
c22b85994e17 Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff changeset
   505
(* computational induction for weak admissible formulae                     *)
c22b85994e17 Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff changeset
   506
(* ------------------------------------------------------------------------ *)
c22b85994e17 Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff changeset
   507
892
d0dc8d057929 added qed, qed_goal[w]
clasohm
parents: 628
diff changeset
   508
qed_goal "wfix_ind"  Fix.thy  
1168
74be52691d62 The curried version of HOLCF is now just called HOLCF. The old
regensbu
parents: 892
diff changeset
   509
"[| admw(P); !n. P(iterate n F UU)|] ==> P(fix`F)"
243
c22b85994e17 Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff changeset
   510
 (fn prems =>
1461
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   511
        [
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   512
        (cut_facts_tac prems 1),
2033
639de962ded4 Ran expandshort; used stac instead of ssubst
paulson
parents: 1992
diff changeset
   513
        (stac fix_def2 1),
1461
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   514
        (rtac (admw_def2 RS iffD1 RS spec RS mp) 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   515
        (atac 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   516
        (rtac allI 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   517
        (etac spec 1)
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   518
        ]);
243
c22b85994e17 Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff changeset
   519
c22b85994e17 Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff changeset
   520
(* ------------------------------------------------------------------------ *)
c22b85994e17 Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff changeset
   521
(* for chain-finite (easy) types every formula is admissible                *)
c22b85994e17 Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff changeset
   522
(* ------------------------------------------------------------------------ *)
c22b85994e17 Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff changeset
   523
892
d0dc8d057929 added qed, qed_goal[w]
clasohm
parents: 628
diff changeset
   524
qed_goalw "adm_max_in_chain"  Fix.thy  [adm_def]
1168
74be52691d62 The curried version of HOLCF is now just called HOLCF. The old
regensbu
parents: 892
diff changeset
   525
"!Y. is_chain(Y::nat=>'a) --> (? n.max_in_chain n Y) ==> adm(P::'a=>bool)"
243
c22b85994e17 Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff changeset
   526
 (fn prems =>
1461
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   527
        [
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   528
        (cut_facts_tac prems 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   529
        (strip_tac 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   530
        (rtac exE 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   531
        (rtac mp 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   532
        (etac spec 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   533
        (atac 1),
2033
639de962ded4 Ran expandshort; used stac instead of ssubst
paulson
parents: 1992
diff changeset
   534
        (stac (lub_finch1 RS thelubI) 1),
1461
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   535
        (atac 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   536
        (atac 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   537
        (etac spec 1)
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   538
        ]);
243
c22b85994e17 Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff changeset
   539
892
d0dc8d057929 added qed, qed_goal[w]
clasohm
parents: 628
diff changeset
   540
qed_goalw "adm_chain_finite"  Fix.thy  [chain_finite_def]
1461
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   541
        "chain_finite(x::'a) ==> adm(P::'a=>bool)"
243
c22b85994e17 Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff changeset
   542
 (fn prems =>
1461
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   543
        [
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   544
        (cut_facts_tac prems 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   545
        (etac adm_max_in_chain 1)
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   546
        ]);
243
c22b85994e17 Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff changeset
   547
c22b85994e17 Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff changeset
   548
(* ------------------------------------------------------------------------ *)
c22b85994e17 Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff changeset
   549
(* flat types are chain_finite                                              *)
c22b85994e17 Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff changeset
   550
(* ------------------------------------------------------------------------ *)
c22b85994e17 Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff changeset
   551
1410
324aa8134639 changed predicate flat to is_flat in theory Fix.thy
regensbu
parents: 1274
diff changeset
   552
qed_goalw "flat_imp_chain_finite"  Fix.thy  [is_flat_def,chain_finite_def]
1461
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   553
        "is_flat(x::'a)==>chain_finite(x::'a)"
243
c22b85994e17 Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff changeset
   554
 (fn prems =>
1461
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   555
        [
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   556
        (rewtac max_in_chain_def),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   557
        (cut_facts_tac prems 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   558
        (strip_tac 1),
1675
36ba4da350c3 adapted several proofs
oheimb
parents: 1461
diff changeset
   559
        (case_tac "!i.Y(i)=UU" 1),
1461
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   560
        (res_inst_tac [("x","0")] exI 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   561
        (strip_tac 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   562
        (rtac trans 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   563
        (etac spec 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   564
        (rtac sym 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   565
        (etac spec 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   566
        (rtac (chain_mono2 RS exE) 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   567
        (fast_tac HOL_cs 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   568
        (atac 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   569
        (res_inst_tac [("x","Suc(x)")] exI 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   570
        (strip_tac 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   571
        (rtac disjE 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   572
        (atac 3),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   573
        (rtac mp 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   574
        (dtac spec 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   575
        (etac spec 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   576
        (etac (le_imp_less_or_eq RS disjE) 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   577
        (etac (chain_mono RS mp) 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   578
        (atac 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   579
        (hyp_subst_tac 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   580
        (rtac refl_less 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   581
        (res_inst_tac [("P","Y(Suc(x)) = UU")] notE 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   582
        (atac 2),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   583
        (rtac mp 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   584
        (etac spec 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   585
        (Asm_simp_tac 1)
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   586
        ]);
243
c22b85994e17 Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff changeset
   587
c22b85994e17 Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff changeset
   588
1779
1155c06fa956 introduced forgotten bind_thm calls
oheimb
parents: 1681
diff changeset
   589
bind_thm ("adm_flat", flat_imp_chain_finite RS adm_chain_finite);
1410
324aa8134639 changed predicate flat to is_flat in theory Fix.thy
regensbu
parents: 1274
diff changeset
   590
(* is_flat(?x::?'a) ==> adm(?P::?'a => bool) *)
243
c22b85994e17 Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff changeset
   591
1410
324aa8134639 changed predicate flat to is_flat in theory Fix.thy
regensbu
parents: 1274
diff changeset
   592
qed_goalw "flat_void" Fix.thy [is_flat_def] "is_flat(UU::void)"
243
c22b85994e17 Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff changeset
   593
 (fn prems =>
1461
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   594
        [
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   595
        (strip_tac 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   596
        (rtac disjI1 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   597
        (rtac unique_void2 1)
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   598
        ]);
243
c22b85994e17 Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff changeset
   599
1992
0256c8b71ff1 added flat_eq,
oheimb
parents: 1872
diff changeset
   600
qed_goalw "flat_eq" Fix.thy [is_flat_def] 
2033
639de962ded4 Ran expandshort; used stac instead of ssubst
paulson
parents: 1992
diff changeset
   601
        "[| is_flat (x::'a); (a::'a) ~= UU |] ==> a << b = (a = b)" (fn prems=>[
639de962ded4 Ran expandshort; used stac instead of ssubst
paulson
parents: 1992
diff changeset
   602
        (cut_facts_tac prems 1),
639de962ded4 Ran expandshort; used stac instead of ssubst
paulson
parents: 1992
diff changeset
   603
        (fast_tac (HOL_cs addIs [refl_less]) 1)]);
1992
0256c8b71ff1 added flat_eq,
oheimb
parents: 1872
diff changeset
   604
0256c8b71ff1 added flat_eq,
oheimb
parents: 1872
diff changeset
   605
(* ------------------------------------------------------------------------ *)
0256c8b71ff1 added flat_eq,
oheimb
parents: 1872
diff changeset
   606
(* lemmata for improved admissibility introdution rule                      *)
0256c8b71ff1 added flat_eq,
oheimb
parents: 1872
diff changeset
   607
(* ------------------------------------------------------------------------ *)
0256c8b71ff1 added flat_eq,
oheimb
parents: 1872
diff changeset
   608
0256c8b71ff1 added flat_eq,
oheimb
parents: 1872
diff changeset
   609
qed_goal "infinite_chain_adm_lemma" Porder.thy 
0256c8b71ff1 added flat_eq,
oheimb
parents: 1872
diff changeset
   610
"[|is_chain Y; !i. P (Y i); \
0256c8b71ff1 added flat_eq,
oheimb
parents: 1872
diff changeset
   611
\  (!!Y. [| is_chain Y; !i. P (Y i); ~ finite_chain Y |] ==> P (lub (range Y)))\
0256c8b71ff1 added flat_eq,
oheimb
parents: 1872
diff changeset
   612
\ |] ==> P (lub (range Y))"
0256c8b71ff1 added flat_eq,
oheimb
parents: 1872
diff changeset
   613
 (fn prems => [
2033
639de962ded4 Ran expandshort; used stac instead of ssubst
paulson
parents: 1992
diff changeset
   614
        cut_facts_tac prems 1,
639de962ded4 Ran expandshort; used stac instead of ssubst
paulson
parents: 1992
diff changeset
   615
        case_tac "finite_chain Y" 1,
639de962ded4 Ran expandshort; used stac instead of ssubst
paulson
parents: 1992
diff changeset
   616
         eresolve_tac prems 2, atac 2, atac 2,
639de962ded4 Ran expandshort; used stac instead of ssubst
paulson
parents: 1992
diff changeset
   617
        rewtac finite_chain_def,
639de962ded4 Ran expandshort; used stac instead of ssubst
paulson
parents: 1992
diff changeset
   618
        safe_tac HOL_cs,
639de962ded4 Ran expandshort; used stac instead of ssubst
paulson
parents: 1992
diff changeset
   619
        etac (lub_finch1 RS thelubI RS ssubst) 1, atac 1, etac spec 1]);
1992
0256c8b71ff1 added flat_eq,
oheimb
parents: 1872
diff changeset
   620
0256c8b71ff1 added flat_eq,
oheimb
parents: 1872
diff changeset
   621
qed_goal "increasing_chain_adm_lemma" Porder.thy 
0256c8b71ff1 added flat_eq,
oheimb
parents: 1872
diff changeset
   622
"[|is_chain Y; !i. P (Y i); \
0256c8b71ff1 added flat_eq,
oheimb
parents: 1872
diff changeset
   623
\  (!!Y. [| is_chain Y; !i. P (Y i); !i. ? j. i < j & Y i ~= Y j & Y i << Y j|]\
0256c8b71ff1 added flat_eq,
oheimb
parents: 1872
diff changeset
   624
\ ==> P (lub (range Y))) |] ==> P (lub (range Y))"
0256c8b71ff1 added flat_eq,
oheimb
parents: 1872
diff changeset
   625
 (fn prems => [
2033
639de962ded4 Ran expandshort; used stac instead of ssubst
paulson
parents: 1992
diff changeset
   626
        cut_facts_tac prems 1,
639de962ded4 Ran expandshort; used stac instead of ssubst
paulson
parents: 1992
diff changeset
   627
        etac infinite_chain_adm_lemma 1, atac 1, etac thin_rl 1,
639de962ded4 Ran expandshort; used stac instead of ssubst
paulson
parents: 1992
diff changeset
   628
        rewtac finite_chain_def,
639de962ded4 Ran expandshort; used stac instead of ssubst
paulson
parents: 1992
diff changeset
   629
        safe_tac HOL_cs,
639de962ded4 Ran expandshort; used stac instead of ssubst
paulson
parents: 1992
diff changeset
   630
        etac swap 1,
639de962ded4 Ran expandshort; used stac instead of ssubst
paulson
parents: 1992
diff changeset
   631
        rewtac max_in_chain_def,
639de962ded4 Ran expandshort; used stac instead of ssubst
paulson
parents: 1992
diff changeset
   632
        resolve_tac prems 1, atac 1, atac 1,
639de962ded4 Ran expandshort; used stac instead of ssubst
paulson
parents: 1992
diff changeset
   633
        fast_tac (HOL_cs addDs [le_imp_less_or_eq] 
639de962ded4 Ran expandshort; used stac instead of ssubst
paulson
parents: 1992
diff changeset
   634
                         addEs [chain_mono RS mp]) 1]);
1992
0256c8b71ff1 added flat_eq,
oheimb
parents: 1872
diff changeset
   635
0256c8b71ff1 added flat_eq,
oheimb
parents: 1872
diff changeset
   636
qed_goalw "admI" Fix.thy [adm_def]
0256c8b71ff1 added flat_eq,
oheimb
parents: 1872
diff changeset
   637
 "(!!Y. [| is_chain Y; !i. P (Y i); !i. ? j. i < j & Y i ~= Y j & Y i << Y j |]\
0256c8b71ff1 added flat_eq,
oheimb
parents: 1872
diff changeset
   638
\ ==> P(lub (range Y))) ==> adm P" 
0256c8b71ff1 added flat_eq,
oheimb
parents: 1872
diff changeset
   639
 (fn prems => [
2033
639de962ded4 Ran expandshort; used stac instead of ssubst
paulson
parents: 1992
diff changeset
   640
        strip_tac 1,
639de962ded4 Ran expandshort; used stac instead of ssubst
paulson
parents: 1992
diff changeset
   641
        etac increasing_chain_adm_lemma 1, atac 1,
639de962ded4 Ran expandshort; used stac instead of ssubst
paulson
parents: 1992
diff changeset
   642
        eresolve_tac prems 1, atac 1, atac 1]);
1992
0256c8b71ff1 added flat_eq,
oheimb
parents: 1872
diff changeset
   643
0256c8b71ff1 added flat_eq,
oheimb
parents: 1872
diff changeset
   644
243
c22b85994e17 Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff changeset
   645
(* ------------------------------------------------------------------------ *)
c22b85994e17 Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff changeset
   646
(* continuous isomorphisms are strict                                       *)
c22b85994e17 Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff changeset
   647
(* a prove for embedding projection pairs is similar                        *)
c22b85994e17 Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff changeset
   648
(* ------------------------------------------------------------------------ *)
c22b85994e17 Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff changeset
   649
892
d0dc8d057929 added qed, qed_goal[w]
clasohm
parents: 628
diff changeset
   650
qed_goal "iso_strict"  Fix.thy  
1168
74be52691d62 The curried version of HOLCF is now just called HOLCF. The old
regensbu
parents: 892
diff changeset
   651
"!!f g.[|!y.f`(g`y)=(y::'b) ; !x.g`(f`x)=(x::'a) |] \
74be52691d62 The curried version of HOLCF is now just called HOLCF. The old
regensbu
parents: 892
diff changeset
   652
\ ==> f`UU=UU & g`UU=UU"
243
c22b85994e17 Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff changeset
   653
 (fn prems =>
1461
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   654
        [
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   655
        (rtac conjI 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   656
        (rtac UU_I 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   657
        (res_inst_tac [("s","f`(g`(UU::'b))"),("t","UU::'b")] subst 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   658
        (etac spec 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   659
        (rtac (minimal RS monofun_cfun_arg) 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   660
        (rtac UU_I 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   661
        (res_inst_tac [("s","g`(f`(UU::'a))"),("t","UU::'a")] subst 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   662
        (etac spec 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   663
        (rtac (minimal RS monofun_cfun_arg) 1)
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   664
        ]);
243
c22b85994e17 Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff changeset
   665
c22b85994e17 Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff changeset
   666
892
d0dc8d057929 added qed, qed_goal[w]
clasohm
parents: 628
diff changeset
   667
qed_goal "isorep_defined" Fix.thy 
1461
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   668
        "[|!x.rep`(abs`x)=x;!y.abs`(rep`y)=y; z~=UU|] ==> rep`z ~= UU"
243
c22b85994e17 Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff changeset
   669
 (fn prems =>
1461
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   670
        [
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   671
        (cut_facts_tac prems 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   672
        (etac swap 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   673
        (dtac notnotD 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   674
        (dres_inst_tac [("f","abs")] cfun_arg_cong 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   675
        (etac box_equals 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   676
        (fast_tac HOL_cs 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   677
        (etac (iso_strict RS conjunct1) 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   678
        (atac 1)
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   679
        ]);
243
c22b85994e17 Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff changeset
   680
892
d0dc8d057929 added qed, qed_goal[w]
clasohm
parents: 628
diff changeset
   681
qed_goal "isoabs_defined" Fix.thy 
1461
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   682
        "[|!x.rep`(abs`x) = x;!y.abs`(rep`y)=y ; z~=UU|] ==> abs`z ~= UU"
243
c22b85994e17 Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff changeset
   683
 (fn prems =>
1461
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   684
        [
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   685
        (cut_facts_tac prems 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   686
        (etac swap 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   687
        (dtac notnotD 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   688
        (dres_inst_tac [("f","rep")] cfun_arg_cong 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   689
        (etac box_equals 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   690
        (fast_tac HOL_cs 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   691
        (etac (iso_strict RS conjunct2) 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   692
        (atac 1)
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   693
        ]);
243
c22b85994e17 Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff changeset
   694
c22b85994e17 Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff changeset
   695
(* ------------------------------------------------------------------------ *)
c22b85994e17 Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff changeset
   696
(* propagation of flatness and chainfiniteness by continuous isomorphisms   *)
c22b85994e17 Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff changeset
   697
(* ------------------------------------------------------------------------ *)
c22b85994e17 Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff changeset
   698
892
d0dc8d057929 added qed, qed_goal[w]
clasohm
parents: 628
diff changeset
   699
qed_goalw "chfin2chfin"  Fix.thy  [chain_finite_def]
1168
74be52691d62 The curried version of HOLCF is now just called HOLCF. The old
regensbu
parents: 892
diff changeset
   700
"!!f g.[|chain_finite(x::'a); !y.f`(g`y)=(y::'b) ; !x.g`(f`x)=(x::'a) |] \
243
c22b85994e17 Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff changeset
   701
\ ==> chain_finite(y::'b)"
c22b85994e17 Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff changeset
   702
 (fn prems =>
1461
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   703
        [
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   704
        (rewtac max_in_chain_def),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   705
        (strip_tac 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   706
        (rtac exE 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   707
        (res_inst_tac [("P","is_chain(%i.g`(Y i))")] mp 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   708
        (etac spec 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   709
        (etac ch2ch_fappR 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   710
        (rtac exI 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   711
        (strip_tac 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   712
        (res_inst_tac [("s","f`(g`(Y x))"),("t","Y(x)")] subst 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   713
        (etac spec 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   714
        (res_inst_tac [("s","f`(g`(Y j))"),("t","Y(j)")] subst 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   715
        (etac spec 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   716
        (rtac cfun_arg_cong 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   717
        (rtac mp 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   718
        (etac spec 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   719
        (atac 1)
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   720
        ]);
243
c22b85994e17 Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff changeset
   721
1410
324aa8134639 changed predicate flat to is_flat in theory Fix.thy
regensbu
parents: 1274
diff changeset
   722
qed_goalw "flat2flat"  Fix.thy  [is_flat_def]
324aa8134639 changed predicate flat to is_flat in theory Fix.thy
regensbu
parents: 1274
diff changeset
   723
"!!f g.[|is_flat(x::'a); !y.f`(g`y)=(y::'b) ; !x.g`(f`x)=(x::'a) |] \
324aa8134639 changed predicate flat to is_flat in theory Fix.thy
regensbu
parents: 1274
diff changeset
   724
\ ==> is_flat(y::'b)"
243
c22b85994e17 Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff changeset
   725
 (fn prems =>
1461
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   726
        [
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   727
        (strip_tac 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   728
        (rtac disjE 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   729
        (res_inst_tac [("P","g`x<<g`y")] mp 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   730
        (etac monofun_cfun_arg 2),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   731
        (dtac spec 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   732
        (etac spec 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   733
        (rtac disjI1 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   734
        (rtac trans 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   735
        (res_inst_tac [("s","f`(g`x)"),("t","x")] subst 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   736
        (etac spec 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   737
        (etac cfun_arg_cong 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   738
        (rtac (iso_strict RS conjunct1) 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   739
        (atac 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   740
        (atac 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   741
        (rtac disjI2 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   742
        (res_inst_tac [("s","f`(g`x)"),("t","x")] subst 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   743
        (etac spec 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   744
        (res_inst_tac [("s","f`(g`y)"),("t","y")] subst 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   745
        (etac spec 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   746
        (etac cfun_arg_cong 1)
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   747
        ]);
243
c22b85994e17 Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff changeset
   748
625
119391dd1d59 New version
nipkow
parents: 442
diff changeset
   749
(* ------------------------------------------------------------------------- *)
119391dd1d59 New version
nipkow
parents: 442
diff changeset
   750
(* a result about functions with flat codomain                               *)
119391dd1d59 New version
nipkow
parents: 442
diff changeset
   751
(* ------------------------------------------------------------------------- *)
119391dd1d59 New version
nipkow
parents: 442
diff changeset
   752
1410
324aa8134639 changed predicate flat to is_flat in theory Fix.thy
regensbu
parents: 1274
diff changeset
   753
qed_goalw "flat_codom" Fix.thy [is_flat_def]
324aa8134639 changed predicate flat to is_flat in theory Fix.thy
regensbu
parents: 1274
diff changeset
   754
"[|is_flat(y::'b);f`(x::'a)=(c::'b)|] ==> f`(UU::'a)=(UU::'b) | (!z.f`(z::'a)=c)"
625
119391dd1d59 New version
nipkow
parents: 442
diff changeset
   755
 (fn prems =>
1461
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   756
        [
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   757
        (cut_facts_tac prems 1),
1675
36ba4da350c3 adapted several proofs
oheimb
parents: 1461
diff changeset
   758
        (case_tac "f`(x::'a)=(UU::'b)" 1),
1461
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   759
        (rtac disjI1 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   760
        (rtac UU_I 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   761
        (res_inst_tac [("s","f`(x)"),("t","UU::'b")] subst 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   762
        (atac 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   763
        (rtac (minimal RS monofun_cfun_arg) 1),
1675
36ba4da350c3 adapted several proofs
oheimb
parents: 1461
diff changeset
   764
        (case_tac "f`(UU::'a)=(UU::'b)" 1),
1461
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   765
        (etac disjI1 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   766
        (rtac disjI2 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   767
        (rtac allI 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   768
        (res_inst_tac [("s","f`x"),("t","c")] subst 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   769
        (atac 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   770
        (res_inst_tac [("a","f`(UU::'a)")] (refl RS box_equals) 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   771
        (etac allE 1),(etac allE 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   772
        (dtac mp 1),
1780
e6656a445a33 adapted proof of flat_codom
oheimb
parents: 1779
diff changeset
   773
        (res_inst_tac [("fo","f")] (minimal RS monofun_cfun_arg) 1),
1461
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   774
        (etac disjE 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   775
        (contr_tac 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   776
        (atac 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   777
        (etac allE 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   778
        (etac allE 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   779
        (dtac mp 1),
1780
e6656a445a33 adapted proof of flat_codom
oheimb
parents: 1779
diff changeset
   780
        (res_inst_tac [("fo","f")] (minimal RS monofun_cfun_arg) 1),
1461
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   781
        (etac disjE 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   782
        (contr_tac 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   783
        (atac 1)
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   784
        ]);
625
119391dd1d59 New version
nipkow
parents: 442
diff changeset
   785
243
c22b85994e17 Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff changeset
   786
(* ------------------------------------------------------------------------ *)
c22b85994e17 Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff changeset
   787
(* admissibility of special formulae and propagation                        *)
c22b85994e17 Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff changeset
   788
(* ------------------------------------------------------------------------ *)
c22b85994e17 Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff changeset
   789
892
d0dc8d057929 added qed, qed_goal[w]
clasohm
parents: 628
diff changeset
   790
qed_goalw "adm_less"  Fix.thy [adm_def]
1461
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   791
        "[|cont u;cont v|]==> adm(%x.u x << v x)"
243
c22b85994e17 Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff changeset
   792
 (fn prems =>
1461
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   793
        [
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   794
        (cut_facts_tac prems 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   795
        (strip_tac 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   796
        (etac (cont2contlub RS contlubE RS spec RS mp RS ssubst) 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   797
        (atac 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   798
        (etac (cont2contlub RS contlubE RS spec RS mp RS ssubst) 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   799
        (atac 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   800
        (rtac lub_mono 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   801
        (cut_facts_tac prems 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   802
        (etac (cont2mono RS ch2ch_monofun) 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   803
        (atac 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   804
        (cut_facts_tac prems 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   805
        (etac (cont2mono RS ch2ch_monofun) 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   806
        (atac 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   807
        (atac 1)
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   808
        ]);
243
c22b85994e17 Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff changeset
   809
892
d0dc8d057929 added qed, qed_goal[w]
clasohm
parents: 628
diff changeset
   810
qed_goal "adm_conj"  Fix.thy  
1461
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   811
        "[| adm P; adm Q |] ==> adm(%x. P x & Q x)"
243
c22b85994e17 Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff changeset
   812
 (fn prems =>
1461
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   813
        [
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   814
        (cut_facts_tac prems 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   815
        (rtac (adm_def2 RS iffD2) 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   816
        (strip_tac 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   817
        (rtac conjI 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   818
        (rtac (adm_def2 RS iffD1 RS spec RS mp RS mp) 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   819
        (atac 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   820
        (atac 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   821
        (fast_tac HOL_cs 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   822
        (rtac (adm_def2 RS iffD1 RS spec RS mp RS mp) 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   823
        (atac 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   824
        (atac 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   825
        (fast_tac HOL_cs 1)
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   826
        ]);
243
c22b85994e17 Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff changeset
   827
892
d0dc8d057929 added qed, qed_goal[w]
clasohm
parents: 628
diff changeset
   828
qed_goal "adm_cong"  Fix.thy  
1461
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   829
        "(!x. P x = Q x) ==> adm P = adm Q "
243
c22b85994e17 Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff changeset
   830
 (fn prems =>
1461
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   831
        [
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   832
        (cut_facts_tac prems 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   833
        (res_inst_tac [("s","P"),("t","Q")] subst 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   834
        (rtac refl 2),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   835
        (rtac ext 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   836
        (etac spec 1)
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   837
        ]);
243
c22b85994e17 Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff changeset
   838
892
d0dc8d057929 added qed, qed_goal[w]
clasohm
parents: 628
diff changeset
   839
qed_goalw "adm_not_free"  Fix.thy [adm_def] "adm(%x.t)"
243
c22b85994e17 Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff changeset
   840
 (fn prems =>
1461
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   841
        [
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   842
        (fast_tac HOL_cs 1)
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   843
        ]);
243
c22b85994e17 Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff changeset
   844
892
d0dc8d057929 added qed, qed_goal[w]
clasohm
parents: 628
diff changeset
   845
qed_goalw "adm_not_less"  Fix.thy [adm_def]
1461
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   846
        "cont t ==> adm(%x.~ (t x) << u)"
243
c22b85994e17 Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff changeset
   847
 (fn prems =>
1461
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   848
        [
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   849
        (cut_facts_tac prems 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   850
        (strip_tac 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   851
        (rtac contrapos 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   852
        (etac spec 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   853
        (rtac trans_less 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   854
        (atac 2),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   855
        (etac (cont2mono RS monofun_fun_arg) 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   856
        (rtac is_ub_thelub 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   857
        (atac 1)
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   858
        ]);
243
c22b85994e17 Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff changeset
   859
892
d0dc8d057929 added qed, qed_goal[w]
clasohm
parents: 628
diff changeset
   860
qed_goal "adm_all"  Fix.thy  
1461
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   861
        " !y.adm(P y) ==> adm(%x.!y.P y x)"
243
c22b85994e17 Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff changeset
   862
 (fn prems =>
1461
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   863
        [
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   864
        (cut_facts_tac prems 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   865
        (rtac (adm_def2 RS iffD2) 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   866
        (strip_tac 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   867
        (rtac (adm_def2 RS iffD1 RS spec RS mp RS mp) 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   868
        (etac spec 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   869
        (atac 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   870
        (rtac allI 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   871
        (dtac spec 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   872
        (etac spec 1)
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   873
        ]);
243
c22b85994e17 Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff changeset
   874
1779
1155c06fa956 introduced forgotten bind_thm calls
oheimb
parents: 1681
diff changeset
   875
bind_thm ("adm_all2", allI RS adm_all);
625
119391dd1d59 New version
nipkow
parents: 442
diff changeset
   876
892
d0dc8d057929 added qed, qed_goal[w]
clasohm
parents: 628
diff changeset
   877
qed_goal "adm_subst"  Fix.thy  
1461
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   878
        "[|cont t; adm P|] ==> adm(%x. P (t x))"
243
c22b85994e17 Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff changeset
   879
 (fn prems =>
1461
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   880
        [
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   881
        (cut_facts_tac prems 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   882
        (rtac (adm_def2 RS iffD2) 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   883
        (strip_tac 1),
2033
639de962ded4 Ran expandshort; used stac instead of ssubst
paulson
parents: 1992
diff changeset
   884
        (stac (cont2contlub RS contlubE RS spec RS mp) 1),
1461
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   885
        (atac 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   886
        (atac 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   887
        (rtac (adm_def2 RS iffD1 RS spec RS mp RS mp) 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   888
        (atac 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   889
        (rtac (cont2mono RS ch2ch_monofun) 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   890
        (atac 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   891
        (atac 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   892
        (atac 1)
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   893
        ]);
243
c22b85994e17 Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff changeset
   894
892
d0dc8d057929 added qed, qed_goal[w]
clasohm
parents: 628
diff changeset
   895
qed_goal "adm_UU_not_less"  Fix.thy "adm(%x.~ UU << t(x))"
243
c22b85994e17 Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff changeset
   896
 (fn prems =>
1461
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   897
        [
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   898
        (res_inst_tac [("P2","%x.False")] (adm_cong RS iffD1) 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   899
        (Asm_simp_tac 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   900
        (rtac adm_not_free 1)
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   901
        ]);
243
c22b85994e17 Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff changeset
   902
892
d0dc8d057929 added qed, qed_goal[w]
clasohm
parents: 628
diff changeset
   903
qed_goalw "adm_not_UU"  Fix.thy [adm_def] 
1461
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   904
        "cont(t)==> adm(%x.~ (t x) = UU)"
243
c22b85994e17 Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff changeset
   905
 (fn prems =>
1461
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   906
        [
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   907
        (cut_facts_tac prems 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   908
        (strip_tac 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   909
        (rtac contrapos 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   910
        (etac spec 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   911
        (rtac (chain_UU_I RS spec) 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   912
        (rtac (cont2mono RS ch2ch_monofun) 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   913
        (atac 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   914
        (atac 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   915
        (rtac (cont2contlub RS contlubE RS spec RS mp RS subst) 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   916
        (atac 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   917
        (atac 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   918
        (atac 1)
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   919
        ]);
243
c22b85994e17 Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff changeset
   920
892
d0dc8d057929 added qed, qed_goal[w]
clasohm
parents: 628
diff changeset
   921
qed_goal "adm_eq"  Fix.thy 
1461
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   922
        "[|cont u ; cont v|]==> adm(%x. u x = v x)"
243
c22b85994e17 Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff changeset
   923
 (fn prems =>
1461
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   924
        [
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   925
        (rtac (adm_cong RS iffD1) 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   926
        (rtac allI 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   927
        (rtac iffI 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   928
        (rtac antisym_less 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   929
        (rtac antisym_less_inverse 3),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   930
        (atac 3),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   931
        (etac conjunct1 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   932
        (etac conjunct2 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   933
        (rtac adm_conj 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   934
        (rtac adm_less 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   935
        (resolve_tac prems 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   936
        (resolve_tac prems 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   937
        (rtac adm_less 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   938
        (resolve_tac prems 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   939
        (resolve_tac prems 1)
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   940
        ]);
243
c22b85994e17 Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff changeset
   941
c22b85994e17 Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff changeset
   942
c22b85994e17 Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff changeset
   943
(* ------------------------------------------------------------------------ *)
c22b85994e17 Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff changeset
   944
(* admissibility for disjunction is hard to prove. It takes 10 Lemmas       *)
c22b85994e17 Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff changeset
   945
(* ------------------------------------------------------------------------ *)
c22b85994e17 Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff changeset
   946
1992
0256c8b71ff1 added flat_eq,
oheimb
parents: 1872
diff changeset
   947
local
0256c8b71ff1 added flat_eq,
oheimb
parents: 1872
diff changeset
   948
0256c8b71ff1 added flat_eq,
oheimb
parents: 1872
diff changeset
   949
  val adm_disj_lemma1 = prove_goal Pcpo.thy 
0256c8b71ff1 added flat_eq,
oheimb
parents: 1872
diff changeset
   950
  "[| is_chain Y; !n.P (Y n) | Q(Y n)|]\
0256c8b71ff1 added flat_eq,
oheimb
parents: 1872
diff changeset
   951
  \ ==> (? i.!j. i<j --> Q(Y(j))) | (!i.? j.i<j & P(Y(j)))"
243
c22b85994e17 Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff changeset
   952
 (fn prems =>
1461
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   953
        [
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   954
        (cut_facts_tac prems 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   955
        (fast_tac HOL_cs 1)
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   956
        ]);
243
c22b85994e17 Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff changeset
   957
1992
0256c8b71ff1 added flat_eq,
oheimb
parents: 1872
diff changeset
   958
  val adm_disj_lemma2 = prove_goal Fix.thy  
0256c8b71ff1 added flat_eq,
oheimb
parents: 1872
diff changeset
   959
  "[| adm(Q); ? X.is_chain(X) & (!n.Q(X(n))) &\
0256c8b71ff1 added flat_eq,
oheimb
parents: 1872
diff changeset
   960
  \   lub(range(Y))=lub(range(X))|] ==> Q(lub(range(Y)))"
243
c22b85994e17 Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff changeset
   961
 (fn prems =>
1461
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   962
        [
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   963
        (cut_facts_tac prems 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   964
        (etac exE 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   965
        (etac conjE 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   966
        (etac conjE 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   967
        (res_inst_tac [("s","lub(range(X))"),("t","lub(range(Y))")] ssubst 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   968
        (atac 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   969
        (rtac (adm_def2 RS iffD1 RS spec RS mp RS mp) 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   970
        (atac 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   971
        (atac 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   972
        (atac 1)
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   973
        ]);
243
c22b85994e17 Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff changeset
   974
1992
0256c8b71ff1 added flat_eq,
oheimb
parents: 1872
diff changeset
   975
  val adm_disj_lemma3 = prove_goal Fix.thy
0256c8b71ff1 added flat_eq,
oheimb
parents: 1872
diff changeset
   976
  "[| is_chain(Y); ! j. i < j --> Q(Y(j)) |] ==>\
0256c8b71ff1 added flat_eq,
oheimb
parents: 1872
diff changeset
   977
  \         is_chain(%m. if m < Suc i then Y(Suc i) else Y m)"
243
c22b85994e17 Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff changeset
   978
 (fn prems =>
1461
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   979
        [
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   980
        (cut_facts_tac prems 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   981
        (rtac is_chainI 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   982
        (rtac allI 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   983
        (res_inst_tac [("m","i"),("n","ia")] nat_less_cases 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   984
        (res_inst_tac [("s","False"),("t","ia < Suc(i)")] ssubst 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   985
        (rtac iffI 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   986
        (etac FalseE 2),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   987
        (rtac notE 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   988
        (rtac (not_less_eq RS iffD2) 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   989
        (atac 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   990
        (atac 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   991
        (res_inst_tac [("s","False"),("t","Suc(ia) < Suc(i)")] ssubst 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   992
        (Asm_simp_tac  1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   993
        (rtac iffI 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   994
        (etac FalseE 2),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   995
        (rtac notE 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   996
        (etac less_not_sym 1),  
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   997
        (atac 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   998
        (Asm_simp_tac 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   999
        (etac (is_chainE RS spec) 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
  1000
        (hyp_subst_tac 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
  1001
        (Asm_simp_tac 1),
1675
36ba4da350c3 adapted several proofs
oheimb
parents: 1461
diff changeset
  1002
        (Asm_simp_tac 1),
2033
639de962ded4 Ran expandshort; used stac instead of ssubst
paulson
parents: 1992
diff changeset
  1003
        (asm_simp_tac (!simpset addsimps [less_Suc_eq]) 1)
1461
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
  1004
        ]);
243
c22b85994e17 Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff changeset
  1005
1992
0256c8b71ff1 added flat_eq,
oheimb
parents: 1872
diff changeset
  1006
  val adm_disj_lemma4 = prove_goal Fix.thy
0256c8b71ff1 added flat_eq,
oheimb
parents: 1872
diff changeset
  1007
  "[| ! j. i < j --> Q(Y(j)) |] ==>\
0256c8b71ff1 added flat_eq,
oheimb
parents: 1872
diff changeset
  1008
  \        ! n. Q( if n < Suc i then Y(Suc i) else Y n)"
243
c22b85994e17 Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff changeset
  1009
 (fn prems =>
1461
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
  1010
        [
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
  1011
        (cut_facts_tac prems 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
  1012
        (rtac allI 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
  1013
        (res_inst_tac [("m","n"),("n","Suc(i)")] nat_less_cases 1),
1992
0256c8b71ff1 added flat_eq,
oheimb
parents: 1872
diff changeset
  1014
        (res_inst_tac[("s","Y(Suc(i))"),
2033
639de962ded4 Ran expandshort; used stac instead of ssubst
paulson
parents: 1992
diff changeset
  1015
                      ("t","if n<Suc(i) then Y(Suc(i)) else Y n")] ssubst 1),
1461
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
  1016
        (Asm_simp_tac 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
  1017
        (etac allE 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
  1018
        (rtac mp 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
  1019
        (atac 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
  1020
        (Asm_simp_tac 1),
1992
0256c8b71ff1 added flat_eq,
oheimb
parents: 1872
diff changeset
  1021
        (res_inst_tac[("s","Y(n)"),
2033
639de962ded4 Ran expandshort; used stac instead of ssubst
paulson
parents: 1992
diff changeset
  1022
                      ("t","if n<Suc(i) then Y(Suc(i)) else Y(n)")] ssubst 1),
1461
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
  1023
        (Asm_simp_tac 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
  1024
        (hyp_subst_tac 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
  1025
        (dtac spec 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
  1026
        (rtac mp 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
  1027
        (atac 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
  1028
        (Asm_simp_tac 1),
1992
0256c8b71ff1 added flat_eq,
oheimb
parents: 1872
diff changeset
  1029
        (res_inst_tac [("s","Y(n)"),
2033
639de962ded4 Ran expandshort; used stac instead of ssubst
paulson
parents: 1992
diff changeset
  1030
                       ("t","if n < Suc(i) then Y(Suc(i)) else Y(n)")]ssubst 1),
1461
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
  1031
        (res_inst_tac [("s","False"),("t","n < Suc(i)")] ssubst 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
  1032
        (rtac iffI 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
  1033
        (etac FalseE 2),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
  1034
        (rtac notE 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
  1035
        (etac less_not_sym 1),  
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
  1036
        (atac 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
  1037
        (Asm_simp_tac 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
  1038
        (dtac spec 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
  1039
        (rtac mp 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
  1040
        (atac 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
  1041
        (etac Suc_lessD 1)
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
  1042
        ]);
243
c22b85994e17 Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff changeset
  1043
1992
0256c8b71ff1 added flat_eq,
oheimb
parents: 1872
diff changeset
  1044
  val adm_disj_lemma5 = prove_goal Fix.thy
0256c8b71ff1 added flat_eq,
oheimb
parents: 1872
diff changeset
  1045
  "[| is_chain(Y::nat=>'a); ! j. i < j --> Q(Y(j)) |] ==>\
0256c8b71ff1 added flat_eq,
oheimb
parents: 1872
diff changeset
  1046
  \       lub(range(Y)) = lub(range(%m. if m< Suc(i) then Y(Suc(i)) else Y m))"
243
c22b85994e17 Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff changeset
  1047
 (fn prems =>
1461
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
  1048
        [
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
  1049
        (cut_facts_tac prems 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
  1050
        (rtac lub_equal2 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
  1051
        (atac 2),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
  1052
        (rtac adm_disj_lemma3 2),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
  1053
        (atac 2),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
  1054
        (atac 2),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
  1055
        (res_inst_tac [("x","i")] exI 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
  1056
        (strip_tac 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
  1057
        (res_inst_tac [("s","False"),("t","ia < Suc(i)")] ssubst 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
  1058
        (rtac iffI 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
  1059
        (etac FalseE 2),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
  1060
        (rtac notE 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
  1061
        (rtac (not_less_eq RS iffD2) 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
  1062
        (atac 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
  1063
        (atac 1),
2033
639de962ded4 Ran expandshort; used stac instead of ssubst
paulson
parents: 1992
diff changeset
  1064
        (stac if_False 1),
1461
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
  1065
        (rtac refl 1)
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
  1066
        ]);
243
c22b85994e17 Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff changeset
  1067
1992
0256c8b71ff1 added flat_eq,
oheimb
parents: 1872
diff changeset
  1068
  val adm_disj_lemma6 = prove_goal Fix.thy
0256c8b71ff1 added flat_eq,
oheimb
parents: 1872
diff changeset
  1069
  "[| is_chain(Y::nat=>'a); ? i. ! j. i < j --> Q(Y(j)) |] ==>\
0256c8b71ff1 added flat_eq,
oheimb
parents: 1872
diff changeset
  1070
  \         ? X. is_chain(X) & (! n. Q(X(n))) & lub(range(Y)) = lub(range(X))"
243
c22b85994e17 Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff changeset
  1071
 (fn prems =>
1461
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
  1072
        [
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
  1073
        (cut_facts_tac prems 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
  1074
        (etac exE 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
  1075
        (res_inst_tac [("x","%m.if m<Suc(i) then Y(Suc(i)) else Y m")] exI 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
  1076
        (rtac conjI 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
  1077
        (rtac adm_disj_lemma3 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
  1078
        (atac 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
  1079
        (atac 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
  1080
        (rtac conjI 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
  1081
        (rtac adm_disj_lemma4 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
  1082
        (atac 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
  1083
        (rtac adm_disj_lemma5 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
  1084
        (atac 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
  1085
        (atac 1)
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
  1086
        ]);
243
c22b85994e17 Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff changeset
  1087
1992
0256c8b71ff1 added flat_eq,
oheimb
parents: 1872
diff changeset
  1088
  val adm_disj_lemma7 = prove_goal Fix.thy 
0256c8b71ff1 added flat_eq,
oheimb
parents: 1872
diff changeset
  1089
  "[| is_chain(Y::nat=>'a); ! i. ? j. i < j & P(Y(j))  |] ==>\
0256c8b71ff1 added flat_eq,
oheimb
parents: 1872
diff changeset
  1090
  \         is_chain(%m. Y(Least(%j. m<j & P(Y(j)))))"
243
c22b85994e17 Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff changeset
  1091
 (fn prems =>
1461
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
  1092
        [
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
  1093
        (cut_facts_tac prems 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
  1094
        (rtac is_chainI 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
  1095
        (rtac allI 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
  1096
        (rtac chain_mono3 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
  1097
        (atac 1),
1675
36ba4da350c3 adapted several proofs
oheimb
parents: 1461
diff changeset
  1098
        (rtac Least_le 1),
1461
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
  1099
        (rtac conjI 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
  1100
        (rtac Suc_lessD 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
  1101
        (etac allE 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
  1102
        (etac exE 1),
1675
36ba4da350c3 adapted several proofs
oheimb
parents: 1461
diff changeset
  1103
        (rtac (LeastI RS conjunct1) 1),
1461
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
  1104
        (atac 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
  1105
        (etac allE 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
  1106
        (etac exE 1),
1675
36ba4da350c3 adapted several proofs
oheimb
parents: 1461
diff changeset
  1107
        (rtac (LeastI RS conjunct2) 1),
1461
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
  1108
        (atac 1)
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
  1109
        ]);
243
c22b85994e17 Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff changeset
  1110
1992
0256c8b71ff1 added flat_eq,
oheimb
parents: 1872
diff changeset
  1111
  val adm_disj_lemma8 = prove_goal Fix.thy 
0256c8b71ff1 added flat_eq,
oheimb
parents: 1872
diff changeset
  1112
  "[| ! i. ? j. i < j & P(Y(j)) |] ==> ! m. P(Y(Least(%j. m<j & P(Y(j)))))"
243
c22b85994e17 Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff changeset
  1113
 (fn prems =>
1461
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
  1114
        [
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
  1115
        (cut_facts_tac prems 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
  1116
        (strip_tac 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
  1117
        (etac allE 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
  1118
        (etac exE 1),
1675
36ba4da350c3 adapted several proofs
oheimb
parents: 1461
diff changeset
  1119
        (etac (LeastI RS conjunct2) 1)
1461
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
  1120
        ]);
243
c22b85994e17 Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff changeset
  1121
1992
0256c8b71ff1 added flat_eq,
oheimb
parents: 1872
diff changeset
  1122
  val adm_disj_lemma9 = prove_goal Fix.thy
0256c8b71ff1 added flat_eq,
oheimb
parents: 1872
diff changeset
  1123
  "[| is_chain(Y::nat=>'a); ! i. ? j. i < j & P(Y(j)) |] ==>\
0256c8b71ff1 added flat_eq,
oheimb
parents: 1872
diff changeset
  1124
  \         lub(range(Y)) = lub(range(%m. Y(Least(%j. m<j & P(Y(j))))))"
243
c22b85994e17 Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff changeset
  1125
 (fn prems =>
1461
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
  1126
        [
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
  1127
        (cut_facts_tac prems 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
  1128
        (rtac antisym_less 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
  1129
        (rtac lub_mono 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
  1130
        (atac 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
  1131
        (rtac adm_disj_lemma7 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
  1132
        (atac 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
  1133
        (atac 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
  1134
        (strip_tac 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
  1135
        (rtac (chain_mono RS mp) 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
  1136
        (atac 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
  1137
        (etac allE 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
  1138
        (etac exE 1),
1675
36ba4da350c3 adapted several proofs
oheimb
parents: 1461
diff changeset
  1139
        (rtac (LeastI RS conjunct1) 1),
1461
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
  1140
        (atac 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
  1141
        (rtac lub_mono3 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
  1142
        (rtac adm_disj_lemma7 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
  1143
        (atac 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
  1144
        (atac 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
  1145
        (atac 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
  1146
        (strip_tac 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
  1147
        (rtac exI 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
  1148
        (rtac (chain_mono RS mp) 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
  1149
        (atac 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
  1150
        (rtac lessI 1)
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
  1151
        ]);
243
c22b85994e17 Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff changeset
  1152
1992
0256c8b71ff1 added flat_eq,
oheimb
parents: 1872
diff changeset
  1153
  val adm_disj_lemma10 = prove_goal Fix.thy
0256c8b71ff1 added flat_eq,
oheimb
parents: 1872
diff changeset
  1154
  "[| is_chain(Y::nat=>'a); ! i. ? j. i < j & P(Y(j)) |] ==>\
0256c8b71ff1 added flat_eq,
oheimb
parents: 1872
diff changeset
  1155
  \         ? X. is_chain(X) & (! n. P(X(n))) & lub(range(Y)) = lub(range(X))"
243
c22b85994e17 Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff changeset
  1156
 (fn prems =>
1461
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
  1157
        [
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
  1158
        (cut_facts_tac prems 1),
1675
36ba4da350c3 adapted several proofs
oheimb
parents: 1461
diff changeset
  1159
        (res_inst_tac [("x","%m. Y(Least(%j. m<j & P(Y(j))))")] exI 1),
1461
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
  1160
        (rtac conjI 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
  1161
        (rtac adm_disj_lemma7 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
  1162
        (atac 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
  1163
        (atac 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
  1164
        (rtac conjI 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
  1165
        (rtac adm_disj_lemma8 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
  1166
        (atac 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
  1167
        (rtac adm_disj_lemma9 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
  1168
        (atac 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
  1169
        (atac 1)
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
  1170
        ]);
243
c22b85994e17 Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff changeset
  1171
1992
0256c8b71ff1 added flat_eq,
oheimb
parents: 1872
diff changeset
  1172
  val adm_disj_lemma12 = prove_goal Fix.thy
0256c8b71ff1 added flat_eq,
oheimb
parents: 1872
diff changeset
  1173
  "[| adm(P); is_chain(Y);? i. ! j. i < j --> P(Y(j))|]==>P(lub(range(Y)))"
0256c8b71ff1 added flat_eq,
oheimb
parents: 1872
diff changeset
  1174
 (fn prems =>
0256c8b71ff1 added flat_eq,
oheimb
parents: 1872
diff changeset
  1175
        [
0256c8b71ff1 added flat_eq,
oheimb
parents: 1872
diff changeset
  1176
        (cut_facts_tac prems 1),
0256c8b71ff1 added flat_eq,
oheimb
parents: 1872
diff changeset
  1177
        (etac adm_disj_lemma2 1),
0256c8b71ff1 added flat_eq,
oheimb
parents: 1872
diff changeset
  1178
        (etac adm_disj_lemma6 1),
0256c8b71ff1 added flat_eq,
oheimb
parents: 1872
diff changeset
  1179
        (atac 1)
0256c8b71ff1 added flat_eq,
oheimb
parents: 1872
diff changeset
  1180
        ]);
430
89e1986125fe Franz Regensburger's changes.
nipkow
parents: 300
diff changeset
  1181
1992
0256c8b71ff1 added flat_eq,
oheimb
parents: 1872
diff changeset
  1182
in
0256c8b71ff1 added flat_eq,
oheimb
parents: 1872
diff changeset
  1183
0256c8b71ff1 added flat_eq,
oheimb
parents: 1872
diff changeset
  1184
val adm_lemma11 = prove_goal Fix.thy
430
89e1986125fe Franz Regensburger's changes.
nipkow
parents: 300
diff changeset
  1185
"[| adm(P); is_chain(Y); ! i. ? j. i < j & P(Y(j)) |]==>P(lub(range(Y)))"
89e1986125fe Franz Regensburger's changes.
nipkow
parents: 300
diff changeset
  1186
 (fn prems =>
1461
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
  1187
        [
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
  1188
        (cut_facts_tac prems 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
  1189
        (etac adm_disj_lemma2 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
  1190
        (etac adm_disj_lemma10 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
  1191
        (atac 1)
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
  1192
        ]);
430
89e1986125fe Franz Regensburger's changes.
nipkow
parents: 300
diff changeset
  1193
1992
0256c8b71ff1 added flat_eq,
oheimb
parents: 1872
diff changeset
  1194
val adm_disj = prove_goal Fix.thy  
1461
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
  1195
        "[| adm P; adm Q |] ==> adm(%x.P x | Q x)"
243
c22b85994e17 Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff changeset
  1196
 (fn prems =>
1461
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
  1197
        [
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
  1198
        (cut_facts_tac prems 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
  1199
        (rtac (adm_def2 RS iffD2) 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
  1200
        (strip_tac 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
  1201
        (rtac (adm_disj_lemma1 RS disjE) 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
  1202
        (atac 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
  1203
        (atac 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
  1204
        (rtac disjI2 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
  1205
        (etac adm_disj_lemma12 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
  1206
        (atac 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
  1207
        (atac 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
  1208
        (rtac disjI1 1),
1992
0256c8b71ff1 added flat_eq,
oheimb
parents: 1872
diff changeset
  1209
        (etac adm_lemma11 1),
1461
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
  1210
        (atac 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
  1211
        (atac 1)
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
  1212
        ]);
243
c22b85994e17 Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff changeset
  1213
1992
0256c8b71ff1 added flat_eq,
oheimb
parents: 1872
diff changeset
  1214
end;
0256c8b71ff1 added flat_eq,
oheimb
parents: 1872
diff changeset
  1215
0256c8b71ff1 added flat_eq,
oheimb
parents: 1872
diff changeset
  1216
bind_thm("adm_lemma11",adm_lemma11);
0256c8b71ff1 added flat_eq,
oheimb
parents: 1872
diff changeset
  1217
bind_thm("adm_disj",adm_disj);
430
89e1986125fe Franz Regensburger's changes.
nipkow
parents: 300
diff changeset
  1218
1872
206553e1a242 renamed adm_impl to adm_imp
oheimb
parents: 1780
diff changeset
  1219
qed_goal "adm_imp"  Fix.thy  
1461
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
  1220
        "[| adm(%x.~(P x)); adm Q |] ==> adm(%x.P x --> Q x)"
243
c22b85994e17 Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff changeset
  1221
 (fn prems =>
1461
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
  1222
        [
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
  1223
        (cut_facts_tac prems 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
  1224
        (res_inst_tac [("P2","%x.~(P x)|Q x")] (adm_cong RS iffD1) 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
  1225
        (fast_tac HOL_cs 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
  1226
        (rtac adm_disj 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
  1227
        (atac 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
  1228
        (atac 1)
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
  1229
        ]);
243
c22b85994e17 Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff changeset
  1230
1675
36ba4da350c3 adapted several proofs
oheimb
parents: 1461
diff changeset
  1231
qed_goal "adm_not_conj"  Fix.thy  
1681
d9aaae4ff6c3 changed two goals formulated with 8bit font
oheimb
parents: 1675
diff changeset
  1232
"[| adm (%x. ~ P x); adm (%x. ~ Q x) |] ==> adm (%x. ~ (P x & Q x))"(fn prems=>[
2033
639de962ded4 Ran expandshort; used stac instead of ssubst
paulson
parents: 1992
diff changeset
  1233
        cut_facts_tac prems 1,
639de962ded4 Ran expandshort; used stac instead of ssubst
paulson
parents: 1992
diff changeset
  1234
        subgoal_tac 
639de962ded4 Ran expandshort; used stac instead of ssubst
paulson
parents: 1992
diff changeset
  1235
        "(%x. ~ (P x & Q x)) = (%x. ~ P x | ~ Q x)" 1,
639de962ded4 Ran expandshort; used stac instead of ssubst
paulson
parents: 1992
diff changeset
  1236
        rtac ext 2,
639de962ded4 Ran expandshort; used stac instead of ssubst
paulson
parents: 1992
diff changeset
  1237
        fast_tac HOL_cs 2,
639de962ded4 Ran expandshort; used stac instead of ssubst
paulson
parents: 1992
diff changeset
  1238
        etac ssubst 1,
639de962ded4 Ran expandshort; used stac instead of ssubst
paulson
parents: 1992
diff changeset
  1239
        etac adm_disj 1,
639de962ded4 Ran expandshort; used stac instead of ssubst
paulson
parents: 1992
diff changeset
  1240
        atac 1]);
1675
36ba4da350c3 adapted several proofs
oheimb
parents: 1461
diff changeset
  1241
1992
0256c8b71ff1 added flat_eq,
oheimb
parents: 1872
diff changeset
  1242
val adm_thms = [adm_imp,adm_disj,adm_eq,adm_not_UU,adm_UU_not_less,
0256c8b71ff1 added flat_eq,
oheimb
parents: 1872
diff changeset
  1243
        adm_all2,adm_not_less,adm_not_free,adm_not_conj,adm_conj,adm_less];
243
c22b85994e17 Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff changeset
  1244