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
Which, while correct, does contain the unused variable idx and will get flagged by the unused
variable linter. It would be great if it only did this for variables that are actually used in
the decreasing term.
Context
This was discovered as part of my work on LeanSAT where lots of theorems of this form (that are actually correct due to additional constraints on the indices) produced slightly "wrong" termination_by? terms.
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
The following (not quite correct theorem) causes an annoyance with
termination_by?
:Here
termination_by?
suggests:Which, while correct, does contain the unused variable
idx
and will get flagged by the unusedvariable linter. It would be great if it only did this for variables that are actually used in
the decreasing term.
Context
This was discovered as part of my work on LeanSAT where lots of theorems of this form (that are actually correct due to additional constraints on the indices) produced slightly "wrong"
termination_by?
terms.Expected behavior: Suggest
input.size - curr
Actual behavior: Suggest
idx => input.size - curr
Versions
"4.8.0-rc1"
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: