src/FOL/cladata.ML
author wenzelm
Sun Jul 30 13:01:50 2000 +0200 (2000-07-30)
changeset 9472 b63b21f370ca
parent 9158 084abf3d0eff
child 9846 bb848beb53f6
permissions -rw-r--r--
updated ObtainFun;
     1 (*  Title:      FOL/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 section "Classical Reasoner";
    10 
    11 (*** Applying Make_Elim_Fun to create a classical "make_elim" rule ***)
    12 structure Make_Elim_Data =
    13 struct
    14   val classical = classical
    15 end;
    16 
    17 structure Make_Elim = Make_Elim_Fun (Make_Elim_Data);
    18 
    19 (*we don't redeclare the original make_elim (Tactic.make_elim) for 
    20   compatibliity with strange things done in many existing proofs *)
    21 val cla_make_elim = Make_Elim.make_elim;
    22 
    23 (*** Applying ClassicalFun to create a classical prover ***)
    24 structure Classical_Data = 
    25   struct
    26   val make_elim = cla_make_elim
    27   val mp        = mp
    28   val not_elim  = notE
    29   val classical = classical
    30   val sizef     = size_of_thm
    31   val hyp_subst_tacs=[hyp_subst_tac]
    32   end;
    33 
    34 structure Cla = ClassicalFun(Classical_Data);
    35 structure BasicClassical: BASIC_CLASSICAL = Cla; open BasicClassical;
    36 structure Obtain = ObtainFun(val atomic_thesis = FOLogic.atomic_Trueprop and
    37   that_atts = [Simplifier.simp_add_local, Cla.haz_intro_local]);
    38 
    39 
    40 (*Better for fast_tac: needs no quantifier duplication!*)
    41 qed_goal "alt_ex1E" IFOL.thy
    42     "[| EX! x. P(x);                                              \
    43 \       !!x. [| P(x);  ALL y y'. P(y) & P(y') --> y=y' |] ==> R  \
    44 \    |] ==> R"
    45  (fn major::prems =>
    46   [ (rtac (major RS ex1E) 1),
    47     (REPEAT (ares_tac (allI::prems) 1)),
    48     (etac (dup_elim allE) 1),
    49     (IntPr.fast_tac 1)]);
    50 
    51 
    52 (*Propositional rules*)
    53 val prop_cs = empty_cs addSIs [refl,TrueI,conjI,disjCI,impI,notI,iffI] 
    54                        addSEs [conjE,disjE,impCE,FalseE,iffCE];
    55 
    56 (*Quantifier rules*)
    57 val FOL_cs = prop_cs addSIs [allI,ex_ex1I] addIs [exI] 
    58                      addSEs [exE,alt_ex1E] addEs [allE];
    59 
    60 val clasetup = [fn thy => (claset_ref_of thy := FOL_cs; thy)];