\documentclass{article} \usepackage[titletoc]{appendix} \usepackage[utf8]{inputenc} \usepackage{amssymb} \usepackage[margin= 1in]{geometry} \usepackage{amsmath} \usepackage{titlesec} \usepackage{chngcntr} \usepackage{hyperref} \usepackage{listings} \usepackage[all]{hypcap} \usepackage{graphicx} \usepackage{tikz-cd} \usepackage{polynom} \usepackage{enumitem} \usepackage{amsthm} \usepackage{mathtools} \usepackage{caption,subcaption} \usepackage[linesnumbered,ruled]{algorithm2e} \usepackage{rotating} \usepackage{epigraph} \usepackage{slashed} \graphicspath{ {images/} } \newcommand{\subscript}[2]{$#1 _ #2$} \newcounter{subsubsubsection}[subsubsection] \newtheorem{theorem}{Theorem}[section] \newtheorem{definition}{Definition}[section] \newtheorem{corollary}{Corollary}[section] \newtheorem{proposition}{Proposition}[section] \newtheorem{lemma}{Lemma}[section] \newtheorem{example}{Example}[section] \renewcommand\thepart{\arabic{part}} \numberwithin{section}{part} \newtheorem*{Def}{Definition} \DeclareMathOperator{\sech}{sech} \DeclareMathOperator{\cosec}{cosec} \DeclareMathOperator{\sym}{sym} \DeclareMathOperator{\dom}{Dom} \DeclareMathOperator{\cdm}{Cdm} \DeclareMathOperator{\id}{id} \DeclareMathOperator{\order}{order} \DeclareMathOperator{\lcm}{lcm} \DeclareMathOperator{\Lcm}{LCM} \DeclareMathOperator{\Gcd}{GCD} \DeclareMathOperator{\orb}{Orb} \DeclareMathOperator{\stab}{Stab} \DeclareMathOperator{\GL}{GL} \DeclareMathOperator{\Frac}{Frac} \DeclareMathOperator{\Char}{char} \DeclareMathOperator{\Int}{Int} \DeclareMathOperator{\rad}{Rad} \DeclareMathOperator{\Left}{Left} \DeclareMathOperator{\Right}{Right} \DeclareMathOperator{\re}{Re} \DeclareMathOperator{\im}{Im} \DeclareMathOperator{\image}{Image} \DeclareMathOperator{\preimage}{PreImage} \DeclareMathOperator{\sgn}{sgn} \DeclareMathOperator{\Kern}{Ker} \definecolor{mygreen}{RGB}{28,172,0} % color values Red, Green, Blue \definecolor{mylilas}{RGB}{170,55,241} \newcommand{\quotes}[1]{``#1''} \newcommand{\divides}{\mid} \newcommand{\notdivides}{\nmid} \newcommand{\mapping}{\mathlarger{\mathlarger{\rightarrow}}} \newcommand{\inject}{\mathlarger{\mathlarger{\hookrightarrow}}} \newcommand{\onto}{\mathlarger{\mathlarger{\twoheadrightarrow}}} \newcommand{\Biject}{% \inject\mathrel{\mspace{-27.5mu}}\mathlarger{\mathlarger{\rightarrow}} } \newcommand{\Mod}[1]{\ (\mathrm{mod}\ #1)} \renewcommand{\vec}[1]{\mathbf{#1}} \setcounter{secnumdepth}{5} \setcounter{tocdepth}{5} \title{On deriving most of mathematics from first principles} \author{J.A.Pyne} \date{} \begin{document} \maketitle{} \begin{abstract} In this volume, we aim to build a strong mathematical foundation that will be used in the \end{abstract} \tableofcontents \newpage\pagenumbering{arabic} \newpage \part{Foundations}\label{part1} \section{Mathematical logic (To add to as needed)}\label{SectionOne} \epigraph{There are no facts, only interpretations.}{\textit{Friedrich Nietzsche}} In this section, we will introduce mathematical logic. This will give us the tools and basic building blocks to be able to talk about mathematics formally. What do we mean by `in a formal way'? Modern mathematics is built on a bedrock of logic, that is to say, given some statements which we will take to be true or have already been proven true, what can we logically deduce must also be true, and what is also false. As an example, we are familiar with the idea of positive whole numbers, also called positive integers; we are also familiar with the idea of a positive whole number being prime when the only other positive whole numbers that divide it are $1$ and itself, for example, $2$ is prime. From the facts that the positive whole numbers exist and there is at least one prime, we can logically deduce there must be infinitely many primes. We will see the proof of this later. In this document we won't be needing the full tools of mathematical logic, doing so will take us too far afield, instead, we will only cover the key fundamentals we will need as well as define some terms which will be used throughout. \subsection{Defining a definition} What is a definition? What does it mean to define something? Definitions are at the heart of mathematics, without them we wouldn't be able to do anything at all. A definition is a declaration that gives a formal name to an object, class of objects, ideas, etc. For example, we can define prime numbers, such a definition might look something like this. \begin{Def}{Definition of a prime number} Consider a positive whole number, we say that this positive whole number is a prime number if the only other positive whole numbers that divide it are itself and the number $1$. \end{Def} With this definition whenever we refer to the idea of a prime number, we know that this prime number must satisfy that it only has two distinct numbers that divide it, itself and $1$. As we will say throughout this document, we can use a definition when making logical arguments. Definitions are the backbone of defining the setup to logical arguments, if we don't know about the objects we are arguing about then we can't make any logical deductions, or deduce the truth of mathematical statements. Now that we know what a definition is, we can start using it to lay the foundation for the rest of the document. For formality, we will make, somewhat paradoxically, a formal definition of a definition \begin{definition}{Definition} A definition is a statement which gives a formal name to a concept. \end{definition} \subsection{What is truth?} What is truth? In particular, what is mathematical truth? Loosely speaking truth and mathematical truth is based on the idea of does the premise entail this conclusion. That is to say, if we assume that a few statements are true, then the conclusion we are trying to reach is also true. This is rather vague at the moment because we haven't defined what we mean by true. \subsubsection{Logical statements and logical connectives} We will need a few definitions. \begin{definition}{Declarative logical statement} We define a Declarative logical statement to be either true or false. Here we are using the intuitive definition of true and false. \end{definition} We need to make the definition of declarative logical statements to define what we mean by true and false, again somewhat paradoxically we need a definition of true and false to define what we mean when a declarative logical statement is true. We shall ignore the paradoxical nature of these definitions. \begin{definition}{Assignment of truth} Let $P$ be a declarative logical statement, an assignment of truth is an interpretation of the statement $P$ that sees $P$ as either true or false. We write this as $\delta\left(P\right)$. If this assignment of truth $\delta$ sees $P$ as true we write $\delta\left(P\right)=1$ and we say that $\delta$ interprets $P$ as true. If this assignment of truth sees $P$ as false we write $\delta\left(P\right)=0$ and we say that $\delta$ interprets $P$ as false. \end{definition} These two definitions will allow us to build the foundations that we will need. It is first important to note that an assignment of truth is not an absolute assignment of the truth of a declarative logical statement. Different assignments of truth, and thus different interpretations, can give rise to different values of $P$ being true or false. Now, we have a building blocks to build more complex logical statements. A first natural question is when does one the truth of one logical statement imply the truth or falseness of another? Thinking about how this should work gives us a sense that something true should never imply that something false is true, whereas something false can imply anything at all. Using this we define the logical implication operator. \begin{definition}{Logical implication} Let $P$ and $Q$ be logical statements. We define the logical implication of the statements $P$ and $Q$, written as $P\Rightarrow Q$, to have the following logical values \begin{table}[ht] \centering \begin{tabular}{|c|c|c|} \hline $P$ & $Q$ & $P\Rightarrow Q$ \\ \hline 1 & 1 & 1 \\ \hline 1 & 0 & 0 \\ \hline 0 & 1 & 1 \\ \hline 0 & 0 & 1 \\ \hline \end{tabular} \caption{The truth table for the logical implication operator.} \end{table} We read this as $P$ implies $Q$, or if $P$ then $Q$. \end{definition} \begin{example} Let $P = $ ``The sky is overcast'' and let $Q = $ ``The sun is not visible''. We have by the truth table of logical implication that $P\Rightarrow Q$ is true when \begin{enumerate} \item $P$ is true and $Q$ is true \item $P$ is false and $Q$ is true \item Both $P$ and $Q$ are false. \end{enumerate} In words we have $P\Rightarrow Q$ is true in these circumstances \begin{enumerate} \item If it is true the sky is overcast then the sun is not visible. That is, if the sky is overcast then the sun is not visible \item If it is false that the sky is overcast then the sun is not visible. That is, if the sky is not overcast then the sun is not visible. \item If it is false that the sky is overcast then the sun is visible. That is, if the sky is not overcast then the sun is visible. \end{enumerate} In particular case two could be true say when it is nighttime, if it is nighttime the sun is clearly not visible\footnote{We are clearly not talking about sunsets}. Lets look at these statements the other way, $Q\Rightarrow P$. We have that is is true when \begin{enumerate} \item $Q$ is true and $P$ is true \item $Q$ is false and $P$ is true \item Both $Q$ and $P$ are false. \end{enumerate} In words that is we have $Q\Rightarrow P$ is true in these circumstances \begin{enumerate} \item If the sun is not visible then the sky is overcast \item If the sun is visible then the sky is overcast \item If the sun is visible then the sky not is overcast \end{enumerate} \end{example} There is one definition that arises from logical implication that is occasionally useful in proving other statements. \begin{definition}{Vacuous truth} Let $P$ and $Q$ be statements such that we have $P\Rightarrow Q$. Suppose that $P$ is false, then by the definition of logical implication we have that $P\Rightarrow Q$ is true. We say that $P\Rightarrow Q$ is vacuously true. \end{definition} \begin{example} The statement ``All my children are goats'' is vacuously true for someone who doesn't have any children. \end{example} It is often the case we have theorems in mathematics which are of the form $P$ implies $Q$ and $Q$ implies $P$, that is two separate logical sentences can imply each other. This is the logical bi-conditional. \begin{definition}{Logical Bi-conditional} Let $P$ and $Q$ be logical statements. We define the logical Bi-conditional of the statements $P$ and $Q$, written $P\Leftrightarrow Q$, to have the following logical values \begin{table}[ht] \centering \begin{tabular}{|c|c|c|} \hline $P$ & $Q$ & $P\Leftrightarrow Q$ \\ \hline 1 & 1 & 1 \\ \hline 1 & 0 & 0 \\ \hline 0 & 1 & 0 \\ \hline 0 & 0 & 1 \\ \hline \end{tabular} \caption{The truth table for the logical Bi-conditional operator.} \end{table} We read this as $P$ if and only $Q$, meaning $P$ implies $Q$ and $Q$ implies $P$. \end{definition} \begin{example} Let $P = $ ``A number is even'' and let $Q = $ ``It is divisible by 2''. By the truth table of the logical bi-conditional that $P\Leftrightarrow Q$ is true when \begin{enumerate} \item Both $P$ and $Q$ are true. \item Both $P$ and $Q$ are false. \end{enumerate} That is in words we have $P\Leftrightarrow Q$ when \begin{enumerate} \item A number is even if and only if it is divisible by 2 \item A number is not even if and only if it is not divisible by 2 \end{enumerate} \end{example} Now that we have the logical implication and logical bi-conditional, we can start defining more complex logical connectives. These are the logical conjunction, logical disjunction and logical negation \clearpage \begin{definition}{Logical conjunction} Suppose we have two logical statements $P$ and $Q$. We define logical conjunction, written as $P\wedge Q$, to be true if and only if $P$ and $Q$ are both true, that is to say the logical conjunction connective has the following truth table \begin{table}[ht] \centering \begin{tabular}{|c|c|c|} \hline $P$ & $Q$ & $P\wedge Q$ \\ \hline 1 & 1 & 1 \\ \hline 1 & 0 & 0 \\ \hline 0 & 1 & 0 \\ \hline 0 & 0 & 0 \\ \hline \end{tabular} \caption{The truth table for the logical conjunction operator.} \end{table} Informally, we call this logical AND rather than logical conjunction. \end{definition} \begin{example} Let $P = $``$x > 2$'' and $Q = $``$x < 10$'' and suppose that $P$ and $Q$ are true, then $P\wedge Q$ is true and represents the expression $2m \end{equation*} that is $n$ is greater than $m$, where the domain of discourse $D=\mathbb{N}$ is again the positive whole numbers $1,2,3,\dots$. Suppose that $n=2$ and $m=3$, then $P\left(n,m\right)$ is false, if $n=45$ and $m=7$ then $P\left(n,m\right)$ is true. \end{example} We see that logical propositions allow us to construct more complex logical statements and are the building blocks for the more complex Mathematical statements that we will be using. \subsection{Proof} Logic and truth are two of the corner stones of Mathematics, the third is proof. Without proof we are unable to verify the truth of any mathematical statements. So what exactly is a proof? \begin{definition}{Mathematical proof} Suppose we have some logical statements which are known or assumed to be true, and suppose we wish to see if some conclusion if true given this assumption. We define a Mathematical proof is where we start from these assumptions and at each step logically deduce additionally true statements until we have proven the conclusion. In other words a Mathematical proof can be broken down into a simple question. Do the assumptions entail this conclusion? \end{definition} This isn't a truly rigours definition of a mathematical proof, and one can define this rigorously in a course on mathematical logic. To do so here would be too much of a diversion, instead we will just keep in our minds that a proof is a series of logical deductions from assumptions to a conclusion. When we have reached the conclusion we use a special symbol. We use the symbol $\qed$ at the end of a proof to show that we are done. There are many different types of proof that we will invoke throughout the rest of this document. \subsubsection{Direct Proof} The first type of proof we define is direct proof. We define a direct proof as follows. \begin{definition}{Direct Proof} In a direct proof, the conclusion is logically established by using axioms, definitions and previously proven theorems. \end{definition} We will give an example of direct proof. \begin{example} In this example we will breakdown each step of a direct proof. Here we will give the definitions we will be using and any assumptions which we will be using in the prove(i,e previously proven theorem): \begin{enumerate} \item We say a number is an integer if it is a whole number, such as $-4,-3,54,8,0,2,7$ and so on. \item We will also assume that adding and multiplying integers works as we would have taught in school, for example $5+7=12$, $2*14=28$ etc. \item We say that an integer is an even integer if it can be written as $x=2*m$ where $m$ is any integer. \end{enumerate} We now move to the proof. Suppose we have two such even integers, say $x$ and $y$. We will use direct proof to show that $x+y$ must also be even. Proof: Suppose we have two even integers $x$ and $y$. By the definition of an even integer we have that $x=2*n$ and $y=2*m$ for some integers $n$ and $m$. Now consider $xx+y$, we have \begin{equation*} x+y=2*n+2*m=2*\left(n+m\right) \end{equation*} Now, $n+m$ is adding two integers together and is an integer. say $k=n+m$, hence we have that $x+y=2*k$, but by definition of an even we have that $x+y$ is even. This concludes the proof. $\qed$ \end{example} \subsubsection{Proof by contradiction} The second type of proof we define is proof by contradiction. This is a very powerful tool. \begin{definition}{Proof by contradiction} Suppose we have a logical statement $P$ that we wish to find the truth of. If we suppose that $\neg P$ is true and then assuming $\neg P$ we can derive another logical statement $Q$ which is known to be false, or we can derive both $Q$ and $\neg Q$. Then we must have that $\neg P$ is false and $P$ is true. \end{definition} In other words, proof by contradiction states that if, when making an assumption, we can derive a false statement, then the assumption itself must have been invalid. We can justify proof by contradiction using the following truth table. \begin{table}[ht] \centering \begin{tabular}{|c|c|c|c|} \hline $P$ & $\neg P$ & $\neg\neg P$ & $\neg\neg P\Rightarrow P$\\ \hline 1 & 0 & 1 & 1 \\ \hline 0 & 1 & 0 & 1 \\ \hline \end{tabular} \caption{The truth table for proof by contradiction.} \end{table} \begin{example} Like with the example using direct proof. We will break down each step of proof by contradiction. Here we will give the definitions we will be using and any assumptions which we will be using in the prove(i,e previously proven theorem): \begin{enumerate} \item We say a number is a rational number if it is the ration of two integers $a$ and $b$ where $b\neq 0$. Examples of rational numbers are $\displaystyle \frac{1}{2},\frac{2}{3},-\frac{15}{8}$ and so on. We say a number is irrational if it is not rational. \item We say that a rational number $\displaystyle \frac{a}{b}$ is in simplest form if the only number that divides both $a$ and $b$ is $1$. \item Any rational number has a simplest form. \item We will also assume that adding and multiplying rational numbers works as we would have taught in school, that is we have for two rational numbers $\displaystyle \frac{a}{b}$ and $\displaystyle \frac{c}{d}$ that \begin{equation*} \frac{a}{b}+\frac{c}{d}= \frac{a*d+b*c}{b*d},\ \frac{a}{b}*\frac{c}{d}=\frac{a*c}{b*d} \end{equation*} \item We say $\sqrt{2}$ is the number which satisfies $\sqrt{2}*\sqrt{2}=2$ \item We assume the definition of an even integer from the previous example \item If $a*a=a^2$ is an even integer, then so is $a$ \end{enumerate} We now move to the proof. We have that $\sqrt{2}$ is an irrational number. This is to say that $\sqrt{2}$ is not the ratio of two whole numbers $a$ and $b$ where $\displaystyle \frac{a}{b}$ is in simplest form. Proof: Aiming for a proof by contradiction, suppose that $\sqrt{2}$ is a rational number that is in simplest form. This is to say we have that $\displaystyle \sqrt{2}=\frac{a}{b}$ for some integers $a,b$. We have by assumption that $\sqrt{2}$ is the number such that $\sqrt{2}*\sqrt{2}=2$. Hence we have that \begin{equation*} \sqrt{2}*\sqrt{2}=\frac{a}{b}*\frac{a}{b}=\frac{a^2}{b^2}=2 \end{equation*} Where $a^2=a*a$ and $b^2 = b*b$. We can multiply the above expression by $b^2$ on both sides to get \begin{equation*} a^2=2*b^2 \end{equation*} By definition of an even integer we have that $a^2$ is even and so $a$ must be even, that is $a=2*k$ for some integer $k$. Hence we have that \begin{equation*} a^2=\left(2*k\right)^2=4*k^2=2*b^2 \end{equation*} That is $4*k^2=2*b^2$ which implies that $b^2=2*k^2$, that is $b^2$ is even and so $b$ must be even. This is a contradiction, as we have that $a$ is even and $b$ is even and so there share a divisor of $2$, contradicting the fact we assumed that $\displaystyle\sqrt{2}=\frac{a}{b}$ was in simplest form. Therefore, $\sqrt{2}$ must be irrational. $\qed$ \end{example} \subsubsection{Proof by contra-position} Another type of proof that we define is proof by contra-position, sometimes called proof by contra-positive. \begin{definition}{Proof by contra-position} Suppose we have a logical statement $P$ and we wish to show that $P$ implies some other statement $Q$. We are able to show that $P\Rightarrow Q$ if we can show that $\neg Q\Rightarrow \neg P$. \end{definition} Proof by contra-position states that proving a statement of the form $P\Rightarrow Q$ is the same as showing that $\neg Q\Rightarrow\neg P$. It is easier to see this from the truth table. \begin{table}[ht] \centering \begin{tabular}{|c|c|c|c|c|c|} \hline $P$ & $Q$ & $\neg P$ & $\neg Q$ & $P\Rightarrow Q$ & $\neg Q\Rightarrow\neg P$\\ \hline 1 & 0 & 0 & 1 & 0 & 0 \\ \hline 1 & 1 & 0 & 0 & 1 & 1 \\ \hline 0 & 0 & 1 & 1 & 0 & 1 \\ \hline 0 & 1 & 1 & 0 & 1 & 1 \\ \hline \end{tabular} \caption{The truth table for proof by contra-positive.} \end{table} Maybe, to make it even clearer, we can use a worded example. Let $P$ denote the statement ``It is raining'' and $Q$ denote the statement ``I wear my coat''. We have that $P\Rightarrow Q$\footnote{If we are being logical and don't want to get soaked before we get to our destination.}. The contra-positive would be $\neg Q\Rightarrow\neg P$. In words this would be ``If I don't wear my coat'' then ``It is not raining''. \begin{example} A more mathematical example can be seen now. We will let $x$ be an integer and we will show that if $x^2$ is even then $x$ is even. We will use proof by contra-position. So We will show that if $x$ is not even then $x^2$ is not even. \begin{enumerate} \item So, $x$ not being even means $x$ is odd. This means that $x=2n+1$ for some integer $n$. \item Now, we have $x^2=\left(2n+1\right)^2=4n^2+4n+1=2\left(2n^2+2n\right)+1$. \item Hence, we have shown that $x^2$ is of the form $2k+1$ for some integer $k$. \item Therefore $x^2$ is odd. \end{enumerate} Concluding the proof by contra-positive. \end{example} \pagebreak \section{Sets and mappings}\label{intro} \epigraph{No one shall expel us from the paradise that Cantor has created for us.}{\textit{David Hilbert}} \subsection{Sets} \subsubsection{Introduction and basic definitions} We start with the most elementary definition, a Set or less formally, a collection of `objects'. This notion of an object is not very rigorous, what do we mean by an object? Do these objects really exist?\footnote{By exist we mean in the abstract sense.} In what way can one collection of objects differ from another? These questions are at the foundation of Mathematics and to justify the notions and hence tools we need would require a significant detour into the realm of Mathematical logic. The interested reader would find so-called Zermelo–Fraenkel set theory to be of interest in formalising the notion of a set, we will give a brief overview at the end of the section. To avoid the trip into Mathematical logic, we will instead define sets with a more `hands on' approach \begin{definition}{Naive definition of a Set} A set is a collection of objects. We list the elements surrounded by curly brackets $\{$ $\}$. \end{definition} This definition will make sense after we see some examples \begin{example} Let $S=\left\{1,2,3,Dogs,Cats,Apples,Pears\right\}$. Then $S$ is a set. \end{example} \begin{example} Let $S=\left\{"Foo", \left\{1,2,3,Dogs,Cats,Apples,Pears\right\}, Apples, Pears\right\}$. Then $S$ is a set. We note that the set from the previous example is now in this set. \end{example} It would be useful to talk about a particular object in some set $S$. For example we can say that $1$ is in the set from example 2.1. above. We formalise this idea \begin{definition}{Element of a set} An object in a set is called an element of the set. \end{definition} \begin{definition}{Set membership} Let $S$ be a set and let $x$ be an element of the set $S$. We say that $x$ is a member of the set $S$ and write $x\in S$. If $y$ is some object which is not in the set $S$ we write that $y\not\in S$. \end{definition} \begin{example} Let $S=\left\{1,2,3,Dogs,Cats,Apples,Pears\right\}$. We have that $1\in S$ and $Dogs\in S$ but we have that $Blue\not\in S$. \end{example} The above example shows a few interesting points. Dogs in English is used when we wish to talk about multiple dogs at once, so it would be absurd to deny that $Dogs$ could itself be a set, for example $Dogs=\left\{Lassie, Scooby-Doo, Snoopy, Blue\right\}$. So we have that \begin{equation*} S=\left\{1,2,3,\left\{Lassie, Scooby-Doo, Snoopy, Blue\right\},Cats,Apples,Pears\right\} \end{equation*} Does this now mean that $Blue\in S$?. The answer is no, $Blue$ is not any one of the objects in $S$, however there is an object in $S$ that does contain $Blue$, namely $Dogs$. This shows that $\in$ only looks at most one layer deep of $\left\{\dots\right\}$. One might wonder if it can ever be the case that a set contains itself, that is a set like $S=\left\{S\right\}$? Again the answer is no, to see why we need to define a new way of making sets, where the elements of the set are conditioned on some statement being true. \begin{example} Suppose we want the set of all even integers then we have \begin{equation*} S=\left\{x : x\text{ is an even integer}\right\} \end{equation*} The $:$ symbol stands for such that, so $S$ reads the elements $x$ such that $x$ is an even integer. \end{example} Returning to the question of can a set contain itself. Consider the set \begin{equation*} S=\left\{R: R\text{ is a set and }R\not\in R\right\} \end{equation*} That is $S$ is the set of all sets $R$ such that $R$ is a set and $R$ does not contain itself. Now suppose that $S\in S$. By definition of $S$ we must conclude that $S\not\in S$. Conversely if $S\not\in S$ then by definition of $S$ we have that $S\in S$. This is an issue, and shows the flavour of the issues of allowing a set to contain itself, so we shall revise our definition to not allow for a set to contain itself. \begin{definition}{Set} A set is a collection of objects such that none of the objects in the collection is the set itself. \end{definition} \subsubsection{Subsets and universal quantifiers} Given a set, we can talk about a smaller collection of the elements of the set, which we call a subset. \begin{definition}{Subset} Let $S$ be a set. If $K$ is also a set such that for every $x\in K$ we also have that $x\in S$ then we say that $K$ is a subset of $X$, and write $K\subseteq S$. We say that $K$ is a proper subset of $S$ if we have that $S\subseteq T$ and $S\neq T$, we denote a proper subset by $\subset$, hence $\subseteq$ allows for the possibility that $K=S$. We call $\subseteq$ and $\subset$ the set inclusion operators. \end{definition} Conversely can also define the notion of a super-set, this isn't too useful for what we are doing but it does sometimes appear in other text so it worth mentioning it now. \begin{definition}{Super-set} Let $S\subseteq T$. We say that $T$ is a super-set of the set $S$ and we write this as $T\supseteq S$. \end{definition} \begin{example} Let $S=\left\{1,2,3,4,5,6\right\}$ then some subsets of $S$ are $\left\{1,2\right\}$, $\left\{4\right\}$ and $\left\{1,2,6\right\}$ \end{example} With the idea of a subset we have our first proposition \begin{proposition}{Two sets are equal if and only if they are subsets of each other}\label{prop:TwosetsEqualIfContainedInEachOther} Let $X$ and $Y$ be sets. We have that $X=Y$ if and only if $X\subseteq Y$ and $Y\subseteq X$. Proof: This is an if and only if proposition so we have to prove that given $X=Y$ then $X\subseteq Y$ and $Y\subseteq X$ and then we need to show that given $X\subseteq Y$ and $Y\subseteq X$, that $X=Y$. $\left(\Rightarrow\right)$: Suppose that $X=Y$ then we have that $X$ and $Y$ have the same elements, in particular we have that every $x\in X$ is also in $Y$ so that $X\subseteq Y$. Likewise $Y\subseteq X$. $\left(\Leftarrow\right)$: Suppose that $X\subseteq Y$ and $Y\subseteq X$. $X\subseteq Y$ means that for every $x\in X$ we have that $x\in Y$. Likewise $Y\subseteq X$ means that for every $x\in Y$ we have that $x\in X$. Hence we must have that the elements of $X$ and $Y$ are the same, that is $X=Y$. $\qed$ \end{proposition} There is also another property of subsets that is useful. \begin{proposition}{Set inclusion transitivity property}\label{prop:SetInclusionTransitivityProp} Let $R,S$ and $T$ be sets such that $R\subseteq S$ and $S\subseteq T$. We have that $R\subseteq T$ Proof: Let $R,S$ and $T$ be sets such that $R\subseteq S$ and $S\subseteq T$. Suppose that $x\in R$. By assumption we have that $R\subseteq S$ and so $x\in S$. Likewise by assumption we have that $S\subseteq T$ and so $x\in T$. Hence $R\subseteq T$. The result follows. $\qed$ \end{proposition} A similar result holds if we replace subsets with proper subsets. \begin{proposition}{Proper set inclusion transitivity property}\label{prop:ProperSetInclusionTransitivityProp} Let $R,S$ and $T$ be sets such that $R\subset S$ and $S\subset T$. We have that $R\subset T$ Proof: Let $R,S$ and $T$ be sets such that $R\subset S$ and $S\subset T$. Suppose that $x\in R$. By assumption we have that $R\subset S$ and so $x\in S$. Likewise by assumption we have that $S\subset T$ and so $x\in T$. Hence $R\subset T$. We must show that it is not possible for $R=T$. As $R\subset S$ then by definition we have that $R\neq S$, likewise as $S\subset T$ then $S\neq T$. As $R\neq S\neq T$ we conclude that $R\neq T$ and so $R\subset T$. The result follows. $\qed$ \end{proposition} We can also make the following observation. \begin{proposition}{Proper set inclusion and subset inclusion is not transitive}\label{prop:ProperSetSubSetInclusionNotTransitivity} Let $R,S$ and $T$ be sets such that $R\subseteq S$ and $S\subset T$. We have that $R\subset T$ Proof: Let $R,S$ and $T$ be sets such that $R\subseteq S$ and $S\subset T$. If $R\neq S$ then $R\subset S$ and so proposition \ref{prop:ProperSetInclusionTransitivityProp} applies. So suppose that $R=S$ then $R\subseteq S$ and so $\forall x\in R$ we have that $x\in S$. Now as $S\subset T$ we have that $S\neq T\implies R\neq T$ as $R=S$. The result follows. $\qed$ \end{proposition} We will define what we truly mean by transitivity in the next chapter, right now it is more important to know that sets satisfy this property than why this property is named the way it is. As set inclusion is transitive, so is set equality. \begin{proposition}{Set equality transitivity property} Let $R,S$ and $T$ be sets such that $R=S$ and $S=T$. We have that $R=T$. Proof: Let $R,S$ and $T$ be sets such that $R=S$ and $S=T$. We have that $R=T$. By equality of sets we have that $R\subseteq S$ and $S\subseteq R$, likewise we also have that $S\subseteq T$ and $T\subseteq S$. Now as $R\subseteq S$ and $S\subseteq T$ then we must have by transitivity of set inclusion that $R\subseteq T$. Moreover as $T\subseteq S$ and $S\subseteq R$ we again have by transitivity that $T\subseteq R$. The result follows by equality of sets. $\qed$ \end{proposition} \begin{definition}{The empty-set} The empty-set is the set that contains no elements. It is denoted by $\emptyset$. \end{definition} To make our lives a little easier we will introduce some notation \begin{definition}{Universal and existential quantifiers} Let $S$ be any set. The universal quantifier $\forall$, meaning for all, allows us to talk about every element $S$. We can condition the universal quantifier with a such that ,$:$, in order to pick all the elements that satisfy a given condition. The existential quantifier $\exists$ tells us of the existence of an element in $S$. Just saying an element in a set exists is not particularly usual and so we normally combine $\exists$ with a condition. \end{definition} Some examples will help us here. \begin{example} Consider the set $\left\{1,2,3,4,5,\dots\right\}=\mathbb{N}$, we call $\mathbb{N}$ the natural numbers. Moreover, consider $S=\left\{1,2,3,4,5,6\right\}$ \begin{enumerate} \item We have that $\forall x\in S$ that $x\in\mathbb{N}$, that is every element of $S$ is also an element of $\mathbb{N}$. \item We can apply the universal quantifier multiple times in a statement, for example \begin{equation*} \forall a\in\mathbb{N},\forall b\in\mathbb{N},\exists c\in\mathbb{N}:a+b=c \end{equation*} \item Let $a,b\in\mathbb{N}$ that is let $a\in\mathbb{N}$ and let $b\in\mathbb{N}$. Then we can construct the following set. We say that $a$ is divisible by $b$ if $\exists c\in\mathbb{N}$ such that $a=bc$, we write this as $b\divides a$. The set of all such $c$ can be expressed by \begin{equation*} C=\left\{c\in\mathbb{N}:a=bc\right\} \end{equation*} \end{enumerate} \end{example} The empty set has the interesting property that it is a subset of any set. \begin{proposition}{The empty-set is contained in every set}\label{prop:EmptySetincontainedineveryset} Let $S$ be any set. Then $\emptyset\subseteq S$ Proof: We have that $\emptyset\subseteq S$ means that every element of $\emptyset$ is also contained in $S$. The definition of the empty set means that there are no elements in $\emptyset$. We can phrase this to the following statement \begin{equation*} \forall x: x\in\emptyset\Rightarrow x\in S \end{equation*} But $x\in\emptyset$ is not true for any $x$ so \begin{equation*} \forall x: x\in\emptyset\Rightarrow x\in S \end{equation*} is vacuously true. It hence follows the empty-set is contained in any set. $\qed$ \end{proposition} \begin{proposition}{The empty-set is unique}\label{prop:EmptySetUnique} The empty-set is unique, that is there is only one distinct set which is the empty-set. Proof: Suppose that $\emptyset$ and $\emptyset'$ are two empty sets. By proposition \ref{prop:EmptySetincontainedineveryset} we have that $\emptyset\subseteq\emptyset'$, likewise $\emptyset'\subseteq\emptyset$. So by proposition \ref{prop:TwosetsEqualIfContainedInEachOther} we have that $\emptyset=\emptyset'$. Hence the empty-set is unique. $\qed$ \end{proposition} It would be nice to have more ways to construct sets. Two key ways to do this are with the union operation and intersection operation. \begin{definition}{Union and intersection of sets} Let $S$ and $T$ be any two sets. We define the union of $S$ and $T$, denoted by $S\cup T$, is the set \begin{equation*} S\cup T=\left\{x: x\in S\text{ or } x\in T\right\} \end{equation*} The intersection of $S$ and $T$, denoted by $S\cap T$, is the set \begin{equation*} S\cap T = \left\{x : x\in S\text{ and } x\in T\right\} \end{equation*} If we have a finite number of sets, given by $A_1$, $A_2$, $\dots$, $A_n$ then the union of all of these sets is denoted by \begin{align*} \bigcup_{i=1}^n A_i \end{align*} and the intersection is denoted by \begin{align*} \bigcap_{i=1}^n A_i \end{align*} Sometimes it is useful to define a union or intersection of multiple sets given some condition or multiple conditions, usually when the conditions involve other previously defined sets, this is denoted as \begin{equation*} \bigcup_{\substack{\text{Condition 1 for} A \\ \text{Condition 2 for} A\\ \\ \dots}} A \end{equation*} for the union and for the intersection \begin{equation*} \bigcap_{\substack{\text{Condition 1 for} A \\ \text{Condition 2 for} A\\ \text{}\dots}} A \end{equation*} \end{definition} \begin{example} Let $S=\left\{1,2,3,4,5,6\right\}$ and let $T=\left\{2,4,5,6,7,8\right\}$, we have that \begin{align*} S\cup T &=\left\{1,2,3,4,5,6\right\}\cup \left\{2,4,5,6,7,8\right\}=\left\{1,2,3,4,5,6,2,4,5,6,7,8\right\}=\left\{1,2,3,4,5,6,7,8\right\}\\ S\cap T &=\left\{1,2,3,4,5,6\right\}\cap \left\{2,4,5,6,7,8\right\}=\left\{1,2,3,4,5,6,2,4,5,6,7,8\right\}=\left\{2,4,5,6\right\}\\ \end{align*} We note that in the union we have multiple elements, for example we have two $2$'s. Repeated elements in a set are considered to be the same element so we don't write them, i.e $\left\{2,2\right\}=\left\{2\right\}$ \end{example} \begin{example} Let $A_1=\left\{1,2,3\right\}$, $A_2=\left\{1,2,7,9\right\}$ and $A_3=\left\{1,4,8,12\right\}$. We have that the union of these sets is given by \begin{align*} \bigcup_{i=1}^n A_i&=A_1\cup A_2\cup A_3\\ &=\left\{1,2,3\right\}\cup \left\{1,2,7,9\right\}\cup \left\{1,4,8,12\right\}\\ &=\left\{1,2,3,4,7,8,9,12\right\} \end{align*} The intersection of these sets is given by \begin{align*} \bigcap_{i=1}^n A_i&=A_1\cap A_2\cap A_3\\ &=\left\{1,2,3\right\}\cap \left\{1,2,7,9\right\}\cap \left\{1,4,8,12\right\}\\ &=\left\{1\right\} \end{align*} \end{example} We make one useful definition about intersections \begin{definition}{Disjoint sets} Let $X$ and $Y$ be sets. If we have that $X\cap Y =\emptyset$ then we say that $X$ and $Y$ are disjoint sets. \end{definition} \subsubsection{Operations on sets} \paragraph{The union, the intersection and set inclusion } Before we continue we introduce three new ideas that will play a role throughout the rest of this paper. \begin{definition}{Operation} An operation $\circ$ acts on some inputs to produce an output or some outputs. \end{definition} \begin{example} The union $\cup$ and intersection $\cap$ are examples of operations. These operators operate on two sets to produce a third. \end{example} \begin{definition}{Commutative operation} Let $\circ$ be an operation that accepts two inputs, i.e we have $A\circ B$ for valid inputs $A$ and $B$. We say that $\circ$ is commutative if and only if $A\circ B = B\circ A$ \end{definition} \begin{example} Consider $\mathbb{N}=\left\{1,2,3,4,5,\dots\right\}$. We are familiar with the idea of addition of positive numbers, say $1+2=3$. It is clear that the addition operation is commutative for $\mathbb{N}$, e.g. $1+2=3=2+1$ \end{example} \begin{definition}{Associative operation} Let $\circ$ be an operation that accepts two inputs, i.e we have $A\circ B$ for valid inputs $A$ and $B$. We say that $\circ$ is associative if and only if $\left(A\circ B\right)\circ C = A\circ\left(B\circ C\right)$ where the operation in the brackets should be computed first. \end{definition} \begin{example} Again consider $\mathbb{N}=\left\{1,2,3,4,5,\dots\right\}$. The addition operator for $\mathbb{N}$ is associative, e.g. $\left(1+2\right)+3=3+3=6=1+5=1+\left(2+3\right)$ \end{example} We note that we have not defined a rigorous notion of addition, to do so will require us to consider mappings which we do later. We have the following proposition about the properties of intersections, unions and set inclusions. \begin{proposition}{Properties of intersection, union and set inclusion}\label{prop:PropertiesOfUnionIntersectionSetinclusion} Let $A,B,C$ be sets. Then we have that the following properties are true \begin{enumerate} \item $A\cap B = B\cap A$ \item $A\cup B = B\cup A$ \item $A\cap B\subseteq A$ \item $A\subseteq A\cup B$ \item $A\subseteq B \Rightarrow A\cap B = A$ \item $A\subseteq B\Rightarrow A\cup B =B$ \item $A\subseteq B \Rightarrow A\cap C \subseteq B\cap C$ \item $A\subseteq B \Rightarrow A\cup C \subseteq B\cup C$ \item $A\cap A = A$ \item $A\cup A =A$ \item $A\cap\left(B\cap C\right)=\left(A\cap B\right)\cap C$ \item $A\cup\left(B\cup C\right)=\left(A\cup B\right)\cup C$ \item $A\cap\left(B\cup C\right)=\left(A\cap B\right)\cup\left(A\cap C\right)$ \item $A\cup\left(B\cap C\right)= \left(A\cup B\right) \cap \left(A\cup C\right)$ \end{enumerate} Proof: \begin{enumerate} \item $A\cap B = B\cap A$: Let $x\in A\cap B$ then $x\in A$ and $x\in B$ by the definition of the intersection. It is hence clear that $x\in B\cap A$. So we have $A\cap B\subseteq B\cap A$. Likewise if $x\in B\cap A$ then $x\in B$ and $x\in A$, so that $x\in A\cap B$. So $B\cap A\subseteq A\cap B$. It hence follows by proposition \ref{prop:TwosetsEqualIfContainedInEachOther} that $A\cap B = B\cap A$. \item $A\cup B = B\cup A$: Let $x\in A\cup B$ then $x\in A$ or $x\in B$ by the definition of the union. We hence have that $x\in B\cup A$. So we have $A\cup B\subseteq B\cup A$. Likewise if $x\in B\cup A$ then $x\in B$ and $x\in A$, so that $x\in A\cup B$. So $B\cup A\subseteq A\cup B$. It hence follows by proposition \ref{prop:TwosetsEqualIfContainedInEachOther} that $A\cup B = B\cup A$. \item $A\cap B\subseteq A$: Let $x\in A\cap B$, then by the definition of the intersection $x\in A$ and $x\in B$. Hence $x\in A\cap B$ means that $x\in A$ so that $A\cap B\subseteq A$. \item $A\subseteq A\cup B$: Let $x\in A$. By the definition of the union of two sets we have that $y\in A\cup B$ if and only if $y\in A$ or $y\in B$. Hence it follows that $x\in A\cup B$ \item $A\subseteq B \Rightarrow A\cap B = A$: Let $A\subseteq B$ and suppose that $x\in A$, then we have that $x\in B$ as $A\subseteq B$. Hence $x\in A\cap B$. This holds for any choice of $x\in A$. We conclude that if $A\subseteq B$ then $A\cap B = A$ \item $A\subseteq B\Rightarrow A\cup B =B$: Let $A\subseteq B$. Observe that $B\subseteq B$ so that $A\cup B\subseteq B\cup B= B$, that is to say $A\cup B \subseteq B$. Now $B\subseteq A\cup B$. Hence $A\cup B = B$. \item $A\subseteq B \Rightarrow A\cap C \subseteq B\cap C$: Suppose that $A\subseteq B$ and let $x\in A\cap C$, then by definition $x\in A$ and $x\in C$. Also we have that as $A\subseteq B$ that $x\in A$ gives $x\in B$. Hence $x\in B\cap C$. It follows that $A\cap C\subseteq B\cap C$. \item $A\subseteq B \Rightarrow A\cup C \subseteq B\cup C$: Suppose $A\subseteq B$ and let $x\in A\cup C$. We have that $x\in A$ or $x\in C$. If $x\in A$ then as $A\subseteq B$ we have that $x\in B$ so that $x\in B\cup C$. If $x\in C$ then clearly $x\in B\cup C$. Either way we have that $A\cup C\subseteq B\cup C$. \item $A\cap A = A$: Let $x\in A$, then by the definition of the intersection we have that $y\in A\cap A$ if and only if $y\in A$ and $y\in A$, hence $x\in A\cap A$. So that $A\subseteq A\cap A$. Now If $x\in A\cap A$ we have by definition of the intersection of two sets that $x\in A$ and $x\in A$, so the force of deductive logic then drives one to the conclusion that $x\in A$. So $A\cap A\subseteq A$. Hence $A\cap A = A$. \item $A\cup A =A$: Let $x\in A$, then by the definition of the union of two sets, we have that $y\in A\cup A$ if and only if $y\in A$ pr $y\in A$, hence $x\in A\cup A$ so that $A\subseteq A\cup A$. Now suppose that $x\in A\cup A$, then again by the definition of the union we have that $x\in A$ so that $A\cup A\subseteq A$. Hence $A=A\cup A$. \item $A\cap\left(B\cap C\right)=\left(A\cap B\right)\cap C$: Let $A,B$ and $C$ be sets. Consider $A\cap\left(B\cap C\right)$, we have that $x\in A\cap\left(B\cap C\right)$ means that $x\in A$ and $x\in B\cap C$, likewise $x\in B\cap C$ means that $x\in B$ and $x\in C$. Now as $x\in A$ and $x\in B$ and $x\in C$ so we have that $x\in A\cap B$ and $x\in C$. Finally we have that $x\in\left(A\cap B\right)\cap C$ so that $A\cap\left(B\cap C\right)\subseteq \left(A\cap B\right)\cap C$. Now consider $\left(A\cap B\right)\cap C$, if $x\in\left(A\cap B\right)\cap C$ then $x\in A\cap B$ and $x\in C$, also $x\in A\cap B$ means that $x\in A$ and $x\in B$. As $x\in A$ and $x\in B$ and $x\in C$ so we have that $x\in A$ and $x\in B\cap C$ so that $x\in A\cap\left(B\cap C\right)$. Hence $\left(A\cap B\right)\cap C\subseteq A\cap\left(B\cap C\right)$. Hence $A\cap\left(B\cap C\right)=\left(A\cap B\right)\cap C$ \item $A\cup\left(B\cup C\right)=\left(A\cup B\right)\cup C$: Let $A,B$ and $C$ be sets. Consider $A\cup\left(B\cup C\right)$ and let $x\in A\cup\left(B\cup C\right)$, we have that either $x\in A$ or $x\in\left(B\cup C\right)$. If $x\in A$ then we have that $x\in A\cup B$ so that $x\in\left(A\cup B\right)\cup C$. If $x\in B\cup C$ then either $x\in B$ or $x\in C$. If $x\in B$ then $X\in A\cup C$ so that $x\in \left(A\cup B\right)\cup C$. Otherwise $x\in C$ and we have that $x\in \left(A\cup B\right)\cup C$. Hence we have that $A\cup\left(B\cup C\right)\subseteq\left(A\cup B\right)\cup C$ Conversely let $x\in\left(A\cup B\right)\cup C$. We have that either $x\in\left(A\cup B\right)$ or $x\in C$. If $x\in\left(A\cup B\right)$ then either $x\in A$ or $x\in B$, in either case we have that $x\in A\cup\left(B\cup C\right)$. If $x\in C$ then $x\in A\cup\left(B\cup C\right)$. So that $\left(A\cup B\right)\cup C\subseteq A\cup\left(B\cup C\right)$. Hence $A\cup\left(B\cup C\right)=\left(A\cup B\right)\cup C$ \item $A\cap\left(B\cup C\right)=\left(A\cap B\right)\cup\left(A\cap C\right)$: Let $x\in A\cap\left(B\cup C\right)$, then we have that $x\in A$ and $x\in B\cup C$. We have $x\in B\cup C$ gives us that $x\in B$ or $x\in C$. If $x\in B$ then $x\in A\cap B$ and so $x\in\left(A\cap B\right)\cup\left(A\cap C\right)$. Likewise is $x\in C$ then $x\in A\cap C$ so $x\in \left(A\cap B\right)\cup\left(A\cap C\right)$. Hence $A\cap\left(B\cup C\right)\subseteq\left(A\cap B\right)\cup\left(A\cap C\right)$. For the opposite inclusion, let $x\in\left(A\cap B\right)\cup\left(A\cap C\right)$ then we have that either $x\in A\cap B$ or $x\in A\cap C$. If $x\in A\cap B$ then $x\in A$ and $x\in B$, so we hence have that $x\in B\cup C$ so that $x\in A\cap\left(B\cup C\right)$. Likewise if we have $x\in A\cap C$ then $x\in A$ and $x\in C$, so $x\in B\cup C$ and $x\in A\cap\left(B\cup C\right)$. Hence $\left(A\cap B\right)\cup\left(A\cap C\right)\subseteq A\cap\left(B\cup C\right)$ So $A\cap\left(B\cup C\right)=\left(A\cap B\right)\cup\left(A\cap C\right)$. \item $A\cup\left(B\cap C\right)= \left(A\cup B\right) \cap \left(A\cup C\right)$: Let $x\in A\cup\left(B\cap C\right)$ then either $x\in A$ or $x\in B\cap C$. If $x\in A$ then $x\in A\cup B$ and $x\in A\cup C$, which is to say $x\in\left(A\cup B\right)\cap\left(A\cup C\right)$. If $x\in B\cap C$ then $x\in B$ and $x\in C$, so it follows that $x\in A\cup B$ and $x\in A\cup C$ which is to say $x\in\left(A\cup B\right)\cap\left(A\cup C\right)$. Hence $A\cup\left(B\cap C\right)\subseteq \left(A\cup B\right) \cap \left(A\cup C\right)$. Now, suppose that $x\in\left(A\cup B\right) \cap \left(A\cup C\right)$. We then have that $x\in A\cup B$ and $x\in A\cup C$. Now $x\in A\cup B$ gives $x\in A$ or $x\in B$, also $x\in A\cup C$ means that $x\in A$ or $x\in C$. This gives us two possible outcomes. If $x\in A$ then $x\in A\cup\left(B\cap C\right)$ so that $\left(A\cup B\right) \cap \left(A\cup C\right)\subseteq A\cup\left(B\cap C\right)$. Suppose that $x\not\in A$ then we must have that $x\in B$ and $x\in C$ as $x\in A\cup B$ and $x\in A\cup C$. Hence $x\in B\cap C$ so $x\in A\cup\left(B\cap C\right)$. Hence $\left(A\cup B\right) \cap \left(A\cup C\right)\subseteq A\cup\left(B\cap C\right)$. So we have that $A\cup\left(B\cap C\right)= \left(A\cup B\right) \cap \left(A\cup C\right)$. \end{enumerate} The proposition now follows. $\qed$ \end{proposition} \begin{theorem}{Equivalence of Subsets with union and intersection}\label{thm:EquivSubsetIntUnion} Let $A,B$ be sets. The following are equivalent \begin{enumerate} \item $A\subseteq B$ \item $A\cap B = A$ \item $A\cup B =B$ \end{enumerate} Proof: Suppose $A\subseteq B$. By proposition \ref{prop:PropertiesOfUnionIntersectionSetinclusion} we have that \begin{equation*} A=A\cap A \subseteq A\cap B\subseteq A \end{equation*} Hence $A=A\cap B$. Now suppose that $A\cap B = A$, then $A\subseteq B$. This shows 1 and 2 are equivalent. Suppose $A\subseteq B$. Let $x\in A$ then $x\in B$. Then as $x\in B$ we have that $x\in A\cup B$ so that $B\subseteq A\cup B$. Suppose that $x\in A\cup B$, then either $x\in A$ or $x\in B$. If $x\in B$ we are done and we have that $A\cup B\subseteq B$. If $x\in A$ then as $A\subseteq B$ we have that $x\in B$ so that $A\cup B\subseteq B$. Hence $A\cup B = B$. Now suppose that $A\cup B = B$. Suppose that $x\in A$ then $x\in A\cup B =B$ so $x\in B$, hence $A\subseteq B$. This shows the equivalence of 1 and 3. The equivalence of 2 and 3 now follows. Indeed, suppose that $A\cap B =A$ then by the equivalence of 1 and 2 we know that $A\subseteq B$, also by the equivalence of 1 and 3 we know that $A\cup B = B$. $\qed$ \end{theorem} \paragraph{The complement of a set} It sometimes becomes useful to talk about the elements that are not in some set $S$. This only makes sense if $S$ is contained inside some larger set. \begin{definition}{Complement of a set} Let $S$ be a set such that $S\subseteq U$ for some set $U$. We define the complement of $S$, denoted by $S^C$ as the following set \begin{equation*} S^C = \left\{x\in U:x\not\in S\right\} \end{equation*} We can alternatively write $S^C = U\setminus S$, where $\setminus$ is the set difference operation. Moreover we can also consider the complement of a set $A$ with respect to some other set $B$, again occurring inside some larger set $U$ which is to say $A\subseteq U$ and $B\subseteq U$. We have that \begin{equation*} A\setminus B = \left\{x\in A : x\not\in B\right\} \end{equation*} We call \end{definition} \begin{example} Let $U=\left\{1,2,3,4,5,6\right\}$, $S=\left\{1,2,3,4,6\right\}$ and $T=\left\{2,4,6\right\}$. We have that $S\subseteq U$ so that \begin{align*} S^C&=\left\{x\in U:x\not\in S\right\}=\left\{5\right\}\\ T^C&=\left\{x\in U:x\not\in T\right\}=\left\{1,3,5\right\}\\ \end{align*} Also \begin{align*} S\setminus T=\left\{x\in S: x\not\in T\right\}=\left\{1,3\right\}\\ T\setminus S=\left\{x\in T: x\not\in S\right\}=\emptyset \end{align*} \end{example} An immediate result follows from the previous definitions of the complement of a set and set difference. \begin{theorem}{De-Morgan's laws}\label{thm:DeMorgan} Let $A$ and $B$ be subsets of some universal set $U$. We have the complement laws \begin{enumerate} \item $\left(A\cap B\right)^C=A^C\cup B^C$ \item $\left(A\cup B\right)^C= A^C\cap B^C$ \end{enumerate} We also have the set difference laws \begin{enumerate} \item $U\setminus\left(A\cap B\right)=\left(U\setminus A\right)\cup \left(U\setminus B\right)$ \item $U\setminus\left(A\cup B\right)=\left(U\setminus A\right)\cap \left(U\setminus B\right)$ \end{enumerate} Proof: We first prove the complement laws. \begin{enumerate} \item $\left(A\cap B\right)^C=A^C\cup B^C$: Let $x\in\left(A\cap B\right)^C$, by the definition of the set complement we have that $x\not\in \left(A\cap B\right)$. So by the definition of the intersection and $x$ not being an element of $A\cap B$ we have that $x\not\in A$ or $x\not\in B$. Suppose that $x\not\in A$, then by the definition of set complement we have that $x\in A^C$ so that $x\in A^C\cup B^C$. Likewise if $x\not\in B$ then $x\in B^C$ so that $x\in A^C\cup B^C$. Hence we have that $\left(A\cap B\right)^C\subseteq A^C\cup B^C$. Now suppose $x\in A^C\cup B^C$, then $x\in A^C$ or $x\in B^C$. Suppose $x\in A^C$ then $x\not\in A$ so that $x\not\in A\cap B$ hence $x\in\left(A\cap B\right)^C$. Likewise if $x\in B^C$ then $x\not\in B$ so $x\not\in A\cap B$ so that $x\in\left(A\cap B\right)^C$. Thus $A^C\cup B^C\subseteq \left(A\cap B\right)^C$ Hence $\left(A\cap B\right)^C=A^C\cup B^C$. \item $\left(A\cup B\right)^C= A^C\cap B^C$: Let $x\in \left(A\cup B\right)^C$, then we have that $x\not\in A\cup B$ so $x\not\in A$ and $x\not\in B$. This means that $x\in A^C$ and $x\in B^C$ which is to say $x\in A^C\cap B^C$. So $\left(A\cup B\right)^C\subseteq A^C\cap B^C$. Suppose $x\in A^C \cap B^c$ then $x\in A^C$ and $x\in B^C$. $x\in A^C$ means that $x\not\in A$ and $x\in B^C$ means that $x\not\in B$, so $x\not\in A$ and $x\not\in B$ hence $x\not\in A\cup B$. Thus $x\in\left(A\cup B\right)^C$. Hence $A^C\cap B^C\subseteq\left(A\cup B\right)^C$ Thus $\left(A\cup B\right)^C= A^C\cap B^C$ \end{enumerate} It is left to prove the set difference laws. \begin{enumerate} \item $U\setminus\left(A\cap B\right)=\left(U\setminus A\right)\cup \left(U\setminus B\right)$: Let $X\in U\setminus\left(A\cap B\right)$ then by definition we have that $x\in U$ and $x\not\in A\cap B$, which is to say that $x\not\in A$ or $x\not\in B$ with the possibility of being in neither. If $x\not\in A$ then $x\in \left(U\setminus A\right)$ and we clearly have $x\in \left(U\setminus A\right)\cup \left(U\setminus B\right)$. Likewise if $x\not\in B$ and both cases clearly hold in the case where $x\not\in A$ and $X\not\in B$. It follows that in every case that $x\in \left(U\setminus A\right)\cup \left(U\setminus B\right)$. Hence $U\setminus\left(A\cap B\right)\subseteq\left(U\setminus A\right)\cup \left(U\setminus B\right)$ Now suppose that $x\in \left(U\setminus A\right)\cup \left(U\setminus B\right)$ then by definition we have that $x\in U\setminus A$ or $x\in U\setminus B$ with the possibility of being in both. If $x\in U\setminus A$ then $x\in U$ and $X\not\in A$. Hence $x\not\in A\cap B$, likewise if $X\in Y\setminus B$ then we again conclude that $X\not\in A\cap B$. However as $x\in U$ then we have by definition that $x\in U\setminus\left(A\cap B\right)$. We conclude that $\left(U\setminus A\right)\cup \left(U\setminus B\right)\subseteq U\setminus\left(A\cap B\right)$ It follows that $U\setminus\left(A\cap B\right)=\left(U\setminus A\right)\cup \left(U\setminus B\right)$ \item $U\setminus\left(A\cup B\right)=\left(U\setminus A\right)\cap \left(U\setminus B\right)$: Suppose that $U\setminus\left(A\cup B\right)$ then $x\in U$ and $x\not\in A\cup B$ so $x\not\in A$ and $x\not\in B$. Clearly then $x\in U\setminus A$ and $x\in U\setminus B$ so that $x\in \left(U\setminus A\right)\cap \left(U\setminus B\right)$. So we have that $U\setminus\left(A\cup B\right)\subseteq\left(U\setminus A\right)\cap \left(U\setminus B\right)$. Let $x\in \left(U\setminus A\right)\cap \left(U\setminus B\right)$ then $x\in U\setminus A$ and $x\in U\setminus B$ which is to say that $x\in U$ and $x\not\in A$ and $x\not\in B$. Clearly $x\not\in A$ and $x\not\in B$ gives us that $x\not\in A\cup B$ and so $x\in U\setminus \left(A\cup B\right)$ by definition. This allows us to conclude that $\left(U\setminus A\right)\cap \left(U\setminus B\right)\subseteq U\setminus\left(A\cup B\right)$ Hence $U\setminus\left(A\cup B\right)=\left(U\setminus A\right)\cap \left(U\setminus B\right)$ \end{enumerate} This proves the theorem. $\qed$ \end{theorem} \begin{proposition}{Additional properties of set complements and set differences}\label{prop:AdditionComplement} Let $A, B$ and $C$ be a sets such that $A\subseteq U$, $B\subseteq U$ and $C\subseteq U$. Moreover suppose $U$ is not contained in any other set. Then we have that \begin{enumerate} \item $A\cup A^C = U$ \item $A\cap A^C =\emptyset$ \item $\emptyset^C =U$ \item $U^C=\emptyset$ \item If $A\subseteq B$ then $B^C\subseteq A^C$ \item $\left(A^C\right)^C=A$ \item $A\setminus B = A\cap B^C$ \item $\left(A\setminus B\right)^C=A^C\cup B$ \item $A^C\setminus B^C=B\setminus A$ \item $\left(A\setminus B\right)\cap C = \left(A\cap C\right)\setminus\left(B\cap C\right)$ \item $A\setminus\left(B\setminus C\right) = \left(A\cap B\right)\setminus\left(A\cap C\right)$ \item $\left(A\setminus B\right)\cap B=\emptyset$ \item $\left(A\setminus B\right)\cap\left(A\cap B\right)=\emptyset$ \end{enumerate} Proof: \begin{enumerate} \item $A\cup A^C = U$: Let $x\in A\cup A^C$ then $x\in A$ or $x\in A^C$. If $x\in A$ then as $A\subseteq U$ we have that $x\in U$. If $x\in A^c$ then by the definition of set complements we have that $x\in A^C$ if and only if $x\in U$. Hence $A\cup A^C\subseteq U$. Conversely suppose that $x\in U$. We know that $A\subseteq U$ so if $x\in A$ we clearly have $x\in A\cup A^C$. So suppose $x\not\in A$ then by definition of the set complement we have that $x\in A^C$ so that $x\in A\cup A^C$. Hence $U\subseteq A\cup A^C$. So $A\cup A^C=U$. \item $A\cap A^C =\emptyset$: Let $x\in A\cap A^C$, then $x\in A$ and $x\in A^C$, however $x\in A^C$ means that $x\not\in A$. This contradicts the fact that $x\in A$, hence there are no elements $x\in U$ so that $x\in A$ and $x\in A^C$, this is to say $A\cap A^C= \emptyset$. Hence $A\cap A^C =\emptyset$. \item $\emptyset^C =U$: By the definition of the empty set we have that $\emptyset$ has no elements. The complement of the empty-set is \begin{equation*} \emptyset^C=\left\{x\in U:x\not\in\emptyset\right\} \end{equation*} Hence every $x\in U$ is such that $x\not\in\emptyset$. So $\emptyset^C\subseteq U$. Conversely let $x\in U$, then $x\not\in \emptyset$ as $\emptyset$ has no elements. so $x\in\emptyset^C$ hence $U\subseteq \emptyset^C$. It follows that $\emptyset^C=U$. \item $U^C=\emptyset$: Let $x\in U^C$, by the definition of set complement we have that \begin{equation*} U^C=\left\{y\in U:y\not\in U\right\} \end{equation*} This is clearly empty as no such $y$ can satisfy $y\in U$ and $y\not\in U$. Hence $U^C=\emptyset$. \item If $A\subseteq B$ then $B^C\subseteq A^C$: Suppose that $A\subseteq B$. We have by proposition \ref{prop:PropertiesOfUnionIntersectionSetinclusion} property 5 we have that $A\cap B = A$. It follows that $\left(A\cap B\right)^C = A^C$. Now by De-Morgan's laws we have that $\left(A\cap B\right)^C= A^C\cup B^C$. Hence $A^C\cup B^C = A^C$. Finally by theorem \ref{thm:EquivSubsetIntUnion} we know that $X\cup Y = Y$ if and only if $X\subseteq Y$ for sets $X$ and $Y$. Hence $B^C\subseteq A^C$. \item $\left(A^C\right)^C=A$: Let $x\in \left(A^C\right)^C$. By definition we have that \begin{equation*} \left(A^C\right)^C=\left\{x\in U : x\not\in A^c\right\} \end{equation*} Hence $x\in \left(A^C\right)^C$ if and only if $x\not\in A^C$. However $x\not\in A^C$ means that $x\in A$. Hence $\left(A^C\right)^C\subseteq A$ Suppose that $x\in A$, then $x\not\in A^C$, moreover by definition $x\not\in A^C$ if and only if $x\in \left(A^C\right)^C$, hence $A\subseteq \left(A^C\right)^C$. Hence $\left(A^C\right)^C=A$ \item $A\setminus B = A\cap B^C$: Let $x\in A\setminus B$, then by definition we have that $A\setminus B$ is the set \begin{equation*} A\setminus B = \left\{y\in A:y\not\in B\right\} \end{equation*} Hence $x\in A\setminus B$ means that $x\in A$ and $x\not\in B$. We have that $x\not\in B$ means that $x\in B^C$. So that $x\in A\cap B^C$. It follows that $A\setminus B\subseteq A\cap B^C$. Let $x\in A\cap B^C$, then $x\in A$ and $x\in B^C$. $x\in B^C$ means that $x\not\in B$, so by definition $x\in A$ and $x\not\in B$ means that $x\in A\setminus B$. Hence $A\cap B^C\subseteq A\setminus B$. Hence $A\setminus B = A\cap B^C$. \item $\left(A\setminus B\right)^C=A^C\cup B$: We know that $A\setminus B = A\cap B^C$ by the previous property. Now by De-Morgan's laws we have that \begin{equation*} \left(A\setminus B\right)^C=\left(A\cap B^C\right)^C = A^C\cup \left(B^C\right)^C = A^C \cup B \end{equation*} \item $A^C\setminus B^C=B\setminus A$: We know that $A^C\setminus B^C = A^C\cap \left(B^C\right)^C$. Now, $\left(B^C\right)^C=B$ hence $ A^C\cap \left(B^C\right)^C=A^C\cap B = B\cap A^C$. Finally we know that $B\cap A^C = B\setminus A$ by property 7. Hence $A^C\setminus B^C=B\setminus A$. \item $\left(A\setminus B\right)\cap C = \left(A\cap C\right)\setminus\left(B\cap C\right)$: \item $A\setminus\left(B\setminus C\right) = \left(A\cap B\right)\setminus\left(A\cap C\right)$ \item $\left(A\setminus B\right)\cap B=\emptyset$ \item $\left(A\setminus B\right)\cap\left(A\cap B\right)=\emptyset$ \end{enumerate} The proposition now follows. $\qed$ \end{proposition} \paragraph{Cartesian Product} We now look to another method of constructing a set. This method differs from the union and intersection as it allows us to construct a set where the elements come in pairs, in particular these pairs are ordered. \begin{definition}{Ordered pair} Let $S$ and $T$ be sets. Let $s\in S$ and $t\in T$. We say that the tuple $\left(s,t\right)$ is an ordered pair of an element in $S$ and an element in $T$. \end{definition} \begin{definition}{Cartesian product of two sets} Let $S$ and $T$ be sets. We define the Cartesian product of $S$ and $T$, denoted $S\times T$ to be the set of all ordered pairs of the form $\left(s,t\right)$ where $s\in S$ and $t\in T$. This is to say that \begin{equation*} S\times T=\left\{\left(s,t\right):s\in S,t\in T\right\} \end{equation*} \end{definition} \begin{example} Let $S=\left\{1,2,3\right\}$ and $T=\left\{4,5,6\right\}$. We have that \begin{align*} S\times T&=\left\{\left(1,4\right),\left(1,5\right),\left(1,6\right),\left(2,4\right),\left(2,5\right),\left(2,6\right),\left(3,4\right),\left(3,5\right),\left(3,5\right)\right\}\\ T\times S&=\left\{\left(4,1\right),\left(4,2\right),\left(4,3\right),\left(5,1\right),\left(5,2\right),\left(5,3\right),\left(6,1\right),\left(6,2\right),\left(6,3\right)\right\}\\ \end{align*} This example shows that $S\times T\neq T\times S$ in general. \end{example} We can make repeated uses of this idea, we just need to defined an ordered $n$-tuple. \begin{definition}{Ordered $n$-tuple}\label{def:orderedNtuple} Let $S_1,S_2,\dots,S_n$ be sets. Let $s_1\in S_1,s_2\in S_2,\dots,s_n\in S_n$. We say that $\left(s_1,s_2,\dots,s_n\right)$ is an ordered $n$-tuple of an elements in $S_1,S_2,\dots,S_n$. \end{definition} \begin{definition}{Cartesian product of $n$ sets}\label{def:CartProductOfNSet} Let $S_1,S_2,\dots,S_n$ be sets. We define the Cartesian product of $S_1,S_2,\dots,S_N$, denoted $S_1\times S_2\times\dots\times S_n$ to be the set of all ordered pairs of the form $\left(s_1,s_2,\dots,s_n\right)$ where $s_1\in S_1.s_2\in S_2,\dots s_n\in S_n$. This is to say that \begin{equation*} S_1\times S_2\times\dots\times S_n=\left\{\left(s_1,s_2,\dots,s_n\right):s_1\in S_1.s_2\in S_2,\dots s_n\in S_n\right\} \end{equation*} If all the sets are the same we denote this by $S^n$. \end{definition} We make the following observations \begin{lemma}{Cartesian product is empty if and only if at least one of the sets in the product is empty}\label{lem:CartEmpty} Let $A$ and $B$ be sets. We have that $A\times B=\emptyset$ if and only if $A=\emptyset$ or $B=\emptyset$. Proof: We argue as follows. Suppose that $A\times B\neq \emptyset$ then we have by definition of a non-empty Cartesian product that $A\times B\neq \emptyset$ if and only if $\exists\left(a,b\right)\in A\times B$. Now, by the definition of a Cartesian product we have that as $\left(a,b\right)\in A\times B$ if and only if $\exists a\in A$ and $\exists b\in B$, which is to say $A\neq\emptyset$ and $B\neq\emptyset$. This proves the result as assuming $A\times B\neq \emptyset$ gives us $A\neq\emptyset$ and $B\neq\emptyset$. $\qed$ \end{lemma} \begin{proposition}{Criterion for commutativity of the Cartesian product}\label{prop:CriterionForComOfCartProd} Let $A$ and $B$ be sets. We have that $A\times B = B\times A$ only if at least one of the following holds. \begin{enumerate} \item $A=B$ \item $A = \emptyset$ or $B=\emptyset$ or $A=B=\emptyset$ \end{enumerate} Proof: Let $A$ and $B$ be sets. \begin{enumerate} \item $A=B$: Suppose that $A=B$ then without loss of generality\footnote{Without loss of generality means we have made a choice in the proof which allows us to consider a single case as the other cases have the same argument just with the notation changed to reflect the different choice.} consider \begin{equation*} A\times B = A\times A = \left\{\left(a,a\right):a\in A\right\} \end{equation*} Moreover \begin{equation*} B\times A = A\times A = \left\{\left(a,a\right):a\in A\right\} \end{equation*} Hence, varying over every $a\in A$ we have that $A\times B = B\times A$. \item $A = \emptyset$ or $B=\emptyset$ or $A=B=\emptyset$: By lemma \ref{lem:CartEmpty} we have that if $A=\emptyset$ or $B=\emptyset$ or $A=B=\emptyset$ then $A\times B=\emptyset =B\times A$. \end{enumerate} The proposition follows. $\qed$ \end{proposition} We have seen that the Cartesian product is not commutative, but what can we say about associativity. \begin{example} Let $A=\left\{1\right\}$. Consider \begin{align*} A\times\left(A\times A\right)&=A\times\left\{\left(1,1\right)\right\}=\left\{\left(1,\left(1,1\right)\right)\right\}\\ \left(A\times A\right)\times A &=\left\{\left(1,1\right)\right\}\times A = \left\{\left(\left(1,1\right),1\right)\right\}\\ \end{align*} Hence $A\times\left(A\times A\right)\neq \left(A\times A\right)\times A$. So in general the Cartesian product is not associative. \end{example} We have the following criterion for the associativity of the Cartesian product. \begin{proposition}{Criterion for associativity of the Cartesian product}\label{prop:CriterionForAssOfCartProd} Let $A,B$ and $C$ be sets. We have that $A\times\left(B\times C\right)=\left(A\times B\right)\times C$ if and only if $A=\emptyset$ or $B=\emptyset$ or $C=\emptyset$. Proof: Suppose that $A\times\left(B\times C\right)=\left(A\times B\right)\times C$, we need to show one of $A,B$ or $C$ is empty. Consider $A\times\left(B\times C\right)$, we have that \begin{equation*} A\times\left(B\times C\right)=A\times\left\{\left(b,c\right):b\in B,c\in C\right\}=\left\{\left(a,\left(b,c\right)\right):a\in A, \left(b,c\right)\in B\times C\right\} \end{equation*} Now consider $\left(A\times B\right)\times C$, we have that \begin{equation*} \left(A\times B\right)\times C=\left\{\left(a,b\right):a\in A,b\in B\right\}\times C=\left\{\left(\left(a,b\right),c\right):\left(a,b\right)\in A\times B, c\in C\right\} \end{equation*} Hence for equality we need that $a=\left(a,b\right)$ and $\left(b,c\right)=c$. However this is not possible as $\left(a,b\right)\not\in A$ and $\left(b,c\right)\not\in C$. Hence one of the products must be empty, which implies that one of $A,B$ or $C$ is empty. Now suppose that one of $A,B$ or $C$ is empty. Without loss of generality suppose that $A=\emptyset$, then by lemma \ref{lem:CartEmpty} we know that one of $A\times B=\emptyset$ and $A\times\left(B\times C\right)=\emptyset$. Also $\left(A\times B\right)\times C=\emptyset\times C=\emptyset$. Hence we have that $\left(A\times B\right)\times C=\emptyset=A\times\left(B\times C\right)$. is associative. $\qed$ \end{proposition} It is left to see how the Cartesian product interacts with unions, intersections and complements. \begin{proposition}{Properties of Cartesian products, unions, intersections and complements}\label{prop:CartProdUnIntComp} Let $A,B,C$ and $D$ be sets. We have the following properties \begin{enumerate} \item $\left(A\cap B\right)\times\left(C\cap D\right) =\left(A\times C\right)\cap\left(B\times D\right)$ \item $A\times\left(B\cap C\right)=\left(A\times B\right)\cap \left(A\times C\right)$ \item $\left(A\times B\right)\cap\left(B\times A\right)=\left(A\cap B\right)\times\left(A\cap B\right)$ \item $\left(A\cup B\right)\times\left(C\cup D\right) = \left(A\times C\right)\cup \left(B\times D\right)\cup\left(A\times D\right)\cup\left(B\times C\right)$ \item $A\times\left(B\cup C\right) = \left(A\times B\right)\cup\left(A\times C\right)$ \item $\left(B\cup C\right)\times A = \left(B\times A\right)\cup\left(C\times A\right)$ \item If $A\subseteq B$ and $C\subseteq D$ then $A\times C\subseteq B\times D$. Moreover if $A\neq\emptyset$ and $C\neq\emptyset$ then \begin{equation*} A\times C\subseteq B\times T \iff A\subseteq B\text{ and } C\subseteq D \end{equation*} \item If $A\subseteq B$ then $A\times C\subseteq B\times C$ \item If $C\subseteq D$ then $A\times C\subseteq A\times D$ \item $A\times\left(B\setminus C\right)=\left(A\times B\right)\setminus\left(A\times C\right)$ \item $\left(A\setminus B\right)\times C = \left(A\times C\right)\setminus\left( B\times C\right)$ \item $\left(A\times B\right)\setminus\left(C\times D\right)=\left(A\times\left(B\setminus D\right)\right)\cup\left(\left(A\setminus B\right)\times C\right)$ \item Suppose $A\subseteq C$ and $B\subseteq D$ and consider $C\setminus A$ and $T\setminus B$. We have \begin{align*} \left(C\setminus A\right)\times D &= \left(C\times D\right)\setminus\left(A\times D\right)\\ C\times\left(D\setminus B\right) &=\left(C\times D\right)\setminus \left(C\times B\right) \end{align*} \end{enumerate} Proof: \begin{enumerate} \item $\left(A\cap B\right)\times\left(C\cap D\right) =\left(A\times C\right)\cap\left(B\times D\right)$: Let $\left(x,y\right)\in\left(A\cap B\right)\times\left(C\cap D\right)$, then by definition of the Cartesian product we have that $\left(x,y\right)\in\left(A\cap B\right)\times\left(C\cap D\right)$ if and if only $x\in A$ and $x\in B$ and $y\in C$ and $y\in D$. $x\in A$ and $x\in B$ and $y\in C$ and $y\in D$ means that $\left(x,y\right)\in A\times C$ and $\left(x,y\right)\in B\times D$, finally this happens if and only if $\left(x,y\right)\in \left(A\times C\right)\cap\left(B\times D\right)$. \item $A\times\left(B\cap C\right)=\left(A\times B\right)\cap \left(A\times C\right)$: We know that $A\cap A=A$. By the previous property we have that \begin{equation*} A\times\left(C\cap D\right)=\left(A\cap A\right)\times\left(B\cap C\right)=\left(A\times B\right)\cap \left(A\times C\right) \end{equation*} \item $\left(A\times B\right)\cap\left(B\times A\right)=\left(A\cap B\right)\times\left(A\cap B\right)$: By property 1 we have \begin{equation*} \left(A\times B\right)\cap\left(B\times A\right)=\left(A\cap B\right)\times \left(B\cap A\right) = \left(A\cap B\right)\times \left(A\cap B\right) \end{equation*} \item $\left(A\cup B\right)\times\left(C\cup D\right) = \left(A\times C\right)\cup \left(B\times D\right)\cup\left(A\times D\right)\cup\left(B\times C\right)$: Let $\left(x,y\right)\in \left(A\cup B\right)\times\left(C\cup D\right)$, then by definition of Cartesian product and the union of sets we have that $\left(x,y\right)\in \left(A\cup B\right)\times\left(C\cup D\right)$ if and only if $x\in A$ or $x\in B$ and $y\in C$ or $y\in D$. $x\in A$ or $x\in B$ and $y\in C$ or $y\in D$ will occur if and only if ($x\in A$ or $x\in B$ and $y\in C$) or ($x\in A$ or $x\in B$ and $y\in D$). ($x\in A$ or $x\in B$ and $y\in C$) or ($x\in A$ or $x\in B$ and $y\in D$) occurs if and only if ($x\in A$ and $y\in C$) or ($x\in B$ and $y\in C$) or ($x\in A$ and $y\in D$) or ($x\in B$ and $y\in D$). By the definition of the Cartesian product we have that ($x\in A$ and $y\in C$) or ($x\in B$ and $y\in C$) or ($x\in A$ and $y\in D$) or ($x\in B$ and $y\in D$) if and only if $\left(x,y\right)\in A\times C$ or $\left(x,y\right)\in A\times D$ or$\left(x,y\right)\in B\times C$ or $\left(x,y\right)\in B\times D$. Hence by the definition of the union of two sets, $\left(x,y\right)\in A\times C$ or $\left(x,y\right)\in A\times D$ or$\left(x,y\right)\in B\times C$ or $\left(x,y\right)\in B\times D$ occurs if and only if $\left(x,y\right)\in \left(A\times C\right)\cup \left(B\times D\right)\cup\left(A\times D\right)\cup\left(B\times C\right)$. \item $A\times\left(B\cup C\right) = \left(A\times B\right)\cup\left(A\times C\right)$: We know $A=A\cup A$ and so by the previous property we have that \begin{align*} A\times\left(B\cup C\right)&=\left(A\cup A\right)\times\left(B\cup C\right)\\ &=\left(A\times B\right)\cup \left(A\times C\right)\cup\left(A\times C\right)\cup\left(A\times B\right)\\ &=\left(A\times B\right)\cup\left(A\times C\right) \end{align*} \item $\left(B\cup C\right)\times A = \left(B\times A\right)\cup\left(C\times A\right)$: Again $A=A\cup A$ and so by property 4 we have \begin{align*} \left(B\cup C\right)\times A&=\left(B\cup C\right)\times\left(A\cup A\right)\\ &=\left(B\times A\right)\cup \left(B\times A\right)\cup\left(C\times A\right)\cup\left(C\times A\right)\\ &=\left(B\times A\right)\cup\left(C\times A\right) \end{align*} \item If $A\subseteq B$ and $C\subseteq D$ then $A\times C\subseteq B\times D$. Moreover if $A\neq\emptyset$ and $C\neq\emptyset$ then \begin{equation*} A\times C\subseteq B\times T \iff A\subseteq B\text{ and } C\subseteq D \end{equation*}: Let $A\subseteq B$ and $C\subseteq D$. If $A=\emptyset$ or $C=\emptyset$ then by lemma \ref{lem:CartEmpty} we have $A\times C=\emptyset$ and by proposition \ref{prop:EmptySetincontainedineveryset} we have $A\times C=\emptyset \subseteq B\subseteq D$. So suppose that $A\neq\emptyset$ and $C\neq\emptyset$ then lemma \ref{lem:CartEmpty} gives $A\times C\neq\emptyset$. Then we have that $\left(x,y\right)\in A\times C$ if and if only $x\in A$ and $y\in C$. We have $A\subseteq B$ so $x\in B$ and $C\subseteq D$ so $y\in D$, hence $\left(x,y\right)\in B\times D$. Hence $A\times C\subseteq B\times D$. It is left to prove that if $A\neq\emptyset$ and $C\neq\emptyset$ and $A\times C\subseteq B\times D$, then $A\subseteq B$ and $C\subseteq D$. Suppose $A\times C\subseteq B\times D$. If $A=\emptyset$ then $A\times C=\emptyset$ by lemma \ref{lem:CartEmpty} and $A\times C=\emptyset\subseteq B\times D$ irrespective of $C$, so $C$ need not be a subset of $D$. Likewise if $C=\emptyset$ then $A\times C=\emptyset\subseteq B\times D$ irrespective of $A$ so $A$ need not be a subset of $B$. So suppose that $A\neq\emptyset$ and $C\neq\emptyset$ then $\exists x\in A$ and $\exists y\in C$ such that $\left(x,y\right)\in A\times C$, we have that $A\times C\subseteq B\times T$ and so $\left(X,y\right)\in B\times D$ so $x\in B$ and $y\in D$. Hence for $A\neq\emptyset$ and $C\not\emptyset$, we have that $A\subseteq B$ and $C\subseteq D$ gives $A\times C\subseteq B\times D$ and $A\times C\subseteq B\times D$ gives $A\subseteq B$ and $C\subseteq D$. Hence we have \begin{equation*} A\times C\subseteq B\times D\iff A\subseteq B\text{ and } C\subseteq D \end{equation*} \item If $A\subseteq B$ then $A\times C\subseteq B\times C$: Let $A$ be such that $A\subseteq B$. We have for any set $C$ that $C\subseteq C$, hence by the previous property we know that \begin{equation*} A\subseteq B\text{ and } C\subseteq C\Rightarrow A\times C\subseteq B\times C \end{equation*} \item If $C\subseteq D$ then $A\times C\subseteq A\times D$: Let $C$ be such that $C\subseteq D$. We have that $A\subseteq A$ and so by property 7 we have that \begin{equation*} A\subseteq A\text{ and } C\subseteq D\Rightarrow A\times C\subseteq A\times D \end{equation*} \item $A\times\left(B\setminus C\right)=\left(A\times B\right)\setminus\left(A\times C\right)$: Let $\left(x,y\right)\in A\times\left(B\setminus C\right)$ then we have that $\left(x,y\right)\in A\times\left(B\setminus C\right)$ if and only if $x\in A$ and $y\in B\setminus C$. $y\in B\setminus C$ means that $y\in B$ and $y\not\in C$. Thus, $x\in A$ and $y\in B$ and $y\not\in C$ happens if and only if $\left(x,y\right)\in A\times B$ and $\left(x,y\right)\not\in A\times C$. Hence by definition of the difference of two sets we have that $\left(x,y\right)\in A\times B$ and $\left(x,y\right)\not\in A\times C$ if and only if $\left(x,y\right)\in \left(A\times B\right)\setminus\left(A\times C\right)$. \item $\left(A\setminus B\right)\times C = \left(A\times C\right)\setminus\left( B\times C\right)$: Let $\left(x,y\right)\in \left(A\setminus B\right)\times C$ then we have that $\left(x,y\right)\in \left(A\setminus B\right)\times C$ if and only if $x\in A\setminus B$ and $y\in C$, moreover $x\in A\setminus B$ means that $x\in A$ and $x\not\in B$. Hence $x\in A$ and $x\not\in B$ and $y\in C$ occurs if and only if $\left(x,y\right)\in A\times C$ and $\left(x,y\right)\not\in B\times C$. Hence by definition we have that $\left(x,y\right)\in A\times C$ and $\left(x,y\right)\not\in B\times C$ if and only if $\left(x,y\right)\in\left(A\times C\right)\setminus\left( B\times C\right)$. \item $\left(A\times B\right)\setminus\left(C\times D\right)=\left(A\times\left(B\setminus D\right)\right)\cup\left(\left(A\setminus B\right)\times C\right)$: Let $\left(x,y\right)\in \left(A\times B\right)\setminus\left(C\times D\right)$, then we have that $\left(x,y\right)\in A\times B$ and $\left(x,y\right)\not\in C\times D$, which happens if and only if $x\in A$ and $y\in B$ and $x\not\in C$ and $y\not\in D$. Now, $x\in A$ and $y\in B$ and $x\not\in C$ and $y\not\in D$ means that either $x\in A$ and $y\in B$ and $x\not\in C$ or $x\in A$ and $y\in B$ and $y\not\in D$. In the first case, $x\in A$ and $y\in B$ and $x\not\in C$, we have that $x\in A\setminus C$ and $y\in B$, in the second case, $x\in A$ and $y\in B$ and $y\not\in D$ we have $x\in A$ and $y\in B\setminus D$. $x\in A$ and $y\in B$ and $x\not\in C$ or $x\in A$ and $y\in B$ and $y\not\in D$ occurs if and only if $x\in A\setminus C$ and $y\in B$ or $x\in A$ and $y\in B\setminus D$. Now by the definition of the Cartesian product we have that $x\in A\setminus C$ and $y\in B$ gives us that $\left(x,y\right)\in \left(A\setminus C\right)\times B$ and $x\in A$ and $y\in B\setminus D$ gives us $\left(x,y\right)\in A\times \left(C\setminus D\right)$. Hence $x\in A\setminus C$ and $y\in B$ or $x\in A$ and $y\in B\setminus D$ occurs if and only if $\left(x,y\right)\in \left(A\setminus C\right)\times B$ or $\left(x,y\right)\in A\times \left(C\setminus D\right)$, from which we deduce that $\left(x,y\right)\in \left(A\setminus C\right)\times B$ or $\left(x,y\right)\in A\times \left(C\setminus D\right)$ if and only if $\left(x,y\right)\in \left(A\setminus C\right)\times B\cup A\times \left(C\setminus D\right)$. \item Suppose $A\subseteq C$ and $B\subseteq D$ and consider $C\setminus A$ and $T\setminus B$. We have \begin{align*} \left(C\setminus A\right)\times D &= \left(C\times D\right)\setminus\left(A\times D\right)\\ C\times\left(D\setminus B\right) &=\left(C\times D\right)\setminus \left(C\times B\right) \end{align*} Recall that $C\setminus A=\left\{x: x\in C\text{ and } x\not\in A\right\}$. Now we have by property 11. that \begin{equation*} \left(C\setminus A\right)\times D= \left(C\times D\right)\setminus \left(A\times D\right) \end{equation*} Likewise, by property 10. we have that \begin{equation*} C\times\left(D\setminus B\right)= \left(C\times D\right)\setminus \left(C\times B\right) \end{equation*} \end{enumerate} Hence the result has been shown. $\qed$ \end{proposition} \paragraph{Power Set} We make one final definition of an elementary operation for sets. \begin{definition}{Power set} Let $S$ be a set. We define the power set of the set $S$, denoted $P\left(S\right)$ to be the set which contains all of the possible subsets of $S$. \end{definition} \begin{example} Let $S=\left\{1,2,3\right\}$ then we have that \begin{equation*} P\left(S\right)=\left\{\emptyset,\left\{1\right\},\left\{2\right\},\left\{3\right\},\left\{1,2\right\},\left\{1,3\right\},\left\{2,3\right\},S\right\} \end{equation*} \end{example} \subsubsection{Set Partitions} Recall the idea of disjoint sets, that is if $X$ and $Y$ are sets then $X$ and $Y$ are disjoint if $X\cap Y=\emptyset$. This is saying that $X$ and $Y$ have no elements in common. Now suppose we have a set $S$ such that $X\cup Y=S$ but $X\cap Y=\emptyset$. Then $S$ is made of two distinct pieces. Of course there is nothing special about $S$ being made of only two pieces, and could be made of many many pieces. We capture this idea in the next definition. \begin{definition}{Partition of a set} Let $S$ be a set and define $\mathbb{S}$ to be the set of subsets of $S$. We say that $\mathbb{S}$ is a partition of $S$ if the following hold. \begin{enumerate} \item $\forall S_1,S_2\in\mathbb{S}$ we have $S_1\cap S_2=\emptyset$ whenever $S_1\neq S_2$ \item Taking the union of every $T\in\mathbb{S}$ gives us $S$ that is \begin{equation*} S=\bigcup_{T\in\mathbb{S}} T \end{equation*} \item $\forall T\in\mathbb{S}$ we have that $T\neq\emptyset$. \end{enumerate} If the number of sets in $\mathbb{S}$ is finite with say $n$ elements then we call $\mathbb{S}$ an $n$-component partition \end{definition} \begin{example} Let $S=\left\{1,2,3,4\right\}$ and let $S_1=\left\{2,4\right\}$ and $S_2=\left\{1,3\right\}$. Then $S_1$ and $S_2$ partition $S$. Interestingly we have that $S_1^C=S_2$ and $S_2^C = S_1$, so the complements of these sets still forms a partition If instead we have $S_3 = \left\{1\right\}$ and $S_4=\left\{2,3,4\right\}$ then we also have a partition where the complements are also a partition. Now if $S_5=\left\{2\right\}$, $S_6=\left\{1,3\right\}$ and $S_7=\left\{4\right\}$ then $S_5,S_6$ and $S_7$ is a partition of $S$. \end{example} The fact in the first two examples we had two sets partitioning $S$ where the complements also partitioned $S$ is not a coincidence. \begin{proposition}{Complements of 2-component partition is partition} Let $S$ be a set such that $A\subseteq S$ and $B\subseteq S$ is a $2$-component partition for $S$. We have that $A$ and $B$ partition $S$ if and only if $A^C$ and $B^C$ partition $S$. Proof: $\left(\Rightarrow\right):$ Suppose that $A\subseteq S$ and $B\subseteq S$ partition $S$. By definition we have that \begin{enumerate} \item $A\cap B = \emptyset$ \item $A\cup B = S$ \item $A\neg\emptyset$ and $B\neq \emptyset$ \end{enumerate} We need to show that $A^C$ and $B^C$ is a partition that is \begin{enumerate} \item $A^C\cap B^C = \emptyset$ \item $A^C\cup B^C = S$ \item $A^C\neq\emptyset$ and $B^C\neq \emptyset$ \end{enumerate} \begin{enumerate} \item $A^C\cap B^C = \emptyset$: As $A\cup B = S$ we have on taking the complement of both sides that \begin{align*} A\cup B &= S\\ \left(A\cup B\right)^C &= S^C\\ A^C\cap B^C &= \emptyset \end{align*} So $A^C\cap B^C = \emptyset$. \item $A^C\cup B^C = S$: Likewise as $A\cap B = \emptyset$ then on taking the complement of both sides we have that \begin{align*} A\cap B &= \emptyset\\ \left(A\cap B\right)^C &= \emptyset^C\\ A^C\cup B^C &= S \end{align*} So $A^C\cup B^C = S$. \item $A^C\neq\emptyset$ and $B^C\neq \emptyset$: Suppose that $A^C = \emptyset$ then by taking the complement of both sides we have that $A=S$ which implies $B=\emptyset$, which is a contradiction as $A$ and $B$ partition $S$. Likewise if we suppose that $B^C=\emptyset$ we will have to conclude that $A=\emptyset$ which will be a contradiction. It thus follows that neither $A^C$ or $B^C$ can be empty. Hence $A^C\neq\emptyset$ and $B^C\neq \emptyset$. \end{enumerate} It follows that $A^C$ and $B^C$ is a partition of $S$ $\left(\Leftarrow\right)$: Suppose that $A^C$ and $B^C$ is a partition of $S$. We have that $A^C\subseteq S$ and $B^C\subset S$. By the previous part we have that $\left(A^C\right)^C$ and $\left(B^C\right)^C$ is a partition of $S$. However $\left(A^C\right)^C=A$ and $\left(B^C\right)^C=B$. Thus $A$ and $B$ is a partition of $S$ The result now follows. $\qed$ \end{proposition} There are some additional results we can state about partitions that relate to the operations we can do on sets. We will require the following lemma. \begin{lemma}{Set difference and intersection are disjoint sets} Let $S$ and $T$ be two sets. We have that $S\setminus T$ and $S\cap T$ are disjoint sets, which is to say that \begin{equation*} \left(S\setminus T\right)\cap \left(S\cap T\right)=\emptyset \end{equation*} Proof: Suppose that $x\in \left(S\setminus T\right)\cap \left(S\cap T\right)$ then by definition $x\in S\setminus T$ and $x\in S\cap T$. As $x\in S\setminus T$ then we have that $x\in S$ and $x\not\in T$, likewise as $x\in S\cap T$ then $x\in S$ and $x\in T$. It is clear that no such $x$ can exist hence $\left(S\setminus T\right)\cap \left(S\cap T\right)=\emptyset$. \end{lemma} \subsubsection{A brief look at Zermelo–Fraenkel set theory}\label{subsubSec:ZFCAxioms} At the start of this section we introduced the idea of Zermelo–Fraenkel set theory. This is the complete formalisation of set theory and the true bedrock of mathematics. The Zermelo–Fraenkel set theory axioms, hence now referred to as ZF, are given as follows. \begin{definition}{Zermelo–Fraenkel set theory axioms} The Zermelo-Fraenkel set theory axioms are the following. \begin{enumerate} \item The axiom of extensionality: The axiom of extensionality asserts that two sets are equal if and only if they contain the same elements. \item The axiom of the empty-set: The axiom of the empty-set asserts that there exists a set which contains no elements \item The axiom of pairing: The axiom of pairing asserts that given any set $A$ and any set $B$, there is a set $C$ such that, given any set $D$, $D$ is a member of $C$ if and only if $D$ is equal to $A$ or $D$ is equal to $B$. This is to say, given two sets, there is a set whose members are exactly the two given sets. \item The axiom of specification: The axiom of specification asserts that we can construct a set which satisfies a given condition, so long as this condition is not inherently contradictory. \item The axiom of unions: The axiom of unions asserts that we can perform the union of two sets $A$ and $B$ \item The axiom of powers: The axiom of powers asserts that for any set $S$ we can construct a set $P\left(S\right)$ whose elements are all the possible subsets of $S$. \item The axiom of infinity: The axiom of infinity asserts that there is at least one infinite set $A$, that is at least one set with infinitely many elements. That is we have a set $A$ such that the $\emptyset\in A$ and if $x\in A$ then the set $x\cup\left\{x\right\}$ is also in $A$. \item The axiom of replacement: We will need the next section to fully understand this axiom, however informally asserts that for some set $S$, and form another set by replacing the elements of $S$ by other sets according to any definite rule. \item The axiom of foundation: The axiom of foundation asserts that for every non-empty set $S$, there exists an element $x\in S$ such that $x$ and $S$ are disjoint. This also asserts that no set can contain itself. \end{enumerate} \end{definition} There is also one axiom which we have left off. This is the controversial axiom of choice. \begin{definition}{The axiom of choice} Let $S$ be a set of non-empty sets. The axiom of choice asserts that there is a way to pick an element of each of the sets in $S$. \end{definition} With the axiom of choice we have the following \begin{definition}{ZFC axioms} The axioms of ZF along with the axiom of choice gives us the ZFC axioms \end{definition} We can already see that our ``hands-on'' approach to set theory has somewhat indirectly captured the essence of the ZF axioms. We can use the ZF axiom to prove in a truly rigours way what we did with out ``hands-on'' approach. Although an interesting field of study itself, we will not really need to use the ZF axioms, although occasionally we may rely on choice. There is one other thing that needs bringing up, ZFC has one more component, the axioms alone are not enough to prove anything. We need the notion of inclusion, that is being an element of a set. That is we include the symbol $\in$ along with the axioms, where $\in$ takes on the meaning we defined earlier. With this we can in theory use ZFC to start proving and building up mathematics from the bedrock. \subsection{Mappings} \subsubsection{Introduction and basic definitions} Now that we have the of a set what can we use it for? Many areas of mathematics can be broken down into the theory of sets, in particular how we can get from one set to another. Without this idea we wouldn't be able to get very far at all. As an example, you may have seen, in a calculus course for example, the idea of a function $f\left(x\right)$, say $f\left(x\right)=x^2$ where $x$ can be any number we choose. Say $x=2$ then $f\left(2\right)=4$. You may have also seen functions where we are not allowed to use any number we wish for example, if we take $f\left(x\right)=\sqrt{x}$ then we are only allowed positive numbers if we want a to find an answer using the numbers we are familiar with, such as $1, 88.125, \pi,\sqrt{2}$ etc. This set we will denote by $\mathbb{R}$. The alert reader may now see how sets will come into play, to define in a rigours way the ideas of $f\left(x\right)=x^2$ and other such functions, we need to consider what are the allowable inputs which once done will give us the possible outputs. That is if we have a set whose elements are inputs and we define some form of function, which we will now call a map, then we will get another set whose elements are what inputs will be 'mapped` to. \begin{definition}{Mapping} Let $X$ and $Y$ be sets. Suppose we have some rule or description, which we will denote by $f$, by which for each $x\in X$ there is some element $f\left(x\right)\in Y$. We say that the rule (description) is a mapping or map or function from $X$ to $Y$. We denote a mapping with the following notation \begin{align*} f:X&\mapping Y\\ x&\mapsto f\left(x\right) \end{align*} where the first line tells us what sets the mapping is between, and the bottom line tells us where each element $x\in X$ gets mapped to \end{definition} \begin{definition}{Domain} Let $f:X\mapping Y$ be a mapping between two sets $X$ and $Y$. We say that the set $X$ is the domain of the mapping $f$. The domain contains the elements which the map can act on. We can write this as \begin{equation*} \dom\left(f\right)=X \end{equation*} \end{definition} \begin{definition}{Co-Domain} Let $f:X\mapping Y$ be a mapping between two sets $X$ and $Y$. We say that the set $Y$ is the Co-domain of the mapping $f$. The co-domain contains the possible elements that the map can send elements of $X$ to. We can write this as \begin{equation*} \cdm\left(f\right)=Y \end{equation*} \end{definition} We have some examples of mappings. \begin{example} Let $X=\left\{1,2,3\right\}$ and let $Y=X$. Define the map \begin{align*} f:X&\mapping Y\\ x&\mapsto f\left(x\right)=x \end{align*} To see what $f$ does we will take each element of $X$ one at a time. Starting with $1$ we have that $1\mapsto f\left(1\right)=1$, for $2$ we have $2\mapsto f\left(2\right)=2$ and finally $3\mapsto f\left(3\right)=3$. Hence the map $f$ takes an element of $X$ and leaves it alone. A map which takes every element of its domain and leaves it alone is called an identity map, or if you prefer the do nothing at all map. \end{example} \begin{example}\label{exmp:Mapping 1} Let $X=Y=\mathbb{N}$. Let $f$ be the map given by \begin{align*} f:X&\mapping Y\\ x&\mapsto f\left(x\right)=2x \end{align*} It is clear to see that every element in the domain gets doubled, i.e $f\left(1\right)=2$, $f\left(2\right)=4$, $f\left(3\right)=6$ and so on. \end{example} A map does not need to be given by an explicit mathematical formulae \begin{example} Let $A=\text{The set of all humans currently alive on planet earth}$, from which it should be clear to see that $\text{You}\in A$ \footnote{Unless you are either not a human or somehow reading this in some unknown form of existence}. Let $B=\left\{0,1\right\}$. Let $f$ be the mapping given by \begin{align*} f:A&\mapping B\\ a&\mapsto f\left(a\right)= \begin{cases} 1,\ \text{If } a \text{ has hair on their head}\\ 0,\ \text{If } a \text{ does not have hair on their head}\\ \end{cases} \end{align*} Then $f$ is a map which indicates if a given person has hair on their head or not. \end{example} The above definition of a mapping can be made more general \begin{definition}{Piecewise mapping} Let $f:X\rightarrow Y$ be a mapping. We say that $f$ is a piecewise mapping if we need multiple rules or descriptions to fully describe $f$. That we wish to define the mapping using different rules based on the input. If for each of this input ranges we define a mapping $g_1,g_2,g_3,\dots$ then we can write the piecewise function as follows \begin{align*} f:X&\rightarrow Y\\ x&\mapsto f\left(x\right)=\begin{cases} g_1\left(x\right),\ \text{Condition for }g_1\\ g_2\left(x\right),\ \text{Condition for }g_2\\ g_3\left(x\right),\ \text{Condition for }g_3\\ \dots \end{cases} \end{align*} \end{definition} \begin{example} Let $f:\mathbb{N}\rightarrow\mathbb{N}$ be defined by \begin{align*} f:\mathbb{N}&\rightarrow\mathbb{N}\\ x &\mapsto f\left(x\right) = \begin{cases} 2x,\ \text{If } $x <5$\\ 5x,\ \text{Otherwise} \end{cases} \end{align*} We have that $f\left(1\right)=2$, $f\left(2\right)=4$ and so on up to $f\left(4\right)=8$, then $f\left(5\right)=25$ and so on. \end{example} We make one more useful definition that will be useful throughout the rest of the text, \begin{definition}{Closure of a mapping} Let $X$ be a set. If we have a mapping such that $f:X^n\rightarrow X$. We say the mapping has closure on the set $X$, or we say that $f$ is a closed mapping. \end{definition} \subsubsection{The image and pre-image} We now define a more technical notion of how a mapping $f$ maps an element in the domain to the co-domain. \begin{definition}{Image of an element} Let $f:X\mapping Y$ be a mapping of between two sets $X$ and $Y$, and let $x\in X$ be an element of the domain. We say that $f\left(x\right)\in Y$ is the image of the element $x$. \end{definition} Which in turn allows us to define a subset of the co-domain for which every element $x\in X$ gets mapped to \begin{definition}{Image of a mapping}\label{def:ImageMapping} Let $f:X\mapping Y$ be a mapping of between two sets $X$ and $Y$. We define the set \begin{equation*} \image\left(f\right)=f\left(X\right)=\left\{f\left(x\right):x\in X\right\}\subseteq Y \end{equation*} To be the image of the domain, sometimes called the range of $f$. That is the image is the set of all possible outputs of the mapping $f$ with the domain $X$. Moreover, suppose that $A\subseteq X$ then we define the image of the subset $A$ to be \begin{equation*} f\left(A\right)=\left\{f\left(x\right):x\in A\right\}\subseteq f\left(X\right)\subseteq Y \end{equation*} That is we can consider the image of subsets of $X$. \end{definition} \begin{example} Consider the mapping in example \ref{exmp:Mapping 1}, we have that $X=Y=\mathbb{N}$ and is $f$ the map \begin{align*} f:X&\mapping Y\\ x&\mapsto f\left(x\right)=2x \end{align*} then we have that $\image\left(f\right)=f\left(\mathbb{N}\right)=\left\{2x:x\in\mathbb{N}\right\}$ \end{example} \begin{example} Let $f$ be an arbitrary mapping such that $f:\emptyset\mapping Y$ for some set $Y$. What is $\image\left(f\right)$?. We have by the definition of a mapping \ref{def:ImageMapping}, we have that \begin{equation*} \image\left(f\right)=\left\{f\left(x\right):x\in\emptyset\right\} \end{equation*} However, we know that the empty set has no elements, so there are no elements that $f$ can send anything to, so $\image\left(f\right)=\emptyset$. \end{example} Likewise we can define how a mapping is mapped to from the domain to the co-domain. This is called the pre-image. \begin{definition}{Pre-image of an element} Let $f:X\mapping Y$ be a mapping of between two sets $X$ and $Y$, and let $y\in Y$ be an element of the co-domain. If $f\left(x\right)=y$ then we say that $f\left(x\right)\in X$ is the pre-image of the element $y$ and we denote this $f^{-1}\left(y\right)$. \end{definition} Which in turn allows us to define a subset of the domain for which every element $y\in Y$ gets mapped to \begin{definition}{Pre-image of a mapping}\label{def:PreImageMapping} Let $f:X\mapping Y$ be a mapping of between two sets $X$ and $Y$. We define the set \begin{equation*} \preimage\left(f\right)=f^{-1}\left(Y\right)=\left\{x\in X:f\left(x\right)\in Y\right\}\subseteq X \end{equation*} To be the pre-image of the co-domain. That is the pre-image is the set of all possible inputs that give the given outputs. Moreover, suppose that $B\subseteq Y$ then we define the pre-image of the subset $B$ to be \begin{equation*} f^{-1}\left(B\right)=\left\{x\in X:f\left(x\right)\in B\right\}\subseteq f^{-1}\left(Y\right)\subseteq X \end{equation*} \end{definition} \begin{example} Consider the mapping $f:\mathbb{N}\rightarrow\mathbb{N}$ given by \begin{align*} f:\mathbb{N}&\rightarrow\mathbb{N}\\ x&\mapsto f\left(x\right)=\frac{x}{2} \end{align*} We have that $\frac{x}{2}$ is defined in the naturals only when $x$ is an even number, hence the pre-image must consist of the even numbers. \begin{equation*} \preimage\left(f\right)=f^{-1}\left(\mathbb{N}\right)=\left\{x\in\mathbb{N}:\frac{x}{2}\in\mathbb{N}\right\}=\left\{0,2,4,6,8\dots\right\} \end{equation*} \end{example} \begin{example} Consider the mapping $f:\mathbb{N}\rightarrow\mathbb{N}$ given by \begin{align*} f:\mathbb{N}&\rightarrow\mathbb{N}\\ x&\mapsto f\left(x\right)=x^2 \end{align*} We have that the pre-image is given by \begin{equation*} \preimage\left(f\right)=\left\{x\in\mathbb{N}:x^2\in\mathbb{N}\right\}=\left\{0,1,2,3,4\dots\right\}=\mathbb{N} \end{equation*} \end{example} With these definitions we can make the following observations \begin{proposition}{Properties of the image and pre-image}\label{prop:PropertyImagePreImage} Let $f:X\rightarrow Y$ be a mapping and let $A\subseteq X$ and $B\subseteq Y$. We have that the following properties hold for the image and pre-image \begin{enumerate} \item $f\left(X\right)\subseteq Y$ \item $f\left(f^{-1}\left(Y\right)\right)=f\left(X\right)$ \item $f\left(f^{-1}\left(B\right)\right)\subseteq B$ \item $f\left(f^{-1}\left(B\right)\right)=B\cap f\left(X\right)$ \item $f\left(f^{-1}\left(f\left(A\right)\right)\right)=f\left(A\right)$ \item $f\left(A\right)=\emptyset\iff A=\emptyset$ \item $B\subseteq f\left(A\right)\iff\exists C\subseteq A: f\left(C\right)=B$ \item $f\left(X\setminus A\right)\subseteq f\left(A\right)\iff f\left(A\right)=f\left(X\right)$ \item $f\left(X\right)\setminus f\left(A\right)\subseteq f\left(X\setminus A\right)$ \item $f\left(A\cup f^{-1}\left(B\right)\right)\subseteq f\left(A\right)\cup B$ \item $f\left(A\cap f^{-1}\left(B\right)\right)= f\left(A\right)\cap B$ \end{enumerate} Likewise the following properties hold for the pre-image \begin{enumerate} \item $f^{-1}\left(Y\right)=X$ \item $f^{-1}\left(f\left(X\right)\right)=X$ \item $A\subseteq f^{-1}\left(f\left(A\right)\right)$ \item Suppose that instead of the mapping $f:X\rightarrow Y$ we consider a new mapping based on $f$, which we we call $\Bar{f}$. We define $\Bar{f}$ to be the mapping \begin{align*} \Bar{f}:A&\mapping Y\\ x&\mapsto \Bar{f}\left(x\right)=f\left(x\right) \end{align*} that is $\Bar{f}$ maps every element of $a\in A$ to what $f\left(a\right)$ does. With this new mapping we have the following property \begin{equation*} \left(\Bar{f}\right)^{-1}\left(B\right)=A\cap f^{-1}\left(B\right) \end{equation*} \item $f^{-1}\left(f\left(f^{-1}\left(B\right)\right)\right)=f^{-1}\left(B\right)$ \item $f^{-1}\left(B\right)=\emptyset\iff B\subseteq Y\setminus f\left(X\right)$ \item $A\subseteq f^{-1}\left(B\right)\iff f\left(A\right)\subseteq B$ \item $f^{-1}\left(Y\setminus B\right)\subseteq f^{-1}\left(B\right)\iff f^{-1}\left(B\right)=X$ \item $f^{-1}\left(Y\setminus B\right)= X\setminus f^{-1}\left(B\right)$ \item $A\cup f^{-1}\left(B\right)\subseteq f^{-1}\left(f\left(A\right)\cup B\right)$ \item $A\cap f^{-1}\left(B\right)\subseteq f^{-1}\left(f\left(A\right)\cap B\right)$ \end{enumerate} Proof: We start with the properties of the image. \begin{enumerate} \item $f\left(X\right)\subseteq Y$: This holds by definition of the image. \item $f\left(f^{-1}\left(Y\right)\right)=f\left(X\right)$: Let $x\in f\left(f^{-1}\left(Y\right)\right)$ and recall the definition of the image and pre-image. \begin{align*} f\left(A\right)&=\left\{f\left(x\right):x\in A\right\}\subseteq f\left(X\right)\subseteq Y\\ f^{-1}\left(B\right)&=\left\{x\in X:f\left(x\right)\in B\right\}\subseteq f^{-1}\left(Y\right)\subseteq X \end{align*} We have that \begin{equation*} f\left(f^{-1}\left(Y\right)\right)=\left\{f\left(y\right):y\in f^{-1}\left(Y\right)\right\} \end{equation*} Hence $x\in f\left(f^{-1}\left(Y\right)\right)$ means that $x=f\left(y\right)$ for some $y\in f^{-1}\left(Y\right)$, additionally we conclude that $y\in X$. Moreover by the definition of the pre-image we have that $f^{-1}\left(Y\right)\subseteq X$. It thus follows that $x\in f\left(X\right)$ and so $f\left(f^{-1}\left(Y\right)\right)\subseteq f\left(X\right)$. Now suppose that $x\in f\left(X\right)$, that is $x=f\left(x'\right)$ for some $x'\in X$. Now by definition of the pre-image as $x'\in X$ with $f\left(x'\right)\in Y$ we have that $x'\in f^{-1}\left(Y\right)$. Hence by definition of the set $f\left(f^{-1}\left(Y\right)\right)$ we must conclude that $f\left(x'\right)\in f\left(f^{-1}\left(Y\right)\right)$, which is to say $x\in f\left(f^{-1}\left(Y\right)\right)$. Hence $f\left(X\right)\subseteq f\left(f^{-1}\left(Y\right)\right)$. It follows that $f\left(f^{-1}\left(Y\right)\right)=f\left(X\right)$. \item $f\left(f^{-1}\left(B\right)\right)\subseteq B$: Suppose that $x\in f\left(f^{-1}\left(B\right)\right)$ where $B\subseteq Y$. We hence have that $x=f\left(b\right)$ for some $b\in f^{-1}\left(B\right)$, hence $b\in X$ giving us $f\left(b\right)\in B$ and so $f\left(f^{-1}\left(B\right)\right)\subseteq B$. \item $f\left(f^{-1}\left(B\right)\right)=B\cap f\left(X\right)$: Let $x\in f\left(f^{-1}\left(B\right)\right)$ then by property 3 we have that $x\in B$. Additionally as $x\in f\left(f^{-1}\left(B\right)\right)$ and $B\subseteq Y$ then $f\left(f^{-1}\left(B\right)\right)\subseteq f\left(f^{-1}\left(Y\right)\right)$ and so $x\in f\left(f^{-1}\left(Y\right)\right)$. Now by property 2 we have that $f\left(f^{-1}\left(Y\right)\right)=f\left(X\right)$ thus $x\in f\left(X\right)$ and so $x\in B\cap f\left(X\right)$. It follows that $f\left(f^{-1}\left(B\right)\right)\subseteq B\cap f\left(X\right)$. Now suppose that $x\in B\cap f\left(X\right)$. By definition of $f\left(X\right)$ we have $x\in f\left(X\right)$ gives us that $x=f\left(x'\right)$ where $x'\in X$, moreover we also have that $x\in B$. Now we have the set $f\left(f^{-1}\left(B\right)\right)$ is given by \begin{equation*} f\left(f^{-1}\left(B\right)\right)=\left\{f\left(b\right):b\in f^{-1}\left(B\right)\right\} \end{equation*} We have that $x=f\left(x'\right)$ and so $x'\in f^{-1}\left(B\right)$, hence clearly by definition of the image we have that $x\in f\left(f^{-1}\left(B\right)\right)$. It follows that $B\cap f\left(X\right)\subseteq f\left(f^{-1}\left(B\right)\right)$. Hence the result $f\left(f^{-1}\left(B\right)\right)=B\cap f\left(X\right)$. \item $f\left(f^{-1}\left(f\left(A\right)\right)\right)=f\left(A\right)$: By property $4$ we have that \begin{equation*} f\left(f^{-1}\left(f\left(A\right)\right)\right)=f\left(A\right)\cap f\left(X\right) \end{equation*} as $f\left(A\right)\subseteq Y$. Finally $f\left(A\right)\cap f\left(X\right)=f\left(A\right)$ as $f\left(A\right)\subseteq f\left(X\right)$. The result follows. \item $f\left(A\right)=\emptyset\iff A=\emptyset$: $\left(\Leftarrow\right)$: Suppose that $f\left(A\right)=\emptyset$. By definition of the image we have that \begin{equation*} f\left(A\right)=\left\{f\left(x\right):x\in A\right\} \end{equation*} By set equality we must have that $f\left(A\right)=\left\{f\left(x\right):x\in A\right\}=\emptyset$. Hence there can be no elements $f\left(x\right)$ where $x\in A$ which can only occur if $A=\emptyset$ for if not then $f\left(A\right)$ has at least one element for some $x'\in A$, contradicting the fact that $f\left(A\right)=\emptyset$. It follows that $A=\emptyset$. $\left(\Rightarrow\right)$: Suppose that $A=\emptyset$, we have that the image of the empty set is given by \begin{equation*} f\left(A\right)=f\left(\emptyset\right)=\left\{f\left(x\right):x\in \emptyset\right\}=\emptyset \end{equation*} It follows that $f\left(A\right)=\emptyset$. \item $B\subseteq f\left(A\right)\iff\exists C\subseteq A: f\left(C\right)=B$: $\left(\Rightarrow\right)$: Suppose that $B\subseteq f\left(A\right)$. We show that $\exists C\subseteq A: f\left(C\right)=B$. So, suppose that $x\in B$ then we have that $x\in f\left(A\right)$ by assumption. By definition of the image we have that \begin{equation*} f\left(A\right)=\left\{f\left(x\right):x\in A\right\} \end{equation*} Hence we have $x\in f\left(A\right)$ gives us that $x=f\left(x'\right)$ for some $x'\in A$. We define the required set $C$ as follows. \begin{equation*} C = \bigcup_{\substack{x'\in A \\ f\left(x'\right)\in B}} x' \end{equation*} That is $C$ is defined to be those elements $x'\in A$ such that $f\left(x'\right)\in B$ which is a subset of $f\left(A\right)$. Clearly $C\subseteq A$ as each $x'\in C$ is by construction an element of $A$. Additionally we also have $f\left(C\right)=B$ by construction of $C$. $\left(\Leftarrow\right)$: Suppose that $\exists C\subseteq A: f\left(C\right)=B$. As $f\left(C\right)=B$ we have by the definition of the image that \begin{equation*} f\left(C\right)=\left\{f\left(x\right):x\in C\right\} \end{equation*} that is $x\in f\left(C\right)$ gives $x=f\left(c\right)$ for some $c\in C$ and additionally $x\in B$ by assumption. Now $C\subseteq A$ so $c\in A$. Hence $x\in f\left(A\right)$, hence we must conclude that $B\subseteq f\left(A\right)$, possibly being equal if $C=A$. The result follows. \item $f\left(X\setminus A\right)\subseteq f\left(A\right)\iff f\left(A\right)=f\left(X\right)$: $\left(\Rightarrow\right)$: Suppose that $f\left(X\setminus A\right)\subseteq f\left(A\right)$ and recall the definition of the complement of sets. We have that \begin{equation*} X\setminus A = \left\{x\in X: x\not\in A\right\} \end{equation*} Now, $A\subseteq X$ by hypothesis of the proposition. So if $x\in f\left(X\setminus A\right)$ then by definition of the image we have that \begin{equation*} f\left(X\setminus A\right)=\left\{f\left(x\right): x\in X\setminus A\right\}=\left\{f\left(x\right):x\in X\text{ and } x\not\in A\right\} \end{equation*} but then if $x\not\in A$ then $x\not\in f\left(A\right)$. However if $A=X$ then we have that $X\setminus A = \emptyset$ from which it follows by property 6 that $f\left(X\setminus A\right)=\emptyset$ and so as the empty set is a subset of any set we conclude that $\emptyset\subseteq f\left(A\right)$, that is we must have $f\left(A\right)=f\left(X\right)$. $\left(\Leftarrow\right):$ Suppose that $f\left(A\right)=f\left(X\right)$, by definition of the image we have that \begin{equation*} f\left(A\right)=\left\{f\left(a\right):a\in A\right\}=\left\{f\left(x\right):x\in X\right)=f\left(X\right) \end{equation*} Now consider $f\left(X\setminus A\right)$ this set is given by \begin{equation*} f\left(X\setminus A\right)=\left\{f\left(x\right): x\in X\setminus A\right\}=\left\{f\left(x\right):x\in X\text{ and } x\not\in A\right\} \end{equation*} But as all such $x\in A$ must also be $x\in X$ by assumption we conclude that $f\left(X\setminus A\right)=\emptyset$ and the empty set is clearly contained in any other set. Hence $f\left(X\setminus A\right)\subseteq f\left(A\right)$. The result has now been shown. \item $f\left(X\right)\setminus f\left(A\right)\subseteq f\left(X\setminus A\right)$: Let $x\in f\left(X\right)\setminus f\left(A\right)$. By definition we have that \begin{equation*} f\left(X\right)\setminus f\left(A\right)=\left\{x\in f\left(X\right):x\not\in f\left(A\right)\right\} \end{equation*} Hence $x\in f\left(X\right)\setminus f\left(A\right)$ gives us that $x\in f\left(X\right)$ and $x\not\in f\left(A\right)$. That is $\exists y\in X$ with $y\nexists A$ such that $x=f\left(y\right)$, this is $y\in X\setminus A$. Hence it follows that $x\in f\left(X\setminus A\right)$. That is $f\left(X\right)\setminus f\left(A\right)\subseteq f\left(X\setminus A\right)$. \item $f\left(A\cup f^{-1}\left(B\right)\right)\subseteq f\left(A\right)\cup B$: Let $x\in f\left(A\cup f^{-1}\left(B\right)\right)$. This is our first usage of the pre-image of a set so we recall the definition, we have that \begin{equation*} f^{-1}\left(B\right)=\left\{x\in X:f\left(x\right)\in B\right)\subseteq X \end{equation*} Hence the image $f\left(A\cup f^{-1}\left(B\right)\right)$ is given by \begin{align*} f\left(A\cup f^{-1}\left(B\right)\right)&=\left\{f\left(y\right):y\in A\cup f^{-1}\left(B\right)\right\}\\ &=\left\{f\left(y\right):y\in A\text{ or } y\in f^{-1}\left(B\right)\right\}\\ &=\left\{f\left(y\right):y\in A\text{ or } y\in X : f\left(y\right)\in B\right\} \end{align*} Now, $x\in f\left(A\cup f^{-1}\left(B\right)\right)$ gives us that either $\exists y\in A$ with $x=f\left(y\right)$ or $\exists y\in X$ with $f\left(y\right)\in B$. In the first case where $\exists y\in A$ with $x=f\left(y\right)$ then by definition of the image we have that $x\in f\left(A\right)$ and so is clearly in the union $f\left(A\right)\cup B$. Now for the second case we have that $x\in B$ as $y\in X$ such that $x=f\left(y\right)\in B$, likewise it is in the union $f\left(A\right)\cup B$. Hence $x\in f\left(A\right)\cup B$ and we have that $f\left(A\cup f^{-1}\left(B\right)\right)\subseteq f\left(A\right)\cup B$. Hence the result. \item $f\left(A\cap f^{-1}\left(B\right)\right)= f\left(A\right)\cap B$: Let $x\in f\left(A\cap f^{-1}\left(B\right)\right)$, the image of $A\cap f^{-1}\left(B\right)$ is given by \begin{align*} f\left(A\cap f^{-1}\left(B\right)\right)&=\left\{f\left(y\right):y\in A\cap f^{-1}\left(B\right)\right\}\\ &=\left\{f\left(y\right):y\in A\text{ and } y\in f^{-1}\left(B\right)\right\}\\ &=\left\{f\left(y\right):y\in A\text{ and } y\in X : f\left(y\right)\in B\right\}\\ \end{align*} Now $x\in f\left(A\cap f^{-1}\left(B\right)\right)$ gives us that $\exists y\in A$ with $x=f\left(y\right)$ and $\exists y\in X$ with $f\left(y\right)\in B$. Hence we clearly have that $x\in f\left(A\right)$ and $x\in B$ and so is in the intersection $f\left(A\right)\cap B$. Hence we have that $f\left(A\cap f^{-1}\left(B\right)\right)\subseteq f\left(A\right)\cap B$. Now suppose that $x\in f\left(A\right)\cap B$. We have that $x\in f\left(A\right)$ and $x\in B$, from the first of these having $x\in f\left(A\right)$ means that $\exists y\in A$ such that $x=f\left(y\right)$. Now as $x\in B$ means there is some $y'\in X$ with $x=f\left(y'\right)$. However as $f\left(A\right)\cap B$ then we must have that $f\left(y'\right)\in f\left(A\right)$ hence $y'\in A$. Hence both $y$ and $y'$ are in the set $A\cap f^{-1}\left(B\right)$ and so we have $x\in f\left(A\cap f^{-1}\left(B\right)\right)$ and therefore $f\left(A\right)\cap B\subseteq f\left(A\cap f^{-1}\left(B\right)\right)$. The result $f\left(A\cap f^{-1}\left(B\right)\right)= f\left(A\right)\cap B$ follows. \end{enumerate} We now turn our attention to the results for the pre-image. \begin{enumerate} \item $f^{-1}\left(Y\right)=X$: By definition of the pre-image we have that \begin{equation*} f^{-1}\left(Y\right)=\left\{x\in X:f\left(x\right)\in Y\right\}\subseteq X \end{equation*} Clearly $f^{-1}\left(Y\right)\subseteq X$ by definition. Now if $x\in X$ then we must also clearly have $f\left(x\right)\in Y$ and so $X\subseteq f^{-1}\left(Y\right)$. Hence $f^{-1}\left(Y\right)=X$. \item $f^{-1}\left(f\left(X\right)\right)=X$: Let $y\in f^{-1}\left(f\left(X\right)\right)$, we have that the set $f^{-1}\left(f\left(X\right)\right)$ is given by \begin{equation*} f^{-1}\left(f\left(X\right)\right)=\left\{x\in X: f\left(x\right)\in f\left(X\right)\right\}\\ \end{equation*} It is hence clear that for any $x\in f^{-1}\left(f\left(X\right)\right)$ we have clearly have $x\in X$, that is $f^{-1}\left(f\left(X\right)\right)\subseteq X$. Likewise if $x\in X$ then clearly $x\in f\left(X\right)$ and so by the definition of $f^{-1}\left(f\left(X\right)\right)$ we have that $x\in f^{-1}\left(f\left(X\right)\right)$. That is $X\subseteq f^{-1}\left(f\left(X\right)\right)$. The result follows. \item $A\subseteq f^{-1}\left(f\left(A\right)\right)$: Suppose that $x\in A\subseteq X$. By property $2$. of the pre-image we have that $f^{-1}\left(f\left(X\right)\right)=X$. Hence $x\in A\subseteq f^{-1}\left(f\left(X\right)\right)=X$ giving the result. \item Suppose that instead of the mapping $f:X\rightarrow Y$ we consider a new mapping based on $f$, which we we call $\Bar{f}$. We define $\Bar{f}$ to be the mapping \begin{align*} \Bar{f}:A&\mapping Y\\ x&\mapsto \Bar{f}\left(x\right)=f\left(x\right) \end{align*} that is $\Bar{f}$ maps every element of $a\in A$ to what $f\left(a\right)$ does. With this new mapping we have the following property \begin{equation*} \left(\Bar{f}\right)^{-1}\left(B\right)=A\cap f^{-1}\left(B\right): \end{equation*} Let $x\in \left(\Bar{f}\right)^{-1}\left(B\right)$. We have that $\left(\Bar{f}\right)^{-1}\left(B\right)$ is given by \begin{equation*} \left(\Bar{f}\right)^{-1}\left(B\right)=\left\{x\in A:\Bar{f}\left(x\right)\in B\right\} \end{equation*} So $x\in \left(\Bar{f}\right)^{-1}\left(B\right)$ gives that $x\in A$, moreover as $\Bar{f}\left(x\right)\in B$ and $\Bar{f}$ maps every $x\in A$ to $f\left(x\right)$ then $\Bar{f}\left(x\right)=f\left(x\right)\in B$. It follows that $x\in f^{-1}\left(B\right)$ and so $x\in A\cap f^{-1}\left(B\right)$. Thus $\left(\Bar{f}\right)^{-1}\left(B\right)\subseteq A\cap f^{-1}\left(B\right)$. Now, suppose that $x\in A\cap f^{-1}\left(B\right)$, by definition of $\Bar{f}$ we have that $\Bar{f}\left(x\right)$. Now $x\in f^{-1}\left(B\right)$ means that $f\left(x\right)\in B$, now as $\Bar{f}\left(x\right)$ maps any $x\in A$ to $f\left(x\right)$ we have that $\Bar{f}\left(x\right)=f\left(x\right)$ and so $x\in \left(\Bar{f}\right)^{-1}\left(B\right)$ Hence $\left(\Bar{f}\right)^{-1}\left(B\right)=A\cap f^{-1}\left(B\right)$ \item $f^{-1}\left(f\left(f^{-1}\left(B\right)\right)\right)=f^{-1}\left(B\right)$: This follows by property 2. $f^{-1}\left(f\left(X\right)\right)=X$. Indeed we have \begin{equation*} f^{-1}\left(f\left(f^{-1}\left(B\right)\right)\right)=f^{-1}\left(B\right) \end{equation*} \item $f^{-1}\left(B\right)=\emptyset\iff B\subseteq Y\setminus f\left(X\right)$: $\left(\Rightarrow\right):$ Suppose $f^{-1}\left(B\right)=\emptyset$, by definition of the pre-image we have \begin{equation*} f^{-1}\left(B\right)=\left\{x\in X:f\left(x\right)\in B\right\}=\emptyset \end{equation*} Hence the pre-image being empty means that there are no elements $x\in X$ with $f\left(x\right)\in B$. Now the set $Y\setminus f\left(X\right)$ is given \begin{equation*} Y\setminus f\left(X\right)=\left\{y\in Y: y\not\in f\left(X\right)\right\} \end{equation*} Thus as there are no $x\in X$ with $f\left(x\right)\in B$, then $Y\setminus f\left(x\right)$ will not remove any $f\left(x\right)\in B$, that is $B\subseteq Y\setminus f\left(X\right)$. $\left(\Leftarrow\right):$ Suppose that $B\subseteq Y\setminus f\left(X\right)$. We Have that $Y\setminus f\left(X\right)$ is precisely the set of $y\in Y$ with $y\not\in f\left(X\right)$, therefore the set $B\subseteq Y\setminus f\left(X\right)$ means that if $f\left(b\right)\in B$ then we have have that $b\not\in f\left(X\right)$ and hence $b\not\in X$. This holds for any $f\left(b\right)\in B$ and hence we must have that the pre-image of $B$ is empty. This is to say $f^{-1}\left(B\right)=\emptyset$. \item $A\subseteq f^{-1}\left(B\right)\iff f\left(A\right)\subseteq B$: $\left(\Rightarrow\right):$ Suppose that $A\subseteq f^{-1}\left(B\right)$. Recall the definition of the image \begin{equation*} f\left(A\right)=\left\{f\left(x\right):x\in A\right\} \end{equation*} Now for some $a\in A$ we have that $a\in f^{-1}\left(B\right)$ and so there is some $x\in X$ such that $f\left(x\right)\in B$, in particular $a=x$ and so $x\in A$ which gives $f\left(A\right)\subseteq B$. $\left(\Leftarrow\right):$ Now, suppose that $f\left(A\right)\subseteq B$ we have that for some $y\in f\left(A\right)$ that $y\in B$ and in particular by definition there is some $x\in A$ such that $f\left(x\right)=y\in f\left(A\right)$. Hence as $A\subseteq X$ we have that $x\in X$ and so by definition of the pre-image we have that $x\in f^{-1}\left(B\right)$. This is to say we conclude that $A\subseteq f^{-1}\left(B\right)$. \item $f^{-1}\left(Y\setminus B\right)\subseteq f^{-1}\left(B\right)\iff f^{-1}\left(B\right)=X$: Suppose that $f^{-1}\left(Y\setminus B\right)\subseteq f^{-1}\left(B\right)$. We have that pre-image of $Y\setminus B$ is given by \begin{equation*} f^{-1}\left(Y\setminus B\right)=\left\{x\in X: f\left(x\right) \in Y\setminus B\right\}=\left\{x\in X: f\left(x\right)\in Y \text{ and } f\left(x\right)\not\in B\right\} \end{equation*} Hence by definition $y\in f^{-1}\left(Y\setminus B\right)$ gives us that $y=x$ for some $x\in X$ with $f\left(x\right)\in Y$ and $f\left(x\right)\not\in B$, but then we can't have $y\in f^{-1}\left(B\right)$ by the definition of the pre-image on $B$. Hence we conclude that $f^{-1}\left(Y\setminus B\right)\subseteq f^{-1}\left(B\right)$ holds if and only if $Y\setminus B = \emptyset$ from which $B= Y$ and so by property $1$. we have that $f^{-1}\left(B\right)= X$. \item $f^{-1}\left(Y\setminus B\right)= X\setminus f^{-1}\left(B\right)$: Suppose that $x\in f^{-1}\left(Y\setminus B\right)$ then by definition we have that $f\left(x\right)\in y$ and $f\left(x\right)\not\in B$ for some $x\in X$, but this is clearly the definition of $X\setminus f^{-1}\left(B\right)$ and so $x\in X\setminus f^{-1}\left(B\right)$. Conversely if $x\in X\setminus f^{-1}\left(B\right)$ then $f\left(x\right)\not\in B$ but by definition of $f$ we have that $f\left(x\right)\in Y$ and so $x\in f^{-1}\left(Y\setminus B\right)$. It follows that $f^{-1}\left(Y\setminus B\right)= X\setminus f^{-1}\left(B\right)$. \item $A\cup f^{-1}\left(B\right)\subseteq f^{-1}\left(f\left(A\right)\cup B\right)$: Let $x\in A\cup f^{-1}\left(B\right)$. We have that either $x\in A$ or $x\in f^{-1}\left(B\right)$. If $x\in A$ then $f\left(x\right)\in f\left(A\right)$ and so $f\left(x\right)\in f\left(A\right)\cup B$, the result follows on taking the pre-image as \begin{equation*} f^{-1}\left(f\left(A\right)\cup B\right)=\left\{x\in X: f\left(x\right)\in f\left(A\right)\cup B\right\} \end{equation*} This is to say that $x\in f^{-1}\left(f\left(A\right)\cup B\right)=\left\{x\in X: f\left(x\right)\in f\left(A\right)\cup B\right\}$. Now if $x\in f^{-1}\left(B\right)$ then we have by definition that $f\left(x\right)\in B$ and by a similar argument to above we conclude that $f\left(x\right)\in f\left(A\right)\cup B$ so that on taking the pre-image we conclude that $x\in f^{-1}\left(f\left(A\right)\cup B\right)=\left\{x\in X: f\left(x\right)\in f\left(A\right)\cup B\right\}$. Hence it follows that $A\cup f^{-1}\left(B\right)\subseteq f^{-1}\left(f\left(A\right)\cup B\right)$. \item $A\cap f^{-1}\left(B\right)\subseteq f^{-1}\left(f\left(A\right)\cap B\right)$: Suppose that $x\in A\cap f^{-1}\left(B\right)$ then $x\in A$ and $x\in f^{-1}\left(B\right)$ and so $f\left(x\right)\in B$. As $x\in A$ then $f\left(x\right)\in f\left(A\right)$ and hence as $f\left(x\right)\in f\left(A\right)$ and $f\left(x\right)\in B$ then $f\left(x\right)\in f\left(A\right)\cap B$. The result follows on taking the pre-image. Hence $A\cap f^{-1}\left(B\right)\subseteq f^{-1}\left(f\left(A\right)\cap B\right)$ \end{enumerate} The proposition now follows. $\qed$ \end{proposition} \subsubsection{Injective, surjective and bijective mappings} Armed with the examples we have seen we can make a few comments about mappings. Consider example \ref{exmp:Mapping 1} where we have that $X=Y=\mathbb{N}$ and is $f$ the map \begin{align*} f:X&\mapping Y\\ x&\mapsto f\left(x\right)=2x \end{align*} We have that for every $x,y\in X$ with $f\left(x\right)=f\left(y\right)$ that $x=y$, which is to say if the image of two different elements agree, then the elements are in-fact the same. This is clear to see, suppose that $x,y\in X$ with $f\left(x\right)=f\left(y\right)$, then we have that \begin{align*} f\left(x\right)&=f\left(y\right)\\ 2x&=2y\\ x&=y \end{align*} Another way of expressing this idea is that two distinct elements in the domain will have distinct images, we say a mapping with this property is an injective mapping. Now, if we consider $\image\left(f\right)\subseteq Y$ and consider the map \begin{align*} g:X&\mapping\image\left(f\right)\\ x&\mapsto g\left(x\right)=2x \end{align*} Then, for every $y\in\image\left(f\right)$, we have that there exists some element $x\in X$ such that $y=g\left(x\right)$. Again, we can show this. Let $y\in\image\left(f\right)$, then we need to show that $\exists x\in X$ such that $g\left(x\right)=y$. Now \begin{align*} y&=g\left(x\right)\\ y&=2x\\ \frac{y}{2}&=x \end{align*} We hence will need to take $\displaystyle x=\frac{y}{2}$, however we first then to verify that $\displaystyle x=\frac{y}{2}\in X$. We note that $y\in\image\left(f\right)$ means that $y=2k$ for some $k\in\mathbb{N}$, so \begin{align*} x&=\frac{y}{2}\\ x&=\frac{2k}{2}\\ x&=k \end{align*} as $x\in X=\mathbb{N}$ and $k\in\mathbb{N}$ then we can rest safe in the knowledge that our choice for $x$ indeed works. As a sanity check we have that \begin{equation*} g\left(x\right)=2x=2\frac{y}{2}=y \end{equation*} This choice of $x$ works for any choice of $y$. Another way to express this idea is that every element in the image of the mapping is the image of some element in the domain, we say a mapping with this property is a surjective mapping. It is worth noting that the mapping $g$ is both injective and surjective, this makes $g$ a special type of mapping. If we take an element in the domain $x$ and consider its image $g\left(x\right)\in\image\left(f\right)$, then as $g$ is injective we know that $g\left(x\right)$ is a distinct element in $\image\left(f\right)$. Moreover, as $g$ is surjective then there is an element in the domain, say $a$ with the property that $g\left(a\right)=g\left(x\right)$, but as $g$ is injective then we know that $a=x$. This means that we can go between elements of the domain and elements of the image in a distinct way, a mapping with this property is called a bijective mapping and the domain and image are said to be in bijection with each other. We formalise these ideas now to a mapping between any two sets. \begin{definition}{Injective, surjective and bijective maps} Let $f:X\mapping Y$ be a mapping between two sets $X$ and $Y$. \begin{enumerate} \item We say that $f$ is an injective mapping, sometimes called a one-to-one mapping, if \begin{equation*} \forall x,y\in X,\ f\left(x\right)=f\left(y\right) \Rightarrow x=y \end{equation*} That is we have that $f\left(x\right)=f\left(y\right)$ for $x,y\in X$ then $x=y$. If we know that $f$ is injective we can write the mapping as \begin{equation*} f:X\inject Y \end{equation*} which is read as $f$ is an injective mapping from $X$ to $Y$. \item We say that $f$ is a surjective mapping, sometimes called a onto mapping, if \begin{equation*} \forall y\in Y,\exists x\in X: y=f\left(x\right) \end{equation*} That is we have that for each $y\in Y$, there exists some $x\in X$ such that $f\left(x\right)=y$. If we know that $f$ is a surjective then we can write the mapping as \begin{equation*} f:X\onto Y \end{equation*} which is read as $f$ is a surjective mapping from $X$ to $Y$ \item We say that $f$ is a bijective mapping, sometimes called a one-to-one and unto mapping, if $f$ is both injective and surjective. If we know that $f$ is a bijection then we can write the mapping as \begin{equation*} f:X\Biject Y \end{equation*} which is read as $f$ is a bijective mapping from $X$ to $Y$. \end{enumerate} \end{definition} We will look for additional examples of each type of mapping. \begin{example} Let $f:\mathbb{N}\mapping\mathbb{N}$ where $f\left(x\right)=x$. We will prove that $f$ is a bijective mapping. Proof: To show $f$ is bijective we show that $f$ is injective and surjective. To see that $f$ is an injection, suppose that $f\left(x\right)=f\left(y\right)$ where $x,y\in N$, the domain. then we have that \begin{align*} f\left(x\right)&=f\left(y\right)\\ x&=y \end{align*} This shows $f$ is injective as this holds for any choice of $x,y\in \mathbb{N}$. To see that $f$ is surjective consider $y\in\mathbb{N}$, the co-domain, we show there exists an $x\in\mathbb{N}$, the domain, so that $f\left(x\right)=y$. We have \begin{align*} y&=f\left(x\right)\\ y&=x \end{align*} so we take $x=y$. This works for every $y\in\mathbb{N}$, the co-domain, so $f$ is surjective. As $f$ is both injective and surjective it is by definition a bijective map, that is $f:\mathbb{N}\Biject\mathbb{N}$. $\qed$ \end{example} \begin{example} Let $f:\mathbb{N}\mapping\mathbb{N}$ where \begin{equation*} f\left(x\right)=\begin{cases} x,\ \text{If } x \text{ is odd}\\ \frac{x}{2},\ \text{If } x \text{ is even}\\ \end{cases} \end{equation*} Is $f$ injective? To see if it is we would need to show that $f\left(x\right)=f\left(y\right)$ with $x,y\in \mathbb{N}$ means that $x=y$. It becomes clear that there are $x,y\in\mathbb{N}$ where this does not hold, for example $f\left(1\right)=1$ and $f\left(2\right)=1$ so $f\left(1\right)=f\left(2\right)$ but $1\neq 2$. This shows that $f$ is not injective. Is $f$ surjective? To see if it is we would need to show that $\forall y\in\mathbb{N},\exists x\in\mathbb{N}$ such that $y=f\left(x\right)$. Note that for every even input $x=2k$ we have that $\displaystyle f\left(x\right)=\frac{2k}{2}=k$. So for any $y\in\mathbb{N}$ if we take $x=2y$ then every $y\in\mathbb{N}$ gets mapped to to by $2y$. So $f$ is surjective. As $f$ was not injective we have that $f$ is not a bijection, so we have $f:\mathbb{N}\onto\mathbb{N}$. \end{example} \begin{example} Let $X=\left\{1,2\right\}$ and $Y=\left\{3,4,5\right\}$ and define the map $f:X\mapping Y$ by \begin{equation*} f\left(1\right)=3,\ f\left(2\right)=4 \end{equation*} Then it is clear that $f$ is injective, as each input is mapped to a distinct output. More formally suppose that $f\left(x\right)=f\left(y\right)$ where $x,y\in X$. We have that by the definition of the mapping $f\left(1\right)=3,\ f\left(2\right)=4$. In the first case we have $f\left(x\right)=f\left(y\right)=3$ and so $x=y=1$, likewise in the second case we have that $f\left(x\right)=f\left(y\right)=4$ and so $x=y=2$. This proves injectivity. To see that $f$ is not surjective, consider the image $\image\left(f\right)=\left\{f\left(x\right):x\in X\right\}=\left\{3,4\right\}\neq Y$. So $\exists y\in Y$ such that $\not\exists x\in X$ with $y=f\left(x\right)$. It hence follows that $f$ is not bijective, that is $f:\left\{1,2\right\}\inject\left\{3,4,5\right\}$. \end{example} \begin{example} Let $X=\left\{1,2,3\right\}$ and $Y=\left\{4,5\right\}$ and define the map $f:X\mapping Y$ by \begin{equation*} f\left(1\right)=4,\ f\left(2\right)=4,\ f\left(3\right)=5 \end{equation*} We have that $f$ is not injective as $f\left(1\right)=f\left(2\right)=4$ but $1\neq 2$. However we have that $f$ is surjective as the image of $f$ is $\image\left(f\right)=\left\{f\left(x\right):x\in X\right\}=\left\{4,5\right\}=Y$. By definition $f$ is not bijective, hence $f:\left\{1,2,3\right\}\onto\left\{4,5\right\}$. \end{example} We note that we can always construct a mapping $g$ from $f:X\rightarrow Y$ such that $g:X\mapping\image\left(f\right)$ is a surjection. \begin{proposition}{The restriction of a mappings co-domain to its image is a surjective mapping}\label{prob:RestOfCodomainToImageIsSurjective} Let $f:X\mapping Y$ be a mapping and consider $\image\left(f\right)=\left\{f\left(x\right):x\in X\right\}$. Consider the following mapping \begin{align*} g:X&\mapping\image\left(f\right)\\ x&\mapsto f\left(x\right) \end{align*} Then $g$ is a surjective map. Proof: Let $f:X\mapping Y$ and consider $\image\left(f\right)=\left\{f\left(x\right):x\in X\right\}$. By the definition of the image of a mapping \ref{def:ImageMapping} we have that $\image\left(f\right)\subseteq Y$. Moreover, by the definition of the image of a map we have that $y\in\image\left(f\right)$ if and only if $\exists x\in X$ such that $y=f\left(x\right)$. This will hold for all $y\in\image\left(f\right)$ so $g$ is a surjection. $\qed$. \end{proposition} In the proof we used the idea of restricting the co-domain of the function so that it was the image $\image\left(f\right)$ rather than $Y$, while leaving the domain $X$ unchanged. In actuality we didn't restrict the co-domain at all but instead only considered those elements of the co-domain that actually get mapped to. It should be clear that the image $\image\left(f\right)$, the elements that actually get mapped to, only depends on the allowable inputs for the function, that is only depend on the domain $X$. In many fields of mathematics it is sometimes desirable to restrict the domain $X$ that is being worked with to a smaller subset of the domain $A\subseteq X$. As a quick example of why this is useful, and which we will see later, is for inverse mappings. For now the key idea of an inverse map is to be able to create a bijection between a mapping and its domain and co-domain to enable us to unambiguously go between the two. Why is this useful? For an example, suppose that you wanted to go on holiday abroad then you’ll need to convert your currency to the currency that is in use where you go to. Suppose that you use gold coins where as the contry you vist only uses silver coins. The exchange rate from gold coins to silver coins is given by the following mapping $E\left(x\right) = Ax^2$ where the domain is the set of all the numbers that we are familiar with, that is $\mathbb{R}$, and $A$ is some positive number which is greater than 0. Suppose we wish to convert $50$ gold coins into the new currency, then we will have $E\left(50\right)=A*50^2=2500A$ silver coins. Finally suppose that after our holiday we have some silver coins left over that we wish to convert back to gold coins, say $2500A-y$ where $00$ for every $x\in\mathbb{N}$. Observe also that $f$ is an injective map, indeed let $x,y\in\mathbb{N}$ and suppose $f\left(x\right)=f\left(y\right)$ then \begin{align*} f\left(x\right)&=f\left(y\right)\\ x+1&=y+1\\ x&=y \end{align*} It is also worth noting that $g$ is not injective as we have $g\left(1\right)=0=g\left(0\right)$ but $1\neq 0$. We note that $f$ is the right inverse of $g$ as the calculation above shows. \end{example} \begin{example} Let $X=\mathbb{R}$ and define $Y=\mathbb{R}^+=\left\{x\in\mathbb{R}:x\geq 0\right\}$, the set of familiar numbers. Let $f:\mathbb{R}\mapping\mathbb{R}^+$ be define by $f\left(x\right)=x^2$. We can define two possible right inverses of $f$. The first is given by $g_1:\mathbb{R}^+\mapping\mathbb{R}$ where $g_1\left(x\right)=\sqrt{x}$. Indeed \begin{equation*} f\circ g_1\left(x\right)=f\left(g_1\left(x\right)\right)=f\left(\sqrt{x}\right)=\left(\sqrt{x}\right)^2=x=\id_{\mathbb{R}}\left(x\right) \end{equation*} The second, as you may have guessed, is given by $g_2:\mathbb{R}^+\mapping\mathbb{R}$ where $g_1\left(x\right)=-\sqrt{x}$ where likewise we have \begin{equation*} f\circ g_2\left(x\right)=f\left(g_2\left(x\right)\right)=f\left(-\sqrt{x}\right)=\left(-\sqrt{x}\right)^2=x=\id_{\mathbb{R}}\left(x\right) \end{equation*} We note that $f$ is surjective. Let $y\in\mathbb{R}^+$ then $f\left(x\right)=y\Rightarrow x^2=y\Rightarrow x=\pm\sqrt{y}\in\mathbb{R}$, hence every output of $f$ is mapped to by some input. It is clear that $f$ is not injective as $f\left(2\right)=4=f\left(-2\right)$. Does $f$ have a left inverse?. By the definition of a left inverse we will need to find some $g:\mathbb{R}^+\mapping\mathbb{R}$ such that $g\circ f=id_{\mathbb{R}}$. So for each input of $f$, $g$ will have to send $f\left(x\right)$ back to $x$, hence we might require that $f$ be injective, for if not then $\exists x,y\in\mathbb{R}$ such that $f\left(x\right)=f\left(y\right)$ with $x\neq y$ and we have the problem where $g$ could send $f\left(x\right)$ back to either $x$ or $y$, and if it is sent back to $y$ then we don't have the identity mapping! Now, $f$ is not injective as we have seen that $f\left(2\right)=4=f\left(-2\right)$, so if there where a left inverse $g$ it wouldn't know where to send $4$ back to, it could have been either $2$ or $-2$. \end{example} \begin{example} Let $X=\mathbb{R}$ and $Y=\mathbb{R}\setminus\left\{0\right\}=\left\{x\in\mathbb{R}:x\neq 0\right\}$. You may have seen the function $e^x$ before, we shall consider this mapping, that is the mapping $f:\mathbb{R}\mapping\mathbb{R}\setminus\left\{0\right\}$ given by $f\left(x\right)=e^x=\exp\left(x\right)$. We can define a left inverse to $f$ by $g:\mathbb{R}\setminus\left\{0\right\}\mapping\mathbb{R}$ where $g\left(x\right)=\ln\left(x\right)$, where $\ln\left(x\right)$ is the natural logarithm, the logarithm to the base $e$. We will discuss logarithms in more detail later but for now we can think of $\ln\left(x\right)=y$ as asking the question $e^y=x$, that is value of $y$ do we need to raise $e$ to to get $x$. This $g$ is indeed a left inverse of $f$ as \begin{equation*} g\circ f\left(x\right)=g\left(f\left(x\right)\right)=g\left(e^x\right)=\ln\left(e^x\right)=x=\id_{\mathbb{R}} \end{equation*} Like in the previous example, we can ask the question does $f$ have a right inverse? By definition for $f$ to have a right inverse, there needs to be a mapping $g:\mathbb{R}\setminus\left\{0\right\}\mapping\mathbb{R}$ such that $f\circ g=\id_\mathbb{R}\setminus\left\{0\right\}$. So for each $g\left(y\right)$ with $y\in\mathbb{R}\setminus\left\{0\right\}$ we have that $f$ will send $g\left(y\right)$ back to $y$. This will happen if every output of $f$ has some input that generates it, that is $f$ is a surjection. If this not the case then there is some element $y\in\mathbb{R}\setminus\left\{0\right\}$ that is not mapped to by $f\left(x\right)$ for some $x\in\mathbb{R}$. For example we have that $\not\exists x\in\mathbb{R}$ such that $e^x=-1$ for example. So $f$ is not surjective in this case we are not able to define a right inverse that makes sense. \end{example} We can generalise the last two examples to the next two propositions. \begin{proposition}{Condition for the existence of a left inverse}\label{prop:LeftInverseIffInjective} Let $f:X\mapping Y$ be a mapping with $X\neq\emptyset$. We have that $f$ has a left inverse $g:Y\mapping X$ such that $g\circ f=\id_X$ if and only if $f$ is an injective mapping. Proof: $\left(\Rightarrow\right)$: Suppose that $f$ has a left inverse $g:Y\mapping X$ such that $g\circ f=\id_X$. We know by proposition \ref{prop:IdentityMapProperties} that $\id_X$ is an injective mapping, moreover we know by proposition \ref{prop:CompositeMapInectSurjectProp} that if a composite map $g\circ f$ is injective then so is $f$. Hence as $g\circ f = \id_X$ and $\id_X$ is injective, we conclude that $f$ is an injective map. $\left(\Leftarrow\right)$: Suppose that $f$ is an injective map, then $\forall x,y\in X$ we have that $f\left(x\right)=f\left(y\right)\Rightarrow x=y$. Let $x\in X$, we need to construct a map which acts as a left inverse to $f$. Consider the following map $\mathrel{h\restriction_{\image\left(f\right)}}:\image\left(f\right)\mapping X$, where we send $y\in\image\left(f\right)$ back to the element that it was mapped from. Now, define $g$ as follows \begin{align*} g:Y&\mapping X\\ y&\mapsto g\left(y\right)=\begin{cases} x,\ \text{If } y\in Y\setminus\image\left(f\right)\\ h\left(y\right),\ \text{If } y\in\image\left(f\right) \end{cases} \end{align*} We note that if $\image\left(f\right) = Y$ then we do not need to consider the first case $x,\ \text{If } y\in Y\setminus\image\left(f\right)$, however if $\image\left(f\right) \subset Y$ then there exists at least one $x$ for this case. Now with this $g$ we have that \begin{equation*} g\circ f\left(x\right)=g\left(f\left(x\right)\right)=h\left(f\left(x\right)\right)=x=\id_X \end{equation*} Hence $g$ is indeed a left inverse of $f$. The proposition now follows. $\qed$ \end{proposition} \begin{proposition}{Condition for the existence of a right inverse}\label{prop:RightInverseIffSurjective} Let $f:X\mapping Y$ be a mapping with $X\neq\emptyset$. We have that $f$ has a right inverse $g:Y\mapping X$ such that $f\circ g=\id_Y$ if and only if $f$ is a surjective mapping. Proof: $\left(\Rightarrow\right)$: Suppose that $f$ has a right inverse $g:Y\mapping X$ such that $f\circ g=\id_Y$. We know by proposition \ref{prop:IdentityMapProperties} that $\id_X$ is a surjective mapping, moreover we know by proposition \ref{prop:CompositeMapInectSurjectProp} that if a composite map $f\circ g$ is surjective then so is $f$. Hence as $f\circ g = \id_Y$ and $\id_Y$ is surjective, we conclude that $f$ is a surjective map. $\left(\Leftarrow\right)$: Suppose that $f$ is a surjective map, then $\forall y\in Y,\exists x\in X: f\left(x\right)=y$. We need to construct a $g:Y\mapping X$ such that $f\circ g=\id_Y$. As $f$ is surjective we have that $\forall y\in Y,\exists x\in X: f\left(x\right)=y$, in particular we know that there maybe more than one such $x$ so that $f\left(x\right)=y$, if this is the case we pick for that $y$ one of the possible choices of $x$. Hence we can define $g\left(y\right)=x$ for every $y\in Y$ then we have that $f\circ g\left(y\right)=f\left(g\left(y\right)\right)=f\left(x\right)=y=\id_Y$ The proposition now follows. $\qed$ \end{proposition} These two propositions give the following immediate results \begin{proposition}{Left inverse of injective mapping is a surjection}\label{LeftInverseOfInjectionIsSurjective} Let $f:X\rightarrow Y$ be an injection with left inverse $g:Y\rightarrow X$. We have that $g$ is a surjection. Proof let $f$ and $g$ be as stated. Then by definition of a left inverse we have that $g\circ f =\id_X$. Moreover we have the identity mapping $\id_X$ is an injection as it is bijective. We then have by proposition \ref{prop:CompositeMapInectSurjectProp} that $g$ is a surjection. $\qed$ \end{proposition} \begin{proposition}{Right inverse of surjective mapping is an injection}\label{RightInverseOfSurjecctionisInection} Let $f:X\rightarrow Y$ be a surjection with right inverse $g:Y\rightarrow X$. We have that $g$ is an injection. Proof let $f$ and $g$ be as stated. Then by definition of a right inverse we have that $f\circ g =\id_Y$. Moreover we have the identity mapping $\id_Y$ is a surjection as it is bijective. We then have by proposition \ref{prop:CompositeMapInectSurjectProp} that $g$ is an injection. $\qed$ \end{proposition} The ideas of a left and right inverse will allow us to construct the idea of a so-called two-sided inverse, that is an inverse which is both a left inverse and a right inverse. this will allow us to consider when a mappings can be inverted without regards to how we compose the mappings. However there is one final result about left and right inverse that will be required in order to pave the way. \begin{proposition}{Bijection has a left and right inverse}\label{prop:BijectionHasLeftRightInverse} Let $f:X\rightarrow Y$ be a bijective mapping. We have that there exists a left inverse $g:Y\rightarrow X$ and there exists a right inverse $h:Y\rightarrow X$ such that \begin{align*} g\circ f &= \id_X\\ f\circ h&=\id_Y \end{align*} Proof: Let $f:X\rightarrow Y$ be a bijection. We have that as $f$ is a bijection then we know that $f$ is both injective and surjective. Now by proposition \ref{prop:LeftInverseIffInjective} that a left inverse exists if and only if $f$ is an injective mapping. Likewise by proposition \ref{prop:RightInverseIffSurjective} we have that a right inverse exists if and only if $f$ is a surjective mapping. Hence we have the existence of a left and right inverse. As required. $\qed$ \end{proposition} \begin{proposition}{The existence of a left and right inverse implies a bijection}\label{prop:LeftRightInverseImpliesBijection} Let $f:X\mapping Y$ be a mapping such that $\exists g_1:Y\mapping X$ such that $g_1\circ f=\id_X$ and $\exists g_2:Y\mapping X$ such that $f\circ g_2=\id_Y$. We have that $f$ is a bijection. Proof: Let $f:X\mapping Y$ be a mapping such that $\exists g_1:Y\mapping X$ such that $g_1\circ f=\id_X$ and $\exists g_2:Y\mapping X$ such that $f\circ g_2=\id_Y$. We have by proposition \ref{prop:LeftInverseIffInjective} that as $g_1$ is a left inverse of $f$ then $f$ must be injective. Likewise by proposition \ref{prop:RightInverseIffSurjective} that as $g_2$ is a right inverse of $f$ then $f$ must be surjective. It hence follows by definition that $f$ is a bijective mapping. $\qed$ \end{proposition} These propositions are useful in proving the following. \begin{proposition}{Bijection if and only if left and right inverses exist} Let $f:X\mapping Y$ be a mapping. We have that $f$ is bijective if and only if $\exists g_1:Y\mapping X$ such that $g_1\circ f=\id_X$ and $\exists g_2:Y\mapping X$ such that $f\circ g_2=\id_Y$. Proof: $\left(\Rightarrow\right)$: Let $f: X\rightarrow Y$ be a bijective mapping. We have by proposition \ref{prop:BijectionHasLeftRightInverse} we have that $f$ being a bijection gives the existence of a left and right inverse. $\left(\Leftarrow\right)$: Suppose we have a mapping $f:X\rightarrow Y$ such that $\exists g_1:Y\mapping X$ such that $g_1\circ f=\id_X$ and $\exists g_2:Y\mapping X$ such that $f\circ g_2=\id_Y$. Then $f$ has both a left inverse and a right inverse, hence by proposition \ref{prop:LeftRightInverseImpliesBijection} we have that $f$ is a bijection. The result is shown. $\qed$ \end{proposition} We have seen that if $f:X\rightarrow Y$ is a bijection then $f$ has both a left and a right inverse, likewise if these two inverses exist then we have that $f$ is a bijection. This property is key to defining what we mean by the inverse to a bijective mapping. \begin{definition}{Inverse} Let $f:X\mapping Y$ be a mapping. We say that the mapping $g:Y\mapping X$ is an inverse\footnote{We will first need to prove that in order to speak of the inverse of a mapping that we will need the left and right inverses to be equal} of $f$ if we have that $g$ is both a left inverse and a right inverse for $f$. This is to say, $g$ is an inverse of $f$ if we have that \begin{align*} g\circ f&=\id_X\\ f\circ g &=\id_Y \end{align*} We sometimes use the notation $f^{-1}$ to denote the inverse. \end{definition} \begin{example} Let $f:\mathbb{R}^+\mapping\mathbb{R}^+$ be such that $f\left(x\right)=x^2$, then we have that $g:\mathbb{R}^+\mapping\mathbb{R}^+$ with $g\left(x\right)=\sqrt{x}$ is an inverse of $f$. Indeed \begin{align*} g\circ f\left(x\right)&=g\left(f\left(x\right)\right)=g\left(x^2\right)=\sqrt{x^2}=x=\id_{\mathbb{R}^+}\\ f\circ g\left(x\right)&=f\left(g\left(x\right)\right)=f\left(\sqrt{x}\right)=\left(\sqrt{x}\right)^2=x=\id_{\mathbb{R}^+}\\ \end{align*} \end{example} \begin{example} The identity mapping $\id_X:X\mapping X$ with $\id_X\left(x\right)=x,\ \forall x\in X$ is its own inverse, indeed \begin{equation*} \id_X\circ\id_X=\id_X\left(\id_X\left(x\right)\right)=\id_X\left(x\right)=x=\id_X \end{equation*} \end{example} \begin{example} Let $f:\left\{1,2\right\}\mapping\left\{a,b\right\}$ be such that $f\left(1\right)=a$ and $f\left(2\right)=b$. We have that $g:\left\{a,b\right\}\mapping\left\{1,2\right\}$ with $g\left(a\right)=1$ and $g\left(b\right)=2$ is an inverse to $f$. Indeed we have that \begin{align*} f\left(g\left(a\right)\right)&=f\left(1\right)=a\\ f\left(g\left(b\right)\right)&=f\left(2\right)=b\\ \end{align*} It also follows that $g$ is an inverse to $f$, indeed \begin{align*} g\left(f\left(1\right)\right)&=g\left(a\right)=1\\ g\left(f\left(1\right)\right)&=g\left(b\right)=2\\ \end{align*} \end{example} \begin{example} Let $f:\mathbb{R}\mapping\mathbb{R}^+$ be given by $f\left(x\right)=e^x$. We have that $g:\mathbb{R}^+\mapping\mathbb{R}$ where $g\left(x\right)=\ln\left(x\right)$ is an inverse of $f$. \end{example} We shall prove that the composition of a mapping and its inverse gives the identity mapping. Firstly, we will need to show the following propositions. \begin{proposition}{Mapping is injective and surjective if and only if the inverse is a mapping}\label{prop:MappingInjectiveSurjectiveIFFInverseIsMapping} Let $f:X\rightarrow Y$ be a mapping. We have that $f$ is a bijection if and only if $f^{-1}$, the inverse of $f$, is a mapping. Proof: $\left(\Rightarrow\right):$ Let $f:X\rightarrow Y$ be a bijection, then $f$ is both surjective and injective. Let $y\in Y$, then as $f$ is surjective we have that $\exists x\in X$ such that $f\left(x\right)=y$, moreover by injectivity of $f$ we have that there is only one such $x$ which does this. Define $g:Y\rightarrow X$ by \begin{equation*} g\left(y\right)=x \end{equation*} As $y\in Y$ is an arbitrary element, it follows that \begin{equation*} \forall y\in Y:\exists x\in X : g\left(y\right)=x \end{equation*} such that $x$ is unique for a given $y$. That is $g$ is a mapping. Now by the definition of $g$ we have that \begin{equation*} \forall y\in Y: f\left(g\left(y\right)\right)=y \end{equation*} Now, let $x\in X$ and let \begin{equation*} x'=g\left(f\left(x\right)\right) \end{equation*} then \begin{equation*} f\left(x'\right)=f\left(g\left(f\left(x\right)\right)\right)=f\left(x\right) \end{equation*} by the above. However, $f$ is an injection so we have that $x'=x$ and thus $x=g\left(f\left(x\right)\right)$. It follows that $f$ and $g$ are inverse mappings of each other. $\left(\Leftarrow\right):$ Suppose that $f:X\rightarrow Y$ is a mapping, moreover suppose that $f^{-1}:Y\rightarrow X$ is also a mapping which is the inverse of $f$. We show that $f$ must be a bijection. \begin{enumerate} \item $f$ is injective: Let $x,y\in X$ and suppose that $f\left(x\right)=f\left(y\right)$ \begin{align*} f\left(x\right)&=f\left(y\right)\\ f^{-1}\left(f\left(x\right)\right)&=f^{-1}\left(f\left(y\right)\right)\\ \Rightarrow x&=y,\ \text{As } f^{-1} \text{ is the inverse of f} \end{align*} Hence we have that $f$ is injective. \item $f$ is surjective: Suppose that $y\in Y$. We then have that \begin{align*} y&\in Y\\ \Rightarrow f^{-1}\left(y\right)&\in X,\ \text{As } f^{-1} \text{ is the inverse of f}\\ \Rightarrow f\left(^{-1}\left(y\right)\right)&=y,\ \text{By definition of an inverse mapping}\\ \Rightarrow \exists x\in X: f\left(x\right)&= y,\ \text{Where } x=f^{-1}\left(y\right) \end{align*} Hence we have that $f$ is surjective. \end{enumerate} As $f$ is both injective and surjective it is a bijection. $\qed$ \end{proposition} We can now show that the inverse of a bijective mapping is also a bijective mapping. \begin{proposition}{Inverse of a bijective mapping is a bijective mapping}\label{prop:InverseBijectionIsBijection} Let $f:X\rightarrow Y$ be a bijective mapping. We have that $f^{-1}:Y\rightarrow X$, the inverse of $f$, is also a bijection. Proof: Let $f:X\rightarrow Y$ be a bijective mapping. By definition of being a bijection we have that $f$ is both injective and surjective. By proposition \ref{prop:MappingInjectiveSurjectiveIFFInverseIsMapping} we have that $f^{-1}$ is a mapping. Now it is clear that the inverse of the inverse is the original mapping that is. \begin{equation*} \left(f^{-1}\right)^{-1}=f \end{equation*} Now, $f$ is a bijection and thus is a mapping. But as $f$ is a mapping we have that by proposition \ref{prop:MappingInjectiveSurjectiveIFFInverseIsMapping} we have that $f^{-1}$ is a bijection. As required. $\qed$ \end{proposition} We can now see that the composition of a bijective mapping with its inverse must be the identity map. \begin{proposition}{Composition of bijective mapping with the inverses is the identity mapping}\label{prop:BijectionWithInverseIsIdentity} Let $f:X\rightarrow Y$ be a bijective mapping, and let $f^{-1}:Y\rightarrow X$ be the inverse mapping of $f$. We have that \begin{align*} f\circ f^{-1} &=\id_Y\\ f^{-1}\circ f &= \id_X \end{align*} Proof: Let $f:X\rightarrow Y$ be a bijective mapping, with inverse given by $f^{-1}:Y\rightarrow X$. As $f$ is bijective we have that by proposition \ref{prop:InverseBijectionIsBijection} we have that $f^{-1}$ is a bijection. Let $x\in X$, then we have that \begin{equation*} \exists y\in Y: f\left(x\right)=y \Rightarrow f^{-1}\left(y\right)=x \end{equation*} Hence, we have that \begin{align*} f^{-1}\circ f\left(x\right)&=f^{-1}\left(f\left(x\right)\right),\ \text{By function composition}\\ &=f^{-1}\left(y\right),\ \text{By above}\\ &=x,\ \text{By above}\\ &=\id_X\left(x\right),\ \text{By the definition of the identity map of } X \end{align*} We have that the domain of $f^{-1}\circ f$ is clearly $X$, likewise the co-domain is $X$, which is the same as $\id_X$. Moreover $\forall x\in X$ we have $f^{-1}\circ f\left(x\right)=x=\id_X\left(x\right)$. So the mappings are equal. Likewise, let $y\in Y$, then we have that \begin{equation*} \exists x\in X: f^{-1}\left(y\right)=x \Rightarrow f\left(x\right)=y \end{equation*} Hence, we have that \begin{align*} f\circ f^{-1}\left(y\right)&=f\left(f^{-1}\left(y\right)\right),\ \text{By function composition}\\ &=f\left(x\right),\ \text{By above}\\ &=y,\ \text{By above}\\ &=\id_Y\left(y\right),\ \text{By the definition of the identity map of } Y \end{align*} We have that the domain of $f\circ f^{-1}$ is clearly $Y$, likewise the co-domain is $Y$, which is the same as $\id_Y$. Moreover $\forall y\in Y$ we have $f\circ f^{-1}\left(y\right)=y=\id_Y\left(y\right)$. So the mappings are equal. In both cases the composition yields the required identity mappings, as required. $\qed$ \end{proposition} \pagebreak \section{The Natural numbers} \epigraph{The natural numbers are the work of God. All the rest is the work of mankind.}{\textit{Leopold Kronecker (Paraphrased)}} \subsection{Constructing the Natural numbers} We now have enough tools and core theory to start building up from the foundations of mathematics. We do this using the ZFC axioms, although perhaps not with the complete rigour we should be using. We touched on these briefly in section \ref{subsubSec:ZFCAxioms}. We will state them again. \begin{enumerate} \item The axiom of extensionality: The axiom of extensionality asserts that two sets are equal if and only if they contain the same elements. \item The axiom of the empty-set: The axiom of the empty-set asserts that there exists a set which contains no elements \item The axiom of pairing: The axiom of pairing asserts that given any set $A$ and any set $B$, there is a set $C$ such that, given any set $D$, $D$ is a member of $C$ if and only if $D$ is equal to $A$ or $D$ is equal to $B$. This is to say, given two sets, there is a set whose members are exactly the two given sets. \item The axiom of specification: The axiom of specification asserts that we can construct a set which satisfies a given condition, so long as this condition is not inherently contradictory. \item The axiom of unions: The axiom of unions asserts that we can perform the union of two sets $A$ and $B$ \item The axiom of powers: The axiom of powers asserts that for any set $S$ we can construct a set $P\left(S\right)$ whose elements are all the possible subsets of $S$. \item The axiom of infinity: The axiom of infinity asserts that there is at least one infinite set $A$, that is at least one set with infinitely many elements. That is we have a set $A$ such that the $\emptyset\in A$ and if $x\in A$ then the set $x\cup\left\{x\right\}$ is also in $A$. \item The axiom of replacement: We will need the next section to fully understand this axiom, however informally asserts that for some set $S$, and form another set by replacing the elements of $S$ by other sets according to any definite rule. \item The axiom of foundation: The axiom of foundation asserts that for every non-empty set $S$, there exists an element $x\in S$ such that $x$ and $S$ are disjoint. This also asserts that no set can contain itself. \end{enumerate} We also recall that we include the symbol $\in$ in the ZFC axioms, which allows us to talk about element inclusions in sets. In other words, ZFC defines a set of axioms that allow us to talk about sets and elements of sets. Next, we have that, formally speaking, ZFC is allowed to make statements about mappings. Finally, we will ZFC has the power to prove the results in the previous two sections we made on sets and mappings, so we will assume these as well. We will use this as the building blocks for building the natural numbers. How can we do this from the ZFC axioms? As it stands right now ZFC only gives us the existence of the empty set, and there is at least a set which contains infinitely many elements. We start with the empty set, a set which contains no elements, we can use the ZFC axioms to build a new set which contains the empty set. Our ultimate goal is to identify each natural number with the number of elements in some corresponding set. Hence naturally the empty set containing no elements would be identified with the number $0$, and so on. The question is given that we only have the empty set, how can we build a new set? We can use the axiom of powers. This states that we can take any set $S$ and construct a new set $P\left(S\right)$ whose elements are the possible subsets of $S$. Applying this to the empty-set, a set which contains no elements and thus has no subsets except for itself, must give us $P\left(\emptyset\right)=\left\{\emptyset\right\}$. This is sufficient for what we need to do. So, we have two sets, $\emptyset$ and $\left\{\emptyset\right\}$. We shall identify $\emptyset$ with $0$ and $\left\{\emptyset\right\}$ with $1$. \begin{definition}{Zero}\label{def:Zero} We define the number zero to be $\emptyset$. That is, we say Zero is a set that contains no elements. \end{definition} \begin{definition}{One}\label{def:One} We define the number zero to be $\left\{\emptyset\right\}$. That is, we say One is the set whose only element is $\emptyset$. \end{definition} How do we define any more numbers? We can use the axiom of unions. This raises the question why not use the axiom of powers again? If we apply the axiom of powers to $\left\{\emptyset\right\}$ we get the set \begin{equation*} P\left(\left\{\emptyset\right\}\right)=\left\{\emptyset,\left\{\emptyset\right\}\right\} \end{equation*} If we assume we already know what the natural numbers are, we could identify this with the number $2$. However, a repeated application of the axiom of powers would give us \begin{equation*} P\left(\left\{\emptyset,\left\{\emptyset\right\}\right\}\right)=\left\{\emptyset,\left\{\emptyset\right\},\left\{\left\{\emptyset\right\}\right\},\left\{\emptyset,\left\{\emptyset\right\}\right\}\right\} \end{equation*} Which we would identify with the number $4$. Another application would give us a set that we would identify with the number $8$. Clearly, we are skipping numbers such as $3,5,7,9$ etc. We can't get additional numbers that aren't powers of $2$. Instead, we can define an operation that will allow us to construct each number one at a time. This operation uses the axiom of unions, and starts of with the numbers $0$ and $1$, which we recall are the sets $\emptyset$, and $\left\{\emptyset\right\}$ respectively. Applying the axiom of unions to these two sets gives us \begin{equation*} \emptyset\cup\left\{\emptyset\right\}=\left\{\emptyset,\left\{\emptyset\right\}\right\} \end{equation*} This is in agreement with $P\left(\left\{\emptyset\right\}\right)$, so we can identify this with the number $2$. Now, the axiom of pairing allows us to create a set that contains as elements any two sets that have already been created. Applying this to $\left\{\emptyset,\left\{\emptyset\right\}\right\}$ with itself allows us to create the set $\left\{\left\{\emptyset,\left\{\emptyset\right\}\right\}\right\}$. Hence we can now apply this operation again on the set $\left\{\emptyset,\left\{\emptyset\right\}\right\}$ to get \begin{equation*} \left\{\emptyset,\left\{\emptyset\right\}\right\}\cup\left\{\left\{\emptyset,\left\{\emptyset\right\}\right\}\right\}=\left\{\emptyset,\left\{\emptyset\right\},\left\{\left\{\emptyset,\left\{\emptyset\right\}\right\}\right\}\right\} \end{equation*} A set of $3$ elements so we identify this with the number $3$. We can keep doing this to build the Natural numbers. Lets make some definitions \begin{definition}{The successor operation} Let $x$ be a set. We define the successor operation, denoted by $S$ to be given by \begin{equation} S\left(x\right)= x\cup\left\{x\right\} \end{equation} \end{definition} We call this the successor function, as it is clear in the context of the Natural numbers that $S\left(n\right)=n+1$, but we shall prove this later. This definition allows us to essentially make any finite number. This leads us to our first potential definition for the Natural numbers. We first need to define the idea of recursion. We have the following proposition \begin{proposition}{Equality of successor operation}\label{prop:EqualSuccOp} Let $a,b$ be sets. We have that $S\left(a\right)=S\left(b\right)$ if and only if $a=b$. Proof: $\left(\Rightarrow\right):$ Suppose that $a,b$ are sets and $S\left(a\right)=S\left(b\right)$. By definition of $S$ we have that \begin{equation*} a\cup\left\{a\right\}=b\cup\left\{b\right\} \end{equation*} Now, as $a\in S\left(a\right)$ and $S\left(a\right)=S\left(b\right)$ then we have that $a\in b\cup\left\{b\right\}$ and so $a\in b$ or $a=b$. Similarly, as $b\in S\left(b\right)$ we get that $b\in a\cup\left\{a\right\}$ and so $b\in a$ or $b=a$. Now, if $a=b$ we are done, so suppose $a\neq b$, then we have that $a\in b$ and $b\in a$. Consider the set given by \begin{equation*} X=\left\{a,b\right\} \end{equation*} which can be constructed by the Axiom of pairing. Now as $a\in b$ we have that $b\cap \left\{a,b\right\}\neq\emptyset$ and likewise as $b\in a$ we have $a\cap \left\{a,b\right\}\neq\emptyset$. This contradicts the Axiom of Foundation, $X$ does not contain an element that is disjoint from it. It follows that we can't have $a\neq b$ and conclude that $a=b$. $\left(\Leftarrow\right):$ This is trivial by the definition of $S$. $\qed$ \end{proposition} There are a few extra properties about the successor function that we shall make use of \begin{corollary}{Successor mapping is injective} Let $a,b$ be sets. We have that the successor function is injective, that is for all sets $a,b$ we have that \begin{equation*} S\left(a\right)=S\left(b\right) \Rightarrow a=b \end{equation*} Proof: Suppose that $a,b$ are arbitrary sets and that $S\left(a\right)=S\left(b\right)$, by proposition \ref{prop:EqualSuccOp} this holds if and only if $a=b$. Hence we have injectivity. $\qed$ \end{corollary} \begin{corollary}{Empty-set is not the successor of any set} We have that $\emptyset\neq S\left(a\right)$ for all sets $a$. Proof: Consider the definition of $S\left(a\right)$ and suppose for contradiction that $\emptyset= S\left(a\right)$. We have by definition of the successor mapping that \begin{equation*} \emptyset=S\left(a\right)=a\cup\left\{a\right\} \end{equation*} This is a contradiction, as $a\cup\left\{a\right\}$ is a set of two elements, namely $a$ and $\left\{a\right\}$ but the empty-set by definition has no elements. $\qed$ \end{corollary} \begin{definition}{Recursive definition of a set} A set $S$ is defined recursively if the elements of $S$ are defined in terms of other elements $x\in S$. Moreover we have that there is some initial element $x_0$ which is used to define the other elements of the set. \end{definition} \begin{definition}{First definition of the Natural numbers} We define the set $\mathbb{N}$, called the set of natural numbers, to be the set given by \begin{equation} \mathbb{N}=\left\{x: x=\emptyset\text{ or } x=S\left(y\right)\text{ for some } y\in\mathbb{N}\right\} \end{equation} \end{definition} We have defined $\mathbb{N}$ recursively in terms of elements of $\mathbb{N}$. As an example $2\in\mathbb{N}$ as $2=S\left(1\right)$ and likewise $1=S\left(0\right)$ and we know that $0$ is really the same as $\emptyset$, which is the initial element of $\mathbb{N}$ as defined above. This definition allows us to get any $x\in\mathbb{N}$, however it is not quite enough to get every element of $\mathbb{N}$ at the same time. We know that there should be infinitely many natural numbers, indeed for any $n\in\mathbb{N}$ we have also that $n+1\in\mathbb{N}$. In other words we have a chain of sets of increasing size, that is we have \begin{align*} \mathbb{N}_0&=\emptyset=0\\ \mathbb{N}_1&=\left\{\emptyset\right\}=1\\ \mathbb{N}_2&=\left\{\emptyset,\left\{\emptyset\right\}\right\}=2\\ \mathbb{N}_3&=\left\{\emptyset,\left\{\emptyset\right\},\left\{\left\{\emptyset,\left\{\emptyset\right\}\right\}\right\}\right\}=3\\ \end{align*} Which satisfy $\mathbb{N}_0\subset\mathbb{N}_1\subset\mathbb{N}_2\subset\mathbb{N}_3\subset\dots$. So we see at each stage $\mathbb{N}_n$ is a finite set of size $n$ and so ultimately our current definition of $\mathbb{N}$ can ultimately only ever reach a finite $n$. although we can make this $n$ arbitrarily large. To ensure we get every possible $n$ at once we need to invoke the axiom of infinity. \begin{enumerate} \item The axiom of infinity: The axiom of infinity asserts that there is at least one infinite set $A$, that is at least one set with infinitely many elements. That is we have a set $A$ such that the $\emptyset\in A$ and if $x\in A$ then the set $x\cup\left\{x\right\}$ is also in $A$. \end{enumerate} There is a useful definition that we can extract from the axiom of infinity. \begin{definition}{Inductive set} Let $A$ be a set and let $f:A\rightarrow A$ be a mapping. We say that $A$ is an inductive if it satisfies the following two properties \begin{enumerate} \item $\emptyset\in A$ \item If $x\in A$ then $f\left(x\right)\in A$ \end{enumerate} For now, we will be focused on the case where $f=S$, the successor mapping. \end{definition} In light of the axiom of infinity we have a set that contains the infinitely many Natural numbers. This is nearly what we want, although it won't be the set of Natural numbers. This set could clearly have many, many more things than just the Natural numbers. We can make a new definition, which will allow us to define $\mathbb{N}$. We will also be able to show the fact this definition defines $\mathbb{N}$ to be the smallest such inductive set that contains all of the Natural numbers. \begin{definition}{The set $\mathbb{N}_S$} Let $S$ be an inductive set. We define $\mathbb{N}_S$ as follows \begin{equation} \mathbb{N}_S=\bigcap_{\substack{A\subseteq S \\ A\text{ is inductive}}} A \end{equation} This is well-defined by the axiom of specification, being an inductive step is definable and the collection of all subsets of $S$ is a set we can define. \end{definition} We have that all of these sets $\mathbb{N}_S$ are the same. \begin{theorem}{Every $\mathbb{N}_S$ set is the same set}\label{thm:EveryNsSetIsSame} Let $S$ and $T$ be inductive sets. Define the sets $\mathbb{N}_S$ and $\mathbb{N}_T$ We have that \begin{equation} \mathbb{N}_S=\mathbb{N}_T \end{equation} Proof: By the axiom of extensionality we know that two sets are equal if and only if they contain the same elements. To see that $\mathbb{N}_S$ and $\mathbb{N}_T$ have the same elements consider the new set given by \begin{equation*} C=\mathbb{N}_S\cap\mathbb{N}_T \end{equation*} We recall from proposition \ref{prop:PropertiesOfUnionIntersectionSetinclusion} that for two sets $A$ and $B$ we have $A\cap B\subseteq A$. Hence it follows that \begin{equation*} C=\mathbb{N}_S\cap\mathbb{N}_T\subseteq\mathbb{N}_S \end{equation*} That is, $C\subseteq\mathbb{N}_S$, that is to say every element of $C$ is also an element of $\mathbb{N}_S$. Now recall the definition of $\mathbb{N}_S$, \begin{equation*} \mathbb{N}_S=\bigcap_{\substack{A\subseteq S \\ A\text{ is inductive}}} A \end{equation*} We know that $C\subseteq \mathbb{N}_S$, hence as $\mathbb{N}_S$ is the intersection of all subsets of $S$ we must conclude that $C\subseteq S$. Now, we know that $S$ is an inductive set. Hence $S$ satisfies the following \begin{enumerate} \item $\emptyset\in S$ \item If $x\in S$ then $S\left(x\right)\in S$ \end{enumerate} If we can show that $C$ is an inductive set we know that $C$ was one of the sets we used to construct $\mathbb{N}_S$ and hence $\mathbb{N}_S\subseteq C$, which will give the equality $C=\mathbb{N}_S$. Now, to show that $C$ is an inductive set me must show that \begin{enumerate} \item $\emptyset\in C$ \item If $x\in C$ then $S\left(x\right)\in C$ \end{enumerate} \begin{enumerate} \item $\emptyset\in C$: We have that $C=\mathbb{N}_S\cap\mathbb{N}_T$ and we have that \begin{align*} \mathbb{N}_S&=\bigcap_{\substack{A\subseteq S \\ A\text{ is inductive}}} A\\ \mathbb{N}_T&=\bigcap_{\substack{A\subseteq T \\ A\text{ is inductive}}} A\\ \end{align*} In the definitions of both $\mathbb{N}_S$ and $\mathbb{N}_T$ we have that these are the intersections of inductive sets and so $\emptyset\in\mathbb{N}_S$ and $\emptyset\in\mathbb{N}_T$. It hence follows that as $C=\mathbb{N}_S\cap\mathbb{N}_T$ we must have $\emptyset\in C$. \item If $x\in C$ then $S\left(x\right)\in C$: Now suppose that $x\in C$. Like before we know that $C=\mathbb{N}_S\cap\mathbb{N}_T$, and by the definition of the intersection of two sets, it follows that $x\in\mathbb{N}_S$ and $x\in\mathbb{N}_T$. Now we have that \begin{equation*} \mathbb{N}_S=\bigcap_{\substack{A\subseteq S \\ A\text{ is inductive}}} A \end{equation*} hence as $x\in\mathbb{N}_S$ we have we must have that $x\in A$ for every subset $A$ of $S$. Moreover each such $A$ is an inductive set and so by definition of an inductive set we have that $S\left(x\right)\in A$ for every subset $A$ of $S$. Hence $S\left(x\right)\in\mathbb{N}_S$ and likewise a similar argument shows that $S\left(x\right)\in\mathbb{N}_T$. It thus follows that $S\left(x\right)\in C$. As $x\in C$ was arbitrary we must conclude that this holds for any $x\in C$. \end{enumerate} Hence $C$ is an inductive set. Now, we know that $C\subseteq S$ and $C$ is an inductive set then it follows that $C$ is one of the inductive sets in the definition of $\mathbb{N}_S$. It hence follows that $\mathbb{N}_S\subseteq C$. It follows by the axiom of extensionality that as $\mathbb{N}_S$ and $C$ contain the same elements then $C=\mathbb{N}_S$. Likewise the a similar argument shows that $C=\mathbb{N}_T$. So it follows that $\mathbb{N}_S = \mathbb{N}_T$. $\qed$ \end{theorem} In light of this theorem we can now truly define $\mathbb{N}$. \begin{definition}{The Natural numbers $\mathbb{N}$} Let $S$ be an inductive set, and construct the set $\mathbb{N}_S$. The set $\mathbb{N}_S$ is the set of Natural numbers and by theorem \ref{thm:EveryNsSetIsSame} no matter the inductive set $S$ we have that all such $\mathbb{N}_S$ are the same. Hence we simply refer to the natural numbers by $\mathbb{N}$. \end{definition} We identify the elements of $\mathbb{N}$ not in terms of $\emptyset$, and sets of sets containing $\emptyset$, but instead by the more usually numerals that we use. We have already defined Zero and One, by definitions \ref{def:Zero} and \ref{def:One}. The other numbers follow likewise, i.e \begin{align*} 0&=\emptyset\\ 1&=S\left(0\right)=\left\{\emptyset\right\}\\ 2&=S\left(1\right)=\left\{\emptyset,\left\{\emptyset\right\}\right\}\\ 3&=S\left(2\right)\\ 4&=S\left(3\right)\\ &\dots\\ n+1&=S\left(n\right) \end{align*} We said that we can prove that $\mathbb{N}$ is the smallest such inductive set that contains all the natural numbers, this is to say if $A\subseteq\mathbb{N}$ is an inductive set we must have that $A=\mathbb{N}$. We thankfully do not need to prove this as the previous theorem gives this for free. This also gives us the following definition for a minimally inductive set, we make the definition in such a way that we argue about sets of inductive sets. \begin{definition}{Minimally inductive set of sets} Let $S$ be a set whose elements are also sets satisfying some condition, and let $f:S\rightarrow S$ be a mapping. We say that $S$ is minimally inductive if and only if the foll lowing holds \begin{enumerate} \item $S$ is an inductive set under the mapping $g$ \item No proper subset of $S$ is inductive under the mapping $g$ \end{enumerate} \end{definition} One of the most powerful properties of the natural numbers is the principle of Induction. This tool is powerful in proving many statements on the Natural numbers. It works in a similar way to how an inductive set works\footnote{Hence the similar names.}. We show that the statement works for some base case, usually $n=0$, then we assume that if it holds true for some $n$ then it holds true for $S\left(n\right)=n+1$. \begin{theorem}{The principle of induction} Suppose we have a proposition $P\left(n\right)$ about a Natural number $n\in\mathbb{N}$. Moreover, suppose that \begin{enumerate} \item $P\left(0\right)$ is true \item $P\left(n\right)$ being true implies $P\left(S\left(n\right)\right)=P\left(n+1\right)$ is true for any Natural number $n$. \end{enumerate} If these two statements are true, we have that $P\left(n\right)$ is true for any natural number $n$, and we say the proposition $P\left(n\right)$ holds by the principle of mathematical induction. Moreover we call $P\left(0\right)$ the base case for induction and $P\left(n\right)$ being true implies $P\left(n+1\right)$ being true is the inductive step. Proof: Let $P\left(n\right)$ be a proposition about a Natural number $n\in\mathbb{N}$ such that $P\left(n\right)$ satisfies \begin{enumerate} \item $P\left(0\right)$ is true \item $P\left(n\right)$ being true implies $P\left(S\left(n\right)\right)=P\left(n+1\right)$ is true for any Natural number $n$. \end{enumerate} Consider the set given by \begin{equation*} Q=\left\{n:P\left(n\right)\text{ is true}\right\} \end{equation*} That is, $Q$ is defined as the set of Natural numbers such that that $P\left(n\right)$ is true, clearly $Q\subseteq\mathbb{N}$. By hypothesis we know that $P\left(0\right)$ is true, so $0\in Q$. Also by hypothesis we know that if $P\left(n\right)$ is true for some $n\in\mathbb{N}$. then we have that $P\left(S\left(n\right)\right)=P\left(n+1\right)$ is also true, hence we have that every $n\in\mathbb{N}$ is also in $Q$, hence $\mathbb{N}\subseteq Q$ and so by the axiom of extensionality we have that $Q=\mathbb{N}$. Hence $P\left(n\right)$ is true for every Natural number $n\in\mathbb{N}$. $\qed$. \end{theorem} Now that we have induction we can make a final definition that will be useful. This definition combines a few previously proven results into a convenient package, this package has the strength to prove the usual properties of the natural numbers and perhaps are an easy way to remember the basis for deducing properties about the natural numbers. \begin{definition}{The Peano axioms} We define the Peano axioms as follows. Let $A$ be a set and consider the successor mapping on $A$, $S: A\rightarrow A$. If we have that \begin{enumerate} \item $A$ is an inductive set \begin{enumerate} \item $\emptyset\in A$ \item If $x\in A$ then $S\left(x\right)\in A$ \end{enumerate} \item $S$ is an injective mapping. \item $\forall x\in S$ we have that $\emptyset\neq S\left(x\right)$ \item $\forall B \subseteq A$. If $0\in B$ and $S\left(n\right)\in B$ for all $n\in B$ then $B=A$ \end{enumerate} If $A$ satisfies all of the above, then we say that $A$ satisfies the Peano axioms and induces Peano arithmetic. \end{definition} \subsection{Properties of the natural numbers} Although we have constructed $\mathbb{N}$ we haven't defined what we can do with this set. We know from our intuitions that we can define addition, a form of subtraction, multiplication and in some cases division. We also know that there is some notion of a Natural number being larger or smaller than another, when two Natural numbers are equal and so. We will explore some of these properties so that we can start doing some form of Mathematics. \subsubsection{Equality of natural numbers} Firstly, it is important to define when two Natural numbers are equal, again as we have defined the natural numbers in terms of Sets, this just comes down to the axiom of extensionality. \begin{definition}{Equality of natural numbers} Let $n,m\in\mathbb{N}$ be two natural numbers. We define that two natural numbers are equal, denoted $n=m$ if and only if $n\subseteq m$ and $m\subseteq n$. This is simply the axiom of extensionality. If we do not have $n=m$ then we say that $n$ and $m$ are not equal and we denote this $n\neq m$. \end{definition} This definition clearly makes sense as each natural number is a set. \begin{example} We have that $1=1$. Indeed by definition $0=\emptyset$ and $1=\left\{\emptyset\right\}$. It is clear that $\left\{\emptyset\right\}\subseteq \left\{\emptyset\right\}$ hence the axiom of extensionality gives us that $\left\{\emptyset\right\}=\left\{\emptyset\right\}$. That is $1=1$ \end{example} \begin{example} We have that $3=3$. Indeed by construction we have that $3=\left\{\emptyset,\left\{\emptyset\right\},\left\{\emptyset,\left\{\emptyset\right\}\right\}\right\}$ It is clear that $\left\{\emptyset,\left\{\emptyset\right\},\left\{\emptyset,\left\{\emptyset\right\}\right\}\right\}$ hence the axiom of extensionality gives us that $\left\{\emptyset,\left\{\emptyset\right\},\left\{\emptyset,\left\{\emptyset\right\}\right\}\right\}=\left\{\emptyset,\left\{\emptyset\right\},\left\{\emptyset,\left\{\emptyset\right\}\right\}\right\}$. i.e $3=3$ \end{example} \begin{example} We have $1\neq 2$. We have that $1=\left\{\emptyset\right\}$ and $1=\left\{\emptyset,\left\{\emptyset\right\}\right\}$. Now $\left\{\emptyset\right\}\subseteq \left\{\emptyset,\left\{\emptyset\right\}\right\}$ but $\left\{\emptyset,\left\{\emptyset\right\}\right\}\not\subseteq \left\{\emptyset\right\}$. \end{example} In particular in light of the definition of equality on the natural numbers if $n=m$ and $m=k$ we must have that $n=k$. \subsubsection{Inequality of natural numbers} We can define also define what it means for natural numbers to not be equal. We make use of the notion of set inclusion. Recall that a set $S$ is a subset of the set $T$, written $S\subseteq T$, if for every $s\in S$ we have that $s\in T$ and that $S$ is a proper subset of $T$, written $S\subset T$ if $S\subseteq T$ and $S\neq T$. We will use the proper subset notation to define the so-called less than operator. This operation comes naturally from the definition of the natural numbers by the successor mapping. The successor function has the following chain of definitions for each $n\in\mathbb{N}$ \begin{align*} 0&=\emptyset\\ 1&=S\left(0\right)=\left\{\emptyset\right\}\\ 2&=S\left(1\right)=\left\{\emptyset,\left\{\emptyset\right\}\right\}\\ 3&=S\left(2\right)=\left\{\emptyset,\left\{\emptyset\right\},\left\{\emptyset,\left\{\emptyset\right\}\right\}\right\}\\ 4&=S\left(3\right)=\left\{\emptyset,\left\{\emptyset\right\},\left\{\emptyset,\left\{\emptyset\right\}\right\},\left\{\emptyset,\left\{\emptyset\right\},\left\{\emptyset,\left\{\emptyset\right\}\right\}\right\}\right\}\\ &\dots\\ n+1&=S\left(n\right) \end{align*} From this chain of definitions and the axiom of foundation, $0=\emptyset$ is the set element minimal element of $\mathbb{N}$, so every natural number is contained in one that comes after. We can make the following definition which defines when one natural number is smaller than another. \begin{definition}{Less than Operator} Let $n,m\in\mathbb{N}$. The less than operator, denoted by $nm$ and is read as $n$ is greater than $m$, is defined as follows. We have $n>m$ if and only if $n\not\subset m$. That is, the set that denotes the number $n$ is not an element of the set $m$. That is to say that $>$ is a logical proposition, given by \begin{equation*} >\left(n,m\right)=\begin{cases} 1,\ \text{If } n\not\subset m\\ 0,\ \text{Otherwise} \end{cases} \end{equation*} \end{definition} Likewise, we can define the greater than or equal to operator. \begin{definition}{Greater than or equal to operator} Let $n,m\in\mathbb{N}$. The greater than or equal to operator, denoted by $n\geq m$, and read as $n$ is greater than or equal to $m$, is defined the same as $n>m$ except we now allow for the situation that $n=m$. This is to say $\geq$ is a logical proposition given by \begin{equation*} \geq\left(n,m\right) = \begin{cases} 1,\ \text{If } n> m\\ 1,\ \text{If } n=m\\ 0,\ \text{Otherwise} \end{cases} \end{equation*} \end{definition} \subsubsection{Defining addition and multiplication on the Natural numbers} We can use the principle of induction to make definitions as well as a proof technique. We shall use induction now to make two definitions, in particular, we define two mappings that will allow us to start manipulating Natural numbers as we expect them to. To do so it is enough to specify what the mapping does when $0$ is given as an argument, and then do define what the mapping does when given $S\left(n\right)$ as an argument, hence defining it in terms of $n$ for each $n\in\mathbb{N}$. This will make sense when we define these operations. We first recall the Cartesian product of two sets. Let $S$ and $T$ be sets, the Cartesian product of $S$ and $T$, denoted $S\times T$ is the set of all ordered pairs of the form $\left(S,t\right)$ where $s\in S$ and $t\in T$. This is to say that \begin{equation*} S\times T=\left\{\left(s,t\right):s\in S,t\in T\right\} \end{equation*} If $S=T$ then we denote $S\times T$ by $S^2$. \begin{definition}{Addition on the Natural numbers} We define addition on the Natural numbers by the following mapping. Let $+:\mathbb{N}^2\rightarrow\mathbb{N}$ be such that for all $\left(m,n\right)\in\mathbb{N}^2$ we have the following \begin{align} +&:\mathbb{N}^2\mapping \mathbb{N}\\ \left(m,n\right)&\mapsto +\left(m,n\right)=\begin{cases} m+0=m,\ \text{If } n=0\\ m+S\left(n\right)=S\left(m+n\right),\ \text{If } n\neq 0 \end{cases} \end{align} We will write $+\left(m,n\right)$ as $m+n$. \end{definition} In light of this definition, we can prove that $1+1=2$ \begin{theorem}{1+1=2} We have that $1+1=2$. Proof: We know that $1=S\left(0\right)$ and $2=S\left(S\left(0\right)\right)$. Hence, we are proving \begin{equation*} S\left(0\right)+S\left(0\right)=S\left(S\left(0\right)\right) \end{equation*} By the definition of the addition mapping, we know that $\forall \left(m,n\right)\in\mathbb{N}^2$ that \begin{equation*} m+S\left(n\right)=S\left(m+n\right) \end{equation*} In particular if $n=0$ we have $\forall m$ that \begin{equation*} m+S\left(0\right)=S\left(m+0\right) \end{equation*} and \begin{equation}\label{eq:OnePlusOneProofEq1} S\left(0\right)+S\left(0\right)=S\left(S\left(0\right)+0\right) \end{equation} Moreover, by the definition of addition, we know that $\forall m$ that if $n=0$ then \begin{equation*} m+0=m \end{equation*} Hence \begin{align*} S\left(0\right)+0&=S\left(0\right)\\ \Rightarrow S\left(S\left(0\right)+0\right)&= S\left(S\left(0\right)\right)\\ \Rightarrow S\left(0\right)+S\left(0\right)&=S\left(S\left(0\right)\right) \end{align*} This is to say. $1+1=2$. As required. $\qed$. \end{theorem} \begin{definition}{Multiplication on the Natural numbers} We define multiplication on the Natural numbers by the following mapping. Let $*:\mathbb{N}\times\mathbb{N}\rightarrow\mathbb{N}$ be such that for all $\left(m,n\right)\in\mathbb{N}\times\mathbb{N}$ we have the following \begin{align} *&:\mathbb{N}\times\mathbb{N}\mapping \mathbb{N}\\ \left(m,n\right)&\mapsto *\left(m,n\right)=\begin{cases} m*0=0,\ \text{If } n=0\\ m*S\left(n\right)=m*n+m,\ \text{If } n\neq 0 \end{cases} \end{align} We will write $*\left(m,n\right)$ as $m*n$, or more compactly just as the juxtaposition $mn$ \end{definition} As with addition we provide a proof that $2*2=4$ \begin{theorem}{2*2=4} We have $2*2=4$. Proof: We know that $S\left(1\right)=2$ and so by definition of multiplication we have that \begin{equation*} 2*2=2*S\left(1\right)=2*1+2 \end{equation*} Likewise we know that $S\left(0\right)=1$ and so by another application of the definition of multiplication we have that \begin{equation*} 2*1+2=2*S\left(0\right)+2=2*0+2+2 \end{equation*} Now $2*0=0$ by definition as so we have that \begin{equation*} 2*2=2*0+2+2=0+2+2=2+2 \end{equation*} It is left to show that $2+2 = 4$. We use a similar proof to $1+1=2$. As $4=S\left(S\left(2\right)\right)=S\left(S\left(S\left(S\left(0\right)\right)\right)\right)$ and $2=S\left(S\left(0\right)\right)$ we need to show that \begin{equation*} S\left(S\left(0\right)\right)+S\left(S\left(0\right)\right)=S\left(S\left(S\left(S\left(0\right)\right)\right)\right) \end{equation*} By the definition of addition we have that $\forall\left(m,n\right)\in\mathbb{N}^2$ that \begin{equation*} m+S\left(n\right)=S\left(m+n\right) \end{equation*} In particular we have that if $n=0$ and $\forall n\in\mathbb{N}$ that \begin{equation*} m+S\left(0\right)=S\left(m+0\right) \end{equation*} So that \begin{align*} S\left(S\left(0\right)\right)+S\left(S\left(0\right)\right)&=S\left(S\left(S\left(0\right)\right)+S\left(0\right)\right)\\ &=S\left(S\left(S\left(S\left(0\right)\right)+0\right)\right)\\ &=S\left(S\left(S\left(S\left(0\right)\right)\right)\right)\\ \end{align*} That is $2+2=4$ and so the theorem is proved. $\qed$ \end{theorem} These two definitions are enough to prove every elementary property of addition and multiplication that we are familiar with. However to do so will require an upgrade to the idea of induction. This will allow us to perform induction on both the addition and multiplication mappings. Once we have done this we will have put the natural numbers on a firm logical basis. This idea is called double induction, or more clearly induction on two variables. For example, we know from school that $n+m=m+n$ for all natural numbers $n$ and $m$. To show that this is true, we start by induction on $n$, so we have to show that $m+0=0+m$ and then that $\left(m+n=n+m\right)$ implies that $\left(m+S\left(n\right)=S\left(n\right)+m\right)$, each of these will be proved by induction on $m$. This is the idea of double induction. \begin{theorem}{Double induction} Let $P\left(m,n\right)$ be a proposition about a pair of natural numbers $m,n\in\mathbb{N}$. Moreover suppose that \begin{enumerate} \item $P\left(0,0\right)$ is true. \item $P\left(0,n\right)$ being true implies that $P\left(0,S\left(n\right)\right)$ is true. \item $P\left(m,0\right)$ being true implies that $P\left(S\left(m\right),0\right)$ is true \item For a given $m\in\mathbb{N}$, from the truth that $P\left(m,x\right)$ is true for all $x$, and also that of $P\left(S\left(m\right),n\right)$ for some $n$, we can infer that $P\left(S\left(m\right),S\left(n\right)\right)$ is true. \end{enumerate} If these statements are true, we have that $P\left(m,n\right)$ is true for any natural numbers $m,n\in\mathbb{N}$ and we say that the proposition $P\left(m,n\right)$ hold by the principle of mathematical double induction. Proof: Let $P\left(m,n\right)$ be a proposition about a pair of natural numbers $m,n\in\mathbb{N}$, which satisfies \begin{enumerate} \item $P\left(0,0\right)$ is true. \item $P\left(0,n\right)$ being true implies that $P\left(0,S\left(n\right)\right)$ is true. \item $P\left(m,0\right)$ being true implies that $P\left(S\left(m\right),0\right)$ is true \item For a given $m\in\mathbb{N}$, from the truth that $P\left(m,x\right)$ is true for all $x$, and also that of $P\left(S\left(m\right),n\right)$ for some $n$, we can infer that $P\left(S\left(m\right),S\left(n\right)\right)$ is true. \end{enumerate} Statements $1$ and $2$ are the base case and the inductive step for the proof of $P\left(0,n\right)$ for all $n\in\mathbb{N}$. Likewise statements $1$ and $3$ are the base case and the inductive step for the proof of $P\left(m,0\right)$ for all $m\in\mathbb{N}$. Finally, the statements $3$ and $4$ is the base case and inductive step for a proof, by induction on $n$ for a proof of the statement that if $P\left(m,n\right)$ holds for all $n$, then $P\left(S\left(m\right),n\right)$ holds for all $n$, and thus by induction we have that $P\left(m,n\right)$ is true for all $m$. $\qed$. \end{theorem} We can start proving the basic properties of $\mathbb{N}$ that we are familiar with. \subsubsection{Closure properties of addition and multiplication} ~\\ We show that addition and multiplication on the natural numbers to produces a natural number. \begin{theorem}{The addition and multiplication mappings on the natural numbers are closed} For all $n,m\in\mathbb{N}$. We have that \begin{enumerate} \item $n+m\in\mathbb{N}$. \item $nm\in\mathbb{N}$. \end{enumerate} Proof: \begin{enumerate} \item $n+m\in\mathbb{N}$: Let $n,m\in\mathbb{N}$. We need to show that \begin{enumerate} \item $0+0\in\mathbb{N}$ \item $0+n\in\mathbb{N}$ implies $0+S\left(n\right)\in\mathbb{N}$ \item $m+0\in\mathbb{N}$ implies $S\left(m\right)+0\in\mathbb{N}$ \item For some $m\in\mathbb{N}$. Suppose that $m+x\in\mathbb{N}$ for all $x\in\mathbb{N}$, and $S\left(m\right)+n\in\mathbb{N}$ for some $n\in\mathbb{N}$ implies that $S\left(m\right)+S\left(n\right)\in\mathbb{N}$ \end{enumerate} \begin{enumerate} \item $0+0\in\mathbb{N}$: We have by the definition of addition that \begin{equation*} 0+0=0 \end{equation*} which is clearly in $\mathbb{N}$. \item $0+n\in\mathbb{N}$ implies $0+S\left(n\right)\in\mathbb{N}$: Now, suppose that $0+n\in\mathbb{N}$ for some $n$, we show that $0+S\left(n\right)\in\mathbb{N}$. By the definition of addition we have that \begin{equation*} 0+S\left(n\right)=S\left(0+n\right) \end{equation*} Now $0+n\in\mathbb{N}$ by assumption, therefore we have that $S\left(0+n\right)\in\mathbb{N}$. Hence $0+S\left(n\right)\in\mathbb{N}$. \item $m+0\in\mathbb{N}$ implies $S\left(m\right)+0\in\mathbb{N}$: Now, suppose that $m+0\in\mathbb{N}$ for some $m$, we show that $S\left(m\right)+0\in\mathbb{N}$. By the definition of addition we have that \begin{equation*} S\left(m\right)+0=S\left(m\right)=S\left(m+0\right) \end{equation*} Now $m+0\in\mathbb{N}$ by assumption, therefore $S\left(m+0\right)\in\mathbb{N}$. Hence $S\left(m\right)+0\in\mathbb{N}$ \item For some $m\in\mathbb{N}$. Suppose that $m+x\in\mathbb{N}$ for all $x\in\mathbb{N}$, and $S\left(m\right)+n\in\mathbb{N}$ for some $n\in\mathbb{N}$ implies that $S\left(m\right)+S\left(n\right)\in\mathbb{N}$ Now suppose that $m+x\in\mathbb{N}$ for all $x\in\mathbb{N}$ and some fixed $m\in\mathbb{N}$, and suppose that $S\left(m\right)+n\in\mathbb{N}$ where $n$ is some fixed value, we show that $S\left(m\right)+S\left(n\right)\in\mathbb{N}$. So, we have that $S\left(m\right)\in\mathbb{N}$ and $S\left(n\right)\in\mathbb{N}$ we can use the definition of addition, doing so gives \begin{equation*} S\left(m\right)+S\left(n\right)=S\left(S\left(m\right)+n\right) \end{equation*} By assumption $S\left(m\right)+n\in\mathbb{N}$, hence as we have that $m+x\in\mathbb{N}$ for all $x\in\mathbb{N}$, then we have that $S\left(S\left(m\right)+n\right)\in\mathbb{N}$. Therefore we must conclude that $S\left(m\right)+S\left(n\right)\in\mathbb{N}$. \end{enumerate} Hence by the principle by double induction we have that $m+n\in\mathbb{N}$ for all $m,n\in\mathbb{N}$. That is, addition is closed. \item $nm\in\mathbb{N}$: Let $n,m\in\mathbb{N}$. We need to show that \begin{enumerate} \item $0*0\in\mathbb{N}$ \item $0*n\in\mathbb{N}$ implies $0*S\left(n\right)\in\mathbb{N}$ \item $m*0\in\mathbb{N}$ implies $S\left(m\right)*0\in\mathbb{N}$ \item For some $m\in\mathbb{N}$. Suppose that $m*x\in\mathbb{N}$ for all $x\in\mathbb{N}$, and $S\left(m\right)*n\in\mathbb{N}$ for some $n\in\mathbb{N}$ implies that $S\left(m\right)*S\left(n\right)\in\mathbb{N}$ \end{enumerate} \begin{enumerate} \item $0*0\in\mathbb{N}$: We have by the definition of multiplication that \begin{equation*} 0*0=0 \end{equation*} which is clearly in $\mathbb{N}$. \item $0*n\in\mathbb{N}$ implies $0*S\left(n\right)\in\mathbb{N}$: Now, suppose that $0*n\in\mathbb{N}$ for some $n$, we show that $0*S\left(n\right)\in\mathbb{N}$. By the definition of multiplication we have that \begin{equation*} 0*S\left(n\right)=0*n+0 \end{equation*} Now $0*n\in\mathbb{N}$ by assumption, moreover we have proved that addition is closed, so $0*n+0\in\mathbb{N}$ therefore we have that $0*S\left(n\right)\in\mathbb{N}$ \item $m*0\in\mathbb{N}$ implies $S\left(m\right)*0\in\mathbb{N}$: Now, suppose that $m*0\in\mathbb{N}$ for some $m$, we show that $S\left(m\right)*0\in\mathbb{N}$. By the definition of addition we have that \begin{equation*} S\left(m\right)*0=0 \end{equation*} Where $S\left(m\right)*0=0$ by definition of multiplication. Hence as $0\in\mathbb{N}$ we have that $S\left(m\right)*0\in\mathbb{N}$. \item For some $m\in\mathbb{N}$. Suppose that $m*x\in\mathbb{N}$ for all $x\in\mathbb{N}$, and $S\left(m\right)*n\in\mathbb{N}$ for some $n\in\mathbb{N}$ implies that $S\left(m\right)*S\left(n\right)\in\mathbb{N}$: Now suppose that $m*x\in\mathbb{N}$ for all $x\in\mathbb{N}$ and some fixed $m\in\mathbb{N}$, and suppose that $S\left(m\right)*n\in\mathbb{N}$ where $n$ is some fixed value, we show that $S\left(m\right)*S\left(n\right)\in\mathbb{N}$. So, we have that $S\left(m\right)\in\mathbb{N}$ and $S\left(n\right)\in\mathbb{N}$ we can use the definition of multiplication, doing so gives \begin{equation*} S\left(m\right)*S\left(n\right)=S\left(m\right)*n+S\left(m\right) \end{equation*} By assumption $S\left(m\right)*n\in\mathbb{N}$, moreover as $m*x\in\mathbb{N}$ for all $x\in\mathbb{N}$ we must have $S\left(m\right)*n+S\left(m\right)\in\mathbb{N}$ as addition is closed. Hence $ S\left(m\right)*S\left(n\right)\in\mathbb{N}$. \end{enumerate} Hence by the principle by double induction we have that $m*n\in\mathbb{N}$ for all $m,n\in\mathbb{N}$. That is, multiplication is closed. \end{enumerate} Hence, we have that the addition and multiplication mappings are closed. $\qed$ \end{theorem} \subsubsection{Commutativity of addition and multiplication} ~\\ This will prove that for all $a,b\in\mathbb{N}$ that $a+b=b+a$ and $ab=ba$. \begin{theorem}{Addition and multiplication are commutative} For all $a,b\in\mathbb{N}$ we have that \begin{enumerate} \item $a+b=b+a$ \item $ab=ba$ \end{enumerate} Proof: \begin{enumerate} \item $a+b=b+a$: We argue by double induction. We need to show that \begin{enumerate} \item $0+0=0+0$ \item $0+n=n+0$ implies $0+S\left(n\right)=S\left(n\right)+0$ \item $m+0=0+m$ implies $S\left(m\right)+0=0+S\left(m\right)$ \item If $m+x=x+m$ for all $x\in\mathbb{N}$ and $S\left(m\right)+n=n+S\left(m\right)$ for some $n\in\mathbb{N}$, then we have that $S\left(m\right)+S\left(n\right)=S\left(n\right)+S\left(m\right)$ \end{enumerate} \begin{enumerate} \item $0+0=0+0$: This is trivial by definition of addition. \item $0+n=n+0$ implies $0+S\left(n\right)=S\left(n\right)+0$: Suppose that $0+n=n+0$, we show that $0+S\left(n\right)=S\left(n\right)+0$. By the definition of addition we have that \begin{equation*} 0+S\left(n\right)=S\left(0+n\right) \end{equation*} We know by assumption that $0+n=n+0$. Hence \begin{equation*} S\left(0+n\right)=S\left(n+0\right)=S\left(n\right)+0 \end{equation*} \item $m+0=0+m$ implies $S\left(m\right)+0=0+S\left(m\right)$: Suppose that $m+0=0+m$, we show that $S\left(m\right)+0=0+S\left(m\right)$. By the definition of addition we have that \begin{equation*} S\left(m\right)+0=S\left(m\right)=S\left(m+0\right) \end{equation*} We know by assumption that $n+0=+m$. Hence \begin{equation*} S\left(m+0\right)=S\left(0+m\right)=0+S\left(m\right) \end{equation*} \item If $m+x=x+m$ for all $x\in\mathbb{N}$ and $S\left(m\right)+n=n+S\left(m\right)$ for some $n\in\mathbb{N}$, then we have that $S\left(m\right)+S\left(n\right)=S\left(n\right)+S\left(m\right)$: Suppose $m+x=x+m$ for all $x\in\mathbb{N}$ and that $S\left(m\right)+n=n+S\left(m\right)$ for some $n\in\mathbb{N}$, we show that $S\left(m\right)+S\left(n\right)=S\left(n\right)+S\left(m\right)$. We have \begin{equation*} S\left(m\right)+S\left(n\right)=S\left(S\left(m\right)+n\right) \end{equation*} Now we have by assumption that $S\left(m\right)+n=n+S\left(m\right)$, for some $n\in\mathbb{N}$, hence \begin{equation*} S\left(S\left(m\right)+n\right)=S\left(n+S\left(m\right)\right)=S\left(S\left(n+m\right)\right) \end{equation*} Likewise a similar chain of reasoning gives \begin{equation*} S\left(n\right)+S\left(m\right)=S\left(S\left(n\right)+m\right)=S\left(m+S\left(n\right)\right)=S\left(S\left(m+n\right)\right) \end{equation*} Finally, we have that $m+n=m+n$ by assumption, and so $S\left(S\left(n+m\right)\right)=S\left(S\left(m+n\right)\right)$ \end{enumerate} Hence by the principle of double induction we have that $a+b=b+a$ for all $a,b\in\mathbb{N}$. That is addition is commutative. \item $ab=ba$: We need to show that \begin{enumerate} \item $0*0=0*0$ \item $0*n=n*0$ implies $0*S\left(n\right)=S\left(n\right)*0$ \item $m*0=0*m$ implies $S\left(m\right)*0=0*S\left(m\right)$ \item If $m*x=x*m$ for all $x\in\mathbb{N}$ and $S\left(m\right)*n=n*S\left(m\right)$ for some $n\in\mathbb{N}$, then we have that $S\left(m\right)*S\left(n\right)=S\left(n\right)*S\left(m\right)$ \end{enumerate} \begin{enumerate} \item $0*0=0*0$: This is trivial by the definition of multiplication. \item $0*n=n*0$ implies $0*S\left(n\right)=S\left(n\right)*0$: Suppose that $0*n=n*0$, we show that $0*S\left(n\right)=S\left(n\right)*0$. We have by definition of multiplication that \begin{align*} 0*S\left(n\right)&=0*n+0\\ &=n*0+0,\ \text{By assumption}\\ &=0+0,\ \text{By definition of multiplication}\\ &=0,\ \text{By definition of addition}\\ &=S\left(n\right)*0,\ \text{By definition of multiplication}\\ \end{align*} \item $m*0=0*m$ implies $S\left(m\right)*0=0*S\left(m\right)$: Suppose that $m*0=0*m$, we show that $S\left(m\right)*0=0*S\left(m\right)$. We have by definition of multiplication that \begin{align*} 0*S\left(m\right)&=0*m+0\\ &=m*0+0,\ \text{By assumption}\\ &=0+0,\ \text{By definition of multiplication}\\ &=0,\ \text{By definition of addition}\\ &=S\left(m\right)*0,\ \text{By definition of multiplication}\\ \end{align*} \item If $m*x=x*m$ for all $x\in\mathbb{N}$ and $S\left(m\right)*n=n*S\left(m\right)$ for some $n\in\mathbb{N}$, then we have that $S\left(m\right)*S\left(n\right)=S\left(n\right)*S\left(m\right)$: Suppose that $m*x=x*m$ for all $x\in\mathbb{N}$ and $S\left(m\right)*n=n*S\left(m\right)$ for some $n\in\mathbb{N}$, we show $S\left(m\right)*S\left(n\right)=S\left(n\right)*S\left(m\right)$. By definition of multiplication we have that \begin{equation*} S\left(m\right)*S\left(n\right)=S\left(m\right)*n+S\left(m\right)=n*S\left(m\right)+S\left(m\right)=n*m+n+S\left(m\right)=n*m+S\left(n+m\right) \end{equation*} Likewise, we have that \begin{equation*} S\left(n\right)*S\left(m\right)=S\left(n\right)*m+S\left(n\right)=m*S\left(n\right)+S\left(n\right)=m*n+m+S\left(n\right)=m*n+S\left(m+n\right) \end{equation*} Now, we know that addition is commutative so we have that $S\left(m+n\right)=S\left(n+m\right)$, moreover by assumption we have that $n*m=m*n$. Hence \begin{equation*} n*m+S\left(n+m\right)=m*n+S\left(m+n\right) \end{equation*} \end{enumerate} Hence by the principle of double induction we have that $ab=ba$ for all $a,b\in\mathbb{N}$. That is multiplication is commutative. \end{enumerate} The result now follows. $\qed$ \end{theorem} We can also now deduce the following property of multiplication \subsubsection{Associativity of addition} ~\\ This will prove that for all $a,b,c\in\mathbb{N}$ that $a+\left(b+c\right)=\left(a+b\right)+c$ \begin{theorem}{Addition is associative} For all $a,b,c\in\mathbb{N}$ we have that \begin{equation*} a+\left(b+c\right)=\left(a+b\right)+c \end{equation*} Proof: We can show this by induction. Let $x,y\in\mathbb{N}$ be arbitrary, and let $P\left(n\right)$ be the proposition given by \begin{equation*} \left(x+y\right)+n=x+\left(y+n\right) \end{equation*} For the base case we have $n=0$ and so \begin{align*} \left(x+y\right)+0&=x+y ,\text{By definition of addition}\\ &=x+\left(y+0\right) \end{align*} Hence $P\left(0\right)$ is true. Now, suppose that $P\left(n\right)$ is true, that is \begin{equation*} \left(x+y\right)+n=x+\left(y+n\right) \end{equation*} We show that $P\left(S\left(n\right)\right)$ is also true, that is \begin{equation*} \left(x+y\right)+S\left(n\right)=x+\left(y+S\left(n\right)\right) \end{equation*} Now, we have that \begin{align*} \left(x+y\right)+S\left(n\right)&=S\left(\left(x+y\right)+n\right),\text{By definition of addition}\\ &=S\left(x+\left(y+n\right)\right),\ \text{By the induction hypothesis}\\ &=x+\left(S\left(y+n\right)\right),\text{By definition of addition}\\ &=x+\left(y+S\left(n\right)\right),\text{By definition of addition}\\ \end{align*} Hence $P\left(S\left(n\right)\right)$ is true. It follows by mathematical induction that $\forall a,b,c\in\mathbb{N}$ we have that $a+\left(b+c\right)=\left(a+b\right)+c$, that is addition is associative. $\qed$ \end{theorem} \subsubsection{Multiplication distributes over addition} ~\\ This will prove that for all $a,b,c\in\mathbb{N}$ we have that $a\left(b+c\right)=ab+ac$ and $\left(a+b\right)c=ac+bc$. \begin{theorem}{Multiplication distributes over addition} For all $a,b,c\in\mathbb{N}$ we have that \begin{enumerate} \item $a\left(b+c\right)=ab+ac$ \item $\left(b+c\right)a=ba+ca=ab+ac$ \end{enumerate} Proof: We can be quick, and solve both problems nearly simultaneously, as we have shown that multiplication is commutative.. To do this we show that for all $a,b,c\in\mathbb{N}$ we have that $a\left(b+c\right)=ab+ac$. Let $a,b\in\mathbb{N}$ be arbitrary and we argue by induction on the proposition $P\left(n\right)$ given by \begin{equation*} a\left(b+n\right)=ab+an \end{equation*} For the base case $n=0$ we have that \begin{align*} a\left(b+0\right)&=a\left(b\right),\text{By definition of multiplication}\\ &=ab \\ &=ab+0,\text{By definition of addition}\\ &=ab+a*0,\text{By definition of multiplication}\\ \end{align*} Hence $P\left(0\right)$ is true. Now suppose that $P\left(n\right)$ is true, that is to say \begin{equation*} a\left(b+n\right)=ab+an \end{equation*} We show that $P\left(S\left(n\right)\right)$ is true, that is \begin{equation*} a\left(b+S\left(n\right)\right)=ab+aS\left(n\right) \end{equation*} Indeed, we have that \begin{align*} a\left(b+S\left(n\right)\right)&=a\left(S\left(b+n\right)\right),\ \text{By definition of addition}\\ &=a\left(b+n\right)+a,\ \text{By definition of multiplication}\\ &=ab+an+a,\ \text{By assumption}\\ &=ab+aS\left(n\right)0,\ \text{By definition of multiplication}\\ \end{align*} Hence $P\left(S\left(n\right)\right)$ is true. It hence follows by the principle of mathematical induction that $\forall a,b,c\in\mathbb{N}$ we have that $a\left(b+c\right)=ab+ac$. Now, we have shown that $a\left(b+c\right)=ab+ac$, to see that $\left(b+c\right)a=ba+ca=ab+ac$ we simply observe that \begin{align*} \left(b+c\right)a&=a\left(b+c\right),\ \text{Multiplication is commutative}\\ &=ab+ac,\ \text{By part 1 of the theorem}\\ &ba+ca,\ \text{Multiplication is commutative}\\ \end{align*} As required. $\qed$ \end{theorem} \subsubsection{Associativity of multiplication} ~\\ This will prove that for all $a,b,c\in\mathbb{N}$ that $a\left(bc\right)=\left(ab\right)c$ \begin{theorem} For all $a,b,c\in\mathbb{N}$ we have that $a\left(bc\right)=\left(ab\right)c$ Proof: We again show this by induction. Let $x,y\in\mathbb{N}$ be arbitrary, and let $P\left(n\right)$ be the proposition given by \begin{equation*} \left(xy\right)n=x\left(yn\right) \end{equation*} For the base case we have $n=0$ and so \begin{align*} \left(xy\right)0&=0 ,\text{By definition of multiplication}\\ &=x\left(0\right),\text{By definition of multiplication}\\ &=x\left(y*0\right),\text{By definition of multiplication}\\ \end{align*} Hence $P\left(0\right)$ is true. Now, suppose that $P\left(n\right)$ is true, that is \begin{equation*} \left(xy\right)n=x\left(yn\right) \end{equation*} We show that $P\left(S\left(n\right)\right)$ is also true, that is \begin{equation*} \left(xy\right)S\left(n\right)=x\left(yS\left(n\right)\right) \end{equation*} Now, we have that \begin{align*} \left(xy\right)S\left(n\right)&=\left(xy\right)n+xy,\ \text{Definition of multiplication}\\ &=x\left(yn\right)+xy,\ \text{By assumption}\\ &=xy+x\left(yn\right),\ \text{Addition is commutative}\\ &=x\left(y+\left(yn\right)\right),\ \text{Multiplication is distributive over addition}\\ &=x\left(\left(yn\right)+y\right),\ \text{Addition is commutative}\\ &=x\left(yS\left(n\right)\right),\ \text{Addition is commutative}\\ \end{align*} Hence $P\left(S\left(n\right)\right)$ is true. Hence, it follows by the principle of mathematical induction that for all $a,b,c\in\mathbb{N}$ we have that $a\left(bc\right)=\left(ab\right)c$. $\qed$ \end{theorem} \subsubsection{The Zero and Identity laws} ~\\ These two laws allow us to note that adding zero to any natural number $n$ gives back $n$ and multiplying $n$ by $1$ gives $n$. \begin{theorem}{The zero and Identity laws} Let $n\in\mathbb{N}$. We have that \begin{enumerate} \item $n+0=n=0+n$ \item $1*n=n=n*1$ \end{enumerate} Proof: By commutativity, it is enough to only prove \begin{enumerate} \item $n+0=n$ \item $n*1=n$ \end{enumerate} \begin{enumerate} \item $n+0=n$: This is true by the definition of addition. \item $n*1=n$: We have by the definition of multiplication that \begin{equation*} n*1=n*S\left(0\right)=n*0+n=0+n=n \end{equation*} Where the last equality comes from the zero law and the fact addition is commutative. \end{enumerate} The result follows. $\qed$ \end{theorem} \subsubsection{The cancellation laws} ~\\ These laws allow us to deduce that if $a+b=a+c$ then we must have $b=c$, and if $a\neq 0$ that $ab=ac$ gives $b=c$ \begin{theorem}{The cancellation laws} Let $a,b,c\in\mathbb{N}$. We have that \begin{enumerate} \item If $a+b=a+c$ then we have $b=c$. \item For $a\neq 0$, if $ab=ac$ then we have that $b=c$ \end{enumerate} Proof: \begin{enumerate} \item If $a+b=a+c$ then we have $b=c$: We argue by induction, let $b,c\in\mathbb{N}$ be arbitrary and let $P\left(n\right)$ be the proposition given by \begin{equation*} n+b=n+c \Rightarrow b=c \end{equation*} For the base case $P\left(0\right)$ this holds trivially. Now suppose the proposition $P\left(n\right)$ holds that is \begin{equation*} n+b=n+c \Rightarrow b=c \end{equation*} We show that $P\left(S\left(n\right)\right)$ holds, that is \begin{equation*} S\left(n\right)+b=S\left(n\right)+c \Rightarrow b=c \end{equation*} Now, we have that \begin{align*} S\left(n\right)+b&=S\left(n\right)+c\\ S\left(n+0\right)+b&=S\left(n+0\right)+c\\ n+S\left(0\right)+b&=n+S\left(0\right)+c\\ n+\left(S\left(0\right)+b\right)&=n+\left(S\left(0\right)+c\right),\ \text{By associativity}\\ \left(S\left(0\right)+b\right)&=\left(S\left(0\right)+c\right),\ \text{By hypothesis, as $P\left(n\right)$ has $b,c$ being arbitrary}\\ b+S\left(0\right)&=c+S\left(0\right),\ \text{By commutativity}\\ S\left(b+0\right)&=S\left(c+0\right)\\ S\left(b\right)&=S\left(c\right)\\ \end{align*} Hence we have $b=c$ by proposition \ref{prop:EqualSuccOp}. So $P\left(S\left(n\right)\right)$ is true. Hence by mathematical induction we have that if $a+b=a+c$ we must have that $b=c$. \item For $a\neq 0$, if $ab=ac$ then we have that $b=c$: We again argue by induction, let $b,c\in\mathbb{N}$ be arbitrary and let $P\left(n\right)$ be the proposition given by \begin{equation*} nb=nc\Rightarrow b=c \end{equation*} Moreover, we do induction starting at $n=1$ as the case $n=0$ is vacuously true. So for $P\left(1\right)$ we have that this holds trivially. Now suppose that $P\left(n\right)$ holds. that is \begin{equation*} nb=nc\Rightarrow b=c \end{equation*} We show that $P\left(S\left(n\right)\right)$ is true \begin{equation*} S\left(n\right)b=S\left(n\right)c\Rightarrow b=c \end{equation*} Indeed we have that \begin{align*} S\left(n\right)b&=S\left(n\right)c\\ bS\left(n\right)&=cS\left(n\right),\ \text{By commutativity}\\ bn+b&=cn+c,\ \text{By commutativity}\\ a+b&=a+c,\ nb=nc \text{ by assumption, so let } nb=nc=a \text{ for some } a\\ b&=c,\ \text{By the cancellation law for addition}\\ \end{align*} Hence $P\left(S\left(n\right)\right)$ is true. Hence by mathematical induction we have that for $a\neq 0$ if $ab=ac$ we must have that $b=c$. \end{enumerate} As required. $\qed$. \end{theorem} \subsubsection{Summation and product notation} Now that we have a well-defined notion of addition and multiplication we can define a shorthand to can be useful in avoiding writing out longer chains of additions (or multiplications) in certain situations. We will require the following mapping. Let $s\in\mathbb{N}^{n+1}$ be an ordered $n+1$-tuple of Natural numbers where $s=\left(s_0,s_1,s_1,s_2,\dots,s_n\right)$ and define $\mathbb{N}_n=\left\{0,1,2,3,\dots,n\right\}$. Let $f:\mathbb{N}_n\rightarrow\mathbb{N}$ be a mapping defined by \begin{align*} f:\mathbb{N}_n&\rightarrow\mathbb{N}\\ i&\mapsto f\left(i\right) =s_i \end{align*} This is to say that $f$ simply gets the value of $s_i$ which is an element of the ordered tuple $s$. \begin{definition}{Summation notation} Let $s\in\mathbb{N}^{n+1}$ be an ordered $n+1$-tuple of Natural numbers where $s=\left(s_0,s_1,s_1,s_2,\dots,s_n\right)$ and define $\mathbb{N}_n=\left\{0,1,2,3,\dots,n\right\}$. Let $f:\mathbb{N}_n\rightarrow\mathbb{N}$ be a mapping defined by \begin{align*} f:\mathbb{N}_n&\rightarrow\mathbb{N}\\ i&\mapsto f\left(i\right) =s_i \end{align*} We define the summation notation by \begin{equation*} \sum_{i=0}^n f\left(i\right)=f\left(0\right)+f\left(1\right)+f\left(2\right)+\dots+f\left(n\right) \end{equation*} This can also be written as \begin{equation*} \sum_{i=0}^n s_i=s_0+s_1+s_2+\dots+s_n \end{equation*} We call $i$ the index of the summation and that $i=0$ as the starting index of the summation for some $a\in\mathbb{N}$ and that $n$ is the ending index of the summation. In the case that $s\in\emptyset$ then we define the summation to be $0$ and call such a summation an empty sum. We can also define the summation over a subset of $\mathbb{N}_n$ which allows for starting the summation at a starting point other than $i=0$. Let $T\subseteq\mathbb{N}$. We can define the summation over the set $T$ by \begin{equation*} \sum_{i\in T} s_i \end{equation*} If we have a mapping $g:\mathbb{N}\rightarrow\mathbb{N}$ for some mapping $g$ then we can define a summation over $g$ by \begin{equation*} \sum_{i\in T} g\left(s_i\right) \end{equation*} Finally, we can define a summation over a predicate $P\left(i\right)$ for $i\in T$ giving \begin{equation*} \sum_{P\left(i\right)} g\left(s_i\right) \end{equation*} which means to take the sum of the $g\left(s_i\right)$ where $i$ satisfies the predicate $P$. If the predicate is not satisfied by any $i$ then the summation is also said to be an empty summation and given a value of $0$. In light of definition a summation of a predicate we have that if $a>n$ where $a$ is the index lower of summation and $n$ the upper point of summation then the sum would be by definition equal to $0$. That is to say \begin{equation*} \sum_{i=a}^n s_i = 0 ,\ \text{If } a>n \end{equation*} \end{definition} \begin{example} Let $s=\left(2,3,4,8\right)\in\mathbb{N}^4$ then we have that \begin{equation*} \sum_{i=0}^3 s_i = 2+3+4+8 = 17 \end{equation*} \end{example} \begin{example} Let $g\left(n\right)=n$ and let $k=4$ then we have that \begin{equation*} \sum_{i=0}^4-1 g\left(i\right) = \sum_{i=0}^3 i = 1+2+3+4 = 10 \end{equation*} \end{example} \begin{example} Let $s_1\in\mathbb{N}$ then we have \begin{equation*} \sum_{i=1}^1 s_1 = s_1 \end{equation*} \end{example} \begin{example} Let $g\left(n\right) = n*n $ and let $T=\left\{2,6,11\right\}\subseteq\mathbb{N}^{11}$ then \begin{equation*} \sum_{i\in T} g\left(i\right) = g\left(2\right)+g\left(6\right)+g\left(11\right)=2*2+6*6+11*11=4+36+121=161 \end{equation*} \end{example} \begin{example} Let $g\left(n\right) = n$, let $P\left(n\right)$ be the predicate such that \begin{equation*} P\left(n\right)=\begin{cases} 1,\ \text{If } n=2,4,6\\ 0,\ \text{Otherwise } \end{cases} \end{equation*} Let $T=\left\{2,6,11\right\}\subseteq\mathbb{N}^{11}$ then we have for the $i\in T$ that satisfies $P\left(i\right)$ is given by \begin{equation*} \sum_{P\left(i\right)} i = 2+4=6 \end{equation*} \end{example} \begin{example} Let $f\left(n\right)= n+5$. Consider the sum \begin{equation*} \sum_{i=3}^6 n+5 = \left(3+5\right)+\left(4+5\right)+\left(5+5\right)+\left(6+5\right)=8+9+10+11=38 \end{equation*} We can re-express this sum as \begin{equation*} \sum_{i=0}^3 n+5 = \left(\left(0+3\right)3+5\right)+\left(\left(1+3\right)+5\right)+\left(\left(2+3\right)+5\right)+\left(\left(3+3\right)+5\right)=38 \end{equation*} We have re-indexed the sum into an equivalent form. \end{example} We can make some observations about summation notation. \begin{proposition}{Properties of summation notation}\label{prop:summation_properties_naturals} Let $n,m\in\mathbb{N}$ such that $m 0 \end{equation*} A contradiction to the hypothesis. A similar result holds for $\displaystyle ab = \sum_{i=1}^a b$. Finally if both $a$ and $b$ are zero the result is trivial. The result has been shown. $\qed$. \end{proposition} A similar definition can be made for multiplication, called product notation \begin{definition}{Product notation} Let $s\in\mathbb{N}^{n+1}$ be an ordered $n+1$-tuple of Natural numbers where $s=\left(s_0,s_1,s_1,s_2,\dots,s_n\right)$ and define $\mathbb{N}_n=\left\{0,1,2,3,\dots,n\right\}$. Let $f:\mathbb{N}_n\rightarrow\mathbb{N}$ be a mapping defined by \begin{align*} f:\mathbb{N}_n&\rightarrow\mathbb{N}\\ i&\mapsto f\left(i\right) =s_i \end{align*} We define the product notation by \begin{equation*} \prod_{i=0}^n f\left(i\right)=f\left(0\right)*f\left(1\right)*f\left(2\right)*\dots*f\left(n\right) \end{equation*} This can also be written as \begin{equation*} \prod_{i=0}^n s_i=s_*s_1*s_2*\dots*s_n \end{equation*} We call $i$ the index of the product and that $i=0$ as the lower starting point of the product for some $a\in\mathbb{N}$ and that $n$ is the upper point of the product. In the case that $s\in\emptyset$ then we define the product to be $1$ and call such a product an empty product. We can also define the product over a subset of $\mathbb{N}_n$ which allows for starting the product at a starting point other than $i=0$. Let $T\subseteq\mathbb{N}$. We can define the product over the set $T$ by \begin{equation*} \prod_{i\in T} s_i \end{equation*} If we have a mapping $g:\mathbb{N}\rightarrow\mathbb{N}$ for some mapping $g$ then we can define a product over $g$ by \begin{equation*} \prod_{i\in T} g\left(s_i\right) \end{equation*} Finally, we can define a product over a predicate $P\left(i\right)$ for $i\in T$ giving \begin{equation*} \sum_{P\left(i\right)} g\left(s_i\right) \end{equation*} which means to take the product of the $g\left(s_i\right)$ where $i$ satisfies the predicate $P$. If the predicate is not satisfied by any $i$ then the product is also said to be an empty product and given a value of $1$. In light of definition a product of a predicate we have that if $a>n$ where $a$ is the lower index of the product and $n$ the upper point of product then the product would be by definition equal to $1$. That is to say \begin{equation*} \sum_{i=a}^n s_i = 1 ,\ \text{If } a>n \end{equation*} \end{definition} \begin{example} Let $s=\left(2,3,4,8\right)\in\mathbb{N}^4$ then we have that \begin{equation*} \prod_{i=0}^3 s_i = 2*3*4*8 = 192 \end{equation*} \end{example} \begin{example} Let $g\left(n\right)=n$ and let $k=4$ then we have that \begin{equation*} \prod_{i=0}^{4-1} g\left(i\right) = \prod_{i=0}^3 i = 1*2*3*4 = 24 \end{equation*} \end{example} \begin{example} Let $s_1\in\mathbb{N}$ then we have \begin{equation*} \prod_{i=1}^1 s_1 = s_1 \end{equation*} \end{example} \begin{example} Let $g\left(n\right) = n*n $ and let $T=\left\{2,6,11\right\}\subseteq\mathbb{N}^{11}$ then \begin{equation*} \prod_{i\in T} g\left(i\right) = g\left(2\right)*g\left(6\right)*g\left(11\right)=\left(2*2\right)+\left(6*6\right)+\left(11*11\right)=4*36*121=17424 \end{equation*} \end{example} \begin{example} Let $g\left(n\right) = n$, let $P\left(n\right)$ be the predicate such that \begin{equation*} P\left(n\right)=\begin{cases} 1,\ \text{If } n=2,4,6\\ 0,\ \text{Otherwise } \end{cases} \end{equation*} Let $T=\left\{2,6,11\right\}\subseteq\mathbb{N}^{11}$ then we have for the $i\in T$ that satisfies $P\left(i\right)$ is given by \begin{equation*} \sum_{P\left(i\right)} i = 2*4=12 \end{equation*} \end{example} There is an some immediate properties of product notation that are clear \begin{proposition}{Properties of product notation} Let $n,m\in\mathbb{N}$ such that $m0$ and $m>0$. We have by definition of exponentiation that \begin{align*} a^n*a^m=\prod_{i=1}^n a * \prod_{i=1}^m a=\underbrace{a*a*\dots*a}_{n\text{ times}}*\underbrace{a*a*\dots*a}_{m\text{ times}} &=\underbrace{a*a\dots*a}_{n+m\text{ times}} =a^{n+m} \end{align*} as required. $\qed$ \end{proposition} We also have the following result that combines multiplying two numbers and raising that result to a power. As an example consider $\left(2*3\right)^2= 6^2=36$. Now consider $2^2=4$ and $3^2=9$ and we clearly have $4*9=36$. The powers can come through to each of the numbers of the multiplication. \begin{proposition}{Power of product is product of powers}\label{prop:ExponentiationPowerOfProductIsProductOfPowers} Let $a,b,n\in\mathbb{N}$. We have that \begin{equation*} \left(a*b\right)^n=a^n*b^n \end{equation*} Proof: If $n=0$ then $\left(a*b\right)^0=1$ by definition and $a^0*b^0=1$. So suppose that $n>0$ then we have that \begin{align*} \left(a*b\right)^n=\prod_{i=1}^n ab &= \underbrace{ab*ab*ab\dots*ab}_{n\text {times}}\\ &= \left(\underbrace{a*a*a\dots*a}_{n\text {times}}\right)*\left(\underbrace{b*b*b\dots*b}_{n\text {times}}\right),\ \text{By commutativity of multiplication}\\ &= a^n*b^n\\ \end{align*} The proposition has been shown. $\qed$ \end{proposition} \subsubsection{Subtraction} We can define an operation that will allow us to at least partially undo addition. To define this operation we need to make use of the less than operator. \begin{definition}{Subtraction of natural number} Let $n,m\in\mathbb{N}$ such that $m\leq n$. Let $d\in\mathbb{N}$ such that $n=m+d$. We define subtraction by \begin{equation*} d=n-m \end{equation*} We call $d$ the difference between $n$ and $m$. \end{definition} There is an immediate result from the definition of subtraction \begin{proposition}{$a+\left(b-c\right)=\left(a+b\right)-c$}\label{prop:NaturalAddDifference} Let $a,b,c\in\mathbb{N}$ with $b\geq c$. We have that \begin{equation*} a+\left(b-c\right)=\left(a+b\right)-c \end{equation*} Proof: We argue by induction. Let $P\left(n\right)$ denote the proposition \begin{equation*} a+\left(n-c\right)=\left(a+n\right)-c \end{equation*} For the base case $n=0$ we have by definition $c=0$ and so \begin{equation*} a+\left(0-0\right)=a=\left(a+0\right)-0 \end{equation*} Now suppose that $P\left(n\right)$ holds, we show that $P\left(n+1\right)$ is true that is \begin{equation*} a+\left(\left(n+1\right)-c\right)=\left(a+\left(n+1\right)\right)-c \end{equation*} We have that $n+1=\left(n+0\right)+1=n+\left(0+1\right)$ and so \begin{align*} a+\left(\left(n+1\right)-c\right)&=a+\left(n+\left(0+1\right)-c\right)\\ &=a+\left(n+\left(1-c\right)\right)\\ &=\left(a+n\right)+1-c\\ &=a+\left(n+1\right)-c \end{align*} As required. $\qed$ \end{proposition} We immediately see that subtraction is not commutative that is $a-b\neq b-a$ in fact it is not even defined for $b-a$ unless $b\geq a$ but then it is not defined for $a-b$ and visa-versa. Likewise it is not associative as for example $\left(8-4\right)-2=2$ but $8-\left(4-2\right)=6$. We do however retain the fact that multiplication is commutative over subtraction \begin{proposition}{Multiplication distributes over subtraction} Let $a,b,c\in\mathbb{N}$ with $b\geq c$ and let $a\in\mathbb{N}$. We have that \begin{enumerate} \item $a\left(b-c\right)=ab-ac$ \item $\left(b-c\right)a=ba-ca=ab-ac$ \end{enumerate} Proof: \begin{enumerate} \item $a\left(b-c\right)=ab-ac$: Let $a\in\mathbb{N}$ be arbitrary. We argue by induction of the proposition $P\left(n\right)$ given by \begin{equation*} a\left(n-m\right)=an-am \end{equation*} where by definition $m\leq n$. For the base case we have $P\left(0\right)$ we have that $n=m=0$ and so \begin{equation*} a\left(0-0\right)=a*0=0=a*0-a*0 \end{equation*} Showing the base case. Now suppose that $P\left(n\right)$ holds we show that $P\left(n+1\right)$ is true, that is we show \begin{equation*} a\left(\left(n+1\right)-m\right)=a\left(n+1\right)-am \end{equation*} where $m\leq \left(n+1\right)$. There are two cases to consider $if m=n+1$ then we have \begin{equation*} a\left(\left(n+1\right)-m\right)=a*0=0=a\left(n-1\right)-am \end{equation*} Now suppose that $m<\left(n+1\right)$ then \begin{equation*} a\left(\left(n+1\right)-m\right)=a\left(n+1\right)-am \end{equation*} by the induction hypothesis. The result follows by induction. \item $\left(b-c\right)a=ba-ca=ab-ac$: As multiplication is commutative we have that \begin{align*} \left(b-c\right)a&=a\left(b-c\right)\\ &=ab-ac\\ &=ba-ca \end{align*} \end{enumerate} The result follows. $\qed$ \end{proposition} \subsubsection{The principle of strong induction} ~\\ The final property of the natural we shall look at is that of the principle of strong induction, although as we will see, this is actually equivalent to usual induction. There is one more version of induction that is sometimes useful, this is the so-called principle of strong induction, this is instead of assuming $P\left(n\right)$ is true and showing that $P\left(n+1\right)$. We instead assume that for all $n\leq k$ for some $k\in\mathbb{N}$ we have that $P\left(n\right)$ is true for all $n\leq k$ and we show that this implies that $P\left(k+1\right)$ is true. \begin{theorem}{The principle of strong induction} Let $P\left(n\right)$ be a proposition about a natural number $n\in\mathbb{N}$. Moreover, suppose that \begin{enumerate} \item $P\left(0\right)$ is true. \item $\forall k\in\mathbb{N}:P\left(0\right)\wedge P\left(1\right)\wedge P\left(2\right)\wedge\dots\wedge P\left(k\right)$ all being true implies that $P\left(k+1\right)$ is true. \end{enumerate} If these two statements are true, we have that $P\left(n\right)$ is true for any natural number $n$, and we say the proposition $P\left(n\right)$ holds by the principle of strong mathematical induction. Proof: Define $\Tilde{P}\left(n\right)$ to be the following proposition \begin{equation*} \Tilde{P}\left(n\right)=P\left(0\right)\wedge P\left(1\right)\wedge P\left(2\right)\wedge\dots\wedge P\left(n\right) \end{equation*} We show that $\Tilde{P}\left(n\right)$ for all $n\geq 0$. By assumption $\Tilde{P}\left(n\right)$ is true as $\Tilde{P}\left(n\right)=P\left(0\right)$. Now suppose that $\Tilde{P}\left(n\right)$ is true for some $n\in\mathbb{N}$, that is \begin{equation*} \Tilde{P}\left(n\right)=P\left(0\right)\wedge P\left(1\right)\wedge P\left(2\right)\wedge\dots\wedge P\left(n\right) \end{equation*} is true, we show that $ \Tilde{P}\left(n+1\right)$ is true, that is \begin{equation*} \Tilde{P}\left(n+1\right)=P\left(0\right)\wedge P\left(1\right)\wedge P\left(2\right)\wedge\dots\wedge P\left(n\right)\wedge P\left(n+1\right) \end{equation*} By assumption 2. as we have that $\forall n\in\mathbb{N}:P\left(0\right)\wedge P\left(1\right)\wedge P\left(2\right)\wedge\dots\wedge P\left(n\right)$ implies that $P\left(n+1\right)$ is true. Hence we have that \begin{equation*} \Tilde{P}\left(n+1\right)=\Tilde{P}\left(n\right)\wedge P\left(n+1\right)=\Tilde{P}\left(n+1\right) \end{equation*} is true. Hence by the principle of mathematical induction we have that $\Tilde{P}\left(n\right)$ is true for all $n\geq 0$. $\qed$ \end{theorem} As mentioned earlier, we said that strong induction and the usual induction are equivalent, we shall prove this. We used induction to prove strong induction so it is left to show that given the assumptions for strong induction, we can deduce the truth $\forall n\in\mathbb{N}$ of the proposition $P\left(n\right)$ only using induction. \begin{theorem}{Strong induction is equivalent to the usual induction} Suppose that the assumptions of strong induction hold. That is suppose $P\left(n\right)$ be a proposition about a natural number $n\in\mathbb{N}$ and moreover suppose that \begin{enumerate} \item $P\left(0\right)$ is true. \item $\forall k\in\mathbb{N}:P\left(0\right)\wedge P\left(1\right)\wedge P\left(2\right)\wedge\dots\wedge P\left(k\right)$ all being true implies that $P\left(k+1\right)$ is true. \end{enumerate} We have that the truth of $P\left(n\right)$ for all $n\in\mathbb{N}$ can be deduced using only regular induction. Proof: Let $\Tilde{P}\left(n\right)$ be the proposition be given by \begin{equation*} \forall k\leq n\text{ we have } P\left(k\right) \text{ is true} \end{equation*} We show by the principle of induction that \begin{enumerate} \item $\Tilde{P}\left(0\right)$ is true \item $\Tilde{P}\left(n\right)$ being true implies $\Tilde{P}\left(n+1\right)$ is true for any natural number $n$. \end{enumerate} \begin{enumerate} \item $\Tilde{P}\left(0\right)$ is true: To see this, we have that $\Tilde{P}\left(0\right)$ is given by \begin{equation*} \forall k\leq 0\text{ we have } P\left(0\right) \text{ is true} \end{equation*} This clearly holds as the only natural number that is less than or equal to zero is zero. Hence $P\left(0\right)$ is true and so $\Tilde{P}\left(0\right)$. \item $\Tilde{P}\left(n\right)$ being true implies $\Tilde{P}\left(n+1\right)$ is true for any Natural number $n$: Suppose that $\Tilde{P}\left(n\right)$ is true, that is \begin{equation*} \forall k\leq n\text{ we have } P\left(k\right) \text{ is true} \end{equation*} we show that $\Tilde{P}\left(n+1\right)$ is true, that is \begin{equation*} \forall k\leq n+1\text{ we have } P\left(k\right) \text{ is true} \end{equation*} Let $k\leq n+1$ be a natural number, have two cases to consider. \begin{enumerate} \item If $ka$ \item If $a\leq b$ and $b\leq c$ then $a\leq c$ \item If $ab$ and $b\geq c$ then $a>c$ \item If $a\geq b$ and $b>c$ then $a>c$ \item If $a>b$ and $b>c$ then $a>c$ \item If $a\leq b$ then $a+c\leq b+c$ \item If $ab$ then $a+c>b+c$ \item If $a\leq b$ then $ac\leq bc$ \item If $ab$ then $ac>bc$ \end{enumerate} Proof: \begin{enumerate} \item $a\leq b$ is the same as $b\geq a$: Suppose that $a\leq b$ then by definition of $a\leq b$ we have that $a\subseteq b$. We then clearly have that $b\not\subset a$ and so either $b>a$ by definition or $b=a$. In other words $b\geq a$. \item $aa$: Similar to the first part. If $aa$ by definition of greater than. \item If $a\leq b$ and $b\leq c$ then $a\leq c$: Suppose that $a\leq b$ and $b\leq c$. By definition, we have that $a\subseteq b$ and $b\subseteq a$ and so by proposition \ref{prop:SetInclusionTransitivityProp} we have $a\subseteq c$ which is to say $a\leq c$. \item If $ab$ and $b\geq c$ then $a>c$: Applying part 2. of this proposition to $a>b$ and $a>c$ and part 1. to $b\geq c$ gives the equivalent statement $bc$ then $a>c$: Applying part 1. of this proposition to $a\geq b$ and part 1. to $b>c$ and $a>c$ gives the equivalent statement $b\leq a$ and $c< b$ then $cb$ and $b>c$ then $a>c$: Applying part 2. to $a>b$, $b>c$ and $c>a$ gives the equivalent statement $bb$ then $a+c>b+c$: Applying part 2. of the proposition give the equivalent statement of $b< a$ then $b+c< a+c$ and so we can apply part 11. \item If $a\geq b$ then $a+c\geq b+c$: Applying part 1. of the proposition give the equivalent statement of $b\leq a$ then $b+c\leq a+c$ and so we can apply part 12. \item If $ab$ then $ac>bc$: Applying part 2. of the proposition gives the equivalent statement of $b< a$ then $bc b\geq c$. We have that \begin{equation*} \left(a,b-c\right)\sim\left(a+c,b\right) \end{equation*} Proof: Let $a,b,c\in\mathbb{N}$ be as given. By definition of $\sim$ we have $\left(x,y\right)\sim\left(u,v\right)$ if and only if $x+v=u+y$. We argue by contradiction, suppose that $\left(a,b-c\right)\not\sim\left(a+c,b\right)$ then by definition we have that \begin{align*} a+b&\neq a+c+\left(b-c\right)\\ b&\neq c+\left(b-c\right),\ \text{By the cancellation law}\\ b&\neq \left(c+b\right)-c,\ \text{By proposition}\ref{prop:NaturalAddDifference}\\ b&\neq\left(b+c\right)-c,\ \text{By commutativity}\\ b&\neq b+\left(c-c\right),\ \text{By proposition}\ref{prop:NaturalAddDifference}\\ 0&\neq \left(c-c\right),\ \text{By the cancellation law}\\ 0&\neq 0 \end{align*} A contradiction. $\qed$ \end{lemma} By this lemma it follows that $a-\left(b-c\right)=\left(a+c\right)-b$. We now look at the definition of what the set of equivalence relations looks like. We make the following definition \begin{definition}{Quotient set}\label{def:QuotientSet} Let $S$ be a set with an equivalence relation $\sim$. Let $x\in S$ and consider the equivalence class $\left[x\right]_\sim$. We define the quotient set of $S$, denoted by $S/\sim$ by \begin{equation*} S/\sim=\left\{\left[x\right]_\sim :x\in S\right\} \end{equation*} \end{definition} Why have we called the set of the equivalence classes a quotient set? We can see why with a few examples. \begin{example} We reconsider the example where $X$ is the set of all people currently alive with the relation $\sim$ given by \begin{equation*} \forall\left(x,y\right)\in X\times X: x\sim y\iff x\text{ and }y\text{ where born in the same year} \end{equation*} We know that $\sim$ is an equivalence relation and we know that the equivalence classes define a set of all people currently alive born in a certain year. We can identify the quotient set $X/\sim$ as the set of all of the possible years that all people currently alive could live in. As an example suppose that person $x\in X$ was born in 1983. Then by the definition of $\sim$ we have that $x\sim y$ if and only if $y$ is also born in 1983 and that $\left[x\right]_\sim$ is the equivalence class of all people born in 1983. As $\left[x\right]_\sim\in X/\sim$ then $\left[x\right]_\sim$ is the set in $X/\sim$ that represents the year 1983. That is the quotient set has taken the set $X$ of all currently alive people who were born in a certain year and turned it into the set of all possible years. \end{example} \begin{example} Let $X$ be the set of all possible cars and define the equivalence relation $\sim$ such that $x\sim y$ if and only if $x$ and $y$ are the same colour. We have that $sim$ is an equivalence relation. Reflexivity is clear as if $x$ is a certain colour then clearly $x\sim x$ will be true. Now if $x\sim y$ then both $x$ and $y$ are the same colour and so $y\sim x$. Finally if $x\sim y$ and $y\sim z$ then $x$ and $y$ are the same colour and so are $y$ and $z$ so it follows that $x\sim z$. Suppose now that $x\in X$, then the equivalence class $\left[x\right]_\sim$ is the set where all cars are the same colours. Hence the quotient set $X/\sim$ will be the set of all possible car colours. The quotient set has taken the set of all possible cars and turned it into the set of all possible car colours. If we had a different relation $R$ where $xRy$ if and only if $x$ and $y$ have exactly two doors then $R$ is also an equivalence relation and $X/R$ would take all of the possible cars $X$ and turn it into the set of all of the cars that have exactly two doors. \end{example} These examples show that the quotient set takes a set of objects $S$ and extracts a given property defined by the equivalence relation $\sim$ defined on $S$. How can we use the quotient set on the equivalence classes of the subtraction tuples? We have that the the quotient set of $\mathbb{N}^2/\sim$ is given by \begin{equation*} \mathbb{N}^2/\sim=\left\{\left[x\right]_\sim:x\in\mathbb{N}^2\right\} \end{equation*} What do these elements actually look like? Let $\left(a,b\right)=x\in\mathbb{N}^2$ and consider the equivalence class $\left[x\right]_\sim$. Firstly, in the naturals, we know that $0=0-0$ and more generally that $0=a-a$ for any $a\in\mathbb{Z}$. Hence $0\in\left[\left(0,0\right)\right]$. Now, consider $\left[\left(a,0\right)\right]$ then we would have that any $\left(c,d\right)=y\in\left[\left(a,0\right)\right]$ is such that $\left(a,0\right)\sim\left(c,d\right)$ if and only if $a-0=c-d$. Hence each $a$ is equivalent to some subtraction tuple. Moreover each $\left(a,0\right)=a\in\mathbb{N}$, therefore we have a canonical representation for each element $a\in\mathbb{N}$. What happens if we have a tuple $\left(a,b\right)$ where $a\geq b$? We can see that if $\left(a,b\right)\sim\left(c,d\right)$ then $a+d=c+b$. For example we have that $\left(0,3\right)\sim\left(1,4\right)$ which gives $\left(8,11\right)\sim\left(0,3\right) = 8-11 = 0-3 8+3 = 11$ \begin{equation*} 0-3=1-4 \Rightarrow 0+4=1+3 \Rightarrow 4=4 \end{equation*} Hence we can define a canonical representation for each $\left(0,a\right)$ where $a\in\mathbb{N}$. We will write the element $\left(0 ,a\right)$ by $-a$ for each $a\in\mathbb{N}$. We have define the set of Integers. \begin{definition}{Integers} Let $\mathbb{N}^2$ have the equivalence relation $\sim$ defined by $\left(a,b\right)\sim\left(c,d\right)$ if and only if $a+d=b+c$. We define the set of Integers, denoted $\mathbb{Z}$, as the quotient set $\mathbb{N}^2/\sim$. The set $\mathbb{Z}$ has the form \begin{equation} \mathbb{Z}=\left\{\dots,-4,-3,-2,-1,0,1,2,3,4,\dots\right\} \end{equation} \end{definition} We make two additional definitions based on the definition of the canonical form the equivalence classes \begin{definition}{Positive Integer} Let $a\in\mathbb{Z}$. We say that $a$ is a positive integer if and only if $a\in\left[\left(b,0\right)\right]$ for some $b\in\mathbb{N}$ with $b\neq 0$. \end{definition} \begin{definition}{Negative Integer} Let $a\in\mathbb{Z}$. We say that $a$ is a negative integer if and only if $a\in\left[\left(0,b\right)\right]$ for some $b\in\mathbb{N}$ with $b\neq 0$. \end{definition} We can use these two definitions to define an occasionally useful idea. \begin{definition}{Sign of an integer} Let $x\in\mathbb{Z}$. We define the sign of $x$, denoted by $\sgn\left(x\right)$ to be the following function \begin{align*} \sgn:\mathbb{Z}&\rightarrow\left\{-1,0,1\right\}\\ x&\mapsto\sgn\left(x\right)=\begin{cases} 1,\ \text{If } x\text{ is a positive integer}\\ -1,\ \text{If } x\text{ is a negative integer}\\ 0,\ \text{Otherwise} \end{cases} \end{align*} \end{definition} We also have the following, clear result \begin{proposition}{The natural numbers are a subset of the integers} We have that $\mathbb{N}\subseteq\mathbb{Z}$ Proof: We have that the elements of the equivalence class $\left[\left(x,0\right)\right]$ have the form $x-0=x\in\mathbb{N}$. Let $a\in\mathbb{N}$ then we have that $a\in\left[\left(a,0\right)\right]$. This holds for every $a\in\mathbb{N}$ and so $\mathbb{N}\subseteq\mathbb{Z}$. $\qed$ \end{proposition} We will let $\left[\left(a,b\right)\right]$ be denoted by $\left[a,b\right]$ and extend the operations of addition and multiplication to the integers by defining how they work on the equivalence classes. \subsection{Extending equality to the integers} Equality for the integers is easy to define. \begin{definition}{Equality of integers} Let $x,y\in\mathbb{Z}$ be two integer numbers. We define that two integers are equal, denoted $x=y$ if and only if $x\sim y$. This is the same as saying both $x$ and $y$ belong to the same equivalence class. In the case where $x\not\sim y$, we say that $x$ is not equal to $y$ and write $x\neq y$. \end{definition} \subsection{Extending inequality operators to the integers} Inequality operators extend in a natural way. \begin{definition}{Less than operator} Let $x,y\in\mathbb{Z}$ where $x\in\left[a,b\right]$ and $y\in\left[c,d\right]$ for some $a,b,c,d\in\mathbb{N}$. The less than operator, denoted by $xy$ is defined by the logical proposition \begin{equation*} >\left(x,y\right)=\begin{cases} 1,\ \text{If } a+d>b+c\\ 0,\ \text{Otherwise} \end{cases} \end{equation*} This can equivalently be express as \begin{equation*} x>y \iff a+d>b+c \end{equation*} \end{definition} \begin{definition}{Greater than or equal to operator} Let $x,y\in\mathbb{Z}$ where $x\in\left[a,b\right]$ and $y\in\left[c,d\right]$ for some $a,b,c,d\in\mathbb{N}$. The greater than or equal to operator, denoted by $x\geq y$ is defined by the logical proposition \begin{equation*} \geq\left(x,y\right)=\begin{cases} 1,\ \text{If } a+d\geq b+c\\ 0,\ \text{Otherwise} \end{cases} \end{equation*} This can equivalently be express as \begin{equation*} x\geq y \iff a+d\geq b+c \end{equation*} \end{definition} \subsection{Extending addition to the integers} We have an understanding of addition on the natural numbers, mainly the recursive definition given by \begin{align*} +&:\mathbb{N}^2\mapping \mathbb{N}\\ \left(m,n\right)&\mapsto +\left(m,n\right)=\begin{cases} m+0=m,\ \text{If } n=0\\ m+S\left(n\right)=S\left(m+n\right),\ \text{If } n\neq 0 \end{cases} \end{align*} Now if we take $a,b\in\mathbb{Z}$ with $a,b$ being positive integers then we have that $a\in\left[\left(a,0\right)\right]$ and $b\in\left[\left(b,0\right)\right]$. We then have that $a+b$ will be in $\left[\left(a+b,0\right)\right]$. Now suppose that $a,b\in\mathbb{N}$ with $a,b$ being negative integers then we have that $a\in\left[\left(0,a\right)\right]$ and $b\in\left[\left(0,b\right)\right]$. Intuitively we know that $-2+-3=-5$ so we want these to add like in the positive integer case. This is to say we have $a+b$ will be in the class $\left[\left(0,a+b\right)\right]$. We can combine these two observations to define addition on the integers. \begin{definition}{Addition on the Integers} Let $x,y\in\mathbb{Z}$ with $x=\left(a,b\right)$ and $y=\left(c,d\right)$. We define addition on the integers by \begin{equation} \left[a,b\right]+\left[c,d\right]=\left[a+c,b+d\right] \end{equation} \end{definition} To check this definition makes sense consider $x=4,y=3$. Both $x$ and $y$ belong to some equivalence class, for example $x\in\left[\left(5,1\right)\right]$ and $y\in\left[\left(8,5\right)\right]$. Then we have that $x+y=7$ and \begin{equation*} \left(5,1\right)+\left(8,5\right)=\left(5+8,1+5\right)=\left(13,6\right) \Rightarrow 13-6=7 \end{equation*} \subsection{Extending multiplication to the integers} We also extend multiplication to the integers. We have the definition of multiplication on the naturals given by \begin{align*} *&:\mathbb{N}\times\mathbb{N}\mapping \mathbb{N}\\ \left(m,n\right)&\mapsto *\left(m,n\right)=\begin{cases} m*0=0,\ \text{If } n=0\\ m*S\left(n\right)=m*n+m,\ \text{If } n\neq 0 \end{cases} \end{align*} As before, if we take $x,y\in\mathbb{Z}$ with $x,y$ being positive integers then we have that $x\in\left[\left(x,0\right)\right]$ and $b\in\left[\left(x,0\right)\right]$ we have that $x*y\in\left[\left(x*y,0\right)\right]$. Suppose that $x,y\in\mathbb{Z}$ with $x=\left(a,b\right)$ and $y=\left(c,d\right)$. We have that \begin{align*} \left(a-b\right)*\left(c-d\right)&=\left(a-b\right)c-\left(a-b\right)d\\ &=ac-bc-\left(ad-bd\right)\\ &=ac-bc+bd-ad\\ &= ac+bd-bc-ad\\ &=ac+bd-\left(ad+bc\right) \end{align*} This is $\left(a,b\right)*\left(c,d\right)=\left(ac+bd,ad+bc\right)$ This well be the definition of multiplication of the integers. \begin{definition}{Multiplication on the Integers} Let $x,y\in\mathbb{Z}$ with $x=\left(a,b\right)$ and $y=\left(c,d\right)$. We define multiplication on the integers by \begin{equation} \left[a,b\right]*\left[c,d\right]=\left[ac+bd,ad+bc\right] \end{equation} \end{definition} \subsection{Closure properties of addition and multiplication} As with the natural numbers we need to show that the operations of addition and multiplication are closed. Additionally we want to prove our claim at the start of this section that the integers allow us to completely perform subtraction. \begin{theorem}{Addition and multiplication on the integers are well-defined operators and closed} We have that $\forall x,y\in\mathbb{Z}$ that \begin{enumerate} \item $x+y\in\mathbb{Z}$ \item $x*y\in\mathbb{Z}$ \end{enumerate} Proof: \begin{enumerate} \item $x+y\in\mathbb{Z}$: We need to show that if $\left(a,b\right)\sim\left(a',b'\right)$ and $\left(c,d\right)\sim\left(c',d'\right)$ then $\left(a+c,b+d\right)\sim\left(a'+c',b'+d'\right)$ as this will show equivalent elements produce the same result when added and therefore integer addition is well-defined. We have by definition that $\left(a,b\right)\sim\left(a',b'\right)$ that $a+b'=a'+b$, likewise we have $\left(c,d\right)\sim\left(c',d'\right)$ gives $c+d'=c'+d$. Now, we have that \begin{align*} a+b'+c+d'&=a'+b+c'+d\\ a+c+b'+d'&=a'+c'+b+d\\ \Rightarrow \left(a+c,b+d\right)&\sim\left(a'+c',b'+d'\right) \end{align*} Hence $\left[\left(a+c,b+d\right)\right]=\left[\left(a'+c',b'+d'\right)\right]$ and so addition is well-defined. It is left to prove closure. Let $x,y\in\mathbb{Z}$ with $x=\left(a,b\right)$ and $y=\left(c,d\right)$. By definition of integer addition we have that $x+y=\left(a+c,b+d\right)$ and moreover we have $a+c\in\mathbb{N}$ and $b+d\in\mathbb{N}$. Hence $\left(a+c,b+d\right)\in\left[a+c,b+d\right]$ and therefore $x+y\in\mathbb{Z}$ showing closure. \item $x*y\in\mathbb{Z}$: As with addition we need to show that if $\left(a,b\right)\sim\left(a',b'\right)$ and $\left(c,d\right)\sim\left(c',d'\right)$ then $\left(a,b\right)*\left(c,d\right) \sim \left(a',b'\right)*\left(c',d'\right)$. As before we have that We have that \begin{equation*} \left(a,b\right)*\left(c,d\right)=\left(ac+bd,ad+bc\right)\iff ac+bd-\left(ad+bc\right) \end{equation*} Now as $\left(a,b\right)\sim\left(a',b'\right)$ then $a+b'=b+a'$ and $\left(c,d\right)\sim\left(c',d'\right)$ then $c+d'=d+c'$. Hence \begin{align*} ac+bd-\left(ad+bc\right)&=\left(ac-ad\right)+\left(bd-bc\right)\\ &=a\left(c-d\right)+b\left(d-c\right)\\ &=a\left(c'-d'\right)+b\left(d'-c'\right), \text{ By assumption as} c+d'=d+c'\Rightarrow c-d=c'-d'\\ &=ac'-ad'+bd'-bc'\\ &=\left(ac'-bc'\right)+\left(bd'-ad'\right), \text{ By commutativity of the Naturals}\\ &=c'\left(a-b\right)+d'\left(b-a\right)\\ &=c'\left(a'-b'\right)+d'\left(b'-a'\right), \text{ By assumption as } a+b'=b+a'\Rightarrow a-b=a'-b'\\ &=\left(c'a'-c'b'\right)+\left(d'b'-d'a'\right)\\ &=c'a'-c'b'+d'b'-d'a'\\ &=a'c'-b'c'+b'd'-a'd', \text{ By commutativity of the Naturals}\\ &=\left(a'c+b'd'\right)-b'c'-a'd'\\ &=\left(a'c+b'd'\right)-\left(a'd'+b'c'\right), \text{ By lemma \ref{lem:NaturalMinusDifferenceOfNatural}}\\ \end{align*} This shows that multiplication is well-defined. It is left to show closure. Let $x,y\in\mathbb{Z}$ with $x=\left(a,b\right)$ and $y=\left(c,d\right)$. By the definition of multiplication on the integers we have that $x*y=\left(ac+bd,ad+bc\right)$ with $ac+bd\in\mathbb{N}$ and $ad+bc\in\mathbb{N}$. Hence we conclude that $\left(ac+bd,ad+bc\right)\in\left[ac+bd,ad+bc\right]$, and so by definition $x*y\in\mathbb{Z}$. \end{enumerate} The result is shown. $\qed$ \end{theorem} Now that we have shown closure we can deduce an immediate property. \begin{proposition}{Multiplication of an integer by $-1$}\label{prop:multiplication_by_negative_one_for_integers} Let $x\in\mathbb{Z}$ where $x\in\left[a,b\right]$ for some $a,b\in\mathbb{N}$. We have that \begin{enumerate} \item $-1*x = -1*\left(a,b\right)=\left(b,a\right)$ \item $x*-1 = \left(a,b\right)*-1=\left(b,a\right)$ \end{enumerate} Proof: \begin{enumerate} \item $-1*x = -1*\left(a,b\right)=\left(b,a\right)$: We have that $-1\in\left[0,1\right]$ and so \begin{align*} -1*x&=\left(0,1\right)*\left(a,b\right)\\ &=\left(0*a+1*b,0*b+1*a\right)\\ &=\left(b,a\right) \end{align*} \item $x*-1 = \left(a,b\right)*-1=\left(b,a\right)$: Likewise we have \begin{align*} x*-1&=\left(a,b\right)*\left(0,1\right)\\ &=\left(a*0+b*1,a*1+b*0\right)\\ &=\left(b,a\right) \end{align*} \end{enumerate} As required. $\qed$ \end{proposition} \begin{corollary}{Multiplication of a positive integer by $-1$ makes it a negative integer and multiplication of a negative integer by $-1$ makes it a positive integer}\label{cor:multiplication_by_negative_one_changes_integer_sign} \begin{enumerate} \item If $x$ is a positive integer then $-1*x$ is a negative integer. \item If $x$ is a negative integer then $-1*x$ is a positive integer. \end{enumerate} Proof: By definition if $x\in\mathbb{Z}$ is positive then $x\in\left[a,0\right]$ for some $a\in\mathbb{N}$. By proposition \ref{prop:multiplication_by_negative_one_for_integers} we have that $-1*x=\left(0,a\right)=x*-1$, which is by definition a negative integer. Likewise if $x\in\mathbb{Z}$ is negative then $x\in\left[0,a\right]$ for some $a\in\mathbb{N}$. By proposition \ref{prop:multiplication_by_negative_one_for_integers} we have that $-1*x=\left(a,0\right)=x*-1$, which is by definition a positive integer. $\qed$ \end{corollary} \subsection{Associativity of integer addition and multiplication} The associativity of addition and multiplication of the naturals also extends to the integers. \begin{theorem} Let $x,y,z\in\mathbb{Z}$. We have that \begin{enumerate} \item $x+\left(y+z\right)=\left(x+y\right)+z$ \item $x\left(yz\right)=\left(xy\right)z$ \end{enumerate} Proof: \begin{enumerate} \item $x+\left(y+z\right)=\left(x+y\right)+z$: Let $x,y,z\in\mathbb{Z}$ be such that $x=\left(a,b\right), y=\left(c,d\right)$ and $z=\left(e,f\right)$ where $a,b,c,d,e,f\in\mathbb{N}$ and we have that $\left(a,b\right)\in\left[a,b\right], \left(c,d\right)\in\left[c,d\right]$ and $\left(e,f\right)\in\left[e,f\right]$. We have that \begin{align*} x+\left(y+z\right)&=\left(a,b\right)+\left(\left(c,d\right)+\left(e,f\right)\right)\\ &=\left(a,b\right)+\left(c+e,d+f\right)\\ &=\left(a+\left(c+e\right),b+\left(d+f\right)\right)\\ &=\left(\left(a+c\right)+e,\left(b+d\right)+f\right),\text{ By associativity of addition for natural numbers}\\ &=\left(a+c,b+d\right)+\left(e,f\right)\\ &=\left(\left(a,b\right)+\left(c,d\right)\right)+\left(e,f\right)\\ &=\left(x+y\right)+z \end{align*} Which shows associativity of addition. \item $x\left(yz\right)=\left(xy\right)z$: As with addition, let $x,y,z\in\mathbb{Z}$ be such that $x=\left(a,b\right), y=\left(c,d\right)$ and $z=\left(e,f\right)$ where $a,b,c,d,e,f\in\mathbb{N}$ and we have that $\left(a,b\right)\in\left[a,b\right], \left(c,d\right)\in\left[c,d\right]$ and $\left(e,f\right)\in\left[e,f\right]$. We then have that \begin{align*} x\left(yz\right)&=\left(a,b\right)*\left(\left(c,d\right)\left(e,f\right)\right)\\ &=\left(a,b\right)\left(ce+df,cf+de\right)\\ &=\left(a\left(ce+df\right)+b\left(cf+de\right),a\left(cf+de\right)+b\left(ce+df\right)\right)\\ &=\left(ace+adf+bcf+bde,acf+ade+bce+bdf\right)\\ &=\left(ace+bde+adf+bcf,acf+bdf+ade+bce\right),\ \text{By associativity of addition for natural numbers}\\ &=\left(\left(ac+bd\right)e+\left(ad+bc\right)f,\left(ac+bd\right)f+\left(ad+bc\right)e\right)\\ &=\left(ac+bd,ad+bc\right)\left(e,f\right)\\ &=\left(\left(a,b\right)\left(c,d\right)\right)\left(e,f\right)\\ &=\left(xy\right)z \end{align*} Showing associativity of multiplication. \end{enumerate} The result follows. $\qed$ \end{theorem} \subsection{Commutativity of integer addition and multiplication} As with the naturals, addition and multiplication in the integers both satisfy commutativity. \begin{theorem}{Addition and multiplication are commutative} For all $x,y\in\mathbb{Z}$ we have that \begin{enumerate} \item $x+y=y+x$ \item $xy=yx$ \end{enumerate} Proof: \begin{enumerate} \item $x+y=y+x$: Let $x,y\in\mathbb{Z}$. By definition we have that $x\in\left[a,b\right]$ and $y\in\left[c,d\right]$ for some $a,b,c,d\in\mathbb{N}$. Let $x=\left(a,b\right)$ and $y=\left(c,d\right)$. We then have by definition of addition that \begin{align*} x+y&=\left(a,b\right)+\left(c,d\right)\\ &=\left(a+c,b+d\right)\\ &=\left(c+a,d+b\right),\ \text{By commutativity of addition for natural numbers}\\ &= \left(c,d\right)+\left(a,b\right) &=y+x \end{align*} Showing commutativity holds for addition in the integers. \item $xy=yx$: Let $x,y\in\mathbb{Z}$ by definition we have that $x\in\left[a,b\right]$ and $y\in\left[c,d\right]$ for some $a,b,c,d\in\mathbb{N}$. So let $x=\left(a,b\right)$ and $y=\left(c,d\right)$. By definition of multiplication we have \begin{align*} xy&=\left(a,b\right)*\left(c,d\right)\\ &=\left(ac+bd,ad+bc\right)\\ &=\left(ca+db,da+bc\right), \text{By commutativity of multiplication of the naturals}\\ &=\left(ca+db,da+bc\right), \text{By commutativity of addition of the naturals}\\ &=\left(c,d\right)*\left(a,b\right)\\ &=yx \end{align*} Showing commutativity for integer multiplication. \end{enumerate} The result has been shown. $\qed$ \end{theorem} \subsection{Multiplication distributes over addition} Another result that extends from the naturals is that multiplication distributes over addition. \begin{theorem}{Multiplication distributes over addition} For all $x,y,z\in\mathbb{Z}$ we have that \begin{enumerate} \item $x\left(y+z\right)=xy+xz$ \item $\left(y+z\right)x=yx+zx=xy+xz$ \end{enumerate} Proof: Let $x,y,z\in\mathbb{Z}$ then $x\in\left[a,b\right],y\in\left[c,d\right]$ and $z\in\left[e,f\right]$ for some $a,b,c,d,e,f\in\mathbb{N}$. So let $x=\left(a,b\right), y=\left(c,d\right)$ and $z=\left(e,f\right)$. \begin{enumerate} \item $x\left(y+z\right)=xy+xz$: We have that \begin{align*} x\left(y+z\right)&=\left(a,b\right)\left(\left(c,d\right)+\left(e,f\right)\right)\\ &=\left(a,b\right)\left(c+e,d+f\right)\\ &=\left(a\left(c+e\right)+b\left(d+f\right),a\left(d+f\right)+b\left(c+e\right)\right)\\ &=\left(ac+ae+bd+bf,ad+af+bc+be\right)\\ &=\left(ac+bd+ae+bf,ad+bc+af+be\right)\\ &=\left(ac+bd,ad+bc\right)+\left(ae+bf,af+be\right)\\ &=\left(a,b\right)\left(c,d\right)+\left(a,b\right)\left(e,f\right)\\ &=xy+xz \end{align*} \item $\left(y+z\right)x=yx+zx=xy+xz$: Now that we have the previous part the proof of this part is quick. We have \begin{align*} \left(y+z\right)x&=x\left(y+z\right), \text{By commutativity of multiplication}\\ &=xy+xz, \text{By part }1.\\ &=yx+zx, \text{By commutativity of multiplication} \end{align*} \end{enumerate} As required. $\qed$ \end{theorem} \subsection{The Zero and Identity laws} The zero and identity laws from the naturals extend to the integers. \begin{theorem}{The zero and Identity laws} Let $x\in\mathbb{Z}$. We have that \begin{enumerate} \item $x+0=x=0+x$ \item $1*x=x=x*1$ \end{enumerate} Proof: Let $x\in\mathbb{Z}$ then we have that $x=\left(a,b\right)$ for some $a,b\in\mathbb{N}$ \begin{enumerate} \item $x+0=x=0+x$: We have that $0\in\left[0,0\right]$. Hence we have that \begin{equation*} x+0=\left(a,b\right)+\left(0,0\right)=\left(a+0,b+0\right)=\left(a+b\right)=\left(0+a,0+b\right)=\left(0,0\right)+\left(a,b\right)=0+x \end{equation*} \item $x*1=x=1*x$: As $1\in\left[1,0\right]$ then \begin{align*} x*1&=\left(a,b\right)*\left(1,0\right)\\ &=\left(a*1+b*0,b*1+a*0\right)\\ &=\left(a+0,b+0\right)\\ &=\left(a,b\right)=x\\ &=\left(1*a+0*b,0*a+1*b\right)\\ &=\left(1,0\right)\left(a,b\right)\\ &=1*x \end{align*} \end{enumerate} The result follows. $\qed$ \end{theorem} \subsection{Extending subtraction to the integers} As we have a notion of subtraction on the naturals, we can ask about extending this to the integers. We defined subtraction on the naturals as follows. Let $n,m\in\mathbb{N}$ such that $n\leq m$. Let $d\in\mathbb{N}$ such that $n=m+d$. We define subtraction by \begin{equation*} d=n-m \end{equation*} Where we called $d$ the difference between $n$ and $m$. We also have the notion of a positive and negative integer. Recall that $x\in\mathbb{Z}$ is a positive integer if and only if x Let $x\in\mathbb{Z}$. We say that $x$ is a positive integer if and only if $x\in\left[\left(b,0\right)\right]$ for some $b\in\mathbb{N}$. Likewise $x$ is a negative integer if and only if $x\in\left[\left(0,b\right)\right]$ for some $b\in\mathbb{N}$. In order to extend subtraction to the integers we need to consider a few things. \begin{definition}{Negation of an natural number} Let $x\in\mathbb{Z}$ so that $x$ is a positive integer, i.e a natural number. We define the negation of $x$, denoted $-x$ by \begin{equation*} -x=-1*x=\left(0,1\right)*x \end{equation*} where $\left(0,1\right)\in\left[\left(0,-1\right)\right]$. That is $\left(0,1\right)$ is an element of the equivalence class $\left[\left(0,1\right)\right]$ which represents all possible elements that are $-1$. \end{definition} We can extend this result to include a general integer. \begin{proposition}{Negation of an integer} Let $x\in\mathbb{Z}$ so that $x\in\left[\left(a,b\right)\right]$ for some $a,b\in\mathbb{N}$. We have that \begin{equation*} -1*x=-1*\left(a,b\right)=\left(b,a\right) \end{equation*} Proof: Let $x\in\mathbb{Z}$ be as given by the hypothesis. We have that \begin{align*} -1*x&=-1*\left(a,b\right)\\ &=\left(0,1\right)*\left(a,b\right)\\ &=\left(0*a+b*1,0*b+1*a\right)\\ &=\left(b,a\right) \end{align*} As required. $\qed$ \end{proposition} In light of this, we can define subtraction for integers. \begin{definition}{Integer subtraction} Let $x,y\in\mathbb{Z}$. We define the subtraction of $y$ from $x$, denoted $x-y$ by \begin{equation*} x-y=x+\left(-y\right)=x+\left(-1*y\right) \end{equation*} \end{definition} We immediately get that subtraction is closed, from the fact that both addition and multiplication are closed. We do not have associativity of subtraction in general. \begin{proposition}{Integer subtraction is not associative} Let $x,y,z\in\mathbb{Z}$. We have that \begin{equation*} x-\left(y-z\right)\neq \left(x-y\right)-z \end{equation*} Proof: Let $x=2, y=4$ and $z=6$, we have $x\in\left[2,0\right], y\in\left[4,0\right]$ and $z\in\left[0,6\right]$ so $x\in\left(2,0\right), y\in\left(4,0\right)$ and $z\in\left(0,6\right)$ . We have that \begin{align*} x-\left(y-z\right)&=\left(2,0\right)-\left(\left(4,0\right)-\left(6,0\right)\right)\\ &=\left(2,0\right)-\left(\left(4,0\right)+\left(-1*\left(6,0\right)\right)\right)\\ &=\left(2,0\right)-\left(\left(4,0\right)+\left(0,6\right)\right)\\ &=\left(2,0\right)-\left(4,6\right)\\ &=\left(2,0\right)+\left(-1*\left(4,6\right)\right)\\ &=\left(2,0\right)+\left(6,4\right)\\ &=\left(8,4\right)\\ \end{align*} On the other side we have \begin{align*} \left(x-y\right)-z&=\left(\left(2,0\right)-\left(4,0\right)\right)-\left(6,0\right)\\ &=\left(\left(2,0\right)+\left(-1*\left(4,0\right)\right)\right)-\left(6,0\right)\\ &=\left(\left(2,0\right)+\left(0,4\right)\right)-\left(6,0\right)\\ &=\left(2,4\right)-\left(6,0\right)\\ &=\left(2,4\right)+\left(-1*\left(6,0\right)\right)\\ &=\left(2,4\right)+\left(0,6\right)\\ &=\left(2,10\right) \end{align*} Clearly $\left(8,4\right)\neq \left(2,10\right)$. Indeed they are not even equivalent. Suppose that $\left(8,4\right)\sim\left(2,10\right)$ then we have that $8+10=4+2$. However $18\neq 6$. $\qed$ \end{proposition} We can also immediately see the following result, which allows us to formally show that subtraction is an inverse to addition. \begin{proposition}{Subtracting an integer from itself gives zero}\label{prop:IntegerAdditiveInverse} Let $x\in\mathbb{Z}$. We have that \begin{equation*} x-x=0 \end{equation*} Proof: Let $x\in\mathbb{Z}$ where $x\in\left[a,b\right]$ for some $a,b\in\mathbb{N}$. We have \begin{align*} x-x&=\left(a,b\right)-\left(a,b\right)\\ &=\left(a,b\right)+\left(b,a\right)\\ &=\left(a+b,b+a\right) \end{align*} It is left to show that $\left(a+b,b+a\right)\sim\left(0,0\right)$. Indeed \begin{equation*} \left(a+b\right)+0=\left(b+a\right)+0 \Rightarrow a+b=b+a \end{equation*} The result is shown. $\qed$ \end{proposition} \subsection{The cancellation laws} We can now deduce that the cancellation laws also extend to the integers. \begin{theorem}{The cancellation laws} Let $x,y,z\in\mathbb{Z}$. \begin{enumerate} \item If $x+y=x+z$ then we have $y=z$. \item For $x\neq 0$, if $xy=xz$ then we have that $y=z$ \end{enumerate} Proof: \begin{enumerate} \item If $x+y=x+z$ then we have $y=z$: Let $x,y,z\in\mathbb{Z}$. We have that \begin{align*} x+y&=x+z\\ \Rightarrow -x+x+y&=-x+x+z,\ \text{Adding the negative of } x \text{ to both sides}\\ \Rightarrow \left(-x+x\right)+y*&=\left(-x+x\right)+z,\ \text{Associativity of integers}\\ \Rightarrow 0+y&=0+z,\ \text{By proposition \ref{prop:IntegerAdditiveInverse}}\\ \Rightarrow y&=z \end{align*} \item For $x\neq 0$, if $xy=xz$ then we have that $y=z$: Let $x,y,z\in\mathbb{Z}$ where $x\neq 0$. Suppose that $x\in\left[a,b\right], y\in\left[c,d\right]$ and $z\in\left[e,f\right]$. We have \begin{align*} xy&=\left(a,b\right)\left(c,d\right)=\left(ac+bd,ad+bc\right)\\ xz&=\left(a,b\right)\left(e,f\right)=\left(ae+bf,af+be\right) \end{align*} Now assume $xy=xz$ then we have that $\left(ac+bd,ad+bc\right)\sim\left(ae+bd,ad+be\right)$ which is to say \begin{equation*} ac+bd+af+be=ae+bf+ad+bc \end{equation*} Observe that \begin{align*} ac+bd+af+be&=a\left(c+f\right)+b\left(d+e\right)\\ ae+bf+ad+bc&=a\left(e+d\right)+b\left(f+c\right) \end{align*} Which gives \begin{equation*} a\left(c+f\right)+b\left(d+e\right)=a\left(e+d\right)+b\left(f+c\right) \end{equation*} There are now two cases to consider, $ab$. Firstly suppose that $a0$, this is well-defined as $a,b\in\mathbb{N}$. We then have \begin{align*} a\left(c+f\right)+b\left(d+e\right)&=a\left(e+d\right)+b\left(f+c\right)\\ a\left(c+f\right)+\left(a+h\right)\left(d+e\right)&=a\left(e+d\right)+\left(a+h\right)\left(f+c\right)\\ a\left(c+f\right)+a\left(d+e\right)+h\left(d+e\right)&=a\left(e+d\right)+a\left(f+c\right)+h\left(f+c\right)\\ a\left(d+e\right)+h\left(d+e\right)&=a\left(e+d\right)+h\left(f+c\right),\text{ Cancelling }a\left(c+f\right)\\ h\left(d+e\right)&=h\left(f+c\right),\text{ Cancelling }a\left(d+e\right)\\ \left(d+e\right)&=\left(f+c\right),\text{ Cancelling }h\\ \end{align*} Now as $d+e=f+c$ we have that $c-d=e-f\Rightarrow \left(c,d\right)\sim\left(e,f\right)$ which is the same as saying $y=z$. Now if $a>b$ then we write $b=a-h$ for some $h>0$, again being well-defined as $a,b\in\mathbb{N}$. Thus \begin{align*} a\left(c+f\right)+b\left(d+e\right)&=a\left(e+d\right)+b\left(f+c\right)\\ a\left(c+f\right)+\left(a-h\right)\left(d+e\right)&=a\left(e+d\right)+\left(a-h\right)\left(f+c\right)\\ a\left(c+f\right)+a\left(d+e\right)-h\left(d+e\right)&=a\left(e+d\right)+a\left(f+c\right)-h\left(f+c\right)\\ a\left(d+e\right)-h\left(d+e\right)&=a\left(e+d\right)-h\left(f+c\right),\text{ Cancelling }a\left(c+f\right)\\ -h\left(d+e\right)&=-h\left(f+c\right),\text{ Cancelling }a\left(d+e\right)\\ \left(f+c\right)&=\left(d+e\right),\text{By adding each side to the other and cancelling }h\\ \end{align*} As $f+c=d+e$ then we have by similar logic to before the $y=z$ \end{enumerate} The result is shown. $\qed$ \end{theorem} \subsection{Extending the summation and product notations to integers} Summation and product notation has been defined on the naturals. As with the theme of this section the notations extend in a natural way to integers. As before we need to define a few things. Let $z\in\mathbb{Z}^{n+m+1}$ be an ordered $n+m+1$ tuple of integers where $z=\left(z_{-m},z_{-m+1},\dots,z_{-1},z_0,z_1,z\dots, z_n\right)$ and define $\mathbb{Z}_m^n=\left\{-m,-m+1,-m+2,\dots,-1,0,1,\dots,n-1,n\right\}$. Define $f:\mathbb{Z}_m^n\rightarrow\mathbb{Z}$ by \begin{align*} f:\mathbb{Z}_m^n&\rightarrow \mathbb{Z}\\ i&\mapsto f\left(i\right)=z_i \end{align*} As before, $f$ simply maps gets the value of $z_i$ from the ordered tuple $z$. \begin{definition}{Summation notation for the integers} Let $z\in\mathbb{Z}^{n+m+1}$ be ordered $n+m+1$ tuple of integers where $z=\left(z_{-m},z_{-m+1},\dots,z_{-1},z_0,z_1,z\dots, z_n\right)$. Define $\mathbb{Z}_m^n$ by $\mathbb{Z}_m^n=\left\{-m,-m+1,-m+2,\dots,-1,0,1,\dots,n-1,n\right\}$. Let $f:\mathbb{Z}^{n+m+1}:\mathbb{Z}$ defined by \begin{align*} f:\mathbb{Z}^{m+n+1}&\rightarrow\mathbb{Z}\\ i&\mapsto f\left(i\right)=z_i \end{align*} We define the summation notation for integers by \begin{equation*} \sum_{i=-m}^n f\left(i\right)=f\left(-m\right)+f\left(-m+1\right)+\dots+f\left(-1\right)+f\left(0\right)+f\left(1\right)+\dots+f\left(n\right) \end{equation*} Alternatively this is written \begin{equation*} \sum_{i=-m}^n z_i = z_{-m}+z_{-m+1}+\dots+z_{-1}+z_0+z_1+\dots+z_n \end{equation*} We have that $i$ is called the index of summation and that $i=-m$ is the starting index of the summation, and $n$ the ending index of the summation. If $z=\emptyset$ then we define the summation to be $0$ and call a summation an empty sum. We can also define the summation of some subset of $\mathbb{Z}_m^n$ which allows for starting a summation at some starting point other than $i=-m$. Let $T\subseteq\mathbb{Z}_m^n$. We define the summation over the set $T$ by \begin{equation*} \sum_{i\in T} z_i \end{equation*} If we have a mapping $g:\mathbb{Z}\rightarrow\mathbb{Z}$ we can define a summation over $g$ by \begin{equation*} \sum_{i\in T} g\left(z_i\right) \end{equation*} Finally we can define a summation over a predicate $P\left(i\right)$ for $i\in T$ by \begin{equation*} \sum_{P\left(i\right)}g\left(z_i\right) \end{equation*} where we take the sum of the $g\left(z_i\right)$ for the $i$ that satisfy the predicate $P$. We note that if we have $k>n$ for some $k\in\mathbb{N}$ then the sum \begin{equation*} \sum_{i=k}^n z_i=0 \end{equation*} \end{definition} The proprieties shown for summations with natural numbers also extend to the integer version. \begin{proposition}{Properties of summation notation} Let $n,m\in\mathbb{Z}$ such that $m0$ and $k>=0$ then the result is the same as for natural numbers. So suppose that $k<0$. Consider the following set of the indices given by \begin{equation*} S=\left\{k,k+1,k+2,\dots,-1,0,1,\dots,n-1,n\right\} \end{equation*} We have that the cardinality of $S$ is $n+1-k$. Indeed consider the following mapping \begin{align*} f:S&\rightarrow \mathbb{N}\\ s&\mapsto f\left(s\right)=s-k \end{align*} Define the mapping $g:S\rightarrow\image\left(f\right)$ then we have that $g$ is a bijection. Suppose that $g\left(x\right)=g\left(y\right)$ for some $x,y\in S$ then \begin{align*} g\left(x\right)&=g\left(y\right)\\ x-k&=y-k\\ x&=y \end{align*} showing injectivity. Now as $g$ is a mapping from $S$ to the image of $f$ we have by proposition \ref{prob:RestOfCodomainToImageIsSurjective} that $g$ is surjective. Hence we conclude that $g$ is a bijection. Now we have that \begin{align*} \image\left(f\right)&=\left\{f\left(x\right):x\in S\right\}\\ &= \left\{k-k,\left(k+1\right)-k,\left(k+2\right)-k,\dots,-1-k,0-k,1-k,\dots,\left(n-1\right)-k,n-k\right\}\\ &=\left\{0,1,2,\dots,k-1,k,k-1,\dots,n-1-k,n-k\right\} \end{align*} Hence $\left|S\right|=\left|\image\left(f\right)\right|=n-k+1$. Hence the sum is adding $c$ to itself $n+1-k$ times. This is to say \begin{equation*} \sum_{i=k}^n c= c\left(n+1-k\right) \end{equation*} \item $\displaystyle\sum_{i=k}^n s_i+t_i = \sum_{i=k}^n s_i + \sum_{i=k}^n t_i$: This follows by the definition. We have \begin{align*} \sum_{i=k}^n s_i+t_i&= \left(s_k+t_k\right)+\left(s_{k+1}+t_{k+1}\right)+\dots\\ &+\left(s_{-1}+t_{-1}\right)+\left(s_{0}+t_{0}\right)+\left(s_{1}+t_{1}\right)+\dots+\left(s_{n-1}+t_{n-1}\right)+\left(s_{n}+t_{n}\right)\\ &=\left(s_k+s_{k+1}+\dots+s_{-1}+s_0+s_1+\dots+s_{n-1}+s_n\right)+\\ &+\left(t_k+t_{k+1}+\dots+t_{-1}+t_0+t_1+\dots+t_{n-1}+t_n\right)\\ &= \sum_{i=k}^n s_i + \sum_{i=k}^n t_i \end{align*} \end{enumerate} $\qed$ \end{proposition} We make a similar definition for product notation. \begin{definition}{Product notation for the integers} Let $z\in\mathbb{Z}^{n+m+1}$ be ordered $n+m+1$ tuple of integers where $z=\left(z_{-m},z_{-m+1},\dots,z_{-1},z_0,z_1,z\dots, z_n\right)$. Define $\mathbb{Z}_m^n$ by $\mathbb{Z}_m^n=\left\{-m,-m+1,-m+2,\dots,-1,0,1,\dots,n-1,n\right\}$. Let $f:\mathbb{Z}^{n+m+1}:\mathbb{Z}$ defined by \begin{align*} f:\mathbb{Z}^{m+n+1}&\rightarrow\mathbb{Z}\\ i&\mapsto f\left(i\right)=z_i \end{align*} We define the summation notation for integers by \begin{equation*} \prod_{i=-m}^n f\left(i\right)=f\left(-m\right)*f\left(-m+1\right)*\dots*f\left(-1\right)*f\left(0\right)*f\left(1\right)*\dots+f\left(n\right) \end{equation*} Alternatively this is written \begin{equation*} \prod_{i=-m}^n z_i = z_{-m}*z_{-m+1}*\dots*z_{-1}*z_0*z_1*\dots*z_n \end{equation*} We have that $i$ is called the index of the product and that $i=-m$ is the starting index of the product, and $n$ the ending index of the product. If $z\in\emptyset$ then we define the product to be $1$ and call a product an empty sum. We can also define the product of some subset of $\mathbb{Z}_m^n$ which allows for starting a product at some starting point other than $i=-m$. Let $T\subseteq\mathbb{Z}_m^n$. We define the product over the set $T$ by \begin{equation*} \prod_{i\in T} z_i \end{equation*} If we have a mapping $g:\mathbb{Z}\rightarrow\mathbb{Z}$ we can define a product over $g$ by \begin{equation*} \prod_{i\in T} g\left(z_i\right) \end{equation*} Finally we can define a product over a predicate $P\left(i\right)$ for $i\in T$ by \begin{equation*} \prod_{P\left(i\right)}g\left(z_i\right) \end{equation*} where we take the sum of the $g\left(z_i\right)$ for the $i$ that satisfy the predicate $P$. We note that if we have $k>n$ for some $k\in\mathbb{N}$ then the product \begin{equation*} \prod_{i=k}^n z_i=1 \end{equation*} \end{definition} \begin{proposition}{Properties of product notation} Let $n,m\in\mathbb{Z}$ such that $md$ then we have that $\exists p\in\mathbb{N}$ such that $d+p=c$. We hence have \begin{align*} ac+bd&=ad+bc\\ a\left(d+p\right)+bd&=ad+b\left(d+p\right)\\ ad+ap+bd&=ad+bd+bp\\ ap&=bp\\ a&=b ,\text{By the cancellation laws for the natural numbers}\\ a+0&=b+0 \Rightarrow \left(a,b\right)=\left(0,0\right) \end{align*} A similar argument applies for $c -1*y$. This can be shown in general. \begin{proposition}{Multiplication by $-1$ changes the inequality sign}\label{prop:MultiplicationByNegativeOneFlipsInequalitySign} Let $x,y\in\mathbb{Z}$. We have the following \begin{enumerate} \item If $x-y$ \item If $x\leq y$ then $-x\geq -y$ \item If $x>y$ then $-x<-y$ \item If $x\geq y$ then $-x\leq-y$ \end{enumerate} Proof: \begin{enumerate} \item If $x-y$: Let $x,y\in\mathbb{Z}$ so that $xa$. Now we have $-x>-y$ by definition of greater than for integers as we have \begin{equation*} -x>-y \iff 0+b>a+0 \end{equation*} \item $x<0$ and $y\geq 0$: Now suppose that $x<0$ and $y\geq 0$ then we have that $x\in\left[\left(0,a\right)\right]$ and $y\in\left[\left(b,0\right)\right]$ where $a,b\in\mathbb{N}$. \begin{align*} -x=-1*x=-1*\left(0,a\right)&=\left(a,0\right)\\ -y=-1*y=-1*\left(b,0\right)&=\left(0,b\right) \end{align*} Now, we have that if $-x>-y$ then we have \begin{equation*} a+b>0+0 \end{equation*} However as $a,b\in\mathbb{N}$ and $x<0 \implies a> 0$. We conclude that $a+b\geq a > 0$ and so $-x>-y$. \item $x<0$ and $y<0$: Now suppose that $x<0$ and $y< 0$ then $x\in\left[\left(0,a\right)\right]$ for some $a\in\mathbb{N}$ and $y\in\left[\left(0,b\right)\right]$ for some $b\in\mathbb{N}$. As $xb$. We have that \begin{align*} -x=-1*x=-1*\left(0,a\right)&=\left(a,0\right)\\ -y=-1*y=-1*\left(0,b\right)&=\left(b,0\right) \end{align*} Applying the definition of $>$ to $-x$ and $-y$ gives \begin{equation*} -x>-y \iff a>b \end{equation*} Which we know to be true. Hence $-x>-y$. \end{enumerate} This shows part 1. \item If $x\leq y$ then $-x\geq -y$: If $x-y$ from which it follows that $-x\geq -y$ by definition. It is left to check when $x=y$. This is clear however as $x=y\implies -x=-y$ and so $-x\geq -y$. \item If $x>y$ then $-x<-y$: The proof of this part is similar to part 1. As in part 1. there are three cases to consider \begin{enumerate} \item $x\geq 0$ and $y\geq 0$ \item $x\geq 0$ and $< 0$ \item $x<0$ and $y<0$ \end{enumerate} \begin{enumerate} \item $x\geq 0$ and $y\geq 0$: Suppose that $x\geq 0$ and $y\geq 0$ then $x\in\left[\left(a,0\right)\right]$ for some $a\in\mathbb{N}$ and $y\in\left[\left(b,0\right)\right]$ for some $b\in\mathbb{N}$. As $x>y$ then we must have $a+0>b+0\Rightarrow a>b$. We have that \begin{align*} -x=-1*x=-1*\left(a,0\right)&=\left(0,a\right)\\ -y=-1*y=-1*\left(b,0\right)&=\left(0,b\right) \end{align*} Now, by proposition \ref{prop:InequalityNaturalNumbers} part 2. we know that $a>b$ is the same as $b 0$. We conclude that $0y$ then we have that $0+b>a+0\Rightarrow b>a$ which is the same as $ay$ we apply part 3. So instead suppose $x=y$ but then $x=y\Rightarrow -x=y$ and so by definition we have $-x\leq -y$. \end{enumerate} The result is shown. $\qed$ \end{proposition} This proposition will play a big role in the following proposition that extends the results for the rules of inequalities to the integers. \begin{proposition}{Properties of inequalities for the integers}\label{prop:InequalityIntegerNumbers} Let $x,y,z,c\in\mathbb{Z}$. We have the following properties for inequalities \begin{enumerate} \item $xx$: \item $x\leq y$ is the same as $y\geq x$: \item If $xy$ and $y>z$ then $x>z$: \item If $x\geq y$ and $y>z$ then $x>z$: \item If $x>y$ and $y\geq z$ then $x>z$: \item If $x\geq y$ and $y\geq z$ then $x\geq z$: \item If $xy$ then $x+z>y+z$: \item If $x\geq y$ then $x+z\geq y+z$: \item If $xyz$: \item If $x\leq y$ and $z\geq 0$ then $xz\leq yz$: \item If $x\leq y$ and $z<0$ then $xz\geq yz$: \item If $x>y$ and $z\geq 0$ then $xz>yz$: \item If $x>y$ and $z< 0$ then $xzx$: Let $x,y\in\mathbb{Z}$ with $xa$ by proposition \ref{prop:InequalityNaturalNumbers}. But by definition of $>$ for integers, we have that \begin{equation*} b>a \iff y>x \end{equation*} \item $x<0$ and $y\geq 0$: Suppose that $x<0$ and $y\geq 0$, then $x\in\left[\left(0,a\right)\right]$ and $y\in\left[\left(b,0\right)\right]$ for some $a,b\in\mathbb{N}$. By definition of $<$ we have that \begin{equation*} xx\iff a+b > 0 \end{equation*} Now, $x<0\implies a>0$ and so we have that $a+b\geq a > 0$ and so $y>x$. \item $x<0$ and $y<0$: Now suppose that $x<0$ and $y<0$, it follows that $x\in\left[\left(0,a\right)\right]$ and $y\in\left[\left(0,b\right)\right]$ for some $a,b\in\mathbb{N}$. By definition of $<$ we have that \begin{equation*} xx \iff a>b \end{equation*} Hence, as $bb$ and so $y>x$. \end{enumerate} \item $x\leq y$ is the same as $y\geq x$: If $x0 \\ y\geq 0 &\iff b\geq 0\\ z\geq 0&\iff c\geq 0 \end{align*} By assumption $x0 \\ y<0 &\iff b>0\\ z\geq 0&\iff c\geq 0 \end{align*} By assumption $x0 \\ y<0 &\iff b>0\\ z<0 &\iff c>0 \end{align*} As $xy$ and $y>z$ then $x>z$: By part 1. of the proposition we have that this is equivalent to $yz$ then $x>z$: Applying part 2 to $x\geq y$ and part 1. to $y>z$ and $x>z$ gives the equivalent statement of $y\leq x$ and $zy$ and $y\geq z$ then $x>z$: As with part 8. Applying parts 2. and 1. gives the equivalent statement of $yy$ then $x+z>y+z$: As has been the case so far, applying part 1. gives us the statement $yyz$: Suppose that $xyz$, by definition we have \begin{align*} xz>yz \iff be+ce>ae+de\iff e\underbrace{\left(b+c\right)}_{=m}y$ and $z\geq 0$ then $xz>yz$: Let $z\geq 0$ and by applying part 1. we get the equivalent statement of $yy$ and $z< 0$ then $xz0$ which is to say $-\left(x-y\right)\in\mathbb{N}$ \end{enumerate} The result has been shown. $\qed$ \end{proposition} In light of the definition of the distance function, we can define the so-called absolute value function. This will give us a notion of the magnitude of an integer. \begin{definition}{Absolute value function} Let $x\in\mathbb{Z}$ we define the absolute value function, denoted by $\left|x\right|$ by the function \begin{equation*} \left|x\right|=d\left(x,0\right)=\begin{cases} x,\ \text{If } x\geq 0\\ -x,\ \text{If } x< 0 \end{cases} \end{equation*} \end{definition} With this definition, we have generalised the idea of ``size'' to the integers. That is the size of an integer is its distance from $0$. We have the basic properties of the absolute value \begin{proposition}{Properties of the absolute value} Let $x,y,z\in\mathbb{Z}$. We have that the absolute value function has the following properties \begin{enumerate} \item $\left|x\right|\geq 0$ for all $x\in\mathbb{Z}$ \item $\left|x\right|=0\iff x=0$ \item $\left|x-y\right|=0\iff x=y$ \item $\left|xy\right|=\left|x\right|\left|y\right|$ \item $\left|\left|x\right|\right|=\left|x\right|$ \item $\left|-x\right|=\left|x\right|$ \item $\left|x\right|\leq y \iff -y\leq x\leq y$ \item $\left|x\right|\geq y\iff x\leq -y$ or $x\geq y$ \item $\left|x+y\right|\leq \left|x\right|+\left|y\right|$ \item $\left|x-y\right|\leq\left|x-z\right|+\left|z-y\right|$ \item $\left|x-y\right|\geq \left|\left|x\right|-\left|y\right|\right|$ \item $\left|\cdot\right|$ is not injective \item $\left|\cdot\right|$ is not surjective \end{enumerate} Proof: \begin{enumerate} \item $\left|x\right|\geq 0$ for all $x\in\mathbb{Z}$: This follows by proposition \ref{prop:IntegerDistanceFuncWellDefined}. \item $\left|x\right|=0\iff x=0$: We have by definition that $\left|x\right|=0$, if and only if $x=0$. \item $\left|x-y\right|=0\iff x=y$: $\left(\Rightarrow\right)$: Suppose that $\left|x-y\right|=0$. There are two cases to consider. Firstly if $x\geq y$, then by definition we have that $\left|x-y\right|=x-y=0$ from which we clearly have $x=y$. The other case is $x0}=\left|x\right| \end{equation*} \item $\left|-x\right|=\left|x\right|$: As $-x=-1 *x$ we have by part 4 that \begin{equation*} \left|-x\right|=\left|-1*x\right|=\left|-1\right|\left|x\right|=1*\left|x\right|=\left|x\right| \end{equation*} \item $\left|x\right|\leq y \iff -y\leq x\leq y$: $\left(\Rightarrow\right)$: Suppose that $\left|x\right|\leq y$. If $x\geq 0$ then we get that $\left|x\right|=x\leq y$. From this, it is clear that $-y\leq x\leq y$ as $x\geq 0$ and $x\leq y \Rightarrow y \geq 0$. Now if $x<0$, then $\left|x\right|=-x\leq y$. Clearly $x\leq -x$ as $x<0$ hence we conclude that $x\leq -x\leq y$. Now by part 18 of proposition \ref{prop:InequalityIntegerNumbers} we have we have \begin{equation*} \left(-1\right)*\left(-x\right)\geq \left(-1\right)\left(y\right) \iff x\geq -y \end{equation*} Now $x\geq -y$ is the same as $-y\leq x$ and so we have $-y\leq x\leq -x \leq y$. Hence $-y\leq x\leq y$. $\left(\Leftarrow\right)$: Suppose that $-y\leq x\leq y$. There are two cases to consider. \begin{enumerate} \item $x\geq 0$ \item $x<0$ \end{enumerate} \begin{enumerate} \item $x\geq 0$: Suppose $x\geq 0$, then clearly as $x\leq y$ then $\left|x\right|\leq \left|y\right|=y$. Moreover, we have that $-y\leq x$ is the same $x\geq -y$ and by part 22. of proposition \ref{prop:InequalityIntegerNumbers} when applied to $x\geq -y$ gives \begin{equation*} \left(-1\right)*\left(x\right)\leq \left(-1\right)\left(-y\right) \iff -x\leq y \end{equation*} We have that $\left|-x\right|=\left|x\right|$ by part 6. Hence $\left|-x\right|=\left|x\right|\leq \left|y\right|=y$. \item $x<0$: Suppose $x<0$. By assumption $x\leq y$ so either $y\geq 0$ or $y< 0$. We can't have $y<0$ as for example take $x=-4$ and $y=-2$ then we would have $2\leq -4\leq -2$ a contradiction. So suppose that $y\geq 0$ then as $x\leq y$ we have $\left|x\right|\leq\left|y\right|=y$. Now as $-y\leq x$ by assumption we have that $x\geq -y$ and so part 22. of proposition \ref{prop:InequalityIntegerNumbers} gives \begin{equation*} \left(-1\right)*\left(x\right)\leq \left(-1\right)\left(-y\right) \iff -x\leq y \end{equation*} Hence part 6. applies and we get that $\left|x\right|\leq y$ \end{enumerate} \item $\left|x\right|\geq y\iff x\leq -y$ or $x\geq y$: $\left(\Rightarrow\right)$: Suppose that $\left|x\right|\geq y$. If $x\geq 0$ then $\left|x\right|=x\geq y$. So suppose that $x<0$ then by definition we have that $\left|x\right|=-x$ and so $-x\geq y$ and the result follows when applying part 22. of proposition \ref{prop:InequalityIntegerNumbers}. $\left(\Leftarrow\right)$: Suppose that either $x\leq -y$ or $x\geq y$. We have three cases to consider. \begin{enumerate} \item $x\leq -y$ \item $x\geq y$ \item $x\leq -y$ and $x\geq y$ \end{enumerate} \begin{enumerate} \item $x\leq -y$: Suppose that $x\leq -y$ holds. If $x\geq 0$ then we have that $-y\geq 0$, Hence $y<0$. Moreover, we have that by part 18. of proposition \ref{prop:InequalityIntegerNumbers} that \begin{equation*} \left(-1\right)*\left(x\right)\geq \left(-1\right)\left(-y\right) \iff -x\geq y \end{equation*} Now part 6. applies and we see that $\left|-x\right|=\left|x\right|\geq\left|y\right|=y$. This is to say $\left|x\right|\geq y$. Now suppose that $x<0$. Then as $x\leq -y$ we have that either $-y\geq 0$ or $-y<0$. In the former case $-y\geq 0$ gives $y<0$. Hence by part 18. of proposition \ref{prop:InequalityIntegerNumbers} we conclude that \begin{equation*} \left(-1\right)*\left(x\right)\geq \left(-1\right)\left(y\right) \iff -x\geq y \end{equation*} As $x<0$ then $-x\geq 0$. The result follows when taking the absolute value. Now suppose that $-y<0$ then $y\geq 0$. Following similar logic to the previous case, we see that \begin{equation*} \left(-1\right)*\left(x\right)\geq \left(-1\right)\left(y\right) \iff -x\geq y \end{equation*} The result again follows after taking the absolute value. \item $x\geq y$: This case is trivial. \item $x\leq -y$ and $x\geq y$: Suppose that $x\leq -y$ and $x\geq y$ are both true. We know by the first case that $x\leq -y$ gives $\left|x\right|\geq y$ and $x\leq y$ also implies $\left|x\right|\geq y$ by the second case. Hence both inequalities being true at the same time implies the result $\left|x\right|\geq y$. \end{enumerate} \item $\left|x+y\right|\leq \left|x\right|+\left|y\right|$: Let $x,y\in\mathbb{Z}$. There are four cases to consider. \begin{enumerate} \item $x\geq 0$ and $y\geq 0$ \item $x\geq 0$ and $y\leq 0$ \item $x\leq 0$ and $y\geq 0$ \item $x\leq 0$ and $y\leq 0$ \end{enumerate} \begin{enumerate} \item $x\geq 0$ and $y\geq 0$: Suppose $x\geq 0$ and $y\geq 0$, then we have that \begin{equation*} \left|x+y\right|=x+y=\left|x\right|+\left|y\right|\Rightarrow \left|x+y\right|\leq\left|x\right|+\left|y\right| \end{equation*} \item $x\geq 0$ and $y\leq 0$ By assumption we have that $\left|x\right|=x$ and $\left|y\right|=-y$. We have two cases based on the absolute value, $\left|x\right|\leq\left|y\right|$ and $\left|x\right|\geq\left|y\right|$. So suppose that $\left|x\right|\leq\left|y\right|$ then by definition $x\leq -y$ and so by part 12. of proposition \ref{prop:InequalityIntegerNumbers} we have that \begin{equation*} x\leq -y \Rightarrow x+y\leq 0 \end{equation*} Moreover, as $x\geq 0$ then $y\leq x+y\leq 0$. Hence we have by the definition of the absolute value that \begin{equation*} \left|x+y\right|=-\left(x+y\right)\leq -y=\left|y\right| \end{equation*} As $-y>0$. In the case $\left|x\right|\geq\left|y\right|$ we have by definition that $x\geq -y$ and so $x+y\geq 0$. Additionally it is clear that $x\geq x+y$ as $y\leq 0$ and $\left|x\right|\geq\left|y\right|$. Hence by definition of the absolute value we have that \begin{equation*} \left|x+y\right|=x+y\leq x=\left|x\right| \end{equation*} Now, it is clear to see that $\left|x\right|\leq \left|x\right|+\left|y\right|$ and likewise $\left|y\right|\leq \left|x\right|+\left|y\right|$. We have hence shown that $\left|x+y\right|leq\left|x\right|+\left|y\right|$. \item $x\leq 0$ and $y\geq 0$: This is similar to above, interchanging the roles of $x$ and $y$. \item $x\leq 0$ and $y\leq 0$: Suppose that $x\leq 0$ and $y\leq 0$ then by definition we have that $\left|x+y\right|=-\left(x+y\right)=-x-y$. As $x\leq 0$ and $y\leq 0$ then we have that and $\left|y\right|=-y$ which shows $\left|x+y\right|=\left|x\right|+\left|y\right|\leq\left|x\right|+\left|y\right|$ \end{enumerate} \item $\left|x-y\right|\leq\left|x-z\right|+\left|z-y\right|$: We have that \begin{align*} \left|x-y\right|&=\left|x-\left(z-z\right)-y\right|\\ &=\left|x-z+z-y\right|\\ &\leq \left|x-z\right|+\left|z-y\right| \end{align*} \item $\left|x-y\right|\geq \left|\left|x\right|-\left|y\right|\right|$: We have that \begin{align*} \left|x\right|&=\left|\left(x-y\right)+y\right|\leq \left|x-y\right|+\left|y\right| \Rightarrow \left|x\right|-\left|y\right|\leq \left|x-y\right|\\ \left|y\right|&=\left|\left(y-x\right)+x\right|\leq \left|x-y\right|+\left|x\right| \Rightarrow \left|y\right|-\left|x\right|\leq \left|x-y\right|\\ \end{align*} Hence we have \begin{align*} \left|x\right|-\left|y\right|\leq \left|x-y\right| &\Rightarrow \left|\left|x\right|-\left|y\right|\right|\leq \left|x-y\right|\\ \left|y\right|-\left|x\right|=\left(-1\right)\left(\left|x\right|-\left|y\right|\right)\leq \left|x-y\right| &\Rightarrow \left|\left|x\right|-\left|y\right|\right|\leq \left|x-y\right|\\ \end{align*} Hence we have the result. \item $\left|\cdot\right|$ is not injective: To see that the absolute value function is not injective consider $\left|3\right|=\left|-3\right|$. We have that $\left|3\right|=3$ and $\left|-3\right|=3$ but $3\neq -3$. \item $\left|\cdot\right|$ is not surjective: We have that the absolute value function as there are no $x\in\mathbb{Z}$ so that $\left|x\right|=-1$ for example. \end{enumerate} This ends the proposition. $\qed$ \end{proposition} \subsection{Extending exponentiation to the integers} We can extend the idea of exponentiation to include integers. We are now able to consider negative bases. In other words, expressions of the form $\displaystyle x^n$ for $x\in\mathbb{Z}$ with $x<0$. This extension is somewhat trivial and extends naturally from the definition of the naturals. We first look at the case where $n\geq 0$ \begin{definition}{Exponentiation of integer numbers} Let $\mathbb{Z}^+=\left\{x\in\mathbb{Z}:x\geq 0\right\}$. Let $\left(x,n\right)\in\mathbb{Z}\times\mathbb{Z}$ with $n\geq 0$ and let $\wedge:\mathbb{Z}\times\mathbb{Z}\rightarrow\mathbb{Z}$. We define the exponentiation of $x$ by $n$ to be $x$ multiplied by itself $n-1$ times \begin{align*} \wedge:\mathbb{Z}\times\mathbb{Z}^+&\rightarrow\mathbb{Z}\\ \left(x,n\right)&\mapsto \wedge\left(x,n\right)=\begin{cases} 1,\ \text{If } x=0\text{ and } n=0\\ 1,\ \text{If } n=0\\ \displaystyle \prod_{i=1}^y x ,\ \text{If }x\neq 0\text{ and } n \geq 0\\ \end{cases} \end{align*} We will write $\wedge\left(x,n\right)$ as $x^n$. We say that $x$ is the base and $n$ is the exponent. We sometimes say that $x$ has been raised to the power of $n$. In the case that $x=0$ and $m=0$ we have a vacuous product and so an empty product which by definition has a value of $1$. \end{definition} We will explore this definition by first considering $x=-1$ \begin{align*} x*x=x^1&=-1=-1\\ x*x=x^2&=-1*-1=1\\ x*x*x=x^3&=-1*-1*-1=-1\\ x*x*x*x=x^4&=-1*-1*-1*-1=1\\ \end{align*} This leads to the following proposition. \begin{proposition}{Negative one to power of 2n is 1} Let $n\in\mathbb{N}$. We have that \begin{equation*} \left(-1\right)^{2n} = 1 \end{equation*} Proof: We argue by induction on $n$. The base case is $n=0$ and by definition, we have that \begin{equation*} \left(-1\right)^{2*0}=\left(-1\right)^{0}=1=1 \end{equation*} Now suppose the result holds for some $n=k$, that is \begin{equation*} \left(-1\right)^{2k}=1 \end{equation*} We show that \begin{equation*} \left(-1\right)^{2*\left(k+1\right)}=1 \end{equation*} We have \begin{align*} \left(-1\right)^{2\left(k+1\right)}&=\left(-1\right)^{2k+2}\\ &=\prod_{i=1}^{2k+2} \left(-1\right)\\ &=\prod_{i=1}^{2k} \left(-1\right) *\prod_{i=2k+1}^{2k+2} \left(-1\right)\\ &= 1 * \left(\left(-1\right)\left(-1\right)\right) &=1*\left(1\right)=1 \end{align*} Which shows the result. $\qed$ \end{proposition} This result generalises for any negative integer. \begin{proposition}{Negative integer to the power of 2n is positive} Let $x\in\mathbb{Z}$ with $x<0$. Let $n\in\mathbb{N}$. We have that \begin{equation*} x^{2n} > 1 \end{equation*} Proof: By definition we have \begin{align*} x^{2n}&=\prod_{i=1}^{2n} x\\ &=\prod_{i=1}^{2n} \left(-1*-x\right)\\ &=\prod_{i=1}^{2n} \left(-1\right) *\prod_{i=}^{2n}\left(-x\right)\\ &=1*\underbrace{\prod_{i=}^{2n}\left(-x\right)}_{\geq 1} \geq 1\\ \end{align*} As $-x>0$ because $x<0$. $\qed$ \end{proposition} We also note that exponentiation is neither commutative nor associative as they were not for the naturals. However, the following results do extend. \begin{proposition}{Power law of exponentiation for positive exponents}\label{prop:IntegerExponentiationPowerLaw} Let $x\in\mathbb{Z}$ and let $n,m\mathbb{N}$ with $n\geq 0$ and $m\geq 0$. We have that \begin{equation*} \left(x^n\right)^m = x^{nm} \end{equation*} Proof: By the definition of exponentiation, we have that \begin{equation*} \left(x^n\right)^m=\prod_{i=1}^m x^n =\prod_{i=1}^m\left(\prod_{j=1}^n x\right) \end{equation*} Hence we have \begin{align*} \left(x^n\right)^m&=\underbrace{\prod_{j=1}^n x * \prod_{j=1}^n x *\dots * \prod_{j=1}^n x}_{n\text{ times}}\\ &=\underbrace{\underbrace{x*x*\dots*x}_{n\text{ times}}*\underbrace{x*x*\dots*x}_{n\text{ times}}*\dots*\underbrace{x*x*\dots*x}_{n\text{ times}}}_{m\text{ times}}\\ \end{align*} Therefore, there are $n*m$ total multiplications of $x$ with itself. Which is to say \begin{equation*} \left(x^n\right)^m = \underbrace{x*x*x*\dots*x}_{n*m\text{ times}} = \prod_{i=1}^{nm} x = x^{nm} \end{equation*} As promised. $\qed$ \end{proposition} \begin{proposition}{Multiplying exponents of the same base adds the powers}\label{prop:IntegerExponentiationOfSameBaseAddsPowers} Let $x\in\mathbb{Z}$ be a fixed integer and let $n,m\in\mathbb{N}$. We have that \begin{equation*} x^n *x^m = x^{n+m} \end{equation*} Proof: Let $x\in\mathbb{Z}$ and $n,m\in\mathbb{N}$ If $n=0$ or $m=0$ or both then the result is trivial. Likewise if $n=0$ and $m\geq 0$ or $n\geq 0$ and $m=0$ again the result is trivial. So suppose that $n>0$ and $m>0$. We have by definition of exponentiation that \begin{equation*} x^n*x^m=\prod_{i=1}^n x * \prod_{i=1}^m x = \underbrace{x*x*\dots *x}_{n\text{ times}} * \underbrace{x*x*\dots *x}_{m\text{ times}}=\underbrace{x*x*\dots *x}_{n+m \text{ times}}=x^{n+m} \end{equation*} As expected. $\qed$ \end{proposition} \begin{proposition}{Power of product is product of powers}\label{prop:IntegerExponentiationPowerOfProductIsProductOfPowers} Let $x,y\in\mathbb{Z}$ and $n\in\mathbb{N}$. Then \begin{equation*} \left(x*y\right)^n=x^n*y^n \end{equation*} Proof: If $n=0$ then $\left(x*y\right)^n=1$ and clearly $x^0*y^0=1$. So let $n>0$ then we have \begin{align*} \left(x*y\right)^n=\prod_{i=1}^n xy &=\underbrace{xy*xy*\dots *xy}_{n\text{ times}}\\ &= \left(\underbrace{x*x*\dots *x}_{n\text{ times}}\right)*\left(\underbrace{y*y*\dots *y}_{n\text{ times}}\right),\ \text{ By commutativity of multiplication}\\ &=x^n*y^n \end{align*} Showing the proposition. $\qed$ \end{proposition} The awake reader may have noticed how we have only dealt with positive exponents so far in our extension of exponentiation to the integers. What about negative exponents? We can, loosely, justify why we can't yet consider negative exponents by considering proposition \ref{prop:IntegerExponentiationOfSameBaseAddsPowers}. For a second suppose that instead of $n.m\in\mathbb{N}$ we consider $n,m\in\mathbb{Z}$. In particular $n=1$ and $m=-1$, then we have that \begin{equation*} x^1*x^{-1}=x^{1+-1}=x^0=1 \end{equation*} Hence we have that when $x^1$ is multiplied by $x^{-1}$ we get back to 1. Hence in a sense $x^{-1}$ cancels with $x$. If we let $x=2$ we have $x^1=2$ and so $x^1*x^{-1}=1$ gives us the equation $2*x^{-1}=1$. We intuitively know that $\displaystyle x^{-1}=\frac{1}{2}$ which we know is not an integer. Hence if \ref{prop:IntegerExponentiationOfSameBaseAddsPowers} held for all integer powers we have the implied existence of a new type of object. This object has the potential that when an integer is multiplied by the appropriate member of this new type of object, assuming such an object even exists, then integer multiplication is undone. \pagebreak \section{Construction of the Rationals} \epigraph{A man is like a fraction whose numerator is what he is and whose denominator is what he thinks of himself. The larger the denominator, the smaller the fraction.}{\textit{Leo Tolstoy}} We have now built a theory of integer numbers. One main reason for doing this was to be able to always undo subtraction. We still have a glaring issue at hand, however. How do we undo multiplication? For example, we are unable to express in mathematical language how many times one quantity goes into another. If we have $6$ pints and $3$ friends we know that each friend should get $2$ pints as $3*2=6$. In a sense we have that $2$ goes into $6$ a total of $3$ times and $3$ goes into $6$ a total of $2$ times. The integers don't have a concept of how many times one integer can go into another. This is what we call division and we write $\displaystyle\frac{6}{2}=3$ and $\displaystyle\frac{6}{3}=2$ for each situation respectively. Thankfully the method used to construct the integers can be used again on the integers themselves to construct an even richer theory. As with the integers, we should consider what we want to do. We seek a way to undo the multiplication of integers. Consider $a,b,c,d\in\mathbb{Z}$ $a=6,b=3,c=12$ and $d=6$, with these values we intuitively know that $\displaystyle\frac{6}{3}=2$ and $\displaystyle\frac{12}{6}=2$. We also note that $6*6=36$ and $3*12=36$. This gives us a clue on how to proceed. We have that $\displaystyle\frac{6}{3}$ and $\displaystyle\frac{12}{6}$ are hence similar. If we temporarily use the language of relations we have that $\left(a,b\right)\sim\left(c,d\right)$. \subsection{Defining the Rationals} We proceed by defining division as an ordered tuple on integers \begin{definition}{Division as an ordered tuple} Let $a,b\in\mathbb{Z}$. We define division as an ordered tuple $\left(a,b\right)\in\mathbb{Z}^2$ to mean $\displaystyle\frac{a}{b}$. We will call $x\in\mathbb{Z}^2$ a division tuple in this context. \end{definition} Hence we can define the relation we considered above. \begin{definition}{Relation for division} Let $\left(a,b\right),\left(c,d\right)\in\mathbb{Z}^2$ be division tuples. We define the relation $\sim$ such that $\left(a,b\right)\sim\left(c,d\right)$ if and only if $ad=bc$ \end{definition} With this definition there is something we need to consider that we have heard since school, you can't divide by zero, that is for any integer $a$ we have $\displaystyle\frac{a}{0}$ is not defined. Suppose that $\left(a,0\right)\sim\left(c,d\right)$ for some $a,c,d\in\mathbb{Z}$. We have by definition of the relation that \begin{equation*} \left(a,0\right)\sim\left(c,d\right)\iff ad=0*c = 0 \end{equation*} By proposition \ref{prop:IntegersHaveNoZeroDivisors} we have that either $a=0$ or $d=0$ or both. If $a=0$ then we have $\left(0,0\right)\sim\left(c,d\right)\Rightarrow 0=0$ for all $c,d\in\mathbb{Z}$. This means that every division tuple in $\mathbb{Z}^2$ would be equivalent to $\left(0,0\right)$. Likewise if $d=0$ we get $\left(a,0\right)\sim\left(c,0\right)\Rightarrow 0=0$ again meaning for all division tuples in $\mathbb{Z}^2$ would be equivalent. Finally if both $a=0$ and $d=0$ then $\left(0,0\right)\sim\left(c,0\right)$ and so $0=0*c=0$ and again every division tuple would be equivalent. This is a problem as this relation would imply that all elements are essentially the same\footnote{We can think of this as some sort of singularity}. This is not a useful definition to be using so we will avoid this by not allowing $b=0$ in $\left(a,b\right)\in\mathbb{Z}^2$. We revise the definition \begin{definition}{Division as an ordered tuple} Let $a,b\in\mathbb{Z}$ with $b\neq 0$. We define division as an ordered tuple $\left(a,b\right)\in\mathbb{Z}^2$ to mean $\displaystyle\frac{a}{b}$. We will call $x\in\mathbb{Z}^2$ a division tuple in this context. \end{definition} \begin{definition}{Relation for division} Let $\left(a,b\right),\left(c,d\right)\in\mathbb{Z}^2$ be division tuples where $b\neq 0$ and $d\neq 0$. We define the relation $\sim$ such that $\left(a,b\right)\sim\left(c,d\right)$ if and only if $ad=bc$ \end{definition} We can show that this revised definition is an equivalence relation. \begin{proposition}{Relation for division ordered tuple is an equivalence relation} Let $x,y,z\in\mathbb{Z}^2$ be division tuples and defined the relation $x\sim y$ as above. We have that $\sim$ is an equivalence relation. Proof: Let $x,y,z\in\mathbb{Z}^2$ be division tuples such that $x=\left(a,b\right),y=\left(c,d\right)$ and $z=\left(e,f\right)$. We show that $\sim$ is an equivalence relation, in other words. \begin{enumerate} \item $\sim$ is reflexive \item $\sim$ is symmetric \item $\sim$ is transitive \end{enumerate} \begin{enumerate} \item $\sim$ is reflexive: We have that for $x=\left(a,b\right)$ that $x\sim x$ as $x\sim x$ if and only if $ab=ab$. \item $\sim$ is symmetric: Suppose that $x=\left(a,b\right)$ and $y=\left(c,d\right)$. Suppose that $x\sim y$ then we have that $ad=bc$. Hence $bc=ad \Rightarrow cb=ad$ and so $\left(c,d\right)\sim\left(a,b\right)$ and so $y\sim x$. \item $\sim$ is transitive: Suppose that $x\sim y$ and $y\sim z$ then by definition we have that $ad=bc$ and $cf=de$. We have that \begin{align*} ad&=bc\\ adf&=bcf\\ adf&=bde\\ af&=be \end{align*} Hence $\left(a,b\right)\sim\left(e,f\right)$ and so $x\sim z$. \end{enumerate} It follows that $\sim$ is an equivalence relation. $\qed$ \end{proposition} We can now turn our attention to the set $\mathbb{Z}^2/\sim=\left\{\left[x\right]_\sim:x\in\mathbb{Z}^2\right\}$. \begin{definition}{Rationals} Let $\mathbb{Z}^2$ have the equivalence relation $\sim$ defined by $\left(a,b\right)\sim\left(c,d\right)$ if and only if $ad=bc$. We define the set of rational numbers, denoted $\mathbb{Q}$, as the quotient set $\mathbb{Z}^2/\sim$. The set has the form \begin{equation} \mathbb{Q}=\left\{\dots,-\frac{2}{3},-\frac{1}{3},-\frac{1}{2},0,\frac{1}{2},\frac{1}{3},\frac{2}{3},\dots\right\} \end{equation} \end{definition} \subsection{Extending equality to the rationals} As with the integers, it is easy to extend equality. \begin{definition}{Equality of rationals} Let $x,y\in\mathbb{Q}$ be two rational numbers. We define that two rationals are equal, denoted $x=y$ if and only if $x\sim y$. That is $x$ and $y$ are in the same equivalence class. If $x\not\sim y$ then we say that $x$ is not equal to $y$ and write $x\neq y$. \end{definition} \subsection{Extending inequality operators to the rationals} The inequality operators can be extended to the rationals in a natural way. \begin{definition}{Less than operator} Let $x,y\in\mathbb{Q}$ where $x\in\left[a,b\right]$ and $y\in\left[c,d\right]$ for some $a,b,c,d\in\mathbb{Z}$. The less than operator, denoted by $xy$ is defined by the logical proposition \begin{equation*} >\left(x,y\right)=\begin{cases} 1,\ \text{If } ad>bc\\ 0,\ \text{Otherwise} \end{cases} \end{equation*} This can equivalently be express as \begin{equation*} x>y \iff ad>bc \end{equation*} \end{definition} \begin{definition}{Greater than or equal to operator} Let $x,y\in\mathbb{Q}$ where $x\in\left[a,b\right]$ and $y\in\left[c,d\right]$ for some $a,b,c,d\in\mathbb{Z}$. The greater than or equal to operator, denoted by $x\geq y$ is defined by the logical proposition \begin{equation*} \geq\left(x,y\right)=\begin{cases} 1,\ \text{If } ad\geq bc\\ 0,\ \text{Otherwise} \end{cases} \end{equation*} This can equivalently be express as \begin{equation*} x\geq y \iff ad\geq bc \end{equation*} \end{definition} \subsection{Extending addition to the rationals} We can extend addition to the rationals. To do so we need to consider how integers are represented in the rationals. As we know an element $\left(a,b\right)\in\mathbb{Q}$ is going to represent $\displaystyle\frac{a}{b}$. So we can start by considering what an integer will look like. We know by the definition of the equivalence relation that for $\left(a,b\right),\left(c,d\right)\in\mathbb{Z}^2$ that \begin{equation*} \left(a,b\right)\sim\left(c,d\right)\iff ad=bc \end{equation*} Hence if we have for $b=d=1$ that \begin{equation*} \left(a,1\right)\sim\left(c,1\right)\iff a=c \end{equation*} Hence an integer can be represented in the rationals by an element of the form $\left(k,1\right)$ for all $k\in\mathbb{Z}$. Therefore if $x,y\in\mathbb{Z}$ they will have the representation $x=\left(x_1,1\right)$ and $y=\left(y_1,1\right)$ for some $x_1,y_1\in\mathbb{Z}$. Hence by integer addition, we have that \begin{equation*} x+y=\left(x_1,1\right)+\left(y_1,1\right)=\left(x_1+y_1,1\right) \end{equation*} Now what happens if $a=c=1$? From the definition of the equivalence relation we have that \begin{equation*} \left(1,b\right)\sim\left(1,d\right)\iff d=b \end{equation*} So we see that $\left(1,b\right)\sim\left(1,d\right)$ means that intuitively $\displaystyle\frac{1}{b}=\frac{1}{d}$. The question now becomes what is $\displaystyle\frac{1}{b}+\frac{1}{b}$? For example consider $\displaystyle\frac{1}{2}+\frac{1}{2}=1$, or $\displaystyle\frac{1}{3}+\frac{1}{3}=\frac{2}{3}$. It seems the result we need is that $\displaystyle\frac{1}{b}+\frac{1}{b}=\frac{2}{b}$. We hence have that \begin{equation*} \left(1,b\right)+\left(1,b\right)=\left(2,b\right) \end{equation*} Hence more generally we have that \begin{equation*} \left(a,b\right)+\left(c,b\right)=\left(a+c,b\right) \end{equation*} Now, from intuition, we know that for example $\displaystyle\frac{1}{3}=\frac{2}{6}=\frac{1*2}{3*2}$. In the language of the relation we have defined, we have that \begin{equation*} \left(a,b\right)\sim\left(ad,bd\right) \end{equation*} With these facts, we have enough to recover the definition of the addition of rational numbers we were told in school. We have that \begin{align*} \left(a,b\right)+\left(c,d\right)&\sim\left(ad,bd\right)+\left(bc,bd\right)\\ &\sim\left(ad+bc,bd\right) \end{align*} Indeed, we have for example \begin{equation*} \frac{1}{2}+\frac{1}{3}=\frac{3*1+2*1}{3*2}=\frac{5}{6} \end{equation*} We make the required definition. \begin{definition}{Addition on the Rationals} Let $x,y\in\mathbb{Q}$ with $x\in\left[a,b\right]$ and $y=\left[c,d\right]$ so that $b\neq 0$ and $d\neq 0$. We define addition on the rationals by \begin{equation} x+y=\left[a,b\right]+\left[c,d\right]=\left[ad+bc,bd\right] \end{equation} \end{definition} \subsection{Extending multiplication to the rationals} We can extend multiplication to the rationals as well. As with extending addition, we should consider how integers are represented in the rationals. As before an integer in the rationals is of the form $\left(a,1\right)$ and given the definition from the integers we know we must have \begin{equation*} \left(a,1\right)*\left(b,1\right)=\left(ab,1\right) \end{equation*} Now we need to answer the question of $\left(1,b\right)*\left(1,d\right)$. Taking a similar approach as to addition we will consider some examples. We intuitively know that $\displaystyle 1*\frac{1}{2}=\frac{1}{2}$. This is to say that \begin{equation*} \left(1,1\right)*\left(1,2\right)=\left(1,2\right) \end{equation*} We also knot that $2*2=4$ and so we know $\displaystyle\frac{4}{2}=2$. In other words we must have that \begin{equation*} \left(4,1\right)*\left(1,2\right)=\left(2,1\right)\sim\left(4,2\right) \end{equation*} Now, suppose we have $\displaystyle\frac{3}{2}=1.5$, what is $\displaystyle\frac{3}{2}*\frac{1}{3}$? Again we know intuitively that $0.5+0.5+0.5=3(0.5)=1.5$, hence we can write \begin{equation*} \left(3,2\right)*\left(1,3\right)=\left(1,2\right)\sim\left(3,6\right) \end{equation*} We can now see how to handle $\left(1,b\right)*\left(1,d\right)$ and more generally $\left(a,b\right)*\left(c,d\right)$. We make the definition. \begin{definition}{Multiplication on the Rationals} Let $x,y\in\mathbb{Q}$ with $x\in\left[a,b\right]$ and $y=\left[c,d\right]$ so that $b\neq 0$ and $d\neq 0$. We define multiplication on the rationals by \begin{equation} x*y=\left[a,b\right]*\left[c,d\right]=\left[ac,bd\right] \end{equation} \end{definition} \subsection{Closure properties of addition and multiplication} As with the natural numbers and integers we need to show that the operations of addition and multiplication on the rationals are closed and well-defined. \begin{theorem}{Addition and multiplication on the rational are well-defined operators and closed} We have that $\forall x,y\in\mathbb{Q}$ that \begin{enumerate} \item $x+y\in\mathbb{Q}$ \item $x*y\in\mathbb{Q}$ \end{enumerate} Proof: \begin{enumerate} \item $x+y\in\mathbb{Q}$: We must show that if $\left(a,b\right)\sim\left(a',b'\right)$ and $\left(c,d\right)\sim\left(c',d'\right)$ then we have \begin{equation*} \left(ad+bc,bd\right)\sim\left(a'd'+b'c',b'd'\right) \end{equation*} By definition we have that $\left(a,b\right)\sim\left(a',b'\right)$ holds if and only if $ab'=ba'$, likewise $\left(c,d\right)\sim\left(c',d'\right)$ holds if and only if $cd'=c'd$. It is left to show $\left(ad+bc,bd\right)\sim\left(a'd'+b'c',b'd'\right)$. By definition of the equivalence relation we have that \begin{equation*} \left(ad+bc,bd\right)\sim\left(a'd'+b'c',b'd'\right) \iff \left(ad+bc\right)b'd'=bd\left(a'd'+b'c'\right) \end{equation*} We have that \begin{align*} \left(ad+bc\right)b'd'&=adb'd'+bcb'd'\, \text{ As integer multiplication distributes over the addition}\\ &=\left(ab'\right)\left(dd'\right)+\left(cd'\right)\left(bb'\right)\, \text{ By commutativity}\\ &=\left(ba'\right)\left(dd'\right)+\left(dc'\right)\left(bb'\right)\, \text{ By the equivalence relation}\\ &=\left(bd\right)\left(a'd'\right)+\left(bd\right)\left(b'c'\right)\, \text{ By commutativity}\\ &=bd\left(a'd'+b'c' ,\right)\, \text{ As integer multiplication distributes over the addition} \end{align*} Which is what we wished to show. Hence addition is well-defined. It is left to show closure. Let $x,y\in\mathbb{Q}$ with $x=\left(a,b\right)$ and $y=\left(c,d\right)$ so that $b\neq 0$ and $d\neq 0$. By definition of addition we have that \begin{equation*} \left(a,b\right)+\left(c,d\right)=\left(ad+bc,bd\right) \end{equation*} As $ad+bc\in\mathbb{Z}$ and $bd\in\mathbb{Z}$ then $\left(ad+bc,bd\right)\in\left[ad+bc,bd\right]$ and so $x+y\in\mathbb{Q}$. \item $x*y\in\mathbb{Q}$: As with addition we need to show that if $\left(a,b\right)\sim\left(a',b'\right)$ and $\left(c,d\right)\sim\left(c',d'\right)$ that \begin{equation*} \left(ac,bd\right)\sim\left(a'c',b'd'\right) \end{equation*} As $\left(a,b\right)\sim\left(a',b'\right)$ holds if and only if $ab'=ba'$, likewise $\left(c,d\right)\sim\left(c',d'\right)$ holds if and only if $cd'=c'd$. It is left to show $\left(ac,bd\right)\sim\left(a'c',b'd'\right)$, that is \begin{equation*} \left(ac,bd\right)\sim\left(a'c',b'd'\right)\iff acb'd'=bda'c' \end{equation*} We have \begin{align*} acb'd'&=\left(ab'\right)\left(cd'\right)\, \text{By commutativity}\\ &=\left(ba'\right)\left(c'd\right),\ \text{By the equivalence relation}\\ &=bda'c',\ \text{By commutativity} \end{align*} Showing that multiplication is well-defined. To show closure let $x,y\in\mathbb{Q}$ with $x=\left(a,b\right)$ and $y=\left(c,d\right)$ so that $b\neq 0$ and $d\neq 0$ then by definition we have that \begin{equation*} \left(a,b\right)*\left(c,d\right)=\left(ac,bd\right) \end{equation*} From which it is clear that $ac,bd\in\mathbb{Z}$ so $x*y\in\mathbb{Q}$ \end{enumerate} The result is shown. $\qed$ \end{theorem} \subsection{Associativity of rational addition and multiplication} The associativity of addition and multiplication extends to the rationals. \begin{theorem} Let $x,y,z\in\mathbb{Q}$. We have that \begin{enumerate} \item $x+\left(y+z\right)=\left(x+y\right)+z$ \item $x\left(yz\right)=\left(xy\right)z$ \end{enumerate} Proof: \begin{enumerate} \item $x+\left(y+z\right)=\left(x+y\right)+z$: Let $x,y,z\in\mathbb{Q}$ be such that $x=\left(a,b\right), y=\left(c,d\right)$ and $z=\left(e,f\right)$ where $a,b,c,d,e,f\in\mathbb{N}$ and we have that $\left(a,b\right)\in\left[a,b\right], \left(c,d\right)\in\left[c,d\right]$ and $\left(e,f\right)\in\left[e,f\right]$. We have that \begin{align*} x+\left(y+z\right)&=\left(a,b\right)+\left(\left(c,d\right)+\left(e,f\right)\right)\\ &=\left(a,b\right)+\left(cf+de,df\right)\\ &=\left(adf+b\left(cf+de\right),bdf\right)\\ &=\left(adf+bcf+bde,bdf\right)\\ &=\left(\left(ad+bc\right)f+bde,bdf\right)\\ &=\left(\left(ad+bc\right)f+ebd,bdf\right),\text{ By associativity of addition for integer numbers}\\ &=\left(ad+bc,bd\right)+\left(e,f\right)\\ &=\left(\left(a,b\right)+\left(c,d\right)\right)+\left(e,f\right)\\ &=\left(x+y\right)+z \end{align*} Which shows associativity of addition. \item $x\left(yz\right)=\left(xy\right)z$: As with addition, let $x,y,z\in\mathbb{Q}$ be such that $x=\left(a,b\right), y=\left(c,d\right)$ and $z=\left(e,f\right)$ where $a,b,c,d,e,f\in\mathbb{Z}$ and we have that $\left(a,b\right)\in\left[a,b\right], \left(c,d\right)\in\left[c,d\right]$ and $\left(e,f\right)\in\left[e,f\right]$. We then have that \begin{align*} x\left(yz\right)&=\left(a,b\right)*\left(\left(c,d\right)\left(e,f\right)\right)\\ &=\left(a,b\right)*\left(ce,df\right)\\ &=\left(ace,bdf\right)\\ &=\left(ac,bd\right)*\left(e,f\right)\\ &=\left(\left(a,b\right)*\left(c,d\right)\right)*\left(e,f\right) \end{align*} Showing associativity of multiplication. \end{enumerate} The result follows. $\qed$ \end{theorem} \subsection{Commutativity of rational addition and multiplication} As with the naturals and integers, addition and multiplication in the rationals both satisfy commutativity. \begin{theorem}{Addition and multiplication are commutative} For all $x,y\in\mathbb{Q}$ we have that \begin{enumerate} \item $x+y=y+x$ \item $xy=yx$ \end{enumerate} Proof: \begin{enumerate} \item $x+y=y+x$: Let $x,y\in\mathbb{Q}$. By definition we have that $x\in\left[a,b\right]$ and $y\in\left[c,d\right]$ for some $a,b,c,d\in\mathbb{Z}$. Let $x=\left(a,b\right)$ and $y=\left(c,d\right)$. We then have by definition of addition that \begin{align*} x+y&=\left(a,b\right)+\left(c,d\right)\\ &=\left(ad+bc,bd\right)\\ &=\left(bc+ad,bd\right),\ \text{By associativity of addition for the integers}\\ &=\left(cb+da,db\right),\ \text{By commutativity of addition for the integers}\\ &= \left(c,d\right)+\left(a,b\right) &=y+x \end{align*} Showing commutativity holds for addition in the integers. \item $xy=yx$: Let $x,y\in\mathbb{Q}$ by definition we have that $x\in\left[a,b\right]$ and $y\in\left[c,d\right]$ for some $a,b,c,d\in\mathbb{Z}$. So let $x=\left(a,b\right)$ and $y=\left(c,d\right)$. By definition of multiplication we have \begin{align*} xy&=\left(a,b\right)*\left(c,d\right)\\ &=\left(ac,bd\right)\\ &=\left(ca,db\right), \text{By commutativity of multiplication of the integers}\\ &=\left(c,d\right)*\left(a,b\right)\\ &=yx \end{align*} Showing commutativity for integer multiplication. \end{enumerate} The result has been shown. $\qed$ \end{theorem} \subsection{The Zero and Identity laws} The zero and identity laws from both the naturals and integers extend to the rationals. But first, we show the following result. \begin{lemma}{Representation of zero in the rationals} We have that $0=\left[0,a\right]$ for all $a\in\mathbb{Z}$ with $a\neq 0$ Proof: Let $x,y\in\left[0,a\right]$ with $x=\left(0,a_1\right)$ and $y=\left(0,a_2\right)$. We hence have that$x\sim y$ and Where the final $0=0$ is the zero of the integers, from which the result is clear. $\qed$ \end{lemma} We take the natural representation of $0$ for the rationals. \begin{theorem}{The zero and Identity laws} Let $x\in\mathbb{Q}$. We have that \begin{enumerate} \item $x+0=x=0+x$ \item $1*x=x=x*1$ \end{enumerate} Proof: Let $x\in\mathbb{Q}$ then we have that $x=\left(a,b\right)$ for some $a,b\in\mathbb{Z}$ \begin{enumerate} \item $x+0=x=0+x$: We have that $0\in\left[0,1\right]$. Hence we have that \begin{align*} x+0&=\left(a,b\right)+\left(0,1\right)\\ &=\left(a*1+b*0,b*1\right)\\ &=\left(a,b\right)=x\\ &=\left(1*a+0*b.1*b\right)\\ &=\left(0,1\right)*\left(a,b\right)\\ &=0+x \end{align*} \item $x*1=x=1*x$: As $1\in\left[1,1\right]$ then \begin{align*} x*1&=\left(a,b\right)*\left(1,1\right)\\ &=\left(a*1,b*1\right)\\ &=\left(a,b\right)\\ &=\left(a,b\right)=x\\ &=\left(1*a,1*b\right)\\ &=\left(1,0\right)\left(a,b\right)\\ &=1*x \end{align*} \end{enumerate} The result follows. $\qed$ \end{theorem} \subsection{Multiplication distributes over addition} Yet another result that extends to the rationals is that multiplication distributes over addition. \begin{theorem}{Multiplication distributes over addition} For all $x,y,z\in\mathbb{Q}$ we have that \begin{enumerate} \item $x\left(y+z\right)=xy+xz$ \item $\left(y+z\right)x=yx+zx=xy+xz$ \end{enumerate} Proof: Let $x,y,z\in\mathbb{Q}$ then $x\in\left[a,b\right],y\in\left[c,d\right]$ and $z\in\left[e,f\right]$ for some $a,b,c,d,e,f\in\mathbb{Z}$. Let $x=\left(a,b\right), y=\left(c,d\right)$ and $z=\left(e,f\right)$. \begin{enumerate} \item $x\left(y+z\right)=xy+xz$: We have that \begin{align*} x\left(y+z\right)&=\left(a,b\right)\left(\left(c,d\right)+\left(e,f\right)\right)\\ &=\left(a\left(cf+ed\right),bdf\right)\\ &=\left(acf+aed,bdf\right),\ \text{By multiplication distributes over addition for the integers}\\ &=\left(acf+aed,bdf\right)*\left(1,1\right),\ \text{By the identity law for the rationals}\\ &=\left(acf+aed,bdf\right)*\left(b,b\right),\ \text{As }\left(1,1\right)\sim\left(b.b\right)\\ &=\left(\left(acf+aed\right)b,bdfb\right)\\ &=\left(acfb+aedb,bdfb\right),\ \text{By multiplication distributes over addition for the integers}\\ &=\left(acbf+aebd,bdbf\right),\ \text{By commutativity of integer multiplication}\\ &=\left(ac,bd\right)+\left(ae,bf\right)\\ &=\left(a,b\right)\left(c,d\right)+\left(a,b\right)\left(e,f\right)\\ &=xy+xz \end{align*} \item $\left(y+z\right)x=yx+zx=xy+xz$: Invoking the previous part of the proof we have that \begin{align*} \left(y+z\right)x&=x\left(y+z\right), \text{By commutativity of multiplication}\\ &=xy+xz, \text{By part }1.\\ &=yx+zx, \text{By commutativity of multiplication} \end{align*} \end{enumerate} As required. $\qed$ \end{theorem} \subsection{Extending subtraction to the rationals} We can extend subtraction from the integers to the rationals. Recall that subtraction was defined for $x,y\in\mathbb{Z}$ by \begin{equation*} x-y=x+\left(-y\right)=x+\left(-1*y\right) \end{equation*} That is to say subtraction was defined by adding the negation of $y$ to $x$. We will use a similar idea to define subtraction on the rationals. Firstly we need to consider what it means to negate a rational number. To do so we need to define what it means for a rational number to be "positive" or "negative". We know that any integer $x$ can be expressed as a rational by $\left(x,1\right)$ and so in this case $\left(x,1\right)$ is positive if $x$ is positive and $\left(x,1\right)$ is negative if $x$ is negative. Hence a general rational number $\left(a,b\right)$ being positive or negative will depend on $a$ and $b$ being positive or negative. There are a few cases to consider. \begin{enumerate} \item Suppose that $a$ is positive and $b$ is positive. We have that for $\left(a,b\right)\sim\left(c,d\right)$ for some $c,d\in\mathbb{Z}$ that \begin{equation*} ad=cb \end{equation*} As $a$ and $b$ are positive then we are forced to conclude that $c$ and $d$ are also positive for if not then one side of this equation would have a different sign. \item Suppose that $a$ is positive and $b$ is negative. Then as before we have that for $\left(a,b\right)\sim\left(c,d\right)$ to be true that \begin{equation*} ad=cb \end{equation*} As $b$ was negative then we have that $cb$ is either positive or negative depending on $c$. If $c$ is positive then $cb$ is negative and so $d$ must also be negative. Likewise if $c$ is negative then $cb$ is positive and $d$ must be positive. \end{enumerate} The cases for when $a$ is negative and $b$ is either positive or negative are similar. We can use this to make a definition for a positive and negative rational number. \begin{definition}{Positive and negative rational number} Let $x\in\mathbb{Q}$ so that $x=\left(a,b\right)$ for some $a,b\in\mathbb{Z}$. We say that $x$ is a positive rational number if and only if $a$ is positive and $b$ is positive. That is to say $x\in\mathbb{Q}$ is positive if and only if $\sgn\left(a\right)=\sgn\left(b\right)$ with $\sgn\left(a\right)\neq 0$ and $\sgn\left(b\right)\neq 0$ where $\sgn$ denotes the sign function of an integer. If $\sgn\left(a\right)\neq\sgn\left(b\right)$ and $\sgn\left(a\right)\neq 0$ and $\sgn\left(b\right)\neq 0$ then we have that $x$ is a negative rational number. Finally if $\sgn\left(a\right)= 0$ and $\sgn\left(b\right)\neq 0$ then we say that $x$ is neither positive or negative. \end{definition} We can summarise this definition using $\sgn$ just like we did for the integers. \begin{definition}{Sign of a rational number} Let $x\in\mathbb{Q}$ where $x=\left(a,b\right)$ with $a,b\in\mathbb{Z}$ and $b\neq 0$. We define the sign of $x$, denoted by $\sgn\left(x\right)$ to be the following function \begin{align*} \sgn:\mathbb{Q}&\rightarrow\left\{-1,0,1\right\}\\ x&\mapsto\sgn\left(x\right)=\begin{cases} 1,\ \text{If } x\text{ is a positive rational number}\\ -1,\ \text{If } x\text{ is a negative rational number}\\ 0,\ \text{If } \sgn\left(a\right)=0 \end{cases} \end{align*} \end{definition} Now that we have defined the notion of a positive and negative rational number we can consider what it means to negate a rational number. The definition follows immediately from the representation of $-1$ in $\mathbb{Q}$ being $\left(-1,1\right)$. Indeed for any $x\in\mathbb{Q}$ with $x=\left(a,b\right)$ we have \begin{equation*} -x=-1*x=\left(-1,1\right)*\left(a,b\right)=\left(-a,b\right) \end{equation*} We make the formal definition. \begin{definition}{Negation of a rational number} Let $x\in\mathbb{Q}$. We define the negation of $x$, denoted $-x$ by \begin{equation*} -x=-1*x=\left(-1,1\right)*x \end{equation*} where $\left(-1,1\right)\in\left[\left(-1,1\right)\right]$. That is $\left(-1,1\right)$ is an element of the equivalence class $\left[\left(-1,1\right)\right]$ which represents all possible elements that are $-1$. \end{definition} We can now make a definition for subtraction for the rational numbers \begin{definition}{Rational number subtraction} Let $x,y\in\mathbb{Q}$. We define the subtraction of $y$ from $x$, denoted $x-y$ by \begin{equation*} x-y=x+\left(-y\right)=x+\left(-1*y\right) \end{equation*} \end{definition} We immediately get that subtraction is closed, from the fact that both addition and multiplication is closed. We do not have associativity of subtraction in general. \begin{proposition}{Rational number subtraction is not associative} Let $x,y,z\in\mathbb{Q}$. We have that \begin{equation*} x-\left(y-z\right)\neq \left(x-y\right)-z \end{equation*} Proof: Let $\displaystyle x=\frac{1}{2}, y=\frac{1}{4}$ and $\displaystyle z=\frac{1}{6}$, we have $x\in\left[\left(1,2\right)\right], y\in\left[\left(1,4\right)\right]$ and $z\in\left[\left(1,6\right)\right]$ so $x=\left(1,2\right), y=\left(1,4\right)$ and $z=\left(1,6\right)$ . We have that \begin{align*} x-\left(y-z\right)&=\left(1,2\right)+\left(\left(1,4\right)-\left(1,6\right)\right)\\ &=\left(1,2\right)-\left(\left(1,4\right)+\left(-1*\left(1,6\right)\right)\right)\\ &=\left(1,2\right)-\left(\left(1,4\right)+\left(-1,6\right)\right)\\ &=\left(1,2\right)-\left(\left(1*6+4*-1,4*6\right)\right)\\ &=\left(1,2\right)-\left(\left(2,24\right)\right)\\ &=\left(1,2\right)+\left(-1*\left(\left(2,24\right)\right)\right)\\ &=\left(1,2\right)+\left(-2,24\right)\\ &=\left(1*24+2*-1,2*24\right)\\ &=\left(22,48\right)\\ \end{align*} On the other hand we have \begin{align*} \left(x-y\right)-z&=\left(1,2\right)-\left(\left(1,4\right)-\left(1,6\right)\right)\\ &=\left(\left(1,2\right)+\left(-1*\left(1,4\right)\right)\right)-\left(1,6\right)\\ &=\left(\left(1,2\right)+\left(-1,4\right)\right)-\left(1,6\right)\\ &=\left(1*4+2*-1,2*4\right)-\left(1,6\right)\\ &=\left(2,8\right)-\left(1,6\right)\\ &=\left(2,8\right)+\left(-1*\left(1,6\right)\right)\\ &=\left(2,8\right)+\left(-1,6\right)\\ &=\left(2*6+8*-1,8*6\right)\\ &=\left(4,48\right) \end{align*} It is left to show that $\left(22,48\right)\neq\left(4,48\right)$. Indeed to have $\left(22,48\right)=\left(4,48\right)$ we need $\left(22,48\right)\sim\left(4,48\right)$ which occurs if and only if $22*48=48*8$. However one the left hand side $48$ is multiplied by $22$ and on the right-hand side $48$ is multiplied by $8$ so they clearly can not be equal. The result is shown. $\qed$ \end{proposition} As with subtraction with integers, we can now show that formally, subtraction is an inverse to addition. \begin{proposition}{Subtracting an integer from itself gives zero}\label{prop:RationalAdditiveInverse} Let $x\in\mathbb{Q}$. We have that \begin{equation*} x-x=0 \end{equation*} Proof: Let $x\in\mathbb{Q}$ where $x\in\left[\left(a,b\right)\right]$ for some $a,b\in\mathbb{Z}$ and $b\neq 0$. We have \begin{align*} x-x&=\left(a,b\right)-\left(a,b\right)\\ &=\left(a,b\right)+\left(-a,b\right)\\ &=\left(ab+b*-a,b*b\right)\\ &=\left(ab-ba,b*b\right)\\ &=\left(ab-ab,b*b\right)\\ &=\left(0,b*b\right) \end{align*} It is left to show that $\left(0,b*b\right)\sim\left(0,1\right)$. Indeed \begin{equation*} 0*1=b*b*0 \Rightarrow 0=0 \end{equation*} The result is shown. $\qed$ \end{proposition} \subsection{The cancellation laws} We can now deduce that the cancellation laws extend to the rational numbers. \begin{theorem}{The cancellation laws}\label{thm:CancellationLawsForRationals} Let $x,y,z\in\mathbb{Q}$. \begin{enumerate} \item If $x+y=x+z$ then we have $y=z$. \item For $x\neq 0$, if $xy=xz$ then we have that $y=z$ \end{enumerate} Proof: \begin{enumerate} \item If $x+y=x+z$ then we have $y=z$: Let $x,y,z\in\mathbb{Q}$. We have that \begin{align*} x+y&=x+z\\ \Rightarrow -x+x+y&=-x+x+z,\ \text{Adding the negative of } x \text{ to both sides}\\ \Rightarrow \left(-x+x\right)+y*&=\left(-x+x\right)+z,\ \text{Associativity of the rationals}\\ \Rightarrow 0+y&=0+z,\ \text{By proposition \ref{prop:RationalAdditiveInverse}}\\ \Rightarrow y&=z \end{align*} \item For $x\neq 0$, if $xy=xz$ then we have that $y=z$: Let $x,y,z\in\mathbb{Q}$ where $x\neq 0$. Suppose that $x\in\left[\left(a,b\right)\right], y\in\left[\left(c,d\right)\right]$ and $z\in\left[\left(e,f\right)\right]$. We have \begin{align*} xy&=\left(a,b\right)\left(c,d\right)=\left(ac,bd\right)\\ xz&=\left(a,b\right)\left(e,f\right)=\left(ae,bf\right) \end{align*} Now suppose that $xy=xz$ then we have that $\left(ac,bd\right)\sim\left(ae,bf\right)$ which is to say \begin{equation*} acbf=aebd \end{equation*} Observer that \begin{align*} &acbf=aebd\\ &a\left(cbf\right)=a\left(ebd\right)\\ &cbf=ebd,\ \text{By the cancellation laws for the integers}\\ &bcf=bed,\ \text{By commutativity of the integers}\\ &b\left(cf\right)=b\left(ed\right)\\ &cf=ed,\ \text{By the cancellation laws for the integers}\\ \Rightarrow&\left(c,d\right)\sim\left(e,f\right),\ \text{By definition of the equivalence relation} \end{align*} It hence follows that as $\left(c,d\right)\sim\left(e,f\right)$ then $y=z$ \end{enumerate} The result is shown. $\qed$ \end{theorem} \subsection{Defining multiplicative inverses and division} When we extended the naturals to the integers we were able to extend the notion of subtraction in such a way that we could undo any addition operation. We were not able to do the same for multiplication in general. For example if we have $x*2=1$ where $1,2,x\in\mathbb{Z}$ then there is no integer $x$ that when multiplied by $2$ gives $1$. What happens if we consider instead the situation where we have $1,2,x\in\mathbb{Q}$? Let $x=\left(a,b\right)$ for some $a,b\in\mathbb{Z}$ with $b\neq 0$ and taking the natural representations for $1$ and $2$ of $1=\left(1,1\right)$ and $2=\left(2,1\right)$. We have that \begin{align*} x*2&=1\\ \left(a,b\right)\left(2,1\right)&=\left(1,1\right)\\ \left(2a,b\right)&=\left(1,1\right)\\ \Rightarrow\left(2a,b\right)&\sim\left(1,1\right)\iff 2a=b \end{align*} We don't seem to be in a better position then when we asked this question for $\mathbb{Z}$. However as $a,b$ were arbitrary, of course with $b\neq 0$, we are free to vary them. For example $a=1$ gives us $b=2$, $a=2$ gives $b=4$, $a=3$ yields $b=6$ and so on. We hence have that there is a family of possible value for $x$ which satisfies $x*2=1$ over the rational numbers, in particular we have $x=\left(a,2a\right)$ for $a\in\mathbb{Z}$ and $a\geq 0$. Moreover we clearly have \begin{equation*} \left(a,2a\right)\sim\left(1,2\right)\iff 2a=2a \end{equation*} Hence we have that $\left(a,2a\right)$ somehow undoes multiplication by $2$. Indeed consider $45*2=90$. We have that \begin{equation*} 90*\left(a,2a\right)=\left(90,1\right)*\left(a,2a\right)=\left(90a,2a\right) \end{equation*} Where we have $\left(90a,2a\right)\sim\left(45,1\right)$ as $90a*1=45*2a \iff 90a = 90a$. We can generalise this to $x*y=1$ for any $y\in\mathbb{Q}$. Indeed let $x=\left(a,b\right)$ and $y=\left(c,d\right)$ where $a,b,c,d\in\mathbb{Z}$ and $c\neq 0$ and $d\neq 0$ then we have \begin{align*} x*y&=\left(a,b\right)*\left(c,d\right)\\ &=\left(ac,bd\right)=\left(1,1\right)\\ \Rightarrow\left(ac,bd\right)&\sim\left(1,1\right)\iff bd=ac \end{align*} This is a somewhat unsatisfactory conclusion as it doesn't tell us what $a$ or $b$ should actually be equal to in order for $x*y=1$, likewise, it doesn't tell us what $c$ or $d$ should be either. Perhaps then we should consider a more simple setup. Suppose that $x\in\mathbb{Z}$ then is there $y\in\mathbb{Q}$ where $y=\left(c,d\right)$ with $d\neq 0$, such that $x*y=1$? We have \begin{equation*} x*y=\left(x,1\right)*\left(c,d\right)=\left(xc,d\right)=\left(1,1\right) \end{equation*} Hence \begin{equation*} \left(xc,d\right)\sim\left(1,1\right)\iff xc=d \end{equation*} Hence $y=\left(c,xc\right)$ satisfies this relation. However we can see that $\left(c,cx\right)\sim\left(1,x\right)$. Hence for any integer $x\neq 0$ we have a solution to $x*y=1$ with $y\in\mathbb{Q}$. We call $y$ a multiplicative inverse of $x$ and $x$ a multiplicative inverse of $y$. \begin{definition}{Multiplicative inverse of an integer} Let $x\in\mathbb{Z}$ be such that $x\neq 0$. Then there is a $y\in\mathbb{Q}$ such that \begin{equation*} x*y=1=y*x \end{equation*} where $y=\left(1,x\right)$. We can write this as $\displaystyle y=\frac{1}{x}$ or $y=x^{-1}$. We sometimes say that $x{-1}$ is a reciprocal of $x$ or a multiplicative inverse of $x$. \end{definition} In light of this, we have the immediate result \begin{proposition}{Multiplicative inverse of an integer times its multiplicative inverse is the original number}\label{prop:MultiplicativeInverseOfIntegerTimesInverseIsOriginalNumber} Let $x\in\mathbb{Z}$ so that $x^{-1}\in\mathbb{Q}$ where $\displaystyle x^{-1}=\frac{1}{x}$ is the multiplicative inverse to $x$ in the rationals. The following result holds. \begin{equation*} x*x^{-1}*x = x \end{equation*} Proof: By definition of a multiplicative inverse we have that \begin{equation*} x*x^{-1}=x*\frac{1}{x}=\left(x,1\right)*\left(1,x\right)=\left(x,x\right)\sim\left(1,1\right)=1 \end{equation*} Hence as $x^{-1}$ is a multiplicative inverse for $x$ it follows that $x$ is a multiplicative inverse for $x^{-1}$ and so \begin{equation*} x*x^{-1}*x=1*x=x \end{equation*} As required. $\qed$ \end{proposition} Armed with this definition we can answer the original question. In order to find an $x$ so that $x*y=1$ we have that we need to find a multiplicative inverse for $c$ and a multiplicative inverse for $\displaystyle d^{-1}=\frac{1}{d}$. Clearly we have that $\displaystyle c^{-1}=\frac{1}{c}$ and a multiplicative inverse for $d^{-1}$ is simply $d$. Hence a candidate for $x$ is given by $x=\left(d,c\right)$. Indeed we have that \begin{equation*} x*y=\left(d,c\right)*\left(c,d\right)=\left(cd,cd\right)\sim\left(1,1\right)=1 \end{equation*} We can hence extend the idea of multiplicative inverses to the rationals. \begin{definition}{Multiplicative inverse of a rational number} Let $x\in\mathbb{Q}$ such that $x=\left(a,b\right)$ with $a,b\in\mathbb{Z}$ and $b\neq 0$. Then there is a $y\in\mathbb{Q}$ such that \begin{equation*} x*y=1=y*x \end{equation*} where $y=\left(b,a\right)$. Hence we must also have $a\neq 0$. We write this as $\displaystyle y=\frac{b}{a}$ or as $\displaystyle x^{-1}=y=\frac{b}{a}$. We sometimes say that $x{-1}$ is a reciprocal of $x$ or a multiplicative inverse of $x$. \end{definition} A similar result holds as for proposition \ref{prop:MultiplicativeInverseOfIntegerTimesInverseIsOriginalNumber} \begin{proposition}{Multiplicative inverse of a rational number times its multiplicative inverse is the original number}\label{prop:MultiplicativeInverseOfRationalTimesInverseIsOriginalNumber} Let $x\in\mathbb{Q}$ with $x=\left(a,b\right)$ and $a,b\in\mathbb{Z}$ so that $a\neq 0$ and $b\neq 0$. Let $x^{-1}$ denote the multiplicative inverse of $x$. The following result holds. \begin{equation*} x*x^{-1}*x = x \end{equation*} Proof: By definition of a multiplicative inverse we have that \begin{equation*} x*x^{-1}=1 \end{equation*} Hence \begin{equation*} x*x^{-1}*x=1*x=x \end{equation*} As required. $\qed$ \end{proposition} We now have a solid grasp of undoing multiplication in the rational numbers. In fact we are now in a position to define the operation of division. However we are already done due to the work we have just done, and our original motivation for defining the rational numbers in the first place. We use the idea of multiplicative inverses! \begin{definition}{Division} Let $a,b\in\mathbb{Z}$ so that $b\neq 0$. We define the division of $a$ by $b$, denoted $\displaystyle\frac{a}{b}$ by \begin{equation*} \frac{a}{b}=a*b^{-1}=\left(a,1\right)*\left(1,b\right)=\left(a,b\right) \end{equation*} \end{definition} We can extend the notion of division even further by considering $a,b\in\mathbb{Q}$ rather than $\mathbb{Z}$. At first is appears we have a problem, we defined the rationals using integers and division in terms of integers, so how could we possibly assign any meaning to an expression like $\displaystyle\frac{1}{\frac{1}{2}}$? Consider for example the following \begin{equation*} \frac{1}{\frac{1}{2}}*\frac{1}{2} \end{equation*} If we were suppose the rule for multiplication that we defined extends to this situation then we get \begin{equation*} \frac{1}{\frac{1}{2}}*\frac{1}{2}=\frac{1*1}{\frac{1}{2}*2}=\frac{1}{1}=1 \end{equation*} In the context of the work we have just done we have that $\displaystyle \frac{1}{\frac{1}{2}}$ is a multiplicative inverse of $\frac{1}{2}$. However we know that $\displaystyle \frac{1}{2}$ has a multiplicative inverse of $2$. Does this mean that $\displaystyle \frac{1}{\frac{1}{2}}=2$? A deeper analysis of expressions of the form $\displaystyle \frac{1}{\frac{1}{a}}$. We know from before that $\displaystyle\frac{1}{a}=a^{-1}$ for some non-zero $a\in\mathbb{Z}$. Hence we have that by definition $a^{-1}\in\mathbb{Z}$. Hence we are considering the expression \begin{equation*} \frac{1}{\frac{1}{a}}=\frac{1}{a^{-1}} \end{equation*} Therefore we know from the definition of the multiplicative inverse of a rational number that there is some $y\in\mathbb{Q}$ so that \begin{equation*} \frac{1}{a^{-1}}*y=1 \end{equation*} By the definition we also know what $y$ must be $\displaystyle \frac{a^{-1}}{1}=a^{-1}=\frac{1}{a}$. Hence we can justify our ``temporary'' assumption of extending the multiplication rule. Hence hence make the following deduction \begin{proposition}{One divided by multiplicative inverse of an integer is the integer itself}\label{prop:OneDividedByMultiplicativeInverseOfInteger} Let $x\in\mathbb{Q}$ so that $\displaystyle x=\frac{1}{\frac{1}{a}}$ for some $a\in\mathbb{Z}$ with $a\neq 0$. we have that \begin{equation*} \frac{1}{\frac{1}{a}}=a \end{equation*} Proof: Let $x\in\mathbb{Q}$ be such that $\displaystyle x=\frac{1}{\frac{1}{a}}$ for some non-zero $a\in\mathbb{Z}$. We know by definition that \begin{equation*} x=\frac{1}{a}=a^{-1} \end{equation*} where $a^{-1}\in\mathbb{Z}$ and therefore $\displaystyle x = \frac{1}{a^{-1}}$. Moreover this is still a rational number by definition and so there exists some rational $y$ so that \begin{equation*} x*y=1 \end{equation*} where $\displaystyle y=\frac{a^{-1}}{1}=a^{-1}$. It follows that $\displaystyle y=\frac{1}{a}$. Again by definition there is some $z\in\mathbb{Q}$ so that $y*z=1$ where $\displaystyle z=\frac{a}{1}=a$ that is to say $z$ is a multiplicative inverse of $y$. We therefore have that \begin{equation*} x*y=1=y*z \end{equation*} Hence by theorem \ref{thm:CancellationLawsForRationals} we have that $x=z$ which is to say \begin{equation*} \frac{1}{\frac{1}{a}}=a \end{equation*} As required. $\qed$ \end{proposition} We hence get an immediate corollary \begin{corollary}{One divided by rational number} Let $x\in\mathbb{Q}$ be such that $\displaystyle x=\frac{a}{b}$. We have that \begin{equation*} \frac{1}{x}=\frac{1}{\frac{a}{b}}=\frac{b}{a} \end{equation*} Proof: We have \begin{equation*} \frac{1}{x}=\frac{1}{\frac{a}{b}}=\frac{1}{a\frac{1}{b}}=\frac{1}{a b^{-1}}=\frac{1}{a}*\frac{1}{b^{-1}}=\frac{1}{a}b=\frac{b}{a} \end{equation*} As required. $\qed$ \end{corollary} \subsection{Extending the summation and product notations to the rationals} Summation and product notation has been defined on the naturals as well as the integers. We can extend the notation to include the rational numbers. Let $q\in\mathbb{Q}^{n+m+1}$ be an ordered $n+m+1$ tuple of rational numbers where \begin{equation*} q=\left(q_{-m},q_{-m+1},\dots,q_{-1},q_0,q_1,\dots, q_n\right) \end{equation*} Define $\mathbb{Z}_m^n=\left\{-m,-m+1,-m+2,\dots,-1,0,1,\dots,n-1,n\right\}$ to be a set of indices and define $f:\mathbb{Z}_m^n\rightarrow\mathbb{Q}$ by \begin{align*} f:\mathbb{Z}_m^n&\rightarrow \mathbb{Q}\\ i&\mapsto f\left(i\right)=q_i \end{align*} \begin{definition}{Summation notation for rational numbers} Let $z\in\mathbb{Q}^{n+m+1}$ be ordered $n+m+1$ tuple of integers where $q=\left(q_{-m},q_{-m+1},\dots,q_{-1},q_0,q_1,\dots, q_n\right)$. Define $\mathbb{Z}_m^n$ by $\mathbb{Z}_m^n=\left\{-m,-m+1,-m+2,\dots,-1,0,1,\dots,n-1,n\right\}$. Let $f:\mathbb{Z}^{n+m+1}:\mathbb{Q}$ defined by \begin{align*} f:\mathbb{Z}^{m+n+1}&\rightarrow\mathbb{Q}\\ i&\mapsto f\left(i\right)=q_i \end{align*} We define the summation notation for the rational numbers by \begin{equation*} \sum_{i=-m}^n f\left(i\right)=f\left(-m\right)+f\left(-m+1\right)+\dots+f\left(-1\right)+f\left(0\right)+f\left(1\right)+\dots+f\left(n\right) \end{equation*} Alternatively this is written \begin{equation*} \sum_{i=-m}^n q_i = q_{-m}+q_{-m+1}+\dots+q_{-1}+q_0+q_1+\dots+q_n \end{equation*} We have that $i$ is called the index of summation and that $i=-m$ is the starting index of the summation, and $n$ the ending index of the summation. If $q\in\emptyset$ then we define the summation to be $0$ and call the summation an empty sum. We can also define the summation of some subset of $\mathbb{Z}_m^n$ which allows for starting a summation at some starting point other than $i=-m$. Let $T\subseteq\mathbb{Z}_m^n$. We define the summation over the set $T$ by \begin{equation*} \sum_{i\in T} z_i \end{equation*} If we have a mapping $g:\mathbb{Q}\rightarrow\mathbb{Q}$ we can define a summation over $g$ by \begin{equation*} \sum_{i\in T} g\left(z_i\right) \end{equation*} Finally we can define a summation over a predicate $P\left(i\right)$ for $i\in T$ by \begin{equation*} \sum_{P\left(i\right)}g\left(z_i\right) \end{equation*} where we take the sum of the $g\left(z_i\right)$ for the $i$ that satisfy the predicate $P$. We note that if we have $k>n$ for some $k\in\mathbb{N}$ then the sum \begin{equation*} \sum_{i=k}^n z_i=0 \end{equation*} \end{definition} The usual proprieties shown for summations with integer numbers also extend to the rational number version. \begin{proposition}{Properties of summation notation} Let $n,m\in\mathbb{Z}$ such that $mn$ for some $k\in\mathbb{N}$ then the product \begin{equation*} \prod_{i=k}^n z_i=1 \end{equation*} \end{definition} \begin{proposition}{Properties of product notation} Let $n,m\in\mathbb{Z}$ such that $m-y$ \item If $x\leq y$ then $-x\geq -y$ \item If $x>y$ then $-x<-y$ \item If $x\geq y$ then $-x\leq-y$ \end{enumerate} Proof: Let $x,y\in\mathbb{Q}$ so that $\displaystyle x=\frac{a}{b}$ and $\displaystyle y=\frac{c}{d}$ where $b\neq 0$ and $d\neq 0$. \begin{enumerate} \item If $x-y$: Let $x,y\in\mathbb{Q}$ so that $x-bc \end{equation*} Hence $-x>-y$. \item If $x\leq y$ then $-x\geq -y$: Let $x,y\in\mathbb{Q}$ so that $x\leq y$. Applying the definition of $\leq$ for the rationals gives \begin{equation*} x\leq y\iff ad\leq bc \end{equation*} Proposition \ref{prop:MultiplicationByNegativeOneFlipsInequalitySign} gives \begin{equation*} ad\leq bc\Rightarrow -ad\geq -bc \end{equation*} Hence $-x\geq y$. \item If $x>y$ then $-x<-y$: Let $x,y\in\mathbb{Q}$ so that $x>y$. By definition of $>$ for the rationals we have that \begin{equation*} x>y\iff ad>bc \end{equation*} Proposition \ref{prop:MultiplicationByNegativeOneFlipsInequalitySign} shows us that \begin{equation*} ad>bc\Rightarrow -ad<-bc \end{equation*} Hence $-x<-y$. \item If $x\geq y$ then $-x\leq-y$: Let $x,y\in\mathbb{Q}$ so that $x>y$. By definition of $\geq$ for the rationals, we have that \begin{equation*} x\geq y\iff ad\geq bc \end{equation*} Proposition \ref{prop:MultiplicationByNegativeOneFlipsInequalitySign} we have \begin{equation*} ad\geq bc\Rightarrow -ad\leq-bc \end{equation*} Hence $-x\leq -y$. \end{enumerate} The result is shown. $\qed$ \end{proposition} There is another useful lemma that will be useful for extending the rules of inequalities to the rationals. \begin{lemma}{Strictly larger rational minus a smaller is positive}\label{lem:LargerRatMinusSmallIsPositive} Let $x,y\in\mathbb{Q}$. We have that $x0$ Proof: $\left(\Rightarrow\right)$: Let $x,y\in\mathbb{Q}$, then $\displaystyle x=\frac{a}{b}$ and $\displaystyle y=\frac{c}{d}$ for some $a,b,c,d\in\mathbb{Z}$ and $b\neq 0$ and $d\neq 0$. As $x0$. By definition of greater than, and the fact that $0\in\left[\left(0,1\right)\right]$ we would have that \begin{equation*} \left(cb-ad\right)*1>0*\left(bd\right) \Rightarrow bc-ad>0 \end{equation*} Which is true as $ad0$ $\left(\Leftarrow\right)$: Suppose that $y-x>0$ where $x,y\in\mathbb{Q}$, with $\displaystyle x=\frac{a}{b}$ and $\displaystyle y=\frac{c}{d}$ for some $a,b,c,d\in\mathbb{Z}$ and $b\neq 0$ and $d\neq 0$. We have that \begin{equation*} y-x = \left(cb-ad,bd\right) \end{equation*} Moreover, $y-x>0$ implies that \begin{equation*} \left(cb-ad\right)*1>0*\left(bd\right) \Rightarrow bc-ad>0 \end{equation*} This is to say $bc>ad$, which by part 1 of proposition \ref{prop:InequalityIntegerNumbers} is the same as $ad0$ or $y=x$. Proof: $\left(\Rightarrow\right)$: Suppose $x\leq y$. If $x 0$ or $y=x$ holds. In the first case, $y-x>0$ implies $xx$ \item $x\leq y$ is the same as $y\geq x$ \item If $xy$ and $y>z$ then $x>z$ \item If $x\geq y$ and $y>z$ then $x>z$ \item If $x>y$ and $y\geq z$ then $x>z$ \item If $x\geq y$ and $y\geq z$ then $x\geq z$ \item If $xy$ then $x+z>y+z$ \item If $x\geq y$ then $x+z\geq y+z$ \item If $xyz$ \item If $x\leq y$ and $z\geq 0$ then $xz\leq yz$ \item If $x\leq y$ and $z<0$ then $xz\geq yz$ \item If $x>y$ and $z\geq 0$ then $xz>yz$ \item If $x>y$ and $z< 0$ then $xz0$ then $\displaystyle\frac{x}{z}<\frac{y}{z}$ \item If $x\leq y$ and $z>0$ then $\displaystyle\frac{x}{z}\leq\frac{y}{z}$ \item If $x>y$ and $z>0$ then $\displaystyle\frac{x}{z}>\frac{y}{z}$ \item If $x\geq y$ and $z>0$ then $\displaystyle\frac{x}{z}\geq\frac{y}{z}$ \item If $x\frac{y}{z}$ \item If $x\leq y$ and $z<0$ then $\displaystyle\frac{x}{z}\geq\frac{y}{z}$ \item If $x>y$ and $z<0$ then $\displaystyle\frac{x}{z}<\frac{y}{z}$ \item If $x\geq y$ and $z<0$ then $\displaystyle\frac{x}{z}\leq\frac{y}{z}$ \item If $x0$ and $y>0$ then $\displaystyle \frac{1}{x}>\frac{1}{y}$ \item If $x\frac{1}{y}$ \item If $x\leq y$ and $x>0$ and $y>0$ then $\displaystyle \frac{1}{x}\geq \frac{1}{y}$ \item If $x\leq y$ and $x<0$ and $y<0$ then $\displaystyle \frac{1}{x}\geq \frac{1}{y}$ \item If $x>y$ and $x>0$ and $y>0$ then $\displaystyle \frac{1}{x}<\frac{1}{y}$ \item If $x>y$ and $x<0$ and $y<0$ then $\displaystyle \frac{1}{x}<\frac{1}{y}$ \item If $x\geq y$ and $x>0$ and $y>0$ then $\displaystyle \frac{1}{x}\leq \frac{1}{y}$ \item If $x\geq y$ and $x<0$ and $y<0$ then $\displaystyle \frac{1}{x}\leq \frac{1}{y}$ \end{enumerate} Proof: Let $x,y,z\in\mathbb{Q}$. Let $\displaystyle x=\frac{a}{b}$, $\displaystyle y=\frac{c}{d}$, $\displaystyle z=\frac{e}{f}$ for $a,b,e,f,g,h\in\mathbb{Z}$ and $b\neq 0$, $d\neq 0$, $f\neq 0$. \begin{enumerate} \item $xx$: Suppose that $xaf$ and so $y>x$. \item $x\leq y$ is the same as $y\geq x$: If $x0$ and $z-y>0$ by lemma \ref{lem:LargerRatMinusSmallIsPositive}. Now we have that \begin{equation*} \left(y-x\right)+\left(z-y\right)=z-x>0 \end{equation*} As $y-x$ and $z-y$ are both greater than 0. Hence as $z-x>0$ then $x0$, likewise by corollary \ref{cor:LargerOrEqualRatMinusSmallIsPositive} we have that $y\leq z$ means either $z-y>0$ or $y=z$. If $z-y>0$ then the result is the same as part 3. So suppose $y=z$ then clearly $xy$ and $y>z$ then $x>z$: By part 1. this is equivalent to $yz$ then $x>z$: Using parts 1. and 2. gives us the equivalent expression $y\leq x$ and $zy$ and $y\geq z$ then $x>z$: As with the previous part, applying parts 1. and 2. gives the statement $y0$ by lemma \ref{lem:LargerRatMinusSmallIsPositive}. Observer that \begin{align*} y-x&=y-\left(z-z\right)-x\\ &=\left(y-z\right)+\left(z-x\right)\\ &=\left(y-z\right)-\left(x-z\right)>0 \end{align*} So $\left(y-z\right)-\left(x-z\right)>0$ and so by the same lemma we conclude that $x+zy$ then $x+z>y+z$: Applying part 1. and then part 11. gives the equivalent result $y0$ by lemma \ref{lem:LargerRatMinusSmallIsPositive}. Hence, by distributivity, we have $z\left(y-x\right)>0$ as $z\geq 0$. Hence \begin{equation*} z\left(y-x\right)=zy-zx=yz-xz \Rightarrow xzyz$: Suppose $x0$, then applying part 15. with $-z$ gives $-xz<-yz$. Finally by proposition \ref{prop:MultiplicationByNegativeOneFlipsInequalitySignRational} part 1 yields $xz>yz$. \item If $x\leq y$ and $z\geq 0$ then $xz\leq yz$: If $x\leq y$ there are two cases to consider. If $xy$ and $z\geq 0$ then $xz>yz$: We have $x>y$ is the same as $y0$. By distributivity, we have that $z\left(x-y\right)>0$. Therefore we have $zx-zy=xz-yz>0$ and so $yzyz$ by part 1. \item If $x>y$ and $z< 0$ then $xzy$. Additionally, $z<0\Rightarrow -z>0$ so applying part 19. gives $-xz>-yz$ and so by part 1. we conclude $xzy$ then we apply part 19. Otherwise $x=y$ and $xz=yz$ so that $xz\geq yz$. \item If $x\geq y$ and $z<0$ then $xz\leq yz$: Again there are two cases to consider. If $x>y$ then the result holds by part 20. Otherwise $x=y$ and so $xz=yz$ to give the result $xz\leq yz$. \item If $x0$ then $\displaystyle\frac{x}{z}<\frac{y}{z}$: This follows by part 15. \item If $x\leq y$ and $z>0$ then $\displaystyle\frac{x}{z}\leq\frac{y}{z}$: This follows by part 17. \item If $x>y$ and $z>0$ then $\displaystyle\frac{x}{z}>\frac{y}{z}$: This follows by part 19. \item If $x\geq y$ and $z>0$ then $\displaystyle\frac{x}{z}\geq\frac{y}{z}$: This follows by part 21. \item If $x\frac{y}{z}$: This follows by part 16. \item If $x\leq y$ and $z<0$ then $\displaystyle\frac{x}{z}\geq\frac{y}{z}$: This follows by part 18. \item If $x>y$ and $z<0$ then $\displaystyle\frac{x}{z}<\frac{y}{z}$: This follows by part 20. \item If $x\geq y$ and $z<0$ then $\displaystyle\frac{x}{z}\leq\frac{y}{z}$: This follows by part 22. \item If $x0$ and $y>0$ then $\displaystyle \frac{1}{x}>\frac{1}{y}$: Suppose that $x0$ that either $a>0$ and $b>0$ or $a<0$ and $b<0$. Likewise as $y>0$ then either $c>0$ and $d>0$ or $c<0$ and $d<0$. Hence there are four cases to consider. \begin{enumerate} \item $a>0$ and $b>0$ and $c>0$ and $d>0$ \item $a>0$ and $b>0$ and $c<0$ and $d<0$ \item $a<0$ and $b<0$ and $c>0$ and $d>0$ \item $a<0$ and $b<0$ and $c<0$ and $d<0$ \end{enumerate} \begin{enumerate} \item $a>0$ and $b>0$ and $c>0$ and $d>0$: Observe that \begin{align*} ad&0\\ d&0\\ dc^{-1}&\frac{d}{c}$, which is to say $\displaystyle\frac{1}{x}>\frac{1}{y}$. \item $a>0$ and $b>0$ and $c<0$ and $d<0$: We have that as $c<0$ and $d<0$ then $ad<0$ and $bc<0$ and $ada^{-1}bc,\ \text{By part 16. as } a^{-1}<0\\ d&>a^{-1}bc\\ dc^{-1}&\frac{1}{y}$. \item $a<0$ and $b<0$ and $c>0$ and $d>0$: The argument is similar to the previous one, swapping the roles of $a,b,c$ and $d$. \item $a<0$ and $b<0$ and $c<0$ and $d<0$: This is similar to the first part. We give the full argument. As $a<0$, $b<0$, $c<0$ and $d<0$ then $ad>0$ and $bc>0$ and $ada^{-1}bc,\ \text{By part 16. as } a^{-1}<0\\ d&>a^{-1}bc\\ dc^{-1}&\frac{1}{y}$: This is similar to the previous part. Suppose that $x0$ and $b<0$ or $a<0$ and $b>0$. Likewise as $y<0$ then either $c>0$ and $d<0$ or $c<0$ and $d>0$. Hence there are four cases to consider. \begin{enumerate} \item $a>0$ and $b<0$ and $c>0$ and $d<0$ \item $a>0$ and $b<0$ and $c<0$ and $d>0$ \item $a<0$ and $b>0$ and $c>0$ and $d<0$ \item $a<0$ and $b>0$ and $c<0$ and $d>0$ \end{enumerate} \begin{enumerate} \item $a>0$ and $b<0$ and $c>0$ and $d<0$: As $a>0$ and $b<0$ and $c>0$ and $d<0$ then we have that $ad<0$ and $bc<0$ and $ad\frac{1}{y}$ \item $a>0$ and $b<0$ and $c<0$ and $d>0$: We have $a>0$ and $b<0$ and $c<0$ and $d>0$ then we have that $ad>0$ and $bc>0$ and $ad\frac{1}{y}$ \item $a<0$ and $b>0$ and $c>0$ and $d<0$: This time we have $a<0$ and $b>0$ and $c>0$ and $d<0$ then we have that $ad>0$ and $bc>0$ and $adbc\\ a^{-1}\left(-ad\right)&>a^{-1}\left(-bc\right)\\ -d&>a^{-1}\left(-bc\right)\\ -dc^{-1}&>a^{-1}\left(-bc\right)c^{-1}\\ -dc^{-1}&>-a^{-1}b\\ \frac{d}{c}&<\frac{b}{a} \end{align*} Giving the result. \item $a<0$ and $b>0$ and $c<0$ and $d>0$: Finally, $a<0$ and $b>0$ and $c<0$ and $d>0$ which gives $ad<0$ and $bc<0$ with $ada^{-1}bc\\ d&>a^{-1}bc\\ dc^{-1}&0$ and $y>0$ then $\displaystyle \frac{1}{x}\geq \frac{1}{y}$: If $xy$ and $x>0$ and $y>0$ then $\displaystyle \frac{1}{x}<\frac{1}{y}$: Applying part 1. the equivalent statement is $y\frac{1}{y}$ so part 32. applies. \item If $x>y$ and $x<0$ and $y<0$ then $\displaystyle \frac{1}{x}<\frac{1}{y}$: Likewise by part 1. this is the same as $y0$ and $y>0$ then $\displaystyle \frac{1}{y}>\frac{1}{y}$ so part 31. applies. \item If $x\geq y$ and $x>0$ and $y>0$ then $\displaystyle \frac{1}{x}\leq \frac{1}{y}$: If $x>y$ then part 35 applies. Otherwise, $x=y$ and the result is clear. \item If $x\geq y$ and $x<0$ and $y<0$ then $\displaystyle \frac{1}{x}\leq \frac{1}{y}$: Finally, if $x>y$ then we apply part 36. Otherwise $x=y$ and we get the result. \end{enumerate} The result has been shown.\footnote{Phew!} $\qed$ \end{proposition} \pagebreak \subsection{Extending exponentiation to the rational numbers} Recall the definition of exponentiation from the integers. \begin{align*} \wedge:\mathbb{Z}\times\mathbb{Z}^+&\rightarrow\mathbb{Z}\\ \left(x,n\right)&\mapsto \wedge\left(x,n\right)=\begin{cases} 1,\ \text{If } x=0\text{ and } n=0\\ 1,\ \text{If } n=0\\ \displaystyle \prod_{i=1}^y x ,\ \text{If }x\neq 0\text{ and } n \geq 0\\ \end{cases} \end{align*} where $\mathbb{Z}^+=\left\{x\in\mathbb{Z}:x\geq 0\right\}$. We noted in the section on extending exponentiation to the integers that we were unable to consider the case of negative exponents. By assuming that they did we deduced that a new type of object exists that undoes integer multiplication. As we have seen in this section, that object type is actually a rational number. Indeed we showed that in proposition \ref{prop:MultiplicativeInverseOfIntegerTimesInverseIsOriginalNumber} that if $x\in\mathbb{Z}$ then there is some $*x^{-1}\in\mathbb{Q}$ so that $x*x^{-1}=1=x^0$. This would generalise proposition \ref{prop:IntegerExponentiationOfSameBaseAddsPowers} to all integers rather than positive exponents. We hence generalise the definition of exponentiation and prove the results to all integer exponents rather than the positive. \begin{definition}{Exponentiation of integer numbers} Let $\left(x,y\right)\in\mathbb{Z}\times\mathbb{Z}$ and let $\wedge:\mathbb{Z}\times\mathbb{Z}\rightarrow\mathbb{Q}$. We define the exponentiation of $x$ by $y$ by \begin{align*} \wedge:\mathbb{Z}\times\mathbb{Z}&\rightarrow\mathbb{Q}\\ \left(x,y\right)&\mapsto \wedge\left(x,y\right)=\begin{cases} 1,\ \text{If } x=0\text{ and } y=0\\ 1,\ \text{If } x=0\\ \displaystyle \prod_{i=1}^y x ,\ \text{If }x\neq 0\text{ and } n \geq 0\\ \displaystyle \prod_{i=1}^{\left|y\right|} \frac{1}{x} ,\ \text{If }x\neq 0\text{ and } y < 0\\ \end{cases} \end{align*} \end{definition} We can now extend the results shown in the section on integer exponentiation extension. \begin{proposition}{Power law of exponentiation for positive exponents}\label{prop:IntegerExtensionExponentiationPowerLaw} Let $x\in\mathbb{Z}$ and let $n,m\in\mathbb{Z}$. We have that \begin{equation*} \left(x^n\right)^m = x^{nm} \end{equation*} Proof: If $n,m\geq 0$ the result is the same as proposition \ref{prop:IntegerExponentiationPowerLaw}. So we must consider the following cases \begin{enumerate} \item $n\geq 0$ and $m<0$ \item $n< 0$ and $m\geq 0$ \item $n< 0$ and $m<0$ \end{enumerate} \begin{enumerate} \item $n\geq 0$ and $m<0$: By definition of integer exponentiation, we have that $\displaystyle x^n=\prod_{i=1}^n x$. Now applying the general definition of integer exponentiation we see that \begin{align*} \left(x^n\right)^m=&\prod_{i=1}^{\left|m\right|} \frac{1}{x^n}\\ &=\underbrace{\left(\frac{1}{x^n}\right)*\left(\frac{1}{x^n}\right)*\left(\frac{1}{x^n}\right)*\dots*\left(\frac{1}{x^n}\right)}_{\left|m\right|\text{ times}} \end{align*} Now, we know by definition of multiplication for rationals that $\displaystyle\frac{1}{a}*\frac{1}{b}=\frac{1}{ab}$ and so. \begin{align*} \left(x^n\right)^m=&\underbrace{\left(\frac{1}{x^n}\right)*\left(\frac{1}{x^n}\right)*\left(\frac{1}{x^n}\right)*\dots*\left(\frac{1}{x^n}\right)}_{\left|m\right|\text{ times}}\\ &=\frac{1}{x^{n\left|m\right|}}\\ &=\prod_{i=1}^{n\left|m\right|} \frac{1}{x} =x^{nm} \end{align*} By definition. \item $n< 0$ and $m\geq 0$: As $n<0$ then we have that \begin{equation*} x^n=\prod_{i=1}^{\left|n\right|}\frac{1}{x}=\frac{1}{x^n} \end{equation*} We can now apply similar logic to the first part to conclude the result. \item $n< 0$ and $m<0$: Using similar logic to the two previous parts deduces the result. \end{enumerate} As promised. $\qed$ \end{proposition} \begin{proposition}{Multiplying exponents of the same base adds the powers}\label{prop:IntegerExtensionExponentiationOfSameBaseAddsPowers} Let $x\in\mathbb{Z}$ be a fixed integer and let $n,m\in\mathbb{Z}$. We have that \begin{equation*} x^n *x^m = x^{n+m} \end{equation*} Proof: If $n,m\geq 0$ the result is the same as proposition \ref{prop:IntegerExponentiationOfSameBaseAddsPowers}, so we have to consider the following three cases \begin{enumerate} \item $n\geq 0$ and $m<0$ \item $n< 0$ and $m\geq 0$ \item $n< 0$ and $m<0$ \end{enumerate} \begin{enumerate} \item $n\geq 0$ and $m<0$: Let $m=-k$ for some $k\in\mathbb{Z}$ with $k>0$. We know that $\displaystyle x^m=x^{-k}=\prod_{i=1}^{-k} \frac{1}{x} = x^{-k}$. Now we have \begin{equation*} x^n*x^m=x^n x^{-k}=x^{n+-k} \end{equation*} Which is equivalent to $x^{n+m}$. \item $n< 0$ and $m\geq 0$: Like the previous part let $n=-k$ for some $k\in\mathbb{Z}$ with $k>0$ then we get \begin{equation*} x^n*x^m=x^{-k}*x^{m}=x^{-k+m}=x^{n+m} \end{equation*} \item $n< 0$ and $m<0$: Let $n=-k$ and $m=-j$ for $k,j\in\mathbb{Z}$ with $k>0$ and $j>0$. Then \begin{equation*} x^n*x^m=x^{-k}*x^{-j}=x^{-k+-j}=x^{n+m} \end{equation*} \end{enumerate} As required. $\qed$ \end{proposition} \begin{proposition}{Power of product is product of powers}\label{prop:IntegerExtensionExponentiationPowerOfProductIsProductOfPowers} Let $x,y\in\mathbb{Z}$ and $n\in\mathbb{Z}$. Then \begin{equation*} \left(x*y\right)^n=x^n*y^n \end{equation*} Proof: If $n=0$ then $\left(x*y\right)^n=1$ and clearly $x^0*y^0=1$. So suppose $n>0$ then we have \begin{align*} \left(x*y\right)^n=\prod_{i=1}^n xy &=\underbrace{xy*xy*\dots *xy}_{n\text{ times}}\\ &= \left(\underbrace{x*x*\dots *x}_{n\text{ times}}\right)*\left(\underbrace{y*y*\dots *y}_{n\text{ times}}\right),\ \text{ By commutativity of multiplication}\\ &=x^n*y^n \end{align*} Finally, let $n<0$ then a similar argument shows that \begin{equation*} \left(x*y\right)^n=\frac{1}{x^n*y^n} \end{equation*} Showing the proposition. $\qed$ \end{proposition} We have extended integer exponentiation. What can we say about rational exponentiation? We can clearly extend the base of exponentiation to an arbitrary rational number. We have already used special cases of this when we considered denominators and numerators separately in the previous proofs. We formalise this to a fully general rational number. Firstly, we know that if $n<0$ then $\displaystyle x^n=\frac{1}{x^n}$. Additionally if $x\in\mathbb{Z}$ then a multiplicative inverse of $x$ in the rationals is given by $x^{-1}=\frac{1}{x}$. We combine the two into a general definition. \begin{definition}{Exponentiation for negative indices} Let $x\in\mathbb{Z}$ with $x\neq 0$. We extend exponentiation to negative $n\in\mathbb{Z}$ by \begin{equation*} x^{-n} = \left(x^{-1}\right)^n \end{equation*} Clearly we have in general that $x^{-n}\in\mathbb{Q}$ \end{definition} Now we can consider the more general case of $\displaystyle\left(\frac{a}{b}\right)^n$ for $a,b,n\in\mathbb{Z}$ and $b\neq 0$. We have the following proposition \begin{proposition}{Rational number raised to an integer exponent} Let $x\in\mathbb{Q}$ with $\displaystyle x=\frac{a}{b}$ and $b\neq 0$. Let $n\in\mathbb{Z}$ We have that \begin{equation*} \left(\frac{a}{b}\right)^n=\frac{a^n}{b^n} \end{equation*} Proof: We have that \begin{align*} \left(\frac{a}{b}\right)^n&=\left(a*b^{-1}\right)^n\\ &= \underbrace{\left(a b^{-1}\right)\left(a b^{-1}\right)\dots \left(a b^{-1}\right)}_{n \text{ times}}\\ &=\underbrace{a*a*a*\dots*a}_{n \text{ times}}*\underbrace{b^{-1}*b^{-1}*b^{-1}\dots*b^{-1}}_{n \text{ times}}\\ &= a^n \left(b^{-1}\right)^n\\ &=a^n*b^{-n}\\ &=\frac{a^n}{b^n} \end{align*} As required. $\qed$ \end{proposition} The rules of integer exponentiation extend when the base is rational. \begin{proposition}{Power law of exponentiation for positive exponents}\label{propRationalExponentiationPowerLaw} Let $x\in\mathbb{Q}$ and let $n,m\in \mathbb{Z}$. We have that \begin{equation*} \left(x^n\right)^m = x^{nm} \end{equation*} Proof: Let $\displaystyle x=\frac{a}{b}$ with $a,b\in\mathbb{Z}$ and $b\neq 0$. We have that \begin{align*} \left(x^n\right)^m&=\left(\left(\frac{a}{b}\right)^n\right)^m\\ &=\left(\frac{a^n}{b^n}\right)^m\\ &=\left(a^n*b^{-m}\right)^m\\ &=a^{nm}*b^{-nm}\\ &=\frac{a^{nm}}{b^{nm}}\\ &=x^{nm} \end{align*} $\qed$ \end{proposition} \begin{proposition}{Multiplying exponents of the same base adds the powers}\label{prop:RationalExponentiationOfSameBaseAddsPowers} Let $x\in\mathbb{Q}$ be a fixed integer and let $n,m\in\mathbb{Z}$. We have that \begin{equation*} x^n *x^m = x^{n+m} \end{equation*} Proof: Let $\displaystyle x=\frac{a}{b}$ with $a,b\in\mathbb{Z}$ and $b\neq 0$. Observe that \begin{align*} x^n*x^m&=\left(\frac{a}{b}\right)^n*\left(\frac{a}{b}\right)^m\\ &=\frac{a^n}{b^n}*\frac{a^m}{b^m}\\ &=\frac{a^n*a^m}{b^n*b^m}\\ &=\frac{a^{n+m}}{b^{n+m}}\\ &=\left(\frac{a}{b}\right)^{n+m}\\ &=x^{n+m} \end{align*} As required. $\qed$ \end{proposition} \begin{proposition}{Power of product is product of powers}\label{prop:RationalExponentiationPowerOfProductIsProductOfPowers} Let $x,y\in\mathbb{Q}$ and $n\in\mathbb{Z}$. Then \begin{equation*} \left(x*y\right)^n=x^n*y^n \end{equation*} Proof: Let $\displaystyle x=\frac{a}{b}$ with $a,b\in\mathbb{Z}$ and $b\neq 0$ and let $\displaystyle y=\frac{c}{d}$ with $c,d\in\mathbb{Z}$ and $d\neq 0$. We have \begin{align*} \left(x*y\right)^n&=\left(\frac{a}{b}*\frac{c}{d}\right)^n\\ &=\left(\frac{ac}{bd}\right)^n\\ &=\frac{\left(ac\right)^n}{\left(bd\right)^n}\\ &=\frac{a^n c^n}{b^n d^n}\\ &=\frac{a^n}{b^n}*\frac{c^n}{d^n}\\ \frac{}{} &=x^n*y^n \end{align*} \end{proposition} What about rational exponents? Can we assign meaning to expressions of the form $\displaystyle \wedge\left(\frac{a}{b},\frac{c}{d}\right)$? Using a similar argument to when we considered extending integer exponentiation. Suppose that proposition \ref{prop:RationalExponentiationOfSameBaseAddsPowers} holds for rational exponents. In particular we have for some $x\in\mathbb{Q}$ that \begin{equation*} x^{\frac{1}{2}}*x^{\frac{1}{2}}=x^1 \end{equation*} Now, suppose that $x=2$. We are hence saying that \begin{equation*} 2^{\frac{1}{2}}*2^{\frac{1}{2}}=2 \end{equation*} If we suppose that $\displaystyle 2^{\frac{1}{2}}\in\mathbb{Q}$ with say $\displaystyle y=2^{\frac{1}{2}}$ we are saying that $y^2=2$. Unfortunately, there is no such rational $y$ that satisfies this. Moreover, we lack the theory required to prove this at this time. This will be corrected in part \ref{part2}. \pagebreak \subsection{Extending the absolute value function} When we constructed the integers we recast the notion of size into that of distance. This was achieved using the so-called absolute value function given by \begin{equation*} \left|x\right|=d\left(x,0\right)=\begin{cases} x,\ \text{If } x\geq 0\\ -x,\ \text{If } x< 0 \end{cases} \end{equation*} where \begin{align*} d:\mathbb{Z}^2&\rightarrow\mathbb{N}\\ \left(x,y\right)&\mapsto d\left(x,y\right)=\begin{cases} x-y,\ \text{If } x\geq y\\ -\left(x-y\right),\ \text{If } x< y \end{cases} \end{align*} Now that we have constructed the rational numbers we can consider how this idea extends. One thing that is clear from the definition of $d$ for integers is that the smallest possible non-zero distance that can be achieved is $1$, for example, $d\left(2,1\right)$. However, consider \begin{equation*} 1-\frac{1}{2}=\frac{1}{2} \end{equation*} If this idea of distance is to extend to the rationals we will clearly have that distances smaller than $1$ are now possible. In other words, the mapping for $d$ when used with rational numbers can no longer map into $\mathbb{N}$. This is easily remedied by defining the following set. \begin{definition}{Positive rationals} We define the set of positive rationals by \begin{equation*} \mathbb{Q}^+=\left\{x\in\mathbb{Q}: x>0\right\} \end{equation*} \end{definition} It is clear from the definitions for the integers how to extend the distance function and the absolute value function to the rationals. \begin{definition}{Distance function for the rationals} Let $x,y\in\mathbb{Q}$. Define the function $d:\mathbb{Q}^2\rightarrow\mathbb{Q}^+$ by \begin{align*} d:\mathbb{Q}^2&\rightarrow\mathbb{Q}^+\\ \left(x,y\right)&\mapsto d\left(x,y\right)=\begin{cases} x-y,\ \text{If } x\geq y\\ -\left(x-y\right),\ \text{If } x< y \end{cases} \end{align*} \end{definition} As before we prove that this distance function is well-defined. \begin{proposition}{The distance function for the rationals is well-defined}\label{prop:RationalDistanceFuncWellDefined} Let $x,y\in\mathbb{Q}$. We have that \begin{equation*} d\left(x,y\right)=\begin{cases} x-y,\ \text{If } x\geq y\\ -\left(x-y\right),\ \text{If } x< y \end{cases} \end{equation*} is well-defined. Proof: Let $x,y\in\mathbb{Q}$. There are two cases to consider $x\geq y$ and $x0$ which is to say $-\left(x-y\right)\in\mathbb{Q}^+$ \end{enumerate} The result has been shown. $\qed$ \end{proposition} We can now generalise the absolute value function. \begin{definition}{Absolute value function} Let $x\in\mathbb{Q}$ we define the absolute value function, denoted by $\left|x\right|$ by the function \begin{equation*} \left|x\right|=d\left(x,0\right)=\begin{cases} x,\ \text{If } x\geq 0\\ -x,\ \text{If } x< 0 \end{cases} \end{equation*} \end{definition} We have generalised the idea of ``size'' to the rationals. We can now also generalise the properties of the absolute value function explored in the construction of the integers. \begin{proposition}{Properties of the absolute value} Let $x,y,z\in\mathbb{Q}$. We have that the absolute value function has the following properties \begin{enumerate} \item $\left|x\right|\geq 0$ for all $x\in\mathbb{Q}$ \item $\left|x\right|=0\iff x=0$ \item $\left|x-y\right|=0\iff x=y$ \item $\left|xy\right|=\left|x\right|\left|y\right|$ \item $\displaystyle \left|\frac{x}{y}\right|=\frac{\left|x\right|}{\left|y\right|}$ with $y\neq 0$ \item $\left|\left|x\right|\right|=\left|x\right|$ \item $\left|-x\right|=\left|x\right|$ \item $\left|x\right|\leq y \iff -y\leq x\leq y$ \item $\left|x\right|\geq y\iff x\leq -y$ or $x\geq y$ \item $\left|x+y\right|\leq \left|x\right|+\left|y\right|$ \item $\left|x-y\right|\leq\left|x-z\right|+\left|z-y\right|$ \item $\left|x-y\right|\geq \left|\left|x\right|-\left|y\right|\right|$ \item $\left|\cdot\right|$ is not injective \item $\left|\cdot\right|$ is not surjective \end{enumerate} Proof: \begin{enumerate} \item $\left|x\right|\geq 0$ for all $x\in\mathbb{Q}$: This follows by proposition \ref{prop:RationalDistanceFuncWellDefined}. \item $\left|x\right|=0\iff x=0$: We have by definition that $\left|x\right|=0$, if and only if $x=0$. \item $\left|x-y\right|=0\iff x=y$: $\left(\Rightarrow\right)$: Suppose that $\left|x-y\right|=0$. There are two cases to consider. Firstly if $x\geq y$, then by definition we have that $\left|x-y\right|=x-y=0$ from which we clearly have $x=y$. The other case is $x0}=\left|x\right| \end{equation*} \item $\left|-x\right|=\left|x\right|$: As $-x=-1 *x$ we have by part 4 that \begin{equation*} \left|-x\right|=\left|-1*x\right|=\left|-1\right|\left|x\right|=1*\left|x\right|=\left|x\right| \end{equation*} \item $\left|x\right|\leq y \iff -y\leq x\leq y$: $\left(\Rightarrow\right)$: Suppose that $\left|x\right|\leq y$. If $x\geq 0$ then we get that $\left|x\right|=x\leq y$. From this, it is clear that $-y\leq x\leq y$ as $x\geq 0$ and $x\leq y \Rightarrow y \geq 0$. Now if $x<0$, then $\left|x\right|=-x\leq y$. Clearly $x\leq -x$ as $x<0$ hence we conclude that $x\leq -x\leq y$. Now by part 18 of proposition \ref{prop:InequalityRationalNumbers} we have we have \begin{equation*} \left(-1\right)*\left(-x\right)\geq \left(-1\right)\left(y\right) \iff x\geq -y \end{equation*} Now $x\geq -y$ is the same as $-y\leq x$ and so we have $-y\leq x\leq -x \leq y$. Hence $-y\leq x\leq y$. $\left(\Leftarrow\right)$: Suppose that $-y\leq x\leq y$. There are two cases to consider. \begin{enumerate} \item $x\geq 0$ \item $x<0$ \end{enumerate} \begin{enumerate} \item $x\geq 0$: Suppose $x\geq 0$, then clearly as $x\leq y$ then $\left|x\right|\leq \left|y\right|=y$. Moreover, we have that $-y\leq x$ is the same $x\geq -y$ and by part 22. of proposition \ref{prop:InequalityIntegerNumbers} when applied to $x\geq -y$ gives \begin{equation*} \left(-1\right)*\left(x\right)\leq \left(-1\right)\left(-y\right) \iff -x\leq y \end{equation*} We have that $\left|-x\right|=\left|x\right|$ by part 6. Hence $\left|-x\right|=\left|x\right|\leq \left|y\right|=y$. \item $x<0$: Suppose $x<0$. By assumption $x\leq y$ so either $y\geq 0$ or $y< 0$. We can't have $y<0$ as for example take $x=-4$ and $y=-2$ then we would have $2\leq -4\leq -2$ a contradiction. So suppose that $y\geq 0$ then as $x\leq y$ we have $\left|x\right|\leq\left|y\right|=y$. Now as $-y\leq x$ by assumption we have that $x\geq -y$ and so part 22. of proposition \ref{prop:InequalityRationalNumbers} gives \begin{equation*} \left(-1\right)*\left(x\right)\leq \left(-1\right)\left(-y\right) \iff -x\leq y \end{equation*} Hence part 6. applies and we get that $\left|x\right|\leq y$ \end{enumerate} \item $\left|x\right|\geq y\iff x\leq -y$ or $x\geq y$: $\left(\Rightarrow\right)$: Suppose that $\left|x\right|\geq y$. If $x\geq 0$ then $\left|x\right|=x\geq y$. So suppose that $x<0$ then by definition we have that $\left|x\right|=-x$ and so $-x\geq y$ and the result follows when applying part 22. of proposition \ref{prop:InequalityRationalNumbers}. $\left(\Leftarrow\right)$: Suppose that either $x\leq -y$ or $x\geq y$. We have three cases to consider. \begin{enumerate} \item $x\leq -y$ \item $x\geq y$ \item $x\leq -y$ and $x\geq y$ \end{enumerate} \begin{enumerate} \item $x\leq -y$: Suppose that $x\leq -y$ holds. If $x\geq 0$ then we have that $-y\geq 0$, Hence $y<0$. Moreover, we have that by part 18. of proposition \ref{prop:InequalityRationalNumbers} that \begin{equation*} \left(-1\right)*\left(x\right)\geq \left(-1\right)\left(-y\right) \iff -x\geq y \end{equation*} Now part 6. applies and we see that $\left|-x\right|=\left|x\right|\geq\left|y\right|=y$. This is to say $\left|x\right|\geq y$. Now suppose that $x<0$. Then as $x\leq -y$ we have that either $-y\geq 0$ or $-y<0$. In the former case $-y\geq 0$ gives $y<0$. Hence by part 18. of proposition \ref{prop:InequalityRationalNumbers} we conclude that \begin{equation*} \left(-1\right)*\left(x\right)\geq \left(-1\right)\left(y\right) \iff -x\geq y \end{equation*} As $x<0$ then $-x\geq 0$. The result follows when taking the absolute value. Now suppose that $-y<0$ then $y\geq 0$. Following similar logic to the previous case, we see that \begin{equation*} \left(-1\right)*\left(x\right)\geq \left(-1\right)\left(y\right) \iff -x\geq y \end{equation*} The result again follows after taking the absolute value. \item $x\geq y$: This case is trivial. \item $x\leq -y$ and $x\geq y$: Suppose that $x\leq -y$ and $x\geq y$ are both true. We know by the first case that $x\leq -y$ gives $\left|x\right|\geq y$ and $x\leq y$ also implies $\left|x\right|\geq y$ by the second case. Hence both inequalities being true at the same time implies the result $\left|x\right|\geq y$. \end{enumerate} \item $\left|x+y\right|\leq \left|x\right|+\left|y\right|$: Let $x,y\in\mathbb{Q}$. There are four cases to consider. \begin{enumerate} \item $x\geq 0$ and $y\geq 0$ \item $x\geq 0$ and $y\leq 0$ \item $x\leq 0$ and $y\geq 0$ \item $x\leq 0$ and $y\leq 0$ \end{enumerate} \begin{enumerate} \item $x\geq 0$ and $y\geq 0$: Suppose $x\geq 0$ and $y\geq 0$, then we have that \begin{equation*} \left|x+y\right|=x+y=\left|x\right|+\left|y\right|\Rightarrow \left|x+y\right|\leq\left|x\right|+\left|y\right| \end{equation*} \item $x\geq 0$ and $y\leq 0$ By assumption we have that $\left|x\right|=x$ and $\left|y\right|=-y$. We have two cases based on the absolute value, $\left|x\right|\leq\left|y\right|$ and $\left|x\right|\geq\left|y\right|$. So suppose that $\left|x\right|\leq\left|y\right|$ then by definition $x\leq -y$ and so by part 12. of proposition \ref{prop:InequalityRationalNumbers} we have that \begin{equation*} x\leq -y \Rightarrow x+y\leq 0 \end{equation*} Moreover, as $x\geq 0$ then $y\leq x+y\leq 0$. Hence we have by the definition of the absolute value that \begin{equation*} \left|x+y\right|=-\left(x+y\right)\leq -y=\left|y\right| \end{equation*} As $-y>0$. In the case $\left|x\right|\geq\left|y\right|$ we have by definition that $x\geq -y$ and so $x+y\geq 0$. Additionally it is clear that $x\geq x+y$ as $y\leq 0$ and $\left|x\right|\geq\left|y\right|$. Hence by definition of the absolute value we have that \begin{equation*} \left|x+y\right|=x+y\leq x=\left|x\right| \end{equation*} Now, it is clear to see that $\left|x\right|\leq \left|x\right|+\left|y\right|$ and likewise $\left|y\right|\leq \left|x\right|+\left|y\right|$. We have hence shown that $\left|x+y\right|leq\left|x\right|+\left|y\right|$. \item $x\leq 0$ and $y\geq 0$: This is similar to above, interchanging the roles of $x$ and $y$. \item $x\leq 0$ and $y\leq 0$: Suppose that $x\leq 0$ and $y\leq 0$ then by definition we have that $\left|x+y\right|=-\left(x+y\right)=-x-y$. As $x\leq 0$ and $y\leq 0$ then we have that and $\left|y\right|=-y$ which shows $\left|x+y\right|=\left|x\right|+\left|y\right|\leq\left|x\right|+\left|y\right|$ \end{enumerate} \item $\left|x-y\right|\leq\left|x-z\right|+\left|z-y\right|$: We have that \begin{align*} \left|x-y\right|&=\left|x-\left(z-z\right)-y\right|\\ &=\left|x-z+z-y\right|\\ &\leq \left|x-z\right|+\left|z-y\right| \end{align*} \item $\left|x-y\right|\geq \left|\left|x\right|-\left|y\right|\right|$: We have that \begin{align*} \left|x\right|&=\left|\left(x-y\right)+y\right|\leq \left|x-y\right|+\left|y\right| \Rightarrow \left|x\right|-\left|y\right|\leq \left|x-y\right|\\ \left|y\right|&=\left|\left(y-x\right)+x\right|\leq \left|x-y\right|+\left|x\right| \Rightarrow \left|y\right|-\left|x\right|\leq \left|x-y\right|\\ \end{align*} Hence we have \begin{align*} \left|x\right|-\left|y\right|\leq \left|x-y\right| &\Rightarrow \left|\left|x\right|-\left|y\right|\right|\leq \left|x-y\right|\\ \left|y\right|-\left|x\right|=\left(-1\right)\left(\left|x\right|-\left|y\right|\right)\leq \left|x-y\right| &\Rightarrow \left|\left|x\right|-\left|y\right|\right|\leq \left|x-y\right|\\ \end{align*} Hence we have the result. \item $\left|\cdot\right|$ is not injective: This follows as the absolute value function was not injective for the integers \item $\left|\cdot\right|$ is not surjective: This follows as the absolute value function was not surjective for the integers \end{enumerate} As required. $\qed$ \end{proposition} \pagebreak \part{Elementary Number Theory}\label{part2} \setcounter{section}{0} \section{Introduction} \epigraph{Mathematics is the queen of the sciences and Number Theory is the queen of mathematics.}{\textit{Carl Friedrich Gauss}} In the previous part, we have gone from only having the axioms of ZFC, the rules of logic and knowledge of mappings and have built two types of numbers, the naturals and the integers. Unfortunately, we need to make a detour from constructing new objects. We need to start using the objects we have constructed to provide a guide on how to proceed with building more mathematical objects. We will start with Number Theory. Number Theory primarily deals with the properties of the integers $\mathbb{Z}$ as well as mappings defined on $\mathbb{Z}$. This includes properties about the operations on the integers, properties about the compositions and ways of expressing relationships between certain ``types'' of integers, solving equations involving the integers and more. The applications of Number Theory to the modern world are numerous. One main example of the usage of Number Theory is encryption, the art of obfuscating information so that it can only be read by trusted individuals\footnote{Until someone manages to find a way to get past the elegant mathematics of the encryption scheme!}. We will later consider an example of encryption called RSA. Additionally, the ideas that we will develop when studying Number Theory are key to providing crucial insights into other branches of mathematics. We will come to see that many of the key properties of the integers are also enjoyed by many other types of mathematical objects, especially in an abstract setting. \section{Divisibility}\epigraph{Now where there are no parts, neither extension, shape, nor divisibility is possible. And these monads are the true atoms of nature and, in a word, the elements of things.}{\textit{Gottfried Leibniz}} \subsection{Definition of divisibility of integers} Although we have a concrete construction of the integers, we haven't even discussed some of their most basic properties! We know how to add, subtract and multiply them, but we don't know how to divide them without the rational numbers $\mathbb{Q}$. It is with $\mathbb{Q}$ that we can hope to find a rule that says that $\displaystyle\frac{a}{b}\in\mathbb{Z}$ for some $a,b\in\mathbb{Z}$. Recall that in $\mathbb{Q}$ we defined an equivalence relation $\sim$ so that for $\left(a,b\right),\left(c,d\right)\in\mathbb{Z}^2$ we have that \begin{equation*} \left(a,b\right)\sim\left(c,d\right)\iff ad=bc \end{equation*} where we had $b\neq 0$ and $d\neq 0$. We also saw that $\left(x,1\right)\in\left[\left(x,1\right)\right]$ represented an integer. Hence the question we are resolving is when does $\left(a,b\right)\sim\left(x,1\right)$. We have that \begin{equation*} \left(a,b\right)\sim\left(x,1\right)\iff a=bx \end{equation*} That is $b$ divides $a$ and gives an integer if and only if $a=bx$. We make this our first formal definition in the field of Number Theory. \begin{definition}{Integer divisibility}\label{def:NT_Int_Div_def} Let $a,b\in\mathbb{Z}$ with $b\neq 0$. We say that $a$ is divisible by $b$, or $b$ divides $a$, written as $b\divides a$ if and only if $\exists c\in\mathbb{Z}$ so that $a=bc$. We say that $b$ is a divisor of $a$. If $b$ does not divide $a$ we write $b\not\notdivides a$. \end{definition} \begin{example} \item We have that $3\divides 6$ as $6=3*2$. \item Obverse that $2\notdivides 3$. Indeed there is no integer $x$ so $3=2x$. \end{example} We make a definition based on the definition of divisibility. Namely based on if a number can be divided into two equal parts. \begin{definition}{Even number} Let $x\in\mathbb{Z}$. We say that $x$ is even if we have that $2\divides x$. \end{definition} This immediately gives another definition. \begin{definition}{Odd number} Let $x\in\mathbb{Z}$. We say that $x$ is odd if we have that $2\notdivides x$. \end{definition} We can make another definition, based on divisibility. \begin{definition}{Integer multiple} Let $a,b\in\mathbb{Z}$ so that $b\divides a$. We say that $b$ is a multiple of $a$. \end{definition} There are two results that we can derive based on an even number, an odd number and integer multiples. \begin{proposition}{Integer is even if it is a multiple of 2}\label{prop:NT_even_iff_2n} Let $x\in\mathbb{Z}$. We have that $x$ is even if and only if $x$ is a multiple of $2$. Proof: $\left(\Rightarrow\right):$ Suppose that $x$ is even, then by definition we have that $2\divides x$ and so by the definition of divisibility we have that $x=2c$ for some $c\in\mathbb{X}$. By the definition of being an integer multiple we have that $x$ is a multiple of $2$. $\left(\Leftarrow\right):$ Suppose that $x$ is a multiple of $2$. By definition of being an integer multiple, we have that $x=2r$ for some $r\in\mathbb{Z}$. Hence by the definition of divisibility, we have that $2\divides x$ and so by definition of an even number we have that $x$ is even. $\qed$ \end{proposition} We can find a similar proposition for odd numbers. Observe that by the previous proposition that $x$ being even means that $x=2n$ for some integer $n$. Also, we have that $2n+2=2\left(n+1\right)$ is even, so what can we say about $2n+1$? \begin{proposition}{Integer is odd if and only if it is not a multiple of 2} Let $x\in\mathbb{Z}$. We have that $x$ is odd if and only if $x$ is not a multiple of 2. Proof: The proof follows by the contra-positive, that is $x$ is a multiple of 2 if and only if $x$ is even, which is the previous proposition. $\qed$ \end{proposition} Hence we need to determine if $2n+1$ is even or odd. We need to develop the theory of divisibility. The definition of divisibility gives an immediate result. Namely that when considering the divisibility of integers we need only concern ourselves with positive integers, as negative integers will also be divisors. That is if $b\divides a$ then so does $-b$. \begin{proposition}{Integer dividing another implies negative integer also divides}\label{prop:NT_PositiveAndNegativeDivisorsForIntsExist} Let $a,b\in\mathbb{Z}$ with $b\divides a$. We also have that $-b\divides a$. Proof: Let $a,b\in\mathbb{Z}$ with $b\divides a$. By definition of divisibility, we have that $\exists c\in\mathbb{Z}$ so that $a=bc$. We know that $-1*1=1$ and so we have that \begin{equation*} a=bc=\left(-1*-1\right)bc=-b*-c \end{equation*} As $-c\in\mathbb{Z}$ then it follows by definition that $-b\divides a$. $\qed$ \end{proposition} Hence by proposition \ref{prop:NT_PositiveAndNegativeDivisorsForIntsExist} we will restrict our view to positive divisors only, knowing that any results about a positive divisor will extend to negative divisors. One clear divisor of any integer $a$ is itself, that is $a\divides a$ as $a=a*1$. We will find it interesting to consider the more non-trivial divisors of some integers. Hence we make the following definition \begin{definition}{Proper divisor} Let $a,b\in\mathbb{Z}$ with $b\divides a$. If we have that $00$ and $b>0$ implies that $a\leq b$. \item If $m\in\mathbb{Z}$ is such that $m\neq 0$ then $a\divides b$ is true if and only if $ma\divides mb$. \item For all $a\in\mathbb{Z}$ with $a\neq 0$ we have $a\divides 0$ \end{enumerate} Proof: \begin{enumerate} \item $a\divides b \Rightarrow a\divides bc$ for any $c\in\mathbb{Z}$: \item $a\divides b$ and $b\divides c$ implies that $a\divides c$: Suppose that $a\divides b$, then by definition there exists $d\in\mathbb{Z}$ so that $b=ad$. Hence we have that \begin{equation*} bc=adc \Rightarrow a\divides bc \end{equation*} as $dc\in\mathbb{Z}$. \item $a\divides b$ and $a\divides c$ implies that $a\divides\left(bx+cy\right)$ for any $x,y\in\mathbb{Z}$: Suppose that $a\divides b$ and $b\divides c$, then by the definition of divisibility, and by part 1., we have that $b=ax$ and $c=by$ for all $x,y\in\mathbb{Z}$. We hence see that \begin{equation*} c=axy \end{equation*} Hence as $xy\in\mathbb{Z}$ then we conclude that $a\divides c$. \item $a\divides b$ and $b\divides a$ implies $a=\pm b$, that is either $a=b$ or $a=-b$: Let $a\divides b$ and $a\divides c$, then there are $d,e\in\mathbb{Z}$ such that $b=ad$ and $c=ae$. Now, let $x,y\in\mathbb{Z}$ then we have that $bx=adx$ and $cy=aey$ and $bx+cy=adx+aey=a\left(dx+ey\right)$. Hence $a\divides \left(bx+cy\right)$. \item $a\divides b$ and $a>0$ and $b>0$ implies that $a\leq b$: If $a\divides b$ then $\exists x\in\mathbb{Z}$ so that $b=ax$, likewise if $b\divides a$ then $\exists y\in\mathbb{Z}$ so that $a=by$. It follows that $b=byx$. We have that $b=byx$ is true if and only if $yx=1$. Therefore either $x=y=1$ or $x=y=-1$. The result is clear after substituting $y$ into $a=by$. \item If $m\in\mathbb{Z}$ is such that $m\neq 0$ then $a\divides b$ is true if and only if $ma\divides mb$: $\left(\Rightarrow\right)$: Let $m\in\mathbb{Z}$ be non-zero and let $a\divides b$. By definition, there is some $c\in\mathbb{Z}$ so that $b=ac$. Multiplying both sides by $m$ gives \begin{equation*} bm=acm=amc \end{equation*} and so $am\divides bm$. $\left(\Leftarrow\right):$ Suppose that $am\divides bm$, then again by the definition of divisibility we have that there is some $c\in\mathbb{Z}$ so that $bm=amc$. By the cancellation law, we can cancel the $m$ to get $b=ac$ and the result follows. \item For all $a\in\mathbb{Z}$ with $a\neq 0$ we have $a\divides 0$: Let $a\in\mathbb{Z}$, where $a\neq 0$. We have that $0=ka$ has the solution $k=0$ by part I proposition \ref{prop:IntegersHaveNoZeroDivisors}. Hence $a\divides 0$. \end{enumerate} As required. $\qed$ \end{proposition} Part 3. of the previous proposition can be generalised. We will work with an example to see how this can be achieved. \begin{example} Let $a=2$, $b=16$ and $c=32$. Clearly we have that $a\divides b$ as $16=4*2$ and likewise $a\divides c$ as $32=5*2$. Now part 3. states that if $a\divides b$ and $a\divides c$ then we must have that $a\divides \left(bx+cy\right)$ for any $x,y\in\mathbb{Z}$. Indeed, for example, we can see that $2\divides \left(-5\left(16\right)+7\left(32\right)\right)$. As $-5\left(16\right)+7\left(32\right)=-80+224=144$. Now suppose that $d=64$ and say $z=5$. We can see that \begin{equation*} -5\left(16\right)+7\left(32\right)+5\left(64\right)=144+320=464 \Rightarrow 2\divides \left(-5\left(16\right)+7\left(32\right)+5\left(64\right)\right) \end{equation*} \end{example} We prove the general statement now. \begin{proposition}{Divisor that divides a set of integers divides a combination of the set}\label{prop:NT_Divisor_dividing_all_in_set_divides_linear_combination} Let $a\in\mathbb{Z}$ and let $S=\left\{b_1,b_2,b_3,\dots,b_n\right\}$ be a set of $n$ integers where $b_i\in\mathbb{Z}$ for each $b_i$. Moreover suppose that $a\divides b_i$ for each $b_i\in S$. We have that \begin{equation*} a\divides \sum_{i=1}^n b_i x_i \end{equation*} for any $x_i\in\mathbb{Z}$. Proof: We argue by induction on $n$. The base case is $n=2$ which is shown in proposition \ref{prop:NT_divisibility_properties}. So suppose that the result holds for some $k\geq 1$, which is to say that if $S=\left\{b_1,b_2,\dots,b_k\right\}$ and we have that $a\divides b_i$ for each $b_i\in S$ then \begin{equation*} a\divides \sum_{i=1}^k b_i x_i \end{equation*} We need to show that the result holds for $k+1$. That is if $\Tilde{S}=S\cup \left\{b_{k+1}\right\}$ so that $a\divides b_i$ for each $b_i\in\Tilde{S}$ then \begin{equation*} a\divides \sum_{i=1}^{k+1} b_i x_i \end{equation*} So take $\Tilde{S}=S\cup \left\{b_{k+1}\right\}$ so that $a\divides b_i$ for each $b_i\in\Tilde{S}$. By applying part 1. of proposition \ref{prop:NT_divisibility_properties} to each $a\divides b_i$ we know that for all $x_i\in\mathbb{Z}$ that $a\divides b_ix_i$. Now, by the induction hypothesis we know that $\forall b_i\in S$ that $a\divides b_i$ and moreover we have that \begin{equation*} a\divides \sum_{i=1}^k b_i x_i \end{equation*} Let $\displaystyle d=\sum_{i=1}^k b_i x_i$. Again by part 1 of proposition \ref{prop:NT_divisibility_properties} we have that $a\divides ad$. Additional we know that $a\divides b_{k+1}$ and so by part 3. of \ref{prop:NT_divisibility_properties}, As $d\in\mathbb{Z}$, we have that \begin{align*} a &\divides \left(1*d + b_{k+1}x_{k+1}\right)\\ a &\divides \left(\sum_{i=1}^k b_i x_i + b_{k+1}x_{k+1}\right)\\ a &\divides \left(\sum_{i=1}^{k+1} b_i x_i\right)\\ \end{align*} Which implies the result holds for $k+1$ and hence for any $n\in\mathbb{N}$ by induction. $\qed$ \end{proposition} \subsection{The greatest common divisor and the least common multiple} Now that we have a solid grasp of the basics of integer divisibility, we can start looking towards some applications. One immediate question is given a set of integers say \begin{equation*} S=\left\{a_1,a_2,a_3,\dots,a_n\right\} \end{equation*} What is the largest integer which divides each $a_i\in S$. and what is the largest integer $m$ so that $m$ has each $a_i\in S$ as a proper divisor? An immediate use of these two ideas is very useful when doing arithmetic with rational numbers. For example, consider trying to simplify the fraction $\displaystyle\frac{525}{2925}$. To simplify this we need to find the integers that multiply to make $525$ and those that multiply to make $2925$. If there are any in common then we know from the construction of the rationals that $\displaystyle \frac{x}{x}=1$ and in particular we have that $\displaystyle\frac{xy}{xz}=\frac{y}{z}*\frac{x}{x}=1$. Likewise suppose we wanted to add $\displaystyle\frac{1}{4}$ and $\displaystyle\frac{1}{7}$. It is true that by definition of addition, we would have \begin{equation*} \frac{1}{4}+\frac{1}{7}=\frac{1*7+1*4}{7*4}=\frac{7+4}{7*4}=\frac{11}{28} \end{equation*} The key stage was $\displaystyle\frac{1*7+1*4}{7*4}$, breaking this down we see that \begin{equation*} \frac{1*7+1*4}{7*4}=\frac{1*7}{7*4}+\frac{1*4}{7*4} \end{equation*} In other words, we are finding a multiple in common with $7$ and $4$ to turn the denominator into. It is therefore worthwhile to work out the theory of working out common divisors and common multiples. We will start by working out common divisors, by first making a definition. \begin{definition}{Common divisor} Let $a,b,c\in\mathbb{Z}$ be non-zero integers. We say that $c$ is a common divisor of $a$ and $b$ if $c\divides a$ and $c\divides b$. \end{definition} \begin{example} Consider the integers $35$ and $25$. The divisors of $35$ are $1$, $5$ and $7$ and $35$, likewise the divisors of $25$ are $1$ and $5$ and $25$. The largest common divisor is therefore 5. \end{example} \begin{example} Consider the integers $24$ and $54$. Doing the same as before, we can see that the divisors of $24$ are $1$, $2$, $3$, $4$, $6$, $8$, $12$ and $24$. Looking at the divisors of $54$ we see that they are $1$, $2$, $3$, $6$, $9$, $18$, $27$ and $54$. The common divisors of $24$ and $54$ are therefore $1$, $2$, $3$ and $6$, \end{example} \begin{example} Consider the common divisors of $3$ and $5$. The divisors of $3$ are simply $1$ and $3$, likewise the divisors of $5$ are $1$ and $5$. The only common divisor is $1$. \end{example} We can see from the previous examples that there was a largest, or greatest common divisor between the pairs of integers in each case. We can show that for any two integers, there is always a greatest common divisor. \begin{theorem}{The greatest common divisor of two integers exists}\label{thm:NT_gcd_exists} Let $a,b\in\mathbb{Z}$ so that $a\neq 0$ or $b\neq 0$. Then there exists $d\in\mathbb{Z}$ so that $d$ is the largest possible common divisor, that is there is no $g\in\mathbb{Z}$ with $g>d$ so that $g\divides a$ and $g\divides b$. Proof: Firstly, we note that as $1\divides a$ and $1\divides b$, the largest possible common divisor is at least 1, proving existence. To show that there is the largest possible common divisor we must show that this divisor can't exceed some integer, say $M$, where $M$ depends on $a$ and $b$. Moreover by proposition \ref{prop:NT_PositiveAndNegativeDivisorsForIntsExist} we only need to consider the case where $a\geq 0$ and $b\geq 0$. So. suppose that $c\divides a$ and $c\divides b$ for some $c\geq 1$. By part 5. of proposition \ref{prop:NT_divisibility_properties} we have that as $c\divides a$ then $c\leq a$, likewise as $c\divides b$ then $c\leq b$. There are three possibilities to consider \begin{enumerate} \item $a=b$ \item Without any loss of generality we have $aa$ a contradiction to the fact that $c\leq a$ as $c\divides a$. \item One of $a=0$ or $b=0$ but not both at the same time: Suppose that $a=0$ and $b\neq 0$, then we have that for all $M\in\mathbb{Z}$ that $M\divides a$, but as $c\divides b$ then $c\leq b$ and so we take $M=b$ as $b\divides b$. Likewise if we assume $b=0$ and $a\neq 0$. \end{enumerate} In each case we found a $M$ so that if we take $c\leq M$ then $c\divides a$ and $c\divides b$. \end{theorem} We have shown that the for any two integers a greatest common divisor always exists. We can make a formal definition. \begin{definition}{Greatest common divisor} Let $a,b\in\mathbb{Z}$ so that $a\neq 0$ and $b\neq 0$. Let $d\in\mathbb{Z}$ be such that $d\divides a$ and $d\divides b$. We say the largest value of $d$ where $d\divides a$ and $d\divides b$ is the greatest common divisor of $a$ and $b$, denoted $d=\Gcd\left(a,b\right)$, sometimes written $\gcd\left(a,b\right)$ and in some texts simply by $\left(a,b\right)$. As $a\divides 0$ for any integer $a$. We define $\Gcd\left(a,0\right)=a$, similarly $\Gcd\left(0,b\right)=b$. \end{definition} We will use the notation $\Gcd$ in this text and we will usually abbreviate saying the greatest common divisor to $\Gcd$. Although we have proved that the greatest common divisor exists, we do not yet actually have a method of calculating what it is other than trying through trial and error. To see how we can attempt to construct a method of finding $\Gcd$ we should look to cases where integer division does not fail and to cases where it does fail. \begin{example} It is clear that $2\notdivides 3$ as there is no integer $x$ so that $3=2x$. If we take $x=1$ we get the false equality of $3=2$, if we take $x=2$ we get another false equality of $3=4$. We observe however that $3=2*1+1$. \end{example} \begin{example} Let $a=25$ and $b=7$. It is clear that $b\notdivides a$. The first couple multiples of $7$ are $7=7*1$, $14=7*2$, $21=7*3$, $28=7*4$ and so on. However, we can see that $25=7*3+4$. \end{example} \begin{example} Let $a=36$ and $b=12$. Clearly that $b\divides a$ as $36=12*3$. The first couple multiples of $7$ are $7=7*1$, $14=7*2$, $21=7*3$, $28=7*4$ and so on. \end{example} \begin{example} This time, let $a=8$ and $b=2$. Then we have that $2\divides 8$ as $8=2*4$. In a similar way to the previous examples we see that $8=2*4+0$ \end{example} If we let $a,b\in\mathbb{Z}$ so that $b\notdivides a$ then, in the previous examples it seems that we can always find a multiple of $b$ so that $bx\leq a$ for some $x\in\mathbb{Z}$ and in particular we have that \begin{equation*} a=bx+\left(a-bx\right) \end{equation*} In the case that $b\divides a$ then $a-bx=0$. Interpreting what $a-bx$ means, when $b\notdivides a$ then $a-bx\neq 0$ and when $b\divides a$ we had that $a-bx=0$. Hence $a-bx\neq 0$ is a measure of how far off we are from having $b\divides a$. This is to say that if $a-bx>0$ then we are a little short of making a multiple of $a$ from $b$ and if $a-bx<0$ we are a little over of making a multiple of $a$ from $b$. In general, we can see that any integer division can be viewed in this way, that is if $a,b\in\mathbb{Z}$ we can see the result of $a$ divided by $b$ in the form $a=qb+r$ for some $q,r\in\mathbb{Z}$. \begin{theorem}{The division algorithm}\label{thm:NT_divAlg} Let $a,b\in\mathbb{Z}$ so that $b> 0$, then there exist $q,r\in\mathbb{Z}$ with $q,r$ being unique so that \begin{equation*} a=bq+r \end{equation*} where $0\leq r < b$ Proof: There are three cases to consider \begin{enumerate} \item $a=b$ \item $ab$ \end{enumerate} \begin{enumerate} \item $a=b$: If $a=b$ then $b\divides a$ holds trivially and we see that $a=1*b+0$ where $q=1$ and $r=0$. \item $ab$: This case is the meat of the theorem. To prove the division theorem we will argue by induction on $a$. The base case is $a=1$ where we either have $a=b$ or $a1$. Likewise in the base case, we only need to consider the case of $k+1>b$, or equivalently $b0$ then $q_2-q_1=0$ giving $q_2=q_1$. $\qed$ \end{theorem} Based on this theorem we make a definition. \begin{definition}{Quotient and remainder} Let $a,b\in\mathbb{Z}$ so that $b>0$. We have by the division algorithm that \begin{equation*} a=qb+r \end{equation*} where $q,r\in\mathbb{Z}$ and $0\leq r < b$. We say that $q$ is the quotient of the division and that $r$ is the remainder. \end{definition} In the theorem, we assumed that $b>0$. However by proposition \ref{prop:NT_PositiveAndNegativeDivisorsForIntsExist} we know that negative divisors are also valid. To resolve this we reformulate theorem \ref{thm:NT_divAlg} so that $0\leq r <\left|b\right|$. \begin{theorem}{The division algorithm (Extended)}\label{thm:NT_divAlg_ext} Let $a,b\in\mathbb{Z}$ so that $b\neq 0$, then there exist $q,r\in\mathbb{Z}$ with $q,r$ being unique so that \begin{equation*} a=bq+r \end{equation*} where $0\leq r < \left|b\right|$ Proof: By the division algorithm, theorem \ref{thm:NT_divAlg} we have for $\left|a\right|$ and $\left|b\right|$ that there exist unique $q,r\in\mathbb{Z}$ so that \begin{equation*} \left|a\right|=q\left|b\right|+r \end{equation*} where $0\leq r<\left|b\right|$. There are a few cases to consider. \begin{enumerate} \item $r=0$ \item $r>0$ and $a\geq 0$ \item $r>0$ and $a<0$ \end{enumerate} \begin{enumerate} \item $r=0$: If $r=0$, then $\left|a\right|=q\left|b\right|$ and so by the properties of the absolute value we have that $a=\pm qb$, hence $a=b\left(\pm q\right)$ and we have the result. \item $r>0$ and $a\geq 0$: Now suppose $r>0$ and $a\geq 0$. We hence have that $a=q\left|b\right|+r$ which gives \begin{align*} a&=bq+r,\ \text{If } b>0\\ a&=\left(-b\right)q+r,\ \text{If } b<0\\ \end{align*} The first is simply the first version of the division algorithm and the second can be written as $a=b\left(-q\right)+r$ which gives the result. \item $r>0$ and $a<0$: Finally if $r>0$ and $a<0$ then we have \begin{equation*} -a=\left|b\right|q+r \Rightarrow a=-\left|b\right|q-r \end{equation*} This is a problem as it would give a negative remainder. We can employ a trick that doesn't change the value of $a$ but allows us to express $a=-\left|b\right|q-r$ in a more suitable form. \begin{align*} a&=-\left|b\right|q-r\\ a&=-\left|b\right|q+\left(\left|b\right|-\left|b\right|\right)-r\\ a&=-\left|b\right|q+\left|b\right|+\left(\left|b\right|r\right)\\ a&=\left|b\right|\left(-1-q\right)+\left(\left|b\right|r\right)\\ \end{align*} By assumption we have that $00$ and for $b<0$ we write $q'=1+q$. \end{enumerate} This completes the proof. $\qed$ \end{theorem} We can now go back to a problem from the first section, namely showing that $2n+1$ must be odd \begin{proposition}{Integer is odd if and only if it is a multiple of $2n+1$}\label{prop:NT_Odd_iff_2n+1} Let $x\in\mathbb{Z}$. We have that $x$ is odd if and only if it is a multiple of $2n+1$ where $x=2n+1$ for $n\in\mathbb{Z}$. Then $n$ is odd. Proof: Suppose $x\in\mathbb{Z}$, then by the division algorithm we have that \begin{equation*} x=2q+r \end{equation*} where $0\leq r< \left|2\right|$. Hence the only remainders possible are $r=0$ or $r=1$. Hence either $x=2q$ or $x=2q+1$. In the first case we have $x=2q$ is even by definition. In the case $x=2q+1$ we have that $2\notdivides 2n+1$ and so $x$ can't be even by definition. It follows that $x$ is odd. $\qed$ \end{proposition} With this proposition and proposition \ref{prop:NT_even_iff_2n} we can derive the evenness or oddness when adding or multiplying even or odd integers. \begin{proposition}{Even and oddness for addition and multiplication} Let $x,y\in\mathbb{Z}$. We have that \begin{enumerate} \item If $x$ is even and $y$ is even then $x+y$ is even and $xy$ is even. \item If $x$ is even and $y$ is odd then $x+y$ is odd and $xy$ is even. \item If $x$ is odd and $y$ is even then $x+y$ is odd and $xy$ is even. \item If $x$ is odd and $y$ is odd then $x+y$ is even and $xy$ is odd. \end{enumerate} Proof: \begin{enumerate} \item If $x$ is even and $y$ is even then $x+y$ is even and $xy$ is even: Suppose that $x$ and $y$ are even, then by proposition \ref{prop:NT_even_iff_2n} we have $x=2n$ for some $n\in\mathbb{Z}$ and $y=2m$ for some $m\in\mathbb{Z}$. We have that $x+y=2n+2m=2\left(n+m\right)$ hence $x+y$ is even by proposition \ref{prop:NT_even_iff_2n}. Likewise, we have that $xy=2n*2m=2\left(n*m\right)$ and therefore even. \item If $x$ is even and $y$ is odd then $x+y$ is odd and $xy$ is odd: Suppose that $x$ is even and $y$ is odd. By we have that $x=2n$ for some $n\in\mathbb{Z}$ by \ref{prop:NT_even_iff_2n} and by proposition \ref{prop:NT_Odd_iff_2n+1} we have that $y=2m+1$ for some $m\in\mathbb{Z}$. We have $x+y=2n+2m+1-2\left(n+m\right)+1$ and so $x+y$ is odd by proposition \ref{prop:NT_Odd_iff_2n+1}. Additionally, $xy=2n\left(2m+1\right)=2\left(2mn+n\right)$ and so by proposition \ref{prop:NT_even_iff_2n} we have that $xy$ is even. \item If $x$ is odd and $y$ is even then $x+y$ is odd and $xy$ is even: Similar to above, swapping the roles of $x$ and $y$. \item If $x$ is odd and $y$ is odd then $x+y$ is even and $xy$ is odd: By proposition \ref{prop:NT_Odd_iff_2n+1} we have that $x=2n+1$ for some $n\in\mathbb{Z}$ and $y=2m+1$ for some $m\in\mathbb{Z}$. Now, $x+y=\left(2n+1\right)+\left(2m+1\right)=2\left(n+m\right)+2=2\left(\left(n+m\right)+1\right)$. So by proposition \ref{prop:NT_even_iff_2n} we have $x+y$ is even. Finally, $xy=\left(2n+1\right)\left(2m+1\right)=4nm+2n+2m+1=2\left(2nm+\left(n+m\right)\right)+1$ and so by proposition \ref{prop:NT_Odd_iff_2n+1} is odd. \end{enumerate} As required. $\qed$ \end{proposition} Continuing with our quest to find a method to compute the greatest common divisor. At first, it might seem that we haven't made much progress in finding a way to calculate the $\Gcd$. However, consider the following examples. \begin{example} Consider $a=56$ and $b=24$. By the division algorithm, we have that $56=2*24+8$. Now what about $a=24$ and $b=8$? Again, by the division algorithm, we have that $24=3*8+0$. Now, the divisors of $56$ are $1$, $2$, $4$, $7$, $8$, $14$, $28$ and $56$, the divisors of $24$ are $1$, $2$, $3$, $4$, $6$, $8$, $12$ and $24$. The largest common divisor was $8$, which was the remainder after the first use of the division algorithm. Likewise, it was the quotient in the second application of the division algorithm. \end{example} \begin{example} Consider $a=4947$ and $b=1552$. By the division algorithm, we have that $4974=3*1552+291$. Applying the division algorithm to $a=1552$ and $b=291$ gives $1552=5*291+97$. A third application of the division algorithm to $a=291$ and $b=97$ gives $291=3*97+0$. Unlike with the previous example, there may be potentially too many divisors for $4947$ to list them out by trying each integer $00$. Moreover, we clearly have $0\in S$ as we can take $x=0$ and $y=0$. Now consider the set $\Tilde{S}$ given by \begin{equation*} \Tilde{S}=\left\{s\in S: s>0\right\} \end{equation*} We have by definition of $\Tilde{S}$ that $\forall s \in \Tilde{S}$ that $s>0$ and so $\Tilde{S}\subset\mathbb{N}$. Hence by the well-ordering principle, theorem \ref{thm:WOP}, there is a smallest element, say $\Bar{s}$. By definition of being an element of $\Tilde{S}$ we have that $\Bar{s}=ax_0+by_0$ for some $x_0,y_0\in\mathbb{Z}$, where $x_0,y_0$ each have a fixed value. We show that $\Bar{s}\divides a$ and $\Bar{s}\divides b$. Suppose instead that $\Bar{s}\notdivides a$, then by the division algorithm we have that $a=q\Bar{s}+r$ where $00$, then $\Gcd\left(am,bm\right)=m*\Gcd\left(a,b\right)$ \item If $d\divides a$ and $d\divides b$ where $d\in\mathbb{Z}$ and $d>0$ then $\displaystyle\Gcd\left(\frac{a}{d},\frac{b}{d}\right)=\frac{1}{d}\Gcd\left(a,b\right)$ \item If $\Gcd\left(a,b\right)=d$ then $\displaystyle\Gcd\left(\frac{a}{d},\frac{b}{d}\right)=1$ \end{enumerate} Proof: \begin{enumerate} \item $\Gcd\left(a,a\right)=a$: Clearly, we have that $a\divides a$. Now by proposition \ref{prop:NT_divisibility_properties} part 5. We have that if $a\divides a$ with $a>0$ then $a\leq a$. Hence $a$ is the largest such divisor so $\Gcd\left(a,a\right)=a$ \item $\Gcd\left(a,b\right)=\Gcd\left(b,a\right)$: This is trivial. If $d=\Gcd\left(a,b\right)$ then $d$ is the largest common divisor of $a$ and $b$. \item Let $D$ be the set of all common divisors of $a$ and $b$. then $\forall d\in D$ we have that $d\divides \Gcd\left(a,b\right)$: Let $D$ be defined as above, then \begin{equation*} D=\left\{x\in\mathbb{Z}: x>0\text{ and } x\divides a \text{ and } x\divides b\right\} \end{equation*} Then by definition of $D$ we have that $\forall d\in D$ that $d$ is a common divisor of $a$ and $d$ is a common divisor of $b$. Clearly then $d\divides\Gcd\left(a,b\right)$ as $\Gcd\left(a,b\right)$ is the largest such common divisor of $a$ and $b$ and therefore $\Gcd\left(a,b\right)\in D$. \item We have that $\Gcd\left(a,b\right)$ is the smallest such $ax+by$ where $x,y\in\mathbb{Z}$ so that $\Gcd\left(a,b\right)=ax+by$: This follows from the proof of theorem $\ref{thm:NT_bezout_id}$. For it it were not we would have a contradiction. \item Let $m\in\mathbb{Z}$ with $m>0$, then $\Gcd\left(a,b\right)=m\Gcd\left(a,b\right)$: By the previous part we have that $\Gcd\left(a,b\right)$ is the smallest such element of the set \begin{equation*} S=\left\{ax+by:x,y\in\mathbb{Z}\right\} \end{equation*} Let $s\in S$ denote the smallest such $ax+by$, that is $s=ax+by$ and $s=\Gcd\left(a,b\right)$. As $s=\Gcd\left(a,b\right)$ then $s\divides a$ and $s\divides b$. As $s\divides a$ then $a=ks$ for some $k\in\mathbb{Z}$ and so $am=k\left(ms\right)$ which is to say $ms\divides am$. Likewise as $s\divides b$ then $b=ls$ for some $l\in\mathbb{Z}$ and hence $bm=l\left(ms\right)$ giving $ms\divides bm$. Now as $s=ax+by$ then we have that $ms=m\left(ax+by\right)=a\left(mx\right)+b\left(my\right)$. Moreover, as $s\in S$ is the smallest such $ax+by$ then $m\left(ax+by\right)$ will be the smallest such element of the set \begin{equation*} \Tilde{S}=\left\{amx+bmy:x,y\in\mathbb{Z}\right\} \end{equation*} Hence we have that $amx+bmy=\Gcd\left(am,bm\right)=ms=m*\Gcd\left(a,b\right)$. \item If $d\divides a$ and $d\divides b$ where $d\in\mathbb{Z}$ and $d>0$ then $\displaystyle\Gcd\left(\frac{a}{d},\frac{b}{d}\right)=\frac{1}{d}\Gcd\left(a,b\right)$ Let $a,b,d\in\mathbb{Z}$ so that $d\divides a$ and $d\divides b$. As $d\divides a$ then we have that $\displaystyle\frac{a}{d}\in\mathbb{Z}$, likewise as $d\divides b$ then $\displaystyle\frac{b}{d}\in\mathbb{Z}$. The result now follows by applying the previous part. \item If $\Gcd\left(a,b\right)=d$ then $\displaystyle\Gcd\left(\frac{a}{d},\frac{b}{d}\right)=1$: This follows by the previous part. \end{enumerate} Concluding the proof. $\qed$ \end{proposition} We have talked a lot about the greatest common divisor but nothing about the least common multiple. As with common divisors, we start by making a definition of a common multiple. \begin{definition}{Common multiple} Let $a,b,c\in\mathbb{Z}$ so that $a\divides m$ and $b\divides m$. We say that $m$ is a common multiple of $a$ and $b$. \end{definition} \begin{example} Let $a=2$, $b=4$ and $c=8$. We have that $2\divides 8$ and $4\divides 8$ and so $8$ is a common multiple of $2$ and $4$. In fact, $4$ is a common multiple of $2$ and $4$. \end{example} \begin{example} Let $a=4$ and $b=14$. Listing multiples of $2$ we have $4$, $8$, $12$, $16$, $20$, $24$, $28$, $32$ and so on. Doing a similar procedure for $14$ we see we have $14$, $28$, $42$ and so on. We see that $28$ is a common multiple of $4$ and $14$. \end{example} \begin{example} Consider $a=24$ and $b=54$. Listing the first ten multiples of $a$ and $b$ we have \begin{align*} &24,\ 48,\ 72,\ 96,\ 120,\ 144,\ 168,\ 192,\ 216,\ 240,\ \dots\\ &54,\ 108,\ 162,\ 216,\ 270,\ 324,\ 378,\ 432,\ 486,\ 540,\ \dots\\ \end{align*} The first common multiple is $216$. Interestingly, we saw that $\Gcd\left(a,b\right)$ was $6$. We have that $216*6=1296$ and $24*54$=1296. \end{example} \begin{example} We observe for any integer $a$ that $a\divides 0$ as $0=am$ for some $m\in\mathbb{z}$ and by proposition \ref{prop:IntegersHaveNoZeroDivisors} we must have either $a=0$ or $m=0$. Hence $0$ can be argued to be a common multiple of any integers $a$ and $b$. This result is not particularly useful. \end{example} These examples indicate that a common multiple always exists. In fact, there is always a smallest common multiple \begin{theorem}{The least common multiple of two integers exists}\label{thm:NT_lcm_exists} Let $a,b\in\mathbb{Z}$ where $a>0$ and $b>0$. We have that $\exists m\in\mathbb{Z}$ with $m>0$ so that $m$ is the smallest common multiple of $a$ and $b$. That is $m$ is the smallest such integer so that $a\divides m$ and $b\divides m$. Proof: We first prove that a non-trivial common multiple of $a$ and $b$ exists. That is some $m\neq 0$ as $0$ can be viewed as a common divisor of any two integers $a,b$. Clearly $ab$ is a common multiple of $a$ and $b$ as $a\divides ab$ and $b\divides ab$. Hence a non-trivial common multiple exists. It is left to show that there is a minimal common multiple. Let $S$ be the set of all positive common multiples of $a$ and $b$. By the well-ordering principle, $S$ has a smallest element as $S\subset\mathbb{N}$. The result follows. $\qed$ \end{theorem} We can now make a formal definition. However, first, we can note that the restriction of $a>0$ and $b>0$ is not needed. \begin{corollary} Let $a,b\in\mathbb{Z}$, where $a\neq 0$ and $b\neq 0$. We have that $\exists m\in\mathbb{Z}$ with $m>0$ so that $m$ is the smallest common multiple of $a$ and $b$. This is, $m$ is the smallest such integer so that $a\divides m$ and $b\divides m$. Proof: The proof is similar to theorem \ref{thm:NT_lcm_exists}. We have that $ab$ is a common multiple of $a$ and $b$ as is $-ab$. Hence we have that one of $ab>0$ or $-ab>0$. Let $S$ be the set of all positive common multiples of $a$ and $b$. Then the well-ordering principle gives us that $S$ has the smallest such element. $\qed$. \end{corollary} \begin{definition}{Least common multiple} Let $a,b\in\mathbb{Z}$ so that $a\neq 0$ and $b\neq 0$. We say that the smallest positive value $m$ so that $a\divides m$ and $b\divides m$ is the least common multiple of $a$ and $b$, denoted $m=\Lcm\left(a,b\right)$, sometimes written $\lcm\left(a,b\right)$. \end{definition} It is important to note why we say that the least common multiple is positive. If we allowed a negative least common multiple, say $-m$, then for all $n\in\mathbb{Z}$ with $n>0$ we have that $-nm$ is a smaller common multiple than $-m$ and so we could always find a smaller such multiple. As with the greatest common divisor, we need a way to compute the least common multiple. We should look again at the example where $a=24$ and $b=54$. We saw that the first, smallest, common multiple was $216$, and that the greatest common divisor was $6$. We also noted that the product $ab=1296$ which is also the product $216*6$. We should look to more examples to see if this holds in other cases. \begin{example} Let $a=14$ and $b=21$. Using the method of writing multiples out we have \begin{align*} &14,\ 28,\ 42,\ 56,\ \dots\\ &21,\ 42,\ 63,\ 84,\ \dots\\ \end{align*} So the smallest positive common multiple is $42$. Now, $\Gcd\left(14,21\right)=7$. Finally, $14*21=294$ and $7*42=294$. Hence we have that $\displaystyle \Lcm\left(14,21\right)=\frac{14*21}{\Gcd\left(14,21\right)}$. In general we might expect that $\displaystyle \Lcm\left(a,b\right)=\frac{a*b}{\Gcd\left(a,b\right)}$ \end{example} \begin{example} Let $a=6$ and $b=36$. Using our expected result, we have that $\displaystyle \Lcm\left(a,b\right)=\frac{a*b}{\Gcd\left(a,b\right)}$. So computing $\Gcd\left(a,b\right)$ we see that $\Gcd\left(a,b\right)=6$ and so we suspect that $\displaystyle\Lcm\left(6,36\right)=\frac{6*36}{6}=36$. Writing out the multiples of both $6$ and $36$ \begin{align*} &6,\ 12,\ 18,\ 24,\ 30,\ 36,\ 42,\ \dots\\ &36,\ 72,\ 108,\ \dots\\ \end{align*} So the smallest common multiple is indeed $36$. \end{example} We have enough evidence to postulate and prove the following theorem. \begin{theorem}{Least common multiple by greatest common divisor equals product}\label{thm:NT_LCM_by_GCD_is_product} Let $a,b\in\mathbb{Z}$ so that $a> 0$ and $b> 0$. We have that \begin{equation*} \Gcd\left(a,b\right)*\Lcm\left(a,b\right)=ab \end{equation*} Proof: Let $d=\Gcd\left(a,b\right)$, then by definition we have that $d\divides a$ so by proposition \ref{prop:NT_divisibility_properties} part 1. implies that $d\divides ac$ for any $c\in\mathbb{Z}$ and in particular $d\divides ab$. Hence by the definition of divisibility, there exists $n\in\mathbb{Z}$ so that $ab=dn$. Now as $d\divides a$ then there is an integer $u$ so that $a=du$, likewise as $d\divides b$ then there is an integer $v$ so that $b=dv$. Hence we have that \begin{align*} dn&=dub \Rightarrow n=ub,\ \text{By the cancellation law for the integers}\\ dn&=adv \Rightarrow n=av,\ \text{By the cancellation law for the integers} \end{align*} Hence as $n=ub$ we have that $b\divides n$ and likewise as $n=av$ we have that $a\divides n$. Hence it follows that $n$ is a common multiple of $a$ and $b$. We need to show that $n$ is the smallest such multiple so then $\Lcm\left(a,b\right)=n$. So, let $S$ denote the set of positive common multiples of $a$ and $b$ and let $s\in S$ be a common multiple of $a$ and $b$. By definition of a common multiple, we have that there exists some $k_1,k_2\in\mathbb{Z}$ so that $s=ak_1$ and $s=bk_2$. Now, we have by Bézout's identity we have that $\exists x,y\in\mathbb{Z}$ so that \begin{equation*} \Gcd\left(a,b\right)=d=ax+by \end{equation*} Now, consider $sd$, we have that \begin{align*} sd&=s\left(ax+by\right)\\ &=sax+sby\\ &=\left(bk_2\right)ax+\left(ak_1\right)by\\ &=abk_2x+abk_1y\\ &=ab\left(k_2x+k_1y\right)\\ &=dn\left(k_2x+k_1y\right)\\ s&=n\left(k_2x+k_1y\right),\ \text{By the cancellation law for the integers} \end{align*} Now $\left(k_2x+k_1y\right)\in\mathbb{Z}$ and so we have that $n\divides s$. Now by proposition \ref{prop:NT_divisibility_properties} part 5. we have that $n\leq s$. As $s\in S$ was arbitrary we have that $n$ divides the smallest element of $S$ by the well-ordering principle, i.e $n$ is the smallest common divisor and so by definition $\Lcm\left(a,b\right)=n$. Hence we have that $ab=dn=\Gcd\left(a,b\right)\Lcm\left(a,b\right)$. As required. $\qed$. \end{theorem} We can now justify the following corollary to compute the least common multiple. \begin{corollary}{Least common multiple is product divided by greatest common divisor}\label{cor:NT_lcm_formula} Let $a,b\in\mathbb{Z}$ so that $a>0$ and $b>0$. We have that \begin{equation*} \Lcm\left(a,b\right)=\frac{ab}{\Gcd\left(a,b\right)} \end{equation*} Proof: By theorem \ref{thm:NT_LCM_by_GCD_is_product} we have that \begin{equation*} \Gcd\left(a,b\right)*\Lcm\left(a,b\right)=ab \end{equation*} Let $d=\Gcd\left(a,b\right)$ then by definition we have that $d\divides a$ and $d\divides b$ so that $d\divides ab$. Hence $\displaystyle\frac{ab}{d}\in\mathbb{Z}$. Hence $\Lcm\left(a,b\right)\in\mathbb{Z}$. $\qed$ \end{corollary} We can now show some similar results to proposition \ref{prop:NT_GCD_properties} \begin{proposition}{Properties of the least common multiple}\label{prop:NT_LCM_properties} Let $a,b\in\mathbb{Z}$ with $a>0$ $b> 0$. We have the following properties of the $\Lcm$ hold. \begin{enumerate} \item $\Lcm\left(a,a\right)=a$ \item $\Lcm\left(a,b\right)=\Lcm\left(b,a\right)$ \item Let $M$ be the set of all positive common multiples of $a$ and $b$. then $\forall m\in M$ we have that $\Lcm\left(a,b\right)\divides m$ \item We have that $\Lcm\left(a,b\right)$ is the greatest $\displaystyle \frac{ab}{ax+by}$ where $\Gcd\left(a,b\right)=ax+by$. \end{enumerate} Proof: \begin{enumerate} \item $\Lcm\left(a,a\right)=a$: As $\Gcd\left(a,a\right)=a$ and $a*a=a^2$, we have by corollary \ref{cor:NT_lcm_formula} that \begin{equation*} \Lcm\left(a,a\right)=\frac{a*a}{\Gcd\left(a,a\right)}=\frac{a^2}{a}=a \end{equation*} \item $\Lcm\left(a,b\right)=\Lcm\left(b,a\right)$: This follows as $\Gcd\left(a,b\right)=\Gcd\left(b,a\right)$ and integer multiplication is commutative, this is to say \begin{equation*} \Lcm\left(a,b\right)=\frac{a*b}{\Gcd\left(a,b\right)}=\frac{b*a}{\Gcd\left(b,a\right)}=\Lcm\left(b,a\right) \end{equation*} \item Let $M$ be the set of all positive common multiples of $a$ and $b$. then $\forall m\in M$ we have that $\Lcm\left(a,b\right)\divides m$: Let $M$ be the set of all positive common multiples. By the well-ordering principle, there is a smallest element $\Tilde{m}$. By the definition of the least common multiple we have that $\Lcm\left(a,b\right)$ divides any other common multiple, so $\Lcm\left(a,b\right)\divides \Tilde{m}$. For every $m\in M$, we have that $m\geq\Tilde{m}$ and so $\Lcm\left(a,b\right)\divides m$ for every $m\in M$. \item We have that $\Lcm\left(a,b\right)$ is the greatest $\displaystyle \frac{ab}{ax+by}$ where $\Gcd\left(a,b\right)=ax+by$: By proposition \ref{prop:NT_GCD_properties} part 4. we have that $\Gcd\left(a,b\right)=ax+by$ for some $x,y\in\mathbb{Z}$ is the smallest such $ax+by$. Hence \begin{equation*} \Lcm\left(a,b\right)=\frac{ab}{\Gcd\left(a,b\right)} \end{equation*} Will be the greatest such fraction. For if not then there is either $x_0,y_0\in\mathbb{Z}$ so that $ax_0+by_0ax+by$ then by part 35. of proposition \ref{prop:InequalityRationalNumbers} we have that \begin{equation*} \frac{ab}{ax_1+by_1}<\frac{ab}{ax+by} \end{equation*} \end{enumerate} Concluding the proof. $\qed$ \end{proposition} \pagebreak \section{Prime and co-prime numbers}\epigraph{God may not play dice with the universe, but something strange is going on with the prime numbers.}{\textit{Paul Erdos}} So far we have been building a theory of divisibility. This theory has allowed us to define what it means to be an odd or an even integer. To know when one integer divides another, and computing the largest divisor of two integers. Where do we go from here? One question we could ask is how many divisors does a given integer have? \subsection{The divisor function} We start with the following definition. \begin{definition}{The Divisor function} Let $x\in\mathbb{Z}$. We define $\sigma:\mathbb{Z}\rightarrow\mathbb{Z}$ by \begin{align*} \sigma:\mathbb{Z}&\mapping\mathbb{Z}\\ x&\mapsto \sigma\left(x\right)=\sum_{d\divides x} 1 \end{align*} here we are summing over all of the divisors $d$ of $x$, where if $d\divides x$ then we add one to the sum total. \end{definition} Rather than work with explicit examples we will provide a table of the first 20 integers. \begin{table}[ht] \centering \begin{tabular}{|c|c|c|c|c|c|c|c|c|c|c|c|c|c|c|c|c|c|c|c|c|} \hline $x$ & 1 & 2 & 3 & 4 & 5 & 6 & 7 & 8 & 9 & 10 & 11 & 12 & 13 & 14 & 15 & 16 & 17 & 18 & 19 & 20 \\ \hline $\sigma\left(x\right)$ & 1 & 2 & 2 & 3 & 2 & 4 & 2 & 4 & 3 & 4 & 2 & 6 & 2 & 4 & 4 & 5 & 2 & 6 & 2 & 6 \\ \hline \end{tabular} \caption{The divisor function for the integers $1\leq x\leq 20$} \end{table} There are a few things to note from this table. Firstly the only integer with a single divisor is $1$. Secondly, there are many examples of integers having only $2$ divisors. These are $2$, $3$, $5$, $7$, $11$, $13$, $17$ and $19$. As $1$ is a divisor of every integer we can conclude the other divisors in the case of $\sigma\left(x\right)=2$ must be $x$ itself. What about the case when $\sigma\left(x\right)>2$. Looking at $6$ we see the divisors are $1$, $2$, $3$ and $6$ itself, and from the table $\sigma\left(2\right)=\sigma\left(3\right)=2$. Moreover, we have that $6=2*30$. Similarly with $12$ we have that the divisors are $1$, $2$, $3$, $4$, $6$ and $12$. Again, we have that $\sigma\left(2\right)=\sigma\left(3\right)=2$. Now, as $12=2*6$ and $6=2*3$ then we have that $12=2*2*3$. In both cases, we have seen that a number $x$ with $\sigma\left(x\right)>2$ can be written into a product of integers with exactly $2$ divisors. We can ask does this hold in general? To do so we need to make some definitions. \subsection{Prime numbers} With the remarks of the previous section, we give a special name to any integer $x$ where $\sigma\left(x\right)=2$. \begin{definition}{Prime number} Let $x\in\mathbb{Z}$ with $x\geq 2$. We say that $x$ is a prime number, or simply that $x$ is prime, if and only if $\sigma\left(x\right)=2$. In other words, we say that $x$ is prime, if and only if the only two distinct positive divisors of $x$ are $1$ and itself. If $x$ is not prime we say that $x$ is composite. \end{definition} We noted that there were many $x\in\mathbb{Z}$ with $\sigma\left(x\right)=2$. A natural question that arises is are there infinitely many such $x$, or are there only finitely so many? To answer this we need to see how primes and divisibility interact. We first have to make another definition based on the greatest common divisor of two integers. We show some examples to motivate this new definition. \begin{example} Let $a=6$ and $b=35$. By the Euclidean algorithm, we see that \begin{align*} 35&=5\left(6\right)+5\\ 6&=5+1\\ 5&=5\left(1\right) \end{align*} Hence $\Gcd\left(a,b\right)=1$. \end{example} \begin{example} Let $a=2$ and $b=3$. By the Euclidean algorithm, we see that \begin{align*} 3&=2+1\\ 2&=2\left(1\right) \end{align*} Hence $\Gcd\left(a,b\right)=1$. We note that $a$ and $b$ are prime. \end{example} \begin{example} Let $a=4$ and $b=9$. By the Euclidean algorithm, we see that \begin{align*} 9&=2\left(4\right)+1\\ 4&=4\left(1\right) \end{align*} Hence $\Gcd\left(a,b\right)=1$. \end{example} We see that there are integers $a,b\in\mathbb{Z}$ so that $\Gcd\left(a,b\right)=1$. Meaning that they have no common divisors other than $1$. This situation turns out to happen enough in Number Theory to warrant a definition. \begin{definition}{Co-prime Integers} Let $a,b\in\mathbb{Z}$. We say that $a$ is co-prime to $b$, or $a$ and $b$ are co-prime, or $a$ and $b$ are relatively prime, if and only if $\Gcd\left(a,b\right)=1$. \end{definition} We have some immediate results. \begin{proposition}{Bézout's Identity for co-prime integers}\label{prop:NT_Bezout_coprime} Let $a,b\in\mathbb{Z}$ so that $\Gcd\left(a,b\right)=1$. We have that $\exists x,y\in\mathbb{Z}$ so that \begin{equation*} 1=ax+by \end{equation*} Proof: This immediately follows from theorem \ref{thm:NT_bezout_id}. $\qed$ \end{proposition} \begin{proposition}{Distinct prime numbers are co-prime} Let $p,q\in\mathbb{Z}$ so that $p$ and $q$ are prime. We have that $\Gcd\left(p,q\right)=1$. Proof: Let $p,q\in\mathbb{Z}$ so that $p$ and $q$ are prime and $p\neq q$. As $p$ is prime then the only positive divisors are $p$ and $1$, likewise for $q$. Hence the largest divisor of both $p$ and $q$ is 1 so that $\Gcd\left(p,q\right)=1$ by definition. $\qed$ \end{proposition} \begin{corollary}{Prime not dividing integer implies co-prime}\label{cor:NT_PrimeNotDividing_Integer_implies_coprime} Let $a,p\in\mathbb{Z}$ where $p$ is prime. If $p\notdivides a$ then $\Gcd\left(a,p\right) = 1$ Proof: Let $a,p\in\mathbb{Z}$ where $p$ is prime and where $p\notdivides a$. Suppose that $\Gcd\left(a,p\right)=d$ for some $d\in\mathbb{Z}$. By definition of the greatest common divisor, we have that $d\divides p$ and by definition of a prime, we have that either $d=1$ or $d=p$. But if $d=p$ then $p\divides a$ by definition of the greatest common divisor, contradicting the assumption that $p\notdivides a$. Hence $d=1$. $\qed$ \end{corollary} \begin{proposition}{Product of co-prime integers is equal to their least common multiple} Let $a,b\in\mathbb{Z}$ so that $\Gcd\left(a,b\right)=1$. We have that $ab=\Lcm\left(a,b\right)$. Proof: Let $a,b\in\mathbb{Z}$ be as given in the proposition. We have by corollary \ref{cor:NT_lcm_formula} that \begin{equation*} \Lcm\left(a,b\right)= \frac{ab}{\Gcd\left(a,b\right)} \end{equation*} As $a$ and $b$ are co-prime, we have $\Gcd\left(a,b\right)=1$, hence the result. $\qed$ \end{proposition} \begin{proposition}{Coefficients in Bézout's identity are co-prime}\label{prop:NT_Bezout_coef_coprime} Let $a,b\in\mathbb{Z}$ with $d=\Gcd\left(a,b\right)$ so that by Bézout's identity we have $\exists x,y\in\mathbb{Z}$ so that \begin{equation*} d=ax+by \end{equation*} We have that $\Gcd\left(x,y\right)=1$ Proof: Let $a,b\in\mathbb{Z}$ with $d=\Gcd\left(a,b\right)$. By Bézout's identity we have that there exists $x,y\in\mathbb{Z}$ so that \begin{equation*} d=ax+by \end{equation*} Now, dividing by $d$ gives \begin{equation*} 1=\frac{a}{d}x+\frac{b}{d}y \end{equation*} As $d\divides a$ and $d\divides b$. Hence we have that $1=k_1x+k_2y$ where $\displaystyle k_1=\frac{a}{d}$ and $\displaystyle k_2=\frac{b}{d}$. Hence $\Gcd\left(x,y\right)=1$ and so by definition $x$ and $y$ are co-prime. $\qed$ \end{proposition} With some basic results out of the way, we can start seeing more meaningful consequences of defining prime and co-prime numbers. One of the first things we should do is see how primes divide other integers. \begin{example} Let $n=10$, we have that $2\divides 10$ and $\sigma\left(2\right)=2$, hence $2$ is prime. Moreover $10=2*5$ and clearly $2\divides 2$. \end{example} \begin{example} let $n=4$, clearly $4=2*2$ and so $2\divides 4$. Moreover, $2\divides 2$. \end{example} \begin{example} Let $n=14=2*7$. Both $2$ and $7$ are prime and so $2\divides 14$ and $7\divides 14$. \end{example} Then, if a prime $p$ divides $n=ab$ we seem to have that either $p\divides a$ or $p\divides b$. \begin{lemma}{Euclid's Lemma}\label{lem:NT_Euclid} Let $a,b\in\mathbb{Z}$ and let $p\in\mathbb{Z}$ be prime. Suppose that $p\divides ab$. We have that either $p\divides a$ or $p\divides b$. Proof: Let $p\divides ab$. Suppose that $p\notdivides b$. As the only divisors of $p$ are $1$ and itself then we have that $\Gcd\left(p,b\right)=1$ by corollary \ref{cor:NT_PrimeNotDividing_Integer_implies_coprime}. Now by proposition \ref{prop:NT_Bezout_coprime} we have that $\exists x,y\in\mathbb{Z}$ so that \begin{equation*} 1=px+by \end{equation*} Multiplying by $a$ gives $a=apx+aby$ and as $p\divides apx$ and $p\divides ab$ we have that $p\divides a$. Likewise if $p\notdivides a$. $\qed$ \end{lemma} This result generalises to products of more than two integers. \begin{lemma}{Generalised Euclid's lemma}\label{lem:NT_Euclid_general} Let $p\in\mathbb{Z}$ be prime. Let $n\in\mathbb{Z}$ be such that \begin{equation*} n=\prod_{i=1}^m a_i \end{equation*} where $a_i\in\mathbb{Z}$ for each $i$. Suppose that $p\divides n$, then there exists an $i\in\mathbb{N}$ so that $p\divides a_i$. Proof: We argue by induction on $m$. The base case is $m=2$ which follows by Euclid's lemma. So suppose the result holds for some $k>2$ that is if $n$ is such that \begin{equation*} n=\prod_{i=1}^k a_i \end{equation*} then there is some $i\in\mathbb{N}$ so that $p\divides a_i$. We show that if $n$ is such that \begin{equation*} n=\prod_{i=1}^{k+1} a_i \end{equation*} then there is some $i\in\mathbb{N}$ so that $p\divides a_i$. So suppose that $p\divides n$, then \begin{equation*} p\divides\prod_{i=1}^{k+1} a_i \end{equation*} We have that \begin{align*} p\divides&\prod_{i=1}^{k+1} a_i \\ p\divides&\left(\prod_{i=1}^{k} a_i *a_k\right) \end{align*} By the induction hypothesis we have that as $\displaystyle p\divides\prod_{i=1}^{k} a_i$ then there is some $i\in\mathbb{N}$ so that $p\divides a_i$ where $1\leq i \leq k$. Hence we have that either $p\divides a_i$ or $p\divides a_{k+1}$. The result now follows by induction. $\qed$ \end{lemma} With Euclid's lemma, we can provide a very famous theorem. Namely, there is no $x\in\mathbb{Q}$ so that $x^2=2$. We first need a definition, based on co-prime integers. \begin{definition}{Reduced fraction} Let $x\in\mathbb{Q}$ where $\displaystyle x=\frac{a}{b}$ and $b\neq 0$. We say that $x$ is a reduced fraction, or a fraction in its lowest terms if $\Gcd\left(a,b\right)=1$. \end{definition} We give some examples. \begin{example} Let $\displaystyle x=\frac{1}{2}$. As $\Gcd\left(1,2\right)=1$ we have that $x$ is a reduced fraction. \end{example} \begin{example} Let $\displaystyle x=\frac{3}{6}$. We can compute that $\Gcd\left(3,6\right)=3$, hence we have that $3\divides 3$ and $3\divides 6$. We hence can write \begin{equation*} x=\frac{3}{6}=\frac{3*1}{3*2}=\frac{1}{2} \end{equation*} And as $\Gcd\left(1,2\right)=1$ we can conclude $x$ is now in its lowest terms. \end{example} We can now show the theorem. \begin{theorem}{No rational exists whose square is $2$}\label{thm:NT_Root2Irrational} We have that $\not\exists x\in\mathbb{Q}$ with $x^2=2$. Proof: Suppose instead that $x\in\mathbb{Q}$ where $\displaystyle x=\frac{a}{b}$ with $b\neq 0$. Moreover assume that $x$ is a reduced fraction, i.e $\Gcd\left(a,b\right)=1$. We can make this assumption as otherwise we can reduce $x$ until it is reduced without affecting the proof. We have that \begin{align*} x^2&=2\\ \frac{a^2}{b^2}&=2\\ a^2&=2b^2 \end{align*} Hence by the definition of divisibility, we have $2\divides a^2$ and so by Euclid's lemma we have that $2\divides a$ as $2$ is prime. So write $a=2k$ for some $k\in\mathbb{Z}$. Then we have that \begin{align*} a^2&=2b^2\\ \left(2k\right)^2&=2b^2\\ 4k^2&=2b^2\\ 2k^2&=b^2\\ \end{align*} Hence $2\divides b^2$ and again by Euclid's lemma we have that $2\divides b$. We have a contradiction as $2\divides a$ and $2\divides b$ implies that $\Gcd\left(a,b\right)\geq 2$ and so $x$ can't have been a reduced fraction. But then if $x$ was not a reduced fraction and $a$ and $b$ can't be co-prime then we can conclude that there is no rational $x$ so that $x^2=2$. $\qed$ \end{theorem} This raises the question if there is no rational $x$ whose square is $2$ then what exactly is $x$? Unfortunately, we are not quite ready to properly answer this question in a satisfying way, all we can is that we have seen a hint of a new type of number. One that we can define but not study in more detail at the moment. \begin{definition}{Irrational number} If we have $x\not\in\mathbb{Q}$, then we say that $x$ is irrational. In other words, $x$ is irrational if and only if $\displaystyle x=\frac{a}{b}$ where $a,b\in\mathbb{Z}$ and $b\neq 0$. \end{definition} Clearly, if $S$ denotes the set of irrational numbers then by theorem $\ref{thm:NT_Root2Irrational}$ that $S\neq\emptyset$. Perhaps then it makes sense, for now, to consider which elements of $x\in\mathbb{Q}$ so that $x^2=y$ where $y\in\mathbb{Z}$, or more restrictively, which $x\in\mathbb{Z}$ are such that we have $x^2=y$ where $y\in\mathbb{Z}$. Before we start answering this question, we note one useful result by generalising Euclid's lemma from the prime case to the co-prime case. \begin{lemma}{Euclid's lemma for co-primes}\label{lem:NT_Euclid_co_primes} Let $a,b,c\in\mathbb{Z}$ and suppose that $c\divides ab$ and $\Gcd\left(b,c\right)=1$. We have that $c\divides a$. Proof: Let $a,b,c\in\mathbb{Z}$ be such that $c\divides ab$ and $\Gcd\left(b,c\right)=1$. As $\Gcd\left(b,c\right)=1$, we have by proposition \ref{prop:NT_Bezout_coprime} that there exists integers $x,y\in\mathbb{Z}$ so that \begin{equation*} bx+cy=1 \end{equation*} On multiplication by $a$ we have that $abx+acy=a$. Clearly $c\divides abx$ and $c\divides acy$ and so $c\divides a$ as required. $\qed$ \end{lemma} There is a useful application of this lemma. \begin{example}\label{exam:NT_solutions_to_ax_plus_by} Let $a,b\in\mathbb{Z}$ and let $d=\Gcd\left(a,b\right)$. We know by Bézout's identity that $\exists x,y\in\mathbb{Z}$ so that \begin{equation*} ax+by=d \end{equation*} The theorem for Bézout's identity, theorem \ref{thm:NT_bezout_id}, doesn't state anything about there not being another pair $x',y'$ so that \begin{equation*} ax'+by'=d \end{equation*} For example, consider $a=30$ and $b=105$, then $\Gcd\left(a,b\right)=15$ and we have that $15=-3*30+1*105$, i.e $x=-3$ and $y=1$ in this case. We could have also have $x=-10$ and $y=3$ as $-10*30+3*105=-300+315=15$. So supposing that $a,b\in\mathbb{Z}$ and $d=\Gcd\left(a,b\right)$ we know that $\exists x,x',y, y'\in\mathbb{Z}$ with \begin{align*} ax+by&=d\\ ax'+by'&=d \end{align*} Can we find a relation between the pair $x$ and $y$ and the pair $x'$ and $y'$? As $d\divides a$ then there exists $a'\in\mathbb{Z}$ so that $a=a'd$ and likewise as $d\divides b$ then there exists $b'\in\mathbb{Z}$ so that $b=b'd$. Hence we see that \begin{align*} ax+by&=d\\ a'dx+b'dy&=d\\ a'x+b'y&=1 \end{align*} Now, we have that $x$ and $y$ are co-prime so we can deduce that $a'$ and $b'$ are also co-prime. Now, we have that \begin{equation*} ax+by=d=ax'+by' \end{equation*} So, re-arranging we see that \begin{align*} ax-ax'&=by'-by\\ a\left(x-x'\right)&=b\left(y'-y\right) \end{align*} Dividing by $d$ gives \begin{equation*} a'\left(x-x'\right)=b'\left(y'-y\right) \end{equation*} Now, as $a'$ and $b'$ are co-prime, we have by Euclid's lemma for co-primes that $a'\divides \left(y'-y\right)$, We, therefore have that $\exists k\in\mathbb{Z}$ so that \begin{equation*} y'-y=a'k \Rightarrow y'=y+a'k \end{equation*} But as $y'-y=a'k$ we have that \begin{align*} a'\left(x-x'\right)&=b'\left(a'k\right)\\ x-x'&=b'k\\ x'&=x-b'k\\ \end{align*} Therefore, we can conclude that \begin{align*} x'&=x-\frac{b}{d}k\\ y'&=y+\frac{a}{d}k \end{align*} where $k\in\mathbb{Z}$. To check this is the case we return to the example of $a=30$ and $b=105$ where we had that $\Gcd\left(a,b\right)=15$. We saw that $x=-3$ and $y=1$. Using these values in the equations above we get \begin{align*} x'&=-3-\frac{105}{15}k \Rightarrow x'=-3-7k\\ y'&=1+\frac{30}{15}k \Rightarrow y'=1+2k \end{align*} Using $k=1$ gives us the alternative solution we saw of $x'=-10$ and $y'=3$. \end{example} From Euclid's lemma for co-primes we have deduced the full set of values where $d=\Gcd\left(a,b\right)$ and $d=ax+by$. We now return to the problem at hand. We wish to consider the elements of $x\in\mathbb{Z}$ so that $x^2=y$ where $y\in\mathbb{Z}$. As is the theme of this section we will do some exploratory examples. \begin{example} Let $x\in\mathbb{Q}$ be such that $\displaystyle x=\frac{2}{1}$, then $\displaystyle x^2=\frac{4}{1}=4\in\mathbb{Z}$. In particular, we have that $4=2*2=2^2$. \end{example} \begin{example} Consider $\displaystyle x=\frac{10}{1}=10$. Clearly $x^2=100\in\mathbb{Z}$. We have that \begin{equation*} 100=2*50=2*2*25=2*2*5*5=2^2*5^2 \end{equation*} \end{example} \begin{example} We generalise the example of there being no $x\in\mathbb{Q}$ so that $x^2=2$. We will show that for a prime $p\in\mathbb{Z}$, there is no $x\in\mathbb{Q}$ so that $x^2=p$. So suppose there is such an $x$, that is $\displaystyle x=\frac{a}{b}$ so that $a,b\in\mathbb{Z}$ and $b\neq 0$ and moreover suppose that $x$ is a reduced fraction, which is to say $\Gcd\left(a,b\right)=1$. We then have that \begin{equation*} x^2=\frac{a^2}{b^2}=p \Rightarrow a^2=pb^2 \end{equation*} Hence $p\divides a^2$. Hence by Euclid's lemma, we have that $p\divides a$. Hence let $a=pk$ for some $k\in\mathbb{Z}$. We then have that \begin{align*} a^2&=pb^2\\ \left(pk\right)^2&=pb^2\\ p^2k^2&=pb^2\\ pk&=b^2 \end{align*} Therefore $p\divides b^2$ and so by Euclid's lemma we have that $p\divides b$, a contradiction to the assumption that $x$ was a fraction in reduced form. \end{example} This last example shows that for any prime $p$ there is no rational number $x$ with $x^2=p$. We also saw an example of when $x^2=p^2$, namely when $p=2$. Also an example of a product of primes satisfying $x^2=p^2*q^2$ for some primes $p$ and $q$. It seems therefore that the question of what $x\in\mathbb{Z}$ so that $x^2=y$ for some integer $y$ is deeply connected to primes. In particular, we have seen that the powers of the primes must be even. We need more examples before we can make a claim. \begin{example} Consider $x=4$, we have that $x^2=8$ and $8$ is not prime as $\sigma\left(8\right)=4$, with divisors $1$, $2$, $4$ and $8$. However, we have that $8=2^4$ and we know that $2$ is prime. \end{example} \begin{example} Let $y=3^2*5^4=5625$, a product of primes. We can see that we can take $x=3*5^2=75$. \end{example} With these examples, we can see that to answer the question of what $x\in\mathbb{Z}$ are such that $x^2=y$ for some $y\in\mathbb{Z}$, it is enough to consider the structure of the primes that make $y$. This leads us to, perhaps, the most important theorem of elementary Number Theory\footnote{If there is only one theorem you learn when studying Number Theory, it has to be this one!}. \begin{theorem}{The fundamental theorem of arithmetic}\label{thm:NT_FTOA} Let $n\in\mathbb{Z}$ be such that $n\geq 2$. We have that $n$ can be expressed as a product of one or more primes. This product is uniquely up to the order of the primes. This is to say we have that \begin{equation*} n=p_1^{e_1}*p_2^{e_2}*p_3^{e_3}*\dots*p_k^{e_k} \end{equation*} where $p_i$ are the primes and $e_i$ are the powers for the prime $p_i$. Here uniquely up to the order of the primes means that, for example, $6=2*3=3*2$ are considered the same product. Proof: There are two parts to this theorem, firstly we must show that every integer $n\geq 2$ is expressible as a product of primes. Secondly that this product is unique up to the ordering of the primes. As a result, we will break this theorem down into two sub-theorems. \begin{theorem}{Every integer greater than one is expressible as a product of primes}\label{thm:NT_FOTA_EveryIntIsProductOfPrimes} Let $n\in\mathbb{Z}$ be such that $n>1$. We have that \begin{equation*} n=p_1*p_2*p_3*\dots*p_k \end{equation*} where $p_i$ are the primes. Proof: We argue by induction on $n$. The base case is $n=2$ for which we have $n=2$ which is a prime. So the base case is immediate. So suppose the result holds for some $k>2$, that is $n=k$ can be written as a product of primes. We show that $n=k+1$ can be written as a product of primes. If $k+1$ is itself prime we are done, so suppose not, then $\sigma\left(k+1\right)>2$ and so there are some factors, say $a$ and $b$ so that $k+1=ab$, where $2\leq a < k+1$ and $2\leq b < k+1$. However, this means that we have $2\leq a \leq k$ and $2\leq b \leq k$ and so by the induction hypothesis we can write $a$ and $b$ as a product of primes. But then $ab$ will be a product of primes and so $k+1$ is a product of primes. The result follows by induction. $\qed$ \end{theorem} \begin{theorem}{The product of primes expression for an integer is unique}\label{thm:NT_FOTA_PrimeProdUnique} Let $n\in\mathbb{Z}$ be such that $n\geq 2$. We have that the expression for $n$ as a product of primes is unique. Proof: Let $n\in\mathbb{Z}$ be as given. Suppose that $n$ has two different representations into a product of primes, that is \begin{align*} n&=p_1p_2p_3\dots p_r\\ n&=q_1q_2q_3\dots q_s \end{align*} where without loss of generality we suppose that $r\leq s$. Moreover, Without loss of generality suppose that we have the primes in ascending order, that is, $p_1\leq p_2\leq p_3\leq\dots\leq p_r$ and that $q_1\leq q_2\leq q_3\leq\dots\leq q_s$. Now as $p_1\divides q_1q_2q_3\dots q_s$ we have by Euclid's lemma that $p_1\divides q_i$ for some $1\leq i \leq s$. Therefore $p_1\geq q_1$ as the primes are in ascending order. Likewise, as $q_1\divides p_1p_2p_3\dots p_r$, then $q_1\divides p_j$ for some $1\leq j\leq r$. Hence $q_1\geq p_1$. As $p_1\geq q_1$ and $q_1\geq p_1$ we must have that $p_1=q_1$. Hence we have \begin{align*} p_1p_2p_3\dots p_r&=q_1q_2q_3\dots q_s\\ p_1p_2p_3\dots p_r&=p_1q_2q_3\dots q_s\\ p_2p_3\dots p_r&=q_2q_3\dots q_s\\ \end{align*} This process can be repeated for each prime $p_j$ for the remaining $2\leq j\leq r$. Now if $rp_n$, which would be a contradiction. So $N$ is composite and by the fundamental theorem of arithmetic, we have that $N$ has a factorisation into primes. Clearly, none of the $p_i$ divide $N$, but then none of the $p_i$ divide the prime factorisation of $N$ from the fundamental theorem of arithmetic, a contradiction. Hence $P$ can't be a finite set and the number of primes must be infinite. $\qed$ \end{theorem} The fundamental theorem of arithmetic can be used to recast some previous results for the greatest common divisor. We start with a result for integers being co-primes. \begin{proposition}{Greatest common divisor is 1 if and only if no-common prime in factorisation}\label{prop:NT_co-prime_iff_no_common_primes} Let $a,b\in\mathbb{Z}$ with $b\neq 0$. We have that $\Gcd\left(a,b\right)=1$ if and only if $a$ and $b$ share no common primes in their factorisations. Proof: We have that $\Gcd\left(a,b\right)=1$ if and only if the largest divisor of both $a$ and $b$ is $1$, which occurs if and only if there are no primes in the factorisation of $a$ and in the factorisation of $b$ in common. $\qed$ \end{proposition} We can compute the greatest common divisor by considering the prime factorisations of $a$ and $b$. To do so we need a helpful result. \begin{proposition}{Expression for integers as powers of same primes}\label{prop:NT_express_primes_in_common_basis} Let $a,b\in\mathbb{Z}$ with $a\geq 2$ and $b\geq 2$. Consider the prime factorisations of $a$ and $b$ given by \begin{align*} a&=p_1^{e_1}p_2^{e_2}p_3^{e_3}\dots p_n^{e_n}\\ &=\prod_{\substack{p_i\divides a \\ p_i\text{ is prime}}} p_i^{e_i}\\ b&=q_1^{f_1}q_2^{f_2}q_3^{f_3}\dots q_m^{f_m}\\ &=\prod_{\substack{q_i\divides b \\ q_i\text{ is prime}}} q_i^{f_i}\\ \end{align*} where $n$ need not be equal to $m$. We have that there exist prime numbers \begin{equation*} t_10$ and $D>0$ then we must have that $k>0$ which means that $k'>0$. Hence as $k'>0$ we have by the fundamental theorem of arithmetic that $k'$ has a factorisation into primes, say \begin{equation*} k'=q_1^{r_1}q_2^{r_2}q_3^{r_3}\dots q_c^{r_c} \end{equation*} Moreover, no $q_j=t_i$ as $k'$ has no common primes with $t_1^{\lambda_1}t_2^{\lambda_2}t_3^{\lambda_3}\dots t_v^{\lambda_v}$. Pick one of the primes in $k'$ say $q=q_j$ then we have that $q\divides d$. Moreover we have that $d\divides a$ as $d=\Gcd\left(a,b\right)$ hence we must have that $q\divides a$. Hence we have that $q$ is one of the primes $t_i$ a contradiction. Therefore $k'=1$. \item $\lambda_i\leq \sigma_i$ for all $1\leq i\leq v$: Suppose for a contradiction that $\lambda_i>\sigma_i$ for all $1\leq i\leq v$. Without loss of generality take $i=1$, for if this is not the case re-label the primes. Now by definition of $\sigma_1$ we have that $\sigma_1=\min\left(e_,f_1\right)$ and so we must have that either $\sigma_1=e_1$ or $\sigma_1=f_1$. Without loss of generality let $\sigma_1=e_1$ as the case where $\sigma_1=f_1$ is similar. We, therefore, have that $\lambda_1>e_1$. Now, as $d$ is the greatest common divisor of $a$ there is a $s\in\mathbb{Z}$ so that $ds=a$ where $s>0$ as both $a$ and $d$ are. Now, comparing the prime factorisations of $ds$ and $a$ we have that \begin{equation*} s*t_1^{\lambda_1}t_2^{\lambda_2}t_3^{\lambda_3}\dots t_v^{\lambda_v}=t_1^{e_1}t_2^{e_2}t_3^{e_3}\dots t_v^{e_v} \end{equation*} Dividing by $\displaystyle t_1^{e_1}$ we get that \begin{equation*} s*t_1^{\lambda_1-e_1}t_2^{\lambda_2}t_3^{\lambda_3}\dots t_v^{\lambda_v}=t_1^{e_1-e_1}t_2^{e_2}t_3^{e_3}\dots t_v^{e_v} \end{equation*} Where clearly $\displaystyle t_1^{e_1-e_1}=1$. So this can be re-written as \begin{equation*} s*t_1^{\lambda_1-e_1}t_2^{\lambda_2}t_3^{\lambda_3}\dots t_v^{\lambda_v}=t_2^{e_2}t_3^{e_3}\dots t_v^{e_v} \end{equation*} As $\lambda_1>e_1$, we have $\lambda_1-e_1>0$. and so $t_1$ divides the left-hand side of the equation. But by the fundamental theorem of arithmetic if $t_1$ divides the left-hand side it must also divide the right-hand side and so would appear in the factorisation, but it is not in the factorisation of the right-hand side a contradiction. So $\lambda_i\leq\sigma_i$ for all $1\leq i\leq v$. \end{enumerate} Therefore $d\leq D$ As $D\leq d$ and $d\leq D$ we must have that $d=D$. As required. $\qed$ \end{enumerate} \end{proposition} Proposition \ref{prop:NT_gcd_can_be_computed_by_primes} allows us to compute the greatest common divisor by considering the prime factorisations, rather than using the Euclidean algorithm. Unfortunately, we now have a new problem, how do we compute the prime factorisation of an integer? Thankfully to answer this question we have to answer the original question posed, what $x\in\mathbb{Z}$ are such that $x^2=y$ for some $y\in\mathbb{Z}$? Clearly if $x\in\mathbb{Z}$ then $x$ has some prime factorisation, say \begin{equation*} x=p_1^{e_1}p_2^{e_2}p_3^{e_3}\dots p_k^{e_k} \end{equation*} So that \begin{align*} x^2&=\left(p_1^{e_1}p_2^{e_2}p_3^{e_3}\dots p_k^{e_k}\right)\left(p_1^{e_1}p_2^{e_2}p_3^{e_3}\dots p_k^{e_k}\right)\\ &=\left(p_1^{e_1}p_1^{e_1}\right)\left(p_2^{e_2}p_2^{e_2}\right)\left(p_3^{e_3}p_3^{e_3}\right)\dots\left(p_k^{e_k}p_k^{e_k}\right)\\ &=p_1^{2e_1}p_2^{2e_2}p_3^{2e_3}\dots p_k^{2e_k}=y \end{align*} For each prime $p_i$, the power of that prime is now of the form $2e_i$ and therefore the power is even. We make this fact a definition. \begin{definition}{Square number}\label{def:NT_square_number} Let $y\in\mathbb{Z}$ where $y>0$, if there exists an $x\in\mathbb{Z}$ so that \begin{equation*} x^2=y \end{equation*} Then we say that $y$ is a square number. \end{definition} In light of the above discussion, we have the following result. \begin{proposition}{Square number if and only if prime factorisation has even powers}\label{prop:NT_square_number_iff_prime_exonents_even} Let $x\in\mathbb{Z}$. We have that $x$ is a square number if and only if the prime factorisation of $x$ only contains even prime powers. This is to say that each prime $p_i$ in the factorisation of $x$ has an exponent of the form $2e_i$. Proof: $\left(\Rightarrow\right)$: Suppose that $x$ is a square number, by definition there exists $y\in\mathbb{Z}$ so that $y^2=x$. Let the prime factorisation of $y$ be \begin{equation*} y=q_1^{f_1}q_2^{f_2}q_3^{f_3}\dots q_k^{f_k} \end{equation*} We have that then \begin{equation*} x=y^2=q_1^{2f_1}q_2^{2f_2}q_3^{2f_3}\dots q_k^{2f_k} \end{equation*} Hence all the prime factors of $x$ have an exponent of the form $2f_i$ making them even. $\left(\Leftarrow\right)$: Suppose that the prime factorisation of $x$ has prime factors which only have even powers, that is \begin{equation*} x=p_1^{e_1}p_2^{e_2}p_3^{e_3}\dots p_k^{e_k} \end{equation*} As each $e_i$ is even we have that $\displaystyle \frac{e_i}{2}\in\mathbb{Z}$. Define $y$ to be \begin{equation*} y=p_1^{e_1/2}p_2^{e_2/2}p_3^{e_3/2}\dots p_k^{e_k/2} \end{equation*} Where clearly $y\in\mathbb{Z}$. We then have that \begin{align*} y^2&=\left(p_1^{e_1/2}p_2^{e_2/2}p_3^{e_3/2}\dots p_k^{e_k/2}\right)\left(p_1^{e_1/2}p_2^{e_2/2}p_3^{e_3/2}\dots p_k^{e_k/2}\right)\\ &=\left(p_1^{e_1/2}p_1^{e_1/2}\right)\left(p_2^{e_2/2}p_2^{e_2/2}\right)\left(p_3^{e_3/2}p_1^{e_3/2}\right)\dots \left(p_k^{e_k/2}p_k^{e_k/2}\right)\\ &=p_1^{e_1}p_2^{e_2}p_3^{e_3}\dots p_k^{e_k}=x \end{align*} Hence as $x=y^2$ for some $y\in\mathbb{Z}$ we conclude that $x$ is a square number. $\qed$ \end{proposition} We also have an immediate proposition. \begin{proposition}{Product of two square numbers is a square number}\label{prop:NT_product_of_sqaure_numbers_is_sqaure_number} Let $x,y\in\mathbb{Z}$ be square numbers. We have that $xy$ is a square number. Proof: Let $x,y\in\mathbb{Z}$ be square numbers. We have by definition that $\exists a,b\in\mathbb{Z}$ so that \begin{align*} a^2&=x\\ b^2&=y \end{align*} Now, consider the product $xy$, we have \begin{equation*} xy=a^2*b^2=\left(ab\right)^2 \end{equation*} Hence by definition, $xy$ is a square number. $\qed$ \end{proposition} With proposition \ref{prop:NT_square_number_iff_prime_exonents_even} we can finally answer the question of what $x\in\mathbb{Z}$ are such that $x^2=y$ for some $y\in\mathbb{Z}$. It is those $x\in\mathbb{Z}$ so that $x^2$ is a square number! At first, this doesn't seem too useful as we can clearly take any $n\in\mathbb{Z}$ and see that $n^2\in\mathbb{Z}$. However, the real meaning of this result is actually the converse, given some $n\in\mathbb{Z}$ we can see if there is an $x\in\mathbb{Z}$ so that $x^2=n$. With this, we make a definition \begin{definition}{Square root function} Let $x\in\mathbb{Z}$ be a positive square number. We define the square root function, denoted by $\sqrt{}$ as follows \begin{align*} \sqrt{}:\mathbb{Z}&\rightarrow\mathbb{Z}\\ x&\mapsto \sqrt{x}=\begin{cases} n,\ \text{If } n^2=x\\ \text{Undefined otherwise} \end{cases} \end{align*} That is, we define the square root of an integer $x$ to be the integer $n$ that when squared gives $x$. \end{definition} In light of this definition, we have the following result. \begin{proposition}{Square root of product is product of square roots}\label{prop:NT_root_of_product_is_product_of_roots} Let $x,y\in\mathbb{Z}$ be square numbers. We have that \begin{equation*} \sqrt{xy}=\sqrt{x}\sqrt{y} \end{equation*} Proof: Let $x,y$ be as given. By proposition \ref{prop:NT_product_of_sqaure_numbers_is_sqaure_number} we have that $xy$ is a square number and so $\sqrt{xy}$ is well-defined. We need to show that \begin{equation*} \sqrt{xy}=\sqrt{x}\sqrt{y} \end{equation*} By definition, we suppose that $\sqrt{xy}=n$, where $n^2=xy$. Additionally, we can suppose that $\sqrt{x}=a$ where $a^2=x$ and $\sqrt{y}=b$ where $b^2=y$. Now, we have that \begin{equation*} \left(\sqrt{x}\sqrt{y}\right)^2=\left(ab\right)^2=a^2b^2=xy=n^2=\left(\sqrt{xy}\right)^2 \end{equation*} As $n^2=a^2b^2$ we have that $n=ab$. Hence we have that $\sqrt{xy}=\sqrt{x}\sqrt{y}$ as required. $\qed$ \end{proposition} The idea of a square number actually generalises, meaning the question of what $x\in\mathbb{Z}$ are such that $x^2=y$ for some $y\in\mathbb{Z}$ can be generalised to the question what $x\in\mathbb{Z}$ are such that $x^n=y$ for some $y\in\mathbb{Z}$ and every $n\in\mathbb{N}$. The generalisation works very similarly to how we got to square numbers. As before let $x\in\mathbb{Z}$ which has a factorisation \begin{equation*} x=p_1^{e_1}p_2^{e_2}p_3^{e_3}\dots p_k^{e_k} \end{equation*} Now, consider $x^n$, the factorisation is given by \begin{equation*} x=p_1^{ne_1}p_2^{ne_2}p_3^{ne_3}\dots p_k^{ne_k} \end{equation*} Hence the power of each prime $p_i$ is of the form $ne_i$. This is the defining characteristic for the next definition. \begin{definition}{$n$-th power number} Let $y\in\mathbb{Z}$ with $y>0$ and let $n\in\mathbb{N}$, if there exists an $x\in\mathbb{Z}$ so that \begin{equation*} x^n=y \end{equation*} We say that $y$ is the $n$-th power of $x$. We have already seen the case of $n=2$ where $y$ is called a square number. For $n=3$ we call $y$ a cube number. For $n>4$, there is no formal term hence the definition using the terminology of $n$-th power. \end{definition} The next step is to prove an equivalent proposition to \ref{prop:NT_square_number_iff_prime_exonents_even}. \begin{proposition}{$n$-th power number if and only if prime factorisation has multiples of $n$ powers}\label{prop:NT_nth_power_number_iff_prime_exonents_multiple_of_n} Let $x\in\mathbb{Z}$. We have that $x$ is a $n$-th power number if and only if the prime factorisation of $x$ only contains prime powers that are a multiple of $n$. this is to say that each prime $p_i$ in the factorisation of $x$ has an exponent of the form $ne_i$. Proof: $\left(\Rightarrow\right)$: Suppose that $x$ is a $n$-th power number, by definition there exists $y\in\mathbb{Z}$ so that $y^n=x$. Let the prime factorisation of $y$ be \begin{equation*} y=q_1^{f_1}q_2^{f_2}q_3^{f_3}\dots q_k^{f_k} \end{equation*} We have that then \begin{equation*} x=y^2=q_1^{nf_1}q_2^{nf_2}q_3^{nf_3}\dots q_k^{nf_k} \end{equation*} Hence all the prime factors of $x$ have an exponent of the form $nf_i$, meaning each prime power is a multiple of $n$. $\left(\Leftarrow\right)$: Suppose that the prime factorisation of $x$ has prime factors which only have multiples of $n$, that is \begin{equation*} x=p_1^{ne_1}p_2^{ne_2}p_3^{ne_3}\dots p_k^{ne_k} \end{equation*} As each $e_i$ is a multiple of $n$ we have that $\displaystyle \frac{e_i}{n}\in\mathbb{Z}$. Define $y$ to be \begin{equation*} y=p_1^{e_1/n}p_2^{e_2/n}p_3^{e_3/n}\dots p_k^{e_k/n} \end{equation*} Where clearly $y\in\mathbb{Z}$. We then have that \begin{align*} y^n&=\prod_{i=1}^n\left(p_1^{e_1/n}p_2^{e_2/n}p_3^{e_3/n}\dots p_k^{e_k/n}\right)\\ &=\prod_{j=1}^k\left(\prod_{i=1}^n\left(p_j^{e_j/n}\right)\right)\\ &=\prod_{j=1}^k\left(p_j^{e_j}\right)\\ &=p_1^{e_1}p_2^{e_2}p_3^{e_3}\dots p_k^{e_k}=x \end{align*} Hence as $x=y^n$ for some $y\in\mathbb{Z}$ we conclude that $x$ is an $n$-th power number. $\qed$ \end{proposition} As before, there is an immediate proposition. \begin{proposition}{Product of two $n-th$ power numbers is an $n$-th power number} Let $x,y\in\mathbb{Z}$ be $n$-th power numbers. We have that $xy$ is an $n$-th power number. Proof: Let $x,y\in\mathbb{Z}$ be $n$-th power numbers. By definition, we have that $\exists a,b\in\mathbb{Z}$ so that \begin{align*} a^n&=x\\ b^n&=y \end{align*} We have \begin{equation*} xy=a^n*b^n=\left(ab\right)^n \end{equation*} Giving the result. $\qed$ \end{proposition} We can now now generalise the square root function. \begin{definition}{$n$-th root function} Let $x\in\mathbb{Z}$ be a positive $n$-th power number. We define the $n$-th root function, denoted by $\displaystyle \sqrt[n]{}$ is given by \begin{align*} \sqrt[n]{}:\mathbb{Z}&\rightarrow\mathbb{Z}\\ x&\mapsto \sqrt[n]{x}=\begin{cases} m,\ \text{If } m^n=x\\ \text{Undefined otherwise} \end{cases} \end{align*} That is, we define the $n$-th root of an integer $x$ to be the integer $m$ that when raised to the power of $n$ gives $x$. \end{definition} \pagebreak \section{The integers modulo n}\epigraph{Mathematicians call it “the arithmetic of congruences.” You can think of it as clock arithmetic}{\textit{John Derbyshire}} So far in the study of the divisibility of integers, we have considered what it means for an integer $a$ to divide another $b$, namely we have that $a\divides b$ if there is some $c\in\mathbb{Z}$ such that $ac=b$. We now explore the implications of the case where $a\notdivides b$, in particular, we look at the the remainders from the division algorithm. \subsection{Remainders after division} Recall that for $a,b\in\mathbb{Z}$ we have that $a\divides b$ if $\exists c\in\mathbb{Z}$ so that $b=ac$. When this is not the case we have that $a\notdivides b$. By the division algorithm, when $a\notdivides b$ we have that $0a$. We have by the division algorithm that \begin{equation*} b=2q+r \end{equation*} Hence $r$ can only be one of $0$ or $1$. Now if $r=0$ then we must have that $b$ is an even number and if $r=1$ we must have that $b$ is an odd number. Then as $b$ is an arbitrary integer we must have that dividing any integer by $2$ will give us all of the possible remainders as an integer $x\in\mathbb{Z}$ is either even or odd. \end{example} \begin{example} Let $a=3$ and consider some $b>a$. By the division algorithm we have that $r$ is either $0$, $1$ or $2$. Like before, if $r=0$ then $b$ is a multiple of $3$ so that $b=3q$. Now, suppose $b$ is a multiple of $3$. We have that $b+3$ is also a multiple of $3$ as \begin{equation*} b+3=3q+3\Rightarrow 3\left(q+1\right) \end{equation*} So, as $b$ is a multiple of $3$ and $b+3$ is a multiple of $3$ then these will give a remainder $r=0$ by the division algorithm. What can we say about $b+1$ and $b+2$? Using $b+1$ in the division algorithm with $3$ gives \begin{align*} b+1=3q+1 \end{align*} as $b=3q$. Hence the remainder is $1$. Likewise using $b+2$ in the division algorithm with $3$ gives a remainder of $2$. As $b$ was an arbitrary integer, we can conclude that the possible remainders when dividing an arbitrary integer by $3$ are $0, 1$ and $2$. All of the possibilities are realised for the division of an arbitrary integer. \end{example} \begin{example} Let $a=4$ and consider some $b>a$. The division algorithm gives the possible range of remainders of $0, 1, 2$ and $3$. Like the previous example, we see that if the remainder is $0$ then $b$ is a multiple of $4$, so similarly $b+4$ is a multiple of $4$. Looking at $b+1$, $b+2$ and $b+3$ we see by the division algorithm that \begin{align*} b+1=4q+1\\ b+2=4q+2\\ b+3=4q+3\\ \end{align*} So dividing an arbitrary integer by $4$ will give a remainder in the range $0$ to $3$ inclusive. \end{example} These examples suggest that when dividing an arbitrary integer $b$ by some $a\in\mathbb{Z}$ with $a>0$ will always give one value $r$ with $00$. We can prove this but first make an important observation. \begin{corollary}\label{cor:NT_integer_minus_remainder_is_divisable} Let $a,b\in\mathbb{Z}$ with $b>a$. Consider the division algorithm for $b$ divided by $a$, that is we have \begin{equation*} b=qa+r \end{equation*} for some $q,r\in\mathbb{Z}$ and $00$. If we have that $a$ and $b$ have the same remainder when divided by $n$ we say that $a$ and $b$ a congruent modulo $n$. This is denoted by \begin{equation*} a\equiv b \Mod{n} \end{equation*} We call $b$ a residue of $a$ modulo $n$. We usually say that $a$ is congruent to $b$ modulo $n$. We define a congruence to capture the notion of congruent numbers and residue numbers. We call the number $n$ the modulus of the congruence. If $a$ is not congruent to $b$, equivalently if $b$ is not a residue of $a$ we write $a\not\equiv b\Mod{n}$. \end{definition} We can make use of corollary \ref{cor:NT_integer_minus_remainder_is_divisable} to connect division to congruences. \begin{proposition}{Congruent if and only if the difference is divisible by modulus}\label{prop:NT_congruent_iff_difference_is_divisible} Let $a,b,n\in\mathbb{Z}$ and fix $n\geq 1$. We have that $a\equiv b\Mod{n}$ if and only if $n\divides\left(a-b\right)$. Proof: By the division algorithm, we have that \begin{align*} a&=qn+r\\ b&=q'n+r' \end{align*} for some $q,q',r,r'\in\mathbb{Z}$ where $00$ and $j-i0$ with a prime factorisation \begin{equation*} n=p_1^{e_1}p_2^{e_2}p_3^{e_3}\dots p_k^{e_k} \end{equation*} then we might expect that $a\equiv b\Mod{n}$ if and only if $a\equiv b\Mod{p_i^{e_i}}$ where $i=1,2,\dots, k$. We can prove this. \begin{proposition}{Congruent if and only if congruent to each prime in factorisation} Let $n\in\mathbb{Z}$ so that $n>0$ and $n$ has a prime factorisation given by \begin{equation*} n=p_1^{e_1}p_2^{e_2}p_3^{e_3}\dots p_k^{e_k} \end{equation*} Let $a,b\in\mathbb{Z}$. We have that $a\equiv b\Mod{n}$ if and only if $a\equiv b\Mod{p_i^{e_i}}$ for each $i$ where $i=1,2,\dots, k$ Proof: Let $n\in\mathbb{Z}$ be as given in the hypothesis. We have that \begin{align*} a\equiv b\Mod{n} &\iff n\divides\left(a-b\right)\\ &\iff p_1^{e_1}p_2^{e_2}p_3^{e_3}\dots p_k^{e_k}\divides\left(a-b\right)\\ &\iff p_i^{e_i}\divides\left(a-b\right),\ \text{For each } i=1,2,\dots, k\\ &\iff a\equiv b\Mod{p_i^{e_i}},\ \text{For each } i=1,2,\dots, k \end{align*} As required. $\qed$ \end{proposition} Another use of congruences is in cryptography, which is a field of study of taking messages and encoding (obfuscating) them in such a way that only the person the message was intended for can read it. This is especially true for the RSA\footnote{RSA stands for Rivest–Shamir–Adleman} encryption method. We already have some of the mathematical machinery required to explore how this method of cryptography works, namely prime numbers and congruences. On the other hand, we still lack some important theory. If cryptography is the field of encoding messages so that only the person the message was intended for can read it, then there is some method that encodes the message and a method that decodes the message using some information known to both the sender and recipient. This means that using this information the recipient will have some method of finding out the original message! We look at this idea in more detail. \pagebreak \section{Diophantine equations and Polynomials}\epigraph{I had a Polynomial once. My Doctor removed it.}{\textit{Micheal Grant}} We start with a definition that we have seen numerous times so far but have not formally defined. That of an equation. \begin{definition}{Equation} An equation is a mathematical statement that states that two expressions are equal. \end{definition} This seems simple enough, but what does it mean? Unfortunately, this depends on the situation, different situations will have a different meaning of what a statement is. Thankfully, we have seen equations already throughout the text so this abstract definition is familiar to us. For example \begin{equation*} 1+1=2 \end{equation*} is an equation. So is $\Gcd\left(a,b\right)=d$, in a similar vain we have from Bézout's Identity that $d=ax+by$ is also an equation. So why define something if it is really this simple? Simply put, we can use the idea of an equation in a more complex way. For example, \begin{equation*} 1+x=2 \end{equation*} says that $1$ plus $x$ is equal to $2$ but we don't know what $x$ is. However, we can see that \begin{align*} 1+x&=2\\ x&=1 \end{align*} That is, we see that $x=1$, this is an equation! This is where the power of an equation starts to show its worth. If we have a problem where we don't know the value of some quantity of interest, we might be able to work out what that quantity is. We have seen more complex examples of equations, for example $x^2=2$ which we have shown has no value of $x\in\mathbb{Q}$ where it is true. Hence, equations that contain a value, or maybe multiple values that we don't know but want to know, are important. This section is focused on looking at such equations. We make another couple of definitions for when an equation contains a value we don't know. \begin{definition}{Variable} A variable is a value that is allowed to be changed either freely or restricted by some constraint or equation. A variable can be taken to be any meaningful value, either inside or outside of some set $S$. The context of the statement under study usually makes it clear where the variable belongs. \end{definition} \begin{definition}{Indeterminate variable} An indeterminate variable is a variable value which has not been specified. As with a variable, it could be inside or outside of some set $S$. \end{definition} \begin{definition}{An unknown variable} An unknown variable, or simply an unknown, is a variable whose value is unknown but we wish to find its value. As before, this unknown variable is to be taken as a member of a set $S$. If a value for the unknown variable can be found, we call it a solution to the equation. \end{definition} For example, the equation $5x+1=2$ would have $x$ as the indeterminate variable, if we were solving for $x$ then $x$ would be the unknown variable as well. The equation $2x+5y=6$ has two indeterminate variables, $x$ and $y$. We can potentially have many indeterminate variables in an equation. Moreover, in many problems, we will have a certain type of variable whose value can vary but is not the unknown that we are looking to solve for. We define this type of variable as well. \begin{definition}{Coefficient} A variable which can vary but is not the variable that is being solved for is called a coefficient, or a parameter of the equation. \end{definition} So, let's start simply and consider the simplest equation possible with one unknown variable and two coefficients. \begin{equation*} x+a=b \end{equation*} This is simple to solve for the unknown $x$, simply take $a$ from both sides to give $x=b-a$. So for example if we let $a,b\in\mathbb{Z}$ say with $a=5$ and $b=3$, then we see that $x\in\mathbb{Z}$ with $x=3-5=-2$. This is also true if we take $a,b\in\mathbb{Q}$. A more complex form of the above equation is \begin{equation*} ax+b=c \end{equation*} Now we hit a problem we are looking for a solution $x\in\mathbb{Z}$. Firstly, we have that $ax=c-b$, but then a solution $x\in\mathbb{Z}$ can occur if and only if $a\divides\left(b-c\right)$. If we look for a solution where $x\in\mathbb{Q}$ then no such problem occurs. Therefore, the set that we are looking for solutions in is crucial in solving equations. With our current theory, the situation gets more hopeless the more complicated the equation becomes. For example, if we consider the equation \begin{equation*} 4x^2+2x+3=0 \end{equation*} Does this equation have solutions in $\mathbb{Z}$? How about $\mathbb{Q}$?. Additionally, what happens if we have more than one equation or unknowns? For example, consider the two equations given by \begin{align*} 4x+2y&=6\\ -2x+5y&=7 \end{align*} How do we solve equations like this? This section aims to answer questions like these. We make a final definition, a special case for when we only seek integer solutions. \begin{definition}{Diophantine equation} An equation for which the solutions have to be integers is called a Diophantine equation\footnote{Named after the 3rd-century mathematician Diophantus of Alexandria}. \end{definition} \subsection{Linear Diophantine equations} \subsubsection{Linear equations with two variables} We start where the previous section left off, by looking at the simplest type of equation that can be solved. \begin{definition}{Linear equation of a single indeterminate variable} Let $S$ be a set. We say an equation is a linear equation in a single variable $x$ if it has the form \begin{equation*} ax+b=c \end{equation*} for some coefficients $a,b,c\in S$ and an indeterminate variable $x$. In particular as this equation only has one indeterminate variable we say it is a single-variable linear equation. \end{definition} We have already seen that solutions to this equation exist in $\mathbb{Z}$ if and only if $a\divides\left(c-b\right)$, and a solution always exists if we want $x\in\mathbb{Q}$. Things are a bit more interesting if we introduce a second variable. \begin{definition}{Linear equation of two indeterminate variables} Let $S$ be a set. We say an equation is a linear equation in two variables $x,y$ if it has the form \begin{equation*} ax+by=c \end{equation*} for some coefficients $a,b,c\in S$ and indeterminate variables $x$ and $y$. \end{definition} We have seen this type of equation before, in Bézout's Identity (Theorem \ref{thm:NT_bezout_id}). In Bézout's Identity, we have that the greatest common divisor, $d$, of two integers $a,b$ can be expressed as \begin{equation*} ax+by=d \end{equation*} for some $x,y\in\mathbb{Z}$. This gives us examples of already solved equations, but what about the other way? Given an equation of the form \begin{equation*} ax+by=c \end{equation*} with $a,b,c\in\mathbb{Z}$ given, can we find integer values for $x$ and $y$?. That is, we are considering $ax+by=c$ to be a Diophantine equation. If the reader is sufficiently alert, they will notice that by mentioning Bézout's Identity we are hinting that it will be crucial to finding the solutions. We know of one solution, namely if $\Gcd\left(a,b\right)=d$ and $c=d$ then the solution is found by the Euclidean algorithm. Now if $c$ were a multiple of $d$ can we find solutions? Recall proposition \ref{prop:NT_GCD_properties} part 4. We have that $\Gcd\left(a,b\right)=d$ is the smallest such so that $ax+by=d$, given that this is the smallest such then we can show that there exist others, namely these solutions are multiples of $d$. \begin{proposition}{Integer has form $ax+by$ if it is a multiple of the greatest common divisor of $a$ and $b$}\label{prop:NT_bezout_extension} Let $a,b\in\mathbb{Z}$ and $d=\Gcd\left(a,b\right)$. Let $c\in\mathbb{Z}$. We have that \begin{equation*} c=ax+by \end{equation*} if and only if $d\divides c$. Which is to say $c$ is a multiple of $d$ Proof: $\left(\Rightarrow\right)$: Clearly if $c=ax+by$ then as $d=\Gcd\left(a,b\right)$ we have by proposition \ref{prop:NT_divisibility_properties} part 3 that $d\divides c$. $\left(\Leftarrow\right)$: Suppose that $c=de$ for some $e\in\mathbb{Z}$. By Bézout's Identity, we have that $\exists u,v\in\mathbb{Z}$ so that \begin{equation*} d=au+bv \end{equation*} where $d=\Gcd\left(a,b\right)$. Multiplying both sides by $e$ we get \begin{equation*} c=aue+bve=ax+by \end{equation*} Hence $x=ue$ and $y=ve$. As required. $\qed$ \end{proposition} Armed with this proposition we can find the solutions to the Diophantine equation $ax+by=c$. \begin{proposition}{Solutions to the Diophantine equation $ax+by=c$}\label{prop:NT_solutions_to_two_var_linear_diophantine_equation} Let $a,b,c\in\mathbb{Z}$ be such that \begin{equation*} ax+by=c \end{equation*} for the indeterminate variables $x,y$ and let $d=\Gcd\left(a,b\right)$. We have that there are solutions so that $x,y\in\mathbb{Z}$ if and only if $d\divides c$. Moreover, there are infinitely many solutions where the solutions are given by \begin{align*} x&=x_0+\frac{bn}{d}\\ y&=y_0-\frac{an}{d} \end{align*} where $x_0,y_0\in\mathbb{Z}$ is one solution. Proof: The existence of a solution is given by proposition \ref{prop:NT_bezout_extension}. It is left to show that the suggested solutions $x,y$ are solutions and that there are infinitely many solutions. This follows the argument in example \ref{exam:NT_solutions_to_ax_plus_by}. We give the argument again to refresh the reader's memory. Let $x_0,y_0\in\mathbb{Z}$ be a solution, then we have that \begin{equation*} ax_0+by_0=c \end{equation*} For any $n\in\mathbb{Z}$ let \begin{align*} x&=x_0+\frac{bn}{d}\\ y&=y_0-\frac{an}{d} \end{align*} We then have that $\displaystyle\frac{bn}{d}\in\mathbb{Z}$ as $d\divides b$ by definition of the greatest common divisor, likewise for $\displaystyle\frac{ab}{d}$. Hence, we have that \begin{align*} ax+by&=a\left(x_0+\frac{bn}{d}\right)+b\left(y_0-\frac{an}{d}\right)\\ &=ax_0+a\frac{bn}{d}+by_0-b\frac{an}{d}\\ &=ax_0+\frac{abn}{d}+by_0-\frac{abn}{d}\\ &=ax_0+by_0=c\\ \end{align*} Hence $x,y$ is a solution. Moreover, as $n\in\mathbb{Z}$ is any integer we have shown that there are infinitely many solutions. It is left to show that these are the only solutions. Let $x,y\in\mathbb{Z}$ be any solution to $ax+by=c$, and let $x_0,y_0\in\mathbb{Z}$ be a particular solution. Hence \begin{equation*} ax+by=ax_0by_0 \end{equation*} Subtracting $ax_0by_0$ from the right-hand side gives \begin{align*} ax+by-ax_0by_0&=0\\ a\left(x-x_0\right)+b\left(y-y_0\right)&=0 \end{align*} Now, as $d=\Gcd\left(a,b\right)$ then we have that $d\divides a$ and $d\divides b$ so that \begin{align*} \frac{a}{d}\left(x-x_0\right)+\frac{b}{d}\left(y-y_0\right)&=0\\ \frac{a}{d}\left(x-x_0\right)&=-\frac{b}{d}\left(y-y_0\right) \end{align*} If $a=b=0$, we are done so suppose not. Then one of $a$ or $b$ is non-zero. Without loss of generality, suppose that $a\neq 0$. We have that by proposition \ref{prop:NT_GCD_properties} that if $\Gcd\left(a,b\right)=d$ then $\displaystyle\Gcd\left(\frac{a}{d},\frac{b}{d}\right)=1$, moreover by definition of co-prime integers we have that $\displaystyle\frac{a}{d}$ and $\displaystyle\frac{b}{d}$ are co-prime. By Euclid's lemma for co-primes (lemma \ref{lem:NT_Euclid_co_primes}) we have that $\displaystyle\frac{a}{d} \divides -\left(y-y_0\right)$. Hence there is some $n\in\mathbb{Z}$ so that \begin{equation*} -\left(y-y_0\right)=n\frac{a}{d} \end{equation*} Which is to say \begin{equation*} y=y_0-\frac{an}{d} \end{equation*} Similarly, we have that \begin{equation*} x=x_0+\frac{bn}{d} \end{equation*} As required. $\qed$ \end{proposition} \subsubsection{Linear equations with more than two variables} A natural question to ask now is what happens when we have more than two indeterminate variables? For example $ax+by+cz=e$? We can take some inspiration from the two variable case. Recall that for $ax+by=c$ with $d=\Gcd\left(a,b\right)$ that there are solutions with $x,y\in\mathbb{Z}$ if and only if $d\divides c$. More importantly, we have that if $d=\Gcd\left(a,b\right)$ then we can express $d$ by $d=ax+by$ for some $x,y\in\mathbb{Z}$ by Bézout's Identity. Moreover by proposition \ref{prop:NT_Divisor_dividing_all_in_set_divides_linear_combination} we have that for a set of $n$ integers $S=\left\{b_1,b_2,b_3,\dots,b_n\right\}$ and additionally we have that that $a\divides b_i$ for each $b_i\in S$ then \begin{equation*} a\divides \sum_{i=1}^n b_i x_i \end{equation*} This hints at an extension to Bézout's Identity, given a suitable extension to the definition of the greatest common divisor for more than two inputs. Hence, our goal is to build this suitable extension to the greatest common divisor. We will start by looking at some exploratory examples before moving on with the generalisation. \begin{example} Let $a=2, b=4$ and $c=6$. What is $\Gcd\left(a,b,c\right)$? Clearly, by inspection, we have that $2$ is the largest divisor of $a,b$ and $c$. In particular we have that $\Gcd\left(2,4\right)=2$ and $\Gcd\left(2,6\right)=2$. In other words, we have that \begin{equation*} \Gcd\left(2,4,6\right)=\Gcd\left(\Gcd\left(2,4\right),6\right) \end{equation*} Equivalently, we could have first considered $\Gcd\left(4,6\right)=2$ and then $\Gcd\left(2,2\right)=2$ so we have \begin{equation*} \Gcd\left(2,4,6\right)=\Gcd\left(2,\Gcd\left(4,6\right)\right) \end{equation*} \end{example} \begin{example} Let $a=3, b=6$ and $c=30$. What is $\Gcd\left(a,b,c\right)$? Breaking this problem down we have that $\Gcd\left(3,6\right)=3$, $\Gcd\left(3,30\right)=3$ and $\Gcd\left(6,30\right)=6$. As the greatest common divisor must divide all of the numbers we must conclude that $\Gcd\left(3,6,30\right)=3$. \end{example} \begin{example} Let $a=3, b=5$ and $c=7$. As $a,b$ and $c$ are all prime we clearly see that $\Gcd\left(a,b,c\right)=1$ \end{example} \begin{example} Let $a=14$, $b=35$, $c=7$ and $d=5$. We again break this down. We see that \begin{align*} \Gcd\left(14,33\right)&=7\\ \Gcd\left(14,7\right)&=7\\ \Gcd\left(14,5\right)&=1\\ \Gcd\left(35,7\right)&=5\\ \Gcd\left(35,5\right)&=7\\ \Gcd\left(7,5\right)&=1\\ \end{align*} Again the greatest common divisor is the smallest value that divides all of the inputs $a,b,c$ and $d$. The smallest such number here is $1$ so $\Gcd\left(14,35,7,5\right)=1$. \end{example} In these examples, we made use of the fact that the greatest common divisor of two numbers is the smallest number that divides both of the input numbers. We then looked at all of the possible combinations of the inputs and took the smallest value that occurred. This is to be consistent with two variable version of the $\Gcd$ that we have already developed. This was shown explicitly in the first example with \begin{equation*} \Gcd\left(2,4,6\right)=\Gcd\left(\Gcd\left(2,4\right),6\right)=\Gcd\left(2,\Gcd\left(4,6\right)\right) \end{equation*} Hence an immediate property that we can deduce is that the $\Gcd$ is associative, in the sense that computing the $\Gcd$ of three numbers is equivalent to computing the $\Gcd$ of two of the inputs with the remaining input. \begin{proposition}{$\Gcd$ is associative} Let $a,b,c\in\mathbb{Z}$. We have that \begin{equation*} \Gcd\left(a,\Gcd\left(b,c\right)\right)=\Gcd\left(\Gcd\left(a,b\right),c\right) \end{equation*} Proof: Let $x=\Gcd\left(a,\Gcd\left(b,c\right)\right)$ and $y=\Gcd\left(\Gcd\left(a,b\right),c\right)$, We need to show that $x\divides y$ and $y\divides x$ then we can conclude that $x=y$. As $x=\Gcd\left(a,\Gcd\left(b,c\right)\right)$ then by definition of the greatest common divisor, we have that $x\divides a$ and $x\divides \Gcd\left(b,c\right)$. Moreover as $x\divides\Gcd\left(b,c\right)$ then again by definition of the greatest common divisor we have that $x\divides b$ and $x\divides c$. As $x\divides a$ and $x\divides b$ then $x\divides\Gcd\left(a,b\right)$ and likewise $x\divides c$ so $x\divides\Gcd\left(\Gcd\left(a,b\right),c\right)$ by definition and so $x\divides y$. The proof that $y\divides x$ is similar. As $x\divides y$ and $y\divides x$ and $x>0$ and $y>0$ we conclude that $x=y$ as required. $\qed$ \end{proposition} To extend our definition of the greatest common divisor to more than two inputs, we will use the definition of the $\Gcd$ given by the decomposition of primes. That is to say, given $a,b\in\mathbb{Z}$, we know that there exists a set of primes \begin{equation*} T=\left\{t_1,t_2,\dots,t_v\right\} \end{equation*} So that $a$ and $b$ can be represented by a prime factorisation of primes $t_i\in T$. That is \begin{align*} a&=\prod_{i=1}^v t_i^{e_i}\\ b&=\prod_{i=1}^v t_i^{f_i}\\ \end{align*} We then have that the greatest common divisor is given by \begin{equation*} \Gcd\left(a,b\right)=t_1^{\min\left(e_1,f_1\right)}t_2^{\min\left(e_2,f_2\right)}t_3^{\min\left(e_3,f_3\right)}\dots t_v^{\min\left(e_v,f_v\right)} \end{equation*} Firstly, we will extend the result of proposition \ref{prop:NT_express_primes_in_common_basis} to the case of $n$ integers, the proof is similar to proposition \ref{prop:NT_express_primes_in_common_basis}. \begin{proposition}{Expression of set of integers as powers of same primes}\label{prop:NT_General_express_primes_in_common_basis} Let $S=\left\{a_1,a_2,a_3,\dots,a_n\right\}$ be such that $a_i\in\mathbb{Z}$ and $a_i>2$ for $1\leq i\leq n$. For each $a_i$ let its prime factorisation be denoted by \begin{equation*} \mathlarger{a_i=\prod_{\substack{p_{\left(i,k\right)\divides a_i} \\ p_{\left(i,k\right)}\text{ is prime}}} p_{\left(i,k\right)}^{e_{\left(i,k\right)}}} \end{equation*} where $\left(i,k\right)$ is a index tuple with $i$ denoting one of the primes and $k$ denoting the $k$-th element of $a_i$'s prime factorisation. Then there exists a set of primes \begin{equation*} T=\left\{t_1,t_2,t_3\dots,t_v\right\} \end{equation*} with $t_12$, then we have that \begin{equation*} \min\left(\min\left(a_1,a_2,a_3,\dots,a_{k-1}\right),a_k\right) \end{equation*} is well-defined. We show that \begin{equation*} \min\left(\min\left(a_1,a_2,a_3,\dots,a_{k}\right),a_{k+1}\right) \end{equation*} is well-defined. Evaluating the inner $\min\left(a_1,a_2,a_3,\dots,a_{k}\right)$ we have by definition that \begin{equation*} \min\left(a_1,a_2,a_3,\dots,a_{k}\right)=\min\left(\min\left(a_1,a_2,a_3,\dots,a_{k-1}\right),a_k\right) \end{equation*} Which by hypothesis is well-defined. Hence $\min\left(a_1,a_2,a_3,\dots,a_{k}\right)=m$ for some $m\in\mathbb{Z}$. Hence we have that \begin{equation*} \min\left(\min\left(a_1,a_2,a_3,\dots,a_{k}\right),a_{k+1}\right)=\min\left(m,a_{k+1}\right) \end{equation*} Which is well-defined. Hence by induction, we have that the general minimum function on the integers is well-defined. $\qed$ \end{proposition} We also have the following proposition. \begin{proposition}{The general minimum function is associative}\label{prop:NT_general_min_function_on_integers_is_associative} Let $S=\left(a_1,a_2,a_3,\dots,a_n\right)\in\mathbb{Z}^n$ be a $n$-tuple of integers. We have that \begin{equation*} \min\left(\min\left(a_1,a_2,a_3,\dots,a_{n-1}\right),a_n\right)=\min\left(a_1,\min\left(a_2,a_3,\dots,a_{n-1},a_n\right)\right) \end{equation*} Proof: We argue by induction on $n$. The case $n=1$ has nothing to prove. Likewise for $n=2$, so we shall show it holds for $n=3$. That is \begin{equation*} \min\left(\min\left(a_1,a_2\right),a_3\right)=\min\left(a_1,\min\left(a_2,a_3\right)\right) \end{equation*} There are $6$ cases to consider. \begin{enumerate} \item $a_1\leq a_2\leq a_3$ \item $a_1\leq a_3\leq a_2$ \item $a_2\leq a_1\leq a_3$ \item $a_2\leq a_3\leq a_1$ \item $a_3\leq a_1\leq a_2$ \item $a_3\leq a_2\leq a_1$ \end{enumerate} \begin{enumerate} \item $a_1\leq a_2\leq a_3$: We have that \begin{align*} \min\left(\min\left(a_1,a_2\right),a_3\right)&=\min\left(a_1,a_3\right)=a_1\\ \min\left(a_1,\min\left(a_2,a_3\right)\right)&=\min\left(a_1,a_2\right)=a_1\\ \end{align*} \item $a_1\leq a_3\leq a_2$: \begin{align*} \min\left(\min\left(a_1,a_2\right),a_3\right)&=\min\left(a_1,a_3\right)=a_1\\ \min\left(a_1,\min\left(a_2,a_3\right)\right)&=\min\left(a_1,a_3\right)=a_1\\ \end{align*} \item $a_2\leq a_1\leq a_3$: \begin{align*} \min\left(\min\left(a_1,a_2\right),a_3\right)&=\min\left(a_2,a_3\right)=a_2\\ \min\left(a_1,\min\left(a_2,a_3\right)\right)&=\min\left(a_1,a_2\right)=a_2\\ \end{align*} \item $a_2\leq a_3\leq a_1$: \begin{align*} \min\left(\min\left(a_1,a_2\right),a_3\right)&=\min\left(a_2,a_3\right)=a_2\\ \min\left(a_1,\min\left(a_2,a_3\right)\right)&=\min\left(a_1,a_2\right)=a_2\\ \end{align*} \item $a_3\leq a_1\leq a_2$: \begin{align*} \min\left(\min\left(a_1,a_2\right),a_3\right)&=\min\left(a_1,a_3\right)=a_3\\ \min\left(a_1,\min\left(a_2,a_3\right)\right)&=\min\left(a_1,a_3\right)=a_3\\ \end{align*} \item $a_3\leq a_2\leq a_1$: \begin{align*} \min\left(\min\left(a_1,a_2\right),a_3\right)&=\min\left(a_2,a_3\right)=a_3\\ \min\left(a_1,\min\left(a_2,a_3\right)\right)&=\min\left(a_2,a_3\right)=a_3\\ \end{align*} \end{enumerate} Hence the base case is shown. Now suppose that the proposition holds for some $k>3$, that is \begin{equation*} \min\left(\min\left(a_1,a_2,a_3,\dots,a_{k-1}\right),k_n\right)=\min\left(a_1,\min\left(a_2,a_3,\dots,a_{k-1},a_k\right)\right) \end{equation*} we show that it holds for $k+1$, i.e. \begin{equation*} \min\left(\min\left(a_1,a_2,a_3,\dots,a_{k}\right),a_{k+1}\right)=\min\left(a_1,\min\left(a_2,a_3,\dots,a_{k},a_{k+1}\right)\right) \end{equation*} We have by evaluating the inner minimum of the left-hand side we get \begin{equation*} \min\left(a_1,a_2,a_3,\dots,a_{k}\right)=\min\left(\min\left(a_1,a_2,a_3,\dots,a_{k-1}\right),a_{k}\right) \end{equation*} And so by the induction hypothesis, we have that \begin{align*} \min\left(\min\left(a_1,a_2,a_3,\dots,a_{k}\right),a_{k+1}\right)&=\min\left(\min\left(\min\left(a_1,a_2,a_3,\dots,a_{k-1}\right),a_{k}\right),a_{k+1}\right)\\ &=\min\left(\min\left(a_1,\min\left(a_2,a_3,\dots,a_{k-1},a_{k}\right)\right),a_{k+1}\right),\ \text{Induction hypothesis}\\ \end{align*} As $\min\left(a_2,a_3,\dots,a_{k-1},a_{k}\right)$ is well-defined by proposition \ref{prop:NT_general_min_on_integers_is_well_defined} then $\min\left(a_2,a_3,\dots,a_{k-1},a_{k}\right)=M$ say where $M\in\mathbb{Z}$. Therefore, on substituting $\min\left(a_2,a_3,\dots,a_{k-1},a_{k}\right)$ for $M$ for ease of reading we have \begin{align*} \min\left(\min\left(a_1,\min\left(a_2,a_3,\dots,a_{k-1},a_{k}\right)\right),a_{k+1}\right)&=\min\left(\min\left(a_1,M\right),a_{k+1}\right)\\ &=\min\left(a_1,\min\left(M,a_{k+1}\right)\right)\\ &=\min\left(a_1,\min\left(\min\left(a_2,a_3,\dots, a_{k-1},a_{k}\right),a_{k+1}\right)\right)\\ &=\min\left(a_1,\min\left(a_2,a_3,\dots,a_{k},a_{k+1}\right)\right) \end{align*} The result now follows by induction. $\qed$ \end{proposition} Proposition \ref{prop:NT_general_min_function_on_integers_is_associative} is a useful proposition, it allows us to discard the cumbersome notation of the definition of the general minimum function on the Integers. That is to say, we can now simply, and more easily write \begin{equation*} \min\left(a_1,a_2,a_3,\dots,a_n\right) \end{equation*} For convenience, we also define the minimum function for a subset of $n$ integers. \begin{definition}{General minimum function for a subset of integers} Let $A=\left\{a_1,a_2,a_3,\dots,a_n\right\}\subset\mathbb{Z}$ be a subset of $n$ integers. Let $S=\left(a_1,a_2,a_3,\dots,a_n\right)\in A^n$. We define the minimum of the set of integers $A$ by \begin{equation*} \min\left(A\right)=\min\left(S\right)=\min\left(a_1,a_2,a_3,\dots,a_n\right) \end{equation*} That is, we simply take the element of $A^n$ which corresponds to the set. \end{definition} \begin{example} Let $A=\left\{2,3\right\}$. We have that \begin{equation*} A^2=\left\{\left(2,2\right), \left(2,3\right), \left(3,2\right),\left(3,3\right)\right\} \end{equation*} We have that $S=\left(2,3\right)\in A^2$ and \begin{equation*} \min\left(A\right)=\min\left(S\right)=\min\left(2,3\right)=2 \end{equation*} \end{example} We have all the ingredients required to extend the $\Gcd$ function. We use a method similar to how we extended the minimum function. \begin{definition}{Generalised greatest common divisor} Let $S=\left(a_1,a_2,a_3,\dots,a_n\right)\in\mathbb{Z}^n$ be a $n$-tuple of integers. We define the greatest common divisor function on $S$ by \begin{align*} \Gcd:\mathbb{Z}^n&\rightarrow\mathbb{Z}\\ S&\mapsto\Gcd\left(S\right)=\begin{cases} a_1,\ &\text{If } n=1\\ \Gcd\left(a_1,a_2\right),\ &\text{If } n=2\\ \Gcd\left(\Gcd\left(a_1,a_2,a_3,\dots,a_{n-1}\right),a_n\right),\ &\text{If } n\geq 3\\ \end{cases} \end{align*} \end{definition} We show that this is well-defined. \begin{proposition}{Generalised greatest common divisor function for the integers is well-defined}\label{prop:NT_general_gcd_on_integers_is_well_defined} Let $S=\left(a_1,a_2,a_3,\dots,a_n\right)\in\mathbb{Z}^n$ be a $n$-tuple of integers. We have that $\gcd\left(S\right)$ is well-defined. Proof: The argument is by induction on $n$. The base case is $n=2$ which is well-defined by theorem \ref{thm:NT_gcd_exists}. Now suppose the result is true for some $k>2$, that is \begin{equation*} \Gcd\left(\Gcd\left(a_1,a_2,a_3,\dots,a_{k-1}\right),a_k\right) \end{equation*} is well-defined. We show that \begin{equation*} \Gcd\left(\Gcd\left(a_1,a_2,a_3,\dots,a_{k}\right),a_{k+1}\right) \end{equation*} is well-defined. Evaluating the inner $\Gcd\left(a_1,a_2,a_3,\dots,a_{k}\right)$ we have by definition that \begin{equation*} \Gcd\left(a_1,a_2,a_3,\dots,a_{k}\right)=\Gcd\left(\Gcd\left(a_1,a_2,a_3,\dots,a_{k-1}\right),a_k\right) \end{equation*} Which by hypothesis is well-defined. Hence $\Gcd\left(a_1,a_2,a_3,\dots,a_{k}\right)=d$ for some $d\in\mathbb{Z}$. Hence we have that \begin{equation*} \Gcd\left(\Gcd\left(a_1,a_2,a_3,\dots,a_{k}\right),a_{k+1}\right)=\Gcd\left(d,a_{k+1}\right) \end{equation*} Which is well-defined. The result now follows by induction. $\qed$ \end{proposition} As with the minimum function, to avoid cumbersome notation we can show that the generalised greatest common divisor is associative. \begin{proposition}{Generalised $\Gcd$ is associative}\label{prop:NT_general_gcd_on_integers_is_associative} Let $S=\left(a_1,a_2,a_3,\dots,a_n\right)\in\mathbb{Z}^n$ be a $n$-tuple of integers. We have that \begin{equation*} \Gcd\left(\Gcd\left(a_1,a_2,a_3,\dots,a_{n-1}\right),a_n\right)=\Gcd\left(a_1,\Gcd\left(a_2,a_3,\dots,a_{n-1},a_n\right)\right) \end{equation*} Proof: We argue by induction on $n$. The cases of $n=1$ and $n=2$ are trivial, so we show it holds for $n=3$. Let $x=\Gcd\left(a_1,\Gcd\left(a_2,a_3\right)\right)$ and $y=\Gcd\left(\Gcd\left(a_1,a_2\right),a_3\right)$, We need to show that $x\divides y$ and $y\divides x$ then we can conclude that $x=y$. As $x=\Gcd\left(a_1,\Gcd\left(a_2,a_3\right)\right)$ then by definition of the greatest common divisor, we have that $x\divides a_1$ and $x\divides \Gcd\left(a_2,a_3\right)$. Moreover, as $x\divides\Gcd\left(a_2,a_3\right)$ then again by definition of the greatest common divisor we have that $x\divides a_2$ and $x\divides a_3$. As $x\divides a_1$ and $x\divides a_2$ then $x\divides\Gcd\left(a_1,a_2\right)$ and likewise $x\divides a_3$ so $x\divides\Gcd\left(\Gcd\left(a_1,a_2\right),a_3\right)$ by definition and so $x\divides y$. The proof that $y\divides x$ is similar. As $x\divides y$ and $y\divides x$ and $x>0$ and $y>0$ we conclude that $x=y$ as required. Now suppose the result is true for some $k>2$. That is \begin{equation*} \Gcd\left(\Gcd\left(a_1,a_2,a_3,\dots,a_{k-1}\right),a_k\right)=\Gcd\left(a_1,\Gcd\left(a_2,a_3,\dots,a_{k-1},a_k\right)\right) \end{equation*} we show that \begin{equation*} \Gcd\left(\Gcd\left(a_1,a_2,a_3,\dots,a_{k}\right),a_{k+1}\right)=\Gcd\left(a_1,\Gcd\left(a_2,a_3,\dots,a_{k},a_{k+1}\right)\right) \end{equation*} Evaluation of the inner $\Gcd$ of the left-hand side yields \begin{equation*} \Gcd\left(a_1,a_2,a_3,\dots,a_{k}\right)=\Gcd\left(\Gcd\left(a_1,a_2,a_3,\dots,a_{k-1}\right)a_{k}\right) \end{equation*} So by the induction hypothesis, we have that \begin{align*} \Gcd\left(\Gcd\left(a_1,a_2,a_3,\dots,a_{k}\right),a_{k+1}\right)&=\Gcd\left(\Gcd\left(\Gcd\left(a_1,a_2,a_3,\dots,a_{k-1}\right)a_{k}\right),a_{k+1}\right)\\ &=\Gcd\left(\Gcd\left(a_1,\Gcd\left(a_2,a_3,\dots,a_{k-1},a_{k}\right)\right),a_{k+1}\right),\ \text{By hypothesis}\\ \end{align*} As $\Gcd\left(a_2,a_3,\dots,a_{k-1},a_{k}\right)$ is well-defined by proposition \ref{prop:NT_general_gcd_on_integers_is_well_defined}, we have $\Gcd\left(a_2,a_3,\dots,a_{k-1},a_{k}\right)=d$ with $d\in\mathbb{Z}$. Hence we have \begin{align*} \Gcd\left(\Gcd\left(a_1,\Gcd\left(a_2,a_3,\dots,a_{k-1},a_{k}\right)\right),a_{k+1}\right)&=\Gcd\left(\Gcd\left(a_1,d\right),a_{k+1}\right)\\ &=\Gcd\left(a_1,\Gcd\left(d,a_{k+1}\right)\right)\\ &=\Gcd\left(a_1,\Gcd\left(\Gcd\left(a_2,a_3,\dots,a_{k-1},a_{k}\right),a_{k+1}\right)\right)\\ \end{align*} As required. $\qed$ \end{proposition} As with the minimum function, we can now simply write \begin{equation*} \Gcd\left(a_1,a_2,a_3,\dots,a_{n-1},a_n\right) \end{equation*} Likewise for convenience, we define the $\Gcd$ function for a subset of $n$ integers. \begin{definition}{General greatest common divisor function for a subset of integers} Let $A=\left\{a_1,a_2,a_3,\dots,a_n\right\}\subset\mathbb{Z}$ be a subset of $n$ integers. Let $S=\left(a_1,a_2,a_3,\dots,a_n\right)\in A^n$. We define the $\Gcd$ of the set of integers $A$ by \begin{equation*} \Gcd\left(A\right)=\Gcd\left(S\right)=\Gcd\left(a_1,a_2,a_3,\dots,a_n\right) \end{equation*} That is, we simply take the element of $A^n$ which corresponds to the set. \end{definition} \begin{example} Let $A=\left\{2,3\right\}$. We have that \begin{equation*} A^2=\left\{\left(2,2\right), \left(2,3\right), \left(3,2\right),\left(3,3\right)\right\} \end{equation*} We have that $S=\left(2,3\right)\in A^2$ and \begin{equation*} \Gcd\left(A\right)=\Gcd\left(S\right)=\Gcd\left(2,3\right)=1 \end{equation*} \end{example} We can now finally generalise the computation of the greatest common divisor from the prime factorisation of the inputs. \begin{proposition}{Generalised version of the greatest common divisor from prime factorisation}\label{prop:NT_general_gcd_can_be_computed_by_primes} Let $S=\left\{a_1,a_2,a_3,\dots,a_n\right\}\subset\mathbb{Z}$ be a set of integers so that at least one $a_i\neq 0$ for $1\leq i\leq n$. By proposition \ref{prop:NT_General_express_primes_in_common_basis}, we know that there exists a set of primes \begin{equation*} T=\left\{t_1,t_2,t_3,\dots,t_v\right\} \end{equation*} so that for each $a_i$ we have prime factorisations given by \begin{equation*} \mathlarger{a_i=\prod_{j=1}^v t_{j}^{f_{\left(i,j\right)}}} \end{equation*} For $1\leq i\leq n$. Define the family of sets for each $1\leq j\leq v$ \begin{equation*} P_j=\left\{f_{\left(i,j\right)} : 1\leq i\leq n\right\} \end{equation*} We have that the greatest common divisor $\Gcd\left(a_1,a_2,a_3,dots,a_n\right)$ is given by \begin{equation*} \Gcd\left(a_1,a_2,a_3,\dots,a_n\right)=t_1^{\min\left(P_1\right)}t_2^{\min\left(P_2\right)}t_3^{\min\left(P_3\right)}\dots t_v^{\min\left(P_v\right)} \end{equation*} Proof: The proof is similar to that of proposition \ref{prop:NT_gcd_can_be_computed_by_primes}. Let $S=\left\{a_1,a_2,a_3,\dots,a_n\right\}\subset\mathbb{Z}$ be as given so by proposition \ref{prop:NT_General_express_primes_in_common_basis} we have a set of primes \begin{equation*} T=\left\{t_1,t_2,t_3,\dots,t_v\right\} \end{equation*} so that for each $a_i$ we have prime factorisations given by \begin{equation*} \mathlarger{a_i=\prod_{j=1}^v t_{j}^{f_{\left(i,j\right)}}} \end{equation*} Now, let $d=\Gcd\left(a_1,a_2,a_3,\dots,a_n\right)$ and let $D = t_1^{\min\left(P_1\right)}t_2^{\min\left(P_2\right)}t_3^{\min\left(P_3\right)}\dots t_v^{\min\left(P_v\right)}$, we show that $d\leq D$ and $D\leq d$. Define $\sigma_j=\min\left(\left\{f_{\left(i,j\right)}: 1\leq i\leq n\right\}\right)$ for $1\leq j\leq v$. \begin{enumerate} \item $D\leq d$: By the definition of the minimum, we have that $\sigma_j\leq f_{\left(i,j\right)}$ for each $1\leq i\leq n$. Hence, for each $i$ and $j$ there exists $k_{\left(i,j\right)}\in\mathbb{Z}$ so that \begin{equation*} f_{\left(i,j\right)} = \sigma_j + k_{\left(i,j\right)} \end{equation*} So that $a_i$ can be expressed as \begin{align*} a_i&=\prod_{j=1}^v t_j^{f_{\left(i,j\right)}}\\ &=\prod_{j=1}^v t_j^{\sigma_j+k_{\left(i,j\right)}}\\ &=\prod_{j=1}^v t_j^{\sigma_j} t_j^{k_{\left(i,j\right)}}\\ &=\prod_{j=1}^v t_j^{\sigma_j} \prod_{j=1}^vt_j^{k_{\left(i,j\right)}}\\ &= D * \prod_{j=1}^vt_j^{k_{\left(i,j\right)}} \end{align*} As $a_i$ was arbitrary this argument holds for each $1\leq i\leq n$. Hence, we have that $D\divides a_i$ for each $i$, so $D$ is a common divisor of each $a_i$. We conclude that $D\leq d$. \item $d\leq D$: Suppose that $d\divides D$ then $\exists k\in\mathbb{Z}$ so that \begin{equation*} d=DK \end{equation*} Now, $k$ has a factorisation into primes by the fundamental theorem of arithmetic. Moreover, $k$ could have primes in common with $D$, so we can take those primes that are in common with $D$ and $k$ and place them into the factorisation of $D$. That is \begin{align*} d&=Dk\\ d&=t_1^{\sigma_1}t_2^{\sigma_1}t_3^{\sigma_3}\dots t_v^{\sigma_v}k\\ d&=t_1^{\lambda_1}t_2^{\lambda_1}t_3^{\lambda_3}\dots t_v^{\lambda_v}k'\\ \end{align*} Where $\lambda_j$ are the new values for each prime after extracting the primes in common with $D$ and $k$ into $D$. $k'$ are the primes that are not in common. We need to show that \begin{enumerate} \item $k'=1$ \item $\lambda_j\leq \sigma_j$ for all $1\leq j\leq v$ \end{enumerate} \begin{enumerate} \item $k'=1$: Suppose for a contradiction that $k'\neq 1$. As $d>0$ and $D>0$ then $k>0$ and so $k'>0$. Now as $k'\neq 1$ we have $k'>1$ and so by the fundamental theorem of arithmetic we have that $k'$ has a factorisation into primes, say \begin{equation*} k'=q_1^{r_1}q_2^{r_2}q_3^{r_3}\dots q_c^{r_c} \end{equation*} Now, no $q_l=t_j$ as $k'$ has no primes in common with $t_1^{\lambda_1}t_2^{\lambda_1}t_3^{\lambda_3}\dots t_v^{\lambda_v}$. Pick one of the primes in $k'$, say $q=q_l$ then $q\divides d$. Now as $d=\gcd\left(a_1,a_2,a_3,\dots,a_n\right)$ then we have $q\divides a_i$ for at least one $a_i$. This is a contradiction as then $q$ is one of the primes $t_j$. We conclude that $k'=1$ \item $\lambda_j\leq \sigma_j$ for all $1\leq j\leq v$: Suppose for contraction that $\lambda_j>\sigma_j$ for all $1\leq j\leq v$. Without loss of generality, take $j=1$, for if not re-label the primes. By definition of $\sigma_1$, we have that $\sigma_1=\min\left(\left\{f_{\left(i,1\right)}: 1\leq i\leq n\right\}\right)$, without loss of generality take $i=1$ as the case for the other values of $i$ are similar. We have that $\sigma_1=f_{\left(1,1\right)}$ and so $\lambda_1>f_{\left(1,1\right)}$. As $d$ is the greatest common divisor of $a_1$ then there is an $s\in\mathbb{Z}$ so that $ds=a$ where $s>0$ as both $a$ and $d$ are. Comparing the prime factorisations, we get that \begin{equation*} s*t_1^{\lambda_1}t_2^{\lambda_2}t_3^{\lambda_3}\dots t_v^{\lambda_v}=t_1^{f_{\left(1,1\right)}}t_2^{f_{\left(1,2\right)}}t_3^{f_{\left(1,3\right)}}\dots t_v^{f_{\left(1,v\right)}} \end{equation*} Dividing by $\displaystyle t_1^{f_{\left(1,1\right)}}$ we get that \begin{equation*} s*t_1^{\lambda_1-f_{\left(1,1\right)}}t_2^{\lambda_2}t_3^{\lambda_3}\dots t_v^{\lambda_v}=t_1^{f_{\left(1,1\right)}-f_{\left(1,1\right)}}t_2^{f_{\left(1,2\right)}}t_3^{f_{\left(1,3\right)}}\dots t_v^{f_{\left(1,v\right)}} \end{equation*} Where clearly $\displaystyle t_1^{f_{\left(1,1\right)}-f_{\left(1,1\right)}}=1$. So this can be re-written as \begin{equation*} s*t_1^{\lambda_1-f_{\left(1,1\right)}}t_2^{\lambda_2}t_3^{\lambda_3}\dots t_v^{\lambda_v}=t_2^{f_{\left(1,2\right)}}t_3^{f_{\left(1,3\right)}}\dots t_v^{f_{\left(1,v\right)}} \end{equation*} As $\lambda_1>f_{\left(1,1\right)}$ then $\lambda_1-f_{\left(1,1\right)}>0$ and so $t_1$ divides the left-hand side of the equation. By the fundamental theorem of arithmetic, $t_1$ divides the left-hand side it must also divide the right-hand side and therefore be in the factorisation. It is not in the factorisation on the right-hand side which is a contradiction. It follows $\lambda_j\leq\sigma_j$ for all $1\leq j\leq v$ \end{enumerate} Therefore we conclude that $d\leq D$. As $d\leq D$ and $D\leq d$ we have that $d=D$ and the result is shown. $\qed$ \end{enumerate} \end{proposition} These last few results were somewhat technical. To show that our new generalised $\Gcd$ works we give an example. \begin{example} We compute $\Gcd\left(54,78,35,144,50\right)$. By inspection of each of the numbers we have that \begin{align*} 54&=2*3^3\\ 78&=2*3*13\\ 35&=5*7\\ 144&=2^4*3^2\\ 50&=2*5^2 \end{align*} Hence, the set of primes $T$ is given by \begin{equation*} T=\left\{2,3,5,7,13\right\} \end{equation*} Now, by the proposition, we know that \begin{equation*} \Gcd\left(54,78,35,144,50\right)=t_1^{\min\left(P_1\right)}t_2^{\min\left(P_2\right)}t_3^{\min\left(P_3\right)}t_4^{\min\left(P_4\right)}t_5^{\min\left(P_5\right)} \end{equation*} Where $P_j$ will be the powers of the prime $t_j$ that appear in the factorisation of each of the inputs. Taking $t_1=2, t_2=3, t_3=5, t_4=7$ and $t_5=13$ we have \begin{align*} P_1&=\left\{1,1,0,4,1\right\}=\left\{0,1,4\right\}\\ P_2&=\left\{3,1,0,2,0\right\}=\left\{0,1,2,3\right\}\\ P_3&=\left\{0,0,1,0,2\right\}=\left\{0,1,2\right\}\\ P_4&=\left\{0,0,1,0,0\right\}=\left\{0,1\right\}\\ P_5&=\left\{0,1,0,0,0\right\}=\left\{0,1\right\}\\ \end{align*} From which it is clear that the minimum of every $P_j$ is $0$. So that \begin{equation*} \Gcd\left(54,78,35,144,50\right)=1 \end{equation*} \end{example} With a generalised $\Gcd$ function, we can extend Bézout's Identity. \begin{theorem}{Generalised Bézout's Identity}\label{thm:NT_general_bezout_idenity} Let $S=\left\{a_1,a_2,a_3,\dots,a_n\right\}\subset\mathbb{Z}$ be a set of integers so that at least one $a_i\neq 0$ for $1\leq i\leq n$. Consider $d=\Gcd\left(a_1,a_2,a_3,\dots ,a_n\right)$. Then, for $i\leq 1\leq n$ we have $\exists x_i\in\mathbb{Z}$ so that \begin{equation*} d=a_1x_1+a_2x_2+a_2x_2+\dots+a_nx_n=\sum_{i=1}^n a_ix_n \end{equation*} Proof: Let $S$ be as given by the hypothesis and let $d=\Gcd\left(a_1,a_2,a_3,\dots ,a_n\right)$. By definition, we have that as $d\divides a_i$ for each $1\leq i\leq n$ then by proposition \ref{prop:NT_Divisor_dividing_all_in_set_divides_linear_combination} we have that \begin{equation*} d\divides \sum_{i=1}^n a_ix_n \end{equation*} for any $x_i\in\mathbb{Z}$. Define the set $A$ by \begin{equation*} G=\left\{\sum_{i=1}^n a_ix_n : x_i\in\mathbb{Z}\right\} \end{equation*} Clearly, there are both positive and negative elements in $G$, additionally $0\in G$ by taking each $x_i=0$. Define $\Tilde{G}$ by \begin{equation*} \Tilde{G}=\left\{g\in G: g>0\right\} \end{equation*} It follows that $\Tilde{G}\subset\mathbb{Z}$ and so by the well-ordering principle it has a smallest element $\Tilde{g}$ of the form \begin{equation*} \Tilde{g}=\sum_{i=1}^n a_ix_n \end{equation*} We must show that $\Tilde{g}\divides a_i$ for each $i$. Suppose for contradiction and without loss of generality that $\Tilde{g}\notdivides a_1$. By the division algorithm, we have that \begin{equation*} a_1=q\Tilde{g}+r \end{equation*} with $0n\geq1$ where $k$ denotes the number of equations and $n$ denotes the number of indeterminate variables. That is, there are strictly more equations than unknowns. Let $a_{\left(i,k\right)}$ denote the $i$-th coefficient of the $k$-th equation. Let $b_k\in\mathbb{{Z}}$. We say that the system is given by % \begin{equation*} % \sum_{i=1}^n a_{\left(i,k\right)}x_i=b_k % \end{equation*} % is an over-determined system of equations. % \end{definition} % We have seen one example where an over-determined system can have a solution, namely the system % \begin{align*} % 4x+2y&=6\\ % 3x+y&=5\\ % 7x+7y&=7 % \end{align*} % had the solution $x=2$ and $y=-1$\footnote{If we had a theory of Geometry we could assign this case to the geometric interpretation of three lines intersecting at the same point}. Interestingly we have that % \begin{equation*} % 4x+2y-\left(3x+y\right)-\frac{1}{7}\left(7x+7y\right)=x+y-\left(x+y\right)=0 % \end{equation*} % Whereas in the other system given by % \begin{align*} % 4x+2y&=6\\ % 3x+y&=5\\ % -x+6y&=11 % \end{align*} % was inconsistent. This makes sense if we stop and think about what an equation in a system of equations is trying to say. We can think of an equation in a system of equations as defining a relationship between the variables. For example, $4x+2y=6$ is a relationship which states that for $x,y\in\mathbb{Z}$ we have that $4x+2y=6$. In a sense, this equation constrains the possible values for the variables $x$ and $y$. Adding another equation is the same as adding an additional constraint that the variables must satisfy. Therefore it seems plausible that we can get to a point where we have too many constraints on a given system. This is exactly what happened with the system % \begin{align*} % 4x+2y&=6\\ % 3x+y&=5\\ % -x+6y&=11 % \end{align*} % So why then does the system % \begin{align*} % 4x+2y&=6\\ % 3x+y&=5\\ % 7x+7y&=7 % \end{align*} % have a solution? Recall that we were able to express that % \begin{equation*} % 4x+2y-\left(3x+y\right)-\frac{1}{7}\left(7x+7y\right)=x+y-\left(x+y\right)=0 % \end{equation*} % This is telling us that $4x+2y-\left(3x+y\right)=x+y$. Hence the third equation is not a new constraint! This is interesting enough to deserve a definition, we first give a useful general definition that applies to both the integers and rational numbers. % \begin{definition}{Linear combination of rational numbers} % Let $n\in\mathbb{Z}$ where $n\geq 1$ and let $a_i,b_i\in\mathbb{Q}$ for $1\le i\leq n$. We say that the sum % \begin{equation*} % \sum_{i=1}^n a_ib_i % \end{equation*} % is a linear combination of the $a_i$ with coefficients $b_i$, equivalently we can say that this is a linear combination of the $b_i$ with coefficients $a_i$. It is called a linear combination as the summation only involves the product of two rationals neither of which are raised to any powers, % \end{definition} % We have seen examples of this before, for example in theorem \ref{thm:NT_bezout_id} and theorem \ref{thm:NT_general_bezout_idenity} in the Bézout's identities. This means we can view the greatest common divisors in these theorems as linear combinations of elements in $\mathbb{Z}$. This notion extends to Diophantine equations. We first make a definition. % \begin{definition}{Set of all Diophantine equations in two integer variables} % We define the set of all Diophantine equations in two integer variables $x,y$, which we will denote by $\mathbb{E}_2$, as the set % \begin{equation*} % \mathbb{E}_2=\left\{ax+by=c:a,b,c\in\mathbb{Z}, \text{ and }\left(a,b\right)\neq\left(0,0\right) \text{ unless } c = 0\right\} % \end{equation*} % We denote an element of $\mathbb{E}_2$ by $f\left(x,y\right)=ax+by=c$ where $c$ is an arbitrary constant. For shorthand, we write $f\left(x,y\right)=c$, with the understanding that $f\left(x,y\right)=ax+by$. % For brevity, we write this as $f=ax+by=c$. We call the equation $0x+0y=0$ the zero-equation of $\mathbb{E}_2$ which we will denote $0_{\mathbb{E}_2}$. All other elements of $\mathbb{E}_2$ are called non-zero equations. % \end{definition} % Clearly, $\mathbb{E}_2\neq\emptyset$. We now extend the definition of a linear combination to Diophantine equations. % \begin{definition}{Linear combination of Diophantine equations} % Let $\mathbb{E}_2$ denote the set of all Diophantine equations in two integer variables $x,y$. Let $n\in\mathbb{Z}$ be such that $n\geq 1$. Let $a_i\in\mathbb{Q}$ and $f_i\in\mathbb{E}_2$ for $1\leq i\leq n$. We define the sum % \begin{equation*} % \sum_{i=1}^n a_if_i % \end{equation*} % to be the linear combination of the equations $f_i$. % \end{definition} % This definition is sound. As an element of $\mathbb{E}_2$ has the form $f\left(x,y\right)=ax+by=d$ for some integers $a,b,d,x,y\in\mathbb{Z}$. So, for each $f_i$ there is some corresponding $d_i$ so that $f_i\left(x,y\right)=d_i$ and so we can replace each $f_i$ by $d_i$ in the summation. Giving us a summation over a product of a rational and an integer. % \begin{definition}{Linearly independent and linearly dependent equations} % Let $n\in\mathbb{Z}$ be such that $n\geq 1$. Let $a_i\in\mathbb{Q}$ and $f_i\in\mathbb{E}_2$ for $1\leq i\leq n$ so that not all of the $a_i$ are zero. If we have that % \begin{equation*} % \sum_{i=1}^n a_if_i =0 % \end{equation*} % then we say that the $f_i$ are linearly dependent. If there is no such linear combination, then we say that the $f_i$ are linearly independent. Here, $f_i$ refers to the left-hand side of the Diophantine equation, although as the general form of an element of $\mathbb{E}_2$ is $ax+by=c$, it equivalently can refer to the constant of $f_i$. If $D=\left\{f_1,f_2,\dots,f_n\right\}$, we say that $D$ is linearly independent if the $f_i$ are, and if there is a linear dependence betwen the $f_i$ we say that $D$ is linearly dependent. % \end{definition} % We now need to be careful. In the definition, we gave a finite collection of elements of $\mathbb{E}_2$, i.e. $f_i\in\mathbb{E}_2$ for $1\leq i\leq n$. We could just so happen to have two such elements of this collection being equal. Say, without loss of generality, $f_1=f_2$. But then we could always write, for example, $f_1$ as a linear combination of $f_2$. To satisfy the definition of linear dependence we don't need the other $f_i$ as the definition only requires that not all of the $a_i$ are zero. Indeed we have % \begin{equation*} % a_1f_1+a_2f_2=0 \iff a_1=-a_2 \iff a_2=-a_1 % \end{equation*} % Hence by definition, we have that our collection of $f_i$ is linearly dependent. Therefore we need a more specific construct when dealing with a collection of elements from $\mathbb{E}_2$. We can overcome these issues by using ordered $n$-tuple. For ease of notation, we will define a custom collection, called a list\footnote{Those familiar with programming languages such as Python will be familiar with a list}. % \begin{definition}{List} % Let $S$ be a set. A list of elements of $S$ is an ordered $n$-tuple of elements from $S$. We write such a list as % \begin{equation*} % L=\left[s_1,s_2,\dots, s_n\right] % \end{equation*} % where $s_1,s_2,\dots,s_n\in S$. We also define the case where $n=0$, the so-called empty list, is simply written as $\left[\;\right]$. If $S=\emptyset$ then the only definable list from $S$ is the empty list. % We use the notation $L\left[i\right]$ to refer to the element $s_i$ of the list. We also borrow the notation of $\in$ for use with lists. We say that $s_i\in L$ if and only if $s_i$ is the $i$-th element of the list. % \end{definition} % Hence, we have the following proposition % \begin{proposition}{List of elements of $\mathbb{E}_2$ with at least two elements equal is linearly dependent}\label{prop:NT_list_of_diophantine_equs_is_linearly_independent_iff_no_repeat_elements} % Let $L$ be a list of elements of $\mathbb{E}_2$. We have that $L$ is linearly independent if and only if no elements appears more than once. % Proof: % We that that % \begin{align*} % L\text{ is a list of linearly independent elements of } \mathbb{E}_2 &\iff \sum_{i=1}^n a_if_i = 0\\ % &\iff a_i=0,\ 1\leq i\leq n\\ % &\iff f_i\neq f_j,\ \forall i\neq j % \end{align*} % Where we have the last if and only if from the fact that if there were at least two equal elements in the list $L$, say $f_1=f_2$ then we could write % \begin{equation*} % a_1f_1+\left(-a_1\right)f_2=0 % \end{equation*} % which contradicts the assumption that $L$ was linearly independent. $\qed$ % \end{proposition} % This proposition tells us that if a system of equations contains the same equation at least twice, that system is necessarily linearly dependent. In the language of constraints we were using before, it means that a constraint has been specified twice! As this doesn't provide any information on the potential solutions, we can safely ignore any additional copies from the system. It is therefore useful to define a way to take a list, a collection that allows for repeats of elements, and to turn it into a set where we have to have unique elements. % \begin{definition}{A list to a set and the defining set of a system of equations} % Let $L$ be a list of elements from $\mathbb{E}_2$. We can define a set from $L$ by % \begin{equation*} % S=\left\{l_i: l_i\in L\right\} % \end{equation*} % That is, the set $S$ is the set of all the unique elements from the list $L$. In the context of systems of equations, we will call a set created in this way a ``defining set'' of the system of equations. % \end{definition} % We also have the following three immediate results. % \begin{proposition}{Set or list only containing the zero-equation of $\mathbb{E}_2$ is linearly dependent}\label{prop:NT_zero_two_variable_equation_is_linearly_dependent} % Let $S=\left\{0_{\mathbb{E}_2}\right\}$ be a set containing the zero-equation of $\mathbb{E}_2$, equivalently for the argument for lists, let $L=\left[0_{\mathbb{E}_2}\right]$. We have that $S$ is linearly dependent. % Proof: % We prove the set variant as the proof for a list is similar. Let $S$ be as in the hypothesis. By the definition of linear dependence, $S$ is linearly dependent if and only if $\exists a\in\mathbb{Q}$ so that % \begin{equation*} % a0_{\mathbb{E}_2}=0 % \end{equation*} % As $0_{\mathbb{E}_2}$ is identically the zero-equation by assumption, any $a\neq 0$ satisfies this. $\qed$ % \end{proposition} % \begin{proposition}{Set or list which contains the zero-equation of $\mathbb{E}_2$ is linearly dependent}\label{prop:NT_set_with_zero_two_variable_equation_is_linearly_dependent} % Let $S=\left\{f_1,f_2,\dots,f_n\right\}$ be a set containing of elements from $\mathbb{E}_2$ where $\exists i\in\mathbb{Z}$ with $1\leq i\leq n$ so that $f_i=0_{\mathbb{E}_2}$. We have that $S$ is linearly dependent. % Proof: % We prove the set variant as the proof for a list is similar. Let $S$ be as in the hypothesis. By the definition of linear dependence, $S$ is linearly dependent if and only if $\exists a_1,a_2,\dots,a_n\in\mathbb{Q}$ not all zero so that % \begin{equation*} % \sum_{k=1}^n a_if_i =0 % \end{equation*} % Clearly take $a_k=0$ for every $k\neq i$ with $1\leq k\leq n$ and $a_i$ to be an arbitrary rational, then we have that % \begin{equation*} % \sum_{k=1}^n a_if_i = a_i f_i = a_i 0_{\mathbb{E}_2}=0 % \end{equation*} % Showing $S$ is linearly dependent. % \end{proposition} % \begin{proposition}{Set or list containing only one non-zero equation of $\mathbb{E}_2$ is linearly independent}\label{prop:NT_non-zero_two_variable_equation_is_linearly_independent} % Let $f\in\mathbb{E}_2$ be such that $f=ax+by=c$. Let $S=\left\{f\right\}$, equivalently for the argument for lists, let $L=\left[f\right]$. We have that $f$ is linearly independent. % Proof: % Let $S$ be as in the hypothesis. By the definition of linear independence, we have $S$ is linearly independent if and only if for $k\in\mathbb{Q % }$ is such that % \begin{equation*} % kf=0\iff k=0 % \end{equation*} % As $f$ is not the zero-equation of $\mathbb{E}_2$, it has the form $ax+by=c$ with the possibility that $c=0$. Hence we have that % \begin{equation*} % kax+kby=0=0x+0y % \end{equation*} % That is we have $ka=0$ and $kb=0$. % If $a\neq 0$ and $b=0$, we see that we must have $k=0$ by \ref{prop:IntegersHaveNoZeroDivisors}. Likewise in the case $a=0$ and $b\neq 0$. Finally if $a\neq 0$ and $b\neq 0$ we still get $k=0$. In all cases we conclude that $k=0$ and the result follows. $\qed$ % \end{proposition} % We have the following proposition, based on the linear independence of a list of elements of $\mathbb{E}_2$. % \begin{proposition}{Linearly independent list if and only if no repeats and the defining set is linearly independent}\label{prop:NT_list_of_diophantine_equs_is_linearly_independent_iff_no_repeat_elements_and_working_set_is_linearly_independent} % Let $L$ be a list of elements from $\mathbb{E}_2$. We have that $L$ is linearly independent if and only if no element appears more than once and the defining set of $L$ is linearly independent. % Proof: % $\left(\Rightarrow\right)$: Suppose $L$ is a linearly independent list of elements of $\mathbb{E}_2$. Then by proposition \ref{prop:NT_list_of_diophantine_equs_is_linearly_independent_iff_no_repeat_elements} we have that the list contains no repeated elements. Hence, the defining set $D$ precisely contains the elements of $L$. As $L$ is linearly independent it follows that % \begin{equation*} % \sum_{i=1}^n a_if_i=0\iff a_i=0,\ 1\leq i\leq n % \end{equation*} % As $D$ contains exactly the elements of $L$ then this expression holds for $D$ and so by definition, $D$ is linearly independent. % $\left(\Leftarrow\right)$: Now, suppose that $L$ is a list of elements of $\mathbb{E}_2$ so that the elements of $L$ appear exactly once and that the defining set of $D$, is linearly independent. As $D$ is linearly independent, then we have that % \begin{equation*} % \sum_{i=1}^n a_if_i=0\iff a_i=0,\ 1\leq i\leq n % \end{equation*} % holds. Moreover, $L$ has no repeated elements. Hence % \begin{equation*} % \sum_{i=1}^n a_if_i=0\iff a_i=0,\ 1\leq i\leq n % \end{equation*} % holds for $L$ which is to say $L$ is linearly independent. $\qed$ % \end{proposition} % We also make another quick observation. % \begin{proposition}{Two non-zero equations are linearly dependent if and only if one is a multiple of the other}\label{prop:NT_two_non_zero_diophantine_equs_linaer_dependent_iff_one_is_multiple_of_other} % Let $D=\left\{f_1,f_2\right\}$ where $f_1,f_2\in\mathbb{E}_2$ and $f_1\neq 0_{\mathbb{E}_2}$ and $f_2\neq 0_{\mathbb{E}_2}$. We have that $D$ is linearly dependent if and only if $f_1=\lambda f_2$ for some $\lambda\in\mathbb{Q}$. % Proof: % $\left(\Rightarrow\right)$: Suppose that $D$ is linearly dependent, then $\exists \lambda_1,\lambda_2\in\mathbb{Q}$ not both zero so that % \begin{equation*} % \lambda_1 f_1 + \lambda_2 f_2 = 0 % \end{equation*} % In particular, we must have that both $\lambda_1$ and $\lambda_2$ are not zero as otherwise, say with $\lambda_1=0$ we have that $\lambda_2 f_2=0$ which is true if and only if $\lambda_2 = 0$, $f_2=0_{\mathbb{E}_2}$ or both. In the case $\lambda_2=0$ we contradict the assumption of linear dependence, and $f_2\neq 0_{\mathbb{E}_2}$ by assumption. % So, suppose that $\lambda_1\neq 0$ and $\lambda_2\neq 0$ then we have that that, say % \begin{equation*} % f_1=-\frac{\lambda_2}{\lambda_1}f_2=kf_2 % \end{equation*} % where $k\in\mathbb{Q}$, making $f_1$ a multiple of $f_2$. % $\left(\Leftarrow\right)$: Suppose that $f_1=\lambda f_2$ for some $\lambda\in\mathbb{Q}$, then we have % \begin{equation*} % f_1-\lambda f_2=0 % \end{equation*} % As $\lambda\in\mathbb{Q}$ we have $\displaystyle \lambda=\frac{a}{b}$ for some $a,b\in\mathbb{Z}$ where $b\neq 0$. Hence we have % \begin{align*} % f_1-\lambda f_2&=0\\ % f_1-\frac{a}{b}f_2&=0\\ % bf_1-af_2&=0\\ % \end{align*} % Now, $a\neq 0$ as otherwise we have $bf_1=0$ and as $b\neq 0$ we would be forced to conclude that $f_1=0_{\mathbb{E}_2}$ a contradiction. However, we have expressed $f_1$ and $f_2$ as a linear combination summing to $0$ and so by definition $D$ is linearly dependent. $\qed$ % \end{proposition} % We note that the list representation of a system of equations could be linearly dependent while the defining set representation of the system could be linearly independent. In a sense, the defining set representation removes copies of already specified equations. Recall these don't contribute to any new constraints. We explore some examples of the definition of linear independence to get a better feel for what it means. We also attempt to find a solution to the given equations to try and see if there is a relation between linear independence, linear dependence and the solvability of a system. By virtue of proposition \ref{prop:NT_two_non_zero_diophantine_equs_linaer_dependent_iff_one_is_multiple_of_other}, we focus our attention to the case where there are at least three equations. % \begin{example} % Let $f,g,h\in\mathbb{E}_2$ with % \begin{align*} % f&=x+y=4\\ % g&=7x-13y=9\\ % h&=8x-12y=13 % \end{align*} % We have that the equations are linearly dependent. Trivially we have $f+g=h$. Now, we see that $g-7f$ gives % \begin{equation*} % g-7f=7x-13y-7\left(x+y\right)=7x-13y-7x-7y=-20y=9-7\left(4\right)=-19 % \end{equation*} % Hence $-20y=-19$ so $\displaystyle y=\frac{19}{20}$, which gives $\displaystyle x=\frac{61}{20}$. Substituting these values into $h$ gives % \begin{equation*} % 8\left(\frac{61}{20}\right)-12y\left(\frac{19}{20}\right)=\frac{488}{20}-\frac{228}{20}=\frac{260}{20}=13 % \end{equation*} % Hence $\displaystyle x=\frac{61}{20}$ and $\displaystyle y=\frac{19}{20}$ is a solution to the system, although it is a rational solution and not an integer one. % \end{example} % \begin{example} % Let $f,g,h\in\mathbb{E}_2$ with % \begin{align*} % f&=4x+8y=12\\ % g&=-x+3y=2\\ % h&=18x-17y=1 % \end{align*} % To see if there is a linear dependence between $f$, $g$ and $h$, we check if we can express $af+bg=h$ for $a,b\in\mathbb{Q}$. We see that % \begin{equation*} % af+bg=12a+2b=1 % \end{equation*} % As $\Gcd\left(12,2\right)=2\notdivides 1$, the above equation does not have an integer solution by proposition \ref{prop:NT_solutions_to_two_var_linear_diophantine_equation}. However this does not stop us, we can attempt to find another combination of $f,g$ and $h$ where there is potentially a solution, say $af+bh=g$. We see that % \begin{equation*} % af+bh=12a+b=2 % \end{equation*} % This a solution as $\Gcd\left(12,1\right)=1\divides 2$. By the Euclidean algorithm, we see that a particular solution is given by % \begin{align*} % a&=0\\ % b&=2 % \end{align*} % with a general solution % \begin{align*} % a&=t\\ % b&=2-12t % \end{align*} % Substituting these values into $af+bh$ gives % \begin{align*} % af+bh&=t\left(4x+8y\right)+\left(2-12t\right)\left(18x-17y\right)\\ % &=4xt+8yt+\left(36-216t\right)x+\left(-34+204t\right)y\\ % &=\left(36-212t\right)x+\left(-34+212t\right)y=-x+3y % \end{align*} % From $36-212t=-1$ we see that $\displaystyle t=\frac{37}{212}$, likewise from $-34+212t=3$ we get $\displaystyle t=\frac{37}{212}$. We therefore have % \begin{align*} % a&=\frac{37}{212}\\ % b&=2-12\left(\frac{37}{212}\right)=-\frac{5}{53} % \end{align*} % Indeed we see that % \begin{align*} % \frac{37}{212}\left(4x+8y\right)-\frac{5}{53}\left(18x-17y\right)&=\frac{37}{53}x+\frac{74}{53}y-\frac{90}{53}x+\frac{85}{53}y\\ % &=\left(\frac{37}{53}-\frac{90}{53}\right)x+\left(\frac{74}{53}+\frac{85}{53}\right)y\\ % &=\left(\frac{-53}{53}\right)x+\left(\frac{159}{53}\right)\\ % &=-x+3y % \end{align*} % We can recover an integer-valued linear dependence. Simply multiply $\displaystyle \frac{37}{212}f-\frac{5}{53}h=g$ by $\Lcm\left(212,53\right)=212$. Indeed % \begin{equation*} % 212\left(\frac{37}{212}f-\frac{5}{53}h\right)=37f-20h=212g \Rightarrow 37f-212g-20h=0 % \end{equation*} % Clearly, $x=1$ and $y=1$ is the solution to this system. % \end{example} % \begin{example} % Let $f,g,h\in\mathbb{E}_2$ with % \begin{align*} % f&=-6x+2y=5\\ % g&=7x+3y=4\\ % h&=2x+3y=13 % \end{align*} % Is there a linear dependence between $f$, $g$ and $h$? It is enough to see if $f=ag+bh$ as if this is the case other linear dependencies can be found by re-arranging that equation. So let $a,b\in\mathbb{Q}$. We want to find the values of $a,b$ so that % \begin{equation*} % 5=-6x+2y=a\left(7x+3y\right)+b\left(2x+3y\right)=4a+13b % \end{equation*} % If we can find a solution to $4a+13b=5$ we are done. As $\Gcd\left(4,13\right)=1$ then a solution exists by proposition \ref{prop:NT_solutions_to_two_var_linear_diophantine_equation}. By the Euclidean algorithm, we get a particular solution of $a=-15$ and $b=5$. Indeed % \begin{equation*} % 4a+13b=4*-15+13*5=-60+65=5 % \end{equation*} % Using this particular solution we see that the general solution is given by % \begin{align*} % a&=-15+13t\\ % b&=5-4t % \end{align*} % Substituting the general solution into $ag+bh$ gives % \begin{align*} % ag+bh&=a\left(7x+3y\right)+b\left(2x+3y\right)\\ % &=\left(-15+13t\right)\left(7x+3y\right)+\left(5-4t\right)\left(2x+3y\right)\\ % &=\left(-105+91t\right)x+\left(-45+39t\right)y+\left(10-8t\right)x+\left(15-12t\right)y\\ % &=\left(-95+83t\right)x+\left(30+27t\right)y=-6x+2y\\ % \end{align*} % Hence we need $-6=-95+83t$ and $2=30+27t$. The first of these gives $\displaystyle t=\frac{89}{23}$ while the second gives $\displaystyle t=-\frac{28}{27}$. This is a problem, as $a$ and $b$ depend on the same value of $t$, moreover, $t$ is not even an integer! Hence there are no values for $a$ and $b$ so that $f=ag+bh$ and by definition $f$ is linearly independent of $g$ and $h$. % Now, we check to see if there are any solutions to the system. We have that % \begin{equation*} % f+3h=-6x+2y+3\left(2x+3y\right)=-6x+2y+6x+9y=11y=5+3\left(13\right)=44 % \end{equation*} % Hence, $11y=44$ or $y=4$. On substitution into $h$ we get $2x+12=13$ so that $\displaystyle x=\frac{1}{2}$. These values satisfy $f$ and $h$ however on substitution into $g$ we see that % substitution\begin{equation*} % 7x+3y=7\frac{1}{2}+3\left(4\right)=\frac{31}{2}\neq 4 % \end{equation*} % The system is inconsistent. % \end{example} % \begin{example} % In this example we will go the other way, from an inconsistent system we will see if we can find a linear dependence on the equations. % Let $f,g,h\in\mathbb{E}_2$ with % \begin{align*} % f&=-6x+2y=5\\ % g&=3x+y=-1\\ % h&=2x+3y=13 % \end{align*} % This system is inconsistent. To see this we first solve $f$ and $g$. We see that % \begin{equation*} % f+2g=-6x+2y+2\left(3x+y\right)=4y=5+2\left(-1\right)=3 % \end{equation*} % giving $\displaystyle y=\frac{3}{4}$. This gives % \begin{equation*} % 3x+y=3x+\frac{3}{4}=-1 \Rightarrow 3x=-\frac{7}{4} \Rightarrow x= -\frac{7}{12} % \end{equation*} % So $\displaystyle x= -\frac{7}{12}$ and $\displaystyle y=\frac{3}{4}$ solves both $f$ and $g$. Using these values of $x$ and $y$ in $h$ yields % \begin{equation*} % 2\left(-\frac{7}{12}\right)+3\left(\frac{3}{4}\right)=-\frac{7}{2}+\frac{9}{4}=\frac{13}{12}\neq 13 % \end{equation*} % Proving inconsistency. Is there a linear dependence on $f$, $g$ and $h$? Suppose that $h=af+bg$ for some $a,b\in\mathbb{Q}$. We have % \begin{equation*} % af+bg=5a-b=13 % \end{equation*} % Which is solvable as $\Gcd\left(5,1\right)=1\divides 13$. We have a particular solution given by $a=0$ and $b=-13$, and a general solution % \begin{align*} % a&=t\\ % b&=-13+5t % \end{align*} % Using this general solution we have % \begin{align*} % af+bg&=t\left(-6x+2y\right)+\left(-13+5t\right)\left(x+y\right)\\ % &=-6xt+2yt-13x-13y+5xt+5yt\\ % &=\left(-t-13\right)x+\left(7t-13\right)y=2x+3y % \end{align*} % Clearly then $-t-13=2$ and $7t-13=3$, which gives $t=-15$ and $\displaystyle t=\frac{16}{7}$. An inconsistency which shows that $f,g$ and $h$ are linearly independent. % \end{example} % \begin{example} % Let $f,g,h\in\mathbb{E}_2$ with % \begin{align*} % f&=4x+2y=6\\ % g&=3x+y=5\\ % h&=7x+7y=7 % \end{align*} % We have already seen that $h$ can be written as a linear combination of $f$ and $g$. We will apply the same method as the previous example, aiming to show this linear combination differently. So let $a,b\in\mathbb{Q}$ and suppose that % \begin{equation*} % h=af+bg % \end{equation*} % We have that % \begin{equation*} % 7=7x+7y=a\left(4x+2y\right)+b\left(3x+y\right)=6a+5b % \end{equation*} % As $\Gcd\left(6,5\right)=1$ there is a solution and by applying the Euclidean algorithm we see that a particular solution is $a=7$ and $b=-7$ giving a general solution % \begin{align*} % a&=7+5t\\ % b&=-7-6t % \end{align*} % We have on substitution into $af+bg$ that % \begin{align*} % af+bg&=\left(7+5t\right)\left(4x+2y\right)+\left(-7-6t\right)\left(3x+y\right)\\ % &=\left(28+20t\right)x+\left(14+10t\right)y+\left(-21-18t\right)x+\left(-7-6t\right)y\\ % &=\left(7+2t\right)x+\left(7+4t\right)y=7x+7y\\ % \end{align*} % So we require $7=7+2t$ and $7=7+4t$, which occurs when $t=0$. Hence $a=7$ and $b=-7$ is a solution that gives $h$ as a linear combination of $f$ and $g$. So % \begin{align*} % af+bg&=7\left(4x+2y\right)-7\left(3x+y\right)\\ % &=28x+14y-\left(21x-7y\right)=7x+7y % \end{align*} % As previously seen. This confirms that $h$ is linearly dependent on $f$ and $g$. To attempt to find solutions, observe that % \begin{equation*} % f-2g=4x+2y-2\left(3x+y\right)=4x+2y-6x-2y=-2x=6-2*5=-4 % \end{equation*} % Hence $-2x=-4$ giving $x=2$, which gives $y=-1$. Additionally, we see that % \begin{equation*} % 7\left(2\right)+7\left(-1\right)=14-7=7 % \end{equation*} % Hence, the system is consistent. % \end{example} % \begin{example} % Let $f,g,h\in\mathbb{E}_2$ with % \begin{align*} % f&=x+y=2\\ % g&=3x-3y=6\\ % h&=-5x+5y=10 % \end{align*} % Is there a linear dependence between $f$, $g$ and $h$? To check, suppose $f=ag+bh$ then % \begin{equation*} % 2=x+y=a\left(3x-3y\right)+b\left(-5x+5y\right)=6a+10b % \end{equation*} % As $\Gcd\left(6,10\right)=2$ there is a solution and by applying the Euclidean algorithm we see that a particular solution is $a=2$ and $b=-1$ giving a general solution % \begin{align*} % a&=2+5t\\ % b&=-1-3t % \end{align*} % We have on substitution into $ag+bh$ that % \begin{align*} % ag+bh&=\left(2+5t\right)\left(3x-3y\right)+\left(-1-3t\right)\left(-5x+5y\right)\\ % &=\left(6+15t\right)x+\left(-6-15t\right)y+\left(5+15t\right)x+\left(-5-15t\right)y\\ % &=\left(11+30t\right)x+\left(-11-30t\right)y=x+y\\ % \end{align*} % So we require that $1=11+30t$ and $1=-11+30t$. The first of these gives $\displaystyle t=-\frac{1}{3}$ and the second gives $\displaystyle t=\frac{2}{5}$. So as there is no value of $t$ for $a$ and $b$ then $f$ is not a linear combination of $g$ and $h$. % To examine potential solutions, observe that % \begin{equation*} % g+3f=3x-3y+3\left(x+y\right)3x-3y+3x+3y=6x=6*3*2=12 % \end{equation*} % So $6x=12$ which give s $x=2$ and $y=0$. Additionally, % \begin{equation*} % -5\left(2\right)+5\left(0\right)=-10\neq 10 % \end{equation*} % We conclude the system is inconsistent. % \end{example} % \begin{example} % Let $f,g,h\in\mathbb{E}_2$ with % \begin{align*} % f&=x+y=2\\ % g&=3x-3y=6\\ % h&=4x-2y=8 % \end{align*} % Is there a linear dependence between $f$, $g$ and $h$? To check, suppose $f=ag+bh$ then % \begin{equation*} % 2=x+y=a\left(3x-3y\right)+b\left(4x-2y\right)=6a+8b % \end{equation*} % As $\Gcd\left(6,8\right)=2$ there is a solution and by applying the Euclidean algorithm we see that a particular solution is $a=-1$ and $b=1$ giving a general solution % \begin{align*} % a&=-1+4t\\ % b&=1-3t % \end{align*} % We have on substitution into $ag+bh$ that % \begin{align*} % ag+bh&=\left(-1+4t\right)\left(3x-3y\right)+\left(1-3t\right)\left(4x-2y\right)\\ % &=\left(-3+12t\right)x+\left(3-12t\right)y+\left(4-12t\right)x+\left(-2+6t\right)y\\ % &=x+\left(1-6t\right)y=x+y\\ % \end{align*} % We need $1=1$, which is trivially true, so our hope relies on a solution to $1-6t=1$ which has a solution $t=0$. So take $a=-1$ and $b=1$ so that % \begin{equation*} % ag+bh=-g+h=-\left(3x-3y\right)+4x-2y=-3x+3y+4x-2y=x+y=-6+8=2 % \end{equation*} % Hence $f$ is linearly dependent on $g$ and $h$. From the previous example, we observe a solution that satisfies $f$ and $g$ is given by $x=2$ and $y=0$. On substitution into $h$ we see % \begin{equation*} % 4\left(2\right)-2\left(0\right)=8 % \end{equation*} % The system is consistent. % \end{example} % \begin{example} % Consider the system given by % \begin{align*} % x-7y&=-1\\ % x-7y&=-1\\ % 5x+2y&=-18\\ % 5x+2y&=-18 % \end{align*} % If we consider this system as a list $L$ we have % \begin{equation*} % L=\left[x-7y=-1, x-7y=-1,5x+2y=-18, 5x+2y=-18\right] % \end{equation*} % By proposition \ref{prop:NT_list_of_diophantine_equs_is_linearly_independent_iff_no_repeat_elements_and_working_set_is_linearly_independent} we have that as there are repeated elements in the list then the list is linearly dependent. However, consider the defining set $D$ of $L$ given by % \begin{equation*} % D=\left\{x-7y=-1, 5x+2y=-18\right\} % \end{equation*} % Is the defining set linearly independent? To find out, let $f=x-7y=-1$ and let $g=5x+2y=-18$. We attempt to find $a,b\in\mathbb{Q}$ not both $0$ so that $af+bg=0$. So % \begin{equation*} % af+bg=a\left(x-7y\right)+b\left(5x+2y\right)=a\left(-1\right)+b\left(-18\right)=-a-18b=0 % \end{equation*} % A particular solution to $-a-18b=0$ is $a=0$ and $b=0$. Moreover, a general solution, on observation that $\Gcd\left(1,18\right)=1$ is given by % \begin{align*} % a&=0+18t\\ % b&=0-t % \end{align*} % Now, we have that % \begin{align*} % af+bg&=18t\left(x-7y\right)-t\left(5x+2y\right)\\ % &=\left(18t-5t\right)x+\left(-126t-2t\right)y\\ % &=13tx-128ty=0x+0y % \end{align*} % So clearly, $t=0$. This implies that $a=0$ and $b=0$, that is the only values for $a$ and $b$ where $af+bg=0$ are $a=0$ and $b=0$. This implies that $D$ is linearly independent. % To find a solution to the system we look for solutions in the defining set $D$. Any such solution will also satisfy the list $L$. The system given by $D$ is % \begin{align*} % f&=x-7y=-1\\ % g&=5x+2y=-18 % \end{align*} % We see that % \begin{equation*} % g-5f=5x+2y-5\left(x-7y\right)=5x+2y-5x+35y=37y=-18-5*-1=-13 % \end{equation*} % So $\displaystyle y=-\frac{13}{37}$, from which we can see that $\displaystyle x=-\frac{128}{37}$. There is a solution but it is not an integer solution. % \end{example} % \begin{example} % Consider the system % \begin{align*} % x+y&=12\\ % -9x+4y&=-56\\ % 2x+y&=20\\ % x+2y&=16\\ % 13x-7y&=76 % \end{align*} % As each equation is unique, we have that the defining set of the system is equal to this list of equations, that is % \begin{equation*} % D=\left\{f_1=x+y=12, f_2=-9x+4y=-56, f_3=2x+y=20, f_4=x+2y=16, f_5=13x-7y=76\right\} % \end{equation*} % To see if the defining set is linearly independent, we need to see if there exists $a,b,c,d,e\in\mathbb{Z}$, not all zero, so that % \begin{equation*} % af_1+bf_2+cf_3+df_4+ef_5=0 % \end{equation*} % This is equivalent to solving the following equation over $\mathbb{Z}$ % \begin{equation*} % 12a-56b+20c+16d+76e=0 % \end{equation*} % A solution exists by proposition \ref{prop:NT_existence_of_solutions_to_n_var_linear_diophantine_equation} as $\Gcd\left(12,-56,20,16,76\right)=4\divides 0$. % We see that % \begin{equation*} % 12a-56b+20c+16d+76e=4\left(3a-14b\right)+20c+16d+76e=0 % \end{equation*} % Let $3a-14b=\alpha\in\mathbb{Z}$. We can solve the case where $\alpha=1$, and then obtain a general solution for an arbitrary $\alpha$. For the case $\alpha =1$ we solve. % \begin{equation*} % 3a-14b=1 % \end{equation*} % By the Euclidean algorithm, we find a particular solution $a=5$ and $b=1$ and a general solution given by % \begin{align*} % a&=5+14t\\ % b&=1+3t % \end{align*} % It follows that the general solution for any $\alpha$ is % \begin{align*} % a&=\alpha\left(5+14t\right)\\ % b&=\alpha\left(1+3t\right) % \end{align*} % We can now deal with the following four-variable equation % \begin{equation*} % 4\alpha+20c+16d+76e=0 % \end{equation*} % We repeat the above process for the variables $c$ and $d$. We have % \begin{equation*} % 4\alpha+20c+16d+76e=4\alpha+4\left(5c+4d\right)+76e=0 % \end{equation*} % Let $5c+4d=\beta\in\mathbb{Z}$. Solving the $\beta=1$ case we see a particular solution given by $c=1$ and $d=-1$ so that a general solution is given by % \begin{align*} % c&=1+4n\\ % d&=-1-5n % \end{align*} % With a solution for any $\beta$ being % \begin{align*} % c&=\beta\left(1+4n\right)\\ % d&=\beta\left(-1-5n\right) % \end{align*} % We now have a three-variable equation % \begin{equation*} % 4\alpha+4\beta+76e=0 % \end{equation*} % Finally, we have % \begin{equation*} % 4\alpha+4\beta+76e=4\alpha+4\left(\beta+19e\right)=0 % \end{equation*} % Let $\beta+19e=\gamma\in\mathbb{Z}$. We see in the case $\gamma=1$ that a particular solution is $\beta=1$ and $e=0$ so that the general solution for any $\gamma$ is given by % \begin{align*} % \beta&=\gamma\left(1+19m\right)\\ % e&=-\gamma m % \end{align*} % Finally, we have the following two-variable equation % \begin{equation*} % 4\alpha+4\gamma=0 % \end{equation*} % From which it is trivial to see that a particular solution is $\alpha=0$ and $\gamma=0$ for a general solution, for some $k\in\mathbb{Z}$ given by % \begin{align*} % \alpha&=k\\ % \gamma&=-k % \end{align*} % On substitution into $a,b,c,d,e$ we see the general solution for the original equation is given by % \begin{align*} % a&=k\left(5+14t\right)\\ % b&=k\left(1+3t\right)\\ % c&=-k\left(1+19m\right)\left(1+4n\right)\\ % d&=k\left(1+19m\right)\left(1+5n\right)\\ % e&=km\\ % \end{align*} % For arbitrary $k,t,m,n\in\mathbb{Z}$. Non-trivial solutions to the original problem exist, taking $k=t=m=n=1$ gives % \begin{align*} % a&=19\\ % b&=4\\ % c&=-100\\ % d&=120\\ % e&=1\\ % \end{align*} % And % \begin{align*} % 12a-56b+20c+16d+76e&=12\left(19\right)-56\left(4\right)+20\left(-100\right)+16\left(120\right)+76\left(1\right)\\ % &=228-224-2000+1920+76\\ % &=0 % \end{align*} % It follows that the defining set is linearly dependent. It is clear by inspection that $x=8$ and $y=4$ satisfy each equation in the system. % \end{example} % So why are we looking at linear dependence and linear independence? One goal was to see if linear independence or dependence influenced the solvability of a system. The previous examples answer this in the negative, it is possible to have solutions when a system is linearly independent or dependent. What we do see is that linearly dependent systems that have a solution can have some of those equations removed without affecting the solvability of the system. For example, we saw that % \begin{align*} % f&=x+y=4\\ % g&=7x-13y=9\\ % h&=8x-12y=13 % \end{align*} % was a linearly dependent system with $h=f+g$. If we were to remove $h$ from the system then the solution $\displaystyle x=\frac{61}{20}$ and $\displaystyle y=\frac{19}{20}$ still works for $f$ and $g$. That is % \begin{align*} % \frac{61}{20}+\frac{19}{20}&=\frac{80}{20}=4\\ % 7\frac{61}{20}-13\frac{19}{20}&=\frac{427}{20}-\frac{247}{20}=\frac{180}{20}=9 % \end{align*} % In the example % \begin{align*} % f&=4x+2y=6\\ % g&=3x+y=5\\ % h&=7x+7y=7 % \end{align*} % we saw that $h=7f-7g$, $x=2$ and $y=-1$ was a solution to the system. % In the example, % \begin{align*} % f&=4x+8y=12\\ % g&=-x+3y=2\\ % h&=18x-17y=1 % \end{align*} % We saw that $\displaystyle \frac{37}{212}f-\frac{5}{53}h=g$. Additionally, we saw that we could turn this into an integer-valued linear dependency by multiplying the equation by $\Lcm\left(212,53\right)=212$ to get $37f-212g-20h=0$. % In the final example, we showed that the system of five equations was linearly dependent, and a solution is given by $x=8$ and $y=4$. It is therefore clear that we can improve our definition of the defining set for a system of equations. When a defining set of equations is linearly dependent, we can find at least one element of the defining set and express it in terms of the other elements, this means we can safely remove that element from the defining set without affecting the solutions for the system. We aim to prove this. There are a few steps to showing this, firstly we need to show that given a linearly dependent defining set, we can always find at least one element that can be expressed in terms of the others. Secondly, if we remove this element from the set then we either get another linearly dependent set, or a linearly independent set. % \begin{proposition}{Linearly dependent defining set has an element that is a linear combination of the other elements of the set}\label{prop:NT_linearly_dependent_defining_set_has_element_that_is_linear_combination_of_others} % Let $D$ be a linearly dependent defining set of elements in $\mathbb{E}_2$ with $\left|D\right|=n \geq 1$ where % \begin{equation*} % D=\left\{f_1,f_2,f_3,\dots,f_n\right\} % \end{equation*} % We have that $\exists k\in\mathbb{N}$ with $1\leq k\leq n$ so that $f_k$ can be expressed as an rational linear combination of elements in the set $D\setminus\left\{f_k\right\}$. That is to say for $a_i\in\mathbb{Q}$ we have % \begin{equation*} % f_k=\sum_{\substack{i=1 \\ i\neq k}}^n a_if_i % \end{equation*} % Proof: % We argue by induction on the size of the defining set. The base case is $n=1$ and we have that the only defining set of size $1$ which is linearly dependent is given by $D=\left\{0_{\mathbb{E}_2}\right\}$ by proposition \ref{prop:NT_zero_two_variable_equation_is_linearly_dependent}. Now, consider $D\setminus\left\{0_{\mathbb{E}_2}\right\}=\emptyset$. As $D\setminus\left\{0_{\mathbb{E}_2}\right\}=\emptyset$ we have that $0_{\mathbb{E}_2}$ is written as a linear combination of elements in $D\setminus\left\{0_{\mathbb{E}_2}\right\}$ is vacuously true. This is because there are no terms to take for the sum from the empty set and so the sum is defined to be $0$. % Now suppose that the proposition holds $k>1$. As $D$ is by assumption linearly dependent we have that there $\exists i\in\mathbb{N}$ with $1\leq i\leq k$ and $\exists a_1,a_2,\dots,a_k\in\mathbb{Q}$ not all zero so that % \begin{equation*} % f_i=\sum_{\substack{n=1 \\ n\neq i}}^k a_nf_n % \end{equation*} % We show it holds for $k+1$. Consider the linearly dependent set % \begin{equation*} % D'=\left\{f_1.f_2,\dots,f_k,f_{k+1}\right\} % \end{equation*} % We have two cases to consider. % \begin{enumerate} % \item $D'\setminus\left\{f_{k+1}\right\}$ is linearly dependent. % \item $D'\setminus\left\{f_{k+1}\right\}$ is linearly independent. % \end{enumerate} % \begin{enumerate} % \item $D'\setminus\left\{f_{k+1}\right\}$ is linearly dependent: % In this case we have that $D'\setminus\left\{f_{k+1}\right\}$ is a linearly dependent set of size $k$ and so by the induction hypothesis $\exists i\in\mathbb{N}$ with $1\leq i\leq k$ so that $\exists a_1,a_2,\dots,a_k\in\mathbb{Q}$ not all zero so that % \begin{equation*} % f_i=\sum_{\substack{n=1 \\ n\neq i}}^k a_nf_n % \end{equation*} % This clearly extends to $D'$ by taking $a_{k+1}=0$ in the summation % \begin{equation*} % f_i=\sum_{\substack{n=1 \\ n\neq i}}^{k+1} a_nf_n % \end{equation*} % \item $D'\setminus\left\{f_{k+1}\right\}$ is linearly independent: % In this case, As $D'$ is linearly dependent $D'\setminus\left\{f_{k+1}\right\}$ is linearly independent we are forced to conclude that in the sum % \begin{equation*} % \sum_{n=1}^{k+1} a_nf_n=0 % \end{equation*} % that $a_{k+1}\neq 0$. If this were not the case, we would contradict the linear independence of $D'\setminus\left\{f_{k+1}\right\}$. Hence, take $i=a_{k+1}$ % \begin{equation*} % f_{k+1}=-\frac{a_1}{a_{k+1}}f_1-\frac{a_2}{a_{k+1}}f_2-\dots-\frac{a_k}{a_{k+1}}f_{k+1} % \end{equation*} % As each $a_i\in\mathbb{Q}$ we have that % \begin{equation*} % \frac{a_n'}{a_j'}\in\mathbb{Q} % \end{equation*} % \end{enumerate} % The result follows. $\qed$ % \end{proposition} % We now provide a proof of the second proposition. % \begin{proposition}{Removing an element from a linearly dependent defining set makes the set either linearly independent or it remains linearly dependent}\label{prop:NT_removing_element_from_dependent_set_makes_set_either_independent_or_remains_dependent} % Let $D$ be a linearly dependent defining set of elements in $\mathbb{E}_2$ where % \begin{equation*} % D=\left\{f_1,f_2,f_3,\dots,f_n\right\} % \end{equation*} % Let $i\in\mathbb{N}$ with $1\leq i\leq n$. We have that the set % \begin{equation*} % D'=D\setminus\left\{f_i\right\} % \end{equation*} % either remains linearly dependent or becomes linearly independent. % Proof: % As $D$ is linearly dependent, we have that $\exists a_i\in\mathbb{Q}$ not all zero so that % \begin{equation*} % \sum_{k=1}^{n} a_kf_k=0 % \end{equation*} % By proposition \ref{prop:NT_linearly_dependent_defining_set_has_element_that_is_linear_combination_of_others}, we have $\exists m\in\mathbb{N}$ with $1\leq m\leq n$ so that $f_m$ can be written as a rational linear combination of the other elements of the set $D$. Define % \begin{equation*} % D'=D\setminus\left\{f_m\right\} % \end{equation*} % If $D'$ is linearly independent, then we have that % \begin{equation*} % \sum_{\substack{k=1 \\ k\neq m}}^n a_kf_k=0 \iff a_k=0,\ \text{ for } 1\leq k\leq n % \end{equation*} % If $D'$ is not linearly independent, it must be linearly dependent. That is $\exists b_k\in\mathbb{Q}$ not all zero so that % \begin{equation*} % \sum_{\substack{k=1 \\ k\neq m}}^n b_kf_k=0 % \end{equation*} % As required. $\qed$ % \end{proposition} % Now, we know by proposition \ref{prop:NT_non-zero_two_variable_equation_is_linearly_independent} that a set, equivalently a list, that contains exactly one non-zero element of $\mathbb{E}_2$ is linearly independent. This proposition and proposition \ref{prop:NT_removing_element_from_dependent_set_makes_set_either_independent_or_remains_dependent} together imply that the process of removing elements from a linearly dependent set ultimately terminates at with a set of size $\left|S\right|\geq 1$ at which point it is required to be linearly independent. % Can we say anything about how large $\left|S\right|$ is while remaining linearly independent? We have by proposition \ref{prop:NT_two_non_zero_diophantine_equs_linaer_dependent_iff_one_is_multiple_of_other} that if we have a system of two equations which are multiples of each other, then that system is linearly dependent. By the contra-positive of this proposition, we can immediately conclude that if they are not multiples of each other, then they must be linearly independent; this allows us to find cases where $\left|S\right|\geq 2$. Do cases where $\left|S\right|=3$ exist? What about $\left|S\right|=4$? % The case where $S=\left\{f\right\}$ for a non-zero equation $f=ax+by=c$ is trivial. We have that $f$ is solvable if and only if $\Gcd\left(a,b\right)\divides c$, hence is only consistent if this is true. This is enough to immediately deduce that in general, being linearly independent does not imply consistency. We will suppose $f$ is consistent, that is $f=ax+by=c$ is solvable, meaning $\Gcd\left(a,b\right)\divides c$. % So, suppose that $S=\left\{f,g\right\}$. If $g$ is a multiple of $f$ then by proposition \ref{prop:NT_two_non_zero_diophantine_equs_linaer_dependent_iff_one_is_multiple_of_other} we have that $S\cup\left\{g\right\}$ is linearly dependent. Additionally, any solution to $f$ must also be a solution to $g$, otherwise $g$ would not be a multiple of $f$, which is a contradiction. Now, recall proposition \ref{prop:NT_nature_of_solutions_to_two_equation_two_var_system}, which states that given a system of two equations in two unknowns, precisely one of three things can happen % \begin{enumerate} % \item There exists one and only one solution % \item There exist infinitely many solutions % \item There exist no solutions % \end{enumerate} % If $g$ is a multiple of $f$ and $f$ is solvable, then we have that $g$ being a multiple of $f$ must be the second condition. To see this, consider $f=ax+by=c$ so that $\Gcd\left(a,b\right)\divides c$. Then, a general solution is given by % \begin{align*} % x&=x_0+\frac{bn}{\Gcd\left(a,b\right)}\\ % y&=y_0-\frac{an}{\Gcd\left(a,b\right)} % \end{align*} % With $x_0,y_0\in\mathbb{Z}$ being a particular solution. As $g$ is a multiple of $f$ we have that $g=\lambda f$ for some $$ % \pagebreak % Therefore, the question is; Given a set $S$ of $n$ equations from $\mathbb{E}_2$, what is the largest size of a linearly independent subset of $S$? Additionally, how does this relate to consistency? % We start with the simplest case, $\left|S\right|=1$. We know by proposition \ref{prop:NT_non-zero_two_variable_equation_is_linearly_independent} that $\left|S\right|=1$ if $f\neq 0_{\mathbb{E}_2}$ with say % \begin{equation*} % f=ax+by=c % \end{equation*} % From which we have consistency if and only if $\Gcd\left(a,b\right)\divides c$ by proposition $\ref{prop:NT_solutions_to_two_var_linear_diophantine_equation}$. This means that in general, linear independence does not imply consistency. As we are only really interested in cases where we can find a solution we assume that $f$ is consistent, or in other words $\Gcd\left(a,b\right)\divides c$ so that there is a solution. % Given $S=\left\{f\right\}$ is consistent, when adding another non-zero equation, $g$ there are two cases that can occur. Firstly, $g$ is a multiple of $f$ and so by proposition \ref{prop:NT_two_non_zero_diophantine_equs_linaer_dependent_iff_one_is_multiple_of_other} we have that $S\cup\left\{g\right\}$ is linearly dependent. As $g$ is a multiple of $f$ it is trivial to see that any solution that satisfies $f$ also satisfies $g$. % The other case is $g$ is not a multiple of $f$ and so by the contra-positive of proposition \ref{prop:NT_two_non_zero_diophantine_equs_linaer_dependent_iff_one_is_multiple_of_other}, we have that $S\cup\left\{g\right\}$ is linearly independent. Again, this means that linear independence does not imply consistency, as either $g$ is consistent with $f$ or it is not. We shall assume that $f$ and $g$ are consistent and linearly independent as we are not interested in inconsistent systems. % Suppose that $S=\left\{f,g\right\}$ is consistent and linearly independent. Suppose we add a non-zero equation $h$, clearly if $h$ is a multiple of either $f$ or $g$ then $S\cup\left\{h\right\}$ is linearly dependent so suppose not. % This also suggests we can make an additional definition based on defining sets. For this definition to make sense, we need one final result. % \begin{proposition}{Consistent linearly dependent system of equations has same solution after removing an equation} % Let $D$ be a linearly dependent defining set of elements in $\mathbb{E}_2$ where % \begin{equation*} % D=\left\{f_1,f_2,f_3,\dots,f_n\right\} % \end{equation*} % Suppose that $D$ defines a consistent system of equations with solution $x,y\in\mathbb{Z}$. That is for each $1\leq i\leq n$ we have that % \begin{equation*} % f_i\left(x,y\right)=c_i % \end{equation*} % Let $k\in\mathbb{N}$ with $1\leq k\leq n$. We have that the same solution $x,y$ holds for the system defined by % \begin{equation*} % D'=D\setminus\left\{f_k\right\} % \end{equation*} % Proof: % This result is trivial; if $x,y$ is a solution to every equation defined in $D$ it will be a solution to every equation defined in $D'$ as $D'\subset D$. $\qed$ % \end{proposition} % Finally, we have seen cases where a linearly independent system is inconsistent, and an inconsistent system is linearly independent. The first of these statements is false in general; for example % \begin{align*} % f&=4x+2y=6\\ % g&=-3x+3y=0 % \end{align*} % Clearly $f$ and $g$ are linearly independent. Indeed, we have % \begin{align*} % &af+bg=6a+0b=0 \Rightarrow a=0 \text{ and }b\in\mathbb{Q}\\ % &\Rightarrow bg=-3bx+3by=0x+0y=0 \Rightarrow 3b=0 \Rightarrow b=0 % \end{align*} % Hence, $a=b=0$ we have independence. It is clear that $x=y=1$ satisfies both $f$ and $g$, disproving that linear independence implies inconsistency. Now, does an inconsistent system imply linear independence? Consider the system % \begin{align*} % f&=x+y=1\\ % g&=x+y=2 % \end{align*} % The system is inconsistent so we see if it is linearly independent. We observe % \begin{equation*} % af+bg=a+2b=0 % \end{equation*} % So $a=2t$ and $b=-t$ is a general solution. This gives % \begin{equation*} % 2tx+2ty-tx-ty=tx+ty=0x+0y % \end{equation*} % So in either case, $t=0$ which gives $a=b=0$ so $f$ and $g$ are linearly independent. We have the following proposition. % \begin{proposition}{Inconsistent system of equations is linearly independent} % Let $D$ be a defining set of elements in $\mathbb{E}_2$ where % \begin{equation*} % D=\left\{f_1,f_2,f_3,\dots,f_n\right\} % \end{equation*} % Moreover suppose that $D$ is not a consistent system, that is $\not\exists x,y\in\mathbb{Z}$ so that $f_i\left(x,y\right)=c_i$ for each $1\leq i\leq n$ where $c_i\in\mathbb{Z}$ is the constant term of each equation $f_i$. % We have that $D$ is linearly independent. % Proof: % Let $D$ be as given in the hypothesis and suppose for a contradiction that $D$ is linearly dependent, that is $\exists\lambda_i$ for $1\leq i\leq n$ not all zero so that % \begin{equation*} % \sum_{i=1}^n \lambda_i f_i=0=\sum_{i=1}^n \lambda_i c_i % \end{equation*} % We have that this is equivalent to % \begin{equation*} % \sum_{i=1}^n \lambda_i \left(a_ix+b_iy\right)=\sum_{i=1}^n \lambda a_ix+ \sum_{i=1}^{n} \lambda_i b_iy=0=\sum_{i=1}^n \lambda_i c_i % \end{equation*} % That is, % \begin{align*} % \sum_{i=1}^n \lambda a_ix&=0\\ % \sum_{i=1}^{n} \lambda_i b_iy&=0\\ % \sum_{i=1}^n \lambda_i c_i&=0 % \end{align*} % \end{proposition} % We can now combine the last few results to justify our new definition of defining sets. We started with a list of equations, from which we removed duplicates by turning the list into a set. Next, we considered non-trivial dependencies between the equations by considering if we could express equations in the system in terms of the other. Finally, we know that if we remove equations from a consistent system that can be expressed in terms of the other equations, we do not affect the solutions to the system. Hence, given a list of equations from $\mathbb{E}_2$, we can define a set which contains no redundant information. % \begin{definition}{Maximally consistent linearly independent defining set} % Let $M$ be a defining set of elements in $\mathbb{E}_2$. We say that $M$ is a maximal linearly independent defining set if and only if % \begin{enumerate} % \item $M$ is linearly independent % \item If $\not\exists f\in\mathbb{E}_2$ so that $M\cup\left\{f\right\}$ is linearly independent. That is, adding any element from $\mathbb{E}_2$ to $M$ necessarily introduces a linear dependence. We call this condition the maximality condition. If $M$ satisfies this condition, we say that $M$ is maximal. % \end{enumerate} % \end{definition} % We should work with some examples. % \begin{example} % Let $D=\left\{f,g\right\}$ where % \begin{align*} % f&=2x+3y=4\\ % g&=4x-y=8 % \end{align*} % Is $D$ a maximal linearly independent defining set? Firstly, we must check that $D$ is linearly independent, this is equivalent to showing that % \begin{equation*} % af+bg=0 \iff a=b=0 % \end{equation*} % We have % \begin{equation*} % af+bg=4a+8b=0 % \end{equation*} % This is solvable with a particular solution given by $a=b=0$ and a general solution given by % \begin{align*} % a&=2t\\ % b&=-t % \end{align*} % Now, we have that % \begin{align*} % af+bg&=2t\left(2x+3y\right)-t\left(4x-y\right)\\ % &=\left(4xt+6yt\right)+\left(-4xt+yt\right)\\ % &=0x+5yt=0x+0y % \end{align*} % It is clear this is true if and only if $t=0$. It follows that $D$ is linearly independent. It is left to see if it is maximal. Let $h\in\mathbb{E}_2$ be a general non-zero element, that is it has form $h=\alpha x+\beta y = \gamma$ and consider $D\cup\left\{h\right\}$. We aim to see if there is a linear combination so that % \begin{equation*} % h=af+bg % \end{equation*} % We have that % \begin{equation*} % 4a+8b=\gamma % \end{equation*} % This is solvable if $\gcd\left(4,8\right)=4\divides\gamma$. Suppose so, then we can write a general solution by proposition \ref{prop:NT_solutions_to_two_var_linear_diophantine_equation} given by % \begin{align*} % a&=a_0+2t\\ % b&=b_0-t % \end{align*} % Where $a_0$ and $b_0$ is a particular solution. Suppose that Using this general solution we have that % \begin{align*} % af+bg&=\left(a_0+2t\right)\left(2x+3y\right)+\left(b_0-t\right)\left(4x-y\right)\\ % &=\left(2a_0+4b_0\right)x+\left(3a_0+7t-b_0\right)y=\alpha x+\beta y % \end{align*} % We have % \begin{align*} % 2a_0+4b_0&=\alpha\\ % 3a_0+7t-b_0&=\beta % \end{align*} % We solve this for $a_0$ and $b_0$. We can eliminate $a_0$ by % \begin{align*} % 3\left(2a_0+4b_0\right)-2\left(3a_0+7t-b_0\right)&=6a_0+12b_0-6a_0-14t+2b_0\\ % &=14b_0-14t=3\alpha-2\beta\\ % \Rightarrow b_0&=\frac{1}{14}\left(3\alpha-2\beta+14t\right) % \end{align*} % From which we conclude that % \begin{align*} % 3a_0+7t-b_0&=\beta\\ % 3a_0+7t-\frac{1}{14}\left(3\alpha-2\beta+14t\right)&=\beta\\ % 3a_0&= \frac{3}{14}\left(\alpha+4\beta-28t\right)\\ % \Rightarrow a_0&= \frac{1}{14}\left(\alpha+4\beta-28t\right)\\ % \end{align*} % We can conclude that $a$ and $b$ can be expressed in terms of $\alpha$, $\beta$ to yield a linear combination for $h$ in terms of $f$ and $g$. % \begin{align*} % a&=a_0+2t=\frac{1}{14}\left(\alpha+4\beta-28t\right) + 2t = \frac{1}{14}\left(\alpha+4\beta\right)\\ % b&=b_0-t=\frac{1}{14}\left(3\alpha-2\beta+14t\right)-t = \frac{1}{14}\left(3\alpha-2\beta\right) % \end{align*} % Where % \begin{align*} % af+bg&=\frac{1}{14}\left(\alpha+4\beta\right)\left(2x+3y\right)+\frac{1}{14}\left(3\alpha-2\beta\right)\left(4x-y\right)\\ % &=\frac{1}{14}\left(2\alpha x+3\alpha y+8\beta x+12\beta y + 12\alpha x - 3\alpha y - 8\beta x +2\beta y\right)\\ % &=\frac{1}{14}\left(14\alpha x+14\beta y\right)\\ % &=\alpha x + \beta y % \end{align*} % Likewise, using the same $a$ and $b$ when we consider the coefficients, we get that % \begin{align*} % af+bg&=\frac{1}{14}\left(\alpha+4\beta\right)\left(4\right)+\frac{1}{14}\left(3\alpha-2\beta\right)\left(8\right)\\ % &=\frac{1}{14}\left(4\alpha+16\beta+24\alpha-16\beta\right)\\ % &=\frac{1}{14}\left(28\alpha\right)=2\alpha\\ % \end{align*} % Hence we conclude that $\gamma=2\alpha$. However if we have that $\Gcd\left(4,8\right)=4\notdivides\gamma$ then we can't find a linear combination so that $h=af+bg$. In these cases we are forced to conclude that $D\cup\left\{h\right\}$ is linearly independent. % If we can show % \begin{equation*} % af+bg+ch=0 \iff a=b=c=0 % \end{equation*} % Then we have that $D\cup\left\{h\right\}$ is linearly independent and hence $D$ is not maximal. % We see that, % \begin{equation*} % af+bg+ch=4a+8b+\gamma c=4\left(a+2b\right)+\gamma c = 0 % \end{equation*} % We can solve $a+2b=1$ with the general solution % \begin{align*} % a&=1+2t\\ % b&=-t % \end{align*} % More generally, we have that $a+2b=\theta$ has the general solution % \begin{align*} % a&=\theta\left(1+2t\right)\\ % b&=-t\theta % \end{align*} % We are therefore left with $4\theta+\gamma c=0$. This is solvable for any value of $c$ as $\Gcd\left(4,\gamma\right)\divides 0$. Proposition \ref{prop:NT_solutions_to_two_var_linear_diophantine_equation} allows us to write a general solution given by % \begin{align*} % \theta&=\frac{\gamma k}{\Gcd\left(4,\gamma\right)}\\ % c&=-\frac{4k}{\Gcd\left(4,\gamma\right)} % \end{align*} % where we have $\theta=0$ and $c=0$ as a particular solution. We therefore have that $a,b$ and $c$ are given by % \begin{align*} % a&=\frac{\gamma k}{\Gcd\left(4,\gamma\right)}\left(1+2t\right)\\ % b&=-\frac{\gamma kt}{\Gcd\left(4,\gamma\right)}\\ % c&=-\frac{4k}{\Gcd\left(4,\gamma\right)} % \end{align*} % Finally, substituting these into the original equation gives. % \begin{align*} % af+bg+ch&=\left(\frac{\gamma k}{\Gcd\left(4,\gamma\right)}\left(1+2t\right)\right)\left(2x+3y\right)-\frac{\gamma kt}{\Gcd\left(4,\gamma\right)}\left(4x-y\right)-\frac{4k}{\Gcd\left(4,\gamma\right)}\left(\alpha x+\beta y\right)\\ % &=\frac{k}{\Gcd\left(4,\gamma\right)}\left(\left(2\gamma-4\alpha\right)x+\left(7t\gamma+3\gamma-4\beta\right)y\right)=0x+0y % \end{align*} % We need to find solutions to % \begin{align*} % \frac{k}{\Gcd\left(4,\gamma\right)}\left(2\gamma-4\alpha\right)&=0\\ % \frac{k}{\Gcd\left(4,\gamma\right)}\left(7t\gamma+3\gamma-4\beta\right)&=0\\ % \end{align*} % Now, as $h\neq 0_{\mathbb{E}_2}$ we must have that at least one of $\alpha\neq 0$ or $\beta\neq 0$. % Firstly, suppose that $\alpha =0$ then we must have that $2k\gamma =0$. By proposition \ref{prop:IntegersHaveNoZeroDivisors}, we have that either $k=0$, $\gamma =0$ or both. % \begin{enumerate} % \item $k=0$: % If $k=0$ we have that $\gamma\in\mathbb{Z}$ as $\gamma$ was the constant term of $h$. This then gives from the second equation % \begin{equation*} % 7t\gamma+3\gamma-4\beta\neq 0 % \end{equation*} % \end{enumerate} % in which case $\gamma\in\mathbb{Z}$ as $\gamma$ was the constant term of $h$, or we have that $\gamma=0$ with $k\in\mathbb{Z}$ as $k$ was a parameter in the general solution for $\theta$ and $c$. % \end{example} % % In the cases where there is a linear dependency, one of the equations can be written in terms of the other two, meaning that if we can find a solution that satisfies the other two we have one that satisfies the third. It is important to note that linear independence is not the only requirement for a solution to exist. For example, consider the system given by % % \begin{align*} % % x+y&=2\\ % % x+y&=4\\ % % x+y&=6\\ % % \end{align*} % % % These equations are linearly independent. % % \begin{definition}{A constraint and the constraint number} % % Let $k\in\mathbb{Z}$ where $\left|k\right|<\infty$ and $k\geq 2$. Consider the system of equations given by % % \begin{equation*} % % \sum_{i=1}^n a_{\left(i,k\right)}x_i=b_k % % \end{equation*} % % We call each equation in this system a constraint on the system. We define the constraint number of the system, denoted $C$, to be the total number of linearly independent equations in the system, after any linearly dependent equations are removed. % % \end{definition} % % Hence, for example, the system % % \begin{align*} % % x+y&=2\\ % % x+y&=4\\ % % x+y&=6\\ % % \end{align*} % % Has a constraint number of $C=3$. The system % % \begin{align*} % % x+y&=2\\ % % 3x-3y&=6\\ % % 4x-2y&=8 % % \end{align*} % % has a constraint number of $C=2$, we saw that $ x+y=2$ was linearly dependent on the other equations. Hence we can safely remove it from the system and instead consider the system % % \begin{align*} % % 3x-3y&=6\\ % % 4x-2y&=8 % % \end{align*} % % What can the constraint number tell us about the existence of solutions to a system of equations? There is some work to be done. Namely in fleshing out the concept of the constraint number. Recall proposition \ref{prop:NT_nature_of_solutions_to_two_equation_two_var_system}, which states that for a system of two Diophantine equations in two variables, one of the following holds % % \begin{enumerate} % % \item There exists one and only one solution % % \item There exist infinitely many solutions % % \item There exist no solutions % % \end{enumerate} % % What can we say about the constraint number in each case? Suppose the first case holds, that is there exists one and only one solution to the system, say $\left(x_0,y_0\right)$ for % % \begin{align*} % % ax+by&=e\\ % % cx+dy&=f % % \end{align*} % % Recall that the constraint number is equal to the total number of linearly independent equations in the system. So if a system has exactly one solution then how many linearly independent equations can it have? Let % % \begin{align*} % % \theta&=ax+by=e\\ % % \phi&=cx+dy=f % % \end{align*} % % We know that $\theta$ and $\phi$ are linearly independent if % % \begin{equation*} % % k\theta+m\phi=0 \Rightarrow k=0 \text{ and } m=0 % % \end{equation*} % % We want to find some $k$ so that $\theta=k\phi$. Then we have % % \begin{equation*} % % \theta=e=ax+by=k\phi=k\left(cx+dy\right)=kcx+kdy=kf % % \end{equation*} % % So we require that $ax=kcx$ and $by=kdy$. There is % % \begin{align*} % % a&=kc\\ % % \end{align*} % % % We have the following result. % % % \begin{proposition}{System of two variable Diophantine equations has no solution if $C\geq 3$} % % % Let $k\in\mathbb{Z}$ with $\left|k\right|<\infty$ and $k\geq 2$. Consider the system of two variable Diophantine equations given by % % % \begin{equation*} % % % \sum_{i=1}^2 a_{\left(i,k\right)}x_i=b_k % % % \end{equation*} % % % If the constraint number $C$ of this system is such that $C\geq 3$. Then this system of equations has no solution. % % % Proof: % % % If $k=2$ there is nothing to prove as in this case we have that at most $c=2$, and so the existence of solutions are given by proposition \ref{prop:NT_nature_of_solutions_to_two_equation_two_var_system}. So we can assume that $k\geq 3$. % % % We argue by induction on $k$ % % % \end{proposition} \subsection{Polynomials} Previously, we have seen how to handle linear equations in multiple variables. That is equations of the form \begin{equation*} a_1x_2+a_2x_2+\dots+a_nx_n=b,\ \, a_i,x_i,b\in\mathbb{Z} \end{equation*} A natural question to ask is can we extend this to non-linear equations? For example, we have defined what we mean by a square number \ref{def:NT_square_number}. That is, a number $y\in\mathbb{Z}$ is square if $\exists x\in\mathbb{Z}$ so that $x^2=y$. If we consider $x$ as a variable for a moment, then we have seen many examples of solving this type of equation. We studied this when finding what integer numbers were squares. We can ask the question, what happens if we combine this $x^2$ variable with just the variable $x$, for example, what values for $x\in\mathbb{Z}$ or $\mathbb{Q}$ would satisfy \begin{equation*} x^2+x=2 \end{equation*} We can go further than simply $x^2$. For example, we can consider \begin{equation*} x^n=\prod_{i=1}^n x \end{equation*} and combine variables of this form however we wish and multiply them by constants, for example. \begin{equation*} x^8+15x^7-8x^3+2x^2+x+5=0 \end{equation*} We will want to study equations of this form. We will want to \begin{definition}{Monomial} Let $X$ be a variable and let $a\in S$ for some set $S\neq\emptyset$. We define a monomial to be an expression of the form \begin{equation*} aX^n \end{equation*} where $n\in\mathbb{Z}$ with $n\geq 0$ \end{definition} From a monomial, we define a so-called polynomial \begin{definition}{Polynomial} Let $S$ be a set and let $n\in\mathbb{Z}$ with $n\geq 0$. Let $X$ be a variable. We define a polynomial to be an expression of the form \begin{equation*} P\left(X\right)=a_nX^n+a_{n-1}X^{n-1}+a_{n-2}X^{n-2}+\dots+a_1X+a_0 \end{equation*} Where $a_0,a_1,\dots,a_n\in S$ are called the coefficients of the polynomial. We say that $X$ is an indeterminate variable and we say that $P\left(X\right)$ is a polynomial in $X$ with coefficients in $S$. Here we are formally using the $+$ operation associated with $S$ between the terms in the polynomial. \end{definition} We can, of course, replace $X$ with a particular value to evaluate the polynomial. \begin{definition}{Evaluation of a polynomial} Let $S\neq\emptyset$ be a set and let $P\left(X\right)$ be a polynomial with coefficients in $S$. Let $s\in S$. We define the evaluation of the polynomial $P$ at $s$ by \begin{equation*} P\left(s\right)=a_ns^n+a_{n-1}s^{n-1}+a_{n-2}s^{n-2}+\dots+a_1s+a_0 \end{equation*} \end{definition} \begin{example} Let $S=\mathbb{Z}$ and define $P\left(X\right)$ by \begin{equation*} P\left(X\right)=2X^2-3X+5 \end{equation*} What is $P\left(1\right)$? On substituting $X=1$ we see \begin{equation*} P\left(1\right)=2\left(1\right)^2-3\left(1\right)+5=2-3+5=4 \end{equation*} \end{example} It will be useful to describe the set of all polynomials whose coefficients lie in some set $S$. \begin{definition}{Set of all polynomials with coefficients in a set $S$} Let $S\neq\emptyset$. We define the set of all polynomials whose coefficients are in $S$ by the set \begin{equation*} S\left[X\right]=\left\{\sum_{i=0}^n s_iX^i: n\in\mathbb{N}\text{ and } s_i\in S\right\} \end{equation*} We define the polynomials to be the elements of this set and write $P\in S\left[X\right]$, with the understanding that $P$ actually means $P\left(X\right)$. \end{definition} From the definition of a polynomial, we have many choices that we can make that allow us to create a polynomial. We can modify the coefficients $a_i$ for $0\leq i\leq n$ however we wish, so long as they are all in the set $S$. In particular, the choices we can make are clearly dependent on the value of $n$ we can pick. The value of $n$ is an important property of polynomials. \begin{definition}{Degree of a polynomial} Let $P\in S\left[X\right]$. We define the degree of the polynomial $P$ to be the largest $n\in\mathbb{Z}$ so that the coefficient of $X^n$ is not equal to zero. We write $\deg\left(P\right)=n$ to mean the degree of the polynomial $P$ is $n$. \end{definition} \begin{example} Let $S=\mathbb{Z}$ and define $P\left(X\right)$ by \begin{equation*} P\left(X\right)=2X^2-3X+5 \end{equation*} We see that the largest $n$ where $X^n\neq 0$ is $2$ so $\deg\left(P\right)=2$. \end{example} The astute reader might ask the following. Suppose that $P$ is given by \begin{equation*} P=0+0*X+0*X^2+0*X^3+\dots+0*X^n \end{equation*} what is the degree of $P$? On one hand, by our definition, we can't assign it a degree! There are no non-zero coefficients in the polynomial! On the other hand, we intuitively know that the above polynomial represents a meaningful polynomial, especially for the theory we are attempting to develop. It is not clear how to resolve this problem for now. Perhaps, developing the theory as much as we can without it will make it clear how to resolve this issue. \subsubsection{Defining addition between two polynomials} We can define how to add two polynomials together. To do so we need to recast how we see a polynomial, and to do so recall the definition of the Cartesian product of $n$ sets \ref{def:CartProductOfNSet}. Let $S_1,S_2,\dots,S_n$ be sets. We define the Cartesian product of $S_1,S_2,\dots,S_N$, denoted $S_1\times S_2\times\dots\times S_n$ to be the set of all ordered pairs of the form $\left(s_1,s_2,\dots,s_n\right)$ where $s_1\in S_1.s_2\in S_2,\dots s_n\in S_n$. This is to say that \begin{equation*} S_1\times S_2\times\dots\times S_n=\left\{\left(s_1,s_2,\dots,s_n\right):s_1\in S_1.s_2\in S_2,\dots s_n\in S_n\right\} \end{equation*} In particular, if all of the sets are the same we denote this by $S^n$. We can use this idea to define a polynomial of degree $n$ as a tuple. Firstly, observe that we can write a polynomial $P\left(X\right)$ as \begin{align*} P\left(X\right)&=a_nX^n+a_{n-1}X^{n-1}+a_{n-2}X^{n-2}+\dots+a_1X+a_0\\ &= a_0+a_1X+a_2X^2+a_3X^3+\dots+a_{n-1}X^{n-1}+a_nX^n\\ &=\sum_{i=0}^n a_i X^i \end{align*} That is we can express $P$ as the sum of products of coefficients in $S$ and the corresponding power of the indeterminate variable $X$. Now, we have that $\deg\left(P\right)=n$ so in order to have the correct sized tuple we must consider the Cartesian product of $S$ with itself $n+1$ times, that is \begin{equation*} S^{n+1}=\prod_{i=0}^n S \end{equation*} As each $a_i\in S$ for $0\leq i\leq n$ we have that the tuple $a=\left(a_0,a_1,a_2,\dots,a_{n-1},a_n\right)\in S^{n+1}$. This is the correspondence we need. \begin{definition}{Polynomial as an $n+1$-tuple} Let $S\neq\emptyset$ and let $n\in\mathbb{Z}$ with $n\geq 0$ so that $\deg\left(P\right)=n$ where \begin{equation*} P\left(X\right)=a_nX^n+a_{n-1}X^{n-1}+a_{n-2}X^{n-2}+\dots+a_1X+a_0 \end{equation*} We can view a polynomial as an element of the set $S^{n+1}$, say $a$ with the form \begin{equation*} a=\left(a_0,a_1,a_2,\dots,a_{n-1},a_n\right) \end{equation*} More simply, we can write \begin{equation*} P=\left(a_0,a_1,a_2,\dots,a_{n-1},a_n\right) \end{equation*} where we have the powers of $X^n$ being implicit. \end{definition} This definition has an immediate consequence, it enables us to have a representation for each $X^n$ for any $n\geq 0$. For example, we see that \begin{align*} P\left(X\right)=1=X^0 &\iff a=\left(1\right)\\ P\left(X\right)=X &\iff a=\left(0,1\right)\\ P\left(X\right)=X^2 &\iff a=\left(0,0,1\right)\\ P\left(X\right)=X^3 &\iff a=\left(0,0,0,1\right)\\ &\dots \end{align*} This allows us to build an understanding of how to properly define addition of two polynomials. Suppose we have \begin{align*} P\left(X\right)&=1+X+X^2\\ Q\left(X\right)&=4-3X+X^2+X^3 \end{align*} Where the coefficients of $P$ and $Q$ are elements of $\mathbb{Z}$. We see that $P=\left(1,1,1\right)$ and $Q=\left(4,-3,1,1\right)$. Firstly, we have that $P$ has less entries in its tuple than $Q$. We can account for this by noting that $P\left(X\right)=1+X+X^2=1+X+X^2+0X^3$ and so an alternative representation of $P$ is given by $P=\left(1,1,1,0\right)$. Now, considers the terms in both $P$ and $Q$ which are associated with $X^0$ i.e. $P_0\left(X\right)=1$ and $Q_0\left(X\right)=4$. As these are simply elements of $\mathbb{Z}$ we would expect that $P_0\left(X\right)+Q_0\left(X\right)=1+4=5$ and so the sum to have the tuple form $\left(5\right)$. Considering the terms in both $P$ and $Q$ which are associated with $X^1$, $P_1\left(X\right)=X$ and $Q_1\left(X\right)=-3X$, we would then expect that $P_1\left(X\right)+Q_1\left(X\right)=X-3X=-2X$. We can continue this process for the other terms $X^2$ and $X^3$ to get \begin{align*} P_0\left(X\right)+Q_0\left(X\right)&=1+4=5\\ P_1\left(X\right)+Q_1\left(X\right)&=X-3X=-2X\\ P_2\left(X\right)+Q_2\left(X\right)&=X^2+X^2=2X^2\\ P_3\left(X\right)+Q_3\left(X\right)&=0X^3+X^3=X^3\\ \end{align*} This would then suggest that $P\left(X\right)+Q\left(X\right)=5-2X+2X^2+X^3$. Or, expressing this in tuple form, we have \begin{equation*} \left(1,1,1,0\right)+\left(4,-3,1,1\right)=\left(5,-2,2,1\right) \end{equation*} That is, the addition of two tuples representing polynomials is done by doing an "element-wise" addition of the tuples. There are a few things that would need to be considered for this to become the foundation for defining addition for polynomials. Firstly, we observed that $P_0\left(X\right)+Q_0\left(X\right)$ made sense as this represents integer addition. If we picked our coefficients from say $\mathbb{N}$, we would not be able to consider $P_0\left(X\right)-Q_0\left(X\right)$; in fact, this holds for each $P_i-Q_i$. It would therefore be useful to have closure of addition, and additionally a notion of subtraction of the elements of $S$. This puts a restriction on what the set $S$ can be, for example, it is clear that $S\neq\mathbb{N}$ as subtraction is not closed in $\mathbb{N}$. This also means our definition of polynomials is going to depend on the underlying set that the coefficients come from. It is therefore a wise idea to, at least temporarily, distinguish between when we are talking about polynomial addition and when we are talking about the addition of the elements of the set $S$. We will use $+_S$ when talking about addition between the elements of the set $S$, and we will use $\oplus_S$ for the polynomial addition\footnote{When we have fully defined polynomial addition, we will go with the usual convention of just using $+$ to denote addition}. Furthermore, we had that $P$ was of a lesser degree than $Q$, $\deg\left(P\right)=2$ and $\deg\left(Q\right)=3$. This poses no real issue as we can always extend an $m$-tuple to an $n$-tuple, for $m\deg\left(Q\right)$ where $\deg\left(P\right)=n$ and $\deg\left(P\right)=m$. Then as tuples we have that \begin{align*} P=\left(p_0,p_1,p_2,\dots,p_{n-1},p_n\right)\\ Q=\left(q_0,q_1,q_2,\dots,q_{m-1},q_m\right)\\ \end{align*} As $\deg\left(Q\right)<\deg\left(P\right)$ we use the tuple extension mapping $E_m^n$ on $Q$ and we have that $\deg\left(E_m^n\left(Q\right)\right)\leq n$. Hence \begin{equation*} \deg\left(P\oplus_S Q\right)\leq \deg\left(P\oplus_S E\left(Q\right)\right)\leq n = \max\left(\deg\left(P\right),\deg\left(Q\right)\right) \end{equation*} $\qed$ \end{lemma} We are getting an idea for our problem with the polynomial given by \begin{equation*} P=0+0*X+0*X^2+0*X^3+\dots+0*X^n \end{equation*} If we want lemma \ref{lem:NT_Polynomial_degree_addition} to be consistent, we should define the degree of $P$ to be such that it is no larger than the degree of any other polynomial. In particular, for $c\in S$ we have that $Q=c$ with $Q\in S\left[X\right]$ has degree $0$, we must have that $\deg\left(P\right)< \deg\left(Q\right)=0$. This still doesn't fully answer the question, which negative integer should we take for the degree of $P$? Maybe, once we have a definition for the multiplication of polynomials, it will provide further insight. Now, given a potential candidate for defining the addition of two polynomials, we can also consider a potential candidate for defining the subtraction of two polynomials. As before, we take inspiration from $\mathbb{Z}$. As we have shown that the addition of integers is closed and well-defined, additionally, for every $x\in\mathbb{Z}$ we have that $\exists y$ so that $x+y=0$. In particular, we take $y=-x$ so that the expression becomes $x-x=0$. A sensible definition for polynomial subtraction should also respect these properties; subtracting two polynomials should give another polynomial. This raises a question; suppose $P\in S\left[X\right]$, what is $P-P$? We know that in $\mathbb{N}$, $\mathbb{Z}$ and $\mathbb{Q}$, that for an element $x$ that $x-x$ should be $0$, but what does it mean for $0$ to be an element of $S$ and by extension $S\left[X\right]$? In particular is it the same $0$ as for $\mathbb{N}$, $\mathbb{Z}$ and $\mathbb{Q}$? On the other hand, we know that for any $x$ in $\mathbb{N}$, $\mathbb{Z}$ and $\mathbb{Q}$ that $x+0=x=0+x$, a similar sort of element of $S$ would be useful and clearly plays an important role for defining a similar element for $S\left[X\right]$. This idea is general enough, assuming we have a well-behaved $+_S$, that we can apply it to a set $S$. \begin{definition}{Additive Identity of a set $S$} Let $S$ be a set so that there is an operation $+_S:S^2\rightarrow S$ such that $+_S$ is closed and well-defined. Let $e\in S$. If we have that $\forall s \in S$ that $s+_S e=s$, then we say that $e$ is a right additive identity element of $S$. Similarly, if $\forall s \in S$ we have that $e+_Ss=s$, then we say that $e$ is a left additive identity element of $S$. If we have that $\forall s\in S$ that $e+_S s=s=s+_S e$, we simply call $e$ an additive identity element. If we need to be clear which set the additive inverse belongs to, we will write $e_S$ \end{definition} It is an immediate consequence of $+_S$ that the identity element is unique. \begin{proposition}{The additive identity element of a set $S$ is unique} Let $S$ be a set so that there is an operation $+_S:S^2\rightarrow S$ such that $+_S$ is closed and well-defined. Let $e,f\in S$ be additive identity elements of $S$. We have that $e=f$. Proof: Let $S$ and $+_S:S^2\rightarrow S$ be as given, and let $e,f\in S$ be additive identity elements of $S$. By definition, we have that \begin{equation*} e=e+_s f=f \end{equation*} As $+_S$ is well-defined and closed, we have that $e=f$ as required. $\qed$ \end{proposition} From this, we can immediately identify that $0$ in $\mathbb{N}$, $\mathbb{Z}$ and $\mathbb{Q}$ is unique. We have resolved one part of this problem, that in $\mathbb{N}$, $\mathbb{Z}$ and $\mathbb{Q}$, for an element $x$ that $x-x=0$. We have answered what it means for "$0$" to be in $S$, but what does it mean for $-x\in S$ given $x\in S$?. Noting that $x-x=x+_S\left(-x\right)$, this is precisely what it means for $x$ to be invertible in $S$ at least with respect to $+_S$. As with the additive identity of $S$, this idea is also general enough to apply to a more general set $S$. \begin{definition}{Additive Inverse of a set $S$} Let $S$ be a set so that there is an operation $+_S:S^2\rightarrow S$ such that $+_S$ is closed and well-defined. Let $s\in S$. If we have that $\exists x\in S$ such that $s+_S x=e$, then we say that $x$ is a right additive inverse element of $s$ in $S$. Similarly, if $\exists x\in S$ such that $x+_S s=e$, then we say that $x$ is a left additive inverse element of $s$ in $S$. If we have that $\exists x\in S$ that $x+_S s=s=s+_S x$, we simply call $x$ an additive inverse element of $s$ in $S$. \end{definition} As with the additive identity element, we have an immediate consequence that the inverse of an element $s\in S$ is unique. \begin{proposition}{The additive inverse element of an element of $S$ is unique} Let $S$ be a set so that there is an operation $+_S:S^2\rightarrow S$ such that $+_S$ is closed and well-defined. Let $s\in S$ be an arbitrary element of $S$. We have that the additive inverse of $s$ is unique. Proof: Let $S$ and $+_S:S^2\rightarrow S$ be as given, and let $s\in S$ be an arbitrary element of $S$ and suppose that $s$ has two inverses $x$ and $y$. By definition, we have that \begin{align*} x&=x+_S e\\ &=x+_S\left(s+_S y\right)\\ &= \end{align*} As $+_S$ is well-defined and closed, we have that $e=f$ as required. $\qed$ \end{proposition} It would also be useful to undo the addition of polynomials via polynomial subtraction. The only requirement is that we need $+_S$ to be invertible In particular, as we are using a well-defined and closed operation on $S$, that is $+_S$, we have gained a definition of subtraction for free! Using $-_S$ to denote subtraction in $S$, we have \begin{align*} \ominus_S:s^n\times s^n&\mapping s^n\\ \left(P, E\left(Q\right)\right)&\mapsto\ominus_S\left(P,E\left(Q\right)\right)=\left(p_0-_S q_0,p_1-_S q_1, p_2-_S q_2,\dots, p_{n-1}-_S0, p_n-_S0\right) \end{align*} Given a notion of subtraction, we can also define what it means for two polynomials to be equal. Firstly, recall what it means for \begin{definition}{Equality of Polynomials} Let $P,Q\in S\left[X\right]$ where $\deg\left(P\right)=n$ and $\deg\left(Q\right)=m$ where without loss of generality $m\leq n$. We say that $P$ and $Q$ are equal as polynomials, written $P=Q$, if and only if \begin{equation*} P\ominus_S Q = 0 = \left(\underbrace{0,0,0,\dots, 0,0}_{n+1 \text{ times}}\right) \end{equation*} That is, if the difference between the two is the zero polynomial. \end{definition} We can therefore define the following relation. \begin{definition} \end{definition} It is immediate that a polynomial therefore has a unique representation as an $n+1$-tuple. \subsubsection{Defining multiplication between two polynomials} We can use the same idea of the $n+1$-tuples to define multiplication of polynomials. Recall that we observed that we can express the intermediate $X$, and powers of it, as follows \begin{align*} P\left(X\right)=1=X^0 &\iff a=\left(1\right)\\ P\left(X\right)=X &\iff a=\left(0,1\right)\\ P\left(X\right)=X^2 &\iff a=\left(0,0,1\right)\\ P\left(X\right)=X^3 &\iff a=\left(0,0,0,1\right)\\ &\dots \end{align*} Intuitively, we want $X^2=X*X$, $X^3=X^2*X$ and so on. That is \begin{align*} X*X=\left(0,1\right)*\left(0,1\right)&=\left(0,0,1\right)=X^2\\ X^2*X=\left(0,0,1\right)*\left(0,1\right)&=\left(0,0,0,1\right)=X^3\\ &\dots \end{align*} What about more complex expressions? Say $X*\left(X+X^2\right)$. The answer to this would depend on if multiplication is distributive over addition with respect to the indeterminate, and additionally on multiplication is commutative!. For now, let us assume that this is the case, It seems therefore that multiplication by $X$ has the effect of \quotes{shifting} to the right \end{document}