Closed holtzermann17 closed 5 years ago
This also applies to the snippet just below that one.
def nat.dvd (m n : ℕ) : Prop := ∃ k, n = m * k
section
def has_dvd_nat : has_dvd nat := ⟨nat.dvd⟩
local attribute [instance] has_dvd_nat
local attribute [simp]
theorem nat.dvd_refl (n : ℕ) : n ∣ n :=
⟨1, by simp⟩
example : 5 ∣ 5 := by simp
end
-- error:
check 5 ∣ 5
(This works without raising any error.)
Indeed, it seems that dvd
has moved to the core library after this was written. I'll work on another example.
I don't actually get an error in the final line, though Section 6.4 suggests that one should appear: