Tags: anoma/lean4
Tags
chore: release_steps runs lake exe cache get when needed
fix: overeager specialisation reuse in codegen (leanprover#10429) This PR fixes and overeager reuse of specialisation in the code generator. The issue was originally discovered in https://leanprover.zulipchat.com/#narrow/channel/270676-lean4/topic/Miscompilation.20.28incorrect.20code.29.20in.20new.20compiler/near/540037917 and occurs because the specialisation cache didnt't take the name of alternatives in pattern matches into account.
feat: non-commutative ring normalizer in `grind` (leanprover#10375) This PR adds support for non-commutative ring normalization in `grind`. The new normalizer also accounts for the `IsCharP` type class. Examples: ```lean open Lean Grind variable (R : Type u) [Ring R] example (a b : R) : (a + 2 * b)^2 = a^2 + 2 * a * b + 2 * b * a + 4 * b^2 := by grind example (a b : R) : (a + 2 * b)^2 = a^2 + 2 * a * b + -b * (-4) * a - 2*b*a + 4 * b^2 := by grind variable [IsCharP R 4] example (a b : R) : (a - b)^2 = a^2 - a * b - b * 5 * a + b^2 := by grind example (a b : R) : (a - b)^2 = 13*a^2 - a * b - b * 5 * a + b*3*b*3 := by grind ```
refactor: port more of `shell.cpp` to Lean (leanprover#10086) This PR ports more of the post-initialization C++ shell code to Lean. All that remains is the initialization of the profiler and task manager. As initialization tasks rather than main shell code, they were left in C++ (where the rest of the initialization code currently is). The `max_memory` and `timeout` Lean options used by the the `--memory` and `--timeout` command-line options are now properly registered. The server defaults for max memory and max heartbeats (timeout) were removed as they were not actually used (because the `server` option that was checked was neither set nor exists). This PR also makes better use of the module system in `Shell.lean` and fixes a minor bug in a previous port where the file name check was dependent on building the `.ilean` rather than the `.c` file (as was originally the case). Fixes leanprover#9879. (cherry picked from commit db3fb47)
fix: correctly handle non-`Nat` literal types in LCNF `elimDeadBranch… …es` (leanprover#9703) This PR changes the LCNF `elimDeadBranches` pass so that it considers all non-`Nat` literal types to be `⊤`. It turns out that fixing this to correctly handle all of these types with the current abstract value representation is surprisingly nontrivial, and it's better to just land the fix first.
refactor: Expose DeclNameGenerator idx (leanprover#9342) Backport 275e483 from leanprover#9020. Co-authored-by: Leni Aniva <[email protected]>
PreviousNext