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

Declaration silently not added to environment when using local notation #2257

Open
1 task done
alexjbest opened this issue Jun 5, 2023 · 1 comment
Open
1 task done

Comments

@alexjbest
Copy link
Contributor

alexjbest commented Jun 5, 2023

Prerequisites

  • Put an X between the brackets on this line if you have done all of the following:
    • Checked that your issue isn't already filed.
    • Reduced the issue to a self-contained, reproducible test case.

Description

When using local notation some declarations can silently not be added to the environment

Steps to Reproduce

variable {ι E : Type} (I : ι)

local notation "ℝ" => ι

def ha (_I : ι) (_f : ℝ → E) : Prop := True

variable {f : ℝ → E}

theorem tndsto (h : ha I f) : True := trivial
#check tndsto

Expected behavior: tndsto should be added to the environment and be printed by #check

Actual behavior: Without error or warning on tndsto itself nothing happens and check fails

Reproduces how often: 100%

Versions

latest, cross platform

Additional Information

Came up in mathlib porting this is a minimized version of the issue observed in https://leanprover.zulipchat.com/#narrow/stream/287929-mathlib4/topic/Lean.204.20doesn't.20add.20lemma.20to.20the.20environment
leanprover-community/mathlib4#4695

@digama0
Copy link
Collaborator

digama0 commented Jun 5, 2023

For cross referencing purposes: this is likely related to #2226 and may have the same root cause.

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