mathport icon indicating copy to clipboard operation
mathport copied to clipboard

Dangerous simp lemmas

Open gebner opened this issue 3 years ago • 3 comments

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

gebner avatar Feb 21 '22 11:02 gebner

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

digama0 avatar Feb 21 '22 12:02 digama0

We could also remove reducible from set.inj_on.

gebner avatar Feb 21 '22 12:02 gebner

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

digama0 avatar Feb 21 '22 13:02 digama0