%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\documentstyle[12pt]{amsart}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
%   ENVIRONMENTS
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
%% \theoremstyle{plain} %% This is the default
\newtheorem{th}{Theorem}[section]
\newtheorem{cor}[th]{Corollary}
\newtheorem{lm}[th]{Lemma}
\newtheorem{prp}[th]{Proposition}
\newtheorem{clm}[th]{Claim}
%
\theoremstyle{definition}
\newtheorem{df}[th]{Definition}
\newtheorem{exmp}[th]{Example}
\newtheorem{prb}[th]{Problem}
%
\theoremstyle{remark}
\newtheorem{rem}[th]{Remark}
%
%
\numberwithin{equation}{section}
%
\newcommand{\thref}[1]{Theorem~\ref{#1}}
\newcommand{\secref}[1]{\S\ref{#1}}
\newcommand{\lmref}[1]{Lemma~\ref{#1}}
%
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
%  Math macros
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
%  Logical symbols
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
\newcommand{\satf}{\models}
\newcommand{\id}{{\text{\sl id}}}       % The identity map
\newcommand{\miff}{\Longleftrightarrow} % math `if and only if'
\newcommand{\mimplies}{\Longrightarrow} % math `implies'
\newcommand{\mimplied}{\Longleftarrow}  % math `implied by'
\newcommand{\miffdef}{\stackrel{\text{\normalshape
   def}}{\miff}}                        % defining iff
\newcommand{\eqdef}{\stackrel{\text{\normalshape
   def}}{=}}                            % defining equation
\newcommand{\set}[2]{\{#1\,:\,\text{#2}\}} % { x : ... }
%
%\newcommand{\neareq}{\stackrel{\ae}{=}}
%\newcommand{\aeqv}{\,\stackrel{\text{\normalshape ae}}{\equiv}\,}
%\newcommand{\aeq}{\,\stackrel{\text{\normalshape ae}}{=}\,}
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
%%  Classical math
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
\newcommand{\tmod}[1]{\text{\normalshape mod~$#1$}}

\newcommand{\BZ}{\Bbb Z} % integers
\newcommand{\BQ}{\Bbb Q} % rationals
\newcommand{\BR}{\Bbb R} % reals
\newcommand{\BC}{\Bbb C} % complex numbers
\newcommand{\re}{\text{\normalshape Re}\,}    % real part
\newcommand{\im}{\text{\normalshape Im}\,}    % imaginary part
%
\newcommand{\meet}{\wedge}
\newcommand{\join}{\vee}
\newcommand{\union}{\cup}
\newcommand{\inter}{\cap}  % intersection
\newcommand{\iso}{\cong}   % isomorphic
\newcommand{\piso}{\simeq} % polynomially isomorphic
\newcommand{\Star}{^ *}
\newcommand{\compose}{{\scriptstyle \circ}} % f o g
%
\newcommand{\wec}[1]{{\bold{#1}}}  % notation for vectors in algebras
%\newcommand{\wec}[1]{{\bar{#1}}} % which one do you prefer?
\newcommand{\wrel}[1]{\;#1\;}     % a\wrel{\alpha}b = a \alpha b
%              % this provides a flexible way to change the spacing
%
\newcommand{\Ker}{\text{\normalshape Ker}\,}
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
%%  Operators on algebras
%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%
%%%  \m is used to produce models (algebras) as follows:
%%%  typing `\m a'  produces in bold face, A.
%%%  \vr does the same for varieties
%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
\newcommand{\m}[1]{\mbox{${\bold{\uppercase{#1}}}$}}
\newcommand{\sm}[1]{\mbox{{\scriptsize\bf{\uppercase{#1}}}}}
\newcommand{\vr}[1]{{\cal{\uppercase {#1}}}}
%
\newcommand{\Var}{{\bold{V}}}
\newcommand{\Ho}{{\bold{H}}}
\newcommand{\Su}{{\bold{S}}}
\newcommand{\Pd}{{\bold{P}}}
\newcommand{\Iso}{{\bold{I}}}
\newcommand{\Ps}{{\bold{P}}_{\text{\normalshape s}}}
\newcommand{\fin}[1]{{\bold{#1}}_{\text{\normalshape fin}}}
%
\newcommand{\Pol}{{\text{\normalshape Pol}\,}}
\newcommand{\Clo}{{\text{\normalshape Clo}\,}}
\newcommand{\Con}{{\text{\normalshape Con}\,}}
\newcommand{\Conb}{{\bold{Con}\,}}       % Con(A) as a lattice
%\newcommand{\Cg}[1]{\text{\normalshape Cg}^{\m{#1}}}
%\newcommand{\Sg}[1]{\text{\normalshape Sg}^{\m{#1}}}
\newcommand{\Cg}[1]{\text{\normalshape Cg}^{\sm{#1}}}
\newcommand{\Sg}[1]{\text{\normalshape Sg}^{\sm{#1}}}
\newcommand{\cg}{\text{\normalshape Cg}\,}
\newcommand{\sg}{\text{\normalshape Sg}\,}
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
%  macros for tame congruence theory.
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
\newcommand{\M}[3]{\text{\normalshape
   M}_{\m{#1}} (#2, #3)}
\newcommand{\minl}[1]{\text{\normalshape
   Min}_{\m{#1}}}
%
\newcommand{\typ}{{\text{\normalshape typ}\,}}
\newcommand{\ann}{{\text{\normalshape ann}\,}}
\newcommand{\Sep}{{\text{\normalshape Sep}\,}}
\newcommand{\ssb}{{\text{\normalshape ssb}\,}}
\newcommand{\sst}{{\text{\normalshape sst}\,}}
%
\newcommand{\utyp}{{\bold{1}}\,} % unary
\newcommand{\atyp}{{\bold{2}}\,} % affine
\newcommand{\btyp}{{\bold{3}}\,} % boolean
\newcommand{\ltyp}{{\bold{4}}\,} % lattice
\newcommand{\styp}{{\bold{5}}\,} % semilattice
\newcommand{\ityp}{{\bold{i}}\,}
\newcommand{\jtyp}{{\bold{j}}\,}
%
\newcommand{\solv}{\stackrel{s}{\sim}}
\newcommand{\ssolv}{\stackrel{ss}{\sim}}
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
%  Abbreviations
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
\newcommand{\bd}{\begin{description}}
\newcommand{\ed}{\end{description}}
%
\newcommand{\lb}{\langle} % <...>
\newcommand{\rb}{\rangle}
\newcommand{\lv}{{[\![}}  % [[...]]
\newcommand{\rv}{{]\!]}}
%
\newcommand{\ul}{\underline}
\newcommand{\ol}{\overline}
%
\newcommand{\vep}{\varepsilon}
\newcommand{\di}{\diamond}
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\newcommand{\s}[1]{\underset{\mbox{\scriptsize\sl #1}}{\textstyle\bold \sim}}
%\newcommand{\s}[1]{\underset{#1}{\textstyle\bold \sim}}

\begin{document}


{\bf 1.43.}
\begin{enumerate}
\item[(i)] Prove that an integer $m\geq 2$ is a perfect
square if and only if each of its prime factors
occurs an even number of times.
\item[(ii)] Prove that if $m$ is a positive integer
for which $\sqrt{m}$ is rational, then $m$
is a perfect square.
\end{enumerate}

\noindent
{\it Solution.} (i) Assume that $m$ is a perfect square.
Then $m = k^2$ for some integer $k\geq 2$.
If the prime factorization of $k$ is
$p_1^{e_1}\cdots p_r^{e_r}$, then 
\[m = k^2 = (p_1^{e_1}\cdots p_r^{e_r})^2 =
p_1^{2e_1}\cdots p_r^{2e_r}.\]
The product on the right is a prime
factorization of $m$ in which all 
exponents are even.

Conversely, assume that $m = q_1^{f_1}\cdots q_s^{f_s}$
where all $q_i$ are prime and all $f_i$ are positive
even integers. Then each $f_i = 2g_i$ for some $g_i$.
Hence $m = q_1^{2g_1}\cdots q_s^{2g_s} = 
\left(q_1^{g_1}\cdots q_s^{g_s}\right)^2$,
which shows that $m$ is a perfect square.

\smallskip

{\it Solution.} (ii) If $\sqrt{m}$ is rational,
then there are integers $r$ and $s$ such that 
$\sqrt{m} = r/s$. Hence $m = r^2/s^2$,
so $ms^2 = r^2$.
There are primes $p_1, \ldots, p_k$ and 
nonnegative exponents for which
$m = p_1^{e_1}\cdots p_k^{e_k}$, 
$r = p_1^{f_1}\cdots p_k^{f_k}$, and 
$s = p_1^{g_1}\cdots p_k^{g_k}$. The equation 
$ms^2 = r^2$ leads to 
\[\left(p_1^{e_1}\cdots p_k^{e_k}\right)
\left(p_1^{g_1}\cdots p_k^{g_k}\right)^2 = 
\left(p_1^{f_1}\cdots p_k^{f_k}\right)^2,\]
or 
\[p_1^{e_1+2g_1}\cdots p_k^{e_k+2g_k} = 
p_1^{2f_1}\cdots p_k^{2f_k}.\]
Therefore $e_i+2g_i = 2f_i$ for all $i$.
This proves that each $e_i = 2f_i - 2g_i$
is even. By part (i) this proves that $m$
is a perfect square. 

\bigskip

{\bf 1.44.} If $a$ and $b$ are positive integers with
$\gcd(a,b)=1$, and if $ab$ is a square, then 
both $a$ and $b$ are squares.


\smallskip

\noindent
{\it Solution.}
We will prove the contrapositive:
if $ab$ is a square and $a$ (or $b$) is not a square, then 
$\gcd(a,b)\neq 1$.
So assume that $a$ is not a square.
Choose primes and nonnegative exponents so that
$a = p_1^{e_1}\cdots p_k^{e_k}$ and 
$b = p_1^{f_1}\cdots p_k^{f_k}$. By problem {\bf 1.43}~(i),
some $e_i$ must be odd; assume that $e_1$ is odd.
Now since $ab = p_1^{e_1+f_1}\cdots p_k^{e_k+f_k}$
is a perfect square, we must have that all
exponents $e_i+f_i$ are even. Therefore, since $e_1$
is odd, we cannot have $f_1 = 0$.
But now we have $e_1, f_1 > 0$, which implies
that $p_1$ divides both $a$ and $b$.
From the definition of the $\gcd$ we get
that $p_1\;\mid\;\gcd(a,b)$, so $\gcd(a,b)\neq 1$.

\vfill
\pagebreak

{\bf 1.46.} 
\begin{enumerate}
\item[(i)] For all rationals $a$ and $b$, prove that
\[\|ab\|_p = \|a\|_p\|b\|_p\;\;\mbox{\rm and}\;\;
\|a+b\|_p\leq \max\{\|a\|_p,\|b\|_p\}.\]
\item[(ii)] For all $a, b, c\in {\BQ}$, prove
\begin{enumerate}
\item[(1)] $\delta_p(a,b)\geq 0$; 
$\delta_p(a,b)= 0$ if and only if $a=b$;
\item[(2)] $\delta_p(a,b) = \delta_p(b,a)$;
\item[(3)] $\delta_p(a,b)\leq \delta_p(a,c)+\delta_p(c,b)$.
\end{enumerate}
\item[(iii)] If $a$ and $b$ are integers and $p^n\;\mid\; a-b$,
then $\delta_p(a,b)\leq p^{-n}$.
\end{enumerate}

\noindent
{\it Solution.} (i) Assume that 
$a = p^ep_1^{e_1}\cdots p_k^{e_k}$ and 
$b = p^fp_1^{f_1}\cdots p_k^{f_k}$. 
Then $\|a\|_p = 1/p^e$ and $\|b\|_p = 1/p^f$.
Since $ab = p^{e+f}p_1^{e_1+f_1}\cdots p_k^{e_k + f_k}$,
we have $\|ab\|_p = 1/p^{e+f}$.
Altogether we have
\[\|a\|_p\|b\|_p = \left(1/p^e\right)\left(1/p^f\right) = 
1/p^{e+f} = \|ab\|_p.\]
This proves that 
$\|ab\|_p = \|a\|_p\|b\|_p$ when $a\neq 0 \neq b$.
In the case where one of $a$ or $b$ equals zero
the equality holds because both sides are zero.

Now we prove that 
$\|a+b\|_p\leq \max\{\|a\|_p,\|b\|_p\}$ for the same
$a$ and $b$ as above. (Again, if $a$ or $b$
is zero, then it is easy to see that the statement holds.)
Let $d = \min\{e,f\}$. Then
\[\begin{array}{rl}
\|a+b\|_p &= \|p^ep_1^{e_1}\cdots p_k^{e_k} + 
p^fp_1^{f_1}\cdots p_k^{f_k}\|_p\\
&= \|p^d\left(p^{e-d}p_1^{e_1}\cdots p_k^{e_k} + 
p^{f-d}p_1^{f_1}\cdots p_k^{f_k}\right)\|_p\\
&= \|p^d\|_p\|p^{e-d}p_1^{e_1}\cdots p_k^{e_k} + 
p^{f-d}p_1^{f_1}\cdots p_k^{f_k}\|_p\\
&\stackrel{?}{\leq} \max\{\|a\|_p, \|b\|_p\} = 
\max\{1/p^e, 1/p^f\}.
\end{array}\]
To remove the question mark from the last
line, let's try to estimate the expressions 
on the second to last
line. First, $\|p^d\|_p = 1/p^d$
by definition. Since $d = \min\{e, f\}$
we have $1/p^d = \max\{1/p^e, 1/p^f\}$.
Therefore we will be done if we can show that 
$\|p^{e-d}p_1^{e_1}\cdots p_k^{e_k} + 
p^{f-d}p_1^{f_1}\cdots p_k^{f_k}\|_p\leq 1$.
What we have to work with is that
$e-d, f-d\geq 0$.

Since $e-d, f-d\geq 0$, the rational numbers 
$p^{e-d}p_1^{e_1}\cdots p_k^{e_k}$ and
$p^{f-d}p_1^{f_1}\cdots p_k^{f_k}$ can be expressed
as $r/s$ and $r'/s'$ with $p\not{\mid}s$ and 
$p\not{\mid}s'$.
Therefore, $p\not{\mid}ss'$, which implies that the
sum $r/s + r'/s' = (rs'+r's)/ss'$ has denominator
not divisible by $p$. 
In the prime factorization of 
$p^{e-d}p_1^{e_1}\cdots p_k^{e_k} + 
p^{f-d}p_1^{f_1}\cdots p_k^{f_k}$ the prime $p$
cannot occur with a negative exponent.
If the prime $p$ occurs in the factorization
with the exponent $g$, then since $g\geq 0$
we get 
\[\|p^{e-d}p_1^{e_1}\cdots p_k^{e_k} + 
p^{f-d}p_1^{f_1}\cdots p_k^{f_k}\|_p = 1/p^g \leq 1.\]
This completes the argument.

\smallskip

\noindent
{\it Solution.} (ii)(1).
Since $\|a\|_p\geq 0$ for all $a$, we must have
$\delta_p(a,b) = \|a-b\|_p\geq 0$.
When does equality hold? 
\[
%\begin{array}{rl}
\delta_p(a,b) = 0 
\Leftrightarrow \|a-b\|_p = 0
\Leftrightarrow a-b = 0
\Leftrightarrow a=b.
%\end{array}
\]

\smallskip

\noindent
{\it Solution.} (ii)(2).
Using part (i) we have 
$\delta_p(a,b) = \|a-b\|_p = \|(-1)(b-a)\|_p = 
\|-1\|_p\|b-a\|_p = \|-1\|_p\delta_p(b,a)$.
Checking the definition we see that $\|-1\|_p = 1$,
so we are done.


\smallskip

\noindent
{\it Solution.} (ii)(3).
Let $u = a-c$ and $v = c-b$.
By part (i) we have $\|u+v\|_p\leq \max\{\|u\|_p,\|v\|_p\}$,
so 
\[\begin{array}{rl}
\delta_p(a,b) &= \|a-b\|_p\\
&= \|(a-c)+(c-b)\|_p\\
&= \|u+v\|_p\\
&\leq \max\{\|u\|_p,\|v\|_p\}\\
&= \max\{\|a-c\|_p, \|c-b\|_p\}\\
&\stackrel{?}{\leq} \|a-c\|_p + \|c-b\|_p\\
&= \delta_p(a,c) + \delta_p(c,b).
\end{array}\]
The only nonobvious part of this
derivation is 
$\max\{\|a-c\|_p, \|c-b\|_p\}
\stackrel{?}{\leq} \|a-c\|_p + \|c-b\|_p$.
The reason this holds is that 
$\|a-c\|_p, \|c-b\|_p\geq 0$, and 
the sum of any two nonnegative numbers
exceeds either one. (The sum equals the maximum
of the two plus the {\em nonnegative} minimimum
of the two.)

\smallskip

\noindent
{\it Solution.} (iii). If $a$ and $b$ are integers
and $p^n\;\mid\;(a-b)$, then the prime
factorization of $a-b$ has the form 
$p^ep_1^{e_1}\cdots p_k^{e_k}$ with $e\geq n$.
Therefore $\delta_p(a,b) = \|a-b\|_p = 1/p^e\leq 1/p^n$,
as desired.

\medskip

{\bf Add. Prob. 1.} Show that if $p$ is prime, then 
$p$ divides
$\displaystyle 
\left(\begin{array}{c} p\\ k\end{array}\right)$
whenever $0 < k < p$.


\smallskip

\noindent
{\it Solution.}
Since $\displaystyle 
\left(\begin{array}{c} p\\ k\end{array}\right) = 
\frac{p!}{k!(p-k)!}$ we have 
\[\left(\begin{array}{c} p\\ k\end{array}\right) \cdot k! = 
\frac{p!}{(p-k)!} = (p-k+1)\cdots (p-1)p,\]
which is an integer. If $k > 0$, then the right hand product 
has $p$ as a factor. Therefore $\displaystyle p\;\mid\;
\left(\begin{array}{c} p\\ k\end{array}\right)\cdot k!$.
From the definition of ``prime'' we must have 
either $\displaystyle p\;\mid\;
\left(\begin{array}{c} p\\ k\end{array}\right)$
or $p\;\mid\;k!$. If $k < p$, then $p$ cannot
divide $k!$, so we must have 
$\displaystyle p\;\mid\;
\left(\begin{array}{c} p\\ k\end{array}\right)$.

\vfill
\pagebreak

{\bf Add. Prob. 2.} 
Show that if $n>1$ is not prime, then 
$n$ does not divide
$\displaystyle 
\left(\begin{array}{c} n\\ k\end{array}\right)$
for some $0 < k < n$.
(Hint: Choose $k$ to be a prime
divisor of $n$.)


\smallskip


\noindent
{\it Solution.}
Assume that the prime factorization of $n$ is 
$n = q_1^{e_1}\cdots q_r^{e_r}$.
% where the primes
%are ordered in increasing order: $q < q_1 < \cdots q_r$. 
Since $n$ is not prime we cannot have $n = q_1$,
so we must have $0 < q_1 < n$.
We will show that $n$ does not divide
$\displaystyle 
\left(\begin{array}{c} n\\ q_1\end{array}\right)$.

Assume instead that $\displaystyle 
n\;\mid\;\left(\begin{array}{c} n\\ q_1\end{array}\right)$.
Then there is an integer $K$ such that 
$K\cdot n = \left(\begin{array}{c} n\\ q_1\end{array}\right)$.
Therefore 
$\displaystyle K\cdot n\cdot q_1! = 
\left(\begin{array}{c} n\\ q_1\end{array}\right)\cdot q_1!
= 
\frac{n!}{(n-q_1)!} = (n-q_1+1)\cdots (n-1)n$.
Using the fact that $0 < q_1$ we can 
cancel $n$ from both sides of the equality 
$K\cdot n\cdot q_1! = (n-q_1+1)\cdots (n-1)n.$
This gives us 
\[K\cdot q_1! = (n-q_1+1)\cdots (n-1).\]
We derive a contradiction by showing 
that $q_1$ divides the left hand side
but not the right hand side of this equality.
It is clear that $q_1$ divides $K\cdot q_1!$,
since $q_1$ divides $q_1!$, so we only need to show
that $q_1$ does not divide $(n-q_1+1)\cdots (n-1)$.

Assume instead that the prime $q_1$ divides
$(n-q_1+1)\cdots (n-1)$. Then $q_1$ divides one
of the factors $(n-s)$, where $s$ is an 
integer in the range $1\leq s \leq q_1 - 1$.
But $q_1\;\mid\; n$, so if $q_1\;\mid\; (n-s)$,
then $q_1\;\mid\;[n - (n-s)] = s$.
This is impossible since $1\leq s \leq q_1 - 1$.
This contradiction shows that our assumption that
$\displaystyle 
n\;\mid\;\left(\begin{array}{c} n\\ q_1\end{array}\right)$
cannot be true.
\end{document}

