Set Theory in Programming

In high school and college math courses, we learn about ways to express groups of items as subsets and supersets. This branch of mathematics is called set theory.

The expression,

X ∈ A

means “Item X exists in set A”, or “X is an element of set A”. The symbol looks like an E, which is a helpful mnemonic, but it doesn’t visually convey its meaning very well. I thought it should be redesigned, so I stepped up to the task in another blog post: “Set Membership” Symbol Redesign.

Set theory is a powerful tool, and it is becoming more important for every-day computer science. It is used to describe things that need to be processed via list-comprehensions in functional languages as well as other languages.

Leave a Smart Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.