Releases: leanprover/lean4-nightly
nightly-2024-10-08
Changes since nightly-2024-10-07:
Full commit log
- 3e75d8f fix: FunInd: avoid over-eta-expanding in preprocessing step (#5619)
- f1ff9ce feat: more getLsbD bitblaster theory (#5637)
- 99a9d9b doc: remarks about multiplication (#5636)
- 1914a2b feat: add auxiliary bitblasters for negation and subtraction (#5635)
- 6312787 feat: lemmas for Bitvector division when denominator is zero (#5609)
- ec5f206 fix: shutdown deadlock and crash desync (#5340)
- d835616 chore: fix MSYS2 build instructions (#5617)
nightly-2024-10-07
Changes since nightly-2024-10-03:
Full commit log
- 9dac514 feat: Document Bitblasting in a documentation comment (#5620)
- c0617da feat: support
at
inac_nf
and use it inbv_normalize
(#5618) - a3ee111 chore: update stage0
- 13e3a38 fix: Lake: brittle dependency on env ext name
- 0178f2b chore: update stage0
- 4f5f392 chore: update stage0
- d4fdb5d fix: getFunInfo, inferType to use withAtLeastTransparency, not withTransparency (#5563)
- f9048c1 chore: add bv_toNat tag for toNat_ofInt (#5608)
- 53c5470 perf: remove List.redLength (#5605)
- 3584a62 fix: call hierarchy into
(builtin_)initialize
(#5560)
nightly-2024-10-03
Changes since nightly-2024-10-02:
- #4774 generalizes the
Parsec
library, allowing parsing of iterable data beyondString
such asByteArray
. (See breaking changes.)
Full commit log
- a4fda01 feat: Array/Option.unattach (#5586)
- b7d6a4b feat: adding Insert/Singleton/Union instances for HashMap/Set.Raw (#5590)
- 341c64a chore: update stage0
- a01166f refactor: reduce Reservoir build fetch attempts & warnings (#5600)
- 14f8017 chore: typo in fix-pr-release.yml (#5601)
- 8f88d94 chore: fix spelling mistakes (#5599)
- 09dfe1c chore: induction-friendly
List.min?_cons
(#5594)
nightly-2024-10-02
Changes since nightly-2024-10-01:
Full commit log
- 1b115ee feat: HashSet.Raw.all/any (#5591)
- 8da278e feat: variant of MVarId.tryClearMany (#5588)
- 6a59a3a feat: allow MVarId.assertHypotheses to set BinderInfo/Kind (#5587)
- 1329a26 feat: HashSet.all/any (#5582)
- 478a34f feat: Singleton/Insert/Union instances for HashMap/Set (#5581)
- 952c086 fix: rm new shared libs before build for Windows (#5541)
- 9322d8d feat: List.unattach and simp lemmas (#5550)
- 9dcd2ad fix:
--no-cache
on serverDependencyBuildMode.never
(#5583) - e3811fd chore: cleanup unused variables (#5579)
- 867e67b chore: cleanup unused variables in bv_decide (#5578)
- 6cd80c2 chore: add missing simp to Array.size_feraseIdx (#5577)
- f202469 chore: upstream Array.flatten lemmas (#5551)
- e417a23 feat: expose Kernel.check for debugging purposes (#5412)
- 5eb6c67 feat: lake: selective build cache fetch & display (#5572)
- 499c587 feat: get bv_normalize up to date with the current BitVec rewrites (#5573)
- 863e9c0 feat: generalize the
bv_normalize
pipeline to support more general preprocessing passes (#5568) - 60096e7 refactor: more idiomatic syntax for
if h:
(#5567) - e90c3cf fix: remove non-conforming size-0 arrays (#5564)
- d4195c2 fix: make lean.h compile with MSVC (#5558)
- 4932dbc refactor: dead code AttributeExtensionOLeanEntry.decl (#5496)
- d0ee9d0 feat: expand
invalid projection
type inference error (#5556) - 3e2bca7 feat: add
Bitvec.[add, sub, mul]_eq_xor
andwidth_one_cases
(#5554) - ddec533 chore: switch obvious cases of array "bang"
[]!
indexing to rely on hypothesis (#5552)
nightly-2024-10-01
Changes since nightly-2024-09-30:
Language features, tactics, and metaprograms
-
bv_decide
tactic. This release introduces a new tactic for proving goals involvingBitVec
andBool
. It reduces the goal to a SAT instance that is refuted by an external solver, and the resulting LRAT proof is checked in Lean. This is used to synthesize a proof of the goal by reflection. As this process uses verified algorithms, proofs generated by this tactic useLean.ofReduceBool
, so this tactic includes the Lean compiler as part of the trusted code base. The external solver CaDiCaL is included with Lean and does not need to be installed separately to make use ofbv_decide
.For example, we can use
bv_decide
to verify that a bit twiddling formula leaves at most one bit set:def popcount (x : BitVec 64) : BitVec 64 := let rec go (x pop : BitVec 64) : Nat → BitVec 64 | 0 => pop | n + 1 => go (x >>> 2) (pop + (x &&& 1)) n go x 0 64 example (x : BitVec 64) : popcount ((x &&& (x - 1)) ^^^ x) ≤ 1 := by simp only [popcount, popcount.go] bv_decide
When the external solver fails to refute the SAT instance generated by
bv_decide
, it can report a counterexample:/-- error: The prover found a counterexample, consider the following assignment: x = 0xffffffffffffffff#64 -/ #guard_msgs in example (x : BitVec 64) : x < x + 1 := by bv_decide
See
Lean.Elab.Tactic.BVDecide
for a more detailed overview, and look intests/lean/run/bv_*
for examples. -
simp
tactic- #4988 fixes a panic in the
reducePow
simproc. - #5071 exposes the
index
option to thedsimp
tactic, introduced tosimp
in #4202. - #5159 fixes a panic at
Fin.isValue
simproc. - #5167 and #5175 rename the
simpCtorEq
simproc toreduceCtorEq
and makes it optional. (See breaking changes.) - #5187 ensures
reduceCtorEq
is enabled in thenorm_cast
tactic. - #5073 modifies the simp debug trace messages to tag with "dpre" and "dpost" instead of "pre" and "post" when in definitional rewrite mode. #5054 explains the
reduce
steps fortrace.Debug.Meta.Tactic.simp
trace messages.
- #4988 fixes a panic in the
-
ext
tactic- #4996 reduces default maximum iteration depth from 1000000 to 100.
-
induction
tactic- #5117 fixes a bug where
let
bindings in minor premises wouldn't be counted correctly.
- #5117 fixes a bug where
-
omega
tactic- #5157 fixes a panic.
-
conv
tactic- #5149 improves
arg n
to handle subsingleton instance arguments.
- #5149 improves
-
#5044 upstreams the
#time
command. -
#5079 makes
#check
and#reduce
typecheck the elaborated terms. -
Incrementality
- #4974 fixes regression where we would not interrupt elaboration of previous document versions.
- #5004 fixes a performance regression.
- #5001 disables incremental body elaboration in presence of
where
clauses in declarations. - #5018 enables infotrees on the command line for ilean generation.
- #5040 and #5056 improve performance of info trees.
- #5090 disables incrementality in the
case .. | ..
tactic. - #5312 fixes a bug where changing whitespace after the module header could break subsequent commands.
-
Definitions
- #5016 and #5066 add
clean_wf
tactic to clean up tactic state indecreasing_by
. This can be disabled withset_option debug.rawDecreasingByGoal false
. - #5055 unifies equational theorems between structural and well-founded recursion.
- #5041 allows mutually recursive functions to use different parameter names among the “fixed parameter prefix”
- #4154 and #5109 add fine-grained equational lemmas for non-recursive functions. See breaking changes.
- #5129 unifies equation lemmas for recursive and non-recursive definitions. The
backward.eqns.deepRecursiveSplit
option can be set tofalse
to get the old behavior. See breaking changes. - #5141 adds
f.eq_unfold
lemmas. Now Lean produces the following zoo of rewrite rules:TheOption.map.eq_1 : Option.map f none = none Option.map.eq_2 : Option.map f (some x) = some (f x) Option.map.eq_def : Option.map f p = match o with | none => none | (some x) => some (f x) Option.map.eq_unfold : Option.map = fun f p => match o with | none => none | (some x) => some (f x)
f.eq_unfold
variant is especially useful to rewrite withrw
under binders. - #5136 fixes bugs in recursion over predicates.
- #5016 and #5066 add
-
Variable inclusion
- #5206 documents that
include
currently only applies to theorems.
- #5206 documents that
-
Elaboration
- #4926 fixes a bug where autoparam errors were associated to an incorrect source position.
- #4833 fixes an issue where cdot anonymous functions (e.g.
(· + ·)
) would not handle ambiguous notation correctly. Numbers the parameters, making this example expand asfun x1 x2 => x1 + x2
rather thanfun x x_1 => x + x_1
. - #5037 improves strength of the tactic that proves array indexing is in bounds.
- #5119 fixes a bug in the tactic that proves indexing is in bounds where it could loop in the presence of mvars.
- #5072 makes the structure type clickable in "not a field of structure" errors for structure instance notation.
- #4717 fixes a bug where mutual
inductive
commands could create terms that the kernel rejects. - #5142 fixes a bug where
variable
could fail when mixing binder updates and declarations.
-
Other fixes or improvements
- #5118 changes the definition of the
syntheticHole
parser so that hovering over_
in?_
gives the docstring for synthetic holes. - #5173 uses the emoji variant selector for ✅️,❌️,💥️ in messages, improving fonts selection.
- #5183 fixes a bug in
rename_i
where implementation detail hypotheses could be renamed.
- #5118 changes the definition of the
Language server, widgets, and IDE extensions
- #4821 resolves two language server bugs that especially affect Windows users. (1) Editing the header could result in the watchdog not correctly restarting the file worker, which would lead to the file seemingly being processed forever. (2) On an especially slow Windows machine, we found that starting the language server would sometimes not succeed at all. This PR also resolves an issue where we would not correctly emit messages that we received while the file worker is being restarted to the corresponding file worker after the restart.
- #5006 updates the user widget manual.
- #5193 updates the quickstart guide with the new display name for the Lean 4 extension ("Lean 4").
- #5185 fixes a bug where over time "import out of date" messages would accumulate.
- #4900 improves ilean loading performance by about a factor of two. Optimizes the JSON parser and the conversion from JSON to Lean data structures; see PR description for details.
- Other fixes or improvements
- #5031 localizes an instance in
Lsp.Diagnostics
.
- #5031 localizes an instance in
Pretty printing
nightly-2024-09-30
Changes since nightly-2024-09-29:
Full commit log
- 5e8718d chore: fix Array.modify lemmas (#5536)
- 4f2c4c7 chore: cleanup of Array GetElem lemmas (#5534)
- 56ba39d chore: more monadic simp lemmas (#5522)
- 1fca66b feat: Option.attach (#5532)
- 36c29be chore: fix name of Array.length_toList (#5526)
- cf14178 fix: default values for structure fields can be noncomputable (#5531)
- a4dfa83 chore: reduce use of deprecated lemmas in Array (#5527)
- c5fd652 feat: support Int.toNat in omega (#5523)
- 4cd4bcc chore: List simp fixes (#5521)
- 7d26a16 chore: restore @[simp] on List.getElem_mem et al (#5520)
- 3a46fd0 chore: unsimp BitVec.divRec_succ' (#5505)
nightly-2024-09-29
Changes since nightly-2024-09-28:
Full commit log
- 994cfa4 doc: update documentation and tests for
toUIntX
functions (#5497) - cf3e7de feat: let simp apply rules with higher-order patterns (#5479)
- 2ace579 chore: upstream List.fold lemmas (#5519)
- 40d6a6d fix: use breakable instead of unbreakable whitespace when formatting tokens (#5513)
- d96b7a7 chore: rename List.maximum? to max? (#5518)
- 40e97bd chore: upstream Subarray.empty (#5516)
- 3bd01de feat: upstream Array.qsortOrd (#5515)
- 8835ab4 feat: Array.eraseReps (#5514)
- 96adf04 fix: reduce parents in
structure
command (#5511) - 0db6daa feat: actual implementation for #5283 (#5512)
- 130b465 feat: generalize
elab_as_elim
to allow arbitrary motive applications (#5510)
nightly-2024-09-28
Changes since nightly-2024-09-27:
Full commit log
- ccdf07b chore: update stage0
- 5605e01 chore: BitVec.Lemmas - drop non-terminal simps (#5499)
- 5f22ba7 feat: bv_normalize handle -> False (#5507)
- 16a1689 feat: improve bv_normalize rules for Prop and == (#5506)
- 4ea76aa refactor: lake: switch new/init default to TOML (#5504)
- ef71f0b chore: restore @[simp] to upstreamed Nat.lt_off_iff (#5503)
- 9f4075b fix: refine how named arguments suppress explicit arguments (#5283)
- 1b65727 feat: have autoparams report parameter/field on failure (#5474)
- 56b78a0 chore: pr-release.yml: fix bot’s username to look for (#5495)
- e28bfed doc: remove inaccurate
PersistentEnvExtension.setState/modifyState
claim - e7691f3 fix:
induction
pre-tactic should be indented (#5494) - 48711ce feat: BitVec.(not_sshiftRight, not_sshiftRight_not, getMsb_not, msb_not) (#5492)
- 0733273 feat: add BitVec.toNat_[abs|sdiv|smod] (#5491)
- 2221296 chore: delete unused code (#5493)
- f22998e fix: collect level parameters in evalExpr (#3090)
- 3817b16 chore: use separate secrets for commenting and branching in pr-release.yml (#5490)
- 9eef726 chore: commit lake-manifest.json when updating lean-pr-testing branches (#5489)
nightly-2024-09-27
Changes since nightly-2024-09-26:
Full commit log
- 9460f79 feat: add sdiv_eq, smod_eq to allow sdiv/smod bitblasting (#5487)
- c38c07e chore: reverse simp direction for toArray_concat (#5485)
- 062ecb5 feat: add udiv/umod bitblasting for bv_decide (#5281)
- 13969ad fix: handling BitVec.ofNat with Nat fvars in bv_decide (#5484)
- 91a0334 chore: remove mention of
Lean.withSeconds
(#5481) - 1fb75b6 feat: add BitVec.(shiftLeft_add_distrib, shiftLeft_ushiftRight) (#5478)
- 26f508d test: check that recusive functions do not apply attriubutes twices (#5480)
- 3d1ac7c feat: add lemmas about
List.IsPrefix
(#5448)
nightly-2024-09-26
Changes since nightly-2024-09-25:
Full commit log
- 0196bca doc: fix typo in docstring of
computeSynthOrder
(#5398) - b320dcf doc: fix typo in
BitVec.mul
docstring (#5473) - 5dea30f feat: @[simp] lemmas about
List.toArray
(#5472) - 90cb6e5 chore: fix typos in Lean.MetavarContext (#5476)
- a3ca15d refactor: back
rfl
tactic primarily viaapply_rfl
(#3718) - c2f6297 feat: adjust simp attributes on monad lemmas (#5464)
- 1defa20 feat: add BitVec.toInt_[intMin|neg|neg_of_ne_intMin ] (#5450)
- 78c40f3 doc:
contradiction
docstring indendation (#5470) - 3e2a465 feat: add BitVec.[not_not, allOnes_shiftLeft_or_shiftLeft, allOnes_shiftLeft_and_shiftLeft, one_shiftLeft_mul] (#5469)
- 1ec0c64 test: remove flaky test (#5468)
- 604bcf5 chore: upstream some monad lemmas (#5463)
- 145c9ef feat: Array.foldX lemmas (#5466)
- e4f2de0 feat: improve Array GetElem lemmas (#5465)