Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

In programing, you can always rewrite that first rule as "all" and "some" must compose over set union. So, "all (A ∪ B) == all A && all B", and "some (A ∪ B) == some A || some B".

That lets you discover the answer for the empty set.



Which leads to a funny fact that if all elements of the set S satisfy proposition P it doesn’t necessarily imply that some elements of the set S satisfy proposition P.


My description of the power set is by definition allowing all to imply some


I don’t follow. Can you elaborate?


The power set of a set S, P(S) (or sometimes 2^S) is the set of all subsets of S including both the empty set and the set itself.

To bridge the gap with programming, make a map f: S -> bool which represents our predicate.

all(f, S) => either S is empty or for all elements s in S, f(s) = True.

Now make f work on sets as well as individual values. f({x, y}) means True if f(x) and f(y) are True, False otherwise.

all(f, S) => all(f, P(S))

If we take the opposite and define all(f, {}) = False then this doesn't work and in addition all(f, P(S)) = False for all sets S.


That doesn’t explain how all(f,{}) => some(f,{}) may be made true with your definition preserving the distributive property.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: