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
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
wenzelm@393
    14
init_thy_reader();
clasohm@72
    15
clasohm@0
    16
print_depth 1;  
clasohm@97
    17
use_thy "FOL";
clasohm@0
    18
clasohm@0
    19
use "../Provers/hypsubst.ML";
clasohm@0
    20
use "../Provers/classical.ML";
clasohm@0
    21
use "../Provers/simplifier.ML";
clasohm@0
    22
use "../Provers/splitter.ML";
clasohm@0
    23
use "../Provers/ind.ML";
clasohm@0
    24
clasohm@0
    25
(*** Applying HypsubstFun to generate hyp_subst_tac ***)
clasohm@0
    26
clasohm@0
    27
structure Hypsubst_Data =
clasohm@0
    28
  struct
clasohm@0
    29
  (*Take apart an equality judgement; otherwise raise Match!*)
clasohm@0
    30
  fun dest_eq (Const("Trueprop",_) $ (Const("op =",_)  $ t $ u)) = (t,u);
clasohm@0
    31
  val imp_intr = impI
clasohm@0
    32
  val rev_mp = rev_mp
clasohm@0
    33
  val subst = subst
clasohm@0
    34
  val sym = sym
clasohm@0
    35
  end;
clasohm@0
    36
clasohm@0
    37
structure Hypsubst = HypsubstFun(Hypsubst_Data);
clasohm@0
    38
open Hypsubst;
clasohm@0
    39
clasohm@97
    40
use "intprover.ML";
clasohm@0
    41
clasohm@0
    42
(*** Applying ClassicalFun to create a classical prover ***)
clasohm@0
    43
structure Classical_Data = 
clasohm@0
    44
  struct
lcp@666
    45
  val sizef	= size_of_thm
lcp@666
    46
  val mp	= mp
lcp@666
    47
  val not_elim	= notE
lcp@666
    48
  val classical	= classical
clasohm@0
    49
  val hyp_subst_tacs=[hyp_subst_tac]
clasohm@0
    50
  end;
clasohm@0
    51
clasohm@0
    52
structure Cla = ClassicalFun(Classical_Data);
clasohm@0
    53
open Cla;
clasohm@0
    54
clasohm@0
    55
(*Propositional rules 
clasohm@0
    56
  -- iffCE might seem better, but in the examples in ex/cla
clasohm@0
    57
     run about 7% slower than with iffE*)
clasohm@0
    58
val prop_cs = empty_cs addSIs [refl,TrueI,conjI,disjCI,impI,notI,iffI] 
clasohm@0
    59
                       addSEs [conjE,disjE,impCE,FalseE,iffE];
clasohm@0
    60
clasohm@0
    61
(*Quantifier rules*)
clasohm@0
    62
val FOL_cs = prop_cs addSIs [allI] addIs [exI,ex1I] 
clasohm@0
    63
                     addSEs [exE,ex1E] addEs [allE];
clasohm@0
    64
lcp@666
    65
val ex1_functional = prove_goal FOL.thy
lcp@666
    66
    "!!a b c. [| EX! z. P(a,z);  P(a,b);  P(a,c) |] ==> b = c"
lcp@731
    67
 (fn _ => [ (deepen_tac FOL_cs 0 1) ]);
clasohm@0
    68
clasohm@0
    69
use "simpdata.ML";
clasohm@0
    70
clasohm@0
    71
use "../Pure/install_pp.ML";
clasohm@0
    72
print_depth 8;
clasohm@0
    73
clasohm@0
    74
val FOL_build_completed = ();	(*indicate successful build*)
clasohm@0
    75