author | lcp |
Fri, 17 Jun 1994 18:34:12 +0200 | |
changeset 85 | 33d50643dccc |
parent 80 | d3d727449d7b |
child 86 | 2f3a2d9054d1 |
permissions | -rw-r--r-- |
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 |
||
80
d3d727449d7b
datatypes must now be defined using a thy file section
clasohm
parents:
74
diff
changeset
|
13 |
(* Add user section "datatype" *) |
d3d727449d7b
datatypes must now be defined using a thy file section
clasohm
parents:
74
diff
changeset
|
14 |
use "Datatype"; |
d3d727449d7b
datatypes must now be defined using a thy file section
clasohm
parents:
74
diff
changeset
|
15 |
structure ThySyn = ThySynFun(val user_keywords = ["|", "datatype"] and |
d3d727449d7b
datatypes must now be defined using a thy file section
clasohm
parents:
74
diff
changeset
|
16 |
user_sections = [("datatype", datatype_decls)]); |
d3d727449d7b
datatypes must now be defined using a thy file section
clasohm
parents:
74
diff
changeset
|
17 |
init_thy_reader (); |
10 | 18 |
|
0 | 19 |
print_depth 1; |
20 |
eta_contract := true; |
|
17 | 21 |
use_thy "HOL"; |
0 | 22 |
use "../Provers/hypsubst.ML"; |
23 |
use "../Provers/classical.ML"; |
|
24 |
use "../Provers/simplifier.ML"; |
|
25 |
use "../Provers/splitter.ML"; |
|
26 |
use "../Provers/ind.ML"; |
|
27 |
||
28 |
(** Applying HypsubstFun to generate hyp_subst_tac **) |
|
29 |
||
30 |
structure Hypsubst_Data = |
|
31 |
struct |
|
32 |
(*Take apart an equality judgement; otherwise raise Match!*) |
|
33 |
fun dest_eq (Const("Trueprop",_) $ (Const("op =",_) $ t $ u)) = (t,u); |
|
34 |
||
35 |
val imp_intr = impI |
|
36 |
||
37 |
(*etac rev_cut_eq moves an equality to be the last premise. *) |
|
38 |
val rev_cut_eq = prove_goal HOL.thy "[| a=b; a=b ==> R |] ==> R" |
|
39 |
(fn prems => [ REPEAT(resolve_tac prems 1) ]); |
|
40 |
||
41 |
val rev_mp = rev_mp |
|
42 |
val subst = subst |
|
43 |
val sym = sym |
|
44 |
end; |
|
45 |
||
46 |
structure Hypsubst = HypsubstFun(Hypsubst_Data); |
|
47 |
open Hypsubst; |
|
48 |
||
49 |
(** Applying ClassicalFun to create a classical prover **) |
|
50 |
structure Classical_Data = |
|
51 |
struct |
|
52 |
val sizef = size_of_thm |
|
53 |
val mp = mp |
|
54 |
val not_elim = notE |
|
55 |
val swap = swap |
|
56 |
val hyp_subst_tacs=[hyp_subst_tac] |
|
57 |
end; |
|
58 |
||
59 |
structure Classical = ClassicalFun(Classical_Data); |
|
60 |
open Classical; |
|
61 |
||
62 |
(*Propositional rules*) |
|
63 |
val prop_cs = empty_cs addSIs [refl,TrueI,conjI,disjCI,impI,notI,iffI] |
|
64 |
addSEs [conjE,disjE,impCE,FalseE,iffE]; |
|
65 |
||
66 |
(*Quantifier rules*) |
|
67 |
val HOL_cs = prop_cs addSIs [allI] addIs [exI,ex1I] |
|
68 |
addSEs [exE,ex1E] addEs [allE]; |
|
69 |
||
70 |
val HOL_dup_cs = prop_cs addSIs [allI] addIs [exCI,ex1I] |
|
71 |
addSEs [exE,ex1E] addEs [all_dupE]; |
|
72 |
||
73 |
structure HOL_Induction = InductionFun(struct val spec=spec end); |
|
74 |
open HOL_Induction; |
|
75 |
||
76 |
use "simpdata.ML"; |
|
17 | 77 |
use_thy "Ord"; |
78 |
use_thy "Set"; |
|
0 | 79 |
use "fun.ML"; |
80 |
use "subset.ML"; |
|
81 |
use "equalities.ML"; |
|
17 | 82 |
use_thy "Prod"; |
83 |
use_thy "Sum"; |
|
0 | 84 |
use "mono.ML"; |
17 | 85 |
use_thy "LList"; |
0 | 86 |
|
87 |
use "../Pure/install_pp.ML"; |
|
88 |
print_depth 8; |
|
89 |
||
90 |
val HOL_build_completed = (); (*indicate successful build*) |