Zulip Chat Archive
Stream: Is there code for X?
Topic: set.sigma
Yaël Dillies (Dec 08 2021 at 17:04):
We have docs#finset.sigma, but do we not have set.sigma
?
Eric Rodriguez (Dec 08 2021 at 17:06):
maybe you're meant to write it with the bind operation (like multiset.sigma
does in the end)? not sure, really not a monad person at all
Eric Wieser (Dec 08 2021 at 17:08):
I assume a correct implementation would be:
def set.sigma {α : Type*} {σ : α → Type*} (s : set α) (t : Π a, set (σ a)) :
set (Σ a, σ a) := {x | x.1 ∈ s ∧ x.2 ∈ t x.1}
Mario Carneiro (Dec 08 2021 at 17:09):
LGTM
Eric Wieser (Dec 08 2021 at 17:10):
or ⋃ i ∈ s, sigma.mk i '' t i
Yaël Dillies (Dec 08 2021 at 17:11):
Will open the PR :rofl:
Eric Wieser (Dec 08 2021 at 17:13):
Or even ⋃₀ ((λ i, sigma.mk i '' t i) '' s)
, but that is definitionally way more annoying
Yaël Dillies (Feb 26 2022 at 11:04):
Last updated: Dec 20 2023 at 11:08 UTC