src/HOLCF/Fix.ML
author oheimb
Fri, 31 May 1996 20:14:42 +0200
changeset 1780 e6656a445a33
parent 1779 1155c06fa956
child 1872 206553e1a242
permissions -rw-r--r--
adapted proof of flat_codom
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),
1675
36ba4da350c3 adapted several proofs
oheimb
parents: 1461
diff changeset
    34
	(rtac (iterate_Suc RS ssubst) 1),
36ba4da350c3 adapted several proofs
oheimb
parents: 1461
diff changeset
    35
	(rtac (iterate_Suc RS ssubst) 1),
36ba4da350c3 adapted several proofs
oheimb
parents: 1461
diff changeset
    36
	(etac ssubst 1),
36ba4da350c3 adapted several proofs
oheimb
parents: 1461
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
        [
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
    77
        (rtac (contlub_cfun_arg RS ssubst) 1),
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),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   149
        (rtac (thelub_fun RS ssubst) 1),
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),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   162
        (rtac (thelub_fun RS ssubst) 1),
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),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   269
        (rtac (contlub_iterate RS contlubE RS spec RS mp RS ssubst) 1),
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),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   313
        (rtac (contlub_Ifix_lemma1 RS ext RS ssubst) 1),
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),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   491
        (rtac (fix_def2 RS ssubst) 1),
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),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   497
        (rtac (iterate_0 RS ssubst) 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   498
        (atac 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   499
        (rtac (iterate_Suc RS ssubst) 1),
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),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   513
        (rtac (fix_def2 RS ssubst) 1),
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),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   534
        (rtac (lub_finch1 RS thelubI RS ssubst) 1),
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
c22b85994e17 Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff changeset
   540
892
d0dc8d057929 added qed, qed_goal[w]
clasohm
parents: 628
diff changeset
   541
