Set-builder notation
mathematical notation for describing a set by enumerating its elements or stating the properties that its members must satisfy
Set-builder notation is a mathematical notation used in set theory, logic, mathematics, and computer science to describe a set by stating the properties that its members must satisfy. Defining sets by properties is also known as set comprehension, set abstraction, or defining a set's intension.[1][2]
Structure
changeIn set-builder notation, a set is typically written in one of the following forms:
- {\{x \mid \Phi(x)\}} or
- {\{x : \Phi(x)\}}
Where:
- x is a variable representing an element of the set.
- The vertical bar "∣" (or sometimes a colon ":") is interpreted as "such that" or "for which."
- Φ(x) is a predicate (a logical formula) that must be satisfied by the elements of the set.
Use in Predicate Logic
changeSet-builder notation is heavily used in predicate logic to define sets based on conditions. If the predicate (the condition) is true for a particular element, that element belongs to the set.
Empty Sets
changeIf no values satisfy the condition specified in set-builder notation, the set will be the empty set, denoted by \emptyset or \{ \}}.
See also
changeReferences
change- ↑ Rosen, Kenneth (2006-07-26). Discrete Mathematics and Its Applications. McGraw-Hill Education. ISBN 978-0-07-322972-0.
- ↑ "For Comprehensions". Scala Documentation. Retrieved 2024-10-07.