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

fix: bug in elab TC for projections #2700

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

digama0
Copy link
Collaborator

@digama0 digama0 commented Oct 16, 2023

This adapts the code from the inferProjType function and the kernel projection typechecker so that the elaborator correctly reports errors when the projection would be rejected by the kernel. Fixes #2697.

@digama0
Copy link
Collaborator Author

digama0 commented Oct 16, 2023

This PR fixes part of the issue (it prevents

inductive Foo : Prop where
  | mk (x : Nat) (h : x = x) : Foo

example (h : Foo) := h.2

from working), but it does not fix the example from #2697, and I think a proper fix would require more than just this, so this PR is on hold until I get approval for making some changes that will affect the kernel.

@github-actions github-actions bot added the toolchain-available A toolchain is available for this PR, at leanprover/lean4-pr-releases:pr-release-NNNN label Oct 17, 2023
leanprover-community-mathlib4-bot added a commit to leanprover-community/mathlib4 that referenced this pull request Oct 17, 2023
@leanprover-community-mathlib4-bot leanprover-community-mathlib4-bot added the breaks-mathlib This is not necessarily a blocker for merging: but there needs to be a plan label Oct 17, 2023
@leanprover-community-mathlib4-bot
Copy link
Collaborator

leanprover-community-mathlib4-bot commented Oct 17, 2023

kim-em added a commit to leanprover-community/mathlib4 that referenced this pull request Oct 22, 2023
@leanprover-bot leanprover-bot added the P-low We are not planning to work on this issue label Nov 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaks-mathlib This is not necessarily a blocker for merging: but there needs to be a plan low priority P-low We are not planning to work on this issue toolchain-available A toolchain is available for this PR, at leanprover/lean4-pr-releases:pr-release-NNNN
Projects
None yet
Development

Successfully merging this pull request may close these issues.

(kernel) invalid projection when extracting the proposition from an Exists statement.
3 participants