Re:Types versus sets in math and programming languages
by vkazanov on Sunday July 25, 2021 @08:05AM
(#27948544)
My math is shallow at best but... 1∪2 would become just 2 with integers represented as sets in certain foundational theories, right?
[ Parent
| on HN ]
Re:Types versus sets in math and programming languages
by Spivak on Sunday July 25, 2021 @12:50PM
(#27950694)
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))
Re:Types versus sets in math and programming languages
by alisonkisk on Sunday July 25, 2021 @06:57PM
(#27953721)
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?