Skip to content

Commit cf3c631

Browse files
committed
chore: incorporate notes from release_drafts
1 parent 4b2c80b commit cf3c631

File tree

2 files changed

+11
-19
lines changed

2 files changed

+11
-19
lines changed

RELEASES.md

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -416,9 +416,17 @@ with List and Array.
416416
* [#6376](https://github.com/leanprover/lean4/pull/6376) adds theorems about `==` on `Vector`, reproducing those already
417417
on `List` and `Array`.
418418
419-
* [#6379](https://github.com/leanprover/lean4/pull/6379) replaces `List.lt` with `List.Lex`, from Mathlib, and adds the
420-
new `Bool` valued lexicographic comparatory function `List.lex`. This
421-
subtly changes the definition of `<` on Lists in some situations.
419+
* [#6379](https://github.com/leanprover/lean4/pull/6379) replaces the inductive predicate `List.lt` with an upstreamed version of `List.Lex` from Mathlib.
420+
(Previously `Lex.lt` was defined in terms of `<`; now it is generalized to take an arbitrary relation.)
421+
This subtly changes the notion of ordering on `List α`.
422+
423+
`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`.
424+
425+
When `<` is total, in the sense that `¬ · < ·` is antisymmetric, then the two relations coincide.
426+
427+
Mathlib was already overriding the order instances for `List α`, so this change should not be noticed by anyone already using Mathlib.
428+
429+
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.
422430
423431
* [#6390](https://github.com/leanprover/lean4/pull/6390) redefines `Range.forIn'` and `Range.forM`, in preparation for
424432
writing lemmas about them.

releases_drafts/list_lex.md

Lines changed: 0 additions & 16 deletions
This file was deleted.

0 commit comments

Comments
 (0)