Zulip Chat Archive
Stream: lean4
Topic: Misfiring deprecation
Yaël Dillies (May 21 2024 at 08:14):
The following code thinks I'm using the deprecated Finset.card_congr
when in fact I'm using the non-deprecated Fintype.card_congr
. Is this known?
theorem Fintype.card_congr (_ : False) : True := trivial
namespace Finset
@[deprecated] theorem card_congr : True := trivial
end Finset
open Finset Fintype
/-- warning: `Finset.card_congr` has been deprecated -/
#guard_msgs in
example (h : False) : True := card_congr h
Yaël Dillies (May 21 2024 at 08:15):
Minimised from #12653
Markus Himmel (May 21 2024 at 08:20):
This could be related to lean4#2132
Damiano Testa (May 21 2024 at 08:22):
I'm pretty sure that I have seen this: there was something about deprecate
not getting the elaborated information, so Lean uses the correct lemma, but deprecate
gets fixated on the other one.
Mario Carneiro (May 21 2024 at 09:55):
See also this TODO
Ruben Van de Velde (May 21 2024 at 09:56):
Did you check if this is still broken on nightly-testing?
Yaël Dillies (May 21 2024 at 11:10):
I did not. Might try later if no one beats me to it
Last updated: May 02 2025 at 03:31 UTC