# Lecture 1

## Introduction

Reading is not recommended before class, it's hard.

## Chapter 1: The real number and complex number systems

* Natural numbers: $\mathbb{N}=\{1,2,3,4....\}$ note by some conventions, $0$ is also a natural number

* IntegersL $\mathbb{Z}=\{...,-2,-1,0,1,2,...\}$

* Rational numbers: $\mathbb{Q}=\{\frac{m}{n}:m,n\in\mathbb{Z}\ and\ n\neq 0\}$

* Real numbers: $\mathbb{R}$ the topic of chapter

* Complex numbers: $\mathbb{C}=\{a+bi:a,b\in \mathbb{R}\}$

### Theorem ($\sqrt{2}$ is irrational)

$\exist p\in \mathbb{Q},p^2=2$ is false.

$\equiv\cancel{\exist} p\in \mathbb{Q}, p^2=2$

$\equiv p\in \mathbb{Q},p^2\neq 2$

#### Proof

Suppose for contradiction, $\exist p\in \mathbb{Q}$ such that $p^2=\mathbb{Q}$.

Let $p=\frac{m}{n}$, where $m,n \in \mathbb{Z}$ are not both even. (reduced form)

$p^2=2$ and $p=\frac{m}{n}$, so $m^2=2n^2$, so $m^2$ is even, $m$ is even.

So $m^2$ is divisible by 4, $2n^2$ is divisible by 4.

So $n^2$ is even. but they are not both even.

QED

### Theorem (No closest rational for a irrational number)

Let $A=\{p\in \mathbb{q}, p>0\ and\ p^2\leq 2\}$, Then $A$ does not have a largest element.

i.e. $\exist p\in A$ such that $\forall q\in A, q\leq p$ is false.

> Remark: The book give a very slick proof trying to lean from these kinds of proofs takes some effort. (It is perfectly fine to write that solution this way...)

#### Thought process

Let $p\in A,p\in \mathbb{Q}$, $p>0, p^2<2$.

We want a $\delta\in\mathbb{Q}$ such that $\delta>0$ and $(p+\delta)^2<2$.

$$
\begin{aligned}
    
(p+\delta)^2&<2\\
p^2+2p\delta+\delta^2&<2\\
\delta(2p+\delta)&< 2-p^2\\
\delta&<\frac{2-p^2}{2p-\delta}
\end{aligned}
$$

From $(p+\delta)^2<2$, we know $\delta<2$ (this is a crude bound, $\delta<\sqrt{2}$).

So one choice can be $\delta=\frac{2-p^2}{2p+2}$

#### Proof

$\forall p\in A$, we can find a $\delta=\frac{2-p^2}{2p+2}$ which is greater than zero ($p^2<2,2-p^2>0,2p+2>0,\delta>0$) and construct a new number $(p+\delta)^2$ such that $p^2<(p+\delta)^2<2$.

_Here we construct a formula for approximate $\sqrt{2}=\lim_{i\to \infty}p_0=1,p_{i+1}=p_i+\frac{2-p_i^2}{2p_i+2}$_

Interesting...

We can also further optimize the formula by changing the bound of $\delta$ to $\delta< 2-p$, since $(p+\delta)^2<2,p+\delta<2$

```python
def sqrt_2(acc):
    if acc==0: return 1
    c=sqrt_2(n-1)
    return c+((2-c**2)/(2*c+2))
```

### Definition and notations for sets

Some set notation

$\Pi\in \mathbb{R}$

use $\subset,\subsetneq$ in this class.

* $A\subset B$, $\forall x\in A, x\in B$
* $A=B$, $A\subset B$ and $B\subset A$
* $A\subsetneq$ means $A\subset B$ and $A\neq B$

