6 KiB
master branch (aka work in progress branch)
Changes
- We now have two type classes for converting to string:
has_to_stringandhas_repr. Thehas_to_stringtype class in v3.2.0 is roughly equivalent tohas_repr. For more details, see discussion at issue #1664.
v3.2.0 (18 June 2017)
Lean is still evolving rapidly, and we apologize for the resulting instabilities. The lists below summarizes some of the new features and incompatibilities with respect to release 3.1.0.
Features
-
Holes
{! ... !}expressions and (user-defined) hole commands. In Emacs, hole commands are executed using the keybinding C-c SPC. The available commands can be found here. -
The
leanpkgpackage manager now manages projects and dependencies. See the documentation here. Parts of the standard library, like the superposition theorem proversuper, have been moved to their own repositories..projectfiles are no longer needed to useemacswith projects. -
Well-founded recursion is now supported. (Details and examples for this and the next two items will soon appear in Theorem Proving in Lean.)
-
Mutually (non meta) recursive definitions are now supported.
-
Nested and mutual inductive data types are now supported.
-
There is support for coinductive predicates.
-
The
simptactic has been improved and supports more options, like wildcards. Hover oversimpin an editor to see the documentation string (docstring). -
Additional interactive tactics have been added, and can be found here.
-
A
casetactic can now be used to structure proofs by cases and by induction. See here. -
Various data structures, such as hash maps, have been added to the standard library here.
-
There is preliminary support for user-defined parser extensions. More information can be found here, and some examples can be found here.
-
Numerous improvements have been made to the parallel compilation infrastructure and editor interfaces, for example, as described here and here.
-
There is a
transfermethod that can be used to transfer results e.g. to isomorphic structures; see here. -
The monadic hierarchy now includes axioms for monadic classes. (See here.)
-
The tactic notation
tac ; [tac_1, ..., tac_n]has been added. -
The type classes
has_well_founded,has_map,has_seq,has_orelsehave been added. -
Type classes can have input/output parameters. Some examples can be found here.
-
tactic.run_iocan now be used to perform IO in tactics.
Changes
-
Type class instances are not
[reducible]by default anymore. -
Commands that produce output are now preceded by a hash symbol, as in
#check,#print,#evaland#reduce. The#evalcommand calls the bytecode evaluator, and#reducedoes definitional reduction in the kernel. Many instances of alternative syntax likepremiseforvariableandhypothesisforparameterhave been eliminated. See the discussion here. -
The hierarchy of universes is now named
Sort 0,Sort 1,Sort 2, and so on.Propis alternative syntax forSort 0,Typeis alternative syntax forSort 1, andType nis alternative syntax forSort (n + 1). Many general constructors have been specialized from arbitrarySorts toTypein order to simplify elaboration. -
Automatically generate dependent eliminators for inductive predicates.
-
Improve unification hint matcher.
-
Improve unifier. In function applications, explicit arguments are unified before implicit ones. Moreover, more aggresive unfolding is used when processing implicit arguments.
-
Use
universe uinstead ofuniverse variable uto declare a universe variable. -
The syntax
l^.map ffor projections is now deprecated in favor ofl.map f. -
The behavior of the
showtactic in interactive tactic mode has changed. It no longer leaves tactic mode. Also, it can now be used to select a goal other than the current one. -
The
assertvanddefinevtactics have been eliminated in favor ofnoteandpose. -
has_andthentype class is now heterogeneous, -
The encoding of structures has been changed, following the strategy described here. Generic operations like
addandmulare replaced byhas_add.addandhas_mul.mul, respectively. One can provisionally obtain the old encodings withset_option old_structure_cmd true. -
Syntax for quotations in metaprograms has changed. The notation
`(t)elaboratestat definition time and produces an expression. The notation``(t)resolves names at definition time produces a pre-expression, and```(t)resolves names at tactic execution time, and produces a pre-expression. Details can be found in the paper Ebner et al, A Metaprogramming Framework for Formal Verification. -
The types
exprfor expressions andpexprfor pre-expressions have been unified, so thatpexpris defined asexpr ff. See here. -
Handling of the
iomonad has changed. Examples can be found here in the code forleanpkg, which is written in Lean itself.
stateandstate_tare universe polymorphic.
-
GCC 7 compatibility
-
Use single quotes for character literals (e.g., 'a').