Zulip Chat Archive
Stream: mathlib4
Topic: norm_cast gives Int.subNatNat
Eric Wieser (Dec 12 2023 at 15:42):
Is this really the behavior we want?
import Mathlib
example (n : ℕ) : (n : ℤ) - 1 = 3 := by
norm_cast
/-
n : ℕ
⊢ Int.subNatNat n 1 = 3
-/
sorry
Yury G. Kudryashov (Dec 12 2023 at 15:54):
Which lemma does it use?
Ruben Van de Velde (Dec 12 2023 at 16:27):
I thought that was fixed
Ruben Van de Velde (Dec 12 2023 at 16:28):
Eric Wieser (Jan 02 2024 at 13:58):
Yury G. Kudryashov said:
Which lemma does it use?
Terence Tao (Jan 02 2024 at 15:56):
As an (inelegant) workaround one can rw [Int.subNatNat_eq_coe]
immediately afterwards.
Yaël Dillies (Jan 02 2024 at 15:58):
I'm pretty sure norm_cast
has several kinds of tagging internally and you can specify what kind a specific lemma is. This changes the way norm_cast
/push_cast
use those lemmas (in particular, whether norm_cast
is allowed to use them backwards).
Yaël Dillies (Apr 29 2024 at 20:06):
I just hit this again. Would be good to fix it
Ruben Van de Velde (Apr 29 2024 at 20:20):
I thought I filed this, but it was #11573 instead
Last updated: May 02 2025 at 03:31 UTC