src/FOL/ROOT.ML
author clasohm
Thu Sep 16 12:20:38 1993 +0200 (1993-09-16)
changeset 0 a5a9c433f639
child 72 099d949fe467
permissions -rw-r--r--
Initial revision
clasohm@0
     1
(*  Title: 	FOL/ROOT
clasohm@0
     2
    ID:         $Id$
clasohm@0
     3
    Author: 	Lawrence C Paulson, Cambridge University Computer Laboratory
clasohm@0
     4
    Copyright   1993  University of Cambridge
clasohm@0
     5
clasohm@0
     6
Adds First-Order Logic to a database containing pure Isabelle. 
clasohm@0
     7
Should be executed in the subdirectory FOL.
clasohm@0
     8
*)
clasohm@0
     9
clasohm@0
    10
val banner = "First-Order Logic with Natural Deduction";
clasohm@0
    11
clasohm@0
    12
writeln banner;
clasohm@0
    13
clasohm@0
    14
print_depth 1;  
clasohm@0
    15
use_thy "ifol";
clasohm@0
    16
use_thy "fol";
clasohm@0
    17
clasohm@0
    18
use "../Provers/hypsubst.ML";
clasohm@0
    19
use "../Provers/classical.ML";
clasohm@0
    20
use "../Provers/simplifier.ML";
clasohm@0
    21
use "../Provers/splitter.ML";
clasohm@0
    22
use "../Provers/ind.ML";
clasohm@0
    23
clasohm@0
    24
(*** Applying HypsubstFun to generate hyp_subst_tac ***)
clasohm@0
    25
clasohm@0
    26
structure Hypsubst_Data =
clasohm@0
    27
  struct
clasohm@0
    28
  (*Take apart an equality judgement; otherwise raise Match!*)
clasohm@0
    29
  fun dest_eq (Const("Trueprop",_) $ (Const("op =",_)  $ t $ u)) = (t,u);
clasohm@0
    30
clasohm@0
    31
  val imp_intr = impI
clasohm@0
    32
clasohm@0
    33
  (*etac rev_cut_eq moves an equality to be the last premise. *)
clasohm@0
    34
  val rev_cut_eq = prove_goal IFOL.thy "[| a=b;  a=b ==> R |] ==> R"
clasohm@0
    35
   (fn prems => [ REPEAT(resolve_tac prems 1) ]);
clasohm@0
    36
clasohm@0
    37
  val rev_mp = rev_mp
clasohm@0
    38
  val subst = subst
clasohm@0
    39
  val sym = sym
clasohm@0
    40
  end;
clasohm@0
    41
clasohm@0
    42
structure Hypsubst = HypsubstFun(Hypsubst_Data);
clasohm@0
    43
open Hypsubst;
clasohm@0
    44
clasohm@0
    45
use "int-prover.ML";
clasohm@0
    46
clasohm@0
    47
(*** Applying ClassicalFun to create a classical prover ***)
clasohm@0
    48
structure Classical_Data = 
clasohm@0
    49
  struct
clasohm@0
    50
  val sizef = size_of_thm
clasohm@0
    51
  val mp = mp
clasohm@0
    52
  val not_elim = notE
clasohm@0
    53
  val swap = swap
clasohm@0
    54
  val hyp_subst_tacs=[hyp_subst_tac]
clasohm@0
    55
  end;
clasohm@0
    56
clasohm@0
    57
structure Cla = ClassicalFun(Classical_Data);
clasohm@0
    58
open Cla;
clasohm@0
    59
clasohm@0
    60
(*Propositional rules 
clasohm@0
    61
  -- iffCE might seem better, but in the examples in ex/cla
clasohm@0
    62
     run about 7% slower than with iffE*)
clasohm@0
    63
val prop_cs = empty_cs addSIs [refl,TrueI,conjI,disjCI,impI,notI,iffI] 
clasohm@0
    64
                       addSEs [conjE,disjE,impCE,FalseE,iffE];
clasohm@0
    65
clasohm@0
    66
(*Quantifier rules*)
clasohm@0
    67
val FOL_cs = prop_cs addSIs [allI] addIs [exI,ex1I] 
clasohm@0
    68
                     addSEs [exE,ex1E] addEs [allE];
clasohm@0
    69
clasohm@0
    70
val FOL_dup_cs = prop_cs addSIs [allI] addIs [exCI,ex1I] 
clasohm@0
    71
                         addSEs [exE,ex1E] addEs [all_dupE];
clasohm@0
    72
clasohm@0
    73
use "simpdata.ML";
clasohm@0
    74
clasohm@0
    75
use "../Pure/install_pp.ML";
clasohm@0
    76
print_depth 8;
clasohm@0
    77
clasohm@0
    78
val FOL_build_completed = ();	(*indicate successful build*)
clasohm@0
    79