author  wenzelm 
Sun, 12 Aug 2007 19:00:58 +0200  
changeset 24234  4714e04fb8e9 
parent 24213  71c57c5099d6 
child 24238  ae70f95e31de 
permissions  rwrr 
5363  1 
Isabelle NEWS  history userrelevant changes 
2 
============================================== 

2553  3 

20807  4 
New in this Isabelle version 
17754
58a306d9f736
* Command 'find_theorems': support * wildcard in name: criterion.
wenzelm
parents:
17725
diff
changeset

5 
 
58a306d9f736
* Command 'find_theorems': support * wildcard in name: criterion.
wenzelm
parents:
17725
diff
changeset

6 

58a306d9f736
* Command 'find_theorems': support * wildcard in name: criterion.
wenzelm
parents:
17725
diff
changeset

7 
*** General *** 
58a306d9f736
* Command 'find_theorems': support * wildcard in name: criterion.
wenzelm
parents:
17725
diff
changeset

8 

22826  9 
* More uniform information about legacy features, notably a 
10 
warning/error of "Legacy feature: ...", depending on the state of the 

23367  11 
tolerate_legacy_features flag (default true). FUTURE INCOMPATIBILITY: 
12 
legacy features will disappear eventually. 

22826  13 

17918
93e26302733e
* Theory syntax: discontinued nonIsar format and old Isar headers;
wenzelm
parents:
17890
diff
changeset

14 
* Theory syntax: the header format ``theory A = B + C:'' has been 
93e26302733e
* Theory syntax: discontinued nonIsar format and old Isar headers;
wenzelm
parents:
17890
diff
changeset

15 
discontinued in favour of ``theory A imports B C begin''. Use isatool 
93e26302733e
* Theory syntax: discontinued nonIsar format and old Isar headers;
wenzelm
parents:
17890
diff
changeset

16 
fixheaders to convert existing theory files. INCOMPATIBILITY. 
93e26302733e
* Theory syntax: discontinued nonIsar format and old Isar headers;
wenzelm
parents:
17890
diff
changeset

17 

93e26302733e
* Theory syntax: discontinued nonIsar format and old Isar headers;
wenzelm
parents:
17890
diff
changeset

18 
* Theory syntax: the old nonIsar theory file format has been 
93e26302733e
* Theory syntax: discontinued nonIsar format and old Isar headers;
wenzelm
parents:
17890
diff
changeset

19 
discontinued altogether. Note that ML proof scripts may still be used 
93e26302733e
* Theory syntax: discontinued nonIsar format and old Isar headers;
wenzelm
parents:
17890
diff
changeset

20 
with Isar theories; migration is usually quite simple with the ML 
93e26302733e
* Theory syntax: discontinued nonIsar format and old Isar headers;
wenzelm
parents:
17890
diff
changeset

21 
function use_legacy_bindings. INCOMPATIBILITY. 
93e26302733e
* Theory syntax: discontinued nonIsar format and old Isar headers;
wenzelm
parents:
17890
diff
changeset

22 

22871  23 
* Theory syntax: some popular names (e.g. 'class', 'declaration', 
24 
'fun', 'help', 'if') are now keywords. INCOMPATIBILITY, use double 

25 
quotes. 

19814
faa698d46686
* Theory syntax: some popular names (e.g. "class", "if") are now keywords.
wenzelm
parents:
19783
diff
changeset

26 

23888
babe337cce2d
* Theory loader: be more serious about observing the static theory header specifications;
wenzelm
parents:
23881
diff
changeset

27 
* Theory loader: be more serious about observing the static theory 
babe337cce2d
* Theory loader: be more serious about observing the static theory header specifications;
wenzelm
parents:
23881
diff
changeset

28 
header specifications (including optional directories), but not the 
24172
06e42cf7df4e
theory loader: added use_thys, removed obsolete update_thy;
wenzelm
parents:
24110
diff
changeset

29 
accidental file locations of previously successful loads. The strict 
06e42cf7df4e
theory loader: added use_thys, removed obsolete update_thy;
wenzelm
parents:
24110
diff
changeset

30 
update policy of former update_thy is now already performed by 
06e42cf7df4e
theory loader: added use_thys, removed obsolete update_thy;
wenzelm
parents:
24110
diff
changeset

31 
use_thy, so the former has been removed; use_thys updates several 
06e42cf7df4e
theory loader: added use_thys, removed obsolete update_thy;
wenzelm
parents:
24110
diff
changeset

32 
theories simultaneously, just as 'imports' within a theory header 
06e42cf7df4e
theory loader: added use_thys, removed obsolete update_thy;
wenzelm
parents:
24110
diff
changeset

33 
specification, but without merging the results. Potential 
06e42cf7df4e
theory loader: added use_thys, removed obsolete update_thy;
wenzelm
parents:
24110
diff
changeset

34 
INCOMPATIBILITY: may need to refine theory headers and commands 
06e42cf7df4e
theory loader: added use_thys, removed obsolete update_thy;
wenzelm
parents:
24110
diff
changeset

35 
ROOT.ML which depend on load order. 
23888
babe337cce2d
* Theory loader: be more serious about observing the static theory header specifications;
wenzelm
parents:
23881
diff
changeset

36 

babe337cce2d
* Theory loader: be more serious about observing the static theory header specifications;
wenzelm
parents:
23881
diff
changeset

37 
* Theory loader: optional support for contentbased file 
babe337cce2d
* Theory loader: be more serious about observing the static theory header specifications;
wenzelm
parents:
23881
diff
changeset

38 
identification, instead of the traditional scheme of full physical 
23889  39 
path plus date stamp; configured by the ISABELLE_FILE_IDENT setting 
23888
babe337cce2d
* Theory loader: be more serious about observing the static theory header specifications;
wenzelm
parents:
23881
diff
changeset

40 
(cf. the system manual). The new scheme allows to work with 
babe337cce2d
* Theory loader: be more serious about observing the static theory header specifications;
wenzelm
parents:
23881
diff
changeset

41 
nonfinished theories in persistent session images, such that source 
babe337cce2d
* Theory loader: be more serious about observing the static theory header specifications;
wenzelm
parents:
23881
diff
changeset

42 
files may be moved later on without requiring reloads. 
babe337cce2d
* Theory loader: be more serious about observing the static theory header specifications;
wenzelm
parents:
23881
diff
changeset

43 

24187
8bdf5ca5871f
* Theory loader: oldstyle ML proof scripts are considered a legacy feature;
wenzelm
parents:
24172
diff
changeset

44 
* Theory loader: oldstyle ML proof scripts being *attached* to a thy 
8bdf5ca5871f
* Theory loader: oldstyle ML proof scripts are considered a legacy feature;
wenzelm
parents:
24172
diff
changeset

45 
file (with the same base name as the theory) are considered a legacy 
8bdf5ca5871f
* Theory loader: oldstyle ML proof scripts are considered a legacy feature;
wenzelm
parents:
24172
diff
changeset

46 
feature, which will disappear eventually. Even now, the theory loader no 
8bdf5ca5871f
* Theory loader: oldstyle ML proof scripts are considered a legacy feature;
wenzelm
parents:
24172
diff
changeset

47 
longer maintains dependencies on such files. 
8bdf5ca5871f
* Theory loader: oldstyle ML proof scripts are considered a legacy feature;
wenzelm
parents:
24172
diff
changeset

48 

24234
4714e04fb8e9
* Syntax: scope for resolving ambiguities via typeinference is now limited to individual terms;
wenzelm
parents:
24213
diff
changeset

49 
* Syntax: the scope for resolving ambiguities via typeinference is now 
4714e04fb8e9
* Syntax: scope for resolving ambiguities via typeinference is now limited to individual terms;
wenzelm
parents:
24213
diff
changeset

50 
limited to individual terms, instead of whole simultaneous 
4714e04fb8e9
* Syntax: scope for resolving ambiguities via typeinference is now limited to individual terms;
wenzelm
parents:
24213
diff
changeset

51 
specifications as before. This greatly reduces the complexity of the 
4714e04fb8e9
* Syntax: scope for resolving ambiguities via typeinference is now limited to individual terms;
wenzelm
parents:
24213
diff
changeset

52 
syntax module and improves flexibility by separating parsing and 
4714e04fb8e9
* Syntax: scope for resolving ambiguities via typeinference is now limited to individual terms;
wenzelm
parents:
24213
diff
changeset

53 
typechecking. INCOMPATIBILITY: additional typeconstraints (explicit 
4714e04fb8e9
* Syntax: scope for resolving ambiguities via typeinference is now limited to individual terms;
wenzelm
parents:
24213
diff
changeset

54 
'fixes' etc.) are required in rare situations. 
4714e04fb8e9
* Syntax: scope for resolving ambiguities via typeinference is now limited to individual terms;
wenzelm
parents:
24213
diff
changeset

55 

17981
2602be0d99ae
* Legacy goal package: reduced interface to the bare minimum required to keep existing proof scripts running.
wenzelm
parents:
17918
diff
changeset

56 
* Legacy goal package: reduced interface to the bare minimum required 
2602be0d99ae
* Legacy goal package: reduced interface to the bare minimum required to keep existing proof scripts running.
wenzelm
parents:
17918
diff
changeset

57 
to keep existing proof scripts running. Most other userlevel 
2602be0d99ae
* Legacy goal package: reduced interface to the bare minimum required to keep existing proof scripts running.
wenzelm
parents:
17918
diff
changeset

58 
functions are now part of the OldGoals structure, which is *not* open 
2602be0d99ae
* Legacy goal package: reduced interface to the bare minimum required to keep existing proof scripts running.
wenzelm
parents:
17918
diff
changeset

59 
by default (consider isatool expandshort before open OldGoals). 
2602be0d99ae
* Legacy goal package: reduced interface to the bare minimum required to keep existing proof scripts running.
wenzelm
parents:
17918
diff
changeset

60 
Removed top_sg, prin, printyp, pprint_term/typ altogether, because 
2602be0d99ae
* Legacy goal package: reduced interface to the bare minimum required to keep existing proof scripts running.
wenzelm
parents:
17918
diff
changeset

61 
these tend to cause confusion about the actual goal (!) context being 
2602be0d99ae
* Legacy goal package: reduced interface to the bare minimum required to keep existing proof scripts running.
wenzelm
parents:
17918
diff
changeset

62 
used here, which is not necessarily the same as the_context(). 
17918
93e26302733e
* Theory syntax: discontinued nonIsar format and old Isar headers;
wenzelm
parents:
17890
diff
changeset

63 

23379
d0e3f790bd73
updated 'find_theorems'  moved ProofGeneral specifics to ProofGeneral/CHANGES;
wenzelm
parents:
23377
diff
changeset

64 
* Command 'find_theorems': supports "*" wildcard in "name:" 
d0e3f790bd73
updated 'find_theorems'  moved ProofGeneral specifics to ProofGeneral/CHANGES;
wenzelm
parents:
23377
diff
changeset

65 
criterion; "with_dups" option. Certain ProofGeneral versions might 
d0e3f790bd73
updated 'find_theorems'  moved ProofGeneral specifics to ProofGeneral/CHANGES;
wenzelm
parents:
23377
diff
changeset

66 
support a specific search form (see ProofGeneral/CHANGES). 
22965  67 

20370  68 
* The ``prems limit'' option (cf. ProofContext.prems_limit) is now 1 
69 
by default, which means that "prems" (and also "fixed variables") are 

70 
suppressed from proof state output. Note that the ProofGeneral 

71 
settings mechanism allows to change and save options persistently, but 

72 
older versions of Isabelle will fail to start up if a negative prems 

73 
limit is imposed. 

74 

21308
73883a528b26
* Local theory targets ``context/locale/class ... begin'' followed by ``end''.
wenzelm
parents:
21265
diff
changeset

75 
* Local theory targets may be specified by nonnested blocks of 
73883a528b26
* Local theory targets ``context/locale/class ... begin'' followed by ``end''.
wenzelm
parents:
21265
diff
changeset

76 
``context/locale/class ... begin'' followed by ``end''. The body may 
73883a528b26
* Local theory targets ``context/locale/class ... begin'' followed by ``end''.
wenzelm
parents:
21265
diff
changeset

77 
contain definitions, theorems etc., including any derived mechanism 
73883a528b26
* Local theory targets ``context/locale/class ... begin'' followed by ``end''.
wenzelm
parents:
21265
diff
changeset

78 
that has been implemented on top of these primitives. This concept 
73883a528b26
* Local theory targets ``context/locale/class ... begin'' followed by ``end''.
wenzelm
parents:
21265
diff
changeset

79 
generalizes the existing ``theorem (in ...)'' towards more versatility 
73883a528b26
* Local theory targets ``context/locale/class ... begin'' followed by ``end''.
wenzelm
parents:
21265
diff
changeset

80 
and scalability. 
73883a528b26
* Local theory targets ``context/locale/class ... begin'' followed by ``end''.
wenzelm
parents:
21265
diff
changeset

81 

21960
0574f192b78a
* Proof General: proper undo of final 'end'; discontinued Isabelle/classic;
wenzelm
parents:
21896
diff
changeset

82 
* Proof General interface: proper undo of final 'end' command; 
0574f192b78a
* Proof General: proper undo of final 'end'; discontinued Isabelle/classic;
wenzelm
parents:
21896
diff
changeset

83 
discontinued Isabelle/classic mode (ML proof scripts). 
0574f192b78a
* Proof General: proper undo of final 'end'; discontinued Isabelle/classic;
wenzelm
parents:
21896
diff
changeset

84 

17754
58a306d9f736
* Command 'find_theorems': support * wildcard in name: criterion.
wenzelm
parents:
17725
diff
changeset

85 

17865  86 
*** Document preparation *** 
87 

21717  88 
* Added antiquotation @{theory name} which prints the given name, 
89 
after checking that it refers to a valid ancestor theory in the 

90 
current context. 

21339  91 

17869  92 
* Added antiquotations @{ML_type text} and @{ML_struct text} which 
93 
check the given source text as ML type/structure, printing verbatim. 

17865  94 

21717  95 
* Added antiquotation @{abbrev "c args"} which prints the abbreviation 
96 
"c args == rhs" given in the current context. (Any number of 

21735  97 
arguments may be given on the LHS.) 
21717  98 

99 

17865  100 

17779  101 
*** Pure *** 
102 

22921
475ff421a6a3
consts in consts_code Isar commands are now referred to by usual term syntax
haftmann
parents:
22871
diff
changeset

103 
* code generator: consts in 'consts_code' Isar commands are now referred 
475ff421a6a3
consts in consts_code Isar commands are now referred to by usual term syntax
haftmann
parents:
22871
diff
changeset

104 
to by usual term syntax (including optional type annotations). 
475ff421a6a3
consts in consts_code Isar commands are now referred to by usual term syntax
haftmann
parents:
22871
diff
changeset

105 

22735  106 
* code generator: 
22921
475ff421a6a3
consts in consts_code Isar commands are now referred to by usual term syntax
haftmann
parents:
22871
diff
changeset

107 
 Isar 'definition's, 'constdef's and primitive instance definitions are added 
475ff421a6a3
consts in consts_code Isar commands are now referred to by usual term syntax
haftmann
parents:
22871
diff
changeset

108 
explicitly to the table of defining equations 
22754  109 
 primitive definitions are not used as defining equations by default any longer 
22735  110 
 defining equations are now definitly restricted to meta "==" and object 
111 
equality "=" 

112 
 HOL theories have been adopted accordingly 

113 

20807  114 
* class_package.ML offers a combination of axclasses and locales to 
22921
475ff421a6a3
consts in consts_code Isar commands are now referred to by usual term syntax
haftmann
parents:
22871
diff
changeset

115 
achieve Haskelllike type classes in Isabelle. See 
20807  116 
HOL/ex/Classpackage.thy for examples. 
117 

118 
* Yet another code generator framework allows to generate executable 

22921
475ff421a6a3
consts in consts_code Isar commands are now referred to by usual term syntax
haftmann
parents:
22871
diff
changeset

119 
code for ML and Haskell (including "class"es). A short usage sketch: 
20188
8b22026445af
added notes on class_package.ML and codegen_package.ML
haftmann
parents:
20169
diff
changeset

120 

8b22026445af
added notes on class_package.ML and codegen_package.ML
haftmann
parents:
20169
diff
changeset

121 
internal compilation: 
23850  122 
code_gen <list of constants (term syntax)> in SML 
20453
855f07fabd76
final syntax for some Isar code generator keywords
haftmann
parents:
20375
diff
changeset

123 
writing SML code to a file: 
23850  124 
code_gen <list of constants (term syntax)> in SML <filename> 
22735  125 
writing OCaml code to a file: 
23850  126 
code_gen <list of constants (term syntax)> in OCaml <filename> 
20188
8b22026445af
added notes on class_package.ML and codegen_package.ML
haftmann
parents:
20169
diff
changeset

127 
writing Haskell code to a bunch of files: 
23850  128 
code_gen <list of constants (term syntax)> in Haskell <filename> 
20453
855f07fabd76
final syntax for some Isar code generator keywords
haftmann
parents:
20375
diff
changeset

129 

855f07fabd76
final syntax for some Isar code generator keywords
haftmann
parents:
20375
diff
changeset

130 
Reasonable default setup of framework in HOL/Main. 
855f07fabd76
final syntax for some Isar code generator keywords
haftmann
parents:
20375
diff
changeset

131 

855f07fabd76
final syntax for some Isar code generator keywords
haftmann
parents:
20375
diff
changeset

132 
Theorem attributs for selecting and transforming function equations theorems: 
855f07fabd76
final syntax for some Isar code generator keywords
haftmann
parents:
20375
diff
changeset

133 

22845  134 
[code fun]: select a theorem as function equation for a specific constant 
135 
[code fun del]: deselect a theorem as function equation for a specific constant 

136 
[code inline]: select an equation theorem for unfolding (inlining) in place 

137 
[code inline del]: deselect an equation theorem for unfolding (inlining) in place 

20453
855f07fabd76
final syntax for some Isar code generator keywords
haftmann
parents:
20375
diff
changeset

138 

