src/HOL/cladata.ML
author paulson
Thu Sep 23 13:06:31 1999 +0200 (1999-09-23)
changeset 7584 5be4bb8e4e3f
parent 7357 d0e16da40ea2
child 8099 6a087be9f6d9
permissions -rw-r--r--
tidied; added lemma restrict_to_left
     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 imp_intr = impI
    22   val rev_mp = rev_mp
    23   val subst = subst
    24   val sym = sym
    25   val thin_refl = prove_goal (the_context ())
    26 		  "!!X. [|x=x; PROP W|] ==> PROP W" (K [atac 1]);
    27   end;
    28 
    29 structure Hypsubst = HypsubstFun(Hypsubst_Data);
    30 open Hypsubst;
    31 
    32 (*** Applying ClassicalFun to create a classical prover ***)
    33 structure Classical_Data = 
    34   struct
    35   val sizef     = size_of_thm
    36   val mp        = mp
    37   val not_elim  = notE
    38   val classical = classical
    39   val hyp_subst_tacs=[hyp_subst_tac]
    40   end;
    41 
    42 structure Classical = ClassicalFun(Classical_Data);
    43 structure BasicClassical: BASIC_CLASSICAL = Classical;
    44 open BasicClassical;
    45 
    46 (*Propositional rules*)
    47 val prop_cs = empty_cs addSIs [refl,TrueI,conjI,disjCI,impI,notI,iffI]
    48                        addSEs [conjE,disjE,impCE,FalseE,iffCE];
    49 
    50 (*Quantifier rules*)
    51 val HOL_cs = prop_cs addSIs [allI,ex_ex1I] addIs [exI, select_equality] 
    52                      addSEs [exE] addEs [allE];
    53 
    54 val clasetup = [fn thy => (claset_ref_of thy := HOL_cs; thy)];