Mainly \(\mathbb N\) and \(\mathbb Z\) (Lecture 3)
In this lecture, we'll be talking about the construction of natural numbers, integers and rational numbers. There arithmetic will be defined. In the end you can basically cover everything you already knew about natural numbers integers and rational numbers, but now you can say with (more) confidence you actually know what a natural number, integer and rational number are.
\(\mathbb N\)
Without the time to do properly the full picture, but here it comes:
A set \(x\) is inductive if: - \(\emptyset\in x\) - \(\forall a\in x, a\cup\{a\}\in x\)
\(a\cup\{a\}\) is called the successor of \(a\), sometime we write it as \(S(a)\).
Another axiom of set theory is the axiom of infinity asserting existence of an inductive set.
We have the following theoremFor any two set \(x\) and \(y\), if \(x\) and \(y\) are both inductive, then so is \(x\cap y\)
\(\emptyset \in x\cap y\) because \(\emptyset\in x\) and \(\emptyset\in y\). Suppose \(a\in x\cap y\), then since \(a\in x\) (\(\in y\), resp.) we have \(a\cup\{a\}\in x\) (\(\in y\) resp.), thus \(a\cup\{a\}\in x\cup y\).
Let \(x\) be the inductive set endorsed by the axiom of infinity, we define the natural number as the smallest inductive subset of \(x\) \(\bigcap_{y\in\mathcal P(x) \textrm{inductive}} y\)
This intimidating definition is actually quite nice for \(\mathbb N\) being inductive must contain \(\{\emptyset, S(\emptyset), S(S(\emptyset)) , ...\}\) and \(\{\emptyset, S(\emptyset), S(S(\emptyset)) , ...\}\) is indeed inductive hence we have \(\mathbb N = \{\emptyset, S(\emptyset), S(S(\emptyset)) , ...\}\). Still intimidating? (This is only an aid for clarification) Maybe instead of \(\emptyset\), we write it as \(0\) and instead of \(S(\emptyset)\) we write it as \(1\) etc. Then
- \(0 = \emptyset\)
- \(1 = S(0) = S(\emptyset)=\emptyset\cup\{\emptyset\}=\{\emptyset\}=\{0\}\)
- \(2 = S(1) = 1\cup\{1\}=\{0\}\cup\{1\}=\{0,1\}\)
- In general, \(n+1 = \{0,...,n\}\)
So \(n\) is a set with \(n\) elements. In particular \(0\ne S(n)\) for any \(n\). It requires more set theory than that I would like to develop3 to prove \(S\) is injective, i.e \(S(a)=S(b)\implies a=b\), but this is true.
Now we can show the principle of induction:Let \(P\) be some property of natural number, if \(P(0)\) and \(\forall m\in\mathbb N,P(m)\implies P(m+1)\) then all natural number satisfies \(P\).
Let \(y:=\{n\in\mathbb N|P(n)\}\). Then \(y\) is inductive: \(0\in y\) and for any \(m\in y\), since \(P(m)\) we have \(P(m+1)\) hence \(m+1\in y\). So \(y\) is an inductive subset of \(\mathbb N\) who is the smallest inductive subset. Hence \(y=\mathbb N\). In otherword, all natural number has the property \(P\).
For every \(n \in\mathbb N\), we can define an "adding n" function, for convenience we write it as \(n+\): 1. \(n + 0 := n\) 2. \(n + S(m) := S(n+m)\)
For example the function "adding 0" does nothing, and we prove this by induction:
- \(0+0=0\) by definition
- Suppose \(0+m=m\), then \(0+S(m)=S(0+m)=S(m)\)
From this we can prove the commutativity: \(\forall n\in\mathbb N\forall m\in\mathbb N,n+m=m+n\).
- From above we proved \(\forall m\in\mathbb N,0+m=m=m+0\)
- Suppose \(\forall m\in\mathbb N,n+m=m+n\). Let's now prove \(\forall m\in\mathbb N,S(n)+m=m+S(n)\) by induction on \(m\):
- \(S(n)+0=S(n)=0+S(n)\)
- Suppose \(S(n)+m=m+S(n)\), then \(S(n)+S(m)=S(S(n)+m)=S(m+S(n))=S(S(m+n))\). Similarly \(S(m)+S(n)=S(m+S(n))=S(S(m+n))\).
Associativity is proved in a similar (but more sophisticated) manner.
The function "adding \(n\)" is injective: if \(n+a=n+b\) then \(a=b\). This is more wildly known as the cancellation property. - "adding \(0\)" is injective, indeed: \(0+a=0+b\) by definition is \(a=b\). - Suppose "adding \(n\)" is injective then \(S(n)+a=S(n)+b\implies a+S(n)=b+S(n)\implies S(a+n)=S(b+n)\implies a+n=b+n\implies n+a=n+b\implies a=b\).
Similarly we can define a function "multiplying \(n\)", denote it by \(n\times\): 1. \(n\times 0:=0\) 2. \(n\times S(m) := n\times m+ n\)
So for example \(n\times 1=n\times S(0)=n\times0+n=n\). We can of course prove the commutativity and asscociativity for multiplication. These are left as exercises.
From addition we can define "less than" (\(<\)) and and "divisibility" (\(|\)) amongst other things: Let \(m\), \(n\) be natural numbers
- \(n < m\iff\exists c\in\mathbb N,m=n+c\)
- \(n\le m\iff n<m\lor n=m\)
- \(n | m\iff\exists k\in\mathbb N,m=n\times k\).
Let \(s\) be an non-empty subset of natural number, then \(s\) has a least element. This is \(\exists n_0\in s,\forall m\in s,n_0 \le m\).
We proof by contradiction. Suppose \(s\) is non-empty without a least element. Define \(Z:=\{k\in\mathbb N|\forall n\in\mathbb N,(n<k)\implies(n\notin s)\}\). Then \(0\in Z\). Suppose \(k\in Z\), let \(m<S(k)\) then either \(m<k\) or \(m=k\). If \(m<k\), by \(k\in Z\) we have \(m\notin s\). If \(m=k\),then \(m\notin s\) for otherwise \(m\) is the least element of \(s\). Hence as long as \(m< S(k)\), we have \(m\notin s\). Hence \(Z\) is inductive. Then \(Z=\mathbb N\). Then \(s=\emptyset\), this is a contradiction.
Let \(P\) be a property about natural numbers. Suppose \(P(0)\) and for any natural number \(n\), \(P(0)\land P(1)\land...\land P(n)\implies P(n+1)\). Then all natural numbers have property \(P\).
Let \(s:=\{n\in\mathbb N|\neg P(n)\}\). Then if \(s\) is non-empty, \(s\) will have least element \(n_0\). \(n_0\) cannot be \(0\), since \(P(0)\). Then \(P(1)\),....,\(P(n_0-1)\) but \(\neg P(n_0)\). Contradiction. Hence \(s=\emptyset\).
In fact well-ordering principle \(\iff\) strong induction. Please fill in the other direction.
Example and practice using induction
\[\sum_{i=0}^n i^2=\frac{n(n+1)(2n+1)}{6}\]
- For \(n=0\), left hand side is \(0\) and so the right hand side.
- Suppose \(\sum_{i=0}^n i^2=\frac{n(n+1)(2n+1)}{6}\) then \(\sum_{i=0}^{n+1} i^2=\sum_{i=0}^n i^2+(n+1)^2=\frac{n(n+1)(2n+1)}{6}+(n+1)^2=\frac{n(n+1)(2n+1)+6(n+1)^2}{6}=\frac{(n+1)(n(2n+1)+6(n+1))}{6}=\frac{(n+1)(n+2)(2n+3)}{6}\)
\[\sum_{i=0}^n (2i+1)=(n+1)^2\]
- For \(n=0\), left hand side is \(1\) is indeed \((0+1)^2\).
- Suppose \(\sum_{i=0}^n (2i+1)=(n+1)^2\) then \(\sum_{i=0}^{n+1} (2i+1)=(n+1)^2+(2n+3)=n^2+2n+1+2n+3=n^2+4n+4=(n+2)^2\)
Let \(0!=1\) and \((n+1)!=n!\times(n+1)\). Let \({n\choose k}=\frac{n!}{(n-k)!k!}\) for \(k\le n\) and \(0\) for \(k>n\)
\[{n\choose k+1}+{n\choose k}={n+1\choose k+1}\]
- For \(k>n\) both lhs, rhs are 0.
- For \(k=n\) then lhs is \(0+1\) while rhs is 1.
- For \(k<n\) then
\[(a+b)^n=\sum_{i=0}^n{n\choose i}a^ib^{n-i}\]
- \(n=0\), lhs is \(1\); rhs is \({0\choose 0}a^0b^0=1\).
- Suppose \((a+b)^n=\sum_{i=0}^n{n\choose i}a^ib^{n-i}\), then
\[\begin{equation} \nonumber \begin{aligned} (a+b)^{n+1}&=a^{n+1}+\sum_{i=0}^{n-1}{n\choose k}a^{k+1} b^{n-k}+b^{n+1}+\sum_{i=0}^{n-1}{n\choose k+1}a^{k+1} b^{n-k}\\ &=a^{n+1}+b^{n+1}+\sum_{i=0}^{n-1}{n+1\choose k+1}a^{k+1}b^{n-k}\\ &=a^{n+1}+b^{n+1}+\sum_{i=1}^{n}{n+1\choose k}a^{k}b^{n+1-k}\\ &=\sum_{i=0}^{n+1}{n+1\choose k}a^{k}b^{n+1-k} \end{aligned} \end{equation}\]
Define the fibbonacci number to be \(F_0 = 0\), \(F_1=1\) and \(F_n = F_{n-1}+F_{n-2}\). Write \(\phi = \frac{\sqrt 5-1}{2}\)
\[F_n=\frac{1}{\sqrt 5}\left(\left(\frac{1+\sqrt 5}{2}\right)^n-\left(\frac{1-\sqrt 5}{2}\right)^n\right)\]
In this example, we need to use strong induction.
- \(n=0\), check
- \(n=1\), rhs = \(\frac{1}{\sqrt 5}\left(\frac{1+\sqrt 5-1+\sqrt 5}{2}\right)=1\)
- Suppose hold for \(0\) up to \(n\). Then write \(\phi = \frac{1+\sqrt 5}{2}\). Then \(F_n=\frac{1}{\sqrt 5}\left(\phi^n-(-\frac{1}{\phi})^n\right)\) and \(F_{n-1}=\frac{1}{\sqrt 5}\left(\phi^{n-1}-(-\frac{1}{\phi})^{n-1}\right)\). Note \(\phi ^ {n+1}-\phi^n-\phi^{n-1}=\phi^{n-1}\times(\phi^2-\phi-1)=\phi^{n-1}\times(\frac{3+\sqrt 5}{2}-\frac{1+\sqrt 5}{2}-1)=0\). Similarly \(\left(-\frac{1}{\phi}\right)^{n+1}-\left(-\frac{1}{\phi}\right)^n-\left(-\frac{1}{\phi}\right)^{n-1}=\left(-\frac{1}{\phi}\right)^{n-1}\times\left(\left(-\frac{1}{\phi}\right)^2-\left(-\frac{1}{\phi}\right)-1\right)=\left(-\frac{1}{\phi}\right)^{n-1}\times\left(\frac{2}{3+\sqrt 5}+\frac{2}{\sqrt 5+1}-1\right)=\left(-\frac{1}{\phi}\right)^{n-1}\times\left(\frac{3-\sqrt5}{2}+\frac{\sqrt 5-1}{2}-1\right)=0\). Hence we have \(F_{n+1}=\frac{1}{\sqrt 5}\left(\left(\frac{1+\sqrt 5}{2}\right)^{n+1}-\left(\frac{1-\sqrt 5}{2}\right)^{n+1}\right)\)
\(\mathbb Z\)
Definition
This is the first descent application of equivalence relation.
Let us define a relation \(\sim\) on \(\mathbb N\times\mathbb N\) to be \((a,b)\sim(x,y)\iff a+y=b+x\).
\(\sim\) is an equivalence relation.
- reflexivity: for all \((a,b)\in\mathbb N^2\), since \(a+b=b+a\), we must have \((a,b)\sim(a,b)\).
- symmetry: \((a,b)\sim(x,y)\iff a+y=b+x\iff x+b=y+a\iff(x,y)\sim(a,b)\).
- transitivity: \((a,b)\sim(x,y)\land(x,y)\sim(\phi,\psi)\) then \(a+y=b+x\land x+\psi=y+\phi\) then \(a+y+\phi=b+x+\phi\) then \(a+x+\psi=b+x+\phi\) then \(a+\psi = b+\phi\).
\(\mathbb Z\) is the set of equivalence classes under \(\sim\). In maths jibber jabber this is \(\mathbb N^2\) modulo \(\sim\), written as \(\frac{\mathbb{N}^2}\sim\).
Let us look at some examples of elements in \(\mathbb Z\)
- \([(3,0)]_\sim\) is also \([(4,1)]_\sim\) or \([(5,2)]_\sim\) etc.
- \([(0,3)]_\sim\) is also \([(1,4)]_\sim\) or \([(2,5)]_\sim\) etc.
- \([(0,0)]_\sim\) is also \([(1,1)]_\sim\) or \([(2,2)]_\sim\) etc.
Every elements in \(\mathbb Z\) can be written as \([(a,0)]_\sim\) or \([(0,a)]_\sim\). Such an \(a\) is unique.
Say we are talking about \([(x,y)]_\sim\). If \(x<y\) then by definition there is some \(z\) such that \(y=x+z\), then \([(x,y)]_\sim=[(0,z)]_\sim\). If \(x=y\), then \([(x,y)]_\sim=[(0,0)]_\sim\). If \(y<x\), then for some \(z\) we have \(y+z=x\) then \([(z,0)]_\sim\) will do.
\([(a,0)]_\sim=[(b,0)]_\sim\implies(a,0)\sim(b,0)\implies a=b\). The other case is basically the same.
So now the definition may be clearer: \([(a,0)]_\sim\) are the "positive integers" and \([(0, a)]_\sim\) are the "negative integers".
Arithmetic on \(\mathbb Z\)
Addition and subtraction
Let \([(a,b)]\) and \([(x,y)]\) be integers
We define \([(a,b)]+[(x,y)]=[(a+x, b+y)]\). We need to check whether this is well-defined: Suppose \((a,b)\sim(a',b')\) and \((x,y)\sim(x',y')\). Then \((a+x,b+y)\sim(a'+x',b'+y')\) because \((a+x)+(b'+y')=(a+b')+(x+y')=(b+a')+(y+x')=(b+y)+(a'+x')\)
Some examples:
- \([(1,0)]+[(0,1)]=[(1,1)]=[(0,0)]\). (Informally \(1+(-1)=0\))
- \([(0,1)]+[(0,2)]=[(0,3)]\) (Informally \((-1)+(-2)=-3\))
- \([(4,5)]+[(12,6)]=[(16,11)]=[(5,0)]\). (Informally \((-1)+6=5\))
We can define \([(a,b)]-[(x,y)]=[(a,b)]+[(y,x)]\). (Informally \(z_1-z_2=z_1+(-z_2)\)). Thankfully we checked addition is well defined, we don't have to check again.
We can of course check commutativity associativity of addition on \(\mathbb Z\) and so on.
Multiplication
We define \([(a,b)]\times[(x,y)]=[(ax+by,ay+bx)]\). We also need to check whether this is well-defined: Suppose \((a,b)\sim(a',b')\) and \((x,y)\sim(x',y')\). then \(x(a+b')+y(a'+b)+a'(x+y')+b'(x'+y)=x(a'+b)+y(a+b')+a'(x'+y)+b'(x+y')\). Expand out and cancel what can be cancelled we get \(ax+by+a'y'+b'x'=bx+ay+a'x'+b'y'\). Rearrange what get what we want.
Some examples:
- \([(1,1)]\times[(1,0)]=[(1,1)]=[(0,0)]\). (Informally \(0\times1=0\))
- \([(0,1)]\times[(0,1)]=[(1,0)]\). (Informally \((-1)\times(-1)=1\))
Order
Let \(x\) be an element in \(\mathbb Z\). We say \(x\ge 0\) (\(x\) is non-negative) if \(x=[(k,0)]\) for some \(k\in\mathbb N\). We say \(x\le 0\) (\(x\) is non-positive) if \(x=[(0,k)]\) for some \(k\in\mathbb N\). From previous theorem, this is always possible.
Thus we can define an order on \(\mathbb Z\): for any two integers \(x\) and \(y\), \(x\le y\iff y-x\le 0\).
Let \(x\) and \(y\) be two non-positive integer then \(x\times y\) is non-negative.
So for some \(k_1,k_2\in\mathbb N\), \(x=[(0,k_1)]\) and \(y=[(0,k_2)]\). Then \(x\times y\) be definition is \([(k_1\times k_2,0)]\), so non-negative.
So you must have seen \([(k,0)]\) is just \(k\) and \([(0,k)]\) is just \(-k\) like what we learnt in primary school.
Exercise
- Let \(x,y,z\) be integers, prove \(x(y+z)=xy+xz\).
- Let \(a,b\) be integers, prove \(a-b+b=a\)
- Google what is integral domain and prove that \(\mathbb Z\) is an integral domain. If too boring, assume \(\mathbb Z\) is a ring, so just prove \(xy=0\implies x=0\lor y=0\)
Field
A field is a set \(F\) with addition and multiplication on \(F\) such that
So \(\mathbb N\) is not a field for \(1\) doesn't have additive inverse "\(-1\in\mathbb N\)"; \(\mathbb Z\) is not a field for \(2\) doesn't have multiplicative inverse \(\frac{1}{2}\in\mathbb Z\). Let's fix this by constructing \(\mathbb Q\).
\(\mathbb Q\)
The construction of rational from integers is awfully similar to construction of integers. We define everything but leave everything else as exercise.
We define a relation on \(\mathbb Z\times(\mathbb Z-\{0\})\) to be \((a,b)\approx(c,d)\iff ad=bc\).
\(\approx\) is equivalence relation.
\(\mathbb Q:=\frac{\mathbb Z\times(\mathbb Z-\{0\})}{\approx}\) is the set of equivalence classes.
Let \([(a,b)]_\approx\) and \([(c,d)]_\approx\) be rational numbers.
- addition is defined as \([(a,b)]_\approx+[(c,d)]_\approx[(ad+bc,bd)]_\approx\);
- \(-[(a,b)]_\approx=[(-a,b)]_\approx\). \([(a,b)]_\approx-[(c,d)]_\approx=[(a,b)]_\approx+(-[(c,d)]_\approx)\)
- multiplication is defined as \([(a,b)]_\approx\times[(c,d)]_\approx=[(ac,bd)]_\approx\);
Addition and multiplication is well defined.Hence subtraction is well defined.
- \([(a,b)]_\approx\ge0\) if and only if \(a\times b\ge0\) as an inequality of integers.
- \([(a,b)]_\approx\ge[(c,d)]_\approx\) if and only if \([(a,b)]_\approx-[(c,d)]_\approx\ge0\)
In the end instead of \([(a,b)]_\approx\), we write \(\frac{a}{b}\) like we did in primary school.
Big Exercise
Prove that \(\mathbb Q\) is indeed a field.
Summary
So natural number is the smallest inductive set. So integer is \(\frac{\mathbb N^2}{\sim}\). So rational number is \(\frac{\mathbb Z\times(\mathbb Z-\{0\})}{\approx}\). So we learnt so much yet in a sense nothing new.