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

assertInstancesCommute loops when there are several unnamed assumptions #38

Open
dwrensha opened this issue Mar 7, 2024 · 1 comment

Comments

@thorimur
Copy link

thorimur commented Mar 7, 2024

I'm not sure this is actually about unnamed assumptions per se. I think it's because let _ ← ... elaborates differently from let _i ← ..., and the former instead effectively becomes let <newname> := .... Note that writing let _i := ← synthInstanceQ ... causes the same maximum recursion depth issue in the linked PR; also note that the local context contains let decls (displaying :=) in both problematic cases.

MWE:

import Lean
import Qq

open Qq Lean.Meta

example : MetaM Unit := do
  have P : Q(Prop) := sorry
  let x := ← synthInstanceQ q(Decidable $P) -- or `let _ ← synthInstanceQ ...`
  assertInstancesCommute -- maximum recursion depth reached

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants