-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathReal-Analysis.tex
More file actions
2331 lines (2114 loc) · 122 KB
/
Copy pathReal-Analysis.tex
File metadata and controls
2331 lines (2114 loc) · 122 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
\documentclass[]{article}
\input{../mathdoc}
\input{../mathsym}
\input{../theorem}
\author{Presenter: Maya Chhetri, Notes by Michael Reed, Book: Walter Rudin 3rd}
\title{Real Analysis}
\date{Fall 2017, \today}
\begin{document}
\maketitle
%\begin{abstract}
%\end{abstract}
\section{The Real and Complex Number System}
\ul{Notation}:
$\mb{N} = \{0,1,2,3,\dots\}$ - set of natural numbers.
$\mb Z = \{0,\pm 1, \pm 2,\dots\}$ - set of integers.
$\mb Q = \{\frac{m}{n}:m,n\in\mb Z,\, n\neq 0\}$ - set of rationals $\ra$ we know $\mb Q$.
$\mb R$ - set of all real numbers.
$\mb C = \{a+ib: a,b\in\mb R \text{ and } i^2 = -1\}$.
\ul{Sets} - collection of objects. Empty set - $\emptyset$ - a set which contains no objects.
$A\subset B$ if $a\in A \implies a\in B$ for all $a\in A$.
\begin{example}
$A\varsubsetneq B$ - a proper subset if $A\subset B$ and $\exists x_0 \in B$ such that $x_0 \notin A$.
\end{example}
\begin{note}
$A = B$ iff $A\subset B$ and $B\subset A$.
\end{note}
\ul{Order on a set}: Let $S$ be a set. An order, denoted by '$<$' is a \ul{relation} on $S$ satisfying:
\begin{enumerate}
\item[(i)] If $x,y\in S$ then one of the following must hold:
$x<y$, $x = y$, $y<x$.
\item[(ii)] If $x,y,z\in S$ with $x<y$ and $y<z$ then $x<z$ (transitive property).
\end{enumerate}
\begin{example}
$S = \mb N$ with \say{$<$} ($x<y$ if $y-x>0$) is an ordered set.
\end{example}
\begin{definition}
[Upper bound] Let $(S,<)$ be an ordered set, $E\subset S$. We say that $\beta$ is an \ul{upper bound of $E$} if $s\leq\beta$ for all $s\in E$.
\end{definition}
\begin{definition}
[Lower bound] $\alpha$ is a \ul{lower bound of $E$} if $\alpha \leq s$ for all $s\in E$.
\end{definition}
\begin{example}
$(S = \mb Q,<)$ and
\begin{enumerate}
\item $E = \{x \in \mb Q: 0\leq x < 1\}$. $\beta = 1$ is an upper bound of $E$ and $1\notin E$. $\beta \geq 1$ are upper bounds of $E$. $\alpha = 0$ is a lower bound of $E$ and $0\in E$. $\alpha \leq 0$ are lower bounds of $E$.
\end{enumerate}
\end{example}
\begin{definition}
[Least upper bound] Let $E\subset (S,<)$. We say that $\alpha \in S$ is the least upper bound or supremum of $E$ if:
\begin{itemize}
\item[(i)] $\alpha$ is an upper bound of $E$, and
\item[(ii)] if $\gamma$ is an upper bound of $E$, then $\alpha \leq \gamma$ (or $\gamma $ is not an upper bound for any $\gamma < \alpha$).
\end{itemize}
\end{definition}
\ul{We write}: $\alpha = \text{lub} E$ or $\alpha = \sup E$.
\begin{example}
[continued] $\sup E = 1 \notin E$, $\inf = 0 \in E$. $\max E$ is a the $\sup E$ and it belongs to $E$.
\end{example}
Rational numbers $\mb Q$ has holes.
\begin{lemma}
$\sqrt{2} \notin \mb Q$. That is $x^2 = 2$ has no solution in $\mb Q$.
\end{lemma}
\begin{proof}
We will prove by contradiction (BWOC). Suppose $\sqrt{2} \in \mb Q$. Then $\sqrt{2} = \frac{m}{n}$, with $m,n\in \mb Z$, $n\neq 0$ and $\frac{m}{n}$ in least terms or $\gcd (m,n) = 1$. Then $2 = \frac{m^2}{n^2} \implies m^2 = 2n^2$. Then $m^2$ is even. \ul{So $m$ is even}.
\begin{proof}
Suppose $m$ is odd. Then $m = 2k + 1$ for some $k \in \mb Z$. $\implies m^2 = (2k+1)^2 = 4k^2 + 4k + 1 = 2(2k^2 + 2k) + 1 \implies m^2$ is odd, a contradiction. So $m$ must be even.
\end{proof}
Then $m = 2l$ for some $l\in \mb Z$. Then $(2l)^2 = 2n^2 \implies 4l^2 = 2n^2 \implies 2l^2 = n^2$. So $n^2$ is even and hence $n$ is even. This is a contradiction to $\frac{m}{n}$ being in least terms. So $\sqrt{2} \notin \mb Q$.
\end{proof}
\begin{example}
Prove that $\sup E = 1$ if $E = \{x \in \mb Q : 0 \leq x < 1\}$.
\begin{enumerate}
\item[(i)] Clearly $x<1$ for all $x\in E$. So $1$ is an upper bound of $E$.
\item[(ii)] If $\gamma < 1$ then $\gamma$ is not an upper bound of $E$. If $\gamma \leq 0$, then clearly $\gamma$ is not an upper bound of $E$. If $0<\gamma < 1$, then $x = \frac{\gamma + 1}{2}$. But $\gamma < x\in E$ by construction, so $\gamma$ is not an upper bound. Therefore \ul{$ \sup E = 1$}.
\end{enumerate}
\end{example}
\begin{theorem}
[Uniqueness of supremum] Let $(S,<)$ be an ordered set. If $E\subset S$ has supremum (or infimum) in $S$, then it is unique.
\begin{proof}
Let $\alpha_1 = \sup E$ and $\alpha_2 = \sup E$. Then by definition $\alpha_1$ and $\alpha_2$ are upper bounds of $E$. But $\alpha_1 = \sup E$ and $\alpha_2$ is an upper bound of $E$, so $\alpha_1 \leq \alpha_2$. Switching roles of $\alpha_1$ and $\alpha_2$, we get $\alpha_2 \leq \alpha_1$. Combining these two, $\alpha_1 = \alpha_2$. So $\sup E$ is unique.
\end{proof}
\end{theorem}
\begin{example}
$A := \{ x\in\mb Q : x>0 \text{ and } x^2 \leq 2\}$. $B:=\{ x\in\mb Q: x>0 \text{ and } x^2\geq 2\}$. $A\cap B = \{ x \in\mb Q : x>0 \text{ and } x^2 = 2\} = \emptyset$ - showed.
\begin{enumerate}
\item $A$ is bounded above in $\mb Q$ ($B$ is bouned below in $\mb Q$).
If $a\in A$ and $b\in B$ then $a\leq b$.
\item There is no upper bound of $A$ in $A$.
Let $p>0\in \mb Q$ be fixed and arbitrary. Set $q:= p - \frac{p^2-2}{p+2} = \frac{2(p+2)}{p+2}$. $q^2-2 = \frac{4p^2 + 8p +4}{(p+2)} - 2 = \frac{4p^2 + 8p + 4 - 2p^2 - 8p - 8}{(p+2)^2} = \frac{2(p^2-2)}{(p+2)^2}$. So, $q^2 < 2$ if and only if $p^2 < 2$. Therefore $q\in A$ if and only if $p\in A$.
Suppose $p\in A$ is an upper bound of $A$. Then $q = \frac{2p+2}{p+2} > p$ and $q\in A$. Therefore $p$ cannot be an upper bound of $A$.
\item $A$ has no least upper bound or supremum in $\mb Q$.
$B$ is the set of upper bounds of $A$. Repeating the argument of 2. for $B$, there is no lower bound of $B$ in $B$.
That means $A$ has no least upper bound in~$\mb Q$.
\end{enumerate}
\end{example}
\begin{definition}
[Least upper bound property] Let $(S,<)$ be an ordered set. Then $S$ is said to have the least upper bound property if every nonempty subset of $S$ that is bounded above has supremum in $S$ i.e., $\forall E\subset S$ with $E\neq \emptyset$ and bounded above, $\sup E \in S$.
\end{definition}
\begin{example}
$(Q,<)$ (usual ordering) does not have least upper bound property.
\begin{proof}
[Reason] $A = \{x\in\mb Q: x>0 \text{ and } x^2\leq 2\}\subset \mb Q$.
\begin{itemize}
\item $A\neq\emptyset$ since $1\in \mb Q$.
\item $A$ is bounded above (by $B$).
\end{itemize}
But $\sup A$ does not exist in $\mb Q$
\end{proof}
\end{example}
\begin{theorem}
Let $(S,<)$ with the least upper bound property. Let $B\subset S$ with $B\neq \emptyset$ and $B$ is bounded below.
Set $L = $ set of all lower bounds of $B$. Then $\alpha = \sup L$ exists in $S$, and $\alpha = \inf B$.
\end{theorem}
\begin{proof}
First, we want to show:
\begin{enumerate}
\item[(i)] $L$ is nonempty, and
\item[(ii)] $L$ is bounded above.
\end{enumerate}
$L$ is nonempty since $B$ is bounded below and hence $\exists l\in S$ such that $l\leq b$ for all $b\in B$. By definition of $L$, $l \leq b$ for all $l\in L$ and $\forall b\in B$ and $B\neq\emptyset$. So $L$ is bounded above.
By the least upper bound property of $S$, $\sup L\in S$. Define $\alpha = \sup L$. \ul{We claim}:
\begin{enumerate}
\item[(a)] $\alpha$ is a lower bound of $B$, and
\begin{proof}
$\alpha = \sup L$ and if $b\in B$ then $\alpha \geq l$ for all $l\in L$. But $l\leq b$ for $b\in B$, so $b$ is an upper bound of $L$. Therefore, $\alpha \leq b$ since $\alpha = \sup L$.
\end{proof}
\item[(b)] $\gamma>\alpha$ is not a lower bound of $B$.
\begin{proof}
If $\gamma > \alpha$ then $\gamma \notin L$ and so $\alpha = \inf B$.
\end{proof}
\end{enumerate}
(a), (b) $\implies \alpha = \inf B$.
\end{proof}
\begin{definition}
[Field] A field $F$ is a set with two operations
\begin{itemize}
\item addition '+'
\item multiplication '$\cdot$'
\end{itemize}
Satisfying the following axioms:
\begin{enumerate}
\item[(A1)] $x+y \in F$, $\dots$ (A5).
\item[(M1)] $x\cdot y \in F$, $\dots$ (M5).
\item[(D)] $x\cdot(y+z) = x\cdot y + x\cdot z$ for all $x,y,z\in F$.
\end{enumerate}
\end{definition}
\begin{proposition}
\label{prop1.14}
Let $(F,+\cdot)$ be a field. Then for $x,y,z\in F$,
\begin{enumerate}
\item[(a)] If $x+y = x+z$, then $y = z$. (Cancellation law)
\item[(b)] If $x+y = x$, then $y = 0$.
\item[(c)] If $x+y = 0$, then $y = -x$.
\item[(d)] $-(-x)=x$.
\end{enumerate}
\end{proposition}
\begin{proof}
Cases:
\begin{enumerate}
\item[(a)] $y \os{A4}{=} 0+y \os{A5}{=} (-x+x) + y \os{A3}{=} -x+(x+y) \os{A3}{=} -x+(x+z)\equiv (-x+x)+z \os{A5}{=} 0+z \os{A4}{=} z$
\item[(b)] Taking $z=0$ in (a), we get $x+y = x+0 \implies y=0$.
\item[(d)] Let $x\in F$. Then $-x\in F$ such that $x+(-x)=0$. Since $-x\in F$, $\exists -(-x)\in F$ such that $-(-x)+(-x)=0$. So $x$ and $-(-x)$ are additive inverse of $-x$, by (c) $x=-(-x)$.
\end{enumerate}
Done.
\end{proof}
\begin{proposition}
Let $(F,+,\cdot)$ a field with $x,y,z\in F$. Then
\begin{enumerate}
\item[(a)] If $x\neq 0$ and $xy=xz$ then $y=z$.
\begin{proof}
Let $x\neq 0$ and $xy = xz$. $y \os{M4}{=} 1\cdot y \os{M5}{=} (\frac{1}{x}\cdot x)\cdot y \os{M3}{=} \frac{1}{x}(xy) \equiv \frac{1}{x}(xz) \os{M3}{=} (\frac{1}{x}\cdot x)\cdot z \os{M5}{=} 1\cdot z \os{M4}{=} z$
\end{proof}
\item[(b)] If $x\neq 0$ and $xy=x$ then $y=1$.
\item[(c)] If $x\neq 0$ and $xy = 1$ then $y=\frac{1}{x}$.
\item[(d)] If $x\neq 0$, then $\frac{1}{1/x} = x$.
\end{enumerate}
\end{proposition}
\begin{proposition}
\label{prop1.16}
Let $x,y,z\in (F,+,\cdot)$ field. Then
\begin{enumerate}
\item[(a)] $0\cdot x = 0$
\item[(b)] If $x\neq 0$ and $y\neq 0$ then $xy\neq 0$.
\item[(c)] $(-x)y = -(xy) = x(-y)$.
\item[(d)] $(-x)(-y) = xy$.
\end{enumerate}
\end{proposition}
\begin{proof}
Cases:
\begin{enumerate}
\item[(a)] $0\cdot x = (0+0)\cdot x \os{D}{=} 0\cdot x + 0\cdot x$. Then $0\cdot x = 0$ (Proposition \ref{prop1.14}(b)).
\item[(b)] We'll prove by contradiction. Let $x\neq 0$, $y\neq 0$ but $xy=0$. Then $1 \os{M4}{=} 1\cdot 1 = (x\cdot \frac{1}{x})(y\cdot \frac{1}{y})$ because $\exists \frac{1}{x},\frac{1}{y}\in F$ such that $x\cdot \frac{1}{x} = 1$ and $y\cdot \frac{1}{y} = 1$. Then $(x\cdot \frac{1}{x})(y\cdot \frac{1}{y}) \os{M2-M3}{=} (xy)(\frac{1}{x}\cdot\frac{1}{y}) \equiv 0(\frac{1}{x}\cdot\frac{1}{y}) \os{(a)}{=} 0 \implies 1 =0$, a contradiction to the assumption that $1\neq 0$ (M4). So $xy\neq 0$.
\item[(c)] Need to show $(-x)y$ is an additive inverse of $xy$. $(-x)y + xy \os{D}{=} (-x+x)y \os{A5}{=} 0\cdot y \os{(a)}{=} 0 \implies (-x)y = -(xy)$ by Proposition \ref{prop1.14}(c). Similarly, $-(xy) = x(-y)$.
\item[(d)] $(-x)(-y) \os{(c)}{=} -(x(-y)) \os{(c)}{=} -[-(xy)] \os{\text{Prop \ref{prop1.14}(d)}}{=} xy$
\end{enumerate}
Done.
\end{proof}
Field, Ordered set $\}\implies$ Ordered field.
\begin{definition}
An ordered field $(F,+,\cdot,<)$ is a field which is also an ordered set and satisfies:
\begin{enumerate}
\item[(i)] If $y<z$ then $x+y<x+z$ for all $x\in F$.
\item[(ii)] If $x>0$ and $y>0$ then $xy>0$.
\end{enumerate}
\end{definition}
\begin{example}
$(\mb Q,+,\cdot,<)$ is an ordered field with:
\begin{enumerate}
\item[+:] $\frac{a}{b} + \frac{c}{d} = \frac{ad+bc}{bd}$ for $\frac{a}{b},\frac{c}{d}\in\mb Q$.
\item[$\cdot$:] $\frac{a}{b}\cdot\frac{c}{d} = \frac{ac}{bd}$ for $\frac{a}{b},\frac{c}{d}\in\mb Q$.
\item[$<$:] $\frac{a}{b}<\frac{c}{d}$ if $ad<bc$.
\end{enumerate}
\end{example}
\begin{proposition}
Let $(F,+,\cdot,<)$ an ordered field. Then
\begin{enumerate}
\item[(a)] If $x>0$ then $-x<0$. (If $x<0$ then $-x>0$).
\item[(b)] If $x>0$ and $y<z$ then $xy<xz$.
\item[(c)] If $x<0$ and $y<z$ then $xy>xz$.
\item[(d)] If $x\neq 0$ then $x^2 = x\cdot x >0$. In particular $1>0$.
\item[(e)] If $x> 0$ then $\frac{1}{x}>0$.
\item[(f)] If $0<x<y$ then $\frac{1}{x}>\frac{1}{y}$.
\end{enumerate}
\end{proposition}
\begin{proof}
Cases:
\begin{enumerate}
\item[(a)] Let $x>0$. Then $0 \os{A5}{=} -x + x \os{\text{(i)OF}}{>} -x+0 \os{A4}= -x \implies 0>-x$. Similarly, $\dots$
\item[(b)] Let $x>0$ and $y<z$. Since $y<z\implies z-y >y-y = 0$. Then $x(z-y) \os{(a)}{>} 0$. Then $xz = xz + 0 = xz - xy + xy = x(z-y) + xy \os{(i)}{>} 0 + xy = xy \implies xy <xz$.
\item[(c)] Try it.
\item[(d)] Let $x\neq 0$. Then $x>0$ or $x<0$ (ordered set). If $x>0$ then $x^2 = x\cdot x \os{\text{OF}(ii)}{>}0$. Let $x<0$. Then $-x>0 \implies 0<(-x)(-x) \os{\text{Prop \ref{prop1.16}(d)}}{=} x\cdot x = x^2$. In particular, $1\neq 0$, so $1^2 = 1 >0$.
\item[(e)] Let $x>0$. Suppose that $\frac{1}{x}\geq 0$. Then $-\frac{1}{x}\geq 0$. Then $0 = 0\cdot x \leq (-\frac{1}{x})\cdot x = -1 \implies 0\leq -1$ ($1\leq 0$), a contradiction to $0<1$.
\end{enumerate}
Done.
\end{proof}
\begin{theorem}
[Real field] There exists an ordered field, say $(\mb R,+,\cdot,<)$, which has the least upper bound property. Moreover, $\mb R$ contains $\mb Q$ as a subfield.
\end{theorem}
\begin{note}
$\mb R$ is called real field and elements of $\mb R$ are called real numbers.
\end{note}
\begin{theorem}
Cases:
\begin{enumerate}
\item[(a)] Let $x,y\in\mb R$ with $x>0$. Then there exists $n\in\mb N\backslash\{0\}$ such that $nx>y$. (Archimedean property of $\mb R$).
\item[(b)] Let $x,y\in\mb R$ with $x<y$. Then $\exists q\in\mb Q$ such that $x<q<y$. (Denseness of $\mb Q$ in $\mb R$).
\end{enumerate}
\ul{Special case}: For each $y\in\mb R$, $\exists n\in\mb N\backslash \{0\}$ such that $n>y$. (Taking $x=1>0$).
\end{theorem}
\begin{proof}
\begin{enumerate}
\item[(a)] Let $x,y\in\mb R$ with $x>0$. Suppose by contradiction that $n\cdot x \geq y$ for all $n\in\mb N\backslash\{0\}$. Set $A:=\{nx:n\in\mb N\backslash\{0\}\}$. $A$ is nonempty since $x = 1\cdot x\in A$. $A$ is bounded above by $y$ since $nx\leq y$ for all $n\in\mb N$. Since $\mb R$ has the least upper bound property, $\sup A\in\mb R$. $\alpha:= \sup A\in\mb R$. Now, $x>0$, so $-x<0$. $\alpha-x < x+0 = \alpha = \sup A \implies \alpha - x$ is not an upper bound of $A$ $\implies \exists m\in\mb N$ such that $m\cdot x\in A$ and $\alpha-x<mx<\alpha$. $\implies \alpha= \alpha - x + x < mx + x = (m+1)x\in A$, a contradiction that $\alpha = \sup A$. Therefore $\exists n\in\mb N\backslash \{0\}$ such that $nx>y$.
\item[(b)] Want to construct $q = \frac{m}{n}$, $m,n\in\mb Z$ and $n\neq 0$ such that $x<\frac{m}{n}<y$. Since $x<y$, $y-x>0$. By part (a), $\exists n\in\mb N\backslash \{0\}$ such that $n(y-x)>1$. Next, we find $m$. Since $1>0$ by (a), $\exists k_1,k_2\in\mb N\backslash \{0\}$ such that $k_1>ny$ and $k_2>-nx$ ($\implies -k_2<nx$). Combining $-k_2<nx<ny<k_1$. We're done if $\exists m\in\mb Z$ such that $nx<m<ny$. Define $S:=\{j\in\mb Z:-k_2\leq j\leq k_1 \text{ and } j>nx\}$. Then $S$ is finite, $S\neq \emptyset$ since $k_1\in S$, $S$ is bounded below by $-k_2$. So $\inf S = \min S$ exists, say $m = \min S$. $\implies m>nx$ by construction. Since $m=\min S$, $m-1 \leq nx$. Then $m = (m-1)+1 \leq nx+1 < nx+n(y-x) = ny$. So $nx<m<ny$ and hence $x<\frac{m}{n}<y$, where $q = \frac{m}{n}\in\mb Q$.
\end{enumerate}
Done.
\end{proof}
\begin{theorem}
Cases:
\label{thm1.21}
\begin{enumerate}
\item For every positive real number $x$ and every $n\in\mb N\backslash \{0\}$, there exists a unique $y\in\mb R$, $y>0$ so that $y^n = x$ ($y$ is called $n^\text{th}$ root of $x$). $y = ^n\sqrt{x}$ or $y = x^{1/n}$.
\item For every $n\in\mb N\backslash \{0\}$, there exists a unique $y\in\mb R$, namely \ul{$y=0$}, such that $0^n = 0$ (or $0^{1/n} = 0$).
\item If $0<a<b$ then $0<a^{1/n} < b^{1/n}$ (monotonicity of $n^\text{th}$ root).
\end{enumerate}
\end{theorem}
\begin{proof}
Uniqueness of $n^\text{th}$ root.
\ul{Case}: When $x=0$. Suppose $y^n = 0$ given fixed $n$ but $y\neq 0$. Then $y^2 \neq 0$, and by induction $y^k \neq 0$ for all $k\in \mb N\backslash\{0\}$, a contradiction to the fact that $y^n = 0$ for some fixed $n\in\mb N$. So $y=0$ is the only $n^\text{th}$ root for $x=0$.
\ul{Case}: When $x>0$. Suppose $\exists y_1,y_2\in\mb R$ with $y_1,y_2>0$ and $y_1\neq y_2$ such that $y_1^n = x = y_2^n$. WLOG assume $y_1<y_2$. If $0<a<b$ then $0<a^k<b^k$ for any $k\in\mb N\backslash \{0\}$ and $a,b\in\mb R$. By induction: Base case: $a<b$. Suppose $a^{k-1} < b^{k-1}$. Then $a^k = a\cdot a^{k-1} < a\cdot b^{k-1} \underset{a<b}{<} b\cdot b^{k-1} = b^k$. By induction $0<a^k<b^k$ for all $k\in\mb N\backslash \{0\}$. Then $y_1^n<y)2^n$, a contradiction to $y_1^n = y_2^n$.
\ul{Existence of $n^\text{th}$ root}: If $x=0$ then $0^n = 0$ and therefore it follows from the uniqueness that $y=0$. Let $x>0$. If $n=1$, then $y^n = y^1 = x$. Assume $n\geq 2$. Define $S = \{t\in\mb R: t^n < x\}$. $S\neq \emptyset$ because $0\in S$. $S$ is bounded above: find an upper bound of $S$. Let $\alpha := 1+x$. Want to show that $\alpha$ is an upper bound of $S$, i.e. $\alpha \geq t$ for all $t\in S$. Equivalently, we show that $\alpha < t$ then $t\notin S \implies t^n > (1+x)^n = (1+x)(1+x)^{n-1} > (1+x)\cdot 1 \underset{1>0}{>} x \implies t\notin S \implies \alpha$ is an upper bound of $S$ or $S$ is bounded above $\implies \sup S\in \mb R$.
\end{proof}
%\newpage
\begin{recall}
Cases:
\begin{enumerate}
\item[(i)] If $x\in \mb R$, $x>0$, then $\exists! y\in\mb R$, $y>0$ such that $y^n = x$.
\item[(ii)] If $x=0$, then $y=0$ is the only real number such that $0^n = 0$.
\item[(iii)] $0<a<b\implies 0<a^{1/n}<b^{1/n}$.
\end{enumerate}
\end{recall}
\begin{proof}
In last class, $S := \{t\in \mb R: t^n < x\}$ and $y = \sup S\in\mb R$. We need to show $y^n = x$. We will show $y^n \nless x$ and $y^n \ngtr x$. \ul{So $y^n = x$}.
Useful inequality: Let $0<a<b$. Then $$b^n - a^n = (b-a)(b^{n-1}+b^{n-2}a + b^{n-3}a^2 + \dots + ba^{n-2} + a^{n-1}) < (b-a)\cdot nb^{n-1}.$$
\ul{Case I}: Suppose $y^n < x$. (Find $y_1>y$, $y_1\in S$ such that $y_1^n > x$). Let $0<h<1$, $h\in\mb R$ such that $h< \frac{x-y^n}{n(y+1)^{n-1}}$. Taking $a = y$ and $b= y+h$ in the inequality, we get $$(y+h)^n - y^n < h\cdot n\cdot (y+h)^{n-1} < h\cdot n(y+1)^{n-1} < x-y^n$$ implies $(y+h)^n < x$ implies $y+h\in S$. But $y+h>y$ and $y=\sup S$, a contradiction.
\ul{Case II}: Assume $y^n > n$. (Find $y_2 < y$ so that $y_2$ is an upper bound of $S$). Define $k = \frac{y^n - x^{>0}}{ny^{n-1}} < \frac{y^n}{n\cdot y^{n-1}} = \frac{y}{n} \underset{n\geq 2}{<} y$.
\ul{Claim}: $y - k > 0$ is an upper bound of $S$.
Then $y^n - (y-k)^n < k\cdot n y^{n-1} \underset{\text{choice of }k}{=} y^n - x$ implies $-(y-k)^n < -x \implies (y-k)^n > x \implies y-k\notin S \implies y-k$ is an upper bound of $S$. But $y-k<y = \sup S$, a contradiction. Therefore, $y^n = x$.
(iii) Suppose $0<a<b$ but $a^{1/n}\geq b^{1/n}$. Then $b = (b^{1/n})^n \us{\text{power are monotone}}{\leq} (a^{1/n})^n = a$, a contraction to $a<b$. This completes the proof of Theorem \ref{thm1.21}.
\end{proof}
\begin{corollary}
Let $a,b\in\mb R$ and $a\geq 0,b\geq 0$. Then $(ab)^{1/n} = a^{1/n}\cdot b^{1/n}$.
\end{corollary}
\begin{proof}
By the uniqueness of the $n^\text{th}$ root, it is enough to show $(a^{1/n}\cdot b^{1/n})^n = ab$. Now, $ab = (a^{1/n})^n (b^{1/n})^n = a^{1/n}\cdots a^{1/n}\cdot b^{1/n}\cdots b^{1/n} = (a^{1/n}b^{1/n})$ respectively $n$ times and using commutativity and associativity.
\end{proof}
\subsection*{Decimal expansion of real numbers}
Let $x\in\mb R$ and $x>0$. By the decimal expansion of $x$, we mean a number of the form $n_0. n_2 n_2 n_3\cdots$ where $n_i$ are defined inductively as follows:
Let $n_0$ be the largest integer such that $n_0\leq x$, i.e., $n_0 = \max\{k\in\mb N: k\geq x\}$. Let $n_1$ be the largest integer such that $n_0 + \frac{n_1}{10} \leq x$, i.e., $n_1 = \max\{k\in\mb N : n_0 + \frac{k}{10} \leq x\}$. Once $n_0,\dots,n_{k-1}$ are chosen, $n_k$ is chosen as follows: $n_k = \max\{j\in\mb N: n_0 + \frac{n_1}{10} + \frac{n_2}{10^2} + \cdots + \frac{n_{k-1}}{10^{k-1}} + \frac{j}{10^k} \leq x\}$.
\begin{note}
By construction, $n_k\in\{0,1,2\dots,8,9\}$.
\end{note}
\begin{remark}
Let $x\in\mb R$ and $x>0$. Let $n_0.n_1n_2\dots n_k\dots$ be a decimal expansion of some real number. Define $E:=\{n_0 + \frac{n_1}{10} + \frac{n_2}{10^2} + \dots + \frac{n_k}{10^k} : k\in\mb N\}$. Then $x\sup E$ if and only if $x = n_0.n_1n_2n_3\dots$.
\end{remark}
\subsection*{Extended real number system}
$\mb R^\# := \mb R\cup\{-\infty,\infty\}$. Order on the set $\mb R^\#$: $-\infty < x<\infty$ for all $x\in\mb R$. $\mb R^\#$ is not a field (Not closed under \say{usual} addition, i.e. $-\infty + \infty \os{?}{\in}\mb R^\#$. Use these conventions: $x+\infty = \infty$, $x-\infty = -\infty$, $\frac{1}{\infty} = 0$, $\frac{1}{-\infty} = 0$. For $x\in\mb R^\#$, $x>0$: $x\cdot(+\infty) = \infty$, $x\cdot (-\infty) = -\infty$. For $x\in\mb R^\#$, $x<0$: $x\cdot(+\infty) = -\infty$, $x\cdot(-\infty) = \infty$.
For any $A\subset \mb R^\#$, $\sup A\in\mb R^\#$, $\inf A\in\mb R^\#$. In particular, if $A$ is not bounded above, then $\sup A = \infty$. If $A$ is not bounded below, then $\inf A = -\infty$. Also, $\sup \emptyset = -\infty$ and $\inf \emptyset = \infty$ because every element real number is an upper bound for empty set and every real number is a lower bound for empty set.
\subsection*{Complex Field}
Dictionary order: $(a,b) < (c,d)$ if $\begin{cases} a<c , \\ a=c, & b<d\end{cases}$.
\begin{definition}
Set of all complex numbers $\mb C :=\{(a,b):a,b\in\mb R\}$, where $(a,b)$ is an ordered pair, i.e. $(a,b)\neq (b,a)$ if $a\neq b$.
If $z = (a,b)\in\mb C$, $a = \Re(z)$, $b=\Im(z)$.
\end{definition}
Addition \say{$+_\mb C$}: $z_1= (a,b)\in\mb C$ and $z_2 = (c,d)\in\mb C$. Then $z_1+z_2 = (a +_\mb R c, b+_\mb R d)$.
Multiplication \say{$\cdot_\mb C$}: $z_1\cdot z_2 = (ac-bd, bc+ad)$.
Additive identity: $0_\mb C = (0,0)$.
Multiplicative identity: $1_\mb C = (1,0)$.
Then $(\mb C,+_\mb C,\cdot_\mb C)$ is a field.
\begin{recall}
$(\mb C,+_\mb C,\cdot_\mb C)$ is a field.
\end{recall}
\begin{note}
$\mb R$ is a subfield of $\mb C$, let $f:\mb R\ra \mb C$ by defining $f(a) = (a,0)$. It allows us to identify $a\in\mb R$ as $a\in\mb C$.
\end{note}
\begin{definition}
[$i$] We define the imaginary unit $i$ as $(0,1)\in\mb C$.
\end{definition}
\begin{theorem}
$i^2 = -1$.
\end{theorem}
\begin{proof}
$i^2 = i\cdot i = (0,1)\cdot_\mb C(0,1) = (0-1,0) = (-1,0)\in\mb C = -1\in\mb R$.
\end{proof}
Given $z=(a,b)\in\mb C$, we can write $z = a+bi$. Indeed, $a+bi = (a,0) +_\mb C (b,0)(0,1) = (a,0)+_\mb C(0,b) = (a,b)$.
\begin{definition}
[Conjugate] For $z = a+bi = (a,b)\in\mb C$, the conjugate of $z$ is $\conj z\in\mb C$, where $\conj z = a-bi = (a,-b)$.
\end{definition}
\begin{theorem}
[Conjugate] Let $z,w\in\mb C$, $z = a+ib$, $w = c+id$; where $a,b,c,d\in\mb R$. Then
\begin{enumerate}
\item[(a)] $\conj{z+w} = \conj z+\conj w$
\item[(b)] $\conj{z\cdot w} = \conj z\cdot \conj w$
\item[(c)] $z+\conj z = 2\Re(z)$ and $z-\conj z = 2i\Im(z)$
\item[(d)] $z\cdot \conj z\in\mb R$, $z\cdot \conj z \geq 0$ and $z\cdot\conj z = 0 \Lr z = 0$
\item[(e)] $\conj z = z$
\item[(f)] $z\in\mb R \implies \conj z = z$.
\end{enumerate}
\end{theorem}
\begin{proof}
Cases:
\begin{enumerate}
\item[(a)] $\conj{z+w} = \conj{(a+ib)+(c+id)} = \conj{(a+c)+i(b+d)} = (a+c)-i(b+d) = a+c-ib-id = (a-ib)+(c-id) = \conj{a+ib} + \conj{c+id} = \conj z + \conj w$.
\item[(b)] skip!
\item[(c)] skip!
\item[(d)] $z\cdot \conj z = (a+ib)(a-ib) = a^2+b^2\in\mb R$. If $a\in\mb R$ and $b\in\mb R$ then $a^2\geq 0$ and $b^2\geq 0 \implies z\cdot \conj z \geq 0$. Now suppose $z = 0$. Then $z\cdot \conj z = 0\cdot \conj z = 0$. Suppose $z\cdot \conj z = 0$. Then $a^2+b^2 = 0$, which implies $a=0$ and $b=0$. So $z = 0+0i = 0$.
\item[(e)] skip!
\item[(f)] skip!
\end{enumerate}
Done.
\end{proof}
\begin{remark}
$f:\mb C\ra \mb C$ by $f(z) = \conj z$. By Theorem, $f(z+w) = f(z)+f(w)$ for all $z,w\in\mb C$ and $f(z\cdot w) = f(z)\cdot f(w)$ for all $z,w\in\mb C$ and $f(0) = 0$ and $f(1) = 1$. This implies conjugate preserves field properties of $\mb C$. However, $f$ is not an identity mapping since $f(i) = -i$.
\end{remark}
\begin{definition}
[Absoulute value, modulus] Given $z\in\mb C$, modulus or absolute value of $z$ is: $|z|:=(z\cdot \conj z)^\frac{1}{2}$ - well defined by $n^\text{th}$ root theorem since $0\leq z\cdot \conj z\in \mb R$.
\end{definition}
\begin{note}
If $x\in\mb R$, then $|x| = x\cdot x^{1/2} = (x^2)^\frac{1}{2} \us{x\in\mb R}{=} ((-x)^2)^\frac{1}{2} \implies |x| = \begin{cases} x & \text{if } x\geq 0\\ -x & \text{if } x<0\end{cases}$.
\end{note}
\begin{observe}
$|x|^2 = x^2 = (-x)^2$ for all $x\in\mb R$. But the identity is not true in $\mb C$. Take $z = i$, so $|z|^2 = |i|^2 = i\cdot\conj i = i(-i) = 1$. But $z^2 = i\cdot i = i^2 = -1$.
\end{observe}
\begin{theorem}
Let $z,w\in\mb C$. Then
\begin{enumerate}
\item[(a)] $|z|\geq 0$ and $|z|= 0 \Lr z= 0$.
\item[(b)] $|\conj z| = |z|$
\item[(c)] $|z\cdot w| = |z|\cdot|w|$
\item[(d)] $|\Re (z)| \leq |z|$ and $|\Re(z)|=|z|\Lr z\in\mb R$.
\item[(e)] $|z+w|\leq |z|+|w|$ and equality holds $\Lr z = \alpha w$ or $w = \alpha z$ for some $\alpha\in\mb R$.
\end{enumerate}
\end{theorem}
\begin{proof}
Cases:
\begin{enumerate}
\item[(a)] Since $z\cdot \conj z \geq 0$ and $|z| = (z\cdot\conj z)^{1/2}$, $|z|\geq 0$ follows by $n^\text{th}$ root theorem. By previous theorem, $z\cdot \conj z = 0\Lr z = 0$. So $|z|=0\Lr z = 0$.
\item[(b)] $|\conj z| = (\conj z\cdot \conj{\conj z})^\frac{1}{2} = (\conj z\cdot z)^\frac{1}{2} = |z|$.
\item[(c)] $|z\cdot w|^2 = (z\cdot w)\conj{(z\cdot w)} = (z\cdot w)(\conj z\cdot \conj w) = (z\cdot \conj z)\cdot(w\cdot\conj w) = |z|^2\cdot |w|^2 = (|z|\cdot|w|)^2$. By uniqueness of the square root, $|z\cdot w| = |z|\cdot |w|$.
\item[(d)] $|\Re(z)|^2 = \Re(z)\cdot \conj{(\Re(z))} = (\Re(z))^2 \leq (\Re(z))^2 + (\Im(z))^2 = |z|^2$. By monotonicity of square root, $|\Re(z)|\leq |z|$.
\item[(e)] $|z+w|^2 = (z+w)\conj{(z+w)} = (z+w)(\conj z+\conj w) = z\cdot \conj z + w\cdot \conj z + z\cdot \conj w + w\cdot\conj w = |z|^2 + w\cdot\conj z + \conj{\conj z \cdot w} + |w|^2 = |z|^2 + 2\Re(w\cdot \conj z) + |w|^2 \leq |z|^2 + 2|\Re(w\cdot \conj z)| + |w|^2$ since $x\leq |x| \os{(d)}{\leq} |z|^2 + 2|z\cdot\conj w| + |w|^2 \os{(b)+(c)}{=} |z|^2 + 2|z|\cdot|w| + |w|^2 = (|z|+|w|)^2$ for all $x\in\mb R$. By monotonicity of roots, $|z+w| \leq |z| + |w|$.
\end{enumerate}
Done.
\end{proof}
\begin{theorem}
[Schwartz inequality] Let $z_1,z_2,\dots,z_n,w_1,\dots,w_n\in\mb C$. Then $$ \left| \sum_{i=1}^n z_i\cdot \conj{w_i} \right|^2 \leq \left(\sum_{i=1}^n |z_i|^2 \right) \left( \sum_{i=1}^n |w_i|^2\right).$$
\end{theorem}
\begin{proof}
Let $Z:= \sum_{i=1}^n |z_i|^2 \in\mb R$ and $W: = \sum_{i=1}^n |w_i|^2\in\mb R$ and $P:=\sum_{i=1}^n z_i\cdot \conj{w_i}\in\mb C$. \ul{Claim}: $zw \geq |p|^2$. Note that $W \geq 0$. Then $W = 0 \Lr |w_i| = 0 \Lr w_i = 0$. Then $P = \sum_{i=1}^n z_i\cdot 0 = 0$, we're done.
\ul{Take $W>0$}: Then
\begin{align*}
0\leq \sum_{i=1}^n |Wz_i - Pw_i|^2 &\os{?}{\geq} W(WZ-|P|^2) \\
&= \sum_{i=1}^n(Wz_i-Pw_i)\conj{(Wz_i-Pw_i)} = \sum_{i=1}^n(Wz_i-Pw_i)(W\conj{z_i}-\conj P\conj{w_i}) \\
& = \sum_{i=1}^n \left[ W^2 z_i\cdot \conj{z_i} - W\conj P z_i \conj{w_i} - PW w_i \conj{z_i} + P\conj P w_i \cdot \conj{w_i} \right] \\
&= \sum_{i=1}^n \left[ W^2|z_i|^2 - W\conj P z_i \conj{w_i} - PW w_i \conj{z_i} + |P|^2 \cdot |w_i|^2 \right] \\
&= W^2 \sum_{i=1}^n |z_i|^2 - W\conj P\sum_{i=1}^n z_i \cdot \conj{w_i} - PW \sum_{i=1}^n w_i \conj{z_i} + |P|^2 \sum_{i=1}^n |w_i|^2 \\
&= W^2 Z - W\conj P P - P W \conj P + |P|^2 W = W^2Z - W|P|^2 \\
&= W(WZ-|P|^2) \geq 0 \os{W>0}{\implies} WZ-|P|^2 \geq 0
\end{align*}
\end{proof}
\ul{Test 1, Sep 19, 2017}: Problems to ignore \#7, \# 11, \#16, \#20, Expect:
\begin{itemize}
\item Definitions (always give example)
\item Statement of named theorems
\item HW like problems, exercises,
\item Proofs of theorems/propositions
\end{itemize}
\subsection{Euclidean spaces}
\begin{definition}
[Vector space over a field] Let $(F,+_F,\cdot_F)$ be a field. A vector space $V$ over a field $F$ is a nonempty set $V$ with two operations -- vector addition + and scalar multiplication $\cdot$ with following:
\begin{enumerate}
\item $V$ satisfies (A1)-(A5) of field axioms with `+'.
\item \begin{itemize}
\item $a\vv\in V\ \forall a\in F,\ \forall \vv\in V$.
\item $a(\vu + \vv) = a\vu + a\vv\ \forall a\in F,\ \forall \vu,\vv\in V$.
\item $(a+_Fb)\vu = a\vu + b\vu\ \forall a,b\in F,\ \forall \vu \in V$.
\item $(a\cdot_Fb)\vu = a(b\vu)\ \forall a,b\in F,\ \forall \vu\in V$.
\item $1_F\vu = \vu\ \forall \vu\in V$.
\end{itemize}
\end{enumerate}
\end{definition}
Define $\mb R^k = \us{k\text{ times}}{\mb R\times \mb R\times \dots \times \mb R}$ for $k\geq 1$.
For $\vx = (x_1,\dots,x_k), \vy = (y_1,\dots,y_k)\in\mb R$, define addition + and scalar multiplication $\cdot$ as follows:
$$ \vx + \vy = (x_1+y_1,x_2+y_2,\dots,x_k+y_k)$$
$$ a\vx = (ax_1,ax_2,\dots,ax_k) \quad \text{for }a\in\mb R.$$
$$ \vzero = (0,0,\dots,0).$$
\begin{theorem}
$(\mb R^k,+,\cdot)$ is a vector space over the field of $\mb R$.
\end{theorem}
\begin{proof}
Skip.
\end{proof}
\begin{definition}
For $\vx,\vy\in\mb R^k$, inner product or scalar product is defined as:
$$ \vx\cdot\vy = x_1y_1+x_2y_2+\dots+x_ky_k = \sum_{i=1}^k x_iy_i\ul{\ul{\in\mb R}}$$
\end{definition}
\begin{definition}
[Norm or modulus or absolute value]
$$ |\vx| = \left( \sum_{i=1}^k x_i^2 \right)^\frac{1}{2}$$
Other notation $||\vx|| = \left( \sum_{i=1}^k x_i^2 \right)^{1/2}$.
\end{definition}
\begin{theorem}
Let $\vx,\vy,\vz\in\mb R^k$ and $a\in\mb R$. Then
\begin{enumerate}
\item[(a)] $|\vx|\geq 0$ and $|\vx| = 0 \Lr \vx = \vzero$.
\item[(b)] $|a\vx| = |a|\cdot|\vx|$
\item[*(c)] $|\vx\cdot\vy| \leq |\vx|\cdot |\vy|$
\item[(d)] $|\vx+\vy| \leq |\vx|+|\vy|$
\item[(e)] $|\vx - \vz| \leq |\vx - \vy| + |\vy-\vz|$
\end{enumerate}
\end{theorem}
\begin{proof}
Cases:
\begin{enumerate}
\item[(a)] $|\vx|^2 = \sum_{i=1}^k x_i^2 \geq 0$, since $x_i^2 \geq 0$ for $x_i\in\mb R$. $\implies |\vx| \geq 0$ using the monotonicity of root. Suppose that $|\vx| = 0$ and suppose by contradiction that $x_i\neq 0$ for some $i\in\{1,\dots,k\}$. $\implies x_i^2 >0$ and $\sum_{j=1}^k x_j^2 > 0$, a contradiction. If $\vx = \vzero$, then $x_i = 0$ for all $i = 1,\dots,k$. So $|\vx| = \left( \sum_{i=1}^k 0^2 \right)^{1/2} = 0$.
\item[(b)] $|a\vx|^2 = \sum_{i=1}^k (a x_i)^2 = a^2 \sum_{i=1}^k x_i^2 = a^2(|\vx|)^2 \implies |a\vx| = \sqrt{a^2}\sqrt{|\vx|^2} = |a||\vx|$.
\item[*(c)] WTS: $|\vx|^2|\vy|^2$. Recall, Schwartz inequality $$\left| \sum_{i=1}^n z_i \cdot \conj{w_i} \right|^2 \leq \sum_{i=1}^n |z_i|^2 \sum_{i=1}^n |w_i|^2.$$
\begin{align*}
|\vx\cdot \vy|^2 &= \left| \sum_{i=1}^k x_iy_i \right|^2
\os{\text{Schwartz}}{\leq} \left(\sum_{i=1}^n |x_i|^2 \right) \left( \sum_{i=1}^n |y_i|^2 \right) \os{x_i,y_i\in\mb R}{=} \left(\sum_{i=1}^k x_i^2 \right) \left( \sum_{i=1}^k y_i^2 \right) = |\vx|^2 |\vy|^2.
\end{align*}
By monotonicity of root $|\vx\cdot \vy| \leq |\vx||\vy|$.
\item[(d)] Want to show: $|\vx + \vy|^2 \leq (|\vx| + |\vy|)^2 = |\vx|^2 + 2|\vx|\cdot|\vy| + |\vy|^2$.
\begin{align*}
|\vx + \vy|^2 &= \sum_{i=1}^k (x_i+y_i)^2 = \sum_{i=1}^k (x_i^2 + 2x_i y_i + y_i)^2
= \sum_{i=1}^k x_i^2 + 2 \sum_{i=1}^k x_i y_i + \sum_{i=1}^k y_i^2 \\
&\leq |\vx|^2 + 2|\vx \cdot \vy| + |\vy|^2 \os{(c)}{\leq} |\vx|^2 + 2|\vx|\cdot |\vy| + |\vy|^2 = (|\vx| + |\vy|)^2
\end{align*}
since $\vx\cdot\vy\in\mb R$ and $a\leq |a|$ for all $a\in\mb R$. This implies $|\vx + \vy| \leq |\vx| + |\vy|$ by monotonicity of root.
\item[(e)] $|\vx - \vz| = |\vx + \vzero - \vz| = |\vx - \vy + \vy - \vz| \os{(d)}{\leq} |\vx-\vy| + |\vy-\vz|$.
\end{enumerate}
Done.
\end{proof}
\begin{observe}
Observe that $|\vx\cdot \vy| = |\vx|\cdot |\vy|$ if $x,y\in\mb R$ \ul{\ul{or}} if $x,y\in\mb C$. \ul{Not true in $\mb R^2$}:
Compare the result of (c) in $\mb C$ versus in $\mb R^2$.
Take $z = a + ib,w = c+id\in\mb C$. Then
\begin{align*}
|z\cdot w|^2 &= |(a+ib)\cdot(c+id)|^2 = |(ac-bd) + i(ad+bc)|^2 = (ac-bd)^2 + (ad+bc)^2 \\
&= (ac)^2 + (bd)^2 + (ad)^2 + (bc)^2 = (a^2 + b^2)(c^2+d^2) = |z|^2 \cdot |w|^2 \implies |z\cdot w| = |z|\cdot |w|.
\end{align*}
Take $\vx = (a,b)$, $\vy = (c,d)$ in $\mb R^2$.
\begin{align*}
|\vx\cdot \vy|^2 &= (ac+bd)^2 = (ac)^2 + 2abcd + (bd)^2 \\
&\cdots\ ?\ \cdots\\
&\leq |(a^2+b^2) \cdot (c^2+d^2) = |\vx|\cdot |\vy|
\end{align*}
\end{observe}
If $(a,b),(c,d)\in\mb C$, then $|(a,b)\cdot(c,d)| = |(a,b)|\cdot|(c,d)|$.
If $(a,b),(c,d)\in\mb R^2$, then $|(a,b)\cdot(c,d)| \leq |(a,b)||(c,d)|$.
\begin{proof}
$0\leq p^2+q^2 - 2pq = (p-q)^2 \implies 2pq \leq p^2 + q^2$.
\begin{align*}
|(a,b)\cdot(c,d)|^2 &= |ac+bd|^2 = (ac+bd)^2\\
&= (ac)^2 + 2abcd + (bd)^2 \\
&\leq a^2c^2 + b^2c^2 + a^2d^2 + b^2d^2 \\
&= (a^2+b^2)(c^2+d^2) = |(a,b)|^2 |(c,d)|^2 \implies |(a,b)\cdot (c,d)| \leq |(a,b)||(c,d)|
\end{align*}
monotonicity of roots.
\end{proof}
\section{Topology}
\begin{definition}
[Function] $A,B$ are sets. $f:A\ra B$ is a function or a mapping if for each $x\in A$, $\exists!f(x)\in B$.
\begin{itemize}
\item $A = $ domain of $f$.
\item $B = $ target set of $f$.
\item $f(A) = $ Image of $A$ under $f = \{y\in B: \exists x\in A \text{ such that } f(x)=y \}$.
\end{itemize}
\end{definition}
\begin{definition}
[one-to-one and onto] $f:A\ra B$ is 1-1 iff $f(a_1) = f(a_2) \implies a_1=a_2$ (or iff $\forall a_1,a_2\in A$, $a_1\neq a_2 \implies f(a_1)\neq f(a_2)$.
$f:A\ra B$ is onto iff $\forall b\in B$, $\exists a\in A$ such that $f(a)=b$ \ul{\ul{OR}} $f(A)=B$.
\end{definition}
\begin{definition}
[Preimage or inverse image] Suppose $E_1\subset B$. Then the preimage of $E_1$: $$f\inv(E_1) = \{a\in A: f(a)\in E_1\}.$$
If $b\in B$, then $f\inv(b) = \{a\in A : f(a)=b\} \subset A$.
\end{definition}
\begin{remark}
One-to-one correspondence means both one-to-one and onto.
\end{remark}
\begin{definition}
[Cardinality] We say that a set $A$ has \ul{no more} elements than a set $B$ if $\exists$ a 1-1 map $f:A\ra B$.
In this case, we write $|A|\leq |B|$, where $|\cdot|$ denotes the cardinality of $A$ (\say{number of elements}).
\end{definition}
\begin{theorem}
[Cantor-Shroder-Bernstein]
If $\exists$ two 1-1 functions $f:A\ra B$ and $g:B\ra A$, then $\exists$ a \ul{1-1 and onto} function $h:A\ra B$.
i.e., $|A|\leq |B|$ and $|B|\leq |A| \implies |A|=|B|$.
\end{theorem}
\begin{proof}
Skip.
\end{proof}
\begin{definition}
[Equivalence relation via cardinality]
$A$ and $B$ have same cardinality if $\exists$ a 1-1 and onto function $f:A\ra B$. We write $|A| = |B|$. This is an equivalence relation.
\begin{enumerate}
\item[(i)] $|A| = |A|$ since $id:A\ra A$ is 1-1 and onto.
\item[(ii)] $|A|=|B|$ then $|B|=|A|$. If $f:A\ra B$ is 1-1 and onto, then $f\inv:B\ra A$ is 1-1 and onto.
\item[(iii)] If $|A|=|B|$ and $|B|=|C|$, then $|A|=|C|$. There exist $f:A\ra B$ and $g:B\ra C$ both 1-1 and onto. Then $g\circ f: A\ra C$ is 1-1 and onto.
\end{enumerate}
\end{definition}
\ul{Notation} $J:= \mb N\backslash \{0\}$ and $J_n := \{1,2,\dots,n\}$.
\begin{definition}
Let $A$ be any set. We say
\begin{enumerate}
\item[(a)] $A$ is finite if $A\sim J_n$ or $|A|=|J_n|$ for some $n\in\mb N$.
\item[(b)] $A$ is infinite if $A$ is not finite.
\item[(c)] $A$ is countable if $|A| = |J|$ i.e., there exists a 1-1 and onto mapping $f:A\ra J$.
\item[(d)] $A$ is uncountable if $A$ is neither finite nor countable.
\item[(e)] $A$ is at most countable if $A$ is finite or countable.
\end{enumerate}
\end{definition}
\begin{example}
$|\mb Z| = |\mb N|$. Let $f:\mb Z\ra\mb N$ by $f(z) = \begin{cases} 2z-1 & \text{if } z\in\mb Z_+ \\ -2z & \text{if } z\in\mb Z_- \end{cases}$:
$\begin{array}{ccccccccc}
\mb {Z} & 0 & 1 & -1 & 2 & -2 & 3 & -3 & \cdots \\
\, & \updownarrow & \updownarrow & \updownarrow & \updownarrow & \updownarrow & \updownarrow & \updownarrow & \, \\
\mb{N} & 0 & 1 & 2 & 3 & 4 & 5 & 6 & \cdots
\end{array}$
Let $f:J \os{1-1}{\us{\text{onto}}{\lra}} \mb Z$ by $f(n) = \begin{cases} \frac{n}{2} & \text{if } n \text{ even}\\ -\frac{n-1}{2} & \text{if } n \text{ odd} \end{cases}$.
\end{example}
\begin{note} some notes:
\begin{itemize}
\item A finite set has \ul{more} elements than its proper subsets.
\item Empty set is a finite set.
\item A set and its proper subsets can have same cardinality.
\end{itemize}
\end{note}
\begin{example}
$|\mb N|\os{f?}{=} |2n:n\in\mb N| = |2n-1:n\in\mb N|$
\end{example}
\begin{example}
$|(-\frac{\pi}{2},\frac{\pi}{2}| = |\mb R|$. Let $f:(-\frac{\pi}{2},\frac{\pi}{2}) \ra \mb R$ by $f(x) = \tan x$ is 1-1 and onto.
\end{example}
\begin{proposition}
$S$ is infinite $\Llr \exists f:\mb N \ra S$ that is 1-1.
\end{proposition}
\begin{proof}
\say{$\implies$} Suppose $S$ is infinite. We need to construct $f:\mb N\ra S$ that is 1-1. Since $S$ is not finite, $\exists s_0\in S$.
Define $f_0:\{0\}\ra S$ by $f_0(0) = s_0$. By construction $f_0$ is 1-1.
$S$ is infinite, so $\exists s_1\in S (s_1\neq s_0)$.
Define $f_1:\{0,1\} \ra S$ by $f_1(0) = s_0$ and $f_1(1) = s_1$.
Then $f_1$ is 1-1. Since $S$ is infinite, $\exists s_2\in S$, $s_2\neq s_0$, $s_2\neq s_1$. Deefine $f:\{0,1,2\} \ra S$ by $f_2(0) = s_0$, $f_2(1) = s_1$, $f_2(2) = s_3$.
Inductively, $\exists s_n\in S$ such that $s_n\neq s_j$ for $j=0,\dots,n-1$ and $f_n : \{0,1,\dots,n\}\ra S$ by
\begin{align*}
f_n(0) &= s_0 \\
f_n(1) &= s_1 \\
&\vdots \\
f_n(n) &= s_n.
\end{align*}
Then $f:\mb N\ra S$ defined by $f(n) = f_n(n) = s_n$ is 1-1 (by construction).
\end{proof}
\begin{example}
[HW2.1] Let $A$ and $B$ be nonempty bounded subsets of $\mb R$ such that $A\subset B$. Prove: $$\inf B \leq \inf A \leq \sup A \leq \sup B.$$
\begin{proof}
Given that $A\neq \emptyset,B\neq\emptyset$, $A$ bounded, $B$ bounded, and $A,B\subset \mb R$, by LUB property of $\mb R$, $\sup A,\inf A, \sup B, \inf B$ exist in $\mb R$.
Let $a:= \inf A$, $\alpha := \sup A$, $b:=\inf B$, $\beta:=\sup B$.
By definition of $\sup A,\inf A$, we have:
\begin{align*}
\forall x\in A,\, a\leq x \\
\forall x\in A,\, x\leq \alpha \\
\text{then for some } x_0\in A \\
a\leq x_0 \leq \alpha \\
\text{So } a\leq \alpha \text{ by transitivity}.
\end{align*}
To show $\sup A\leq \sup B$, where $A\subset B$, suppose by contradiction that $\beta \leq \alpha$. Since $A\subset B$, for all $x\in A$, $x\in B$ and any $y\in B$, then, $b\leq y \leq B$.
Then $\beta < \alpha \implies \exists x_1\in A$ such that $\beta<x_1\leq \alpha \implies x_1\notin B$. Contradiction. $A\subset B$.
\end{proof}
\begin{proof}
We show $\inf B\leq \inf A$: By definition of $\inf$, $\gamma \leq \inf B$ for all $\gamma$ lower bounds of $B$.
Since $x\in A \implies x\in B$, $\gamma$ is a lower bound of $A$. Choose $\gamma = \inf B$, $\inf B$ is a lower bound of $A$. Therefore $\inf B\leq \inf A$.
\end{proof}
We know by definition of infimum, $b\leq \inf B$ for all $b\in B$. But $A\subset B$, so $a\leq\inf B$ for all $a\in A$.
This implies $\inf B$ is a lower bound of $A$. By definition of $\inf A$, $\inf B\leq \inf A$.
\end{example}
\begin{example}
[HW2.2] $S:=\{a+b:a\in A,b\in B\}$. $\sup S = \sup A + \sup B$.
\begin{proof}
Since $A\neq\emptyset,B\neq\emptyset$ and $A,B\subset \mb R$ are bounded and $\mb R$ has the least upper bound property, $\sup A,\sup B\in\mb R$.
First, $S\neq\emptyset$ since $A\neq\emptyset$ and $B\neq\emptyset$. Now, $a\leq \sup A$ for all $a\in A$ and $b\leq \sup B$ for all $b\in B$.
Then $a+b\leq\sup A+b$ and $a+b\leq \sup A + \sup B$ for $b\in B$ fixed and $\forall a\in A$.
This implies $\sup A+\sup B$ is an upper bound of $S \implies \sup S\in\mb R$.
Want to show:
\begin{enumerate}
\item[(i)] $\sup A+\sup B$ is an upper bound of $S$. check.
\item[(ii)] If $\gamma$ is an upper bound of $S$ then $\gamma\geq\sup A + \sup B$.
\end{enumerate}
Let $\gamma$ be an upper bound of $S$. Then $\gamma\geq s$ for all $s\in S$. Then $s = a+b$ for some $a\in A$ and $b\in B$.
So $\gamma \geq a+b \implies b\leq \gamma-a \implies \gamma-a$ is an upper bound for $B$.
Then $\gamma-a\geq \sup B$ (by definition of $\sup$) implies $\gamma-\sup B \geq a \implies \gamma-\sup B$ is an upper bound for $A$. This implies $\gamma-\sup B \geq \sup A$ (by definition of $\sup$) $\implies \gamma\geq \sup A + \sup B$.
Therefore $\sup S = \sup A+\sup B$.
\end{proof}
\end{example}
\begin{example}
[HW2.3]
$A\subset \mb R$ nonempty and bounded below. $-A:=\{-a\in \mb R:a\in A\}$.
Prove that $-\inf A = \sup (-A)$.
\begin{proof}
$A\subset\mb R$ nonempty + bounded below $\implies \inf A\in\mb R$.
By definition of infimum, $a\geq \inf A$ for all $a\in A$.
$\implies -a\leq -\inf A$ for all $-a\in -A$ - $(*)$.
This implies $-A$ is bounded above. So $\sup (-A)\in\mb R$ since $-A\neq\emptyset$.
Want to show: $\sup(-A) = -\inf A$.
\begin{enumerate}
\item[(i)] $-\inf A$ is an upper bound of $-A$ by $(*)$.
\item[(ii)] If $\gamma$ is an upper bound of $-A$, then $\gamma\geq -\inf A$.
\end{enumerate}
Let $\gamma$ be an upper bound of $-A$. Then $\gamma\geq -a$ for all $-a\in -A \implies -\gamma\leq a$ for all $a\in A \implies -\gamma$ is a lower bound of $A$. But $\inf A$ is the greatest lower bound of $A$, so $\inf A\geq -\gamma \implies -\inf A\leq \gamma$. Therefore $-\inf A = \sup (-A)$.
\end{proof}
\end{example}
\begin{example}
[HW3.4] $\left| |z|-|w|\right| \leq |z-w|$ for all $z,w\in\mb C$.
\begin{proof}
$|x|\leq c \Lr -c\leq x \leq c$.
\ul{Want to show}: (1) $|z|-|w| \leq |z-w|$ and (2) $-|z-w|\leq |z|-|w|$.
(1):
\begin{align*}
|z| &\os{\mb C\text{ field}}{=} |z-w+w| \\
&\os{\Delta}{\leq} |z-w| + |w|
\end{align*}
This implies $|z|-|w|\leq |z-w|$.
(2):
\begin{align*}
|w| &= |w-z+z| \\
&\os{\Delta}{=} |w-z|+|z|
\end{align*}
This implies $|w|-|z|\leq |z-w| \implies -(|w|-|z|) \geq -|z-w| \implies |z|-|w| \leq -|z-w|$.
Combining (1)+(2) $\left||z|-|w|\right| \leq |z-w|$.
\end{proof}
\end{example}
%\ul{From last class}:
\begin{recall}
\ul{From last class}: $S$ is infinite $\Lr \exists f:\mb N \ra S$ that is 1-1.
\end{recall}
\begin{proof}
\say{$\implies$} Last class.
\say{$\Lla$} Suppose there exists $f:\mb N \ra S$ 1-1.
Assume to the contrary that $S$ is finite i.e., $|S| = |J_n|$ for some $n\in\mb N$ so $\exists j:S\os{1-1}{\us{\text{onto}}{\lra}} J_n$.
Now, $J_{n+1} \os{i}{\us{1-1}{\lra}} \mb N \os{f}{\us{1-1}{\lra}} S \os{1-1}{\us{\text{onto}}{\lra}} J_n$.
$A\subset B$ then the includsion map $i:A\ra B$ defined by $i(x) = x$ is a 1-1 map.
Then $\exists h = j(f(i)): J_{n+1} \ra J_n$ is 1-1, a contradiction since $|J_{n+1}| = n+1$, $|J_n| = n$.
\end{proof}
\begin{proposition}
A set $S$ is infinite $\Lr \exists S'\subsetneq S$ such that $|S'| = |S|$.
\end{proposition}
\begin{proof}
Skip.
\end{proof}
\begin{theorem}
Ever infinite subset of a countable set is countable.
\end{theorem}
\begin{proof}
Let $A$ be a countable set and $E\subset A$ is \ul{infinite}.
\ul{Want to show}: $E$ is countable i.e., $\exists j:\mb N\ra E$ that is 1-1 and onto.
A countable $\implies \exists s:\mb N\ra A$ such that $s$ is 1-1 and onto.
Let $n_1:=\min\{n\in \mb N: s(n) = s_n\in \}$ - set is well defined since $E$ is infinite.
$n_2:=\min\{n\in\mb N: n>n_1 \text{ and } s(n) = s_n\}$. clearly $n_1>n_1$.
Suppose $n_1<n_2 <\dots < n_{k-1}$, then $n_k:= \min\{n\in\mb N: n>n_{k-1} \text{ and } s(n) = s_n\in E\}$.
$n_1<n_2<\dots<n_{k-1}<n_k$ and $\{s_{n_1}, s_{n_2}, s_{n_3},\dots,s_{n_{k-1}},s_{n_k} \} \neq E$.
Now define $f:\mb N \ra E$ by $f(k) = s_{n_k}$. Then $f$ is 1-1. So, $|\mb N| \os{f\text{ 1-1}}{\leq} |E| \os{E\subset A}{\leq} |A| \os{\text{countable}}{=} |\mb N|$. Therefore, $|\mb N| = |E|$, so $E$ is countable.
\end{proof}
Unions and intersections. Let $A,B$ be any subsets of $\Omega$.
$$A\cup B = \{ x\in \Omega : x\in A \text{ \ul{or} } x\in B\}.$$
$$A\cap B = \{x\in \Omega : x\in A \text{ \ul{and} } x\in B\}.$$
Let $A$ be any set - index set.
Let $\{E_\alpha\}_{\alpha\in A}$ be any collection of subsets of $\Omega$.
Then $$\bigcup_{\alpha\in A} E_\alpha = \{ x\in \Omega: x\in E_{\alpha_0} \text{ \ul{for some} } \alpha_0\in A\}.$$
$$ \bigcap_{\alpha\in A} E_\alpha = \{x\in \Omega: x\in E_\alpha \text{ \ul{for all} } \alpha\in A\}.$$
\begin{remark}
$A,B$ subsets of $\Omega$.
\begin{itemize}
\item $A\cup B = B\cup A$, $A\cap B = B\cap A$.
\item $(A\cup B)\cup C = A\cup(B\cup C)$.
\item $(*)$ $A\cap (B\cup C) = (A\cap B)\cup (A\cap C)$.
\item $A,B\subset A\cup B$, $A\cap B\subset A,B$.
\item $A\subset B \implies A\cup B = B$ and $A\cap B = A$.
\item $\emptyset$ acts as neutral element, that is $A\cup \emptyset = A$ and $A\cap \emptyset = \emptyset$.
\item $*$ $\emptyset$ is a subset of every set.
\end{itemize}
\end{remark}
\begin{example}
$\bigcup_{x\in\mb R} (-\infty,x] = \mb R$.
\begin{proof}
\say{$\subset$} Let $a\in\bigcup_{x\in\mb R}(-\infty,x]$.
Then $a\in(-\infty,x_0]\subset\mb R$ for some $x_0\in\mb R$.
This implies $a\in\mb R\implies \bigcup_{x\in\mb R}(-\infty,x]\subset \mb R$.
\say{$\supset$} Let $a\in\mb R$. Then $a\in(-\infty,a]$. So $a\in\bigcup_{x\in\mb R}(-\infty,a]$. Therefore $\mb R\subset_{x\in\mb R} (-\infty,x]$. Hence $\bigcup_{x\in\mb R} (-\infty,x] =~\mb R$.
\end{proof}
\end{example}
\begin{example}
$\bigcap_{x\in(0,1)}(0,x) = \emptyset$. $\nexists a\in\mb R$ such that $\bigcap_{x\in(0,1)}(0,x) = a$.
If $a\leq 0$, then $a\notin(0,x)$ for any $x\in(0,1)$, so $a\notin\bigcap_{x\in(0,1)}(0,x)$.
Let $a>0$. Then $a\notin (0,x)$ for any $x\in(0,1)$. So $a\notin \bigcap_{x\in(0,1)}(0,x)$.
Let $0<a<1$. Then $a\notin(0,\frac{a}{2})$. So $a\notin \bigcap_{x\in(0,1)}(0,x)$. Therefore $\bigcap_{x\in(0,1)}(0,x) = \emptyset$.
\end{example}
\begin{example}
[*] $A:=\{x\in\mb R: 0<x\leq 1\} = (0,1]$. For $x\in A$, define $E_x\{y\in\mb R: 0<y<x\}$.
Then $E_x\subset E_z \Lr 0<x\leq z \leq 1$.
\end{example}
\begin{theorem}
Let $\{E_n\}_{n\in\mb N}$ be a sequence of countable sets.
Then $S:=\bigcup_{n\in\mb N} E_n$ is countable. (Countable union of countable sets is countable).
\end{theorem}
\begin{example}
$\mb N^2 = \mb N\times \mb N = \bigcup_{n\in\mb N} \mb N\times \{n\}$.
\end{example}
\begin{proof}
We need to show: $\exists f:\bigcup_{n\in\mb N} E_n \ra \mb N$ that is 1-1.
For each $n\in\mb N$, $E_n$ is countable, so $\exists g_n: \mb N\ra E_n$ that is 1-1 and onto.
This allows us to write: $$g_1: x_{1,1}, x_{1,2}, x_{1,3},\dots,x_{1,k},\dots = E_1.$$
$$g_2: x_{2,1}, x_{2,2}, x_{2,3},\dots,x_{2,k},\dots = E_2.$$
$$g_3: x_{3,1}, x_{3,2}, x_{3,3},\dots,x_{3,k},\dots = E_3.$$
$$ \vdots$$
$$g_m: x_{m,1}, x_{m,2}, x_{m,3},\dots,x_{m,k},\dots = E_m.$$
This array contains all elements of $S$.
We can rewrite $S = \bigcup_{n\in\mb N} E_n$ as follows: $S = \bigcup_{n\in\mb N} \bigcup_{m\in\mb N} g_n(m)$.
Define $f:\bigcup_{n\in\mb N} E_n \ra \mb N$ by
$ f(g_n(m)) = 10^{m+n} + m \implies f$ is 1-1 $\implies \bigcup E_n$ is countable.
\end{proof}
\begin{theorem}
Let $A$ be a countable set. Let $B_n:= \{(x_1,\dots,x_n):x_i\in A\}$.
Then $B_n$ is countable.
\end{theorem}
\begin{proof}
By induction. Since $A$ is countable, $B_1:= \{ x: x\in A\} = A$.
Suppose that $B_{k-1}$ is countable for $k \geq 2$. Then $B_k = B_{k-1}\times A = \{(x_1,\dots,x_{k-1},a): a\in A \text{ and } (x_1,\dots,x_{k-1})\in B_{k-1}\} = \bigcup_{a\in A} B_{k-1}\times \{a\}$ implies $B_k$ is countable as countable union of countable sets.
Therefore, $B_n$ is countable for any $n\in\mb N$.
\end{proof}
\begin{corollary}
$\mb Q$ is countable.
\end{corollary}
\begin{proof}
We will show: $\mb Q$ is a countable union of countable sets.
For fixed $n\in\mb N$, write $S_n:=\{\frac{m}{n}:m\in\mb Z\}$. Then $S_n$ is countable since $\mb Z$ is countable.
\ul{Claim}: $\mb Q = \bigcup_{n\in\mb N} S_n$.
\ul{Proof of claim}: \say{$\subset$} Let $x\in\mb Q$. Then $x = \frac{m}{n}$ with $m,n\in\mb Z$ and $n\neq 0$.
If $n\in\mb N$, then $x = \frac{m}{n}\in S_n$, we're done.
If $-n\in\mb N$, then $x = \frac{m}{n} = \frac{-m}{-n} \implies x\in S_{-n\in\mb N} \implies x\in\bigcup_{n\in\mb N} S_n \implies \mb Q\subset\bigcup_{n\in\mb N} S_n$.
\say{$\supset$} Let $x\in\bigcup_{n\in\mb N} S_n$. Then $\exists n_0\in\mb N$ such that $x\in S_{n_0}$ i.e., $x=\frac{m}{n_0}$ for some $m\in\mb Z$. $\implies x\in\mb Q \implies \bigcup_{n\in\mb N}S_n\subset \mb Q$.
So $\mb Q = \bigcup_{n\in\mb N} S_n$ - a \ul{countable union} of countable sets.
So $\mb Q$ is countable.
\end{proof}
\begin{theorem}
Let $A:=\{0,1\}^\mb N = \{f:\mb N\ra\{0,1\}\}$ set of all sequences of 0's and 1's.
Then $A$ is \ul{uncountable}.
\end{theorem}
\begin{proof}
We will use: If every countable subset of $A$ is a proper subset of $A$, then $A$ is uncountable.
(Otherwise, $A\subsetneq A$ - a contradiciton).
Let $E\subset A$ be a countable set. This means we can enumerate elements of $E$:
\begin{align*}
s_1&: 0,1,0,1,0,0,0,0,1,0,\dots \\
s_2&: 0,0,0,0,0,0,0,0,1,\dots \\
s_3&: 0,1,1,1,1,0,0,1,0,0,\dots \\
&\qquad\vdots \\
s_k&: 0,0,1,0,1,0,0,0,1,\dots
\end{align*}
- these are all elements of $E$.
We will construct an element $s^*\in A$ but $s^*\notin E$.
Define $$s^*(k) = 1-s_k(k) = \begin{cases} 1 & \text{if } s_k(k) = 0 \\ 0 & \text{if } s_k(k) = 1 \end{cases}.$$
Then $s^*$ is a sequence of 0's and 1's and hence $s^*\in A$.
By construction $s^*\notin s_k$ for all $k\in\mb N$ for at least in one place.
This implies $s^*\in A$ but $s^*\notin E \implies E$ is a proper subset of $A$ since $E$ is arbitrary, $A$ must be uncountable. This is Cantor's diagonalization method.
\end{proof}
\begin{corollary}
$\mb R$ is uncountable.
\end{corollary}
\begin{proof}
Later in chapter using topology.
\end{proof}
\begin{theorem}
$(0,1)\subset \mb R$ is uncountable.
\end{theorem}
\begin{proof}
Let $E\subset (0,1)$ be countable. We will show $E\subsetneq (0,1)$.
Since $E$ is countable, elements of \ul{$E$ can be} \ul{enumerated}. Also, elements of $E$ can be written as decimal expansion: Then
$$s_1: 0.a_{11}a_{12}a_{13}a_{14}\dots$$
$$s_2: 0.a_{21}a_{22}a_{23}a_{24}\dots$$
$$s_3: 0.a_{31}a_{32}a_{33}a_{34}\dots$$
$$ \vdots$$
$$s_k: 0.a_{k1}a_{k2}a_{k3}a_{k4}\dots$$
$$ \vdots $$
Construct $s^*\in(0,1)$ as follows: $s^* := 0.s_1^*s_2^*s_3^*\dots$ with $s_1^*\neq a_{11}, s_2^*\neq a_{22}, s_3^*\neq a_{33}, \dots, s_k^* \neq a_{kk}$ and $s_i^*\neq 9$ for all $i\in\mb N$.
Then $s^*\in(0,1)$ and $s^*\notin E$. So $E\subsetneq (0,1)$. Therefore $(0,1)$ is uncountable.
\end{proof}
\subsection{Metric spaces}
\begin{definition}
[Metric] Let $X$ be any set. Then $\rho:X\times X\ra \mb R$ is a metric if it satisfies the following:
\begin{enumerate}
\item[(i)] $\rho(a,b)>0$ for all $a,b\in X$ and $\rho(a,b) = 0 \Llr a= b$.
\item[(ii)] $\rho(a,b) = \rho(b,a)$ - symmetric.
\item[(iii)] $\rho(a,b)\leq \rho(a,c) + \rho(c,b)$ - triangle inequality.
\end{enumerate}
\end{definition}
\begin{example}
$X = \mb R$ and $\rho(a,b) = |a-b|_\mb R$.
\end{example}
\begin{example}
$X = \mb C$ and $\rho(z,w) = |z-w|_\mb c = [(z-w)\conj{(z-w)}]^{\frac{1}{2}}$.
\end{example}
\begin{example}
$X = \mb R^k$ with $\vx = (x_1,\dots,x_k),\vy = (y_1,\dots,y_k)$ and $\rho(\vx,\vy) = |\vx - \vy|_{\mb R^k} = \left( \sum_{i=1}^k (x_i-y_i)^2 \right)^{\frac{1}{2}}$.
\end{example}
\begin{example}
$X$ be any set and define $\rho(x,y) = \begin{cases} 1 & \text{if } x\neq y \\ 0 & \text{if } x = y \end{cases}$ - discrete metric. Verify $\rho$ is a metric.
\end{example}
\begin{definition}
[Convex set] Let $E\subset\mb R^k$. Then $E$ convex if $\lambda\vx + (1-\lambda)\vy \in E,\ \forall\vx,\vy\in E$ and $\forall \lambda\in[0,1]$.
\end{definition}
\begin{example}
Open ball in $\mb R^k$: $B_r(\vx) := \{ \vy\in\mb R^k : |\vx-\vy|<r \}\subset \mb R^k$ - ball centered at $\vx$ with radius $r>0$.
\ul{Claim}: $B_r(\vx)$ is convex so that $\lambda\vy + (1-\lambda)\vz\in B_r(\vx)$ for all $\vy,\vz\in B_r(\vx)$ and $0\leq \lambda\leq 1$.
\begin{proof}
Let $\vy,\vz\in B_r(\vx)$ and $\lambda\in[0,1]$. Then
\begin{align*}
|\vx -(\lambda\vy + (1-\lambda)\vz)|_{\mb R^k} &\os{?}{<} r \\
&= | \vx - \lambda\vy - \vz + \lambda\vz +\lambda\vx - \lambda\vx| \\
&= |(\vx - \vz) + \lambda(\vx -\lambda\vy) +\lambda(\vx +\vz)| \\
&= |(1-\lambda)(\vx-\vz) + \lambda(\vx-\vy)| \\
&\os{\Delta}{\leq} (1-\lambda)|\vx-\vz|_{\mb R^k} + \lambda|\vx-\vy|_{\mb R^k} \\
&\leq (1-\lambda)r + \lambda r = r \implies \lambda\vy + (1-\lambda)\vz\in B_r(\vx)
\end{align*}
Thus $B_r(\vx)$ is convex.
\end{proof}
\end{example}
\begin{definition}
[Neighborhood] $N_r(x) = \{y\in X: \rho(x,y)<r\}$.
\end{definition}
\begin{definition}
[Limit point] $p$ is a limit point of $E$ if $\forall r>0$, there exists $q\in E\subset X$ such that $q\in~N_r(p)\backslash\{p\}$.
\end{definition}
\begin{example}
$X = (\mb R,\us{\rho}{|\cdot|})$ and $E:= \{\frac{1}{n}:n\in\mb N\}\subset\mb R$.
If $e\in E$, then $e = \frac{1}{n}$ for some $n\in\mb N$.
Take $r:= \min\{\frac{1}{n}-\frac{1}{n+1},\frac{1}{n-1}-\frac{1}{n}\}$.
Then $N_r(e)$ does not contain any point of $E$. $\implies E$ does not contain any limit point of $E$.
But $x=0$ is a limit point of $E$. Indeed, let $r\in(0,1)$. Then $N_r(0)i$ contains points of $E$.
\end{example}
\begin{remark}
Limit points of a set do not necessarily belong to $E$.
\end{remark}
\ul{Notation}: $E':=$ set of all limit points of $E$.
\begin{definition}
[Closed set] $E$ is closed if $E'\subset E$.
\end{definition}
\begin{definition}
[Interior point] A point $p\in E$ is interior if $\exists r$ such that $N_r(p)\subset E$.
\end{definition}
\ul{Notation}: $E^\circ := $ set of all interior points of $E$.
\begin{definition}
[Open set] If every point is an interior point. i.e., $E^\circ = E$.
\end{definition}
$(X,\rho)$ is a metric space.
\begin{theorem}
Every neighborhood in $X$ is an open set.
\end{theorem}
\begin{proof}