Zulip Chat Archive
Stream: lean4
Topic: deprecated and dot notation
Yury G. Kudryashov (Mar 25 2024 at 16:16):
Here is an #mwe
structure A where
n : Nat
n_eq : n = 42
namespace A
@[deprecated n_eq] theorem n_eq' (x : A) : x.n = 42 := x.n_eq
example (x : A) : x.n = 42 := x.n_eq' -- no warning
example (x : A) : x.n = 42 := n_eq' x -- `A.n_eq'` has been deprecated
end A
Yury G. Kudryashov (Mar 25 2024 at 16:16):
This means that one can use deprecated theorems without getting warning. This happened in Mathlib with lemmas like RingHom.map_prod
.
Eric Wieser (Mar 25 2024 at 16:18):
There is an open issue about this already
Yury G. Kudryashov (Mar 25 2024 at 16:18):
I'm sorry for not reading existing issues first.
Eric Wieser (Mar 25 2024 at 16:20):
Last updated: May 02 2025 at 03:31 UTC