-
Notifications
You must be signed in to change notification settings - Fork 463
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
Incorrect promotion from index to paramater #3458
Labels
bug
Something isn't working
Comments
arthur-adjedj
added a commit
to arthur-adjedj/lean4
that referenced
this issue
Feb 22, 2024
arthur-adjedj
added a commit
to arthur-adjedj/lean4
that referenced
this issue
Mar 4, 2024
arthur-adjedj
added a commit
to arthur-adjedj/lean4
that referenced
this issue
Mar 4, 2024
arthur-adjedj
added a commit
to arthur-adjedj/lean4
that referenced
this issue
Mar 4, 2024
arthur-adjedj
added a commit
to arthur-adjedj/lean4
that referenced
this issue
Mar 4, 2024
arthur-adjedj
added a commit
to arthur-adjedj/lean4
that referenced
this issue
Mar 4, 2024
arthur-adjedj
added a commit
to arthur-adjedj/lean4
that referenced
this issue
Mar 4, 2024
arthur-adjedj
added a commit
to arthur-adjedj/lean4
that referenced
this issue
Mar 4, 2024
arthur-adjedj
added a commit
to arthur-adjedj/lean4
that referenced
this issue
Mar 4, 2024
arthur-adjedj
added a commit
to arthur-adjedj/lean4
that referenced
this issue
Mar 7, 2024
github-merge-queue bot
pushed a commit
that referenced
this issue
Apr 22, 2024
This PR partly addresses #3458, by adding an option `autoPromoteIndices` to turn off the promotion of fixed indices to parameters. The actual fix for the issue is in a separate PR #3591. Because nested inductive datatypes parameters cannot contain local variables, it is often desirable for a fixed index to not be promoted, as to allow free variables in that place. See example in `3458_1.lean`
arthur-adjedj
added a commit
to arthur-adjedj/lean4
that referenced
this issue
Apr 24, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Prerequisites
Description
Some inductive types with indices get their indices promoted to parameters in cases where it shouldn't, leading to kernel-level errors afterwards
Context
The issue was first discovered here
Steps to Reproduce
MWE:
Expected behavior: No error
Actual behavior: The index of
Iμ
gets promoted to a parameter during elaboration, leading to the following error:Versions
nightly-2024-02-21
Ubuntu
Additional Information
While there are some workarounds to avoid the promotion of indices to parameters, Lean would benefit from having an option to turn that feature off altogether.
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: