163
|
1 |
(* Title: HOL/ROOT.ML
|
0
|
2 |
ID: $Id$
|
163
|
3 |
Author: Tobias Nipkow
|
0
|
4 |
Copyright 1993 University of Cambridge
|
|
5 |
|
163
|
6 |
Adds Classical Higher-order Logic to a database containing Pure Isabelle.
|
0
|
7 |
Should be executed in the subdirectory HOL.
|
|
8 |
*)
|
|
9 |
|
|
10 |
val banner = "Higher-Order Logic";
|
|
11 |
writeln banner;
|
|
12 |
|
163
|
13 |
print_depth 1;
|
|
14 |
set eta_contract;
|
10
|
15 |
|
163
|
16 |
(* Add user sections *)
|
|
17 |
use "../Pure/section_utils.ML";
|
|
18 |
use "thy_syntax.ML";
|
|
19 |
|
17
|
20 |
use_thy "HOL";
|
0
|
21 |
use "../Provers/hypsubst.ML";
|
|
22 |
use "../Provers/classical.ML";
|
|
23 |
use "../Provers/simplifier.ML";
|
|
24 |
use "../Provers/splitter.ML";
|
|
25 |
use "../Provers/ind.ML";
|
|
26 |
|
|
27 |
(** Applying HypsubstFun to generate hyp_subst_tac **)
|
|
28 |
|
|
29 |
structure Hypsubst_Data =
|
|
30 |
struct
|
|
31 |
(*Take apart an equality judgement; otherwise raise Match!*)
|
|
32 |
fun dest_eq (Const("Trueprop",_) $ (Const("op =",_) $ t $ u)) = (t,u);
|
|
33 |
val imp_intr = impI
|
|
34 |
val rev_mp = rev_mp
|
163
|
35 |
val subst = subst
|
0
|
36 |
val sym = sym
|
|
37 |
end;
|
|
38 |
|
|
39 |
structure Hypsubst = HypsubstFun(Hypsubst_Data);
|
|
40 |
open Hypsubst;
|
|
41 |
|
166
|
42 |
(*** Applying ClassicalFun to create a classical prover ***)
|
|
43 |
structure Classical_Data =
|
0
|
44 |
struct
|
166
|
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 Classical = ClassicalFun(Classical_Data);
|
|
53 |
open Classical;
|
|
54 |
|
|
55 |
(*Propositional rules*)
|
|
56 |
val prop_cs = empty_cs addSIs [refl,TrueI,conjI,disjCI,impI,notI,iffI]
|
|
57 |
addSEs [conjE,disjE,impCE,FalseE,iffE];
|
|
58 |
|
|
59 |
(*Quantifier rules*)
|
163
|
60 |
val HOL_cs = prop_cs addSIs [allI] addIs [exI,ex1I]
|
0
|
61 |
addSEs [exE,ex1E] addEs [allE];
|
|
62 |
|
|
63 |
structure HOL_Induction = InductionFun(struct val spec=spec end);
|
|
64 |
open HOL_Induction;
|
|
65 |
|
|
66 |
use "simpdata.ML";
|
17
|
67 |
use_thy "Ord";
|
119
|
68 |
use_thy "subset";
|
|
69 |
use_thy "equalities";
|
163
|
70 |
use "hologic.ML";
|
|
71 |
use "subtype.ML";
|
17
|
72 |
use_thy "Prod";
|
|
73 |
use_thy "Sum";
|
128
|
74 |
use_thy "Gfp";
|
|
75 |
use_thy "Nat";
|
|
76 |
|
129
|
77 |
use "datatype.ML";
|
128
|
78 |
use "ind_syntax.ML";
|
|
79 |
use "add_ind_def.ML";
|
|
80 |
use "intr_elim.ML";
|
|
81 |
use "indrule.ML";
|
|
82 |
use "Inductive.ML";
|
|
83 |
|
163
|
84 |
(* FIXME -> thy_syntax.ML *)
|
|
85 |
structure ThySynData =
|
|
86 |
struct
|
|
87 |
val user_keywords = ThySynData.user_keywords;
|
|
88 |
|
|
89 |
val user_sections = ThySynData.user_sections @
|
|
90 |
[("datatype", datatype_decls),
|
|
91 |
("primrec", primrec_decl)];
|
|
92 |
end;
|
|
93 |
structure ThySyn = ThySynFun(ThySynData);
|
128
|
94 |
init_thy_reader ();
|
|
95 |
|
163
|
96 |
|
128
|
97 |
use_thy "Finite";
|
148
|
98 |
use_thy "List";
|
0
|
99 |
|
163
|
100 |
init_pps ();
|
|
101 |
print_depth 8;
|
0
|
102 |
|
163
|
103 |
val HOL_build_completed = (); (*indicate successful build*)
|