Zulip Chat Archive
Stream: new members
Topic: def k : set ℕ × ℕ := { (1, 2) }
Kevin Sullivan (Nov 16 2018 at 02:14):
This simple definition of a set (seems like it) should just work. But it doesn't.
def k : set ℕ × ℕ := { (1, 2) }.
Instead it generates complaints about missing typeclass instances. Thoughts?
[Lean]
failed to synthesize type class instance for
⊢ has_emptyc (set ℕ × ℕ)
[Lean]
failed to synthesize type class instance for
⊢ has_insert ?m_1 (set ℕ × ℕ)
singleton : Π {α γ : Type} [_inst_1 : has_emptyc γ] [_inst_2 : has_insert α γ], α → γ
Mario Carneiro (Nov 16 2018 at 02:14):
you have precedence wrong
Mario Carneiro (Nov 16 2018 at 02:14):
def k : set (ℕ × ℕ) := { (1, 2) }
Kevin Sullivan (Nov 16 2018 at 02:15):
you have precedence wrong
Alas. Thx.
Last updated: Dec 20 2023 at 11:08 UTC