Zulip Chat Archive

Stream: Is there code for X?

Topic: get arbitrary not mem of finset


Kayla Thomas (Oct 05 2023 at 06:58):

If I have L : Finset String, is there a way to obtain an arbitrary String that is not a member of L?

Scott Morrison (Oct 05 2023 at 07:09):

One would hope that
@loogle HasCompl.compl, Infinite, Set.Nonempty

loogle (Oct 05 2023 at 07:09):

:shrug: nothing found

Scott Morrison (Oct 05 2023 at 07:09):

I was angling for

import Mathlib.Data.Fintype.Card

#synth Infinite String

example {α : Type} [Infinite α] (s : Finset α) : (s.toSet : Set α).Nonempty  := by exact? -- fails

but it seems there something missing there.

Yaël Dillies (Oct 05 2023 at 07:10):

docs#Infinite.exists_not_mem_finset

Kayla Thomas (Oct 05 2023 at 07:11):

Thank you!

Scott Morrison (Oct 05 2023 at 07:12):

So I guess the better search was just @loogle Infinite, Finset

loogle (Oct 05 2023 at 07:12):

:search: instInfiniteFinset, Infinite.exists_not_mem_finset, and 13 more

Scott Morrison (Oct 05 2023 at 07:12):

@Yaël Dillies is still more effective. :-)


Last updated: Dec 20 2023 at 11:08 UTC