src/FOL/cladata.ML
author wenzelm
Mon, 05 May 2008 15:23:59 +0200
changeset 26783 1651ff6a34b5
parent 26496 49ae9456eba9
child 27211 6724f31a1c8e
permissions -rw-r--r--
added isasymIN/STRUCTURE;
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 = 
26411
cd74690f3bfb pass imp_elim, swap to classical prover;
wenzelm
parents: 26287
diff changeset
    13
struct
cd74690f3bfb pass imp_elim, swap to classical prover;
wenzelm
parents: 26287
diff changeset
    14
  val imp_elim  = @{thm imp_elim}
26287
df8e5362cff9 proper antiquotations;
wenzelm
parents: 22127
diff changeset
    15
  val not_elim  = @{thm notE}
26411
cd74690f3bfb pass imp_elim, swap to classical prover;
wenzelm
parents: 26287
diff changeset
    16
  val swap      = @{thm swap}
26287
df8e5362cff9 proper antiquotations;
wenzelm
parents: 22127
diff changeset
    17
  val classical = @{thm classical}
9158
084abf3d0eff declaring and using cla_make_elim
paulson
parents: 8099
diff changeset
    18
  val sizef     = size_of_thm
2469
b50b8c0eec01 Implicit simpsets and clasets for FOL and ZF
paulson
parents:
diff changeset
    19
  val hyp_subst_tacs=[hyp_subst_tac]
26411
cd74690f3bfb pass imp_elim, swap to classical prover;
wenzelm
parents: 26287
diff changeset
    20
end;
2469
b50b8c0eec01 Implicit simpsets and clasets for FOL and ZF
paulson
parents:
diff changeset
    21
b50b8c0eec01 Implicit simpsets and clasets for FOL and ZF
paulson
parents:
diff changeset
    22
structure Cla = ClassicalFun(Classical_Data);
8099
6a087be9f6d9 ObtainFun;
wenzelm
parents: 7355
diff changeset
    23
structure BasicClassical: BASIC_CLASSICAL = Cla; open BasicClassical;
2469
b50b8c0eec01 Implicit simpsets and clasets for FOL and ZF
paulson
parents:
diff changeset
    24
22127
025dfa637f78 added @{claset};
wenzelm
parents: 21539
diff changeset
    25
ML_Context.value_antiq "claset"
025dfa637f78 added @{claset};
wenzelm
parents: 21539
diff changeset
    26
  (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
    27
2844
05d78159812d Now uses the alternative (safe!) rules for ex1
paulson
parents: 2469
diff changeset
    28
4305
03d7de40ee4f The change from iffE to iffCE means fewer case splits in most cases. Very few
paulson
parents: 4095
diff changeset
    29
(*Propositional rules*)
21539
c5cf9243ad62 converted legacy ML scripts;
wenzelm
parents: 18708
diff changeset
    30
val prop_cs = empty_cs
26287
df8e5362cff9 proper antiquotations;
wenzelm
parents: 22127
diff changeset
    31
  addSIs [@{thm refl}, @{thm TrueI}, @{thm conjI}, @{thm disjCI}, @{thm impI},
df8e5362cff9 proper antiquotations;
wenzelm
parents: 22127
diff changeset
    32
    @{thm notI}, @{thm iffI}]
df8e5362cff9 proper antiquotations;
wenzelm
parents: 22127
diff changeset
    33
  addSEs [@{thm conjE}, @{thm disjE}, @{thm impCE}, @{thm FalseE}, @{thm iffCE}];
2469
b50b8c0eec01 Implicit simpsets and clasets for FOL and ZF
paulson
parents:
diff changeset
    34
b50b8c0eec01 Implicit simpsets and clasets for FOL and ZF
paulson
parents:
diff changeset
    35
(*Quantifier rules*)
26287
df8e5362cff9 proper antiquotations;
wenzelm
parents: 22127
diff changeset
    36
val FOL_cs = prop_cs addSIs [@{thm allI}, @{thm ex_ex1I}] addIs [@{thm exI}]
df8e5362cff9 proper antiquotations;
wenzelm
parents: 22127
diff changeset
    37
                     addSEs [@{thm exE}, @{thm alt_ex1E}] addEs [@{thm allE}];
2469
b50b8c0eec01 Implicit simpsets and clasets for FOL and ZF
paulson
parents:
diff changeset
    38
26496
49ae9456eba9 purely functional setup of claset/simpset/clasimpset;
wenzelm
parents: 26411
diff changeset
    39
val cla_setup = Cla.map_claset (K FOL_cs);
14156
2072802ab0e3 new case_tac method
paulson
parents: 13034
diff changeset
    40
2072802ab0e3 new case_tac method
paulson
parents: 13034
diff changeset
    41
val case_setup =
18708
4b3dadb4fe33 setup: theory -> theory;
wenzelm
parents: 18529
diff changeset
    42
 (Method.add_methods
14156
2072802ab0e3 new case_tac method
paulson
parents: 13034
diff changeset
    43
    [("case_tac", Method.goal_args Args.name case_tac,
18708
4b3dadb4fe33 setup: theory -> theory;
wenzelm
parents: 18529
diff changeset
    44
      "case_tac emulation (dynamic instantiation!)")]);