Releases: leanprover/lean4-nightly
nightly-2024-12-10
Changes since nightly-2024-12-09:
Full commit log
- 8a3a806 chore: update stage0
- 5c333ef fix:
Float32
runtime support (#6350) - e69bcb0 chore: improve BitVec ext lemmas (#6349)
- c5b82e0 feat: BitVec.[toFin|getMsbD]_setWidth and [getMsbD|msb]_signExtend (#6338)
- b6177ba chore: update stage0
- 2e11b8a feat: add support for
Float32
to the Lean runtime (#6348) - ff3d12c doc: clarify difference between Expr.hasLooseBVars and Expr.hasLooseBVar (#6344)
- 520d4b6 chore: cleanup of Array lemmas (#6343)
- c7b8c5c chore: alignment of Array and List lemmas (#6342)
nightly-2024-12-09
Changes since nightly-2024-12-08:
Full Changelog: leanprover/lean4@v4.13.0...v4.14.0
Language features, tactics, and metaprograms
-
structure
andinductive
commands- #5517 improves universe level inference for the resulting type of an
inductive
orstructure.
Recall that aProp
-valued inductive type is a syntactic subsingleton if it has at most one constructor and all the arguments to the constructor are inProp
. Such types have large elimination, so they could be defined inType
orProp
without any trouble. The way inference has changed is that if a type is a syntactic subsingleton with exactly one constructor, and the constructor has at least one parameter/field, then theinductive
/structure
command will prefer creating aProp
instead of aType
. The upshot is that the: Prop
instructure S : Prop
is often no longer needed. (With @arthur-adjedj). - #5842 and #5783 implement a feature where the
structure
command can now define recursive inductive types:structure Tree where n : Nat children : Fin n → Tree def Tree.size : Tree → Nat | {n, children} => Id.run do let mut s := 0 for h : i in [0 : n] do s := s + (children ⟨i, h.2⟩).size pure s
- #5814 fixes a bug where Mathlib's
Type*
elaborator could lead to incorrect universe parameters with theinductive
command. - #3152 and #5844 fix bugs in default value processing for structure instance notation (with @arthur-adjedj).
- #5399 promotes instance synthesis order calculation failure from a soft error to a hard error.
- #5542 deprecates
:=
variants ofinductive
andstructure
(see breaking changes).
- #5517 improves universe level inference for the resulting type of an
-
Application elaboration improvements
- #5671 makes
@[elab_as_elim]
require at least one discriminant, since otherwise there is no advantage to this alternative elaborator. - #5528 enables field notation in explicit mode. The syntax
@x.f
elaborates as@S.f
withx
supplied to the appropriate parameter. - #5692 modifies the dot notation resolution algorithm so that it can apply
CoeFun
instances. For example, Mathlib hasMultiset.card : Multiset α →+ Nat
, and now withm : Multiset α
, the notationm.card
resolves to⇑Multiset.card m
. - #5658 fixes a bug where 'don't know how to synthesize implicit argument' errors might have the incorrect local context when the eta arguments feature is activated.
- #5933 fixes a bug where
..
ellipses in patterns made use of optparams and autoparams. - #5770 makes dot notation for structures resolve using all ancestors. Adds a resolution order for generalized field notation. This is the order of namespaces visited during resolution when trying to resolve names. The algorithm to compute a resolution order is the commonly used C3 linearization (used for example by Python), which when successful ensures that immediate parents' namespaces are considered before more distant ancestors' namespaces. By default we use a relaxed version of the algorithm that tolerates inconsistencies, but using
set_option structure.strictResolutionOrder true
makes inconsistent parent orderings into warnings.
- #5671 makes
-
Recursion and induction principles
- #5619 fixes functional induction principle generation to avoid over-eta-expanding in the preprocessing step.
- #5766 fixes structural nested recursion so that it is not confused when a nested type appears first.
- #5803 fixes a bug in functional induction principle generation when there are
let
bindings. - #5904 improves functional induction principle generation to unfold aux definitions more carefully.
- #5850 refactors code for
Predefinition.Structural
.
-
Error messages
- #5276 fixes a bug in "type mismatch" errors that would structurally assign metavariables during the algorithm to expose differences.
- #5919 makes "type mismatch" errors add type ascriptions to expose differences for numeric literals.
- #5922 makes "type mismatch" errors expose differences in the bodies of functions and pi types.
- #5888 improves the error message for invalid induction alternative names in
match
expressions (@josojo). - #5719 improves
calc
error messages.
-
#5627 and #5663 improve the
#eval
command and introduce some new features.- Now results can be pretty printed if there is a
ToExpr
instance, which means hoverable output. IfToExpr
fails, it then tries looking for aRepr
orToString
instance like before. Settingset_option eval.pp false
disables making use ofToExpr
instances. - There is now auto-derivation of
Repr
instances, enabled with thepp.derive.repr
option (default to true). For example:It simply doesinductive Baz | a | b #eval Baz.a -- Baz.a
deriving instance Repr for Baz
when there's no way to representBaz
. - The option
eval.type
controls whether or not to include the type in the output. For now the default is false. - Now expressions such as
#eval do return 2
, where monad is unknown, work. It tries unifying the monad withCommandElabM
,TermElabM
, orIO
. - The classes
Lean.Eval
andLean.MetaEval
have been removed. These each used to be responsible for adapting monads and printing results. Now theMonadEval
class is responsible for adapting monads for evaluation (it is similar toMonadLift
, but instances are allowed to use default data when initializing state), and representing results is handled through a separate process. - Error messages about failed instance synthesis are now more precise. Once it detects that a
MonadEval
class applies, then the error message will be specific about missingToExpr
/Repr
/ToString
instances. - Fixes bugs where evaluating
MetaM
andCoreM
wouldn't collect log messages. - Fixes a bug where
let rec
could not be used in#eval
.
- Now results can be pretty printed if there is a
-
partial
definitions -
New tactic configuration syntax. The configuration syntax for all core tactics has been given an upgrade. Rather than
simp (config := { contextual := true, maxSteps := 22})
, one can now writesimp +contextual (maxSteps := 22)
. Tactic authors can migrate by switching from(config)?
tooptConfig
in tactic syntaxes and potentially deletingmkOptionalNode
in elaborators. #5883, #5898, #5928, and #5932. (Tactic authors, see breaking changes.) -
simp
tactic- #5632 fixes the simpproc for
Fin
literals to reduce more consistently. - #5648 fixes a bug in
simpa ... using t
where metavariables int
were not properly accounted for, and also improves the type mismatch error. - #5838 fixes the docstring of
simp!
to actually talk aboutsimp!
. - #5870 adds support for
attribute [simp ←]
(note the reverse direction). This adds the reverse of a theorem as a global simp theorem.
- #5632 fixes the simpproc for
-
decide
tactic- #5665 adds
decide!
tactic for using kernel reduction (warning: this is renamed todecide +kernel
in a future release).
- #5665 adds
-
bv_decide
tactic- #5714 adds inequality regression tests (@alexkeizer).
- #5608 adds
bv_toNat
tag fortoNat_ofInt
(@bollu). - #5618 adds support for
at
inac_nf
and uses it inbv_normalize
(@tobiasgrosser). - #5628 adds udiv support.
- #5635 adds auxiliary bitblasters for negation and subtraction.
- #5637 adds more
getLsbD
bitblaster theory. - #5652 adds umod support.
- #5653 adds performance benchmark for modulo.
- #5655 reduces error on
bv_check
to warning. - [#5670...
nightly-2024-12-08
nightly-2024-12-07
nightly-2024-12-06
Changes since nightly-2024-12-05:
Full commit log
- 6e60d13 feat: getElem lemmas for Vector operations (#6324)
nightly-2024-12-05
Changes since nightly-2024-12-04:
Full commit log
- 019f8e1 chore: protect Fin.cast and BitVec.cast (#6315)
- c366a29 chore: generalize universe in Array.find? (#6318)
- 1400b95 feat: upstream
ToLevel
from mathlib (#6285) - 00c7b85 feat: lemmas about for loops over
Option
(#6316) - f6e88e5 fix: missing
HEq
support atToLCNF
(#6311) - 88573c8 test: do not filter output for non-diff tests (#6308)
- faf07e5 chore: remove unused imports (#6305)
nightly-2024-12-04
Changes since nightly-2024-12-03:
Full commit log
- c518156 feat: BitVec.[toInt|toFin]_concat and Bool.toInt (#6182)
- 7721102 feat: BitVec.toFin/ToInt BitVec.ushiftRight (#6238)
- da9a0c4 chore: update stage0
- b9bf943 feat: add
debug.proofAsSorry
(#6300) - 2a891a3 chore:
CMAKE_CXX_SYSROOT_FLAG
is also needed for linking (#6297) - 00718c3 chore: clean up
Elab.async
handling (#6299) - 473274f chore: update stage0
- 7b98fbe feat: reverse
HashMap.toList
, so it agrees withHashMap.toArray
(#6244) - 24b412e refactor: move
IO.Channel
andIO.Mutex
toStd.Sync
(#6282)
nightly-2024-12-03
Changes since nightly-2024-12-02:
Full commit log
- cb600ed chore: restore broken proofs
- 57d83c8 feat: add simp configuration to norm_cast macros
- ce27d49 chore: update stage0
- 8a7889d chore: temporarily sorry broken proofs
- 6934029 chore: add simp configuration to norm_cast syntax
- 222abdd feat: simprocs for other Fin operations (#6295)
- 490be92 chore: specialize fold loops (#6293)
- cda6d5c chore: upstream List.length_flatMap (#6294)
- 9044043 chore: robustify for byAsSorry (#6287)
- f6bc6b2 fix: lake: properly prepend job log in
ensureJob
(#6291) - d9d54c1 chore: lake: use & check
prelude
(#6289) - b2336fd perf: speed up bv_decide reflection using Lean.RArray (#6288)
- f156f22 feat: lake: build without
leanc
(#6176) - 3c348d4 chore: CI: bump dawidd6/action-download-artifact from 6 to 7 (#6274)
- 0b8f50f feat: async linting (#4460)
- 0d89f01 perf: bv_decide uses rfl in reflection if possible (#6286)
- e157fcb chore: missing Array/Vector injectivity lemmas (#6284)
- 95dbac2 chore: shake Std.Time (#6283)
- be63c82 chore: CI: bump dcarbone/install-jq-action from 2.1.0 to 3.0.1 (#6275)
- 6fcf35e chore:
script/mathlib-bench
(#6280) - b3e0c9c fix: use sensible notion of indentation in structure instance field completion (#6279)
nightly-2024-12-02
Changes since nightly-2024-12-01:
v4.16.0
v4.15.0
Release candidate, release notes will be copied from the branch releases/v4.15.0
once completed.
- #3090 handles level parameters in
Meta.evalExpr
(@eric-wieser)
Full commit log
- 3c5e612 chore: begin development cycle for v4.16.0 (#6277)
- 29e84fa feat: omega doesn't get stuck on bare Int.negSucc (#6276)
- 6bf8ff3 feat: more UInt bitwise theorems (#6188)
- 62b8238 chore: remove accidentally added file (#6262)
- 0a2a8e8 feat: make "foo has been deprecated" warning be hoverable (#6273)
- 23236ef fix: have
Lean.Meta.isConstructorApp'?
be aware ofn + k
Nat offsets (#6270) - b2f70da feat: Array.swap_perm (#6272)
- 819cb87 chore: upstream Vector lemmas (#6271)
nightly-2024-12-01
Changes since nightly-2024-11-30:
Full commit log
- 3ee2842 feat: remove runtime bounds checks and partial from qsort (#6241)
- 7b8504c chore: post-stage0 cleanup for #6165 (#6268)
- ca96922 chore: update stage0
- a1c3a36 feat: parity between structure instance notation and
where
notation (#6165) - 734ea30 chore: update stage0
- f3f0045 feat: add
structInstFieldDecl
syntax category (#6265)