qed_goalw "adm_chain_finite"  Fix.thy  [chain_finite_def]
1461
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   542
        "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
   543
 (fn prems =>
1461
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   544
        [
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   545
        (cut_facts_tac prems 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   546
        (etac adm_max_in_chain 1)
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   547
        ]);
243
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
(* ------------------------------------------------------------------------ *)
c22b85994e17 Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff changeset
   550
(* flat types are chain_finite                                              *)
c22b85994e17 Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff changeset
   551
(* ------------------------------------------------------------------------ *)
c22b85994e17 Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff changeset
   552
1410
324aa8134639 changed predicate flat to is_flat in theory Fix.thy
regensbu
parents: 1274
diff changeset
   553
qed_goalw "flat_imp_chain_finite"  Fix.thy  [is_flat_def,chain_finite_def]
1461
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   554
        "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
   555
 (fn prems =>
1461
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   556
        [
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   557
        (rewtac max_in_chain_def),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   558
        (cut_facts_tac prems 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   559
        (strip_tac 1),
1675
36ba4da350c3 adapted several proofs
oheimb
parents: 1461
diff changeset
   560
        (case_tac "!i.Y(i)=UU" 1),
1461
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   561
        (res_inst_tac [("x","0")] exI 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   562
        (strip_tac 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   563
        (rtac trans 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   564
        (etac spec 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   565
        (rtac sym 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   566
        (etac spec 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   567
        (rtac (chain_mono2 RS exE) 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   568
        (fast_tac HOL_cs 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   569
        (atac 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   570
        (res_inst_tac [("x","Suc(x)")] exI 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   571
        (strip_tac 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   572
        (rtac disjE 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   573
        (atac 3),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   574
        (rtac mp 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   575
        (dtac spec 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   576
        (etac spec 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   577
        (etac (le_imp_less_or_eq RS disjE) 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   578
        (etac (chain_mono RS mp) 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   579
        (atac 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   580
        (hyp_subst_tac 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   581
        (rtac refl_less 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   582
        (res_inst_tac [("P","Y(Suc(x)) = UU")] notE 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   583
        (atac 2),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   584
        (rtac mp 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   585
        (etac spec 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   586
        (Asm_simp_tac 1)
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   587
        ]);
243
c22b85994e17 Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff changeset
   588
c22b85994e17 Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff changeset
   589
1779
1155c06fa956 introduced forgotten bind_thm calls
oheimb
parents: 1681
diff changeset
   590
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
   591
(* 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
   592
1410
324aa8134639 changed predicate flat to is_flat in theory Fix.thy
regensbu
parents: 1274
diff changeset
   593
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
   594
 (fn prems =>
1461
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   595
        [
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   596
        (strip_tac 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   597
        (rtac disjI1 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   598
        (rtac unique_void2 1)
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   599
        ]);
243
c22b85994e17 Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff changeset
   600
c22b85994e17 Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff changeset
   601
(* ------------------------------------------------------------------------ *)
c22b85994e17 Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff changeset
   602
(* continuous isomorphisms are strict                                       *)
c22b85994e17 Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff changeset
   603
(* a prove for embedding projection pairs is similar                        *)
c22b85994e17 Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff changeset
   604
(* ------------------------------------------------------------------------ *)
c22b85994e17 Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff changeset
   605
892
d0dc8d057929 added qed, qed_goal[w]
clasohm
parents: 628
diff changeset
   606
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
   607
"!!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
   608
\ ==> f`UU=UU & g`UU=UU"
243
c22b85994e17 Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff changeset
   609
 (fn prems =>
1461
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   610
        [
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   611
        (rtac conjI 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   612
        (rtac UU_I 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   613
        (res_inst_tac [("s","f`(g`(UU::'b))"),("t","UU::'b")] subst 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   614
        (etac spec 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   615
        (rtac (minimal RS monofun_cfun_arg) 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   616
        (rtac UU_I 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   617
        (res_inst_tac [("s","g`(f`(UU::'a))"),("t","UU::'a")] subst 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   618
        (etac spec 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   619
        (rtac (minimal RS monofun_cfun_arg) 1)
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   620
        ]);
243
c22b85994e17 Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff changeset
   621
c22b85994e17 Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff changeset
   622
892
d0dc8d057929 added qed, qed_goal[w]
clasohm
parents: 628
diff changeset
   623
qed_goal "isorep_defined" Fix.thy 
1461
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   624
        "[|!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
   625
 (fn prems =>
1461
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   626
        [
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   627
        (cut_facts_tac prems 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   628
        (etac swap 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   629
        (dtac notnotD 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   630
        (dres_inst_tac [("f","abs")] cfun_arg_cong 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   631
        (etac box_equals 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   632
        (fast_tac HOL_cs 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   633
        (etac (iso_strict RS conjunct1) 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   634
        (atac 1)
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   635
        ]);
243
c22b85994e17 Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff changeset
   636
892
d0dc8d057929 added qed, qed_goal[w]
clasohm
parents: 628
diff changeset
   637
qed_goal "isoabs_defined" Fix.thy 
1461
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   638
        "[|!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
   639
 (fn prems =>
1461
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   640
        [
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   641
        (cut_facts_tac prems 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   642
        (etac swap 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   643
        (dtac notnotD 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   644
        (dres_inst_tac [("f","rep")] cfun_arg_cong 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   645
        (etac box_equals 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   646
        (fast_tac HOL_cs 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   647
        (etac (iso_strict RS conjunct2) 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   648
        (atac 1)
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   649
        ]);
243
c22b85994e17 Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff changeset
   650
c22b85994e17 Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff changeset
   651
(* ------------------------------------------------------------------------ *)
c22b85994e17 Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff changeset
   652
(* propagation of flatness and chainfiniteness by continuous isomorphisms   *)
c22b85994e17 Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff changeset
   653
(* ------------------------------------------------------------------------ *)
c22b85994e17 Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff changeset
   654
892
d0dc8d057929 added qed, qed_goal[w]
clasohm
parents: 628
diff changeset
   655
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
   656
"!!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
   657
\ ==> chain_finite(y::'b)"
c22b85994e17 Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff changeset
   658
 (fn prems =>
1461
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   659
        [
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   660
        (rewtac max_in_chain_def),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   661
        (strip_tac 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   662
        (rtac exE 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   663
        (res_inst_tac [("P","is_chain(%i.g`(Y i))")] mp 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   664
        (etac spec 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   665
        (etac ch2ch_fappR 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   666
        (rtac exI 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   667
        (strip_tac 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   668
        (res_inst_tac [("s","f`(g`(Y x))"),("t","Y(x)")] subst 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   669
        (etac spec 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   670
        (res_inst_tac [("s","f`(g`(Y j))"),("t","Y(j)")] subst 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   671
        (etac spec 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   672
        (rtac cfun_arg_cong 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   673
        (rtac mp 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   674
        (etac spec 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   675
        (atac 1)
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   676
        ]);
243
c22b85994e17 Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff changeset
   677
1410
324aa8134639 changed predicate flat to is_flat in theory Fix.thy
regensbu
parents: 1274
diff changeset
   678
qed_goalw "flat2flat"  Fix.thy  [is_flat_def]
324aa8134639 changed predicate flat to is_flat in theory Fix.thy
regensbu
parents: 1274
diff changeset
   679
"!!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
   680
\ ==> is_flat(y::'b)"
243
c22b85994e17 Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff changeset
   681
 (fn prems =>
1461
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   682
        [
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   683
        (strip_tac 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   684
        (rtac disjE 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   685
        (res_inst_tac [("P","g`x<<g`y")] mp 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   686
        (etac monofun_cfun_arg 2),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   687
        (dtac spec 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   688
        (etac spec 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   689
        (rtac disjI1 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   690
        (rtac trans 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   691
        (res_inst_tac [("s","f`(g`x)"),("t","x")] subst 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   692
        (etac spec 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   693
        (etac cfun_arg_cong 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   694
        (rtac (iso_strict RS conjunct1) 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   695
        (atac 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   696
        (atac 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   697
        (rtac disjI2 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   698
        (res_inst_tac [("s","f`(g`x)"),("t","x")] subst 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   699
        (etac spec 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   700
        (res_inst_tac [("s","f`(g`y)"),("t","y")] subst 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   701
        (etac spec 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   702
        (etac cfun_arg_cong 1)
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   703
        ]);
243
c22b85994e17 Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff changeset
   704
625
119391dd1d59 New version
nipkow
parents: 442
diff changeset
   705
(* ------------------------------------------------------------------------- *)
119391dd1d59 New version
nipkow
parents: 442
diff changeset
   706
(* a result about functions with flat codomain                               *)
119391dd1d59 New version
nipkow
parents: 442
diff changeset
   707
(* ------------------------------------------------------------------------- *)
119391dd1d59 New version
nipkow
parents: 442
diff changeset
   708
1410
324aa8134639 changed predicate flat to is_flat in theory Fix.thy
regensbu
parents: 1274
diff changeset
   709
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
   710
"[|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
   711
 (fn prems =>
1461
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   712
        [
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   713
        (cut_facts_tac prems 1),
1675
36ba4da350c3 adapted several proofs
oheimb
parents: 1461
diff changeset
   714
        (case_tac "f`(x::'a)=(UU::'b)" 1),
1461
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   715
        (rtac disjI1 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   716
        (rtac UU_I 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   717
        (res_inst_tac [("s","f`(x)"),("t","UU::'b")] subst 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   718
        (atac 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   719
        (rtac (minimal RS monofun_cfun_arg) 1),
1675
36ba4da350c3 adapted several proofs
oheimb
parents: 1461
diff changeset
   720
        (case_tac "f`(UU::'a)=(UU::'b)" 1),
1461
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   721
        (etac disjI1 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   722
        (rtac disjI2 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   723
        (rtac allI 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   724
        (res_inst_tac [("s","f`x"),("t","c")] subst 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   725
        (atac 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   726
        (res_inst_tac [("a","f`(UU::'a)")] (refl RS box_equals) 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   727
        (etac allE 1),(etac allE 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   728
        (dtac mp 1),
1780
e6656a445a33 adapted proof of flat_codom
oheimb
parents: 1779
diff changeset
   729
        (res_inst_tac [("fo","f")] (minimal RS monofun_cfun_arg) 1),
1461
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   730
        (etac disjE 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   731
        (contr_tac 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   732
        (atac 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   733
        (etac allE 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   734
        (etac allE 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   735
        (dtac mp 1),
1780
e6656a445a33 adapted proof of flat_codom
oheimb
parents: 1779
diff changeset
   736
        (res_inst_tac [("fo","f")] (minimal RS monofun_cfun_arg) 1),
1461
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   737
        (etac disjE 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   738
        (contr_tac 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   739
        (atac 1)
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   740
        ]);
625
119391dd1d59 New version
nipkow
parents: 442
diff changeset
   741
243
c22b85994e17 Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff changeset
   742
(* ------------------------------------------------------------------------ *)
c22b85994e17 Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff changeset
   743
(* admissibility of special formulae and propagation                        *)
c22b85994e17 Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff changeset
   744
(* ------------------------------------------------------------------------ *)
c22b85994e17 Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff changeset
   745
892
d0dc8d057929 added qed, qed_goal[w]
clasohm
parents: 628
diff changeset
   746
qed_goalw "adm_less"  Fix.thy [adm_def]
1461
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   747
        "[|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
   748
 (fn prems =>
1461
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   749
        [
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   750
        (cut_facts_tac prems 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   751
        (strip_tac 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   752
        (etac (cont2contlub RS contlubE RS spec RS mp RS ssubst) 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   753
        (atac 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   754
        (etac (cont2contlub RS contlubE RS spec RS mp RS ssubst) 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   755
        (atac 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   756
        (rtac lub_mono 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   757
        (cut_facts_tac prems 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   758
        (etac (cont2mono RS ch2ch_monofun) 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   759
        (atac 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   760
        (cut_facts_tac prems 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   761
        (etac (cont2mono RS ch2ch_monofun) 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   762
        (atac 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   763
        (atac 1)
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   764
        ]);
243
c22b85994e17 Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff changeset
   765
892
d0dc8d057929 added qed, qed_goal[w]
clasohm
parents: 628
diff changeset
   766
qed_goal "adm_conj"  Fix.thy  
1461
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   767
        "[| 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
   768
 (fn prems =>
1461
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   769
        [
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   770
        (cut_facts_tac prems 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   771
        (rtac (adm_def2 RS iffD2) 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   772
        (strip_tac 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   773
        (rtac conjI 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   774
        (rtac (adm_def2 RS iffD1 RS spec RS mp RS mp) 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   775
        (atac 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   776
        (atac 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   777
        (fast_tac HOL_cs 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   778
        (rtac (adm_def2 RS iffD1 RS spec RS mp RS mp) 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   779
        (atac 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   780
        (atac 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   781
        (fast_tac HOL_cs 1)
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   782
        ]);
243
c22b85994e17 Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff changeset
   783
892
d0dc8d057929 added qed, qed_goal[w]
clasohm
parents: 628
diff changeset
   784
qed_goal "adm_cong"  Fix.thy  
1461
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   785
        "(!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
   786
 (fn prems =>
1461
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   787
        [
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   788
        (cut_facts_tac prems 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   789
        (res_inst_tac [("s","P"),("t","Q")] subst 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   790
        (rtac refl 2),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   791
        (rtac ext 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   792
        (etac spec 1)
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   793
        ]);
243
c22b85994e17 Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff changeset
   794
892
d0dc8d057929 added qed, qed_goal[w]
clasohm
parents: 628
diff changeset
   795
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
   796
 (fn prems =>
1461
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   797
        [
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   798
        (fast_tac HOL_cs 1)
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   799
        ]);
243
c22b85994e17 Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff changeset
   800
892
d0dc8d057929 added qed, qed_goal[w]
clasohm
parents: 628
diff changeset
   801
qed_goalw "adm_not_less"  Fix.thy [adm_def]
1461
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   802
        "cont t ==> adm(%x.~ (t x) << u)"
243
c22b85994e17 Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff changeset
   803
 (fn prems =>
1461
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   804
        [
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   805
        (cut_facts_tac prems 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   806
        (strip_tac 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   807
        (rtac contrapos 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   808
        (etac spec 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   809
        (rtac trans_less 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   810
        (atac 2),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   811
        (etac (cont2mono RS monofun_fun_arg) 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   812
        (rtac is_ub_thelub 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   813
        (atac 1)
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   814
        ]);
243
c22b85994e17 Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff changeset
   815
892
d0dc8d057929 added qed, qed_goal[w]
clasohm
parents: 628
diff changeset
   816
qed_goal "adm_all"  Fix.thy  
1461
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   817
        " !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
   818
 (fn prems =>
1461
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   819
        [
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   820
        (cut_facts_tac prems 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   821
        (rtac (adm_def2 RS iffD2) 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   822
        (strip_tac 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   823
        (rtac (adm_def2 RS iffD1 RS spec RS mp RS mp) 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   824
        (etac spec 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   825
        (atac 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   826
        (rtac allI 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   827
        (dtac spec 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   828
        (etac spec 1)
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   829
        ]);
243
c22b85994e17 Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff changeset
   830
1779
1155c06fa956 introduced forgotten bind_thm calls
oheimb
parents: 1681
diff changeset
   831
bind_thm ("adm_all2", allI RS adm_all);
625
119391dd1d59 New version
nipkow
parents: 442
diff changeset
   832
892
d0dc8d057929 added qed, qed_goal[w]
clasohm
parents: 628
diff changeset
   833
qed_goal "adm_subst"  Fix.thy  
1461
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   834
        "[|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
   835
 (fn prems =>
1461
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   836
        [
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   837
        (cut_facts_tac prems 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   838
        (rtac (adm_def2 RS iffD2) 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   839
        (strip_tac 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   840
        (rtac (cont2contlub RS contlubE RS spec RS mp RS ssubst) 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   841
        (atac 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   842
        (atac 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   843
        (rtac (adm_def2 RS iffD1 RS spec RS mp RS mp) 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   844
        (atac 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   845
        (rtac (cont2mono RS ch2ch_monofun) 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   846
        (atac 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   847
        (atac 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   848
        (atac 1)
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   849
        ]);
243
c22b85994e17 Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff changeset
   850
892
d0dc8d057929 added qed, qed_goal[w]
clasohm
parents: 628
diff changeset
   851
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
   852
 (fn prems =>
1461
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   853
        [
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   854
        (res_inst_tac [("P2","%x.False")] (adm_cong RS iffD1) 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   855
        (Asm_simp_tac 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   856
        (rtac adm_not_free 1)
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   857
        ]);
243
c22b85994e17 Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff changeset
   858
892
d0dc8d057929 added qed, qed_goal[w]
clasohm
parents: 628
diff changeset
   859
qed_goalw "adm_not_UU"  Fix.thy [adm_def] 
1461
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   860
        "cont(t)==> adm(%x.~ (t x) = UU)"
243
c22b85994e17 Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff changeset
   861
 (fn prems =>
1461
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   862
        [
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   863
        (cut_facts_tac prems 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   864
        (strip_tac 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   865
        (rtac contrapos 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   866
        (etac spec 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   867
        (rtac (chain_UU_I RS spec) 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   868
        (rtac (cont2mono RS ch2ch_monofun) 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   869
        (atac 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   870
        (atac 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   871
        (rtac (cont2contlub RS contlubE RS spec RS mp RS subst) 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   872
        (atac 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   873
        (atac 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   874
        (atac 1)
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   875
        ]);
243
c22b85994e17 Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff changeset
   876
892
d0dc8d057929 added qed, qed_goal[w]
clasohm
parents: 628
diff changeset
   877
qed_goal "adm_eq"  Fix.thy 
1461
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   878
        "[|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
   879
 (fn prems =>
1461
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   880
        [
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   881
        (rtac (adm_cong RS iffD1) 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   882
        (rtac allI 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   883
        (rtac iffI 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   884
        (rtac antisym_less 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   885
        (rtac antisym_less_inverse 3),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   886
        (atac 3),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   887
        (etac conjunct1 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   888
        (etac conjunct2 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   889
        (rtac adm_conj 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   890
        (rtac adm_less 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   891
        (resolve_tac prems 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   892
        (resolve_tac prems 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   893
        (rtac adm_less 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   894
        (resolve_tac prems 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   895
        (resolve_tac prems 1)
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   896
        ]);
243
c22b85994e17 Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff changeset
   897
c22b85994e17 Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff changeset
   898
c22b85994e17 Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff changeset
   899
(* ------------------------------------------------------------------------ *)
c22b85994e17 Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff changeset
   900
(* 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
   901
(* ------------------------------------------------------------------------ *)
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_goal "adm_disj_lemma1"  Pcpo.thy 
1168
74be52691d62 The curried version of HOLCF is now just called HOLCF. The old
regensbu
parents: 892
diff changeset
   904
"[| is_chain Y; !n.P (Y n) | Q(Y n)|]\
243
c22b85994e17 Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff changeset
   905
\ ==> (? i.!j. i<j --> Q(Y(j))) | (!i.? j.i<j & P(Y(j)))"
c22b85994e17 Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff changeset
   906
 (fn prems =>
1461
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   907
        [
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   908
        (cut_facts_tac prems 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   909
        (fast_tac HOL_cs 1)
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   910
        ]);
243
c22b85994e17 Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff changeset
   911
892
d0dc8d057929 added qed, qed_goal[w]
clasohm
parents: 628
diff changeset
   912
qed_goal "adm_disj_lemma2"  Fix.thy  
243
c22b85994e17 Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff changeset
   913
"[| adm(Q); ? X.is_chain(X) & (!n.Q(X(n))) &\
c22b85994e17 Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff changeset
   914
\   lub(range(Y))=lub(range(X))|] ==> Q(lub(range(Y)))"
c22b85994e17 Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff changeset
   915
 (fn prems =>
1461
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   916
        [
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   917
        (cut_facts_tac prems 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   918
        (etac exE 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   919
        (etac conjE 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   920
        (etac conjE 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   921
        (res_inst_tac [("s","lub(range(X))"),("t","lub(range(Y))")] ssubst 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   922
        (atac 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   923
        (rtac (adm_def2 RS iffD1 RS spec RS mp RS mp) 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   924
        (atac 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   925
        (atac 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   926
        (atac 1)
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   927
        ]);
243
c22b85994e17 Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff changeset
   928
892
d0dc8d057929 added qed, qed_goal[w]
clasohm
parents: 628
diff changeset
   929
qed_goal "adm_disj_lemma3"  Fix.thy
243
c22b85994e17 Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff changeset
   930
"[| is_chain(Y); ! j. i < j --> Q(Y(j)) |] ==>\
1168
74be52691d62 The curried version of HOLCF is now just called HOLCF. The old
regensbu
parents: 892
diff changeset
   931
\         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
   932
 (fn prems =>
1461
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   933
        [
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   934
        (cut_facts_tac prems 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   935
        (rtac is_chainI 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   936
        (rtac allI 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   937
        (res_inst_tac [("m","i"),("n","ia")] nat_less_cases 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   938
        (res_inst_tac [("s","False"),("t","ia < Suc(i)")] ssubst 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   939
        (rtac iffI 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   940
        (etac FalseE 2),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   941
        (rtac notE 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   942
        (rtac (not_less_eq RS iffD2) 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   943
        (atac 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   944
        (atac 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   945
        (res_inst_tac [("s","False"),("t","Suc(ia) < Suc(i)")] ssubst 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   946
        (Asm_simp_tac  1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   947
        (rtac iffI 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   948
        (etac FalseE 2),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   949
        (rtac notE 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   950
        (etac less_not_sym 1),  
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   951
        (atac 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   952
        (Asm_simp_tac 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   953
        (etac (is_chainE RS spec) 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   954
        (hyp_subst_tac 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   955
        (Asm_simp_tac 1),
1675
36ba4da350c3 adapted several proofs
oheimb
parents: 1461
diff changeset
   956
        (Asm_simp_tac 1),
36ba4da350c3 adapted several proofs
oheimb
parents: 1461
diff changeset
   957
	(asm_simp_tac (!simpset addsimps [less_Suc_eq]) 1)
1461
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   958
        ]);
243
c22b85994e17 Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff changeset
   959
892
d0dc8d057929 added qed, qed_goal[w]
clasohm
parents: 628
diff changeset
   960
qed_goal "adm_disj_lemma4"  Fix.thy
243
c22b85994e17 Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff changeset
   961
"[| ! j. i < j --> Q(Y(j)) |] ==>\
1461
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   962
\        ! 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
   963
 (fn prems =>
1461
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   964
        [
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   965
        (cut_facts_tac prems 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   966
        (rtac allI 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   967
        (res_inst_tac [("m","n"),("n","Suc(i)")] nat_less_cases 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   968
        (res_inst_tac[("s","Y(Suc(i))"),("t","if n<Suc(i) then Y(Suc(i)) else Y n")] ssubst 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   969
        (Asm_simp_tac 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   970
        (etac allE 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   971
        (rtac mp 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   972
        (atac 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   973
        (Asm_simp_tac 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   974
        (res_inst_tac[("s","Y(n)"),("t","if n<Suc(i) then Y(Suc(i)) else Y(n)")] ssubst 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   975
        (Asm_simp_tac 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   976
        (hyp_subst_tac 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   977
        (dtac spec 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   978
        (rtac mp 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   979
        (atac 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   980
        (Asm_simp_tac 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   981
        (res_inst_tac [("s","Y(n)"),("t","if n < Suc(i) then Y(Suc(i)) else Y(n)")] ssubst 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   982
        (res_inst_tac [("s","False"),("t","n < Suc(i)")] ssubst 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   983
        (rtac iffI 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   984
        (etac FalseE 2),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   985
        (rtac notE 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   986
        (etac less_not_sym 1),  
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   987
        (atac 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   988
        (Asm_simp_tac 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   989
        (dtac spec 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   990
        (rtac mp 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   991
        (atac 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   992
        (etac Suc_lessD 1)
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   993
        ]);
243
c22b85994e17 Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff changeset
   994
892
d0dc8d057929 added qed, qed_goal[w]
clasohm
parents: 628
diff changeset
   995
qed_goal "adm_disj_lemma5"  Fix.thy
243
c22b85994e17 Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff changeset
   996
"[| is_chain(Y::nat=>'a); ! j. i < j --> Q(Y(j)) |] ==>\
1168
74be52691d62 The curried version of HOLCF is now just called HOLCF. The old
regensbu
parents: 892
diff changeset
   997
\         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
   998
 (fn prems =>
1461
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
   999
        [
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
  1000
        (cut_facts_tac prems 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
  1001
        (rtac lub_equal2 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
  1002
        (atac 2),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
  1003
        (rtac adm_disj_lemma3 2),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
  1004
        (atac 2),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
  1005
        (atac 2),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
  1006
        (res_inst_tac [("x","i")] exI 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
  1007
        (strip_tac 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
  1008
        (res_inst_tac [("s","False"),("t","ia < Suc(i)")] ssubst 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
  1009
        (rtac iffI 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
  1010
        (etac FalseE 2),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
  1011
        (rtac notE 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
  1012
        (rtac (not_less_eq RS iffD2) 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
  1013
        (atac 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
  1014
        (atac 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
  1015
        (rtac (if_False RS ssubst) 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
  1016
        (rtac refl 1)
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
  1017
        ]);
243
c22b85994e17 Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff changeset
  1018
892
d0dc8d057929 added qed, qed_goal[w]
clasohm
parents: 628
diff changeset
  1019
qed_goal "adm_disj_lemma6"  Fix.thy
243
c22b85994e17 Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff changeset
  1020
"[| is_chain(Y::nat=>'a); ? i. ! j. i < j --> Q(Y(j)) |] ==>\
c22b85994e17 Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff changeset
  1021
\         ? X. is_chain(X) & (! n. Q(X(n))) & lub(range(Y)) = lub(range(X))"
c22b85994e17 Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff changeset
  1022
 (fn prems =>
1461
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
  1023
        [
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
  1024
        (cut_facts_tac prems 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
  1025
        (etac exE 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
  1026
        (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
  1027
        (rtac conjI 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
  1028
        (rtac adm_disj_lemma3 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
  1029
        (atac 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
  1030
        (atac 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
  1031
        (rtac conjI 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
  1032
        (rtac adm_disj_lemma4 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
  1033
        (atac 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
  1034
        (rtac adm_disj_lemma5 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
  1035
        (atac 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
  1036
        (atac 1)
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
  1037
        ]);
243
c22b85994e17 Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff changeset
  1038
c22b85994e17 Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff changeset
  1039
892
d0dc8d057929 added qed, qed_goal[w]
clasohm
parents: 628
diff changeset
  1040
qed_goal "adm_disj_lemma7"  Fix.thy 
243
c22b85994e17 Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff changeset
  1041
"[| is_chain(Y::nat=>'a); ! i. ? j. i < j & P(Y(j))  |] ==>\
1675
36ba4da350c3 adapted several proofs
oheimb
parents: 1461
diff changeset
  1042
\         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
  1043
 (fn prems =>
1461
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
  1044
        [
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
  1045
        (cut_facts_tac prems 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
  1046
        (rtac is_chainI 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
  1047
        (rtac allI 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
  1048
        (rtac chain_mono3 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
  1049
        (atac 1),
1675
36ba4da350c3 adapted several proofs
oheimb
parents: 1461
diff changeset
  1050
        (rtac Least_le 1),
1461
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
  1051
        (rtac conjI 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
  1052
        (rtac Suc_lessD 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
  1053
        (etac allE 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
  1054
        (etac exE 1),
1675
36ba4da350c3 adapted several proofs
oheimb
parents: 1461
diff changeset
  1055
        (rtac (LeastI RS conjunct1) 1),
1461
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
  1056
        (atac 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
  1057
        (etac allE 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
  1058
        (etac exE 1),
1675
36ba4da350c3 adapted several proofs
oheimb
parents: 1461
diff changeset
  1059
        (rtac (LeastI RS conjunct2) 1),
1461
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
  1060
        (atac 1)
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
  1061
        ]);
243
c22b85994e17 Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff changeset
  1062
892
d0dc8d057929 added qed, qed_goal[w]
clasohm
parents: 628
diff changeset
  1063
qed_goal "adm_disj_lemma8"  Fix.thy 
1675
36ba4da350c3 adapted several proofs
oheimb
parents: 1461
diff changeset
  1064
"[| ! 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
  1065
 (fn prems =>
1461
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
  1066
        [
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
  1067
        (cut_facts_tac prems 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
  1068
        (strip_tac 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
  1069
        (etac allE 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
  1070
        (etac exE 1),
1675
36ba4da350c3 adapted several proofs
oheimb
parents: 1461
diff changeset
  1071
        (etac (LeastI RS conjunct2) 1)
1461
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
  1072
        ]);
243
c22b85994e17 Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff changeset
  1073
892
d0dc8d057929 added qed, qed_goal[w]
clasohm
parents: 628
diff changeset
  1074
qed_goal "adm_disj_lemma9"  Fix.thy
243
c22b85994e17 Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff changeset
  1075
"[| is_chain(Y::nat=>'a); ! i. ? j. i < j & P(Y(j)) |] ==>\
1675
36ba4da350c3 adapted several proofs
oheimb
parents: 1461
diff changeset
  1076
\         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
  1077
 (fn prems =>
1461
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
  1078
        [
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
  1079
        (cut_facts_tac prems 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
  1080
        (rtac antisym_less 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
  1081
        (rtac lub_mono 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
  1082
        (atac 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
  1083
        (rtac adm_disj_lemma7 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
        (strip_tac 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
  1087
        (rtac (chain_mono RS mp) 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
  1088
        (atac 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
  1089
        (etac allE 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
  1090
        (etac exE 1),
1675
36ba4da350c3 adapted several proofs
oheimb
parents: 1461
diff changeset
  1091
        (rtac (LeastI RS conjunct1) 1),
1461
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
  1092
        (atac 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
  1093
        (rtac lub_mono3 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
  1094
        (rtac adm_disj_lemma7 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
  1095
        (atac 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
  1096
        (atac 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
  1097
        (atac 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
  1098
        (strip_tac 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
  1099
        (rtac exI 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
  1100
        (rtac (chain_mono RS mp) 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
  1101
        (atac 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
  1102
        (rtac lessI 1)
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
  1103
        ]);
243
c22b85994e17 Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff changeset
  1104
892
d0dc8d057929 added qed, qed_goal[w]
clasohm
parents: 628
diff changeset
  1105
qed_goal "adm_disj_lemma10"  Fix.thy
243
c22b85994e17 Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff changeset
  1106
"[| is_chain(Y::nat=>'a); ! i. ? j. i < j & P(Y(j)) |] ==>\
c22b85994e17 Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff changeset
  1107
\         ? X. is_chain(X) & (! n. P(X(n))) & lub(range(Y)) = lub(range(X))"
c22b85994e17 Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff changeset
  1108
 (fn prems =>
1461
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
  1109
        [
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
  1110
        (cut_facts_tac prems 1),
1675
36ba4da350c3 adapted several proofs
oheimb
parents: 1461
diff changeset
  1111
        (res_inst_tac [("x","%m. Y(Least(%j. m<j & P(Y(j))))")] exI 1),
1461
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
  1112
        (rtac conjI 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
  1113
        (rtac adm_disj_lemma7 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
  1114
        (atac 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
  1115
        (atac 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
  1116
        (rtac conjI 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
  1117
        (rtac adm_disj_lemma8 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
  1118
        (atac 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
  1119
        (rtac adm_disj_lemma9 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
  1120
        (atac 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
  1121
        (atac 1)
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
  1122
        ]);
243
c22b85994e17 Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff changeset
  1123
430
89e1986125fe Franz Regensburger's changes.
nipkow
parents: 300
diff changeset
  1124
892
d0dc8d057929 added qed, qed_goal[w]
clasohm
parents: 628
diff changeset
  1125
qed_goal "adm_disj_lemma11" Fix.thy
430
89e1986125fe Franz Regensburger's changes.
nipkow
parents: 300
diff changeset
  1126
"[| 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
  1127
 (fn prems =>
1461
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
  1128
        [
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
  1129
        (cut_facts_tac prems 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
  1130
        (etac adm_disj_lemma2 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
  1131
        (etac adm_disj_lemma10 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
  1132
        (atac 1)
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
  1133
        ]);
430
89e1986125fe Franz Regensburger's changes.
nipkow
parents: 300
diff changeset
  1134
892
d0dc8d057929 added qed, qed_goal[w]
clasohm
parents: 628
diff changeset
  1135
qed_goal "adm_disj_lemma12" Fix.thy
430
89e1986125fe Franz Regensburger's changes.
nipkow
parents: 300
diff changeset
  1136
"[| 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
  1137
 (fn prems =>
1461
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
  1138
        [
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
  1139
        (cut_facts_tac prems 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
  1140
        (etac adm_disj_lemma2 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
  1141
        (etac adm_disj_lemma6 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
  1142
        (atac 1)
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
  1143
        ]);
430
89e1986125fe Franz Regensburger's changes.
nipkow
parents: 300
diff changeset
  1144
892
d0dc8d057929 added qed, qed_goal[w]
clasohm
parents: 628
diff changeset
  1145
qed_goal "adm_disj"  Fix.thy  
1461
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
  1146
        "[| 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
  1147
 (fn prems =>
1461
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
  1148
        [
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
  1149
        (cut_facts_tac prems 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
  1150
        (rtac (adm_def2 RS iffD2) 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
  1151
        (strip_tac 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
  1152
        (rtac (adm_disj_lemma1 RS disjE) 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
  1153
        (atac 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
  1154
        (atac 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
  1155
        (rtac disjI2 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
  1156
        (etac adm_disj_lemma12 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
  1157
        (atac 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
  1158
        (atac 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
  1159
        (rtac disjI1 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
  1160
        (etac adm_disj_lemma11 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
  1161
        (atac 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
  1162
        (atac 1)
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
  1163
        ]);
243
c22b85994e17 Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff changeset
  1164
430
89e1986125fe Franz Regensburger's changes.
nipkow
parents: 300
diff changeset
  1165
892
d0dc8d057929 added qed, qed_goal[w]
clasohm
parents: 628
diff changeset
  1166
qed_goal "adm_impl"  Fix.thy  
1461
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
  1167
        "[| 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
  1168
 (fn prems =>
1461
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
  1169
        [
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
  1170
        (cut_facts_tac prems 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
  1171
        (res_inst_tac [("P2","%x.~(P x)|Q x")] (adm_cong RS iffD1) 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
  1172
        (fast_tac HOL_cs 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
  1173
        (rtac adm_disj 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
  1174
        (atac 1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
  1175
        (atac 1)
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
  1176
        ]);
243
c22b85994e17 Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff changeset
  1177
c22b85994e17 Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff changeset
  1178
1675
36ba4da350c3 adapted several proofs
oheimb
parents: 1461
diff changeset
  1179
qed_goal "adm_not_conj"  Fix.thy  
1681
d9aaae4ff6c3 changed two goals formulated with 8bit font
oheimb
parents: 1675
diff changeset
  1180
"[| adm (%x. ~ P x); adm (%x. ~ Q x) |] ==> adm (%x. ~ (P x & Q x))"(fn prems=>[
1675
36ba4da350c3 adapted several proofs
oheimb
parents: 1461
diff changeset
  1181
	cut_facts_tac prems 1,
36ba4da350c3 adapted several proofs
oheimb
parents: 1461
diff changeset
  1182
	subgoal_tac 
1681
d9aaae4ff6c3 changed two goals formulated with 8bit font
oheimb
parents: 1675
diff changeset
  1183
	"(%x. ~ (P x & Q x)) = (%x. ~ P x | ~ Q x)" 1,
1675
36ba4da350c3 adapted several proofs
oheimb
parents: 1461
diff changeset
  1184
	rtac ext 2,
36ba4da350c3 adapted several proofs
oheimb
parents: 1461
diff changeset
  1185
	fast_tac HOL_cs 2,
36ba4da350c3 adapted several proofs
oheimb
parents: 1461
diff changeset
  1186
	etac ssubst 1,
36ba4da350c3 adapted several proofs
oheimb
parents: 1461
diff changeset
  1187
	etac adm_disj 1,
36ba4da350c3 adapted several proofs
oheimb
parents: 1461
diff changeset
  1188
	atac 1]);
36ba4da350c3 adapted several proofs
oheimb
parents: 1461
diff changeset
  1189
36ba4da350c3 adapted several proofs
oheimb
parents: 1461
diff changeset
  1190
qed_goalw "admI" Fix.thy [adm_def]
1681
d9aaae4ff6c3 changed two goals formulated with 8bit font
oheimb
parents: 1675
diff changeset
  1191
 "(!!Y. [| is_chain Y; !i. P (Y i); !i. ? j. i < j & Y i ~= Y j & Y i << Y j |]\
d9aaae4ff6c3 changed two goals formulated with 8bit font
oheimb
parents: 1675
diff changeset
  1192
\ ==> P(lub (range Y))) ==> adm P" 
1675
36ba4da350c3 adapted several proofs
oheimb
parents: 1461
diff changeset
  1193
 (fn prems => [
36ba4da350c3 adapted several proofs
oheimb
parents: 1461
diff changeset
  1194
	strip_tac 1,
36ba4da350c3 adapted several proofs
oheimb
parents: 1461
diff changeset
  1195
	case_tac "finite_chain Y" 1,
36ba4da350c3 adapted several proofs
oheimb
parents: 1461
diff changeset
  1196
	rewtac finite_chain_def,
36ba4da350c3 adapted several proofs
oheimb
parents: 1461
diff changeset
  1197
	safe_tac HOL_cs,
36ba4da350c3 adapted several proofs
oheimb
parents: 1461
diff changeset
  1198
	dtac lub_finch1 1,
36ba4da350c3 adapted several proofs
oheimb
parents: 1461
diff changeset
  1199
	atac 1,
36ba4da350c3 adapted several proofs
oheimb
parents: 1461
diff changeset
  1200
	dtac thelubI 1,
36ba4da350c3 adapted several proofs
oheimb
parents: 1461
diff changeset
  1201
	etac ssubst 1,
36ba4da350c3 adapted several proofs
oheimb
parents: 1461
diff changeset
  1202
	etac spec 1,
36ba4da350c3 adapted several proofs
oheimb
parents: 1461
diff changeset
  1203
	etac swap 1,
36ba4da350c3 adapted several proofs
oheimb
parents: 1461
diff changeset
  1204
	rewtac max_in_chain_def,
36ba4da350c3 adapted several proofs
oheimb
parents: 1461
diff changeset
  1205
	resolve_tac prems 1, atac 1, atac 1,
36ba4da350c3 adapted several proofs
oheimb
parents: 1461
diff changeset
  1206
	fast_tac (HOL_cs addDs [le_imp_less_or_eq] 
36ba4da350c3 adapted several proofs
oheimb
parents: 1461
diff changeset
  1207
			 addEs [chain_mono RS mp]) 1]);
243
c22b85994e17 Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff changeset
  1208
c22b85994e17 Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff changeset
  1209
val adm_thms = [adm_impl,adm_disj,adm_eq,adm_not_UU,adm_UU_not_less,
1675
36ba4da350c3 adapted several proofs
oheimb
parents: 1461
diff changeset
  1210
        adm_all2,adm_not_less,adm_not_free,adm_not_conj,adm_conj,adm_less
1461
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1410
diff changeset
  1211
        ];
243
c22b85994e17 Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff changeset
  1212