src/ZF/simpdata.ML
author paulson
Fri, 30 Mar 2001 12:31:10 +0200
changeset 11233 34c81a796ee3
parent 9907 473a6604da94
child 11323 92eddd0914a9
permissions -rw-r--r--
the one-point rule for bounded quantifiers
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
0
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
     1
(*  Title:      ZF/simpdata
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
     2
    ID:         $Id$
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
     3
    Author:     Lawrence C Paulson, Cambridge University Computer Laboratory
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
     4
    Copyright   1991  University of Cambridge
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
     5
2469
b50b8c0eec01 Implicit simpsets and clasets for FOL and ZF
paulson
parents: 1791
diff changeset
     6
Rewriting for ZF set theory: specialized extraction of rewrites from theorems
0
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
     7
*)
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
     8
2469
b50b8c0eec01 Implicit simpsets and clasets for FOL and ZF
paulson
parents: 1791
diff changeset
     9
(** Rewriting **)
0
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    10
3425
fc4ca570d185 Better miniscoping for bounded quantifiers
paulson
parents: 2876
diff changeset
    11
local
fc4ca570d185 Better miniscoping for bounded quantifiers
paulson
parents: 2876
diff changeset
    12
  (*For proving rewrite rules*)
9570
e16e168984e1 installation of cancellation simprocs for the integers
paulson
parents: 7570
diff changeset
    13
  fun prover s = (prove_goal (the_context ()) s (fn _ => [Blast_tac 1]));
3425
fc4ca570d185 Better miniscoping for bounded quantifiers
paulson
parents: 2876
diff changeset
    14
fc4ca570d185 Better miniscoping for bounded quantifiers
paulson
parents: 2876
diff changeset
    15
in
0
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    16
3425
fc4ca570d185 Better miniscoping for bounded quantifiers
paulson
parents: 2876
diff changeset
    17
val ball_simps = map prover
fc4ca570d185 Better miniscoping for bounded quantifiers
paulson
parents: 2876
diff changeset
    18
    ["(ALL x:A. P(x) | Q)   <-> ((ALL x:A. P(x)) | Q)",
fc4ca570d185 Better miniscoping for bounded quantifiers
paulson
parents: 2876
diff changeset
    19
     "(ALL x:A. P | Q(x))   <-> (P | (ALL x:A. Q(x)))",
fc4ca570d185 Better miniscoping for bounded quantifiers
paulson
parents: 2876
diff changeset
    20
     "(ALL x:A. P --> Q(x)) <-> (P --> (ALL x:A. Q(x)))",
fc4ca570d185 Better miniscoping for bounded quantifiers
paulson
parents: 2876
diff changeset
    21
     "(ALL x:A. P(x) --> Q) <-> ((EX x:A. P(x)) --> Q)",
fc4ca570d185 Better miniscoping for bounded quantifiers
paulson
parents: 2876
diff changeset
    22
     "(ALL x:0.P(x)) <-> True",
3840
e0baea4d485a fixed dots;
wenzelm
parents: 3425
diff changeset
    23
     "(ALL x:succ(i).P(x)) <-> P(i) & (ALL x:i. P(x))",
e0baea4d485a fixed dots;
wenzelm
parents: 3425
diff changeset
    24
     "(ALL x:cons(a,B).P(x)) <-> P(a) & (ALL x:B. P(x))",
2482
87383dd9f4b5 Default rewrite rules for quantification over Collect(A,P)
paulson
parents: 2469
diff changeset
    25
     "(ALL x:RepFun(A,f). P(x)) <-> (ALL y:A. P(f(y)))",
87383dd9f4b5 Default rewrite rules for quantification over Collect(A,P)
paulson
parents: 2469
diff changeset
    26
     "(ALL x:Union(A).P(x)) <-> (ALL y:A. ALL x:y. P(x))",
3859
810fccb1ebe4 Added neagtion rules for Ball and Bex.
nipkow
parents: 3840
diff changeset
    27
     "(ALL x:Collect(A,Q).P(x)) <-> (ALL x:A. Q(x) --> P(x))",
810fccb1ebe4 Added neagtion rules for Ball and Bex.
nipkow
parents: 3840
diff changeset
    28
     "(~(ALL x:A. P(x))) <-> (EX x:A. ~P(x))"];
