src/FOL/ROOT.ML
author lcp
Tue Mar 07 13:15:25 1995 +0100 (1995-03-07)
changeset 928 cb31a4e97f75
parent 731 435ff9ec4058
child 1004 70676af0ac97
permissions -rw-r--r--
Moved declaration of ~= to a syntax section
     1 (*  Title: 	FOL/ROOT
     2     ID:         $Id$
     3     Author: 	Lawrence C Paulson, Cambridge University Computer Laboratory
     4     Copyright   1993  University of Cambridge
     5 
     6 Adds First-Order Logic to a database containing pure Isabelle. 
     7 Should be executed in the subdirectory FOL.
     8 *)
     9 
    10 val banner = "First-Order Logic with Natural Deduction";
    11 
    12 writeln banner;
    13 
    14 init_thy_reader();
    15 
    16 print_depth 1;  
    17 use_thy "FOL";
    18 
    19 use "../Provers/hypsubst.ML";
    20 use "../Provers/classical.ML";
    21 use "../Provers/simplifier.ML";
    22 use "../Provers/splitter.ML";
    23 use "../Provers/ind.ML";
    24 
    25 (*** Applying HypsubstFun to generate hyp_subst_tac ***)
    26 
    27 structure Hypsubst_Data =
    28   struct
    29   (*Take apart an equality judgement; otherwise raise Match!*)
    30   fun dest_eq (Const("Trueprop",_) $ (Const("op =",_)  $ t $ u)) = (t,u);
    31   val imp_intr = impI
    32   val rev_mp = rev_mp
    33   val subst = subst
    34   val sym = sym
    35   end;
    36 
    37 structure Hypsubst = HypsubstFun(Hypsubst_Data);
    38 open Hypsubst;
    39 
    40 use "intprover.ML";
    41 
    42 (*** Applying ClassicalFun to create a classical prover ***)
    43 structure Classical_Data = 
    44   struct
    45   val sizef	= size_of_thm
    46   val mp	= mp
    47   val not_elim	= notE
    48   val classical	= classical
    49   val hyp_subst_tacs=[hyp_subst_tac]
    50   end;
    51 
    52 structure Cla = ClassicalFun(Classical_Data);
    53 open Cla;
    54 
    55 (*Propositional rules 
    56   -- iffCE might seem better, but in the examples in ex/cla
    57      run about 7% slower than with iffE*)
    58 val prop_cs = empty_cs addSIs [refl,TrueI,conjI,disjCI,impI,notI,iffI] 
    59                        addSEs [conjE,disjE,impCE,FalseE,iffE];
    60 
    61 (*Quantifier rules*)
    62 val FOL_cs = prop_cs addSIs [allI] addIs [exI,ex1I] 
    63                      addSEs [exE,ex1E] addEs [allE];
    64 
    65 val ex1_functional = prove_goal FOL.thy
    66     "!!a b c. [| EX! z. P(a,z);  P(a,b);  P(a,c) |] ==> b = c"
    67  (fn _ => [ (deepen_tac FOL_cs 0 1) ]);
    68 
    69 use "simpdata.ML";
    70 
    71 use "../Pure/install_pp.ML";
    72 print_depth 8;
    73 
    74 val FOL_build_completed = ();	(*indicate successful build*)
    75