Zulip Chat Archive
Stream: lean4
Topic: zetaDelta in Aesop simp
Kim Morrison (Feb 26 2024 at 05:04):
@Jannis Limperg, how would you feel about setting simp_config := {zetaDelta := true} by default in aesop?
I've done so in aesop_cat on nightly-testing in Mathlib, but there are plain aesop calls that fail now because it won't unfold let.
Jannis Limperg (Feb 26 2024 at 09:40):
I'm not enthusiastic about diverging from the default config, for two reasons:
- It's surprising if the
simpin Aesop is a slightly differentsimpthan the usual one. aesop?has to outputsimp_all { zetaDelta := true }instead ofsimp_all.
I see three ways to address these issues:
- Enable
zetaDeltaforsimp_allin core. I feel like this might make sense sincesimp_allis supposed to use all hypotheses.simp_allalready enablescontextual, so there's precedent. - Optimise
aesop?output to replacesimp_all { zetaDelta := true }withsimp_allwhere possible. I'm working on this capability anyway (slowly and intermittently). - Include expanded
lets in the theorem list generated bysimp?. Maybe this already happens; if so, issue 2 is already solved.
Yaël Dillies (Feb 26 2024 at 09:44):
Solution 1 sounds the most sensible to me
Kim Morrison (Feb 26 2024 at 11:09):
Okay, 1. seems pretty difficult to squeeze in between now and the release. Today is feels rather unlikely an on time release is possible, because Mathlib is still quite broken, and I would prefer to avoid solutions that require further round-trips with Lean updates.
Kim Morrison (Feb 26 2024 at 11:10):
I will get the ball rolling, but if I think in the meantime we are going to have to replace aesop in Mathlib with aesop_foo, that changes the simp_config.
Jannis Limperg (Feb 26 2024 at 20:52):
Scott Morrison said:
I will get the ball rolling, but if I think in the meantime we are going to have to replace
aesopin Mathlib withaesop_foo, that changes thesimp_config.
If that's the alternative, then I'd rather enable zetaDelta in Aesop as a stopgap measure, without adjusting the output of aesop?. This means aesop? will be borked whenever a proof relies on zetaDelta, but that seems like the lesser evil.
Kim Morrison (Feb 27 2024 at 03:03):
@Jannis Limperg how about the following. It will require more engineering but seems to give a nice result.
When aesop calls simp, it collects let bindings and passes them to simp (i.e. "explicitly" without zetaDelta). It then uses the simp.trace information in proof reconstruction, to only include any let bindings that were actually simplified.
Kim Morrison (Feb 27 2024 at 03:04):
In the meantime, however, I'd be happy with having aesop with zetaDelta enabled, but without adjusting aesop?.
Jannis Limperg (Feb 27 2024 at 11:51):
Scott Morrison said:
Jannis Limperg how about the following. It will require more engineering but seems to give a nice result.
When
aesopcallssimp, it collectsletbindings and passes them tosimp(i.e. "explicitly" withoutzetaDelta). It then uses the simp.trace information in proof reconstruction, to only include any let bindings that were actually simplified.
Okay, I'll take a shot at implementing this.
Jannis Limperg (Feb 27 2024 at 18:14):
Implemented here. aesop? is still borked due to lean4#3519. I also opened an RFC for enabling zetaDelta by default in simp_all and simp [*]: lean4#3520.
Notification Bot (Feb 27 2024 at 18:15):
10 messages were moved here from #lean4 > Aesop dev updates by Jannis Limperg.
Last updated: May 02 2025 at 03:31 UTC