author oheimb Wed Jan 31 10:15:55 2001 +0100 (2001-01-31) changeset 11008 f7333f055ef6 parent 10906 de95ba2760fe child 11440 e389e4338604 permissions -rw-r--r--
improved theory reference in comment
```     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 val atomize_rules = thms "atomize'";
```
```    42 val atomize_tac = Method.atomize_tac atomize_rules;
```
```    43 val atomize_strip_tac = Method.atomize_strip_tac (atomize_rules, [impI, allI]);
```
```    44
```
```    45 (*** Applying ClassicalFun to create a classical prover ***)
```
```    46 structure Classical_Data =
```
```    47   struct
```
```    48   val make_elim = cla_make_elim
```
```    49   val mp        = mp
```
```    50   val not_elim  = notE
```
```    51   val classical = classical
```
```    52   val sizef     = size_of_thm
```
```    53   val hyp_subst_tacs=[hyp_subst_tac]
```
```    54   val atomize	= atomize_rules
```
```    55   end;
```
```    56
```
```    57 structure Classical = ClassicalFun(Classical_Data);
```
```    58
```
```    59 structure BasicClassical: BASIC_CLASSICAL = Classical;
```
```    60 open BasicClassical;
```
```    61
```
```    62 bind_thm ("contrapos_np", inst "Pa" "?Q" swap);
```
```    63
```
```    64 (*Propositional rules*)
```
```    65 val prop_cs = empty_cs addSIs [refl,TrueI,conjI,disjCI,impI,notI,iffI]
```
```    66                        addSEs [conjE,disjE,impCE,FalseE,iffCE];
```
```    67
```
```    68 (*Quantifier rules*)
```
```    69 val HOL_cs = prop_cs addSIs [allI,ex_ex1I] addIs [exI, some_equality]
```
```    70                      addSEs [exE] addEs [allE];
```
```    71
```
```    72 val clasetup = [fn thy => (claset_ref_of thy := HOL_cs; thy)];
```