Version
stringclasses 20
values | section
stringclasses 275
values | text
stringlengths 14
1.01k
| pull request
stringlengths 3
15
|
---|---|---|---|
v4.16.0 | Library | adds BitVec.[toFin|getMsbD]_setWidth and [getMsb|msb]_signExtend as well as ofInt_toInt. | 6338 |
v4.16.0 | Library | generalizes DecidableRel to allow a heterogeneous relation. | 6341 |
v4.16.0 | Library | reproduces the API around List.any/all for Array.any/all. | 6353 |
v4.16.0 | Library | makes fixes suggested by the Batteries environment linters, particularly simpNF, and unusedHavesSuffices. | 6364 |
v4.16.0 | Library | expands the Array.set and Array.setIfInBounds lemmas to match existing lemmas for List.set. | 6365 |
v4.16.0 | Library | brings Vector lemmas about membership and indexing to parity with List and Array. | 6367 |
v4.16.0 | Library | adds lemmas about Vector.set, anyM, any, allM, and all. | 6369 |
v4.16.0 | Library | adds theorems about == on Vector, reproducing those already on List and Array. | 6376 |
v4.16.0 | Library | replaces the inductive predicate List.lt with an upstreamed version of List.Lex from Mathlib. (Previously Lex.lt was defined in terms of <; now it is generalized to take an arbitrary relation.) This subtly changes the notion of ordering on List α.
List.lt was a weaker relation: in particular if l₁ < l₂, then a :: l₁ < b :: l₂ may hold according to List.lt even if a and b are merely incomparable (either neither a < b nor b < a), whereas according to List.Lex this would require a = b.
When < is total, in the sense that ¬ · < · is antisymmetric, then the two relations coincide.
Mathlib was already overriding the order instances for List α, so this change should not be noticed by anyone already using Mathlib.
We simultaneously add the boolean valued List.lex function, parameterised by a BEq typeclass and an arbitrary lt function. This will support the flexibility previously provided for List.lt, via a == function which is weaker than strict equality. | 6379 |
v4.16.0 | Library | redefines Range.forIn' and Range.forM, in preparation for writing lemmas about them. | 6390 |
v4.16.0 | Library | requires that the step size in Std.Range is positive, to avoid ill-specified behaviour. | 6391 |
v4.16.0 | Library | adds lemmas reducing for loops over Std.Range to for loops over List.range'. | 6396 |
v4.16.0 | Library | adds basic lemmas about lexicographic order on Array and Vector, achieving parity with List. | 6399 |
v4.16.0 | Library | adds missing lemmas about lexicographic order on List/Array/Vector. | 6423 |
v4.16.0 | Library | adds the necessary domain theory that backs the partial_fixpoint feature. | 6477 |
v4.16.0 | Compiler | adds support for HEq to the new code generator. | 6311 |
v4.16.0 | Compiler | adds support for Float32 to the Lean runtime. | 6348 |
v4.16.0 | Compiler | adds missing features and fixes bugs in the Float32 support | 6350 |
v4.16.0 | Compiler | ensures the new code generator produces code for opaque definitions that are not tagged as @[extern].
Remark: This is the behavior of the old code generator. | 6383 |
v4.16.0 | Compiler | adds support for erasure of Decidable.decide to the new code generator. It also adds a new Probe.runOnDeclsNamed function, which is helpful for writing targeted single-file tests of compiler internals. | 6405 |
v4.16.0 | Compiler | fixes a bug in the sharecommon module, which was returning incorrect results for objects that had already been processed by sharecommon. See the new test for an example that triggered the bug. | 6415 |
v4.16.0 | Compiler | adds support for extern LCNF decls, which is required for parity with the existing code generator. | 6429 |
v4.16.0 | Pretty Printing | adjusts the way the pretty printer unresolves names. It used to make use of all exports when pretty printing, but now it only uses exports that put names into parent namespaces (heuristic: these are "API exports" that are intended by the library author), rather than "horizontal exports" that put the names into an unrelated namespace, which the dot notation feature in #6189 now incentivizes. | 5689 |
v4.16.0 | Pretty Printing | makes it harder to create "fake" theorems about definitions that are stubbed-out with sorry by ensuring that each sorry is not definitionally equal to any other. For example, this now fails:
lean
example : (sorry : Nat) = sorry := rfl -- fails
However, this still succeeds, since the sorry is a single indeterminate Nat:
lean
def f (n : Nat) : Nat := sorry
example : f 0 = f 1 := rfl -- succeeds
One can be more careful by putting parameters to the right of the colon:
lean
def f : (n : Nat) → Nat := sorry
example : f 0 = f 1 := rfl -- fails
Most sources of synthetic sorries (recall: a sorry that originates from the elaborator) are now unique, except for elaboration errors, since making these unique tends to cause a confusing cascade of errors. In general, however, such sorries are labeled. This enables "go to definition" on sorry in the Infoview, which brings you to its origin. The option set_option pp.sorrySource true causes the pretty printer to show source position information on sorries. | 5757 |
v4.16.0 | Documentation | adds a docstring to the @[app_delab] attribute. | 6450 |
v4.16.0 | Server | fixes a bug in structure instance field completion that caused it to not function correctly for bracketed structure instances written in Mathlib style. | 6279 |
v4.16.0 | Server | fixes a regression where goals that don't exist were being displayed. The regression was triggered by #5835 and originally caused by #4926. | 6408 |
v4.16.0 | Lake | changes Lake's build process to no longer use leanc for compiling C files or linking shared libraries and executables. Instead, it directly invokes the bundled compiler (or the native compiler if none) using the necessary flags. | 6176 |
v4.16.0 | Lake | adapts Lake modules to use prelude and includes them in the check-prelude CI. | 6289 |
v4.16.0 | Lake | ensures the the log error position is properly preserved when prepending stray log entries to the job log. It also adds comparison support for Log.Pos. | 6291 |
v4.16.0 | Lake | merges BuildJob and Job, deprecating the former. Job now contains a trace as part of its state which can be interacted with monadically. also simplifies the implementation of OpaqueJob. | 6388 |
v4.16.0 | Lake | adds the ability to override package entries in a Lake manifest via a separate JSON file. This file can be specified on the command line with --packages or applied persistently by placing it at .lake/package-overrides.json. | 6411 |
v4.16.0 | Lake | fixes a bug in #6388 where the Package.afterBuildCahe* functions would produce different traces depending on whether the cache was fetched. | 6422 |
v4.16.0 | Other | upstreams the ToLevel typeclass from mathlib and uses it to fix the existing ToExpr instances so that they are truly universe polymorphic (previously it generated malformed expressions when the universe level was nonzero). We improve on the mathlib definition of ToLevel to ensure the class always lives in Type, irrespective of the universe parameter. | 6285 |
v4.16.0 | Other | fixes errors at load time in the comparison mode of the Firefox profiler. | 6363 |
v4.15.0 | Language | implements `Simp.Config.implicitDefEqsProofs`. When `true` (default: `true`), `simp` will **not** create a proof term for a rewriting rule associated with an `rfl`-theorem. Rewriting rules are provided by users by annotating theorems with the attribute `@[simp]`. If the proof of the theorem is just `rfl` (reflexivity), and `implicitDefEqProofs := true`, `simp` will **not** create a proof term which is an application of the annotated theorem. | 4595 |
v4.15.0 | Language | avoid negative environment lookup | 5429 |
v4.15.0 | Language | ensure `instantiateMVarsProfiling` adds a trace node | 5501 |
v4.15.0 | Language | adds a feature to the the mutual def elaborator where the `instance` command yields theorems instead of definitions when the class is a `Prop`. | 5856 |
v4.15.0 | Language | unset trailing for `simpa?` "try this" suggestion | 5907 |
v4.15.0 | Language | changes the rule for which projections become instances. Before, all parents along with all indirect ancestors that were represented as subobject fields would have their projections become instances. Now only projections for direct parents become instances. | 5920 |
v4.15.0 | Language | make `all_goals` admit goals on failure | 5934 |
v4.15.0 | Language | introduce synthetic atoms in bv_decide | 5942 |
v4.15.0 | Language | adds a new definition `Message.kind` which returns the top-level tag of a message. This is serialized as the new field `kind` in `SerialMessaege` so that i can be used by external consumers (e.g., Lake) to identify messages via `lean --json`. | 5945 |
v4.15.0 | Language | `arg` conv tactic misreported number of arguments on error | 5968 |
v4.15.0 | Language | BitVec.twoPow in bv_decide | 5979 |
v4.15.0 | Language | simplifies the implementation of `omega`. | 5991 |
v4.15.0 | Language | fix style in bv_decide normalizer | 5992 |
v4.15.0 | Language | adds configuration options for `decide`/`decide!`/`native_decide` and refactors the tactics to be frontends to the same backend. Adds a `+revert` option that cleans up the local context and reverts all local variables the goal depends on, along with indirect propositional hypotheses. Makes `native_decide` fail at elaboration time on failure without sacrificing performance (the decision procedure is still evaluated just once). Now `native_decide` supports universe polymorphism. | 5999 |
v4.15.0 | Language | changes `bv_decide`'s configuration from lots of `set_option` to an elaborated config like `simp` or `omega`. The notable exception is `sat.solver` which is still a `set_option` such that users can configure a custom SAT solver globally for an entire project or file. Additionally it introduces the ability to set `maxSteps` for the simp preprocessing run through the new config. | 6010 |
v4.15.0 | Language | improves the validation of new syntactic tokens. Previously, the validation code had inconsistencies: some atoms would be accepted only if they had a leading space as a pretty printer hint. Additionally, atoms with internal whitespace are no longer allowed. | 6012 |
v4.15.0 | Language | removes the `decide!` tactic in favor of `decide +kernel` (breaking change). | 6016 |
v4.15.0 | Language | removes @[specilize] from `MkBinding.mkBinding`, which is a function that cannot be specialized (as none of its arguments are functions). As a result, the specializable function `Nat.foldRevM.loop` doesn't get specialized, which leads to worse performing code. | 6019 |
v4.15.0 | Language | makes the `change` tactic and conv tactic use the same elaboration strategy. It works uniformly for both the target and local hypotheses. Now `change` can assign metavariables, for example:
```lean
example (x y z : Nat) : x + y = z := by
change ?a = _
let w := ?a
-- now `w : Nat := x + y`
``` | 6022 |
v4.15.0 | Language | fixes a bug where the monad lift coercion elaborator would partially unify expressions even if they were not monads. This could be taken advantage of to propagate information that could help elaboration make progress, for example the first `change` worked because the monad lift coercion elaborator was unifying `@Eq _ _` with `@Eq (Nat × Nat) p`:
```lean
example (p : Nat × Nat) : p = p := by
change _ = ⟨_, _⟩ -- used to work (yielding `p = (p.fst, p.snd)`), now it doesn't
change ⟨_, _⟩ = _ -- never worked
```
As such, this is a breaking change; you may need to adjust expressions to include additional implicit arguments. | 6024 |
v4.15.0 | Language | adds a normalization rule to `bv_normalize` (which is used by `bv_decide`) that converts `x / 2^k` into `x >>> k` under suitable conditions. This allows us to simplify the expensive division circuits that are used for bitblasting into much cheaper shifting circuits. Concretely, it allows for the following canonicalization: | 6029 |
v4.15.0 | Language | fixes `simp only [· ∈ ·]` after #5020. | 6030 |
v4.15.0 | Language | introduces the and flattening pre processing pass from Bitwuzla to `bv_decide`. It splits hypotheses of the form `(a && b) = true` into `a = true` and `b = true` which has synergy potential with the already existing embedded constraint substitution pass. | 6035 |
v4.15.0 | Language | fixes `bv_decide`'s embedded constraint substitution to generate correct counter examples in the corner case where duplicate theorems are in the local context. | 6037 |
v4.15.0 | Language | add `LEAN_ALWAYS_INLINE` to some functions | 6045 |
v4.15.0 | Language | fixes `simp?` suggesting output with invalid indentation | 6048 |
v4.15.0 | Language | mark `Meta.Context.config` as private | 6051 |
v4.15.0 | Language | fixes the caching infrastructure for `whnf` and `isDefEq`, ensuring the cache accounts for all relevant configuration flags. It also cleans up the `WHNF.lean` module and improves the configuration of `whnf`. | 6053 |
v4.15.0 | Language | adds a simp_arith benchmark. | 6061 |
v4.15.0 | Language | optimize Nat.Linear.Expr.toPoly | 6062 |
v4.15.0 | Language | optimize Nat.Linear.Poly.norm | 6064 |
v4.15.0 | Language | improves the asymptotic performance of `simp_arith` when there are many variables to consider. | 6068 |
v4.15.0 | Language | adds options to `bv_decide`'s configuration structure such that all non mandatory preprocessing passes can be disabled. | 6077 |
v4.15.0 | Language | changes how the canonicalizer handles `forall` and `lambda`, replacing bvars with temporary fvars. Fixes a bug reported by @hrmacbeth on [zulip](https://leanprover.zulipchat.com/#narrow/channel/270676-lean4/topic/Quantifiers.20in.20CanonM/near/482483448). | 6082 |
v4.15.0 | Language | use mkFreshUserName in ArgsPacker | 6093 |
v4.15.0 | Language | improves the `#print` command for structures to show all fields and which parents the fields were inherited from, hiding internal details such as which parents are represented as subobjects. This information is still present in the constructor if needed. The pretty printer for private constants is also improved, and it now handles private names from the current module like any other name; private names from other modules are made hygienic. | 6096 |
v4.15.0 | Language | modifies the signature of `Nat.fold`, `Nat.foldRev`, `Nat.any`, `Nat.all`, so that the function is passed the upper bound. This allows us to change runtime array bounds checks to compile time checks in many places. | 6139 |
v4.15.0 | Language | adds a primitive for creating temporary directories, akin to the existing functionality for creating temporary files. | 6148 |
v4.15.0 | Language | completes the elementwise accessors for `ofNatLt`, `allOnes`, and `not` by adding their implementations of `getMsbD`. | 6149 |
v4.15.0 | Language | completes the `toInt` interface for `BitVec` bitwise operations. | 6151 |
v4.15.0 | Language | implements `BitVec.toInt_abs`. | 6154 |
v4.15.0 | Language | adds `toNat` theorems for `BitVec.signExtend.` | 6155 |
v4.15.0 | Language | adds toInt theorems for BitVec.signExtend. | 6157 |
v4.15.0 | Language | adds theorem `mod_eq_sub`, makes theorem `sub_mul_eq_mod_of_lt_of_le` not private anymore and moves its location within the `rotate*` section to use it in other proofs. | 6160 |
v4.15.0 | Language | uses `Array.findFinIdx?` in preference to `Array.findIdx?` where it allows converting a runtime bounds check to a compile time bounds check. | 6184 |
v4.15.0 | Language | completes the `toNat` theorems for the bitwise operations (`and`, `or`, `xor`, `shiftLeft`, `shiftRight`) of the UInt types and adds `toBitVec` theorems as well. It also renames `and_toNat` to `toNat_and` to fit with the current naming convention. | 6188 |
v4.15.0 | Language | adds the builtin simproc `USize.reduceToNat` which reduces the `USize.toNat` operation on literals less than `UInt32.size` (i.e., `4294967296`). | 6190 |
v4.15.0 | Language | adds `Array.zipWithAll`, and the basic lemmas relating it to `List.zipWithAll`. | 6191 |
v4.15.0 | Language | adds deprecations for `Lean.HashMap` functions which did not receive deprecation attributes initially. | 6192 |
v4.15.0 | Language | completes the TODO in `Init.Data.Array.BinSearch`, removing the `partial` keyword and converting runtime array bounds checks to compile time bounds checks. | 6193 |
v4.15.0 | Language | changes the signature of `Array.swap`, so it takes `Nat` arguments with tactic provided bounds checking. It also renames `Array.swap!` to `Array.swapIfInBounds`. | 6194 |
v4.15.0 | Language | renames `Array.setD` to `Array.setIfInBounds`. | 6195 |
v4.15.0 | Language | upstreams the definition of `Vector` from Batteries, along with the basic functions. | 6197 |
v4.15.0 | Language | upstreams `Nat.lt_pow_self` and `Nat.lt_two_pow` from Mathlib and uses them to prove the simp theorem `Nat.mod_two_pow`. | 6200 |
v4.15.0 | Language | makes `USize.toUInt64` a regular non-opaque definition. | 6202 |
v4.15.0 | Language | adds theorems `le_usize_size`, `usize_size_le`, which make proving inequalities about `USize.size` easier. | 6203 |
v4.15.0 | Language | upstreams some UInt theorems from Batteries and adds more `toNat`-related theorems. It also adds the missing `UInt8` and `UInt16` to/from `USize` conversions so that the interface is uniform across the UInt types. | 6205 |
v4.15.0 | Language | ensures the `Fin.foldl` and `Fin.foldr` are semireducible. Without this the defeq `example (f : Fin 3 → ℕ) : List.ofFn f = [f 0, f 1, f 2] := rfl` was failing. | 6207 |
v4.15.0 | Language | fix Vector.indexOf? | 6208 |
v4.15.0 | Language | adds `simp` lemmas about `List`'s `==` operation. | 6217 |
v4.15.0 | Language | fixes:
- Problems in other linux distributions that the default `tzdata` directory is not the same as previously defined by ensuring it with a fallback behavior when directory is missing.
- Trim unnecessary characters from local time identifier. | 6221 |
v4.15.0 | Language | changes the definition of `HashSet.insertMany` and `HashSet.Raw.insertMany` so that it is equivalent to repeatedly calling `HashSet.insert`/`HashSet.Raw.insert`. It also clarifies the docstrings of all the `insert` and `insertMany` functions. | 6222 |
v4.15.0 | Language | copies some lemmas about `List.foldX` to `Array`. | 6230 |
v4.15.0 | Language | upstreams lemmas about `Vector` from Batteries. | 6233 |
v4.15.0 | Language | upstreams the definition and basic lemmas about `List.finRange` from Batteries. | 6234 |