src/FOL/cladata.ML
author wenzelm
Thu Jan 19 21:22:08 2006 +0100 (2006-01-19 ago)
changeset 18708 4b3dadb4fe33
parent 18529 540da2415751
child 21539 c5cf9243ad62
permissions -rw-r--r--
setup: theory -> theory;
paulson@2469
     1
(*  Title:      FOL/cladata.ML
paulson@2469
     2
    ID:         $Id$
paulson@2469
     3
    Author:     Tobias Nipkow
paulson@2469
     4
    Copyright   1996  University of Cambridge
paulson@2469
     5
wenzelm@7355
     6
Setting up the classical reasoner.
paulson@2469
     7
*)
paulson@2469
     8
paulson@2469
     9
section "Classical Reasoner";
paulson@2469
    10
paulson@2469
    11
(*** Applying ClassicalFun to create a classical prover ***)
paulson@2469
    12
structure Classical_Data = 
paulson@2469
    13
  struct
paulson@2469
    14
  val mp        = mp
paulson@2469
    15
  val not_elim  = notE
paulson@2469
    16
  val classical = classical
paulson@9158
    17
  val sizef     = size_of_thm
paulson@2469
    18
  val hyp_subst_tacs=[hyp_subst_tac]
paulson@2469
    19
  end;
paulson@2469
    20
paulson@2469
    21
structure Cla = ClassicalFun(Classical_Data);
wenzelm@8099
    22
structure BasicClassical: BASIC_CLASSICAL = Cla; open BasicClassical;
paulson@2469
    23
wenzelm@7355
    24
paulson@2844
    25
(*Better for fast_tac: needs no quantifier duplication!*)
paulson@2844
    26
qed_goal "alt_ex1E" IFOL.thy
wenzelm@3835
    27
    "[| EX! x. P(x);                                              \
paulson@2844
    28
\       !!x. [| P(x);  ALL y y'. P(y) & P(y') --> y=y' |] ==> R  \
paulson@2844
    29
\    |] ==> R"
paulson@2844
    30
 (fn major::prems =>
paulson@2844
    31
  [ (rtac (major RS ex1E) 1),
paulson@2844
    32
    (REPEAT (ares_tac (allI::prems) 1)),
paulson@2844
    33
    (etac (dup_elim allE) 1),
paulson@2844
    34
    (IntPr.fast_tac 1)]);
paulson@2844
    35
paulson@2844
    36
paulson@4305
    37
(*Propositional rules*)
paulson@2469
    38
val prop_cs = empty_cs addSIs [refl,TrueI,conjI,disjCI,impI,notI,iffI] 
paulson@4305
    39
                       addSEs [conjE,disjE,impCE,FalseE,iffCE];
paulson@2469
    40
paulson@2469
    41
(*Quantifier rules*)
paulson@2844
    42
val FOL_cs = prop_cs addSIs [allI,ex_ex1I] addIs [exI] 
paulson@2844
    43
                     addSEs [exE,alt_ex1E] addEs [allE];
paulson@2469
    44
wenzelm@18708
    45
val cla_setup = (fn thy => (change_claset_of thy (fn _ => FOL_cs); thy));
paulson@14156
    46
paulson@14156
    47
val case_setup =
wenzelm@18708
    48
 (Method.add_methods
paulson@14156
    49
    [("case_tac", Method.goal_args Args.name case_tac,
wenzelm@18708
    50
      "case_tac emulation (dynamic instantiation!)")]);