Zulip Chat Archive
Stream: mathlib4
Topic: erasing `unfold` rules in `aesop`, and `traceScript := true`
Jireh Loreaux (Sep 05 2023 at 17:23):
@Jannis Limperg I'm facing two aesop
issues that I assume is just my own ignorance:
- I can't seem to erase an
unfold
rule fromaesop
. To be more specific, I can erase it (in the sense thataesop
complains if I try to erase it twice), but I still seeaesop_unfold ...
and it still appears in the constants to unfold when usingset_option trace.aesop.ruleSets true
. - Here it seems to suggest that setting
traceScript := true
should output the proof thataesop
produces when it closes the goal. Is it possible to also have it output a partial proof script (withsorry
) when it fails to close the goal? Or at least, provide another option for it?
Jannis Limperg (Sep 05 2023 at 17:29):
The first sounds like a bug. (Erasing is not well tested.) Do you have an example?
Jannis Limperg (Sep 05 2023 at 17:34):
The second doesn't currently work, but it could certainly be made to work. Aesop would then report a partial proof corresponding to the safe rules it applied, just like it currently reports the goals produced by the safe rules. This needs some changes to the procedures that produce these tactic proofs, but I can prioritise those. (I'm away for conferences and summer schools all September, so progress won't be quick I'm afraid.)
Jannis Limperg (Sep 05 2023 at 17:34):
Btw, you can write aesop?
instead of setting traceScript := true
.
Jireh Loreaux (Sep 05 2023 at 17:56):
Here's an mwe for the first issue:
import Aesop
@[irreducible]
def bar : Nat := 37
example : bar = 37 := by aesop -- fails because it can't unfold `bar`
@[aesop unfold norm, irreducible]
def foo : Nat := 37
example : foo = 37 := by aesop -- works because it can unfold `foo`
attribute [-aesop] foo
-- errors with: 'foo' is not registered (with the given features) in any rule set.
attribute [-aesop] foo
example : foo = 37 := by aesop -- still works despite removing the `aesop` rules
Jireh Loreaux (Sep 05 2023 at 18:00):
As for the second issue: I'm not asking you to spend time working on it yet. I thought it could be a nice modification for the continuity?
tactic where it produces a partial proof that the function is continuous, but I haven't yet asked the community if this is desired. My guess is it will be though.
Jannis Limperg (Sep 05 2023 at 21:00):
Jireh Loreaux said:
Here's an mwe for the first issue: [...]
Fixed in Aesop master. Thank you for the very nice MWE!
Jannis Limperg (Sep 05 2023 at 21:02):
Jireh Loreaux said:
As for the second issue: I'm not asking you to spend time working on it yet. I thought it could be a nice modification for the
continuity?
tactic where it produces a partial proof that the function is continuous, but I haven't yet asked the community if this is desired. My guess is it will be though.
Okay. I'll certainly implement this at some point, but if you need it sooner than later, let me know.
Last updated: Dec 20 2023 at 11:08 UTC