2482
87383dd9f4b5 Default rewrite rules for quantification over Collect(A,P)
paulson
parents: 2469
diff changeset
    29
3425
fc4ca570d185 Better miniscoping for bounded quantifiers
paulson
parents: 2876
diff changeset
    30
val ball_conj_distrib = 
fc4ca570d185 Better miniscoping for bounded quantifiers
paulson
parents: 2876
diff changeset
    31
    prover "(ALL x:A. P(x) & Q(x)) <-> ((ALL x:A. P(x)) & (ALL x:A. Q(x)))";
fc4ca570d185 Better miniscoping for bounded quantifiers
paulson
parents: 2876
diff changeset
    32
fc4ca570d185 Better miniscoping for bounded quantifiers
paulson
parents: 2876
diff changeset
    33
val bex_simps = map prover
fc4ca570d185 Better miniscoping for bounded quantifiers
paulson
parents: 2876
diff changeset
    34
    ["(EX x:A. P(x) & Q) <-> ((EX x:A. P(x)) & Q)",
fc4ca570d185 Better miniscoping for bounded quantifiers
paulson
parents: 2876
diff changeset
    35
     "(EX x:A. P & Q(x)) <-> (P & (EX x:A. Q(x)))",
fc4ca570d185 Better miniscoping for bounded quantifiers
paulson
parents: 2876
diff changeset
    36
     "(EX x:0.P(x)) <-> False",
3840
e0baea4d485a fixed dots;
wenzelm
parents: 3425
diff changeset
    37
     "(EX x:succ(i).P(x)) <-> P(i) | (EX x:i. P(x))",
e0baea4d485a fixed dots;
wenzelm
parents: 3425
diff changeset
    38
     "(EX x:cons(a,B).P(x)) <-> P(a) | (EX x:B. P(x))",
2482
87383dd9f4b5 Default rewrite rules for quantification over Collect(A,P)
paulson
parents: 2469
diff changeset
    39
     "(EX x:RepFun(A,f). P(x)) <-> (EX y:A. P(f(y)))",
87383dd9f4b5 Default rewrite rules for quantification over Collect(A,P)
paulson
parents: 2469
diff changeset
    40
     "(EX x:Union(A).P(x)) <-> (EX y:A. EX x:y.  P(x))",
3859
810fccb1ebe4 Added neagtion rules for Ball and Bex.
nipkow
parents: 3840
diff changeset
    41
     "(EX x:Collect(A,Q).P(x)) <-> (EX x:A. Q(x) & P(x))",
810fccb1ebe4 Added neagtion rules for Ball and Bex.
nipkow
parents: 3840
diff changeset
    42
     "(~(EX x:A. P(x))) <-> (ALL x:A. ~P(x))"];
2482
87383dd9f4b5 Default rewrite rules for quantification over Collect(A,P)
paulson
parents: 2469
diff changeset
    43
3425
fc4ca570d185 Better miniscoping for bounded quantifiers
paulson
parents: 2876
diff changeset
    44
val bex_disj_distrib = 
fc4ca570d185 Better miniscoping for bounded quantifiers
paulson
parents: 2876
diff changeset
    45
    prover "(EX x:A. P(x) | Q(x)) <-> ((EX x:A. P(x)) | (EX x:A. Q(x)))";
fc4ca570d185 Better miniscoping for bounded quantifiers
paulson
parents: 2876
diff changeset
    46
fc4ca570d185 Better miniscoping for bounded quantifiers
paulson
parents: 2876
diff changeset
    47
