id
stringlengths
17
29
nl_statement
stringlengths
43
377
nl_proof
stringlengths
0
3.81k
formal_statement
stringlengths
52
344
src_header
stringclasses
10 values
Rudin|exercise_1_1a
If $r$ is rational $(r \neq 0)$ and $x$ is irrational, prove that $r+x$ is irrational.
\begin{proof} If $r$ and $r+x$ were both rational, then $x=r+x-r$ would also be rational. \end{proof}
theorem exercise_1_1a (x : ℝ) (y : β„š) : ( irrational x ) -> irrational ( x + y ) :=
import .common open real complex open topological_space open filter open_locale real open_locale topology open_locale big_operators open_locale complex_conjugate open_locale filter noncomputable theory
Rudin|exercise_1_2
Prove that there is no rational number whose square is $12$.
\begin{proof} Suppose $m^2=12 n^2$, where $m$ and $n$ have no common factor. It follows that $m$ must be even, and therefore $n$ must be odd. Let $m=2 r$. Then we have $r^2=3 n^2$, so that $r$ is also odd. Let $r=2 s+1$ and $n=2 t+1$. Then $$ 4 s^2+4 s+1=3\left(4 t^2+4 t+1\right)=12 t^2+12 t+3, $$ so that $$ ...
theorem exercise_1_2 : Β¬ βˆƒ (x : β„š), ( x ^ 2 = 12 ) :=
import .common open real complex open topological_space open filter open_locale real open_locale topology open_locale big_operators open_locale complex_conjugate open_locale filter noncomputable theory
Rudin|exercise_1_5
Let $A$ be a nonempty set of real numbers which is bounded below. Let $-A$ be the set of all numbers $-x$, where $x \in A$. Prove that $\inf A=-\sup (-A)$.
\begin{proof} We need to prove that $-\sup (-A)$ is the greatest lower bound of $A$. For brevity, let $\alpha=-\sup (-A)$. We need to show that $\alpha \leq x$ for all $x \in A$ and $\alpha \geq \beta$ if $\beta$ is any lower bound of $A$. Suppose $x \in A$. Then, $-x \in-A$, and, hence $-x \leq \sup (-A)$. It ...
theorem exercise_1_5 (A minus_A : set ℝ) (hA : A.nonempty) (hA_bdd_below : bdd_below A) (hminus_A : minus_A = {x | -x ∈ A}) : Inf A = Sup minus_A :=
import .common open real complex open topological_space open filter open_locale real open_locale topology open_locale big_operators open_locale complex_conjugate open_locale filter noncomputable theory
Rudin|exercise_1_11a
If $z$ is a complex number, prove that there exists an $r\geq 0$ and a complex number $w$ with $| w | = 1$ such that $z = rw$.
\begin{proof} If $z=0$, we take $r=0, w=1$. (In this case $w$ is not unique.) Otherwise we take $r=|z|$ and $w=z /|z|$, and these choices are unique, since if $z=r w$, we must have $r=r|w|=|r w|=|z|, z / r$ \end{proof}
theorem exercise_1_11a (z : β„‚) : βˆƒ (r : ℝ) (w : β„‚), abs w = 1 ∧ z = r * w :=
import .common open real complex open topological_space open filter open_locale real open_locale topology open_locale big_operators open_locale complex_conjugate open_locale filter noncomputable theory
Rudin|exercise_1_13
If $x, y$ are complex, prove that $||x|-|y|| \leq |x-y|$.
\begin{proof} Since $x=x-y+y$, the triangle inequality gives $$ |x| \leq|x-y|+|y| $$ so that $|x|-|y| \leq|x-y|$. Similarly $|y|-|x| \leq|x-y|$. Since $|x|-|y|$ is a real number we have either ||$x|-| y||=|x|-|y|$ or ||$x|-| y||=|y|-|x|$. In either case, we have shown that ||$x|-| y|| \leq|x-y|$. \end{proof}
theorem exercise_1_13 (x y : β„‚) : |(abs x) - (abs y)| ≀ abs (x - y) :=
import .common open real complex open topological_space open filter open_locale real open_locale topology open_locale big_operators open_locale complex_conjugate open_locale filter noncomputable theory
Rudin|exercise_1_16a
Suppose $k \geq 3, x, y \in \mathbb{R}^k, |x - y| = d > 0$, and $r > 0$. Prove that if $2r > d$, there are infinitely many $z \in \mathbb{R}^k$ such that $|z-x|=|z-y|=r$.
\begin{proof} (a) Let w be any vector satisfying the following two equations: $$ \begin{aligned} \mathbf{w} \cdot(\mathbf{x}-\mathbf{y}) &=0, \\ |\mathbf{w}|^2 &=r^2-\frac{d^2}{4} . \end{aligned} $$ From linear algebra it is known that all but one of the components of a solution $\mathbf{w}$ of the first eq...
theorem exercise_1_16a (n : β„•) (d r : ℝ) (x y z : euclidean_space ℝ (fin n)) -- R^n (h₁ : n β‰₯ 3) (hβ‚‚ : β€–x - yβ€– = d) (h₃ : d > 0) (hβ‚„ : r > 0) (hβ‚… : 2 * r > d) : set.infinite {z : euclidean_space ℝ (fin n) | β€–z - xβ€– = r ∧ β€–z - yβ€– = r} :=
import .common open real complex open topological_space open filter open_locale real open_locale topology open_locale big_operators open_locale complex_conjugate open_locale filter noncomputable theory
Rudin|exercise_1_18a
If $k \geq 2$ and $\mathbf{x} \in R^{k}$, prove that there exists $\mathbf{y} \in R^{k}$ such that $\mathbf{y} \neq 0$ but $\mathbf{x} \cdot \mathbf{y}=0$
\begin{proof} If $\mathbf{x}$ has any components equal to 0 , then $\mathbf{y}$ can be taken to have the corresponding components equal to 1 and all others equal to 0 . If all the components of $\mathbf{x}$ are nonzero, $\mathbf{y}$ can be taken as $\left(-x_2, x_1, 0, \ldots, 0\right)$. This is, of course, not tr...
theorem exercise_1_18a (n : β„•) (h : n > 1) (x : euclidean_space ℝ (fin n)) -- R^n : βˆƒ (y : euclidean_space ℝ (fin n)), y β‰  0 ∧ (inner x y) = (0 : ℝ) :=
import .common open real complex open topological_space open filter open_locale real open_locale topology open_locale big_operators open_locale complex_conjugate open_locale filter noncomputable theory
Rudin|exercise_1_19
Suppose $a, b \in R^k$. Find $c \in R^k$ and $r > 0$ such that $|x-a|=2|x-b|$ if and only if $| x - c | = r$. Prove that $3c = 4b - a$ and $3r = 2 |b - a|$.
\begin{proof} Since the solution is given to us, all we have to do is verify it, i.e., we need to show that the equation $$ |\mathrm{x}-\mathrm{a}|=2|\mathrm{x}-\mathrm{b}| $$ is equivalent to $|\mathrm{x}-\mathbf{c}|=r$, which says $$ \left|\mathbf{x}-\frac{4}{3} \mathbf{b}+\frac{1}{3} \mathbf{a}\right|=\fr...
theorem exercise_1_19 (n : β„•) (a b c x : euclidean_space ℝ (fin n)) (r : ℝ) (h₁ : r > 0) (hβ‚‚ : 3 β€’ c = 4 β€’ b - a) (h₃ : 3 * r = 2 * β€–x - bβ€–) : β€–x - aβ€– = 2 * β€–x - bβ€– ↔ β€–x - cβ€– = r :=
import .common open real complex open topological_space open filter open_locale real open_locale topology open_locale big_operators open_locale complex_conjugate open_locale filter noncomputable theory
Rudin|exercise_2_24
Let $X$ be a metric space in which every infinite subset has a limit point. Prove that $X$ is separable.
\begin{proof} We observe that if the process of constructing $x_j$ did not terminate, the result would be an infinite set of points $x_j, j=1,2, \ldots$, such that $d\left(x_i, x_j\right) \geq \delta$ for $i \neq j$. It would then follow that for any $x \in X$, the open ball $B_{\frac{\delta}{2}}(x)$ contains at m...
theorem exercise_2_24 {X : Type*} [metric_space X] (hX : βˆ€ (A : set X), infinite A β†’ βˆƒ (x : X), x ∈ closure A) : separable_space X :=
import .common open real complex open topological_space open filter open_locale real open_locale topology open_locale big_operators open_locale complex_conjugate open_locale filter noncomputable theory
Rudin|exercise_2_27a
Suppose $E\subset\mathbb{R}^k$ is uncountable, and let $P$ be the set of condensation points of $E$. Prove that $P$ is perfect.
\begin{proof} We see that $E \cap W$ is at most countable, being a countable union of at-most-countable sets. It remains to show that $P=W^c$, and that $P$ is perfect. \end{proof}
theorem exercise_2_27a (k : β„•) (E P : set (euclidean_space ℝ (fin k))) (hE : E.nonempty ∧ Β¬ set.countable E) (hP : P = {x | βˆ€ U ∈ 𝓝 x, Β¬ set.countable (P ∩ E)}) : is_closed P ∧ P = {x | cluster_pt x (π“Ÿ P)} :=
import .common open real complex open topological_space open filter open_locale real open_locale topology open_locale big_operators open_locale complex_conjugate open_locale filter noncomputable theory
Rudin|exercise_2_28
Prove that every closed set in a separable metric space is the union of a (possibly empty) perfect set and a set which is at most countable.
\begin{proof} If $E$ is closed, it contains all its limit points, and hence certainly all its condensation points. Thus $E=P \cup(E \backslash P)$, where $P$ is perfect (the set of all condensation points of $E$ ), and $E \backslash P$ is at most countable. Since a perfect set in a separable metric space has th...
theorem exercise_2_28 (X : Type*) [metric_space X] [separable_space X] (A : set X) (hA : is_closed A) : βˆƒ P₁ Pβ‚‚ : set X, A = P₁ βˆͺ Pβ‚‚ ∧ is_closed P₁ ∧ P₁ = {x | cluster_pt x (π“Ÿ P₁)} ∧ set.countable Pβ‚‚ :=
import .common open real complex open topological_space open filter open_locale real open_locale topology open_locale big_operators open_locale complex_conjugate open_locale filter noncomputable theory
Rudin|exercise_3_1a
Prove that convergence of $\left\{s_{n}\right\}$ implies convergence of $\left\{\left|s_{n}\right|\right\}$.
\begin{proof} Let $\varepsilon>0$. Since the sequence $\left\{s_n\right\}$ is a Cauchy sequence, there exists $N$ such that $\left|s_m-s_n\right|<\varepsilon$ for all $m>N$ and $n>N$. We then have $\left| |s_m| - |s_n| \right| \leq\left|s_m-s_n\right|<\varepsilon$ for all $m>N$ and $n>N$. Hence the sequence $\left...
theorem exercise_3_1a (f : β„• β†’ ℝ) (h : βˆƒ (a : ℝ), tendsto (Ξ» (n : β„•), f n) at_top (𝓝 a)) : βˆƒ (a : ℝ), tendsto (Ξ» (n : β„•), |f n|) at_top (𝓝 a) :=
import .common open real complex open topological_space open filter open_locale real open_locale topology open_locale big_operators open_locale complex_conjugate open_locale filter noncomputable theory
Rudin|exercise_3_3
If $s_{1}=\sqrt{2}$, and $s_{n+1}=\sqrt{2+\sqrt{s_{n}}} \quad(n=1,2,3, \ldots),$ prove that $\left\{s_{n}\right\}$ converges, and that $s_{n}<2$ for $n=1,2,3, \ldots$.
\begin{proof} Since $\sqrt{2}<2$, it is manifest that if $s_n<2$, then $s_{n+1}<\sqrt{2+2}=2$. Hence it follows by induction that $\sqrt{2}<s_n<2$ for all $n$. In view of this fact,it also follows that $\left(s_n-2\right)\left(s_n+1\right)<0$ for all $n>1$, i.e., $s_n>s_n^2-2=s_{n-1}$. Hence the sequence is an inc...
theorem exercise_3_3 : βˆƒ (x : ℝ), tendsto f at_top (𝓝 x) ∧ βˆ€ n, f n < 2 :=
import .common open real complex open topological_space open filter open_locale real open_locale topology open_locale big_operators open_locale complex_conjugate open_locale filter noncomputable theory
Rudin|exercise_3_6a
Prove that $\lim_{n \rightarrow \infty} \sum_{i<n} a_i = \infty$, where $a_i = \sqrt{i + 1} -\sqrt{i}$.
\begin{proof} (a) Multiplying and dividing $a_n$ by $\sqrt{n+1}+\sqrt{n}$, we find that $a_n=\frac{1}{\sqrt{n+1}+\sqrt{n}}$, which is larger than $\frac{1}{2 \sqrt{n+1}}$. The series $\sum a_n$ therefore diverges by comparison with the $p$ series $\left(p=\frac{1}{2}\right)$. \end{proof}
theorem exercise_3_6a : tendsto (Ξ» (n : β„•), (βˆ‘ i in finset.range n, g i)) at_top at_top :=
import .common open real complex open topological_space open filter open_locale real open_locale topology open_locale big_operators open_locale complex_conjugate open_locale filter noncomputable theory
Rudin|exercise_3_8
If $\Sigma a_{n}$ converges, and if $\left\{b_{n}\right\}$ is monotonic and bounded, prove that $\Sigma a_{n} b_{n}$ converges.
\begin{proof} We shall show that the partial sums of this series form a Cauchy sequence, i.e., given $\varepsilon>0$ there exists $N$ such that $\left|\sum_{k=m+1}^n a_k b_k\right|\langle\varepsilon$ if $n\rangle$ $m \geq N$. To do this, let $S_n=\sum_{k=1}^n a_k\left(S_0=0\right)$, so that $a_k=S_k-S_{k-1}$ for $...
theorem exercise_3_8 (a b : β„• β†’ ℝ) (h1 : βˆƒ y, (tendsto (Ξ» n, (βˆ‘ i in (finset.range n), a i)) at_top (𝓝 y))) (h2 : monotone b) (h3 : metric.bounded (set.range b)) : βˆƒ y, tendsto (Ξ» n, (βˆ‘ i in (finset.range n), (a i) * (b i))) at_top (𝓝 y) :=
import .common open real complex open topological_space open filter open_locale real open_locale topology open_locale big_operators open_locale complex_conjugate open_locale filter noncomputable theory
Rudin|exercise_3_20
Suppose $\left\{p_{n}\right\}$ is a Cauchy sequence in a metric space $X$, and some sequence $\left\{p_{n l}\right\}$ converges to a point $p \in X$. Prove that the full sequence $\left\{p_{n}\right\}$ converges to $p$.
\begin{proof} Let $\varepsilon>0$. Choose $N_1$ so large that $d\left(p_m, p_n\right)<\frac{\varepsilon}{2}$ if $m>N_1$ and $n>N_1$. Then choose $N \geq N_1$ so large that $d\left(p_{n_k}, p\right)<\frac{\varepsilon}{2}$ if $k>N$. Then if $n>N$, we have $$ d\left(p_n, p\right) \leq d\left(p_n, p_{n_{N+1}}\right)...
theorem exercise_3_20 {X : Type*} [metric_space X] (p : β„• β†’ X) (l : β„•) (r : X) (hp : cauchy_seq p) (hpl : tendsto (Ξ» n, p (l * n)) at_top (𝓝 r)) : tendsto p at_top (𝓝 r) :=
import .common open real complex open topological_space open filter open_locale real open_locale topology open_locale big_operators open_locale complex_conjugate open_locale filter noncomputable theory
Rudin|exercise_3_22
Suppose $X$ is a nonempty complete metric space, and $\left\{G_{n}\right\}$ is a sequence of dense open sets of $X$. Prove Baire's theorem, namely, that $\bigcap_{1}^{\infty} G_{n}$ is not empty.
\begin{proof} Let $F_n$ be the complement of $G_n$, so that $F_n$ is closed and contains no open sets. We shall prove that any nonempty open set $U$ contains a point not in any $F_n$, hence in all $G_n$. To this end, we note that $U$ is not contained in $F_1$, so that there is a point $x_1 \in U \backslash F_1$. S...
theorem exercise_3_22 (X : Type*) [metric_space X] [complete_space X] (G : β„• β†’ set X) (hG : βˆ€ n, is_open (G n) ∧ dense (G n)) : βˆƒ x, βˆ€ n, x ∈ G n :=
import .common open real complex open topological_space open filter open_locale real open_locale topology open_locale big_operators open_locale complex_conjugate open_locale filter noncomputable theory
Rudin|exercise_4_2a
If $f$ is a continuous mapping of a metric space $X$ into a metric space $Y$, prove that $f(\overline{E}) \subset \overline{f(E)}$ for every set $E \subset X$. ($\overline{E}$ denotes the closure of $E$).
\begin{proof} Let $x \in \bar{E}$. We need to show that $f(x) \in \overline{f(E)}$. To this end, let $O$ be any neighborhood of $f(x)$. Since $f$ is continuous, $f^{-1}(O)$ contains (is) a neighborhood of $x$. Since $x \in \bar{E}$, there is a point $u$ of $E$ in $f^{-1}(O)$. Hence $\frac{f(u)}{f(E)} \in O \cap f(...
theorem exercise_4_2a {Ξ± : Type} [metric_space Ξ±] {Ξ² : Type} [metric_space Ξ²] (f : Ξ± β†’ Ξ²) (h₁ : continuous f) : βˆ€ (x : set Ξ±), f '' (closure x) βŠ† closure (f '' x) :=
import .common open real complex open topological_space open filter open_locale real open_locale topology open_locale big_operators open_locale complex_conjugate open_locale filter noncomputable theory
Rudin|exercise_4_4a
Let $f$ and $g$ be continuous mappings of a metric space $X$ into a metric space $Y$, and let $E$ be a dense subset of $X$. Prove that $f(E)$ is dense in $f(X)$.
\begin{proof} To prove that $f(E)$ is dense in $f(X)$, simply use that $f(X)=f(\bar{E}) \subseteq \overline{f(E)}$. \end{proof}
theorem exercise_4_4a {Ξ± : Type} [metric_space Ξ±] {Ξ² : Type} [metric_space Ξ²] (f : Ξ± β†’ Ξ²) (s : set Ξ±) (h₁ : continuous f) (hβ‚‚ : dense s) : f '' set.univ βŠ† closure (f '' s) :=
import .common open real complex open topological_space open filter open_locale real open_locale topology open_locale big_operators open_locale complex_conjugate open_locale filter noncomputable theory
Rudin|exercise_4_5a
If $f$ is a real continuous function defined on a closed set $E \subset \mathbb{R}$, prove that there exist continuous real functions $g$ on $\mathbb{R}$ such that $g(x)=f(x)$ for all $x \in E$.
\begin{proof} Following the hint, let the complement of $E$ consist of a countable collection of finite open intervals $\left(a_k, b_k\right)$ together with possibly one or both of the the semi-infinite intervals $(b,+\infty)$ and $(-\infty, a)$. The function $f(x)$ is already defined at $a_k$ and $b_k$, as well as at...
theorem exercise_4_5a (f : ℝ β†’ ℝ) (E : set ℝ) (h₁ : is_closed E) (hβ‚‚ : continuous_on f E) : βˆƒ (g : ℝ β†’ ℝ), continuous g ∧ βˆ€ x ∈ E, f x = g x :=
import .common open real complex open topological_space open filter open_locale real open_locale topology open_locale big_operators open_locale complex_conjugate open_locale filter noncomputable theory
Rudin|exercise_4_6
If $f$ is defined on $E$, the graph of $f$ is the set of points $(x, f(x))$, for $x \in E$. In particular, if $E$ is a set of real numbers, and $f$ is real-valued, the graph of $f$ is a subset of the plane. Suppose $E$ is compact, and prove that $f$ is continuous on $E$ if and only if its graph is compact.
\begin{proof} Let $Y$ be the co-domain of the function $f$. We invent a new metric space $E \times Y$ as the set of pairs of points $(x, y), x \in E, y \in Y$, with the metric $\rho\left(\left(x_1, y_1\right),\left(x_2, y_2\right)\right)=d_E\left(x_1, x_2\right)+d_Y\left(y_1, y_2\right)$. The function $\varphi(x)=...
theorem exercise_4_6 (f : ℝ β†’ ℝ) (E : set ℝ) (G : set (ℝ Γ— ℝ)) (h₁ : is_compact E) (hβ‚‚ : G = {(x, f x) | x ∈ E}) : continuous_on f E ↔ is_compact G :=
import .common open real complex open topological_space open filter open_locale real open_locale topology open_locale big_operators open_locale complex_conjugate open_locale filter noncomputable theory
Rudin|exercise_4_8b
Let $E$ be a bounded set in $R^{1}$. Prove that there exists a real function $f$ such that $f$ is uniformly continuous and is not bounded on $E$.
\begin{proof} The function $f(x)=x$ is uniformly continuous on the entire line, but not bounded. \end{proof}
theorem exercise_4_8b (E : set ℝ) : βˆƒ f : ℝ β†’ ℝ, uniform_continuous_on f E ∧ Β¬ metric.bounded (set.image f E) :=
import .common open real complex open topological_space open filter open_locale real open_locale topology open_locale big_operators open_locale complex_conjugate open_locale filter noncomputable theory
Rudin|exercise_4_12
A uniformly continuous function of a uniformly continuous function is uniformly continuous.
\begin{proof} Let $f: X \rightarrow Y$ and $g: Y \rightarrow Z$ be uniformly continuous. Then $g \circ f: X \rightarrow Z$ is uniformly continuous, where $g \circ f(x)=g(f(x))$ for all $x \in X$. To prove this fact, let $\varepsilon>0$ be given. Then, since $g$ is uniformly continuous, there exists $\eta>0$ such ...
theorem exercise_4_12 {Ξ± Ξ² Ξ³ : Type*} [uniform_space Ξ±] [uniform_space Ξ²] [uniform_space Ξ³] {f : Ξ± β†’ Ξ²} {g : Ξ² β†’ Ξ³} (hf : uniform_continuous f) (hg : uniform_continuous g) : uniform_continuous (g ∘ f) :=
import .common open real complex open topological_space open filter open_locale real open_locale topology open_locale big_operators open_locale complex_conjugate open_locale filter noncomputable theory
Rudin|exercise_4_19
Suppose $f$ is a real function with domain $R^{1}$ which has the intermediate value property: if $f(a)<c<f(b)$, then $f(x)=c$ for some $x$ between $a$ and $b$. Suppose also, for every rational $r$, that the set of all $x$ with $f(x)=r$ is closed. Prove that $f$ is continuous.
\begin{proof} The contradiction is evidently that $x_0$ is a limit point of the set of $t$ such that $f(t)=r$, yet, $x_0$ does not belong to this set. This contradicts the hypothesis that the set is closed. \end{proof}
theorem exercise_4_19 {f : ℝ β†’ ℝ} (hf : βˆ€ a b c, a < b β†’ f a < c β†’ c < f b β†’ βˆƒ x, a < x ∧ x < b ∧ f x = c) (hg : βˆ€ r : β„š, is_closed {x | f x = r}) : continuous f :=
import .common open real complex open topological_space open filter open_locale real open_locale topology open_locale big_operators open_locale complex_conjugate open_locale filter noncomputable theory
Rudin|exercise_4_24
Assume that $f$ is a continuous real function defined in $(a, b)$ such that $f\left(\frac{x+y}{2}\right) \leq \frac{f(x)+f(y)}{2}$ for all $x, y \in(a, b)$. Prove that $f$ is convex.
\begin{proof} We shall prove that $$ f(\lambda x+(1-\lambda) y) \leq \lambda f(x)+(1-\lambda) f(y) $$ for all "dyadic rational" numbers, i.e., all numbers of the form $\lambda=\frac{k}{2^n}$, where $k$ is a nonnegative integer not larger than $2^n$. We do this by induction on $n$. The case $n=0$ is trivial (si...
theorem exercise_4_24 {f : ℝ β†’ ℝ} (hf : continuous f) (a b : ℝ) (hab : a < b) (h : βˆ€ x y : ℝ, a < x β†’ x < b β†’ a < y β†’ y < b β†’ f ((x + y) / 2) ≀ (f x + f y) / 2) : convex_on ℝ (set.Ioo a b) f :=
import .common open real complex open topological_space open filter open_locale real open_locale topology open_locale big_operators open_locale complex_conjugate open_locale filter noncomputable theory
Rudin|exercise_5_2
Suppose $f^{\prime}(x)>0$ in $(a, b)$. Prove that $f$ is strictly increasing in $(a, b)$, and let $g$ be its inverse function. Prove that $g$ is differentiable, and that $g^{\prime}(f(x))=\frac{1}{f^{\prime}(x)} \quad(a<x<b)$.
\begin{proof} For any $c, d$ with $a<c<d<b$ there exists a point $p \in(c, d)$ such that $f(d)-f(c)=f^{\prime}(p)(d-c)>0$. Hence $f(c)<f(d)$ We know from Theorem $4.17$ that the inverse function $g$ is continuous. (Its restriction to each closed subinterval $[c, d]$ is continuous, and that is sufficient.) Now ob...
theorem exercise_5_2 {a b : ℝ} {f g : ℝ β†’ ℝ} (hf : βˆ€ x ∈ set.Ioo a b, deriv f x > 0) (hg : g = f⁻¹) (hg_diff : differentiable_on ℝ g (set.Ioo a b)) : differentiable_on ℝ g (set.Ioo a b) ∧ βˆ€ x ∈ set.Ioo a b, deriv g x = 1 / deriv f x :=
import .common open real complex open topological_space open filter open_locale real open_locale topology open_locale big_operators open_locale complex_conjugate open_locale filter noncomputable theory
Rudin|exercise_5_4
If $C_{0}+\frac{C_{1}}{2}+\cdots+\frac{C_{n-1}}{n}+\frac{C_{n}}{n+1}=0,$ where $C_{0}, \ldots, C_{n}$ are real constants, prove that the equation $C_{0}+C_{1} x+\cdots+C_{n-1} x^{n-1}+C_{n} x^{n}=0$ has at least one real root between 0 and 1.
\begin{proof} Consider the polynomial $$ p(x)=C_0 x+\frac{C_1}{2} x^2+\cdots+\frac{C_{n-1}}{n} x^n+\frac{C_n}{n+1} x^{n+1}, $$ whose derivative is $$ p^{\prime}(x)=C_0+C_1 x+\cdots+C_{n-1} x^{n-1}+C_n x^n . $$ It is obvious that $p(0)=0$, and the hypothesis of the problem is that $p(1)=0$. Hence Rolle's th...
theorem exercise_5_4 {n : β„•} (C : β„• β†’ ℝ) (hC : βˆ‘ i in (finset.range (n + 1)), (C i) / (i + 1) = 0) : βˆƒ x, x ∈ (set.Icc (0 : ℝ) 1) ∧ βˆ‘ i in finset.range (n + 1), (C i) * (x^i) = 0 :=
import .common open real complex open topological_space open filter open_locale real open_locale topology open_locale big_operators open_locale complex_conjugate open_locale filter noncomputable theory
Rudin|exercise_5_6
Suppose (a) $f$ is continuous for $x \geq 0$, (b) $f^{\prime}(x)$ exists for $x>0$, (c) $f(0)=0$, (d) $f^{\prime}$ is monotonically increasing. Put $g(x)=\frac{f(x)}{x} \quad(x>0)$ and prove that $g$ is monotonically increasing.
\begin{proof} Put $$ g(x)=\frac{f(x)}{x} \quad(x>0) $$ and prove that $g$ is monotonically increasing. By the mean-value theorem $$ f(x)=f(x)-f(0)=f^{\prime}(c) x $$ for some $c \in(0, x)$. Since $f^{\prime}$ is monotonically increasing, this result implies that $f(x)<x f^{\prime}(x)$. It therefore follow...
theorem exercise_5_6 {f : ℝ β†’ ℝ} (hf1 : continuous f) (hf2 : βˆ€ x, differentiable_at ℝ f x) (hf3 : f 0 = 0) (hf4 : monotone (deriv f)) : monotone_on (Ξ» x, f x / x) (set.Ioi 0) :=
import .common open real complex open topological_space open filter open_locale real open_locale topology open_locale big_operators open_locale complex_conjugate open_locale filter noncomputable theory
Rudin|exercise_5_15
Suppose $a \in R^{1}, f$ is a twice-differentiable real function on $(a, \infty)$, and $M_{0}, M_{1}, M_{2}$ are the least upper bounds of $|f(x)|,\left|f^{\prime}(x)\right|,\left|f^{\prime \prime}(x)\right|$, respectively, on $(a, \infty)$. Prove that $M_{1}^{2} \leq 4 M_{0} M_{2} .$
\begin{proof} The inequality is obvious if $M_0=+\infty$ or $M_2=+\infty$, so we shall assume that $M_0$ and $M_2$ are both finite. We need to show that $$ \left|f^{\prime}(x)\right| \leq 2 \sqrt{M_0 M_2} $$ for all $x>a$. We note that this is obvious if $M_2=0$, since in that case $f^{\prime}(x)$ is constant,...
theorem exercise_5_15 {f : ℝ β†’ ℝ} (a M0 M1 M2 : ℝ) (hf' : differentiable_on ℝ f (set.Ici a)) (hf'' : differentiable_on ℝ (deriv f) (set.Ici a)) (hM0 : M0 = Sup {(| f x | )| x ∈ (set.Ici a)}) (hM1 : M1 = Sup {(| deriv f x | )| x ∈ (set.Ici a)}) (hM2 : M2 = Sup {(| deriv (deriv f) x | )| x ∈ (set.Ici a)}) : (...
import .common open real complex open topological_space open filter open_locale real open_locale topology open_locale big_operators open_locale complex_conjugate open_locale filter noncomputable theory
Munkres|exercise_13_1
Let $X$ be a topological space; let $A$ be a subset of $X$. Suppose that for each $x \in A$ there is an open set $U$ containing $x$ such that $U \subset A$. Show that $A$ is open in $X$.
\begin{proof} Since, from the given hypothesis given any $x \in A$ there exists an open set containing $x$ say, $U_x$ such that $U_x \subset A$. Thus, we claim that $$ A=\bigcup_{x \in A} U_x $$ Observe that if we prove the above claim, then $A$ will be open, being a union of arbitrary open sets. Since, for ea...
theorem exercise_13_1 (X : Type*) [topological_space X] (A : set X) (h1 : βˆ€ x ∈ A, βˆƒ U : set X, x ∈ U ∧ is_open U ∧ U βŠ† A) : is_open A :=
import .common open set topological_space filter open_locale classical topology filter noncomputable theory
Munkres|exercise_13_4a1
If $\mathcal{T}_\alpha$ is a family of topologies on $X$, show that $\bigcap \mathcal{T}_\alpha$ is a topology on $X$.
\begin{proof} Since $\emptyset$ and $X$ belong to $\mathcal{T}_\alpha$ for each $\alpha$, they belong to $\bigcap_\alpha \mathcal{T}_\alpha$. Let $\left\{V_\beta\right\}_\beta$ be a collection of open sets in $\bigcap_\alpha \mathcal{T}_\alpha$. For any fixed $\alpha$ we have $\cup_\beta V_\beta \in \mathcal{T}_\a...
theorem exercise_13_4a1 (X I : Type*) (T : I β†’ set (set X)) (h : βˆ€ i, is_topology X (T i)) : is_topology X (β‹‚ i : I, T i) :=
import .common open set topological_space filter open_locale classical topology filter noncomputable theory
Munkres|exercise_13_4b1
Let $\mathcal{T}_\alpha$ be a family of topologies on $X$. Show that there is a unique smallest topology on $X$ containing all the collections $\mathcal{T}_\alpha$.
\begin{proof} (b) First we prove that there is a unique smallest topology on $X$ containing all the collections $\mathcal{T}_\alpha$. Uniqueness of such topology is clear. For each $\alpha$ let $\mathcal{B}_\alpha$ be a basis for $\mathcal{T}_\alpha$. Let $\mathcal{T}$ be the topology generated by the subbasis $\m...
theorem exercise_13_4b1 (X I : Type*) (T : I β†’ set (set X)) (h : βˆ€ i, is_topology X (T i)) : βˆƒ! T', is_topology X T' ∧ (βˆ€ i, T i βŠ† T') ∧ βˆ€ T'', is_topology X T'' β†’ (βˆ€ i, T i βŠ† T'') β†’ T'' βŠ† T' :=
import .common open set topological_space filter open_locale classical topology filter noncomputable theory
Munkres|exercise_13_5a
Show that if $\mathcal{A}$ is a basis for a topology on $X$, then the topology generated by $\mathcal{A}$ equals the intersection of all topologies on $X$ that contain $\mathcal{A}$.
\begin{proof} Let $\mathcal{T}$ be the topology generated by $\mathcal{A}$ and let $\mathcal{O}$ be the intersection of all topologies on $X$ that contains $\mathcal{A}$. Clearly $\mathcal{O} \subset \mathcal{T}$ since $\mathcal{T}$ is a topology on $X$ that contain $\mathcal{A}$. Conversely, let $U \in \mathcal{T...
theorem exercise_13_5a {X : Type*} [topological_space X] (A : set (set X)) (hA : is_topological_basis A) : generate_from A = generate_from (sInter {T | is_topology X T ∧ A βŠ† T}) :=
import .common open set topological_space filter open_locale classical topology filter noncomputable theory
Munkres|exercise_13_6
Show that the lower limit topology $\mathbb{R}_l$ and $K$-topology $\mathbb{R}_K$ are not comparable.
\begin{proof} Let $\mathcal{T}_{\ell}$ and $\mathcal{T}_K$ denote the topologies of $\mathbb{R}_{\ell}$ and $\mathbb{R}_K$ respectively. Given the basis element $[0,1)$ for $\mathcal{T}_{\ell}$, there is no basis element for $\mathcal{T}_K$ containing 0 and contained in $[0,1)$, so $\mathcal{T}_{\ell} \not \subset...
theorem exercise_13_6 : Β¬ (βˆ€ U, Rl.is_open U β†’ K_topology.is_open U) ∧ Β¬ (βˆ€ U, K_topology.is_open U β†’ Rl.is_open U) :=
import .common open set topological_space filter open_locale classical topology filter noncomputable theory
Munkres|exercise_13_8b
Show that the collection $\{(a,b) \mid a < b, a \text{ and } b \text{ rational}\}$ is a basis that generates a topology different from the lower limit topology on $\mathbb{R}$.
\begin{proof} (b) $\mathcal{C}$ is a basis for a topology on $\mathbb{R}$ since the union of its elements is $\mathbb{R}$ and the intersection of two elements of $\mathcal{C}$ is either empty or another element of $\mathcal{C}$. Now consider $[r, s)$ where $r$ is any irrational number and $s$ is any real number gr...
theorem exercise_13_8b : (topological_space.generate_from {S : set ℝ | βˆƒ a b : β„š, a < b ∧ S = Ico a b}).is_open β‰  (lower_limit_topology ℝ).is_open :=
import .common open set topological_space filter open_locale classical topology filter noncomputable theory
Munkres|exercise_16_4
A map $f: X \rightarrow Y$ is said to be an open map if for every open set $U$ of $X$, the set $f(U)$ is open in $Y$. Show that $\pi_{1}: X \times Y \rightarrow X$ and $\pi_{2}: X \times Y \rightarrow Y$ are open maps.
\begin{proof} Exercise 16.4. Let $U \times V$ be a (standard) basis element for $X \times Y$, so that $U$ is open in $X$ and $V$ is open in $Y$. Then $\pi_1(U \times V)=U$ is open in $X$ and $\pi_2(U \times V)=V$ is open in $Y$. Since arbitrary maps and unions satisfy $f\left(\bigcup_\alpha W_\alpha\right)=\bigcup...
theorem exercise_16_4 {X Y : Type*} [topological_space X] [topological_space Y] (π₁ : X Γ— Y β†’ X) (Ο€β‚‚ : X Γ— Y β†’ Y) (h₁ : π₁ = prod.fst) (hβ‚‚ : Ο€β‚‚ = prod.snd) : is_open_map π₁ ∧ is_open_map Ο€β‚‚ :=
import .common open set topological_space filter open_locale classical topology filter noncomputable theory
Munkres|exercise_17_4
Show that if $U$ is open in $X$ and $A$ is closed in $X$, then $U-A$ is open in $X$, and $A-U$ is closed in $X$.
\begin{proof} Since $$ X \backslash(U \backslash A)=(X \backslash U) \cup A \text { and } \quad X \backslash(A \backslash U)=(X \backslash A) \cup U, $$ it follows that $X \backslash(U \backslash A)$ is closed in $X$ and $X \backslash(A \backslash U)$ is open in $X$. \end{proof}
theorem exercise_17_4 {X : Type*} [topological_space X] (U A : set X) (hU : is_open U) (hA : is_closed A) : is_open (U \ A) ∧ is_closed (A \ U) :=
import .common open set topological_space filter open_locale classical topology filter noncomputable theory
Munkres|exercise_18_8b
Let $Y$ be an ordered set in the order topology. Let $f, g: X \rightarrow Y$ be continuous. Let $h: X \rightarrow Y$ be the function $h(x)=\min \{f(x), g(x)\}.$ Show that $h$ is continuous.
\begin{proof} Let $A=\{x \mid f(x) \leq g(x)\}$ and $B=\{x \mid g(x) \leq f(x)\}$. Then $A$ and $B$ are closed in $X$ by (a), $A \cap B=\{x \mid f(x)=g(x)\}$, and $X=A \cup B$. Since $f$ and $g$ are continuous, their restrictions $f^{\prime}: A \rightarrow Y$ and $g^{\prime}: B \rightarrow Y$ are continuous. It fo...
theorem exercise_18_8b {X Y : Type*} [topological_space X] [topological_space Y] [linear_order Y] [order_topology Y] {f g : X β†’ Y} (hf : continuous f) (hg : continuous g) : continuous (Ξ» x, min (f x) (g x)) :=
import .common open set topological_space filter open_locale classical topology filter noncomputable theory
Munkres|exercise_19_6a
Let $\mathbf{x}_1, \mathbf{x}_2, \ldots$ be a sequence of the points of the product space $\prod X_\alpha$. Show that this sequence converges to the point $\mathbf{x}$ if and only if the sequence $\pi_\alpha(\mathbf{x}_i)$ converges to $\pi_\alpha(\mathbf{x})$ for each $\alpha$.
\begin{proof} For each $n \in \mathbb{Z}_{+}$, we write $\mathbf{x}_n=\left(x_n^\alpha\right)_\alpha$, so that $\pi_\alpha\left(\mathbf{x}_n\right)=x_n^\alpha$ for each $\alpha$. First assume that the sequence $\mathbf{x}_1, \mathbf{x}_2, \ldots$ converges to $\mathbf{x}=\left(x_\alpha\right)_\alpha$ in the produ...
theorem exercise_19_6a {n : β„•} {f : fin n β†’ Type*} {x : β„• β†’ Ξ a, f a} (y : Ξ i, f i) [Ξ a, topological_space (f a)] : tendsto x at_top (𝓝 y) ↔ βˆ€ i, tendsto (Ξ» j, (x j) i) at_top (𝓝 (y i)) :=
import .common open set topological_space filter open_locale classical topology filter noncomputable theory
Munkres|exercise_21_6a
Define $f_{n}:[0,1] \rightarrow \mathbb{R}$ by the equation $f_{n}(x)=x^{n}$. Show that the sequence $\left(f_{n}(x)\right)$ converges for each $x \in[0,1]$.
\begin{proof} If $0 \leq x<1$ is fixed, then $f_n(x) \rightarrow 0$ as $n \rightarrow \infty$. As $f_n(1)=1$ for all $n, f_n(1) \rightarrow 1$. Thus $\left(f_n\right)_n$ converges to $f:[0,1] \rightarrow \mathbb{R}$ given by $f(x)=0$ if $x=0$ and $f(1)=1$. The sequence \end{proof}
theorem exercise_21_6a (f : β„• β†’ I β†’ ℝ ) (h : βˆ€ x n, f n x = x ^ n) : βˆ€ x, βˆƒ y, tendsto (Ξ» n, f n x) at_top (𝓝 y) :=
import .common open set topological_space filter open_locale classical topology filter noncomputable theory
Munkres|exercise_21_8
Let $X$ be a topological space and let $Y$ be a metric space. Let $f_{n}: X \rightarrow Y$ be a sequence of continuous functions. Let $x_{n}$ be a sequence of points of $X$ converging to $x$. Show that if the sequence $\left(f_{n}\right)$ converges uniformly to $f$, then $\left(f_{n}\left(x_{n}\right)\right)$ converges...
\begin{proof} Let $d$ be the metric on $Y$. Let $V$ be a neighbourhood of $f(x)$, and let $\varepsilon>0$ be such that $f(x) \in B_d(f(x), \varepsilon) \subset V$. Since $\left(f_n\right)_n$ converges uniformly to $f$, there exists $N_1 \in \mathbb{Z}_{+}$such that $d\left(f_n(x), f(x)\right)<\varepsilon / 2$ for ...
theorem exercise_21_8 {X : Type*} [topological_space X] {Y : Type*} [metric_space Y] {f : β„• β†’ X β†’ Y} {x : β„• β†’ X} (hf : βˆ€ n, continuous (f n)) (xβ‚€ : X) (hx : tendsto x at_top (𝓝 xβ‚€)) (fβ‚€ : X β†’ Y) (hh : tendsto_uniformly f fβ‚€ at_top) : tendsto (Ξ» n, f n (x n)) at_top (𝓝 (fβ‚€ xβ‚€)) :=
import .common open set topological_space filter open_locale classical topology filter noncomputable theory
Munkres|exercise_22_2b
If $A \subset X$, a retraction of $X$ onto $A$ is a continuous map $r: X \rightarrow A$ such that $r(a)=a$ for each $a \in A$. Show that a retraction is a quotient map.
\begin{proof} The inclusion map $i: A \rightarrow X$ is continuous and $r \circ i=1_A$ is the identity. Thus $r$ is a quotient map by (a). \end{proof}
theorem exercise_22_2b {X : Type*} [topological_space X] {A : set X} (r : X β†’ A) (hr : continuous r) (h : βˆ€ x : A, r x = x) : quotient_map r :=
import .common open set topological_space filter open_locale classical topology filter noncomputable theory
Munkres|exercise_23_2
Let $\left\{A_{n}\right\}$ be a sequence of connected subspaces of $X$, such that $A_{n} \cap A_{n+1} \neq \varnothing$ for all $n$. Show that $\bigcup A_{n}$ is connected.
\begin{proof} Suppose that $\bigcup_n A_n=B \cup C$, where $B$ and $C$ are disjoint open subsets of $\bigcup_n A_n$. Since $A_1$ is connected and a subset of $B \cup C$, by Lemma $23.2$ it lies entirely within either $B$ or $C$. Without any loss of generality, we may assume $A_1 \subset B$. Note that given $n$, if...
theorem exercise_23_2 {X : Type*} [topological_space X] {A : β„• β†’ set X} (hA : βˆ€ n, is_connected (A n)) (hAn : βˆ€ n, A n ∩ A (n + 1) β‰  βˆ…) : is_connected (⋃ n, A n) :=
import .common open set topological_space filter open_locale classical topology filter noncomputable theory
Munkres|exercise_23_4
Show that if $X$ is an infinite set, it is connected in the finite complement topology.
\begin{proof} Suppose that $A$ is a non-empty subset of $X$ that is both open and closed, i.e., $A$ and $X \backslash A$ are finite or all of $X$. Since $A$ is non-empty, $X \backslash A$ is finite. Thus $A$ cannot be finite as $X \backslash A$ is infinite, so $A$ is all of $X$. Therefore $X$ is connected. \end{p...
theorem exercise_23_4 {X : Type*} [topological_space X] [cofinite_topology X] (s : set X) : set.infinite s β†’ is_connected s :=
import .common open set topological_space filter open_locale classical topology filter noncomputable theory
Munkres|exercise_23_9
Let $A$ be a proper subset of $X$, and let $B$ be a proper subset of $Y$. If $X$ and $Y$ are connected, show that $(X \times Y)-(A \times B)$ is connected.
\begin{proof} This is similar to the proof of Theorem 23.6. Take $c \times d \in(X \backslash A) \times(Y \backslash B)$. For each $x \in X \backslash A$, the set $$ U_x=(X \times\{d\}) \cup(\{x\} \times Y) $$ is connected since $X \times\{d\}$ and $\{x\} \times Y$ are connected and have the common point $x \times...
theorem exercise_23_9 {X Y : Type*} [topological_space X] [topological_space Y] (A₁ Aβ‚‚ : set X) (B₁ Bβ‚‚ : set Y) (hA : A₁ βŠ‚ Aβ‚‚) (hB : B₁ βŠ‚ Bβ‚‚) (hA : is_connected Aβ‚‚) (hB : is_connected Bβ‚‚) : is_connected ({x | βˆƒ a b, x = (a, b) ∧ a ∈ Aβ‚‚ ∧ b ∈ Bβ‚‚} \ {x | βˆƒ a b, x = (a, b) ∧ a ∈ A₁ ∧ b ∈ B₁}) :=
import .common open set topological_space filter open_locale classical topology filter noncomputable theory
Munkres|exercise_24_2
Let $f: S^{1} \rightarrow \mathbb{R}$ be a continuous map. Show there exists a point $x$ of $S^{1}$ such that $f(x)=f(-x)$.
\begin{proof} Let $f: S^1 \rightarrow \mathbb{R}$ be continuous. Let $x \in S^1$. If $f(x)=f(-x)$ we are done, so assume $f(x) \neq f(-x)$. Define $g: S^1 \rightarrow \mathbb{R}$ by setting $g(x)=f(x)-f(-x)$. Then $g$ is continuous. Suppose $f(x)>f(-x)$, so that $g(x)>0$. Then $-x \in S^1$ and $g(-x)<0$. By the in...
theorem exercise_24_2 {f : (metric.sphere 0 1 : set ℝ) β†’ ℝ} (hf : continuous f) : βˆƒ x, f x = f (-x) :=
import .common open set topological_space filter open_locale classical topology filter noncomputable theory
Munkres|exercise_25_4
Let $X$ be locally path connected. Show that every connected open set in $X$ is path connected.
\begin{proof} Let $U$ be a open connected set in $X$. By Theorem 25.4, each path component of $U$ is open in $X$, hence open in $U$. Thus, each path component in $U$ is both open and closed in $U$, so must be empty or all of $U$. It follows that $U$ is path-connected. \end{proof}
theorem exercise_25_4 {X : Type*} [topological_space X] [loc_path_connected_space X] (U : set X) (hU : is_open U) (hcU : is_connected U) : is_path_connected U :=
import .common open set topological_space filter open_locale classical topology filter noncomputable theory
Munkres|exercise_26_11
Let $X$ be a compact Hausdorff space. Let $\mathcal{A}$ be a collection of closed connected subsets of $X$ that is simply ordered by proper inclusion. Then $Y=\bigcap_{A \in \mathcal{A}} A$ is connected.
\begin{proof} Since each $A \in \mathcal{A}$ is closed, $Y$ is closed. Suppose that $C$ and $D$ form a separation of $Y$. Then $C$ and $D$ are closed in $Y$, hence closed in $X$. Since $X$ is compact, $C$ and $D$ are compact by Theorem 26.2. Since $X$ is Hausdorff, by Exercise 26.5, there exist $U$ and $V$ open in $X...
theorem exercise_26_11 {X : Type*} [topological_space X] [compact_space X] [t2_space X] (A : set (set X)) (hA : βˆ€ (a b : set X), a ∈ A β†’ b ∈ A β†’ a βŠ† b ∨ b βŠ† a) (hA' : βˆ€ a ∈ A, is_closed a) (hA'' : βˆ€ a ∈ A, is_connected a) : is_connected (β‹‚β‚€ A) :=
import .common open set topological_space filter open_locale classical topology filter noncomputable theory
Munkres|exercise_27_4
Show that a connected metric space having more than one point is uncountable.
\begin{proof} The distance function $d: X \times X \rightarrow \mathbb{R}$ is continuous by Exercise 20.3(a), so given $x \in X$, the function $d_x: X \rightarrow \mathbb{R}$ given by $d_x(y)=d(x, y)$ is continuous by Exercise 19.11. Since $X$ is connected, the image $d_x(X)$ is a connected subspace of $\mathbb{R}...
theorem exercise_27_4 {X : Type*} [metric_space X] [connected_space X] (hX : βˆƒ x y : X, x β‰  y) : Β¬ countable (univ : set X) :=
import .common open set topological_space filter open_locale classical topology filter noncomputable theory
Munkres|exercise_28_5
Show that X is countably compact if and only if every nested sequence $C_1 \supset C_2 \supset \cdots$ of closed nonempty sets of X has a nonempty intersection.
\begin{proof} We could imitate the proof of Theorem 26.9, but we prove directly each direction. First let $X$ be countable compact and let $C_1 \supset C_2 \supset \cdots$ be a nested sequence of closed nonempty sets of $X$. For each $n \in \mathbb{Z}_{+}, U_n=X \backslash C_n$ is open in $X$. Then $\left\{U_n\right\}...
theorem exercise_28_5 (X : Type*) [topological_space X] : countably_compact X ↔ βˆ€ (C : β„• β†’ set X), (βˆ€ n, is_closed (C n)) ∧ (βˆ€ n, C n β‰  βˆ…) ∧ (βˆ€ n, C n βŠ† C (n + 1)) β†’ βˆƒ x, βˆ€ n, x ∈ C n :=
import .common open set topological_space filter open_locale classical topology filter noncomputable theory
Munkres|exercise_29_1
Show that the rationals $\mathbb{Q}$ are not locally compact.
\begin{proof} First, we prove that each set $\mathbb{Q} \cap[a, b]$, where $a, b$ are irrational numbers, is not compact. Indeed, since $\mathbb{Q} \cap[a, b]$ is countable, we can write $\mathbb{Q} \cap[a, b]=\left\{q_1, q_2, \ldots\right\}$. Then $\left\{U_i\right\}_{i \in \mathbb{Z}_{+}}$, where $U_i=\mathbb{Q}...
theorem exercise_29_1 : Β¬ locally_compact_space β„š :=
import .common open set topological_space filter open_locale classical topology filter noncomputable theory
Munkres|exercise_29_10
Show that if $X$ is a Hausdorff space that is locally compact at the point $x$, then for each neighborhood $U$ of $x$, there is a neighborhood $V$ of $x$ such that $\bar{V}$ is compact and $\bar{V} \subset U$.
\begin{proof} Let $U$ be a neighbourhood of $x$. Since $X$ is locally compact at $x$, there exists a compact subspace $C$ of $X$ containing a neighbourhood $W$ of $x$. Then $U \cap W$ is open in $X$, hence in $C$. Thus, $C \backslash(U \cap W)$ is closed in $C$, hence compact. Since $X$ is Hausdorff, there exist d...
theorem exercise_29_10 {X : Type*} [topological_space X] [t2_space X] (x : X) (hx : βˆƒ U : set X, x ∈ U ∧ is_open U ∧ (βˆƒ K : set X, U βŠ‚ K ∧ is_compact K)) (U : set X) (hU : is_open U) (hxU : x ∈ U) : βˆƒ (V : set X), is_open V ∧ x ∈ V ∧ is_compact (closure V) ∧ closure V βŠ† U :=
import .common open set topological_space filter open_locale classical topology filter noncomputable theory
Munkres|exercise_30_13
Show that if $X$ has a countable dense subset, every collection of disjoint open sets in $X$ is countable.
\begin{proof} Let $\mathcal{U}$ be a collection of disjoint open sets in $X$ and let $A$ be a countable dense subset of $X$. Since $A$ is dense in $X$, every $U \in \mathcal{U}$ intesects $S$. Therefore, there exists a point $x_U \in U \cap S$. Let $U_1, U_2 \in \mathcal{U}, U_1 \neq U_2$. Then $x_{U_1} \neq x_{...
theorem exercise_30_13 {X : Type*} [topological_space X] (h : βˆƒ (s : set X), countable s ∧ dense s) (U : set (set X)) (hU : βˆ€ (x y : set X), x ∈ U β†’ y ∈ U β†’ x β‰  y β†’ x ∩ y = βˆ…) : countable U :=
import .common open set topological_space filter open_locale classical topology filter noncomputable theory
Munkres|exercise_31_2
Show that if $X$ is normal, every pair of disjoint closed sets have neighborhoods whose closures are disjoint.
\begin{proof} Let $A$ and $B$ be disjoint closed sets. Then there exist disjoint open sets $U$ and $V$ containing $A$ and $B$ respectively. Since $X \backslash V$ is closed and contains $U$, the closure of $U$ is contained in $X \backslash V$ hence $B$ and closure of $U$ are disjoint. Repeat steps 1 and 2 fo...
theorem exercise_31_2 {X : Type*} [topological_space X] [normal_space X] {A B : set X} (hA : is_closed A) (hB : is_closed B) (hAB : disjoint A B) : βˆƒ (U V : set X), is_open U ∧ is_open V ∧ A βŠ† U ∧ B βŠ† V ∧ closure U ∩ closure V = βˆ… :=
import .common open set topological_space filter open_locale classical topology filter noncomputable theory
Munkres|exercise_32_1
Show that a closed subspace of a normal space is normal.
\begin{proof} Let $X$ be a normal space and $Y$ a closed subspace of $X$. First we shows that $Y$ is a $T_1$-space. Let $y \in Y$ be any point. Since $X$ is normal, $X$ is also a $T_1$ space and therefore $\{y\}$ is closed in $X$. Then it follows that $\{y\}=\{y\} \cap Y$ is closed in $Y$ (in relative topology)...
theorem exercise_32_1 {X : Type*} [topological_space X] (hX : normal_space X) (A : set X) (hA : is_closed A) : normal_space {x // x ∈ A} :=
import .common open set topological_space filter open_locale classical topology filter noncomputable theory
Munkres|exercise_32_2b
Show that if $\prod X_\alpha$ is regular, then so is $X_\alpha$. Assume that each $X_\alpha$ is nonempty.
\begin{proof} Suppose that $X=\prod_\beta X_\beta$ is regular and let $\alpha$ be any index. We have to prove that $X_\alpha$ satisfies the $T_1$ and the $T_3$ axiom. Since $X$ is regular, it follows that $X$ is Hausdorff, which then implies that $X_\alpha$ is Hausdorff. However, this implies that $X_\alpha$ sat...
theorem exercise_32_2b {ΞΉ : Type*} {X : ΞΉ β†’ Type*} [βˆ€ i, topological_space (X i)] (h : βˆ€ i, nonempty (X i)) (h2 : regular_space (Ξ  i, X i)) : βˆ€ i, regular_space (X i) :=
import .common open set topological_space filter open_locale classical topology filter noncomputable theory
Munkres|exercise_32_3
Show that every locally compact Hausdorff space is regular.
\begin{proof} Let $X$ be a LCH space. Then it follows that for every $x \in X$ and for every open neighborhood $U \subseteq X$ of $x$ there exists an open neighborhood $V \subseteq X$ of $x$ such that $\bar{V} \subseteq U$ (and $\bar{V}$ is compact, but this is not important here). Since $X$ is a Hausdorff space...
theorem exercise_32_3 {X : Type*} [topological_space X] (hX : locally_compact_space X) (hX' : t2_space X) : regular_space X :=
import .common open set topological_space filter open_locale classical topology filter noncomputable theory
Munkres|exercise_33_8
Let $X$ be completely regular, let $A$ and $B$ be disjoint closed subsets of $X$. Show that if $A$ is compact, there is a continuous function $f \colon X \rightarrow [0, 1]$ such that $f(A) = \{0\}$ and $f(B) = \{1\}$.
\begin{proof} Since $X$ is completely regular $\forall a \in A, \exists f_a: X \rightarrow[0,1]: f_a(a)=0$ and $f_a(B)=\{1\}$. For some $\epsilon_a \in(0,1)$ we have that $U_a:=f_a^{-1}([0, \epsilon))$ is an open neighborhood of $a$ that does not intersect $B$. We therefore have an open covering $\left\{U_a \mid a...
theorem exercise_33_8 (X : Type*) [topological_space X] [regular_space X] (h : βˆ€ x A, is_closed A ∧ Β¬ x ∈ A β†’ βˆƒ (f : X β†’ I), continuous f ∧ f x = (1 : I) ∧ f '' A = {0}) (A B : set X) (hA : is_closed A) (hB : is_closed B) (hAB : disjoint A B) (hAc : is_compact A) : βˆƒ (f : X β†’ I), continuous f ∧ f '' A = {...
import .common open set topological_space filter open_locale classical topology filter noncomputable theory
Munkres|exercise_38_6
Let $X$ be completely regular. Show that $X$ is connected if and only if the Stone-Čech compactification of $X$ is connected.
\begin{proof} The closure of a connected set is connected, so if $X$ is connected so is $\beta(X)$ Suppose $X$ is the union of disjoint open subsets $U, V \subset X$. Define the continuous map $$ \begin{aligned} & f: X \rightarrow\{0,1\} \\ & x \mapsto \begin{cases}0, & x \in U \\ 1, & x \in V\end{cases} \e...
theorem exercise_38_6 {X : Type*} (X : Type*) [topological_space X] [regular_space X] (h : βˆ€ x A, is_closed A ∧ Β¬ x ∈ A β†’ βˆƒ (f : X β†’ I), continuous f ∧ f x = (1 : I) ∧ f '' A = {0}) : is_connected (univ : set X) ↔ is_connected (univ : set (stone_cech X)) :=
import .common open set topological_space filter open_locale classical topology filter noncomputable theory
Axler|exercise_1_3
Prove that $-(-v) = v$ for every $v \in V$.
\begin{proof} By definition, we have $$ (-v)+(-(-v))=0 \quad \text { and } \quad v+(-v)=0 . $$ This implies both $v$ and $-(-v)$ are additive inverses of $-v$, by the uniqueness of additive inverse, it follows that $-(-v)=v$. \end{proof}
theorem exercise_1_3 {F V : Type*} [add_comm_group V] [field F] [module F V] {v : V} : -(-v) = v :=
import .common open set fintype complex polynomial submodule linear_map finite_dimensional open module module.End inner_product_space open_locale big_operators
Axler|exercise_1_6
Give an example of a nonempty subset $U$ of $\mathbf{R}^2$ such that $U$ is closed under addition and under taking additive inverses (meaning $-u \in U$ whenever $u \in U$), but $U$ is not a subspace of $\mathbf{R}^2$.
\begin{proof} \[U=\mathbb{Z}^2=\left\{(x, y) \in \mathbf{R}^2: x, y \text { are integers }\right\}\] $U=\mathbb{Z}^2$ satisfies the desired properties. To come up with this, note by assumption, $U$ must be closed under addition and subtraction, so in particular, it must contain 0 . We need to find a set which fai...
theorem exercise_1_6 : βˆƒ U : set (ℝ Γ— ℝ), (U β‰  βˆ…) ∧ (βˆ€ (u v : ℝ Γ— ℝ), u ∈ U ∧ v ∈ U β†’ u + v ∈ U) ∧ (βˆ€ (u : ℝ Γ— ℝ), u ∈ U β†’ -u ∈ U) ∧ (βˆ€ U' : submodule ℝ (ℝ Γ— ℝ), U β‰  ↑U') :=
import .common open set fintype complex polynomial submodule linear_map finite_dimensional open module module.End inner_product_space open_locale big_operators
Axler|exercise_1_8
Prove that the intersection of any collection of subspaces of $V$ is a subspace of $V$.
\begin{proof} Let $V_1, V_2, \ldots, V_n$ be subspaces of the vector space $V$ over the field $F$. We must show that their intersection $V_1 \cap V_2 \cap \ldots \cap V_n$ is also a subspace of $V$. To begin, we observe that the additive identity $0$ of $V$ is in $V_1 \cap V_2 \cap \ldots \cap V_n$. This is because...
theorem exercise_1_8 {F V : Type*} [add_comm_group V] [field F] [module F V] {ΞΉ : Type*} (u : ΞΉ β†’ submodule F V) : βˆƒ U : submodule F V, (β‹‚ (i : ΞΉ), (u i).carrier) = ↑U :=
import .common open set fintype complex polynomial submodule linear_map finite_dimensional open module module.End inner_product_space open_locale big_operators
Axler|exercise_3_1
Show that every linear map from a one-dimensional vector space to itself is multiplication by some scalar. More precisely, prove that if $\operatorname{dim} V=1$ and $T \in \mathcal{L}(V, V)$, then there exists $a \in \mathbf{F}$ such that $T v=a v$ for all $v \in V$.
\begin{proof} If $\operatorname{dim} V=1$, then in fact, $V=\mathbf{F}$ and it is spanned by $1 \in \mathbf{F}$. Let $T$ be a linear map from $V$ to itself. Let $T(1)=\lambda \in V(=\mathbf{F})$. Step 2 2 of 3 Every $v \in V$ is a scalar. Therefore, $$ \begin{aligned} T(v) & =T(v \cdot 1) \\ & =v T(1) \ldo...
theorem exercise_3_1 {F V : Type*} [add_comm_group V] [field F] [module F V] [finite_dimensional F V] (T : V β†’β‚—[F] V) (hT : finrank F V = 1) : βˆƒ c : F, βˆ€ v : V, T v = c β€’ v:=
import .common open set fintype complex polynomial submodule linear_map finite_dimensional open module module.End inner_product_space open_locale big_operators
Axler|exercise_4_4
Suppose $p \in \mathcal{P}(\mathbf{C})$ has degree $m$. Prove that $p$ has $m$ distinct roots if and only if $p$ and its derivative $p^{\prime}$ have no roots in common.
\begin{proof} First, let $p$ have $m$ distinct roots. Since $p$ has the degree of $m$, then this could imply that $p$ can be actually written in the form of $p(z)=c\left(z-\lambda_1\right) \ldots\left(z-\lambda_m\right)$, which you have $\lambda_1, \ldots, \lambda_m$ being distinct. To prove that both $p$ and $p^...
theorem exercise_4_4 (p : polynomial β„‚) : p.degree = @card (root_set p β„‚) (polynomial.root_set_fintype p β„‚) ↔ disjoint (@card (root_set p.derivative β„‚) (polynomial.root_set_fintype p.derivative β„‚)) (@card (root_set p β„‚) (polynomial.root_set_fintype p β„‚)) :=
import .common open set fintype complex polynomial submodule linear_map finite_dimensional open module module.End inner_product_space open_locale big_operators
Axler|exercise_5_4
Suppose that $S, T \in \mathcal{L}(V)$ are such that $S T=T S$. Prove that $\operatorname{null} (T-\lambda I)$ is invariant under $S$ for every $\lambda \in \mathbf{F}$.
\begin{proof} First off, fix $\lambda \in F$. Secondly, let $v \in \operatorname{null}(T-\lambda I)$. If so, then $(T-\lambda I)(S v)=T S v-\lambda S v=$ $S T v-\lambda S v=S(T v-\lambda v)=0$. Therefore, $S v \in \operatorname{null}(T-\lambda I)$ since $n u l l(T-\lambda I)$ is actually invariant under $S$. \end...
theorem exercise_5_4 {F V : Type*} [add_comm_group V] [field F] [module F V] (S T : V β†’β‚—[F] V) (hST : S ∘ T = T ∘ S) (c : F): map S (T - c β€’ id).ker = (T - c β€’ id).ker :=
import .common open set fintype complex polynomial submodule linear_map finite_dimensional open module module.End inner_product_space open_locale big_operators
Axler|exercise_5_12
Suppose $T \in \mathcal{L}(V)$ is such that every vector in $V$ is an eigenvector of $T$. Prove that $T$ is a scalar multiple of the identity operator.
\begin{proof} For every single $v \in V$, there does exist $a_v \in F$ such that $T v=a_v v$. Since $T 0=0$, then we have to make $a_0$ be the any number in F. However, for every single $v \in V\{0\}$, then the value of $a_V$ is uniquely determined by the previous equation of $T v=a_v v$. Now, to show that $T$ ...
theorem exercise_5_12 {F V : Type*} [add_comm_group V] [field F] [module F V] {S : End F V} (hS : βˆ€ v : V, βˆƒ c : F, v ∈ eigenspace S c) : βˆƒ c : F, S = c β€’ id :=
import .common open set fintype complex polynomial submodule linear_map finite_dimensional open module module.End inner_product_space open_locale big_operators
Axler|exercise_5_20
Suppose that $T \in \mathcal{L}(V)$ has $\operatorname{dim} V$ distinct eigenvalues and that $S \in \mathcal{L}(V)$ has the same eigenvectors as $T$ (not necessarily with the same eigenvalues). Prove that $S T=T S$.
\begin{proof} First off, let $n=\operatorname{dim} V$. so, there is a basis of $\left(v_1, \ldots, v_j\right)$ of $V$ that consist of eigenvectors of $T$. Now, let $\lambda_1, \ldots, \lambda_n$ be the corresponding eigenvalues, then we would have $T v_j=\lambda_1 v_j$ for every single $j$. Now, for every $v_j$...
theorem exercise_5_20 {F V : Type*} [add_comm_group V] [field F] [module F V] [finite_dimensional F V] {S T : End F V} (h1 : @card T.eigenvalues (eigenvalues.fintype T) = finrank F V) (h2 : βˆ€ v : V, βˆƒ c : F, v ∈ eigenspace S c ↔ βˆƒ c : F, v ∈ eigenspace T c) : S * T = T * S :=
import .common open set fintype complex polynomial submodule linear_map finite_dimensional open module module.End inner_product_space open_locale big_operators
Axler|exercise_6_2
Suppose $u, v \in V$. Prove that $\langle u, v\rangle=0$ if and only if $\|u\| \leq\|u+a v\|$ for all $a \in \mathbf{F}$.
\begin{proof} First off, let us suppose that $(u, v)=0$. Now, let $a \in \mathbb{F}$. Next, $u, a v$ are orthogonal. The Pythagorean theorem thus implies that $$ \begin{aligned} \|u+a v\|^2 & =\|u\|^2+\|a v\|^2 \\ & \geq\|u\|^2 \end{aligned} $$ So, by taking the square roots, this will now give us $\|u\| ...
theorem exercise_6_2 {V : Type*} [add_comm_group V] [module β„‚ V] [inner_product_space β„‚ V] (u v : V) : βŸͺu, v⟫_β„‚ = 0 ↔ βˆ€ (a : β„‚), β€–uβ€– ≀ β€–u + a β€’ vβ€– :=
import .common open set fintype complex polynomial submodule linear_map finite_dimensional open module module.End inner_product_space open_locale big_operators
Axler|exercise_6_7
Prove that if $V$ is a complex inner-product space, then $\langle u, v\rangle=\frac{\|u+v\|^{2}-\|u-v\|^{2}+\|u+i v\|^{2} i-\|u-i v\|^{2} i}{4}$ for all $u, v \in V$.
\begin{proof} Let $V$ be an inner-product space and $u, v\in V$. Then $$ \begin{aligned} \|u+v\|^2 & =\langle u+v, v+v\rangle \\ & =\|u\|^2+\langle u, v\rangle+\langle v, u\rangle+\|v\|^2 \\ -\|u-v\|^2 & =-\langle u-v, u-v\rangle \\ & =-\|u\|^2+\langle u, v\rangle+\langle v, u\rangle-\|v\|^2 \\ i\|u+i v\|^2 & ...
theorem exercise_6_7 {V : Type*} [inner_product_space β„‚ V] (u v : V) : βŸͺu, v⟫_β„‚ = (β€–u + vβ€–^2 - β€–u - vβ€–^2 + I*β€–u + Iβ€’vβ€–^2 - I*β€–u-Iβ€’vβ€–^2) / 4 :=
import .common open set fintype complex polynomial submodule linear_map finite_dimensional open module module.End inner_product_space open_locale big_operators
Axler|exercise_6_16
Suppose $U$ is a subspace of $V$. Prove that $U^{\perp}=\{0\}$ if and only if $U=V$
\begin{proof} $V=U \bigoplus U^{\perp}$, therefore $U^\perp = \{0\}$ iff $U=V$. \end{proof}
theorem exercise_6_16 {K V : Type*} [is_R_or_C K] [inner_product_space K V] {U : submodule K V} : U.orthogonal = βŠ₯ ↔ U = ⊀ :=
import .common open set fintype complex polynomial submodule linear_map finite_dimensional open module module.End inner_product_space open_locale big_operators
Axler|exercise_7_6
Prove that if $T \in \mathcal{L}(V)$ is normal, then $\operatorname{range} T=\operatorname{range} T^{*}.$
\begin{proof} Let $T \in \mathcal{L}(V)$ to be a normal operator. Suppose $u \in \operatorname{null} T$. Then, by $7.20$, $$ 0=\|T u\|=\left\|T^* u\right\|, $$ which implies that $u \in \operatorname{null} T^*$. Hence $$ \operatorname{null} T=\operatorname{null} T^* $$ because $\left(T^*\right)^*=T$ and ...
theorem exercise_7_6 {V : Type*} [inner_product_space β„‚ V] [finite_dimensional β„‚ V] (T : End β„‚ V) (hT : T * T.adjoint = T.adjoint * T) : T.range = T.adjoint.range :=
import .common open set fintype complex polynomial submodule linear_map finite_dimensional open module module.End inner_product_space open_locale big_operators
Axler|exercise_7_10
Suppose $V$ is a complex inner-product space and $T \in \mathcal{L}(V)$ is a normal operator such that $T^{9}=T^{8}$. Prove that $T$ is self-adjoint and $T^{2}=T$.
\begin{proof} Based on the complex spectral theorem, there is an orthonormal basis of $\left(e_1, \ldots, e_n\right)$ of $V$ consisting of eigenvectors of $T$. Now, let $\lambda_1, \ldots, \lambda_n$ be the corresponding eigenvalues. Therefore, $$ T e_1=\lambda_j e_j $$ for $j=1 \ldots n$. Next, by applying...
theorem exercise_7_10 {V : Type*} [inner_product_space β„‚ V] [finite_dimensional β„‚ V] (T : End β„‚ V) (hT : T * T.adjoint = T.adjoint * T) (hT1 : T^9 = T^8) : is_self_adjoint T ∧ T^2 = T :=
import .common open set fintype complex polynomial submodule linear_map finite_dimensional open module module.End inner_product_space open_locale big_operators
Axler|exercise_7_14
Suppose $T \in \mathcal{L}(V)$ is self-adjoint, $\lambda \in \mathbf{F}$, and $\epsilon>0$. Prove that if there exists $v \in V$ such that $\|v\|=1$ and $\|T v-\lambda v\|<\epsilon,$ then $T$ has an eigenvalue $\lambda^{\prime}$ such that $\left|\lambda-\lambda^{\prime}\right|<\epsilon$.
\begin{proof} Let $T \in \mathcal{L}(V)$ be a self-adjoint, and let $\lambda \in \mathbf{F}$ and $\epsilon>0$. By the Spectral Theorem, there is $e_1, \ldots, e_n$ an orthonormal basis of $V$ consisting of eigenvectors of $T$ and let $\lambda_1, \ldots, \lambda_n$ denote their corresponding eigenvalues. Choose a...
theorem exercise_7_14 {π•œ V : Type*} [is_R_or_C π•œ] [inner_product_space π•œ V] [finite_dimensional π•œ V] {T : End π•œ V} (hT : is_self_adjoint T) {l : π•œ} {Ξ΅ : ℝ} (he : Ξ΅ > 0) : βˆƒ v : V, β€–vβ€–= 1 ∧ (β€–T v - l β€’ vβ€– < Ξ΅ β†’ (βˆƒ l' : T.eigenvalues, β€–l - l'β€– < Ξ΅)) :=
import .common open set fintype complex polynomial submodule linear_map finite_dimensional open module module.End inner_product_space open_locale big_operators
Ireland-Rosen|exercise_1_27
For all odd $n$ show that $8 \mid n^{2}-1$.
\begin{proof} We have $n^2-1=(n+1)(n-1)$. Since $n$ is odd, both $n+1, n-1$ are even, and moreso, one of these must be divisible by 4 , as one of the two consecutive odd numbers is divisible by 4 . Thus, their product is divisible by 8 . Similarly, if 3 does not divide $n$, it must divide one of $n-1, n+1$, otherw...
theorem exercise_1_27 {n : β„•} (hn : odd n) : 8 ∣ (n^2 - 1) :=
import .common open set function nat int fintype real polynomial mv_polynomial open zsqrtd gaussian_int char_p nat.arithmetic_function open_locale big_operators noncomputable theory
Ireland-Rosen|exercise_1_31
Show that 2 is divisible by $(1+i)^{2}$ in $\mathbb{Z}[i]$.
\begin{proof} We have $(1+i)^2=1+2 i-1=2 i$, so $2=-i(1+i)^2$. \end{proof}
theorem exercise_1_31 : (⟨1, 1⟩ : gaussian_int) ^ 2 ∣ 2 :=
import .common open set function nat int fintype real polynomial mv_polynomial open zsqrtd gaussian_int char_p nat.arithmetic_function open_locale big_operators noncomputable theory
Ireland-Rosen|exercise_2_21
Define $\wedge(n)=\log p$ if $n$ is a power of $p$ and zero otherwise. Prove that $\sum_{A \mid n} \mu(n / d) \log d$ $=\wedge(n)$.
\begin{proof} $$ \left\{ \begin{array}{cccl} \land(n)& = & \log p & \mathrm{if}\ n =p^\alpha,\ \alpha \in \mathbb{N}^* \\ & = & 0 & \mathrm{otherwise }. \end{array} \right. $$ Let $n = p_1^{\alpha_1}\cdots p_t^{\alpha_t}$ the decomposition of $n$ in prime factors. As $\land(d) = 0$ for all divi...
theorem exercise_2_21 {l : β„• β†’ ℝ} (hl : βˆ€ p n : β„•, p.prime β†’ l (p^n) = log p ) (hl1 : βˆ€ m : β„•, Β¬ is_prime_pow m β†’ l m = 0) : l = Ξ» n, βˆ‘ d : divisors n, moebius (n/d) * log d :=
import .common open set function nat int fintype real polynomial mv_polynomial open zsqrtd gaussian_int char_p nat.arithmetic_function open_locale big_operators noncomputable theory
Ireland-Rosen|exercise_3_1
Show that there are infinitely many primes congruent to $-1$ modulo 6 .
\begin{proof} Let $n$ any integer such that $n\geq 3$, and $N = n! -1 = 2 \times 3 \times\cdots\times n - 1 >1$. Then $N \equiv -1 \pmod 6$. As $6k +2, 6k +3, 6k +4$ are composite for all integers $k$, every prime factor of $N$ is congruent to $1$ or $-1$ modulo $6$. If every prime factor of $N$ was congrue...
theorem exercise_3_1 : infinite {p : primes // p ≑ -1 [ZMOD 6]} :=
import .common open set function nat int fintype real polynomial mv_polynomial open zsqrtd gaussian_int char_p nat.arithmetic_function open_locale big_operators noncomputable theory
Ireland-Rosen|exercise_3_5
Show that the equation $7 x^{3}+2=y^{3}$ has no solution in integers.
\begin{proof} If $7x^2 + 2 = y^3,\ x,y \in \mathbb{Z}$, then $y^3 \equiv 2 \pmod 7$ (so $y \not \equiv 0 \pmod 7$) From Fermat's Little Theorem, $y^6 \equiv 1 \pmod 7$, so $2^2 \equiv y^6 \equiv 1 \pmod 7$, which implies $7 \mid 2^2-1 = 3$ : this is a contradiction. Thus the equation $7x^2 + 2 = y^3$ has no sol...
theorem exercise_3_5 : Β¬ βˆƒ x y : β„€, 7*x^3 + 2 = y^3 :=
import .common open set function nat int fintype real polynomial mv_polynomial open zsqrtd gaussian_int char_p nat.arithmetic_function open_locale big_operators noncomputable theory
Ireland-Rosen|exercise_3_14
Let $p$ and $q$ be distinct odd primes such that $p-1$ divides $q-1$. If $(n, p q)=1$, show that $n^{q-1} \equiv 1(p q)$.
\begin{proof} As $n \wedge pq = 1, n\wedge p=1, n \wedge q = 1$, so from Fermat's Little Theorem $$n^{q-1} \equiv 1 \pmod q,\qquad n^{p-1} \equiv 1 \pmod p.$$ $p-1 \mid q-1$, so there exists $k \in \mathbb{Z}$ such that $q-1 = k(p-1)$. Thus $$n^{q-1} = (n^{p-1})^k \equiv 1 \pmod p.$$ $p \mid n^{q-1} - 1, q \m...
theorem exercise_3_14 {p q n : β„•} (hp0 : p.prime ∧ p > 2) (hq0 : q.prime ∧ q > 2) (hpq0 : p β‰  q) (hpq1 : p - 1 ∣ q - 1) (hn : n.gcd (p*q) = 1) : n^(q-1) ≑ 1 [MOD p*q] :=
import .common open set function nat int fintype real polynomial mv_polynomial open zsqrtd gaussian_int char_p nat.arithmetic_function open_locale big_operators noncomputable theory
Ireland-Rosen|exercise_4_5
Consider a prime $p$ of the form $4 t+3$. Show that $a$ is a primitive root modulo $p$ iff $-a$ has order $(p-1) / 2$.
\begin{proof} Let $a$ a primitive root modulo $p$. As $a^{p-1} \equiv 1(\bmod p), p \mid\left(a^{(p-1) / 2}-1\right)\left(a^{(p-1) / 2}+1\right)$, so $p \mid a^{(p-1) / 2}-1$ or $p \mid$ $a^{(p-1) / 2}+1$. As $a$ is a primitive root modulo $p, a^{(p-1) / 2} \not \equiv 1(\bmod p)$, so $$ a^{(p-1) / 2} \equiv-1 ...
theorem exercise_4_5 {p t : β„•} (hp0 : p.prime) (hp1 : p = 4*t + 3) (a : zmod p) : is_primitive_root a p ↔ ((-a) ^ ((p-1)/2) = 1 ∧ βˆ€ (k : β„•), k < (p-1)/2 β†’ (-a)^k β‰  1) :=
import .common open set function nat int fintype real polynomial mv_polynomial open zsqrtd gaussian_int char_p nat.arithmetic_function open_locale big_operators noncomputable theory
Ireland-Rosen|exercise_4_8
Let $p$ be an odd prime. Show that $a$ is a primitive root modulo $p$ iff $a^{(p-1) / q} \not \equiv 1(p)$ for all prime divisors $q$ of $p-1$.
\begin{proof} $\bullet$ If $a$ is a primitive root, then $a^k \not \equiv 1$ for all $k, 1\leq k < p-1$, so $a^{(p-1)/q} \not \equiv 1 \pmod p$ for all prime divisors $q$ of $p - 1$. $\bullet$ In the other direction, suppose $a^{(p-1)/q} \not \equiv 1 \pmod p$ for all prime divisors $q$ of $p - 1$. Let $\del...
theorem exercise_4_8 {p a : β„•} (hp : odd p) : is_primitive_root a p ↔ (βˆ€ q ∣ (p-1), q.prime β†’ Β¬ a^(p-1) ≑ 1 [MOD p]) :=
import .common open set function nat int fintype real polynomial mv_polynomial open zsqrtd gaussian_int char_p nat.arithmetic_function open_locale big_operators noncomputable theory
Ireland-Rosen|exercise_5_13
Show that any prime divisor of $x^{4}-x^{2}+1$ is congruent to 1 modulo 12 .
\begin{proof} \newcommand{\legendre}[2]{\genfrac{(}{)}{}{}{#1}{#2}} $\bullet$ As $a^6 +1 = (a^2+1)(a^4-a^2+1)$, $p\mid a^4 - a^2+1$ implies $p \mid a^6 + 1$, so $\legendre{-1}{p} = 1$ and $p\equiv 1 \pmod 4$. $\bullet$ $p \mid 4a^4 - 4 a^2 +4 = (2a-1)^2 + 3$, so $\legendre{-3}{p} = 1$. As $-3 \equiv 1 \pmod...
theorem exercise_5_13 {p x: β„€} (hp : prime p) (hpx : p ∣ (x^4 - x^2 + 1)) : p ≑ 1 [ZMOD 12] :=
import .common open set function nat int fintype real polynomial mv_polynomial open zsqrtd gaussian_int char_p nat.arithmetic_function open_locale big_operators noncomputable theory
Ireland-Rosen|exercise_5_37
Show that if $a$ is negative then $p \equiv q(4 a) together with p\not | a$ imply $(a / p)=(a / q)$.
\begin{proof} \newcommand{\legendre}[2]{\genfrac{(}{)}{}{}{#1}{#2}} Write $a = -A, A>0$. As $p \equiv q \pmod {4a}$, we know from Prop. 5.3.3. (b) that $(A/p) = (A/q)$. Moreover, \begin{align*} \legendre{a}{p}&= \legendre{-A}{p} = (-1)^{(p-1)/2} \legendre{A}{p}\\ \legendre{a}{q}&= \legendre{-A}{q} = (-1^{(q...
theorem exercise_5_37 {p q : β„•} [fact(p.prime)] [fact(q.prime)] {a : β„€} (ha : a < 0) (h0 : p ≑ q [ZMOD 4*a]) (h1 : Β¬ ((p : β„€) ∣ a)) : legendre_sym p a = legendre_sym q a :=
import .common open set function nat int fintype real polynomial mv_polynomial open zsqrtd gaussian_int char_p nat.arithmetic_function open_locale big_operators noncomputable theory
Ireland-Rosen|exercise_18_4
Show that 1729 is the smallest positive integer expressible as the sum of two different integral cubes in two ways.
\begin{proof} Let $n=a^3+b^3$, and suppose that $\operatorname{gcd}(a, b)=1$. If a prime $p \mid a^3+b^3$, then $$ \left(a b^{-1}\right)^3 \equiv_p-1 $$ Thus $3 \mid \frac{p-1}{2}$, that is, $p \equiv_6 1$. If we have $n=a^3+b^3=c^3+d^3$, then we can factor $n$ as $$ \begin{aligned} & n=(a+b)\left(a^2-a b+...
theorem exercise_18_4 {n : β„•} (hn : βˆƒ x y z w : β„€, x^3 + y^3 = n ∧ z^3 + w^3 = n ∧ x β‰  z ∧ x β‰  w ∧ y β‰  z ∧ y β‰  w) : n β‰₯ 1729 :=
import .common open set function nat int fintype real polynomial mv_polynomial open zsqrtd gaussian_int char_p nat.arithmetic_function open_locale big_operators noncomputable theory
Shakarchi|exercise_1_13a
Suppose that $f$ is holomorphic in an open set $\Omega$. Prove that if $\text{Re}(f)$ is constant, then $f$ is constant.
\begin{proof} Let $f(z)=f(x, y)=u(x, y)+i v(x, y)$, where $z=x+i y$. Since $\operatorname{Re}(f)=$ constant, $$ \frac{\partial u}{\partial x}=0, \frac{\partial u}{\partial y}=0 . $$ By the Cauchy-Riemann equations, $$ \frac{\partial v}{\partial x}=-\frac{\partial u}{\partial y}=0 . $$ Thus, in $\Omega$, $$ ...
theorem exercise_1_13a {f : β„‚ β†’ β„‚} (Ξ© : set β„‚) (a b : Ξ©) (h : is_open Ξ©) (hf : differentiable_on β„‚ f Ξ©) (hc : βˆƒ (c : ℝ), βˆ€ z ∈ Ξ©, (f z).re = c) : f a = f b :=
import .common open complex filter function interval_integral metric open_locale big_operators open_locale filter open_locale topology
Shakarchi|exercise_1_13c
Suppose that $f$ is holomorphic in an open set $\Omega$. Prove that if $|f|$ is constant, then $f$ is constant.
\begin{proof} Let $f(z)=f(x, y)=u(x, y)+i v(x, y)$, where $z=x+i y$. We first give a mostly correct argument; the reader should pay attention to find the difficulty. Since $|f|=\sqrt{u^2+v^2}$ is constant, $$ \left\{\begin{array}{l} 0=\frac{\partial\left(u^2+v^2\right)}{\partial x}=2 u \frac{\partial u}{\partial x...
theorem exercise_1_13c {f : β„‚ β†’ β„‚} (Ξ© : set β„‚) (a b : Ξ©) (h : is_open Ξ©) (hf : differentiable_on β„‚ f Ξ©) (hc : βˆƒ (c : ℝ), βˆ€ z ∈ Ξ©, abs (f z) = c) : f a = f b :=
import .common open complex filter function interval_integral metric open_locale big_operators open_locale filter open_locale topology
Shakarchi|exercise_1_19b
Prove that the power series $\sum zn/n^2$ converges at every point of the unit circle.
\begin{proof} Since $\left|z^n / n^2\right|=1 / n^2$ for all $|z|=1$, then $\sum z^n / n^2$ converges at every point in the unit circle as $\sum 1 / n^2$ does ( $p$-series $p=2$.) \end{proof}
theorem exercise_1_19b (z : β„‚) (hz : abs z = 1) (s : β„• β†’ β„‚) (h : s = (Ξ» n, βˆ‘ i in (finset.range n), i * z / i ^ 2)) : βˆƒ y, tendsto s at_top (𝓝 y) :=
import .common open complex filter function interval_integral metric open_locale big_operators open_locale filter open_locale topology
Shakarchi|exercise_1_26
Suppose $f$ is continuous in a region $\Omega$. Prove that any two primitives of $f$ (if they exist) differ by a constant.
\begin{proof} Suppose $F_1$ adn $F_2$ are primitives of $F$. Then $(F_1-F_2)^\prime = f - f = 0$, therefore $F_1$ and $F_2$ differ by a constant. \end{proof}
theorem exercise_1_26 (f F₁ Fβ‚‚ : β„‚ β†’ β„‚) (Ξ© : set β„‚) (h1 : is_open Ξ©) (h2 : is_connected Ξ©) (hF₁ : differentiable_on β„‚ F₁ Ξ©) (hFβ‚‚ : differentiable_on β„‚ Fβ‚‚ Ξ©) (hdF₁ : βˆ€ x ∈ Ξ©, deriv F₁ x = f x) (hdFβ‚‚ : βˆ€ x ∈ Ξ©, deriv Fβ‚‚ x = f x) : βˆƒ c : β„‚, βˆ€ x, F₁ x = Fβ‚‚ x + c :=
import .common open complex filter function interval_integral metric open_locale big_operators open_locale filter open_locale topology
Shakarchi|exercise_2_9
Let $\Omega$ be a bounded open subset of $\mathbb{C}$, and $\varphi: \Omega \rightarrow \Omega$ a holomorphic function. Prove that if there exists a point $z_{0} \in \Omega$ such that $\varphi\left(z_{0}\right)=z_{0} \quad \text { and } \quad \varphi^{\prime}\left(z_{0}\right)=1$ then $\varphi$ is linear.
\begin{proof} When $\Omega$ is connected, if $\varphi$ is not linear, then there exists $n \geq 2$ and $a_n \neq 0$, such that $$ \varphi(z)=z+a_n\left(z-z_0\right)^n+O\left(\left(z-z_0\right)^{n+1}\right) . $$ As you have noticed, by induction, it follows that for every $k \geq 1$, $$ \varphi^k(z)=z+k a_n\l...
theorem exercise_2_9 {f : β„‚ β†’ β„‚} (Ξ© : set β„‚) (b : metric.bounded Ξ©) (h : is_open Ξ©) (hf : differentiable_on β„‚ f Ξ©) (z ∈ Ξ©) (hz : f z = z) (h'z : deriv f z = 1) : βˆƒ (f_lin : β„‚ β†’L[β„‚] β„‚), βˆ€ x ∈ Ξ©, f x = f_lin x :=
import .common open complex filter function interval_integral metric open_locale big_operators open_locale filter open_locale topology
Shakarchi|exercise_3_3
Show that $ \int_{-\infty}^{\infty} \frac{\cos x}{x^2 + a^2} dx = \pi \frac{e^{-a}}{a}$ for $a > 0$.
\begin{proof} $\cos x=\frac{e^{i x}+e^{-i x}}{2}$. changing $x \rightarrow-x$ we see that we can just integrate $e^{i x} /\left(x^2+a^2\right)$ and we'll get the same answer. Again, we use the same semicircle and part of the real line. The only pole is $x=i a$, it has order 1 and the residue at it is $\lim _{x \ri...
theorem exercise_3_3 (a : ℝ) (ha : 0 < a) : tendsto (Ξ» y, ∫ x in -y..y, real.cos x / (x ^ 2 + a ^ 2)) at_top (𝓝 (real.pi * (real.exp (-a) / a))) :=
import .common open complex filter function interval_integral metric open_locale big_operators open_locale filter open_locale topology
Shakarchi|exercise_3_9
Show that $\int_0^1 \log(\sin \pi x) dx = - \log 2$.
\begin{proof} Consider $$ \begin{gathered} f(z)=\log \left(1-e^{2 \pi z i}\right)=\log \left(e^{\pi z i}\left(e^{-\pi z i}-e^{\pi z i}\right)\right)=\log (-2 i)+\pi z i+\log \\ (\sin (\pi z)) \end{gathered} $$ Then we have $$ \begin{aligned} \int_0^1 f(z) d z & =\log (-2 i)+\frac{i \pi}{2}+\int_0^1 \log (\si...
theorem exercise_3_9 : ∫ x in 0..1, real.log (real.sin (real.pi * x)) = - real.log 2 :=
import .common open complex filter function interval_integral metric open_locale big_operators open_locale filter open_locale topology
Shakarchi|exercise_3_22
Show that there is no holomorphic function $f$ in the unit disc $D$ that extends continuously to $\partial D$ such that $f(z) = 1/z$ for $z \in \partial D$.
\begin{proof} Consider $g(r)=\int_{|z|=r} f(z) d z$. Cauchy theorem implies that $g(r)=0$ for all $r<1$. Now since $\left.f\right|_{\partial D}=1 / z$ we have $\lim _{r \rightarrow 1} \int_{|z|=r} f(z) d z=\int_{|z|=1} \frac{1}{z} d z=\frac{2}{\pi i} \neq 0$. Contradiction. \end{proof}
theorem exercise_3_22 (D : set β„‚) (hD : D = ball 0 1) (f : β„‚ β†’ β„‚) (hf : differentiable_on β„‚ f D) (hfc : continuous_on f (closure D)) : Β¬ βˆ€ z ∈ (sphere (0 : β„‚) 1), f z = 1 / z :=
import .common open complex filter function interval_integral metric open_locale big_operators open_locale filter open_locale topology
Putnam|exercise_2020_b5
For $j \in\{1,2,3,4\}$, let $z_{j}$ be a complex number with $\left|z_{j}\right|=1$ and $z_{j} \neq 1$. Prove that $3-z_{1}-z_{2}-z_{3}-z_{4}+z_{1} z_{2} z_{3} z_{4} \neq 0 .$
\begin{proof} It will suffice to show that for any $z_1, z_2, z_3, z_4 \in \mathbb{C}$ of modulus 1 such that $|3-z_1-z_2-z_3-z_4| = |z_1z_2z_3z_4|$, at least one of $z_1, z_2, z_3$ is equal to 1. To this end, let $z_1=e^{\alpha i}, z_2=e^{\beta i}, z_3=e^{\gamma i}$ and \[ f(\alpha, \beta, \gamma)=|3-z_1-z_...
theorem exercise_2020_b5 (z : fin 4 β†’ β„‚) (hz0 : βˆ€ n, β€–z nβ€– < 1) (hz1 : βˆ€ n : fin 4, z n β‰  1) : 3 - z 0 - z 1 - z 2 - z 3 + (z 0) * (z 1) * (z 2) * (z 3) β‰  0 :=
import .common open real topological_space filter polynomial open_locale topology big_operators complex_conjugate filter ennreal
Putnam|exercise_2018_b2
Let $n$ be a positive integer, and let $f_{n}(z)=n+(n-1) z+$ $(n-2) z^{2}+\cdots+z^{n-1}$. Prove that $f_{n}$ has no roots in the closed unit disk $\{z \in \mathbb{C}:|z| \leq 1\}$.
\begin{proof} Note first that $f_n(1) > 0$, so $1$ is not a root of $f_n$. Next, note that \[ (z-1)f_n(z) = z^n + \cdots + z - n; \] however, for $\left| z \right| \leq 1$, we have $\left| z^n + \cdots + z \right| \leq n$ by the triangle inequality; equality can only occur if $z,\dots,z^n$ have norm 1 and ...
theorem exercise_2018_b2 (n : β„•) (hn : n > 0) (f : β„• β†’ β„‚ β†’ β„‚) (hf : βˆ€ n : β„•, f n = Ξ» z, (βˆ‘ (i : fin n), (n-i)* z^(i : β„•))) : Β¬ (βˆƒ z : β„‚, β€–zβ€– ≀ 1 ∧ f n z = 0) :=
import .common open real topological_space filter polynomial open_locale topology big_operators complex_conjugate filter ennreal
Putnam|exercise_2017_b3
Suppose that $f(x)=\sum_{i=0}^{\infty} c_{i} x^{i}$ is a power series for which each coefficient $c_{i}$ is 0 or 1 . Show that if $f(2 / 3)=3 / 2$, then $f(1 / 2)$ must be irrational.
\begin{proof} Suppose by way of contradiction that $f(1/2)$ is rational. Then $\sum_{i=0}^{\infty} c_i 2^{-i}$ is the binary expansion of a rational number, and hence must be eventually periodic; that is, there exist some integers $m,n$ such that $c_i = c_{m+i}$ for all $i \geq n$. We may then write \[ f(x) = \...
theorem exercise_2017_b3 (f : ℝ β†’ ℝ) (c : β„• β†’ ℝ) (hf : f = Ξ» x, (βˆ‘' (i : β„•), (c i) * x^i)) (hc : βˆ€ n, c n = 0 ∨ c n = 1) (hf1 : f (2/3) = 3/2) : irrational (f (1/2)) :=
import .common open real topological_space filter polynomial open_locale topology big_operators complex_conjugate filter ennreal
Putnam|exercise_2010_a4
Prove that for each positive integer $n$, the number $10^{10^{10^n}}+10^{10^n}+10^n-1$ is not prime.
\begin{proof} Put \[ N = 10^{10^{10^n}} + 10^{10^n} + 10^n - 1. \] Write $n = 2^m k$ with $m$ a nonnegative integer and $k$ a positive odd integer. For any nonnegative integer $j$, \[ 10^{2^m j} \equiv (-1)^j \pmod{10^{2^m} + 1}. \] Since $10^n \geq n \geq 2^m \geq m+1$, $10^n$ is divisible by $2^n$ and h...
theorem exercise_2010_a4 (n : β„•) : Β¬ nat.prime (10^10^10^n + 10^10^n + 10^n - 1) :=
import .common open real topological_space filter polynomial open_locale topology big_operators complex_conjugate filter ennreal
Putnam|exercise_2000_a2
Prove that there exist infinitely many integers $n$ such that $n, n+1, n+2$ are each the sum of the squares of two integers.
\begin{proof} It is well-known that the equation $x^2-2y^2=1$ has infinitely many solutions (the so-called ``Pell'' equation). Thus setting $n=2y^2$ (so that $n=y^2+y^2$, $n+1=x^2+0^2$, $n+2=x^2+1^2$) yields infinitely many $n$ with the desired property. \end{proof}
theorem exercise_2000_a2 : βˆ€ N : β„•, βˆƒ n : β„•, n > N ∧ βˆƒ i : fin 6 β†’ β„•, n = (i 0)^2 + (i 1)^2 ∧ n + 1 = (i 2)^2 + (i 3)^2 ∧ n + 2 = (i 4)^2 + (i 5)^2 :=
import .common open real topological_space filter polynomial open_locale topology big_operators complex_conjugate filter ennreal
Putnam|exercise_1998_a3
Let $f$ be a real function on the real line with continuous third derivative. Prove that there exists a point $a$ such that
theorem exercise_1998_a3 (f : ℝ β†’ ℝ) (hf : cont_diff ℝ 3 f) : βˆƒ a : ℝ, (f a) * (deriv f a) * (iterated_deriv 2 f a) * (iterated_deriv 3 f a) β‰₯ 0 :=
import .common open real topological_space filter polynomial open_locale topology big_operators complex_conjugate filter ennreal
Pugh|exercise_2_12a
Let $(p_n)$ be a sequence and $f:\mathbb{N}\to\mathbb{N}$. The sequence $(q_k)_{k\in\mathbb{N}}$ with $q_k=p_{f(k)}$ is called a rearrangement of $(p_n)$. Show that if $f$ is an injection, the limit of a sequence is unaffected by rearrangement.
\begin{proof} Let $\varepsilon>0$. Since $p_n \rightarrow L$, we have that, for all $n$ except $n \leq N$, $d\left(p_n, L\right)<\epsilon$. Let $S=\{n \mid f(n) \leq N\}$, let $n_0$ be the largest $n \in S$, we know there is such a largest $n$ because $f(n)$ is injective. Now we have that $\forall n>n_0 f(n)>N$ wh...
theorem exercise_2_12a (f : β„• β†’ β„•) (p : β„• β†’ ℝ) (a : ℝ) (hf : injective f) (hp : tendsto p at_top (𝓝 a)) : tendsto (Ξ» n, p (f n)) at_top (𝓝 a) :=
import .common open set real filter function ring_hom topological_space open_locale big_operators open_locale filter open_locale topology noncomputable theory
Pugh|exercise_2_29
Let $\mathcal{T}$ be the collection of open subsets of a metric space $\mathrm{M}$, and $\mathcal{K}$ the collection of closed subsets. Show that there is a bijection from $\mathcal{T}$ onto $\mathcal{K}$.
\begin{proof} The bijection given by $x\mapsto X^C$ suffices. \end{proof}
theorem exercise_2_29 (M : Type*) [metric_space M] (O C : set (set M)) (hO : O = {s | is_open s}) (hC : C = {s | is_closed s}) : βˆƒ f : O β†’ C, bijective f :=
import .common open set real filter function ring_hom topological_space open_locale big_operators open_locale filter open_locale topology noncomputable theory