Zulip Chat Archive

Stream: Is there code for X?

Topic: Quotient that identifies all the members of a set


Chris Wong (Mar 02 2024 at 06:37):

Hi all, is there a quotient type that treats all members of a particular subset as equal, leaving the remaining values unchanged?

I remember a discussion thread on this a while ago but I can't find the right keywords for it :sweat_smile:

#xy: I'm looking into graph contraction (for minors). If I want to contract a set of vertices, I can do that by identifying them all and removing loops. I want to see how practical it is to use quotients for this.

Timo Carlin-Burns (Mar 02 2024 at 06:40):

docs#Trunc

Chris Wong (Mar 02 2024 at 06:44):

Trunc flattens all values. I only want to flatten those in a particular subset.

Yaël Dillies (Mar 02 2024 at 10:27):

@Yury G. Kudryashov, did this ever land?

Yury G. Kudryashov (Mar 02 2024 at 17:20):

AFAIK, no

Yury G. Kudryashov (Mar 02 2024 at 17:21):

AFAIR, there was a discussion about different ways to do it but I don't remember it landing.

Kyle Miller (Mar 02 2024 at 17:49):

Previous discussion: https://leanprover.zulipchat.com/#narrow/stream/217875-Is-there-code-for-X.3F/topic/Equivalence.20Relation.20associated.20to.20a.20subset/near/409633101

I'll mention again that the API I think would be nice would be that you give it a S : Set (Set α) of some collection of sets to collapse. Yury had a possible implementation there, Setoid.map (.ker Sigma.fst) fun x : Σ i : S, i.1 => x.2.1.

Chris Wong (Mar 03 2024 at 03:08):

Thanks Kyle, I replied in the thread you linked.


Last updated: May 02 2025 at 03:31 UTC