0
|
1 |
(* Title: HOL/ROOT
|
|
2 |
ID: $Id$
|
|
3 |
Author: Tobias Nipkow
|
|
4 |
Copyright 1993 University of Cambridge
|
|
5 |
|
|
6 |
Adds Classical Higher-order Logic to a database containing pure Isabelle.
|
|
7 |
Should be executed in the subdirectory HOL.
|
|
8 |
*)
|
|
9 |
|
|
10 |
val banner = "Higher-Order Logic";
|
|
11 |
writeln banner;
|
|
12 |
|
10
|
13 |
structure Readthy = ReadthyFUN (structure ThySyn = ThySyn);
|
|
14 |
open Readthy;
|
|
15 |
|
0
|
16 |
print_depth 1;
|
|
17 |
eta_contract := true;
|
17
|
18 |
use_thy "HOL";
|
0
|
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 |
|
|
32 |
val imp_intr = impI
|
|
33 |
|
|
34 |
(*etac rev_cut_eq moves an equality to be the last premise. *)
|
|
35 |
val rev_cut_eq = prove_goal HOL.thy "[| a=b; a=b ==> R |] ==> R"
|
|
36 |
(fn prems => [ REPEAT(resolve_tac prems 1) ]);
|
|
37 |
|
|
38 |
val rev_mp = rev_mp
|
|
39 |
val subst = subst
|
|
40 |
val sym = sym
|
|
41 |
end;
|
|
42 |
|
|
43 |
structure Hypsubst = HypsubstFun(Hypsubst_Data);
|
|
44 |
open Hypsubst;
|
|
45 |
|
|
46 |
(** Applying ClassicalFun to create a classical prover **)
|
|
47 |
structure Classical_Data =
|
|
48 |
struct
|
|
49 |
val sizef = size_of_thm
|
|
50 |
val mp = mp
|
|
51 |
val not_elim = notE
|
|
52 |
val swap = swap
|
|
53 |
val hyp_subst_tacs=[hyp_subst_tac]
|
|
54 |
end;
|
|
55 |
|
|
56 |
structure Classical = ClassicalFun(Classical_Data);
|
|
57 |
open Classical;
|
|
58 |
|
|
59 |
(*Propositional rules*)
|
|
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 HOL_cs = prop_cs addSIs [allI] addIs [exI,ex1I]
|
|
65 |
addSEs [exE,ex1E] addEs [allE];
|
|
66 |
|
|
67 |
val HOL_dup_cs = prop_cs addSIs [allI] addIs [exCI,ex1I]
|
|
68 |
addSEs [exE,ex1E] addEs [all_dupE];
|
|
69 |
|
|
70 |
structure HOL_Induction = InductionFun(struct val spec=spec end);
|
|
71 |
open HOL_Induction;
|
|
72 |
|
|
73 |
use "simpdata.ML";
|
17
|
74 |
use_thy "Ord";
|
|
75 |
use_thy "Set";
|
0
|
76 |
use "fun.ML";
|
|
77 |
use "subset.ML";
|
|
78 |
use "equalities.ML";
|
17
|
79 |
use_thy "Prod";
|
|
80 |
use_thy "Sum";
|
0
|
81 |
use "mono.ML";
|
17
|
82 |
use_thy "LList";
|
0
|
83 |
|
|
84 |
use "../Pure/install_pp.ML";
|
|
85 |
print_depth 8;
|
|
86 |
|
|
87 |
val HOL_build_completed = (); (*indicate successful build*)
|