author wenzelm Fri Nov 10 19:00:22 2000 +0100 (2000-11-10) changeset 10429 8820f787e61e parent 10383 a092ae7bb2a6 child 10906 de95ba2760fe permissions -rw-r--r--
val atomize = thms "atomize'";
```     1 (*  Title:      HOL/cladata.ML
```
```     2     ID:         \$Id\$
```
```     3     Author:     Tobias Nipkow
```
```     4     Copyright   1996  University of Cambridge
```
```     5
```
```     6 Setting up the classical reasoner.
```
```     7 *)
```
```     8
```
```     9
```
```    10 (** Applying HypsubstFun to generate hyp_subst_tac **)
```
```    11 section "Classical Reasoner";
```
```    12
```
```    13 structure Hypsubst_Data =
```
```    14   struct
```
```    15   structure Simplifier = Simplifier
```
```    16   (*Take apart an equality judgement; otherwise raise Match!*)
```
```    17   fun dest_eq (Const("op =",T)  \$ t \$ u) = (t, u, domain_type T)
```
```    18   val dest_Trueprop = HOLogic.dest_Trueprop
```
```    19   val dest_imp = HOLogic.dest_imp
```
```    20   val eq_reflection = eq_reflection
```
```    21   val rev_eq_reflection = def_imp_eq
```
```    22   val imp_intr = impI
```
```    23   val rev_mp = rev_mp
```
```    24   val subst = subst
```
```    25   val sym = sym
```
```    26   val thin_refl = prove_goal (the_context ())
```
```    27 		  "!!X. [|x=x; PROP W|] ==> PROP W" (K [atac 1]);
```
```    28   end;
```
```    29
```
```    30 structure Hypsubst = HypsubstFun(Hypsubst_Data);
```
```    31 open Hypsubst;
```
```    32
```
```    33
```
```    34 (*** Applying Make_Elim_Fun to create a classical "make_elim" rule ***)
```
```    35 structure Make_Elim = Make_Elim_Fun (val classical = classical);
```
```    36
```
```    37 (*we don't redeclare the original make_elim (Tactic.make_elim) for
```
```    38   compatibliity with strange things done in many existing proofs *)
```
```    39 val cla_make_elim = Make_Elim.make_elim;
```
```    40
```
```    41 (*** Applying ClassicalFun to create a classical prover ***)
```
```    42 structure Classical_Data =
```
```    43   struct
```
```    44   val make_elim = cla_make_elim
```
```    45   val mp        = mp
```
```    46   val not_elim  = notE
```
```    47   val classical = classical
```
```    48   val sizef     = size_of_thm
```
```    49   val hyp_subst_tacs=[hyp_subst_tac]
```
```    50   val atomize	= thms "atomize'"
```
```    51   end;
```
```    52
```
```    53 structure Classical = ClassicalFun(Classical_Data);
```
```    54
```
```    55 structure BasicClassical: BASIC_CLASSICAL = Classical;
```
```    56 open BasicClassical;
```
```    57
```
```    58 bind_thm ("contrapos_np", inst "Pa" "?Q" swap);
```
```    59
```
```    60 (*Propositional rules*)
```
```    61 val prop_cs = empty_cs addSIs [refl,TrueI,conjI,disjCI,impI,notI,iffI]
```
```    62                        addSEs [conjE,disjE,impCE,FalseE,iffCE];
```
```    63
```
```    64 (*Quantifier rules*)
```
```    65 val HOL_cs = prop_cs addSIs [allI,ex_ex1I] addIs [exI, some_equality]
```
```    66                      addSEs [exE] addEs [allE];
```
```    67
```
```    68 val clasetup = [fn thy => (claset_ref_of thy := HOL_cs; thy)];
```