src/HOL/Fun.ML
author oheimb
Tue, 23 Apr 1996 16:58:21 +0200
changeset 1672 2c109cd2fdd0
parent 1666 5183de4c496d
child 1754 852093aeb0ab
permissions -rw-r--r--
repaired critical proofs depending on the order inside non-confluent SimpSets, (temporarily) removed problematic rule less_Suc_eq form simpset_of "Nat"
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
1465
5d7a7e439cec expanded tabs
clasohm
parents: 1264
diff changeset
     1
(*  Title:      HOL/Fun
923
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
     2
    ID:         $Id$
1465
5d7a7e439cec expanded tabs
clasohm
parents: 1264
diff changeset
     3
    Author:     Tobias Nipkow, Cambridge University Computer Laboratory
923
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
     4
    Copyright   1993  University of Cambridge
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
     5
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
     6
Lemmas about functions.
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
     7
*)
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
     8
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
     9
goal Fun.thy "(f = g) = (!x. f(x)=g(x))";
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
    10
by (rtac iffI 1);
1264
3eb91524b938 added local simpsets; removed IOA from 'make test'
clasohm
parents: 923
diff changeset
    11
by (Asm_simp_tac 1);
3eb91524b938 added local simpsets; removed IOA from 'make test'
clasohm
parents: 923
diff changeset
    12
by (rtac ext 1 THEN Asm_simp_tac 1);
923
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
    13
qed "expand_fun_eq";
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
    14
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
    15
val prems = goal Fun.thy
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
    16
    "[| f(x)=u;  !!x. P(x) ==> g(f(x)) = x;  P(x) |] ==> x=g(u)";
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
    17
by (rtac (arg_cong RS box_equals) 1);
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
    18
by (REPEAT (resolve_tac (prems@[refl]) 1));
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
    19
qed "apply_inverse";
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
    20
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
    21
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
    22
(*** Range of a function ***)
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
    23
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
    24
(*Frequently b does not have the syntactic form of f(x).*)
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
    25
val [prem] = goalw Fun.thy [range_def] "b=f(x) ==> b : range(f)";
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
    26
by (EVERY1 [rtac CollectI, rtac exI, rtac prem]);
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
    27
qed "range_eqI";
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
    28
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
    29
val rangeI = refl RS range_eqI;
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
    30
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
    31
val [major,minor] = goalw Fun.thy [range_def]
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
    32
    "[| b : range(%x.f(x));  !!x. b=f(x) ==> P |] ==> P"; 
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
    33
by (rtac (major RS CollectD RS exE) 1);
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
    34
by (etac minor 1);
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
    35
qed "rangeE";
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
    36
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
    37
(*** Image of a set under a function ***)
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
    38
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
    39
val prems = goalw Fun.thy [image_def] "[| b=f(x);  x:A |] ==> b : f``A";
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
    40
by (REPEAT (resolve_tac (prems @ [CollectI,bexI,prem]) 1));
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
    41
qed "image_eqI";
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
    42
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
    43
val imageI = refl RS image_eqI;
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
    44
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
    45
(*The eta-expansion gives variable-name preservation.*)
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
    46
val major::prems = goalw Fun.thy [image_def]
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
    47
    "[| b : (%x.f(x))``A;  !!x.[| b=f(x);  x:A |] ==> P |] ==> P"; 
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
    48
by (rtac (major RS CollectD RS bexE) 1);
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
    49
by (REPEAT (ares_tac prems 1));
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
    50
qed "imageE";
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
    51
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
    52
goalw Fun.thy [o_def] "(f o g)``r = f``(g``r)";
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
    53
by (rtac set_ext 1);
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
    54
by (fast_tac (HOL_cs addIs [imageI] addSEs [imageE]) 1);
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
    55
qed "image_compose";
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
    56
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
    57
goal Fun.thy "f``(A Un B) = f``A Un f``B";
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
    58
by (rtac set_ext 1);
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
    59
by (fast_tac (HOL_cs addIs [imageI,UnCI] addSEs [imageE,UnE]) 1);
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
    60
qed "image_Un";
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
    61
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
    62
(*** inj(f): f is a one-to-one function ***)
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
    63
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
    64
val prems = goalw Fun.thy [inj_def]
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
    65
    "[| !! x y. f(x) = f(y) ==> x=y |] ==> inj(f)";
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
    66
by (fast_tac (HOL_cs addIs prems) 1);
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
    67
qed "injI";
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
    68
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
    69
val [major] = goal Fun.thy "(!!x. g(f(x)) = x) ==> inj(f)";
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
    70
