<s>
In	O
set	O
theory	O
and	O
its	O
applications	O
to	O
logic	O
,	O
mathematics	O
,	O
and	O
computer	B-General_Concept
science	I-General_Concept
,	O
set-builder	B-Language
notation	I-Language
is	O
a	O
mathematical	O
notation	O
for	O
describing	O
a	O
set	O
by	O
enumerating	O
its	O
elements	O
,	O
or	O
stating	O
the	O
properties	O
that	O
its	O
members	O
must	O
satisfy	O
.	O
</s>
<s>
Defining	O
sets	O
by	O
properties	O
is	O
also	O
known	O
as	O
set	B-Language
comprehension	I-Language
,	O
set	B-Language
abstraction	I-Language
or	O
as	O
defining	O
a	O
set	O
's	O
intension	O
.	O
</s>
<s>
Thus	O
,	O
set-builder	B-Language
notation	I-Language
is	O
often	O
used	O
with	O
a	O
predicate	B-Algorithm
characterizing	O
the	O
elements	O
of	O
the	O
set	O
being	O
defined	O
,	O
as	O
described	O
in	O
the	O
following	O
section	O
.	O
</s>
<s>
Set-builder	B-Language
notation	I-Language
can	O
be	O
used	O
to	O
describe	O
a	O
set	O
that	O
is	O
defined	O
by	O
a	O
predicate	B-Algorithm
,	O
that	O
is	O
,	O
a	O
logical	O
formula	O
that	O
evaluates	O
to	O
true	O
for	O
an	O
element	O
of	O
the	O
set	O
,	O
and	O
false	O
otherwise	O
.	O
</s>
<s>
In	O
this	O
form	O
,	O
set-builder	B-Language
notation	I-Language
has	O
three	O
parts	O
:	O
a	O
variable	O
,	O
a	O
colon	O
or	O
vertical	O
bar	O
separator	O
,	O
and	O
a	O
predicate	B-Algorithm
.	O
</s>
<s>
The	O
formula	O
is	O
said	O
to	O
be	O
the	O
rule	O
or	O
the	O
predicate	B-Algorithm
.	O
</s>
<s>
All	O
values	O
of	O
for	O
which	O
the	O
predicate	B-Algorithm
holds	O
(	O
is	O
true	O
)	O
belong	O
to	O
the	O
set	O
being	O
defined	O
.	O
</s>
<s>
All	O
values	O
of	O
for	O
which	O
the	O
predicate	B-Algorithm
does	O
not	O
hold	O
do	O
not	O
belong	O
to	O
the	O
set	O
.	O
</s>
<s>
or	O
by	O
adjoining	O
it	O
to	O
the	O
predicate	B-Algorithm
:	O
</s>
<s>
This	O
notation	O
represents	O
the	O
set	O
of	O
all	O
values	O
of	O
that	O
belong	O
to	O
some	O
given	O
set	O
for	O
which	O
the	O
predicate	B-Algorithm
is	O
true	O
(	O
see	O
"	O
Set	O
existence	O
axiom	O
"	O
below	O
)	O
.	O
</s>
<s>
In	O
general	O
,	O
it	O
is	O
not	O
a	O
good	O
idea	O
to	O
consider	O
sets	O
without	O
defining	O
a	O
domain	B-Algorithm
of	I-Algorithm
discourse	I-Algorithm
,	O
as	O
this	O
would	O
represent	O
the	O
subset	O
of	O
all	O
possible	O
things	O
that	O
may	O
exist	O
for	O
which	O
the	O
predicate	B-Algorithm
is	O
true	O
.	O
</s>
<s>
For	O
example	O
,	O
Russell	O
's	O
paradox	O
shows	O
that	O
the	O
expression	O
although	O
seemingly	O
well	O
formed	O
as	O
a	O
set	B-Language
builder	I-Language
expression	O
,	O
cannot	O
define	O
a	O
set	O
without	O
producing	O
a	O
contradiction	O
.	O
</s>
<s>
It	O
is	O
common	O
in	O
the	O
literature	O
for	O
an	O
author	O
to	O
state	O
the	O
domain	O
ahead	O
of	O
time	O
,	O
and	O
then	O
not	O
specify	O
it	O
in	O
the	O
set-builder	B-Language
notation	I-Language
.	O
</s>
<s>
The	O
following	O
examples	O
illustrate	O
particular	O
sets	O
defined	O
by	O
set-builder	B-Language
notation	I-Language
via	O
predicates	B-Algorithm
.	O
</s>
<s>
This	O
set	O
can	O
also	O
be	O
defined	O
as	O
;	O
see	O
equivalent	O
predicates	B-Algorithm
yield	O
equal	O
sets	O
below	O
.	O
</s>
<s>
The	O
sign	O
stands	O
for	O
"	O
there	B-Algorithm
exists	I-Algorithm
"	O
,	O
which	O
is	O
known	O
as	O
existential	B-Algorithm
quantification	I-Algorithm
.	O
</s>
<s>
So	O
for	O
example	O
,	O
is	O
read	O
as	O
"	O
there	B-Algorithm
exists	I-Algorithm
an	O
such	O
that	O
"	O
.	O
</s>
<s>
An	O
extension	O
of	O
set-builder	B-Language
notation	I-Language
replaces	O
the	O
single	O
variable	O
with	O
an	O
expression	O
.	O
</s>
<s>
Sets	O
defined	O
by	O
set	B-Language
builder	I-Language
notation	I-Language
are	O
equal	O
if	O
and	O
only	O
if	O
their	O
set	B-Language
builder	I-Language
rules	O
,	O
including	O
the	O
domain	O
specifiers	O
,	O
are	O
equivalent	O
.	O
</s>
<s>
Therefore	O
,	O
in	O
order	O
to	O
prove	O
the	O
equality	O
of	O
two	O
sets	O
defined	O
by	O
set	B-Language
builder	I-Language
notation	I-Language
,	O
it	O
suffices	O
to	O
prove	O
the	O
equivalence	O
of	O
their	O
predicates	B-Algorithm
,	O
including	O
the	O
domain	O
qualifiers	O
.	O
</s>
<s>
because	O
the	O
two	O
rule	O
predicates	B-Algorithm
are	O
logically	O
equivalent	O
:	O
</s>
<s>
In	O
many	O
formal	O
set	O
theories	O
,	O
such	O
as	O
Zermelo	O
–	O
Fraenkel	O
set	O
theory	O
,	O
set	B-Language
builder	I-Language
notation	I-Language
is	O
not	O
part	O
of	O
the	O
formal	O
syntax	O
of	O
the	O
theory	O
.	O
</s>
<s>
The	O
set	O
obtained	O
from	O
this	O
axiom	O
is	O
exactly	O
the	O
set	O
described	O
in	O
set	B-Language
builder	I-Language
notation	I-Language
as	O
.	O
</s>
<s>
A	O
similar	O
notation	O
available	O
in	O
a	O
number	O
of	O
programming	O
languages	O
(	O
notably	O
Python	B-Language
and	O
Haskell	B-Language
)	O
is	O
the	O
list	B-Language
comprehension	I-Language
,	O
which	O
combines	O
map	O
and	O
filter	B-Application
operations	O
over	O
one	O
or	O
more	O
lists	O
.	O
</s>
<s>
In	O
Python	B-Language
,	O
the	O
set-builder	B-Language
'	O
s	O
braces	O
are	O
replaced	O
with	O
square	O
brackets	O
,	O
parentheses	O
,	O
or	O
curly	O
braces	O
,	O
giving	O
list	O
,	O
generator	O
,	O
and	O
set	O
objects	O
,	O
respectively	O
.	O
</s>
<s>
Python	B-Language
uses	O
an	O
English-based	O
syntax	O
.	O
</s>
<s>
Haskell	B-Language
replaces	O
the	O
set-builder	B-Language
'	O
s	O
braces	O
with	O
square	O
brackets	O
and	O
uses	O
symbols	O
,	O
including	O
the	O
standard	O
set-builder	B-Language
vertical	O
bar	O
.	O
</s>
<s>
The	O
same	O
can	O
be	O
achieved	O
in	O
Scala	B-Application
using	O
Sequence	B-Language
Comprehensions	I-Language
,	O
where	O
the	O
"	O
for	O
"	O
keyword	O
returns	O
a	O
list	O
of	O
the	O
yielded	O
variables	O
using	O
the	O
"	O
yield	O
"	O
keyword	O
.	O
</s>
<s>
Consider	O
these	O
set-builder	B-Language
notation	I-Language
examples	O
in	O
some	O
programming	O
languages	O
:	O
</s>
<s>
The	O
set	B-Language
builder	I-Language
notation	I-Language
and	O
list	B-Language
comprehension	I-Language
notation	O
are	O
both	O
instances	O
of	O
a	O
more	O
general	O
notation	O
known	O
as	O
monad	O
comprehensions	O
,	O
which	O
permits	O
map/filter	O
-like	O
operations	O
over	O
any	O
monad	O
with	O
a	O
zero	O
element	O
.	O
</s>
