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

Meta.check does not check projections #5660

Closed
nomeata opened this issue Oct 9, 2024 · 0 comments · Fixed by #6398
Closed

Meta.check does not check projections #5660

nomeata opened this issue Oct 9, 2024 · 0 comments · Fixed by #6398
Labels
bug Something isn't working P-medium We may work on this issue if we find the time

Comments

@nomeata
Copy link
Collaborator

nomeata commented Oct 9, 2024

The Meta.check function is incomplete, in particular for projections:

private partial def checkAux (e : Expr) : MetaM Unit := do
  check e |>.run
where
  check (e : Expr) : MonadCacheT ExprStructEq Unit MetaM Unit :=
    checkCache { val := e : ExprStructEq } fun _ => do
      match e with
      | .forallE ..      => checkForall e
      | .lam ..          => checkLambdaLet e
      | .letE ..         => checkLambdaLet e
      | .const c lvls    => checkConstant c lvls
      | .app f a         => check f; check a; checkApp f a
      | .mdata _ e       => check e
      | .proj _ _ e      => check e  -- ←←←←←
      | _                => return ()

it should probably do similar checks as the kernel, or as inferType does.

Versions

"4.12.0-nightly-2024-10-09"

Impact

Add 👍 to issues you consider important. If others are impacted by this issue, please ask them to add 👍 to it.

@nomeata nomeata added the bug Something isn't working label Oct 9, 2024
@leanprover-bot leanprover-bot added the P-medium We may work on this issue if we find the time label Oct 18, 2024
leodemoura added a commit that referenced this issue Dec 16, 2024
This PR ensures `Meta.check` check projections.

closes #5660
github-merge-queue bot pushed a commit that referenced this issue Dec 16, 2024
This PR ensures `Meta.check` check projections.

closes #5660
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working P-medium We may work on this issue if we find the time
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants