src/HOL/cladata.ML
author wenzelm
Wed Aug 25 20:49:02 1999 +0200 (1999-08-25)
changeset 7357 d0e16da40ea2
parent 7153 820c8c8573d9
child 8099 6a087be9f6d9
permissions -rw-r--r--
proper bootstrap of HOL theory and packages;
paulson@1985
     1
(*  Title:      HOL/cladata.ML
paulson@1985
     2
    ID:         $Id$
paulson@1985
     3
    Author:     Tobias Nipkow
paulson@1985
     4
    Copyright   1996  University of Cambridge
paulson@1985
     5
wenzelm@4085
     6
Setting up the classical reasoner.
paulson@1985
     7
*)
paulson@1985
     8
paulson@1985
     9
paulson@1985
    10
(** Applying HypsubstFun to generate hyp_subst_tac **)
paulson@1985
    11
section "Classical Reasoner";
paulson@1985
    12
paulson@1985
    13
structure Hypsubst_Data =
paulson@1985
    14
  struct
paulson@1985
    15
  structure Simplifier = Simplifier
paulson@1985
    16
  (*Take apart an equality judgement; otherwise raise Match!*)
paulson@4466
    17
  fun dest_eq (Const("op =",T)  $ t $ u) = (t, u, domain_type T)
paulson@4466
    18
  val dest_Trueprop = HOLogic.dest_Trueprop
paulson@4466
    19
  val dest_imp = HOLogic.dest_imp
paulson@1985
    20
  val eq_reflection = eq_reflection
paulson@1985
    21
  val imp_intr = impI
paulson@1985
    22
  val rev_mp = rev_mp
paulson@1985
    23
  val subst = subst
paulson@1985
    24
  val sym = sym
wenzelm@7357
    25
  val thin_refl = prove_goal (the_context ())
oheimb@4223
    26
		  "!!X. [|x=x; PROP W|] ==> PROP W" (K [atac 1]);
paulson@1985
    27
  end;
paulson@1985
    28
paulson@1985
    29
structure Hypsubst = HypsubstFun(Hypsubst_Data);
paulson@1985
    30
open Hypsubst;
paulson@1985
    31
paulson@1985
    32
(*** Applying ClassicalFun to create a classical prover ***)
paulson@1985
    33
structure Classical_Data = 
paulson@1985
    34
  struct
paulson@1985
    35
  val sizef     = size_of_thm
paulson@1985
    36
  val mp        = mp
paulson@1985
    37
  val not_elim  = notE
paulson@1985
    38
  val classical = classical
oheimb@4206
    39
  val hyp_subst_tacs=[hyp_subst_tac]
paulson@1985
    40
  end;
paulson@1985
    41
paulson@1985
    42
structure Classical = ClassicalFun(Classical_Data);
wenzelm@7357
    43
structure BasicClassical: BASIC_CLASSICAL = Classical;
wenzelm@7357
    44
open BasicClassical;
paulson@1985
    45
paulson@1985
    46
(*Propositional rules*)
paulson@1985
    47
val prop_cs = empty_cs addSIs [refl,TrueI,conjI,disjCI,impI,notI,iffI]
paulson@4305
    48
                       addSEs [conjE,disjE,impCE,FalseE,iffCE];
paulson@1985
    49
paulson@1985
    50
(*Quantifier rules*)
oheimb@4535
    51
val HOL_cs = prop_cs addSIs [allI,ex_ex1I] addIs [exI, select_equality] 
paulson@3004
    52
                     addSEs [exE] addEs [allE];
paulson@1985
    53
wenzelm@7357
    54
val clasetup = [fn thy => (claset_ref_of thy := HOL_cs; thy)];