Zulip Chat Archive
Stream: mathlib4
Topic: PNat.dvd_iff
Kevin Buzzard (May 10 2024 at 11:52):
theorem dvd_iff {k m : ℕ+} : k ∣ m ↔ (k : ℕ) ∣ (m : ℕ) := by
If this were the other way around it could be a norm_cast
lemma, and then norm_cast
would be able to remove those up-arrows (which I just wanted it to do I had a hypothesis ↑D ∣ ↑M
). But it looks like it's mostly rewritten forwards. Can I add the backwards one and tag it? Or is there another trick? I prefer a tactic rather than having to remember the name of a lemma.
Yaël Dillies (May 10 2024 at 12:30):
You can tag it with @[norm_cast]
already. norm_cast
is smart
Yaël Dillies (May 10 2024 at 12:30):
But I agree it should be turned around regardless
Kevin Buzzard (May 11 2024 at 03:54):
norm_cast: badly shaped lemma, lhs must contain at least one coe
k ∣ m
'swhy I asked
Yaël Dillies (May 11 2024 at 06:04):
Hmm, it used to work in Lean 3
Last updated: May 02 2025 at 03:31 UTC