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
When a termination_by statement depends on parameters with a default value, one can sometimes get the error The termination argument's type must not depend on the function's varying parameters.
The error disappears when the default values are removed.
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
When a
termination_by
statement depends on parameters with a default value, one can sometimes get the errorThe termination argument's type must not depend on the function's varying parameters
.The error disappears when the default values are removed.
Context
This error occurred when coding a solution to an Advent of Code problem, and was also brought up on the Lean Zulip
Steps to Reproduce
Expected behavior: The
termination_by
statement is accepted and no error occurs.Actual behavior: The
termination_by
statement produces the errorVersions
Lean 4.15.0-rc1 (locally, and also on live.lean-lang.org)
Target: x86_64-unknown-linux-gnu
Arch Linux x86_64, kernel 6.6.63-1-lts
Also tried Lean 4.16.0-nightly-2024-12-09 on live.lean-lang.org, the bug is also present there.
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: