0

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 FirstOrder Logic to a database containing pure Isabelle.


7 
Should be executed in the subdirectory FOL.


8 
*)


9 


10 
val banner = "FirstOrder Logic with Natural Deduction";


11 


12 
writeln banner;


13 

393

14 
init_thy_reader();

72

15 

0

16 
print_depth 1;

97

17 
use_thy "FOL";

0

18 


19 
use "../Provers/simplifier.ML";


20 
use "../Provers/splitter.ML";


21 
use "../Provers/ind.ML";

1004

22 
use "../Provers/hypsubst.ML";


23 
use "../Provers/classical.ML";

0

24 


25 
(*** Applying HypsubstFun to generate hyp_subst_tac ***)


26 


27 
structure Hypsubst_Data =


28 
struct

1004

29 
structure Simplifier = Simplifier


30 
(*Take apart an equality judgement; otherwise raise Match!*)


31 
fun dest_eq (Const("Trueprop",_) $ (Const("op =",_) $ t $ u)) = (t,u)


32 
val eq_reflection = eq_reflection

0

33 
val imp_intr = impI


34 
val rev_mp = rev_mp


35 
val subst = subst


36 
val sym = sym


37 
end;


38 


39 
structure Hypsubst = HypsubstFun(Hypsubst_Data);


40 
open Hypsubst;


41 

97

42 
use "intprover.ML";

0

43 


44 
(*** Applying ClassicalFun to create a classical prover ***)


45 
structure Classical_Data =


46 
struct

666

47 
val sizef = size_of_thm


48 
val mp = mp


49 
val not_elim = notE


50 
val classical = classical

0

51 
val hyp_subst_tacs=[hyp_subst_tac]


52 
end;


53 


54 
structure Cla = ClassicalFun(Classical_Data);


55 
open Cla;


56 


57 
(*Propositional rules


58 
 iffCE might seem better, but in the examples in ex/cla


59 
run about 7% slower than with iffE*)


60 
val prop_cs = empty_cs addSIs [refl,TrueI,conjI,disjCI,impI,notI,iffI]


61 
addSEs [conjE,disjE,impCE,FalseE,iffE];


62 


63 
(*Quantifier rules*)


64 
val FOL_cs = prop_cs addSIs [allI] addIs [exI,ex1I]


65 
addSEs [exE,ex1E] addEs [allE];


66 

666

67 
val ex1_functional = prove_goal FOL.thy


68 
"!!a b c. [ EX! z. P(a,z); P(a,b); P(a,c) ] ==> b = c"

731

69 
(fn _ => [ (deepen_tac FOL_cs 0 1) ]);

0

70 


71 
use "simpdata.ML";


72 


73 
use "../Pure/install_pp.ML";


74 
print_depth 8;


75 


76 
val FOL_build_completed = (); (*indicate successful build*)


77 
