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

My math is shallow at best but... 1∪2 would become just 2 with integers represented as sets in certain foundational theories, right?


Yep! But notation depends a lot on the author to some extent. You will find people who treat 1U2 as {1}U{2} because it’s less annoying to write.

It’s the same reason languages have an .add method on sets so you don’t have to write.

    s = s.union(set(s))


who writes 1U2 instead of {1,2} ?

When would {1}U{2} ever appear in ant context except for the first day of Intro to Set Theory?


I assume 1 and 2 are placeholders here... Not literally meant.


Yes. One common definition is equivalent to each natural to being the set containing all preceding naturals. With that view 2={0,1} and 1={0}, so their union is just 2.




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

Search: