containers: intersections for Set, along with Semigroup newtype

Ben Franksen ben.franksen at
Sun Dec 20 22:05:39 UTC 2020

Am 06.12.20 um 19:58 schrieb Sven Panne:
> To me it's just the other way around: It violates aesthetics if it doesn't
> follow the mathematical definition in all cases, which is why I don't like
> NonEmpty here.

I think you've got that wrong.

  x `elem` intersections []
= {definition}
  forall xs in []. x `elem` xs
= {vacuous forall}

Any proposition P(x) is true for all x in []. So the mathematical
definition of intersections::[Set a]-> Set a would not be the empty set
but the set of all x:a, which in general we have no way to construct.


More information about the Libraries mailing list