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

Dangerous simp lemmas #118

Open
gebner opened this issue Feb 21, 2022 · 3 comments
Open

Dangerous simp lemmas #118

gebner opened this issue Feb 21, 2022 · 3 comments

Comments

@gebner
Copy link
Member

gebner commented Feb 21, 2022

We mark some lemmas as simp that were innocuous in Lean 3, but are dangerous now.

The typical case is that the lhs is reducible. For example, Lean 3 triggered only on inj_on applications, while Lean 4 tries to apply the lemma to everything (often causing nontermination):

attribute [-simp] Set.inj_on_empty Set.inj_on_singleton
@digama0
Copy link
Member

digama0 commented Feb 21, 2022

Can we backport remove these? It should not be too hard to write a lint for mathlib to detect them.

@gebner
Copy link
Member Author

gebner commented Feb 21, 2022

We could also remove reducible from set.inj_on.

@digama0
Copy link
Member

digama0 commented Feb 21, 2022

That would be another way to silence the lint, yes. (And I agree that's the way to go here.)

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