You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Reduce the issue to a minimal, self-contained, reproducible test case. Avoid dependencies to mathlib4 or std4.
Description
Unfold lemma generator fails on the following:
defreplace (f : Nat → Option Nat) (t : Nat) : Nat :=
match f t with
| some u => u
| none =>
match t with
| .zero => .zero
| .succ t' => replace f t'
It also fails for the following, where f is applied to a different value than the value being recursed on:
defreplace2 (f : Nat → Option Nat) (t1 t2 : Nat) : Nat :=
match f t1 with
| some u => u
| none =>
match t2 with
| .zero => .zero
| .succ t' => replace2 f t1 t'
However, it succeeds if the matches are swapped:
defreplace' (f : Nat → Option Nat) (t : Nat) : Nat :=
match t with
| .zero =>
match f t with
| some u => u
| none => .zero
| .succ t' =>
match f t with
| some u => u
| none => replace' f t'
I am unsure if the issue I'm currently running into is the same or a different bug. In order to prevent duplicates, I thought it might be worth first asking if a separate bug report seems warranted:
If you think it's a different issue, then please tell me and I'll open another bug report. If it's the same issue, then the above minimal example is way better than mine, as it's much shorter.
I think it’s a separate issue, it says “failed to generate equational theorem for 'popLast'”, not “failed to generate unfold theorem” (which is a later step), so a separate issue make sense. Thanks for reporting!
Prerequisites
Description
Unfold lemma generator fails on the following:
It also fails for the following, where
f
is applied to a different value than the value being recursed on:However, it succeeds if the matches are swapped:
Context
Reported on Zulip
Steps to Reproduce
Expected behavior: Unfolds
replace
in tactic stateActual behavior: Emits an error:
failed to generate unfold theorem for 'replace'
Versions
4.3.0-rc2
NixOS (unstable branch)
Impact
Add 👍 to issues you consider important. If others are impacted by this issue, please ask them to add 👍 to it.
The text was updated successfully, but these errors were encountered: