Zulip Chat Archive
Stream: Is there code for X?
Topic: Tighter Finset.toList output type
Riyaz Ahuja (Mar 22 2025 at 04:42):
Hi! I was wondering if there exists any better Finset.toList
such that for G : Finset X
, rather than G.toList : List X
, it is G.toList' : List {x \\ x \in G}
. Currently, I have something like:
def Finset.toList' (G : Finset S) : List {x // x ∈ G} := by
constructor
but this clearly isn't ideal, as I'm not sure how to prove statements like:
a : S
ha : a ∈ ↑G
⊢ ⟨a, ha⟩ ∈ G.toList'
Matt Diamond (Mar 22 2025 at 04:52):
are you looking for docs#Finset.attach ?
Last updated: May 02 2025 at 03:31 UTC