Zulip Chat Archive
Stream: Is there code for X?
Topic: Inclusion-Exclusion
Christoph Spiegel (Apr 02 2024 at 14:06):
Did I overlook something or is there no code for basic Inclusion-Exclusion in mathlib4? The only thing I could find is this and a comment by @Neil Strickland from 2019 that he will eventually add it to mathlib.
Floris van Doorn (Apr 02 2024 at 14:09):
that is the only hit of the word "exclusion" I find in Mathlib, so I think that is also the current state...
Christoph Spiegel (Apr 02 2024 at 14:12):
Any idea what the reason is? Not needed anywhere so far or always needed in some custom formulation? Would it make sense to try and set something up and make a PR? if so, would Combinatorics
be a good place for it (similar to DoubleCounting
) or Data.Finset
? @Yaël Dillies
Christoph Spiegel (Apr 02 2024 at 14:14):
Or is it perhaps just a specific form of a more general result that's in mathlib?
Bryan Gin-ge Chen (Apr 02 2024 at 14:14):
@Yaël Dillies has various forms of the Möbius inversion formula for incidence algebras in the LeanCamCombi project, but I'm not sure if it's been specialized to inclusion-exclusion.
Yaël Dillies (Apr 02 2024 at 16:33):
It hasn't been specialised to inclusion-exclusion, no. I would highly welcome a PR going that!
Jz Pan (Apr 02 2024 at 18:28):
I think we only have the inclusion-exclusion for two sets: docs#Finset.card_union and which is added only a few months ago.
Yaël Dillies (Apr 02 2024 at 18:29):
No, this was added ages ago
Yaël Dillies (Apr 02 2024 at 18:29):
Last updated: May 02 2025 at 03:31 UTC