by (rtac injI 1);
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
    71
by (etac (arg_cong RS box_equals) 1);
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
    72
by (rtac major 1);
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
    73
by (rtac major 1);
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
    74
qed "inj_inverseI";
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
    75
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
    76
val [major,minor] = goalw Fun.thy [inj_def]
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
    77
    "[| inj(f); f(x) = f(y) |] ==> x=y";
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
    78
by (rtac (major RS spec RS spec RS mp) 1);
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
    79
by (rtac minor 1);
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
    80
qed "injD";
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
    81
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
    82
(*Useful with the simplifier*)
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
    83
val [major] = goal Fun.thy "inj(f) ==> (f(x) = f(y)) = (x=y)";
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
    84
by (rtac iffI 1);
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
    85
by (etac (major RS injD) 1);
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
    86
by (etac arg_cong 1);
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
    87
qed "inj_eq";
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
    88
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
    89
val [major] = goal Fun.thy "inj(f) ==> (@x.f(x)=f(y)) = y";
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
    90
by (rtac (major RS injD) 1);
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
    91
by (rtac selectI 1);
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
    92
by (rtac refl 1);
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
    93
qed "inj_select";
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
    94
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
    95
(*A one-to-one function has an inverse (given using select).*)
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
    96
val [major] = goalw Fun.thy [Inv_def] "inj(f) ==> Inv f (f x) = x";
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
    97
by (EVERY1 [rtac (major RS inj_select)]);
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
    98
qed "Inv_f_f";
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
    99
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
   100
(* Useful??? *)
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
   101
val [oneone,minor] = goal Fun.thy
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
   102
    "[| inj(f); !!y. y: range(f) ==> P(Inv f y) |] ==> P(x)";
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
   103
by (res_inst_tac [("t", "x")] (oneone RS (Inv_f_f RS subst)) 1);
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
   104
by (rtac (rangeI RS minor) 1);
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
   105
qed "inj_transfer";
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
   106
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
   107
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
   108
(*** inj_onto f A: f is one-to-one over A ***)
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
   109
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
   110
val prems = goalw Fun.thy [inj_onto_def]
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
   111
    "(!! x y. [| f(x) = f(y);  x:A;  y:A |] ==> x=y) ==> inj_onto f A";
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
   112
by (fast_tac (HOL_cs addIs prems addSIs [ballI]) 1);
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
   113
qed "inj_ontoI";
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
   114
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
   115
val [major] = goal Fun.thy 
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
   116
    "(!!x. x:A ==> g(f(x)) = x) ==> inj_onto f A";
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
   117
by (rtac inj_ontoI 1);
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
   118
by (etac (apply_inverse RS trans) 1);
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
   119
by (REPEAT (eresolve_tac [asm_rl,major] 1));
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
   120
qed "inj_onto_inverseI";
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
   121
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
   122
val major::prems = goalw Fun.thy [inj_onto_def]
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
   123
    "[| inj_onto f A;  f(x)=f(y);  x:A;  y:A |] ==> x=y";
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
   124
by (rtac (major RS bspec RS bspec RS mp) 1);
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
   125
by (REPEAT (resolve_tac prems 1));
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
   126
qed "inj_ontoD";
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
   127
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
   128
goal Fun.thy "!!x y.[| inj_onto f A;  x:A;  y:A |] ==> (f(x)=f(y)) = (x=y)";
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
   129
by (fast_tac (HOL_cs addSEs [inj_ontoD]) 1);
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
   130
qed "inj_onto_iff";
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
   131
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
   132
val major::prems = goal Fun.thy
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
   133
    "[| inj_onto f A;  ~x=y;  x:A;  y:A |] ==> ~ f(x)=f(y)";
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
   134
by (rtac contrapos 1);
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
   135
by (etac (major RS inj_ontoD) 2);
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
   136
by (REPEAT (resolve_tac prems 1));
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
   137
qed "inj_onto_contraD";
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
   138
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
   139
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
   140
(*** Lemmas about inj ***)
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
   141
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
   142
val prems = goalw Fun.thy [o_def]
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
   143
    "[| inj(f);  inj_onto g (range f) |] ==> inj(g o f)";
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
   144
by (cut_facts_tac prems 1);
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
   145
by (fast_tac (HOL_cs addIs [injI,rangeI]
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
   146
                     addEs [injD,inj_ontoD]) 1);
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
   147
qed "comp_inj";
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
   148
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
   149
val [prem] = goal Fun.thy "inj(f) ==> inj_onto f A";
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
   150
by (fast_tac (HOL_cs addIs [prem RS injD, inj_ontoI]) 1);
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
   151
qed "inj_imp";
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
   152
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
   153
val [prem] = goalw Fun.thy [Inv_def] "y : range(f) ==> f(Inv f y) = y";
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
   154
by (EVERY1 [rtac (prem RS rangeE), rtac selectI, etac sym]);
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
   155
qed "f_Inv_f";
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
   156
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
   157
val prems = goal Fun.thy
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
   158
    "[| Inv f x=Inv f y; x: range(f);  y: range(f) |] ==> x=y";
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
   159
by (rtac (arg_cong RS box_equals) 1);
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
   160
by (REPEAT (resolve_tac (prems @ [f_Inv_f]) 1));
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
   161
qed "Inv_injective";
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
   162
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
   163
val prems = goal Fun.thy
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
   164
    "[| inj(f);  A<=range(f) |] ==> inj_onto (Inv f) A";
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
   165
by (cut_facts_tac prems 1);
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
   166
by (fast_tac (HOL_cs addIs [inj_ontoI] 
1465
5d7a7e439cec expanded tabs
clasohm
parents: 1264
diff changeset
   167
                     addEs [Inv_injective,injD,subsetD]) 1);
923
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
   168
qed "inj_onto_Inv";
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
   169
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
   170
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
   171
(*** Set reasoning tools ***)
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
   172
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
   173
val set_cs = HOL_cs 
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
   174
    addSIs [ballI, PowI, subsetI, InterI, INT_I, INT1_I, CollectI, 
1465
5d7a7e439cec expanded tabs
clasohm
parents: 1264
diff changeset
   175
            ComplI, IntI, DiffI, UnCI, insertCI] 
923
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
   176
    addIs  [bexI, UnionI, UN_I, UN1_I, imageI, rangeI] 
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
   177
    addSEs [bexE, make_elim PowD, UnionE, UN_E, UN1_E, DiffE,
1561
9ba6d69f7763 set_cs now includes singleton_inject
paulson
parents: 1465
diff changeset
   178
	    make_elim singleton_inject,
1465
5d7a7e439cec expanded tabs
clasohm
parents: 1264
diff changeset
   179
            CollectE, ComplE, IntE, UnE, insertE, imageE, rangeE, emptyE] 
923
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
   180
    addEs  [ballE, InterD, InterE, INT_D, INT_E, make_elim INT1_D,
1465
5d7a7e439cec expanded tabs
clasohm
parents: 1264
diff changeset
   181
            subsetD, subsetCE];
923
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
   182
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
   183
fun cfast_tac prems = cut_facts_tac prems THEN' fast_tac set_cs;
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
   184
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
   185
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
   186
fun prover s = prove_goal Fun.thy s (fn _=>[fast_tac set_cs 1]);
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
   187
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
   188
val mem_simps = map prover
1672
2c109cd2fdd0 repaired critical proofs depending on the order inside non-confluent SimpSets,
oheimb
parents: 1666
diff changeset
   189
 [ "(a : A Un B)   =  (a:A | a:B)",	(* Un_iff *)
2c109cd2fdd0 repaired critical proofs depending on the order inside non-confluent SimpSets,
oheimb
parents: 1666
diff changeset
   190
   "(a : A Int B)  =  (a:A & a:B)",	(* Int_iff *)
2c109cd2fdd0 repaired critical proofs depending on the order inside non-confluent SimpSets,
oheimb
parents: 1666
diff changeset
   191
   "(a : Compl(B)) =  (~a:B)",		(* Compl_iff *)
2c109cd2fdd0 repaired critical proofs depending on the order inside non-confluent SimpSets,
oheimb
parents: 1666
diff changeset
   192
   "(a : A-B)      =  (a:A & ~a:B)",	(* Diff_iff *)
923
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
   193
   "(a : {b})      =  (a=b)",
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
   194
   "(a : {x.P(x)}) =  P(a)" ];
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
   195
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
   196
val mksimps_pairs = ("Ball",[bspec]) :: mksimps_pairs;
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
   197
1264
3eb91524b938 added local simpsets; removed IOA from 'make test'
clasohm
parents: 923
diff changeset
   198
simpset := !simpset addsimps mem_simps
3eb91524b938 added local simpsets; removed IOA from 'make test'
clasohm
parents: 923
diff changeset
   199
                    addcongs [ball_cong,bex_cong]
3eb91524b938 added local simpsets; removed IOA from 'make test'
clasohm
parents: 923
diff changeset
   200
                    setmksimps (mksimps mksimps_pairs);