22735  139 
Userdefined serializations (target in {SML, OCaml, Haskell}): 
20453
855f07fabd76
final syntax for some Isar code generator keywords
haftmann
parents:
20375
diff
changeset

140 

855f07fabd76
final syntax for some Isar code generator keywords
haftmann
parents:
20375
diff
changeset

141 
code_const <andlist of constants (term syntax)> 
855f07fabd76
final syntax for some Isar code generator keywords
haftmann
parents:
20375
diff
changeset

142 
{(target) <andlist of const target syntax>}+ 
855f07fabd76
final syntax for some Isar code generator keywords
haftmann
parents:
20375
diff
changeset

143 

855f07fabd76
final syntax for some Isar code generator keywords
haftmann
parents:
20375
diff
changeset

144 
code_type <andlist of type constructors> 
855f07fabd76
final syntax for some Isar code generator keywords
haftmann
parents:
20375
diff
changeset

145 
{(target) <andlist of type target syntax>}+ 
855f07fabd76
final syntax for some Isar code generator keywords
haftmann
parents:
20375
diff
changeset

146 

855f07fabd76
final syntax for some Isar code generator keywords
haftmann
parents:
20375
diff
changeset

147 
code_instance <andlist of instances> 
855f07fabd76
final syntax for some Isar code generator keywords
haftmann
parents:
20375
diff
changeset

148 
{(target)}+ 
855f07fabd76
final syntax for some Isar code generator keywords
haftmann
parents:
20375
diff
changeset

149 
where instance ::= <type constructor> :: <class> 
855f07fabd76
final syntax for some Isar code generator keywords
haftmann
parents:
20375
diff
changeset

150 

855f07fabd76
final syntax for some Isar code generator keywords
haftmann
parents:
20375
diff
changeset

151 
code_class <and_list of classes> 
855f07fabd76
final syntax for some Isar code generator keywords
haftmann
parents:
20375
diff
changeset

152 
{(target) <andlist of class target syntax>}+ 
855f07fabd76
final syntax for some Isar code generator keywords
haftmann
parents:
20375
diff
changeset

153 
where class target syntax ::= <class name> {where {<classop> == <target syntax>}+}? 
855f07fabd76
final syntax for some Isar code generator keywords
haftmann
parents:
20375
diff
changeset

154 

22735  155 
code_instance and code_class only apply to target Haskell. 
156 

157 
See HOL theories and HOL/ex/Codegenerator*.thy for usage examples. 

158 
Doc/Isar/Advanced/Codegen/ provides a tutorial. 

20188
8b22026445af
added notes on class_package.ML and codegen_package.ML
haftmann
parents:
20169
diff
changeset

159 

19254  160 
* Command 'no_translations' removes translation rules from theory 
161 
syntax. 

162 

19625
285771cec083
* Pure: overloaded definitions are now actually checked for acyclic dependencies;
wenzelm
parents:
19587
diff
changeset

163 
* Overloaded definitions are now actually checked for acyclic 
19714  164 
dependencies. The overloading scheme is slightly more general than 
165 
that of Haskell98, although Isabelle does not demand an exact 

166 
correspondence to type class and instance declarations. 

167 
INCOMPATIBILITY, use ``defs (unchecked overloaded)'' to admit more 

168 
exotic versions of overloading  at the discretion of the user! 

19711  169 

170 
Polymorphic constants are represented via type arguments, i.e. the 

171 
instantiation that matches an instance against the most general 

172 
declaration given in the signature. For example, with the declaration 

173 
c :: 'a => 'a => 'a, an instance c :: nat => nat => nat is represented 

174 
as c(nat). Overloading is essentially simultaneous structural 

175 
recursion over such type arguments. Incomplete specification patterns 

19714  176 
impose global constraints on all occurrences, e.g. c('a * 'a) on the 
19715  177 
LHS means that more general c('a * 'b) will be disallowed on any RHS. 
19714  178 
Command 'print_theory' outputs the normalized system of recursive 
179 
equations, see section "definitions". 

19625
285771cec083
* Pure: overloaded definitions are now actually checked for acyclic dependencies;
wenzelm
parents:
19587
diff
changeset

180 

24086  181 
* Configuration options are maintained within the theory or proof 
182 
context (with name and type bool/int/string), providing a very simple 

183 
interface to a poorman's version of general context data. Tools may 

24110
4ab3084e311c
tuned config options: eliminated separate attribute "option";
wenzelm
parents:
24086
diff
changeset

184 
declare options in ML (e.g. using Attrib.config_int) and then refer to 
4ab3084e311c
tuned config options: eliminated separate attribute "option";
wenzelm
parents:
24086
diff
changeset

185 
these values using Config.get etc. Users may change options via an 
4ab3084e311c
tuned config options: eliminated separate attribute "option";
wenzelm
parents:
24086
diff
changeset

186 
associated attribute of the same name. This form of context 
4ab3084e311c
tuned config options: eliminated separate attribute "option";
wenzelm
parents:
24086
diff
changeset

187 
declaration works particularly well with commands 'declare' or 
4ab3084e311c
tuned config options: eliminated separate attribute "option";
wenzelm
parents:
24086
diff
changeset

188 
'using', for example ``declare [[foo = 42]]''. Thus it has become 
4ab3084e311c
tuned config options: eliminated separate attribute "option";
wenzelm
parents:
24086
diff
changeset

189 
very easy to avoid global references, which would not observe Isar 
4ab3084e311c
tuned config options: eliminated separate attribute "option";
wenzelm
parents:
24086
diff
changeset

190 
toplevel undo/redo and fail to work with multithreading. 
24086  191 

24172
06e42cf7df4e
theory loader: added use_thys, removed obsolete update_thy;
wenzelm
parents:
24110
diff
changeset

192 
Various global ML references of Pure and HOL have been turned into 
06e42cf7df4e
theory loader: added use_thys, removed obsolete update_thy;
wenzelm
parents:
24110
diff
changeset

193 
configuration options: 
06e42cf7df4e
theory loader: added use_thys, removed obsolete update_thy;
wenzelm
parents:
24110
diff
changeset

194 

06e42cf7df4e
theory loader: added use_thys, removed obsolete update_thy;
wenzelm
parents:
24110
diff
changeset

195 
Unify.search_bound unify_search_bound 
06e42cf7df4e
theory loader: added use_thys, removed obsolete update_thy;
wenzelm
parents:
24110
diff
changeset

196 
Unify.trace_bound unify_trace_bound 
06e42cf7df4e
theory loader: added use_thys, removed obsolete update_thy;
wenzelm
parents:
24110
diff
changeset

197 
Unify.trace_simp unify_trace_simp 
06e42cf7df4e
theory loader: added use_thys, removed obsolete update_thy;
wenzelm
parents:
24110
diff
changeset

198 
Unify.trace_types unify_trace_types 
06e42cf7df4e
theory loader: added use_thys, removed obsolete update_thy;
wenzelm
parents:
24110
diff
changeset

199 
Simplifier.simp_depth_limit simp_depth_limit 
06e42cf7df4e
theory loader: added use_thys, removed obsolete update_thy;
wenzelm
parents:
24110
diff
changeset

200 
Blast.depth_limit blast_depth_limit 
06e42cf7df4e
theory loader: added use_thys, removed obsolete update_thy;
wenzelm
parents:
24110
diff
changeset

201 
DatatypeProp.dtK datatype_distinctness_limit 
06e42cf7df4e
theory loader: added use_thys, removed obsolete update_thy;
wenzelm
parents:
24110
diff
changeset

202 
fast_arith_neq_limit fast_arith_neq_limit 
06e42cf7df4e
theory loader: added use_thys, removed obsolete update_thy;
wenzelm
parents:
24110
diff
changeset

203 
fast_arith_split_limit fast_arith_split_limit 
06e42cf7df4e
theory loader: added use_thys, removed obsolete update_thy;
wenzelm
parents:
24110
diff
changeset

204 

24086  205 
* Named collections of theorems may be easily installed as context 
206 
data using the functor NamedThmsFun (see 

207 
src/Pure/Tools/named_thms.ML). The user may add or delete facts via 

24110
4ab3084e311c
tuned config options: eliminated separate attribute "option";
wenzelm
parents:
24086
diff
changeset

208 
attributes; there is also a toplevel print command. This facility is 
4ab3084e311c
tuned config options: eliminated separate attribute "option";
wenzelm
parents:
24086
diff
changeset

209 
just a common case of general context data, which is the preferred way 
4ab3084e311c
tuned config options: eliminated separate attribute "option";
wenzelm
parents:
24086
diff
changeset

210 
for anything more complex than just a list of facts in canonical 
4ab3084e311c
tuned config options: eliminated separate attribute "option";
wenzelm
parents:
24086
diff
changeset

211 
order. 
24086  212 

24032  213 
* Isar: command 'declaration' augments a local theory by generic 
214 
declaration functions written in ML. This enables arbitrary content 

215 
being added to the context, depending on a morphism that tells the 

216 
difference of the original declaration context wrt. the application 

217 
context encountered later on. 

218 

219 
* Isar: proper interfaces for simplification procedures. Command 

220 
'simproc_setup' declares named simprocs (with match patterns, and body 

221 
text in ML). Attribute "simproc" adds/deletes simprocs in the current 

222 
context. ML antiquotation @{simproc name} retrieves named simprocs. 

223 

224 
* Isar: an extra pair of brackets around attribute declarations 

225 
abbreviates a theorem reference involving an internal dummy fact, 

226 
which will be ignored later  only the effect of the attribute on 

227 
the background context will persist. This form of inplace 

228 
declarations is particularly useful with commands like 'declare' and 

229 
'using', for example ``have A using [[simproc a]] by simp''. 

230 

23369
227c51012cdb
* Isar: method "assumption" (implicit closing of subproofs) takes nonatomic goal assumptions into account;
wenzelm
parents:
23367
diff
changeset

231 
* Isar: method "assumption" (and implicit closing of subproofs) now 
227c51012cdb
* Isar: method "assumption" (implicit closing of subproofs) takes nonatomic goal assumptions into account;
wenzelm
parents:
23367
diff
changeset

232 
takes simple nonatomic goal assumptions into account: after applying 
227c51012cdb
* Isar: method "assumption" (implicit closing of subproofs) takes nonatomic goal assumptions into account;
wenzelm
parents:
23367
diff
changeset

233 
an assumption as a rule the resulting subgoals are solved by atomic 
227c51012cdb
* Isar: method "assumption" (implicit closing of subproofs) takes nonatomic goal assumptions into account;
wenzelm
parents:
23367
diff
changeset

234 
assumption steps. This is particularly useful to finish 'obtain' 
227c51012cdb
* Isar: method "assumption" (implicit closing of subproofs) takes nonatomic goal assumptions into account;
wenzelm
parents:
23367
diff
changeset

235 
goals, such as "!!x. (!!x. P x ==> thesis) ==> P x ==> thesis", 
227c51012cdb
* Isar: method "assumption" (implicit closing of subproofs) takes nonatomic goal assumptions into account;
wenzelm
parents:
23367
diff
changeset

236 
without referring to the original premise "!!x. P x ==> thesis" in the 
227c51012cdb
* Isar: method "assumption" (implicit closing of subproofs) takes nonatomic goal assumptions into account;
wenzelm
parents:
23367
diff
changeset

237 
Isar proof context. POTENTIAL INCOMPATIBILITY: method "assumption" is 
227c51012cdb
* Isar: method "assumption" (implicit closing of subproofs) takes nonatomic goal assumptions into account;
wenzelm
parents:
23367
diff
changeset

238 
more permissive. 
227c51012cdb
* Isar: method "assumption" (implicit closing of subproofs) takes nonatomic goal assumptions into account;
wenzelm
parents:
23367
diff
changeset

239 

227c51012cdb
* Isar: method "assumption" (implicit closing of subproofs) takes nonatomic goal assumptions into account;
wenzelm
parents:
23367
diff
changeset

240 
* Isar: implicit use of prems from the Isar proof context is 
227c51012cdb
* Isar: method "assumption" (implicit closing of subproofs) takes nonatomic goal assumptions into account;
wenzelm
parents:
23367
diff
changeset

241 
considered a legacy feature. Common applications like ``have A .'' 
227c51012cdb
* Isar: method "assumption" (implicit closing of subproofs) takes nonatomic goal assumptions into account;
wenzelm
parents:
23367
diff
changeset

242 
may be replaced by ``have A by fact'' or ``note `A`''. In general, 
227c51012cdb
* Isar: method "assumption" (implicit closing of subproofs) takes nonatomic goal assumptions into account;
wenzelm
parents:
23367
diff
changeset

243 
referencing facts explicitly here improves readability and 
227c51012cdb
* Isar: method "assumption" (implicit closing of subproofs) takes nonatomic goal assumptions into account;
wenzelm
parents:
23367
diff
changeset

244 
maintainability of proof texts. 
227c51012cdb
* Isar: method "assumption" (implicit closing of subproofs) takes nonatomic goal assumptions into account;
wenzelm
parents:
23367
diff
changeset

245 

17865  246 
* Isar: improper proof element 'guess' is like 'obtain', but derives 
247 
the obtained context from the course of reasoning! For example: 

248 

249 
assume "EX x y. A x & B y"  "any previous fact" 

250 
then guess x and y by clarify 

251 

252 
This technique is potentially adventurous, depending on the facts and 

253 
proof tools being involved here. 

254 

18020  255 
* Isar: known facts from the proof context may be specified as literal 
256 
propositions, using ASCII backquote syntax. This works wherever 

257 
named facts used to be allowed so far, in proof commands, proof 

258 
methods, attributes etc. Literal facts are retrieved from the context 

259 
according to unification of type and term parameters. For example, 

260 
provided that "A" and "A ==> B" and "!!x. P x ==> Q x" are known 

261 
theorems in the current context, then these are valid literal facts: 

262 
`A` and `A ==> B` and `!!x. P x ==> Q x" as well as `P a ==> Q a` etc. 

263 

264 
There is also a proof method "fact" which does the same composition 

18044  265 
for explicit goal states, e.g. the following proof texts coincide with 
266 
certain special cases of literal facts: 

18020  267 

268 
have "A" by fact == note `A` 

269 
have "A ==> B" by fact == note `A ==> B` 

270 
have "!!x. P x ==> Q x" by fact == note `!!x. P x ==> Q x` 

271 
have "P a ==> Q a" by fact == note `P a ==> Q a` 

272 

20118
0c1ec587a5a8
* Isar: ":" (colon) is no longer a symbolic identifier character;
wenzelm
parents:
20090
diff
changeset

273 
* Isar: ":" (colon) is no longer a symbolic identifier character in 
0c1ec587a5a8
* Isar: ":" (colon) is no longer a symbolic identifier character;
wenzelm
parents:
20090
diff
changeset

274 
outer syntax. Thus symbolic identifiers may be used without 
0c1ec587a5a8
* Isar: ":" (colon) is no longer a symbolic identifier character;
wenzelm
parents:
20090
diff
changeset

275 
additional white space in declarations like this: ``assume *: A''. 
0c1ec587a5a8
* Isar: ":" (colon) is no longer a symbolic identifier character;
wenzelm
parents:
20090
diff
changeset

276 

20013  277 
* Isar: 'print_facts' prints all local facts of the current context, 
278 
both named and unnamed ones. 

279 

18308  280 
* Isar: 'def' now admits simultaneous definitions, e.g.: 
281 

282 
def x == "t" and y == "u" 

283 

18540  284 
* Isar: added command 'unfolding', which is structurally similar to 
285 
'using', but affects both the goal state and facts by unfolding given 

18815
cb778c0ce1b5
Pure/Isar: (un)folded, (un)fold, unfolding support
wenzelm
parents:
18738
diff
changeset

286 
rewrite rules. Thus many occurrences of the 'unfold' method or 
18540  287 
'unfolded' attribute may be replaced by firstclass proof text. 
288 

18815
cb778c0ce1b5
Pure/Isar: (un)folded, (un)fold, unfolding support
wenzelm
parents:
18738
diff
changeset

289 
* Isar: methods 'unfold' / 'fold', attributes 'unfolded' / 'folded', 
cb778c0ce1b5
Pure/Isar: (un)folded, (un)fold, unfolding support
wenzelm
parents:
18738
diff
changeset

290 
and command 'unfolding' now all support objectlevel equalities 
cb778c0ce1b5
Pure/Isar: (un)folded, (un)fold, unfolding support
wenzelm
parents:
18738
diff
changeset

291 
(potentially conditional). The underlying notion of rewrite rule is 
cb778c0ce1b5
Pure/Isar: (un)folded, (un)fold, unfolding support
wenzelm
parents:
18738
diff
changeset

292 
analogous to the 'rule_format' attribute, but *not* that of the 
cb778c0ce1b5
Pure/Isar: (un)folded, (un)fold, unfolding support
wenzelm
parents:
18738
diff
changeset

293 
Simplifier (which is usually more generous). 
cb778c0ce1b5
Pure/Isar: (un)folded, (un)fold, unfolding support
wenzelm
parents:
18738
diff
changeset

294 

19220  295 
* Isar: the goal restriction operator [N] (default N = 1) evaluates a 
296 
method expression within a sandbox consisting of the first N 

19240  297 
subgoals, which need to exist. For example, ``simp_all [3]'' 
298 
simplifies the first three subgoals, while (rule foo, simp_all)[] 

299 
simplifies all new goals that emerge from applying rule foo to the 

300 
originally first one. 

19220  301 

19814
faa698d46686
* Theory syntax: some popular names (e.g. "class", "if") are now keywords.
wenzelm
parents:
19783
diff
changeset

302 
* Isar: schematic goals are no longer restricted to higherorder 
faa698d46686
* Theory syntax: some popular names (e.g. "class", "if") are now keywords.
wenzelm
parents:
19783
diff
changeset

303 
patterns; e.g. ``lemma "?P(?x)" by (rule TrueI)'' now works as 
faa698d46686
* Theory syntax: some popular names (e.g. "class", "if") are now keywords.
wenzelm
parents:
19783
diff
changeset

304 
expected. 
faa698d46686
* Theory syntax: some popular names (e.g. "class", "if") are now keywords.
wenzelm
parents:
19783
diff
changeset

305 

18901  306 
* Isar: the conclusion of a long theorem statement is now either 
307 
'shows' (a simultaneous conjunction, as before), or 'obtains' 

308 
(essentially a disjunction of cases with local parameters and 

309 
assumptions). The latter allows to express general elimination rules 

18910  310 
adequately; in this notation common elimination rules look like this: 
18901  311 

312 
lemma exE:  "EX x. P x ==> (!!x. P x ==> thesis) ==> thesis" 

313 
assumes "EX x. P x" 

314 
obtains x where "P x" 

315 

316 
lemma conjE:  "A & B ==> (A ==> B ==> thesis) ==> thesis" 

317 
assumes "A & B" 

318 
obtains A and B 

319 

320 
lemma disjE:  "A  B ==> (A ==> thesis) ==> (B ==> thesis) ==> thesis" 

321 
assumes "A  B" 

322 
obtains 

323 
A 

324 
 B 

325 

18910  326 
The subsequent classical rules even refer to the formal "thesis" 
18901  327 
explicitly: 
328 

329 
lemma classical:  "(~ thesis ==> thesis) ==> thesis" 

330 
obtains "~ thesis" 

331 

18910  332 
lemma Peirce's_Law:  "((thesis ==> something) ==> thesis) ==> thesis" 
333 
obtains "thesis ==> something" 

18901  334 

335 
The actual proof of an 'obtains' statement is analogous to that of the 

18910  336 
Isar proof element 'obtain', only that there may be several cases. 
337 
Optional case names may be specified in parentheses; these will be 

338 
available both in the present proof and as annotations in the 

339 
resulting rule, for later use with the 'cases' method (cf. attribute 

340 
case_names). 

18901  341 

21447
379f130843f7
* Isar: the assumptions of a long theorem statement are available as assms;
wenzelm
parents:
21406
diff
changeset

342 
* Isar: the assumptions of a long theorem statement are available as 
379f130843f7
* Isar: the assumptions of a long theorem statement are available as assms;
wenzelm
parents:
21406
diff
changeset

343 
"assms" fact in the proof context. This is more appropriate than the 
379f130843f7
* Isar: the assumptions of a long theorem statement are available as assms;
wenzelm
parents:
21406
diff
changeset

344 
(historical) "prems", which refers to all assumptions of the current 
379f130843f7
* Isar: the assumptions of a long theorem statement are available as assms;
wenzelm
parents:
21406
diff
changeset

345 
context, including those from the target locale, proof body etc. 
379f130843f7
* Isar: the assumptions of a long theorem statement are available as assms;
wenzelm
parents:
21406
diff
changeset

346 

19263  347 
* Isar: 'print_statement' prints theorems from the current theory or 
348 
proof context in long statement form, according to the syntax of a 

349 
toplevel lemma. 

350 

18901  351 
* Isar: 'obtain' takes an optional case name for the local context 
352 
introduction rule (default "that"). 

353 

19587  354 
* Isar: removed obsolete 'concl is' patterns. INCOMPATIBILITY, use 
355 
explicit (is "_ ==> ?foo") in the rare cases where this still happens 

356 
to occur. 

357 

19682
c8c301eb965a
* Pure: syntax 'CONST name' produces a fully internalized constant;
wenzelm
parents:
19665
diff
changeset

358 
* Pure: syntax "CONST name" produces a fully internalized constant 
c8c301eb965a
* Pure: syntax 'CONST name' produces a fully internalized constant;
wenzelm
parents:
19665
diff
changeset

359 
according to the current context. This is particularly useful for 
c8c301eb965a
* Pure: syntax 'CONST name' produces a fully internalized constant;
wenzelm
parents:
19665
diff
changeset

360 
syntax translations that should refer to internal constant 
c8c301eb965a
* Pure: syntax 'CONST name' produces a fully internalized constant;
wenzelm
parents:
19665
diff
changeset

361 
representations independently of name spaces. 
c8c301eb965a
* Pure: syntax 'CONST name' produces a fully internalized constant;
wenzelm
parents:
19665
diff
changeset

362 

21537
45b3a85ee548
* Pure: syntax constant for foo (binder) is called foo_binder;
wenzelm
parents:
21471
diff
changeset

363 
* Pure: syntax constant for foo (binder "FOO ") is called "foo_binder" 
45b3a85ee548
* Pure: syntax constant for foo (binder) is called foo_binder;
wenzelm
parents:
21471
diff
changeset

364 
instead of "FOO ". This allows multiple binder declarations to coexist 
45b3a85ee548
* Pure: syntax constant for foo (binder) is called foo_binder;
wenzelm
parents:
21471
diff
changeset

365 
in the same context. INCOMPATIBILITY. 
45b3a85ee548
* Pure: syntax constant for foo (binder) is called foo_binder;
wenzelm
parents:
21471
diff
changeset

366 

21209
dbb8decc36bc
'const_syntax' command: allow fixed variables, renamed to 'notation';
wenzelm
parents:
21200
diff
changeset

367 
* Isar/locales: 'notation' provides a robust interface to the 'syntax' 
dbb8decc36bc
'const_syntax' command: allow fixed variables, renamed to 'notation';
wenzelm
parents:
21200
diff
changeset

368 
primitive that also works in a locale context (both for constants and 
dbb8decc36bc
'const_syntax' command: allow fixed variables, renamed to 'notation';
wenzelm
parents:
21200
diff
changeset

369 
fixed variables). Type declaration and internal syntactic 
dbb8decc36bc
'const_syntax' command: allow fixed variables, renamed to 'notation';
wenzelm
parents:
21200
diff
changeset

370 
representation of given constants retrieved from the context. 
19682
c8c301eb965a
* Pure: syntax 'CONST name' produces a fully internalized constant;
wenzelm
parents:
19665
diff
changeset

371 

19665  372 
* Isar/locales: new derived specification elements 'axiomatization', 
373 
'definition', 'abbreviation', which support typeinference, admit 

19083  374 
objectlevel specifications (equality, equivalence). See also the 
375 
isarref manual. Examples: 

19081
085b5badb8de
* Isar/locales: new derived specification elements 'definition', 'abbreviation', 'axiomatization';
wenzelm
parents:
19034
diff
changeset

376 

19665  377 
axiomatization 
21595  378 
eq (infix "===" 50) where 
379 
eq_refl: "x === x" and eq_subst: "x === y ==> P x ==> P y" 

380 

381 
definition "f x y = x + y + 1" 

382 
definition g where "g x = f x x" 

19081
085b5badb8de
* Isar/locales: new derived specification elements 'definition', 'abbreviation', 'axiomatization';
wenzelm
parents:
19034
diff
changeset

383 

19363  384 
abbreviation 
21595  385 
neq (infix "=!=" 50) where 
19363  386 
"x =!= y == ~ (x === y)" 
19081
085b5badb8de
* Isar/locales: new derived specification elements 'definition', 'abbreviation', 'axiomatization';
wenzelm
parents:
19034
diff
changeset

387 

19083  388 
These specifications may be also used in a locale context. Then the 
389 
constants being introduced depend on certain fixed parameters, and the 

390 
constant name is qualified by the locale base name. An internal 

391 
abbreviation takes care for convenient input and output, making the 

19088  392 
parameters implicit and using the original short name. See also 
19083  393 
HOL/ex/Abstract_NAT.thy for an example of deriving polymorphic 
394 
entities from a monomorphic theory. 

395 

396 
Presently, abbreviations are only available 'in' a target locale, but 

19363  397 
not inherited by general import expressions. Also note that 
398 
'abbreviation' may be used as a typesafe replacement for 'syntax' + 

399 
'translations' in common applications. 

19084  400 

19682
c8c301eb965a
* Pure: syntax 'CONST name' produces a fully internalized constant;
wenzelm
parents:
19665
diff
changeset

401 
Concrete syntax is attached to specified constants in internal form, 
c8c301eb965a
* Pure: syntax 'CONST name' produces a fully internalized constant;
wenzelm
parents:
19665
diff
changeset

402 
independently of name spaces. The parse tree representation is 
21209
dbb8decc36bc
'const_syntax' command: allow fixed variables, renamed to 'notation';
wenzelm
parents:
21200
diff
changeset

403 
slightly different  use 'notation' instead of raw 'syntax', and 
19682
c8c301eb965a
* Pure: syntax 'CONST name' produces a fully internalized constant;
wenzelm
parents:
19665
diff
changeset

404 
'translations' with explicit "CONST" markup to accommodate this. 
19665  405 

21735  406 
* Pure: command 'print_abbrevs' prints all constant abbreviations of 
407 
the current context. Print mode "no_abbrevs" prevents inversion of 

408 
abbreviations on output. 

409 

19783  410 
* Isar/locales: improved parameter handling: 
411 
 use of locales "var" and "struct" no longer necessary; 

412 
 parameter renamings are no longer required to be injective. 

413 
This enables, for example, to define a locale for endomorphisms thus: 

414 
locale endom = homom mult mult h. 

415 

19931
fb32b43e7f80
Restructured locales with predicates: import is now an interpretation.
ballarin
parents:
19895
diff
changeset

416 
* Isar/locales: changed the way locales with predicates are defined. 
fb32b43e7f80
Restructured locales with predicates: import is now an interpretation.
ballarin
parents:
19895
diff
changeset

417 
Instead of accumulating the specification, the imported expression is 
22126  418 
now an interpretation. INCOMPATIBILITY: different normal form of 
419 
locale expressions. In particular, in interpretations of locales with 

420 
predicates, goals repesenting already interpreted fragments are not 

421 
removed automatically. Use methods `intro_locales' and 

422 
`unfold_locales'; see below. 

423 

424 
* Isar/locales: new methods `intro_locales' and `unfold_locales' 

425 
provide backward reasoning on locales predicates. The methods are 

426 
aware of interpretations and discharge corresponding goals. 

427 
`intro_locales' is less aggressive then `unfold_locales' and does not 

428 
unfold predicates to assumptions. 

19931
fb32b43e7f80
Restructured locales with predicates: import is now an interpretation.
ballarin
parents:
19895
diff
changeset

429 

fb32b43e7f80
Restructured locales with predicates: import is now an interpretation.
ballarin
parents:
19895
diff
changeset

430 
* Isar/locales: the order in which locale fragments are accumulated 
22126  431 
has changed. This enables to override declarations from fragments due 
432 
to interpretations  for example, unwanted simp rules. 

19931
fb32b43e7f80
Restructured locales with predicates: import is now an interpretation.
ballarin
parents:
19895
diff
changeset

433 

23920  434 
* Isar/locales: interpretation in theories and proof contexts has been 
435 
extended. One may now specify (and prove) equations, which are 

436 
unfolded in interpreted theorems. This is useful for replacing 

437 
defined concepts (constants depending on locale parameters) by 

438 
concepts already existing in the target context. Example: 

439 

440 
interpretation partial_order ["op <= :: [int, int] => bool"] 

441 
where "partial_order.less (op <=) (x::int) y = (x < y)" 

442 