val Rep_simps = map prover
5202
084ceb3844f5 A few new lemmas by Mark Staples
paulson
parents: 5137
diff changeset
    48
    ["{x. y:0, R(x,y)} = 0",	(*Replace*)
084ceb3844f5 A few new lemmas by Mark Staples
paulson
parents: 5137
diff changeset
    49
     "{x:0. P(x)} = 0",		(*Collect*)
3425
fc4ca570d185 Better miniscoping for bounded quantifiers
paulson
parents: 2876
diff changeset
    50
     "{x:A. False} = 0",
fc4ca570d185 Better miniscoping for bounded quantifiers
paulson
parents: 2876
diff changeset
    51
     "{x:A. True} = A",
5202
084ceb3844f5 A few new lemmas by Mark Staples
paulson
parents: 5137
diff changeset
    52
     "RepFun(0,f) = 0",		(*RepFun*)
3425
fc4ca570d185 Better miniscoping for bounded quantifiers
paulson
parents: 2876
diff changeset
    53
     "RepFun(succ(i),f) = cons(f(i), RepFun(i,f))",
fc4ca570d185 Better miniscoping for bounded quantifiers
paulson
parents: 2876
diff changeset
    54
     "RepFun(cons(a,B),f) = cons(f(a), RepFun(B,f))"]
0
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    55
3425
fc4ca570d185 Better miniscoping for bounded quantifiers
paulson
parents: 2876
diff changeset
    56
val misc_simps = map prover
fc4ca570d185 Better miniscoping for bounded quantifiers
paulson
parents: 2876
diff changeset
    57
    ["0 Un A = A",  "A Un 0 = A",
fc4ca570d185 Better miniscoping for bounded quantifiers
paulson
parents: 2876
diff changeset
    58
     "0 Int A = 0", "A Int 0 = 0",
fc4ca570d185 Better miniscoping for bounded quantifiers
paulson
parents: 2876
diff changeset
    59
     "0-A = 0",     "A-0 = A",
fc4ca570d185 Better miniscoping for bounded quantifiers
paulson
parents: 2876
diff changeset
    60
     "Union(0) = 0",
fc4ca570d185 Better miniscoping for bounded quantifiers
paulson
parents: 2876
diff changeset
    61
     "Union(cons(b,A)) = b Un Union(A)",
fc4ca570d185 Better miniscoping for bounded quantifiers
paulson
parents: 2876
diff changeset
    62
     "Inter({b}) = b"]
0
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    63
3425
fc4ca570d185 Better miniscoping for bounded quantifiers
paulson
parents: 2876
diff changeset
    64
end;
fc4ca570d185 Better miniscoping for bounded quantifiers
paulson
parents: 2876
diff changeset
    65
9907
473a6604da94 tuned ML code (the_context, bind_thms(s));
wenzelm
parents: 9570
diff changeset
    66
bind_thms ("ball_simps", ball_simps);
473a6604da94 tuned ML code (the_context, bind_thms(s));
wenzelm
parents: 9570
diff changeset
    67
bind_thm ("ball_conj_distrib", ball_conj_distrib);
473a6604da94 tuned ML code (the_context, bind_thms(s));
wenzelm
parents: 9570
diff changeset
    68
bind_thms ("bex_simps", bex_simps);
473a6604da94 tuned ML code (the_context, bind_thms(s));
wenzelm
parents: 9570
diff changeset
    69
bind_thm ("bex_disj_distrib", bex_disj_distrib);
473a6604da94 tuned ML code (the_context, bind_thms(s));
wenzelm
parents: 9570
diff changeset
    70
bind_thms ("Rep_simps", Rep_simps);
473a6604da94 tuned ML code (the_context, bind_thms(s));
wenzelm
parents: 9570
diff changeset
    71
bind_thms ("misc_simps", misc_simps);
473a6604da94 tuned ML code (the_context, bind_thms(s));
wenzelm
parents: 9570
diff changeset
    72
3425
fc4ca570d185 Better miniscoping for bounded quantifiers
paulson
parents: 2876
diff changeset
    73
Addsimps (ball_simps @ bex_simps @ Rep_simps @ misc_simps);
fc4ca570d185 Better miniscoping for bounded quantifiers
paulson
parents: 2876
diff changeset
    74
0
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    75
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    76
(** New version of mk_rew_rules **)
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    77
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    78
(*Should False yield False<->True, or should it solve goals some other way?*)
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    79
1036
0d28f4bc8a44 Recoded function atomize so that new ways of creating
lcp
parents: 855
diff changeset
    80
(*Analyse a theorem to atomic rewrite rules*)
0d28f4bc8a44 Recoded function atomize so that new ways of creating
lcp
parents: 855
diff changeset
    81
fun atomize (conn_pairs, mem_pairs) th = 
0d28f4bc8a44 Recoded function atomize so that new ways of creating
lcp
parents: 855
diff changeset
    82
  let fun tryrules pairs t =
1461
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1036
diff changeset
    83
          case head_of t of
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1036
diff changeset
    84
              Const(a,_) => 
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1036
diff changeset
    85
                (case assoc(pairs,a) of
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1036
diff changeset
    86
                     Some rls => flat (map (atomize (conn_pairs, mem_pairs))
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1036
diff changeset
    87
                                       ([th] RL rls))
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1036
diff changeset
    88
                   | None     => [th])
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1036
diff changeset
    89
            | _ => [th]
1036
0d28f4bc8a44 Recoded function atomize so that new ways of creating
lcp
parents: 855
diff changeset
    90
  in case concl_of th of 
1461
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1036
diff changeset
    91
         Const("Trueprop",_) $ P => 
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1036
diff changeset
    92
            (case P of
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1036
diff changeset
    93
                 Const("op :",_) $ a $ b => tryrules mem_pairs b
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1036
diff changeset
    94
               | Const("True",_)         => []
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1036
diff changeset
    95
               | Const("False",_)        => []
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1036
diff changeset
    96
               | A => tryrules conn_pairs A)
1036
0d28f4bc8a44 Recoded function atomize so that new ways of creating
lcp
parents: 855
diff changeset
    97
       | _                       => [th]
0d28f4bc8a44 Recoded function atomize so that new ways of creating
lcp
parents: 855
diff changeset
    98
  end;
0d28f4bc8a44 Recoded function atomize so that new ways of creating
lcp
parents: 855
diff changeset
    99
0
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
   100
(*Analyse a rigid formula*)
1036
0d28f4bc8a44 Recoded function atomize so that new ways of creating
lcp
parents: 855
diff changeset
   101
val ZF_conn_pairs =
1461
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1036
diff changeset
   102
  [("Ball",     [bspec]), 
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1036
diff changeset
   103
   ("All",      [spec]),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1036
diff changeset
   104
   ("op -->",   [mp]),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1036
diff changeset
   105
   ("op &",     [conjunct1,conjunct2])];
0
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
   106
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
   107
(*Analyse a:b, where b is rigid*)
1036
0d28f4bc8a44 Recoded function atomize so that new ways of creating
lcp
parents: 855
diff changeset
   108
val ZF_mem_pairs = 
1461
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1036
diff changeset
   109
  [("Collect",  [CollectD1,CollectD2]),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1036
diff changeset
   110
   ("op -",     [DiffD1,DiffD2]),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1036
diff changeset
   111
   ("op Int",   [IntD1,IntD2])];
0
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
   112
1036
0d28f4bc8a44 Recoded function atomize so that new ways of creating
lcp
parents: 855
diff changeset
   113
val ZF_atomize = atomize (ZF_conn_pairs, ZF_mem_pairs);
0d28f4bc8a44 Recoded function atomize so that new ways of creating
lcp
parents: 855
diff changeset
   114
5553
ae42b36a50c2 renamed mk_meta_eq to mk_eq
oheimb
parents: 5325
diff changeset
   115
simpset_ref() := simpset() setmksimps (map mk_eq o ZF_atomize o gen_all)
9570
e16e168984e1 installation of cancellation simprocs for the integers
paulson
parents: 7570
diff changeset
   116
                           addcongs [if_weak_cong]
e16e168984e1 installation of cancellation simprocs for the integers
paulson
parents: 7570
diff changeset
   117
		           addsplits [split_if]
7570
a9391550eea1 Mod because of new solver interface.
nipkow
parents: 6153
diff changeset
   118
                           setSolver (mk_solver "types" Type_solver_tac);
2469
b50b8c0eec01 Implicit simpsets and clasets for FOL and ZF
paulson
parents: 1791
diff changeset
   119
11233
34c81a796ee3 the one-point rule for bounded quantifiers
paulson
parents: 9907
diff changeset
   120
(** One-point rule for bounded quantifiers: see HOL/Set.ML **)
34c81a796ee3 the one-point rule for bounded quantifiers
paulson
parents: 9907
diff changeset
   121
34c81a796ee3 the one-point rule for bounded quantifiers
paulson
parents: 9907
diff changeset
   122
Goal "(EX x:A. x=a) <-> (a:A)";
34c81a796ee3 the one-point rule for bounded quantifiers
paulson
parents: 9907
diff changeset
   123
by (Blast_tac 1);
34c81a796ee3 the one-point rule for bounded quantifiers
paulson
parents: 9907
diff changeset
   124
qed "bex_triv_one_point1";
34c81a796ee3 the one-point rule for bounded quantifiers
paulson
parents: 9907
diff changeset
   125
34c81a796ee3 the one-point rule for bounded quantifiers
paulson
parents: 9907
diff changeset
   126
Goal "(EX x:A. a=x) <-> (a:A)";
34c81a796ee3 the one-point rule for bounded quantifiers
paulson
parents: 9907
diff changeset
   127
by (Blast_tac 1);
34c81a796ee3 the one-point rule for bounded quantifiers
paulson
parents: 9907
diff changeset
   128
qed "bex_triv_one_point2";
34c81a796ee3 the one-point rule for bounded quantifiers
paulson
parents: 9907
diff changeset
   129
34c81a796ee3 the one-point rule for bounded quantifiers
paulson
parents: 9907
diff changeset
   130
Goal "(EX x:A. x=a & P(x)) <-> (a:A & P(a))";
34c81a796ee3 the one-point rule for bounded quantifiers
paulson
parents: 9907
diff changeset
   131
by (Blast_tac 1);
34c81a796ee3 the one-point rule for bounded quantifiers
paulson
parents: 9907
diff changeset
   132
qed "bex_one_point1";
34c81a796ee3 the one-point rule for bounded quantifiers
paulson
parents: 9907
diff changeset
   133
34c81a796ee3 the one-point rule for bounded quantifiers
paulson
parents: 9907
diff changeset
   134
Goal "(EX x:A. a=x & P(x)) <-> (a:A & P(a))";
34c81a796ee3 the one-point rule for bounded quantifiers
paulson
parents: 9907
diff changeset
   135
by(Blast_tac 1);
34c81a796ee3 the one-point rule for bounded quantifiers
paulson
parents: 9907
diff changeset
   136
qed "bex_one_point2";
34c81a796ee3 the one-point rule for bounded quantifiers
paulson
parents: 9907
diff changeset
   137
34c81a796ee3 the one-point rule for bounded quantifiers
paulson
parents: 9907
diff changeset
   138
Goal "(ALL x:A. x=a --> P(x)) <-> (a:A --> P(a))";
34c81a796ee3 the one-point rule for bounded quantifiers
paulson
parents: 9907
diff changeset
   139
by (Blast_tac 1);
34c81a796ee3 the one-point rule for bounded quantifiers
paulson
parents: 9907
diff changeset
   140
qed "ball_one_point1";
34c81a796ee3 the one-point rule for bounded quantifiers
paulson
parents: 9907
diff changeset
   141
34c81a796ee3 the one-point rule for bounded quantifiers
paulson
parents: 9907
diff changeset
   142
Goal "(ALL x:A. a=x --> P(x)) <-> (a:A --> P(a))";
34c81a796ee3 the one-point rule for bounded quantifiers
paulson
parents: 9907
diff changeset
   143
by (Blast_tac 1);
34c81a796ee3 the one-point rule for bounded quantifiers
paulson
parents: 9907
diff changeset
   144
qed "ball_one_point2";
34c81a796ee3 the one-point rule for bounded quantifiers
paulson
parents: 9907
diff changeset
   145
34c81a796ee3 the one-point rule for bounded quantifiers
paulson
parents: 9907
diff changeset
   146
Addsimps [bex_triv_one_point1,bex_triv_one_point2,
34c81a796ee3 the one-point rule for bounded quantifiers
paulson
parents: 9907
diff changeset
   147
          bex_one_point1,bex_one_point2,
34c81a796ee3 the one-point rule for bounded quantifiers
paulson
parents: 9907
diff changeset
   148
          ball_one_point1,ball_one_point2];
