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 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 |
|
393
|
14 |
init_thy_reader();
|
72
|
15 |
|
0
|
16 |
print_depth 1;
|
97
|
17 |
use_thy "FOL";
|
0
|
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 |
|
97
|
40 |
use "intprover.ML";
|
0
|
41 |
|
|
42 |
(*** Applying ClassicalFun to create a classical prover ***)
|
|
43 |
structure Classical_Data =
|
|
44 |
struct
|
666
|
45 |
val sizef = size_of_thm
|
|
46 |
val mp = mp
|
|
47 |
val not_elim = notE
|
|
48 |
val classical = classical
|
0
|
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 |
|
666
|
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"
|
731
|
67 |
(fn _ => [ (deepen_tac FOL_cs 0 1) ]);
|
0
|
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 |
|