Zulip Chat Archive
Stream: general
Topic: v4.14.0-rc2 discussion
Kim Morrison (Nov 06 2024 at 23:21):
Discusion of the v4.14.0 release candidates can go here.
Kim Morrison (Nov 06 2024 at 23:21):
Note that we've already released the second release candidate. rc1
had a linking problem that was affecting some downstream projects. rc2
should be functionally identical. I've updated Mathlib and lean4checker to use v4.14.0-rc2, but as of the moment I write this some others (Batteries, Aesop, ProofWidgets, lean4-cli, quote4, import-graph ...) are still on rc1. Hopefully authors/maintainers of those projects can do those bumps. If anyone else runs into problems because of something upstream using rc1, please ping here!
Jannis Limperg (Nov 06 2024 at 23:44):
I just noticed that lake
didn't rebuild anything when I switched from rc1 to rc2. Could this cause any problems?
Kim Morrison (Nov 06 2024 at 23:52):
Just noting something great that has arrived with v4.14.0-rc2
: @Kyle Miller's #18699 which switches over simp (config := {contextual := true})
to just simp +contextual
!
This new syntax for boolean configuration options is available for all tactics now.
Kyle Miller (Nov 07 2024 at 00:23):
Here are some other features that I'm excited made it into this release candidate:
- Dot notation can now make use of
CoeFun
instances. For example, givenm : Multiset α
, you can writem.card
even thoughMultiset.card
has typeMultiset α →+ ℕ
. - The
structure
command now supports recursion, so no need to write such structures usinginductive
. - There's now no need to write the
: Prop
instructure ... : Prop
orinductive ... : Prop
if the type obviously should be a proposition, for example astructure
with only propositional fields. - The
congr
andarg
/enter
/lhs
/rhs
conv tactics are now more powerful. You can also write things likearg -2
to get the second-to-last explicit argument orarg @-1
to get the last argument. - You can use
@[simp ←]
to add the reverse direction of a theorem as a simp lemma, without needing to modify the lemma statement. #eval
now can useToExpr
instances, giving hoverable results in the Infoview, and a number of bugs have been fixed, like missing messages when evaluating some monads. It attempts to auto-deriveRepr
instances too.- There's now better tactic completion even when your cursor is in the middle of whitespace.
There are plenty of great changes that I neglected to mention, and here's the full change log.
Johan Commelin (Nov 07 2024 at 05:38):
I really love the m.card
feature! It would be great if we could (automatically?!) refactor mathlib to take a lot of advantage of this.
Johan Commelin (Nov 07 2024 at 05:39):
I also notice that there are already a lot of simp +contextual
s in mathlib. I'm working on a PR to replace the remaining occurences of simp (config := {contextual := true})
Johan Commelin (Nov 07 2024 at 05:42):
Voila: #18718 (touches 91 files)
Ruben Van de Velde (Nov 07 2024 at 06:49):
Johan Commelin said:
I really love the
m.card
feature! It would be great if we could (automatically?!) refactor mathlib to take a lot of advantage of this.
That feature was really missed during the port. There might even be some porting notes about it
Joachim Breitner (Nov 07 2024 at 08:20):
Thanks for the summary, Kyle! Good substitute for propor release notes :-)
Marcus Rossel (Nov 09 2024 at 08:13):
Kyle Miller said:
- The
congr
andarg
/enter
/lhs
/rhs
conv tactics are now more powerful.
In what way is congr
more powerful now?
Asei Inoue (Nov 09 2024 at 10:00):
Lean.Eval class is removed?
Kyle Miller (Nov 09 2024 at 16:38):
@Marcus Rossel congr
can handle over-applied functions now; there's an example in the test file in lean4#5861. Also, arg
now does not make use of congr
, but instead it synthesizes its own specialized congruence lemma to access a particular argument. It too can handle over-applied functions.
Kyle Miller (Nov 09 2024 at 16:41):
@Asei Inoue Yes. The #eval
system splits the typeclass into two separate concerns. First, there's the new docs#MonadEval, which is docs#MonadLift but specifically for adapting monads to a monad that #eval
can support (IO, CoreM, MetaM, TermElabM, and CommandElabM). Second, there's finding a way to represent the evaluated value; it looks for a ToExpr
, Repr
, or ToString
instance.
Last updated: May 02 2025 at 03:31 UTC