Zulip Chat Archive
Stream: Is there code for X?
Topic: subsingleton (set A) of is_empty A
Rémy Degenne (Sep 08 2021 at 13:25):
Do we have this?
example {α} [is_empty α] : subsingleton (set α) := sorry
Adam Topaz (Sep 08 2021 at 13:28):
Even better:
import data.set.basic
example {α} [is_empty α] : unique (set α) := by { unfold set, apply_instance }
Eric Wieser (Sep 08 2021 at 13:28):
I think so, but it's not an instance for performance reasons.
Eric Wieser (Sep 08 2021 at 13:28):
Adam Topaz (Sep 08 2021 at 13:29):
The general thing is that [is_empty X]
implies unique (X \to Y)
for any sort Y
Adam Topaz (Sep 08 2021 at 13:30):
I don't know if we defined the corresponding thing for set X
though.
Rémy Degenne (Sep 08 2021 at 13:31):
if I replace set α
by α → Prop
the instance is found. But replacing set by its definition is something we should not have to do.
Adam Topaz (Sep 08 2021 at 13:32):
Yes, I agree. See Eric's link above. It's there.
Rémy Degenne (Sep 08 2021 at 13:32):
thanks for set.unique_empty!
Eric Wieser (Sep 08 2021 at 13:41):
Adam confused me into crossing out my comment about it not being an instance
Eric Wieser (Sep 08 2021 at 13:41):
#6025 tracks the task of actually making it an instanc
Adam Topaz (Sep 08 2021 at 13:43):
Eric Wieser said:
Adam confused me into crossing out my comment about it not being an instance
sorry ;)
Last updated: Dec 20 2023 at 11:08 UTC