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

exact? suggests an extra id #6710

Open
3 tasks done
ldct opened this issue Jan 20, 2025 · 1 comment
Open
3 tasks done

exact? suggests an extra id #6710

ldct opened this issue Jan 20, 2025 · 1 comment
Labels
bug Something isn't working

Comments

@ldct
Copy link

ldct commented Jan 20, 2025

Prerequisites

Please put an X between the brackets as you perform the following steps:

Description

exact? suggests term with id

Context

Steps to Reproduce

  1. In this proof, hover over exact? to see what it suggests: example (a : Nat) (ha : a ≠ 0) : (0 < a ∨ a < 0) := by exact?

Expected behavior:

It suggests exact Nat.lt_or_gt_of_ne (Ne.symm ha)

Actual behavior:

It suggests exact Nat.lt_or_gt_of_ne (id (Ne.symm ha)) (note the extra id)

Versions

Lean 4.16.0-nightly-2025-01-19
Target: x86_64-unknown-linux-gnu

Impact

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

@ldct ldct added the bug Something isn't working label Jan 20, 2025
@nomeata
Copy link
Collaborator

nomeata commented Jan 20, 2025

Thanks for the report. It seems that it's not pretty, but also not harmful, right?

(I wonder if the id comes from a type annotation added by the meta code, and omitting the type argument here means that in some case the roof term doesn't re-elaborate. Maybe an “expected Type hint” should use a variant of id that takes the type as an explicit argument. Or the delaborator could be clever about when to use @id.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants