Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

partial_fixpoint: failed to generate equational theorem #6786

Closed
nomeata opened this issue Jan 27, 2025 · 0 comments · Fixed by #6790
Closed

partial_fixpoint: failed to generate equational theorem #6786

nomeata opened this issue Jan 27, 2025 · 0 comments · Fixed by #6790
Labels
bug Something isn't working

Comments

@nomeata
Copy link
Collaborator

nomeata commented Jan 27, 2025

David pointed out this bug to me:

def find42 : Nat → Bool
  | 42 => true
  | n => find42 (n + 1)
partial_fixpoint

/--
error: failed to generate equational theorem for 'find42'
x : Nat
x_1 : x = 42 → False
⊢ (match x with
    | 42 => true
    | n =>
      Lean.Order.fix
        (fun f x =>
          match x with
          | 42 => true
          | n => f (n + 1))
        find42.proof_3 (n + 1)) =
    find42 (x + 1)
-/
#guard_msgs in
#print equations find42

Versions

Lean 4.16.0-nightly-2025-01-27

Impact

Add 👍 to issues you consider important. If others are impacted by this issue, please ask them to add 👍 to it.

@nomeata nomeata added the bug Something isn't working label Jan 27, 2025
nomeata added a commit that referenced this issue Jan 27, 2025
github-merge-queue bot pushed a commit that referenced this issue Jan 27, 2025
…6790)

This PR fixes an issue with the generation of equational theorems from
`partial_fixpoint` when case-splitting is necessary. Fixes #6786.
luisacicolini pushed a commit to opencompl/lean4 that referenced this issue Jan 28, 2025
…eanprover#6790)

This PR fixes an issue with the generation of equational theorems from
`partial_fixpoint` when case-splitting is necessary. Fixes leanprover#6786.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant