We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Please put an X between the brackets as you perform the following steps:
This code doesn't work:
def last {α : Type} (a : Array α) : Option α := match _ : a.size with | 0 => none | m + 1 => some a[m]
but works when explicitly naming proof:
def last {α : Type} (a : Array α) : Option α := match h : a.size with | 0 => none | m + 1 => some a[m]
Hole works with if-then-else:
def last {α : Type} (a : Array α) : Option α := if _ : a.size = 0 then none else some a[a.size-1]
For consistency should also work with match.
Lean 4.16.0-nightly-2025-01-23
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:
Thanks for reporting, I certainly have been hitting this myself
Sorry, something went wrong.
match
Successfully merging a pull request may close this issue.
Prerequisites
Please put an X between the brackets as you perform the following steps:
https://github.com/leanprover/lean4/issues
Avoid dependencies to Mathlib or Batteries.
https://live.lean-lang.org/#project=lean-nightly
(You can also use the settings there to switch to “Lean nightly”)
Description
This code doesn't work:
but works when explicitly naming proof:
Context
Hole works with if-then-else:
For consistency should also work with match.
Versions
Lean 4.16.0-nightly-2025-01-23
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: