Commit c5899673 authored by melikamp's avatar melikamp

concepts & axioms

parent 2f82c798
......@@ -375,8 +375,8 @@
%%%%%%%%%%%%%%%%%%%% Color Commands %%%%%%%%%%%%%%%%%%%%%
\newcommand{\red}[1]{{\color{red}{#1}}} % highlight
\newcommand{\blue}[1]{{\color{blue}{#1}}} % lowlight
\newcommand{\red}[1]{{\color{red}{\bf #1}}} % highlight
\newcommand{\blue}[1]{{\color{blue}{\bf #1}}} % lowlight
%%%%%%%%%%%%%%%%%%%%%%%% Graphs %%%%%%%%%%%%%%%%%%%%%%%%%
% default style for pgfplots axis
......
......@@ -40,24 +40,12 @@ heart.
For any two real numbers $X$ and $Y$, \[X + Y = Y + X\]
\end{axiom}
\begin{axiom}[Commutativity of Multiplication]
\label{axiom-commutativity-of-multiplication}
\index{commutativity of multiplication}
For any two real numbers $X$ and $Y$, \[XY = YX\]
\end{axiom}
\begin{axiom}[Associativity of Addition]
\label{axiom-associativity-of-addition}
\index{associativity of addition}
For any two real numbers $X$ and $Y$, \[X + (Y + Z) = (X + Y) + Z\]
\end{axiom}
\begin{axiom}[Associativity of Multiplication]
\label{axiom-associativity-of-multiplication}
\index{associativity of multiplication}
For any two real numbers $X$ and $Y$, \[X(YZ) = (XY)Z\]
\end{axiom}
\begin{trivia}
When considered together, commutativity and associativity of
addition tell us that we can rearrange the terms of any sum, and
......@@ -68,9 +56,27 @@ heart.
\[d + c + b + a\]
or
\[(a + c) + (b + d)\]
Likewise with multiplication, a product such as
\end{trivia}
\begin{axiom}[Commutativity of Multiplication]
\label{axiom-commutativity-of-multiplication}
\index{commutativity of multiplication}
For any two real numbers $X$ and $Y$, \[XY = YX\]
\end{axiom}
\begin{axiom}[Associativity of Multiplication]
\label{axiom-associativity-of-multiplication}
\index{associativity of multiplication}
For any two real numbers $X$ and $Y$, \[X(YZ) = (XY)Z\]
\end{axiom}
\begin{trivia}
Just like with addition, commutativity and associativity of
multiplication allow us to compute values of products by multiplying
factors in any order, so a product with $4$ factors such as
\[3\cdot x\cdot y\cdot (a-1)\]
is equivalent to
is equivalent to any other product involving the same factors,
regardless of the order of operations, like for example
\[(a-1)\cdot (3\cdot y\cdot x)\]
or
\[(3\cdot y)\cdot (x\cdot (a-1))\]
......@@ -93,7 +99,7 @@ heart.
\[X\cdot 1 = X\]
\end{axiom}
While it may seem crazy that we have to explicitly demand the
While it may seem silly that we have to explicitly demand the
existence of numbers such as zero and one, this is the natural way to
proceed from the axioms. Note that other axioms apply to all numbers,
but do not require the existence of any specific number. But once we
......@@ -112,20 +118,24 @@ then also a number $2+1$, which we call $3$, and so on.
\end{axiom}
\begin{trivia}
The opposite of $5$ is $-5$ because $5 + (-5) = 0$. At the same
time, the opposite of $-5$ is $5$, so we can say $5$ and $-5$ are
opposites of each other, and it can be shown that there are no
others.
The opposite of $5$ is $-5$ because $5 + (-5) = 0$.
At the same time, the opposite of $-5$ is $5$ because $(-5) + 5 =
0$, so we can say $5$ and $-5$ are opposites of each other. In general,
it can be proven that every number has a unique opposite.
The opposite of zero is zero itself, because $0 + 0 = 0$.
\end{trivia}
\begin{axiom}[Multiplicative Inverse]
\label{axiom-reciprocal}
\index{multiplicative inverse}
\index{reciprocal}
For each non-zero real number $X$, there exists a real number we
call the \emph{multiplicative inverse of $X$}, or the
\emph{reciprocal of $X$}, written as $\frac1X$ or $X^{-1}$, with
the following property:
\emph{reciprocal of $X$}, written as \small$\frac1X$\normalsize, $1/X$, or
$X^{-1}$, with the following property:
\[X\cdot\parens{\frac1X} = 1\]
\end{axiom}
......@@ -135,7 +145,7 @@ is no real number that would give us one when multiplied by zero.
\begin{trivia}
The reciprocal of $2$ is $1/2$, which can also be written as
$0.5$. To check, simply multiply them, and make sure to get one as
$0.5$. To check, simply multiply them, and make sure to get $1$ as
the result. By the same token, the reciprocal of $1/2$ is $2$.
In practice, obtaining the reciprocal amounts to writing the number
......@@ -167,13 +177,18 @@ notice that it can be applied.
\[X(Y + X) = XY + XZ\]
\end{axiom}
\newpage % flow control
\begin{example}
Use the distributivity to rewrite the expression without
parentheses: \[4(x + 7)\]
\end{example}
\begin{exsol}
\[4(x+7) = 4x + 4\cdot 7 = 4x+28\]
\begin{align*}
4(x+7) &\ee 4x + 4\cdot 7\\
&\ee 4x+28
\end{align*}
\end{exsol}
\begin{exans}
$4x + 28$
......@@ -188,7 +203,10 @@ notice that it can be applied.
The distributive property can be shown to work for sums with
more than two terms, so that each term gets multiplied by the number
from the outside of the parentheses.
\[2(x + 2y + 3z) = 2\cdot x + 2\cdot2y + 2\cdot 3z = 2x + 4y + 6z\]
\begin{align*}
2(x + 2y + 3z) &\ee 2\cdot x + 2\cdot2y + 2\cdot 3z\\
&\ee 2x + 4y + 6z
\end{align*}
\end{exsol}
\begin{exans}
$2x + 4y + 6z$
......@@ -202,12 +220,17 @@ notice that it can be applied.
The greatest common factor for these two terms is $4$, so a single
application of the distributive property gives a product of two
factors: $4$ and $x+1$.
\[4x + 4 = 4(x+1)\]
\begin{align*}
4x + 4 &\ee 4x+4\cdot 1 &\ecomment{multiplicative identity}\\
&\ee 4(x+1) &\ecomment{distributivity}
\end{align*}
\end{exsol}
\begin{exans}
$4(x+1)$
\end{exans}
\newpage % flow control
\begin{example}
Use the distributivity to rewrite the expression as a product with
two factors: \[ab + 3b\]
......@@ -293,7 +316,7 @@ that each step is justified by an axiom.
\begin{theorem}
Each number has a unique opposite, and zero is the only number which
is its own opposite. An opposite of an opposite of a number is the
number itself. Algebraically, for any real number $x$, \[-(-x) = x\]
number itself. Formally, for any real number $x$, \[-(-x) = x\]
\end{theorem}
\begin{theorem}
......@@ -301,8 +324,8 @@ that each step is justified by an axiom.
equal to their respective reciprocals:
\[1 = \frac11\ \ \ \ \ \ \ \ \ \ \ -1 = \frac1{-1}\]
A reciprocal of a reciprocal of a number is the number
itself. Algebraically, for any non-zero real number $x$,
\[\frac{1}{1/x} = x\]
itself. Formally, for any non-zero real number $x$,
\[\frac{1}{(1/x)} = x\]
\end{theorem}
Axioms do not mention subtraction or division, but we can define them
......@@ -363,7 +386,7 @@ even though we usually write down an equivalent fraction:
with these parentheses, but most of the time they are
\emph{invisible}, so to speak. Now we can see that this expression,
when thought of as a product, has $2$ factors: $(x+y)$ and
$\frac{1}{(x-y)}$, which is the reciprocal of $(x-y)$.
$1/(x-y)$, which is the reciprocal of $(x-y)$.
\end{exsol}
\begin{exans}
$2$ factors: $(x+y)$, $\frac{1}{(x-y)}$
......@@ -387,10 +410,11 @@ justified steps; we also \emph{must} be able to justify
argument in this text is \emph{justifiable} from the axioms and the
logical principles, and nothing else would be recognized as valid. The
rigorous study of the properties of numbers which arise directly from
the axioms is called Abstract Algebra, and it is a fascinating, albeit
a very difficult subject, consisting almost entirely of formal proofs,
the simplest ones being similar to the step-by-step simplification
examples above.
the axioms is called
\href{https://en.wikipedia.org/wiki/Abstract_algebra}{abstract
algebra}, and it is a fascinating, albeit a very difficult subject,
consisting almost entirely of formal proofs, the simplest ones being
similar to the step-by-step simplification examples above.
\begin{hw-and-answers}
......
......@@ -106,6 +106,8 @@ different, unrelated expression.
\end{tabular}
\end{trivia}
\newpage % flow control
\subsection{Algebraic Substitution}
\index{algebraic substitution}\index{substitution}
......@@ -164,6 +166,8 @@ value.
$13(B+5) = 10 - (B+5)$
\end{exans}
\newpage % flow control
\subsection{Common Types of Expressions}
There are four basic types of expressions which are used heavily in
......@@ -212,6 +216,8 @@ this text: sums, products, terms, and factors.
$3$ terms: $3(x+1)$, $5$, $xy$
\end{exans}
\newpage % flow control
\begin{definition}
\label{def-product-expression}
\index{product (expression)} A \emph{product} is an algebraic
......@@ -235,8 +241,19 @@ this text: sums, products, terms, and factors.
\end{trivia}
\begin{example}
Identify all the factors in the expression
\[-10x(x+1)\frac1z\]
Identify all the factors in the expression: \quad $frac27xy$
\end{example}
\begin{exsol}
Factors are easier to see if we make the multiplication visible:
\[\frac27\cdot x\cdot y\]
We consider the rational number $2/7$ as a single factor.
\end{exsol}
\begin{exans}
$3$ factors: $2/7$, $x$, $y$
\end{exans}
\begin{example}
Identify all the factors in the expression: \quad $-10x(x+1)\frac1z$
\end{example}
\begin{exsol}
Unlike the addition operation, multiplication is often
......
......@@ -309,7 +309,7 @@
$28$, $42$
\end{exercise}
\exsep
\bigskip\hrule
Perform the operations, simplify, state the answer as a single
fraction in lowest terms:
......@@ -413,7 +413,7 @@
$\parens{\frac{7}{8} - \frac{11}{4}}\div\frac{5}{4}$
\end{exercise}
\exsep
\newpage % flow control
Simplify the expression by combining like terms:
......@@ -461,8 +461,6 @@
$\frac{2}{3}\parens{9x - 4y} - \frac13\parens{3a - 2y}$
\end{exercise}
\exsep
\begin{exercise}
Evaluate the expression
\[6a + \frac{3}{2}\]
......@@ -493,7 +491,8 @@
if $y=3/2$
\end{exercise}
\exsep
% \exsep % flow control
\columnbreak
Rewrite the mixed number as an improper fraction:
......@@ -569,5 +568,4 @@
and $2/3$ meters wide.
\end{exercise}
\end{hw-and-answers}
......@@ -281,7 +281,7 @@ can be shown that all rational numbers end in
\href{https://en.wikipedia.org/wiki/Repeating_decimal}{simple
repeating patterns}.
Going from decimal representations back to fractions of integers is
Rewriting decimal representations as fractions of integers is
straightforward when possible.
\begin{example}
......@@ -306,12 +306,13 @@ straightforward when possible.
$\frac{107556}{100}$
\end{exans}
Probably the oldest known example of a real number that is not
rational is $\sqrt2$, which is the length of the diagonal of a square
with side of length $1$. It can be written as $\sqrt2 =
1.41421\ldots$, but unlike with rational numbers, the digits of the
decimal representation of $\sqrt2$ do not have a simple repeating
pattern.
Probably the
\href{https://en.wikipedia.org/wiki/Square_root_of_2}{oldest known
example} of a real number that is not rational is $\sqrt2$, which is
the length of the diagonal of a square with side of length $1$. It can
be written as $\sqrt2 = 1.41421\ldots$, but unlike with rational
numbers, the digits of the decimal representation of $\sqrt2$ do not
have a simple repeating pattern.
\begin{center}
\begin{tikzpicture}
\draw (0,0) -- (0,2) -- (2,2) -- (2,0) -- (0,0);
......@@ -490,6 +491,58 @@ greater than the one on the left.
at least $a$''.
\end{definition}
\begin{example}
Determine whether the inequality is true or false:
\[17 \geq 17\]
\end{example}
\begin{exsol}
$17 = 17$, so the non-strict inequality holds.
\end{exsol}
\begin{exans}
true
\end{exans}
\begin{example}
Determine whether the inequality is true or false:
\[-6 < -10\]
\end{example}
\begin{exsol}
$-6$ is to the right of $-10$ on the real number line, so it is
greater than $-10$, and the inequality is false.
\end{exsol}
\begin{exans}
false
\end{exans}
\begin{example}
Determine whether the inequality is true or false:
\[3.1315 \geq 3.14\]
\end{example}
\begin{exsol}
The number $3.1315$ is just a tad to the right of $3.1400$ on the number
line, so it is greater, and the inequality holds.
\end{exsol}
\begin{exans}
true
\end{exans}
\begin{example}
Determine whether the inequality is true or false:
\[\frac26 < \frac13\]
\end{example}
\begin{exsol}
To compare these fractions, we need to rewrite them with the same
denominator somehow. If we multiply $1/3$ by $2/2$, for example,
its value will not change, but the denominator will:
\[\frac13 = \frac13\cdot\frac22 = \frac{1\cdot2}{3\cdot 2} = \frac26\]
So the inequality is equivalent to
\[\frac26 < \frac26\]
which is false.
\end{exsol}
\begin{exans}
false
\end{exans}
\begin{hw-and-answers}
Find the value of the expression:
......@@ -667,100 +720,100 @@ greater than the one on the left.
\[\aggr{\frac46,\ -4,\ \frac{60}{6},\ \frac{-10}{-10},\ \sqrt{2},\ \frac01}\]
\end{exercise}
\newpage % flow control %\exsep
\newpage % flow control
Determine whether the inequality is true or false:
Write the real number as a fraction of integers.
\begin{exercise}
$7 \leq 7$
$0.4$
\begin{answer}
true
$\frac{4}{10}$
\end{answer}
\end{exercise}
\begin{exercise}
$9 > 5$
$0.3$
\end{exercise}
\begin{exercise}
$-10 < -1$
$-0.17$
\begin{answer}
true
$\frac{-17}{100}$
\end{answer}
\end{exercise}
\begin{exercise}
$-5 \geq 4$
$-0.87$
\end{exercise}
\begin{exercise}
$0.1 < 0.1$
$3.1415$
\begin{answer}
false
$\frac{31415}{10000}$
\end{answer}
\end{exercise}
\begin{exercise}
$-9 \geq -9$
$-2.718$
\end{exercise}
\columnbreak % flow control
Determine whether the inequality is true or false:
\begin{exercise}
$\frac18>\frac14$
$7 \leq 7$
\begin{answer}
false
true
\end{answer}
\end{exercise}
\begin{exercise}
$-6 \leq -10$
$9 > 5$
\end{exercise}
\begin{exercise}
$\pi > 3$
$-10 < -1$
\begin{answer}
true
\end{answer}
\end{exercise}
\begin{exercise}
$\sqrt2 \leq 2$
$-5 \geq 4$
\end{exercise}
\exsep
Write the real number as a fraction of integers.
\begin{exercise}
$0.4$
$0.1 < 0.1$
\begin{answer}
$\frac{4}{10}$
false
\end{answer}
\end{exercise}
\begin{exercise}
$0.3$
$-9 \geq -9$
\end{exercise}
\begin{exercise}
$-0.17$
$\frac18>\frac14$
\begin{answer}
$\frac{-17}{100}$
false
\end{answer}
\end{exercise}
\begin{exercise}
$-0.87$
$-6 \leq -10$
\end{exercise}
\begin{exercise}
$3.1415$
$\pi > 3$
\begin{answer}
$\frac{31415}{10000}$
true
\end{answer}
\end{exercise}
\begin{exercise}
$-2.718$
$\sqrt2 \leq 2$
\end{exercise}
\end{hw-and-answers}
......@@ -85,8 +85,9 @@ practice we simplify opposites of sums using an even nicer property.
\begin{theorem}
\label{thm-opposite-of-sum}
\index{opposite of a sum}
For all real numbers $A$, $B$, $C$, $\ldots$, the opposite of a sum
is a sum of opposites.
For any collection of real numbers $A$, $B$, $C$, $\ldots$, the
opposite of their sum is a sum of their opposites:
\[-(A+B+C+\ldots) = (-A) + (-B) + (-C) + \ldots\]
\end{theorem}
......@@ -112,8 +113,8 @@ practice we simplify opposites of sums using an even nicer property.
\begin{align*}
-(-a + 2 - (5 - b))
&\ee a - 2 + (5 - b)\\
&\ee a - 2 + 5 - b\\
&\ee a + 3 - b &\ecomment{because -2+5 = 3}
&\ee a - 2 + 5 - b &\ecomment{$-2+5 = 3$}\\
&\ee a + 3 - b
\end{align*}
Alternatively, we can remove the inner parentheses first, but then
of course we will get the same result:
......@@ -211,12 +212,10 @@ adding the opposite, so our sums may have subtractions. We also think
of division as of multiplying by the reciprocal, so our products may
have divisions.
\begin{definition}
\begin{definition}[Order of Operations]
\label{def-order-of-operations}
\index{order of arithmetic operations}
We can think of every expression as a sum of terms.
To evaluate a sum of terms:
\begin{enumerate}
\item Find the value of each term.
......@@ -226,13 +225,13 @@ have divisions.
Some of the terms will be products of several factors. To evaluate a
product of factors with exponents:
\begin{enumerate}
\item Find the value of each exponent by using a single factor on
its left as the base.
\item Find the value of each exponential expression by using a
single factor on the left of the exponent as the base.
\item Find the value of the product by applying multiplications and
divisions from left to right.
\end{enumerate}
At any point in this process we are free to remove parentheses by
using the distributive property.
At any point in this process we are free to remove or to insert
parentheses by using the distributive property or any other axiom.
\end{definition}
\begin{example}
......@@ -370,7 +369,7 @@ have divisions.
\label{def-like-terms}
\index{like terms} \index{similar terms} \emph{Like terms}, sometime
called \emph{similar terms}, are the terms which have all the same
variable factors.
variable factors with the same corresponding exponents.
\end{definition}
\begin{example}
......@@ -400,7 +399,7 @@ have divisions.
&\ee 5a - 2a^2 + 6a
\end{align*}
Here $5a$ and $6a$ are like terms, while $-2a^2$ is different
because it has two factors $a$ instead of one.
because it has exponent $2$ instead of $1$.
\begin{align*}
5a - 2a^2 + 6a
&\ee 5a + 6a - 2a^2
......
......@@ -20,9 +20,7 @@ expressions:
\end{center}
To see the difficulty with translation, consider the phrase
\begin{center}
the sum of $a$ and $b$ times $c$
\end{center}
\[\mbox{the sum of $a$ and $b$ times $c$}\]
It could mean $a + bc$, or it could mean $(a + b)c$, and these
expressions are not equivalent. Sometimes the ambiguity can be removed
by finding a different phrasing:
......@@ -65,6 +63,8 @@ a & = & & 6 \qq\cdot b &
\]
\end{trivia}
\newpage % flow control
\begin{trivia}
\[\begin{array}{ccccc}
a & \mbox{ is } & 7 & \mbox{ times } \mbox{ less than } & b\\
......@@ -137,6 +137,8 @@ a & = & & b \qq / 7 &
in kg\\ $t = \frac{g}{3.1}$
\end{exans}
\newpage % flow control
\subsection{Applications}
\appBlurb
......
......@@ -133,7 +133,7 @@ same.
\hspace{1cm}\ecomment{regular distance}\]
We have to use $4.5$ for the duration of the express trip because we
must convert $4$ hours $30$ minutes into hours for the equation. Now
we can substitute $r + 15$ for $x$ in the second equation and then
we can substitute $(r + 15)$ for $x$ in the second equation and then
solve for $r$:
\begin{align*}
x\cdot 4.5 &\ee r\cdot 6\\
......@@ -141,17 +141,18 @@ same.
r\cdot 4.5 + 15\cdot 4.5 &\ee r\cdot 6 &\ecomment{distributivity}\\
4.5r + 67.5 &\ee 6r &\ecomment{simplifying expressions}
\end{align*}
Now we use the addition property to isolate $r$ on the right side:
Now we use the addition property to isolate the term with $r$ on the
right side:
\begin{align*}
4.5r + 67.5 - 4.5r &\ee 6r - 4.5r &\ecomment{addition property}\\
67.5 &\ee 1.5r\\
67.5 &\ee 1.5r &\ecomment{combined like terms}\\
(67.5)/1.5 &\ee (1.5r)/1.5 &\ecomment{multiplication property}\\
45 &\ee r
\end{align*}
So the speed of the regular train is $45$ miles per hour, and we can
find the speed of the express from the first equation:
\begin{align*}
x &\ee r + 15\\ &\ee 45 + 15\\ &\ee 60
x &\ee r + 15\\ x &\ee 45 + 15\\ x &\ee 60
\end{align*}
\end{exsol}
\begin{exans}
......@@ -206,7 +207,7 @@ work amounts:
Athens. Being younger, Aristotle is walking $1.8$ times faster than
Socrates. After a $5$ hour journey, they meet somewhere in the middle
of the way. Find the speed of each traveler if the total distance
between Athens and Megara is $42$ km long.
between Athens and Megara is $42$ km.
\end{example}
\begin{exsol}
Let $a$ and $s$ be the walking speeds of Aristotle and Socrates
......@@ -230,16 +231,16 @@ work amounts:
Now we can substitute $1.8s$ for $a$ in this equation and solve for
Socrates' speed $s$:
\begin{align*}
5(1.8s) + 5(s) &\ee 42\\
(1.8s)\cdot 5 + (s)\cdot 5 &\ee 42\\
9s + 5s &\ee 42\\
14s &\ee 42\\
14s &\ee 42 &\ecomment{combined like terms}\\
(14s)/14 &\ee (42)/14\\
s &\ee 3
\end{align*}
Now that we know that Socrates was walking at $3$ km per hour,
we can get Aristotle's speed from the first equation:
\begin{align*}
a &\ee 1.8s\\ &\ee 1.8(3)\\ &\ee 5.4
a &\ee 1.8s\\ a &\ee 1.8(3)\\ a &\ee 5.4
\end{align*}
So Aristotle was walking at $5.4$ km per hour.
\end{exsol}
......
......@@ -99,9 +99,9 @@ in a variety of ways, all equivalent, and all correct:
Use the addition property to isolate terms with $z$ on one
side, and then combine like terms:
\begin{align*}
5z - x + x + 3z &\ee 12 - 3z + x + 3z\\
5z + 3z &\ee 12 + x\\
8z &\ee 12+x
5z - x + x + 3z &\ee 12 - 3z + x + 3z
&\ecomment{addition property}\\
8z &\ee 12 + x &\ecomment{combined like terms}
\end{align*}
Finally, divide by the coefficient of the term with $z$:
\begin{align*}
......@@ -135,6 +135,37 @@ in a variety of ways, all equivalent, and all correct:
$h = \frac{E\lambda}{c}$
\end{exans}
\begin{example}
Solve the formula for $X$:
\[aX = b(X - c)\]
\end{example}
\begin{exsol}
The variable $X$ is locked up inside the parentheses on the right
side, so we distribute first:
\begin{align*}
aX &\ee bX - bc
\end{align*}
Now we use the addition property to isolate the terms with $X$ on
the same side:
\begin{align*}
aX - bX &\ee bX - bc - bX &\ecomment{addition property}\\
aX - bX &\ee - bc &\ecomment{combined like terms}
\end{align*}
We would like to combine the terms with $X$, but they are not,
strictly speaking, similar, having different variable factors. We
can, however, distribute and then multiply by the reciprocal of the
resulting factor anyway:
\begin{align*}
X(a - b) &\ee - bc &\ecomment{distributivity}\\[2mm]
\frac{X(a - b)}{a-b} &\ee \frac{-bc}{a-b}
&\ecomment{assuming $(a-b) \neq 0$}\\[2mm]
X &\ee \frac{-bc}{a-b}
\end{align*}
\end{exsol}
\begin{exans}
$X = \frac{-bc}{a-b}$
\end{exans}
\begin{hw-and-answers}
Solve the formula for the given variable assuming that all variable
......
......@@ -4,7 +4,7 @@
\subsection{Solution Sets}
Recall that we call an expression
Recall that we call an equation
\hyperref[def-linear-equation]{linear} if every term is either a
constant or a product of a constant and the first power of a single
variable.
......@@ -73,7 +73,7 @@ variable.
Inequality solutions in set builder notation are cumbersome, so here