34c81a796ee3 the one-point rule for bounded quantifiers
paulson
parents: 9907
diff changeset
   149
34c81a796ee3 the one-point rule for bounded quantifiers
paulson
parents: 9907
diff changeset
   150
let
34c81a796ee3 the one-point rule for bounded quantifiers
paulson
parents: 9907
diff changeset
   151
val ex_pattern = Thm.read_cterm (Theory.sign_of (the_context ()))
34c81a796ee3 the one-point rule for bounded quantifiers
paulson
parents: 9907
diff changeset
   152
    ("EX x:A. P(x) & Q(x)",FOLogic.oT)
34c81a796ee3 the one-point rule for bounded quantifiers
paulson
parents: 9907
diff changeset
   153
34c81a796ee3 the one-point rule for bounded quantifiers
paulson
parents: 9907
diff changeset
   154
val prove_bex_tac = rewrite_goals_tac [Bex_def] THEN
34c81a796ee3 the one-point rule for bounded quantifiers
paulson
parents: 9907
diff changeset
   155
                    Quantifier1.prove_one_point_ex_tac;
34c81a796ee3 the one-point rule for bounded quantifiers
paulson
parents: 9907
diff changeset
   156
34c81a796ee3 the one-point rule for bounded quantifiers
paulson
parents: 9907
diff changeset
   157
val rearrange_bex = Quantifier1.rearrange_bex prove_bex_tac;
34c81a796ee3 the one-point rule for bounded quantifiers
paulson
parents: 9907
diff changeset
   158
34c81a796ee3 the one-point rule for bounded quantifiers
paulson
parents: 9907
diff changeset
   159
val all_pattern = Thm.read_cterm (Theory.sign_of (the_context ()))
34c81a796ee3 the one-point rule for bounded quantifiers
paulson
parents: 9907
diff changeset
   160
    ("ALL x:A. P(x) --> Q(x)",FOLogic.oT)
34c81a796ee3 the one-point rule for bounded quantifiers
paulson
parents: 9907
diff changeset
   161
34c81a796ee3 the one-point rule for bounded quantifiers
paulson
parents: 9907
diff changeset
   162
val prove_ball_tac = rewrite_goals_tac [Ball_def] THEN 
34c81a796ee3 the one-point rule for bounded quantifiers
paulson
parents: 9907
diff changeset
   163
                     Quantifier1.prove_one_point_all_tac;
34c81a796ee3 the one-point rule for bounded quantifiers
paulson
parents: 9907
diff changeset
   164
34c81a796ee3 the one-point rule for bounded quantifiers
paulson
parents: 9907
diff changeset
   165
val rearrange_ball = Quantifier1.rearrange_ball prove_ball_tac;
34c81a796ee3 the one-point rule for bounded quantifiers
paulson
parents: 9907
diff changeset
   166
34c81a796ee3 the one-point rule for bounded quantifiers
paulson
parents: 9907
diff changeset
   167
val defBEX_regroup = mk_simproc "defined BEX" [ex_pattern] rearrange_bex;
34c81a796ee3 the one-point rule for bounded quantifiers
paulson
parents: 9907
diff changeset
   168
val defBALL_regroup = mk_simproc "defined BALL" [all_pattern] rearrange_ball;
34c81a796ee3 the one-point rule for bounded quantifiers
paulson
parents: 9907
diff changeset
   169
in
34c81a796ee3 the one-point rule for bounded quantifiers
paulson
parents: 9907
diff changeset
   170
34c81a796ee3 the one-point rule for bounded quantifiers
paulson
parents: 9907
diff changeset
   171
Addsimprocs [defBALL_regroup,defBEX_regroup]
34c81a796ee3 the one-point rule for bounded quantifiers
paulson
parents: 9907
diff changeset
   172
34c81a796ee3 the one-point rule for bounded quantifiers
paulson
parents: 9907
diff changeset
   173
end;
34c81a796ee3 the one-point rule for bounded quantifiers
paulson
parents: 9907
diff changeset
   174
4091
771b1f6422a8 isatool fixclasimp;
wenzelm
parents: 3859
diff changeset
   175
val ZF_ss = simpset();