23977  443 
Typically, the constant `partial_order.less' is created by a definition 
444 
specification element in the context of locale partial_order. 

23920  445 

18233  446 
* Provers/induct: improved internal context management to support 
447 
local fixes and defines onthefly. Thus explicit metalevel 

448 
connectives !! and ==> are rarely required anymore in inductive goals 

449 
(using objectlogic connectives for this purpose has been long 

450 
obsolete anyway). The subsequent proof patterns illustrate advanced 

451 
techniques of natural induction; general datatypes and inductive sets 

18267  452 
work analogously (see also src/HOL/Lambda for realistic examples). 
453 

454 
(1) This is how to ``strengthen'' an inductive goal wrt. certain 

18239  455 
parameters: 
18233  456 

457 
lemma 

458 
fixes n :: nat and x :: 'a 

459 
assumes a: "A n x" 

460 
shows "P n x" 

461 
using a  {* make induct insert fact a *} 

20503  462 
proof (induct n arbitrary: x)  {* generalize goal to "!!x. A n x ==> P n x" *} 
18248  463 
case 0 
18233  464 
show ?case sorry 
465 
next 

18248  466 
case (Suc n) 
18239  467 
note `!!x. A n x ==> P n x`  {* induction hypothesis, according to induction rule *} 
468 
note `A (Suc n) x`  {* induction premise, stemming from fact a *} 

18233  469 
show ?case sorry 
470 
qed 

471 

18267  472 
(2) This is how to perform induction over ``expressions of a certain 
18233  473 
form'', using a locally defined inductive parameter n == "a x" 
18239  474 
together with strengthening (the latter is usually required to get 
18267  475 
sufficiently flexible induction hypotheses): 
18233  476 

477 
lemma 

478 
fixes a :: "'a => nat" 

479 
assumes a: "A (a x)" 

480 
shows "P (a x)" 

481 
using a 

20503  482 
proof (induct n == "a x" arbitrary: x) 
18233  483 
... 
484 

18267  485 
See also HOL/Isar_examples/Puzzle.thy for an application of the this 
486 
particular technique. 

487 

18901  488 
(3) This is how to perform existential reasoning ('obtains' or 
489 
'obtain') by induction, while avoiding explicit objectlogic 

490 
encodings: 

491 

492 
lemma 

493 
fixes n :: nat 

494 
obtains x :: 'a where "P n x" and "Q n x" 

20503  495 
proof (induct n arbitrary: thesis) 
18267  496 
case 0 
497 
obtain x where "P 0 x" and "Q 0 x" sorry 

18399  498 
then show thesis by (rule 0) 
18267  499 
next 
500 
case (Suc n) 

501 
obtain x where "P n x" and "Q n x" by (rule Suc.hyps) 

502 
obtain x where "P (Suc n) x" and "Q (Suc n) x" sorry 

503 
then show thesis by (rule Suc.prems) 

504 
qed 

505 

20503  506 
Here the 'arbitrary: thesis' specification essentially modifies the 
507 
scope of the formal thesis parameter, in order to the get the whole 

18267  508 
existence statement through the induction as expected. 
18233  509 

18506
96260fb11449
* Provers/induct: support simultaneous goals with mutual rules;
wenzelm
parents:
18495
diff
changeset

510 
* Provers/induct: mutual induction rules are now specified as a list 
96260fb11449
* Provers/induct: support simultaneous goals with mutual rules;
wenzelm
parents:
18495
diff
changeset

511 
of rule sharing the same induction cases. HOL packages usually 
96260fb11449
* Provers/induct: support simultaneous goals with mutual rules;
wenzelm
parents:
18495
diff
changeset

512 
provide foo_bar.inducts for mutually defined items foo and bar 
96260fb11449
* Provers/induct: support simultaneous goals with mutual rules;
wenzelm
parents:
18495
diff
changeset

513 
(e.g. inductive sets or datatypes). INCOMPATIBILITY, users need to 
96260fb11449
* Provers/induct: support simultaneous goals with mutual rules;
wenzelm
parents:
18495
diff
changeset

514 
specify mutual induction rules differently, i.e. like this: 
96260fb11449
* Provers/induct: support simultaneous goals with mutual rules;
wenzelm
parents:
18495
diff
changeset

515 

96260fb11449
* Provers/induct: support simultaneous goals with mutual rules;
wenzelm
parents:
18495
diff
changeset

516 
(induct rule: foo_bar.inducts) 
96260fb11449
* Provers/induct: support simultaneous goals with mutual rules;
wenzelm
parents:
18495
diff
changeset

517 
(induct set: foo bar) 
96260fb11449
* Provers/induct: support simultaneous goals with mutual rules;
wenzelm
parents:
18495
diff
changeset

518 
(induct type: foo bar) 
96260fb11449
* Provers/induct: support simultaneous goals with mutual rules;
wenzelm
parents:
18495
diff
changeset

519 

96260fb11449
* Provers/induct: support simultaneous goals with mutual rules;
wenzelm
parents:
18495
diff
changeset

520 
The ML function ProjectRule.projections turns oldstyle rules into the 
96260fb11449
* Provers/induct: support simultaneous goals with mutual rules;
wenzelm
parents:
18495
diff
changeset

521 
new format. 
96260fb11449
* Provers/induct: support simultaneous goals with mutual rules;
wenzelm
parents:
18495
diff
changeset

522 

96260fb11449
* Provers/induct: support simultaneous goals with mutual rules;
wenzelm
parents:
18495
diff
changeset

523 
* Provers/induct: improved handling of simultaneous goals. Instead of 
96260fb11449
* Provers/induct: support simultaneous goals with mutual rules;
wenzelm
parents:
18495
diff
changeset

524 
introducing objectlevel conjunction, the statement is now split into 
96260fb11449
* Provers/induct: support simultaneous goals with mutual rules;
wenzelm
parents:
18495
diff
changeset

525 
several conclusions, while the corresponding symbolic cases are 
18601
b248754b60bc
* Provers/induct: improved simultaneous goals  nested cases;
wenzelm
parents:
18590
diff
changeset

526 
nested accordingly. INCOMPATIBILITY, proofs need to be structured 
b248754b60bc
* Provers/induct: improved simultaneous goals  nested cases;
wenzelm
parents:
18590
diff
changeset

527 
explicitly. For example: 
18480
8ac97f71369d
* induct: improved treatment of mutual goals and mutual rules;
wenzelm
parents:
18450
diff
changeset

528 

8ac97f71369d
* induct: improved treatment of mutual goals and mutual rules;
wenzelm
parents:
18450
diff
changeset

529 
lemma 
8ac97f71369d
* induct: improved treatment of mutual goals and mutual rules;
wenzelm
parents:
18450
diff
changeset

530 
fixes n :: nat 
8ac97f71369d
* induct: improved treatment of mutual goals and mutual rules;
wenzelm
parents:
18450
diff
changeset

531 
shows "P n" and "Q n" 
8ac97f71369d
* induct: improved treatment of mutual goals and mutual rules;
wenzelm
parents:
18450
diff
changeset

532 
proof (induct n) 
18601
b248754b60bc
* Provers/induct: improved simultaneous goals  nested cases;
wenzelm
parents:
18590
diff
changeset

533 
case 0 case 1 
18480
8ac97f71369d
* induct: improved treatment of mutual goals and mutual rules;
wenzelm
parents:
18450
diff
changeset

534 
show "P 0" sorry 
8ac97f71369d
* induct: improved treatment of mutual goals and mutual rules;
wenzelm
parents:
18450
diff
changeset

535 
next 
18601
b248754b60bc
* Provers/induct: improved simultaneous goals  nested cases;
wenzelm
parents:
18590
diff
changeset

536 
case 0 case 2 
18480
8ac97f71369d
* induct: improved treatment of mutual goals and mutual rules;
wenzelm
parents:
18450
diff
changeset

537 
show "Q 0" sorry 
8ac97f71369d
* induct: improved treatment of mutual goals and mutual rules;
wenzelm
parents:
18450
diff
changeset

538 
next 
18601
b248754b60bc
* Provers/induct: improved simultaneous goals  nested cases;
wenzelm
parents:
18590
diff
changeset

539 
case (Suc n) case 1 
18480
8ac97f71369d
* induct: improved treatment of mutual goals and mutual rules;
wenzelm
parents:
18450
diff
changeset

540 
note `P n` and `Q n` 
8ac97f71369d
* induct: improved treatment of mutual goals and mutual rules;
wenzelm
parents:
18450
diff
changeset

541 
show "P (Suc n)" sorry 
8ac97f71369d
* induct: improved treatment of mutual goals and mutual rules;
wenzelm
parents:
18450
diff
changeset

542 
next 
18601
b248754b60bc
* Provers/induct: improved simultaneous goals  nested cases;
wenzelm
parents:
18590
diff
changeset

543 
case (Suc n) case 2 
18480
8ac97f71369d
* induct: improved treatment of mutual goals and mutual rules;
wenzelm
parents:
18450
diff
changeset

544 
note `P n` and `Q n` 
8ac97f71369d
* induct: improved treatment of mutual goals and mutual rules;
wenzelm
parents:
18450
diff
changeset

545 
show "Q (Suc n)" sorry 
8ac97f71369d
* induct: improved treatment of mutual goals and mutual rules;
wenzelm
parents:
18450
diff
changeset

546 
qed 
8ac97f71369d
* induct: improved treatment of mutual goals and mutual rules;
wenzelm
parents:
18450
diff
changeset

547 

18601
b248754b60bc
* Provers/induct: improved simultaneous goals  nested cases;
wenzelm
parents:
18590
diff
changeset

548 
The split into subcases may be deferred as follows  this is 
b248754b60bc
* Provers/induct: improved simultaneous goals  nested cases;
wenzelm
parents:
18590
diff
changeset

549 
particularly relevant for goal statements with local premises. 
b248754b60bc
* Provers/induct: improved simultaneous goals  nested cases;
wenzelm
parents:
18590
diff
changeset

550 

b248754b60bc
* Provers/induct: improved simultaneous goals  nested cases;
wenzelm
parents:
18590
diff
changeset

551 
lemma 
b248754b60bc
* Provers/induct: improved simultaneous goals  nested cases;
wenzelm
parents:
18590
diff
changeset

552 
fixes n :: nat 
b248754b60bc
* Provers/induct: improved simultaneous goals  nested cases;
wenzelm
parents:
18590
diff
changeset

553 
shows "A n ==> P n" and "B n ==> Q n" 
b248754b60bc
* Provers/induct: improved simultaneous goals  nested cases;
wenzelm
parents:
18590
diff
changeset

554 
proof (induct n) 
b248754b60bc
* Provers/induct: improved simultaneous goals  nested cases;
wenzelm
parents:
18590
diff
changeset

555 
case 0 
b248754b60bc
* Provers/induct: improved simultaneous goals  nested cases;
wenzelm
parents:
18590
diff
changeset

556 
{ 
b248754b60bc
* Provers/induct: improved simultaneous goals  nested cases;
wenzelm
parents:
18590
diff
changeset

557 
case 1 
b248754b60bc
* Provers/induct: improved simultaneous goals  nested cases;
wenzelm
parents:
18590
diff
changeset

558 
note `A 0` 
b248754b60bc
* Provers/induct: improved simultaneous goals  nested cases;
wenzelm
parents:
18590
diff
changeset

559 
show "P 0" sorry 
b248754b60bc
* Provers/induct: improved simultaneous goals  nested cases;
wenzelm
parents:
18590
diff
changeset

560 
next 
b248754b60bc
* Provers/induct: improved simultaneous goals  nested cases;
wenzelm
parents:
18590
diff
changeset

561 
case 2 
b248754b60bc
* Provers/induct: improved simultaneous goals  nested cases;
wenzelm
parents:
18590
diff
changeset

562 
note `B 0` 
b248754b60bc
* Provers/induct: improved simultaneous goals  nested cases;
wenzelm
parents:
18590
diff
changeset

563 
show "Q 0" sorry 
b248754b60bc
* Provers/induct: improved simultaneous goals  nested cases;
wenzelm
parents:
18590
diff
changeset

564 
} 
b248754b60bc
* Provers/induct: improved simultaneous goals  nested cases;
wenzelm
parents:
18590
diff
changeset

565 
next 
b248754b60bc
* Provers/induct: improved simultaneous goals  nested cases;
wenzelm
parents:
18590
diff
changeset

566 
case (Suc n) 
b248754b60bc
* Provers/induct: improved simultaneous goals  nested cases;
wenzelm
parents:
18590
diff
changeset

567 
note `A n ==> P n` and `B n ==> Q n` 
b248754b60bc
* Provers/induct: improved simultaneous goals  nested cases;
wenzelm
parents:
18590
diff
changeset

568 
{ 
b248754b60bc
* Provers/induct: improved simultaneous goals  nested cases;
wenzelm
parents:
18590
diff
changeset

569 
case 1 
b248754b60bc
* Provers/induct: improved simultaneous goals  nested cases;
wenzelm
parents:
18590
diff
changeset

570 
note `A (Suc n)` 
b248754b60bc
* Provers/induct: improved simultaneous goals  nested cases;
wenzelm
parents:
18590
diff
changeset

571 
show "P (Suc n)" sorry 
b248754b60bc
* Provers/induct: improved simultaneous goals  nested cases;
wenzelm
parents:
18590
diff
changeset

572 
next 
b248754b60bc
* Provers/induct: improved simultaneous goals  nested cases;
wenzelm
parents:
18590
diff
changeset

573 
case 2 
b248754b60bc
* Provers/induct: improved simultaneous goals  nested cases;
wenzelm
parents:
18590
diff
changeset

574 
note `B (Suc n)` 
b248754b60bc
* Provers/induct: improved simultaneous goals  nested cases;
wenzelm
parents:
18590
diff
changeset

575 
show "Q (Suc n)" sorry 
b248754b60bc
* Provers/induct: improved simultaneous goals  nested cases;
wenzelm
parents:
18590
diff
changeset

576 
} 
b248754b60bc
* Provers/induct: improved simultaneous goals  nested cases;
wenzelm
parents:
18590
diff
changeset

577 
qed 
b248754b60bc
* Provers/induct: improved simultaneous goals  nested cases;
wenzelm
parents:
18590
diff
changeset

578 

18506
96260fb11449
* Provers/induct: support simultaneous goals with mutual rules;
wenzelm
parents:
18495
diff
changeset

579 
If simultaneous goals are to be used with mutual rules, the statement 
96260fb11449
* Provers/induct: support simultaneous goals with mutual rules;
wenzelm
parents:
18495
diff
changeset

580 
needs to be structured carefully as a twolevel conjunction, using 
96260fb11449
* Provers/induct: support simultaneous goals with mutual rules;
wenzelm
parents:
18495
diff
changeset

581 
lists of propositions separated by 'and': 
96260fb11449
* Provers/induct: support simultaneous goals with mutual rules;
wenzelm
parents:
18495
diff
changeset

582 

18507  583 
lemma 
584 
shows "a : A ==> P1 a" 

585 
"a : A ==> P2 a" 

586 
and "b : B ==> Q1 b" 

587 
"b : B ==> Q2 b" 

588 
"b : B ==> Q3 b" 

589 
proof (induct set: A B) 

18480
8ac97f71369d
* induct: improved treatment of mutual goals and mutual rules;
wenzelm
parents:
18450
diff
changeset

590 

18399  591 
* Provers/induct: support coinduction as well. See 
592 
src/HOL/Library/Coinductive_List.thy for various examples. 

593 

20919
dab803075c62
attribute "symmetric": standardized schematic variables;
wenzelm
parents:
20857
diff
changeset

594 
* Attribute "symmetric" produces result with standardized schematic 
dab803075c62
attribute "symmetric": standardized schematic variables;
wenzelm
parents:
20857
diff
changeset

595 
variables (index 0). Potential INCOMPATIBILITY. 
dab803075c62
attribute "symmetric": standardized schematic variables;
wenzelm
parents:
20857
diff
changeset

596 

22126  597 
* Simplifier: by default the simplifier trace only shows top level 
598 
rewrites now. That is, trace_simp_depth_limit is set to 1 by 

599 
default. Thus there is less danger of being flooded by the trace. The 

600 
trace indicates where parts have been suppressed. 

18674  601 

18536
ab3f32f86847
* Provers/classical: removed obsolete classical version of elim_format;
wenzelm
parents:
18507
diff
changeset

602 
* Provers/classical: removed obsolete classical version of elim_format 
ab3f32f86847
* Provers/classical: removed obsolete classical version of elim_format;
wenzelm
parents:
18507
diff
changeset

603 
attribute; classical elim/dest rules are now treated uniformly when 
ab3f32f86847
* Provers/classical: removed obsolete classical version of elim_format;
wenzelm
parents:
18507
diff
changeset

604 
manipulating the claset. 
ab3f32f86847
* Provers/classical: removed obsolete classical version of elim_format;
wenzelm
parents:
18507
diff
changeset

605 

18694  606 
* Provers/classical: stricter checks to ensure that supplied intro, 
607 
dest and elim rules are wellformed; dest and elim rules must have at 

608 
least one premise. 

609 

610 
* Provers/classical: attributes dest/elim/intro take an optional 

18695  611 
weight argument for the rule (just as the Pure versions). Weights are 
18696  612 
ignored by automated tools, but determine the search order of single 
18694  613 
rule steps. 
18557
60a0f9caa0a2
Provers/classical: stricter checks to ensure that supplied intro, dest and
paulson
parents:
18549
diff
changeset

614 

18536
ab3f32f86847
* Provers/classical: removed obsolete classical version of elim_format;
wenzelm
parents:
18507
diff
changeset

615 
* Syntax: input syntax now supports dummy variable binding "%_. b", 
ab3f32f86847
* Provers/classical: removed obsolete classical version of elim_format;
wenzelm
parents:
18507
diff
changeset

616 
where the body does not mention the bound variable. Note that dummy 
ab3f32f86847
* Provers/classical: removed obsolete classical version of elim_format;
wenzelm
parents:
18507
diff
changeset

617 
patterns implicitly depend on their context of bounds, which makes 
ab3f32f86847
* Provers/classical: removed obsolete classical version of elim_format;
wenzelm
parents:
18507
diff
changeset

618 
"{_. _}" match any set comprehension as expected. Potential 
ab3f32f86847
* Provers/classical: removed obsolete classical version of elim_format;
wenzelm
parents:
18507
diff
changeset

619 
INCOMPATIBILITY  parse translations need to cope with syntactic 
ab3f32f86847
* Provers/classical: removed obsolete classical version of elim_format;
wenzelm
parents:
18507
diff
changeset

620 
constant "_idtdummy" in the binding position. 
ab3f32f86847
* Provers/classical: removed obsolete classical version of elim_format;
wenzelm
parents:
18507
diff
changeset

621 

ab3f32f86847
* Provers/classical: removed obsolete classical version of elim_format;
wenzelm
parents:
18507
diff
changeset

622 
* Syntax: removed obsolete syntactic constant "_K" and its associated 
ab3f32f86847
* Provers/classical: removed obsolete classical version of elim_format;
wenzelm
parents:
18507
diff
changeset

623 
parse translation. INCOMPATIBILITY  use dummy abstraction instead, 
ab3f32f86847
* Provers/classical: removed obsolete classical version of elim_format;
wenzelm
parents:
18507
diff
changeset

624 
for example "A > B" => "Pi A (%_. B)". 
17779  625 

20582
ebd0e03c6a9b
* Pure: 'class_deps' command visualizes the subclass relation;
wenzelm
parents:
20503
diff
changeset

626 
* Pure: 'class_deps' command visualizes the subclass relation, using 
ebd0e03c6a9b
* Pure: 'class_deps' command visualizes the subclass relation;
wenzelm
parents:
20503
diff
changeset

627 
the graph browser tool. 
ebd0e03c6a9b
* Pure: 'class_deps' command visualizes the subclass relation;
wenzelm
parents:
20503
diff
changeset

628 

20620
8b26f58c5646
* Pure: 'print_theory' now suppresses entities with internal name;
wenzelm
parents:
20607
diff
changeset

629 
* Pure: 'print_theory' now suppresses entities with internal name 
8b26f58c5646
* Pure: 'print_theory' now suppresses entities with internal name;
wenzelm
parents:
20607
diff
changeset

630 
(trailing "_") by default; use '!' option for full details. 
8b26f58c5646
* Pure: 'print_theory' now suppresses entities with internal name;
wenzelm
parents:
20607
diff
changeset

631 

17865  632 

17806  633 
*** HOL *** 
634 

23850  635 
* Code generator library theories: 
636 
* Pretty_Int represents HOL integers by big integer literals in target 

637 
languages. 

638 
* Pretty_Char represents HOL characters by character literals in target 

639 
languages. 

640 
* Pretty_Char_chr like Pretty_Char, but also offers treatment of character 

641 
codes; includes Pretty_Int. 

642 
* Executable_Set allows to generate code for finite sets using lists. 

643 
* Executable_Rat implements rational numbers as triples (sign, enumerator, 

644 
denominator). 

645 
* Executable_Real implements a subset of real numbers, namly those 

646 
representable by rational numbers. 

647 
* Efficient_Nat implements natural numbers by integers, which in general will 

648 
result in higher efficency; pattern matching with 0/Suc is eliminated; 

649 
includes Pretty_Int. 

650 
* ML_String provides an additional datatype ml_string; in the HOL default 

651 
setup, strings in HOL are mapped to lists of HOL characters in SML; values 

652 
of type ml_string are mapped to strings in SML. 

653 
* ML_Int provides an additional datatype ml_int which is mapped to to SML 

654 
builtin integers. 

655 

23783
e4d514f81d95
Added entry for new inductive definition package.
berghofe
parents:
23565
diff
changeset

656 
* New package for inductive predicates 
e4d514f81d95
Added entry for new inductive definition package.
berghofe
parents:
23565
diff
changeset

657 

e4d514f81d95
Added entry for new inductive definition package.
berghofe
parents:
23565
diff
changeset

658 
An nary predicate p with m parameters z_1, ..., z_m can now be defined via 
e4d514f81d95
Added entry for new inductive definition package.
berghofe
parents:
23565
diff
changeset

659 

e4d514f81d95
Added entry for new inductive definition package.
berghofe
parents:
23565
diff
changeset

660 
inductive 
e4d514f81d95
Added entry for new inductive definition package.
berghofe
parents:
23565
diff
changeset

661 
p :: "U_1 => ... => U_m => T_1 => ... => T_n => bool" 
e4d514f81d95
Added entry for new inductive definition package.
berghofe
parents:
23565
diff
changeset

662 
for z_1 :: U_1 and ... and z_n :: U_m 
e4d514f81d95
Added entry for new inductive definition package.
berghofe
parents:
23565
diff
changeset

663 
where 
e4d514f81d95
Added entry for new inductive definition package.
berghofe
parents:
23565
diff
changeset

664 
rule_1: "... ==> p z_1 ... z_m t_1_1 ... t_1_n" 
e4d514f81d95
Added entry for new inductive definition package.
berghofe
parents:
23565
diff
changeset

665 
 ... 
e4d514f81d95
Added entry for new inductive definition package.
berghofe
parents:
23565
diff
changeset

666 

e4d514f81d95
Added entry for new inductive definition package.
berghofe
parents:
23565
diff
changeset

667 
rather than 
e4d514f81d95
Added entry for new inductive definition package.
berghofe
parents:
23565
diff
changeset

668 

e4d514f81d95
Added entry for new inductive definition package.
berghofe
parents:
23565
diff
changeset

669 
consts s :: "U_1 => ... => U_m => (T_1 * ... * T_n) set" 
e4d514f81d95
Added entry for new inductive definition package.
berghofe
parents:
23565
diff
changeset

670 

e4d514f81d95
Added entry for new inductive definition package.
berghofe
parents:
23565
diff
changeset

671 
abbreviation p :: "U_1 => ... => U_m => T_1 => ... => T_n => bool" 
e4d514f81d95
Added entry for new inductive definition package.
berghofe
parents:
23565
diff
changeset

672 
where "p z_1 ... z_m x_1 ... x_n == (x_1, ..., x_n) : s z_1 ... z_m" 
e4d514f81d95
Added entry for new inductive definition package.
berghofe
parents:
23565
diff
changeset

673 

e4d514f81d95
Added entry for new inductive definition package.
berghofe
parents:
23565
diff
changeset

674 
inductive "s z_1 ... z_m" 
e4d514f81d95
Added entry for new inductive definition package.
berghofe
parents:
23565
diff
changeset

675 
intros 
e4d514f81d95
Added entry for new inductive definition package.
berghofe
parents:
23565
diff
changeset

676 
rule_1: "... ==> (t_1_1, ..., t_1_n) : s z_1 ... z_m" 
e4d514f81d95
Added entry for new inductive definition package.
berghofe
parents:
23565
diff
changeset

677 
... 
e4d514f81d95
Added entry for new inductive definition package.
berghofe
parents:
23565
diff
changeset

678 

e4d514f81d95
Added entry for new inductive definition package.
berghofe
parents:
23565
diff
changeset

679 
For backward compatibility, there is a wrapper allowing inductive 
e4d514f81d95
Added entry for new inductive definition package.
berghofe
parents:
23565
diff
changeset

680 
sets to be defined with the new package via 
e4d514f81d95
Added entry for new inductive definition package.
berghofe
parents:
23565
diff
changeset

681 

e4d514f81d95
Added entry for new inductive definition package.
berghofe
parents:
23565
diff
changeset

682 
inductive_set 
e4d514f81d95
Added entry for new inductive definition package.
berghofe
parents:
23565
diff
changeset

683 
s :: "U_1 => ... => U_m => (T_1 * ... * T_n) set" 
e4d514f81d95
Added entry for new inductive definition package.
berghofe
parents:
23565
diff
changeset

684 
for z_1 :: U_1 and ... and z_n :: U_m 
e4d514f81d95
Added entry for new inductive definition package.
berghofe
parents:
23565
diff
changeset

685 
where 
e4d514f81d95
Added entry for new inductive definition package.
berghofe
parents:
23565
diff
changeset

686 
rule_1: "... ==> (t_1_1, ..., t_1_n) : s z_1 ... z_m" 
e4d514f81d95
Added entry for new inductive definition package.
berghofe
parents:
23565
diff
changeset

687 
 ... 
e4d514f81d95
Added entry for new inductive definition package.
berghofe
parents:
23565
diff
changeset

688 

e4d514f81d95
Added entry for new inductive definition package.
berghofe
parents:
23565
diff
changeset

689 
or 
e4d514f81d95
Added entry for new inductive definition package.
berghofe
parents:
23565
diff
changeset

690 

e4d514f81d95
Added entry for new inductive definition package.
berghofe
parents:
23565
diff
changeset

691 
inductive_set 
e4d514f81d95
Added entry for new inductive definition package.
berghofe
parents:
23565
diff
changeset

692 
s :: "U_1 => ... => U_m => (T_1 * ... * T_n) set" 
e4d514f81d95
Added entry for new inductive definition package.
berghofe
parents:
23565
diff
changeset

693 
and p :: "U_1 => ... => U_m => T_1 => ... => T_n => bool" 
e4d514f81d95
Added entry for new inductive definition package.
berghofe
parents:
23565
diff
changeset

694 
for z_1 :: U_1 and ... and z_n :: U_m 
e4d514f81d95
Added entry for new inductive definition package.
berghofe
parents:
23565
diff
changeset

695 
where 
e4d514f81d95
Added entry for new inductive definition package.
berghofe
parents:
23565
diff
changeset

696 
"p z_1 ... z_m x_1 ... x_n == (x_1, ..., x_n) : s z_1 ... z_m" 
e4d514f81d95
Added entry for new inductive definition package.
berghofe
parents:
23565
diff
changeset

697 
 rule_1: "... ==> p z_1 ... z_m t_1_1 ... t_1_n" 
e4d514f81d95
Added entry for new inductive definition package.
berghofe
parents:
23565
diff
changeset

698 
 ... 
e4d514f81d95
Added entry for new inductive definition package.
berghofe
parents:
23565
diff
changeset

699 

e4d514f81d95
Added entry for new inductive definition package.
berghofe
parents:
23565
diff
changeset

700 
if the additional syntax "p ..." is required. 
e4d514f81d95
Added entry for new inductive definition package.
berghofe
parents:
23565
diff
changeset

701 

e4d514f81d95
Added entry for new inductive definition package.
berghofe
parents:
23565
diff
changeset

702 
Many examples can be found in the subdirectories Auth, Bali, Induct, 
e4d514f81d95
Added entry for new inductive definition package.
berghofe
parents:
23565
diff
changeset

703 
or MicroJava. 
e4d514f81d95
Added entry for new inductive definition package.
berghofe
parents:
23565
diff
changeset

704 

e4d514f81d95
Added entry for new inductive definition package.
berghofe
parents:
23565
diff
changeset

705 
INCOMPATIBILITIES: 
e4d514f81d95
Added entry for new inductive definition package.
berghofe
parents:
23565
diff
changeset

706 

e4d514f81d95
Added entry for new inductive definition package.
berghofe
parents:
23565
diff
changeset

707 
 Since declaration and definition of inductive sets or predicates 
e4d514f81d95
Added entry for new inductive definition package.
berghofe
parents:
23565
diff
changeset

708 
is no longer separated, abbreviations involving the newly introduced 
e4d514f81d95
Added entry for new inductive definition package.
berghofe
parents:
23565
diff
changeset

709 
sets or predicates must be specified together with the introduction 
e4d514f81d95
Added entry for new inductive definition package.
berghofe
parents:
23565
diff
changeset

710 
rules after the "where" keyword (see example above), rather than before 
e4d514f81d95
Added entry for new inductive definition package.
berghofe
parents:
23565
diff
changeset

711 
the actual inductive definition. 
e4d514f81d95
Added entry for new inductive definition package.
berghofe
parents:
23565
diff
changeset

712 

e4d514f81d95
Added entry for new inductive definition package.
berghofe
parents:
23565
diff
changeset

713 
 The variables in induction and elimination rules are now quantified 
e4d514f81d95
Added entry for new inductive definition package.
berghofe
parents:
23565
diff
changeset

714 
in the order of their occurrence in the introduction rules, rather than 
e4d514f81d95
Added entry for new inductive definition package.
berghofe
parents:
23565
diff
changeset

715 
in alphabetical order. Since this may break some proofs, these proofs 
e4d514f81d95
Added entry for new inductive definition package.
berghofe
parents:
23565
diff
changeset

716 
either have to be repaired, e.g. by reordering the variables 
e4d514f81d95
Added entry for new inductive definition package.
berghofe
parents:
23565
diff
changeset

717 
a_i_1 ... a_i_{k_i} in Isar "case" statements of the form 
e4d514f81d95
Added entry for new inductive definition package.
berghofe
parents:
23565
diff
changeset

718 

e4d514f81d95
Added entry for new inductive definition package.
berghofe
parents:
23565
diff
changeset

719 
case (rule_i a_i_1 ... a_i_{k_i}) 
e4d514f81d95
Added entry for new inductive definition package.
berghofe
parents:
23565
diff
changeset

720 

e4d514f81d95
Added entry for new inductive definition package.
berghofe
parents:
23565
diff
changeset

721 
or the old order of quantification has to be restored by explicitly adding 
e4d514f81d95
Added entry for new inductive definition package.
berghofe
parents:
23565
diff
changeset

722 
metalevel quantifiers in the introduction rules, i.e. 
e4d514f81d95
Added entry for new inductive definition package.
berghofe
parents:
23565
diff
changeset

723 

e4d514f81d95
Added entry for new inductive definition package.
berghofe
parents:
23565
diff
changeset

724 
 rule_i: "!!a_i_1 ... a_i_{k_i}. ... ==> p z_1 ... z_m t_i_1 ... t_i_n" 
e4d514f81d95
Added entry for new inductive definition package.
berghofe
parents:
23565
diff
changeset

725 

e4d514f81d95
Added entry for new inductive definition package.
berghofe
parents:
23565
diff
changeset

726 
 The format of the elimination rules is now 
e4d514f81d95
Added entry for new inductive definition package.
berghofe
parents:
23565
diff
changeset

727 

e4d514f81d95
Added entry for new inductive definition package.
berghofe
parents:
23565
diff
changeset

728 
p z_1 ... z_m x_1 ... x_n ==> 
e4d514f81d95
Added entry for new inductive definition package.
berghofe
parents:
23565
diff
changeset

729 
(!!a_1_1 ... a_1_{k_1}. x_1 = t_1_1 ==> ... ==> x_n = t_1_n ==> ... ==> P) 
e4d514f81d95
Added entry for new inductive definition package.
berghofe
parents:
23565
diff
changeset

730 
==> ... ==> P 
e4d514f81d95
Added entry for new inductive definition package.
berghofe
parents:
23565
diff
changeset

731 

e4d514f81d95
Added entry for new inductive definition package.
berghofe
parents:
23565
diff
changeset

732 
for predicates and 
e4d514f81d95
Added entry for new inductive definition package.
berghofe
parents:
23565
diff
changeset

733 

e4d514f81d95
Added entry for new inductive definition package.
berghofe
parents:
23565
diff
changeset

734 
(x_1, ..., x_n) : s z_1 ... z_m ==> 
e4d514f81d95
Added entry for new inductive definition package.
berghofe
parents:
23565
diff
changeset

735 
(!!a_1_1 ... a_1_{k_1}. x_1 = t_1_1 ==> ... ==> x_n = t_1_n ==> ... ==> P) 
e4d514f81d95
Added entry for new inductive definition package.
berghofe
parents:
23565
diff
changeset

736 
==> ... ==> P 
e4d514f81d95
Added entry for new inductive definition package.
berghofe
parents:
23565
diff
changeset

737 

e4d514f81d95
Added entry for new inductive definition package.
berghofe
parents:
23565
diff
changeset

738 
for sets rather than 
e4d514f81d95
Added entry for new inductive definition package.
berghofe
parents:
23565
diff
changeset

739 

e4d514f81d95
Added entry for new inductive definition package.
berghofe
parents:
23565
diff
changeset

740 
x : s z_1 ... z_m ==> 
e4d514f81d95
Added entry for new inductive definition package.
berghofe
parents:
23565
diff
changeset

741 
(!!a_1_1 ... a_1_{k_1}. x = (t_1_1, ..., t_1_n) ==> ... ==> P) 
e4d514f81d95
Added entry for new inductive definition package.
berghofe
parents:
23565
diff
changeset

742 
==> ... ==> P 
e4d514f81d95
Added entry for new inductive definition package.
berghofe
parents:
23565
diff
changeset

743 

e4d514f81d95
Added entry for new inductive definition package.
berghofe
parents:
23565
diff
changeset

744 
This may require terms in goals to be expanded to ntuples (e.g. using case_tac 
e4d514f81d95
Added entry for new inductive definition package.
berghofe
parents:
23565
diff
changeset

745 
or simplification with the split_paired_all rule) before the above elimination 
e4d514f81d95
Added entry for new inductive definition package.
berghofe
parents:
23565
diff
changeset

746 
rule is applicable. 
e4d514f81d95
Added entry for new inductive definition package.
berghofe
parents:
23565
diff
changeset

747 

e4d514f81d95
Added entry for new inductive definition package.
berghofe
parents:
23565
diff
changeset

748 
 The elimination or case analysis rules for (mutually) inductive sets or 
e4d514f81d95
Added entry for new inductive definition package.
berghofe
parents:
23565
diff
changeset

749 
predicates are now called "p_1.cases" ... "p_k.cases". The list of rules 
e4d514f81d95
Added entry for new inductive definition package.
berghofe
parents:
23565
diff
changeset

750 
"p_1_..._p_k.elims" is no longer available. 
e4d514f81d95
Added entry for new inductive definition package.
berghofe
parents:
23565
diff
changeset

751 

23562  752 
* Method "metis" proves goals by applying the Metis generalpurpose 
753 
resolution prover. Examples are in the directory MetisExamples. See 

754 
also http://gilith.com/software/metis/ 

23449  755 

23562  756 
* Command 'sledgehammer' invokes external automatic theorem provers as 
757 
background processes. It generates calls to the "metis" method if 

758 
successful. These can be pasted into the proof. Users do not have to 

759 
wait for the automatic provers to return. 

23449  760 

23564  761 
* Caseexpressions allow arbitrary constructorpatterns (including "_") and 
23565  762 
take their order into account, like in functional programming. 
23564  763 
Internally, this is translated into nested caseexpressions; missing cases 
764 
are added and mapped to the predefined constant "undefined". In complicated 

765 
cases printing may no longer show the original input but the internal 

23565  766 
form. Lambdaabstractions allow the same form of pattern matching: 
23564  767 
"% pat1 => e1  ..." is an abbreviation for 
768 
"%x. case x of pat1 => e1  ..." where x is a new variable. 

769 

23468  770 
* IntDef: The constant "int :: nat => int" has been removed; now "int" 
771 
is an abbreviation for "of_nat :: nat => int". The simplification rules 

772 
for "of_nat" have been changed to work like "int" did previously. 

773 
(potential INCOMPATIBILITY) 

774 
 "of_nat (Suc m)" simplifies to "1 + of_nat m" instead of "of_nat m + 1" 

775 
 of_nat_diff and of_nat_mult are no longer default simp rules 

23377  776 

23295
86e225406859
Method "algebra" solves polynomial equations over (semi)rings
chaieb
parents:
23251
diff
changeset

777 
* Method "algebra" solves polynomial equations over (semi)rings using 
86e225406859
Method "algebra" solves polynomial equations over (semi)rings
chaieb
parents:
23251
diff
changeset

778 
Groebner bases. The (semi)ring structure is defined by locales and 
86e225406859
Method "algebra" solves polynomial equations over (semi)rings
chaieb
parents:
23251
diff
changeset

779 
the tool setup depends on that generic context. Installing the 
86e225406859
Method "algebra" solves polynomial equations over (semi)rings
chaieb
parents:
23251
diff
changeset

780 
method for a specific type involves instantiating the locale and 
86e225406859
Method "algebra" solves polynomial equations over (semi)rings
chaieb
parents:
23251
diff
changeset

781 
possibly adding declarations for computation on the coefficients. 
86e225406859
Method "algebra" solves polynomial equations over (semi)rings
chaieb
parents:
23251
diff
changeset

782 
The method is already instantiated for natural numbers and for the 
86e225406859
Method "algebra" solves polynomial equations over (semi)rings
chaieb
parents:
23251
diff
changeset

783 
axiomatic class of idoms with numerals. See also the paper by 
86e225406859
Method "algebra" solves polynomial equations over (semi)rings
chaieb
parents:
23251
diff
changeset

784 
Chaieb and Wenzel at CALCULEMUS 2007 for the general principles 
86e225406859
Method "algebra" solves polynomial equations over (semi)rings
chaieb
parents:
23251
diff
changeset

785 
underlying this architecture of contextaware prooftools. 
86e225406859
Method "algebra" solves polynomial equations over (semi)rings
chaieb
parents:
23251
diff
changeset

786 

23029  787 
* constant "List.op @" now named "List.append". Use ML antiquotations 
788 
@{const_name List.append} or @{term " ... @ ... "} to circumvent 

789 
possible incompatibilities when working on ML level. 

790 

22997  791 
* Constant renames due to introduction of canonical name prefixing for 
792 
class package: 

793 

794 
HOL.abs ~> HOL.minus_class.abs 

795 
HOL.divide ~> HOL.divide_class.divide 

796 
Nat.power ~> Nat.power_class.power 

797 
Nat.size ~> Nat.size_class.size 

798 
Numeral.number_of ~> Numeral.number_class.number_of 

23129  799 
FixedPoint.Inf ~> FixedPoint.complete_lattice_class.Inf 
800 

23180  801 
* Rudimentary class target mechanism involves constant renames: 
23129  802 

803 
Orderings.min ~> Orderings.ord_class.min 

804 
Orderings.max ~> Orderings.ord_class.max 

805 
FixedPoint.Sup ~> FixedPoint.complete_lattice_class.Sup 

22997  806 

23564  807 
* primrec: missing cases mapped to "undefined" instead of "arbitrary" 
22845  808 

809 
* new constant "undefined" with axiom "undefined x = undefined" 

810 

811 
* new class "default" with associated constant "default" 

812 

23104  813 
* new function listsum :: 'a list => 'a for arbitrary monoids. 
814 
Special syntax: "SUM x < xs. f x" (and latex variants) 

815 

23210  816 
* new (input only) syntax for Haskelllike list comprehension, eg 
817 
[(x,y). x < xs, y < ys, x ~= y] 

818 
For details see List.thy. 

23102  819 

23300  820 
* The special syntax for function "filter" has changed from [x : xs. P] to 
821 
[x < xs. P] to avoid an ambiguity caused by list comprehension syntax, 

822 
and for uniformity. INCOMPATIBILITY 

823 

23971
e6d505d5b03d
renamed lemma "set_take_whileD" to "set_takeWhileD"
krauss
parents:
23920
diff
changeset

824 
* Lemma "set_take_whileD" renamed to "set_takeWhileD" 
e6d505d5b03d
renamed lemma "set_take_whileD" to "set_takeWhileD"
krauss
parents:
23920
diff
changeset

825 

23480  826 
* New lemma collection field_simps (an extension of ring_simps) 
827 
for manipulating (in)equations involving division. Multiplies 

23481  828 
with all denominators that can be proved to be nonzero (in equations) 
23480  829 
or positive/negative (in inequations). 
830 

831 
* Lemma collections ring_eq_simps, group_eq_simps and ring_distrib 

23478  832 
have been improved and renamed to ring_simps, group_simps and ring_distribs. 
23509  833 
Removed lemmas field_xyz in Ring_and_Field 
834 
because they were subsumed by lemmas xyz. 

835 
INCOMPATIBILITY. 

23478  836 

22799
ed7d53db2170
moved code generation pretty integers and characters to separate theories
haftmann
parents:
22754
diff
changeset

837 
* Library/Pretty_Int.thy: maps HOL numerals on target language integer literals 
23480  838 
when generating code. 
22799
ed7d53db2170
moved code generation pretty integers and characters to separate theories
haftmann
parents:
22754
diff
changeset

839 

ed7d53db2170
moved code generation pretty integers and characters to separate theories
haftmann
parents:
22754
diff
changeset

840 
* Library/Pretty_Char.thy: maps HOL characters on target language character literals 
23480  841 
when generating code. 
22799
ed7d53db2170
moved code generation pretty integers and characters to separate theories
haftmann
parents:
22754
diff
changeset

842 

22735  843 
* Library/Commutative_Ring.thy: switched from recdef to function package; 
23480  844 
constants add, mul, pow now curried. Infix syntax for algebraic operations. 
22735  845 

22450  846 
* Some steps towards more uniform lattice theory development in HOL. 
22422
ee19cdb07528
stepping towards uniform lattice theory development in HOL
haftmann
parents:
22384
diff
changeset

847 

ee19cdb07528
stepping towards uniform lattice theory development in HOL
haftmann
parents:
22384
diff
changeset

848 
constants "meet" and "join" now named "inf" and "sup" 
ee19cdb07528
stepping towards uniform lattice theory development in HOL
haftmann
parents:
22384
diff
changeset

849 
constant "Meet" now named "Inf" 
ee19cdb07528
stepping towards uniform lattice theory development in HOL
haftmann
parents:
22384
diff
changeset

850 

22450  851 
classes "meet_semilorder" and "join_semilorder" now named 
852 
"lower_semilattice" and "upper_semilattice" 

853 
class "lorder" now named "lattice" 

854 
class "comp_lat" now named "complete_lattice" 

855 

856 
Instantiation of lattice classes allows explicit definitions 

857 
for "inf" and "sup" operations. 

858 

23129  859 
INCOMPATIBILITY. Theorem renames: 
22450  860 

22422
ee19cdb07528
stepping towards uniform lattice theory development in HOL
haftmann
parents:
22384
diff
changeset

861 
meet_left_le ~> inf_le1 
ee19cdb07528
stepping towards uniform lattice theory development in HOL
haftmann
parents:
22384
diff
changeset

862 
meet_right_le ~> inf_le2 
ee19cdb07528
stepping towards uniform lattice theory development in HOL
haftmann
parents:
22384
diff
changeset

863 
join_left_le ~> sup_ge1 
ee19cdb07528
stepping towards uniform lattice theory development in HOL
haftmann
parents:
22384
diff
changeset

864 
join_right_le ~> sup_ge2 
ee19cdb07528
stepping towards uniform lattice theory development in HOL
haftmann
parents:
22384
diff
changeset

865 
meet_join_le ~> inf_sup_ord 
ee19cdb07528
stepping towards uniform lattice theory development in HOL
haftmann
parents:
22384
diff
changeset

866 
le_meetI ~> le_infI 
ee19cdb07528
stepping towards uniform lattice theory development in HOL
haftmann
parents:
22384
diff
changeset

867 
join_leI ~> le_supI 
ee19cdb07528
stepping towards uniform lattice theory development in HOL
haftmann
parents:
22384
diff
changeset

868 
le_meet ~> le_inf_iff 
ee19cdb07528
stepping towards uniform lattice theory development in HOL
haftmann
parents:
22384
diff
changeset

869 
le_join ~> ge_sup_conv 
ee19cdb07528
stepping towards uniform lattice theory development in HOL
haftmann
parents:
22384
diff
changeset

870 
meet_idempotent ~> inf_idem 
ee19cdb07528
stepping towards uniform lattice theory development in HOL
haftmann
parents:
22384
diff
changeset

871 
join_idempotent ~> sup_idem 
ee19cdb07528
stepping towards uniform lattice theory development in HOL
haftmann
parents:
22384
diff
changeset

872 
meet_comm ~> inf_commute 
ee19cdb07528
stepping towards uniform lattice theory development in HOL
haftmann
parents:
22384
diff
changeset

873 
join_comm ~> sup_commute 
ee19cdb07528
stepping towards uniform lattice theory development in HOL
haftmann
parents:
22384
diff
changeset

874 
meet_leI1 ~> le_infI1 
ee19cdb07528
stepping towards uniform lattice theory development in HOL
haftmann
parents:
22384
diff
changeset

875 
meet_leI2 ~> le_infI2 
ee19cdb07528
stepping towards uniform lattice theory development in HOL
haftmann
parents:
22384
diff
changeset

876 
le_joinI1 ~> le_supI1 
ee19cdb07528
stepping towards uniform lattice theory development in HOL
haftmann
parents:
22384
diff
changeset

877 
le_joinI2 ~> le_supI2 
ee19cdb07528
stepping towards uniform lattice theory development in HOL
haftmann
parents:
22384
diff
changeset

878 
meet_assoc ~> inf_assoc 
ee19cdb07528
stepping towards uniform lattice theory development in HOL
haftmann
parents:
22384
diff
changeset

879 
join_assoc ~> sup_assoc 
ee19cdb07528
stepping towards uniform lattice theory development in HOL
haftmann
parents:
22384
diff
changeset

880 
meet_left_comm ~> inf_left_commute 
ee19cdb07528
stepping towards uniform lattice theory development in HOL
haftmann
parents:
22384
diff
changeset

881 
meet_left_idempotent ~> inf_left_idem 
ee19cdb07528
stepping towards uniform lattice theory development in HOL
haftmann
parents:
22384
diff
changeset

882 
join_left_comm ~> sup_left_commute 
ee19cdb07528
stepping towards uniform lattice theory development in HOL
haftmann
parents:
22384
diff
changeset

883 
join_left_idempotent ~> sup_left_idem 
ee19cdb07528
stepping towards uniform lattice theory development in HOL
haftmann
parents:
22384
diff
changeset

884 
meet_aci ~> inf_aci 
ee19cdb07528
stepping towards uniform lattice theory development in HOL
haftmann
parents:
22384
diff
changeset

885 
join_aci ~> sup_aci 
ee19cdb07528
stepping towards uniform lattice theory development in HOL
haftmann
parents:
22384
diff
changeset

886 
le_def_meet ~> le_iff_inf 
ee19cdb07528
stepping towards uniform lattice theory development in HOL
haftmann
parents:
22384
diff
changeset

887 
le_def_join ~> le_iff_sup 
ee19cdb07528
stepping towards uniform lattice theory development in HOL
haftmann
parents:
22384
diff
changeset

888 
join_absorp2 ~> sup_absorb2 
ee19cdb07528
stepping towards uniform lattice theory development in HOL
haftmann
parents:
22384
diff
changeset

889 
join_absorp1 ~> sup_absorb1 
ee19cdb07528
stepping towards uniform lattice theory development in HOL
haftmann
parents:
22384
diff
changeset

890 
meet_absorp1 ~> inf_absorb1 
ee19cdb07528
stepping towards uniform lattice theory development in HOL
haftmann
parents:
22384
diff
changeset

891 
meet_absorp2 ~> inf_absorb2 
ee19cdb07528
stepping towards uniform lattice theory development in HOL
haftmann
parents:
22384
diff
changeset

892 
meet_join_absorp ~> inf_sup_absorb 
ee19cdb07528
stepping towards uniform lattice theory development in HOL
haftmann
parents:
22384
diff
changeset

893 
join_meet_absorp ~> sup_inf_absorb 
ee19cdb07528
stepping towards uniform lattice theory development in HOL
haftmann
parents:
22384
diff
changeset

894 
distrib_join_le ~> distrib_sup_le 
ee19cdb07528
stepping towards uniform lattice theory development in HOL
haftmann
parents:
22384
diff
changeset

895 
distrib_meet_le ~> distrib_inf_le 
ee19cdb07528
stepping towards uniform lattice theory development in HOL
haftmann
parents:
22384
diff
changeset

896 

ee19cdb07528
stepping towards uniform lattice theory development in HOL
haftmann
parents:
22384
diff
changeset

897 
add_meet_distrib_left ~> add_inf_distrib_left 
ee19cdb07528
stepping towards uniform lattice theory development in HOL
haftmann
parents:
22384
diff
changeset

898 
add_join_distrib_left ~> add_sup_distrib_left 
ee19cdb07528
stepping towards uniform lattice theory development in HOL
haftmann
parents:
22384
diff
changeset

899 
is_join_neg_meet ~> is_join_neg_inf 
ee19cdb07528
stepping towards uniform lattice theory development in HOL
haftmann
parents:
22384
diff
changeset

900 
is_meet_neg_join ~> is_meet_neg_sup 
ee19cdb07528
stepping towards uniform lattice theory development in HOL
haftmann
parents:
22384
diff
changeset

901 
add_meet_distrib_right ~> add_inf_distrib_right 
ee19cdb07528
stepping towards uniform lattice theory development in HOL
haftmann
parents:
22384
diff
changeset

902 
add_join_distrib_right ~> add_sup_distrib_right 
ee19cdb07528
stepping towards uniform lattice theory development in HOL
haftmann
parents:
22384
diff
changeset

903 
add_meet_join_distribs ~> add_sup_inf_distribs 
ee19cdb07528
stepping towards uniform lattice theory development in HOL
haftmann
parents:
22384
diff
changeset

904 
join_eq_neg_meet ~> sup_eq_neg_inf 
ee19cdb07528
stepping towards uniform lattice theory development in HOL
haftmann
parents:
22384
diff
changeset

905 
meet_eq_neg_join ~> inf_eq_neg_sup 
ee19cdb07528
stepping towards uniform lattice theory development in HOL
haftmann
parents:
22384
diff
changeset

906 
add_eq_meet_join ~> add_eq_inf_sup 
ee19cdb07528
stepping towards uniform lattice theory development in HOL
haftmann
parents:
22384
diff
changeset

907 
meet_0_imp_0 ~> inf_0_imp_0 
ee19cdb07528
stepping towards uniform lattice theory development in HOL
haftmann
parents:
22384
diff
changeset

908 
join_0_imp_0 ~> sup_0_imp_0 
ee19cdb07528
stepping towards uniform lattice theory development in HOL
haftmann
parents:
22384
diff
changeset

909 
meet_0_eq_0 ~> inf_0_eq_0 
ee19cdb07528
stepping towards uniform lattice theory development in HOL
haftmann
parents:
22384
diff
changeset

910 
join_0_eq_0 ~> sup_0_eq_0 
ee19cdb07528
stepping towards uniform lattice theory development in HOL
haftmann
parents:
22384
diff
changeset

911 
neg_meet_eq_join ~> neg_inf_eq_sup 
ee19cdb07528
stepping towards uniform lattice theory development in HOL
haftmann
parents:
22384
diff
changeset

912 
neg_join_eq_meet ~> neg_sup_eq_inf 
ee19cdb07528
stepping towards uniform lattice theory development in HOL
haftmann
parents:
22384
diff
changeset

913 
join_eq_if ~> sup_eq_if 
ee19cdb07528
stepping towards uniform lattice theory development in HOL
haftmann
parents:
22384
diff
changeset

914 

ee19cdb07528
stepping towards uniform lattice theory development in HOL
haftmann
parents:
22384
diff
changeset

915 
mono_meet ~> mono_inf 
ee19cdb07528
stepping towards uniform lattice theory development in HOL
haftmann
parents:
22384
diff
changeset

916 
mono_join ~> mono_sup 
ee19cdb07528
stepping towards uniform lattice theory development in HOL
haftmann
parents:
22384
diff
changeset

917 
meet_bool_eq ~> inf_bool_eq 
ee19cdb07528
stepping towards uniform lattice theory development in HOL
haftmann
parents:
22384
diff
changeset

918 
join_bool_eq ~> sup_bool_eq 
ee19cdb07528
stepping towards uniform lattice theory development in HOL
haftmann
parents:
22384
diff
changeset

919 
meet_fun_eq ~> inf_fun_eq 
ee19cdb07528
stepping towards uniform lattice theory development in HOL
haftmann
parents:
22384
diff
changeset

920 
join_fun_eq ~> sup_fun_eq 
ee19cdb07528
stepping towards uniform lattice theory development in HOL
haftmann
parents:
22384
diff
changeset

921 
meet_set_eq ~> inf_set_eq 
ee19cdb07528
stepping towards uniform lattice theory development in HOL
haftmann
parents:
22384
diff
changeset

922 
join_set_eq ~> sup_set_eq 
ee19cdb07528
stepping towards uniform lattice theory development in HOL
haftmann
parents:
22384
diff
changeset

923 
meet1_iff ~> inf1_iff 
ee19cdb07528
stepping towards uniform lattice theory development in HOL
haftmann
parents:
22384
diff
changeset

924 
meet2_iff ~> inf2_iff 
ee19cdb07528
stepping towards uniform lattice theory development in HOL
haftmann
parents:
22384
diff
changeset

925 
meet1I ~> inf1I 
ee19cdb07528
stepping towards uniform lattice theory development in HOL
haftmann
parents:
22384
diff
changeset

926 
meet2I ~> inf2I 
ee19cdb07528
stepping towards uniform lattice theory development in HOL
haftmann
parents:
22384
diff
changeset

927 
meet1D1 ~> inf1D1 
ee19cdb07528
stepping towards uniform lattice theory development in HOL
haftmann
parents:
22384
diff
changeset

928 
meet2D1 ~> inf2D1 
ee19cdb07528
stepping towards uniform lattice theory development in HOL
haftmann
parents:
22384
diff
changeset

929 
meet1D2 ~> inf1D2 
ee19cdb07528
stepping towards uniform lattice theory development in HOL
haftmann
parents:
22384
diff
changeset

930 
meet2D2 ~> inf2D2 
ee19cdb07528
stepping towards uniform lattice theory development in HOL
haftmann
parents:
22384
diff
changeset

931 
meet1E ~> inf1E 
ee19cdb07528
stepping towards uniform lattice theory development in HOL
haftmann
parents:
22384
diff
changeset

932 
meet2E ~> inf2E 
ee19cdb07528
stepping towards uniform lattice theory development in HOL
haftmann
parents:
22384
diff
changeset

933 
join1_iff ~> sup1_iff 
ee19cdb07528
stepping towards uniform lattice theory development in HOL
haftmann
parents:
22384
diff
changeset

934 
join2_iff ~> sup2_iff 
ee19cdb07528
stepping towards uniform lattice theory development in HOL
haftmann
parents:
22384
diff
changeset

935 
join1I1 ~> sup1I1 
ee19cdb07528
stepping towards uniform lattice theory development in HOL
haftmann
parents:
22384
diff
changeset

936 
join2I1 ~> sup2I1 
ee19cdb07528
stepping towards uniform lattice theory development in HOL
haftmann
parents:
22384
diff
changeset

937 
join1I1 ~> sup1I1 
ee19cdb07528
stepping towards uniform lattice theory development in HOL
haftmann
parents:
22384
diff
changeset

938 
join2I2 ~> sup1I2 
ee19cdb07528
stepping towards uniform lattice theory development in HOL
haftmann
parents:
22384
diff
changeset

939 
join1CI ~> sup1CI 
ee19cdb07528
stepping towards uniform lattice theory development in HOL
haftmann
parents:
22384
diff
changeset

940 
join2CI ~> sup2CI 
ee19cdb07528
stepping towards uniform lattice theory development in HOL
haftmann
parents:
22384
diff
changeset

941 
join1E ~> sup1E 
ee19cdb07528
stepping towards uniform lattice theory development in HOL
haftmann
parents:
22384
diff
changeset

942 
join2E ~> sup2E 
ee19cdb07528
stepping towards uniform lattice theory development in HOL
haftmann
parents:
22384
diff
changeset

943 

ee19cdb07528
stepping towards uniform lattice theory development in HOL
haftmann
parents:
22384
diff
changeset

944 
is_meet_Meet ~> is_meet_Inf 
ee19cdb07528
stepping towards uniform lattice theory development in HOL
haftmann
parents:
22384
diff
changeset

945 
Meet_bool_def ~> Inf_bool_def 
ee19cdb07528
stepping towards uniform lattice theory development in HOL
haftmann
parents:
22384
diff
changeset

946 
Meet_fun_def ~> Inf_fun_def 
ee19cdb07528
stepping towards uniform lattice theory development in HOL
haftmann
parents:
22384
diff
changeset

947 
Meet_greatest ~> Inf_greatest 
ee19cdb07528
stepping towards uniform lattice theory development in HOL
haftmann
parents:
22384
diff
changeset

948 
Meet_lower ~> Inf_lower 
ee19cdb07528
stepping towards uniform lattice theory development in HOL
haftmann
parents:
22384
diff
changeset

949 
Meet_set_def ~> Inf_set_def 
ee19cdb07528
stepping towards uniform lattice theory development in HOL
haftmann
parents:
22384
diff
changeset

950 

ee19cdb07528
stepping towards uniform lattice theory development in HOL
haftmann
parents:
22384
diff
changeset

951 
listsp_meetI ~> listsp_infI 
ee19cdb07528
stepping towards uniform lattice theory development in HOL
haftmann
parents:
22384
diff
changeset

952 
listsp_meet_eq ~> listsp_inf_eq 
ee19cdb07528
stepping towards uniform lattice theory development in HOL
haftmann
parents:
22384
diff
changeset

953 

22450  954 
meet_min ~> inf_min 
955 
join_max ~> sup_max 

956 

22845  957 
* Classes "order" and "linorder": facts "refl", "trans" and 
22384
33a46e6c7f04
prefix of class interpretation not mandatory any longer
haftmann
parents:
22376
diff
changeset

958 
"cases" renamed ro "order_refl", "order_trans" and "linorder_cases", to 
33a46e6c7f04
prefix of class interpretation not mandatory any longer
haftmann
parents:
22376
diff
changeset

959 
avoid clashes with HOL "refl" and "trans". INCOMPATIBILITY. 
33a46e6c7f04
prefix of class interpretation not mandatory any longer
haftmann
parents:
22376
diff
changeset

960 

22845  961 
* Classes "order" and "linorder": 
22316  962 
potential INCOMPATIBILITY: order of proof goals in order/linorder instance 
963 
proofs changed. 

964 

22218  965 
* Dropped lemma duplicate def_imp_eq in favor of meta_eq_to_obj_eq. 
966 
INCOMPATIBILITY. 

967 

968 
* Dropped lemma duplicate if_def2 in favor of if_bool_eq_conj. 

969 
INCOMPATIBILITY. 

970 

22126  971 
* Added syntactic class "size"; overloaded constant "size" now has 
972 
type "'a::size ==> bool" 

973 

974 
* Renamed constants "Divides.op div", "Divides.op mod" and "Divides.op 

22997  975 
dvd" to "Divides.div_class.div", "Divides.div_class.mod" and "Divides.dvd". INCOMPATIBILITY. 
22126  976 

977 
* Added method "lexicographic_order" automatically synthesizes 

978 
termination relations as lexicographic combinations of size measures 

979 
 'function' package. 

980 

981 
* HOL/records: generalised fieldupdate to take a function on the 

982 
field rather than the new value: r(A := x) is translated to A_update 

983 
(K x) r The Kcombinator that is internally used is called K_record. 

21226
a607ae87ee81
fieldupdate in records is generalised to take a function on the field
schirmer
parents:
21215
diff
changeset

984 
INCOMPATIBILITY: Usage of the plain update functions has to be 
a607ae87ee81
fieldupdate in records is generalised to take a function on the field
schirmer
parents:
21215
diff
changeset

985 
adapted. 
a607ae87ee81
fieldupdate in records is generalised to take a function on the field
schirmer
parents:
21215
diff
changeset

986 

22126  987 
* axclass "semiring_0" now contains annihilation axioms x * 0 = 0 and 
988 
0 * x = 0, which are required for a semiring. Richer structures do 

989 
not inherit from semiring_0 anymore, because this property is a 

990 
theorem there, not an axiom. INCOMPATIBILITY: In instances of 

991 
semiring_0, there is more to prove, but this is mostly trivial. 

992 

993 
* axclass "recpower" was generalized to arbitrary monoids, not just 

994 
commutative semirings. INCOMPATIBILITY: If you use recpower and need 

995 
commutativity or a semiring property, add the corresponding classes. 

996 

997 
* Unified locale partial_order with class definition (cf. theory 

998 
Orderings), added parameter ``less''. INCOMPATIBILITY. 

21215
7c9337a0e30a
made locale partial_order compatible with axclass order
haftmann
parents:
21209
diff
changeset

999 

21099  1000 
* Constant "List.list_all2" in List.thy now uses authentic syntax. 
22126  1001 
INCOMPATIBILITY: translations containing list_all2 may go wrong. On 
1002 
Isar level, use abbreviations instead. 

1003 

1004 
* Renamed constant "List.op mem" to "List.memberl" INCOMPATIBILITY: 

1005 
rarely occuring name references (e.g. ``List.op mem.simps'') require 

1006 
renaming (e.g. ``List.memberl.simps''). 

1007 

22997  1008 
* Renamed constants "0" to "HOL.zero_class.zero" and "1" to "HOL.one_class.one". 
22126  1009 
INCOMPATIBILITY. 
1010 

23251  1011 
* Added class "HOL.eq", allowing for code generation with polymorphic equality. 
22126  1012 

1013 
* Numeral syntax: type 'bin' which was a mere type copy of 'int' has 

1014 
been abandoned in favour of plain 'int'. INCOMPATIBILITY  

1015 
significant changes for setting up numeral syntax for types: 

20485  1016 

1017 
 new constants Numeral.pred and Numeral.succ instead 

1018 
of former Numeral.bin_pred and Numeral.bin_succ. 

1019 
 Use integer operations instead of bin_add, bin_mult and so on. 

1020 
 Numeral simplification theorems named Numeral.numeral_simps instead of Bin_simps. 

1021 
 ML structure Bin_Simprocs now named Int_Numeral_Base_Simprocs. 

1022 

1023 
See HOL/Integ/IntArith.thy for an example setup. 

1024 

22126  1025 
* New top level command 'normal_form' computes the normal form of a 
1026 
term that may contain free variables. For example ``normal_form 

1027 
"rev[a,b,c]"'' produces ``[b,c,a]'' (without proof). This command is 

1028 
suitable for heavyduty computations because the functions are 

1029 
compiled to ML first. 

19895  1030 

17996  1031 
* Alternative iff syntax "A <> B" for equality on bool (with priority 
1032 
25 like >); output depends on the "iff" print_mode, the default is 

1033 
"A = B" (with priority 50). 

1034 

19279  1035 
* Renamed constants in HOL.thy and Orderings.thy: 
22997  1036 
op + ~> HOL.plus_class.plus 
1037 
op  ~> HOL.minus_class.minus 

1038 
uminus ~> HOL.minus_class.uminus 

23881  1039 
abs ~> HOL.abs_class.abs 
22997  1040 
op * ~> HOL.times_class.times 
23881  1041 
op < ~> HOL.ord_class.less 
1042 
op <= ~> HOL.ord_class.less_eq 

19233
77ca20b0ed77
renamed HOL +  * etc. to HOL.plus HOL.minus HOL.times etc.
haftmann
parents:
19226
diff
changeset

1043 

77ca20b0ed77
renamed HOL +  * etc. to HOL.plus HOL.minus HOL.times etc.
haftmann
parents:
19226
diff
changeset

1044 
Adaptions may be required in the following cases: 
77ca20b0ed77
renamed HOL +  * etc. to HOL.plus HOL.minus HOL.times etc.
haftmann
parents:
19226
diff
changeset

1045 

19377  1046 
a) Userdefined constants using any of the names "plus", "minus", "times", 
1047 
"less" or "less_eq". The standard syntax translations for "+", "" and "*" 

1048 
may go wrong. 

19233
77ca20b0ed77
renamed HOL +  * etc. to HOL.plus HOL.minus HOL.times etc.
haftmann
parents:
19226
diff
changeset

1049 
INCOMPATIBILITY: use more specific names. 
77ca20b0ed77
renamed HOL +  * etc. to HOL.plus HOL.minus HOL.times etc.
haftmann
parents:
19226
diff
changeset

1050 

19277  1051 
b) Variables named "plus", "minus", "times", "less", "less_eq" 
19233
77ca20b0ed77
renamed HOL +  * etc. to HOL.plus HOL.minus HOL.times etc.
haftmann
parents:
19226
diff
changeset

1052 
INCOMPATIBILITY: use more specific names. 
77ca20b0ed77
renamed HOL +  * etc. to HOL.plus HOL.minus HOL.times etc.
haftmann
parents:
19226
diff
changeset

1053 

19377  1054 
c) Permutative equations (e.g. "a + b = b + a") 
1055 
Since the change of names also changes the order of terms, permutative 

1056 
rewrite rules may get applied in a different order. Experience shows that 

1057 
this is rarely the case (only two adaptions in the whole Isabelle 

1058 
distribution). 

1059 
INCOMPATIBILITY: rewrite proofs 

19233
77ca20b0ed77
renamed HOL +  * etc. to HOL.plus HOL.minus HOL.times etc.
haftmann
parents:
19226
diff
changeset

1060 

77ca20b0ed77
renamed HOL +  * etc. to HOL.plus HOL.minus HOL.times etc.
haftmann
parents:
19226
diff
changeset

1061 
d) ML code directly refering to constant names 
77ca20b0ed77
renamed HOL +  * etc. to HOL.plus HOL.minus HOL.times etc.
haftmann
parents:
19226
diff
changeset

1062 
This in general only affects handwritten proof tactics, simprocs and so on. 
22997  1063 
INCOMPATIBILITY: grep your sourcecode and replace names. Consider use 
1064 
of const_name ML antiquotations. 

19233
77ca20b0ed77
renamed HOL +  * etc. to HOL.plus HOL.minus HOL.times etc.
haftmann
parents:
19226
diff
changeset

1065 

21265  1066 
* Relations less (<) and less_eq (<=) are also available on type bool. 
1067 
Modified syntax to disallow nesting without explicit parentheses, 

1068 
e.g. "(x < y) < z" or "x < (y < z)", but NOT "x < y < z". 

1069 

18674  1070 
* "LEAST x:A. P" expands to "LEAST x. x:A & P" (input only). 
1071 

20716
a6686a8e1b68
Changed precedence of "op O" (relation composition) from 60 to 75.
krauss
parents:
20712
diff
changeset

1072 
* Relation composition operator "op O" now has precedence 75 and binds 
a6686a8e1b68
Changed precedence of "op O" (relation composition) from 60 to 75.
krauss
parents:
20712
diff
changeset

1073 
stronger than union and intersection. INCOMPATIBILITY. 
a6686a8e1b68
Changed precedence of "op O" (relation composition) from 60 to 75.
krauss
parents:
20712
diff
changeset

1074 

22126  1075 
* The old set interval syntax "{m..n(}" (and relatives) has been 
1076 
removed. Use "{m..<n}" (and relatives) instead. 

19377  1077 

17865  1078 
* In the context of the assumption "~(s = t)" the Simplifier rewrites 
1079 
"t = s" to False (by simproc "neq_simproc"). For backward 

1080 
compatibility this can be disabled by ML "reset use_neq_simproc". 

17779  1081 

22126  1082 
* "m dvd n" where m and n are numbers is evaluated to True/False by 
1083 
simp. 

1084 

1085 
* Theorem Cons_eq_map_conv no longer declared as ``simp''. 

19211  1086 

19279  1087 
* Theorem setsum_mult renamed to setsum_right_distrib. 
1088 

19211  1089 
* Prefer ex1I over ex_ex1I in singlestep reasoning, e.g. by the 
22126  1090 
``rule'' method. 
1091 

1092 
* Reimplemented methods ``sat'' and ``satx'', with several 

1093 
improvements: goals no longer need to be stated as "<prems> ==> 

1094 
False", equivalences (i.e. "=" on type bool) are handled, variable 

1095 
names of the form "lit_<n>" are no longer reserved, significant 

1096 
speedup. 

1097 

1098 
* Methods ``sat'' and ``satx'' can now replay MiniSat proof traces. 

1099 
zChaff is still supported as well. 

1100 

1101 
* 'inductive' and 'datatype': provide projections of mutual rules, 

1102 
bundled as foo_bar.inducts; 

1103 

1104 
* Library: moved theories Parity, GCD, Binomial, Infinite_Set to 

1105 
Library. 

21256  1106 

1107 
* Library: moved theory Accessible_Part to main HOL. 

19572
a4b3176f19dd
* Library: theory Accessible_Part has been move to main HOL.
wenzelm
parents:
19508
diff
changeset

1108 

18446  1109 
* Library: added theory Coinductive_List of potentially infinite lists 
1110 
as greatest fixedpoint. 

18399  1111 

19254  1112 
* Library: added theory AssocList which implements (finite) maps as 
19252  1113 
association lists. 
17809
195045659c06
Tactics sat and satx reimplemented, several improvements
webertj
parents:
17806
diff
changeset

1114 

22126  1115 
* Added proof method ``evaluation'' for efficiently solving a goal 
1116 
(i.e. a boolean expression) by compiling it to ML. The goal is 

1117 
"proved" (via an oracle) if it evaluates to True. 

20807  1118 

1119 
* Linear arithmetic now splits certain operators (e.g. min, max, abs) 

1120 
also when invoked by the simplifier. This results in the simplifier 

21056  1121 
being more powerful on arithmetic goals. INCOMPATIBILITY. Set 
20807  1122 
fast_arith_split_limit to 0 to obtain the old behavior. 
20217
25b068a99d2b
linear arithmetic splits certain operators (e.g. min, max, abs)
webertj
parents:
20188
diff
changeset

1123 

22126  1124 
* Support for hex (0x20) and binary (0b1001) numerals. 
19254  1125 

20807  1126 
* New method: reify eqs (t), where eqs are equations for an 
1127 
interpretation I :: 'a list => 'b => 'c and t::'c is an optional 

1128 
parameter, computes a term s::'b and a list xs::'a list and proves the 

1129 
theorem I xs s = t. This is also known as reification or quoting. The 

1130 
resulting theorem is applied to the subgoal to substitute t with I xs 

1131 
s. If t is omitted, the subgoal itself is reified. 

1132 

1133 
* New method: reflection corr_thm eqs (t). The parameters eqs and (t) 

1134 
are as explained above. corr_thm is a theorem for I vs (f t) = I vs t, 

1135 
where f is supposed to be a computable function (in the sense of code 

1136 
generattion). The method uses reify to compute s and xs as above then 

1137 
applies corr_thm and uses normalization by evaluation to "prove" f s = 

1138 
r and finally gets the theorem t = r, which is again applied to the 

1139 
subgoal. An Example is available in HOL/ex/ReflectionEx.thy. 

1140 

23881  1141 
* Reflection: Automatic reification now handels binding, an example 
20807  1142 
is available in HOL/ex/ReflectionEx.thy 
1143 

1144 

20169  1145 
*** HOLAlgebra *** 
1146 

21170  1147 
* Formalisation of ideals and the quotient construction over rings. 
1148 

1149 
* Order and lattice theory no longer based on records. 

1150 
INCOMPATIBILITY. 

1151 

22126  1152 
* Renamed lemmas least_carrier > least_closed and greatest_carrier > 
1153 
greatest_closed. INCOMPATIBILITY. 

21896
9a7949815a84
Experimenting with interpretations of "definition".
ballarin
parents:
21879
diff
changeset

1154 

21170  1155 
* Method algebra is now set up via an attribute. For examples see 
21896
9a7949815a84
Experimenting with interpretations of "definition".
ballarin
parents:
21879
diff
changeset

1156 
Ring.thy. INCOMPATIBILITY: the method is now weaker on combinations 
21170  1157 
of algebraic structures. 
20318
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
20217
diff
changeset

1158 

22126  1159 
* Renamed theory CRing to Ring. 
20169  1160 

20807  1161 

19653  1162 
*** HOLComplex *** 
1163 

1164 
* Theory Real: new method ferrack implements quantifier elimination 

1165 
for linear arithmetic over the reals. The quantifier elimination 

1166 
feature is used only for decision, for compatibility with arith. This 

1167 
means a goal is either solved or left unchanged, no simplification. 

1168 

22971  1169 
* Hyperreal: Functions root and sqrt are now defined on negative real 
1170 
inputs so that root n ( x) =  root n x and sqrt ( x) =  sqrt x. 

1171 
Nonnegativity side conditions have been removed from many lemmas, so 

1172 
that more subgoals may now be solved by simplification; potential 

1173 
INCOMPATIBILITY. 

1174 

21791  1175 
* Real: New axiomatic classes formalize real normed vector spaces and 
1176 
algebras, using new overloaded constants scaleR :: real => 'a => 'a 

1177 
and norm :: 'a => real. 

1178 

22126  1179 
* Real: New constant of_real :: real => 'a::real_algebra_1 injects 
1180 
from reals into other types. The overloaded constant Reals :: 'a set 

1181 
is now defined as range of_real; potential INCOMPATIBILITY. 

1182 

23013  1183 
* Real: ML code generation is supported now and hence also quickcheck. 
1184 
Reals are implemented as arbitrary precision rationals. 

1185 

22126  1186 
* Hyperreal: Several constants that previously worked only for the 
1187 
reals have been generalized, so they now work over arbitrary vector 

1188 
spaces. Type annotations may need to be added in some cases; potential 

1189 
INCOMPATIBILITY. 

21791  1190 

22972
3e96b98d37c6
generalized sgn function to work on any real normed vector space
huffman
parents:
22971
diff
changeset

1191 
Infinitesimal :: ('a::real_normed_vector) star set 
3e96b98d37c6
generalized sgn function to work on any real normed vector space
huffman
parents:
22971
diff
changeset

1192 
HFinite :: ('a::real_normed_vector) star set 
3e96b98d37c6
generalized sgn function to work on any real normed vector space
huffman
parents:
22971
diff
changeset

1193 
HInfinite :: ('a::real_normed_vector) star set 
21791  1194 
approx :: ('a::real_normed_vector) star => 'a star => bool 
1195 
monad :: ('a::real_normed_vector) star => 'a star set 

1196 
galaxy :: ('a::real_normed_vector) star => 'a star set 

22972
3e96b98d37c6
generalized sgn function to work on any real normed vector space
huffman
parents:
22971
diff
changeset

1197 
(NS)LIMSEQ :: [nat => 'a::real_normed_vector, 'a] => bool 
21791  1198 
(NS)convergent :: (nat => 'a::real_normed_vector) => bool 
1199 
(NS)Bseq :: (nat => 'a::real_normed_vector) => bool 

1200 
(NS)Cauchy :: (nat => 'a::real_normed_vector) => bool 

1201 
(NS)LIM :: ['a::real_normed_vector => 'b::real_normed_vector, 'a, 'b] => bool 

1202 
is(NS)Cont :: ['a::real_normed_vector => 'b::real_normed_vector, 'a] => bool 

1203 
deriv :: ['a::real_normed_field => 'a, 'a, 'a] => bool 

22972
3e96b98d37c6
generalized sgn function to work on any real normed vector space
huffman
parents:
22971
diff
changeset

1204 
sgn :: 'a::real_normed_vector => 'a 
23116  1205 
exp :: 'a::{recpower,real_normed_field,banach} => 'a 
21791  1206 

1207 
* Complex: Some complexspecific constants are now abbreviations for 

22126  1208 
overloaded ones: complex_of_real = of_real, cmod = norm, hcmod = 
1209 
hnorm. Other constants have been entirely removed in favor of the 

1210 
polymorphic versions (INCOMPATIBILITY): 

21791  1211 

1212 
approx < capprox 

1213 
HFinite < CFinite 

1214 
HInfinite < CInfinite 

1215 
Infinitesimal < CInfinitesimal 

1216 
monad < cmonad 

1217 
galaxy < cgalaxy 

1218 
(NS)LIM < (NS)CLIM, (NS)CRLIM 

1219 
is(NS)Cont < is(NS)Contc, is(NS)contCR 

1220 
(ns)deriv < (ns)cderiv 

1221 

19653  1222 

17878  1223 
*** ML *** 
1224 

23251  1225 
* Generic arithmetic modules: Tools/integer.ML, Tools/rat.ML, Tools/float.ML 
1226 

22848  1227 
* Context data interfaces (Theory/Proof/GenericDataFun): removed 
22863  1228 
name/print, uninitialized data defaults to adhoc copy of empty value, 
1229 
init only required for impure data. INCOMPATIBILITY: empty really 

1230 
need to be empty (no dependencies on theory content!) 

22848  1231 

22138  1232 
* ML within Isar: antiquotations allow to embed staticallychecked 
1233 
formal entities in the source, referring to the context available at 

1234 
compiletime. For example: 

1235 

1236 
ML {* @{typ "'a => 'b"} *} 

1237 
ML {* @{term "%x. x"} *} 

1238 
ML {* @{prop "x == y"} *} 

1239 
ML {* @{ctyp "'a => 'b"} *} 

1240 
ML {* @{cterm "%x. x"} *} 

1241 
ML {* @{cprop "x == y"} *} 

1242 
ML {* @{thm asm_rl} *} 

1243 
ML {* @{thms asm_rl} *} 

22376  1244 
ML {* @{const_name c} *} 
1245 
ML {* @{const_syntax c} *} 

22138  1246 
ML {* @{context} *} 
1247 
ML {* @{theory} *} 

1248 
ML {* @{theory Pure} *} 

1249 
ML {* @{simpset} *} 

1250 
ML {* @{claset} *} 

1251 
ML {* @{clasimpset} *} 

1252 

22151  1253 
The same works for sources being ``used'' within an Isar context. 
1254 

22152  1255 
* ML in Isar: improved error reporting; extra verbosity with 
1256 
Toplevel.debug enabled. 

1257 

20348  1258 
* Pure/library: 
1259 

18450
e57731ba01dd
discontinued unflat in favour of burrow and burrow_split
haftmann
parents:
18446
diff
changeset

1260 
val burrow: ('a list > 'b list) > 'a list list > 'b list list 
18549
5308a6ea3b96
rearranged burrow_split to fold_burrow to allow composition with fold_map
haftmann
parents:
18540
diff
changeset

1261 
val fold_burrow: ('a list > 'c > 'b list * 'd) > 'a list list > 'c > 'b list list * 'd 
18450
e57731ba01dd
discontinued unflat in favour of burrow and burrow_split
haftmann
parents:
18446
diff
changeset

1262 

18540  1263 
The semantics of "burrow" is: "take a function with *simulatanously* 
1264 
transforms a list of value, and apply it *simulatanously* to a list of 

22126  1265 
list of values of the appropriate type". Compare this with "map" which 
18540  1266 
would *not* apply its argument function simulatanously but in 
22126  1267 
sequence; "fold_burrow" has an additional context. 
18450
e57731ba01dd
discontinued unflat in favour of burrow and burrow_split
haftmann
parents:
18446
diff
changeset

1268 

18446  1269 
* Pure/library: functions map2 and fold2 with curried syntax for 
1270 
simultanous mapping and folding: 

1271 

18422
875451c9d253
rearranged tuples (theory * 'a) to ('a * theory) in Pure
haftmann
parents:
18399
diff
changeset

1272 
val map2: ('a > 'b > 'c) > 'a list > 'b list > 'c list 
875451c9d253
rearranged tuples (theory * 'a) to ('a * theory) in Pure
haftmann
parents:
18399
diff
changeset

1273 
val fold2: ('a > 'b > 'c > 'c) > 'a list > 'b list > 'c > 'c 
875451c9d253
rearranged tuples (theory * 'a) to ('a * theory) in Pure
haftmann
parents:
18399
diff
changeset

1274 

18446  1275 
* Pure/library: indexed lists  some functions in the Isabelle library 
1276 
treating lists over 'a as finite mappings from [0...n] to 'a have been 

1277 
given more convenient names and signatures reminiscent of similar 

1278 
functions for alists, tables, etc: 

18051  1279 

1280 
val nth: 'a list > int > 'a 

1281 
val nth_map: int > ('a > 'a) > 'a list > 'a list 

1282 
val fold_index: (int * 'a > 'b > 'b) > 'a list > 'b > 'b 

1283 

18446  1284 
Note that fold_index starts counting at index 0, not 1 like foldln 
1285 
used to. 

1286 

22126  1287 
* Pure/library: added general ``divide_and_conquer'' combinator on 
1288 
lists. 

19032  1289 

1290 
* Pure/General/table.ML: the join operations now works via exceptions 

19081
085b5badb8de
* Isar/locales: new derived specification elements 'definition', 'abbreviation', 'axiomatization';
wenzelm
parents:
19034
diff
changeset

1291 
DUP/SAME instead of type option. This is simpler in simple cases, and 
085b5badb8de
* Isar/locales: new derived specification elements 'definition', 'abbreviation', 'axiomatization';
wenzelm
parents:
19034
diff
changeset

1292 
admits slightly more efficient complex applications. 
18446  1293 

18642  1294 
* Pure: datatype Context.generic joins theory/Proof.context and 
18644  1295 
provides some facilities for code that works in either kind of 
18642  1296 
context, notably GenericDataFun for uniform theory and proof data. 
1297 

18862
bd83590be0f7
* Pure: 'advanced' translation functions use Context.generic instead of just theory;
wenzelm
parents:
18815
diff
changeset

1298 
* Pure: 'advanced' translation functions (parse_translation etc.) now 
bd83590be0f7
* Pure: 'advanced' translation functions use Context.generic instead of just theory;
wenzelm
parents:
18815
diff
changeset

1299 
use Context.generic instead of just theory. 
bd83590be0f7
* Pure: 'advanced' translation functions use Context.generic instead of just theory;
wenzelm
parents:
18815
diff
changeset

1300 

18737  1301 
* Pure: simplified internal attribute type, which is now always 
1302 
Context.generic * thm > Context.generic * thm. Global (theory) 

1303 
vs. local (Proof.context) attributes have been discontinued, while 

18738  1304 
minimizing code duplication. Thm.rule_attribute and 
1305 
Thm.declaration_attribute build canonical attributes; see also 

19006
2427684c201c
* ML/Pure: generic Args/Attrib syntax everywhere;
wenzelm
parents:
18979
diff
changeset

1306 
structure Context for further operations on Context.generic, notably 
2427684c201c
* ML/Pure: generic Args/Attrib syntax everywhere;
wenzelm
parents:
18979
diff
changeset

1307 
GenericDataFun. INCOMPATIBILITY, need to adapt attribute type 
2427684c201c
* ML/Pure: generic Args/Attrib syntax everywhere;
wenzelm
parents:
18979
diff
changeset

1308 
declarations and definitions. 
2427684c201c
* ML/Pure: generic Args/Attrib syntax everywhere;
wenzelm
parents:
18979
diff
changeset

1309 

19508  1310 
* Pure/kernel: consts certification ignores sort constraints given in 
1311 
signature declarations. (This information is not relevant to the 

22126  1312 
logic, but only for type inference.) IMPORTANT INTERNAL CHANGE, 
1313 
potential INCOMPATIBILITY. 

19508  1314 

1315 
* Pure: axiomatic type classes are now purely definitional, with 

1316 
explicit proofs of class axioms and super class relations performed 

1317 
internally. See Pure/axclass.ML for the main internal interfaces  

1318 
notably AxClass.define_class supercedes AxClass.add_axclass, and 

1319 
AxClass.axiomatize_class/classrel/arity supercede 

1320 
Sign.add_classes/classrel/arities. 

1321 

19006
2427684c201c
* ML/Pure: generic Args/Attrib syntax everywhere;
wenzelm
parents:
18979
diff
changeset

1322 
* Pure/Isar: Args/Attrib parsers operate on Context.generic  
2427684c201c
* ML/Pure: generic Args/Attrib syntax everywhere;
wenzelm
parents:
18979
diff
changeset

1323 
global/local versions on theory vs. Proof.context have been 
2427684c201c
* ML/Pure: generic Args/Attrib syntax everywhere;
wenzelm
parents:
18979
diff
changeset

1324 
discontinued; Attrib.syntax and Method.syntax have been adapted 
2427684c201c
* ML/Pure: generic Args/Attrib syntax everywhere;
wenzelm
parents:
18979
diff
changeset

1325 
accordingly. INCOMPATIBILITY, need to adapt parser expressions for 
2427684c201c
* ML/Pure: generic Args/Attrib syntax everywhere;
wenzelm
parents:
18979
diff
changeset

1326 
attributes, methods, etc. 
18642  1327 

18446  1328 
* Pure: several functions of signature "... > theory > theory * ..." 
1329 
have been reoriented to "... > theory > ... * theory" in order to 

1330 
allow natural usage in combination with the >, >>, > and 

1331 
fold_map combinators. 

18051  1332 

21647
fccafa917a68
* Pure: official theorem names and additional comments are now strictly separate.
wenzelm
parents:
21595
diff
changeset

1333 
* Pure: official theorem names (closed derivations) and additional 
fccafa917a68
* Pure: official theorem names and additional comments are now strictly separate.
wenzelm
parents:
21595
diff
changeset

1334 
comments (tags) are now strictly separate. Name hints  which are 
fccafa917a68
* Pure: official theorem names and additional comments are now strictly separate.
wenzelm
parents:
21595
diff
changeset

1335 
maintained as tags  may be attached any time without affecting the 
fccafa917a68
* Pure: official theorem names and additional comments are now strictly separate.
wenzelm
parents:
21595
diff
changeset

1336 
derivation. 
fccafa917a68
* Pure: official theorem names and additional comments are now strictly separate.
wenzelm
parents:
21595
diff
changeset

1337 

18020  1338 
* Pure: primitive rule lift_rule now takes goal cterm instead of an 
18145  1339 
actual goal state (thm). Use Thm.lift_rule (Thm.cprem_of st i) to 
18020  1340 
achieve the old behaviour. 
1341 

1342 
* Pure: the "Goal" constant is now called "prop", supporting a 

1343 
slightly more general idea of ``protecting'' metalevel rule 

1344 
statements. 

1345 

20040
02c59ec2f2e1
* Pure: structure Variable provides operations for proper treatment of fixed/schematic variables;
wenzelm
parents:
20013
diff
changeset

1346 
* Pure: Logic.(un)varify only works in a global context, which is now 
02c59ec2f2e1
* Pure: structure Variable provides operations for proper treatment of fixed/schematic variables;
wenzelm
parents:
20013
diff
changeset

1347 
enforced instead of silently assumed. INCOMPATIBILITY, may use 
02c59ec2f2e1
* Pure: structure Variable provides operations for proper treatment of fixed/schematic variables;
wenzelm
parents:
20013
diff
changeset

1348 
Logic.legacy_(un)varify as temporary workaround. 
02c59ec2f2e1
* Pure: structure Variable provides operations for proper treatment of fixed/schematic variables;
wenzelm
parents:
20013
diff
changeset

1349 

20090  1350 
* Pure: structure Name provides scalable operations for generating 
1351 
internal variable names, notably Name.variants etc. This replaces 

1352 
some popular functions from term.ML: 

1353 

1354 
Term.variant > Name.variant 

1355 
Term.variantlist > Name.variant_list (*canonical argument order*) 

1356 
Term.invent_names > Name.invent_list 

1357 

1358 
Note that lowlevel renaming rarely occurs in new code  operations 

1359 
from structure Variable are used instead (see below). 

1360 

20040
02c59ec2f2e1
* Pure: structure Variable provides operations for proper treatment of fixed/schematic variables;
wenzelm
parents:
20013
diff
changeset

1361 
* Pure: structure Variable provides fundamental operations for proper 
02c59ec2f2e1
* Pure: structure Variable provides operations for proper treatment of fixed/schematic variables;
wenzelm
parents:
20013
diff
changeset

1362 
treatment of fixed/schematic variables in a context. For example, 
02c59ec2f2e1
* Pure: structure Variable provides operations for proper treatment of fixed/schematic variables;
wenzelm
parents:
20013
diff
changeset

1363 
Variable.import introduces fixes for schematics of given facts and 
02c59ec2f2e1
* Pure: structure Variable provides operations for proper treatment of fixed/schematic variables;
wenzelm
parents:
20013
diff
changeset

1364 
Variable.export reverses the effect (up to renaming)  this replaces 
02c59ec2f2e1
* Pure: structure Variable provides operations for proper treatment of fixed/schematic variables;
wenzelm
parents:
20013
diff
changeset

1365 
various freeze_thaw operations. 
02c59ec2f2e1
* Pure: structure Variable provides operations for proper treatment of fixed/schematic variables;
wenzelm
parents:
20013
diff
changeset

1366 

18567  1367 
* Pure: structure Goal provides simple interfaces for 
17981
2602be0d99ae
* Legacy goal package: reduced interface to the bare minimum required to keep existing proof scripts running.
wenzelm
parents:
17918
diff
changeset

1368 
init/conclude/finish and tactical prove operations (replacing former 
20040
02c59ec2f2e1
* Pure: structure Variable provides operations for proper treatment of fixed/schematic variables;
wenzelm
parents:
20013
diff
changeset

1369 
Tactic.prove). Goal.prove is the canonical way to prove results 
02c59ec2f2e1
* Pure: structure Variable provides operations for proper treatment of fixed/schematic variables;
wenzelm
parents:
20013
diff
changeset

1370 
within a given context; Goal.prove_global is a degraded version for 
02c59ec2f2e1
* Pure: structure Variable provides operations for proper treatment of fixed/schematic variables;
wenzelm
parents:
20013
diff
changeset

1371 
theory level goals, including a global Drule.standard. Note that 
02c59ec2f2e1
* Pure: structure Variable provides operations for proper treatment of fixed/schematic variables;
wenzelm
parents:
20013
diff
changeset

1372 
OldGoals.prove_goalw_cterm has long been obsolete, since it is 
02c59ec2f2e1
* Pure: structure Variable provides operations for proper treatment of fixed/schematic variables;
wenzelm
parents:
20013
diff
changeset

1373 
illbehaved in a local proof context (e.g. with local fixes/assumes or 
02c59ec2f2e1
* Pure: structure Variable provides operations for proper treatment of fixed/schematic variables;
wenzelm
parents:
20013
diff
changeset

1374 
in a locale context). 
17981
2602be0d99ae
* Legacy goal package: reduced interface to the bare minimum required to keep existing proof scripts running.
wenzelm
parents:
17918
diff
changeset

1375 

18815
cb778c0ce1b5
Pure/Isar: (un)folded, (un)fold, unfolding support
wenzelm
parents:
18738
diff
changeset

1376 
* Isar: simplified treatment of userlevel errors, using exception 
18687  1377 
ERROR of string uniformly. Function error now merely raises ERROR, 
18686
cbbc71acf994
* ML/Isar: simplified treatment of userlevel errors;
wenzelm
parents:
18674
diff
changeset

1378 
without any side effect on output channels. The Isar toplevel takes 
cbbc71acf994
* ML/Isar: simplified treatment of userlevel errors;
wenzelm
parents:
18674
diff
changeset

1379 
care of proper display of ERROR exceptions. ML code may use plain 
cbbc71acf994
* ML/Isar: simplified treatment of userlevel errors;
wenzelm
parents:
18674
diff
changeset

1380 
handle/can/try; cat_error may be used to concatenate errors like this: 
cbbc71acf994
* ML/Isar: simplified treatment of userlevel errors;
wenzelm
parents:
18674
diff
changeset

1381 

cbbc71acf994
* ML/Isar: simplified treatment of userlevel errors;
wenzelm
parents:
18674
diff
changeset

1382 
... handle ERROR msg => cat_error msg "..." 
cbbc71acf994
* ML/Isar: simplified treatment of userlevel errors;
wenzelm
parents:
18674
diff
changeset

1383 

cbbc71acf994
* ML/Isar: simplified treatment of userlevel errors;
wenzelm
parents:
18674
diff
changeset

1384 
Toplevel ML code (run directly or through the Isar toplevel) may be 
18687  1385 
embedded into the Isar toplevel with exception display/debug like 
1386 
this: 

18686
cbbc71acf994
* ML/Isar: simplified treatment of userlevel errors;
wenzelm
parents:
18674
diff
changeset

1387 

cbbc71acf994
* ML/Isar: simplified treatment of userlevel errors;
wenzelm
parents:
18674
diff
changeset

1388 
Isar.toplevel (fn () => ...) 
cbbc71acf994
* ML/Isar: simplified treatment of userlevel errors;
wenzelm
parents:
18674
diff
changeset

1389 

cbbc71acf994
* ML/Isar: simplified treatment of userlevel errors;
wenzelm
parents:
18674
diff
changeset

1390 
INCOMPATIBILITY, removed special transform_error facilities, removed 
cbbc71acf994
* ML/Isar: simplified treatment of userlevel errors;
wenzelm
parents:
18674
diff
changeset

1391 
obsolete variants of userlevel exceptions (ERROR_MESSAGE, 
cbbc71acf994
* ML/Isar: simplified treatment of userlevel errors;
wenzelm
parents:
18674
diff
changeset

1392 
Context.PROOF, ProofContext.CONTEXT, Proof.STATE, ProofHistory.FAIL) 
cbbc71acf994
* ML/Isar: simplified treatment of userlevel errors;
wenzelm
parents:
18674
diff
changeset

1393 
 use plain ERROR instead. 
cbbc71acf994
* ML/Isar: simplified treatment of userlevel errors;
wenzelm
parents:
18674
diff
changeset

1394 

18815
cb778c0ce1b5
Pure/Isar: (un)folded, (un)fold, unfolding support
wenzelm
parents:
18738
diff
changeset

1395 
* Isar: theory setup now has type (theory > theory), instead of a 
18722
0888eca0f1be
* ML/Isar: theory setup has type (theory > theory);
wenzelm
parents:
18696
diff
changeset

1396 
list. INCOMPATIBILITY, may use #> to compose setup functions. 
0888eca0f1be
* ML/Isar: theory setup has type (theory > theory);
wenzelm
parents:
18696
diff
changeset

1397 

18815
cb778c0ce1b5
Pure/Isar: (un)folded, (un)fold, unfolding support
wenzelm
parents:
18738
diff
changeset

1398 
* Isar: installed ML toplevel pretty printer for type Proof.context, 
cb778c0ce1b5
Pure/Isar: (un)folded, (un)fold, unfolding support
wenzelm
parents:
18738
diff
changeset

1399 
subject to ProofContext.debug/verbose flags. 
cb778c0ce1b5
Pure/Isar: (un)folded, (un)fold, unfolding support
wenzelm
parents:
18738
diff
changeset

1400 

cb778c0ce1b5
Pure/Isar: (un)folded, (un)fold, unfolding support
wenzelm
parents:
18738
diff
changeset

1401 
* Isar: Toplevel.theory_to_proof admits transactions that modify the 
cb778c0ce1b5
Pure/Isar: (un)folded, (un)fold, unfolding support
wenzelm
parents:
18738
diff
changeset

1402 
theory before entering a proof state. Transactions now always see a 
cb778c0ce1b5
Pure/Isar: (un)folded, (un)fold, unfolding support
wenzelm
parents:
18738
diff
changeset

1403 
quasifunctional intermediate checkpoint, both in interactive and 
18590
f6a553aa3d81
Pure/Isar: Toplevel.theory_to_proof admits transactions that modify the theory;
wenzelm
parents:
18568
diff
changeset

1404 
batch mode. 
18567  1405 

17878  1406 
* Simplifier: the simpset of a running simplification process now 
5b9efe4d6b47
tuned;
we& 