Commit f7fa8ddf authored by Jim Hefferon's avatar Jim Hefferon

second chapter

parent d479ad6d
......@@ -3,7 +3,7 @@
% Jim Hefferon jhefferon (at) smcvt.edu
% --- Class structure: identification part
% ---
\ProvidesClass{test}[2013/04/13 version 1.1 of Inquiry-based Learning book class (Jim Hefferon)]
\ProvidesClass{ibl}[2013/04/13 version 1.1 of Inquiry-based Learning book class (Jim Hefferon)]
\NeedsTeXFormat{LaTeX2e}
% ========================================
......@@ -342,6 +342,24 @@ qed=\qedsymbol
% \newcommand{\remark}{\textit{Remark:} }
% For alternate complement notation
% credit: Danie Els, https://tex.stackexchange.com/a/22101
% \newcommand*\xoverline[2][0.75]{%
% \sbox{\myboxA}{$\m@th#2$}%
% \setbox\myboxB\null% Phantom box
% \ht\myboxB=\ht\myboxA%
% \dp\myboxB=\dp\myboxA%
% \wd\myboxB=#1\wd\myboxA% Scale phantom
% \sbox\myboxB{$\m@th\overline{\copy\myboxB}$}% Overlined phantom
% \setlength\mylenA{\the\wd\myboxA}% calc width diff
% \addtolength\mylenA{-\the\wd\myboxB}%
% \ifdim\wd\myboxB<\wd\myboxA%
% \rlap{\hskip 0.5\mylenA\usebox\myboxB}{\usebox\myboxA}%
% \else
% \hskip -0.5\mylenA\rlap{\usebox\myboxA}{\hskip 0.5\mylenA\usebox\myboxB}%
% \fi}
% ====================================================
% VERSION number
\newcommand{\version}{1.1}
......
......@@ -29,7 +29,7 @@
\RequirePackage{euscript}
\newcommand{\partition}[1]{\EuScript{#1}}
% mathdots fot dots from lower-left to upper right
% mathdots for dots from lower-left to upper right
\RequirePackage{mathdots}
% Misc commands
......
......@@ -35,7 +35,7 @@
\pagestyle{bodypage}
\chapter{Numbers}
We begin with results about the integers $\Z=\set{\ldots,-2,-1,0,1,2,\ldots}$.
We begin with results about the integers $\Z=\set{\ldots\,-2,-1,0,1,2,\ldots}$.
In this chapter, ``number'' means integer.
Some statements refer to the natural numbers $\N=\set{0,1,2,\ldots}$
or the positive integers $\Z^+=\set{1,2,\ldots}$.
......@@ -1884,13 +1884,13 @@ Let $p$ be prime. Prove each.\label{ex:EuclidsOtherLemma}
% and
% http://gowers.wordpress.com/2011/11/18/proving-the-fundamental-theorem-of-arithmetic/
\begin{problem} \notetext{Fundamental Theorem of Arithmetic}
Any number $n>1$ can be expressed as a product of primes
Any number $n>1$ can be expressed as a factorization into primes
$n=p_0^{e_0}p_1^{e_1}\cdots p_s^{e_s}$.
What's more, under the condition that the primes are distinct,
this expression is
unique:~any two prime factorizations of~$n$ contain the same
primes, to the same powers.
We do this in two parts.
unique:~ for each prime $p_i$, any two prime factorizations of~$n$
have the same power $e_i$ of $p_i$.
We prove this in two parts.
\begin{exes}
\begin{exercise}
Prove that any $n>1$ can be written as a product of primes.
......@@ -2066,29 +2066,29 @@ Together these show that $\gcd(a,b)\cdot\lcm(a,b)=ab$.)
%===================================================
\chapter{Sets}
\begin{df}
A \definend{set} is a collection that is definite\Dash every
object either
definitely is contained in the collection or definitely is not.
%\begin{df}
A \definend{set} is a collection that is definite, that is, well-determined,
so that every thing either definitely is contained in the collection
or definitely is not.
An object~$x$ that belongs to a set~$A$ is an \definend{element}
or \definend{member}
of the set, written $x\in A$
(to denote that $x$ is not an element of $A$ write~$x\notin A$).
of that set, denoted $x\in A$.
We denote that $x$ is not an element with~$x\notin A$.
Two sets are equal if and only if they have the same elements.
\end{df}
\noindent Read `$\in$' as ``is an element of'' rather than ``in'' to avoid
% \end{df}
%\noindent
(Read `$\in$' as ``is an element of'' rather than ``in'' to avoid
confusion between this and
the subset relation defined below.
As a synonym for set we sometimes say ``collection.''
We usually specify a set either by listing it or by
describing its elements.
Thus we may write
the set of the primes less than ten either
as $P=\set{2, 3, 5, 7}$
or as~$P=\setbuilder{p\in\N}{\text{$p$ is prime and $p<10$}}$
(read the vertical bar as ``such that''; some authors use a colon~`$:$' instead
of a vertical bar).
the subset relation defined below.)
% As a synonym for set we sometimes say ``collection.''
We usually describe a set either by listing its elements or by
stating a criteria for membership.
Thus we can write the set of primes less than ten as
$\set{2, 3, 5, 7}$
or as $\setbuilder{p\in\N}{\text{$p$ is prime and $p<10$}}$
(read the vertical bar as ``such that'';
some authors instead use a colon,~`$:$').
\begin{problem}[\midlength]
Decide if each is true and justify your decision.
......@@ -2103,9 +2103,12 @@ Decide if each is true and justify your decision.
\begin{items}
\item These sets are equal because they contain the same elements,
$1$, $3$, and~$5$.
With sets, order does not matter.
\item These sets are equal because they contain the same elements,
$2$, $4$, and~$6$.
\item These sets are not equal; for one thing, the set on the right contains~$0$
With sets, repeats collapse.
\item These are not equal sets.
For one thing, the set on the right contains~$0$
while the set on the left does not.
\item This is false.
The set on the right has three elements,
......@@ -2124,11 +2127,12 @@ We write $B\subseteq A$.
\end{df}
\begin{df}
The set without any elements is the \definend{empty set} $\emptyset$.
The set without any elements is the \definend{empty set}, denoted $\emptyset$.
\end{df}
\begin{problem} Decide each, with justification.
\begin{items}
\item $\set{1, 3, 5}\subseteq\set{1, 3, 5, 7, 9}$
\item $\set{1, 3, 5}\in\set{1, 3, 5, 7, 9}$
\item $\set{1,3,5}\subseteq\setbuilder{n\in\N}{\text{$n$ is prime}}$
\item $\emptyset\subseteq\set{1, 2, 3, 4}$
......@@ -2138,11 +2142,14 @@ The set without any elements is the \definend{empty set} $\emptyset$.
\end{items}
\begin{answer}
\begin{items}
\item This is true because, by inspection, for each element of the set
on the left, $1$, $3$, and~$5$, it is an element of the set on the right.
\item The set $\set{1,3,5}$ is not an element of the set on the right.
All elements of the set on the right are numbers.
\item This is not true since~$1$ is an element of the set on the left
\item This is true.
By inspection, each element of the set
on the left, $1$, $3$, and~$5$, is an element of the set on the right.
\item This is false.
The set $\set{1,3,5}$ is not an element of the set on the right.
The set $\set{1,3,5}$ is not equal to the number $1$ from the set on the
right, it is not equal to the number $3$, \ldots\@
\item This is false because~$1$ is an element of the set on the left
but not of the set on the right.
\item This is true since $x\in\emptyset$ implies that $x\in\set{1, 2, 3, 4}$.
(The implication is vacuous.)
......@@ -2164,10 +2171,15 @@ Prove.
\begin{answer}
For the first, let $x$ be an element of the set on the left, $A$.
Then $x$ is an element of the set on the right, $A$, obviously.
For the second, observe that the implication
`if $x\in\emptyset$ then $x\in A$' is true
because any implication with a false first clause is true
(that is, the implication is vacuously true).
because any implication with a false antecedent clause is true.
(That is, the implication is vacuously true.
Another way to express this is to note that this implication has
no counterexamples\Dash you cannot find a number that is an element of
$\emptyset$ but that is not an element of~$A$, simply because there
are no numbers that are element of~$\emptyset$.)
\end{answer}
\begin{exercise}
The empty set is unique: if the set~$A$ is empty and
......@@ -2197,13 +2209,16 @@ Prove, for any sets $A$, $B$, and~$C$.
\end{exercise}
\begin{answer}
Suppose that $x\in A$.
Because $A\subseteq B$ we have that~$x\in B$ and with that, because
$B\subseteq C$ we have that $x\in C$.
Thus $x\in A$ implies that $x\in C$, and therefore~$A\subseteq C$.
Because $A\subseteq B$ we have that~$x\in B$.
With that, because
$B\subseteq C$, we have that $x\in C$.
Thus $x\in A$ implies that $x\in C$ and therefore~$A\subseteq C$.
\end{answer}
\end{exes}
\end{problem}
Mutual inclusion is the most common way to show that two sets are equal.
\begin{problem}[\maxlength]
For each, give an example of three sets satisfying the conditions,
or show that no example is possible.
......@@ -2221,14 +2236,16 @@ or show that no example is possible.
\end{ans}
\end{problem}
In this book statements talk about things inside of
some \definend{universal set},
Usually mathematical statements are in a context of
some \definend{universe},
denoted $\universalset$.
For instance, in the first chapter on number theory
the universal set is the integers~$\universalset=\Z$.
For instance, in the first chapter
the universe is the integers,~$\universalset=\Z$.
There, if we say that we are considering
the set of things less than~$100$ then
we are considering the set of integers less than~$100$.
Another example is that in first semester calculus
the universe is the set of real numbers,~$\universalset=\R$.
%% \begin{df}
%% The \definend{characteristic function} of a set~$A$ is a map
......@@ -2250,19 +2267,21 @@ themselves~$D=\setbuilder{S}{S\notin S}$.
Show that assuming $D$ is an element of itself leads to a contradiction.
\end{exercise}
\begin{answer}
If~$D$ were to have itself as an element
then it wouldn't satisfy the condition
$S\notin S$, so $D$ would not be in the collection
$\setbuilder{\text{set~$S$}}{S\notin S}$.
That is, in this case $D\notin D$, a contradiction.
Suppose that $D$ were to have itself as an element, $D\in D$.
Then $D$ would not be an element of the collection
$\setbuilder{\text{set~$S$}}{S\notin S}$ because it wouldn't satisfy the
condition $S\notin S$.
Thus $D\notin D$, a contradiction.
\end{answer}
\begin{exercise}
Show that assuming $D$ is not an element of itself also leads to a
contradiction.
\end{exercise}
\begin{answer}
If $D$ does not have itself for an element then it satisfies the
condition $S\notin S$, so $D\in D$, a contradiction.
Suppose that $D$ were to not have itself as an element, $D\notin D$.
Then $D$ would be an element of the collection
$\setbuilder{\text{set~$S$}}{S\notin S}$.
Thus $D\in D$, which is a contradiction.
\end{answer}
\end{exes}
\end{problem}
......@@ -2277,17 +2296,16 @@ themselves~$D=\setbuilder{S}{S\notin S}$.
\begin{df}
The \definend{complement} of a set~$A$, denoted $\setcomp{A}$, is the
set of objects that are not elements of~$A$.
set of things that are not elements of~$A$.
Some authors denote the complement with a bar, $\xoverline{A}$.
\end{df}
\noindent\remark
working inside of a universal set makes the complement
operation sensible.
working inside of a universe makes the complement sensible.
For instance, in a number theory discussion where $\universalset=\Z$,
if we consider the set of things less than~$100$ then we can
take the complement and the result is another subset of
$\universalset$, so
we are still in number theory.
$\universalset$, so we are still in number theory.
\begin{df}
Let $A$ and $B$ be sets.
......@@ -2307,100 +2325,103 @@ Picture set operations with \definend{Venn diagrams}.
\hspace*{3em}
\grf{asy/venn_comp.pdf}{$\setcomp{A}$}
\end{center}
In each diagram
the region inside the rectangle depicts the universal set and the
region inside each circle depicts the set.
In each diagram the region inside the rectangle depicts the universe and the
region inside a circle depicts a set.
On the left the darker color shows
the union as containing all of the two sets joined,
the union as containing all of the two sets,
the middle shows the intersection
containing only the region common to both,
and on the right the dark region, the complement, is all but the set~$A$.
and on the right the complement is all but the set~$A$.
\begin{problem}
Another tool illustrating set relationships is this table describing
two sets.
Another tool illustrating set relationships is this table.
It describes
two sets in the universe $\universalset=\set{0,1,2,3}$.
(It uses $0$ and~$1$ in place of $F$ and~$T$ so that the right side of each
row is the binary representation of its number.)
\begin{center} \small
\begin{tabular}{r|cc}
\multicolumn{1}{r}{\textit{row number}} &$x\in A$ &$x\in B$ \\ \hline
\begin{tabular}{c|cc}
\multicolumn{1}{r}{\textit{number}} &$x\in A$ &$x\in B$ \\ \hline
$0$ &$0$ &$0$ \\
$1$ &$0$ &$1$ \\
$2$ &$1$ &$0$ \\
$3$ &$1$ &$1$
\end{tabular}
\hspace*{3em}
\vcenteredhbox{\includegraphics{asy/venn_two.pdf}}
\end{center}
It uses $0$ and~$1$ instead of $F$ and~$T$ so that the right side of each
row is the binary representation of its row number.
The top row says that $0\notin A$ and $0\notin B$,
The table's top row says that $0\notin A$ and $0\notin B$,
while the second row says that $1\notin A$ but $1\in B$.
In total, $A=\set{2,3}$, $B=\set{1,3}$,
and~$\universalset=\set{0,1,2,3}$.
For each of these simple results about set operations,
apply the statement to the sets $A$ and~$B$.
Also pick one and prove it.
apply the statement to these example sets.
Also, pick one statement and prove it.
\begin{items}
\item the complement of the complement is the original set
$\setcomp{(\setcomp{A})}=A$
$\smash{\setcomp{(\setcomp{A})}}=A$
\item $A\intersection\emptyset=\emptyset$ and $A\union\emptyset=A$
\item \notetext{Idempotence} $A\intersection A=A$ and $A\union A=A$
\item $A\intersection B\subseteq A\subseteq A\union B$
\item \notetext{Commutativity}
$A\intersection B=B\intersection A$ and
$A\union B=B\union A$
\item \notetext{Associativity}
$(A\intersection B)\intersection C=A\intersection (B\intersection C)$
and
$(A\union B)\union C=A\union (B\union C)$
\item \notetext{Associativity}
$(A\intersection B)\intersection C=A\intersection (B\intersection C)$
and
$(A\union B)\union C=A\union (B\union C)$
(extend the table to add a third set,~$C$).
\end{items}
\begin{answer}
For convenience here is the defintion of the sets again, as well
as a Venn diagram.
For convenience here is the table again, along with the Venn diagram.
\begin{center} \small
\begin{tabular}{cc|c}
$x\in A$ &$x\in B$ &row number \\ \hline
$x\in A$ &$x\in B$ &\multicolumn{1}{l}{\textit{number}} \\ \hline
$0$ &$0$ &$0$ \\
$0$ &$1$ &$1$ \\
$1$ &$0$ &$2$ \\
$1$ &$1$ &$3$
\end{tabular}
\hspace*{3em}
\vcenteredhbox{\includegraphics{asy/venn_two.pdf}}
\hspace*{3em}
\vcenteredhbox{\includegraphics{asy/venn_two.pdf}}
\end{center}
\begin{items}
\item Applied to the set~$A$, the complement is
$\setcomp{A}=\set{0,1}$ while
the complement of the complement is~$\setcomp{\setcomp{A}}=\set{2,3}$.
\item Applying the statement to the example, with this
universe $\universalset=\set{0,1,2,3}$, the complement is
$\setcomp{A}=\set{0,1}$, and
complement of the complement is~$\setcomp{\setcomp{A}}=\set{2,3}$.
The proof
is by mutual inclusion, that both~$A\subseteq\setcomp{(\setcomp{A})}$
and~$\setcomp{(\setcomp{A})}\subseteq A$.
We prove this
by mutual inclusion, that both~$A\subseteq\smash{\setcomp{(\setcomp{A})}}$
and~$\smash{\setcomp{(\setcomp{A})}}\subseteq A$.
For the first inclusion suppose that $a\in A$.
By the definition of complement $a\notin\setcomp{A}$ and
so $a\in\setcomp{(\setcomp{A})}$.
Thus $A\subseteq\setcomp{(\setcomp{A})}$.
thus $a\in\smash{\setcomp{(\setcomp{A})}}$.
That shows $A\subseteq\smash{\setcomp{(\setcomp{A})}}$.
Inclusion in the other direction is similar.
If $x\in\setcomp{(\setcomp{A})}$
If $x\in\smash{\setcomp{(\setcomp{A})}}$
then $x\notin\setcomp{A}$ and
by definition of the complement $x\in\setcomp{A}$.
Thus $\setcomp{(\setcomp{A})}\subseteq A$.
by definition of the complement, $x\in\setcomp{A}$.
Thus $\smash{\setcomp{(\setcomp{A})}}\subseteq A$.
\item The set $A\intersection\emptyset$
is the collection of
elements of~$\universalset$ that are members of both~$A$ and~$\emptyset$,
so applied to $A=\set{2,3}$ and $\universalset=\set{0,1,2,3}$ it
things that are members of both~$A$ and~$\emptyset$.
Applied to $A=\set{2,3}$, it
is~$\set{}$.
The second one is just as trivial: the collection of all of the members of
$\universalset=\set{0,1,2,3}$ that are members of either~$A=\set{2,3}$
The second one is just as trivial:~the collection of all of things
that are members of either~$A=\set{2,3}$
or~$\emptyset=\set{}$ is~$\set{2,3}$.
The proof of the first equality is: $x\in A\intersection\emptyset$
iff $x\in A$ and~$x\in\emptyset$,
which, because an `and' statement holds if and only if both halves hold
iff $x\in A$ and~$x\in\emptyset$.
Because an `and' statement holds if and only if both halves hold
and here the second clause never holds,
is equivalent to $x\in\emptyset$.
this is true if and only if $x\in\emptyset$.
For the second equality,
$x\in A\union\emptyset$ iff either $x\in A$ or~$x\in\emptyset$,
which is equivalent to $x\in A$.
$x\in A\union\emptyset$ iff either $x\in A$ or~$x\in\emptyset$.
An `or' statement holds if either of its two clauses holds,
and here the second clause never holds,
so this is equivalent to $x\in A$.
\item The first statement applied to the set $A=\set{2,3}$
says that the collection of members of both
$\set{2,3}$ and~$\set{2,3}$ is the set~$A=\set{2,3}$.
......@@ -2410,23 +2431,24 @@ as a Venn diagram.
$x\in A\intersection A$ if and only if
both $x\in A$ and~$x\in A$,
which is true if and only if $x\in A$.
The proof of the second is similar.
The second's proof is similar.
\item The statement has two containments.
The application of the statement on the left is that
The application of $A\intersection B\subseteq A$ to the example sets is that
$A\intersection B=\set{3}\subseteq A=\set{2,3}$.
On the right the application is~$A=\set{2,3}\subseteq A\union B=\set{1,2,3}$.
The application of $A\subseteq A\union B$
is~$A=\set{2,3}\subseteq A\union B=\set{1,2,3}$.
To prove the left-hand containment $A\intersection B\subseteq A$ observe that
To prove that $A\intersection B\subseteq A$, observe that
$x\in A\intersection B$ implies that
$x\in A$ and $x\in B$, and so in particular $x\in A$.
The right-hand containment's argument is that
$x\in A$ implies that $x\in A$ or~$x\in B$, and so $A\subseteq A\union B$.
The argument for the right-hand containment $A\subseteq A\union B$ is that
$x\in A$ implies that $x\in A$ or~$x\in B$.
\item For the intersections the application gives that
$A\intersection B$ is the collection of elements common to
$\set{2,3}$ and $\set{1,3}$, which is $\set{3}$,
and $B\intersection A=\set{3}$ also.
The application to the statement about unions is similar:
The application of the statement about unions is similar:
$A\union B=\set{1,2,3}=B\union A$.
For the proof that
......@@ -2436,16 +2458,16 @@ as a Venn diagram.
=\setbuilder{x}{\text{$x\in B$ and $x\in A$}}=B\intersection A$.
(The middle equality holds by the commutativity of `and'.)
Equality for union is similar since, like `and', the connective
Equality for union is similar since, like `and', the logical connective
`or' is also commutative.
\item This is a three set relationship so we use this table.
\item Here is the extended table and the associated Venn diagram.
\begin{center} \small
\begin{tabular}{ccc|c}
$x\in A$ &$x\in B$ &$x\in C$ &row number \\ \hline
$x\in A$ &$x\in B$ &$x\in C$ &\multicolumn{1}{l}{\textit{number}} \\ \hline
$0$ &$0$ &$0$ &$0$ \\
$0$ &$0$ &$1$ &$1$ \\
$0$ &$1$ &$0$ &$2$ \\
$0$ &$1$ &$1$ &$3$ \\[.5ex] \hline
$0$ &$1$ &$1$ &$3$ \\[.5ex] % \hline
$1$ &$0$ &$0$ &$4$ \\
$1$ &$0$ &$1$ &$5$ \\
$1$ &$1$ &$0$ &$6$ \\
......@@ -2454,9 +2476,11 @@ as a Venn diagram.
\hspace*{3em}
\vcenteredhbox{\includegraphics{asy/venn_three.pdf}}
\end{center}
To apply associativity of intersection, $A\intersection B=\set{6,7}$ and so
To apply associativity of intersection to these example sets,
$A\intersection B=\set{6,7}$ and so
$(A\intersection B)\intersection C=\set{7}$, while
$B\intersection C=\set{3,7}$ so $A\intersection(B\intersection C)=\set{7}$.
$B\intersection C=\set{3,7}$
and so $A\intersection(B\intersection C)=\set{7}$.
Associativity of union is similar.
The proof that intersection is associative goes
......@@ -2510,13 +2534,46 @@ as a Venn diagram.
% \end{problem}
\begin{problem}[\maxlength]
Prove that the following are equivalent:
Prove that the following statements are equivalent:
(i)~$A\subseteq B$,
(ii)~$A\union B=B$,
and (iii)~$A\intersection B=A$.
(\hint~one approach is to
show that (i) implies~(ii),
that (ii) implies~(iii),
and that (iii) implies~(i).)
\begin{answer}
One way to prove this is to
show that (i) holds iff (ii)~holds, and also show that (i) holds iff~(iii)
We follow the hint.
For (i) implies~(ii), assume that $A\subseteq B$.
To show that $A\union B=B$ we do mutual inclusion.
One of those inclusions, that $B\subseteq A\union B$, holds by the definition
of union.
So, we only need to show that $A\union B\subseteq B$.
For that, let $x$~be an element of $A\union B$ and then
there are two cases, that $x\in A$ or that $x\in B$, and
we must verify that $x\in B$ in both cases.
The $x\in A$ case is
immediate from the $A\subseteq B$ assumption of~(i).
The second case, the $x\in B$ case, is trivial.
For (ii) implies~(iii), assume that $A\union B=B$.
We show that $A\intersection B=A$ by mutual inclusion.
Half, that $A\intersection B\subseteq A$, is one of the parts of the
prior exercise.
For the other half, that $A\subseteq A\intersection B$, assume that $x\in A$.
Then $x\in A\union B$ and since we've assumed that $A\union B=B$,
we have $x\in B$.
Thus $x\in A\intersection B$.
The third implication is that (iii) implies~(i).
Assume that $A\intersection B=A$.
Let $x\in A$.
Then $x\in A\intersection B$ and so $x\in B$.
\smallskip
\noindent\textit{Alternate proof.}
Another way to prove this is to
show that (i) holds iff (ii)~holds, and also to show that (i) holds iff~(iii)
holds.
The second logical equivalence
is very like the first so here we only show the first.
......@@ -2548,8 +2605,8 @@ The \definend{symmetric difference} is
$A\symdiff B=(A-B)\union(B-A)$.
\end{df}
\noindent If $A\subseteq X$ then $X-A$ is the same as $\setcomp{A}$
where $X$ is the universal set $\universalset=X$.
\noindent\remark if $A\subseteq X$ then $X-A$ is the same as $\setcomp{A}$
where $X$ is the universe, $\universalset=X$.
% \begin{problem}
% Draw the Venn diagram for difference and symmetric difference.
......@@ -2580,17 +2637,17 @@ where $X$ is the universal set $\universalset=X$.
(and thus $A-B\subseteq A$).
\end{exercise}
\begin{answer}
We will show the sets are equal by mutual inclusion.
For the left-to-right inclusion $A-B\subseteq A\intersection \setcomp{B}$
We will show these are equal by mutual inclusion.
For the $A-B\subseteq A\intersection \setcomp{B}$ inclusion,
suppose that $x\in A-B$.
By the definition of set difference both $x\in A$ and $x\notin B$ hold.
Therefore $x$ is an element of the intersection
$x\in A\intersection\setcomp{B}$.
For the $A\intersection\setcomp{B}\subseteq A-B$ inclusion suppose that
For the $A\intersection\setcomp{B}\subseteq A-B$ inclusion, suppose that
$x\in A\intersection\setcomp{B}$.
Then $x\in A$ and $x\in\setcomp{B}$, so $x\notin B$.
By the definition of set difference then, $x\in A-B$.
Thus, by the definition of set difference, $x\in A-B$.
\end{answer}
\begin{exercise}[\midlength]
For all pairs of sets, $A-B=B-A$.
......@@ -2611,37 +2668,39 @@ where $X$ is the universal set $\universalset=X$.
\end{problem}
\begin{problem}
\notetext{De Morgan's Laws} Prove, for all sets $A$, $B$, and~$C$.
Prove, for all sets $A$, $B$, and~$C$.
\begin{exes}
\begin{exercise} \notetext{De Morgan's Laws}
$\setcomp{(A\intersection B)}=\setcomp{A}\union\setcomp{B}$
and
$\setcomp{(A\union B)}=\setcomp{A}\intersection\setcomp{B}$
\end{exercise}
\Writetofile{answers}{\protect\item[\protect\remark] these two are
consequences of the fact that logical negation
satisfies that the logic statement `not($P$ and $Q$)' has the same truth value
as `not($P$) or not($Q$)'.
}
\begin{answer}
\remark these two are a consequence of the fact that logical negation
satisfies that `not($P$ and $Q$)' has the same truth value, for any
values of $P$ and~$Q$, as `not($P$) or not($Q$)'.
We show $\setcomp{(A\intersection B)}=\setcomp{A}\union\setcomp{B}$
by mutual containment.
The other identity is similar.
Suppose first that $x\in \setcomp{(A\intersection B)}$.
Then $x\notin A\intersection B$, so
either $x\notin A$ or~$x\notin B$,
Then $x\notin A\intersection B$.
So either $x\notin A$ or~$x\notin B$,
and so $x\in \setcomp{A}\union\setcomp{B}$.
Thus $\setcomp{(A\intersection B)}\subseteq\setcomp{A}\union\setcomp{B}$.
Suppose now that $x\in \setcomp{A}\union\setcomp{B}$.
Then $x\in\setcomp{A}$ or~$x\in\setcomp{B}$.
Restated, that is $x\notin A$ or $x\notin B$,
which gives that $x\notin (A\intersection B)$, and
Restated, either $x\notin A$ or $x\notin B$.
Hence $x\notin (A\intersection B)$, and
so $x\in\setcomp{(A\intersection B)}$.
Thus $\setcomp{A}\union\setcomp{B}\subseteq\setcomp{(A\intersection B)}$.
\remark we could combine those paragraphs into a single chain of
double implications, that
\smallskip
\noindent\textit{Alternative proof.}
The statement
$x\in \setcomp{(A\intersection B)}$ holds if and only if
$x\notin A\intersection B$, which is true if and only if
either $x\notin A$ or~$x\notin B$,
......@@ -2653,8 +2712,11 @@ where $X$ is the universal set $\universalset=X$.
$A\intersection (B\union C)=(A\intersection B)\union (A\intersection C)$
\end{exercise}
\begin{answer}
For $A\union (B\intersection C)=(A\union B)\intersection (A\union C)$
first suppose that $x\in A\union (B\intersection C)$.
We will do $A\union (B\intersection C)=(A\union B)\intersection (A\union C)$
by mutual containment;
the other is similar.
First suppose that $x\in A\union (B\intersection C)$.
Then $x\in A$ or $x\in B\intersection C$.
In the case that $x\in A$ we have both that $x\in A\union B$ and that
$x\in A\union C$.
......@@ -2673,9 +2735,6 @@ where $X$ is the universal set $\universalset=X$.
So in this case also $x\in A\union (B\intersection C)$.
Thus
$(A\union B)\intersection (A\union C)\subseteq A\union (B\intersection C)$.
Therefore, by mutual containment, the two sets are equal.
The other identity is similar.
\end{answer}
\end{exes}
\end{problem}
......@@ -2698,23 +2757,18 @@ Two sets are \definend{disjoint} if their intersection is empty.
\begin{problem}
Find three sets $A$, $B$, and $C$, such that
$A\intersection B\intersection C$ is empty but the sets are
not pairwise disjoint, that is, none of $A\intersection B$,
$A\intersection C$, or $B\intersection C$ is empty.
not pairwise disjoint, that is, $A\intersection B$,
$A\intersection C$, and $B\intersection C$ are all nonempty.
\begin{answer}
One example is $A=\set{5,6}$, $B=\set{3,6}$, and
$C=\set{3,5}$.
\remark
\noindent\remark
As with many set examples,
to get this one we used the three-set table repeated below with
the diagram.
Think of it as listing eight regions that could either be occupied or not.
We want to have the overlap of all three, area~$7$, empty.
But we want the pairwise overlaps, areas $3$, $5$, and~$6$, to
be nonempty.
to get this one we started with the three-set table repeated below.
\begin{center} \small
\begin{tabular}{ccc|c}
$x\in A$ &$x\in B$ &$x\in C$ &row number \\ \hline
$x\in A$ &$x\in B$ &$x\in C$ &\textit{number} \\ \hline
$0$ &$0$ &$0$ &$0$ \\
$0$ &$0$ &$1$ &$1$ \\
$0$ &$1$ &$0$ &$2$ \\
......@@ -2727,6 +2781,12 @@ Two sets are \definend{disjoint} if their intersection is empty.
\hspace*{3em}
\vcenteredhbox{\includegraphics{asy/venn_three.pdf}}
\end{center}
To modify it to make the required example,
think of it as showing eight regions that could either be occupied or not.
We want that the overlap of all three, area~$7$, is empty.
We also want that the pairwise overlaps, areas $3$, $5$, and~$6$, are
nonempty.
That gives the three sets.
\end{answer}
\end{problem}
......@@ -2734,92 +2794,113 @@ Two sets are \definend{disjoint} if their intersection is empty.
For a finite set~$A$, the \definend{order} $|A|$ is the number of elements.
\end{df}
% \begin{problem}
% For finite sets, if $A\subseteq B$ then $|A|\leq |B|$.
% \begin{ans}
% Since $A$ finite we can list its elements
% $A=\set{a_0,\ldots,a_{n-1}}$.
% Similarly, $B$ is finite so we can list its elements, and because
% $A\subseteq B$, the elements of $A$ are elements of~$B$.
% Thus $B=\set{a_0,\ldots,a_{n-1},b_n,\ldots,b_k}$.
% Clearly then $|A|\leq |B|$.
% \end{ans}
% \end{problem}
\begin{problem}
For finite sets, if $A\subseteq B$ then $|A|\leq |B|$.
\begin{ans}
Since $A$ finite we can list its elements
$A=\set{a_0,\ldots\,a_{n}}$.
Similarly, $B$ is finite so we can list its elements, and because
$A\subseteq B$, the elements of $A$ are elements of~$B$.
Thus $B=\set{a_0,\ldots\,a_{n},b_{n+1},\ldots\,b_{n+k}}$,
and $|A|\leq |B|$.
\end{ans}
\end{problem}
\begin{df}
For a set~$A$ the \definend{power set} $\powerset(A)$ is the set of all
For a set~$A$, the \definend{power set} $\powerset(A)$ is the set of all
subsets of~$A$.
\end{df}
\begin{problem}[\midlength]
List the elements of each power set
$\powerset(\set{0,1})$,
$\powerset(\set{0,1,2})$,
$\powerset(\set{0})$, and
$\powerset(\emptyset)$.
Find the order of each.
\begin{answer}
The power set of the two-element set
List the elements of each power set: