src/FOL/cladata.ML
author paulson
Fri, 05 Oct 2007 09:59:03 +0200
changeset 24854 0ebcd575d3c6
parent 22127 025dfa637f78
child 26287 df8e5362cff9
permissions -rw-r--r--
filtering out some package theorems
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
2469
b50b8c0eec01 Implicit simpsets and clasets for FOL and ZF
paulson
parents:
diff changeset
     1
(*  Title:      FOL/cladata.ML
b50b8c0eec01 Implicit simpsets and clasets for FOL and ZF
paulson
parents:
diff changeset
     2
    ID:         $Id$
b50b8c0eec01 Implicit simpsets and clasets for FOL and ZF
paulson
parents:
diff changeset
     3
    Author:     Tobias Nipkow
b50b8c0eec01 Implicit simpsets and clasets for FOL and ZF
paulson
parents:
diff changeset
     4
    Copyright   1996  University of Cambridge
b50b8c0eec01 Implicit simpsets and clasets for FOL and ZF
paulson
parents:
diff changeset
     5
7355
4c43090659ca proper bootstrap of IFOL/FOL theories and packages;
wenzelm
parents: 7156
diff changeset
     6
Setting up the classical reasoner.
2469
b50b8c0eec01 Implicit simpsets and clasets for FOL and ZF
paulson
parents:
diff changeset
     7
*)
b50b8c0eec01 Implicit simpsets and clasets for FOL and ZF
paulson
parents:
diff changeset
     8
b50b8c0eec01 Implicit simpsets and clasets for FOL and ZF
paulson
parents:
diff changeset
     9
section "Classical Reasoner";
b50b8c0eec01 Implicit simpsets and clasets for FOL and ZF
paulson
parents:
diff changeset
    10
b50b8c0eec01 Implicit simpsets and clasets for FOL and ZF
paulson
parents:
diff changeset
    11
(*** Applying ClassicalFun to create a classical prover ***)
b50b8c0eec01 Implicit simpsets and clasets for FOL and ZF
paulson
parents:
diff changeset
    12
structure Classical_Data = 
b50b8c0eec01 Implicit simpsets and clasets for FOL and ZF
paulson
parents:
diff changeset
    13
  struct
b50b8c0eec01 Implicit simpsets and clasets for FOL and ZF
paulson
parents:
diff changeset
    14
  val mp        = mp
b50b8c0eec01 Implicit simpsets and clasets for FOL and ZF
paulson
parents:
diff changeset
    15
  val not_elim  = notE
21539
c5cf9243ad62 converted legacy ML scripts;
wenzelm
parents: 18708
diff changeset
    16
  val classical = thm "classical"
9158
084abf3d0eff declaring and using cla_make_elim
paulson
parents: 8099
diff changeset
    17
  val sizef     = size_of_thm
2469
b50b8c0eec01 Implicit simpsets and clasets for FOL and ZF
paulson
parents:
diff changeset
    18
  val hyp_subst_tacs=[hyp_subst_tac]
b50b8c0eec01 Implicit simpsets and clasets for FOL and ZF
paulson
parents:
diff changeset
    19
  end;
b50b8c0eec01 Implicit simpsets and clasets for FOL and ZF
paulson
parents:
diff changeset
    20
b50b8c0eec01 Implicit simpsets and clasets for FOL and ZF
paulson
parents:
diff changeset
    21
structure Cla = ClassicalFun(Classical_Data);
8099
6a087be9f6d9 ObtainFun;
wenzelm
parents: 7355
diff changeset
    22
structure BasicClassical: BASIC_CLASSICAL = Cla; open BasicClassical;
2469
b50b8c0eec01 Implicit simpsets and clasets for FOL and ZF
paulson
parents:
diff changeset
    23
22127
025dfa637f78 added @{claset};
wenzelm
parents: 21539
diff changeset
    24
ML_Context.value_antiq "claset"
025dfa637f78 added @{claset};
wenzelm
parents: 21539
diff changeset
    25
  (Scan.succeed ("claset", "Cla.local_claset_of (ML_Context.the_local_context ())"));
7355
4c43090659ca proper bootstrap of IFOL/FOL theories and packages;
wenzelm
parents: 7156
diff changeset
    26
2844
05d78159812d Now uses the alternative (safe!) rules for ex1
paulson
parents: 2469
diff changeset
    27
4305
03d7de40ee4f The change from iffE to iffCE means fewer case splits in most cases. Very few
paulson
parents: 4095
diff changeset
    28
(*Propositional rules*)
21539
c5cf9243ad62 converted legacy ML scripts;
wenzelm
parents: 18708
diff changeset
    29
val prop_cs = empty_cs
c5cf9243ad62 converted legacy ML scripts;
wenzelm
parents: 18708
diff changeset
    30
  addSIs [refl, TrueI, conjI, thm "disjCI", impI, notI, iffI]
c5cf9243ad62 converted legacy ML scripts;
wenzelm
parents: 18708
diff changeset
    31
  addSEs [conjE, disjE, thm "impCE", FalseE, thm "iffCE"];
2469
b50b8c0eec01 Implicit simpsets and clasets for FOL and ZF
paulson
parents:
diff changeset
    32
b50b8c0eec01 Implicit simpsets and clasets for FOL and ZF
paulson
parents:
diff changeset
    33
(*Quantifier rules*)
21539
c5cf9243ad62 converted legacy ML scripts;
wenzelm
parents: 18708
diff changeset
    34
val FOL_cs = prop_cs addSIs [allI, thm "ex_ex1I"] addIs [exI]
c5cf9243ad62 converted legacy ML scripts;
wenzelm
parents: 18708
diff changeset
    35
                     addSEs [exE, thm "alt_ex1E"] addEs [allE];
2469
b50b8c0eec01 Implicit simpsets and clasets for FOL and ZF
paulson
parents:
diff changeset
    36
18708
4b3dadb4fe33 setup: theory -> theory;
wenzelm
parents: 18529
diff changeset
    37
val cla_setup = (fn thy => (change_claset_of thy (fn _ => FOL_cs); thy));
14156
2072802ab0e3 new case_tac method
paulson
parents: 13034
diff changeset
    38
2072802ab0e3 new case_tac method
paulson
parents: 13034
diff changeset
    39
val case_setup =
18708
4b3dadb4fe33 setup: theory -> theory;
wenzelm
parents: 18529
diff changeset
    40
 (Method.add_methods
14156
2072802ab0e3 new case_tac method
paulson
parents: 13034
diff changeset
    41
    [("case_tac", Method.goal_args Args.name case_tac,
18708
4b3dadb4fe33 setup: theory -> theory;
wenzelm
parents: 18529
diff changeset
    42
      "case_tac emulation (dynamic instantiation!)")]);