From 26d48ff27ce6292e9d5c71e9aede01bf98f3940b Mon Sep 17 00:00:00 2001 From: Abhijit-niser Date: Mon, 9 Jun 2025 14:56:20 +0530 Subject: [PATCH] add hook to generate jsonl and fix empty missing log file --- hooks/pre-commit | 13 ++ proofnet_lean4.jsonl | 392 ++++++++++++++++----------------- script/build_proofnet_jsonl.py | 9 +- 3 files changed, 214 insertions(+), 200 deletions(-) create mode 100755 hooks/pre-commit diff --git a/hooks/pre-commit b/hooks/pre-commit new file mode 100755 index 0000000..8677b52 --- /dev/null +++ b/hooks/pre-commit @@ -0,0 +1,13 @@ +#!/bin/sh + +REPO_ROOT=$(git rev-parse --show-toplevel) +JSONL_SCRIPT="$REPO_ROOT/script/build_proofnet_jsonl.py" + +python3 $JSONL_SCRIPT 2>/dev/null + +if [ $? -ne 0 ]; then + echo "WARN: jsonl genreration failed" +else + git add $REPO_ROOT/proofnet_lean4.jsonl +fi +exit 0 diff --git a/proofnet_lean4.jsonl b/proofnet_lean4.jsonl index 6c15b08..b33e56b 100644 --- a/proofnet_lean4.jsonl +++ b/proofnet_lean4.jsonl @@ -14,6 +14,171 @@ {"name": "Shakarchi_exercise_3_14", "source": "Shakarchi.lean", "header": "import Mathlib\n\nopen Complex Filter Function Metric Finset\nopen scoped BigOperators Topology\n", "formal_statement": "theorem Shakarchi_exercise_3_14 {f : ℂ → ℂ} (hf : Differentiable ℂ f)\n (hf_inj : Function.Injective f) :\n ∃ (a b : ℂ), f = (λ z => a * z + b) ∧ a ≠ 0 := sorry", "formal_proof": null, "informal_stmt": "Prove that all entire functions that are also injective take the form $f(z) = az + b$, $a, b \\in \\mathbb{C}$ and $a \\neq 0$.\n\\begin{proof}\nLook at $f(1 / z)$. If it has an essential singularity at 0 , then pick any $z_0 \\neq 0$. Now we know that the range of $f$ is dense as $z \\rightarrow 0$. We also know that the image of $f$ in some small ball around $z_0$ contains a ball around $f\\left(z_0\\right)$. But this means that the image of $f$ around this ball intersects the image of $f$ in any arbitrarily small ball around 0 (because of the denseness). Thus, $f$ cannot be injective. So the singularity at 0 is not essential, so $f(1 / z)$ is some polynomial of $1 / z$, so $f$ is some polynomial of $z$. If its degree is more than 1 it is not injective (fundamental theorem of algebra), so the degree of $f$ is 1 .\n\\end{proof}", "informal_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$, $$ f^{\\prime}(z)=\\frac{\\partial f}{\\partial x}=\\frac{\\partial u}{\\partial x}+i \\frac{\\partial v}{\\partial x}=0+0=0 . $$ 3 Thus $f(z)$ is constant."} {"name": "Shakarchi_exercise_3_22", "source": "Shakarchi.lean", "header": "import Mathlib\n\nopen Complex Filter Function Metric Finset\nopen scoped BigOperators Topology\n", "formal_statement": "theorem Shakarchi_exercise_3_22 (D : Set ℂ) (hD : D = ball 0 1) (f : ℂ → ℂ)\n (hf : DifferentiableOn ℂ f D) (hfc : ContinuousOn f (closure D)) :\n ¬ ∀ z ∈ (sphere (0 : ℂ) 1), f z = 1 / z := sorry", "formal_proof": null, "informal_stmt": "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$.\n\\begin{proof}\n 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.\n\\end{proof}", "informal_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$, $$ f^{\\prime}(z)=\\frac{\\partial f}{\\partial x}=\\frac{\\partial u}{\\partial x}+i \\frac{\\partial v}{\\partial x}=0+0=0 . $$ 3 Thus $f(z)$ is constant."} {"name": "Shakarchi_exercise_5_1", "source": "Shakarchi.lean", "header": "import Mathlib\n\nopen Complex Filter Function Metric Finset\nopen scoped BigOperators Topology\n", "formal_statement": "theorem Shakarchi_exercise_5_1 (f : ℂ → ℂ) (hf : DifferentiableOn ℂ f (ball 0 1))\n (hb : Bornology.IsBounded (Set.range f)) (h0 : f ≠ 0) (zeros : ℕ → ℂ) (hz : ∀ n, f (zeros n) = 0)\n (hzz : Set.range zeros = {z | f z = 0 ∧ z ∈ (ball (0 : ℂ) 1)}) :\n ∃ (z : ℂ), Tendsto (λ n => (∑ i ∈ range n, (1 - zeros i))) atTop (𝓝 z) := sorry", "formal_proof": null, "informal_stmt": "Prove that if $f$ is holomorphic in the unit disc, bounded and not identically zero, and $z_{1}, z_{2}, \\ldots, z_{n}, \\ldots$ are its zeros $\\left(\\left|z_{k}\\right|<1\\right)$, then $\\sum_{n}\\left(1-\\left|z_{n}\\right|\\right)<\\infty$.\n\\begin{proof}\n Fix $\\mathrm{N}$ and let $D(0, R)$ contains the first $\\mathrm{N}$ zeroes of f. Let $S_N=\\sum_{k=1}^N\\left(1-\\left|z_k\\right|\\right)=$ $\\sum_{k=1}^N \\int_{\\left|z_k\\right|}^1 1 d r$. Let $\\eta_k$ be the characteristic function of the interval $\\left.\\| z_k \\mid, 1\\right]$. We have $S_N=\\sum_{k=1}^N \\int_0^1 \\eta(r) d r=\\int_0^1\\left(\\sum_{k=1}^N \\eta_k(r)\\right) d r \\leq \\int_0^1 n(r) d r$, where $n(r)$ is the number of zeroes of $f$ at the disk $D(0, r)$. For $r \\leq 1$ we have $n(r) \\leq \\frac{n(r)}{r}$. This means that $S_N \\leq \\int_0^1 n(r) \\frac{d r}{r}$. If $f(0)=0$ then we have $f(z)=z^m g(z)$ for some integer $\\mathrm{m}$ and some holomorphic $g$ with $g(0) \\neq 0$. The other zeroes of $\\mathrm{f}$ are precisely the zeroes of $g$. Thus we have reduced the problem to $f(0) \\neq 0$. By the Corollary of the Jensen's equality we get $S_N \\leq \\int_0^1 n(r) \\frac{d r}{r}=\\frac{1}{2 \\pi} \\int_0^{2 \\pi} \\log \\left|f\\left(R e^{i \\pi}\\right)\\right| d \\phi-\\log |f(0)| Irrational ( x + y ) := sorry", "formal_proof": null, "informal_stmt": "If $r$ is rational $(r \\neq 0)$ and $x$ is irrational, prove that $r+x$ is irrational.\n\\begin{proof}\n If $r$ and $r+x$ were both rational, then $x=r+x-r$ would also be rational.\n\\end{proof}", "informal_proof": "If $r$ and $r+x$ were both rational, then $x=r+x-r$ would also be rational."} +{"name": "Rudin_exercise_1_1b", "source": "Rudin.lean", "header": "import Mathlib\n\nopen Topology Filter Real Complex TopologicalSpace Finset\nopen scoped BigOperators\nnoncomputable section\n", "formal_statement": "theorem Rudin_exercise_1_1b\n(x : ℝ)\n(y : ℚ)\n(h : y ≠ 0)\n: ( Irrational x ) -> Irrational ( x * y ) := sorry", "formal_proof": null, "informal_stmt": "If $r$ is rational $(r \\neq 0)$ and $x$ is irrational, prove that $rx$ is irrational.\n\\begin{proof}\n If $r x$ were rational, then $x=\\frac{r x}{r}$ would also be rational.\n\\end{proof}", "informal_proof": "If $r$ and $r+x$ were both rational, then $x=r+x-r$ would also be rational."} +{"name": "Rudin_exercise_1_2", "source": "Rudin.lean", "header": "import Mathlib\n\nopen Topology Filter Real Complex TopologicalSpace Finset\nopen scoped BigOperators\nnoncomputable section\n", "formal_statement": "theorem Rudin_exercise_1_2 : ¬ ∃ (x : ℚ), ( x ^ 2 = 12 ) := sorry", "formal_proof": null, "informal_stmt": "Prove that there is no rational number whose square is $12$.\n\\begin{proof}\n 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\n$$\n4 s^2+4 s+1=3\\left(4 t^2+4 t+1\\right)=12 t^2+12 t+3,\n$$\nso that\n$$\n4\\left(s^2+s-3 t^2-3 t\\right)=2 .\n$$\nBut this is absurd, since 2 cannot be a multiple of 4 .\n\\end{proof}", "informal_proof": "If $r$ and $r+x$ were both rational, then $x=r+x-r$ would also be rational."} +{"name": "Rudin_exercise_1_4", "source": "Rudin.lean", "header": "import Mathlib\n\nopen Topology Filter Real Complex TopologicalSpace Finset\nopen scoped BigOperators\nnoncomputable section\n", "formal_statement": "theorem Rudin_exercise_1_4\n(α : Type*) [PartialOrder α]\n(s : Set α)\n(x y : α)\n(h₀ : Set.Nonempty s)\n(h₁ : x ∈ lowerBounds s)\n(h₂ : y ∈ upperBounds s)\n: x ≤ y := sorry", "formal_proof": null, "informal_stmt": "Let $E$ be a nonempty subset of an ordered set; suppose $\\alpha$ is a lower bound of $E$ and $\\beta$ is an upper bound of $E$. Prove that $\\alpha \\leq \\beta$.\n\\begin{proof}\nSince $E$ is nonempty, there exists $x \\in E$. Then by definition of lower and upper bounds we have $\\alpha \\leq x \\leq \\beta$, and hence by property $i i$ in the definition of an ordering, we have $\\alpha<\\beta$ unless $\\alpha=x=\\beta$.\n\\end{proof}", "informal_proof": "If $r$ and $r+x$ were both rational, then $x=r+x-r$ would also be rational."} +{"name": "Rudin_exercise_1_5", "source": "Rudin.lean", "header": "import Mathlib\n\nopen Topology Filter Real Complex TopologicalSpace Finset\nopen scoped BigOperators\nnoncomputable section\n", "formal_statement": "theorem Rudin_exercise_1_5 (A minus_A : Set ℝ) (hA : A.Nonempty)\n (hA_bdd_below : BddBelow A) (hminus_A : minus_A = {x | -x ∈ A}) :\n Min A = Max minus_A := sorry", "formal_proof": null, "informal_stmt": "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)$.\n\\begin{proof}\n 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$.\n\nSuppose $x \\in A$. Then, $-x \\in-A$, and, hence $-x \\leq \\sup (-A)$. It follows that $x \\geq-\\sup (-A)$, i.e., $\\alpha \\leq x$. Thus $\\alpha$ is a lower bound of $A$.\n\nNow let $\\beta$ be any lower bound of $A$. This means $\\beta \\leq x$ for all $x$ in $A$. Hence $-x \\leq-\\beta$ for all $x \\in A$, which says $y \\leq-\\beta$ for all $y \\in-A$. This means $-\\beta$ is an upper bound of $-A$. Hence $-\\beta \\geq \\sup (-A)$ by definition of sup, i.e., $\\beta \\leq-\\sup (-A)$, and so $-\\sup (-A)$ is the greatest lower bound of $A$.\n\\end{proof}", "informal_proof": "If $r$ and $r+x$ were both rational, then $x=r+x-r$ would also be rational."} +{"name": "Rudin_exercise_1_8", "source": "Rudin.lean", "header": "import Mathlib\n\nopen Topology Filter Real Complex TopologicalSpace Finset\nopen scoped BigOperators\nnoncomputable section\n", "formal_statement": "theorem Rudin_exercise_1_8 : ¬ ∃ (r : ℂ → ℂ → Prop), IsLinearOrder ℂ r := sorry", "formal_proof": null, "informal_stmt": "Prove that no order can be defined in the complex field that turns it into an ordered field.\n\\begin{proof}\n By Part (a) of Proposition $1.18$, either $i$ or $-i$ must be positive. Hence $-1=i^2=(-i)^2$ must be positive. But then $1=(-1)^2$, must also be positive, and this contradicts Part $(a)$ of Proposition 1.18, since 1 and $-1$ cannot both be positive.\n\\end{proof}", "informal_proof": "If $r$ and $r+x$ were both rational, then $x=r+x-r$ would also be rational."} +{"name": "Rudin_exercise_1_11a", "source": "Rudin.lean", "header": "import Mathlib\n\nopen Topology Filter Real Complex TopologicalSpace Finset\nopen scoped BigOperators\nnoncomputable section\n", "formal_statement": "theorem Rudin_exercise_1_11a (z : ℂ) :\n ∃ (r : ℝ) (w : ℂ), norm w = 1 ∧ z = r * w := sorry", "formal_proof": null, "informal_stmt": "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$.\n\\begin{proof}\n 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$\n\\end{proof}", "informal_proof": "If $r$ and $r+x$ were both rational, then $x=r+x-r$ would also be rational."} +{"name": "Rudin_exercise_1_12", "source": "Rudin.lean", "header": "import Mathlib\n\nopen Topology Filter Real Complex TopologicalSpace Finset\nopen scoped BigOperators\nnoncomputable section\n", "formal_statement": "theorem Rudin_exercise_1_12 (n : ℕ) (f : ℕ → ℂ) :\n norm (∑ i ∈ range n, f i) ≤ ∑ i ∈ range n, norm (f i) := sorry", "formal_proof": null, "informal_stmt": "If $z_1, \\ldots, z_n$ are complex, prove that $|z_1 + z_2 + \\ldots + z_n| \\leq |z_1| + |z_2| + \\cdots + |z_n|$.\n\\begin{proof}\n We can apply the case $n=2$ and induction on $n$ to get\n$$\n\\begin{aligned}\n\\left|z_1+z_2+\\cdots z_n\\right| &=\\left|\\left(z_1+z_2+\\cdots+z_{n-1}\\right)+z_n\\right| \\\\\n& \\leq\\left|z_1+z_2+\\cdots+z_{n-1}\\right|+\\left|z_n\\right| \\\\\n& \\leq\\left|z_1\\right|+\\left|z_2\\right|+\\cdots+\\left|z_{n-1}\\right|+\\left|z_n\\right|\n\\end{aligned}\n$$\n\\end{proof}", "informal_proof": "If $r$ and $r+x$ were both rational, then $x=r+x-r$ would also be rational."} +{"name": "Rudin_exercise_1_13", "source": "Rudin.lean", "header": "import Mathlib\n\nopen Topology Filter Real Complex TopologicalSpace Finset\nopen scoped BigOperators\nnoncomputable section\n", "formal_statement": "theorem Rudin_exercise_1_13 (x y : ℂ) :\n |(norm x) - (norm y)| ≤ norm (x - y) := sorry", "formal_proof": null, "informal_stmt": "If $x, y$ are complex, prove that $||x|-|y|| \\leq |x-y|$.\n\\begin{proof}\n Since $x=x-y+y$, the triangle inequality gives\n$$\n|x| \\leq|x-y|+|y|\n$$\nso 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|$.\n\\end{proof}", "informal_proof": "If $r$ and $r+x$ were both rational, then $x=r+x-r$ would also be rational."} +{"name": "Rudin_exercise_1_14", "source": "Rudin.lean", "header": "import Mathlib\n\nopen Topology Filter Real Complex TopologicalSpace Finset\nopen scoped BigOperators\nnoncomputable section\n", "formal_statement": "theorem Rudin_exercise_1_14\n (z : ℂ) (h : norm z = 1)\n : (norm (1 + z)) ^ 2 + (norm (1 - z)) ^ 2 = 4 := sorry", "formal_proof": null, "informal_stmt": "If $z$ is a complex number such that $|z|=1$, that is, such that $z \\bar{z}=1$, compute $|1+z|^{2}+|1-z|^{2}$.\n\\begin{proof}\n $|1+z|^2=(1+z)(1+\\bar{z})=1+\\bar{z}+z+z \\bar{z}=2+z+\\bar{z}$. Similarly $|1-z|^2=(1-z)(1-\\bar{z})=1-z-\\bar{z}+z \\bar{z}=2-z-\\bar{z}$. Hence\n$$\n|1+z|^2+|1-z|^2=4 \\text {. }\n$$\n\\end{proof}", "informal_proof": "If $r$ and $r+x$ were both rational, then $x=r+x-r$ would also be rational."} +{"name": "Rudin_exercise_1_16a", "source": "Rudin.lean", "header": "import Mathlib\n\nopen Topology Filter Real Complex TopologicalSpace Finset\nopen scoped BigOperators\nnoncomputable section\n", "formal_statement": "theorem Rudin_exercise_1_16a\n (n : ℕ)\n (d r : ℝ)\n (x y z : EuclideanSpace ℝ (Fin n)) -- R^n\n (h₁ : n ≥ 3)\n (h₂ : ‖x - y‖ = d)\n (h₃ : d > 0)\n (h₄ : r > 0)\n (h₅ : 2 * r > d)\n : Set.Infinite {z : EuclideanSpace ℝ (Fin n) | ‖z - x‖ = r ∧ ‖z - y‖ = r} := sorry", "formal_proof": null, "informal_stmt": "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$.\n\\begin{proof}\n (a) Let w be any vector satisfying the following two equations:\n$$\n\\begin{aligned}\n\\mathbf{w} \\cdot(\\mathbf{x}-\\mathbf{y}) &=0, \\\\\n|\\mathbf{w}|^2 &=r^2-\\frac{d^2}{4} .\n\\end{aligned}\n$$\nFrom linear algebra it is known that all but one of the components of a solution $\\mathbf{w}$ of the first equation can be arbitrary. The remaining component is then uniquely determined. Also, if $w$ is any non-zero solution of the first equation, there is a unique positive number $t$ such that $t$ w satisfies both equations. (For example, if $x_1 \\neq y_1$, the first equation is satisfied whenever\n$$\nz_1=\\frac{z_2\\left(x_2-y_2\\right)+\\cdots+z_k\\left(x_k-y_k\\right)}{y_1-x_1} .\n$$\nIf $\\left(z_1, z_2, \\ldots, z_k\\right)$ satisfies this equation, so does $\\left(t z_1, t z_2, \\ldots, t z_k\\right)$ for any real number $t$.) Since at least two of these components can vary independently, we can find a solution with these components having any prescribed ratio. This ratio does not change when we multiply by the positive number $t$ to obtain a solution of both equations. Since there are infinitely many ratios, there are infinitely many distinct solutions. For each such solution $\\mathbf{w}$ the vector $\\mathbf{z}=$ $\\frac{1}{2} \\mathrm{x}+\\frac{1}{2} \\mathrm{y}+\\mathrm{w}$ is a solution of the required equation. For\n$$\n\\begin{aligned}\n|\\mathrm{z}-\\mathbf{x}|^2 &=\\left|\\frac{\\mathbf{y}-\\mathbf{x}}{2}+\\mathbf{w}\\right|^2 \\\\\n&=\\left|\\frac{\\mathbf{y}-\\mathbf{x}}{2}\\right|^2+2 \\mathbf{w} \\cdot \\frac{\\mathbf{x}-\\mathbf{y}}{2}+|\\mathbf{w}|^2 \\\\\n&=\\frac{d^2}{4}+0+r^2-\\frac{d^2}{4} \\\\\n&=r^2\n\\end{aligned}\n$$\nand a similar relation holds for $|z-y|^2$.\n\\end{proof}", "informal_proof": "If $r$ and $r+x$ were both rational, then $x=r+x-r$ would also be rational."} +{"name": "Rudin_exercise_1_17", "source": "Rudin.lean", "header": "import Mathlib\n\nopen Topology Filter Real Complex TopologicalSpace Finset\nopen scoped BigOperators\nnoncomputable section\n", "formal_statement": "theorem Rudin_exercise_1_17\n (n : ℕ)\n (x y : EuclideanSpace ℝ (Fin n)) -- R^n\n : ‖x + y‖^2 + ‖x - y‖^2 = 2*‖x‖^2 + 2*‖y‖^2 := sorry", "formal_proof": null, "informal_stmt": "Prove that $|\\mathbf{x}+\\mathbf{y}|^{2}+|\\mathbf{x}-\\mathbf{y}|^{2}=2|\\mathbf{x}|^{2}+2|\\mathbf{y}|^{2}$ if $\\mathbf{x} \\in R^{k}$ and $\\mathbf{y} \\in R^{k}$.\n\\begin{proof}\n The proof is a routine computation, using the relation\n$$\n|x \\pm y|^2=(x \\pm y) \\cdot(x \\pm y)=|x|^2 \\pm 2 x \\cdot y+|y|^2 .\n$$\nIf $\\mathrm{x}$ and $\\mathrm{y}$ are the sides of a parallelogram, then $\\mathrm{x}+\\mathrm{y}$ and $\\mathbf{x}-\\mathrm{y}$ are its diagonals. Hence this result says that the sum of the squares on the diagonals of a parallelogram equals the sum of the squares on the sides.\n\\end{proof}", "informal_proof": "If $r$ and $r+x$ were both rational, then $x=r+x-r$ would also be rational."} +{"name": "Rudin_exercise_1_18a", "source": "Rudin.lean", "header": "import Mathlib\n\nopen Topology Filter Real Complex TopologicalSpace Finset\nopen scoped BigOperators\nnoncomputable section\n", "formal_statement": "theorem Rudin_exercise_1_18a\n (n : ℕ)\n (h : n > 1)\n (x : EuclideanSpace ℝ (Fin n)) -- R^n\n : ∃ (y : EuclideanSpace ℝ (Fin n)), y ≠ 0 ∧ (inner ℝ x y) = (0 : ℝ) := sorry", "formal_proof": null, "informal_stmt": "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$\n\\begin{proof}\n 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 true when $k=1$, since the product of two nonzero real numbers is nonzero.\n\\end{proof}", "informal_proof": "If $r$ and $r+x$ were both rational, then $x=r+x-r$ would also be rational."} +{"name": "Rudin_exercise_1_18b", "source": "Rudin.lean", "header": "import Mathlib\n\nopen Topology Filter Real Complex TopologicalSpace Finset\nopen scoped BigOperators\nnoncomputable section\n", "formal_statement": "theorem Rudin_exercise_1_18b\n : ¬ ∀ (x : ℝ), ∃ (y : ℝ), y ≠ 0 ∧ x * y = 0 := sorry", "formal_proof": null, "informal_stmt": "If $k = 1$ and $\\mathbf{x} \\in R^{k}$, prove that there does not exist $\\mathbf{y} \\in R^{k}$ such that $\\mathbf{y} \\neq 0$ but $\\mathbf{x} \\cdot \\mathbf{y}=0$\n\\begin{proof}\n Not true when $k=1$, since the product of two nonzero real numbers is nonzero.\n\\end{proof}", "informal_proof": "If $r$ and $r+x$ were both rational, then $x=r+x-r$ would also be rational."} +{"name": "Rudin_exercise_1_19", "source": "Rudin.lean", "header": "import Mathlib\n\nopen Topology Filter Real Complex TopologicalSpace Finset\nopen scoped BigOperators\nnoncomputable section\n", "formal_statement": "theorem Rudin_exercise_1_19\n (n : ℕ)\n (a b c x : EuclideanSpace ℝ (Fin n))\n (r : ℝ)\n (h₁ : r > 0)\n (h₂ : 3 • c = 4 • b - a)\n (h₃ : 3 * r = 2 * ‖x - b‖)\n : ‖x - a‖ = 2 * ‖x - b‖ ↔ ‖x - c‖ = r := sorry", "formal_proof": null, "informal_stmt": "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|$.\n\\begin{proof}\n Since the solution is given to us, all we have to do is verify it, i.e., we need to show that the equation\n$$\n|\\mathrm{x}-\\mathrm{a}|=2|\\mathrm{x}-\\mathrm{b}|\n$$\nis equivalent to $|\\mathrm{x}-\\mathbf{c}|=r$, which says\n$$\n\\left|\\mathbf{x}-\\frac{4}{3} \\mathbf{b}+\\frac{1}{3} \\mathbf{a}\\right|=\\frac{2}{3}|\\mathbf{b}-\\mathbf{a}| .\n$$\nIf we square both sides of both equations, we an equivalent pair of equations, the first of which reduces to\n$$\n3|\\mathbf{x}|^2+2 \\mathbf{a} \\cdot \\mathbf{x}-8 \\mathbf{b} \\cdot \\mathbf{x}-|\\mathbf{a}|^2+4|\\mathbf{b}|^2=0,\n$$\nand the second of which reduces to this equation divided by 3 . Hence these equations are indeed equivalent.\n\\end{proof}", "informal_proof": "If $r$ and $r+x$ were both rational, then $x=r+x-r$ would also be rational."} +{"name": "Rudin_exercise_2_19a", "source": "Rudin.lean", "header": "import Mathlib\n\nopen Topology Filter Real Complex TopologicalSpace Finset\nopen scoped BigOperators\nnoncomputable section\n", "formal_statement": "theorem Rudin_exercise_2_19a {X : Type*} [MetricSpace X]\n (A B : Set X) (hA : IsClosed A) (hB : IsClosed B) (hAB : Disjoint A B) :\n SeparatedNhds A B := sorry", "formal_proof": null, "informal_stmt": "If $A$ and $B$ are disjoint closed sets in some metric space $X$, prove that they are separated.\n\\begin{proof}\n We are given that $A \\cap B=\\varnothing$. Since $A$ and $B$ are closed, this means $A \\cap \\bar{B}=\\varnothing=\\bar{A} \\cap B$, which says that $A$ and $B$ are separated.\n\\end{proof}", "informal_proof": "If $r$ and $r+x$ were both rational, then $x=r+x-r$ would also be rational."} +{"name": "Rudin_exercise_2_24", "source": "Rudin.lean", "header": "import Mathlib\n\nopen Topology Filter Real Complex TopologicalSpace Finset\nopen scoped BigOperators\nnoncomputable section\n", "formal_statement": "theorem Rudin_exercise_2_24 {X : Type*} [MetricSpace X]\n (hX : ∀ (A : Set X), Infinite A → ∃ (x : X), x ∈ closure A) :\n SeparableSpace X := sorry", "formal_proof": null, "informal_stmt": "Let $X$ be a metric space in which every infinite subset has a limit point. Prove that $X$ is separable.\n\\begin{proof}\n 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 most one point of the infinite set, hence that no point could be a limit point of this set, contrary to hypothesis. Hence $X$ is totally bounded, i.e., for each $\\delta>0$ there is a finite set $x_1, \\ldots, x_{N\\delta}$such that $X=\\bigcup_{j / 1}^{N\\delta} B_\\delta\\left(x_j\\right)$\n\nLet $x_{n_1}, \\ldots, x_{n N_n}$ be such that $X=\\bigcup_{j / 1}^{N_n} B_{\\frac{1}{n}}\\left(x_{n j}\\right), n=1,2, \\ldots$ We claim that $\\left\\{x_{n j}: 1 \\leq j \\leq N_n ; n=1,2, \\ldots\\right\\}$ is a countable dense subset of $X$. Indeed\n25\nif $x \\in X$ and $\\delta>0$, then $x \\in B_{\\frac{1}{n}}\\left(x_{n j}\\right)$ for some $x_{n j}$ for some $n>\\frac{1}{\\delta}$, and hence $d\\left(x, x_{n j}\\right)<\\delta$. By definition, this means that $\\left\\{x_{n j}\\right\\}$ is dense in $X$.\n\\end{proof}", "informal_proof": "If $r$ and $r+x$ were both rational, then $x=r+x-r$ would also be rational."} +{"name": "Rudin_exercise_2_25", "source": "Rudin.lean", "header": "import Mathlib\n\nopen Topology Filter Real Complex TopologicalSpace Finset\nopen scoped BigOperators\nnoncomputable section\n", "formal_statement": "theorem Rudin_exercise_2_25 {K : Type*} [MetricSpace K] [CompactSpace K] :\n ∃ (B : Set (Set K)), Set.Countable B ∧ IsTopologicalBasis B := sorry", "formal_proof": null, "informal_stmt": "Prove that every compact metric space $K$ has a countable base.\n\\begin{proof}\n $K$ can be covered by a finite union of neighborhoods of radius $1 / n$, and this shows that this implies that $K$ is separable.\n\nIt is not entirely obvious that a metric space with a countable base is separable. To prove this, let $\\left\\{V_n\\right\\}_{n=1}^{\\infty}$ be a countable base, and let $x_n \\in V_n$. The points $V_n$ must be dense in $X$. For if $G$ is any non-empty open set, then $G$ contains $V_n$ for some $n$, and hence $x_n \\in G$. (Thus for a metric space, having a countable base and being separable are equivalent.)\n\\end{proof}", "informal_proof": "If $r$ and $r+x$ were both rational, then $x=r+x-r$ would also be rational."} +{"name": "Rudin_exercise_2_27a", "source": "Rudin.lean", "header": "import Mathlib\n\nopen Topology Filter Real Complex TopologicalSpace Finset\nopen scoped BigOperators\nnoncomputable section\n", "formal_statement": "theorem Rudin_exercise_2_27a (k : ℕ) (E P : Set (EuclideanSpace ℝ (Fin k)))\n (hE : E.Nonempty ∧ ¬ Set.Countable E)\n (hP : P = {x | ∀ U ∈ 𝓝 x, ¬ Set.Countable (P ∩ E)}) :\n IsClosed P ∧ P = {x | ClusterPt x (𝓟 P)} := sorry", "formal_proof": null, "informal_stmt": "Suppose $E\\subset\\mathbb{R}^k$ is uncountable, and let $P$ be the set of condensation points of $E$. Prove that $P$ is perfect.\n\\begin{proof}\n 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.\n\\end{proof}", "informal_proof": "If $r$ and $r+x$ were both rational, then $x=r+x-r$ would also be rational."} +{"name": "Rudin_exercise_2_27b", "source": "Rudin.lean", "header": "import Mathlib\n\nopen Topology Filter Real Complex TopologicalSpace Finset\nopen scoped BigOperators\nnoncomputable section\n", "formal_statement": "theorem Rudin_exercise_2_27b (k : ℕ) (E P : Set (EuclideanSpace ℝ (Fin k)))\n (hE : E.Nonempty ∧ ¬ Set.Countable E)\n (hP : P = {x | ∀ U ∈ 𝓝 x, (P ∩ E).Nonempty ∧ ¬ Set.Countable (P ∩ E)}) :\n Set.Countable (E \\ P) := sorry", "formal_proof": null, "informal_stmt": "Suppose $E\\subset\\mathbb{R}^k$ is uncountable, and let $P$ be the set of condensation points of $E$. Prove that at most countably many points of $E$ are not in $P$.\n\\begin{proof}\n If $x \\in W^c$, and $O$ is any neighborhood of $x$, then $x \\in V_n \\subseteq O$ for some n. Since $x \\notin W, V_n \\cap E$ is uncountable. Hence $O$ contains uncountably many points of $E$, and so $x$ is a condensation point of $E$. Thus $x \\in P$, i.e., $W^c \\subseteq P$.\nConversely if $x \\in W$, then $x \\in V_n$ for some $V_n$ such that $V_n \\cap E$ is countable. Hence $x$ has a neighborhood (any neighborhood contained in $V_n$ ) containing at most a countable set of points of $E$, and so $x \\notin P$, i.e., $W \\subseteq P^c$. Hence $P=W^c$.\nIt is clear that $P$ is closed (since its complement $W$ is open), so that we need only show that $P \\subseteq P^{\\prime}$. Hence suppose $x \\in P$, and $O$ is any neighborhood of $x$. (By definition of $P$ this means $O \\cap E$ is uncountable.) We need to show that there is a point $y \\in P \\cap(O \\backslash\\{x\\})$. If this is not the case, i.e., if every point $y$ in $O \\backslash\\{x\\}$ is in $P^c$, then for each such point $y$ there is a set $V_n$ containing $y$ such that $V_n \\cap E$ is at most countable. That would mean that $y \\in W$, i.e., that $O \\backslash\\{x\\}$ is contained in $W$. It would follow that $O \\cap E \\subseteq\\{x\\} \\cup(W \\cap E)$, and so $O \\cap E$ contains at most a countable set of points, contrary to the hypothesis that $x \\in P$. Hence $O$ contains a point of $P$ different from $x$, and so $P \\subseteq P^{\\prime}$. Thus $P$ is perfect.\n\\end{proof}", "informal_proof": "If $r$ and $r+x$ were both rational, then $x=r+x-r$ would also be rational."} +{"name": "Rudin_exercise_2_28", "source": "Rudin.lean", "header": "import Mathlib\n\nopen Topology Filter Real Complex TopologicalSpace Finset\nopen scoped BigOperators\nnoncomputable section\n", "formal_statement": "theorem Rudin_exercise_2_28 (X : Type*) [MetricSpace X] [SeparableSpace X]\n (A : Set X) (hA : IsClosed A) :\n ∃ P₁ P₂ : Set X, A = P₁ ∪ P₂ ∧\n IsClosed P₁ ∧ P₁ = {x | ClusterPt x (𝓟 P₁)} ∧\n Set.Countable P₂ := sorry", "formal_proof": null, "informal_stmt": "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.\n\\begin{proof}\n 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.\n\nSince a perfect set in a separable metric space has the same cardinality as the real numbers, the set $P$ must be empty if $E$ is countable. The at-most countable set $E \\backslash P$ cannot be perfect, hence must have isolated points if it is nonempty.\n\\end{proof}", "informal_proof": "If $r$ and $r+x$ were both rational, then $x=r+x-r$ would also be rational."} +{"name": "Rudin_exercise_2_29", "source": "Rudin.lean", "header": "import Mathlib\n\nopen Topology Filter Real Complex TopologicalSpace Finset\nopen scoped BigOperators\nnoncomputable section\n", "formal_statement": "theorem Rudin_exercise_2_29 (U : Set ℝ) (hU : IsOpen U) :\n ∃ (f : ℕ → Set ℝ), (∀ n, ∃ a b : ℝ, f n = {x | a < x ∧ x < b}) ∧ (∀ n, f n ⊆ U) ∧\n (∀ n m, n ≠ m → f n ∩ f m = ∅) ∧\n U = ⋃ n, f n := sorry", "formal_proof": null, "informal_stmt": "Prove that every open set in $\\mathbb{R}$ is the union of an at most countable collection of disjoint segments.\n\\begin{proof}\n Let $O$ be open. For each pair of points $x \\in O, y \\in O$, we define an equivalence relation $x \\sim y$ by saying $x \\sim y$ if and only if $[\\min (x, y), \\max (x, y)] \\subset$ 0 . This is an equivalence relation, since $x \\sim x([x, x] \\subset O$ if $x \\in O)$; if $x \\sim y$, then $y \\sim x$ (since $\\min (x, y)=\\min (y, x)$ and $\\max (x, y)=\\max (y, x))$; and if $x \\sim y$ and $y \\sim z$, then $x \\sim z([\\min (x, z), \\max (x, z)] \\subseteq[\\min (x, y), \\max (x, y)] \\cup$ $[\\min (y, z), \\max (y, z)] \\subseteq O)$. In fact it is easy to prove that\n$$\n\\min (x, z) \\geq \\min (\\min (x, y), \\min (y, z))\n$$\nand\n$$\n\\max (x, z) \\leq \\max (\\max (x, y), \\max (y, z))\n$$\nIt follows that $O$ can be written as a disjoint union of pairwise disjoint equivalence classes. We claim that each equivalence class is an open interval.\n\nTo show this, for each $x \\in O$; let $A=\\{z:[z, x] \\subseteq O\\}$ and $B=\\{z:[x, z] \\subseteq$ $O\\}$, and let $a=\\inf A, b=\\sup B$. We claim that $(a, b) \\subset O$. Indeed if $az$. Then $z \\in[c, x] \\cup[x, d] \\subseteq O$. We now claim that $(a, b)$ is the equivalence class containing $x$. It is clear that each element of $(a, b)$ is equivalent to $x$ by the way in which $a$ and $b$ were chosen. We need to show that if $z \\notin(a, b)$, then $z$ is not equivalent to $x$. Suppose that $zb$ and $z \\sim x$, then $b$ could not be an upper bound for $B$.\n\nWe have now established that $O$ is a union of pairwise disjoint open intervals. Such a union must be at most countable, since each open interval contains a rational number not in any other interval.\n\\end{proof}", "informal_proof": "If $r$ and $r+x$ were both rational, then $x=r+x-r$ would also be rational."} +{"name": "Rudin_exercise_3_1a", "source": "Rudin.lean", "header": "import Mathlib\n\nopen Topology Filter Real Complex TopologicalSpace Finset\nopen scoped BigOperators\nnoncomputable section\n", "formal_statement": "theorem Rudin_exercise_3_1a\n (f : ℕ → ℝ)\n (h : ∃ (a : ℝ), Tendsto (λ (n : ℕ) => f n) atTop (𝓝 a))\n : ∃ (a : ℝ), Tendsto (λ (n : ℕ) => |f n|) atTop (𝓝 a) := sorry", "formal_proof": null, "informal_stmt": "Prove that convergence of $\\left\\{s_{n}\\right\\}$ implies convergence of $\\left\\{\\left|s_{n}\\right|\\right\\}$.\n\\begin{proof}\n 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\\{\\left|s_n\\right|\\right\\}$ is also a Cauchy sequence, and therefore must converge.\n\\end{proof}", "informal_proof": "If $r$ and $r+x$ were both rational, then $x=r+x-r$ would also be rational."} +{"name": "Rudin_exercise_3_2a", "source": "Rudin.lean", "header": "import Mathlib\n\nopen Topology Filter Real Complex TopologicalSpace Finset\nopen scoped BigOperators\nnoncomputable section\n", "formal_statement": "theorem Rudin_exercise_3_2a\n : Tendsto (λ (n : ℝ) => (sqrt (n^2 + n) - n)) atTop (𝓝 (1/2)) := sorry", "formal_proof": null, "informal_stmt": "Prove that $\\lim_{n \\rightarrow \\infty}\\sqrt{n^2 + n} -n = 1/2$.\n\\begin{proof}\n Multiplying and dividing by $\\sqrt{n^2+n}+n$ yields\n$$\n\\sqrt{n^2+n}-n=\\frac{n}{\\sqrt{n^2+n}+n}=\\frac{1}{\\sqrt{1+\\frac{1}{n}}+1} .\n$$\nIt follows that the limit is $\\frac{1}{2}$.\n\\end{proof}", "informal_proof": "If $r$ and $r+x$ were both rational, then $x=r+x-r$ would also be rational."} +{"name": "Rudin_exercise_3_3", "source": "Rudin.lean", "header": "import Mathlib\n\nopen Topology Filter Real Complex TopologicalSpace Finset\nopen scoped BigOperators\nnoncomputable section\n", "formal_statement": "theorem Rudin_exercise_3_3\n : ∃ (x : ℝ), Tendsto f atTop (𝓝 x) ∧ ∀ n, f n < 2 := sorry", "formal_proof": null, "informal_stmt": "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$.\n\\begin{proof}\n 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}1$, i.e., $s_n>s_n^2-2=s_{n-1}$. Hence the sequence is an increasing sequence that is bounded above (by 2 ) and so converges. Since the limit $s$ satisfies $s^2-s-2=0$, it follows that the limit is 2.\n\\end{proof}", "informal_proof": "If $r$ and $r+x$ were both rational, then $x=r+x-r$ would also be rational."} +{"name": "Rudin_exercise_3_5", "source": "Rudin.lean", "header": "import Mathlib\n\nopen Topology Filter Real Complex TopologicalSpace Finset\nopen scoped BigOperators\nnoncomputable section\n", "formal_statement": "theorem Rudin_exercise_3_5\n (a b : ℕ → ℝ)\n (h : limsup a + limsup b ≠ 0) :\n limsup (λ n => a n + b n) ≤ limsup a + limsup b := sorry", "formal_proof": null, "informal_stmt": "For any two real sequences $\\left\\{a_{n}\\right\\},\\left\\{b_{n}\\right\\}$, prove that $\\limsup _{n \\rightarrow \\infty}\\left(a_{n}+b_{n}\\right) \\leq \\limsup _{n \\rightarrow \\infty} a_{n}+\\limsup _{n \\rightarrow \\infty} b_{n},$ provided the sum on the right is not of the form $\\infty-\\infty$.\n\\begin{proof}\n Since the case when $\\limsup _{n \\rightarrow \\infty} a_n=+\\infty$ and $\\limsup _{n \\rightarrow \\infty} b_n=-\\infty$ has been excluded from consideration, we note that the inequality is obvious if $\\limsup _{n \\rightarrow \\infty} a_n=+\\infty$. Hence we shall assume that $\\left\\{a_n\\right\\}$ is bounded above.\n\nLet $\\left\\{n_k\\right\\}$ be a subsequence of the positive integers such that $\\lim _{k \\rightarrow \\infty}\\left(a_{n_k}+\\right.$ $\\left.b_{n_k}\\right)=\\limsup _{n \\rightarrow \\infty}\\left(a_n+b_n\\right)$. Then choose a subsequence of the positive integers $\\left\\{k_m\\right\\}$ such that\n$$\n\\lim _{m \\rightarrow \\infty} a_{n_{k_m}}=\\limsup _{k \\rightarrow \\infty} a_{n_k} .\n$$\nThe subsequence $a_{n_{k_m}}+b_{n_{k_m}}$ still converges to the same limit as $a_{n_k}+b_{n_k}$, i.e., to $\\limsup _{n \\rightarrow \\infty}\\left(a_n+b_n\\right)$. Hence, since $a_{n_k}$ is bounded above (so that $\\limsup _{k \\rightarrow \\infty} a_{n_k}$ is finite), it follows that $b_{n_{k_m}}$ converges to the difference\n$$\n\\lim _{m \\rightarrow \\infty} b_{n_{k_m}}=\\lim _{m \\rightarrow \\infty}\\left(a_{n_{k_m}}+b_{n_{k_m}}\\right)-\\lim _{m \\rightarrow \\infty} a_{n_{k_m}} .\n$$\nThus we have proved that there exist subsequences $\\left\\{a_{n_{k_m}}\\right\\}$ and $\\left\\{b_{n_{k_m}}\\right\\}$ which converge to limits $a$ and $b$ respectively such that $a+b=\\limsup _{n \\rightarrow \\infty}\\left(a_n+b_n^*\\right)$. Since $a$ is the limit of a subsequence of $\\left\\{a_n\\right\\}$ and $b$ is the limit of a subsequence of $\\left\\{b_n\\right\\}$, it follows that $a \\leq \\limsup _{n \\rightarrow \\infty} a_n$ and $b \\leq \\limsup _{n \\rightarrow \\infty} b_n$, from which the desired inequality follows.\n\\end{proof}", "informal_proof": "If $r$ and $r+x$ were both rational, then $x=r+x-r$ would also be rational."} +{"name": "Rudin_exercise_3_6a", "source": "Rudin.lean", "header": "import Mathlib\n\nopen Topology Filter Real Complex TopologicalSpace Finset\nopen scoped BigOperators\nnoncomputable section\n", "formal_statement": "theorem Rudin_exercise_3_6a\n: Tendsto (λ (n : ℕ) => (∑ i ∈ range n, g i)) atTop atTop := sorry", "formal_proof": null, "informal_stmt": "Prove that $\\lim_{n \\rightarrow \\infty} \\sum_{i (∑ i ∈ (range n), a i)) atTop (𝓝 y))) :\n ∃ y, Tendsto (λ n => (∑ i ∈ (range n), sqrt (a i) / n)) atTop (𝓝 y) := sorry", "formal_proof": null, "informal_stmt": "Prove that the convergence of $\\Sigma a_{n}$ implies the convergence of $\\sum \\frac{\\sqrt{a_{n}}}{n}$ if $a_n\\geq 0$.\n\\begin{proof}\n Since $\\left(\\sqrt{a_n}-\\frac{1}{n}\\right)^2 \\geq 0$, it follows that\n$$\n\\frac{\\sqrt{a_n}}{n} \\leq \\frac{1}{2}\\left(a_n^2+\\frac{1}{n^2}\\right) .\n$$\nNow $\\Sigma a_n^2$ converges by comparison with $\\Sigma a_n$ (since $\\Sigma a_n$ converges, we have $a_n<1$ for large $n$, and hence $\\left.a_n^2 (∑ i ∈ (range n), a i)) atTop (𝓝 y)))\n (h2 : Monotone b)\n (h3 : Bornology.IsBounded (Set.range b)) :\n ∃ y, Tendsto (λ n => (∑ i ∈ (range n), (a i) * (b i))) atTop (𝓝 y) := sorry", "formal_proof": null, "informal_stmt": "If $\\Sigma a_{n}$ converges, and if $\\left\\{b_{n}\\right\\}$ is monotonic and bounded, prove that $\\Sigma a_{n} b_{n}$ converges.\n\\begin{proof}\n 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 $k=1,2, \\ldots$ Let $M$ be an upper bound for both $\\left|b_n\\right|$ and $\\left|S_n\\right|$, and let $S=\\sum a_n$ and $b=\\lim b_n$. Choose $N$ so large that the following three inequalities hold for all $m>N$ and $n>N$ :\n$$\n\\left|b_n S_n-b S\\right|<\\frac{\\varepsilon}{3} ; \\quad\\left|b_m S_m-b S\\right|<\\frac{\\varepsilon}{3} ; \\quad\\left|b_m-b_n\\right|<\\frac{\\varepsilon}{3 M} .\n$$\nThen if $n>m>N$, we have, from the formula for summation by parts,\n$$\n\\sum_{k=m+1}^n a_n b_n=b_n S_n-b_m S_m+\\sum_{k=m}^{n-1}\\left(b_k-b_{k+1}\\right) S_k\n$$\nOur assumptions yield immediately that $\\left|b_n S_n-b_m S_m\\right|<\\frac{2 \\varepsilon}{3}$, and\n$$\n\\left|\\sum_{k=m}^{n-1}\\left(b_k-b_{k+1}\\right) S_k\\right| \\leq M \\sum_{k=m}^{n-1}\\left|b_k-b_{k+1}\\right| .\n$$\nSince the sequence $\\left\\{b_n\\right\\}$ is monotonic, we have\n$$\n\\sum_{k=m}^{n-1}\\left|b_k-b_{k+1}\\right|=\\left|\\sum_{k=m}^{n-1}\\left(b_k-b_{k+1}\\right)\\right|=\\left|b_m-b_n\\right|<\\frac{\\varepsilon}{3 M},\n$$\nfrom which the desired inequality follows.\n\\end{proof}", "informal_proof": "If $r$ and $r+x$ were both rational, then $x=r+x-r$ would also be rational."} +{"name": "Rudin_exercise_3_13", "source": "Rudin.lean", "header": "import Mathlib\n\nopen Topology Filter Real Complex TopologicalSpace Finset\nopen scoped BigOperators\nnoncomputable section\n", "formal_statement": "theorem Rudin_exercise_3_13\n (a b : ℕ → ℝ)\n (ha : ∃ y, (Tendsto (λ n => (∑ i ∈ (range n), |a i|)) atTop (𝓝 y)))\n (hb : ∃ y, (Tendsto (λ n => (∑ i ∈ (range n), |b i|)) atTop (𝓝 y))) :\n ∃ y, (Tendsto (λ n => (∑ i ∈ (range n),\n λ i => (∑ j ∈ range (i + 1), a j * b (i - j)))) atTop (𝓝 y)) := sorry", "formal_proof": null, "informal_stmt": "Prove that the Cauchy product of two absolutely convergent series converges absolutely.\n\\begin{proof}\n Since both the hypothesis and conclusion refer to absolute convergence, we may assume both series consist of nonnegative terms. We let $S_n=\\sum_{k=0}^n a_n, T_n=\\sum_{k=0}^n b_n$, and $U_n=\\sum_{k=0}^n \\sum_{l=0}^k a_l b_{k-l}$. We need to show that $U_n$ remains bounded, given that $S_n$ and $T_n$ are bounded. To do this we make the convention that $a_{-1}=T_{-1}=0$, in order to save ourselves from having to separate off the first and last terms when we sum by parts. We then have\n$$\n\\begin{aligned}\nU_n &=\\sum_{k=0}^n \\sum_{l=0}^k a_l b_{k-l} \\\\\n&=\\sum_{k=0}^n \\sum_{l=0}^k a_l\\left(T_{k-l}-T_{k-l-1}\\right) \\\\\n&=\\sum_{k=0}^n \\sum_{j=0}^k a_{k-j}\\left(T_j-T_{j-1}\\right) \\\\\n&=\\sum_{k=0}^n \\sum_{j=0}^k\\left(a_{k-j}-a_{k-j-1}\\right) T_j \\\\\n&=\\sum_{j=0}^n \\sum_{k=j}^n\\left(a_{k-j}-a_{k-j-1}\\right) T_j\n&=\\sum_{j=0}^n a_{n-j} T_j \\\\\n&\\leq T \\sum_{m=0}^n a_m \\\\\n&=T S_n \\\\\n&\\leq S T .\n\\end{aligned}\n$$\nThus $U_n$ is bounded, and hence approaches a finite limit.\n\n\\end{proof}", "informal_proof": "If $r$ and $r+x$ were both rational, then $x=r+x-r$ would also be rational."} +{"name": "Rudin_exercise_3_20", "source": "Rudin.lean", "header": "import Mathlib\n\nopen Topology Filter Real Complex TopologicalSpace Finset\nopen scoped BigOperators\nnoncomputable section\n", "formal_statement": "theorem Rudin_exercise_3_20 {X : Type*} [MetricSpace X]\n (p : ℕ → X) (l : ℕ) (r : X)\n (hp : CauchySeq p)\n (hpl : Tendsto (λ n => p (l * n)) atTop (𝓝 r)) :\n Tendsto p atTop (𝓝 r) := sorry", "formal_proof": null, "informal_stmt": "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$.\n\\begin{proof}\n 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\n$$\nd\\left(p_n, p\\right) \\leq d\\left(p_n, p_{n_{N+1}}\\right)+d\\left(p_{n_{N+1}}, p\\right)<\\varepsilon\n$$\nFor the first term on the right is less than $\\frac{\\varepsilon}{2}$ since $n>N_1$ and $n_{N+1}>N+1>$ $N_1$. The second term is less than $\\frac{\\varepsilon}{2}$ by the choice of $N$.\n\\end{proof}", "informal_proof": "If $r$ and $r+x$ were both rational, then $x=r+x-r$ would also be rational."} +{"name": "Rudin_exercise_3_21", "source": "Rudin.lean", "header": "import Mathlib\n\nopen Topology Filter Real Complex TopologicalSpace Finset\nopen scoped BigOperators\nnoncomputable section\n", "formal_statement": "theorem Rudin_exercise_3_21\n {X : Type*} [MetricSpace X] [CompleteSpace X]\n (E : ℕ → Set X)\n (hE : ∀ n, E n ⊃ E (n + 1))\n (hE' : Tendsto (λ n => Metric.diam (E n)) atTop (𝓝 0)) :\n ∃ a, Set.iInter E = {a} := sorry", "formal_proof": null, "informal_stmt": "If $\\left\\{E_{n}\\right\\}$ is a sequence of closed nonempty and bounded sets in a complete metric space $X$, if $E_{n} \\supset E_{n+1}$, and if $\\lim _{n \\rightarrow \\infty} \\operatorname{diam} E_{n}=0,$ then $\\bigcap_{1}^{\\infty} E_{n}$ consists of exactly one point.\n\\begin{proof}\n Choose $x_n \\in E_n$. (We use the axiom of choice here.) The sequence $\\left\\{x_n\\right\\}$ is a Cauchy sequence, since the diameter of $E_n$ tends to zero as $n$ tends to infinity and $E_n$ contains $E_{n+1}$. Since the metric space $X$ is complete, the sequence $x_n$ converges to a point $x$, which must belong to $E_n$ for all $n$, since $E_n$ is closed and contains $x_m$ for all $m \\geq n$. There cannot be a second point $y$ in all of the $E_n$, since for any point $y \\neq x$ the diameter of $E_n$ is less $\\operatorname{than} d(x, y)$ for large $n$.\n\\end{proof}", "informal_proof": "If $r$ and $r+x$ were both rational, then $x=r+x-r$ would also be rational."} +{"name": "Rudin_exercise_3_22", "source": "Rudin.lean", "header": "import Mathlib\n\nopen Topology Filter Real Complex TopologicalSpace Finset\nopen scoped BigOperators\nnoncomputable section\n", "formal_statement": "theorem Rudin_exercise_3_22 (X : Type*) [MetricSpace X] [CompleteSpace X]\n (G : ℕ → Set X) (hG : ∀ n, IsOpen (G n) ∧ Dense (G n)) :\n ∃ x, ∀ n, x ∈ G n := sorry", "formal_proof": null, "informal_stmt": "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.\n\\begin{proof}\n 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$. Since $U \\backslash F_1$ is open, there exists $r_1>0$ such that $B_1$, defined as the open ball of radius $r_1$ about $x_1$, is contained in $U \\backslash F_1$. Let $E_1$ be the open ball of radius $\\frac{r_1}{2}$ about $x_1$, so that the closure of $E_1$ is contained in $B_1$. Now $F_2$ does not contain $E_1$, and so we can find a point $x_2 \\in E_1 \\backslash F_2$. Since $E_1 \\backslash F_2$ is an open set, there exists a positive number $r_2$ such that $B_2$, the open ball of radius $R_2$ about $x_2$, is contained in $E_1 \\backslash F_2$, which in turn is contained in $U \\backslash\\left(F_1 \\cup F_2\\right)$. We let $E_2$ be the open ball of radius $\\frac{r_2}{2}$ about $x_2$, so that $\\bar{E}_2 \\subseteq B_2$. Proceeding in this way, we construct a sequence of open balls $E_j$, such that $E_j \\supseteq \\bar{E}_{j+1}$, and the diameter of $E_j$ tends to zero. By the previous exercise, there is a point $x$ belonging to all the sets $\\bar{E}_j$, hence to all the sets $U \\backslash\\left(F_1 \\cup F_2 \\cup \\cdots \\cup F_n\\right)$. Thus the point $x$ belongs to $U \\cap\\left(\\cap_1^{\\infty} G_n\\right)$.\n\\end{proof}", "informal_proof": "If $r$ and $r+x$ were both rational, then $x=r+x-r$ would also be rational."} +{"name": "Rudin_exercise_4_1a", "source": "Rudin.lean", "header": "import Mathlib\n\nopen Topology Filter Real Complex TopologicalSpace Finset\nopen scoped BigOperators\nnoncomputable section\n", "formal_statement": "theorem Rudin_exercise_4_1a\n : ∃ (f : ℝ → ℝ), (∀ (x : ℝ), Tendsto (λ y => f (x + y) - f (x - y)) (𝓝 0) (𝓝 0)) ∧ ¬ Continuous f := sorry", "formal_proof": null, "informal_stmt": "Suppose $f$ is a real function defined on $\\mathbb{R}$ which satisfies $\\lim_{h \\rightarrow 0} f(x + h) - f(x - h) = 0$ for every $x \\in \\mathbb{R}$. Show that $f$ does not need to be continuous.\n\\begin{proof}\n $$\nf(x)= \\begin{cases}1 & \\text { if } x \\text { is an integer } \\\\ 0 & \\text { if } x \\text { is not an integer. }\\end{cases}\n$$\n(If $x$ is an integer, then $f(x+h)-f(x-h) \\equiv 0$ for all $h$; while if $x$ is not an integer, $f(x+h)-f(x-h)=0$ for $|h|<\\min (x-[x], 1+[x]-x)$.\n\\end{proof}", "informal_proof": "If $r$ and $r+x$ were both rational, then $x=r+x-r$ would also be rational."} +{"name": "Rudin_exercise_4_2a", "source": "Rudin.lean", "header": "import Mathlib\n\nopen Topology Filter Real Complex TopologicalSpace Finset\nopen scoped BigOperators\nnoncomputable section\n", "formal_statement": "theorem Rudin_exercise_4_2a\n {α : Type} [MetricSpace α]\n {β : Type} [MetricSpace β]\n (f : α → β)\n (h₁ : Continuous f)\n : ∀ (x : Set α), f '' (closure x) ⊆ closure (f '' x) := sorry", "formal_proof": null, "informal_stmt": "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$).\n\\begin{proof}\n 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(E)$. Since $O$ was any neighborhood of $f(x)$, it follows that $f(x) \\in \\overline{f(E)}$\n\\end{proof}", "informal_proof": "If $r$ and $r+x$ were both rational, then $x=r+x-r$ would also be rational."} +{"name": "Rudin_exercise_4_3", "source": "Rudin.lean", "header": "import Mathlib\n\nopen Topology Filter Real Complex TopologicalSpace Finset\nopen scoped BigOperators\nnoncomputable section\n", "formal_statement": "theorem Rudin_exercise_4_3\n {α : Type} [MetricSpace α]\n (f : α → ℝ) (h : Continuous f) (z : Set α) (g : z = f⁻¹' {0})\n : IsClosed z := sorry", "formal_proof": null, "informal_stmt": "Let $f$ be a continuous real function on a metric space $X$. Let $Z(f)$ (the zero set of $f$ ) be the set of all $p \\in X$ at which $f(p)=0$. Prove that $Z(f)$ is closed.\n\\begin{proof}\n $Z(f)=f^{-1}(\\{0\\})$, which is the inverse image of a closed set. Hence $Z(f)$ is closed.\n\\end{proof}", "informal_proof": "If $r$ and $r+x$ were both rational, then $x=r+x-r$ would also be rational."} +{"name": "Rudin_exercise_4_4a", "source": "Rudin.lean", "header": "import Mathlib\n\nopen Topology Filter Real Complex TopologicalSpace Finset\nopen scoped BigOperators\nnoncomputable section\n", "formal_statement": "theorem Rudin_exercise_4_4a\n {α : Type} [MetricSpace α]\n {β : Type} [MetricSpace β]\n (f : α → β)\n (s : Set α)\n (h₁ : Continuous f)\n (h₂ : Dense s)\n : f '' Set.univ ⊆ closure (f '' s) := sorry", "formal_proof": null, "informal_stmt": "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)$.\n\\begin{proof}\n To prove that $f(E)$ is dense in $f(X)$, simply use that $f(X)=f(\\bar{E}) \\subseteq \\overline{f(E)}$.\n\\end{proof}", "informal_proof": "If $r$ and $r+x$ were both rational, then $x=r+x-r$ would also be rational."} +{"name": "Rudin_exercise_4_4b", "source": "Rudin.lean", "header": "import Mathlib\n\nopen Topology Filter Real Complex TopologicalSpace Finset\nopen scoped BigOperators\nnoncomputable section\n", "formal_statement": "theorem Rudin_exercise_4_4b\n {α : Type} [MetricSpace α]\n {β : Type} [MetricSpace β]\n (f g : α → β)\n (s : Set α)\n (h₁ : Continuous f)\n (h₂ : Continuous g)\n (h₃ : Dense s)\n (h₄ : ∀ x ∈ s, f x = g x)\n : f = g := sorry", "formal_proof": null, "informal_stmt": "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 if $g(p) = f(p)$ for all $p \\in P$ then $g(p) = f(p)$ for all $p \\in X$.\n\\begin{proof}\n The function $\\varphi: X \\rightarrow R^1$ given by\n$$\n\\varphi(p)=d_Y(f(p), g(p))\n$$\nis continuous, since\n$$\n\\left|d_Y(f(p), g(p))-d_Y(f(q), g(q))\\right| \\leq d_Y(f(p), f(q))+d_Y(g(p), g(q))\n$$\n(This inequality follows from the triangle inequality, since\n$$\nd_Y(f(p), g(p)) \\leq d_Y(f(p), f(q))+d_Y(f(q), g(q))+d_Y(g(q), g(p)),\n$$\nand the same inequality holds with $p$ and $q$ interchanged. The absolute value $\\left|d_Y(f(p), g(p))-d_Y(f(q), g(q))\\right|$ must be either $d_Y(f(p), g(p))-d_Y(f(q), g(q))$ or $d_Y(f(q), g(q))-d_Y(f(p), g(p))$, and the triangle inequality shows that both of these numbers are at most $d_Y(f(p), f(q))+d_Y(g(p), g(q))$.)\nBy the previous problem, the zero set of $\\varphi$ is closed. But by definition\n$$\nZ(\\varphi)=\\{p: f(p)=g(p)\\} .\n$$\nHence the set of $p$ for which $f(p)=g(p)$ is closed. Since by hypothesis it is dense, it must be $X$.\n\\end{proof}", "informal_proof": "If $r$ and $r+x$ were both rational, then $x=r+x-r$ would also be rational."} +{"name": "Rudin_exercise_4_5a", "source": "Rudin.lean", "header": "import Mathlib\n\nopen Topology Filter Real Complex TopologicalSpace Finset\nopen scoped BigOperators\nnoncomputable section\n", "formal_statement": "theorem Rudin_exercise_4_5a\n (f : ℝ → ℝ)\n (E : Set ℝ)\n (h₁ : IsClosed E)\n (h₂ : ContinuousOn f E)\n : ∃ (g : ℝ → ℝ), Continuous g ∧ ∀ x ∈ E, f x = g x := sorry", "formal_proof": null, "informal_stmt": "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$.\n\\begin{proof}\nFollowing 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 $a$ and $b$ (if these last two points exist). Define $g(x)$ to be $f(b)$ for $x>b$ and $f(a)$ for $x0$. To choose $\\delta>0$ such that $|x-u|<\\delta$ implies $|g(x)-g(u)|<\\varepsilon$, we consider three cases.\ni. If $x>b$, let $\\delta=x-b$. Then if $|x-u|<\\delta$, it follows that $u>b$ also, so that $g(u)=f(b)=g(x)$, and $|g(u)-g(x)|=0<\\varepsilon$. Similarly if $xa_k+\\delta_1$. Let us consider the second of these cases and show how to get $|f(u)-f(x)|<\\varepsilon$ for $xx$ we have $a_k0$ be given. Choose $\\eta>0$ so that $d_Y(f(x), f(u))<\\frac{\\varepsilon}{2}$ if $d_E(x, y)<\\eta$. Then let $\\delta=\\min \\left(\\eta, \\frac{\\varepsilon}{2}\\right)$. It is easy to see that $\\rho(\\varphi(x), \\varphi(u))<\\varepsilon$ if $d_E(x, u)<\\delta$. Conversely if $\\varphi$ is continuous, it is obvious from the inequality $\\rho(\\varphi(x), \\varphi(u)) \\geq d_Y(f(x), f(u))$ that $f$ is continuous.\n\nFrom these facts we deduce immediately that the graph of a continuous function $f$ on a compact set $E$ is compact, being the image of $E$ under the continuous mapping $\\varphi$. Conversely, if $f$ is not continuous at some point $x$, there is a sequence of points $x_n$ converging to $x$ such that $f\\left(x_n\\right)$ does not converge to $f(x)$. If no subsequence of $f\\left(x_n\\right)$ converges, then the sequence $\\left\\{\\left(x_n, f\\left(x_n\\right)\\right\\}_{n=1}^{\\infty}\\right.$ has no convergent subsequence, and so the graph is not compact. If some subsequence of $f\\left(x_n\\right)$ converges, say $f\\left(x_{n_k}\\right) \\rightarrow z$, but $z \\neq f(x)$, then the graph of $f$ fails to contain the limit point $(x, z)$, and hence is not closed. A fortiori it is not compact.\n\\end{proof}", "informal_proof": "If $r$ and $r+x$ were both rational, then $x=r+x-r$ would also be rational."} +{"name": "Rudin_exercise_4_8a", "source": "Rudin.lean", "header": "import Mathlib\n\nopen Topology Filter Real Complex TopologicalSpace Finset\nopen scoped BigOperators\nnoncomputable section\n", "formal_statement": "theorem Rudin_exercise_4_8a\n (E : Set ℝ) (f : ℝ → ℝ) (hf : UniformContinuousOn f E)\n (hE : Bornology.IsBounded E) : Bornology.IsBounded (Set.image f E) := sorry", "formal_proof": null, "informal_stmt": "Let $f$ be a real uniformly continuous function on the bounded set $E$ in $R^{1}$. Prove that $f$ is bounded on $E$.\n\\begin{proof}\n Let $a=\\inf E$ and $b=\\sup E$, and let $\\delta>0$ be such that $|f(x)-f(y)|<1$ if $x, y \\in E$ and $|x-y|<\\delta$. Now choose a positive integer $N$ larger than $(b-a) / \\delta$, and consider the $N$ intervals $I_k=\\left[a+\\frac{k-1}{b-a}, a+\\frac{k}{b-a}\\right], k=1,2, \\ldots, N$. For each $k$ such that $I_k \\cap E \\neq \\varnothing$ let $x_k \\in E \\cap I_k$. Then let $M=1+\\max \\left\\{\\left|f\\left(x_k\\right)\\right|\\right\\}$. If $x \\in E$, we have $\\left|x-x_k\\right|<\\delta$ for some $k$, and hence $|f(x)| f (x n)) := sorry", "formal_proof": null, "informal_stmt": "Suppose $f$ is a uniformly continuous mapping of a metric space $X$ into a metric space $Y$ and prove that $\\left\\{f\\left(x_{n}\\right)\\right\\}$ is a Cauchy sequence in $Y$ for every Cauchy sequence $\\{x_n\\}$ in $X$.\n\\begin{proof}\n Suppose $\\left\\{x_n\\right\\}$ is a Cauchy sequence in $X$. Let $\\varepsilon>0$ be given. Let $\\delta>0$ be such that $d_Y(f(x), f(u))<\\varepsilon$ if $d_X(x, u)<\\delta$. Then choose $N$ so that $d_X\\left(x_n, x_m\\right)<\\delta$ if $n, m>N$. Obviously $d_Y\\left(f\\left(x_n\\right), f\\left(x_m\\right)\\right)<\\varepsilon$ if $m, n>N$, showing that $\\left\\{f\\left(x_n\\right)\\right\\}$ is a Cauchy sequence.\n\\end{proof}", "informal_proof": "If $r$ and $r+x$ were both rational, then $x=r+x-r$ would also be rational."} +{"name": "Rudin_exercise_4_12", "source": "Rudin.lean", "header": "import Mathlib\n\nopen Topology Filter Real Complex TopologicalSpace Finset\nopen scoped BigOperators\nnoncomputable section\n", "formal_statement": "theorem Rudin_exercise_4_12\n {α β γ : Type*} [UniformSpace α] [UniformSpace β] [UniformSpace γ]\n {f : α → β} {g : β → γ}\n (hf : UniformContinuous f) (hg : UniformContinuous g) :\n UniformContinuous (g ∘ f) := sorry", "formal_proof": null, "informal_stmt": "A uniformly continuous function of a uniformly continuous function is uniformly continuous.\n\\begin{proof}\n 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$.\nTo prove this fact, let $\\varepsilon>0$ be given. Then, since $g$ is uniformly continuous, there exists $\\eta>0$ such that $d_Z(g(u), g(v))<\\varepsilon$ if $d_Y(u, v)<\\eta$. Since $f$ is uniformly continuous, there exists $\\delta>0$ such that $d_Y(f(x), f(y))<\\eta$ if $d_X(x, y)<\\delta$\n\nIt is then obvious that $d_Z(g(f(x)), g(f(y)))<\\varepsilon$ if $d_X(x, y)<\\delta$, so that $g \\circ f$ is uniformly continuous.\n\\end{proof}", "informal_proof": "If $r$ and $r+x$ were both rational, then $x=r+x-r$ would also be rational."} +{"name": "Rudin_exercise_4_15", "source": "Rudin.lean", "header": "import Mathlib\n\nopen Topology Filter Real Complex TopologicalSpace Finset\nopen scoped BigOperators\nnoncomputable section\n", "formal_statement": "theorem Rudin_exercise_4_15 {f : ℝ → ℝ}\n (hf : Continuous f) (hof : IsOpenMap f) :\n Monotone f := sorry", "formal_proof": null, "informal_stmt": "Prove that every continuous open mapping of $R^{1}$ into $R^{1}$ is monotonic.\n\\begin{proof}\n Suppose $f$ is continuous and not monotonic, say there exist points $a 0 ∧ ∀ (p q : X), p ∈ K → q ∈ F → dist p q ≥ δ := sorry", "formal_proof": null, "informal_stmt": "Suppose $K$ and $F$ are disjoint sets in a metric space $X, K$ is compact, $F$ is closed. Prove that there exists $\\delta>0$ such that $d(p, q)>\\delta$ if $p \\in K, q \\in F$.\n\\begin{proof}\nFollowing the hint, we observe that $\\rho_F(x)$ must attain its minimum value on $K$, i.e., there is some point $r \\in K$ such that\n$$\n\\rho_F(r)=\\min _{q \\in K} \\rho_F(q) .\n$$\nSince $F$ is closed and $r \\notin F$, it follows from Exercise $4.20$ that $\\rho_F(r)>0$. Let $\\delta$ be any positive number smaller than $\\rho_F(r)$. Then for any $p \\in F, q \\in K$, we have\n$$\nd(p, q) \\geq \\rho_F(q) \\geq \\rho_F(r)>\\delta .\n$$\nThis proves the positive assertion.\n\\end{proof}", "informal_proof": "If $r$ and $r+x$ were both rational, then $x=r+x-r$ would also be rational."} +{"name": "Rudin_exercise_4_24", "source": "Rudin.lean", "header": "import Mathlib\n\nopen Topology Filter Real Complex TopologicalSpace Finset\nopen scoped BigOperators\nnoncomputable section\n", "formal_statement": "theorem Rudin_exercise_4_24 {f : ℝ → ℝ}\n (hf : Continuous f) (a b : ℝ) (hab : a < b)\n (h : ∀ x y : ℝ, a < x → x < b → a < y → y < b → f ((x + y) / 2) ≤ (f x + f y) / 2) :\n ConvexOn ℝ (Set.Ioo a b) f := sorry", "formal_proof": null, "informal_stmt": "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.\n\\begin{proof}\n We shall prove that\n$$\nf(\\lambda x+(1-\\lambda) y) \\leq \\lambda f(x)+(1-\\lambda) f(y)\n$$\nfor 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 (since $\\lambda=0$ or $\\lambda=1$ ). In the case $n=1$ we have $\\lambda=0$ or $\\lambda=1$ or $\\lambda=\\frac{1}{2}$. The first two cases are again trivial, and the third is precisely the hypothesis of the theorem. Suppose the result is proved for $n \\leq r$, and consider $\\lambda=\\frac{k}{2^{r+1}}$. If $k$ is even, say $k=2 l$, then $\\frac{k}{2^{r+1}}=\\frac{l}{2^r}$, and we can appeal to the induction hypothesis. Now suppose $k$ is odd. Then $1 \\leq k \\leq 2^{r+1}-1$, and so the numbers $l=\\frac{k-1}{2}$ and $m=\\frac{k+1}{2}$ are integers with $0 \\leq l c := sorry", "formal_proof": null, "informal_stmt": "Let $f$ be defined for all real $x$, and suppose that $|f(x)-f(y)| \\leq (x-y)^{2}$ for all real $x$ and $y$. Prove that $f$ is constant.\n\\begin{proof}\n Dividing by $x-y$, and letting $x \\rightarrow y$, we find that $f^{\\prime}(y)=0$ for all $y$. Hence $f$ is constant.\n\\end{proof}", "informal_proof": "If $r$ and $r+x$ were both rational, then $x=r+x-r$ would also be rational."} +{"name": "Rudin_exercise_5_2", "source": "Rudin.lean", "header": "import Mathlib\n\nopen Topology Filter Real Complex TopologicalSpace Finset\nopen scoped BigOperators\nnoncomputable section\n", "formal_statement": "theorem Rudin_exercise_5_2 {a b : ℝ}\n {f g : ℝ → ℝ} (hf : ∀ x ∈ Set.Ioo a b, deriv f x > 0)\n (hg : g = f⁻¹)\n (hg_diff : DifferentiableOn ℝ g (Set.Ioo a b)) :\n DifferentiableOn ℝ g (Set.Ioo a b) ∧\n ∀ x ∈ Set.Ioo a b, deriv g x = 1 / deriv f x := sorry", "formal_proof": null, "informal_stmt": "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(a0$. Hence $f(c)0$ there exists $\\eta>0$ such that\n$$\n\\left|\\frac{1}{\\frac{f(x+h)-f(x)}{h}}-\\frac{1}{f^{\\prime}(x)}\\right|<\\varepsilon\n$$\nif $0<|h|<\\eta$. Since $h=g(y+k)-g(y)$, there exists $\\delta>0$ such that $0<|h|<\\eta$ if $0<|k|<\\delta$. The proof is now complete. \n\\end{proof}", "informal_proof": "If $r$ and $r+x$ were both rational, then $x=r+x-r$ would also be rational."} +{"name": "Rudin_exercise_5_3", "source": "Rudin.lean", "header": "import Mathlib\n\nopen Topology Filter Real Complex TopologicalSpace Finset\nopen scoped BigOperators\nnoncomputable section\n", "formal_statement": "theorem Rudin_exercise_5_3 {g : ℝ → ℝ} (hg : Continuous g)\n (hg' : ∃ M : ℝ, ∀ x : ℝ, |deriv g x| ≤ M) :\n ∃ N, ∀ ε > 0, ε < N → Function.Injective (λ x : ℝ => x + ε * g x) := sorry", "formal_proof": null, "informal_stmt": "Suppose $g$ is a real function on $R^{1}$, with bounded derivative (say $\\left|g^{\\prime}\\right| \\leq M$ ). Fix $\\varepsilon>0$, and define $f(x)=x+\\varepsilon g(x)$. Prove that $f$ is one-to-one if $\\varepsilon$ is small enough.\n\\begin{proof}\n If $0<\\varepsilon<\\frac{1}{M}$, we certainly have\n$$\nf^{\\prime}(x) \\geq 1-\\varepsilon M>0,\n$$\nand this implies that $f(x)$ is one-to-one, by the preceding problem.\n\\end{proof}", "informal_proof": "If $r$ and $r+x$ were both rational, then $x=r+x-r$ would also be rational."} +{"name": "Rudin_exercise_5_4", "source": "Rudin.lean", "header": "import Mathlib\n\nopen Topology Filter Real Complex TopologicalSpace Finset\nopen scoped BigOperators\nnoncomputable section\n", "formal_statement": "theorem Rudin_exercise_5_4 {n : ℕ}\n (C : ℕ → ℝ)\n (hC : ∑ i ∈ (range (n + 1)), (C i) / (i + 1) = 0) :\n ∃ x, x ∈ (Set.Icc (0 : ℝ) 1) ∧ ∑ i ∈ range (n + 1), (C i) * (x^i) = 0 := sorry", "formal_proof": null, "informal_stmt": "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.\n\\begin{proof}\n Consider the polynomial\n$$\np(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},\n$$\nwhose derivative is\n$$\np^{\\prime}(x)=C_0+C_1 x+\\cdots+C_{n-1} x^{n-1}+C_n x^n .\n$$\nIt is obvious that $p(0)=0$, and the hypothesis of the problem is that $p(1)=0$. Hence Rolle's theorem implies that $p^{\\prime}(x)=0$ for some $x$ between 0 and 1 .\n\\end{proof}", "informal_proof": "If $r$ and $r+x$ were both rational, then $x=r+x-r$ would also be rational."} +{"name": "Rudin_exercise_5_5", "source": "Rudin.lean", "header": "import Mathlib\n\nopen Topology Filter Real Complex TopologicalSpace Finset\nopen scoped BigOperators\nnoncomputable section\n", "formal_statement": "theorem Rudin_exercise_5_5\n {f : ℝ → ℝ}\n (hfd : Differentiable ℝ f)\n (hf : Tendsto (deriv f) atTop (𝓝 0)) :\n Tendsto (λ x => f (x + 1) - f x) atTop atTop := sorry", "formal_proof": null, "informal_stmt": "Suppose $f$ is defined and differentiable for every $x>0$, and $f^{\\prime}(x) \\rightarrow 0$ as $x \\rightarrow+\\infty$. Put $g(x)=f(x+1)-f(x)$. Prove that $g(x) \\rightarrow 0$ as $x \\rightarrow+\\infty$.\n\\begin{proof}\n Let $\\varepsilon>0$. Choose $x_0$ such that $\\left|f^{\\prime}(x)\\right|<\\varepsilon$ if $x>x_0$. Then for any $x \\geq x_0$ there exists $x_1 \\in(x, x+1)$ such that\n$$\nf(x+1)-f(x)=f^{\\prime}\\left(x_1\\right) .\n$$\nSince $\\left|f^{\\prime}\\left(x_1\\right)\\right|<\\varepsilon$, it follows that $|f(x+1)-f(x)|<\\varepsilon$, as required.\n\\end{proof}", "informal_proof": "If $r$ and $r+x$ were both rational, then $x=r+x-r$ would also be rational."} +{"name": "Rudin_exercise_5_6", "source": "Rudin.lean", "header": "import Mathlib\n\nopen Topology Filter Real Complex TopologicalSpace Finset\nopen scoped BigOperators\nnoncomputable section\n", "formal_statement": "theorem Rudin_exercise_5_6\n {f : ℝ → ℝ}\n (hf1 : Continuous f)\n (hf2 : ∀ x, DifferentiableAt ℝ f x)\n (hf3 : f 0 = 0)\n (hf4 : Monotone (deriv f)) :\n MonotoneOn (λ x => f x / x) (Set.Ioi 0) := sorry", "formal_proof": null, "informal_stmt": "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.\n\\begin{proof}\n Put\n$$\ng(x)=\\frac{f(x)}{x} \\quad(x>0)\n$$\nand prove that $g$ is monotonically increasing.\nBy the mean-value theorem\n$$\nf(x)=f(x)-f(0)=f^{\\prime}(c) x\n$$\nfor some $c \\in(0, x)$. Since $f^{\\prime}$ is monotonically increasing, this result implies that $f(x)0,\n$$\nso that $g$ is also monotonically increasing.\n\\end{proof}", "informal_proof": "If $r$ and $r+x$ were both rational, then $x=r+x-r$ would also be rational."} +{"name": "Rudin_exercise_5_7", "source": "Rudin.lean", "header": "import Mathlib\n\nopen Topology Filter Real Complex TopologicalSpace Finset\nopen scoped BigOperators\nnoncomputable section\n", "formal_statement": "theorem Rudin_exercise_5_7\n {f g : ℝ → ℝ} {x : ℝ}\n (hf' : DifferentiableAt ℝ f 0)\n (hg' : DifferentiableAt ℝ g 0)\n (hg'_ne_0 : deriv g 0 ≠ 0)\n (f0 : f 0 = 0) (g0 : g 0 = 0) :\n Tendsto (λ x => f x / g x) (𝓝 x) (𝓝 (deriv f x / deriv g x)) := sorry", "formal_proof": null, "informal_stmt": "Suppose $f^{\\prime}(x), g^{\\prime}(x)$ exist, $g^{\\prime}(x) \\neq 0$, and $f(x)=g(x)=0$. Prove that $\\lim _{t \\rightarrow x} \\frac{f(t)}{g(t)}=\\frac{f^{\\prime}(x)}{g^{\\prime}(x)}.$\n\\begin{proof}\n Since $f(x)=g(x)=0$, we have\n$$\n\\begin{aligned}\n\\lim _{t \\rightarrow x} \\frac{f(t)}{g(t)} &=\\lim _{t \\rightarrow x} \\frac{\\frac{f(t)-f(x)}{t-x}}{\\frac{g(t)-g(x)}{t-x}} \\\\\n&=\\frac{\\lim _{t \\rightarrow x} \\frac{f(t)-f(x)}{t-x}}{\\lim _{t \\rightarrow x} \\frac{g(t)-g(x)}{t-x}} \\\\\n&=\\frac{f^{\\prime}(x)}{g^{\\prime}(x)}\n\\end{aligned}\n$$\n\\end{proof}", "informal_proof": "If $r$ and $r+x$ were both rational, then $x=r+x-r$ would also be rational."} +{"name": "Rudin_exercise_5_15", "source": "Rudin.lean", "header": "import Mathlib\n\nopen Topology Filter Real Complex TopologicalSpace Finset\nopen scoped BigOperators\nnoncomputable section\n", "formal_statement": "theorem Rudin_exercise_5_15 {f : ℝ → ℝ} (a M0 M1 M2 : ℝ)\n (hf' : DifferentiableOn ℝ f (Set.Ici a))\n (hf'' : DifferentiableOn ℝ (deriv f) (Set.Ici a))\n (hM0 : M0 = sSup {(|f x|) | x ∈ (Set.Ici a)})\n (hM1 : M1 = sSup {(|deriv f x|) | x ∈ (Set.Ici a)})\n (hM2 : M2 = sSup {(|deriv (deriv f) x|) | x ∈ (Set.Ici a)}) :\n (M1 ^ 2) ≤ 4 * M0 * M2 := sorry", "formal_proof": null, "informal_stmt": "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} .$\n\\begin{proof}\n 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\n$$\n\\left|f^{\\prime}(x)\\right| \\leq 2 \\sqrt{M_0 M_2}\n$$\nfor all $x>a$. We note that this is obvious if $M_2=0$, since in that case $f^{\\prime}(x)$ is constant, $f(x)$ is a linear function, and the only bounded linear function is a constant, whose derivative is zero. Hence we shall assume from now on that $0-1$. Now $f^{\\prime}(x)=\\frac{4 x}{\\left(x^2+1\\right)^2}$ for $x>0$ and $f^{\\prime}(x)=4 x$ for $x<0$. It thus follows from Exercise 9 above that $f^{\\prime}(0)=0$, and that $f^{\\prime}(x)$ is continuous. Likewise $f^{\\prime \\prime}(x)=4$ for $x<0$ and $f^{\\prime \\prime}(x)=\\frac{4-4 x^2}{\\left(x^2+1\\right)^3}=-4 \\frac{x^2-1}{\\left(x^2+1\\right)^3}$. This shows that $\\left|f^{\\prime \\prime}(x)\\right|<4$ for $x>0$ and also that $\\lim _{x \\rightarrow 0} f^{\\prime \\prime}(x)=4$. Hence Exercise 9 again implies that $f^{\\prime \\prime}(x)$ is continuous and $f^{\\prime \\prime}(0)=4$.\n\nOn $n$-dimensional space let $\\mathbf{f}(x)=\\left(f_1(x), \\ldots, f_n(x)\\right), M_0=\\sup |\\mathbf{f}(x)|$, $M_1=\\sup \\left|\\mathbf{f}^{\\prime}(x)\\right|$, and $M_2=\\sup \\left|\\mathbf{f}^{\\prime \\prime}(x)\\right|$. Just as in the numerical case, there is nothing to prove if $M_2=0$ or $M_0=+\\infty$ or $M_2=+\\infty$, and so we assume $0a$, and let $\\mathbf{u}=\\frac{1}{\\left|\\mathbf{f}^{\\prime}\\left(x_0\\right)\\right|} \\mathbf{f}^{\\prime}\\left(x_0\\right)$. Consider the real-valued function $\\varphi(x)=\\mathrm{u} \\cdot \\mathrm{f}(x)$. Let $N_0, N_1$, and $N_2$ be the suprema of $|\\varphi(x)|,\\left|\\varphi^{\\prime}(x)\\right|$, and $\\left|\\varphi^{\\prime \\prime}(x)\\right|$ respectively. By the Schwarz inequality we have (since $|\\mathbf{u}|=1) N_0 \\leq M_0$ and $N_2 \\leq M_2$, while $N_1 \\geq \\varphi\\left(x_0\\right)=\\left|\\mathbf{f}^{\\prime}\\left(x_0\\right)\\right|>a$. We therefore have $a^2<4 N_0 N_2 \\leq 4 M_0 M_2$. Since $a$ was any positive number less than $M_1$, we have $M_1^2 \\leq 4 M_0 M_2$, i.e., the result holds also for vector-valued functions.\n\nEquality can hold on any $R^n$, as we see by taking $\\mathbf{f}(x)=(f(x), 0, \\ldots, 0)$ or $\\mathbf{f}(x)=(f(x), f(x), \\ldots, f(x))$, where $f(x)$ is a real-valued function for which equality holds.\n\n\\end{proof}", "informal_proof": "If $r$ and $r+x$ were both rational, then $x=r+x-r$ would also be rational."} +{"name": "Rudin_exercise_5_17", "source": "Rudin.lean", "header": "import Mathlib\n\nopen Topology Filter Real Complex TopologicalSpace Finset\nopen scoped BigOperators\nnoncomputable section\n", "formal_statement": "theorem Rudin_exercise_5_17\n {f : ℝ → ℝ}\n (hf' : DifferentiableOn ℝ f (Set.Icc (-1) 1))\n (hf'' : DifferentiableOn ℝ (deriv f) (Set.Icc 1 1))\n (hf''' : DifferentiableOn ℝ (deriv (deriv f)) (Set.Icc 1 1))\n (hf0 : f (-1) = 0)\n (hf1 : f 0 = 0)\n (hf2 : f 1 = 1)\n (hf3 : deriv f 0 = 0) :\n ∃ x, x ∈ Set.Ioo (-1 : ℝ) 1 ∧ deriv (deriv (deriv f)) x ≥ 3 := sorry", "formal_proof": null, "informal_stmt": "Suppose $f$ is a real, three times differentiable function on $[-1,1]$, such that $f(-1)=0, \\quad f(0)=0, \\quad f(1)=1, \\quad f^{\\prime}(0)=0 .$ Prove that $f^{(3)}(x) \\geq 3$ for some $x \\in(-1,1)$.\n\\begin{proof}\n Following the hint, we observe that Theorem $5.15$ (Taylor's formula with remainder) implies that\n$$\n\\begin{aligned}\nf(1) &=f(0)+f^{\\prime}(0)+\\frac{1}{2} f^{\\prime \\prime}(0)+\\frac{1}{6} f^{(3)}(s) \\\\\nf(-1) &=f(0)-f^{\\prime}(0)+\\frac{1}{2} f^{\\prime \\prime}(0)-\\frac{1}{6} f^{(3)}(t)\n\\end{aligned}\n$$\nfor some $s \\in(0,1), t \\in(-1,0)$. By subtracting the second equation from the first and using the given values of $f(1), f(-1)$, and $f^{\\prime}(0)$, we obtain\n$$\n1=\\frac{1}{6}\\left(f^{(3)}(s)+f^{(3)}(t)\\right),\n$$\nwhich is the desired result. Note that we made no use of the hypothesis $f(0)=0$.\n\\end{proof}\n\n\n\n\\end{document}", "informal_proof": "If $r$ and $r+x$ were both rational, then $x=r+x-r$ would also be rational."} +{"name": "Putnam_exercise_2020_b5", "source": "Putnam.lean", "header": "import Mathlib\n\nopen scoped BigOperators\n", "formal_statement": "theorem Putnam_exercise_2020_b5 (z : Fin 4 → ℂ) (hz0 : ∀ n, ‖z n‖ < 1)\n (hz1 : ∀ n : Fin 4, z n ≠ 1) :\n 3 - z 0 - z 1 - z 2 - z 3 + (z 0) * (z 1) * (z 2) * (z 3) ≠ 0 := sorry", "formal_proof": null, "informal_stmt": "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 .$\n\\begin{proof}\n 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.\n\nTo this end, let $z_1=e^{\\alpha i}, z_2=e^{\\beta i}, z_3=e^{\\gamma i}$ and \n\\[\nf(\\alpha, \\beta, \\gamma)=|3-z_1-z_2-z_3|^2-|1-z_1z_2z_3|^2.\n\\]\n A routine calculation shows that \n\\begin{align*}\nf(\\alpha, \\beta, \\gamma)&=\n10 - 6\\cos(\\alpha) - 6\\cos(\\beta) - 6\\cos(\\gamma) \\\\\n&\\quad + 2\\cos(\\alpha + \\beta + \\gamma) + 2\\cos(\\alpha - \\beta) \\\\\n&\\quad + 2\\cos(\\beta - \\gamma) + 2\\cos(\\gamma - \\alpha).\n\\end{align*}\nSince the function $f$ is continuously differentiable, and periodic in each variable, $f$ has a maximum and a minimum and it attains these values only at points where $\\nabla f=(0,0,0)$. A routine calculation now shows that \n\\begin{align*}\n\\frac{\\partial f}{\\partial \\alpha} + \\frac{\\partial f}{\\partial \\beta} + \\frac{\\partial f}{\\partial \\gamma} &=\n6(\\sin(\\alpha) +\\sin(\\beta)+\\sin(\\gamma)- \\sin(\\alpha + \\beta + \\gamma)) \\\\\n&=\n24\\sin\\left(\\frac{\\alpha+\\beta}{2}\\right) \\sin\\left(\\frac{\\beta+\\gamma}{2}\\right)\n\\sin\\left(\\frac{\\gamma+\\alpha}{2}\\right).\n\\end{align*}\nHence every critical point of $f$ must satisfy one of $z_1z_2=1$, $z_2z_3=1$, or $z_3z_1=1$. By symmetry, let us assume that $z_1z_2=1$. Then \n\\[\nf = |3-2\\mathrm{Re}(z_1)-z_3|^2-|1-z_3|^2;\n\\]\nsince $3-2\\mathrm{Re}(z_1)\\ge 1$, $f$ is nonnegative and can be zero only if the real part of $z_1$, and hence also $z_1$ itself, is equal to $1$. \n\\end{proof}", "informal_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_2-z_3|^2-|1-z_1z_2z_3|^2. \\] A routine calculation shows that \\begin{align*} f(\\alpha, \\beta, \\gamma)&= 10 - 6\\cos(\\alpha) - 6\\cos(\\beta) - 6\\cos(\\gamma) \\\\ &\\quad + 2\\cos(\\alpha + \\beta + \\gamma) + 2\\cos(\\alpha - \\beta) \\\\ &\\quad + 2\\cos(\\beta - \\gamma) + 2\\cos(\\gamma - \\alpha). \\end{align*} Since the function $f$ is continuously differentiable, and periodic in each variable, $f$ has a maximum and a minimum and it attains these values only at points where $\\nabla f=(0,0,0)$. A routine calculation now shows that \\begin{align*} \\frac{\\partial f}{\\partial \\alpha} + \\frac{\\partial f}{\\partial \\beta} + \\frac{\\partial f}{\\partial \\gamma} &= 6(\\sin(\\alpha) +\\sin(\\beta)+\\sin(\\gamma)- \\sin(\\alpha + \\beta + \\gamma)) \\\\ &= 24\\sin\\left(\\frac{\\alpha+\\beta}{2}\\right) \\sin\\left(\\frac{\\beta+\\gamma}{2}\\right) \\sin\\left(\\frac{\\gamma+\\alpha}{2}\\right). \\end{align*} Hence every critical point of $f$ must satisfy one of $z_1z_2=1$, $z_2z_3=1$, or $z_3z_1=1$. By symmetry, let us assume that $z_1z_2=1$. Then \\[ f = |3-2\\mathrm{Re}(z_1)-z_3|^2-|1-z_3|^2; \\] since $3-2\\mathrm{Re}(z_1)\\ge 1$, $f$ is nonnegative and can be zero only if the real part of $z_1$, and hence also $z_1$ itself, is equal to $1$."} +{"name": "Putnam_exercise_2018_a5", "source": "Putnam.lean", "header": "import Mathlib\n\nopen scoped BigOperators\n", "formal_statement": "theorem Putnam_exercise_2018_a5 (f : ℝ → ℝ) (hf : ContDiff ℝ ⊤ f)\n (hf0 : f 0 = 0) (hf1 : f 1 = 1) (hf2 : ∀ x, f x ≥ 0) :\n ∃ (n : ℕ) (x : ℝ), iteratedDeriv n f x = 0 := sorry", "formal_proof": null, "informal_stmt": "Let $f: \\mathbb{R} \\rightarrow \\mathbb{R}$ be an infinitely differentiable function satisfying $f(0)=0, f(1)=1$, and $f(x) \\geq 0$ for all $x \\in$ $\\mathbb{R}$. Show that there exist a positive integer $n$ and a real number $x$ such that $f^{(n)}(x)<0$.\n\\begin{proof}\n Call a function $f\\colon \\mathbb{R} \\to \\mathbb{R}$ \\textit{ultraconvex} if $f$ is infinitely differentiable and $f^{(n)}(x) \\geq 0$ for all $n \\geq 0$ and all $x \\in \\mathbb{R}$, where $f^{(0)}(x) = f(x)$;\nnote that if $f$ is ultraconvex, then so is $f'$.\nDefine the set\n\\[\nS = \\{ f :\\thinspace \\mathbb{R} \\to \\mathbb{R} \\,|\\,f \\text{ ultraconvex and } f(0)=0\\}.\n\\]\nFor $f \\in S$, we must have $f(x) = 0$ for all $x < 0$: if $f(x_0) > 0$ for some $x_0 < 0$, then\nby the mean value theorem there exists $x \\in (0,x_0)$ for which $f'(x) = \\frac{f(x_0)}{x_0} < 0$.\nIn particular, $f'(0) = 0$, so $f' \\in S$ also.\n\nWe show by induction that for all $n \\geq 0$,\n\\[\nf(x) \\leq \\frac{f^{(n)}(1)}{n!} x^n \\qquad (f \\in S, x \\in [0,1]).\n\\]\nWe induct with base case $n=0$, which holds because any $f \\in S$ is nondecreasing. Given the claim for $n=m$,\nwe apply the induction hypothesis to $f' \\in S$ to see that\n\\[\nf'(t) \\leq \\frac{f^{(n+1)}(1)}{n!} t^n \\qquad (t \\in [0,1]),\n\\]\nthen integrate both sides from $0$ to $x$ to conclude.\n\nNow for $f \\in S$, we have $0 \\leq f(1) \\leq \\frac{f^{(n)}(1)}{n!}$ for all $n \\geq 0$. \nOn the other hand, by Taylor's theorem with remainder,\n\\[\nf(x) \\geq \\sum_{k=0}^n \\frac{f^{(k)}(1)}{k!}(x-1)^k \\qquad (x \\geq 1).\n\\]\nApplying this with $x=2$, we obtain $f(2) \\geq \\sum_{k=0}^n \\frac{f^{(k)}(1)}{k!}$ for all $n$;\nthis implies that $\\lim_{n\\to\\infty} \\frac{f^{(n)}(1)}{n!} = 0$.\nSince $f(1) \\leq \\frac{f^{(n)}(1)}{n!}$, we must have $f(1) = 0$.\n\nFor $f \\in S$, we proved earlier that $f(x) = 0$ for all $x\\leq 0$, as well as for $x=1$. Since\nthe function $g(x) = f(cx)$ is also ultraconvex for $c>0$, we also have $f(x) = 0$ for all $x>0$;\nhence $f$ is identically zero.\n\nTo sum up, if $f\\colon \\mathbb{R} \\to \\mathbb{R}$ is infinitely differentiable, $f(0)=0$, and $f(1) = 1$,\nthen $f$ cannot be ultraconvex. This implies the desired result.\n\\end{proof}", "informal_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_2-z_3|^2-|1-z_1z_2z_3|^2. \\] A routine calculation shows that \\begin{align*} f(\\alpha, \\beta, \\gamma)&= 10 - 6\\cos(\\alpha) - 6\\cos(\\beta) - 6\\cos(\\gamma) \\\\ &\\quad + 2\\cos(\\alpha + \\beta + \\gamma) + 2\\cos(\\alpha - \\beta) \\\\ &\\quad + 2\\cos(\\beta - \\gamma) + 2\\cos(\\gamma - \\alpha). \\end{align*} Since the function $f$ is continuously differentiable, and periodic in each variable, $f$ has a maximum and a minimum and it attains these values only at points where $\\nabla f=(0,0,0)$. A routine calculation now shows that \\begin{align*} \\frac{\\partial f}{\\partial \\alpha} + \\frac{\\partial f}{\\partial \\beta} + \\frac{\\partial f}{\\partial \\gamma} &= 6(\\sin(\\alpha) +\\sin(\\beta)+\\sin(\\gamma)- \\sin(\\alpha + \\beta + \\gamma)) \\\\ &= 24\\sin\\left(\\frac{\\alpha+\\beta}{2}\\right) \\sin\\left(\\frac{\\beta+\\gamma}{2}\\right) \\sin\\left(\\frac{\\gamma+\\alpha}{2}\\right). \\end{align*} Hence every critical point of $f$ must satisfy one of $z_1z_2=1$, $z_2z_3=1$, or $z_3z_1=1$. By symmetry, let us assume that $z_1z_2=1$. Then \\[ f = |3-2\\mathrm{Re}(z_1)-z_3|^2-|1-z_3|^2; \\] since $3-2\\mathrm{Re}(z_1)\\ge 1$, $f$ is nonnegative and can be zero only if the real part of $z_1$, and hence also $z_1$ itself, is equal to $1$."} +{"name": "Putnam_exercise_2018_b2", "source": "Putnam.lean", "header": "import Mathlib\n\nopen scoped BigOperators\n", "formal_statement": "theorem Putnam_exercise_2018_b2 (n : ℕ) (hn : n > 0) (f : ℕ → ℂ → ℂ)\n (hf : ∀ n : ℕ, f n = λ (z : ℂ) => (∑ i : Fin n, (n-i)* z^(i : ℕ))) :\n ¬ (∃ z : ℂ, ‖z‖ ≤ 1 ∧ f n z = 0) := sorry", "formal_proof": null, "informal_stmt": "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\\}$.\n\\begin{proof}\n Note first that $f_n(1) > 0$, so $1$ is not a root of $f_n$.\nNext, note that\n\\[\n(z-1)f_n(z) = z^n + \\cdots + z - n;\n\\]\nhowever, for $\\left| z \\right| \\leq 1$, we have \n$\\left| z^n + \\cdots + z \\right| \\leq n$ by the triangle inequality;\nequality can only occur if $z,\\dots,z^n$ have norm 1 and the same argument, which only happens for $z=1$.\nThus there can be no root of $f_n$ with $|z| \\leq 1$.\n\\end{proof}", "informal_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_2-z_3|^2-|1-z_1z_2z_3|^2. \\] A routine calculation shows that \\begin{align*} f(\\alpha, \\beta, \\gamma)&= 10 - 6\\cos(\\alpha) - 6\\cos(\\beta) - 6\\cos(\\gamma) \\\\ &\\quad + 2\\cos(\\alpha + \\beta + \\gamma) + 2\\cos(\\alpha - \\beta) \\\\ &\\quad + 2\\cos(\\beta - \\gamma) + 2\\cos(\\gamma - \\alpha). \\end{align*} Since the function $f$ is continuously differentiable, and periodic in each variable, $f$ has a maximum and a minimum and it attains these values only at points where $\\nabla f=(0,0,0)$. A routine calculation now shows that \\begin{align*} \\frac{\\partial f}{\\partial \\alpha} + \\frac{\\partial f}{\\partial \\beta} + \\frac{\\partial f}{\\partial \\gamma} &= 6(\\sin(\\alpha) +\\sin(\\beta)+\\sin(\\gamma)- \\sin(\\alpha + \\beta + \\gamma)) \\\\ &= 24\\sin\\left(\\frac{\\alpha+\\beta}{2}\\right) \\sin\\left(\\frac{\\beta+\\gamma}{2}\\right) \\sin\\left(\\frac{\\gamma+\\alpha}{2}\\right). \\end{align*} Hence every critical point of $f$ must satisfy one of $z_1z_2=1$, $z_2z_3=1$, or $z_3z_1=1$. By symmetry, let us assume that $z_1z_2=1$. Then \\[ f = |3-2\\mathrm{Re}(z_1)-z_3|^2-|1-z_3|^2; \\] since $3-2\\mathrm{Re}(z_1)\\ge 1$, $f$ is nonnegative and can be zero only if the real part of $z_1$, and hence also $z_1$ itself, is equal to $1$."} +{"name": "Putnam_exercise_2018_b4", "source": "Putnam.lean", "header": "import Mathlib\n\nopen scoped BigOperators\n", "formal_statement": "theorem Putnam_exercise_2018_b4 (a : ℝ) (x : ℕ → ℝ) (hx0 : x 0 = a)\n (hx1 : x 1 = a)\n (hxn : ∀ n : ℕ, n ≥ 2 → x (n+1) = 2*(x n)*(x (n-1)) - x (n-2))\n (h : ∃ n, x n = 0) :\n ∃ c, Function.Periodic x c := sorry", "formal_proof": null, "informal_stmt": "Given a real number $a$, we define a sequence by $x_{0}=1$, $x_{1}=x_{2}=a$, and $x_{n+1}=2 x_{n} x_{n-1}-x_{n-2}$ for $n \\geq 2$. Prove that if $x_{n}=0$ for some $n$, then the sequence is periodic.\n\\begin{proof}\n We first rule out the case $|a|>1$. In this case, we prove that $|x_{n+1}| \\geq |x_n|$ for all $n$, meaning that we cannot have $x_n = 0$. We proceed by induction; the claim is true for $n=0,1$ by hypothesis. To prove the claim for $n \\geq 2$, write\n\\begin{align*}\n|x_{n+1}| &= |2x_nx_{n-1}-x_{n-2}| \\\\\n&\\geq 2|x_n||x_{n-1}|-|x_{n-2}| \\\\\n&\\geq |x_n|(2|x_{n-1}|-1) \\geq |x_n|,\n\\end{align*} \nwhere the last step follows from $|x_{n-1}| \\geq |x_{n-2}| \\geq \\cdots \\geq |x_0| = 1$.\n\nWe may thus assume hereafter that $|a|\\leq 1$. We can then write $a = \\cos b$ for some $b \\in [0,\\pi]$. \nLet $\\{F_n\\}$ be the Fibonacci sequence, defined as usual by $F_1=F_2=1$ and $F_{n+1}=F_n+F_{n-1}$. We show by induction that\n\\[\nx_n = \\cos(F_n b) \\qquad (n \\geq 0).\n\\]\nIndeed, this is true for $n=0,1,2$; given that it is true for $n \\leq m$, then\n\\begin{align*}\n2x_mx_{m-1}&=2\\cos(F_mb)\\cos(F_{m-1}b) \\\\\n&= \\cos((F_m-F_{m-1})b)+\\cos((F_m+F_{m-1})b) \\\\\n&= \\cos(F_{m-2}b)+\\cos(F_{m+1}b)\n\\end{align*}\nand so \n$x_{m+1} = 2x_mx_{m-1}-x_{m-2} = \\cos(F_{m+1}b)$. This completes the induction.\n\n\nSince $x_n = \\cos(F_n b)$, if $x_n=0$ for some $n$ then $F_n b = \\frac{k}{2} \\pi$ for some odd integer $k$. In particular, we can write $b = \\frac{c}{d}(2\\pi)$ where $c = k$ and $d = 4F_n$ are integers.\n\n\nLet $x_n$ denote the pair $(F_n,F_{n+1})$, where each entry in this pair is viewed as an element of $\\mathbb{Z}/d\\mathbb{Z}$. Since there are only finitely many possibilities for $x_n$, there must be some $n_2>n_1$ such that $x_{n_1}=x_{n_2}$. Now $x_n$ uniquely determines both $x_{n+1}$ and $x_{n-1}$, and it follows that the sequence $\\{x_n\\}$ is periodic: for $\\ell = n_2-n_1$, $x_{n+\\ell} = x_n$ for all $n \\geq 0$. In particular, $F_{n+\\ell} \\equiv F_n \\pmod{d}$ for all $n$. But then $\\frac{F_{n+\\ell}c}{d}-\\frac{F_n c}{d}$ is an integer, and so\n\\begin{align*}\nx_{n+\\ell} &= \\cos\\left(\\frac{F_{n+\\ell}c}{d}(2\\pi)\\right)\\\\\n& = \\cos\\left(\\frac{F_n c}{d}(2\\pi)\\right) = x_n\n\\end{align*}\nfor all $n$. Thus the sequence $\\{x_n\\}$ is periodic, as desired.\n\\end{proof}", "informal_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_2-z_3|^2-|1-z_1z_2z_3|^2. \\] A routine calculation shows that \\begin{align*} f(\\alpha, \\beta, \\gamma)&= 10 - 6\\cos(\\alpha) - 6\\cos(\\beta) - 6\\cos(\\gamma) \\\\ &\\quad + 2\\cos(\\alpha + \\beta + \\gamma) + 2\\cos(\\alpha - \\beta) \\\\ &\\quad + 2\\cos(\\beta - \\gamma) + 2\\cos(\\gamma - \\alpha). \\end{align*} Since the function $f$ is continuously differentiable, and periodic in each variable, $f$ has a maximum and a minimum and it attains these values only at points where $\\nabla f=(0,0,0)$. A routine calculation now shows that \\begin{align*} \\frac{\\partial f}{\\partial \\alpha} + \\frac{\\partial f}{\\partial \\beta} + \\frac{\\partial f}{\\partial \\gamma} &= 6(\\sin(\\alpha) +\\sin(\\beta)+\\sin(\\gamma)- \\sin(\\alpha + \\beta + \\gamma)) \\\\ &= 24\\sin\\left(\\frac{\\alpha+\\beta}{2}\\right) \\sin\\left(\\frac{\\beta+\\gamma}{2}\\right) \\sin\\left(\\frac{\\gamma+\\alpha}{2}\\right). \\end{align*} Hence every critical point of $f$ must satisfy one of $z_1z_2=1$, $z_2z_3=1$, or $z_3z_1=1$. By symmetry, let us assume that $z_1z_2=1$. Then \\[ f = |3-2\\mathrm{Re}(z_1)-z_3|^2-|1-z_3|^2; \\] since $3-2\\mathrm{Re}(z_1)\\ge 1$, $f$ is nonnegative and can be zero only if the real part of $z_1$, and hence also $z_1$ itself, is equal to $1$."} +{"name": "Putnam_exercise_2017_b3", "source": "Putnam.lean", "header": "import Mathlib\n\nopen scoped BigOperators\n", "formal_statement": "theorem Putnam_exercise_2017_b3 (f : ℝ → ℝ) (c : ℕ → ℝ)\n (hf : f = λ x => (∑' (i : ℕ), (c i) * x^i))\n (hc : ∀ n, c n = 0 ∨ c n = 1)\n (hf1 : f (2/3) = 3/2) :\n Irrational (f (1/2)) := sorry", "formal_proof": null, "informal_stmt": "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.\n\\begin{proof}\n 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\n$c_i = c_{m+i}$ for all $i \\geq n$. We may then write\n\\[\nf(x) = \\sum_{i=0}^{n-1} c_i x^i + \\frac{x^n}{1-x^m} \\sum_{i=0}^{m-1} c_{n+i} x^i.\n\\]\nEvaluating at $x = 2/3$, we may equate $f(2/3) = 3/2$ with \n\\[\n\\frac{1}{3^{n-1}} \\sum_{i=0}^{n-1} c_i 2^i 3^{n-i-1} + \\frac{2^n 3^m}{3^{n+m-1}(3^m-2^m)} \\sum_{i=0}^{m-1} c_{n+i} 2^i 3^{m-1-i};\n\\]\nsince all terms on the right-hand side have odd denominator, the same must be true of the sum, a contradiction.\n\\end{proof}", "informal_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_2-z_3|^2-|1-z_1z_2z_3|^2. \\] A routine calculation shows that \\begin{align*} f(\\alpha, \\beta, \\gamma)&= 10 - 6\\cos(\\alpha) - 6\\cos(\\beta) - 6\\cos(\\gamma) \\\\ &\\quad + 2\\cos(\\alpha + \\beta + \\gamma) + 2\\cos(\\alpha - \\beta) \\\\ &\\quad + 2\\cos(\\beta - \\gamma) + 2\\cos(\\gamma - \\alpha). \\end{align*} Since the function $f$ is continuously differentiable, and periodic in each variable, $f$ has a maximum and a minimum and it attains these values only at points where $\\nabla f=(0,0,0)$. A routine calculation now shows that \\begin{align*} \\frac{\\partial f}{\\partial \\alpha} + \\frac{\\partial f}{\\partial \\beta} + \\frac{\\partial f}{\\partial \\gamma} &= 6(\\sin(\\alpha) +\\sin(\\beta)+\\sin(\\gamma)- \\sin(\\alpha + \\beta + \\gamma)) \\\\ &= 24\\sin\\left(\\frac{\\alpha+\\beta}{2}\\right) \\sin\\left(\\frac{\\beta+\\gamma}{2}\\right) \\sin\\left(\\frac{\\gamma+\\alpha}{2}\\right). \\end{align*} Hence every critical point of $f$ must satisfy one of $z_1z_2=1$, $z_2z_3=1$, or $z_3z_1=1$. By symmetry, let us assume that $z_1z_2=1$. Then \\[ f = |3-2\\mathrm{Re}(z_1)-z_3|^2-|1-z_3|^2; \\] since $3-2\\mathrm{Re}(z_1)\\ge 1$, $f$ is nonnegative and can be zero only if the real part of $z_1$, and hence also $z_1$ itself, is equal to $1$."} +{"name": "Putnam_exercise_2014_a5", "source": "Putnam.lean", "header": "import Mathlib\n\nopen scoped BigOperators\n", "formal_statement": "theorem Putnam_exercise_2014_a5 (P : ℕ → Polynomial ℤ)\n (hP : ∀ n, P n = ∑ i : Fin n, (n+1) * Polynomial.X ^ n) :\n ∀ (j k : ℕ), j ≠ k → IsCoprime (P j) (P k) := sorry", "formal_proof": null, "informal_stmt": "Let\n$P_n(x)=1+2 x+3 x^2+\\cdots+n x^{n-1} .$ Prove that the polynomials $P_j(x)$ and $P_k(x)$ are relatively prime for all positive integers $j$ and $k$ with $j \\neq k$.\n\\begin{proof}\n Suppose to the contrary that there exist positive integers $i \\neq j$ and a complex number $z$ such that $P_i(z) = P_j(z) = 0$. Note that $z$ cannot be a nonnegative real number or else $P_i(z), P_j(z) > 0$; we may put $w = z^{-1} \\neq 0,1$. For $n \\in \\{i+1,j+1\\}$ we compute that\n\\[\nw^n = n w - n + 1,\n\\qquad \\overline{w}^n = n \\overline{w} - n + 1;\n\\]\nnote crucially that these equations also hold for $n \\in \\{0,1\\}$.\nTherefore, the function $f: [0, +\\infty) \\to \\mathbb{R}$ given by\n\\[\nf(t) = \\left| w \\right|^{2t} - t^2 \\left| w \\right|^2 + 2t(t-1)\\mathrm{Re}(w) - (t-1)^2\n\\]\nsatisfies $f(t) = 0$ for $t \\in \\{0,1,i+1,j+1\\}$. On the other hand, for all $t \\geq 0$ we have\n\\[\nf'''(t) = (2 \\log \\left| w \\right|)^3 \\left| w \\right|^{2t} > 0,\n\\]\nso by Rolle's theorem, the equation $f^{(3-k)}(t) = 0$ has at most $k$ distinct solutions for $k=0,1,2,3$. This yields the desired contradiction.\n\\end{proof}", "informal_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_2-z_3|^2-|1-z_1z_2z_3|^2. \\] A routine calculation shows that \\begin{align*} f(\\alpha, \\beta, \\gamma)&= 10 - 6\\cos(\\alpha) - 6\\cos(\\beta) - 6\\cos(\\gamma) \\\\ &\\quad + 2\\cos(\\alpha + \\beta + \\gamma) + 2\\cos(\\alpha - \\beta) \\\\ &\\quad + 2\\cos(\\beta - \\gamma) + 2\\cos(\\gamma - \\alpha). \\end{align*} Since the function $f$ is continuously differentiable, and periodic in each variable, $f$ has a maximum and a minimum and it attains these values only at points where $\\nabla f=(0,0,0)$. A routine calculation now shows that \\begin{align*} \\frac{\\partial f}{\\partial \\alpha} + \\frac{\\partial f}{\\partial \\beta} + \\frac{\\partial f}{\\partial \\gamma} &= 6(\\sin(\\alpha) +\\sin(\\beta)+\\sin(\\gamma)- \\sin(\\alpha + \\beta + \\gamma)) \\\\ &= 24\\sin\\left(\\frac{\\alpha+\\beta}{2}\\right) \\sin\\left(\\frac{\\beta+\\gamma}{2}\\right) \\sin\\left(\\frac{\\gamma+\\alpha}{2}\\right). \\end{align*} Hence every critical point of $f$ must satisfy one of $z_1z_2=1$, $z_2z_3=1$, or $z_3z_1=1$. By symmetry, let us assume that $z_1z_2=1$. Then \\[ f = |3-2\\mathrm{Re}(z_1)-z_3|^2-|1-z_3|^2; \\] since $3-2\\mathrm{Re}(z_1)\\ge 1$, $f$ is nonnegative and can be zero only if the real part of $z_1$, and hence also $z_1$ itself, is equal to $1$."} +{"name": "Putnam_exercise_2010_a4", "source": "Putnam.lean", "header": "import Mathlib\n\nopen scoped BigOperators\n", "formal_statement": "theorem Putnam_exercise_2010_a4 (n : ℕ) :\n ¬ Nat.Prime (10^10^10^n + 10^10^n + 10^n - 1) := sorry", "formal_proof": null, "informal_stmt": "Prove that for each positive integer $n$, the number $10^{10^{10^n}}+10^{10^n}+10^n-1$ is not prime.\n\\begin{proof}\n Put\n\\[\nN = 10^{10^{10^n}} + 10^{10^n} + 10^n - 1.\n\\]\nWrite $n = 2^m k$ with $m$ a nonnegative integer and $k$ a positive odd integer.\nFor any nonnegative integer $j$,\n\\[\n10^{2^m j} \\equiv (-1)^j \\pmod{10^{2^m} + 1}.\n\\]\nSince $10^n \\geq n \\geq 2^m \\geq m+1$, $10^n$ is divisible by $2^n$ and hence by $2^{m+1}$,\nand similarly $10^{10^n}$ is divisible by $2^{10^n}$ and hence by $2^{m+1}$. It follows that\n\\[\nN \\equiv 1 + 1 + (-1) + (-1) \\equiv 0 \\pmod{10^{2^m} + 1}.\n\\]\nSince $N \\geq 10^{10^n} > 10^n + 1 \\geq 10^{2^m} + 1$, it follows that $N$ is composite.\n\\end{proof}", "informal_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_2-z_3|^2-|1-z_1z_2z_3|^2. \\] A routine calculation shows that \\begin{align*} f(\\alpha, \\beta, \\gamma)&= 10 - 6\\cos(\\alpha) - 6\\cos(\\beta) - 6\\cos(\\gamma) \\\\ &\\quad + 2\\cos(\\alpha + \\beta + \\gamma) + 2\\cos(\\alpha - \\beta) \\\\ &\\quad + 2\\cos(\\beta - \\gamma) + 2\\cos(\\gamma - \\alpha). \\end{align*} Since the function $f$ is continuously differentiable, and periodic in each variable, $f$ has a maximum and a minimum and it attains these values only at points where $\\nabla f=(0,0,0)$. A routine calculation now shows that \\begin{align*} \\frac{\\partial f}{\\partial \\alpha} + \\frac{\\partial f}{\\partial \\beta} + \\frac{\\partial f}{\\partial \\gamma} &= 6(\\sin(\\alpha) +\\sin(\\beta)+\\sin(\\gamma)- \\sin(\\alpha + \\beta + \\gamma)) \\\\ &= 24\\sin\\left(\\frac{\\alpha+\\beta}{2}\\right) \\sin\\left(\\frac{\\beta+\\gamma}{2}\\right) \\sin\\left(\\frac{\\gamma+\\alpha}{2}\\right). \\end{align*} Hence every critical point of $f$ must satisfy one of $z_1z_2=1$, $z_2z_3=1$, or $z_3z_1=1$. By symmetry, let us assume that $z_1z_2=1$. Then \\[ f = |3-2\\mathrm{Re}(z_1)-z_3|^2-|1-z_3|^2; \\] since $3-2\\mathrm{Re}(z_1)\\ge 1$, $f$ is nonnegative and can be zero only if the real part of $z_1$, and hence also $z_1$ itself, is equal to $1$."} +{"name": "Putnam_exercise_2001_a5", "source": "Putnam.lean", "header": "import Mathlib\n\nopen scoped BigOperators\n", "formal_statement": "theorem Putnam_exercise_2001_a5 :\n ∃! a : ℕ × ℕ, a.1 > 0 ∧ a.2 > 0 ∧ a.1^(a.2+1) - (a.1+1)^a.2 = 2001 := sorry", "formal_proof": null, "informal_stmt": "Prove that there are unique positive integers $a, n$ such that $a^{n+1}-(a+1)^n=2001$.\n\\begin{proof}\n Suppose $a^{n+1} - (a+1)^n = 2001$.\nNotice that $a^{n+1} + [(a+1)^n - 1]$ is a multiple of $a$; thus\n$a$ divides $2002 = 2 \\times 7 \\times 11 \\times 13$.\n\nSince $2001$ is divisible by 3, we must have $a \\equiv 1 \\pmod{3}$,\notherwise one of $a^{n+1}$ and $(a+1)^n$ is a multiple of 3 and the\nother is not, so their difference cannot be divisible by 3. Now\n$a^{n+1} \\equiv 1 \\pmod{3}$, so we must have $(a+1)^n \\equiv 1\n\\pmod{3}$, which forces $n$ to be even, and in particular at least 2.\n\nIf $a$ is even, then $a^{n+1} - (a+1)^n \\equiv -(a+1)^n \\pmod{4}$.\nSince $n$ is even, $-(a+1)^n \\equiv -1 \\pmod{4}$. Since $2001 \\equiv 1\n\\pmod{4}$, this is impossible. Thus $a$ is odd, and so must divide\n$1001 = 7 \\times 11 \\times 13$. Moreover, $a^{n+1} - (a+1)^n \\equiv a\n\\pmod{4}$, so $a \\equiv 1 \\pmod{4}$.\n\nOf the divisors of $7 \\times 11 \\times 13$, those congruent to 1 mod 3\nare precisely those not divisible by 11 (since 7 and 13 are both\ncongruent to 1 mod 3). Thus $a$ divides $7 \\times 13$. Now\n$a \\equiv 1 \\pmod{4}$ is only possible if $a$ divides $13$.\n\nWe cannot have $a=1$, since $1 - 2^n \\neq 2001$ for any $n$. Thus\nthe only possibility is $a = 13$. One easily checks that $a=13, n=2$ is a\nsolution; all that remains is to check that no other $n$ works. In fact,\nif $n > 2$, then $13^{n+1} \\equiv 2001 \\equiv 1 \\pmod{8}$.\nBut $13^{n+1} \\equiv 13 \\pmod{8}$ since $n$ is even, contradiction.\nThus $a=13, n=2$ is the unique solution.\n\nNote: once one has that $n$ is even, one can use that $2002\n=a^{n+1} + 1 - (a+1)^n$ is divisible by $a+1$ to rule out cases.\n\\end{proof}", "informal_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_2-z_3|^2-|1-z_1z_2z_3|^2. \\] A routine calculation shows that \\begin{align*} f(\\alpha, \\beta, \\gamma)&= 10 - 6\\cos(\\alpha) - 6\\cos(\\beta) - 6\\cos(\\gamma) \\\\ &\\quad + 2\\cos(\\alpha + \\beta + \\gamma) + 2\\cos(\\alpha - \\beta) \\\\ &\\quad + 2\\cos(\\beta - \\gamma) + 2\\cos(\\gamma - \\alpha). \\end{align*} Since the function $f$ is continuously differentiable, and periodic in each variable, $f$ has a maximum and a minimum and it attains these values only at points where $\\nabla f=(0,0,0)$. A routine calculation now shows that \\begin{align*} \\frac{\\partial f}{\\partial \\alpha} + \\frac{\\partial f}{\\partial \\beta} + \\frac{\\partial f}{\\partial \\gamma} &= 6(\\sin(\\alpha) +\\sin(\\beta)+\\sin(\\gamma)- \\sin(\\alpha + \\beta + \\gamma)) \\\\ &= 24\\sin\\left(\\frac{\\alpha+\\beta}{2}\\right) \\sin\\left(\\frac{\\beta+\\gamma}{2}\\right) \\sin\\left(\\frac{\\gamma+\\alpha}{2}\\right). \\end{align*} Hence every critical point of $f$ must satisfy one of $z_1z_2=1$, $z_2z_3=1$, or $z_3z_1=1$. By symmetry, let us assume that $z_1z_2=1$. Then \\[ f = |3-2\\mathrm{Re}(z_1)-z_3|^2-|1-z_3|^2; \\] since $3-2\\mathrm{Re}(z_1)\\ge 1$, $f$ is nonnegative and can be zero only if the real part of $z_1$, and hence also $z_1$ itself, is equal to $1$."} +{"name": "Putnam_exercise_2000_a2", "source": "Putnam.lean", "header": "import Mathlib\n\nopen scoped BigOperators\n", "formal_statement": "theorem Putnam_exercise_2000_a2 :\n ∀ N : ℕ, ∃ n : ℕ, n > N ∧ ∃ i : Fin 6 → ℕ, n = (i 0)^2 + (i 1)^2 ∧\n n + 1 = (i 2)^2 + (i 3)^2 ∧ n + 2 = (i 4)^2 + (i 5)^2 := sorry", "formal_proof": null, "informal_stmt": "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. \n\\begin{proof}\n It is well-known that the equation $x^2-2y^2=1$ has infinitely\nmany solutions (the so-called ``Pell'' equation). Thus setting\n$n=2y^2$ (so that $n=y^2+y^2$, $n+1=x^2+0^2$, $n+2=x^2+1^2$)\nyields infinitely many $n$ with the desired property.\n\\end{proof}", "informal_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_2-z_3|^2-|1-z_1z_2z_3|^2. \\] A routine calculation shows that \\begin{align*} f(\\alpha, \\beta, \\gamma)&= 10 - 6\\cos(\\alpha) - 6\\cos(\\beta) - 6\\cos(\\gamma) \\\\ &\\quad + 2\\cos(\\alpha + \\beta + \\gamma) + 2\\cos(\\alpha - \\beta) \\\\ &\\quad + 2\\cos(\\beta - \\gamma) + 2\\cos(\\gamma - \\alpha). \\end{align*} Since the function $f$ is continuously differentiable, and periodic in each variable, $f$ has a maximum and a minimum and it attains these values only at points where $\\nabla f=(0,0,0)$. A routine calculation now shows that \\begin{align*} \\frac{\\partial f}{\\partial \\alpha} + \\frac{\\partial f}{\\partial \\beta} + \\frac{\\partial f}{\\partial \\gamma} &= 6(\\sin(\\alpha) +\\sin(\\beta)+\\sin(\\gamma)- \\sin(\\alpha + \\beta + \\gamma)) \\\\ &= 24\\sin\\left(\\frac{\\alpha+\\beta}{2}\\right) \\sin\\left(\\frac{\\beta+\\gamma}{2}\\right) \\sin\\left(\\frac{\\gamma+\\alpha}{2}\\right). \\end{align*} Hence every critical point of $f$ must satisfy one of $z_1z_2=1$, $z_2z_3=1$, or $z_3z_1=1$. By symmetry, let us assume that $z_1z_2=1$. Then \\[ f = |3-2\\mathrm{Re}(z_1)-z_3|^2-|1-z_3|^2; \\] since $3-2\\mathrm{Re}(z_1)\\ge 1$, $f$ is nonnegative and can be zero only if the real part of $z_1$, and hence also $z_1$ itself, is equal to $1$."} +{"name": "Putnam_exercise_1999_b4", "source": "Putnam.lean", "header": "import Mathlib\n\nopen scoped BigOperators\n", "formal_statement": "theorem Putnam_exercise_1999_b4 (f : ℝ → ℝ) (hf: ContDiff ℝ 3 f)\n (hf1 : ∀ n ≤ 3, ∀ x : ℝ, iteratedDeriv n f x > 0)\n (hf2 : ∀ x : ℝ, iteratedDeriv 3 f x ≤ f x) :\n ∀ x : ℝ, deriv f x < 2 * f x := sorry", "formal_proof": null, "informal_stmt": "Let $f$ be a real function with a continuous third derivative such that $f(x), f^{\\prime}(x), f^{\\prime \\prime}(x), f^{\\prime \\prime \\prime}(x)$ are positive for all $x$. Suppose that $f^{\\prime \\prime \\prime}(x) \\leq f(x)$ for all $x$. Show that $f^{\\prime}(x)<2 f(x)$ for all $x$.\n\\begin{proof} \n\\setcounter{equation}{0}\nWe make repeated use of the following fact: if $f$ is a differentiable function on all of\n$\\mathbb{R}$, $\\lim_{x \\to -\\infty} f(x) \\geq 0$, and $f'(x) > 0$ for all $x \\in \\mathbb{R}$, then\n$f(x) > 0$ for all $x \\in \\mathbb{R}$. (Proof: if $f(y) < 0$ for some $x$, then $f(x)< f(y)$ for all\n$x0$, but then $\\lim_{x \\to -\\infty} f(x) \\leq f(y) < 0$.)\n\nFrom the inequality $f'''(x) \\leq f(x)$ we obtain\n\\[\nf'' f'''(x) \\leq f''(x) f(x) < f''(x) f(x) + f'(x)^2\n\\]\nsince $f'(x)$ is positive. Applying the fact to the difference between the right and left sides,\nwe get\n\\begin{equation}\n\\frac{1}{2} (f''(x))^2 < f(x) f'(x).\n\\end{equation}\n\nOn the other hand, since $f(x)$ and $f'''(x)$ are both positive for all $x$,\nwe have\n\\[\n2f'(x) f''(x) < 2f'(x)f''(x) + 2f(x) f'''(x).\n\\]\nApplying the fact to the difference between the sides yields\n\\begin{equation}\nf'(x)^2 \\leq 2f(x) f''(x).\n\\end{equation}\nCombining (1) and (2), we obtain\n\\begin{align*}\n\\frac{1}{2} \\left( \\frac{f'(x)^2}{2f(x)} \\right)^2\n&< \\frac{1}{2} (f''(x))^2 \\\\\n&< f(x) f'(x),\n\\end{align*}\nor $(f'(x))^3 < 8 f(x)^3$. We conclude $f'(x) < 2f(x)$, as desired.\n\\end{proof}", "informal_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_2-z_3|^2-|1-z_1z_2z_3|^2. \\] A routine calculation shows that \\begin{align*} f(\\alpha, \\beta, \\gamma)&= 10 - 6\\cos(\\alpha) - 6\\cos(\\beta) - 6\\cos(\\gamma) \\\\ &\\quad + 2\\cos(\\alpha + \\beta + \\gamma) + 2\\cos(\\alpha - \\beta) \\\\ &\\quad + 2\\cos(\\beta - \\gamma) + 2\\cos(\\gamma - \\alpha). \\end{align*} Since the function $f$ is continuously differentiable, and periodic in each variable, $f$ has a maximum and a minimum and it attains these values only at points where $\\nabla f=(0,0,0)$. A routine calculation now shows that \\begin{align*} \\frac{\\partial f}{\\partial \\alpha} + \\frac{\\partial f}{\\partial \\beta} + \\frac{\\partial f}{\\partial \\gamma} &= 6(\\sin(\\alpha) +\\sin(\\beta)+\\sin(\\gamma)- \\sin(\\alpha + \\beta + \\gamma)) \\\\ &= 24\\sin\\left(\\frac{\\alpha+\\beta}{2}\\right) \\sin\\left(\\frac{\\beta+\\gamma}{2}\\right) \\sin\\left(\\frac{\\gamma+\\alpha}{2}\\right). \\end{align*} Hence every critical point of $f$ must satisfy one of $z_1z_2=1$, $z_2z_3=1$, or $z_3z_1=1$. By symmetry, let us assume that $z_1z_2=1$. Then \\[ f = |3-2\\mathrm{Re}(z_1)-z_3|^2-|1-z_3|^2; \\] since $3-2\\mathrm{Re}(z_1)\\ge 1$, $f$ is nonnegative and can be zero only if the real part of $z_1$, and hence also $z_1$ itself, is equal to $1$."} +{"name": "Putnam_exercise_1998_a3", "source": "Putnam.lean", "header": "import Mathlib\n\nopen scoped BigOperators\n", "formal_statement": "theorem Putnam_exercise_1998_a3 (f : ℝ → ℝ) (hf : ContDiff ℝ 3 f) :\n ∃ a : ℝ, (f a) * (deriv f a) * (iteratedDeriv 2 f a) * (iteratedDeriv 3 f a) ≥ 0 := sorry", "formal_proof": null, "informal_stmt": "Let $f$ be a real function on the real line with continuous third derivative. Prove that there exists a point $a$ such that\n$f(a) \\cdot f^{\\prime}(a) \\cdot f^{\\prime \\prime}(a) \\cdot f^{\\prime \\prime \\prime}(a) \\geq 0$. \n\\begin{proof}\n If at least one of $f(a)$, $f'(a)$, $f''(a)$, or $f'''(a)$ vanishes\nat some point $a$, then we are done. Hence we may assume each of\n$f(x)$, $f'(x)$, $f''(x)$, and $f'''(x)$ is either strictly positive\nor strictly negative on the real line. By replacing $f(x)$ by $-f(x)$\nif necessary, we may assume $f''(x)>0$; by replacing $f(x)$\nby $f(-x)$ if necessary, we may assume $f'''(x)>0$. (Notice that these\nsubstitutions do not change the sign of $f(x) f'(x) f''(x) f'''(x)$.)\nNow $f''(x)>0$ implies that $f'(x)$ is increasing, and $f'''(x)>0$\nimplies that $f'(x)$ is convex, so that $f'(x+a)>f'(x)+a f''(x)$\nfor all $x$ and $a$. By\nletting $a$ increase in the latter inequality, we see that $f'(x+a)$\nmust be positive for sufficiently large $a$; it follows that\n$f'(x)>0$\nfor all $x$. Similarly, $f'(x)>0$ and $f''(x)>0$ imply\nthat $f(x)>0$ for all $x$. Therefore $f(x) f'(x) f''(x) f'''(x)>0$ for\nall $x$, and we are done.\n\\end{proof}", "informal_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_2-z_3|^2-|1-z_1z_2z_3|^2. \\] A routine calculation shows that \\begin{align*} f(\\alpha, \\beta, \\gamma)&= 10 - 6\\cos(\\alpha) - 6\\cos(\\beta) - 6\\cos(\\gamma) \\\\ &\\quad + 2\\cos(\\alpha + \\beta + \\gamma) + 2\\cos(\\alpha - \\beta) \\\\ &\\quad + 2\\cos(\\beta - \\gamma) + 2\\cos(\\gamma - \\alpha). \\end{align*} Since the function $f$ is continuously differentiable, and periodic in each variable, $f$ has a maximum and a minimum and it attains these values only at points where $\\nabla f=(0,0,0)$. A routine calculation now shows that \\begin{align*} \\frac{\\partial f}{\\partial \\alpha} + \\frac{\\partial f}{\\partial \\beta} + \\frac{\\partial f}{\\partial \\gamma} &= 6(\\sin(\\alpha) +\\sin(\\beta)+\\sin(\\gamma)- \\sin(\\alpha + \\beta + \\gamma)) \\\\ &= 24\\sin\\left(\\frac{\\alpha+\\beta}{2}\\right) \\sin\\left(\\frac{\\beta+\\gamma}{2}\\right) \\sin\\left(\\frac{\\gamma+\\alpha}{2}\\right). \\end{align*} Hence every critical point of $f$ must satisfy one of $z_1z_2=1$, $z_2z_3=1$, or $z_3z_1=1$. By symmetry, let us assume that $z_1z_2=1$. Then \\[ f = |3-2\\mathrm{Re}(z_1)-z_3|^2-|1-z_3|^2; \\] since $3-2\\mathrm{Re}(z_1)\\ge 1$, $f$ is nonnegative and can be zero only if the real part of $z_1$, and hence also $z_1$ itself, is equal to $1$."} +{"name": "Putnam_exercise_1998_b6", "source": "Putnam.lean", "header": "import Mathlib\n\nopen scoped BigOperators\n", "formal_statement": "theorem Putnam_exercise_1998_b6 (a b c : ℤ) :\n ∃ n : ℤ, n > 0 ∧ ¬ ∃ m : ℤ, Real.sqrt (n^3 + a*n^2 + b*n + c) = m := sorry", "formal_proof": null, "informal_stmt": "Prove that, for any integers $a, b, c$, there exists a positive integer $n$ such that $\\sqrt{n^3+a n^2+b n+c}$ is not an integer.\n\\begin{proof}\n We prove more generally that for any polynomial $P(z)$ with integer\ncoefficients which is not a perfect square, there exists a positive\ninteger $n$ such that $P(n)$ is not a perfect square. Of course it\nsuffices to assume $P(z)$ has no repeated factors, which is to say $P(z)$\nand its derivative $P'(z)$ are relatively prime.\n\nIn particular, if we carry out the Euclidean algorithm on $P(z)$ and $P'(z)$\nwithout dividing, we get an integer $D$ (the discriminant of $P$) such that\nthe greatest common divisor of $P(n)$ and $P'(n)$ divides $D$ for any $n$.\nNow there exist infinitely many primes $p$ such that $p$ divides $P(n)$ for\nsome $n$: if there were only finitely many, say, $p_1, \\dots, p_k$, then\nfor any $n$ divisible by $m = P(0) p_1 p_2 \\cdots p_k$, we have $P(n)\n\\equiv P(0) \\pmod{m}$, that is, $P(n)/P(0)$ is not divisible by $p_1,\n\\dots, p_k$, so must be $\\pm 1$, but then $P$ takes some value infinitely\nmany times, contradiction. In particular, we can choose some such $p$ not\ndividing $D$, and choose $n$ such that $p$ divides $P(n)$. Then $P(n+kp)\n\\equiv P(n) + kp P'(n) (\\mathrm{mod}\\,p)$\n(write out the Taylor series of the left side);\nin particular, since $p$ does not divide $P'(n)$, we can find some $k$\nsuch that $P(n+kp)$ is divisible by $p$ but not by $p^2$, and so\nis not a perfect square.\n\\end{proof}\n\n\n\n\n\\end{document}", "informal_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_2-z_3|^2-|1-z_1z_2z_3|^2. \\] A routine calculation shows that \\begin{align*} f(\\alpha, \\beta, \\gamma)&= 10 - 6\\cos(\\alpha) - 6\\cos(\\beta) - 6\\cos(\\gamma) \\\\ &\\quad + 2\\cos(\\alpha + \\beta + \\gamma) + 2\\cos(\\alpha - \\beta) \\\\ &\\quad + 2\\cos(\\beta - \\gamma) + 2\\cos(\\gamma - \\alpha). \\end{align*} Since the function $f$ is continuously differentiable, and periodic in each variable, $f$ has a maximum and a minimum and it attains these values only at points where $\\nabla f=(0,0,0)$. A routine calculation now shows that \\begin{align*} \\frac{\\partial f}{\\partial \\alpha} + \\frac{\\partial f}{\\partial \\beta} + \\frac{\\partial f}{\\partial \\gamma} &= 6(\\sin(\\alpha) +\\sin(\\beta)+\\sin(\\gamma)- \\sin(\\alpha + \\beta + \\gamma)) \\\\ &= 24\\sin\\left(\\frac{\\alpha+\\beta}{2}\\right) \\sin\\left(\\frac{\\beta+\\gamma}{2}\\right) \\sin\\left(\\frac{\\gamma+\\alpha}{2}\\right). \\end{align*} Hence every critical point of $f$ must satisfy one of $z_1z_2=1$, $z_2z_3=1$, or $z_3z_1=1$. By symmetry, let us assume that $z_1z_2=1$. Then \\[ f = |3-2\\mathrm{Re}(z_1)-z_3|^2-|1-z_3|^2; \\] since $3-2\\mathrm{Re}(z_1)\\ge 1$, $f$ is nonnegative and can be zero only if the real part of $z_1$, and hence also $z_1$ itself, is equal to $1$."} +{"name": "Pugh_exercise_2_12a", "source": "Pugh.lean", "header": "import Mathlib\n\nopen Filter Real Function\nopen scoped Topology\nnoncomputable section\n", "formal_statement": "theorem Pugh_exercise_2_12a (f : ℕ → ℕ) (p : ℕ → ℝ) (a : ℝ)\n (hf : Injective f) (hp : Tendsto p atTop (𝓝 a)) :\n Tendsto (λ n => p (f n)) atTop (𝓝 a) := sorry", "formal_proof": null, "informal_stmt": "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.\n\\begin{proof}\n 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$ which implies that $p_{f(n)} \\rightarrow L$, as required.\n\\end{proof}", "informal_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$ which implies that $p_{f(n)} \\rightarrow L$, as required."} +{"name": "Pugh_exercise_2_26", "source": "Pugh.lean", "header": "import Mathlib\n\nopen Filter Real Function\nopen scoped Topology\nnoncomputable section\n", "formal_statement": "theorem Pugh_exercise_2_26 {M : Type*} [TopologicalSpace M]\n (U : Set M) : IsOpen U ↔ ∀ x ∈ U, ¬ ClusterPt x (𝓟 Uᶜ) := sorry", "formal_proof": null, "informal_stmt": "Prove that a set $U \\subset M$ is open if and only if none of its points are limits of its complement.\n\\begin{proof}\n Assume that none of the points of $U$ are limits of its complement, and let us prove that $U$ is open. Assume by contradiction that $U$ is not open, so there exists $p \\in M$ so that $\\forall r>0$ there exists $q \\in M$ with $d(p, q)0$ such that $d(p, x)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$ which implies that $p_{f(n)} \\rightarrow L$, as required."} +{"name": "Pugh_exercise_2_29", "source": "Pugh.lean", "header": "import Mathlib\n\nopen Filter Real Function\nopen scoped Topology\nnoncomputable section\n", "formal_statement": "theorem Pugh_exercise_2_29 (M : Type*) [MetricSpace M]\n (O C : Set (Set M))\n (hO : O = {s | IsOpen s})\n (hC : C = {s | IsClosed s}) :\n ∃ f : O → C, Bijective f := sorry", "formal_proof": null, "informal_stmt": "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}$.\n\\begin{proof}\n The bijection given by $x\\mapsto X^C$ suffices. \n\\end{proof}", "informal_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$ which implies that $p_{f(n)} \\rightarrow L$, as required."} +{"name": "Pugh_exercise_2_32a", "source": "Pugh.lean", "header": "import Mathlib\n\nopen Filter Real Function\nopen scoped Topology\nnoncomputable section\n", "formal_statement": "theorem Pugh_exercise_2_32a (A : Set ℕ) : IsClopen A := sorry", "formal_proof": null, "informal_stmt": "Show that every subset of $\\mathbb{N}$ is clopen.\n\\begin{proof}\n 32. The one-point set $\\{n\\} \\subset \\mathbb{N}$ is open, since it contains all $m \\in \\mathbb{N}$ that satisfy $d(m, n)<\\frac{1}{2}$. Every subset of $\\mathbb{N}$ is a union of one-point sets, hence is open. Then every set it closed, since its complement is necessarily open.\n\\end{proof}", "informal_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$ which implies that $p_{f(n)} \\rightarrow L$, as required."} +{"name": "Pugh_exercise_2_41", "source": "Pugh.lean", "header": "import Mathlib\n\nopen Filter Real Function\nopen scoped Topology\nnoncomputable section\n", "formal_statement": "theorem Pugh_exercise_2_41 (m : ℕ) {X : Type*} [NormedSpace ℝ ((Fin m) → ℝ)] :\n IsCompact (Metric.closedBall 0 1) := sorry", "formal_proof": null, "informal_stmt": "Let $\\|\\cdot\\|$ be any norm on $\\mathbb{R}^{m}$ and let $B=\\left\\{x \\in \\mathbb{R}^{m}:\\|x\\| \\leq 1\\right\\}$. Prove that $B$ is compact.\n\\begin{proof}\n Let us call $\\|\\cdot\\|_E$ the Euclidean norm in $\\mathbb{R}^m$. We start by claiming that there exist constants $C_1, C_2>0$ such that\n$$\nC_1\\|x\\|_E \\leq\\|x\\| \\leq C_2\\|x\\|_E, \\forall x \\in \\mathbb{R}^m .\n$$\nAssuming (1) to be true, let us finish the problem. First let us show that $B$ is bounded w.r.t. $d_E$, which is how we call the Euclidean distance in $\\mathbb{R}^m$. Indeed, given $x \\in B,\\|x\\|_E \\leq \\frac{1}{C_1}\\|x\\| \\leq \\frac{1}{C_1}$. Hence $B \\subset\\left\\{x \\in \\mathbb{R}^m: d_E(x, 0)<\\frac{1}{C_1}+1\\right\\}$, which means $B$ is bounded w.r.t $d_E$.\nNow let us show that $B$ is closed w.r.t. $d_E$. Let $x_n \\rightarrow x$ w.r.t. $d_E$, where $x_n \\in B$. Notice that this implies that $x_n \\rightarrow x$ w.r.t. $d(x, y)=\\|x-y\\|$, the distance coming from $\\|\\cdot\\|$, since by (1) we have\n$$\nd\\left(x_n, x\\right)=\\left\\|x_n-x\\right\\| \\leq C_2\\left\\|x_n-x\\right\\|_E \\rightarrow 0 .\n$$\nAlso, notice that\n$$\n\\|x\\| \\leq\\left\\|x_n-x\\right\\|+\\left\\|x_n\\right\\| \\leq\\left\\|x_n-x\\right\\|+1,\n$$\nhence passing to the limit we obtain that $\\|x\\| \\leq 1$, therefore $x \\in B$ and so $B$ is closed w.r.t. $d_E$. Since $B$ is closed and bounded w.r.t. $d_E$, it must be compact. Now we claim that the identity function, $i d:\\left(\\mathbb{R}^m, d_E\\right) \\rightarrow\\left(\\mathbb{R}^m, d\\right)$ where $\\left(\\mathbb{R}^m, d_E\\right)$ means we are using the distance $d_E$ in $\\mathbb{R}^m$ and $\\left(\\mathbb{R}^m, d\\right)$ means we are using the distance $d$ in $\\mathbb{R}^m$, is a homeomorphism. This follows by (1), since $i d$ is always a bijection, and it is continuous and its inverse is continuous by (1) (if $x_n \\rightarrow x$ w.r.t. $d_E$, then $x_n \\rightarrow x$ w.r.t. $d$ and vice-versa, by (1)). By a result we saw in class, since $B$ is compact in $\\left(\\mathbb{R}^m, d_E\\right)$ and $i d$ is a homeomorphism, then $i d(B)=B$ is compact w.r.t. $d$.\n\nWe are left with proving (1). Notice that it suffices to prove that $C_1 \\leq\\|x\\| \\leq$ $C_2, \\forall x \\in \\mathbb{R}^m$ with $\\|x\\|_E=1$. Indeed, if this is true, given $x \\in \\mathbb{R}^m$, either $\\|x\\|_E=0$ (which implies $x=0$ and (1) holds in this case), or $x /\\|x\\|_E=y$ is such that $\\|y\\|_E=1$, so $C_1 \\leq\\|y\\| \\leq C_2$, which implies $C_1\\|x\\|_E \\leq\\|x\\| \\leq C_2\\|x\\|_E$.\nWe want to show now that $\\|\\cdot\\|$ is continuous w.r.t. $d_E$, that is, given $\\varepsilon>0$ and $x \\in \\mathbb{R}^m$, there exists $\\delta>0$ such that if $d_E(x, y)<\\delta$, then $\\|\\mid x\\|-\\|y\\| \\|<\\varepsilon$.\n\nBy the triangle inequality, $\\|x\\|-\\|y\\| \\leq\\|x-y\\|$, and $\\|y\\|-\\|x\\| \\leq\\|x-y\\|$, therefore\n$$\n|\\|x||-\\| y|\\|\\leq\\| x-y \\| .\n$$\nWriting now $x=\\sum_{i=1}^m a_i e_i, y=\\sum_{i=1}^m b_i e_i$, where $e_i=(0, \\ldots, 1,0, \\ldots, 0)$ (with 1 in the i-th component), we obtain by the triangle inequality,\n$$\n\\begin{aligned}\n\\|x-y\\| & =\\left\\|\\sum_{i=1}^m\\left(a_i-b_i\\right) e_i\\right\\| \\leq \\sum_{i=1}^m\\left|a_i-b_i\\left\\|\\left|\\left\\|e_i\\right\\| \\leq \\max _{i=1, \\ldots, m}\\left\\|e_i\\right\\| \\sum_{i=1}^m\\right| a_i-b_i \\mid\\right.\\right. \\\\\n& =\\max _{i=1, \\ldots, m}\\left\\|e_i\\right\\| d_{s u m}(x, y) \\leq \\max _{i=1, \\ldots, m}\\left\\|e_i\\right\\| m d_{\\max }(x, y) \\\\\n& \\leq \\max _{i=1, \\ldots, m}\\left\\|e_i\\right\\| m d_E(x, y) .\n\\end{aligned}\n$$\nLet $\\delta=\\frac{\\varepsilon}{m \\max _{i=1, \\ldots, m}\\left\\|e_i\\right\\|}$. Then if $d_E(x, y)<\\delta,\\|x\\|-\\|y\\|||<\\varepsilon$.\nSince $\\|\\cdot\\|$ is continuous w.r.t. $d_E$ and $K=\\left\\{x \\in \\mathbb{R}^m:\\|x\\|_E=1\\right\\}$ is compact w.r.t. $d_E$, then the function $\\|\\cdot\\|$ achieves a maximum and a minimum value on $K$. Call $C_1=\\min _{x \\in K}\\|x\\|, C_2=\\max _{x \\in K}\\|x\\|$. Then\n$$\nC_1 \\leq\\|x\\| \\leq C_2, \\forall x \\in \\mathbb{R}^m \\text { such that }\\|x\\|_E=1,\n$$\nwhich is what we needed.\n\\end{proof}", "informal_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$ which implies that $p_{f(n)} \\rightarrow L$, as required."} +{"name": "Pugh_exercise_2_46", "source": "Pugh.lean", "header": "import Mathlib\n\nopen Filter Real Function\nopen scoped Topology\nnoncomputable section\n", "formal_statement": "theorem Pugh_exercise_2_46 {M : Type*} [MetricSpace M]\n {A B : Set M} (hA : IsCompact A) (hB : IsCompact B)\n (hAB : Disjoint A B) (hA₀ : A ≠ ∅) (hB₀ : B ≠ ∅) :\n ∃ a₀ b₀, a₀ ∈ A ∧ b₀ ∈ B ∧ ∀ (a : M) (b : M),\n a ∈ A → b ∈ B → dist a₀ b₀ ≤ dist a b := sorry", "formal_proof": null, "informal_stmt": "Assume that $A, B$ are compact, disjoint, nonempty subsets of $M$. Prove that there are $a_0 \\in A$ and $b_0 \\in B$ such that for all $a \\in A$ and $b \\in B$ we have $d(a_0, b_0) \\leq d(a, b)$.\n\\begin{proof}\nLet $A$ and $B$ be compact, disjoint and non-empty subsets of $M$. We want to show that there exist $a_0 \\in A, b_0 \\in B$ such that for all $a \\in A, b \\in B$,\n$$\nd\\left(a_0, b_0\\right) \\leq d(a, b) .\n$$\nWe saw in class that the distance function $d: M \\times M \\rightarrow \\mathbb{R}$ is continuous. We also saw in class that any continuous, real-valued function assumes maximum and minimum values on a compact set. Since $A$ and $B$ are compact, $A \\times B$ is (non-empty) compact in $M \\times M$. Therefore there exists $\\left(a_0, b_0\\right) \\in A \\times B$ such that $d\\left(a_0, b_0\\right) \\leq d(a, b), \\forall(a, b) \\in A \\times B$.\n\\end{proof}", "informal_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$ which implies that $p_{f(n)} \\rightarrow L$, as required."} +{"name": "Pugh_exercise_2_57", "source": "Pugh.lean", "header": "import Mathlib\n\nopen Filter Real Function\nopen scoped Topology\nnoncomputable section\n", "formal_statement": "theorem Pugh_exercise_2_57 {X : Type*} [TopologicalSpace X]\n : ∃ (S : Set X), IsConnected S ∧ ¬ IsConnected (interior S) := sorry", "formal_proof": null, "informal_stmt": "Show that if $S$ is connected, it is not true in general that its interior is connected.\n\\begin{proof}\n Consider $X=\\mathbb{R}^2$ and\n$$\nA=([-2,0] \\times[-2,0]) \\cup([0,2] \\times[0,2])\n$$\nwhich is connected, while $\\operatorname{int}(A)$ is not connected.\nTo see this consider the continuous function $f: \\mathbb{R}^2 \\rightarrow \\mathbb{R}$ is defined by $f(x, y)=x+y$. Let $U=f^{-1}(0,+\\infty)$ which is open in $\\mathbb{R}^2$ and so $U \\cap \\operatorname{int}(A)$ is open in $\\operatorname{int}(A)$. Also, since $(0,0) \\notin \\operatorname{int}(A)$, so for all $(x, y) \\in \\operatorname{int}(A), f(x, y) \\neq 0$ and $U \\cap \\operatorname{int}(A)=f^{-1}[0,+\\infty) \\cap \\operatorname{int}(A)$ is closed in $\\operatorname{int}(A)$. Furthermore, $(1,1)=f^{-1}(2) \\in U \\cap \\operatorname{int}(A)$ shows that $U \\cap \\operatorname{int}(A) \\neq \\emptyset$ while $(-1,-1) \\in \\operatorname{int}(A)$ and $(-1,-1) \\notin U$ shows that $U \\cap \\operatorname{int}(A) \\neq \\operatorname{int}(A)$.\n\\end{proof}", "informal_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$ which implies that $p_{f(n)} \\rightarrow L$, as required."} +{"name": "Pugh_exercise_2_92", "source": "Pugh.lean", "header": "import Mathlib\n\nopen Filter Real Function\nopen scoped Topology\nnoncomputable section\n", "formal_statement": "theorem Pugh_exercise_2_92 {α : Type*} [TopologicalSpace α]\n {s : ℕ → Set α}\n (hs : ∀ i, IsCompact (s i))\n (hs : ∀ i, (s i).Nonempty)\n (hs : ∀ i, (s i) ⊃ (s (i + 1))) :\n (⋂ i, s i).Nonempty := sorry", "formal_proof": null, "informal_stmt": "Give a direct proof that the nested decreasing intersection of nonempty covering compact sets is nonempty.\n\\begin{proof}\n Let\n$$\nA_1 \\supset A_2 \\supset \\cdots \\supset A_n \\supset \\cdots\n$$\nbe a nested decreasing sequence of compacts. Suppose that $\\bigcap A_n=\\emptyset$. Take $U_n=A_n^c$, then\n$$\n\\bigcup U_n=\\bigcup A_n^c=\\left(\\bigcap A_n\\right)^c=A_1 .\n$$\nHere, I'm thinking of $A_1$ as the main metric space. Since $\\left\\{U_n\\right\\}$ is an open covering of $A_1$, we can extract a finite subcovering, that is,\n$$\nA_{\\alpha_1}^c \\cup A_{\\alpha_2}^c \\cup \\cdots \\cup A_{\\alpha_m}^c \\supset A_1\n$$\nor\n$$\n\\left(A_1 \\backslash A_{\\alpha_1}\\right) \\cup\\left(A_1 \\backslash A_{\\alpha_2}\\right) \\cup \\cdots \\cup\\left(A_1 \\backslash A_{\\alpha_m}\\right) \\supset A_1 .\n$$\nBut, this is true only if $A_{\\alpha_i}=\\emptyset$ for some $i$, a contradiction.\n\\end{proof}", "informal_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$ which implies that $p_{f(n)} \\rightarrow L$, as required."} +{"name": "Pugh_exercise_2_126", "source": "Pugh.lean", "header": "import Mathlib\n\nopen Filter Real Function\nopen scoped Topology\nnoncomputable section\n", "formal_statement": "theorem Pugh_exercise_2_126 {E : Set ℝ}\n (hE : ¬ Set.Countable E) : ∃ (p : ℝ), ClusterPt p (𝓟 E) := sorry", "formal_proof": null, "informal_stmt": "Suppose that $E$ is an uncountable subset of $\\mathbb{R}$. Prove that there exists a point $p \\in \\mathbb{R}$ at which $E$ condenses.\n\\begin{proof}\n I think this is the proof by contrapositive that you were getting at.\nSuppose that $E$ has no limit points at all. Pick an arbitrary point $x \\in E$. Then $x$ cannot be a limit point, so there must be some $\\delta>0$ such that the ball of radius $\\delta$ around $x$ contains no other points of $E$ :\n$$\nB_\\delta(x) \\cap E=\\{x\\}\n$$\nCall this \"point 1 \". For the next point, take the closest element to $x$ and on its left; that is, choose the point\n$$\n\\max [E \\cap(-\\infty, x)]\n$$\nif it exists (that is important - if not, skip to the next step). Note that by the argument above, this supremum, should it exist, cannot equal $x$ and is therefore a new point in $E$.\n\nCall this \"point 2 \". Now take the first point to the right of $x$ for \"point 3 \". Take the first point to the left of point 2 for \"point 4 \". And so on, ad infinitum.\n\nThis gives a countable list of unique points; we must show that it exhausts the entire set $E$. Suppose not. Suppose there is some element $aa_1 \\in E$ such that $a_2$ is not in the list. Repeating, we generate an infinite monotone-increasing sequence $\\left\\{a_i\\right\\}$ of elements in $E$ and not in the list, which is clearly bounded above by $x$. By the Monotone\nConvergence Theorem this sequence has a limit. But that means the sequence $\\left\\{a_i\\right\\} \\subset E$ converges to a limit, and hence $E$ has a limit point, contradicting the assumption. Therefore our list exhausts $E$, and we have enumerated all its elements.\n\\end{proof}", "informal_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$ which implies that $p_{f(n)} \\rightarrow L$, as required."} +{"name": "Pugh_exercise_3_1", "source": "Pugh.lean", "header": "import Mathlib\n\nopen Filter Real Function\nopen scoped Topology\nnoncomputable section\n", "formal_statement": "theorem Pugh_exercise_3_1 {f : ℝ → ℝ}\n (hf : ∀ x y, |f x - f y| ≤ |x - y| ^ 2) :\n ∃ c, f = λ x => c := sorry", "formal_proof": null, "informal_stmt": "Assume that $f \\colon \\mathbb{R} \\rightarrow \\mathbb{R}$ satisfies $|f(t)-f(x)| \\leq|t-x|^{2}$ for all $t, x$. Prove that $f$ is constant.\n\\begin{proof}\n We have $|f(t)-f(x)| \\leq|t-x|^2, \\forall t, x \\in \\mathbb{R}$. Fix $x \\in \\mathbb{R}$ and let $t \\neq x$. Then\n$$\n\\left|\\frac{f(t)-f(x)}{t-x}\\right| \\leq|t-x| \\text {, hence } \\lim _{t \\rightarrow x}\\left|\\frac{f(t)-f(x)}{t-x}\\right|=0 \\text {, }\n$$\nso $f$ is differentiable in $\\mathbb{R}$ and $f^{\\prime}=0$. This implies that $f$ is constant, as seen in class.\n\\end{proof}", "informal_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$ which implies that $p_{f(n)} \\rightarrow L$, as required."} +{"name": "Pugh_exercise_3_4", "source": "Pugh.lean", "header": "import Mathlib\n\nopen Filter Real Function\nopen scoped Topology\nnoncomputable section\n", "formal_statement": "theorem Pugh_exercise_3_4 (n : ℕ) :\n Tendsto (λ n => (sqrt (n + 1) - sqrt n)) atTop (𝓝 0) := sorry", "formal_proof": null, "informal_stmt": "Prove that $\\sqrt{n+1}-\\sqrt{n} \\rightarrow 0$ as $n \\rightarrow \\infty$.\n\\begin{proof}\n $$\n\\sqrt{n+1}-\\sqrt{n}=\\frac{(\\sqrt{n+1}-\\sqrt{n})(\\sqrt{n+1}+\\sqrt{n})}{\\sqrt{n+1}+\\sqrt{n}}=\\frac{1}{\\sqrt{n+1}+\\sqrt{n}}<\\frac{1}{2 \\sqrt{n}}\n$$\n\\end{proof}", "informal_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$ which implies that $p_{f(n)} \\rightarrow L$, as required."} +{"name": "Pugh_exercise_3_63a", "source": "Pugh.lean", "header": "import Mathlib\n\nopen Filter Real Function\nopen scoped Topology\nnoncomputable section\n", "formal_statement": "theorem Pugh_exercise_3_63a (p : ℝ) (f : ℕ → ℝ) (hp : p > 1)\n (h : f = λ (k : ℕ) => (1 : ℝ) / (k * (log k) ^ p)) :\n ∃ l, Tendsto f atTop (𝓝 l) := sorry", "formal_proof": null, "informal_stmt": "Prove that $\\sum 1/k(\\log(k))^p$ converges when $p > 1$.\n\\begin{proof}\n Using the integral test, for a set $a$, we see\n$$\n\\lim _{b \\rightarrow \\infty} \\int_a^b \\frac{1}{x \\log (x)^c} d x=\\lim _{b \\rightarrow \\infty}\\left(\\frac{\\log (b)^{1-c}}{1-c}-\\frac{\\log (a)^{1-c}}{1-c}\\right)\n$$\nwhich goes to infinity if $c \\leq 1$ and converges if $c>1$. Thus,\n$$\n\\sum_{n=2}^{\\infty} \\frac{1}{n \\log (n)^c}\n$$\nconverges if and only if $c>1$. \n\\end{proof}", "informal_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$ which implies that $p_{f(n)} \\rightarrow L$, as required."} +{"name": "Pugh_exercise_3_63b", "source": "Pugh.lean", "header": "import Mathlib\n\nopen Filter Real Function\nopen scoped Topology\nnoncomputable section\n", "formal_statement": "theorem Pugh_exercise_3_63b (p : ℝ) (f : ℕ → ℝ) (hp : p ≤ 1)\n (h : f = λ (k : ℕ) => (1 : ℝ) / (k * (log k) ^ p)) :\n ¬ ∃ l, Tendsto f atTop (𝓝 l) := sorry", "formal_proof": null, "informal_stmt": "Prove that $\\sum 1/k(\\log(k))^p$ diverges when $p \\leq 1$.\n\\begin{proof} \n Using the integral test, for a set $a$, we see\n$$\n\\lim _{b \\rightarrow \\infty} \\int_a^b \\frac{1}{x \\log (x)^c} d x=\\lim _{b \\rightarrow \\infty}\\left(\\frac{\\log (b)^{1-c}}{1-c}-\\frac{\\log (a)^{1-c}}{1-c}\\right)\n$$\nwhich goes to infinity if $c \\leq 1$ and converges if $c>1$. Thus,\n$$\n\\sum_{n=2}^{\\infty} \\frac{1}{n \\log (n)^c}\n$$\nconverges if and only if $c>1$. \n\\end{proof}", "informal_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$ which implies that $p_{f(n)} \\rightarrow L$, as required."} +{"name": "Pugh_exercise_4_15a", "source": "Pugh.lean", "header": "import Mathlib\n\nopen Filter Real Function\nopen scoped Topology\nnoncomputable section\n", "formal_statement": "theorem Pugh_exercise_4_15a {α : Type*}\n (a b : ℝ) (F : Set (ℝ → ℝ)) :\n (∀ x : ℝ, ∀ ε > 0, ∃ U ∈ (𝓝 x),\n (∀ y z : U, ∀ f : ℝ → ℝ, f ∈ F → (dist (f y) (f z) < ε)))\n ↔\n ∃ (μ : ℝ → ℝ), ∀ (x : ℝ), (0 : ℝ) ≤ μ x ∧ Tendsto μ (𝓝 0) (𝓝 0) ∧\n (∀ (s t : ℝ) (f : ℝ → ℝ), f ∈ F → |(f s) - (f t)| ≤ μ (|s - t|)) := sorry", "formal_proof": null, "informal_stmt": "A continuous, strictly increasing function $\\mu \\colon (0, \\infty) \\rightarrow (0, \\infty)$ is a modulus of continuity if $\\mu(s) \\rightarrow 0$ as $s \\rightarrow 0$. A function $f \\colon [a, b] \\rightarrow \\mathbb{R}$ has modulus of continuity $\\mu$ if $|f(s) - f(t)| \\leq \\mu(|s - t|)$ for all $s, t \\in [a, b]$. Prove that a function is uniformly continuous if and only if it has a modulus of continuity.\n\\begin{proof}\n Suppose there exists a modulus of continuity $w$ for $f$, then fix $\\varepsilon>0$, since $\\lim _{s \\rightarrow 0} w(s)=0$, there exists $\\delta>0$ such that for any $|s|<\\delta$, we have $w(s)<\\varepsilon$, then we have for any $x, z \\in X$ such that $d_X(x, z)<\\delta$, we have $d_Y(f(x), f(z)) \\leq w\\left(d_X(x, z)\\right)<\\varepsilon$, which means $f$ is uniformly continuous.\n\nSuppose $f:\\left(X, d_X\\right) \\rightarrow\\left(Y, d_Y\\right)$ is uniformly continuous.\nLet $\\delta_1>0$ be such that $d_X(a, b)<\\delta_1$ implies $d_Y(f(a), f(b))<1$.\nDefine $w:[0, \\infty) \\rightarrow[0, \\infty]$ by\n$$\nw(s)= \\begin{cases}\\left.\\sup \\left\\{d_Y(f(a), f(b))\\right\\} \\mid d_X(a, b) \\leq s\\right\\} & \\text { if } s \\leq \\delta_1 \\\\ \\infty & \\text { if } s>\\delta_1\\end{cases}\n$$\nWe'll show that $w$ is a modulus of continuity for $f \\ldots$\nBy definition of $w$, it's immediate that $w(0)=0$ and it's clear that\n$$\nd_Y(f(a), f(b)) \\leq w\\left(d_X(a, b)\\right)\n$$\nfor all $a, b \\in X$.\nIt remains to show $\\lim _{s \\rightarrow 0^{+}} w(s)=0$.\nIt's easily seen that $w$ is nonnegative and non-decreasing, hence $\\lim _{s \\rightarrow 0^{+}}=L$ for some $L \\geq 0$, where $L=\\inf w((0, \\infty))$\nLet $\\epsilon>0$.\nBy uniform continuity of $f$, there exists $\\delta>0$ such that $d_X(a, b)<\\delta$ implies $d_Y(f(a), f(b))<\\epsilon$, hence by definition of $w$, we get $w(\\delta) \\leq \\epsilon$.\nThus $L \\leq \\epsilon$ for all $\\epsilon>0$, hence $L=0$.\nThis completes the proof.\n\\end{proof}\n\\end{document}", "informal_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$ which implies that $p_{f(n)} \\rightarrow L$, as required."} +{"name": "Munkres_exercise_13_1", "source": "Munkres.lean", "header": "import Mathlib\n\nopen Filter Set TopologicalSpace\nopen Topology\nnoncomputable section\n", "formal_statement": "theorem Munkres_exercise_13_1 (X : Type*) [TopologicalSpace X] (A : Set X)\n (h1 : ∀ x ∈ A, ∃ U : Set X, x ∈ U ∧ IsOpen U ∧ U ⊆ A) :\n IsOpen A := sorry", "formal_proof": null, "informal_stmt": "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$.\n\\begin{proof}\n 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\n$$\nA=\\bigcup_{x \\in A} U_x\n$$\nObserve that if we prove the above claim, then $A$ will be open, being a union of arbitrary open sets. Since, for each $x \\in A, U_x \\subset A \\Longrightarrow \\cup U_x \\subset A$. For the converse, observe that given any $x \\in A, x \\in U_x$ and hence in the union. Thus we proved our claim, and hence $A$ is an open set.\n\\end{proof}", "informal_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 each $x \\in A, U_x \\subset A \\Longrightarrow \\cup U_x \\subset A$. For the converse, observe that given any $x \\in A, x \\in U_x$ and hence in the union. Thus we proved our claim, and hence $A$ is an open set."} +{"name": "Munkres_exercise_13_3b", "source": "Munkres.lean", "header": "import Mathlib\n\nopen Filter Set TopologicalSpace\nopen Topology\nnoncomputable section\n", "formal_statement": "theorem Munkres_exercise_13_3b : ¬ ∀ X : Type, ∀s : Set (Set X),\n (∀ t : Set X, t ∈ s → (Set.Infinite tᶜ ∨ t = ∅ ∨ t = ⊤)) →\n (Set.Infinite (⋃₀ s)ᶜ ∨ (⋃₀ s) = ∅ ∨ (⋃₀ s) = ⊤) := sorry", "formal_proof": null, "informal_stmt": "Show that the collection $$\\mathcal{T}_\\infty = \\{U | X - U \\text{ is infinite or empty or all of X}\\}$$ does not need to be a topology on the set $X$.\n\\begin{proof}\n Let $X=\\mathbb{R}, U_1=(-\\infty, 0)$ and $U_2=(0, \\infty)$. Then $U_1$ and $U_2$ are in $\\mathcal{T}_{\\infty}$ but $U_1 \\cup U_2=\\mathbb{R} \\backslash\\{0\\}$ is not.\n\\end{proof}", "informal_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 each $x \\in A, U_x \\subset A \\Longrightarrow \\cup U_x \\subset A$. For the converse, observe that given any $x \\in A, x \\in U_x$ and hence in the union. Thus we proved our claim, and hence $A$ is an open set."} +{"name": "Munkres_exercise_13_4a1", "source": "Munkres.lean", "header": "import Mathlib\n\nopen Filter Set TopologicalSpace\nopen Topology\nnoncomputable section\n", "formal_statement": "theorem Munkres_exercise_13_4a1 (X I : Type*) (T : I → Set (Set X)) (h : ∀ i, is_topology X (T i)) :\n is_topology X (⋂ i : I, T i) := sorry", "formal_proof": null, "informal_stmt": "If $\\mathcal{T}_\\alpha$ is a family of topologies on $X$, show that $\\bigcap \\mathcal{T}_\\alpha$ is a topology on $X$.\n\\begin{proof}\n 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}_\\alpha$ since $\\mathcal{T}_\\alpha$ is a topology on $X$, so $\\bigcup_\\beta V_\\beta \\in \\bigcap_\\alpha \\mathcal{T}_\\alpha$. Similarly, if $U_1, \\ldots, U_n$ are elements of $\\bigcap_\\alpha \\mathcal{T}_\\alpha$, then for each $\\alpha$ we have $\\bigcup_{i=1}^n U_i \\in \\mathcal{T}_\\alpha$ and therefore $\\bigcup_{i=1}^n U_i \\in \\bigcap_\\alpha \\mathcal{T}_\\alpha$. It follows that $\\bigcap_\\alpha \\mathcal{T}_\\alpha$ is a topology on $X$.\n\\end{proof}", "informal_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 each $x \\in A, U_x \\subset A \\Longrightarrow \\cup U_x \\subset A$. For the converse, observe that given any $x \\in A, x \\in U_x$ and hence in the union. Thus we proved our claim, and hence $A$ is an open set."} +{"name": "Munkres_exercise_13_4a2", "source": "Munkres.lean", "header": "import Mathlib\n\nopen Filter Set TopologicalSpace\nopen Topology\nnoncomputable section\n", "formal_statement": "theorem Munkres_exercise_13_4a2 :\n ∃ (X I : Type*) (T : I → Set (Set X)),\n (∀ i, is_topology X (T i)) ∧ ¬ is_topology X (⋂ i : I, T i) := sorry", "formal_proof": null, "informal_stmt": "If $\\mathcal{T}_\\alpha$ is a family of topologies on $X$, show that $\\bigcup \\mathcal{T}_\\alpha$ does not need to be a topology on $X$.\n\\begin{proof}\n On the other hand, the union $\\bigcup_\\alpha \\mathcal{T}_\\alpha$ is in general not a topology on $X$. For instance, let $X=\\{a, b, c\\}$. Then $\\mathcal{T}_1=\\{\\emptyset, X,\\{a\\}\\}$ and $\\mathcal{T}_2=\\{\\emptyset, X,\\{b\\}\\}$ are topologies on $X$ but $\\mathcal{T}_1 \\cup \\mathcal{T}_2=$ $\\{\\emptyset, X,\\{a\\},\\{b\\}\\}$ is not.\n\\end{proof}", "informal_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 each $x \\in A, U_x \\subset A \\Longrightarrow \\cup U_x \\subset A$. For the converse, observe that given any $x \\in A, x \\in U_x$ and hence in the union. Thus we proved our claim, and hence $A$ is an open set."} +{"name": "Munkres_exercise_13_4b1", "source": "Munkres.lean", "header": "import Mathlib\n\nopen Filter Set TopologicalSpace\nopen Topology\nnoncomputable section\n", "formal_statement": "theorem Munkres_exercise_13_4b1 (X I : Type*) (T : I → Set (Set X)) (h : ∀ i, is_topology X (T i)) :\n ∃! T', is_topology X T' ∧ (∀ i, T i ⊆ T') ∧\n ∀ T'', is_topology X T'' → (∀ i, T i ⊆ T'') → T'' ⊆ T' := sorry", "formal_proof": null, "informal_stmt": "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$.\n\\begin{proof}\n (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 $\\mathcal{S}=\\bigcup_\\alpha \\mathcal{B}_\\alpha$. Then the collection $\\mathcal{B}$ of all finite intersections of elements of $\\mathcal{S}$ is a basis for $\\mathcal{T}$. Clearly $\\mathcal{T}_\\alpha \\subset \\mathcal{T}$ for all $\\alpha$. We now prove that if $\\mathcal{O}$ is a topology on $X$ such that $\\mathcal{T}_\\alpha \\subset \\mathcal{O}$ for all $\\alpha$, then $\\mathcal{T} \\subset \\mathcal{O}$. Given such $\\mathcal{O}$, we have $\\mathcal{B}_\\alpha \\subset \\mathcal{O}$ for all $\\alpha$, so $\\mathcal{S} \\subset \\mathcal{O}$. Since $\\mathcal{O}$ is a topology, it must contain all finite intersections of elements of $\\mathcal{S}$, so $\\mathcal{B} \\subset \\mathcal{O}$ and hence $\\mathcal{T} \\subset \\mathcal{O}$. We conclude that the topology $\\mathcal{T}$ generated by the subbasis $\\mathcal{S}=\\cup_\\alpha \\mathcal{B}_\\alpha$ is the unique smallest topology on $X$ containing all the collections $\\mathcal{T}_\\alpha$.\n\\end{proof}", "informal_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 each $x \\in A, U_x \\subset A \\Longrightarrow \\cup U_x \\subset A$. For the converse, observe that given any $x \\in A, x \\in U_x$ and hence in the union. Thus we proved our claim, and hence $A$ is an open set."} +{"name": "Munkres_exercise_13_4b2", "source": "Munkres.lean", "header": "import Mathlib\n\nopen Filter Set TopologicalSpace\nopen Topology\nnoncomputable section\n", "formal_statement": "theorem Munkres_exercise_13_4b2 (X I : Type*) (T : I → Set (Set X)) (h : ∀ i, is_topology X (T i)) :\n ∃! T', is_topology X T' ∧ (∀ i, T' ⊆ T i) ∧\n ∀ T'', is_topology X T'' → (∀ i, T'' ⊆ T i) → T' ⊆ T'' := sorry", "formal_proof": null, "informal_stmt": "Let $\\mathcal{T}_\\alpha$ be a family of topologies on $X$. Show that there is a unique largest topology on $X$ contained in all the collections $\\mathcal{T}_\\alpha$.\n\\begin{proof}\n Now we prove that there exists a unique largest topology contained in all $\\mathcal{T}_\\alpha$. Uniqueness of such topology is clear. Consider $\\mathcal{T}=\\bigcap_\\alpha \\mathcal{T}_\\alpha$. We already know that $\\mathcal{T}$ is a topology by, and clearly $\\mathcal{T} \\subset \\mathcal{T}_\\alpha$ for all $\\alpha$. If $\\mathcal{O}$ is another topology contained in all $\\mathcal{T}_\\alpha$, it must be contained in their intersection, so $\\mathcal{O} \\subset \\mathcal{T}$. I follows that $\\mathcal{T}$ is the unique largest topology contained in all $\\mathcal{T}_\\alpha$.\n\\end{proof}", "informal_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 each $x \\in A, U_x \\subset A \\Longrightarrow \\cup U_x \\subset A$. For the converse, observe that given any $x \\in A, x \\in U_x$ and hence in the union. Thus we proved our claim, and hence $A$ is an open set."} +{"name": "Munkres_exercise_13_5a", "source": "Munkres.lean", "header": "import Mathlib\n\nopen Filter Set TopologicalSpace\nopen Topology\nnoncomputable section\n", "formal_statement": "theorem Munkres_exercise_13_5a {X : Type*}\n [TopologicalSpace X] (A : Set (Set X)) (hA : IsTopologicalBasis A) :\n generateFrom A = generateFrom (sInter {T | is_topology X T ∧ A ⊆ T}) := sorry", "formal_proof": null, "informal_stmt": "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}$.\n\\begin{proof}\n 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}$, so that $U$ is a union of elements of $\\mathcal{A}$. Since each of this elements is also an element of $\\mathcal{O}$, their union $U$ belongs to $\\mathcal{O}$. Thus $\\mathcal{T} \\subset \\mathcal{O}$ and the equality holds.\n\\end{proof}", "informal_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 each $x \\in A, U_x \\subset A \\Longrightarrow \\cup U_x \\subset A$. For the converse, observe that given any $x \\in A, x \\in U_x$ and hence in the union. Thus we proved our claim, and hence $A$ is an open set."} +{"name": "Munkres_exercise_13_5b", "source": "Munkres.lean", "header": "import Mathlib\n\nopen Filter Set TopologicalSpace\nopen Topology\nnoncomputable section\n", "formal_statement": "theorem Munkres_exercise_13_5b {X : Type*}\n [t : TopologicalSpace X] (A : Set (Set X)) (hA : t = generateFrom A) :\n generateFrom A = generateFrom (sInter {T | is_topology X T ∧ A ⊆ T}) := sorry", "formal_proof": null, "informal_stmt": "Show that if $\\mathcal{A}$ is a subbasis for a topology on $X$, then the topology generated by $\\mathcal{A}$ equals the intersection of all topologies on $X$ that contain $\\mathcal{A}$.\n\\begin{proof}\n If we now considered $\\mathcal{A}$ as a subbasis, then the elements of $\\mathcal{T}$ are union of finite intersections of elements of $\\mathcal{A}$. The inclusion $\\mathcal{O} \\subset \\mathcal{T}$ is again clear and $\\mathcal{T} \\subset \\mathcal{O}$ holds since every union of finite intersections of elements of $\\mathcal{A}$ belongs to $\\mathcal{O}$.\n\\end{proof}", "informal_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 each $x \\in A, U_x \\subset A \\Longrightarrow \\cup U_x \\subset A$. For the converse, observe that given any $x \\in A, x \\in U_x$ and hence in the union. Thus we proved our claim, and hence $A$ is an open set."} +{"name": "Munkres_exercise_13_6", "source": "Munkres.lean", "header": "import Mathlib\n\nopen Filter Set TopologicalSpace\nopen Topology\nnoncomputable section\n", "formal_statement": "theorem Munkres_exercise_13_6 :\n ¬ (∀ U, Rl.IsOpen U → K_topology.IsOpen U) ∧ ¬ (∀ U, K_topology.IsOpen U → Rl.IsOpen U) := sorry", "formal_proof": null, "informal_stmt": "Show that the lower limit topology $\\mathbb{R}_l$ and $K$-topology $\\mathbb{R}_K$ are not comparable.\n\\begin{proof}\n 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 \\mathcal{T}_K$. Similarly, given the basis element $(-1,1) \\backslash K$ for $\\mathcal{T}_K$, there is no basis element for $\\mathcal{T}_{\\ell}$ containing 0 contained in $(-1,1) \\backslash K$, so $\\mathcal{T}_K \\not \\subset \\mathcal{T}_{\\ell}$.\n\\end{proof}", "informal_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 each $x \\in A, U_x \\subset A \\Longrightarrow \\cup U_x \\subset A$. For the converse, observe that given any $x \\in A, x \\in U_x$ and hence in the union. Thus we proved our claim, and hence $A$ is an open set."} +{"name": "Munkres_exercise_13_8a", "source": "Munkres.lean", "header": "import Mathlib\n\nopen Filter Set TopologicalSpace\nopen Topology\nnoncomputable section\n", "formal_statement": "theorem Munkres_exercise_13_8a :\n IsTopologicalBasis {S : Set ℝ | ∃ a b : ℚ, a < b ∧ S = Ioo ↑a ↑b} := sorry", "formal_proof": null, "informal_stmt": "Show that the collection $\\{(a,b) \\mid a < b, a \\text{ and } b \\text{ rational}\\}$ is a basis that generates the standard topology on $\\mathbb{R}$.\n\\begin{proof}\n Exercise 13.8. (a) First note that $\\mathcal{B}$ is a basis for a topology on $\\mathbb{R}$. This follows from the fact that the union of its elements is all of $\\mathbb{R}$ and the intersection of two elements of $\\mathcal{B}$ is either empty or another element of $\\mathcal{B}$. Let $\\mathcal{T}$ be the standard topology on $\\mathbb{R}$. Clearly the topology generated by $\\mathcal{B}$ is coarser than $\\mathcal{T}$. Let $U \\in \\mathcal{T}$ and $x \\in U$. Then $U$ contains an open interval with centre $x$. Since the rationals are dense in $\\mathbb{R}$ with the standard topology, there exists $q \\in \\mathbb{Q}$ such that $x \\in(x-q, x+q) \\subset U$. This proves that $\\mathcal{T}$ is coarser than the topology generated by $\\mathcal{B}$. We conclude that $\\mathcal{B}$ generates the standard topology on $\\mathbb{R}$.\n\\end{proof}", "informal_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 each $x \\in A, U_x \\subset A \\Longrightarrow \\cup U_x \\subset A$. For the converse, observe that given any $x \\in A, x \\in U_x$ and hence in the union. Thus we proved our claim, and hence $A$ is an open set."} +{"name": "Munkres_exercise_13_8b", "source": "Munkres.lean", "header": "import Mathlib\n\nopen Filter Set TopologicalSpace\nopen Topology\nnoncomputable section\n", "formal_statement": "theorem Munkres_exercise_13_8b :\n (generateFrom {S : Set ℝ | ∃ a b : ℚ, a < b ∧ S = Ico ↑a ↑b}).IsOpen ≠\n (lower_limit_topology ℝ).IsOpen := sorry", "formal_proof": null, "informal_stmt": "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}$.\n\\begin{proof}\n (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 greater than $r$. Then $[r, s)$ is a basis element for the topology of $\\mathbb{R}_{\\ell}$, but $[r, s)$ is not a union of elements of $\\mathcal{C}$. Indeed, suppose that $[r, s)=\\cup_\\alpha\\left[a_\\alpha, b_\\alpha\\right)$ for rationals $a_\\alpha, b_\\alpha$. Then $r \\in\\left[a_\\alpha, b_\\alpha\\right)$ for some $\\alpha$. Since $r$ is irrational we must have $a_\\alpha min (f x) (g x)) := sorry", "formal_proof": null, "informal_stmt": "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.\n\\begin{proof}\n 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 follows from the pasting lemma that\n$$\nh: X \\rightarrow Y, \\quad h(x)=\\min \\{f(x), g(x)\\}= \\begin{cases}f^{\\prime}(x) & \\text { if } x \\in A \\\\ g^{\\prime}(x) & \\text { if } x \\in B\\end{cases}\n$$\nis continuous\n\\end{proof}", "informal_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 each $x \\in A, U_x \\subset A \\Longrightarrow \\cup U_x \\subset A$. For the converse, observe that given any $x \\in A, x \\in U_x$ and hence in the union. Thus we proved our claim, and hence $A$ is an open set."} +{"name": "Munkres_exercise_18_13", "source": "Munkres.lean", "header": "import Mathlib\n\nopen Filter Set TopologicalSpace\nopen Topology\nnoncomputable section\n", "formal_statement": "theorem Munkres_exercise_18_13\n {X : Type*} [TopologicalSpace X] {Y : Type*} [TopologicalSpace Y]\n [T2Space Y] {A : Set X} {f : A → Y} (hf : Continuous f)\n (g : closure A → Y)\n (g_con : Continuous g) :\n ∀ (g' : closure A → Y), Continuous g' → (∀ (x : closure A), g x = g' x) := sorry", "formal_proof": null, "informal_stmt": "Let $A \\subset X$; let $f: A \\rightarrow Y$ be continuous; let $Y$ be Hausdorff. Show that if $f$ may be extended to a continuous function $g: \\bar{A} \\rightarrow Y$, then $g$ is uniquely determined by $f$.\n\\begin{proof}\n Let $h, g: \\bar{A} \\rightarrow Y$ be continuous extensions of $f$. Suppose that there is a point $x \\in \\bar{A}$ such that $h(x) \\neq g(x)$. Since $h=g$ on $A$, we must have $x \\in A^{\\prime}$. Since $Y$ is Hausdorff, there is a neighbourhood $U$ of $h(x)$ and a neighbourhood $V$ of $g(x)$ such that $U \\cap V=\\emptyset$. Since $h$ and $g$ are continuous, $h^{-1}(U) \\cap g^{-1}(V)$ is a neighbourhood of $x$. Since $x \\in A^{\\prime}$, there is a point $y \\in h^{-1}(U) \\cap g^{-1}(V) \\cap A$ different from $x$. But $h=g$ on $A$, so $g^{-1}(V) \\cap A=h^{-1}(V) \\cap A$ and hence $y \\in h^{-1}(U) \\cap h^{-1}(V)=h^{-1}(U \\cap V)=\\emptyset$, a contradiction. It follows that $h=g$ on $\\bar{A}$.\n\\end{proof}", "informal_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 each $x \\in A, U_x \\subset A \\Longrightarrow \\cup U_x \\subset A$. For the converse, observe that given any $x \\in A, x \\in U_x$ and hence in the union. Thus we proved our claim, and hence $A$ is an open set."} +{"name": "Munkres_exercise_19_6a", "source": "Munkres.lean", "header": "import Mathlib\n\nopen Filter Set TopologicalSpace\nopen Topology\nnoncomputable section\n", "formal_statement": "theorem Munkres_exercise_19_6a\n {n : ℕ}\n {f : Fin n → Type*} {x : ℕ → Πa, f a}\n (y : Πi, f i)\n [Πa, TopologicalSpace (f a)] :\n Tendsto x atTop (𝓝 y) ↔ ∀ i, Tendsto (λ j => (x j) i) atTop (𝓝 (y i)) := sorry", "formal_proof": null, "informal_stmt": "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$.\n\\begin{proof}\n 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$.\nFirst assume that the sequence $\\mathbf{x}_1, \\mathbf{x}_2, \\ldots$ converges to $\\mathbf{x}=\\left(x_\\alpha\\right)_\\alpha$ in the product space $\\prod_\\alpha X_\\alpha$. Fix an index $\\beta$ and let $U$ be a neighbourhood of $\\pi_\\beta(\\mathbf{x})=x_\\beta$. Let $V=\\prod_\\alpha U_\\alpha$, where $U_\\alpha=X_\\alpha$ for each $\\alpha \\neq \\beta$ and $U_\\beta=U$. Then $V$ is a neighbourhood of $\\mathbf{x}$, so there exists $N \\in \\mathbb{Z}_{+}$such that $\\mathbf{x}_n \\in V$ for all $n \\geq N$. Therefore $\\pi_\\beta\\left(\\mathbf{x}_n\\right)=x_n^\\beta \\in U$ for all $n \\geq N$. Since $U$ was arbitrary, it follows that $\\pi_\\beta\\left(\\mathbf{x}_1\\right), \\pi_\\beta\\left(\\mathbf{x}_2\\right), \\ldots$ converges to $\\pi_\\beta(\\mathbf{x})$. Since $\\beta$ was arbitrary, this holds for all indices $\\alpha$.\n\\end{proof}", "informal_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 each $x \\in A, U_x \\subset A \\Longrightarrow \\cup U_x \\subset A$. For the converse, observe that given any $x \\in A, x \\in U_x$ and hence in the union. Thus we proved our claim, and hence $A$ is an open set."} +{"name": "Munkres_exercise_20_2", "source": "Munkres.lean", "header": "import Mathlib\n\nopen Filter Set TopologicalSpace\nopen Topology\nnoncomputable section\n", "formal_statement": "theorem Munkres_exercise_20_2\n [TopologicalSpace (ℝ ×ₗ ℝ)] [OrderTopology (ℝ ×ₗ ℝ)]\n : MetrizableSpace (ℝ ×ₗ ℝ) := sorry", "formal_proof": null, "informal_stmt": "Show that $\\mathbb{R} \\times \\mathbb{R}$ in the dictionary order topology is metrizable.\n\\begin{proof}\n The dictionary order topology on $\\mathbb{R} \\times \\mathbb{R}$ is the same as the product topology $\\mathbb{R}_d \\times \\mathbb{R}$, where $\\mathbb{R}_d$ denotes $\\mathbb{R}$ with the discrete topology. We know that $\\mathbb{R}_d$ and $\\mathbb{R}$ are metrisable. Thus, it suffices to show that the product of two metrisable spaces is metrisable.\nSo let $X$ and $Y$ be metrisable spaces, with metrics $d$ and $d^{\\prime}$ respectively. On $X \\times Y$, define\n$$\n\\rho(x \\times y, w \\times z)=\\max \\left\\{d(x, w), d^{\\prime}(y, z)\\right\\} .\n$$\nThen $\\rho$ is a metric on $X \\times Y$; it remains to prove that it induces the product topology on $X \\times Y$. If $B_d\\left(x, r_1\\right) \\times B_d\\left(y, r_2\\right)$ is a basis element for the product space $X \\times Y$, and $r=\\min \\left\\{r_1, r_2\\right\\}$, then $x \\times y \\in B_\\rho(x \\times y, r) \\subset B_d\\left(x, r_1\\right) \\times B_d\\left(y, r_2\\right)$, so the product topology is coarser than the $\\rho$-topology. Conversely, if $B_\\rho(x \\times y, \\delta)$ is a basis element for the $\\rho$-topology, then $x \\times y \\in B_d(x, \\delta) \\times B_{d^{\\prime}}(y, \\delta) \\subset$ $B_\\rho(x \\times y, \\delta)$, so the product topology is finer than the $\\rho$-topology. It follows that both topologies are equal, so the product space $X \\times Y$ is metrisable.\n\\end{proof}", "informal_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 each $x \\in A, U_x \\subset A \\Longrightarrow \\cup U_x \\subset A$. For the converse, observe that given any $x \\in A, x \\in U_x$ and hence in the union. Thus we proved our claim, and hence $A$ is an open set."} +{"name": "Munkres_exercise_21_6a", "source": "Munkres.lean", "header": "import Mathlib\n\nopen Filter Set TopologicalSpace\nopen Topology\nnoncomputable section\n", "formal_statement": "theorem Munkres_exercise_21_6a\n (f : ℕ → I → ℝ )\n (h : ∀ x n, f n x = x ^ n) :\n ∀ x, ∃ y, Tendsto (λ n => f n x) atTop (𝓝 y) := sorry", "formal_proof": null, "informal_stmt": "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]$.\n\\begin{proof}\nIf $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\n\\end{proof}", "informal_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 each $x \\in A, U_x \\subset A \\Longrightarrow \\cup U_x \\subset A$. For the converse, observe that given any $x \\in A, x \\in U_x$ and hence in the union. Thus we proved our claim, and hence $A$ is an open set."} +{"name": "Munkres_exercise_21_6b", "source": "Munkres.lean", "header": "import Mathlib\n\nopen Filter Set TopologicalSpace\nopen Topology\nnoncomputable section\n", "formal_statement": "theorem Munkres_exercise_21_6b\n (f : ℕ → I → ℝ )\n (h : ∀ x n, f n x = x ^ n) :\n ¬ ∃ f₀, TendstoUniformly f f₀ atTop := sorry", "formal_proof": null, "informal_stmt": "Define $f_{n}:[0,1] \\rightarrow \\mathbb{R}$ by the equation $f_{n}(x)=x^{n}$. Show that the sequence $\\left(f_{n}\\right)$ does not converge uniformly.\n\\begin{proof}\n The sequence $\\left(f_n\\right)_n$ does not converge uniformly, since given $0<\\varepsilon<1$ and $N \\in \\mathbb{Z}_{+}$, for $x=\\varepsilon^{1 / N}$ we have $d\\left(f_N(x), f(x)\\right)=\\varepsilon$. We can also apply Theorem 21.6: the convergence is not uniform since $f$ is not continuous.\n\\end{proof}", "informal_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 each $x \\in A, U_x \\subset A \\Longrightarrow \\cup U_x \\subset A$. For the converse, observe that given any $x \\in A, x \\in U_x$ and hence in the union. Thus we proved our claim, and hence $A$ is an open set."} +{"name": "Munkres_exercise_21_8", "source": "Munkres.lean", "header": "import Mathlib\n\nopen Filter Set TopologicalSpace\nopen Topology\nnoncomputable section\n", "formal_statement": "theorem Munkres_exercise_21_8\n {X : Type*} [TopologicalSpace X] {Y : Type*} [MetricSpace Y]\n {f : ℕ → X → Y} {x : ℕ → X}\n (hf : ∀ n, Continuous (f n))\n (x₀ : X)\n (hx : Tendsto x atTop (𝓝 x₀))\n (f₀ : X → Y)\n (hh : TendstoUniformly f f₀ atTop) :\n Tendsto (λ n => f n (x n)) atTop (𝓝 (f₀ x₀)) := sorry", "formal_proof": null, "informal_stmt": "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 to $f(x)$.\n\\begin{proof}\n 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 all $x \\in X$ and all $n \\geq N_1$, so that $d\\left(f_n\\left(x_n\\right), f\\left(x_n\\right)\\right)<\\varepsilon / 2$ for all $n \\geq N_1$. Moreover, $f$ is continuous, so there exists $N_2 \\in \\mathbb{Z}_{+}$such that $d\\left(f\\left(x_n\\right), f(x)\\right)<\\varepsilon / 2$ for all $n \\geq N_2$. Thus, if $N>\\max \\left\\{N_1, N_2\\right\\}$, then\n$$\nd\\left(f_n\\left(x_n\\right), f(x)\\right) \\leq d\\left(f_n\\left(x_n\\right), f\\left(x_n\\right)\\right)+d\\left(f\\left(x_n\\right), f(x)\\right)<\\frac{\\varepsilon}{2}+\\frac{\\varepsilon}{2}=\\varepsilon\n$$\nfor all $n \\geq N$, so $f_n\\left(x_n\\right) \\in V$ for all $n \\geq N$. It follows that $\\left(f_n\\left(x_n\\right)\\right)_n$ converges to $f(x)$.\n\\end{proof}", "informal_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 each $x \\in A, U_x \\subset A \\Longrightarrow \\cup U_x \\subset A$. For the converse, observe that given any $x \\in A, x \\in U_x$ and hence in the union. Thus we proved our claim, and hence $A$ is an open set."} +{"name": "Munkres_exercise_22_2a", "source": "Munkres.lean", "header": "import Mathlib\n\nopen Filter Set TopologicalSpace\nopen Topology\nnoncomputable section\n", "formal_statement": "theorem Munkres_exercise_22_2a {X Y : Type*} [TopologicalSpace X]\n [TopologicalSpace Y] (p : X → Y) (h : Continuous p) :\n IsQuotientMap p ↔ ∃ (f : Y → X), Continuous f ∧ p ∘ f = id := sorry", "formal_proof": null, "informal_stmt": "Let $p: X \\rightarrow Y$ be a continuous map. Show that if there is a continuous map $f: Y \\rightarrow X$ such that $p \\circ f$ equals the identity map of $Y$, then $p$ is a quotient map.\n\\begin{proof}\nLet $1_Y: Y \\rightarrow Y$ be the identity map in $Y$. If $U$ is a subset of $Y$ and $p^{-1}(U)$ is open in $X$, then $f^{-1}\\left(p^{-1}(U)\\right)=1_Y^{-1}(U)=U$ is open in $Y$ by continuity of $f$. Thus $p$ is a quotient map.\n\\end{proof}", "informal_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 each $x \\in A, U_x \\subset A \\Longrightarrow \\cup U_x \\subset A$. For the converse, observe that given any $x \\in A, x \\in U_x$ and hence in the union. Thus we proved our claim, and hence $A$ is an open set."} +{"name": "Munkres_exercise_22_2b", "source": "Munkres.lean", "header": "import Mathlib\n\nopen Filter Set TopologicalSpace\nopen Topology\nnoncomputable section\n", "formal_statement": "theorem Munkres_exercise_22_2b {X : Type*} [TopologicalSpace X]\n {A : Set X} (r : X → A) (hr : Continuous r) (h : ∀ x : A, r x = x) :\n IsQuotientMap r := sorry", "formal_proof": null, "informal_stmt": "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.\n\\begin{proof}\nThe 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).\n\\end{proof}", "informal_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 each $x \\in A, U_x \\subset A \\Longrightarrow \\cup U_x \\subset A$. For the converse, observe that given any $x \\in A, x \\in U_x$ and hence in the union. Thus we proved our claim, and hence $A$ is an open set."} +{"name": "Munkres_exercise_22_5", "source": "Munkres.lean", "header": "import Mathlib\n\nopen Filter Set TopologicalSpace\nopen Topology\nnoncomputable section\n", "formal_statement": "theorem Munkres_exercise_22_5 {X Y : Type*} [TopologicalSpace X]\n [TopologicalSpace Y] (p : X → Y) (hp : IsOpenMap p)\n (A : Set X) (hA : IsOpen A) : IsOpenMap (p ∘ Subtype.val : A → Y) := sorry", "formal_proof": null, "informal_stmt": "Let $p \\colon X \\rightarrow Y$ be an open map. Show that if $A$ is open in $X$, then the map $q \\colon A \\rightarrow p(A)$ obtained by restricting $p$ is an open map.\n\\begin{proof}\nLet $U$ be open in $A$. Since $A$ is open in $X, U$ is open in $X$ as well, so $p(U)$ is open in $Y$. Since $q(U)=p(U)=p(U) \\cap p(A)$, the set $q(U)$ is open in $p(A)$. Thus $q$ is an open map.\n\\end{proof}", "informal_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 each $x \\in A, U_x \\subset A \\Longrightarrow \\cup U_x \\subset A$. For the converse, observe that given any $x \\in A, x \\in U_x$ and hence in the union. Thus we proved our claim, and hence $A$ is an open set."} +{"name": "Munkres_exercise_23_2", "source": "Munkres.lean", "header": "import Mathlib\n\nopen Filter Set TopologicalSpace\nopen Topology\nnoncomputable section\n", "formal_statement": "theorem Munkres_exercise_23_2 {X : Type*}\n [TopologicalSpace X] {A : ℕ → Set X} (hA : ∀ n, IsConnected (A n))\n (hAn : ∀ n, A n ∩ A (n + 1) ≠ ∅) :\n IsConnected (⋃ n, A n) := sorry", "formal_proof": null, "informal_stmt": "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.\n\\begin{proof}\n 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 $A_n \\subset B$ then $A_{n+1} \\subset B$, for if $A_{n+1} \\subset C$ then $A_n \\cap A_{n+1} \\subset B \\cap C=\\emptyset$, in contradiction with the assumption. By induction, $A_n \\subset B$ for all $n \\in \\mathbb{Z}_{+}$, so that $\\bigcup_n A_n \\subset B$. It follows that $\\bigcup_n A_n$ is connected.\n\\end{proof}", "informal_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 each $x \\in A, U_x \\subset A \\Longrightarrow \\cup U_x \\subset A$. For the converse, observe that given any $x \\in A, x \\in U_x$ and hence in the union. Thus we proved our claim, and hence $A$ is an open set."} +{"name": "Munkres_exercise_23_3", "source": "Munkres.lean", "header": "import Mathlib\n\nopen Filter Set TopologicalSpace\nopen Topology\nnoncomputable section\n", "formal_statement": "theorem Munkres_exercise_23_3 {X : Type*} [TopologicalSpace X]\n [TopologicalSpace X] {A : ℕ → Set X}\n (hAn : ∀ n, IsConnected (A n))\n (A₀ : Set X)\n (hA : IsConnected A₀)\n (h : ∀ n, A₀ ∩ A n ≠ ∅) :\n IsConnected (A₀ ∪ (⋃ n, A n)) := sorry", "formal_proof": null, "informal_stmt": "Let $\\left\\{A_{\\alpha}\\right\\}$ be a collection of connected subspaces of $X$; let $A$ be a connected subset of $X$. Show that if $A \\cap A_{\\alpha} \\neq \\varnothing$ for all $\\alpha$, then $A \\cup\\left(\\bigcup A_{\\alpha}\\right)$ is connected.\n\\begin{proof}\n For each $\\alpha$ we have $A \\cap A_\\alpha \\neq \\emptyset$, so each $A \\cup A_\\alpha$ is connected by Theorem 23.3. In turn $\\left\\{A \\cup A_\\alpha\\right\\}_\\alpha$ is a collection of connected spaces that have a point in common (namely any point in $A)$, so $\\bigcup_\\alpha\\left(A \\cup A_\\alpha\\right)=A \\cup\\left(\\bigcup_\\alpha A_\\alpha\\right)$ is connected. \n\\end{proof}", "informal_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 each $x \\in A, U_x \\subset A \\Longrightarrow \\cup U_x \\subset A$. For the converse, observe that given any $x \\in A, x \\in U_x$ and hence in the union. Thus we proved our claim, and hence $A$ is an open set."} +{"name": "Munkres_exercise_23_4", "source": "Munkres.lean", "header": "import Mathlib\n\nopen Filter Set TopologicalSpace\nopen Topology\nnoncomputable section\n", "formal_statement": "theorem Munkres_exercise_23_4 {X : Type*} [TopologicalSpace X] [CofiniteTopology X]\n (s : Set X) : Infinite s → IsConnected s := sorry", "formal_proof": null, "informal_stmt": "Show that if $X$ is an infinite set, it is connected in the finite complement topology.\n\\begin{proof}\n 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.\n\\end{proof}", "informal_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 each $x \\in A, U_x \\subset A \\Longrightarrow \\cup U_x \\subset A$. For the converse, observe that given any $x \\in A, x \\in U_x$ and hence in the union. Thus we proved our claim, and hence $A$ is an open set."} +{"name": "Munkres_exercise_23_6", "source": "Munkres.lean", "header": "import Mathlib\n\nopen Filter Set TopologicalSpace\nopen Topology\nnoncomputable section\n", "formal_statement": "theorem Munkres_exercise_23_6 {X : Type*}\n [TopologicalSpace X] {A C : Set X} (hc : IsConnected C)\n (hCA : C ∩ A ≠ ∅) (hCXA : C ∩ Aᶜ ≠ ∅) :\n C ∩ (frontier A) ≠ ∅ := sorry", "formal_proof": null, "informal_stmt": "Let $A \\subset X$. Show that if $C$ is a connected subspace of $X$ that intersects both $A$ and $X-A$, then $C$ intersects $\\operatorname{Bd} A$.\n\\begin{proof}\n Suppose that $C \\cap B d A=C \\cap \\bar{A} \\cap \\overline{X-A}=\\emptyset$. Then $C \\cap A$ and $C \\cap(X \\backslash A)$ are a pair of disjoint non-empty sets whose union is all of $C$, neither of which contains a limit point of the other. Indeed, if $C \\cap(X-A)$ contains a limit point $x$ of $C \\cap A$, then $x \\in C \\cap(X-A) \\cap A^{\\prime} \\subset C \\cap \\bar{A} \\cap \\overline{X-A}=\\emptyset$, a contradiction, and similarly $C \\cap A$ does not contain a limit point of $C \\cap(X-A)$. Then $C \\cap A$ and $C \\cap(X-A)$ constitute a separation of $C$, contradicting the fact that $C$ is connected (Lemma 23.1).\n\\end{proof}", "informal_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 each $x \\in A, U_x \\subset A \\Longrightarrow \\cup U_x \\subset A$. For the converse, observe that given any $x \\in A, x \\in U_x$ and hence in the union. Thus we proved our claim, and hence $A$ is an open set."} +{"name": "Munkres_exercise_23_9", "source": "Munkres.lean", "header": "import Mathlib\n\nopen Filter Set TopologicalSpace\nopen Topology\nnoncomputable section\n", "formal_statement": "theorem Munkres_exercise_23_9 {X Y : Type*}\n [TopologicalSpace X] [TopologicalSpace Y]\n (A₁ A₂ : Set X)\n (B₁ B₂ : Set Y)\n (hA : A₁ ⊂ A₂)\n (hB : B₁ ⊂ B₂)\n (hA : IsConnected A₂)\n (hB : IsConnected B₂) :\n IsConnected ({x | ∃ a b, x = (a, b) ∧ a ∈ A₂ ∧ b ∈ B₂} \\\n {x | ∃ a b, x = (a, b) ∧ a ∈ A₁ ∧ b ∈ B₁}) := sorry", "formal_proof": null, "informal_stmt": "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.\n\\begin{proof}\nThis 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\n$$\nU_x=(X \\times\\{d\\}) \\cup(\\{x\\} \\times Y)\n$$\nis connected since $X \\times\\{d\\}$ and $\\{x\\} \\times Y$ are connected and have the common point $x \\times d$. Then $U=\\bigcup_{x \\in X \\backslash A} U_x$ is connected because it is the union of the connected spaces $U_x$ which have the point $c \\times d$ in common. Similarly, for each $y \\in Y \\backslash B$ the set\n$$\nV_y=(X \\times\\{y\\}) \\cup(\\{c\\} \\times Y)\n$$\nis connected, so $V=\\bigcup_{y \\in Y \\backslash B} V_y$ is connected. Thus $(X \\times Y) \\backslash(A \\times B)=U \\cup V$ is connected since $c \\times d$ is a common point of $U$ and $V$.\n\\end{proof}", "informal_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 each $x \\in A, U_x \\subset A \\Longrightarrow \\cup U_x \\subset A$. For the converse, observe that given any $x \\in A, x \\in U_x$ and hence in the union. Thus we proved our claim, and hence $A$ is an open set."} +{"name": "Munkres_exercise_23_11", "source": "Munkres.lean", "header": "import Mathlib\n\nopen Filter Set TopologicalSpace\nopen Topology\nnoncomputable section\n", "formal_statement": "theorem Munkres_exercise_23_11 {X Y : Type*} [TopologicalSpace X] [TopologicalSpace Y]\n (p : X → Y) (hq : QuotientMap p)\n (hY : ConnectedSpace Y) (hX : ∀ y : Y, IsConnected (p ⁻¹' {y})) :\n ConnectedSpace X := sorry", "formal_proof": null, "informal_stmt": "Let $p: X \\rightarrow Y$ be a quotient map. Show that if each set $p^{-1}(\\{y\\})$ is connected, and if $Y$ is connected, then $X$ is connected.\n\\begin{proof}\n Suppose that $U$ and $V$ constitute a separation of $X$. If $y \\in p(U)$, then $y=p(x)$ for some $x \\in U$, so that $x \\in p^{-1}(\\{y\\})$. Since $p^{-1}(\\{y\\})$ is connected and $x \\in U \\cap p^{-1}(\\{y\\})$, we have $p^{-1}(\\{y\\}) \\subset U$. Thus $p^{-1}(\\{y\\}) \\subset U$ for all $y \\in p(U)$, so that $p^{-1}(p(U)) \\subset U$. The inclusion $U \\subset p^{-1}(p(U))$ if true for any subset and function, so we have the equality $U=p^{-1}(p(U))$ and therefore $U$ is saturated. Similarly, $V$ is saturated. Since $p$ is a quotient map, $p(U)$ and $p(V)$ are disjoint non-empty open sets in $Y$. But $p(U) \\cup p(V)=Y$ as $p$ is surjective, so $p(U)$ and $p(V)$ constitute a separation of $Y$, contradicting the fact that $Y$ is connected. We conclude that $X$ is connected.\n\\end{proof}", "informal_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 each $x \\in A, U_x \\subset A \\Longrightarrow \\cup U_x \\subset A$. For the converse, observe that given any $x \\in A, x \\in U_x$ and hence in the union. Thus we proved our claim, and hence $A$ is an open set."} +{"name": "Munkres_exercise_24_2", "source": "Munkres.lean", "header": "import Mathlib\n\nopen Filter Set TopologicalSpace\nopen Topology\nnoncomputable section\n", "formal_statement": "theorem Munkres_exercise_24_2 {f : (Metric.sphere 0 1 : Set ℝ) → ℝ}\n (hf : Continuous f) : ∃ x, f x = f (-x) := sorry", "formal_proof": null, "informal_stmt": "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)$.\n\\begin{proof}\n 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 intermediate value theorem, since $S^1$ is connected and $g(-x)<00$ and $f(1)<1$. Let $g:[0,1] \\rightarrow[0,1]$ be given by $g(x)=f(x)-x$. Then $g$ is continuous, $g(0)>0$ and $g(1)<0$. Since $[0,1]$ is connected and $g(1)<00$. Therefore $X$ must be uncountable.\n\\end{proof}", "informal_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 each $x \\in A, U_x \\subset A \\Longrightarrow \\cup U_x \\subset A$. For the converse, observe that given any $x \\in A, x \\in U_x$ and hence in the union. Thus we proved our claim, and hence $A$ is an open set."} +{"name": "Munkres_exercise_28_4", "source": "Munkres.lean", "header": "import Mathlib\n\nopen Filter Set TopologicalSpace\nopen Topology\nnoncomputable section\n", "formal_statement": "theorem Munkres_exercise_28_4 {X : Type*}\n [TopologicalSpace X] (hT1 : T1Space X) :\n countably_compact X ↔ limit_point_compact X := sorry", "formal_proof": null, "informal_stmt": "A space $X$ is said to be countably compact if every countable open covering of $X$ contains a finite subcollection that covers $X$. Show that for a $T_1$ space $X$, countable compactness is equivalent to limit point compactness.\n\\begin{proof}\n First let $X$ be a countable compact space. Note that if $Y$ is a closed subset of $X$, then $Y$ is countable compact as well, for if $\\left\\{U_n\\right\\}_{n \\in \\mathbb{Z}_{+}}$is a countable open covering of $Y$, then $\\left\\{U_n\\right\\}_{n \\in \\mathbb{Z}_{+}} \\cup(X \\backslash Y)$ is a countable open covering of $X$; there is a finite subcovering of $X$, hence a finite subcovering of $Y$. Now let $A$ be an infinite subset. We show that $A$ has a limit point. Let $B$ be a countable infinite subset of $A$. Suppose that $B$ has no limit point, so that $B$ is closed in $X$. Then $B$ is countable compact. Since $B$ has no limit point, for each $b \\in B$ there is a neighbourhood $U_b$ of $b$ that intersects $B$ in the point $b$ alone. Then $\\left\\{U_b\\right\\}_{b \\in B}$ is an open covering of $B$ with no finite subcovering, contradicting the fact that $B$ is countable compact. Hence $B$ has a limit point, so that $A$ has a limit point as well. Since $A$ was arbitrary, we deduce that $X$ is limit point compact. (Note that the $T_1$ property is not necessary in this direction.)\n\nNow assume that $X$ is a limit point compact $T_1$ space. We show that $X$ is countable compact. Suppose, on the contrary, that $\\left\\{U_n\\right\\}_{n \\in \\mathbb{Z}_{+}}$is a countable open covering of $X$ with no finite subcovering. For each $n$, take a point $x_n$ in $X$ not in $U_1 \\cup \\cdots \\cup U_n$. By assumption, the infinite set $A=\\left\\{x_n \\mid n \\in \\mathbb{Z}_{+}\\right\\}$has a limit point $y \\in X$. Since $\\left\\{U_n\\right\\}_{n \\in \\mathbb{Z}_{+}}$covers $X$, there exists $N \\in \\mathbb{Z}_{+}$such that $y \\in U_1 \\cup \\cdots \\cup U_N$. Now $X$ is $T_1$, so for each $i=1, \\ldots, N$ there exists a neighbourhood $V_i$ of $y$ that does not contain $x_i$. Then\n$$\nV=\\left(V_1 \\cap \\cdots \\cap V_N\\right) \\cap\\left(U_1 \\cup \\cdots \\cup U_N\\right)\n$$\nis a neighbourhood of $y$ that does not contain any of the points $x_i$, contradicting the fact that $y$ is a limit point of $A$. It follows that every countable open covering of $X$ must have a finite subcovering, so $X$ is countable compact.\n\\end{proof}", "informal_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 each $x \\in A, U_x \\subset A \\Longrightarrow \\cup U_x \\subset A$. For the converse, observe that given any $x \\in A, x \\in U_x$ and hence in the union. Thus we proved our claim, and hence $A$ is an open set."} +{"name": "Munkres_exercise_28_5", "source": "Munkres.lean", "header": "import Mathlib\n\nopen Filter Set TopologicalSpace\nopen Topology\nnoncomputable section\n", "formal_statement": "theorem Munkres_exercise_28_5\n (X : Type*) [TopologicalSpace X] :\n countably_compact X ↔ ∀ (C : ℕ → Set X), (∀ n, IsClosed (C n)) ∧\n (∀ n, C n ≠ ∅) ∧ (∀ n, C n ⊆ C (n + 1)) → ∃ x, ∀ n, x ∈ C n := sorry", "formal_proof": null, "informal_stmt": "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.\n\\begin{proof}\nWe 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\\}_{n \\in \\mathbb{Z}_{+}}$is a countable collection of open sets with no finite subcollection covering $X$, for if $U_{i_1} \\cup \\cdots \\cup U_{1_n}$ covers $X$, then $C_{i_1} \\cap \\cdots \\cap C_{i_n}$ is empty, contrary to the assumption. Hence $\\left\\{U_n\\right\\}_{n \\in \\mathbb{Z}_{+}}$does not cover $X$, so there exist $x \\in X \\backslash \\bigcup_{n \\in \\mathbb{Z}_{+}} U_n=\\bigcap_{n \\in Z_{+}}\\left(X \\backslash U_n\\right)=\\bigcap_{n \\in Z_{+}} C_n$.\n\nConversely, assume that every nested sequence $C_1 \\supset C_2 \\supset \\cdots$ of closed non-empty sets of $X$ has a non-empty intersection and let $\\left\\{U_n\\right\\}_{n \\in \\mathbb{Z}_{+}}$be a countable open covering of $X$. For each $n$, let $V_n=U_1 \\cup \\cdots \\cup U_n$ and $C_n=X \\backslash V_n$. Suppose that no finite subcollection of $\\left\\{U_n\\right\\}_{n \\in \\mathbb{Z}_{+}}$covers $X$. Then each $C_n$ is non-empty, so $C_1 \\supset C_2 \\supset \\cdots$ is a nested sequence of non-empty closed sets and $\\bigcap_{n \\in \\mathbb{Z}_{+}} C_n$ is non-empty by assumption. Then there exists $x \\in \\bigcap_{n \\in \\mathbb{Z}_{+}} C_n$, so that $x \\notin V_n$ for all $n$, contradicting the fact that $\\left\\{U_n\\right\\}_{n \\in \\mathbb{Z}_{+}}$covers $X$. It follows that there exists $N \\in \\mathbb{Z}_{+}$such that $C_N=\\emptyset$, so that $X=V_N$ and hence some finite subcollection of $\\left\\{U_n\\right\\}_{n \\in \\mathbb{Z}_{+}}$covers $X$. We deduce that $X$ is countable compact.\n\\end{proof}", "informal_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 each $x \\in A, U_x \\subset A \\Longrightarrow \\cup U_x \\subset A$. For the converse, observe that given any $x \\in A, x \\in U_x$ and hence in the union. Thus we proved our claim, and hence $A$ is an open set."} +{"name": "Munkres_exercise_28_6", "source": "Munkres.lean", "header": "import Mathlib\n\nopen Filter Set TopologicalSpace\nopen Topology\nnoncomputable section\n", "formal_statement": "theorem Munkres_exercise_28_6 {X : Type*} [MetricSpace X]\n [CompactSpace X] {f : X → X} (hf : Isometry f) :\n Function.Bijective f := sorry", "formal_proof": null, "informal_stmt": "Let $(X, d)$ be a metric space. If $f: X \\rightarrow X$ satisfies the condition $d(f(x), f(y))=d(x, y)$ for all $x, y \\in X$, then $f$ is called an isometry of $X$. Show that if $f$ is an isometry and $X$ is compact, then $f$ is bijective and hence a homeomorphism.\n\\begin{proof}\n Note that $f$ is an imbedding. It remains to prove that $f$ is surjective. Suppose it is not, and let $a \\in f(X)$. Since $X$ is compact, $f(X)$ is compact and hence closed (every metric space is Hausdorff). Thus, there exists $\\varepsilon>0$ such that the $\\varepsilon^{-}$ neighbourhood of $a$ is contained in $X \\backslash f(X)$. Set $x_1=a$, and inductively $x_{n+1}=f\\left(x_n\\right)$ for $n \\in \\mathbb{Z}_{+}$. We show that $d\\left(x_n, x_m\\right) \\geq \\varepsilon$ for $n \\neq m$. Indeed, we may assume $n0$ there exists $\\delta>0$ such that\n$$\nd_Y(f(x), f(y))<\\epsilon \\text { whenever } d_X(x, y)<\\delta \\text { and } x, y \\in A\n$$\nSo for this $\\delta>0$ there exists $N \\in \\mathbb{N}$ such that\n$$\nd_X\\left(x_n, x\\right)<\\frac{\\delta}{2} \\text { and } d_X\\left(y_n, x\\right)<\\frac{\\delta}{2}, \\text { foe all } n \\geq N .\n$$\nTherefore, we have that for all $n \\geq N$,\n$$\nd_X\\left(x_n, y_n\\right)<\\delta\n$$\nThus the equation (1) yields us that\n$$\nd_Y\\left(f\\left(x_n\\right), f\\left(y_n\\right)\\right)<\\epsilon \\text { for all } n \\geq N .\n$$\nNow since $\\lim _{n \\rightarrow \\infty} f\\left(x_n\\right)=a$ and $b=\\lim _{n \\rightarrow \\infty} f\\left(y_n\\right)$, so for the above $\\epsilon>0$ we have a natural number $K \\geq N$ such that\n$$\n\\begin{gathered}\nd_Y\\left(f\\left(x_n\\right), a\\right)<\\epsilon \\text { for all } n \\geq K \\text { and } \\\\\nd_Y\\left(f\\left(y_n\\right), b\\right)<\\epsilon \\text { for all } n \\geq K .\n\\end{gathered}\n$$\nMoreover, since $K \\geq N$, from $(2)$ we get\n$$\nd_Y\\left(f\\left(x_n\\right), f\\left(y_n\\right)\\right)<\\epsilon \\text { for all } n \\geq K .\n$$\nNow we calculate the following, for $n \\geq K$,\n$$\n\\begin{array}{rlr}\nd_Y(a, b) & \\leq & d_Y\\left(a, f\\left(x_n\\right)\\right)+d_Y\\left(f\\left(x_n\\right), f\\left(y_n\\right)\\right)+d\\left(f\\left(y_n\\right), b\\right) \\\\\n& < & \\epsilon+\\epsilon+\\epsilon \\text { by }(3),(4) \\text { and }(5) \\\\\n& = & 3 \\epsilon\n\\end{array}\n$$\nwhere the first inequality holds because of triangular inequality. Since $\\epsilon>0$ is arbitrary the above calculation shows that $d_Y(a, b)=0$. Thus, the above definition is independent of the choice of the sequence $\\left\\{x_n\\right\\}$ and hence the map $g$ is well defined. Moreover, from the construction it follows that $g$ is continuous on $\\bar{A}$.\nMoreover, we observe that $g$ is unique extension of $f$ by the construction.\nSo it remains to show that $g$ is uniformly continuous. In order to that we take a Cauchy sequence $\\left\\{a_n\\right\\} \\subset \\bar{A}$. Then since $\\bar{A}$ is a closed set so the sequence $\\left\\{a_n\\right\\}$ is convergent and hence $\\left\\{g\\left(a_n\\right)\\right\\}$ is also a convergent sequence as $g$ is continuous on $\\bar{A}$. So $\\left\\{g\\left(a_n\\right)\\right\\}$ is a Cauchy sequence in $Y$. Since a function is uniformly continuous if and only if it sends Cauchy sequences to Cauchy sequences, we conclude that $g$ is uniformly continuous.\n\\end{proof}\n\\end{document}", "informal_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 each $x \\in A, U_x \\subset A \\Longrightarrow \\cup U_x \\subset A$. For the converse, observe that given any $x \\in A, x \\in U_x$ and hence in the union. Thus we proved our claim, and hence $A$ is an open set."} +{"name": "Ireland_Rosen_exercise_1_27", "source": "Ireland-Rosen.lean", "header": "import Mathlib\n\nopen Real\nopen scoped BigOperators\nnoncomputable section\n", "formal_statement": "theorem Ireland_Rosen_exercise_1_27 {n : ℕ} (hn : Odd n) : 8 ∣ (n^2 - 1) := sorry", "formal_proof": null, "informal_stmt": "For all odd $n$ show that $8 \\mid n^{2}-1$.\n\\begin{proof}\n 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$, otherwise it wouldn't divide three consecutive integers, which is impossible. As $n$ is odd, $n+1$ is even, so $(n+1)(n-1)$ is divisible by both 2 and 3 , so it is divisible by 6 .\n\\end{proof}", "informal_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$, otherwise it wouldn't divide three consecutive integers, which is impossible. As $n$ is odd, $n+1$ is even, so $(n+1)(n-1)$ is divisible by both 2 and 3 , so it is divisible by 6 ."} +{"name": "Ireland_Rosen_exercise_1_30", "source": "Ireland-Rosen.lean", "header": "import Mathlib\n\nopen Real\nopen scoped BigOperators\nnoncomputable section\n", "formal_statement": "theorem Ireland_Rosen_exercise_1_30 {n : ℕ} :\n ¬ ∃ a : ℤ, ∑ i : Fin n, (1 : ℚ) / (n+2) = a := sorry", "formal_proof": null, "informal_stmt": "Prove that $\\frac{1}{2}+\\frac{1}{3}+\\cdots+\\frac{1}{n}$ is not an integer.\n\\begin{proof}\nLet $2^s$ be the largest power of 2 occurring as a denominator in $H_n$, say $2^s=k \\leqslant n$. Write $H_n=$ $\\frac{1}{2^s}+\\left(1+1 / 2+\\ldots+1 /(k-1)+1 /(k+1)+\\ldots+1 / n\\right.$. The sum in parentheses can be written as $1 / 2^{s-1}$ times sum of fractions with odd denominators, so the denominator of the sum in parentheses will not be divisible by $2^s$, but it must equal $2^s$ by Ex $1.29$.\n\\end{proof}", "informal_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$, otherwise it wouldn't divide three consecutive integers, which is impossible. As $n$ is odd, $n+1$ is even, so $(n+1)(n-1)$ is divisible by both 2 and 3 , so it is divisible by 6 ."} +{"name": "Ireland_Rosen_exercise_1_31", "source": "Ireland-Rosen.lean", "header": "import Mathlib\n\nopen Real\nopen scoped BigOperators\nnoncomputable section\n", "formal_statement": "theorem Ireland_Rosen_exercise_1_31 : (⟨1, 1⟩ : GaussianInt) ^ 2 ∣ 2 := sorry", "formal_proof": null, "informal_stmt": "Show that 2 is divisible by $(1+i)^{2}$ in $\\mathbb{Z}[i]$.\n\\begin{proof}\nWe have $(1+i)^2=1+2 i-1=2 i$, so $2=-i(1+i)^2$.\n\\end{proof}", "informal_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$, otherwise it wouldn't divide three consecutive integers, which is impossible. As $n$ is odd, $n+1$ is even, so $(n+1)(n-1)$ is divisible by both 2 and 3 , so it is divisible by 6 ."} +{"name": "Ireland_Rosen_exercise_2_4", "source": "Ireland-Rosen.lean", "header": "import Mathlib\n\nopen Real\nopen scoped BigOperators\nnoncomputable section\n", "formal_statement": "theorem Ireland_Rosen_exercise_2_4 {a : ℤ} (ha : a ≠ 0)\n (f_a := sorry", "formal_proof": null, "informal_stmt": "If $a$ is a nonzero integer, then for $n>m$ show that $\\left(a^{2^{n}}+1, a^{2^{m}}+1\\right)=1$ or 2 depending on whether $a$ is odd or even.\n\\begin{proof} \n\\begin{align*}\n\\operatorname{ord}_p\\, n! &= \\sum_{k\\geq 1} \\left \\lfloor \\frac{n}{p^{k}}\\right \\rfloor \\leq \\sum_{k\\geq 1} \\frac{n}{p^{k}} = \\frac{n}{p} \\frac{1}{1 - \\frac{1}{p}} = \\frac{n}{p-1}\n\\end{align*}\n\nThe decomposition of $n!$ in prime factors is\n\n$n! = p_1^{\\alpha_1}p_2^{\\alpha_2}\\cdots p_k^{\\alpha_k}$ \nwhere $\\alpha_i = \\operatorname{ord}_{p_i}\\, n! \\leq \\frac{n}{p_i-1}$, and $p_i \\leq n, \\ i=1,2,\\cdots,k$.\n\nThen\n\\begin{align*}\nn! &\\leq p_1^{\\frac{n}{p_1-1}}p_2^{\\frac{n}{p_2-1}}\\cdots p_k^{\\frac{n}{p_n-1}}\\\\\n\\sqrt[n]{n!} &\\leq p_1^{\\frac{1}{p_1-1}}p_2^{\\frac{1}{p_2-1}}\\cdots p_k^{\\frac{1}{p_n-1}}\\\\\n&\\leq \\prod_{p\\leq n} p^{\\frac{1}{p-1}}\n\\end{align*}\n(the values of $p$ in this product describe all prime numbers $p\\leq n$.)\n\\end{proof}", "informal_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$, otherwise it wouldn't divide three consecutive integers, which is impossible. As $n$ is odd, $n+1$ is even, so $(n+1)(n-1)$ is divisible by both 2 and 3 , so it is divisible by 6 ."} +{"name": "Ireland_Rosen_exercise_2_21", "source": "Ireland-Rosen.lean", "header": "import Mathlib\n\nopen Real\nopen scoped BigOperators\nnoncomputable section\n", "formal_statement": "theorem Ireland_Rosen_exercise_2_21 {l : ℕ → ℝ}\n (hl : ∀ p n : ℕ, p.Prime → l (p^n) = log p )\n (hl1 : ∀ m : ℕ, ¬ IsPrimePow m → l m = 0) :\n l = λ n => ∑ d : Nat.divisors n, ArithmeticFunction.moebius (n/d) * log d := sorry", "formal_proof": null, "informal_stmt": "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)$.\n\\begin{proof} \n$$\n\\left\\{\n\\begin{array}{cccl}\n \\land(n)& = & \\log p & \\mathrm{if}\\ n =p^\\alpha,\\ \\alpha \\in \\mathbb{N}^* \\\\\n & = & 0 & \\mathrm{otherwise }.\n\\end{array}\n\\right.\n$$\nLet $n = p_1^{\\alpha_1}\\cdots p_t^{\\alpha_t}$ the decomposition of $n$ in prime factors. As $\\land(d) = 0$ for all divisors of $n$, except for $d = p_j^i, i>0, j=1,\\ldots t$,\n\\begin{align*}\n\\sum_{d \\mid n} \\land(d)&= \\sum_{i=1}^{\\alpha_1} \\land(p_1^{i}) + \\cdots+ \\sum_{i=1}^{\\alpha_t} \\land(p_t^{i})\\\\ \n&= \\alpha_1 \\log p_1+\\cdots + \\alpha_t \\log p_t\\\\\n&= \\log n\n\\end{align*}\nBy Mobius Inversion Theorem,\n$$\\land(n) = \\sum_{d \\mid n} \\mu\\left (\\frac{n}{d}\\right ) \\log d.$$\n\\end{proof}", "informal_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$, otherwise it wouldn't divide three consecutive integers, which is impossible. As $n$ is odd, $n+1$ is even, so $(n+1)(n-1)$ is divisible by both 2 and 3 , so it is divisible by 6 ."} +{"name": "Ireland_Rosen_exercise_2_27a", "source": "Ireland-Rosen.lean", "header": "import Mathlib\n\nopen Real\nopen scoped BigOperators\nnoncomputable section\n", "formal_statement": "theorem Ireland_Rosen_exercise_2_27a :\n ¬ Summable (λ i : {p : ℤ // Squarefree p} => (1 : ℚ) / i) := sorry", "formal_proof": null, "informal_stmt": "Show that $\\sum^{\\prime} 1 / n$, the sum being over square free integers, diverges.\n\\begin{proof}\n \nLet $S \\subset \\mathbb{N}^*$ the set of square free integers.\n\nLet $N \\in \\mathbb{N}^*$. Every integer $n, \\, 1\\leq n \\leq N$ can be written as $n = a b^2$, where $a,b$ are integers and $a$ is square free. Then $1\\leq a \\leq N$, and $1\\leq b \\leq \\sqrt{N}$, so\n$$\\sum_{n\\leq N} \\frac{1}{n} \\leq \\sum_{a \\in S, a\\leq N}\\ \\sum_{1\\leq b \\leq \\sqrt{N}} \\frac{1}{ab^2} \\leq \\sum_{a \\in S, a\\leq N}\\ \\frac{1}{a} \\, \\sum_{b=1}^\\infty \\frac{1}{b^2} = \\frac{\\pi^2}{6} \\sum_{a \\in S, a\\leq N}\\ \\frac{1}{a}.$$\nSo $$\\sum_{a \\in S, a\\leq N} \\frac{1}{a} \\geq \\frac{6}{\\pi^2} \\sum_{n\\leq N} \\frac{1}{n}.$$\nAs $\\sum_{n=1}^\\infty \\frac{1}{n}$ diverges, $\\lim\\limits_{N \\to \\infty} \\sum\\limits_{a \\in S, a\\leq N} \\frac{1}{a} = +\\infty$, so the family $\\left(\\frac{1}{a}\\right)_{a\\in S}$ of the inverse of square free integers is not summable.\n\nLet $S_N = \\prod_{p0$, so\n$$\\log S_N = \\sum_{k=1}^{l(N)} \\log\\left(1+\\frac{1}{p_k}\\right) \\leq \\sum_{k=1}^{l(N)} \\frac{1}{p_k}.$$\n$\\lim\\limits_{N\\to \\infty} \\log S_N = +\\infty$ and $\\lim\\limits_{N\\to \\infty} l(N) = +\\infty$, so\n$$\\lim_{N\\to \\infty} \\sum_{p1$. \n\nThen $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 congruent to 1, then $N \\equiv 1 \\pmod 6$ : this is a contradiction because $-1 \\not \\equiv 1 \\pmod 6$. So there exists a prime factor $p$ of $N$ such that $p\\equiv -1 \\pmod 6$.\n\nIf $p\\leq n$, then $p \\mid n!$, and $p \\mid N = n!-1$, so $p \\mid 1$. As $p$ is prime, this is a contradiction, so $p>n$. \n\nConclusion :\n\n for any integer $n$, there exists a prime $p >n$ such that $p \\equiv -1 \\pmod 6$ : there are infinitely many primes congruent to $-1$ modulo $6$.\n\\end{proof}", "informal_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$, otherwise it wouldn't divide three consecutive integers, which is impossible. As $n$ is odd, $n+1$ is even, so $(n+1)(n-1)$ is divisible by both 2 and 3 , so it is divisible by 6 ."} +{"name": "Ireland_Rosen_exercise_3_4", "source": "Ireland-Rosen.lean", "header": "import Mathlib\n\nopen Real\nopen scoped BigOperators\nnoncomputable section\n", "formal_statement": "theorem Ireland_Rosen_exercise_3_4 : ¬ ∃ x y : ℤ, 3*x^2 + 2 = y^2 := sorry", "formal_proof": null, "informal_stmt": "Show that the equation $3 x^{2}+2=y^{2}$ has no solution in integers.\n\\begin{proof} \nIf $3x^2+2 = y^2$, then $\\overline{y}^2 = \\overline{2}$ in $\\mathbb{Z}/3\\mathbb{Z}$.\n\n\nAs $\\{-1,0,1\\}$ is a complete set of residues modulo $3$, the squares in $\\mathbb{Z}/3\\mathbb{Z}$ are $\\overline{0} = \\overline{0}^2$ and $\\overline{1} = \\overline{1}^2 = (\\overline{-1})^2$, so $\\overline{2}$ is not a square in $\\mathbb{Z}/3\\mathbb{Z}$ : $\\overline{y}^2 = \\overline{2}$ is impossible in $\\mathbb{Z}/3\\mathbb{Z}$.\n\nThus $3x^2+2 = y^2$ has no solution in integers.\n\\end{proof}", "informal_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$, otherwise it wouldn't divide three consecutive integers, which is impossible. As $n$ is odd, $n+1$ is even, so $(n+1)(n-1)$ is divisible by both 2 and 3 , so it is divisible by 6 ."} +{"name": "Ireland_Rosen_exercise_3_5", "source": "Ireland-Rosen.lean", "header": "import Mathlib\n\nopen Real\nopen scoped BigOperators\nnoncomputable section\n", "formal_statement": "theorem Ireland_Rosen_exercise_3_5 : ¬ ∃ x y : ℤ, 7*x^3 + 2 = y^3 := sorry", "formal_proof": null, "informal_stmt": "Show that the equation $7 x^{3}+2=y^{3}$ has no solution in integers.\n\\begin{proof}\n 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$)\n\nFrom 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 solution in integers.\n\\end{proof}", "informal_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$, otherwise it wouldn't divide three consecutive integers, which is impossible. As $n$ is odd, $n+1$ is even, so $(n+1)(n-1)$ is divisible by both 2 and 3 , so it is divisible by 6 ."} +{"name": "Ireland_Rosen_exercise_3_10", "source": "Ireland-Rosen.lean", "header": "import Mathlib\n\nopen Real\nopen scoped BigOperators\nnoncomputable section\n", "formal_statement": "theorem Ireland_Rosen_exercise_3_10 {n : ℕ} (hn0 : ¬ n.Prime) (hn1 : n ≠ 4) :\n Nat.factorial (n-1) ≡ 0 [MOD n] := sorry", "formal_proof": null, "informal_stmt": "If $n$ is not a prime, show that $(n-1) ! \\equiv 0(n)$, except when $n=4$.\n\\begin{proof} \nSuppose that $n >1$ is not a prime. Then $n = uv$, where $2 \\leq u \\leq v \\leq n-1$.\n\n$\\bullet$ If $u \\neq v$, then $n = uv \\mid (n-1)! = 1\\times 2 \\times\\cdots \\times u \\times\\cdots \\times v \\times \\cdots \\times (n-1)$ (even if $u\\wedge v \\neq 1$ !).\n\n$\\bullet$ If $u=v$, $n = u^2$ is a square.\n\nIf $u$ is not prime, $u =st,\\ 2\\leq s \\leq t \\leq u-1 \\leq n-1$, and $n = u' v'$, where $u' =s,v' =st^2$ verify $2 \\leq u' < v' \\leq n-1$. As in the first case, $n = u'v' \\mid (n-1)!$. \n\nIf $u = p$ is a prime, then $n =p^2$.\n\nIn the case $p = 2$, $n = 4$ and $n=4 \\nmid (n-1)! = 6$. In the other case $p >2$, and $(n-1)! = (p^2 - 1)!$ contains the factors $p < 2p < p^2$, so $p^2 \\mid (p^2-1)!, n \\mid (n-1)!$.\n\nConclusion : if $n$ is not a prime, $(n - 1)! \\equiv 0 \\pmod n$, except when $n=4$.\n\\end{proof}", "informal_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$, otherwise it wouldn't divide three consecutive integers, which is impossible. As $n$ is odd, $n+1$ is even, so $(n+1)(n-1)$ is divisible by both 2 and 3 , so it is divisible by 6 ."} +{"name": "Ireland_Rosen_exercise_3_14", "source": "Ireland-Rosen.lean", "header": "import Mathlib\n\nopen Real\nopen scoped BigOperators\nnoncomputable section\n", "formal_statement": "theorem Ireland_Rosen_exercise_3_14 {p q n : ℕ} (hp0 : p.Prime ∧ p > 2)\n (hq0 : q.Prime ∧ q > 2) (hpq0 : p ≠ q) (hpq1 : p - 1 ∣ q - 1)\n (hn : n.gcd (p*q) = 1) :\n n^(q-1) ≡ 1 [MOD p*q] := sorry", "formal_proof": null, "informal_stmt": "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)$.\n\\begin{proof} \nAs $n \\wedge pq = 1, n\\wedge p=1, n \\wedge q = 1$, so from Fermat's Little Theorem\n$$n^{q-1} \\equiv 1 \\pmod q,\\qquad n^{p-1} \\equiv 1 \\pmod p.$$\n$p-1 \\mid q-1$, so there exists $k \\in \\mathbb{Z}$ such that $q-1 = k(p-1)$.\nThus\n$$n^{q-1} = (n^{p-1})^k \\equiv 1 \\pmod p.$$\n$p \\mid n^{q-1} - 1, q \\mid n^{q-1} - 1$, and $p\\wedge q = 1$, so $pq \\mid n^{q-1} - 1$ :\n$$n^{q-1} \\equiv 1 \\pmod{pq}.$$\n\\end{proof}", "informal_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$, otherwise it wouldn't divide three consecutive integers, which is impossible. As $n$ is odd, $n+1$ is even, so $(n+1)(n-1)$ is divisible by both 2 and 3 , so it is divisible by 6 ."} +{"name": "Ireland_Rosen_exercise_4_4", "source": "Ireland-Rosen.lean", "header": "import Mathlib\n\nopen Real\nopen scoped BigOperators\nnoncomputable section\n", "formal_statement": "theorem Ireland_Rosen_exercise_4_4 {p t: ℕ} (hp0 : p.Prime) (hp1 : p = 4*t + 1)\n (a : ZMod p) :\n IsPrimitiveRoot a p ↔ IsPrimitiveRoot (-a) p := sorry", "formal_proof": null, "informal_stmt": "Consider a prime $p$ of the form $4 t+1$. Show that $a$ is a primitive root modulo $p$ iff $-a$ is a primitive root modulo $p$.\n\\begin{proof}\n Suppose that $a$ is a primitive root modulo $p$. As $p-1$ is even, $(-a)^{p-1}=a^{p-1} \\equiv 1$ $(\\bmod p)$\nIf $(-a)^n \\equiv 1(\\bmod p)$, with $n \\in \\mathbb{N}$, then $a^n \\equiv(-1)^n(\\bmod p)$.\nTherefore $a^{2 n} \\equiv 1(\\bmod p)$. As $a$ is a primitive root modulo $p, p-1|2 n, 2 t| n$, so $n$ is even.\n\nHence $a^n \\equiv 1(\\bmod p)$, and $p-1 \\mid n$. So the least $n \\in \\mathbb{N}^*$ such that $(-a)^n \\equiv 1$ $(\\bmod p)$ is $p-1:$ the order of $-a$ modulo $p$ is $p-1,-a$ is a primitive root modulo $p$. Conversely, if $-a$ is a primitive root modulo $p$, we apply the previous result at $-a$ to to obtain that $-(-a)=a$ is a primitive root.\n\\end{proof}", "informal_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$, otherwise it wouldn't divide three consecutive integers, which is impossible. As $n$ is odd, $n+1$ is even, so $(n+1)(n-1)$ is divisible by both 2 and 3 , so it is divisible by 6 ."} +{"name": "Ireland_Rosen_exercise_4_5", "source": "Ireland-Rosen.lean", "header": "import Mathlib\n\nopen Real\nopen scoped BigOperators\nnoncomputable section\n", "formal_statement": "theorem Ireland_Rosen_exercise_4_5 {p t : ℕ} (hp0 : p.Prime) (hp1 : p = 4*t + 3)\n (a : ZMod p) :\n IsPrimitiveRoot a p ↔ ((-a) ^ ((p-1)/2) = 1 ∧ ∀ (k : ℕ), k < (p-1)/2 → (-a)^k ≠ 1) := sorry", "formal_proof": null, "informal_stmt": "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$.\n\\begin{proof}\n Let $a$ a primitive root modulo $p$.\nAs $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\n$$\na^{(p-1) / 2} \\equiv-1 \\quad(\\bmod p) .\n$$\nHence $(-a)^{(p-1) / 2}=(-1)^{2 t+1} a^{(p-1) / 2} \\equiv(-1) \\times(-1)=1(\\bmod p)$.\nSuppose that $(-a)^n \\equiv 1(\\bmod p)$, with $n \\in \\mathbb{N}$.\nThen $a^{2 n}=(-a)^{2 n} \\equiv 1(\\bmod p)$, so $p-1\\left|2 n, \\frac{p-1}{2}\\right| n$.\nSo $-a$ has order $(p-1) / 2$ modulo $p$.\nConversely, suppose that $-a$ has order $(p-1) / 2=2 t+1$ modulo $p$. Let $2, p_1, \\ldots p_k$ the prime factors of $p-1$, where $p_i$ are odd.\n$a^{(p-1) / 2}=a^{2 t+1}=-(-a)^{2 t+1}=-(-a)^{(p-1) / 2} \\equiv-1$, so $a^{(p-1) / 2} \\not \\equiv 1(\\bmod 2)$.\nAs $p-1$ is even, $(p-1) / p_i$ is even, so $a^{(p-1) / p_i}=(-a)^{(p-1) / p_i} \\not \\equiv 1(\\bmod p)($ since $-a$ has order $p-1)$.\nSo the order of $a$ is $p-1$ (see Ex. 4.8) : $a$ is a primitive root modulo $p$.\n\\end{proof}", "informal_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$, otherwise it wouldn't divide three consecutive integers, which is impossible. As $n$ is odd, $n+1$ is even, so $(n+1)(n-1)$ is divisible by both 2 and 3 , so it is divisible by 6 ."} +{"name": "Ireland_Rosen_exercise_4_6", "source": "Ireland-Rosen.lean", "header": "import Mathlib\n\nopen Real\nopen scoped BigOperators\nnoncomputable section\n", "formal_statement": "theorem Ireland_Rosen_exercise_4_6 {p n : ℕ} (hp : p.Prime) (hpn : p = 2^n + 1) :\n IsPrimitiveRoot 3 p := sorry", "formal_proof": null, "informal_stmt": "If $p=2^{n}+1$ is a Fermat prime, show that 3 is a primitive root modulo $p$.\n\\begin{proof}\n \\newcommand{\\legendre}[2]{\\genfrac{(}{)}{}{}{#1}{#2}}\nWrite $p = 2^k + 1$, with $k = 2^n$.\n\nWe suppose that $n>0$, so $k\\geq 2, p \\geq 5$. As $p$ is prime, $3^{p-1} \\equiv 1 \\pmod p$. \n\nIn other words, $3^{2^k} \\equiv 1 \\pmod p$ : the order of $3$ is a divisor of $2^k$, a power of $2$.\n\n$3$ has order $2^k$ modulo $p$ iff $3^{2^{k-1}} \\not \\equiv 1 \\pmod p$. As $\\left (3^{2^{k-1}} \\right)^2 \\equiv 1 \\pmod p$, where $p$ is prime, this is equivalent to $3^{2^{k-1}} \\equiv -1 \\pmod p$, which remains to prove.\n\n$3^{2^{k-1}} = 3^{(p-1)/2} \\equiv \\legendre{3}{p} \\pmod p$.\n\nAs the result is true for $p=5$, we can suppose $n\\geq 2$.\nFrom the law of quadratic reciprocity :\n$$\\legendre{3}{p} \\legendre{p}{3} = (-1)^{(p-1)/2} = (-1)^{2^{k-1}} = 1.$$\nSo $\\legendre{3}{p} = \\legendre{p}{3}$\n \n\\begin{align*}\np = 2^{2^n}+1 &\\equiv (-1)^{2^n} + 1 \\pmod 3\\\\\n&\\equiv 2 \\equiv -1 \\pmod 3,\n\\end{align*}\nso $\\legendre{3}{p} = \\legendre {p}{3} = -1$, that is to say\n$$3^{2^{k-1}} \\equiv -1 \\pmod p.$$\nThe order of $3$ modulo $p = 2^{2^n} + 1$ is $p-1 = 2^{2^n}$ : $3$ is a primitive root modulo $p$.\n\n(On the other hand, if $3$ is of order $p-1$ modulo $p$, then $p$ is prime, so\n$$ F_n = 2^{2^n} + 1 \\ \\mathrm{is}\\ \\mathrm{prime}\\ \\iff 3^{(F_n-1)/2} = 3^{2^{2^n - 1}} \\equiv -1 \\pmod {F_n}.)$$\n\\end{proof}", "informal_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$, otherwise it wouldn't divide three consecutive integers, which is impossible. As $n$ is odd, $n+1$ is even, so $(n+1)(n-1)$ is divisible by both 2 and 3 , so it is divisible by 6 ."} +{"name": "Ireland_Rosen_exercise_4_8", "source": "Ireland-Rosen.lean", "header": "import Mathlib\n\nopen Real\nopen scoped BigOperators\nnoncomputable section\n", "formal_statement": "theorem Ireland_Rosen_exercise_4_8 {p a : ℕ} (hp : Odd p) :\n IsPrimitiveRoot a p ↔ (∀ q : ℕ, q ∣ (p-1) → q.Prime → ¬ a^(p-1) ≡ 1 [MOD p]) := sorry", "formal_proof": null, "informal_stmt": "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$.\n\\begin{proof} \n$\\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$.\n\n$\\bullet$ In the other direction, suppose $a^{(p-1)/q} \\not \\equiv 1 \\pmod p$ for all prime divisors $q$ of $p - 1$.\n\nLet $\\delta$ the order of $a$, and $p-1 = q_1^{a_1}q_2^{a_2}\\cdots q_k^{a_k}$ the decomposition of $p-1$ in prime factors. As $\\delta \\mid p-1, \\delta = q_1^{b_1}p_2^{b_2}\\cdots q_k^{b_k}$, with $b_i \\leq a_i, i=1,2,\\ldots,k$. If $b_i < a_i$ for some index $i$, then $\\delta \\mid (p-1)/q_i$, so $a^{(p-1)/q_i} \\equiv 1 \\pmod p$, which is in contradiction with the hypothesis. Thus $b_i = a_i$ for all $i$, and $\\delta = q-1$ : $a$ is a primitive root modulo $p$.\n\\end{proof}", "informal_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$, otherwise it wouldn't divide three consecutive integers, which is impossible. As $n$ is odd, $n+1$ is even, so $(n+1)(n-1)$ is divisible by both 2 and 3 , so it is divisible by 6 ."} +{"name": "Ireland_Rosen_exercise_4_11", "source": "Ireland-Rosen.lean", "header": "import Mathlib\n\nopen Real\nopen scoped BigOperators\nnoncomputable section\n", "formal_statement": "theorem Ireland_Rosen_exercise_4_11 {p : ℕ} (hp : p.Prime) (k s: ℕ)\n (s := sorry", "formal_proof": null, "informal_stmt": "Prove that $1^{k}+2^{k}+\\cdots+(p-1)^{k} \\equiv 0(p)$ if $p-1 \\nmid k$ and $-1(p)$ if $p-1 \\mid k$.\n\\begin{proof} \nLet $S_k = 1^k+2^k+\\cdots+(p-1)^k$.\n\nLet $g$ a primitive root modulo $p$ : $\\overline{g}$ a generator of $\\mathbb{F}_p^*$.\n\nAs $(\\overline{1},\\overline{g},\\overline{g}^{2}, \\ldots, \\overline{g}^{p-2}) $ is a permutation of $ (\\overline{1},\\overline{2}, \\ldots,\\overline{p-1})$,\n\\begin{align*}\n\\overline{S_k} &= \\overline{1}^k + \\overline{2}^k+\\cdots+ \\overline{p-1}^k\\\\\n&= \\sum_{i=0}^{p-2} \\overline{g}^{ki} =\n\\left\\{\n\\begin{array}{ccc}\n\\overline{ p-1} = -\\overline{1} & \\mathrm{if} & p-1 \\mid k \\\\\n \\frac{ \\overline{g}^{(p-1)k} -1}{ \\overline{g}^k -1} = \\overline{0}& \\mathrm{if} & p-1 \\nmid k\n\\end{array}\n\\right.\n\\end{align*}\nsince $p-1 \\mid k \\iff \\overline{g}^k = \\overline{1}$.\n\nConclusion :\n\\begin{align*}\n1^k+2^k+\\cdots+(p-1)^k&\\equiv 0 \\pmod p\\ \\mathrm{if} \\ p-1 \\nmid k\\\\\n1^k+2^k+\\cdots+(p-1)^k&\\equiv -1 \\pmod p\\ \\mathrm{if} \\ p-1 \\mid k\\\\\n\\end{align*}\n\\end{proof}", "informal_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$, otherwise it wouldn't divide three consecutive integers, which is impossible. As $n$ is odd, $n+1$ is even, so $(n+1)(n-1)$ is divisible by both 2 and 3 , so it is divisible by 6 ."} +{"name": "Ireland_Rosen_exercise_5_13", "source": "Ireland-Rosen.lean", "header": "import Mathlib\n\nopen Real\nopen scoped BigOperators\nnoncomputable section\n", "formal_statement": "theorem Ireland_Rosen_exercise_5_13 {p x: ℤ} (hp : Prime p)\n (hpx : p ∣ (x^4 - x^2 + 1)) : p ≡ 1 [ZMOD 12] := sorry", "formal_proof": null, "informal_stmt": "Show that any prime divisor of $x^{4}-x^{2}+1$ is congruent to 1 modulo 12 .\n\\begin{proof} \n\\newcommand{\\legendre}[2]{\\genfrac{(}{)}{}{}{#1}{#2}}\n$\\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$.\n\n$\\bullet$ $p \\mid 4a^4 - 4 a^2 +4 = (2a-1)^2 + 3$, so $\\legendre{-3}{p} = 1$.\n\nAs $-3 \\equiv 1 \\pmod 4$, $\\legendre{-3}{p} = \\legendre{p}{3}$, so $\\legendre{p}{3} = 1$, thus $p \\equiv 1 \\pmod 3$.\n\n$4 \\mid p-1$ and $3 \\mid p-1$, thus $12 \\mid p-1$ : $$p \\equiv 1 \\pmod {12}.$$\n\\end{proof}", "informal_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$, otherwise it wouldn't divide three consecutive integers, which is impossible. As $n$ is odd, $n+1$ is even, so $(n+1)(n-1)$ is divisible by both 2 and 3 , so it is divisible by 6 ."} +{"name": "Ireland_Rosen_exercise_5_28", "source": "Ireland-Rosen.lean", "header": "import Mathlib\n\nopen Real\nopen scoped BigOperators\nnoncomputable section\n", "formal_statement": "theorem Ireland_Rosen_exercise_5_28 {p : ℕ} (hp : p.Prime) (hp1 : p ≡ 1 [MOD 4]):\n ∃ x, x^4 ≡ 2 [MOD p] ↔ ∃ A B, p = A^2 + 64*B^2 := sorry", "formal_proof": null, "informal_stmt": "Show that $x^{4} \\equiv 2(p)$ has a solution for $p \\equiv 1(4)$ iff $p$ is of the form $A^{2}+64 B^{2}$.\n\\begin{proof} \nIf $p\\equiv 1\\ [4]$ and if there exists $x \\in \\mathbb{Z}$ such that $x^4 \\equiv 2\\ [p]$, then\n$$2^{\\frac{p-1}{4} }\\equiv x^{p-1} \\equiv 1 \\ [p].$$ \n\nFrom Ex. 5.27, where $p = a^2 +b^2, a$ odd, we know that $$f^{\\frac{ab}{2}} \\equiv 2^{\\frac{p-1}{4} } \\equiv 1 \\ [p].$$\n\nSince $f^2 \\equiv -1\\ [p]$, the order of $f$ modulo $p$ is 4, thus $4 \\mid \\frac{ab}{2}$, so $8\\mid ab$.\n\nAs $a$ is odd, $8 | b$, then $p = A^2 + 64 B^2$ (with $A = a, B = b/8$).\n\n\\bigskip\n\nConversely, if $p=A^2+64 B^2$, then $p\\equiv A^2 \\equiv 1 \\ [4]$.\n\nLet $a=A,b=8B$. Then $$2^{\\frac{p-1}{4} } \\equiv f^{\\frac{ab}{2}} \\equiv f^{4AB} \\equiv (-1)^{2AB} \\equiv 1 \\ [p].$$\n\nAs $2^{\\frac{p-1}{4} } \\equiv 1 \\ [p]$, $x^4 \\equiv 2 \\ [p]$ has a solution in $\\mathbb{Z}$ (Prop. 4.2.1) : $2$ is a biquadratic residue modulo $p$.\n\nConclusion : \n\n$$\\exists A \\in \\mathbb{Z}, \\exists B \\in \\mathbb{Z}\\,, p = A^2+64 B^2 \\iff( p\\equiv 1 \\ [4] \\ \\mathrm{and} \\ \\exists x \\in \\mathbb{Z}, \\, x^4 \\equiv 2 \\ [p]).$$\n\\end{proof}", "informal_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$, otherwise it wouldn't divide three consecutive integers, which is impossible. As $n$ is odd, $n+1$ is even, so $(n+1)(n-1)$ is divisible by both 2 and 3 , so it is divisible by 6 ."} +{"name": "Ireland_Rosen_exercise_5_37", "source": "Ireland-Rosen.lean", "header": "import Mathlib\n\nopen Real\nopen scoped BigOperators\nnoncomputable section\n", "formal_statement": "theorem Ireland_Rosen_exercise_5_37 {p q : ℕ} [Fact (p.Prime)] [Fact (q.Prime)] {a : ℤ}\n (ha : a < 0) (h0 : p ≡ q [ZMOD 4*a]) (h1 : ¬ ((p : ℤ) ∣ a)) :\n legendreSym p a = legendreSym q a := sorry", "formal_proof": null, "informal_stmt": "Show that if $a$ is negative then $p \\equiv q(4 a) together with p\\not | a$ imply $(a / p)=(a / q)$.\n\\begin{proof} \n\\newcommand{\\legendre}[2]{\\genfrac{(}{)}{}{}{#1}{#2}}\nWrite $a = -A, A>0$. As $p \\equiv q \\pmod {4a}$, we know from Prop. 5.3.3. (b) that $(A/p) = (A/q)$.\n\nMoreover,\n\\begin{align*}\n\\legendre{a}{p}&= \\legendre{-A}{p} = (-1)^{(p-1)/2} \\legendre{A}{p}\\\\\n\\legendre{a}{q}&= \\legendre{-A}{q} = (-1^{(q-1)/2} \\legendre{A}{q}\n\\end{align*}\nAs $p \\equiv q \\pmod {4a}$, $ p = q + 4ak, k\\in \\mathbb{Z}$, so\n$$(-1)^{(p-1)/2} = (-1)^{(q+4ak-1)/2} = (-1)^{(q-1)/2},$$\nso $(a/p) = (a/q)$.\n\\end{proof}", "informal_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$, otherwise it wouldn't divide three consecutive integers, which is impossible. As $n$ is odd, $n+1$ is even, so $(n+1)(n-1)$ is divisible by both 2 and 3 , so it is divisible by 6 ."} +{"name": "Ireland_Rosen_exercise_12_12", "source": "Ireland-Rosen.lean", "header": "import Mathlib\n\nopen Real\nopen scoped BigOperators\nnoncomputable section\n", "formal_statement": "theorem Ireland_Rosen_exercise_12_12 : IsAlgebraic ℚ (sin (pi/12)) := sorry", "formal_proof": null, "informal_stmt": "Show that $\\sin (\\pi / 12)$ is an algebraic number.\n\\begin{proof}\n$$\n\\begin{aligned}\n \\sin \\pi/12=\\sin \\left(\\pi/4-\\pi/6\\right) & =\\sin \\pi/4 \\cos \\pi/6-\\cos \\pi/4 \\sin \\pi/6 \\\\\n& =\\frac{\\sqrt{3}}{2 \\sqrt{2}}-\\frac{1}{2 \\sqrt{2}} \\\\\n& =\\frac{\\sqrt{3}-1}{2 \\sqrt{2}}\n\\end{aligned}\n$$\n\\end{proof}", "informal_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$, otherwise it wouldn't divide three consecutive integers, which is impossible. As $n$ is odd, $n+1$ is even, so $(n+1)(n-1)$ is divisible by both 2 and 3 , so it is divisible by 6 ."} +{"name": "Ireland_Rosen_exercise_18_4", "source": "Ireland-Rosen.lean", "header": "import Mathlib\n\nopen Real\nopen scoped BigOperators\nnoncomputable section\n", "formal_statement": "theorem Ireland_Rosen_exercise_18_4 {n : ℕ} (hn : ∃ x y z w : ℤ,\n x^3 + y^3 = n ∧ z^3 + w^3 = n ∧ x ≠ z ∧ x ≠ w ∧ y ≠ z ∧ y ≠ w) :\n n ≥ 1729 := sorry", "formal_proof": null, "informal_stmt": "Show that 1729 is the smallest positive integer expressible as the sum of two different integral cubes in two ways.\n\\begin{proof}\n Let $n=a^3+b^3$, and suppose that $\\operatorname{gcd}(a, b)=1$. If a prime $p \\mid a^3+b^3$, then\n$$\n\\left(a b^{-1}\\right)^3 \\equiv_p-1\n$$\nThus $3 \\mid \\frac{p-1}{2}$, that is, $p \\equiv_6 1$.\nIf we have $n=a^3+b^3=c^3+d^3$, then we can factor $n$ as\n$$\n\\begin{aligned}\n& n=(a+b)\\left(a^2-a b+b^2\\right) \\\\\n& n=(c+d)\\left(c^2-c d+d^2\\right)\n\\end{aligned}\n$$\nThus we need $n$ to have at least 3 distinct prime factors, and so the smallest taxicab number is on the form\n$$\nn=(6 k+1)(12 k+1)(18 k+1)\n$$\n\\end{proof}\n\\end{document}", "informal_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$, otherwise it wouldn't divide three consecutive integers, which is impossible. As $n$ is odd, $n+1$ is even, so $(n+1)(n-1)$ is divisible by both 2 and 3 , so it is divisible by 6 ."} {"name": "Herstein_exercise_2_1_18", "source": "Herstein.lean", "header": "import Mathlib\n\nopen Fintype Set Real Ideal Polynomial\nopen scoped BigOperators\nnoncomputable section\n", "formal_statement": "theorem Herstein_exercise_2_1_18 {G : Type*} [Group G]\n [Fintype G] (hG2 : Even (card G)) :\n ∃ (a : G), a ≠ 1 ∧ a = a⁻¹ := sorry", "formal_proof": null, "informal_stmt": "If $G$ is a finite group of even order, show that there must be an element $a \\neq e$ such that $a=a^{-1}$.\n\\begin{proof}\n First note that $a=a^{-1}$ is the same as saying $a^2=e$, where $e$ is the identity. I.e. the statement is that there exists at least one element of order 2 in $G$.\nEvery element $a$ of $G$ of order at least 3 has an inverse $a^{-1}$ that is not itself -- that is, $a \\neq a^{-1}$. So the subset of all such elements has an even cardinality (/size). There's exactly one element with order 1 : the identity $e^1=e$. So $G$ contains an even number of elements -call it $2 k$-- of which an even number are elements of order 3 or above -- call that $2 n$ where $nj$ (just reverse the roles of $i$ and $j$ otherwise). Then multiply both sides by $\\left(a^j\\right)^{-1}=a^{-j}$ to get\n$$\na^i * a^{-j}=a^{i-j}=e\n$$\nThus the $n=i-j$ is a positive integer such that $a^n=e$.\n\\end{proof}", "informal_proof": "First note that $a=a^{-1}$ is the same as saying $a^2=e$, where $e$ is the identity. I.e. the statement is that there exists at least one element of order 2 in $G$. Every element $a$ of $G$ of order at least 3 has an inverse $a^{-1}$ that is not itself -- that is, $a \\neq a^{-1}$. So the subset of all such elements has an even cardinality (/size). There's exactly one element with order 1 : the identity $e^1=e$. So $G$ contains an even number of elements -call it $2 k$-- of which an even number are elements of order 3 or above -- call that $2 n$ where $n x^5 + sqrt 2 * x^3 + sqrt 5 * x^2 + sqrt 7 * x + 11)\n (ha : p a = 0) :\n ∃ p : Polynomial ℂ , p.degree < 80 ∧ a ∈ p.roots ∧\n ∀ n : p.support, ∃ a b : ℤ, p.coeff n = a / b := sorry", "formal_proof": null, "informal_stmt": "If $a \\in C$ is such that $p(a) = 0$, where $p(x) = x^5 + \\sqrt{2}x^3 + \\sqrt{5}x^2 + \\sqrt{7}x + \\sqrt{11}$, show that $a$ is algebraic over $\\mathbb{Q}$ of degree at most 80.\n\\begin{proof}\n Given $a \\in \\mathbb{C}$ such that $p(a)=0$, where\n$$\np(x)=x^5+\\sqrt{2} x^3+\\sqrt{5} x^2+\\sqrt{7} x+\\sqrt{11}\n$$\nHere, we note that $p(x) \\in \\mathbb{Q}(\\sqrt{2}, \\sqrt{5}, \\sqrt{7}, \\sqrt{11})$ and\n$$\n\\begin{aligned}\n {[Q(\\sqrt{2}, \\sqrt{5}, \\sqrt{7}, \\sqrt{11}): \\mathbb{Q}] } & =[Q(\\sqrt{2}, \\sqrt{5}, \\sqrt{7}, \\sqrt{11}): Q(\\sqrt{2}, \\sqrt{5}, \\sqrt{7})] \\cdot[\\mathbb{Q}(\\sqrt{2}, \\sqrt{5}, \\sqrt{7}): \\mathbb{Q}(\\sqrt{2}, \\sqrt{5})] \\\\\n& \\cdot[\\mathbb{Q}(\\sqrt{2}, \\sqrt{5}): \\mathbb{Q}(\\sqrt{2})] \\cdot[\\mathbb{Q}(\\sqrt{2}): \\mathbb{Q}] \\\\\n& =2 \\cdot 2 \\cdot 2 \\cdot 2 \\\\\n& =16\n\\end{aligned}\n$$\nHere, we note that $p(x)$ is of degree 5 over $\\mathbb{Q}(\\sqrt{2}, \\sqrt{5}, \\sqrt{7}, \\sqrt{11})$. If $a$ is root of $p(x)$, then\n$$\n[Q(\\sqrt{2}, \\sqrt{5}, \\sqrt{7}, \\sqrt{11}, a): \\mathbb{Q}]=[Q(\\sqrt{2}, \\sqrt{5}, \\sqrt{7}, \\sqrt{11}): Q(\\sqrt{2}, \\sqrt{5}, \\sqrt{7}, \\sqrt{11})] \\cdot 15\n$$\nand $[Q(\\sqrt{2}, \\sqrt{5}, \\sqrt{7}, \\sqrt{11}): Q(\\sqrt{2}, \\sqrt{5}, \\sqrt{7}, \\sqrt{11})] \\leq 5$. We get equality if $p(x)$ is irreducible over $Q(\\sqrt{2}, \\sqrt{5}, \\sqrt{7}, \\sqrt{11})$. This gives\n$$\n[Q(\\sqrt{2}, \\sqrt{5}, \\sqrt{7}, \\sqrt{11}, a): \\mathbb{Q}] \\leq 16 \\cdot 5=80\n$$\n\\end{proof}", "informal_proof": "First note that $a=a^{-1}$ is the same as saying $a^2=e$, where $e$ is the identity. I.e. the statement is that there exists at least one element of order 2 in $G$. Every element $a$ of $G$ of order at least 3 has an inverse $a^{-1}$ that is not itself -- that is, $a \\neq a^{-1}$. So the subset of all such elements has an even cardinality (/size). There's exactly one element with order 1 : the identity $e^1=e$. So $G$ contains an even number of elements -call it $2 k$-- of which an even number are elements of order 3 or above -- call that $2 n$ where $n p (f n)) atTop (𝓝 a) := sorry", "formal_proof": null, "informal_stmt": "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.\n\\begin{proof}\n 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$ which implies that $p_{f(n)} \\rightarrow L$, as required.\n\\end{proof}", "informal_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$ which implies that $p_{f(n)} \\rightarrow L$, as required."} -{"name": "Pugh_exercise_2_26", "source": "Pugh.lean", "header": "import Mathlib\n\nopen Filter Real Function\nopen scoped Topology\nnoncomputable section\n", "formal_statement": "theorem Pugh_exercise_2_26 {M : Type*} [TopologicalSpace M]\n (U : Set M) : IsOpen U ↔ ∀ x ∈ U, ¬ ClusterPt x (𝓟 Uᶜ) := sorry", "formal_proof": null, "informal_stmt": "Prove that a set $U \\subset M$ is open if and only if none of its points are limits of its complement.\n\\begin{proof}\n Assume that none of the points of $U$ are limits of its complement, and let us prove that $U$ is open. Assume by contradiction that $U$ is not open, so there exists $p \\in M$ so that $\\forall r>0$ there exists $q \\in M$ with $d(p, q)0$ such that $d(p, x)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$ which implies that $p_{f(n)} \\rightarrow L$, as required."} -{"name": "Pugh_exercise_2_29", "source": "Pugh.lean", "header": "import Mathlib\n\nopen Filter Real Function\nopen scoped Topology\nnoncomputable section\n", "formal_statement": "theorem Pugh_exercise_2_29 (M : Type*) [MetricSpace M]\n (O C : Set (Set M))\n (hO : O = {s | IsOpen s})\n (hC : C = {s | IsClosed s}) :\n ∃ f : O → C, Bijective f := sorry", "formal_proof": null, "informal_stmt": "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}$.\n\\begin{proof}\n The bijection given by $x\\mapsto X^C$ suffices. \n\\end{proof}", "informal_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$ which implies that $p_{f(n)} \\rightarrow L$, as required."} -{"name": "Pugh_exercise_2_32a", "source": "Pugh.lean", "header": "import Mathlib\n\nopen Filter Real Function\nopen scoped Topology\nnoncomputable section\n", "formal_statement": "theorem Pugh_exercise_2_32a (A : Set ℕ) : IsClopen A := sorry", "formal_proof": null, "informal_stmt": "Show that every subset of $\\mathbb{N}$ is clopen.\n\\begin{proof}\n 32. The one-point set $\\{n\\} \\subset \\mathbb{N}$ is open, since it contains all $m \\in \\mathbb{N}$ that satisfy $d(m, n)<\\frac{1}{2}$. Every subset of $\\mathbb{N}$ is a union of one-point sets, hence is open. Then every set it closed, since its complement is necessarily open.\n\\end{proof}", "informal_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$ which implies that $p_{f(n)} \\rightarrow L$, as required."} -{"name": "Pugh_exercise_2_41", "source": "Pugh.lean", "header": "import Mathlib\n\nopen Filter Real Function\nopen scoped Topology\nnoncomputable section\n", "formal_statement": "theorem Pugh_exercise_2_41 (m : ℕ) {X : Type*} [NormedSpace ℝ ((Fin m) → ℝ)] :\n IsCompact (Metric.closedBall 0 1) := sorry", "formal_proof": null, "informal_stmt": "Let $\\|\\cdot\\|$ be any norm on $\\mathbb{R}^{m}$ and let $B=\\left\\{x \\in \\mathbb{R}^{m}:\\|x\\| \\leq 1\\right\\}$. Prove that $B$ is compact.\n\\begin{proof}\n Let us call $\\|\\cdot\\|_E$ the Euclidean norm in $\\mathbb{R}^m$. We start by claiming that there exist constants $C_1, C_2>0$ such that\n$$\nC_1\\|x\\|_E \\leq\\|x\\| \\leq C_2\\|x\\|_E, \\forall x \\in \\mathbb{R}^m .\n$$\nAssuming (1) to be true, let us finish the problem. First let us show that $B$ is bounded w.r.t. $d_E$, which is how we call the Euclidean distance in $\\mathbb{R}^m$. Indeed, given $x \\in B,\\|x\\|_E \\leq \\frac{1}{C_1}\\|x\\| \\leq \\frac{1}{C_1}$. Hence $B \\subset\\left\\{x \\in \\mathbb{R}^m: d_E(x, 0)<\\frac{1}{C_1}+1\\right\\}$, which means $B$ is bounded w.r.t $d_E$.\nNow let us show that $B$ is closed w.r.t. $d_E$. Let $x_n \\rightarrow x$ w.r.t. $d_E$, where $x_n \\in B$. Notice that this implies that $x_n \\rightarrow x$ w.r.t. $d(x, y)=\\|x-y\\|$, the distance coming from $\\|\\cdot\\|$, since by (1) we have\n$$\nd\\left(x_n, x\\right)=\\left\\|x_n-x\\right\\| \\leq C_2\\left\\|x_n-x\\right\\|_E \\rightarrow 0 .\n$$\nAlso, notice that\n$$\n\\|x\\| \\leq\\left\\|x_n-x\\right\\|+\\left\\|x_n\\right\\| \\leq\\left\\|x_n-x\\right\\|+1,\n$$\nhence passing to the limit we obtain that $\\|x\\| \\leq 1$, therefore $x \\in B$ and so $B$ is closed w.r.t. $d_E$. Since $B$ is closed and bounded w.r.t. $d_E$, it must be compact. Now we claim that the identity function, $i d:\\left(\\mathbb{R}^m, d_E\\right) \\rightarrow\\left(\\mathbb{R}^m, d\\right)$ where $\\left(\\mathbb{R}^m, d_E\\right)$ means we are using the distance $d_E$ in $\\mathbb{R}^m$ and $\\left(\\mathbb{R}^m, d\\right)$ means we are using the distance $d$ in $\\mathbb{R}^m$, is a homeomorphism. This follows by (1), since $i d$ is always a bijection, and it is continuous and its inverse is continuous by (1) (if $x_n \\rightarrow x$ w.r.t. $d_E$, then $x_n \\rightarrow x$ w.r.t. $d$ and vice-versa, by (1)). By a result we saw in class, since $B$ is compact in $\\left(\\mathbb{R}^m, d_E\\right)$ and $i d$ is a homeomorphism, then $i d(B)=B$ is compact w.r.t. $d$.\n\nWe are left with proving (1). Notice that it suffices to prove that $C_1 \\leq\\|x\\| \\leq$ $C_2, \\forall x \\in \\mathbb{R}^m$ with $\\|x\\|_E=1$. Indeed, if this is true, given $x \\in \\mathbb{R}^m$, either $\\|x\\|_E=0$ (which implies $x=0$ and (1) holds in this case), or $x /\\|x\\|_E=y$ is such that $\\|y\\|_E=1$, so $C_1 \\leq\\|y\\| \\leq C_2$, which implies $C_1\\|x\\|_E \\leq\\|x\\| \\leq C_2\\|x\\|_E$.\nWe want to show now that $\\|\\cdot\\|$ is continuous w.r.t. $d_E$, that is, given $\\varepsilon>0$ and $x \\in \\mathbb{R}^m$, there exists $\\delta>0$ such that if $d_E(x, y)<\\delta$, then $\\|\\mid x\\|-\\|y\\| \\|<\\varepsilon$.\n\nBy the triangle inequality, $\\|x\\|-\\|y\\| \\leq\\|x-y\\|$, and $\\|y\\|-\\|x\\| \\leq\\|x-y\\|$, therefore\n$$\n|\\|x||-\\| y|\\|\\leq\\| x-y \\| .\n$$\nWriting now $x=\\sum_{i=1}^m a_i e_i, y=\\sum_{i=1}^m b_i e_i$, where $e_i=(0, \\ldots, 1,0, \\ldots, 0)$ (with 1 in the i-th component), we obtain by the triangle inequality,\n$$\n\\begin{aligned}\n\\|x-y\\| & =\\left\\|\\sum_{i=1}^m\\left(a_i-b_i\\right) e_i\\right\\| \\leq \\sum_{i=1}^m\\left|a_i-b_i\\left\\|\\left|\\left\\|e_i\\right\\| \\leq \\max _{i=1, \\ldots, m}\\left\\|e_i\\right\\| \\sum_{i=1}^m\\right| a_i-b_i \\mid\\right.\\right. \\\\\n& =\\max _{i=1, \\ldots, m}\\left\\|e_i\\right\\| d_{s u m}(x, y) \\leq \\max _{i=1, \\ldots, m}\\left\\|e_i\\right\\| m d_{\\max }(x, y) \\\\\n& \\leq \\max _{i=1, \\ldots, m}\\left\\|e_i\\right\\| m d_E(x, y) .\n\\end{aligned}\n$$\nLet $\\delta=\\frac{\\varepsilon}{m \\max _{i=1, \\ldots, m}\\left\\|e_i\\right\\|}$. Then if $d_E(x, y)<\\delta,\\|x\\|-\\|y\\|||<\\varepsilon$.\nSince $\\|\\cdot\\|$ is continuous w.r.t. $d_E$ and $K=\\left\\{x \\in \\mathbb{R}^m:\\|x\\|_E=1\\right\\}$ is compact w.r.t. $d_E$, then the function $\\|\\cdot\\|$ achieves a maximum and a minimum value on $K$. Call $C_1=\\min _{x \\in K}\\|x\\|, C_2=\\max _{x \\in K}\\|x\\|$. Then\n$$\nC_1 \\leq\\|x\\| \\leq C_2, \\forall x \\in \\mathbb{R}^m \\text { such that }\\|x\\|_E=1,\n$$\nwhich is what we needed.\n\\end{proof}", "informal_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$ which implies that $p_{f(n)} \\rightarrow L$, as required."} -{"name": "Pugh_exercise_2_46", "source": "Pugh.lean", "header": "import Mathlib\n\nopen Filter Real Function\nopen scoped Topology\nnoncomputable section\n", "formal_statement": "theorem Pugh_exercise_2_46 {M : Type*} [MetricSpace M]\n {A B : Set M} (hA : IsCompact A) (hB : IsCompact B)\n (hAB : Disjoint A B) (hA₀ : A ≠ ∅) (hB₀ : B ≠ ∅) :\n ∃ a₀ b₀, a₀ ∈ A ∧ b₀ ∈ B ∧ ∀ (a : M) (b : M),\n a ∈ A → b ∈ B → dist a₀ b₀ ≤ dist a b := sorry", "formal_proof": null, "informal_stmt": "Assume that $A, B$ are compact, disjoint, nonempty subsets of $M$. Prove that there are $a_0 \\in A$ and $b_0 \\in B$ such that for all $a \\in A$ and $b \\in B$ we have $d(a_0, b_0) \\leq d(a, b)$.\n\\begin{proof}\nLet $A$ and $B$ be compact, disjoint and non-empty subsets of $M$. We want to show that there exist $a_0 \\in A, b_0 \\in B$ such that for all $a \\in A, b \\in B$,\n$$\nd\\left(a_0, b_0\\right) \\leq d(a, b) .\n$$\nWe saw in class that the distance function $d: M \\times M \\rightarrow \\mathbb{R}$ is continuous. We also saw in class that any continuous, real-valued function assumes maximum and minimum values on a compact set. Since $A$ and $B$ are compact, $A \\times B$ is (non-empty) compact in $M \\times M$. Therefore there exists $\\left(a_0, b_0\\right) \\in A \\times B$ such that $d\\left(a_0, b_0\\right) \\leq d(a, b), \\forall(a, b) \\in A \\times B$.\n\\end{proof}", "informal_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$ which implies that $p_{f(n)} \\rightarrow L$, as required."} -{"name": "Pugh_exercise_2_57", "source": "Pugh.lean", "header": "import Mathlib\n\nopen Filter Real Function\nopen scoped Topology\nnoncomputable section\n", "formal_statement": "theorem Pugh_exercise_2_57 {X : Type*} [TopologicalSpace X]\n : ∃ (S : Set X), IsConnected S ∧ ¬ IsConnected (interior S) := sorry", "formal_proof": null, "informal_stmt": "Show that if $S$ is connected, it is not true in general that its interior is connected.\n\\begin{proof}\n Consider $X=\\mathbb{R}^2$ and\n$$\nA=([-2,0] \\times[-2,0]) \\cup([0,2] \\times[0,2])\n$$\nwhich is connected, while $\\operatorname{int}(A)$ is not connected.\nTo see this consider the continuous function $f: \\mathbb{R}^2 \\rightarrow \\mathbb{R}$ is defined by $f(x, y)=x+y$. Let $U=f^{-1}(0,+\\infty)$ which is open in $\\mathbb{R}^2$ and so $U \\cap \\operatorname{int}(A)$ is open in $\\operatorname{int}(A)$. Also, since $(0,0) \\notin \\operatorname{int}(A)$, so for all $(x, y) \\in \\operatorname{int}(A), f(x, y) \\neq 0$ and $U \\cap \\operatorname{int}(A)=f^{-1}[0,+\\infty) \\cap \\operatorname{int}(A)$ is closed in $\\operatorname{int}(A)$. Furthermore, $(1,1)=f^{-1}(2) \\in U \\cap \\operatorname{int}(A)$ shows that $U \\cap \\operatorname{int}(A) \\neq \\emptyset$ while $(-1,-1) \\in \\operatorname{int}(A)$ and $(-1,-1) \\notin U$ shows that $U \\cap \\operatorname{int}(A) \\neq \\operatorname{int}(A)$.\n\\end{proof}", "informal_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$ which implies that $p_{f(n)} \\rightarrow L$, as required."} -{"name": "Pugh_exercise_2_92", "source": "Pugh.lean", "header": "import Mathlib\n\nopen Filter Real Function\nopen scoped Topology\nnoncomputable section\n", "formal_statement": "theorem Pugh_exercise_2_92 {α : Type*} [TopologicalSpace α]\n {s : ℕ → Set α}\n (hs : ∀ i, IsCompact (s i))\n (hs : ∀ i, (s i).Nonempty)\n (hs : ∀ i, (s i) ⊃ (s (i + 1))) :\n (⋂ i, s i).Nonempty := sorry", "formal_proof": null, "informal_stmt": "Give a direct proof that the nested decreasing intersection of nonempty covering compact sets is nonempty.\n\\begin{proof}\n Let\n$$\nA_1 \\supset A_2 \\supset \\cdots \\supset A_n \\supset \\cdots\n$$\nbe a nested decreasing sequence of compacts. Suppose that $\\bigcap A_n=\\emptyset$. Take $U_n=A_n^c$, then\n$$\n\\bigcup U_n=\\bigcup A_n^c=\\left(\\bigcap A_n\\right)^c=A_1 .\n$$\nHere, I'm thinking of $A_1$ as the main metric space. Since $\\left\\{U_n\\right\\}$ is an open covering of $A_1$, we can extract a finite subcovering, that is,\n$$\nA_{\\alpha_1}^c \\cup A_{\\alpha_2}^c \\cup \\cdots \\cup A_{\\alpha_m}^c \\supset A_1\n$$\nor\n$$\n\\left(A_1 \\backslash A_{\\alpha_1}\\right) \\cup\\left(A_1 \\backslash A_{\\alpha_2}\\right) \\cup \\cdots \\cup\\left(A_1 \\backslash A_{\\alpha_m}\\right) \\supset A_1 .\n$$\nBut, this is true only if $A_{\\alpha_i}=\\emptyset$ for some $i$, a contradiction.\n\\end{proof}", "informal_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$ which implies that $p_{f(n)} \\rightarrow L$, as required."} -{"name": "Pugh_exercise_2_126", "source": "Pugh.lean", "header": "import Mathlib\n\nopen Filter Real Function\nopen scoped Topology\nnoncomputable section\n", "formal_statement": "theorem Pugh_exercise_2_126 {E : Set ℝ}\n (hE : ¬ Set.Countable E) : ∃ (p : ℝ), ClusterPt p (𝓟 E) := sorry", "formal_proof": null, "informal_stmt": "Suppose that $E$ is an uncountable subset of $\\mathbb{R}$. Prove that there exists a point $p \\in \\mathbb{R}$ at which $E$ condenses.\n\\begin{proof}\n I think this is the proof by contrapositive that you were getting at.\nSuppose that $E$ has no limit points at all. Pick an arbitrary point $x \\in E$. Then $x$ cannot be a limit point, so there must be some $\\delta>0$ such that the ball of radius $\\delta$ around $x$ contains no other points of $E$ :\n$$\nB_\\delta(x) \\cap E=\\{x\\}\n$$\nCall this \"point 1 \". For the next point, take the closest element to $x$ and on its left; that is, choose the point\n$$\n\\max [E \\cap(-\\infty, x)]\n$$\nif it exists (that is important - if not, skip to the next step). Note that by the argument above, this supremum, should it exist, cannot equal $x$ and is therefore a new point in $E$.\n\nCall this \"point 2 \". Now take the first point to the right of $x$ for \"point 3 \". Take the first point to the left of point 2 for \"point 4 \". And so on, ad infinitum.\n\nThis gives a countable list of unique points; we must show that it exhausts the entire set $E$. Suppose not. Suppose there is some element $aa_1 \\in E$ such that $a_2$ is not in the list. Repeating, we generate an infinite monotone-increasing sequence $\\left\\{a_i\\right\\}$ of elements in $E$ and not in the list, which is clearly bounded above by $x$. By the Monotone\nConvergence Theorem this sequence has a limit. But that means the sequence $\\left\\{a_i\\right\\} \\subset E$ converges to a limit, and hence $E$ has a limit point, contradicting the assumption. Therefore our list exhausts $E$, and we have enumerated all its elements.\n\\end{proof}", "informal_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$ which implies that $p_{f(n)} \\rightarrow L$, as required."} -{"name": "Pugh_exercise_3_1", "source": "Pugh.lean", "header": "import Mathlib\n\nopen Filter Real Function\nopen scoped Topology\nnoncomputable section\n", "formal_statement": "theorem Pugh_exercise_3_1 {f : ℝ → ℝ}\n (hf : ∀ x y, |f x - f y| ≤ |x - y| ^ 2) :\n ∃ c, f = λ x => c := sorry", "formal_proof": null, "informal_stmt": "Assume that $f \\colon \\mathbb{R} \\rightarrow \\mathbb{R}$ satisfies $|f(t)-f(x)| \\leq|t-x|^{2}$ for all $t, x$. Prove that $f$ is constant.\n\\begin{proof}\n We have $|f(t)-f(x)| \\leq|t-x|^2, \\forall t, x \\in \\mathbb{R}$. Fix $x \\in \\mathbb{R}$ and let $t \\neq x$. Then\n$$\n\\left|\\frac{f(t)-f(x)}{t-x}\\right| \\leq|t-x| \\text {, hence } \\lim _{t \\rightarrow x}\\left|\\frac{f(t)-f(x)}{t-x}\\right|=0 \\text {, }\n$$\nso $f$ is differentiable in $\\mathbb{R}$ and $f^{\\prime}=0$. This implies that $f$ is constant, as seen in class.\n\\end{proof}", "informal_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$ which implies that $p_{f(n)} \\rightarrow L$, as required."} -{"name": "Pugh_exercise_3_4", "source": "Pugh.lean", "header": "import Mathlib\n\nopen Filter Real Function\nopen scoped Topology\nnoncomputable section\n", "formal_statement": "theorem Pugh_exercise_3_4 (n : ℕ) :\n Tendsto (λ n => (sqrt (n + 1) - sqrt n)) atTop (𝓝 0) := sorry", "formal_proof": null, "informal_stmt": "Prove that $\\sqrt{n+1}-\\sqrt{n} \\rightarrow 0$ as $n \\rightarrow \\infty$.\n\\begin{proof}\n $$\n\\sqrt{n+1}-\\sqrt{n}=\\frac{(\\sqrt{n+1}-\\sqrt{n})(\\sqrt{n+1}+\\sqrt{n})}{\\sqrt{n+1}+\\sqrt{n}}=\\frac{1}{\\sqrt{n+1}+\\sqrt{n}}<\\frac{1}{2 \\sqrt{n}}\n$$\n\\end{proof}", "informal_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$ which implies that $p_{f(n)} \\rightarrow L$, as required."} -{"name": "Pugh_exercise_3_63a", "source": "Pugh.lean", "header": "import Mathlib\n\nopen Filter Real Function\nopen scoped Topology\nnoncomputable section\n", "formal_statement": "theorem Pugh_exercise_3_63a (p : ℝ) (f : ℕ → ℝ) (hp : p > 1)\n (h : f = λ (k : ℕ) => (1 : ℝ) / (k * (log k) ^ p)) :\n ∃ l, Tendsto f atTop (𝓝 l) := sorry", "formal_proof": null, "informal_stmt": "Prove that $\\sum 1/k(\\log(k))^p$ converges when $p > 1$.\n\\begin{proof}\n Using the integral test, for a set $a$, we see\n$$\n\\lim _{b \\rightarrow \\infty} \\int_a^b \\frac{1}{x \\log (x)^c} d x=\\lim _{b \\rightarrow \\infty}\\left(\\frac{\\log (b)^{1-c}}{1-c}-\\frac{\\log (a)^{1-c}}{1-c}\\right)\n$$\nwhich goes to infinity if $c \\leq 1$ and converges if $c>1$. Thus,\n$$\n\\sum_{n=2}^{\\infty} \\frac{1}{n \\log (n)^c}\n$$\nconverges if and only if $c>1$. \n\\end{proof}", "informal_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$ which implies that $p_{f(n)} \\rightarrow L$, as required."} -{"name": "Pugh_exercise_3_63b", "source": "Pugh.lean", "header": "import Mathlib\n\nopen Filter Real Function\nopen scoped Topology\nnoncomputable section\n", "formal_statement": "theorem Pugh_exercise_3_63b (p : ℝ) (f : ℕ → ℝ) (hp : p ≤ 1)\n (h : f = λ (k : ℕ) => (1 : ℝ) / (k * (log k) ^ p)) :\n ¬ ∃ l, Tendsto f atTop (𝓝 l) := sorry", "formal_proof": null, "informal_stmt": "Prove that $\\sum 1/k(\\log(k))^p$ diverges when $p \\leq 1$.\n\\begin{proof} \n Using the integral test, for a set $a$, we see\n$$\n\\lim _{b \\rightarrow \\infty} \\int_a^b \\frac{1}{x \\log (x)^c} d x=\\lim _{b \\rightarrow \\infty}\\left(\\frac{\\log (b)^{1-c}}{1-c}-\\frac{\\log (a)^{1-c}}{1-c}\\right)\n$$\nwhich goes to infinity if $c \\leq 1$ and converges if $c>1$. Thus,\n$$\n\\sum_{n=2}^{\\infty} \\frac{1}{n \\log (n)^c}\n$$\nconverges if and only if $c>1$. \n\\end{proof}", "informal_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$ which implies that $p_{f(n)} \\rightarrow L$, as required."} -{"name": "Pugh_exercise_4_15a", "source": "Pugh.lean", "header": "import Mathlib\n\nopen Filter Real Function\nopen scoped Topology\nnoncomputable section\n", "formal_statement": "theorem Pugh_exercise_4_15a {α : Type*}\n (a b : ℝ) (F : Set (ℝ → ℝ)) :\n (∀ x : ℝ, ∀ ε > 0, ∃ U ∈ (𝓝 x),\n (∀ y z : U, ∀ f : ℝ → ℝ, f ∈ F → (dist (f y) (f z) < ε)))\n ↔\n ∃ (μ : ℝ → ℝ), ∀ (x : ℝ), (0 : ℝ) ≤ μ x ∧ Tendsto μ (𝓝 0) (𝓝 0) ∧\n (∀ (s t : ℝ) (f : ℝ → ℝ), f ∈ F → |(f s) - (f t)| ≤ μ (|s - t|)) := sorry", "formal_proof": null, "informal_stmt": "A continuous, strictly increasing function $\\mu \\colon (0, \\infty) \\rightarrow (0, \\infty)$ is a modulus of continuity if $\\mu(s) \\rightarrow 0$ as $s \\rightarrow 0$. A function $f \\colon [a, b] \\rightarrow \\mathbb{R}$ has modulus of continuity $\\mu$ if $|f(s) - f(t)| \\leq \\mu(|s - t|)$ for all $s, t \\in [a, b]$. Prove that a function is uniformly continuous if and only if it has a modulus of continuity.\n\\begin{proof}\n Suppose there exists a modulus of continuity $w$ for $f$, then fix $\\varepsilon>0$, since $\\lim _{s \\rightarrow 0} w(s)=0$, there exists $\\delta>0$ such that for any $|s|<\\delta$, we have $w(s)<\\varepsilon$, then we have for any $x, z \\in X$ such that $d_X(x, z)<\\delta$, we have $d_Y(f(x), f(z)) \\leq w\\left(d_X(x, z)\\right)<\\varepsilon$, which means $f$ is uniformly continuous.\n\nSuppose $f:\\left(X, d_X\\right) \\rightarrow\\left(Y, d_Y\\right)$ is uniformly continuous.\nLet $\\delta_1>0$ be such that $d_X(a, b)<\\delta_1$ implies $d_Y(f(a), f(b))<1$.\nDefine $w:[0, \\infty) \\rightarrow[0, \\infty]$ by\n$$\nw(s)= \\begin{cases}\\left.\\sup \\left\\{d_Y(f(a), f(b))\\right\\} \\mid d_X(a, b) \\leq s\\right\\} & \\text { if } s \\leq \\delta_1 \\\\ \\infty & \\text { if } s>\\delta_1\\end{cases}\n$$\nWe'll show that $w$ is a modulus of continuity for $f \\ldots$\nBy definition of $w$, it's immediate that $w(0)=0$ and it's clear that\n$$\nd_Y(f(a), f(b)) \\leq w\\left(d_X(a, b)\\right)\n$$\nfor all $a, b \\in X$.\nIt remains to show $\\lim _{s \\rightarrow 0^{+}} w(s)=0$.\nIt's easily seen that $w$ is nonnegative and non-decreasing, hence $\\lim _{s \\rightarrow 0^{+}}=L$ for some $L \\geq 0$, where $L=\\inf w((0, \\infty))$\nLet $\\epsilon>0$.\nBy uniform continuity of $f$, there exists $\\delta>0$ such that $d_X(a, b)<\\delta$ implies $d_Y(f(a), f(b))<\\epsilon$, hence by definition of $w$, we get $w(\\delta) \\leq \\epsilon$.\nThus $L \\leq \\epsilon$ for all $\\epsilon>0$, hence $L=0$.\nThis completes the proof.\n\\end{proof}\n\\end{document}", "informal_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$ which implies that $p_{f(n)} \\rightarrow L$, as required."} -{"name": "Axler_exercise_1_2", "source": "Axler.lean", "header": "import Mathlib\n\nopen Fintype Complex Polynomial LinearMap FiniteDimensional Module Module.End\nopen scoped BigOperators InnerProductSpace\n", "formal_statement": "theorem Axler_exercise_1_2 :\n (⟨-1/2, Real.sqrt 3 / 2⟩ : ℂ) ^ 3 = -1 := sorry", "formal_proof": null, "informal_stmt": "Show that $\\frac{-1 + \\sqrt{3}i}{2}$ is a cube root of 1 (meaning that its cube equals 1).\n\\begin{proof}\n$$\n\\left(\\frac{-1+\\sqrt{3} i}{2}\\right)^2=\\frac{-1-\\sqrt{3} i}{2},\n$$\nhence\n$$\n\\left(\\frac{-1+\\sqrt{3} i}{2}\\right)^3=\\frac{-1-\\sqrt{3} i}{2} \\cdot \\frac{-1+\\sqrt{3} i}{2}=1\n$$\nThis means $\\frac{-1+\\sqrt{3} i}{2}$ is a cube root of 1.\n\\end{proof}", "informal_proof": "$$ \\left(\\frac{-1+\\sqrt{3} i}{2}\\right)^2=\\frac{-1-\\sqrt{3} i}{2}, $$ hence $$ \\left(\\frac{-1+\\sqrt{3} i}{2}\\right)^3=\\frac{-1-\\sqrt{3} i}{2} \\cdot \\frac{-1+\\sqrt{3} i}{2}=1 $$ This means $\\frac{-1+\\sqrt{3} i}{2}$ is a cube root of 1."} -{"name": "Axler_exercise_1_3", "source": "Axler.lean", "header": "import Mathlib\n\nopen Fintype Complex Polynomial LinearMap FiniteDimensional Module Module.End\nopen scoped BigOperators InnerProductSpace\n", "formal_statement": "theorem Axler_exercise_1_3 {F V : Type*} [AddCommGroup V] [Field F]\n [Module F V] {v : V} : -(-v) = v := sorry", "formal_proof": null, "informal_stmt": "Prove that $-(-v) = v$ for every $v \\in V$.\n\\begin{proof}\n By definition, we have\n$$\n(-v)+(-(-v))=0 \\quad \\text { and } \\quad v+(-v)=0 .\n$$\nThis implies both $v$ and $-(-v)$ are additive inverses of $-v$, by the uniqueness of additive inverse, it follows that $-(-v)=v$.\n\\end{proof}", "informal_proof": "$$ \\left(\\frac{-1+\\sqrt{3} i}{2}\\right)^2=\\frac{-1-\\sqrt{3} i}{2}, $$ hence $$ \\left(\\frac{-1+\\sqrt{3} i}{2}\\right)^3=\\frac{-1-\\sqrt{3} i}{2} \\cdot \\frac{-1+\\sqrt{3} i}{2}=1 $$ This means $\\frac{-1+\\sqrt{3} i}{2}$ is a cube root of 1."} -{"name": "Axler_exercise_1_4", "source": "Axler.lean", "header": "import Mathlib\n\nopen Fintype Complex Polynomial LinearMap FiniteDimensional Module Module.End\nopen scoped BigOperators InnerProductSpace\n", "formal_statement": "theorem Axler_exercise_1_4 {F V : Type*} [AddCommGroup V] [Field F]\n [Module F V] (v : V) (a : F): a • v = 0 ↔ a = 0 ∨ v = 0 := sorry", "formal_proof": null, "informal_stmt": "Prove that if $a \\in \\mathbf{F}$, $v \\in V$, and $av = 0$, then $a = 0$ or $v = 0$.\n\\begin{proof}\n If $a=0$, then we immediately have our result. So suppose $a \\neq 0$. Then, because $a$ is some nonzero real or complex number, it has a multiplicative inverse $\\frac{1}{a}$. Now suppose that $v$ is some vector such that\n$$\na v=0\n$$\nMultiply by $\\frac{1}{a}$ on both sides of this equation to get\n$$\n\\begin{aligned}\n\\frac{1}{a}(a v) & =\\frac{1}{a} 0 & & \\\\\n\\frac{1}{a}(a v) & =0 & & \\\\\n\\left(\\frac{1}{a} \\cdot a\\right) v & =0 & & \\text { (associativity) } \\\\\n1 v & =0 & & \\text { (definition of } 1/a) \\\\\nv & =0 & & \\text { (multiplicative identity) }\n\\end{aligned}\n$$\nHence either $a=0$ or, if $a \\neq 0$, then $v=0$.\n\\end{proof}", "informal_proof": "$$ \\left(\\frac{-1+\\sqrt{3} i}{2}\\right)^2=\\frac{-1-\\sqrt{3} i}{2}, $$ hence $$ \\left(\\frac{-1+\\sqrt{3} i}{2}\\right)^3=\\frac{-1-\\sqrt{3} i}{2} \\cdot \\frac{-1+\\sqrt{3} i}{2}=1 $$ This means $\\frac{-1+\\sqrt{3} i}{2}$ is a cube root of 1."} -{"name": "Axler_exercise_1_6", "source": "Axler.lean", "header": "import Mathlib\n\nopen Fintype Complex Polynomial LinearMap FiniteDimensional Module Module.End\nopen scoped BigOperators InnerProductSpace\n", "formal_statement": "theorem Axler_exercise_1_6 : ∃ U : Set (ℝ × ℝ),\n (U ≠ ∅) ∧\n (∀ (u v : ℝ × ℝ), u ∈ U ∧ v ∈ U → u + v ∈ U) ∧\n (∀ (u : ℝ × ℝ), u ∈ U → -u ∈ U) ∧\n (∀ U' : Submodule ℝ (ℝ × ℝ), U ≠ ↑U') := sorry", "formal_proof": null, "informal_stmt": "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$.\n\\begin{proof}\n \\[U=\\mathbb{Z}^2=\\left\\{(x, y) \\in \\mathbf{R}^2: x, y \\text { are integers }\\right\\}\\]\n$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 fails scalar multiplication. A discrete set like $\\mathbb{Z}^2$ does this.\n\\end{proof}", "informal_proof": "$$ \\left(\\frac{-1+\\sqrt{3} i}{2}\\right)^2=\\frac{-1-\\sqrt{3} i}{2}, $$ hence $$ \\left(\\frac{-1+\\sqrt{3} i}{2}\\right)^3=\\frac{-1-\\sqrt{3} i}{2} \\cdot \\frac{-1+\\sqrt{3} i}{2}=1 $$ This means $\\frac{-1+\\sqrt{3} i}{2}$ is a cube root of 1."} -{"name": "Axler_exercise_1_7", "source": "Axler.lean", "header": "import Mathlib\n\nopen Fintype Complex Polynomial LinearMap FiniteDimensional Module Module.End\nopen scoped BigOperators InnerProductSpace\n", "formal_statement": "theorem Axler_exercise_1_7 : ∃ U : Set (ℝ × ℝ),\n (U ≠ ∅) ∧\n (∀ (c : ℝ) (u : ℝ × ℝ), u ∈ U → c • u ∈ U) ∧\n (∀ U' : Submodule ℝ (ℝ × ℝ), U ≠ ↑U') := sorry", "formal_proof": null, "informal_stmt": "Give an example of a nonempty subset $U$ of $\\mathbf{R}^2$ such that $U$ is closed under scalar multiplication, but $U$ is not a subspace of $\\mathbf{R}^2$.\n\\begin{proof}\n$$\nU=\\left\\{(x, y) \\in \\mathbf{R}^2:|x|=|y|\\right\\}\n$$\nFor $(x, y) \\in U$ and $\\lambda \\in \\mathbb{R}$, it follows $\\lambda(x, y)=$ $(\\lambda x, \\lambda y)$, so $|\\lambda x|=|\\lambda||x|=|\\lambda||y|=|\\lambda y|$. Therefore, $\\lambda(x, y) \\in U$.\n\nOn the other hand, consider $a=(1,-1), b=$ $(1,1) \\in U$. Then, $a+b=(1,-1)+(1,1)=$ $(2,0) \\notin U$. So, $U$ is not a subspace of $\\mathbb{R}^2$.\n\\end{proof}", "informal_proof": "$$ \\left(\\frac{-1+\\sqrt{3} i}{2}\\right)^2=\\frac{-1-\\sqrt{3} i}{2}, $$ hence $$ \\left(\\frac{-1+\\sqrt{3} i}{2}\\right)^3=\\frac{-1-\\sqrt{3} i}{2} \\cdot \\frac{-1+\\sqrt{3} i}{2}=1 $$ This means $\\frac{-1+\\sqrt{3} i}{2}$ is a cube root of 1."} -{"name": "Axler_exercise_1_8", "source": "Axler.lean", "header": "import Mathlib\n\nopen Fintype Complex Polynomial LinearMap FiniteDimensional Module Module.End\nopen scoped BigOperators InnerProductSpace\n", "formal_statement": "theorem Axler_exercise_1_8 {F V : Type*} [AddCommGroup V] [Field F]\n [Module F V] {ι : Type*} (u : ι → Submodule F V) :\n ∃ U : Submodule F V, (⋂ (i : ι), (u i).carrier) = ↑U := sorry", "formal_proof": null, "informal_stmt": "Prove that the intersection of any collection of subspaces of $V$ is a subspace of $V$.\n\\begin{proof}\nLet $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$.\n\nTo 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 $0$ is in each subspace $V_i$, as they are subspaces and hence contain the additive identity.\n\nNext, we show that the intersection of subspaces is closed under addition. Let $u$ and $v$ be vectors in $V_1 \\cap V_2 \\cap \\ldots \\cap V_n$. By definition, $u$ and $v$ belong to each of the subspaces $V_i$. Since each $V_i$ is a subspace and therefore closed under addition, it follows that $u+v$ belongs to each $V_i$. Thus, $u+v$ belongs to the intersection $V_1 \\cap V_2 \\cap \\ldots \\cap V_n$.\n\nFinally, we show that the intersection of subspaces is closed under scalar multiplication. Let $a$ be a scalar in $F$ and let $v$ be a vector in $V_1 \\cap V_2 \\cap \\ldots \\cap V_n$. Since $v$ belongs to each $V_i$, we have $av$ belongs to each $V_i$ as well, as $V_i$ are subspaces and hence closed under scalar multiplication. Therefore, $av$ belongs to the intersection $V_1 \\cap V_2 \\cap \\ldots \\cap V_n$.\n\nThus, we have shown that $V_1 \\cap V_2 \\cap \\ldots \\cap V_n$ is a subspace of $V$.\n\\end{proof}", "informal_proof": "$$ \\left(\\frac{-1+\\sqrt{3} i}{2}\\right)^2=\\frac{-1-\\sqrt{3} i}{2}, $$ hence $$ \\left(\\frac{-1+\\sqrt{3} i}{2}\\right)^3=\\frac{-1-\\sqrt{3} i}{2} \\cdot \\frac{-1+\\sqrt{3} i}{2}=1 $$ This means $\\frac{-1+\\sqrt{3} i}{2}$ is a cube root of 1."} -{"name": "Axler_exercise_1_9", "source": "Axler.lean", "header": "import Mathlib\n\nopen Fintype Complex Polynomial LinearMap FiniteDimensional Module Module.End\nopen scoped BigOperators InnerProductSpace\n", "formal_statement": "theorem Axler_exercise_1_9 {F V : Type*} [AddCommGroup V] [Field F]\n [Module F V] (U W : Submodule F V):\n ∃ U' : Submodule F V, (U'.carrier = ↑U ∩ ↑W ↔ (U ≤ W ∨ W ≤ U)) := sorry", "formal_proof": null, "informal_stmt": "Prove that the union of two subspaces of $V$ is a subspace of $V$ if and only if one of the subspaces is contained in the other.\n\\begin{proof}\n To prove this one way, suppose for purposes of contradiction that for $U_1$ and $U_2$, which are subspaces of $V$, that $U_1 \\cup U_2$ is a subspace and neither is completely contained within the other. In other words, $U_1 \\nsubseteq U_2$ and $U_2 \\nsubseteq U_1$. We will show that you can pick a vector $v \\in U_1$ and a vector $u \\in U_2$ such that $v+u \\notin U_1 \\cup U_2$, proving that if $U_1 \\cup U_2$ is a subspace, one must be completely contained inside the other.\n\nIf $U_1 \\nsubseteq U_2$, we can pick a $v \\in U_1$ such that $v \\notin U_2$. Since $v$ is in the subspace $U_1$, then $(-v)$ must also be, by definition. Similarly, if $U_2 \\nsubseteq U_1$, then we can pick a $u \\in U_2$ such that $u \\notin U_1$. Since $u$ is in the subspace $U_2$, then $(-u)$ must also be, by definition.\n\nIf $v+u \\in U_1 \\cup U_2$, then $v+u$ must be in $U_1$ or $U_2$. But, $v+u \\in U_1 \\Rightarrow v+u+(-v) \\in U_1 \\Rightarrow u \\in U_1$\nSimilarly,\n$$\nv+u \\in U_2 \\Rightarrow v+u+(-u) \\in U_2 \\Rightarrow v \\in U_2\n$$\nThis is clearly a contradiction, as each element was defined to not be in these subspaces. Thus our initial assumption must have been wrong, and $U_1 \\subseteq U_2$ or $U_2 \\subseteq U_1$\nTo prove the other way, Let $U_1 \\subseteq U_2$ (WLOG). $U_1 \\subseteq U_2 \\Rightarrow U_1 \\cup U_2=U_2$. Since $U_2$ is a subspace, $U_1 \\cup U_2$ is as well. QED.\n\\end{proof}", "informal_proof": "$$ \\left(\\frac{-1+\\sqrt{3} i}{2}\\right)^2=\\frac{-1-\\sqrt{3} i}{2}, $$ hence $$ \\left(\\frac{-1+\\sqrt{3} i}{2}\\right)^3=\\frac{-1-\\sqrt{3} i}{2} \\cdot \\frac{-1+\\sqrt{3} i}{2}=1 $$ This means $\\frac{-1+\\sqrt{3} i}{2}$ is a cube root of 1."} -{"name": "Axler_exercise_3_1", "source": "Axler.lean", "header": "import Mathlib\n\nopen Fintype Complex Polynomial LinearMap FiniteDimensional Module Module.End\nopen scoped BigOperators InnerProductSpace\n", "formal_statement": "theorem Axler_exercise_3_1 {F V : Type*}\n [AddCommGroup V] [Field F] [Module F V] [FiniteDimensional F V]\n (T : V →ₗ[F] V) (hT : finrank F V = 1) :\n ∃ c : F, ∀ v : V, T v = c • v:= sorry", "formal_proof": null, "informal_stmt": "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$.\n\\begin{proof}\n If $\\operatorname{dim} V=1$, then in fact, $V=\\mathbf{F}$ and it is spanned by $1 \\in \\mathbf{F}$.\nLet $T$ be a linear map from $V$ to itself. Let $T(1)=\\lambda \\in V(=\\mathbf{F})$.\nStep 2\n2 of 3\nEvery $v \\in V$ is a scalar. Therefore,\n$$\n\\begin{aligned}\nT(v) & =T(v \\cdot 1) \\\\\n& =v T(1) \\ldots .(\\text { By the linearity of } T) \\\\\n& =v \\lambda\n\\end{aligned}\n$$\nHence, $T v=\\lambda v$ for every $v \\in V$.\n\\end{proof}", "informal_proof": "$$ \\left(\\frac{-1+\\sqrt{3} i}{2}\\right)^2=\\frac{-1-\\sqrt{3} i}{2}, $$ hence $$ \\left(\\frac{-1+\\sqrt{3} i}{2}\\right)^3=\\frac{-1-\\sqrt{3} i}{2} \\cdot \\frac{-1+\\sqrt{3} i}{2}=1 $$ This means $\\frac{-1+\\sqrt{3} i}{2}$ is a cube root of 1."} -{"name": "Axler_exercise_3_8", "source": "Axler.lean", "header": "import Mathlib\n\nopen Fintype Complex Polynomial LinearMap FiniteDimensional Module Module.End\nopen scoped BigOperators InnerProductSpace\n", "formal_statement": "theorem Axler_exercise_3_8 {F V W : Type*} [AddCommGroup V]\n [AddCommGroup W] [Field F] [Module F V] [Module F W]\n (L : V →ₗ[F] W) :\n ∃ U : Submodule F V, U ⊓ (ker L) = ⊥ ∧\n (range L = range (domRestrict L U)):= sorry", "formal_proof": null, "informal_stmt": "Suppose that $V$ is finite dimensional and that $T \\in \\mathcal{L}(V, W)$. Prove that there exists a subspace $U$ of $V$ such that $U \\cap \\operatorname{null} T=\\{0\\}$ and range $T=\\{T u: u \\in U\\}$.\n\\begin{proof}\n The point here is to note that every subspace of a vector space has a complementary subspace.\nIn this example, $U$ will precisely turn out to be the complementary subspace of null $T$. That is, $V=U \\oplus \\operatorname{null} T$\nHow should we characterize $U$ ? This can be achieved by extending a basis $B_1=\\left\\{v_1, v_2, \\ldots, v_m\\right\\}$ of null $T$ to a basis of $V$. Let $B_2=\\left\\{u_1, u_2, \\ldots, u_n\\right\\}$ be such that $B=B_1 \\cup B_2$ is a basis of $V$.\n\nDefine $U=\\operatorname{span}\\left(B_2\\right)$. Now, since $B_1$ and $B_2$ are complementary subsets of the basis $B$ of $V$, their spans will turn out to be complementary subspaces of $V$. Let's prove that $V=U \\oplus$ null $T$.\n\nLet $v \\in V$. Then, $v$ can be expressed as a linear combination of the vectors in $B$.\nLet $v=a_1 u_1+\\cdots+a_n u_n+c_1 v_1+\\cdots+c_m v_m$. However, since $\\left\\{u_1, u_2, \\ldots, u_n\\right\\}$ is a basis of $U, a_1 u_1+$ $\\cdots+a_n u_n=u \\in U$ and since $\\left\\{v_1, v_2, \\ldots, v_m\\right\\}$ is a basis of null $T, c_1 v_1+\\cdots+c_m v_m=w \\in$ null $T$.\nHence, $v=u+w \\in U+\\operatorname{null} T$. This shows that\n$$\nV=U+\\operatorname{null} T\n$$\nNow, let $v \\in U \\cap \\operatorname{null} T$.\nSince $v \\in U, u$ can be expressed as a linear combination of basis vectors of $U$. Let\n$$\nv=a_1 u_1+\\cdots+a_n u_n\n$$\nSimilarly, since $v \\in \\operatorname{null} T$, it can also be expressed as a linear combination of the basis vectors of null $T$. Let\n$$\nv=c_1 v_1+\\cdots+c_m v_m\n$$\nThe left hand sides of the above two equations are equal. Therefore, we can equate the right hand sides.\n$$\n\\begin{aligned}\n& a_1 u_1+\\cdots+a_n u_n=v=c_1 v_1+\\cdots+c_m v_m \\\\\n& a_1 u_1+\\cdots+a_n u_n-c_1 v_1-\\cdots-c_m v_m=0\n\\end{aligned}\n$$\nWe have found a linear combination of $u_i^{\\prime}$ 's and $v_i$ 's which is equal to zero. However, they are basis vectors of $V$. Hence, all the multipliers $c_i$ 's and $a_i$ 's must be zero implying that $v=0$.\nTherefore, if $v \\in U \\cap$ null $T$, then $v=0$. this means that\n$$\nU \\cap \\operatorname{null} T=\\{0\\}\n$$\nThe above shows that $U$ satisfies the first of the required conditions.\nNow let $w \\in$ range $T$. Then, there exists $v \\in V$ such that $T v=w$. This allows us to write $v=u+w$ where $u \\in U$ and $w \\in$ null $T$. This implies\n$$\n\\begin{aligned}\nw & =T v \\\\\n& =T(u+w) \\\\\n& =T u+T w \\\\\n& =T u+0 \\quad \\quad(\\text { since } w \\in \\operatorname{null} T) \\\\\n& =T u\n\\end{aligned}\n$$\nThis shows that if $w \\in$ range $T$ then $w=T u$ for some $u \\in U$. Therefore, range $T \\subseteq\\{T u \\mid u \\in U\\}$.\nSince $U$ is a subspace of $V$, it follows that $T u \\in$ range $T$ for all $u \\in U$. Thus, $\\{T u \\mid u \\in U\\} \\subseteq$ range $T$.\nTherefore, range $T=\\{T u \\mid u \\in U\\}$.\nThis shows that $U$ satisfies the second required condition as well.\n\\end{proof}", "informal_proof": "$$ \\left(\\frac{-1+\\sqrt{3} i}{2}\\right)^2=\\frac{-1-\\sqrt{3} i}{2}, $$ hence $$ \\left(\\frac{-1+\\sqrt{3} i}{2}\\right)^3=\\frac{-1-\\sqrt{3} i}{2} \\cdot \\frac{-1+\\sqrt{3} i}{2}=1 $$ This means $\\frac{-1+\\sqrt{3} i}{2}$ is a cube root of 1."} -{"name": "Axler_exercise_4_4", "source": "Axler.lean", "header": "import Mathlib\n\nopen Fintype Complex Polynomial LinearMap FiniteDimensional Module Module.End\nopen scoped BigOperators InnerProductSpace\n", "formal_statement": "theorem Axler_exercise_4_4 (p : Polynomial ℂ) :\n p.degree = @card (rootSet p ℂ) (rootSetFintype p ℂ) ↔\n Disjoint\n (@card (rootSet (derivative p) ℂ) (rootSetFintype (derivative p) ℂ))\n (@card (rootSet p ℂ) (rootSetFintype p ℂ)) := sorry", "formal_proof": null, "informal_stmt": "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.\n\\begin{proof}\n 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.\nTo prove that both $p$ and $p^{\\prime}$ have no roots in commons, we must now show that $p^{\\prime}\\left(\\lambda_j\\right) \\neq 0$ for every $j$. So, to do so, just fix $j$. The previous expression for $p$ shows that we can now write $p$ in the form of $p(z)=\\left(z-\\lambda_j\\right) q(z)$, which $q$ is a polynomial such that $q\\left(\\lambda_j\\right) \\neq 0$.\n\nWhen you differentiate both sides of the previous equation, then you would then have $p^{\\prime}(z)=(z-$ $\\left.\\lambda_j\\right) q^{\\prime}(z)+q(z)$\n\nTherefore: $\\left.=p^{\\prime}\\left(\\lambda_j\\right)=q \\lambda_j\\right)$\nEquals: $p^{\\prime}\\left(\\lambda_j\\right) \\neq 0$\n\nNow, to prove the other direction, we would now prove the contrapositive, which means that we will be proving that if $p$ has actually less than $m$ distinct roots, then both $p$ and $p^{\\prime}$ have at least one root in common.\n\nNow, for some root of $\\lambda$ of $p$, we can write $p$ is in the form of $\\left.p(z)=(z-\\lambda)^n q(z)\\right)$, which is where both $n \\geq 2$ and $q$ is a polynomial. When differentiating both sides of the previous equations, we would then have $p^{\\prime}(z)=(z-\\lambda)^n q^{\\prime}(z)+n(z-\\lambda)^{n-1} q(z)$.\nTherefore, $p^{\\prime}(\\lambda)=0$, which would make $\\lambda$ is a common root of both $p$ and $p^{\\prime}$.\n\\end{proof}", "informal_proof": "$$ \\left(\\frac{-1+\\sqrt{3} i}{2}\\right)^2=\\frac{-1-\\sqrt{3} i}{2}, $$ hence $$ \\left(\\frac{-1+\\sqrt{3} i}{2}\\right)^3=\\frac{-1-\\sqrt{3} i}{2} \\cdot \\frac{-1+\\sqrt{3} i}{2}=1 $$ This means $\\frac{-1+\\sqrt{3} i}{2}$ is a cube root of 1."} -{"name": "Axler_exercise_5_1", "source": "Axler.lean", "header": "import Mathlib\n\nopen Fintype Complex Polynomial LinearMap FiniteDimensional Module Module.End\nopen scoped BigOperators InnerProductSpace\n", "formal_statement": "theorem Axler_exercise_5_1 {F V : Type*} [AddCommGroup V] [Field F]\n [Module F V] {L : V →ₗ[F] V} {n : ℕ} (U : Fin n → Submodule F V)\n (hU : ∀ i : Fin n, Submodule.map L (U i) = U i) :\n Submodule.map L (∑ i : Fin n, U i : Submodule F V) =\n (∑ i : Fin n, U i : Submodule F V) := sorry", "formal_proof": null, "informal_stmt": "Suppose $T \\in \\mathcal{L}(V)$. Prove that if $U_{1}, \\ldots, U_{m}$ are subspaces of $V$ invariant under $T$, then $U_{1}+\\cdots+U_{m}$ is invariant under $T$.\n\\begin{proof}\n First off, assume that $U_1, \\ldots, U_m$ are subspaces of $V$ invariant under $T$. Now, consider a vector $u \\in$ $U_1+\\ldots+U_m$. There does exist $u_1 \\in U_1, \\ldots, u_m \\in U_m$ such that $u=u_1+\\ldots+u_m$.\n\nOnce you apply $T$ towards both sides of the previous equation, we would then get $T u=T u_1+\\ldots+$ $T u_m$.\n\nSince each $U_j$ is invariant under $T$, then we would have $T u_1 \\in U_1+\\ldots+T u_m$. This would then make the equation shows that $T u \\in U_1+\\ldots+T u_m$, which does imply that $U_1+. .+U_m$ is invariant under $T$\n\\end{proof}", "informal_proof": "$$ \\left(\\frac{-1+\\sqrt{3} i}{2}\\right)^2=\\frac{-1-\\sqrt{3} i}{2}, $$ hence $$ \\left(\\frac{-1+\\sqrt{3} i}{2}\\right)^3=\\frac{-1-\\sqrt{3} i}{2} \\cdot \\frac{-1+\\sqrt{3} i}{2}=1 $$ This means $\\frac{-1+\\sqrt{3} i}{2}$ is a cube root of 1."} -{"name": "Axler_exercise_5_4", "source": "Axler.lean", "header": "import Mathlib\n\nopen Fintype Complex Polynomial LinearMap FiniteDimensional Module Module.End\nopen scoped BigOperators InnerProductSpace\n", "formal_statement": "theorem Axler_exercise_5_4 {F V : Type*} [AddCommGroup V] [Field F]\n [Module F V] (S T : V →ₗ[F] V) (hST : S ∘ T = T ∘ S) (c : F):\n Submodule.map S (ker (T - c • LinearMap.id)) = ker (T - c • LinearMap.id) := sorry", "formal_proof": null, "informal_stmt": "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}$.\n\\begin{proof}\n 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$.\n\\end{proof}", "informal_proof": "$$ \\left(\\frac{-1+\\sqrt{3} i}{2}\\right)^2=\\frac{-1-\\sqrt{3} i}{2}, $$ hence $$ \\left(\\frac{-1+\\sqrt{3} i}{2}\\right)^3=\\frac{-1-\\sqrt{3} i}{2} \\cdot \\frac{-1+\\sqrt{3} i}{2}=1 $$ This means $\\frac{-1+\\sqrt{3} i}{2}$ is a cube root of 1."} -{"name": "Axler_exercise_5_11", "source": "Axler.lean", "header": "import Mathlib\n\nopen Fintype Complex Polynomial LinearMap FiniteDimensional Module Module.End\nopen scoped BigOperators InnerProductSpace\n", "formal_statement": "theorem Axler_exercise_5_11 {F V : Type*} [AddCommGroup V] [Field F]\n [Module F V] (S T : End F V) :\n (S * T).Eigenvalues = (T * S).Eigenvalues := sorry", "formal_proof": null, "informal_stmt": "Suppose $S, T \\in \\mathcal{L}(V)$. Prove that $S T$ and $T S$ have the same eigenvalues.\n\\begin{proof}\n To start, let $\\lambda \\in F$ be an eigenvalue of $S T$. Now, we would want $\\lambda$ to be an eigenvalue of $T S$. Since $\\lambda$, by itself, is an eigenvalue of $S T$, then there has to be a nonzero vector $v \\in V$ such that $(S T) v=\\lambda v$.\nNow, With a given reference that $(S T) v=\\lambda v$, you will then have the following: $(T S)(T v)=$ $T(S T v)=T(\\lambda v)=\\lambda T v$\nIf $T v \\neq 0$, then the listed equation above shows that $\\lambda$ is an eigenvalue of $T S$.\nIf $T v=0$, then $\\lambda=0$, since $S(T v)=\\lambda T v$. This also means that $T$ isn't invertible, which would imply that $T S$ isn't invertible, which can also be implied that $\\lambda$, which equals 0 , is an eigenvalue of $T S$.\nStep 3\n3 of 3\nNow, regardless of whether $T v=0$ or not, we would have shown that $\\lambda$ is an eigenvalue of $T S$. Since $\\lambda$ (was) an arbitrary eigenvalue of $S T$, we have shown that every single eigenvalue of $S T$ is an eigenvalue of $T S$. When you do reverse the roles of both $S$ and $T$, then we can conclude that that every single eigenvalue of $T S$ is also an eigenvalue of $S T$. Therefore, both $S T$ and $T S$ have the exact same eigenvalues.\n\\end{proof}", "informal_proof": "$$ \\left(\\frac{-1+\\sqrt{3} i}{2}\\right)^2=\\frac{-1-\\sqrt{3} i}{2}, $$ hence $$ \\left(\\frac{-1+\\sqrt{3} i}{2}\\right)^3=\\frac{-1-\\sqrt{3} i}{2} \\cdot \\frac{-1+\\sqrt{3} i}{2}=1 $$ This means $\\frac{-1+\\sqrt{3} i}{2}$ is a cube root of 1."} -{"name": "Axler_exercise_5_12", "source": "Axler.lean", "header": "import Mathlib\n\nopen Fintype Complex Polynomial LinearMap FiniteDimensional Module Module.End\nopen scoped BigOperators InnerProductSpace\n", "formal_statement": "theorem Axler_exercise_5_12 {F V : Type*} [AddCommGroup V] [Field F]\n [Module F V] {S : End F V}\n (hS : ∀ v : V, ∃ c : F, v ∈ eigenspace S c) :\n ∃ c : F, S = c • LinearMap.id := sorry", "formal_proof": null, "informal_stmt": "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.\n\\begin{proof}\n 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$.\n\nNow, to show that $T$ is a scalar multiple of the identity, then me must show that $a_v$ is independent of $v$ for $v \\in V\\{0\\}$. We would now want to show that $a_v=a_w$.\n\nFirst, just make the case of where $(v, w)$ is linearly dependent. Then, there does exist $b \\in F$ such that $w=b v$. Now, you would have the following: $a_W w=T w=T(b v)=b T v=b\\left(a_v v\\right)=a_v w$. This is showing that $a_v=a_w$.\nFinally, make the consideration to make $(v, w)$ be linearly independent. Now, we would have the following: $\\left.a_{(} v+w\\right)(v+w)=T(v+w)=T v+T w=a_v v+a_w w$.\n\nThat previous equation implies the following: $\\left.\\left.\\left(a_{(} v+w\\right)-a_v\\right) v+\\left(a_{(} v+w\\right)-a_w\\right) w=0$. Since $(v, w)$ is linearly independent, this would imply that both $\\left.a_{(} v+w\\right)=a_v$ and $\\left.a_{(} v+w\\right)=a_w$. Therefore, $a_v=a_w$.\n\\end{proof}", "informal_proof": "$$ \\left(\\frac{-1+\\sqrt{3} i}{2}\\right)^2=\\frac{-1-\\sqrt{3} i}{2}, $$ hence $$ \\left(\\frac{-1+\\sqrt{3} i}{2}\\right)^3=\\frac{-1-\\sqrt{3} i}{2} \\cdot \\frac{-1+\\sqrt{3} i}{2}=1 $$ This means $\\frac{-1+\\sqrt{3} i}{2}$ is a cube root of 1."} -{"name": "Axler_exercise_5_13", "source": "Axler.lean", "header": "import Mathlib\n\nopen Fintype Complex Polynomial LinearMap FiniteDimensional Module Module.End\nopen scoped BigOperators InnerProductSpace\n", "formal_statement": "theorem Axler_exercise_5_13 {F V : Type*} [AddCommGroup V] [Field F]\n [Module F V] [FiniteDimensional F V] {T : End F V}\n (hS : ∀ U : Submodule F V, finrank F U = finrank F V - 1 →\n Submodule.map T U = U) : ∃ c : F, T = c • LinearMap.id := sorry", "formal_proof": null, "informal_stmt": "Suppose $T \\in \\mathcal{L}(V)$ is such that every subspace of $V$ with dimension $\\operatorname{dim} V-1$ is invariant under $T$. Prove that $T$ is a scalar multiple of the identity operator.\n\\begin{proof}\n First off, let $T$ isn't a scalar multiple of the identity operator. So, there does exists that $v \\in V$ such that $u$ isn't an eigenvector of $T$. Therefore, $(u, T u)$ is linearly independent.\n\nNext, you should extend $(u, T u)$ to a basis of $\\left(u, T u, v_1, \\ldots, v_n\\right)$ of $V$. So, let $U=\\operatorname{span}\\left(u, v_1, \\ldots, v_n\\right)$. Then, $U$ is a subspace of $V$ and $\\operatorname{dim} U=\\operatorname{dim} V-1$. However, $U$ isn't invariant under $T$ since both $u \\in U$ and $T u \\in U$. This given contradiction to our hypothesis about $T$ actually shows us that our guess that $T$ is not a scalar multiple of the identity must have been false.\n\\end{proof}", "informal_proof": "$$ \\left(\\frac{-1+\\sqrt{3} i}{2}\\right)^2=\\frac{-1-\\sqrt{3} i}{2}, $$ hence $$ \\left(\\frac{-1+\\sqrt{3} i}{2}\\right)^3=\\frac{-1-\\sqrt{3} i}{2} \\cdot \\frac{-1+\\sqrt{3} i}{2}=1 $$ This means $\\frac{-1+\\sqrt{3} i}{2}$ is a cube root of 1."} -{"name": "Axler_exercise_5_20", "source": "Axler.lean", "header": "import Mathlib\n\nopen Fintype Complex Polynomial LinearMap FiniteDimensional Module Module.End\nopen scoped BigOperators InnerProductSpace\n", "formal_statement": "theorem Axler_exercise_5_20 {F V : Type*} [AddCommGroup V] [Field F]\n [Module F V] [FiniteDimensional F V] {S T : End F V}\n (h1 : card (T.Eigenvalues) = finrank F V)\n (h2 : ∀ v : V, ∃ c : F, v ∈ eigenspace S c ↔ ∃ c : F, v ∈ eigenspace T c) :\n S * T = T * S := sorry", "formal_proof": null, "informal_stmt": "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$.\n\\begin{proof}\n 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$.\n\nNow, for every $v_j$ is also an eigenvector of S, so $S v_j=a_j v_j$ for some $a_j \\in F$. For each $j$, we would then have $(S T) v_j=S\\left(T v_j\\right)=\\lambda_j S v_j=a_j \\lambda_j v_j$ and $(T S) v_j=T\\left(S v_j\\right)=a_j T v_j=a_j \\lambda_j v_j$. Since both operators, which are $S T$ and $T S$, agree on a basis, then both are equal.\n\\end{proof}", "informal_proof": "$$ \\left(\\frac{-1+\\sqrt{3} i}{2}\\right)^2=\\frac{-1-\\sqrt{3} i}{2}, $$ hence $$ \\left(\\frac{-1+\\sqrt{3} i}{2}\\right)^3=\\frac{-1-\\sqrt{3} i}{2} \\cdot \\frac{-1+\\sqrt{3} i}{2}=1 $$ This means $\\frac{-1+\\sqrt{3} i}{2}$ is a cube root of 1."} -{"name": "Axler_exercise_5_24", "source": "Axler.lean", "header": "import Mathlib\n\nopen Fintype Complex Polynomial LinearMap FiniteDimensional Module Module.End\nopen scoped BigOperators InnerProductSpace\n", "formal_statement": "theorem Axler_exercise_5_24 {V : Type*} [AddCommGroup V]\n [Module ℝ V] [FiniteDimensional ℝ V] {T : End ℝ V}\n (hT : ∀ c : ℝ, eigenspace T c = ⊥) {U : Submodule ℝ V}\n (hU : Submodule.map T U = U) : Even (finrank U) := sorry", "formal_proof": null, "informal_stmt": "Suppose $V$ is a real vector space and $T \\in \\mathcal{L}(V)$ has no eigenvalues. Prove that every subspace of $V$ invariant under $T$ has even dimension.\n\\begin{proof}\n First off, let us assume that $U$ is a subspace of $V$ that is invariant under $T$. Therefore, $\\left.T\\right|_U \\in \\mathcal{L}(U)$. If $\\operatorname{dim}$ $U$ were odd, then $\\left.T\\right|_U$ would have an eigenvalue $\\lambda \\in \\mathbb{R}$, so there would exist a nonzero vector $u \\in U$ such that\n$$\n\\left.T\\right|_U u=\\lambda u .\n$$\nSo, this would imply that $T_u=\\lambda u$, which would imply that $\\lambda$ is an eigenvalue of $T$. But $T$ has no eigenvalues, so $\\operatorname{dim} U$ must be even.\n\\end{proof}", "informal_proof": "$$ \\left(\\frac{-1+\\sqrt{3} i}{2}\\right)^2=\\frac{-1-\\sqrt{3} i}{2}, $$ hence $$ \\left(\\frac{-1+\\sqrt{3} i}{2}\\right)^3=\\frac{-1-\\sqrt{3} i}{2} \\cdot \\frac{-1+\\sqrt{3} i}{2}=1 $$ This means $\\frac{-1+\\sqrt{3} i}{2}$ is a cube root of 1."} -{"name": "Axler_exercise_6_2", "source": "Axler.lean", "header": "import Mathlib\n\nopen Fintype Complex Polynomial LinearMap FiniteDimensional Module Module.End\nopen scoped BigOperators InnerProductSpace\n", "formal_statement": "theorem Axler_exercise_6_2 {V : Type*} [NormedAddCommGroup V] [Module ℂ V]\n[InnerProductSpace ℂ V] (u v : V) :\n ⟪u, v⟫_ℂ = 0 ↔ ∀ (a : ℂ), ‖u‖ ≤ ‖u + a • v‖ := sorry", "formal_proof": null, "informal_stmt": "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}$.\n\\begin{proof}\n First off, let us suppose that $(u, v)=0$.\nNow, let $a \\in \\mathbb{F}$. Next, $u, a v$ are orthogonal.\nThe Pythagorean theorem thus implies that\n$$\n\\begin{aligned}\n\\|u+a v\\|^2 & =\\|u\\|^2+\\|a v\\|^2 \\\\\n& \\geq\\|u\\|^2\n\\end{aligned}\n$$\nSo, by taking the square roots, this will now give us $\\|u\\| \\leq\\|u+a v\\|$.\nNow, to prove the implication in the other direction, we must now let $\\|u\\| \\leq$ $\\|u+a v\\|$ for all $a \\in \\mathbb{F}$. Squaring this inequality, we get both:\n$$\n\\begin{gathered}\n\\|u\\|^2 a n d \\leq\\|u+a v\\|^2 \\\\\n=(u+a v, u+a v) \\\\\n=(u, u)+(u, a v)+(a v, u)+(a v, a v) \\\\\n=\\|u\\|^2+\\bar{a}(u, v)+a \\overline{(u, v)}+|a|^2\\|v\\|^2 \\\\\n\\|u\\|^2+2 \\Re \\bar{a}(u, v)+|a|^2\\|v\\|^2\n\\end{gathered}\n$$\nfor all $a \\in \\mathbb{F}$.\nTherefore,\n$$\n-2 \\Re \\bar{a}(u, v) \\leq|a|^2\\|v\\|^2\n$$\nfor all $a \\in \\mathbb{F}$. In particular, we can let $a$ equal $-t(u, v)$ for $t>0$. Substituting this value for $a$ into the inequality above gives\n$$\n2 t|(u, v)|^2 \\leq t^2|(u, v)|^2\\|v\\|^2\n$$\nfor all $t>0$.\nStep 4\n4 of 4\nDivide both sides of the inequality above by $t$, getting\n$$\n2|(u, v)|^2 \\leq t \\mid(u, v)^2\\|v\\|^2\n$$\nfor all $t>0$. If $v=0$, then $(u, v)=0$, as desired. If $v \\neq 0$, set $t$ equal to $1 /\\|v\\|^2$ in the inequality above, getting\n$$\n2|(u, v)|^2 \\leq|(u, v)|^2,\n$$\nwhich implies that $(u, v)=0$.\n\\end{proof}", "informal_proof": "$$ \\left(\\frac{-1+\\sqrt{3} i}{2}\\right)^2=\\frac{-1-\\sqrt{3} i}{2}, $$ hence $$ \\left(\\frac{-1+\\sqrt{3} i}{2}\\right)^3=\\frac{-1-\\sqrt{3} i}{2} \\cdot \\frac{-1+\\sqrt{3} i}{2}=1 $$ This means $\\frac{-1+\\sqrt{3} i}{2}$ is a cube root of 1."} -{"name": "Axler_exercise_6_3", "source": "Axler.lean", "header": "import Mathlib\n\nopen Fintype Complex Polynomial LinearMap FiniteDimensional Module Module.End\nopen scoped BigOperators InnerProductSpace\n", "formal_statement": "theorem Axler_exercise_6_3 {n : ℕ} (a b : Fin n → ℝ) :\n (∑ i, a i * b i) ^ 2 ≤ (∑ i : Fin n, i * a i ^ 2) * (∑ i, b i ^ 2 / i) := sorry", "formal_proof": null, "informal_stmt": "Prove that $\\left(\\sum_{j=1}^{n} a_{j} b_{j}\\right)^{2} \\leq\\left(\\sum_{j=1}^{n} j a_{j}{ }^{2}\\right)\\left(\\sum_{j=1}^{n} \\frac{b_{j}{ }^{2}}{j}\\right)$ for all real numbers $a_{1}, \\ldots, a_{n}$ and $b_{1}, \\ldots, b_{n}$.\n\\begin{proof}\n Let $a_1, a_2, \\ldots, a_n, b_1, b_2, \\ldots, b_n \\in R$.\nWe have that\n$$\n\\left(\\sum_{j=1}^n a_j b_j\\right)^2\n$$\nis equal to the\n$$\n\\left(\\sum_{j=1}^n a_j b_j \\frac{\\sqrt{j}}{\\sqrt{j}}\\right)^2=\\left(\\sum_{j=1}^n\\left(\\sqrt{j} a_j\\right)\\left(b_j \\frac{1}{\\sqrt{j}}\\right)\\right)^2\n$$\nThis can be observed as an inner product, and using the Cauchy-Schwarz Inequality, we get\n$$\n\\begin{aligned}\n&\\left(\\sum_{j=1}^n a_j b_j\\right)^2=\\left(\\sum_{j=1}^n\\left(\\sqrt{j} a_j\\right)\\left(b_j \\frac{1}{\\sqrt{j}}\\right)\\right)^2 \\\\\n&=\\left\\langle\\left(a, \\sqrt{2} a_2, \\ldots, \\sqrt{n} a_n\\right),\\left(b_1, \\frac{b_2}{\\sqrt{2}}, \\ldots, \\frac{b_n}{\\sqrt{n}}\\right)\\right\\rangle \\\\\n& \\leq\\left\\|\\left(a, \\sqrt{2} a_2, \\ldots, \\sqrt{n} a_n\\right)\\right\\|^2\\left\\|\\left(b_1, \\frac{b_2}{\\sqrt{2}}, \\ldots, \\frac{b_n}{\\sqrt{n}}\\right)\\right\\|^2 \\\\\n&=\\left(\\sum_{j=1}^n j a_j^2\\right)\\left(\\sum_{j=1}^n \\frac{b_j^2}{j}\\right) \\\\\n& \\text { Hence, }\\left(\\sum_{j=1}^n a_j b_j\\right)^2=\\left(\\sum_{j=1}^n j a_j^2\\right)\\left(\\sum_{j=1}^n \\frac{b_j^2}{j}\\right) .\n\\end{aligned}\n$$\n\\end{proof}", "informal_proof": "$$ \\left(\\frac{-1+\\sqrt{3} i}{2}\\right)^2=\\frac{-1-\\sqrt{3} i}{2}, $$ hence $$ \\left(\\frac{-1+\\sqrt{3} i}{2}\\right)^3=\\frac{-1-\\sqrt{3} i}{2} \\cdot \\frac{-1+\\sqrt{3} i}{2}=1 $$ This means $\\frac{-1+\\sqrt{3} i}{2}$ is a cube root of 1."} -{"name": "Axler_exercise_6_7", "source": "Axler.lean", "header": "import Mathlib\n\nopen Fintype Complex Polynomial LinearMap FiniteDimensional Module Module.End\nopen scoped BigOperators InnerProductSpace\n", "formal_statement": "theorem Axler_exercise_6_7 {V : Type*} [NormedAddCommGroup V] [InnerProductSpace ℂ V] (u v : V) :\n ⟪u, v⟫_ℂ = (‖u + v‖^2 - ‖u - v‖^2 + I*‖u + I•v‖^2 - I*‖u-I•v‖^2) / 4 := sorry", "formal_proof": null, "informal_stmt": "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$.\n\\begin{proof}\nLet $V$ be an inner-product space and $u, v\\in V$. Then \n$$\n\\begin{aligned}\n\\|u+v\\|^2 & =\\langle u+v, v+v\\rangle \\\\\n& =\\|u\\|^2+\\langle u, v\\rangle+\\langle v, u\\rangle+\\|v\\|^2 \\\\\n-\\|u-v\\|^2 & =-\\langle u-v, u-v\\rangle \\\\\n& =-\\|u\\|^2+\\langle u, v\\rangle+\\langle v, u\\rangle-\\|v\\|^2 \\\\\ni\\|u+i v\\|^2 & =i\\langle u+i v, u+i v\\rangle \\\\\n& =i\\|u\\|^2+\\langle u, v\\rangle-\\langle v, u\\rangle+i\\|v\\|^2 \\\\\n-i\\|u-i v\\|^2 & =-i\\langle u-i v, u-i v\\rangle \\\\\n& =-i\\|u\\|^2+\\langle u, v\\rangle-\\langle v, u\\rangle-i\\|v\\|^2 .\n\\end{aligned}\n$$\nThus $\\left(\\|u+v\\|^2\\right)-\\|u-v\\|^2+\\left(i\\|u+i v\\|^2\\right)-i\\|u-i v\\|^2=4\\langle u, v\\rangle.$\n\\end{proof}", "informal_proof": "$$ \\left(\\frac{-1+\\sqrt{3} i}{2}\\right)^2=\\frac{-1-\\sqrt{3} i}{2}, $$ hence $$ \\left(\\frac{-1+\\sqrt{3} i}{2}\\right)^3=\\frac{-1-\\sqrt{3} i}{2} \\cdot \\frac{-1+\\sqrt{3} i}{2}=1 $$ This means $\\frac{-1+\\sqrt{3} i}{2}$ is a cube root of 1."} -{"name": "Axler_exercise_6_13", "source": "Axler.lean", "header": "import Mathlib\n\nopen Fintype Complex Polynomial LinearMap FiniteDimensional Module Module.End\nopen scoped BigOperators InnerProductSpace\n", "formal_statement": "theorem Axler_exercise_6_13 {V : Type*} [NormedAddCommGroup V] [InnerProductSpace ℂ V] {n : ℕ}\n {e : Fin n → V} (he : Orthonormal ℂ e) (v : V) :\n ‖v‖^2 = ∑ i : Fin n, ‖⟪v, e i⟫_ℂ‖^2 ↔ v ∈ Submodule.span ℂ (e '' Set.univ) := sorry", "formal_proof": null, "informal_stmt": "Suppose $\\left(e_{1}, \\ldots, e_{m}\\right)$ is an orthonormal list of vectors in $V$. Let $v \\in V$. Prove that $\\|v\\|^{2}=\\left|\\left\\langle v, e_{1}\\right\\rangle\\right|^{2}+\\cdots+\\left|\\left\\langle v, e_{m}\\right\\rangle\\right|^{2}$ if and only if $v \\in \\operatorname{span}\\left(e_{1}, \\ldots, e_{m}\\right)$.\n\\begin{proof}\nIf $v \\in \\operatorname{span}\\left(e_1, \\ldots, e_m\\right)$, it means that\n$$\nv=\\alpha_1 e_1+\\ldots+\\alpha_m e_m .\n$$\nfor some scalars $\\alpha_i$. We know that $\\alpha_k=\\left\\langle v, e_k\\right\\rangle, \\forall k \\in\\{1, \\ldots, m\\}$. Therefore,\n$$\n\\begin{aligned}\n\\|v\\|^2 & =\\langle v, v\\rangle \\\\\n& =\\left\\langle\\alpha_1 e_1+\\ldots+\\alpha_m e_m, \\alpha_1 e_1+\\ldots+\\alpha_m e_m\\right\\rangle \\\\\n& =\\left|\\alpha_1\\right|^2\\left\\langle e_1, e_1\\right\\rangle+\\ldots+\\left|\\alpha_m\\right|^2\\left\\langle e_m, e_m\\right\\rangle \\\\\n& =\\left|\\alpha_1\\right|^2+\\ldots+\\left|\\alpha_m\\right|^2 \\\\\n& =\\left|\\left\\langle v, e_1\\right\\rangle\\right|^2+\\ldots+\\left|\\left\\langle v, e_m\\right\\rangle\\right|^2 .\n\\end{aligned}\n$$\n$\\Rightarrow$ Assume that $v \\notin \\operatorname{span}\\left(e_1, \\ldots, e_m\\right)$. Then, we must have\n$$\nv=v_{m+1}+\\frac{\\left\\langle v, v_0\\right\\rangle}{\\left\\|v_0\\right\\|^2} v_0,\n$$\nwhere $v_0=\\alpha_1 e_1+\\ldots+\\alpha_m e_m, \\alpha_k=\\left\\langle v, e_k\\right\\rangle, \\forall k \\in\\{1, \\ldots, m\\}$, and $v_{m+1}=v-$ $\\frac{\\left\\langle v, v_0\\right\\rangle}{\\left\\|v_0\\right\\|^2} v_0 \\neq 0$.\n\nWe have $\\left\\langle v_0, v_{m+1}\\right\\rangle=0$ (from which we get $\\left\\langle v, v_0\\right\\rangle=\\left\\langle v_0, v_0\\right\\rangle$ and $\\left\\langle v, v_{m+1}\\right\\rangle=$ $\\left.\\left\\langle v_{m+1}, v_{m+1}\\right\\rangle\\right)$. Now,\n$$\n\\begin{aligned}\n\\|v\\|^2 & =\\langle v, v\\rangle \\\\\n& =\\left\\langle v, v_{m+1}+\\frac{\\left\\langle v, v_0\\right\\rangle}{\\left\\|v_0\\right\\|^2} v_0\\right\\rangle \\\\\n& =\\left\\langle v, v_{m+1}\\right\\rangle+\\left\\langle v, \\frac{\\left\\langle v, v_0\\right\\rangle}{\\left\\|v_0\\right\\|^2} v_0\\right\\rangle \\\\\n& =\\left\\langle v_{m+1}, v_{m+1}\\right\\rangle+\\frac{\\left\\langle v_0, v_0\\right\\rangle}{\\left\\|v_0\\right\\|^2}\\left\\langle v_0, v_0\\right\\rangle \\\\\n& =\\left\\|v_{m+1}\\right\\|^2+\\left\\|v_0\\right\\|^2 \\\\\n& >\\left\\|v_0\\right\\|^2 \\\\\n& =\\left|\\alpha_1\\right|^2+\\ldots+\\left|\\alpha_m\\right|^2 \\\\\n& =\\left|\\left\\langle v, e_1\\right\\rangle\\right|^2+\\ldots+\\left|\\left\\langle v, e_m\\right\\rangle\\right|^2 .\n\\end{aligned}\n$$\nBy contrapositive, if $\\left\\|v_1\\right\\|^2=\\left|\\left\\langle v, e_1\\right\\rangle\\right|^2+\\ldots+\\left|\\left\\langle v, e_m\\right\\rangle\\right|^2$, then $v \\in \\operatorname{span}\\left(e_1, \\ldots, e_m\\right)$.\n\\end{proof}", "informal_proof": "$$ \\left(\\frac{-1+\\sqrt{3} i}{2}\\right)^2=\\frac{-1-\\sqrt{3} i}{2}, $$ hence $$ \\left(\\frac{-1+\\sqrt{3} i}{2}\\right)^3=\\frac{-1-\\sqrt{3} i}{2} \\cdot \\frac{-1+\\sqrt{3} i}{2}=1 $$ This means $\\frac{-1+\\sqrt{3} i}{2}$ is a cube root of 1."} -{"name": "Axler_exercise_6_16", "source": "Axler.lean", "header": "import Mathlib\n\nopen Fintype Complex Polynomial LinearMap FiniteDimensional Module Module.End\nopen scoped BigOperators InnerProductSpace\n", "formal_statement": "theorem Axler_exercise_6_16 {K V : Type*} [RCLike K] [NormedAddCommGroup V] [InnerProductSpace K V]\n {U : Submodule K V} :\n U.orthogonal = ⊥ ↔ U = ⊤ := sorry", "formal_proof": null, "informal_stmt": "Suppose $U$ is a subspace of $V$. Prove that $U^{\\perp}=\\{0\\}$ if and only if $U=V$\n\\begin{proof}\n $V=U \\bigoplus U^{\\perp}$, therefore $U^\\perp = \\{0\\}$ iff $U=V$. \n\\end{proof}", "informal_proof": "$$ \\left(\\frac{-1+\\sqrt{3} i}{2}\\right)^2=\\frac{-1-\\sqrt{3} i}{2}, $$ hence $$ \\left(\\frac{-1+\\sqrt{3} i}{2}\\right)^3=\\frac{-1-\\sqrt{3} i}{2} \\cdot \\frac{-1+\\sqrt{3} i}{2}=1 $$ This means $\\frac{-1+\\sqrt{3} i}{2}$ is a cube root of 1."} -{"name": "Axler_exercise_7_5", "source": "Axler.lean", "header": "import Mathlib\n\nopen Fintype Complex Polynomial LinearMap FiniteDimensional Module Module.End\nopen scoped BigOperators InnerProductSpace\n", "formal_statement": "theorem Axler_exercise_7_5 {V : Type*} [NormedAddCommGroup V] [InnerProductSpace ℂ V]\n [FiniteDimensional ℂ V] (hV : finrank V ≥ 2) :\n ∀ U : Submodule ℂ (End ℂ V), U.carrier ≠\n {T | T * adjoint T = adjoint T * T} := sorry", "formal_proof": null, "informal_stmt": "Show that if $\\operatorname{dim} V \\geq 2$, then the set of normal operators on $V$ is not a subspace of $\\mathcal{L}(V)$.\n\\begin{proof}\n First off, suppose that $\\operatorname{dim} V \\geq 2$. Next let $\\left(e_1, \\ldots, e_n\\right)$ be an orthonormal basis of $V$. Now, define $S, T \\in L(V)$ by both $S\\left(a_1 e_1+\\ldots+a_n e_n\\right)=a_2 e_1-a_1 e_2$ and $T\\left(a_1 e_1+\\ldots+\\right.$ $\\left.a_n e_n\\right)=a_2 e_1+a_1 e_2$. So, just by now doing a simple calculation verifies that $S^*\\left(a_1 e_1+\\right.$ $\\left.\\ldots+a_n e_n\\right)=-a_2 e_1+a_1 e_2$\n\nNow, based on this formula, another calculation would show that $S S^*=S^* S$. Another simple calculation would that that $T$ is self-adjoint. Therefore, both $S$ and $T$ are normal. However, $S+T$ is given by the formula of $(S+T)\\left(a_1 e_1+\\ldots+a_n e_n\\right)=2 a_2 e_1$. In this case, a simple calculator verifies that $(S+T)^*\\left(a_1 e_1+\\ldots+a_n e_n\\right)=2 a_1 e_2$.\n\nTherefore, there is a final simple calculation that shows that $(S+T)(S+T)^* \\neq(S+$ $T)^*(S+T)$. So, in other words, $S+T$ isn't normal. Therefore, the set of normal operators on $V$ isn't closed under addition and hence isn't a subspace of $L(V)$.\n\\end{proof}", "informal_proof": "$$ \\left(\\frac{-1+\\sqrt{3} i}{2}\\right)^2=\\frac{-1-\\sqrt{3} i}{2}, $$ hence $$ \\left(\\frac{-1+\\sqrt{3} i}{2}\\right)^3=\\frac{-1-\\sqrt{3} i}{2} \\cdot \\frac{-1+\\sqrt{3} i}{2}=1 $$ This means $\\frac{-1+\\sqrt{3} i}{2}$ is a cube root of 1."} -{"name": "Axler_exercise_7_6", "source": "Axler.lean", "header": "import Mathlib\n\nopen Fintype Complex Polynomial LinearMap FiniteDimensional Module Module.End\nopen scoped BigOperators InnerProductSpace\n", "formal_statement": "theorem Axler_exercise_7_6 {V : Type*} [NormedAddCommGroup V] [InnerProductSpace ℂ V]\n [FiniteDimensional ℂ V] (T : End ℂ V)\n (hT : T * adjoint T = adjoint T * T) :\n range T = range (adjoint T) := sorry", "formal_proof": null, "informal_stmt": "Prove that if $T \\in \\mathcal{L}(V)$ is normal, then $\\operatorname{range} T=\\operatorname{range} T^{*}.$\n\\begin{proof}\n Let $T \\in \\mathcal{L}(V)$ to be a normal operator.\nSuppose $u \\in \\operatorname{null} T$. Then, by $7.20$,\n$$\n0=\\|T u\\|=\\left\\|T^* u\\right\\|,\n$$\nwhich implies that $u \\in \\operatorname{null} T^*$.\nHence\n$$\n\\operatorname{null} T=\\operatorname{null} T^*\n$$\nbecause $\\left(T^*\\right)^*=T$ and the same argument can be repeated.\nNow we have\n$$\n\\begin{aligned}\n\\text { range } T & =\\left(\\text { null } T^*\\right)^{\\perp} \\\\\n& =(\\text { null } T)^{\\perp} \\\\\n& =\\operatorname{range} T^*,\n\\end{aligned}\n$$\nwhere the first and last equality follow from items (d) and (b) of 7.7.\nHence, range $T=$ range $T^*$.\n\\end{proof}", "informal_proof": "$$ \\left(\\frac{-1+\\sqrt{3} i}{2}\\right)^2=\\frac{-1-\\sqrt{3} i}{2}, $$ hence $$ \\left(\\frac{-1+\\sqrt{3} i}{2}\\right)^3=\\frac{-1-\\sqrt{3} i}{2} \\cdot \\frac{-1+\\sqrt{3} i}{2}=1 $$ This means $\\frac{-1+\\sqrt{3} i}{2}$ is a cube root of 1."} -{"name": "Axler_exercise_7_9", "source": "Axler.lean", "header": "import Mathlib\n\nopen Fintype Complex Polynomial LinearMap FiniteDimensional Module Module.End\nopen scoped BigOperators InnerProductSpace\n", "formal_statement": "theorem Axler_exercise_7_9 {V : Type*} [NormedAddCommGroup V] [InnerProductSpace ℂ V]\n [FiniteDimensional ℂ V] (T : End ℂ V)\n (hT : T * adjoint T = adjoint T * T) :\n IsSelfAdjoint T ↔ ∀ e : T.Eigenvalues, (e : ℂ).im = 0 := sorry", "formal_proof": null, "informal_stmt": "Prove that a normal operator on a complex inner-product space is self-adjoint if and only if all its eigenvalues are real.\n\\begin{proof}\n First off, suppose $V$ is a complex inner product space and $T \\in L(V)$ is normal. If $T$ is self-adjoint, then all its eigenvalues are real. So, conversely, let all of the eigenvalues of $T$ be real. By the complex spectral theorem, there's an orthonormal basis $\\left(e_1, \\ldots, e_n\\right)$ of $V$ consisting of eigenvectors of $T$. Thus, there exists real numbers $\\lambda_1, \\ldots, \\lambda_n$ such that $T e_j=\\lambda_j e_j$ for $j=$ $1, \\ldots, n$.\nThe matrix of $T$ with respect to the basis of $\\left(e_1, \\ldots, e_n\\right)$ is the diagonal matrix with $\\lambda_1, \\ldots, \\lambda_n$ on the diagonal. So, the matrix equals its conjugate transpose. Therefore, $T=T^*$. In other words, $T$ s self-adjoint.\n\\end{proof}", "informal_proof": "$$ \\left(\\frac{-1+\\sqrt{3} i}{2}\\right)^2=\\frac{-1-\\sqrt{3} i}{2}, $$ hence $$ \\left(\\frac{-1+\\sqrt{3} i}{2}\\right)^3=\\frac{-1-\\sqrt{3} i}{2} \\cdot \\frac{-1+\\sqrt{3} i}{2}=1 $$ This means $\\frac{-1+\\sqrt{3} i}{2}$ is a cube root of 1."} -{"name": "Axler_exercise_7_10", "source": "Axler.lean", "header": "import Mathlib\n\nopen Fintype Complex Polynomial LinearMap FiniteDimensional Module Module.End\nopen scoped BigOperators InnerProductSpace\n", "formal_statement": "theorem Axler_exercise_7_10 {V : Type*} [NormedAddCommGroup V] [InnerProductSpace ℂ V]\n [FiniteDimensional ℂ V] (T : End ℂ V)\n (hT : T * adjoint T = adjoint T * T) (hT1 : T^9 = T^8) :\n IsSelfAdjoint T ∧ T^2 = T := sorry", "formal_proof": null, "informal_stmt": "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$.\n\\begin{proof}\n 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,\n$$\nT e_1=\\lambda_j e_j\n$$\nfor $j=1 \\ldots n$.\n\nNext, by applying $T$ repeatedly to both sides of the equation above, we get $T^9 e_j=\\left(\\lambda_j\\right)^9 e_j$ and rei =8ej. Thus $T^8 e_j=\\left(\\lambda_j\\right)^8 e_j$, which implies that $\\lambda_j$ equals 0 or 1 . In particular, all the eigenvalues of $T$ are real. This would then imply that $T$ is self-adjoint.\n\nNow, by applying $T$ to both sides of the equation above, we get\n$$\n\\begin{aligned}\nT^2 e_j & =\\left(\\lambda_j\\right)^2 e_j \\\\\n& =\\lambda_j e_j \\\\\n& =T e_j\n\\end{aligned}\n$$\nwhich is where the second equality holds because $\\lambda_j$ equals 0 or 1 . Because $T^2$ and $T$ agree on a basis, they must be equal.\n\\end{proof}", "informal_proof": "$$ \\left(\\frac{-1+\\sqrt{3} i}{2}\\right)^2=\\frac{-1-\\sqrt{3} i}{2}, $$ hence $$ \\left(\\frac{-1+\\sqrt{3} i}{2}\\right)^3=\\frac{-1-\\sqrt{3} i}{2} \\cdot \\frac{-1+\\sqrt{3} i}{2}=1 $$ This means $\\frac{-1+\\sqrt{3} i}{2}$ is a cube root of 1."} -{"name": "Axler_exercise_7_11", "source": "Axler.lean", "header": "import Mathlib\n\nopen Fintype Complex Polynomial LinearMap FiniteDimensional Module Module.End\nopen scoped BigOperators InnerProductSpace\n", "formal_statement": "theorem Axler_exercise_7_11 {V : Type*} [NormedAddCommGroup V] [InnerProductSpace ℂ V]\n [FiniteDimensional ℂ V] {T : End ℂ V} (hT : T*adjoint T = adjoint T*T) :\n ∃ (S : End ℂ V), S ^ 2 = T := sorry", "formal_proof": null, "informal_stmt": "Suppose $V$ is a complex inner-product space. Prove that every normal operator on $V$ has a square root. (An operator $S \\in \\mathcal{L}(V)$ is called a square root of $T \\in \\mathcal{L}(V)$ if $S^{2}=T$.)\n\\begin{proof}\n Let $V$ be a complex inner product space.\nIt is known that an operator $S \\in \\mathcal{L}(V)$ is called a square root of $T \\in \\mathcal{L}(V)$ if\n$$\nS^2=T\n$$\nNow, suppose that $T$ is a normal operator on $V$.\nBy the Complex Spectral Theorem, there is $e_1, \\ldots, e_n$ an orthonormal basis of $V$ consisting of eigenvalues of $T$ and let $\\lambda_1, \\ldots, \\lambda_n$ denote their corresponding eigenvalues.\nDefine $S$ by\n$$\nS e_j=\\sqrt{\\lambda_j} e_j,\n$$\nfor each $j=1, \\ldots, n$.\nObviously, $S^2 e_j=\\lambda_j e_j=T e_j$.\nHence, $S^2=T$ so there exist a square root of $T$.\n\\end{proof}", "informal_proof": "$$ \\left(\\frac{-1+\\sqrt{3} i}{2}\\right)^2=\\frac{-1-\\sqrt{3} i}{2}, $$ hence $$ \\left(\\frac{-1+\\sqrt{3} i}{2}\\right)^3=\\frac{-1-\\sqrt{3} i}{2} \\cdot \\frac{-1+\\sqrt{3} i}{2}=1 $$ This means $\\frac{-1+\\sqrt{3} i}{2}$ is a cube root of 1."} -{"name": "Axler_exercise_7_14", "source": "Axler.lean", "header": "import Mathlib\n\nopen Fintype Complex Polynomial LinearMap FiniteDimensional Module Module.End\nopen scoped BigOperators InnerProductSpace\n", "formal_statement": "theorem Axler_exercise_7_14 {𝕜 V : Type*} [RCLike 𝕜] [NormedAddCommGroup V]\n [InnerProductSpace 𝕜 V] [FiniteDimensional 𝕜 V]\n {T : End 𝕜 V} (hT : IsSelfAdjoint T)\n {l : 𝕜} {ε : ℝ} (he : ε > 0) : ∃ v : V, ‖v‖= 1 ∧ (‖T v - l • v‖ < ε →\n (∃ l' : T.Eigenvalues, ‖l - l'‖ < ε)) := sorry", "formal_proof": null, "informal_stmt": "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$.\n\\begin{proof}\n Let $T \\in \\mathcal{L}(V)$ be a self-adjoint, and let $\\lambda \\in \\mathbf{F}$ and $\\epsilon>0$.\nBy 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.\nChoose an eigenvalue $\\lambda^{\\prime}$ of $T$ such that $\\left|\\lambda^{\\prime}-\\lambda\\right|^2$ is minimized.\nThere are $a_1, \\ldots, a_n \\in \\mathbb{F}$ such that\n$$\nv=a_1 e_1+\\cdots+a_n e_n .\n$$\nThus, we have\n$$\n\\begin{aligned}\n\\epsilon^2 & >|| T v-\\left.\\lambda v\\right|^2 \\\\\n& =\\left|\\left\\langle T v-\\lambda v, e_1\\right\\rangle\\right|^2+\\cdots+\\left|\\left\\langle T v-\\lambda v, e_n\\right\\rangle\\right|^2 \\\\\n& =\\left|\\lambda_1 a_1-\\lambda a_1\\right|^2+\\cdots+\\left|\\lambda_n a_n-\\lambda a_n\\right|^2 \\\\\n& =\\left|a_1\\right|^2\\left|\\lambda_1-\\lambda\\right|^2+\\cdots+\\left|a_n\\right|^2\\left|\\lambda_n-\\lambda\\right|^2 \\\\\n& \\geq\\left|a_1\\right|^2\\left|\\lambda^{\\prime}-\\lambda\\right|^2+\\cdots+\\left|a_n\\right|^2\\left|\\lambda^{\\prime}-\\lambda\\right|^2 \\\\\n& =\\left|\\lambda^{\\prime}-\\lambda\\right|^2\n\\end{aligned}\n$$\nwhere the second and fifth lines follow from $6.30$ (the fifth because $\\|v\\|=1$ ). Now, we taking the square root.\nHence, $T$ has an eigenvalue $\\lambda^{\\prime}$ such that $\\left|\\lambda^{\\prime}-\\lambda\\right|<\\epsilon$\n\\end{proof}\n\n\n\n\\end{document}", "informal_proof": "$$ \\left(\\frac{-1+\\sqrt{3} i}{2}\\right)^2=\\frac{-1-\\sqrt{3} i}{2}, $$ hence $$ \\left(\\frac{-1+\\sqrt{3} i}{2}\\right)^3=\\frac{-1-\\sqrt{3} i}{2} \\cdot \\frac{-1+\\sqrt{3} i}{2}=1 $$ This means $\\frac{-1+\\sqrt{3} i}{2}$ is a cube root of 1."} {"name": "Dummit_Foote_exercise_1_1_2a", "source": "Dummit-Foote.lean", "header": "import Mathlib\n\nopen Fintype Subgroup Set Polynomial Ideal\nopen scoped BigOperators\nnoncomputable section\n", "formal_statement": "theorem Dummit_Foote_exercise_1_1_2a : ∃ a b : ℤ, a - b ≠ b - a := sorry", "formal_proof": null, "informal_stmt": "Prove the the operation $\\star$ on $\\mathbb{Z}$ defined by $a\\star b=a-b$ is not commutative.\n\\begin{proof}\n Not commutative since\n$$\n1 \\star(-1)=1-(-1)=2\n$$\n$$\n(-1) \\star 1=-1-1=-2 .\n$$\n\\end{proof}", "informal_proof": "Not commutative since $$ 1 \\star(-1)=1-(-1)=2 $$ $$ (-1) \\star 1=-1-1=-2 . $$"} {"name": "Dummit_Foote_exercise_1_1_3", "source": "Dummit-Foote.lean", "header": "import Mathlib\n\nopen Fintype Subgroup Set Polynomial Ideal\nopen scoped BigOperators\nnoncomputable section\n", "formal_statement": "theorem Dummit_Foote_exercise_1_1_3 (n : ℤ) :\n ∀ (a b c : ℤ), (a+b)+c ≡ a+(b+c) [ZMOD n] := sorry", "formal_proof": null, "informal_stmt": "Prove that the addition of residue classes $\\mathbb{Z}/n\\mathbb{Z}$ is associative.\n\\begin{proof}\n We have\n$$\n\\begin{aligned}\n(\\bar{a}+\\bar{b})+\\bar{c} &=\\overline{a+b}+\\bar{c} \\\\\n&=\\overline{(a+b)+c} \\\\\n&=\\overline{a+(b+c)} \\\\\n&=\\bar{a}+\\overline{b+c} \\\\\n&=\\bar{a}+(\\bar{b}+\\bar{c})\n\\end{aligned}\n$$\nsince integer addition is associative.\n\\end{proof}", "informal_proof": "Not commutative since $$ 1 \\star(-1)=1-(-1)=2 $$ $$ (-1) \\star 1=-1-1=-2 . $$"} {"name": "Dummit_Foote_exercise_1_1_4", "source": "Dummit-Foote.lean", "header": "import Mathlib\n\nopen Fintype Subgroup Set Polynomial Ideal\nopen scoped BigOperators\nnoncomputable section\n", "formal_statement": "theorem Dummit_Foote_exercise_1_1_4 (n : ℕ) :\n ∀ (a b c : ℕ), (a * b) * c ≡ a * (b * c) [ZMOD n] := sorry", "formal_proof": null, "informal_stmt": "Prove that the multiplication of residue class $\\mathbb{Z}/n\\mathbb{Z}$ is associative.\n\\begin{proof}\n We have\n$$\n\\begin{aligned}\n(\\bar{a} \\cdot \\bar{b}) \\cdot \\bar{c} &=\\overline{a \\cdot b} \\cdot \\bar{c} \\\\\n&=\\overline{(a \\cdot b) \\cdot c} \\\\\n&=\\overline{a \\cdot(b \\cdot c)} \\\\\n&=\\bar{a} \\cdot \\overline{b \\cdot c} \\\\\n&=\\bar{a} \\cdot(\\bar{b} \\cdot \\bar{c})\n\\end{aligned}\n$$\nsince integer multiplication is associative.\n\\end{proof}", "informal_proof": "Not commutative since $$ 1 \\star(-1)=1-(-1)=2 $$ $$ (-1) \\star 1=-1-1=-2 . $$"} @@ -190,76 +313,37 @@ {"name": "Dummit_Foote_exercise_9_4_9", "source": "Dummit-Foote.lean", "header": "import Mathlib\n\nopen Fintype Subgroup Set Polynomial Ideal\nopen scoped BigOperators\nnoncomputable section\n", "formal_statement": "theorem Dummit_Foote_exercise_9_4_9 :\n Irreducible (X^2 - C Zsqrtd.sqrtd : Polynomial (Zsqrtd 2)) := sorry", "formal_proof": null, "informal_stmt": "Prove that the polynomial $x^{2}-\\sqrt{2}$ is irreducible over $\\mathbb{Z}[\\sqrt{2}]$. You may assume that $\\mathbb{Z}[\\sqrt{2}]$ is a U.F.D.\n\\begin{proof}\n$Z[\\sqrt{2}]$ is an Euclidean domain, and so a unique factorization domain.\nWe have to prove $p(x)=x^2-\\sqrt{2}$ irreducible.\nSuppose to the contrary.\nif $p(x)$ is reducible then it must have root.\nLet $a+b \\sqrt{2}$ be a root of $x^2-\\sqrt{2}$.\nNow we have\n$$\na^2+2 b^2+2 a b \\sqrt{2}=\\sqrt{2}\n$$\nBy comparing the coefficients we get $2 a b=1$ for some pair of integers $a$ and $b$, a contradiction.\nSo $p(x)$ is irredicible over $Z[\\sqrt{2}]$.\n\\end{proof}", "informal_proof": "Not commutative since $$ 1 \\star(-1)=1-(-1)=2 $$ $$ (-1) \\star 1=-1-1=-2 . $$"} {"name": "Dummit_Foote_exercise_9_4_11", "source": "Dummit-Foote.lean", "header": "import Mathlib\n\nopen Fintype Subgroup Set Polynomial Ideal\nopen scoped BigOperators\nnoncomputable section\n", "formal_statement": "theorem Dummit_Foote_exercise_9_4_11 :\n Irreducible ((MvPolynomial.X 0)^2 + (MvPolynomial.X 1)^2 - 1 : MvPolynomial (Fin 2) ℚ) := sorry", "formal_proof": null, "informal_stmt": "Prove that $x^2+y^2-1$ is irreducible in $\\mathbb{Q}[x,y]$.\n\\begin{proof}\n$$\np(x)=x^2+y^2-1 \\in Q[y][x] \\cong Q[y, x]\n$$\nWe have that $y+1 \\in Q[y]$ is prime and $Q[y]$ is an UFD, since $p(x)=x^2+y^2-1=x^2+$ $(y+1)(y-1)$ by the Eisenstein's Criterion $x^2+y^2-1$ is irreducibile in $Q[x, y]$.\n\\end{proof}", "informal_proof": "Not commutative since $$ 1 \\star(-1)=1-(-1)=2 $$ $$ (-1) \\star 1=-1-1=-2 . $$"} {"name": "Dummit_Foote_exercise_11_1_13", "source": "Dummit-Foote.lean", "header": "import Mathlib\n\nopen Fintype Subgroup Set Polynomial Ideal\nopen scoped BigOperators\nnoncomputable section\n", "formal_statement": "instance Dummit_Foote_exercise_11_1_13 {ι : Type*} [Fintype ι] :\n (ι → ℝ) ≃ₗ[ℚ] ℝ := sorry", "formal_proof": null, "informal_stmt": "Prove that as vector spaces over $\\mathbb{Q}, \\mathbb{R}^n \\cong \\mathbb{R}$, for all $n \\in \\mathbb{Z}^{+}$.\n\\begin{proof} \nSince $B$ is a basis of $V$, every element of $V$ can be written uniquely as a finite linear combination of elements of $B$. Let $X$ be the set of all such finite linear combinations. Then $X$ has the same cardinality as $V$, since the map from $X$ to $V$ that takes each linear combination to the corresponding element of $V$ is a bijection.\n\nWe will show that $X$ has the same cardinality as $B$. Since $B$ is countable and $X$ is a union of countable sets, it suffices to show that each set $X_n$, consisting of all finite linear combinations of $n$ elements of $B$, is countable.\n\nLet $P_n(X)$ be the set of all subsets of $X$ with cardinality $n$. Then we have $X_n \\subseteq P_n(B)$. Since $B$ is countable, we have $\\mathrm{card}(P_n(B)) \\leq \\mathrm{card}(B^n) = \\mathrm{card}(B)$, where $B^n$ is the Cartesian product of $n$ copies of $B$.\n\nThus, we have $\\mathrm{card}(X_n) \\leq \\mathrm{card}(P_n(B)) \\leq \\mathrm{card}(B)$, so $X_n$ is countable. It follows that $X$ is countable, and hence has the same cardinality as $B$.\n\nTherefore, we have shown that the cardinality of $V$ is equal to the cardinality of $B$. Since $F$ is countable, it follows that the cardinality of $V$ is countable as well.\n\nNow let $Q$ be a countable field, and let $R$ be a vector space over $Q$. Let $n$ be a positive integer. Then any basis of $R^n$ over $Q$ has the same cardinality as $R^n$, which is countable. Since $R$ is a direct sum of $n$ copies of $R^n$, it follows that any basis of $R$ over $Q$ has the same cardinality as $R$. Hence, the cardinality of $R$ is countable.\n\nFinally, since $R$ is a countable vector space and $Q$ is a countable field, it follows that $R$ and $Q^{\\oplus \\mathrm{card}(R)}$ are isomorphic as additive abelian groups. Therefore, we have $R \\cong_Q Q^{\\oplus \\mathrm{card}(R)}$, and in particular $R \\cong_Q R^n$ for any positive integer $n$.\n\\end{proof}\n\n\n\n\n\\end{document}", "informal_proof": "Not commutative since $$ 1 \\star(-1)=1-(-1)=2 $$ $$ (-1) \\star 1=-1-1=-2 . $$"} -{"name": "Rudin_exercise_1_1a", "source": "Rudin.lean", "header": "import Mathlib\n\nopen Topology Filter Real Complex TopologicalSpace Finset\nopen scoped BigOperators\nnoncomputable section\n", "formal_statement": "theorem Rudin_exercise_1_1a\n (x : ℝ) (y : ℚ) :\n ( Irrational x ) -> Irrational ( x + y ) := sorry", "formal_proof": null, "informal_stmt": "If $r$ is rational $(r \\neq 0)$ and $x$ is irrational, prove that $r+x$ is irrational.\n\\begin{proof}\n If $r$ and $r+x$ were both rational, then $x=r+x-r$ would also be rational.\n\\end{proof}", "informal_proof": "If $r$ and $r+x$ were both rational, then $x=r+x-r$ would also be rational."} -{"name": "Rudin_exercise_1_1b", "source": "Rudin.lean", "header": "import Mathlib\n\nopen Topology Filter Real Complex TopologicalSpace Finset\nopen scoped BigOperators\nnoncomputable section\n", "formal_statement": "theorem Rudin_exercise_1_1b\n(x : ℝ)\n(y : ℚ)\n(h : y ≠ 0)\n: ( Irrational x ) -> Irrational ( x * y ) := sorry", "formal_proof": null, "informal_stmt": "If $r$ is rational $(r \\neq 0)$ and $x$ is irrational, prove that $rx$ is irrational.\n\\begin{proof}\n If $r x$ were rational, then $x=\\frac{r x}{r}$ would also be rational.\n\\end{proof}", "informal_proof": "If $r$ and $r+x$ were both rational, then $x=r+x-r$ would also be rational."} -{"name": "Rudin_exercise_1_2", "source": "Rudin.lean", "header": "import Mathlib\n\nopen Topology Filter Real Complex TopologicalSpace Finset\nopen scoped BigOperators\nnoncomputable section\n", "formal_statement": "theorem Rudin_exercise_1_2 : ¬ ∃ (x : ℚ), ( x ^ 2 = 12 ) := sorry", "formal_proof": null, "informal_stmt": "Prove that there is no rational number whose square is $12$.\n\\begin{proof}\n 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\n$$\n4 s^2+4 s+1=3\\left(4 t^2+4 t+1\\right)=12 t^2+12 t+3,\n$$\nso that\n$$\n4\\left(s^2+s-3 t^2-3 t\\right)=2 .\n$$\nBut this is absurd, since 2 cannot be a multiple of 4 .\n\\end{proof}", "informal_proof": "If $r$ and $r+x$ were both rational, then $x=r+x-r$ would also be rational."} -{"name": "Rudin_exercise_1_4", "source": "Rudin.lean", "header": "import Mathlib\n\nopen Topology Filter Real Complex TopologicalSpace Finset\nopen scoped BigOperators\nnoncomputable section\n", "formal_statement": "theorem Rudin_exercise_1_4\n(α : Type*) [PartialOrder α]\n(s : Set α)\n(x y : α)\n(h₀ : Set.Nonempty s)\n(h₁ : x ∈ lowerBounds s)\n(h₂ : y ∈ upperBounds s)\n: x ≤ y := sorry", "formal_proof": null, "informal_stmt": "Let $E$ be a nonempty subset of an ordered set; suppose $\\alpha$ is a lower bound of $E$ and $\\beta$ is an upper bound of $E$. Prove that $\\alpha \\leq \\beta$.\n\\begin{proof}\nSince $E$ is nonempty, there exists $x \\in E$. Then by definition of lower and upper bounds we have $\\alpha \\leq x \\leq \\beta$, and hence by property $i i$ in the definition of an ordering, we have $\\alpha<\\beta$ unless $\\alpha=x=\\beta$.\n\\end{proof}", "informal_proof": "If $r$ and $r+x$ were both rational, then $x=r+x-r$ would also be rational."} -{"name": "Rudin_exercise_1_5", "source": "Rudin.lean", "header": "import Mathlib\n\nopen Topology Filter Real Complex TopologicalSpace Finset\nopen scoped BigOperators\nnoncomputable section\n", "formal_statement": "theorem Rudin_exercise_1_5 (A minus_A : Set ℝ) (hA : A.Nonempty)\n (hA_bdd_below : BddBelow A) (hminus_A : minus_A = {x | -x ∈ A}) :\n Min A = Max minus_A := sorry", "formal_proof": null, "informal_stmt": "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)$.\n\\begin{proof}\n 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$.\n\nSuppose $x \\in A$. Then, $-x \\in-A$, and, hence $-x \\leq \\sup (-A)$. It follows that $x \\geq-\\sup (-A)$, i.e., $\\alpha \\leq x$. Thus $\\alpha$ is a lower bound of $A$.\n\nNow let $\\beta$ be any lower bound of $A$. This means $\\beta \\leq x$ for all $x$ in $A$. Hence $-x \\leq-\\beta$ for all $x \\in A$, which says $y \\leq-\\beta$ for all $y \\in-A$. This means $-\\beta$ is an upper bound of $-A$. Hence $-\\beta \\geq \\sup (-A)$ by definition of sup, i.e., $\\beta \\leq-\\sup (-A)$, and so $-\\sup (-A)$ is the greatest lower bound of $A$.\n\\end{proof}", "informal_proof": "If $r$ and $r+x$ were both rational, then $x=r+x-r$ would also be rational."} -{"name": "Rudin_exercise_1_8", "source": "Rudin.lean", "header": "import Mathlib\n\nopen Topology Filter Real Complex TopologicalSpace Finset\nopen scoped BigOperators\nnoncomputable section\n", "formal_statement": "theorem Rudin_exercise_1_8 : ¬ ∃ (r : ℂ → ℂ → Prop), IsLinearOrder ℂ r := sorry", "formal_proof": null, "informal_stmt": "Prove that no order can be defined in the complex field that turns it into an ordered field.\n\\begin{proof}\n By Part (a) of Proposition $1.18$, either $i$ or $-i$ must be positive. Hence $-1=i^2=(-i)^2$ must be positive. But then $1=(-1)^2$, must also be positive, and this contradicts Part $(a)$ of Proposition 1.18, since 1 and $-1$ cannot both be positive.\n\\end{proof}", "informal_proof": "If $r$ and $r+x$ were both rational, then $x=r+x-r$ would also be rational."} -{"name": "Rudin_exercise_1_11a", "source": "Rudin.lean", "header": "import Mathlib\n\nopen Topology Filter Real Complex TopologicalSpace Finset\nopen scoped BigOperators\nnoncomputable section\n", "formal_statement": "theorem Rudin_exercise_1_11a (z : ℂ) :\n ∃ (r : ℝ) (w : ℂ), norm w = 1 ∧ z = r * w := sorry", "formal_proof": null, "informal_stmt": "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$.\n\\begin{proof}\n 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$\n\\end{proof}", "informal_proof": "If $r$ and $r+x$ were both rational, then $x=r+x-r$ would also be rational."} -{"name": "Rudin_exercise_1_12", "source": "Rudin.lean", "header": "import Mathlib\n\nopen Topology Filter Real Complex TopologicalSpace Finset\nopen scoped BigOperators\nnoncomputable section\n", "formal_statement": "theorem Rudin_exercise_1_12 (n : ℕ) (f : ℕ → ℂ) :\n norm (∑ i ∈ range n, f i) ≤ ∑ i ∈ range n, norm (f i) := sorry", "formal_proof": null, "informal_stmt": "If $z_1, \\ldots, z_n$ are complex, prove that $|z_1 + z_2 + \\ldots + z_n| \\leq |z_1| + |z_2| + \\cdots + |z_n|$.\n\\begin{proof}\n We can apply the case $n=2$ and induction on $n$ to get\n$$\n\\begin{aligned}\n\\left|z_1+z_2+\\cdots z_n\\right| &=\\left|\\left(z_1+z_2+\\cdots+z_{n-1}\\right)+z_n\\right| \\\\\n& \\leq\\left|z_1+z_2+\\cdots+z_{n-1}\\right|+\\left|z_n\\right| \\\\\n& \\leq\\left|z_1\\right|+\\left|z_2\\right|+\\cdots+\\left|z_{n-1}\\right|+\\left|z_n\\right|\n\\end{aligned}\n$$\n\\end{proof}", "informal_proof": "If $r$ and $r+x$ were both rational, then $x=r+x-r$ would also be rational."} -{"name": "Rudin_exercise_1_13", "source": "Rudin.lean", "header": "import Mathlib\n\nopen Topology Filter Real Complex TopologicalSpace Finset\nopen scoped BigOperators\nnoncomputable section\n", "formal_statement": "theorem Rudin_exercise_1_13 (x y : ℂ) :\n |(norm x) - (norm y)| ≤ norm (x - y) := sorry", "formal_proof": null, "informal_stmt": "If $x, y$ are complex, prove that $||x|-|y|| \\leq |x-y|$.\n\\begin{proof}\n Since $x=x-y+y$, the triangle inequality gives\n$$\n|x| \\leq|x-y|+|y|\n$$\nso 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|$.\n\\end{proof}", "informal_proof": "If $r$ and $r+x$ were both rational, then $x=r+x-r$ would also be rational."} -{"name": "Rudin_exercise_1_14", "source": "Rudin.lean", "header": "import Mathlib\n\nopen Topology Filter Real Complex TopologicalSpace Finset\nopen scoped BigOperators\nnoncomputable section\n", "formal_statement": "theorem Rudin_exercise_1_14\n (z : ℂ) (h : norm z = 1)\n : (norm (1 + z)) ^ 2 + (norm (1 - z)) ^ 2 = 4 := sorry", "formal_proof": null, "informal_stmt": "If $z$ is a complex number such that $|z|=1$, that is, such that $z \\bar{z}=1$, compute $|1+z|^{2}+|1-z|^{2}$.\n\\begin{proof}\n $|1+z|^2=(1+z)(1+\\bar{z})=1+\\bar{z}+z+z \\bar{z}=2+z+\\bar{z}$. Similarly $|1-z|^2=(1-z)(1-\\bar{z})=1-z-\\bar{z}+z \\bar{z}=2-z-\\bar{z}$. Hence\n$$\n|1+z|^2+|1-z|^2=4 \\text {. }\n$$\n\\end{proof}", "informal_proof": "If $r$ and $r+x$ were both rational, then $x=r+x-r$ would also be rational."} -{"name": "Rudin_exercise_1_16a", "source": "Rudin.lean", "header": "import Mathlib\n\nopen Topology Filter Real Complex TopologicalSpace Finset\nopen scoped BigOperators\nnoncomputable section\n", "formal_statement": "theorem Rudin_exercise_1_16a\n (n : ℕ)\n (d r : ℝ)\n (x y z : EuclideanSpace ℝ (Fin n)) -- R^n\n (h₁ : n ≥ 3)\n (h₂ : ‖x - y‖ = d)\n (h₃ : d > 0)\n (h₄ : r > 0)\n (h₅ : 2 * r > d)\n : Set.Infinite {z : EuclideanSpace ℝ (Fin n) | ‖z - x‖ = r ∧ ‖z - y‖ = r} := sorry", "formal_proof": null, "informal_stmt": "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$.\n\\begin{proof}\n (a) Let w be any vector satisfying the following two equations:\n$$\n\\begin{aligned}\n\\mathbf{w} \\cdot(\\mathbf{x}-\\mathbf{y}) &=0, \\\\\n|\\mathbf{w}|^2 &=r^2-\\frac{d^2}{4} .\n\\end{aligned}\n$$\nFrom linear algebra it is known that all but one of the components of a solution $\\mathbf{w}$ of the first equation can be arbitrary. The remaining component is then uniquely determined. Also, if $w$ is any non-zero solution of the first equation, there is a unique positive number $t$ such that $t$ w satisfies both equations. (For example, if $x_1 \\neq y_1$, the first equation is satisfied whenever\n$$\nz_1=\\frac{z_2\\left(x_2-y_2\\right)+\\cdots+z_k\\left(x_k-y_k\\right)}{y_1-x_1} .\n$$\nIf $\\left(z_1, z_2, \\ldots, z_k\\right)$ satisfies this equation, so does $\\left(t z_1, t z_2, \\ldots, t z_k\\right)$ for any real number $t$.) Since at least two of these components can vary independently, we can find a solution with these components having any prescribed ratio. This ratio does not change when we multiply by the positive number $t$ to obtain a solution of both equations. Since there are infinitely many ratios, there are infinitely many distinct solutions. For each such solution $\\mathbf{w}$ the vector $\\mathbf{z}=$ $\\frac{1}{2} \\mathrm{x}+\\frac{1}{2} \\mathrm{y}+\\mathrm{w}$ is a solution of the required equation. For\n$$\n\\begin{aligned}\n|\\mathrm{z}-\\mathbf{x}|^2 &=\\left|\\frac{\\mathbf{y}-\\mathbf{x}}{2}+\\mathbf{w}\\right|^2 \\\\\n&=\\left|\\frac{\\mathbf{y}-\\mathbf{x}}{2}\\right|^2+2 \\mathbf{w} \\cdot \\frac{\\mathbf{x}-\\mathbf{y}}{2}+|\\mathbf{w}|^2 \\\\\n&=\\frac{d^2}{4}+0+r^2-\\frac{d^2}{4} \\\\\n&=r^2\n\\end{aligned}\n$$\nand a similar relation holds for $|z-y|^2$.\n\\end{proof}", "informal_proof": "If $r$ and $r+x$ were both rational, then $x=r+x-r$ would also be rational."} -{"name": "Rudin_exercise_1_17", "source": "Rudin.lean", "header": "import Mathlib\n\nopen Topology Filter Real Complex TopologicalSpace Finset\nopen scoped BigOperators\nnoncomputable section\n", "formal_statement": "theorem Rudin_exercise_1_17\n (n : ℕ)\n (x y : EuclideanSpace ℝ (Fin n)) -- R^n\n : ‖x + y‖^2 + ‖x - y‖^2 = 2*‖x‖^2 + 2*‖y‖^2 := sorry", "formal_proof": null, "informal_stmt": "Prove that $|\\mathbf{x}+\\mathbf{y}|^{2}+|\\mathbf{x}-\\mathbf{y}|^{2}=2|\\mathbf{x}|^{2}+2|\\mathbf{y}|^{2}$ if $\\mathbf{x} \\in R^{k}$ and $\\mathbf{y} \\in R^{k}$.\n\\begin{proof}\n The proof is a routine computation, using the relation\n$$\n|x \\pm y|^2=(x \\pm y) \\cdot(x \\pm y)=|x|^2 \\pm 2 x \\cdot y+|y|^2 .\n$$\nIf $\\mathrm{x}$ and $\\mathrm{y}$ are the sides of a parallelogram, then $\\mathrm{x}+\\mathrm{y}$ and $\\mathbf{x}-\\mathrm{y}$ are its diagonals. Hence this result says that the sum of the squares on the diagonals of a parallelogram equals the sum of the squares on the sides.\n\\end{proof}", "informal_proof": "If $r$ and $r+x$ were both rational, then $x=r+x-r$ would also be rational."} -{"name": "Rudin_exercise_1_18a", "source": "Rudin.lean", "header": "import Mathlib\n\nopen Topology Filter Real Complex TopologicalSpace Finset\nopen scoped BigOperators\nnoncomputable section\n", "formal_statement": "theorem Rudin_exercise_1_18a\n (n : ℕ)\n (h : n > 1)\n (x : EuclideanSpace ℝ (Fin n)) -- R^n\n : ∃ (y : EuclideanSpace ℝ (Fin n)), y ≠ 0 ∧ (inner ℝ x y) = (0 : ℝ) := sorry", "formal_proof": null, "informal_stmt": "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$\n\\begin{proof}\n 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 true when $k=1$, since the product of two nonzero real numbers is nonzero.\n\\end{proof}", "informal_proof": "If $r$ and $r+x$ were both rational, then $x=r+x-r$ would also be rational."} -{"name": "Rudin_exercise_1_18b", "source": "Rudin.lean", "header": "import Mathlib\n\nopen Topology Filter Real Complex TopologicalSpace Finset\nopen scoped BigOperators\nnoncomputable section\n", "formal_statement": "theorem Rudin_exercise_1_18b\n : ¬ ∀ (x : ℝ), ∃ (y : ℝ), y ≠ 0 ∧ x * y = 0 := sorry", "formal_proof": null, "informal_stmt": "If $k = 1$ and $\\mathbf{x} \\in R^{k}$, prove that there does not exist $\\mathbf{y} \\in R^{k}$ such that $\\mathbf{y} \\neq 0$ but $\\mathbf{x} \\cdot \\mathbf{y}=0$\n\\begin{proof}\n Not true when $k=1$, since the product of two nonzero real numbers is nonzero.\n\\end{proof}", "informal_proof": "If $r$ and $r+x$ were both rational, then $x=r+x-r$ would also be rational."} -{"name": "Rudin_exercise_1_19", "source": "Rudin.lean", "header": "import Mathlib\n\nopen Topology Filter Real Complex TopologicalSpace Finset\nopen scoped BigOperators\nnoncomputable section\n", "formal_statement": "theorem Rudin_exercise_1_19\n (n : ℕ)\n (a b c x : EuclideanSpace ℝ (Fin n))\n (r : ℝ)\n (h₁ : r > 0)\n (h₂ : 3 • c = 4 • b - a)\n (h₃ : 3 * r = 2 * ‖x - b‖)\n : ‖x - a‖ = 2 * ‖x - b‖ ↔ ‖x - c‖ = r := sorry", "formal_proof": null, "informal_stmt": "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|$.\n\\begin{proof}\n Since the solution is given to us, all we have to do is verify it, i.e., we need to show that the equation\n$$\n|\\mathrm{x}-\\mathrm{a}|=2|\\mathrm{x}-\\mathrm{b}|\n$$\nis equivalent to $|\\mathrm{x}-\\mathbf{c}|=r$, which says\n$$\n\\left|\\mathbf{x}-\\frac{4}{3} \\mathbf{b}+\\frac{1}{3} \\mathbf{a}\\right|=\\frac{2}{3}|\\mathbf{b}-\\mathbf{a}| .\n$$\nIf we square both sides of both equations, we an equivalent pair of equations, the first of which reduces to\n$$\n3|\\mathbf{x}|^2+2 \\mathbf{a} \\cdot \\mathbf{x}-8 \\mathbf{b} \\cdot \\mathbf{x}-|\\mathbf{a}|^2+4|\\mathbf{b}|^2=0,\n$$\nand the second of which reduces to this equation divided by 3 . Hence these equations are indeed equivalent.\n\\end{proof}", "informal_proof": "If $r$ and $r+x$ were both rational, then $x=r+x-r$ would also be rational."} -{"name": "Rudin_exercise_2_19a", "source": "Rudin.lean", "header": "import Mathlib\n\nopen Topology Filter Real Complex TopologicalSpace Finset\nopen scoped BigOperators\nnoncomputable section\n", "formal_statement": "theorem Rudin_exercise_2_19a {X : Type*} [MetricSpace X]\n (A B : Set X) (hA : IsClosed A) (hB : IsClosed B) (hAB : Disjoint A B) :\n SeparatedNhds A B := sorry", "formal_proof": null, "informal_stmt": "If $A$ and $B$ are disjoint closed sets in some metric space $X$, prove that they are separated.\n\\begin{proof}\n We are given that $A \\cap B=\\varnothing$. Since $A$ and $B$ are closed, this means $A \\cap \\bar{B}=\\varnothing=\\bar{A} \\cap B$, which says that $A$ and $B$ are separated.\n\\end{proof}", "informal_proof": "If $r$ and $r+x$ were both rational, then $x=r+x-r$ would also be rational."} -{"name": "Rudin_exercise_2_24", "source": "Rudin.lean", "header": "import Mathlib\n\nopen Topology Filter Real Complex TopologicalSpace Finset\nopen scoped BigOperators\nnoncomputable section\n", "formal_statement": "theorem Rudin_exercise_2_24 {X : Type*} [MetricSpace X]\n (hX : ∀ (A : Set X), Infinite A → ∃ (x : X), x ∈ closure A) :\n SeparableSpace X := sorry", "formal_proof": null, "informal_stmt": "Let $X$ be a metric space in which every infinite subset has a limit point. Prove that $X$ is separable.\n\\begin{proof}\n 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 most one point of the infinite set, hence that no point could be a limit point of this set, contrary to hypothesis. Hence $X$ is totally bounded, i.e., for each $\\delta>0$ there is a finite set $x_1, \\ldots, x_{N\\delta}$such that $X=\\bigcup_{j / 1}^{N\\delta} B_\\delta\\left(x_j\\right)$\n\nLet $x_{n_1}, \\ldots, x_{n N_n}$ be such that $X=\\bigcup_{j / 1}^{N_n} B_{\\frac{1}{n}}\\left(x_{n j}\\right), n=1,2, \\ldots$ We claim that $\\left\\{x_{n j}: 1 \\leq j \\leq N_n ; n=1,2, \\ldots\\right\\}$ is a countable dense subset of $X$. Indeed\n25\nif $x \\in X$ and $\\delta>0$, then $x \\in B_{\\frac{1}{n}}\\left(x_{n j}\\right)$ for some $x_{n j}$ for some $n>\\frac{1}{\\delta}$, and hence $d\\left(x, x_{n j}\\right)<\\delta$. By definition, this means that $\\left\\{x_{n j}\\right\\}$ is dense in $X$.\n\\end{proof}", "informal_proof": "If $r$ and $r+x$ were both rational, then $x=r+x-r$ would also be rational."} -{"name": "Rudin_exercise_2_25", "source": "Rudin.lean", "header": "import Mathlib\n\nopen Topology Filter Real Complex TopologicalSpace Finset\nopen scoped BigOperators\nnoncomputable section\n", "formal_statement": "theorem Rudin_exercise_2_25 {K : Type*} [MetricSpace K] [CompactSpace K] :\n ∃ (B : Set (Set K)), Set.Countable B ∧ IsTopologicalBasis B := sorry", "formal_proof": null, "informal_stmt": "Prove that every compact metric space $K$ has a countable base.\n\\begin{proof}\n $K$ can be covered by a finite union of neighborhoods of radius $1 / n$, and this shows that this implies that $K$ is separable.\n\nIt is not entirely obvious that a metric space with a countable base is separable. To prove this, let $\\left\\{V_n\\right\\}_{n=1}^{\\infty}$ be a countable base, and let $x_n \\in V_n$. The points $V_n$ must be dense in $X$. For if $G$ is any non-empty open set, then $G$ contains $V_n$ for some $n$, and hence $x_n \\in G$. (Thus for a metric space, having a countable base and being separable are equivalent.)\n\\end{proof}", "informal_proof": "If $r$ and $r+x$ were both rational, then $x=r+x-r$ would also be rational."} -{"name": "Rudin_exercise_2_27a", "source": "Rudin.lean", "header": "import Mathlib\n\nopen Topology Filter Real Complex TopologicalSpace Finset\nopen scoped BigOperators\nnoncomputable section\n", "formal_statement": "theorem Rudin_exercise_2_27a (k : ℕ) (E P : Set (EuclideanSpace ℝ (Fin k)))\n (hE : E.Nonempty ∧ ¬ Set.Countable E)\n (hP : P = {x | ∀ U ∈ 𝓝 x, ¬ Set.Countable (P ∩ E)}) :\n IsClosed P ∧ P = {x | ClusterPt x (𝓟 P)} := sorry", "formal_proof": null, "informal_stmt": "Suppose $E\\subset\\mathbb{R}^k$ is uncountable, and let $P$ be the set of condensation points of $E$. Prove that $P$ is perfect.\n\\begin{proof}\n 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.\n\\end{proof}", "informal_proof": "If $r$ and $r+x$ were both rational, then $x=r+x-r$ would also be rational."} -{"name": "Rudin_exercise_2_27b", "source": "Rudin.lean", "header": "import Mathlib\n\nopen Topology Filter Real Complex TopologicalSpace Finset\nopen scoped BigOperators\nnoncomputable section\n", "formal_statement": "theorem Rudin_exercise_2_27b (k : ℕ) (E P : Set (EuclideanSpace ℝ (Fin k)))\n (hE : E.Nonempty ∧ ¬ Set.Countable E)\n (hP : P = {x | ∀ U ∈ 𝓝 x, (P ∩ E).Nonempty ∧ ¬ Set.Countable (P ∩ E)}) :\n Set.Countable (E \\ P) := sorry", "formal_proof": null, "informal_stmt": "Suppose $E\\subset\\mathbb{R}^k$ is uncountable, and let $P$ be the set of condensation points of $E$. Prove that at most countably many points of $E$ are not in $P$.\n\\begin{proof}\n If $x \\in W^c$, and $O$ is any neighborhood of $x$, then $x \\in V_n \\subseteq O$ for some n. Since $x \\notin W, V_n \\cap E$ is uncountable. Hence $O$ contains uncountably many points of $E$, and so $x$ is a condensation point of $E$. Thus $x \\in P$, i.e., $W^c \\subseteq P$.\nConversely if $x \\in W$, then $x \\in V_n$ for some $V_n$ such that $V_n \\cap E$ is countable. Hence $x$ has a neighborhood (any neighborhood contained in $V_n$ ) containing at most a countable set of points of $E$, and so $x \\notin P$, i.e., $W \\subseteq P^c$. Hence $P=W^c$.\nIt is clear that $P$ is closed (since its complement $W$ is open), so that we need only show that $P \\subseteq P^{\\prime}$. Hence suppose $x \\in P$, and $O$ is any neighborhood of $x$. (By definition of $P$ this means $O \\cap E$ is uncountable.) We need to show that there is a point $y \\in P \\cap(O \\backslash\\{x\\})$. If this is not the case, i.e., if every point $y$ in $O \\backslash\\{x\\}$ is in $P^c$, then for each such point $y$ there is a set $V_n$ containing $y$ such that $V_n \\cap E$ is at most countable. That would mean that $y \\in W$, i.e., that $O \\backslash\\{x\\}$ is contained in $W$. It would follow that $O \\cap E \\subseteq\\{x\\} \\cup(W \\cap E)$, and so $O \\cap E$ contains at most a countable set of points, contrary to the hypothesis that $x \\in P$. Hence $O$ contains a point of $P$ different from $x$, and so $P \\subseteq P^{\\prime}$. Thus $P$ is perfect.\n\\end{proof}", "informal_proof": "If $r$ and $r+x$ were both rational, then $x=r+x-r$ would also be rational."} -{"name": "Rudin_exercise_2_28", "source": "Rudin.lean", "header": "import Mathlib\n\nopen Topology Filter Real Complex TopologicalSpace Finset\nopen scoped BigOperators\nnoncomputable section\n", "formal_statement": "theorem Rudin_exercise_2_28 (X : Type*) [MetricSpace X] [SeparableSpace X]\n (A : Set X) (hA : IsClosed A) :\n ∃ P₁ P₂ : Set X, A = P₁ ∪ P₂ ∧\n IsClosed P₁ ∧ P₁ = {x | ClusterPt x (𝓟 P₁)} ∧\n Set.Countable P₂ := sorry", "formal_proof": null, "informal_stmt": "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.\n\\begin{proof}\n 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.\n\nSince a perfect set in a separable metric space has the same cardinality as the real numbers, the set $P$ must be empty if $E$ is countable. The at-most countable set $E \\backslash P$ cannot be perfect, hence must have isolated points if it is nonempty.\n\\end{proof}", "informal_proof": "If $r$ and $r+x$ were both rational, then $x=r+x-r$ would also be rational."} -{"name": "Rudin_exercise_2_29", "source": "Rudin.lean", "header": "import Mathlib\n\nopen Topology Filter Real Complex TopologicalSpace Finset\nopen scoped BigOperators\nnoncomputable section\n", "formal_statement": "theorem Rudin_exercise_2_29 (U : Set ℝ) (hU : IsOpen U) :\n ∃ (f : ℕ → Set ℝ), (∀ n, ∃ a b : ℝ, f n = {x | a < x ∧ x < b}) ∧ (∀ n, f n ⊆ U) ∧\n (∀ n m, n ≠ m → f n ∩ f m = ∅) ∧\n U = ⋃ n, f n := sorry", "formal_proof": null, "informal_stmt": "Prove that every open set in $\\mathbb{R}$ is the union of an at most countable collection of disjoint segments.\n\\begin{proof}\n Let $O$ be open. For each pair of points $x \\in O, y \\in O$, we define an equivalence relation $x \\sim y$ by saying $x \\sim y$ if and only if $[\\min (x, y), \\max (x, y)] \\subset$ 0 . This is an equivalence relation, since $x \\sim x([x, x] \\subset O$ if $x \\in O)$; if $x \\sim y$, then $y \\sim x$ (since $\\min (x, y)=\\min (y, x)$ and $\\max (x, y)=\\max (y, x))$; and if $x \\sim y$ and $y \\sim z$, then $x \\sim z([\\min (x, z), \\max (x, z)] \\subseteq[\\min (x, y), \\max (x, y)] \\cup$ $[\\min (y, z), \\max (y, z)] \\subseteq O)$. In fact it is easy to prove that\n$$\n\\min (x, z) \\geq \\min (\\min (x, y), \\min (y, z))\n$$\nand\n$$\n\\max (x, z) \\leq \\max (\\max (x, y), \\max (y, z))\n$$\nIt follows that $O$ can be written as a disjoint union of pairwise disjoint equivalence classes. We claim that each equivalence class is an open interval.\n\nTo show this, for each $x \\in O$; let $A=\\{z:[z, x] \\subseteq O\\}$ and $B=\\{z:[x, z] \\subseteq$ $O\\}$, and let $a=\\inf A, b=\\sup B$. We claim that $(a, b) \\subset O$. Indeed if $az$. Then $z \\in[c, x] \\cup[x, d] \\subseteq O$. We now claim that $(a, b)$ is the equivalence class containing $x$. It is clear that each element of $(a, b)$ is equivalent to $x$ by the way in which $a$ and $b$ were chosen. We need to show that if $z \\notin(a, b)$, then $z$ is not equivalent to $x$. Suppose that $zb$ and $z \\sim x$, then $b$ could not be an upper bound for $B$.\n\nWe have now established that $O$ is a union of pairwise disjoint open intervals. Such a union must be at most countable, since each open interval contains a rational number not in any other interval.\n\\end{proof}", "informal_proof": "If $r$ and $r+x$ were both rational, then $x=r+x-r$ would also be rational."} -{"name": "Rudin_exercise_3_1a", "source": "Rudin.lean", "header": "import Mathlib\n\nopen Topology Filter Real Complex TopologicalSpace Finset\nopen scoped BigOperators\nnoncomputable section\n", "formal_statement": "theorem Rudin_exercise_3_1a\n (f : ℕ → ℝ)\n (h : ∃ (a : ℝ), Tendsto (λ (n : ℕ) => f n) atTop (𝓝 a))\n : ∃ (a : ℝ), Tendsto (λ (n : ℕ) => |f n|) atTop (𝓝 a) := sorry", "formal_proof": null, "informal_stmt": "Prove that convergence of $\\left\\{s_{n}\\right\\}$ implies convergence of $\\left\\{\\left|s_{n}\\right|\\right\\}$.\n\\begin{proof}\n 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\\{\\left|s_n\\right|\\right\\}$ is also a Cauchy sequence, and therefore must converge.\n\\end{proof}", "informal_proof": "If $r$ and $r+x$ were both rational, then $x=r+x-r$ would also be rational."} -{"name": "Rudin_exercise_3_2a", "source": "Rudin.lean", "header": "import Mathlib\n\nopen Topology Filter Real Complex TopologicalSpace Finset\nopen scoped BigOperators\nnoncomputable section\n", "formal_statement": "theorem Rudin_exercise_3_2a\n : Tendsto (λ (n : ℝ) => (sqrt (n^2 + n) - n)) atTop (𝓝 (1/2)) := sorry", "formal_proof": null, "informal_stmt": "Prove that $\\lim_{n \\rightarrow \\infty}\\sqrt{n^2 + n} -n = 1/2$.\n\\begin{proof}\n Multiplying and dividing by $\\sqrt{n^2+n}+n$ yields\n$$\n\\sqrt{n^2+n}-n=\\frac{n}{\\sqrt{n^2+n}+n}=\\frac{1}{\\sqrt{1+\\frac{1}{n}}+1} .\n$$\nIt follows that the limit is $\\frac{1}{2}$.\n\\end{proof}", "informal_proof": "If $r$ and $r+x$ were both rational, then $x=r+x-r$ would also be rational."} -{"name": "Rudin_exercise_3_3", "source": "Rudin.lean", "header": "import Mathlib\n\nopen Topology Filter Real Complex TopologicalSpace Finset\nopen scoped BigOperators\nnoncomputable section\n", "formal_statement": "theorem Rudin_exercise_3_3\n : ∃ (x : ℝ), Tendsto f atTop (𝓝 x) ∧ ∀ n, f n < 2 := sorry", "formal_proof": null, "informal_stmt": "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$.\n\\begin{proof}\n 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}1$, i.e., $s_n>s_n^2-2=s_{n-1}$. Hence the sequence is an increasing sequence that is bounded above (by 2 ) and so converges. Since the limit $s$ satisfies $s^2-s-2=0$, it follows that the limit is 2.\n\\end{proof}", "informal_proof": "If $r$ and $r+x$ were both rational, then $x=r+x-r$ would also be rational."} -{"name": "Rudin_exercise_3_5", "source": "Rudin.lean", "header": "import Mathlib\n\nopen Topology Filter Real Complex TopologicalSpace Finset\nopen scoped BigOperators\nnoncomputable section\n", "formal_statement": "theorem Rudin_exercise_3_5\n (a b : ℕ → ℝ)\n (h : limsup a + limsup b ≠ 0) :\n limsup (λ n => a n + b n) ≤ limsup a + limsup b := sorry", "formal_proof": null, "informal_stmt": "For any two real sequences $\\left\\{a_{n}\\right\\},\\left\\{b_{n}\\right\\}$, prove that $\\limsup _{n \\rightarrow \\infty}\\left(a_{n}+b_{n}\\right) \\leq \\limsup _{n \\rightarrow \\infty} a_{n}+\\limsup _{n \\rightarrow \\infty} b_{n},$ provided the sum on the right is not of the form $\\infty-\\infty$.\n\\begin{proof}\n Since the case when $\\limsup _{n \\rightarrow \\infty} a_n=+\\infty$ and $\\limsup _{n \\rightarrow \\infty} b_n=-\\infty$ has been excluded from consideration, we note that the inequality is obvious if $\\limsup _{n \\rightarrow \\infty} a_n=+\\infty$. Hence we shall assume that $\\left\\{a_n\\right\\}$ is bounded above.\n\nLet $\\left\\{n_k\\right\\}$ be a subsequence of the positive integers such that $\\lim _{k \\rightarrow \\infty}\\left(a_{n_k}+\\right.$ $\\left.b_{n_k}\\right)=\\limsup _{n \\rightarrow \\infty}\\left(a_n+b_n\\right)$. Then choose a subsequence of the positive integers $\\left\\{k_m\\right\\}$ such that\n$$\n\\lim _{m \\rightarrow \\infty} a_{n_{k_m}}=\\limsup _{k \\rightarrow \\infty} a_{n_k} .\n$$\nThe subsequence $a_{n_{k_m}}+b_{n_{k_m}}$ still converges to the same limit as $a_{n_k}+b_{n_k}$, i.e., to $\\limsup _{n \\rightarrow \\infty}\\left(a_n+b_n\\right)$. Hence, since $a_{n_k}$ is bounded above (so that $\\limsup _{k \\rightarrow \\infty} a_{n_k}$ is finite), it follows that $b_{n_{k_m}}$ converges to the difference\n$$\n\\lim _{m \\rightarrow \\infty} b_{n_{k_m}}=\\lim _{m \\rightarrow \\infty}\\left(a_{n_{k_m}}+b_{n_{k_m}}\\right)-\\lim _{m \\rightarrow \\infty} a_{n_{k_m}} .\n$$\nThus we have proved that there exist subsequences $\\left\\{a_{n_{k_m}}\\right\\}$ and $\\left\\{b_{n_{k_m}}\\right\\}$ which converge to limits $a$ and $b$ respectively such that $a+b=\\limsup _{n \\rightarrow \\infty}\\left(a_n+b_n^*\\right)$. Since $a$ is the limit of a subsequence of $\\left\\{a_n\\right\\}$ and $b$ is the limit of a subsequence of $\\left\\{b_n\\right\\}$, it follows that $a \\leq \\limsup _{n \\rightarrow \\infty} a_n$ and $b \\leq \\limsup _{n \\rightarrow \\infty} b_n$, from which the desired inequality follows.\n\\end{proof}", "informal_proof": "If $r$ and $r+x$ were both rational, then $x=r+x-r$ would also be rational."} -{"name": "Rudin_exercise_3_6a", "source": "Rudin.lean", "header": "import Mathlib\n\nopen Topology Filter Real Complex TopologicalSpace Finset\nopen scoped BigOperators\nnoncomputable section\n", "formal_statement": "theorem Rudin_exercise_3_6a\n: Tendsto (λ (n : ℕ) => (∑ i ∈ range n, g i)) atTop atTop := sorry", "formal_proof": null, "informal_stmt": "Prove that $\\lim_{n \\rightarrow \\infty} \\sum_{i (∑ i ∈ (range n), a i)) atTop (𝓝 y))) :\n ∃ y, Tendsto (λ n => (∑ i ∈ (range n), sqrt (a i) / n)) atTop (𝓝 y) := sorry", "formal_proof": null, "informal_stmt": "Prove that the convergence of $\\Sigma a_{n}$ implies the convergence of $\\sum \\frac{\\sqrt{a_{n}}}{n}$ if $a_n\\geq 0$.\n\\begin{proof}\n Since $\\left(\\sqrt{a_n}-\\frac{1}{n}\\right)^2 \\geq 0$, it follows that\n$$\n\\frac{\\sqrt{a_n}}{n} \\leq \\frac{1}{2}\\left(a_n^2+\\frac{1}{n^2}\\right) .\n$$\nNow $\\Sigma a_n^2$ converges by comparison with $\\Sigma a_n$ (since $\\Sigma a_n$ converges, we have $a_n<1$ for large $n$, and hence $\\left.a_n^2 (∑ i ∈ (range n), a i)) atTop (𝓝 y)))\n (h2 : Monotone b)\n (h3 : Bornology.IsBounded (Set.range b)) :\n ∃ y, Tendsto (λ n => (∑ i ∈ (range n), (a i) * (b i))) atTop (𝓝 y) := sorry", "formal_proof": null, "informal_stmt": "If $\\Sigma a_{n}$ converges, and if $\\left\\{b_{n}\\right\\}$ is monotonic and bounded, prove that $\\Sigma a_{n} b_{n}$ converges.\n\\begin{proof}\n 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 $k=1,2, \\ldots$ Let $M$ be an upper bound for both $\\left|b_n\\right|$ and $\\left|S_n\\right|$, and let $S=\\sum a_n$ and $b=\\lim b_n$. Choose $N$ so large that the following three inequalities hold for all $m>N$ and $n>N$ :\n$$\n\\left|b_n S_n-b S\\right|<\\frac{\\varepsilon}{3} ; \\quad\\left|b_m S_m-b S\\right|<\\frac{\\varepsilon}{3} ; \\quad\\left|b_m-b_n\\right|<\\frac{\\varepsilon}{3 M} .\n$$\nThen if $n>m>N$, we have, from the formula for summation by parts,\n$$\n\\sum_{k=m+1}^n a_n b_n=b_n S_n-b_m S_m+\\sum_{k=m}^{n-1}\\left(b_k-b_{k+1}\\right) S_k\n$$\nOur assumptions yield immediately that $\\left|b_n S_n-b_m S_m\\right|<\\frac{2 \\varepsilon}{3}$, and\n$$\n\\left|\\sum_{k=m}^{n-1}\\left(b_k-b_{k+1}\\right) S_k\\right| \\leq M \\sum_{k=m}^{n-1}\\left|b_k-b_{k+1}\\right| .\n$$\nSince the sequence $\\left\\{b_n\\right\\}$ is monotonic, we have\n$$\n\\sum_{k=m}^{n-1}\\left|b_k-b_{k+1}\\right|=\\left|\\sum_{k=m}^{n-1}\\left(b_k-b_{k+1}\\right)\\right|=\\left|b_m-b_n\\right|<\\frac{\\varepsilon}{3 M},\n$$\nfrom which the desired inequality follows.\n\\end{proof}", "informal_proof": "If $r$ and $r+x$ were both rational, then $x=r+x-r$ would also be rational."} -{"name": "Rudin_exercise_3_13", "source": "Rudin.lean", "header": "import Mathlib\n\nopen Topology Filter Real Complex TopologicalSpace Finset\nopen scoped BigOperators\nnoncomputable section\n", "formal_statement": "theorem Rudin_exercise_3_13\n (a b : ℕ → ℝ)\n (ha : ∃ y, (Tendsto (λ n => (∑ i ∈ (range n), |a i|)) atTop (𝓝 y)))\n (hb : ∃ y, (Tendsto (λ n => (∑ i ∈ (range n), |b i|)) atTop (𝓝 y))) :\n ∃ y, (Tendsto (λ n => (∑ i ∈ (range n),\n λ i => (∑ j ∈ range (i + 1), a j * b (i - j)))) atTop (𝓝 y)) := sorry", "formal_proof": null, "informal_stmt": "Prove that the Cauchy product of two absolutely convergent series converges absolutely.\n\\begin{proof}\n Since both the hypothesis and conclusion refer to absolute convergence, we may assume both series consist of nonnegative terms. We let $S_n=\\sum_{k=0}^n a_n, T_n=\\sum_{k=0}^n b_n$, and $U_n=\\sum_{k=0}^n \\sum_{l=0}^k a_l b_{k-l}$. We need to show that $U_n$ remains bounded, given that $S_n$ and $T_n$ are bounded. To do this we make the convention that $a_{-1}=T_{-1}=0$, in order to save ourselves from having to separate off the first and last terms when we sum by parts. We then have\n$$\n\\begin{aligned}\nU_n &=\\sum_{k=0}^n \\sum_{l=0}^k a_l b_{k-l} \\\\\n&=\\sum_{k=0}^n \\sum_{l=0}^k a_l\\left(T_{k-l}-T_{k-l-1}\\right) \\\\\n&=\\sum_{k=0}^n \\sum_{j=0}^k a_{k-j}\\left(T_j-T_{j-1}\\right) \\\\\n&=\\sum_{k=0}^n \\sum_{j=0}^k\\left(a_{k-j}-a_{k-j-1}\\right) T_j \\\\\n&=\\sum_{j=0}^n \\sum_{k=j}^n\\left(a_{k-j}-a_{k-j-1}\\right) T_j\n&=\\sum_{j=0}^n a_{n-j} T_j \\\\\n&\\leq T \\sum_{m=0}^n a_m \\\\\n&=T S_n \\\\\n&\\leq S T .\n\\end{aligned}\n$$\nThus $U_n$ is bounded, and hence approaches a finite limit.\n\n\\end{proof}", "informal_proof": "If $r$ and $r+x$ were both rational, then $x=r+x-r$ would also be rational."} -{"name": "Rudin_exercise_3_20", "source": "Rudin.lean", "header": "import Mathlib\n\nopen Topology Filter Real Complex TopologicalSpace Finset\nopen scoped BigOperators\nnoncomputable section\n", "formal_statement": "theorem Rudin_exercise_3_20 {X : Type*} [MetricSpace X]\n (p : ℕ → X) (l : ℕ) (r : X)\n (hp : CauchySeq p)\n (hpl : Tendsto (λ n => p (l * n)) atTop (𝓝 r)) :\n Tendsto p atTop (𝓝 r) := sorry", "formal_proof": null, "informal_stmt": "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$.\n\\begin{proof}\n 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\n$$\nd\\left(p_n, p\\right) \\leq d\\left(p_n, p_{n_{N+1}}\\right)+d\\left(p_{n_{N+1}}, p\\right)<\\varepsilon\n$$\nFor the first term on the right is less than $\\frac{\\varepsilon}{2}$ since $n>N_1$ and $n_{N+1}>N+1>$ $N_1$. The second term is less than $\\frac{\\varepsilon}{2}$ by the choice of $N$.\n\\end{proof}", "informal_proof": "If $r$ and $r+x$ were both rational, then $x=r+x-r$ would also be rational."} -{"name": "Rudin_exercise_3_21", "source": "Rudin.lean", "header": "import Mathlib\n\nopen Topology Filter Real Complex TopologicalSpace Finset\nopen scoped BigOperators\nnoncomputable section\n", "formal_statement": "theorem Rudin_exercise_3_21\n {X : Type*} [MetricSpace X] [CompleteSpace X]\n (E : ℕ → Set X)\n (hE : ∀ n, E n ⊃ E (n + 1))\n (hE' : Tendsto (λ n => Metric.diam (E n)) atTop (𝓝 0)) :\n ∃ a, Set.iInter E = {a} := sorry", "formal_proof": null, "informal_stmt": "If $\\left\\{E_{n}\\right\\}$ is a sequence of closed nonempty and bounded sets in a complete metric space $X$, if $E_{n} \\supset E_{n+1}$, and if $\\lim _{n \\rightarrow \\infty} \\operatorname{diam} E_{n}=0,$ then $\\bigcap_{1}^{\\infty} E_{n}$ consists of exactly one point.\n\\begin{proof}\n Choose $x_n \\in E_n$. (We use the axiom of choice here.) The sequence $\\left\\{x_n\\right\\}$ is a Cauchy sequence, since the diameter of $E_n$ tends to zero as $n$ tends to infinity and $E_n$ contains $E_{n+1}$. Since the metric space $X$ is complete, the sequence $x_n$ converges to a point $x$, which must belong to $E_n$ for all $n$, since $E_n$ is closed and contains $x_m$ for all $m \\geq n$. There cannot be a second point $y$ in all of the $E_n$, since for any point $y \\neq x$ the diameter of $E_n$ is less $\\operatorname{than} d(x, y)$ for large $n$.\n\\end{proof}", "informal_proof": "If $r$ and $r+x$ were both rational, then $x=r+x-r$ would also be rational."} -{"name": "Rudin_exercise_3_22", "source": "Rudin.lean", "header": "import Mathlib\n\nopen Topology Filter Real Complex TopologicalSpace Finset\nopen scoped BigOperators\nnoncomputable section\n", "formal_statement": "theorem Rudin_exercise_3_22 (X : Type*) [MetricSpace X] [CompleteSpace X]\n (G : ℕ → Set X) (hG : ∀ n, IsOpen (G n) ∧ Dense (G n)) :\n ∃ x, ∀ n, x ∈ G n := sorry", "formal_proof": null, "informal_stmt": "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.\n\\begin{proof}\n 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$. Since $U \\backslash F_1$ is open, there exists $r_1>0$ such that $B_1$, defined as the open ball of radius $r_1$ about $x_1$, is contained in $U \\backslash F_1$. Let $E_1$ be the open ball of radius $\\frac{r_1}{2}$ about $x_1$, so that the closure of $E_1$ is contained in $B_1$. Now $F_2$ does not contain $E_1$, and so we can find a point $x_2 \\in E_1 \\backslash F_2$. Since $E_1 \\backslash F_2$ is an open set, there exists a positive number $r_2$ such that $B_2$, the open ball of radius $R_2$ about $x_2$, is contained in $E_1 \\backslash F_2$, which in turn is contained in $U \\backslash\\left(F_1 \\cup F_2\\right)$. We let $E_2$ be the open ball of radius $\\frac{r_2}{2}$ about $x_2$, so that $\\bar{E}_2 \\subseteq B_2$. Proceeding in this way, we construct a sequence of open balls $E_j$, such that $E_j \\supseteq \\bar{E}_{j+1}$, and the diameter of $E_j$ tends to zero. By the previous exercise, there is a point $x$ belonging to all the sets $\\bar{E}_j$, hence to all the sets $U \\backslash\\left(F_1 \\cup F_2 \\cup \\cdots \\cup F_n\\right)$. Thus the point $x$ belongs to $U \\cap\\left(\\cap_1^{\\infty} G_n\\right)$.\n\\end{proof}", "informal_proof": "If $r$ and $r+x$ were both rational, then $x=r+x-r$ would also be rational."} -{"name": "Rudin_exercise_4_1a", "source": "Rudin.lean", "header": "import Mathlib\n\nopen Topology Filter Real Complex TopologicalSpace Finset\nopen scoped BigOperators\nnoncomputable section\n", "formal_statement": "theorem Rudin_exercise_4_1a\n : ∃ (f : ℝ → ℝ), (∀ (x : ℝ), Tendsto (λ y => f (x + y) - f (x - y)) (𝓝 0) (𝓝 0)) ∧ ¬ Continuous f := sorry", "formal_proof": null, "informal_stmt": "Suppose $f$ is a real function defined on $\\mathbb{R}$ which satisfies $\\lim_{h \\rightarrow 0} f(x + h) - f(x - h) = 0$ for every $x \\in \\mathbb{R}$. Show that $f$ does not need to be continuous.\n\\begin{proof}\n $$\nf(x)= \\begin{cases}1 & \\text { if } x \\text { is an integer } \\\\ 0 & \\text { if } x \\text { is not an integer. }\\end{cases}\n$$\n(If $x$ is an integer, then $f(x+h)-f(x-h) \\equiv 0$ for all $h$; while if $x$ is not an integer, $f(x+h)-f(x-h)=0$ for $|h|<\\min (x-[x], 1+[x]-x)$.\n\\end{proof}", "informal_proof": "If $r$ and $r+x$ were both rational, then $x=r+x-r$ would also be rational."} -{"name": "Rudin_exercise_4_2a", "source": "Rudin.lean", "header": "import Mathlib\n\nopen Topology Filter Real Complex TopologicalSpace Finset\nopen scoped BigOperators\nnoncomputable section\n", "formal_statement": "theorem Rudin_exercise_4_2a\n {α : Type} [MetricSpace α]\n {β : Type} [MetricSpace β]\n (f : α → β)\n (h₁ : Continuous f)\n : ∀ (x : Set α), f '' (closure x) ⊆ closure (f '' x) := sorry", "formal_proof": null, "informal_stmt": "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$).\n\\begin{proof}\n 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(E)$. Since $O$ was any neighborhood of $f(x)$, it follows that $f(x) \\in \\overline{f(E)}$\n\\end{proof}", "informal_proof": "If $r$ and $r+x$ were both rational, then $x=r+x-r$ would also be rational."} -{"name": "Rudin_exercise_4_3", "source": "Rudin.lean", "header": "import Mathlib\n\nopen Topology Filter Real Complex TopologicalSpace Finset\nopen scoped BigOperators\nnoncomputable section\n", "formal_statement": "theorem Rudin_exercise_4_3\n {α : Type} [MetricSpace α]\n (f : α → ℝ) (h : Continuous f) (z : Set α) (g : z = f⁻¹' {0})\n : IsClosed z := sorry", "formal_proof": null, "informal_stmt": "Let $f$ be a continuous real function on a metric space $X$. Let $Z(f)$ (the zero set of $f$ ) be the set of all $p \\in X$ at which $f(p)=0$. Prove that $Z(f)$ is closed.\n\\begin{proof}\n $Z(f)=f^{-1}(\\{0\\})$, which is the inverse image of a closed set. Hence $Z(f)$ is closed.\n\\end{proof}", "informal_proof": "If $r$ and $r+x$ were both rational, then $x=r+x-r$ would also be rational."} -{"name": "Rudin_exercise_4_4a", "source": "Rudin.lean", "header": "import Mathlib\n\nopen Topology Filter Real Complex TopologicalSpace Finset\nopen scoped BigOperators\nnoncomputable section\n", "formal_statement": "theorem Rudin_exercise_4_4a\n {α : Type} [MetricSpace α]\n {β : Type} [MetricSpace β]\n (f : α → β)\n (s : Set α)\n (h₁ : Continuous f)\n (h₂ : Dense s)\n : f '' Set.univ ⊆ closure (f '' s) := sorry", "formal_proof": null, "informal_stmt": "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)$.\n\\begin{proof}\n To prove that $f(E)$ is dense in $f(X)$, simply use that $f(X)=f(\\bar{E}) \\subseteq \\overline{f(E)}$.\n\\end{proof}", "informal_proof": "If $r$ and $r+x$ were both rational, then $x=r+x-r$ would also be rational."} -{"name": "Rudin_exercise_4_4b", "source": "Rudin.lean", "header": "import Mathlib\n\nopen Topology Filter Real Complex TopologicalSpace Finset\nopen scoped BigOperators\nnoncomputable section\n", "formal_statement": "theorem Rudin_exercise_4_4b\n {α : Type} [MetricSpace α]\n {β : Type} [MetricSpace β]\n (f g : α → β)\n (s : Set α)\n (h₁ : Continuous f)\n (h₂ : Continuous g)\n (h₃ : Dense s)\n (h₄ : ∀ x ∈ s, f x = g x)\n : f = g := sorry", "formal_proof": null, "informal_stmt": "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 if $g(p) = f(p)$ for all $p \\in P$ then $g(p) = f(p)$ for all $p \\in X$.\n\\begin{proof}\n The function $\\varphi: X \\rightarrow R^1$ given by\n$$\n\\varphi(p)=d_Y(f(p), g(p))\n$$\nis continuous, since\n$$\n\\left|d_Y(f(p), g(p))-d_Y(f(q), g(q))\\right| \\leq d_Y(f(p), f(q))+d_Y(g(p), g(q))\n$$\n(This inequality follows from the triangle inequality, since\n$$\nd_Y(f(p), g(p)) \\leq d_Y(f(p), f(q))+d_Y(f(q), g(q))+d_Y(g(q), g(p)),\n$$\nand the same inequality holds with $p$ and $q$ interchanged. The absolute value $\\left|d_Y(f(p), g(p))-d_Y(f(q), g(q))\\right|$ must be either $d_Y(f(p), g(p))-d_Y(f(q), g(q))$ or $d_Y(f(q), g(q))-d_Y(f(p), g(p))$, and the triangle inequality shows that both of these numbers are at most $d_Y(f(p), f(q))+d_Y(g(p), g(q))$.)\nBy the previous problem, the zero set of $\\varphi$ is closed. But by definition\n$$\nZ(\\varphi)=\\{p: f(p)=g(p)\\} .\n$$\nHence the set of $p$ for which $f(p)=g(p)$ is closed. Since by hypothesis it is dense, it must be $X$.\n\\end{proof}", "informal_proof": "If $r$ and $r+x$ were both rational, then $x=r+x-r$ would also be rational."} -{"name": "Rudin_exercise_4_5a", "source": "Rudin.lean", "header": "import Mathlib\n\nopen Topology Filter Real Complex TopologicalSpace Finset\nopen scoped BigOperators\nnoncomputable section\n", "formal_statement": "theorem Rudin_exercise_4_5a\n (f : ℝ → ℝ)\n (E : Set ℝ)\n (h₁ : IsClosed E)\n (h₂ : ContinuousOn f E)\n : ∃ (g : ℝ → ℝ), Continuous g ∧ ∀ x ∈ E, f x = g x := sorry", "formal_proof": null, "informal_stmt": "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$.\n\\begin{proof}\nFollowing 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 $a$ and $b$ (if these last two points exist). Define $g(x)$ to be $f(b)$ for $x>b$ and $f(a)$ for $x0$. To choose $\\delta>0$ such that $|x-u|<\\delta$ implies $|g(x)-g(u)|<\\varepsilon$, we consider three cases.\ni. If $x>b$, let $\\delta=x-b$. Then if $|x-u|<\\delta$, it follows that $u>b$ also, so that $g(u)=f(b)=g(x)$, and $|g(u)-g(x)|=0<\\varepsilon$. Similarly if $xa_k+\\delta_1$. Let us consider the second of these cases and show how to get $|f(u)-f(x)|<\\varepsilon$ for $xx$ we have $a_k0$ be given. Choose $\\eta>0$ so that $d_Y(f(x), f(u))<\\frac{\\varepsilon}{2}$ if $d_E(x, y)<\\eta$. Then let $\\delta=\\min \\left(\\eta, \\frac{\\varepsilon}{2}\\right)$. It is easy to see that $\\rho(\\varphi(x), \\varphi(u))<\\varepsilon$ if $d_E(x, u)<\\delta$. Conversely if $\\varphi$ is continuous, it is obvious from the inequality $\\rho(\\varphi(x), \\varphi(u)) \\geq d_Y(f(x), f(u))$ that $f$ is continuous.\n\nFrom these facts we deduce immediately that the graph of a continuous function $f$ on a compact set $E$ is compact, being the image of $E$ under the continuous mapping $\\varphi$. Conversely, if $f$ is not continuous at some point $x$, there is a sequence of points $x_n$ converging to $x$ such that $f\\left(x_n\\right)$ does not converge to $f(x)$. If no subsequence of $f\\left(x_n\\right)$ converges, then the sequence $\\left\\{\\left(x_n, f\\left(x_n\\right)\\right\\}_{n=1}^{\\infty}\\right.$ has no convergent subsequence, and so the graph is not compact. If some subsequence of $f\\left(x_n\\right)$ converges, say $f\\left(x_{n_k}\\right) \\rightarrow z$, but $z \\neq f(x)$, then the graph of $f$ fails to contain the limit point $(x, z)$, and hence is not closed. A fortiori it is not compact.\n\\end{proof}", "informal_proof": "If $r$ and $r+x$ were both rational, then $x=r+x-r$ would also be rational."} -{"name": "Rudin_exercise_4_8a", "source": "Rudin.lean", "header": "import Mathlib\n\nopen Topology Filter Real Complex TopologicalSpace Finset\nopen scoped BigOperators\nnoncomputable section\n", "formal_statement": "theorem Rudin_exercise_4_8a\n (E : Set ℝ) (f : ℝ → ℝ) (hf : UniformContinuousOn f E)\n (hE : Bornology.IsBounded E) : Bornology.IsBounded (Set.image f E) := sorry", "formal_proof": null, "informal_stmt": "Let $f$ be a real uniformly continuous function on the bounded set $E$ in $R^{1}$. Prove that $f$ is bounded on $E$.\n\\begin{proof}\n Let $a=\\inf E$ and $b=\\sup E$, and let $\\delta>0$ be such that $|f(x)-f(y)|<1$ if $x, y \\in E$ and $|x-y|<\\delta$. Now choose a positive integer $N$ larger than $(b-a) / \\delta$, and consider the $N$ intervals $I_k=\\left[a+\\frac{k-1}{b-a}, a+\\frac{k}{b-a}\\right], k=1,2, \\ldots, N$. For each $k$ such that $I_k \\cap E \\neq \\varnothing$ let $x_k \\in E \\cap I_k$. Then let $M=1+\\max \\left\\{\\left|f\\left(x_k\\right)\\right|\\right\\}$. If $x \\in E$, we have $\\left|x-x_k\\right|<\\delta$ for some $k$, and hence $|f(x)| f (x n)) := sorry", "formal_proof": null, "informal_stmt": "Suppose $f$ is a uniformly continuous mapping of a metric space $X$ into a metric space $Y$ and prove that $\\left\\{f\\left(x_{n}\\right)\\right\\}$ is a Cauchy sequence in $Y$ for every Cauchy sequence $\\{x_n\\}$ in $X$.\n\\begin{proof}\n Suppose $\\left\\{x_n\\right\\}$ is a Cauchy sequence in $X$. Let $\\varepsilon>0$ be given. Let $\\delta>0$ be such that $d_Y(f(x), f(u))<\\varepsilon$ if $d_X(x, u)<\\delta$. Then choose $N$ so that $d_X\\left(x_n, x_m\\right)<\\delta$ if $n, m>N$. Obviously $d_Y\\left(f\\left(x_n\\right), f\\left(x_m\\right)\\right)<\\varepsilon$ if $m, n>N$, showing that $\\left\\{f\\left(x_n\\right)\\right\\}$ is a Cauchy sequence.\n\\end{proof}", "informal_proof": "If $r$ and $r+x$ were both rational, then $x=r+x-r$ would also be rational."} -{"name": "Rudin_exercise_4_12", "source": "Rudin.lean", "header": "import Mathlib\n\nopen Topology Filter Real Complex TopologicalSpace Finset\nopen scoped BigOperators\nnoncomputable section\n", "formal_statement": "theorem Rudin_exercise_4_12\n {α β γ : Type*} [UniformSpace α] [UniformSpace β] [UniformSpace γ]\n {f : α → β} {g : β → γ}\n (hf : UniformContinuous f) (hg : UniformContinuous g) :\n UniformContinuous (g ∘ f) := sorry", "formal_proof": null, "informal_stmt": "A uniformly continuous function of a uniformly continuous function is uniformly continuous.\n\\begin{proof}\n 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$.\nTo prove this fact, let $\\varepsilon>0$ be given. Then, since $g$ is uniformly continuous, there exists $\\eta>0$ such that $d_Z(g(u), g(v))<\\varepsilon$ if $d_Y(u, v)<\\eta$. Since $f$ is uniformly continuous, there exists $\\delta>0$ such that $d_Y(f(x), f(y))<\\eta$ if $d_X(x, y)<\\delta$\n\nIt is then obvious that $d_Z(g(f(x)), g(f(y)))<\\varepsilon$ if $d_X(x, y)<\\delta$, so that $g \\circ f$ is uniformly continuous.\n\\end{proof}", "informal_proof": "If $r$ and $r+x$ were both rational, then $x=r+x-r$ would also be rational."} -{"name": "Rudin_exercise_4_15", "source": "Rudin.lean", "header": "import Mathlib\n\nopen Topology Filter Real Complex TopologicalSpace Finset\nopen scoped BigOperators\nnoncomputable section\n", "formal_statement": "theorem Rudin_exercise_4_15 {f : ℝ → ℝ}\n (hf : Continuous f) (hof : IsOpenMap f) :\n Monotone f := sorry", "formal_proof": null, "informal_stmt": "Prove that every continuous open mapping of $R^{1}$ into $R^{1}$ is monotonic.\n\\begin{proof}\n Suppose $f$ is continuous and not monotonic, say there exist points $a 0 ∧ ∀ (p q : X), p ∈ K → q ∈ F → dist p q ≥ δ := sorry", "formal_proof": null, "informal_stmt": "Suppose $K$ and $F$ are disjoint sets in a metric space $X, K$ is compact, $F$ is closed. Prove that there exists $\\delta>0$ such that $d(p, q)>\\delta$ if $p \\in K, q \\in F$.\n\\begin{proof}\nFollowing the hint, we observe that $\\rho_F(x)$ must attain its minimum value on $K$, i.e., there is some point $r \\in K$ such that\n$$\n\\rho_F(r)=\\min _{q \\in K} \\rho_F(q) .\n$$\nSince $F$ is closed and $r \\notin F$, it follows from Exercise $4.20$ that $\\rho_F(r)>0$. Let $\\delta$ be any positive number smaller than $\\rho_F(r)$. Then for any $p \\in F, q \\in K$, we have\n$$\nd(p, q) \\geq \\rho_F(q) \\geq \\rho_F(r)>\\delta .\n$$\nThis proves the positive assertion.\n\\end{proof}", "informal_proof": "If $r$ and $r+x$ were both rational, then $x=r+x-r$ would also be rational."} -{"name": "Rudin_exercise_4_24", "source": "Rudin.lean", "header": "import Mathlib\n\nopen Topology Filter Real Complex TopologicalSpace Finset\nopen scoped BigOperators\nnoncomputable section\n", "formal_statement": "theorem Rudin_exercise_4_24 {f : ℝ → ℝ}\n (hf : Continuous f) (a b : ℝ) (hab : a < b)\n (h : ∀ x y : ℝ, a < x → x < b → a < y → y < b → f ((x + y) / 2) ≤ (f x + f y) / 2) :\n ConvexOn ℝ (Set.Ioo a b) f := sorry", "formal_proof": null, "informal_stmt": "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.\n\\begin{proof}\n We shall prove that\n$$\nf(\\lambda x+(1-\\lambda) y) \\leq \\lambda f(x)+(1-\\lambda) f(y)\n$$\nfor 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 (since $\\lambda=0$ or $\\lambda=1$ ). In the case $n=1$ we have $\\lambda=0$ or $\\lambda=1$ or $\\lambda=\\frac{1}{2}$. The first two cases are again trivial, and the third is precisely the hypothesis of the theorem. Suppose the result is proved for $n \\leq r$, and consider $\\lambda=\\frac{k}{2^{r+1}}$. If $k$ is even, say $k=2 l$, then $\\frac{k}{2^{r+1}}=\\frac{l}{2^r}$, and we can appeal to the induction hypothesis. Now suppose $k$ is odd. Then $1 \\leq k \\leq 2^{r+1}-1$, and so the numbers $l=\\frac{k-1}{2}$ and $m=\\frac{k+1}{2}$ are integers with $0 \\leq l c := sorry", "formal_proof": null, "informal_stmt": "Let $f$ be defined for all real $x$, and suppose that $|f(x)-f(y)| \\leq (x-y)^{2}$ for all real $x$ and $y$. Prove that $f$ is constant.\n\\begin{proof}\n Dividing by $x-y$, and letting $x \\rightarrow y$, we find that $f^{\\prime}(y)=0$ for all $y$. Hence $f$ is constant.\n\\end{proof}", "informal_proof": "If $r$ and $r+x$ were both rational, then $x=r+x-r$ would also be rational."} -{"name": "Rudin_exercise_5_2", "source": "Rudin.lean", "header": "import Mathlib\n\nopen Topology Filter Real Complex TopologicalSpace Finset\nopen scoped BigOperators\nnoncomputable section\n", "formal_statement": "theorem Rudin_exercise_5_2 {a b : ℝ}\n {f g : ℝ → ℝ} (hf : ∀ x ∈ Set.Ioo a b, deriv f x > 0)\n (hg : g = f⁻¹)\n (hg_diff : DifferentiableOn ℝ g (Set.Ioo a b)) :\n DifferentiableOn ℝ g (Set.Ioo a b) ∧\n ∀ x ∈ Set.Ioo a b, deriv g x = 1 / deriv f x := sorry", "formal_proof": null, "informal_stmt": "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(a0$. Hence $f(c)0$ there exists $\\eta>0$ such that\n$$\n\\left|\\frac{1}{\\frac{f(x+h)-f(x)}{h}}-\\frac{1}{f^{\\prime}(x)}\\right|<\\varepsilon\n$$\nif $0<|h|<\\eta$. Since $h=g(y+k)-g(y)$, there exists $\\delta>0$ such that $0<|h|<\\eta$ if $0<|k|<\\delta$. The proof is now complete. \n\\end{proof}", "informal_proof": "If $r$ and $r+x$ were both rational, then $x=r+x-r$ would also be rational."} -{"name": "Rudin_exercise_5_3", "source": "Rudin.lean", "header": "import Mathlib\n\nopen Topology Filter Real Complex TopologicalSpace Finset\nopen scoped BigOperators\nnoncomputable section\n", "formal_statement": "theorem Rudin_exercise_5_3 {g : ℝ → ℝ} (hg : Continuous g)\n (hg' : ∃ M : ℝ, ∀ x : ℝ, |deriv g x| ≤ M) :\n ∃ N, ∀ ε > 0, ε < N → Function.Injective (λ x : ℝ => x + ε * g x) := sorry", "formal_proof": null, "informal_stmt": "Suppose $g$ is a real function on $R^{1}$, with bounded derivative (say $\\left|g^{\\prime}\\right| \\leq M$ ). Fix $\\varepsilon>0$, and define $f(x)=x+\\varepsilon g(x)$. Prove that $f$ is one-to-one if $\\varepsilon$ is small enough.\n\\begin{proof}\n If $0<\\varepsilon<\\frac{1}{M}$, we certainly have\n$$\nf^{\\prime}(x) \\geq 1-\\varepsilon M>0,\n$$\nand this implies that $f(x)$ is one-to-one, by the preceding problem.\n\\end{proof}", "informal_proof": "If $r$ and $r+x$ were both rational, then $x=r+x-r$ would also be rational."} -{"name": "Rudin_exercise_5_4", "source": "Rudin.lean", "header": "import Mathlib\n\nopen Topology Filter Real Complex TopologicalSpace Finset\nopen scoped BigOperators\nnoncomputable section\n", "formal_statement": "theorem Rudin_exercise_5_4 {n : ℕ}\n (C : ℕ → ℝ)\n (hC : ∑ i ∈ (range (n + 1)), (C i) / (i + 1) = 0) :\n ∃ x, x ∈ (Set.Icc (0 : ℝ) 1) ∧ ∑ i ∈ range (n + 1), (C i) * (x^i) = 0 := sorry", "formal_proof": null, "informal_stmt": "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.\n\\begin{proof}\n Consider the polynomial\n$$\np(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},\n$$\nwhose derivative is\n$$\np^{\\prime}(x)=C_0+C_1 x+\\cdots+C_{n-1} x^{n-1}+C_n x^n .\n$$\nIt is obvious that $p(0)=0$, and the hypothesis of the problem is that $p(1)=0$. Hence Rolle's theorem implies that $p^{\\prime}(x)=0$ for some $x$ between 0 and 1 .\n\\end{proof}", "informal_proof": "If $r$ and $r+x$ were both rational, then $x=r+x-r$ would also be rational."} -{"name": "Rudin_exercise_5_5", "source": "Rudin.lean", "header": "import Mathlib\n\nopen Topology Filter Real Complex TopologicalSpace Finset\nopen scoped BigOperators\nnoncomputable section\n", "formal_statement": "theorem Rudin_exercise_5_5\n {f : ℝ → ℝ}\n (hfd : Differentiable ℝ f)\n (hf : Tendsto (deriv f) atTop (𝓝 0)) :\n Tendsto (λ x => f (x + 1) - f x) atTop atTop := sorry", "formal_proof": null, "informal_stmt": "Suppose $f$ is defined and differentiable for every $x>0$, and $f^{\\prime}(x) \\rightarrow 0$ as $x \\rightarrow+\\infty$. Put $g(x)=f(x+1)-f(x)$. Prove that $g(x) \\rightarrow 0$ as $x \\rightarrow+\\infty$.\n\\begin{proof}\n Let $\\varepsilon>0$. Choose $x_0$ such that $\\left|f^{\\prime}(x)\\right|<\\varepsilon$ if $x>x_0$. Then for any $x \\geq x_0$ there exists $x_1 \\in(x, x+1)$ such that\n$$\nf(x+1)-f(x)=f^{\\prime}\\left(x_1\\right) .\n$$\nSince $\\left|f^{\\prime}\\left(x_1\\right)\\right|<\\varepsilon$, it follows that $|f(x+1)-f(x)|<\\varepsilon$, as required.\n\\end{proof}", "informal_proof": "If $r$ and $r+x$ were both rational, then $x=r+x-r$ would also be rational."} -{"name": "Rudin_exercise_5_6", "source": "Rudin.lean", "header": "import Mathlib\n\nopen Topology Filter Real Complex TopologicalSpace Finset\nopen scoped BigOperators\nnoncomputable section\n", "formal_statement": "theorem Rudin_exercise_5_6\n {f : ℝ → ℝ}\n (hf1 : Continuous f)\n (hf2 : ∀ x, DifferentiableAt ℝ f x)\n (hf3 : f 0 = 0)\n (hf4 : Monotone (deriv f)) :\n MonotoneOn (λ x => f x / x) (Set.Ioi 0) := sorry", "formal_proof": null, "informal_stmt": "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.\n\\begin{proof}\n Put\n$$\ng(x)=\\frac{f(x)}{x} \\quad(x>0)\n$$\nand prove that $g$ is monotonically increasing.\nBy the mean-value theorem\n$$\nf(x)=f(x)-f(0)=f^{\\prime}(c) x\n$$\nfor some $c \\in(0, x)$. Since $f^{\\prime}$ is monotonically increasing, this result implies that $f(x)0,\n$$\nso that $g$ is also monotonically increasing.\n\\end{proof}", "informal_proof": "If $r$ and $r+x$ were both rational, then $x=r+x-r$ would also be rational."} -{"name": "Rudin_exercise_5_7", "source": "Rudin.lean", "header": "import Mathlib\n\nopen Topology Filter Real Complex TopologicalSpace Finset\nopen scoped BigOperators\nnoncomputable section\n", "formal_statement": "theorem Rudin_exercise_5_7\n {f g : ℝ → ℝ} {x : ℝ}\n (hf' : DifferentiableAt ℝ f 0)\n (hg' : DifferentiableAt ℝ g 0)\n (hg'_ne_0 : deriv g 0 ≠ 0)\n (f0 : f 0 = 0) (g0 : g 0 = 0) :\n Tendsto (λ x => f x / g x) (𝓝 x) (𝓝 (deriv f x / deriv g x)) := sorry", "formal_proof": null, "informal_stmt": "Suppose $f^{\\prime}(x), g^{\\prime}(x)$ exist, $g^{\\prime}(x) \\neq 0$, and $f(x)=g(x)=0$. Prove that $\\lim _{t \\rightarrow x} \\frac{f(t)}{g(t)}=\\frac{f^{\\prime}(x)}{g^{\\prime}(x)}.$\n\\begin{proof}\n Since $f(x)=g(x)=0$, we have\n$$\n\\begin{aligned}\n\\lim _{t \\rightarrow x} \\frac{f(t)}{g(t)} &=\\lim _{t \\rightarrow x} \\frac{\\frac{f(t)-f(x)}{t-x}}{\\frac{g(t)-g(x)}{t-x}} \\\\\n&=\\frac{\\lim _{t \\rightarrow x} \\frac{f(t)-f(x)}{t-x}}{\\lim _{t \\rightarrow x} \\frac{g(t)-g(x)}{t-x}} \\\\\n&=\\frac{f^{\\prime}(x)}{g^{\\prime}(x)}\n\\end{aligned}\n$$\n\\end{proof}", "informal_proof": "If $r$ and $r+x$ were both rational, then $x=r+x-r$ would also be rational."} -{"name": "Rudin_exercise_5_15", "source": "Rudin.lean", "header": "import Mathlib\n\nopen Topology Filter Real Complex TopologicalSpace Finset\nopen scoped BigOperators\nnoncomputable section\n", "formal_statement": "theorem Rudin_exercise_5_15 {f : ℝ → ℝ} (a M0 M1 M2 : ℝ)\n (hf' : DifferentiableOn ℝ f (Set.Ici a))\n (hf'' : DifferentiableOn ℝ (deriv f) (Set.Ici a))\n (hM0 : M0 = sSup {(|f x|) | x ∈ (Set.Ici a)})\n (hM1 : M1 = sSup {(|deriv f x|) | x ∈ (Set.Ici a)})\n (hM2 : M2 = sSup {(|deriv (deriv f) x|) | x ∈ (Set.Ici a)}) :\n (M1 ^ 2) ≤ 4 * M0 * M2 := sorry", "formal_proof": null, "informal_stmt": "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} .$\n\\begin{proof}\n 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\n$$\n\\left|f^{\\prime}(x)\\right| \\leq 2 \\sqrt{M_0 M_2}\n$$\nfor all $x>a$. We note that this is obvious if $M_2=0$, since in that case $f^{\\prime}(x)$ is constant, $f(x)$ is a linear function, and the only bounded linear function is a constant, whose derivative is zero. Hence we shall assume from now on that $0-1$. Now $f^{\\prime}(x)=\\frac{4 x}{\\left(x^2+1\\right)^2}$ for $x>0$ and $f^{\\prime}(x)=4 x$ for $x<0$. It thus follows from Exercise 9 above that $f^{\\prime}(0)=0$, and that $f^{\\prime}(x)$ is continuous. Likewise $f^{\\prime \\prime}(x)=4$ for $x<0$ and $f^{\\prime \\prime}(x)=\\frac{4-4 x^2}{\\left(x^2+1\\right)^3}=-4 \\frac{x^2-1}{\\left(x^2+1\\right)^3}$. This shows that $\\left|f^{\\prime \\prime}(x)\\right|<4$ for $x>0$ and also that $\\lim _{x \\rightarrow 0} f^{\\prime \\prime}(x)=4$. Hence Exercise 9 again implies that $f^{\\prime \\prime}(x)$ is continuous and $f^{\\prime \\prime}(0)=4$.\n\nOn $n$-dimensional space let $\\mathbf{f}(x)=\\left(f_1(x), \\ldots, f_n(x)\\right), M_0=\\sup |\\mathbf{f}(x)|$, $M_1=\\sup \\left|\\mathbf{f}^{\\prime}(x)\\right|$, and $M_2=\\sup \\left|\\mathbf{f}^{\\prime \\prime}(x)\\right|$. Just as in the numerical case, there is nothing to prove if $M_2=0$ or $M_0=+\\infty$ or $M_2=+\\infty$, and so we assume $0a$, and let $\\mathbf{u}=\\frac{1}{\\left|\\mathbf{f}^{\\prime}\\left(x_0\\right)\\right|} \\mathbf{f}^{\\prime}\\left(x_0\\right)$. Consider the real-valued function $\\varphi(x)=\\mathrm{u} \\cdot \\mathrm{f}(x)$. Let $N_0, N_1$, and $N_2$ be the suprema of $|\\varphi(x)|,\\left|\\varphi^{\\prime}(x)\\right|$, and $\\left|\\varphi^{\\prime \\prime}(x)\\right|$ respectively. By the Schwarz inequality we have (since $|\\mathbf{u}|=1) N_0 \\leq M_0$ and $N_2 \\leq M_2$, while $N_1 \\geq \\varphi\\left(x_0\\right)=\\left|\\mathbf{f}^{\\prime}\\left(x_0\\right)\\right|>a$. We therefore have $a^2<4 N_0 N_2 \\leq 4 M_0 M_2$. Since $a$ was any positive number less than $M_1$, we have $M_1^2 \\leq 4 M_0 M_2$, i.e., the result holds also for vector-valued functions.\n\nEquality can hold on any $R^n$, as we see by taking $\\mathbf{f}(x)=(f(x), 0, \\ldots, 0)$ or $\\mathbf{f}(x)=(f(x), f(x), \\ldots, f(x))$, where $f(x)$ is a real-valued function for which equality holds.\n\n\\end{proof}", "informal_proof": "If $r$ and $r+x$ were both rational, then $x=r+x-r$ would also be rational."} -{"name": "Rudin_exercise_5_17", "source": "Rudin.lean", "header": "import Mathlib\n\nopen Topology Filter Real Complex TopologicalSpace Finset\nopen scoped BigOperators\nnoncomputable section\n", "formal_statement": "theorem Rudin_exercise_5_17\n {f : ℝ → ℝ}\n (hf' : DifferentiableOn ℝ f (Set.Icc (-1) 1))\n (hf'' : DifferentiableOn ℝ (deriv f) (Set.Icc 1 1))\n (hf''' : DifferentiableOn ℝ (deriv (deriv f)) (Set.Icc 1 1))\n (hf0 : f (-1) = 0)\n (hf1 : f 0 = 0)\n (hf2 : f 1 = 1)\n (hf3 : deriv f 0 = 0) :\n ∃ x, x ∈ Set.Ioo (-1 : ℝ) 1 ∧ deriv (deriv (deriv f)) x ≥ 3 := sorry", "formal_proof": null, "informal_stmt": "Suppose $f$ is a real, three times differentiable function on $[-1,1]$, such that $f(-1)=0, \\quad f(0)=0, \\quad f(1)=1, \\quad f^{\\prime}(0)=0 .$ Prove that $f^{(3)}(x) \\geq 3$ for some $x \\in(-1,1)$.\n\\begin{proof}\n Following the hint, we observe that Theorem $5.15$ (Taylor's formula with remainder) implies that\n$$\n\\begin{aligned}\nf(1) &=f(0)+f^{\\prime}(0)+\\frac{1}{2} f^{\\prime \\prime}(0)+\\frac{1}{6} f^{(3)}(s) \\\\\nf(-1) &=f(0)-f^{\\prime}(0)+\\frac{1}{2} f^{\\prime \\prime}(0)-\\frac{1}{6} f^{(3)}(t)\n\\end{aligned}\n$$\nfor some $s \\in(0,1), t \\in(-1,0)$. By subtracting the second equation from the first and using the given values of $f(1), f(-1)$, and $f^{\\prime}(0)$, we obtain\n$$\n1=\\frac{1}{6}\\left(f^{(3)}(s)+f^{(3)}(t)\\right),\n$$\nwhich is the desired result. Note that we made no use of the hypothesis $f(0)=0$.\n\\end{proof}\n\n\n\n\\end{document}", "informal_proof": "If $r$ and $r+x$ were both rational, then $x=r+x-r$ would also be rational."} -{"name": "Putnam_exercise_2020_b5", "source": "Putnam.lean", "header": "import Mathlib\n\nopen scoped BigOperators\n", "formal_statement": "theorem Putnam_exercise_2020_b5 (z : Fin 4 → ℂ) (hz0 : ∀ n, ‖z n‖ < 1)\n (hz1 : ∀ n : Fin 4, z n ≠ 1) :\n 3 - z 0 - z 1 - z 2 - z 3 + (z 0) * (z 1) * (z 2) * (z 3) ≠ 0 := sorry", "formal_proof": null, "informal_stmt": "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 .$\n\\begin{proof}\n 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.\n\nTo this end, let $z_1=e^{\\alpha i}, z_2=e^{\\beta i}, z_3=e^{\\gamma i}$ and \n\\[\nf(\\alpha, \\beta, \\gamma)=|3-z_1-z_2-z_3|^2-|1-z_1z_2z_3|^2.\n\\]\n A routine calculation shows that \n\\begin{align*}\nf(\\alpha, \\beta, \\gamma)&=\n10 - 6\\cos(\\alpha) - 6\\cos(\\beta) - 6\\cos(\\gamma) \\\\\n&\\quad + 2\\cos(\\alpha + \\beta + \\gamma) + 2\\cos(\\alpha - \\beta) \\\\\n&\\quad + 2\\cos(\\beta - \\gamma) + 2\\cos(\\gamma - \\alpha).\n\\end{align*}\nSince the function $f$ is continuously differentiable, and periodic in each variable, $f$ has a maximum and a minimum and it attains these values only at points where $\\nabla f=(0,0,0)$. A routine calculation now shows that \n\\begin{align*}\n\\frac{\\partial f}{\\partial \\alpha} + \\frac{\\partial f}{\\partial \\beta} + \\frac{\\partial f}{\\partial \\gamma} &=\n6(\\sin(\\alpha) +\\sin(\\beta)+\\sin(\\gamma)- \\sin(\\alpha + \\beta + \\gamma)) \\\\\n&=\n24\\sin\\left(\\frac{\\alpha+\\beta}{2}\\right) \\sin\\left(\\frac{\\beta+\\gamma}{2}\\right)\n\\sin\\left(\\frac{\\gamma+\\alpha}{2}\\right).\n\\end{align*}\nHence every critical point of $f$ must satisfy one of $z_1z_2=1$, $z_2z_3=1$, or $z_3z_1=1$. By symmetry, let us assume that $z_1z_2=1$. Then \n\\[\nf = |3-2\\mathrm{Re}(z_1)-z_3|^2-|1-z_3|^2;\n\\]\nsince $3-2\\mathrm{Re}(z_1)\\ge 1$, $f$ is nonnegative and can be zero only if the real part of $z_1$, and hence also $z_1$ itself, is equal to $1$. \n\\end{proof}", "informal_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_2-z_3|^2-|1-z_1z_2z_3|^2. \\] A routine calculation shows that \\begin{align*} f(\\alpha, \\beta, \\gamma)&= 10 - 6\\cos(\\alpha) - 6\\cos(\\beta) - 6\\cos(\\gamma) \\\\ &\\quad + 2\\cos(\\alpha + \\beta + \\gamma) + 2\\cos(\\alpha - \\beta) \\\\ &\\quad + 2\\cos(\\beta - \\gamma) + 2\\cos(\\gamma - \\alpha). \\end{align*} Since the function $f$ is continuously differentiable, and periodic in each variable, $f$ has a maximum and a minimum and it attains these values only at points where $\\nabla f=(0,0,0)$. A routine calculation now shows that \\begin{align*} \\frac{\\partial f}{\\partial \\alpha} + \\frac{\\partial f}{\\partial \\beta} + \\frac{\\partial f}{\\partial \\gamma} &= 6(\\sin(\\alpha) +\\sin(\\beta)+\\sin(\\gamma)- \\sin(\\alpha + \\beta + \\gamma)) \\\\ &= 24\\sin\\left(\\frac{\\alpha+\\beta}{2}\\right) \\sin\\left(\\frac{\\beta+\\gamma}{2}\\right) \\sin\\left(\\frac{\\gamma+\\alpha}{2}\\right). \\end{align*} Hence every critical point of $f$ must satisfy one of $z_1z_2=1$, $z_2z_3=1$, or $z_3z_1=1$. By symmetry, let us assume that $z_1z_2=1$. Then \\[ f = |3-2\\mathrm{Re}(z_1)-z_3|^2-|1-z_3|^2; \\] since $3-2\\mathrm{Re}(z_1)\\ge 1$, $f$ is nonnegative and can be zero only if the real part of $z_1$, and hence also $z_1$ itself, is equal to $1$."} -{"name": "Putnam_exercise_2018_a5", "source": "Putnam.lean", "header": "import Mathlib\n\nopen scoped BigOperators\n", "formal_statement": "theorem Putnam_exercise_2018_a5 (f : ℝ → ℝ) (hf : ContDiff ℝ ⊤ f)\n (hf0 : f 0 = 0) (hf1 : f 1 = 1) (hf2 : ∀ x, f x ≥ 0) :\n ∃ (n : ℕ) (x : ℝ), iteratedDeriv n f x = 0 := sorry", "formal_proof": null, "informal_stmt": "Let $f: \\mathbb{R} \\rightarrow \\mathbb{R}$ be an infinitely differentiable function satisfying $f(0)=0, f(1)=1$, and $f(x) \\geq 0$ for all $x \\in$ $\\mathbb{R}$. Show that there exist a positive integer $n$ and a real number $x$ such that $f^{(n)}(x)<0$.\n\\begin{proof}\n Call a function $f\\colon \\mathbb{R} \\to \\mathbb{R}$ \\textit{ultraconvex} if $f$ is infinitely differentiable and $f^{(n)}(x) \\geq 0$ for all $n \\geq 0$ and all $x \\in \\mathbb{R}$, where $f^{(0)}(x) = f(x)$;\nnote that if $f$ is ultraconvex, then so is $f'$.\nDefine the set\n\\[\nS = \\{ f :\\thinspace \\mathbb{R} \\to \\mathbb{R} \\,|\\,f \\text{ ultraconvex and } f(0)=0\\}.\n\\]\nFor $f \\in S$, we must have $f(x) = 0$ for all $x < 0$: if $f(x_0) > 0$ for some $x_0 < 0$, then\nby the mean value theorem there exists $x \\in (0,x_0)$ for which $f'(x) = \\frac{f(x_0)}{x_0} < 0$.\nIn particular, $f'(0) = 0$, so $f' \\in S$ also.\n\nWe show by induction that for all $n \\geq 0$,\n\\[\nf(x) \\leq \\frac{f^{(n)}(1)}{n!} x^n \\qquad (f \\in S, x \\in [0,1]).\n\\]\nWe induct with base case $n=0$, which holds because any $f \\in S$ is nondecreasing. Given the claim for $n=m$,\nwe apply the induction hypothesis to $f' \\in S$ to see that\n\\[\nf'(t) \\leq \\frac{f^{(n+1)}(1)}{n!} t^n \\qquad (t \\in [0,1]),\n\\]\nthen integrate both sides from $0$ to $x$ to conclude.\n\nNow for $f \\in S$, we have $0 \\leq f(1) \\leq \\frac{f^{(n)}(1)}{n!}$ for all $n \\geq 0$. \nOn the other hand, by Taylor's theorem with remainder,\n\\[\nf(x) \\geq \\sum_{k=0}^n \\frac{f^{(k)}(1)}{k!}(x-1)^k \\qquad (x \\geq 1).\n\\]\nApplying this with $x=2$, we obtain $f(2) \\geq \\sum_{k=0}^n \\frac{f^{(k)}(1)}{k!}$ for all $n$;\nthis implies that $\\lim_{n\\to\\infty} \\frac{f^{(n)}(1)}{n!} = 0$.\nSince $f(1) \\leq \\frac{f^{(n)}(1)}{n!}$, we must have $f(1) = 0$.\n\nFor $f \\in S$, we proved earlier that $f(x) = 0$ for all $x\\leq 0$, as well as for $x=1$. Since\nthe function $g(x) = f(cx)$ is also ultraconvex for $c>0$, we also have $f(x) = 0$ for all $x>0$;\nhence $f$ is identically zero.\n\nTo sum up, if $f\\colon \\mathbb{R} \\to \\mathbb{R}$ is infinitely differentiable, $f(0)=0$, and $f(1) = 1$,\nthen $f$ cannot be ultraconvex. This implies the desired result.\n\\end{proof}", "informal_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_2-z_3|^2-|1-z_1z_2z_3|^2. \\] A routine calculation shows that \\begin{align*} f(\\alpha, \\beta, \\gamma)&= 10 - 6\\cos(\\alpha) - 6\\cos(\\beta) - 6\\cos(\\gamma) \\\\ &\\quad + 2\\cos(\\alpha + \\beta + \\gamma) + 2\\cos(\\alpha - \\beta) \\\\ &\\quad + 2\\cos(\\beta - \\gamma) + 2\\cos(\\gamma - \\alpha). \\end{align*} Since the function $f$ is continuously differentiable, and periodic in each variable, $f$ has a maximum and a minimum and it attains these values only at points where $\\nabla f=(0,0,0)$. A routine calculation now shows that \\begin{align*} \\frac{\\partial f}{\\partial \\alpha} + \\frac{\\partial f}{\\partial \\beta} + \\frac{\\partial f}{\\partial \\gamma} &= 6(\\sin(\\alpha) +\\sin(\\beta)+\\sin(\\gamma)- \\sin(\\alpha + \\beta + \\gamma)) \\\\ &= 24\\sin\\left(\\frac{\\alpha+\\beta}{2}\\right) \\sin\\left(\\frac{\\beta+\\gamma}{2}\\right) \\sin\\left(\\frac{\\gamma+\\alpha}{2}\\right). \\end{align*} Hence every critical point of $f$ must satisfy one of $z_1z_2=1$, $z_2z_3=1$, or $z_3z_1=1$. By symmetry, let us assume that $z_1z_2=1$. Then \\[ f = |3-2\\mathrm{Re}(z_1)-z_3|^2-|1-z_3|^2; \\] since $3-2\\mathrm{Re}(z_1)\\ge 1$, $f$ is nonnegative and can be zero only if the real part of $z_1$, and hence also $z_1$ itself, is equal to $1$."} -{"name": "Putnam_exercise_2018_b2", "source": "Putnam.lean", "header": "import Mathlib\n\nopen scoped BigOperators\n", "formal_statement": "theorem Putnam_exercise_2018_b2 (n : ℕ) (hn : n > 0) (f : ℕ → ℂ → ℂ)\n (hf : ∀ n : ℕ, f n = λ (z : ℂ) => (∑ i : Fin n, (n-i)* z^(i : ℕ))) :\n ¬ (∃ z : ℂ, ‖z‖ ≤ 1 ∧ f n z = 0) := sorry", "formal_proof": null, "informal_stmt": "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\\}$.\n\\begin{proof}\n Note first that $f_n(1) > 0$, so $1$ is not a root of $f_n$.\nNext, note that\n\\[\n(z-1)f_n(z) = z^n + \\cdots + z - n;\n\\]\nhowever, for $\\left| z \\right| \\leq 1$, we have \n$\\left| z^n + \\cdots + z \\right| \\leq n$ by the triangle inequality;\nequality can only occur if $z,\\dots,z^n$ have norm 1 and the same argument, which only happens for $z=1$.\nThus there can be no root of $f_n$ with $|z| \\leq 1$.\n\\end{proof}", "informal_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_2-z_3|^2-|1-z_1z_2z_3|^2. \\] A routine calculation shows that \\begin{align*} f(\\alpha, \\beta, \\gamma)&= 10 - 6\\cos(\\alpha) - 6\\cos(\\beta) - 6\\cos(\\gamma) \\\\ &\\quad + 2\\cos(\\alpha + \\beta + \\gamma) + 2\\cos(\\alpha - \\beta) \\\\ &\\quad + 2\\cos(\\beta - \\gamma) + 2\\cos(\\gamma - \\alpha). \\end{align*} Since the function $f$ is continuously differentiable, and periodic in each variable, $f$ has a maximum and a minimum and it attains these values only at points where $\\nabla f=(0,0,0)$. A routine calculation now shows that \\begin{align*} \\frac{\\partial f}{\\partial \\alpha} + \\frac{\\partial f}{\\partial \\beta} + \\frac{\\partial f}{\\partial \\gamma} &= 6(\\sin(\\alpha) +\\sin(\\beta)+\\sin(\\gamma)- \\sin(\\alpha + \\beta + \\gamma)) \\\\ &= 24\\sin\\left(\\frac{\\alpha+\\beta}{2}\\right) \\sin\\left(\\frac{\\beta+\\gamma}{2}\\right) \\sin\\left(\\frac{\\gamma+\\alpha}{2}\\right). \\end{align*} Hence every critical point of $f$ must satisfy one of $z_1z_2=1$, $z_2z_3=1$, or $z_3z_1=1$. By symmetry, let us assume that $z_1z_2=1$. Then \\[ f = |3-2\\mathrm{Re}(z_1)-z_3|^2-|1-z_3|^2; \\] since $3-2\\mathrm{Re}(z_1)\\ge 1$, $f$ is nonnegative and can be zero only if the real part of $z_1$, and hence also $z_1$ itself, is equal to $1$."} -{"name": "Putnam_exercise_2018_b4", "source": "Putnam.lean", "header": "import Mathlib\n\nopen scoped BigOperators\n", "formal_statement": "theorem Putnam_exercise_2018_b4 (a : ℝ) (x : ℕ → ℝ) (hx0 : x 0 = a)\n (hx1 : x 1 = a)\n (hxn : ∀ n : ℕ, n ≥ 2 → x (n+1) = 2*(x n)*(x (n-1)) - x (n-2))\n (h : ∃ n, x n = 0) :\n ∃ c, Function.Periodic x c := sorry", "formal_proof": null, "informal_stmt": "Given a real number $a$, we define a sequence by $x_{0}=1$, $x_{1}=x_{2}=a$, and $x_{n+1}=2 x_{n} x_{n-1}-x_{n-2}$ for $n \\geq 2$. Prove that if $x_{n}=0$ for some $n$, then the sequence is periodic.\n\\begin{proof}\n We first rule out the case $|a|>1$. In this case, we prove that $|x_{n+1}| \\geq |x_n|$ for all $n$, meaning that we cannot have $x_n = 0$. We proceed by induction; the claim is true for $n=0,1$ by hypothesis. To prove the claim for $n \\geq 2$, write\n\\begin{align*}\n|x_{n+1}| &= |2x_nx_{n-1}-x_{n-2}| \\\\\n&\\geq 2|x_n||x_{n-1}|-|x_{n-2}| \\\\\n&\\geq |x_n|(2|x_{n-1}|-1) \\geq |x_n|,\n\\end{align*} \nwhere the last step follows from $|x_{n-1}| \\geq |x_{n-2}| \\geq \\cdots \\geq |x_0| = 1$.\n\nWe may thus assume hereafter that $|a|\\leq 1$. We can then write $a = \\cos b$ for some $b \\in [0,\\pi]$. \nLet $\\{F_n\\}$ be the Fibonacci sequence, defined as usual by $F_1=F_2=1$ and $F_{n+1}=F_n+F_{n-1}$. We show by induction that\n\\[\nx_n = \\cos(F_n b) \\qquad (n \\geq 0).\n\\]\nIndeed, this is true for $n=0,1,2$; given that it is true for $n \\leq m$, then\n\\begin{align*}\n2x_mx_{m-1}&=2\\cos(F_mb)\\cos(F_{m-1}b) \\\\\n&= \\cos((F_m-F_{m-1})b)+\\cos((F_m+F_{m-1})b) \\\\\n&= \\cos(F_{m-2}b)+\\cos(F_{m+1}b)\n\\end{align*}\nand so \n$x_{m+1} = 2x_mx_{m-1}-x_{m-2} = \\cos(F_{m+1}b)$. This completes the induction.\n\n\nSince $x_n = \\cos(F_n b)$, if $x_n=0$ for some $n$ then $F_n b = \\frac{k}{2} \\pi$ for some odd integer $k$. In particular, we can write $b = \\frac{c}{d}(2\\pi)$ where $c = k$ and $d = 4F_n$ are integers.\n\n\nLet $x_n$ denote the pair $(F_n,F_{n+1})$, where each entry in this pair is viewed as an element of $\\mathbb{Z}/d\\mathbb{Z}$. Since there are only finitely many possibilities for $x_n$, there must be some $n_2>n_1$ such that $x_{n_1}=x_{n_2}$. Now $x_n$ uniquely determines both $x_{n+1}$ and $x_{n-1}$, and it follows that the sequence $\\{x_n\\}$ is periodic: for $\\ell = n_2-n_1$, $x_{n+\\ell} = x_n$ for all $n \\geq 0$. In particular, $F_{n+\\ell} \\equiv F_n \\pmod{d}$ for all $n$. But then $\\frac{F_{n+\\ell}c}{d}-\\frac{F_n c}{d}$ is an integer, and so\n\\begin{align*}\nx_{n+\\ell} &= \\cos\\left(\\frac{F_{n+\\ell}c}{d}(2\\pi)\\right)\\\\\n& = \\cos\\left(\\frac{F_n c}{d}(2\\pi)\\right) = x_n\n\\end{align*}\nfor all $n$. Thus the sequence $\\{x_n\\}$ is periodic, as desired.\n\\end{proof}", "informal_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_2-z_3|^2-|1-z_1z_2z_3|^2. \\] A routine calculation shows that \\begin{align*} f(\\alpha, \\beta, \\gamma)&= 10 - 6\\cos(\\alpha) - 6\\cos(\\beta) - 6\\cos(\\gamma) \\\\ &\\quad + 2\\cos(\\alpha + \\beta + \\gamma) + 2\\cos(\\alpha - \\beta) \\\\ &\\quad + 2\\cos(\\beta - \\gamma) + 2\\cos(\\gamma - \\alpha). \\end{align*} Since the function $f$ is continuously differentiable, and periodic in each variable, $f$ has a maximum and a minimum and it attains these values only at points where $\\nabla f=(0,0,0)$. A routine calculation now shows that \\begin{align*} \\frac{\\partial f}{\\partial \\alpha} + \\frac{\\partial f}{\\partial \\beta} + \\frac{\\partial f}{\\partial \\gamma} &= 6(\\sin(\\alpha) +\\sin(\\beta)+\\sin(\\gamma)- \\sin(\\alpha + \\beta + \\gamma)) \\\\ &= 24\\sin\\left(\\frac{\\alpha+\\beta}{2}\\right) \\sin\\left(\\frac{\\beta+\\gamma}{2}\\right) \\sin\\left(\\frac{\\gamma+\\alpha}{2}\\right). \\end{align*} Hence every critical point of $f$ must satisfy one of $z_1z_2=1$, $z_2z_3=1$, or $z_3z_1=1$. By symmetry, let us assume that $z_1z_2=1$. Then \\[ f = |3-2\\mathrm{Re}(z_1)-z_3|^2-|1-z_3|^2; \\] since $3-2\\mathrm{Re}(z_1)\\ge 1$, $f$ is nonnegative and can be zero only if the real part of $z_1$, and hence also $z_1$ itself, is equal to $1$."} -{"name": "Putnam_exercise_2017_b3", "source": "Putnam.lean", "header": "import Mathlib\n\nopen scoped BigOperators\n", "formal_statement": "theorem Putnam_exercise_2017_b3 (f : ℝ → ℝ) (c : ℕ → ℝ)\n (hf : f = λ x => (∑' (i : ℕ), (c i) * x^i))\n (hc : ∀ n, c n = 0 ∨ c n = 1)\n (hf1 : f (2/3) = 3/2) :\n Irrational (f (1/2)) := sorry", "formal_proof": null, "informal_stmt": "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.\n\\begin{proof}\n 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\n$c_i = c_{m+i}$ for all $i \\geq n$. We may then write\n\\[\nf(x) = \\sum_{i=0}^{n-1} c_i x^i + \\frac{x^n}{1-x^m} \\sum_{i=0}^{m-1} c_{n+i} x^i.\n\\]\nEvaluating at $x = 2/3$, we may equate $f(2/3) = 3/2$ with \n\\[\n\\frac{1}{3^{n-1}} \\sum_{i=0}^{n-1} c_i 2^i 3^{n-i-1} + \\frac{2^n 3^m}{3^{n+m-1}(3^m-2^m)} \\sum_{i=0}^{m-1} c_{n+i} 2^i 3^{m-1-i};\n\\]\nsince all terms on the right-hand side have odd denominator, the same must be true of the sum, a contradiction.\n\\end{proof}", "informal_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_2-z_3|^2-|1-z_1z_2z_3|^2. \\] A routine calculation shows that \\begin{align*} f(\\alpha, \\beta, \\gamma)&= 10 - 6\\cos(\\alpha) - 6\\cos(\\beta) - 6\\cos(\\gamma) \\\\ &\\quad + 2\\cos(\\alpha + \\beta + \\gamma) + 2\\cos(\\alpha - \\beta) \\\\ &\\quad + 2\\cos(\\beta - \\gamma) + 2\\cos(\\gamma - \\alpha). \\end{align*} Since the function $f$ is continuously differentiable, and periodic in each variable, $f$ has a maximum and a minimum and it attains these values only at points where $\\nabla f=(0,0,0)$. A routine calculation now shows that \\begin{align*} \\frac{\\partial f}{\\partial \\alpha} + \\frac{\\partial f}{\\partial \\beta} + \\frac{\\partial f}{\\partial \\gamma} &= 6(\\sin(\\alpha) +\\sin(\\beta)+\\sin(\\gamma)- \\sin(\\alpha + \\beta + \\gamma)) \\\\ &= 24\\sin\\left(\\frac{\\alpha+\\beta}{2}\\right) \\sin\\left(\\frac{\\beta+\\gamma}{2}\\right) \\sin\\left(\\frac{\\gamma+\\alpha}{2}\\right). \\end{align*} Hence every critical point of $f$ must satisfy one of $z_1z_2=1$, $z_2z_3=1$, or $z_3z_1=1$. By symmetry, let us assume that $z_1z_2=1$. Then \\[ f = |3-2\\mathrm{Re}(z_1)-z_3|^2-|1-z_3|^2; \\] since $3-2\\mathrm{Re}(z_1)\\ge 1$, $f$ is nonnegative and can be zero only if the real part of $z_1$, and hence also $z_1$ itself, is equal to $1$."} -{"name": "Putnam_exercise_2014_a5", "source": "Putnam.lean", "header": "import Mathlib\n\nopen scoped BigOperators\n", "formal_statement": "theorem Putnam_exercise_2014_a5 (P : ℕ → Polynomial ℤ)\n (hP : ∀ n, P n = ∑ i : Fin n, (n+1) * Polynomial.X ^ n) :\n ∀ (j k : ℕ), j ≠ k → IsCoprime (P j) (P k) := sorry", "formal_proof": null, "informal_stmt": "Let\n$P_n(x)=1+2 x+3 x^2+\\cdots+n x^{n-1} .$ Prove that the polynomials $P_j(x)$ and $P_k(x)$ are relatively prime for all positive integers $j$ and $k$ with $j \\neq k$.\n\\begin{proof}\n Suppose to the contrary that there exist positive integers $i \\neq j$ and a complex number $z$ such that $P_i(z) = P_j(z) = 0$. Note that $z$ cannot be a nonnegative real number or else $P_i(z), P_j(z) > 0$; we may put $w = z^{-1} \\neq 0,1$. For $n \\in \\{i+1,j+1\\}$ we compute that\n\\[\nw^n = n w - n + 1,\n\\qquad \\overline{w}^n = n \\overline{w} - n + 1;\n\\]\nnote crucially that these equations also hold for $n \\in \\{0,1\\}$.\nTherefore, the function $f: [0, +\\infty) \\to \\mathbb{R}$ given by\n\\[\nf(t) = \\left| w \\right|^{2t} - t^2 \\left| w \\right|^2 + 2t(t-1)\\mathrm{Re}(w) - (t-1)^2\n\\]\nsatisfies $f(t) = 0$ for $t \\in \\{0,1,i+1,j+1\\}$. On the other hand, for all $t \\geq 0$ we have\n\\[\nf'''(t) = (2 \\log \\left| w \\right|)^3 \\left| w \\right|^{2t} > 0,\n\\]\nso by Rolle's theorem, the equation $f^{(3-k)}(t) = 0$ has at most $k$ distinct solutions for $k=0,1,2,3$. This yields the desired contradiction.\n\\end{proof}", "informal_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_2-z_3|^2-|1-z_1z_2z_3|^2. \\] A routine calculation shows that \\begin{align*} f(\\alpha, \\beta, \\gamma)&= 10 - 6\\cos(\\alpha) - 6\\cos(\\beta) - 6\\cos(\\gamma) \\\\ &\\quad + 2\\cos(\\alpha + \\beta + \\gamma) + 2\\cos(\\alpha - \\beta) \\\\ &\\quad + 2\\cos(\\beta - \\gamma) + 2\\cos(\\gamma - \\alpha). \\end{align*} Since the function $f$ is continuously differentiable, and periodic in each variable, $f$ has a maximum and a minimum and it attains these values only at points where $\\nabla f=(0,0,0)$. A routine calculation now shows that \\begin{align*} \\frac{\\partial f}{\\partial \\alpha} + \\frac{\\partial f}{\\partial \\beta} + \\frac{\\partial f}{\\partial \\gamma} &= 6(\\sin(\\alpha) +\\sin(\\beta)+\\sin(\\gamma)- \\sin(\\alpha + \\beta + \\gamma)) \\\\ &= 24\\sin\\left(\\frac{\\alpha+\\beta}{2}\\right) \\sin\\left(\\frac{\\beta+\\gamma}{2}\\right) \\sin\\left(\\frac{\\gamma+\\alpha}{2}\\right). \\end{align*} Hence every critical point of $f$ must satisfy one of $z_1z_2=1$, $z_2z_3=1$, or $z_3z_1=1$. By symmetry, let us assume that $z_1z_2=1$. Then \\[ f = |3-2\\mathrm{Re}(z_1)-z_3|^2-|1-z_3|^2; \\] since $3-2\\mathrm{Re}(z_1)\\ge 1$, $f$ is nonnegative and can be zero only if the real part of $z_1$, and hence also $z_1$ itself, is equal to $1$."} -{"name": "Putnam_exercise_2010_a4", "source": "Putnam.lean", "header": "import Mathlib\n\nopen scoped BigOperators\n", "formal_statement": "theorem Putnam_exercise_2010_a4 (n : ℕ) :\n ¬ Nat.Prime (10^10^10^n + 10^10^n + 10^n - 1) := sorry", "formal_proof": null, "informal_stmt": "Prove that for each positive integer $n$, the number $10^{10^{10^n}}+10^{10^n}+10^n-1$ is not prime.\n\\begin{proof}\n Put\n\\[\nN = 10^{10^{10^n}} + 10^{10^n} + 10^n - 1.\n\\]\nWrite $n = 2^m k$ with $m$ a nonnegative integer and $k$ a positive odd integer.\nFor any nonnegative integer $j$,\n\\[\n10^{2^m j} \\equiv (-1)^j \\pmod{10^{2^m} + 1}.\n\\]\nSince $10^n \\geq n \\geq 2^m \\geq m+1$, $10^n$ is divisible by $2^n$ and hence by $2^{m+1}$,\nand similarly $10^{10^n}$ is divisible by $2^{10^n}$ and hence by $2^{m+1}$. It follows that\n\\[\nN \\equiv 1 + 1 + (-1) + (-1) \\equiv 0 \\pmod{10^{2^m} + 1}.\n\\]\nSince $N \\geq 10^{10^n} > 10^n + 1 \\geq 10^{2^m} + 1$, it follows that $N$ is composite.\n\\end{proof}", "informal_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_2-z_3|^2-|1-z_1z_2z_3|^2. \\] A routine calculation shows that \\begin{align*} f(\\alpha, \\beta, \\gamma)&= 10 - 6\\cos(\\alpha) - 6\\cos(\\beta) - 6\\cos(\\gamma) \\\\ &\\quad + 2\\cos(\\alpha + \\beta + \\gamma) + 2\\cos(\\alpha - \\beta) \\\\ &\\quad + 2\\cos(\\beta - \\gamma) + 2\\cos(\\gamma - \\alpha). \\end{align*} Since the function $f$ is continuously differentiable, and periodic in each variable, $f$ has a maximum and a minimum and it attains these values only at points where $\\nabla f=(0,0,0)$. A routine calculation now shows that \\begin{align*} \\frac{\\partial f}{\\partial \\alpha} + \\frac{\\partial f}{\\partial \\beta} + \\frac{\\partial f}{\\partial \\gamma} &= 6(\\sin(\\alpha) +\\sin(\\beta)+\\sin(\\gamma)- \\sin(\\alpha + \\beta + \\gamma)) \\\\ &= 24\\sin\\left(\\frac{\\alpha+\\beta}{2}\\right) \\sin\\left(\\frac{\\beta+\\gamma}{2}\\right) \\sin\\left(\\frac{\\gamma+\\alpha}{2}\\right). \\end{align*} Hence every critical point of $f$ must satisfy one of $z_1z_2=1$, $z_2z_3=1$, or $z_3z_1=1$. By symmetry, let us assume that $z_1z_2=1$. Then \\[ f = |3-2\\mathrm{Re}(z_1)-z_3|^2-|1-z_3|^2; \\] since $3-2\\mathrm{Re}(z_1)\\ge 1$, $f$ is nonnegative and can be zero only if the real part of $z_1$, and hence also $z_1$ itself, is equal to $1$."} -{"name": "Putnam_exercise_2001_a5", "source": "Putnam.lean", "header": "import Mathlib\n\nopen scoped BigOperators\n", "formal_statement": "theorem Putnam_exercise_2001_a5 :\n ∃! a : ℕ × ℕ, a.1 > 0 ∧ a.2 > 0 ∧ a.1^(a.2+1) - (a.1+1)^a.2 = 2001 := sorry", "formal_proof": null, "informal_stmt": "Prove that there are unique positive integers $a, n$ such that $a^{n+1}-(a+1)^n=2001$.\n\\begin{proof}\n Suppose $a^{n+1} - (a+1)^n = 2001$.\nNotice that $a^{n+1} + [(a+1)^n - 1]$ is a multiple of $a$; thus\n$a$ divides $2002 = 2 \\times 7 \\times 11 \\times 13$.\n\nSince $2001$ is divisible by 3, we must have $a \\equiv 1 \\pmod{3}$,\notherwise one of $a^{n+1}$ and $(a+1)^n$ is a multiple of 3 and the\nother is not, so their difference cannot be divisible by 3. Now\n$a^{n+1} \\equiv 1 \\pmod{3}$, so we must have $(a+1)^n \\equiv 1\n\\pmod{3}$, which forces $n$ to be even, and in particular at least 2.\n\nIf $a$ is even, then $a^{n+1} - (a+1)^n \\equiv -(a+1)^n \\pmod{4}$.\nSince $n$ is even, $-(a+1)^n \\equiv -1 \\pmod{4}$. Since $2001 \\equiv 1\n\\pmod{4}$, this is impossible. Thus $a$ is odd, and so must divide\n$1001 = 7 \\times 11 \\times 13$. Moreover, $a^{n+1} - (a+1)^n \\equiv a\n\\pmod{4}$, so $a \\equiv 1 \\pmod{4}$.\n\nOf the divisors of $7 \\times 11 \\times 13$, those congruent to 1 mod 3\nare precisely those not divisible by 11 (since 7 and 13 are both\ncongruent to 1 mod 3). Thus $a$ divides $7 \\times 13$. Now\n$a \\equiv 1 \\pmod{4}$ is only possible if $a$ divides $13$.\n\nWe cannot have $a=1$, since $1 - 2^n \\neq 2001$ for any $n$. Thus\nthe only possibility is $a = 13$. One easily checks that $a=13, n=2$ is a\nsolution; all that remains is to check that no other $n$ works. In fact,\nif $n > 2$, then $13^{n+1} \\equiv 2001 \\equiv 1 \\pmod{8}$.\nBut $13^{n+1} \\equiv 13 \\pmod{8}$ since $n$ is even, contradiction.\nThus $a=13, n=2$ is the unique solution.\n\nNote: once one has that $n$ is even, one can use that $2002\n=a^{n+1} + 1 - (a+1)^n$ is divisible by $a+1$ to rule out cases.\n\\end{proof}", "informal_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_2-z_3|^2-|1-z_1z_2z_3|^2. \\] A routine calculation shows that \\begin{align*} f(\\alpha, \\beta, \\gamma)&= 10 - 6\\cos(\\alpha) - 6\\cos(\\beta) - 6\\cos(\\gamma) \\\\ &\\quad + 2\\cos(\\alpha + \\beta + \\gamma) + 2\\cos(\\alpha - \\beta) \\\\ &\\quad + 2\\cos(\\beta - \\gamma) + 2\\cos(\\gamma - \\alpha). \\end{align*} Since the function $f$ is continuously differentiable, and periodic in each variable, $f$ has a maximum and a minimum and it attains these values only at points where $\\nabla f=(0,0,0)$. A routine calculation now shows that \\begin{align*} \\frac{\\partial f}{\\partial \\alpha} + \\frac{\\partial f}{\\partial \\beta} + \\frac{\\partial f}{\\partial \\gamma} &= 6(\\sin(\\alpha) +\\sin(\\beta)+\\sin(\\gamma)- \\sin(\\alpha + \\beta + \\gamma)) \\\\ &= 24\\sin\\left(\\frac{\\alpha+\\beta}{2}\\right) \\sin\\left(\\frac{\\beta+\\gamma}{2}\\right) \\sin\\left(\\frac{\\gamma+\\alpha}{2}\\right). \\end{align*} Hence every critical point of $f$ must satisfy one of $z_1z_2=1$, $z_2z_3=1$, or $z_3z_1=1$. By symmetry, let us assume that $z_1z_2=1$. Then \\[ f = |3-2\\mathrm{Re}(z_1)-z_3|^2-|1-z_3|^2; \\] since $3-2\\mathrm{Re}(z_1)\\ge 1$, $f$ is nonnegative and can be zero only if the real part of $z_1$, and hence also $z_1$ itself, is equal to $1$."} -{"name": "Putnam_exercise_2000_a2", "source": "Putnam.lean", "header": "import Mathlib\n\nopen scoped BigOperators\n", "formal_statement": "theorem Putnam_exercise_2000_a2 :\n ∀ N : ℕ, ∃ n : ℕ, n > N ∧ ∃ i : Fin 6 → ℕ, n = (i 0)^2 + (i 1)^2 ∧\n n + 1 = (i 2)^2 + (i 3)^2 ∧ n + 2 = (i 4)^2 + (i 5)^2 := sorry", "formal_proof": null, "informal_stmt": "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. \n\\begin{proof}\n It is well-known that the equation $x^2-2y^2=1$ has infinitely\nmany solutions (the so-called ``Pell'' equation). Thus setting\n$n=2y^2$ (so that $n=y^2+y^2$, $n+1=x^2+0^2$, $n+2=x^2+1^2$)\nyields infinitely many $n$ with the desired property.\n\\end{proof}", "informal_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_2-z_3|^2-|1-z_1z_2z_3|^2. \\] A routine calculation shows that \\begin{align*} f(\\alpha, \\beta, \\gamma)&= 10 - 6\\cos(\\alpha) - 6\\cos(\\beta) - 6\\cos(\\gamma) \\\\ &\\quad + 2\\cos(\\alpha + \\beta + \\gamma) + 2\\cos(\\alpha - \\beta) \\\\ &\\quad + 2\\cos(\\beta - \\gamma) + 2\\cos(\\gamma - \\alpha). \\end{align*} Since the function $f$ is continuously differentiable, and periodic in each variable, $f$ has a maximum and a minimum and it attains these values only at points where $\\nabla f=(0,0,0)$. A routine calculation now shows that \\begin{align*} \\frac{\\partial f}{\\partial \\alpha} + \\frac{\\partial f}{\\partial \\beta} + \\frac{\\partial f}{\\partial \\gamma} &= 6(\\sin(\\alpha) +\\sin(\\beta)+\\sin(\\gamma)- \\sin(\\alpha + \\beta + \\gamma)) \\\\ &= 24\\sin\\left(\\frac{\\alpha+\\beta}{2}\\right) \\sin\\left(\\frac{\\beta+\\gamma}{2}\\right) \\sin\\left(\\frac{\\gamma+\\alpha}{2}\\right). \\end{align*} Hence every critical point of $f$ must satisfy one of $z_1z_2=1$, $z_2z_3=1$, or $z_3z_1=1$. By symmetry, let us assume that $z_1z_2=1$. Then \\[ f = |3-2\\mathrm{Re}(z_1)-z_3|^2-|1-z_3|^2; \\] since $3-2\\mathrm{Re}(z_1)\\ge 1$, $f$ is nonnegative and can be zero only if the real part of $z_1$, and hence also $z_1$ itself, is equal to $1$."} -{"name": "Putnam_exercise_1999_b4", "source": "Putnam.lean", "header": "import Mathlib\n\nopen scoped BigOperators\n", "formal_statement": "theorem Putnam_exercise_1999_b4 (f : ℝ → ℝ) (hf: ContDiff ℝ 3 f)\n (hf1 : ∀ n ≤ 3, ∀ x : ℝ, iteratedDeriv n f x > 0)\n (hf2 : ∀ x : ℝ, iteratedDeriv 3 f x ≤ f x) :\n ∀ x : ℝ, deriv f x < 2 * f x := sorry", "formal_proof": null, "informal_stmt": "Let $f$ be a real function with a continuous third derivative such that $f(x), f^{\\prime}(x), f^{\\prime \\prime}(x), f^{\\prime \\prime \\prime}(x)$ are positive for all $x$. Suppose that $f^{\\prime \\prime \\prime}(x) \\leq f(x)$ for all $x$. Show that $f^{\\prime}(x)<2 f(x)$ for all $x$.\n\\begin{proof} \n\\setcounter{equation}{0}\nWe make repeated use of the following fact: if $f$ is a differentiable function on all of\n$\\mathbb{R}$, $\\lim_{x \\to -\\infty} f(x) \\geq 0$, and $f'(x) > 0$ for all $x \\in \\mathbb{R}$, then\n$f(x) > 0$ for all $x \\in \\mathbb{R}$. (Proof: if $f(y) < 0$ for some $x$, then $f(x)< f(y)$ for all\n$x0$, but then $\\lim_{x \\to -\\infty} f(x) \\leq f(y) < 0$.)\n\nFrom the inequality $f'''(x) \\leq f(x)$ we obtain\n\\[\nf'' f'''(x) \\leq f''(x) f(x) < f''(x) f(x) + f'(x)^2\n\\]\nsince $f'(x)$ is positive. Applying the fact to the difference between the right and left sides,\nwe get\n\\begin{equation}\n\\frac{1}{2} (f''(x))^2 < f(x) f'(x).\n\\end{equation}\n\nOn the other hand, since $f(x)$ and $f'''(x)$ are both positive for all $x$,\nwe have\n\\[\n2f'(x) f''(x) < 2f'(x)f''(x) + 2f(x) f'''(x).\n\\]\nApplying the fact to the difference between the sides yields\n\\begin{equation}\nf'(x)^2 \\leq 2f(x) f''(x).\n\\end{equation}\nCombining (1) and (2), we obtain\n\\begin{align*}\n\\frac{1}{2} \\left( \\frac{f'(x)^2}{2f(x)} \\right)^2\n&< \\frac{1}{2} (f''(x))^2 \\\\\n&< f(x) f'(x),\n\\end{align*}\nor $(f'(x))^3 < 8 f(x)^3$. We conclude $f'(x) < 2f(x)$, as desired.\n\\end{proof}", "informal_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_2-z_3|^2-|1-z_1z_2z_3|^2. \\] A routine calculation shows that \\begin{align*} f(\\alpha, \\beta, \\gamma)&= 10 - 6\\cos(\\alpha) - 6\\cos(\\beta) - 6\\cos(\\gamma) \\\\ &\\quad + 2\\cos(\\alpha + \\beta + \\gamma) + 2\\cos(\\alpha - \\beta) \\\\ &\\quad + 2\\cos(\\beta - \\gamma) + 2\\cos(\\gamma - \\alpha). \\end{align*} Since the function $f$ is continuously differentiable, and periodic in each variable, $f$ has a maximum and a minimum and it attains these values only at points where $\\nabla f=(0,0,0)$. A routine calculation now shows that \\begin{align*} \\frac{\\partial f}{\\partial \\alpha} + \\frac{\\partial f}{\\partial \\beta} + \\frac{\\partial f}{\\partial \\gamma} &= 6(\\sin(\\alpha) +\\sin(\\beta)+\\sin(\\gamma)- \\sin(\\alpha + \\beta + \\gamma)) \\\\ &= 24\\sin\\left(\\frac{\\alpha+\\beta}{2}\\right) \\sin\\left(\\frac{\\beta+\\gamma}{2}\\right) \\sin\\left(\\frac{\\gamma+\\alpha}{2}\\right). \\end{align*} Hence every critical point of $f$ must satisfy one of $z_1z_2=1$, $z_2z_3=1$, or $z_3z_1=1$. By symmetry, let us assume that $z_1z_2=1$. Then \\[ f = |3-2\\mathrm{Re}(z_1)-z_3|^2-|1-z_3|^2; \\] since $3-2\\mathrm{Re}(z_1)\\ge 1$, $f$ is nonnegative and can be zero only if the real part of $z_1$, and hence also $z_1$ itself, is equal to $1$."} -{"name": "Putnam_exercise_1998_a3", "source": "Putnam.lean", "header": "import Mathlib\n\nopen scoped BigOperators\n", "formal_statement": "theorem Putnam_exercise_1998_a3 (f : ℝ → ℝ) (hf : ContDiff ℝ 3 f) :\n ∃ a : ℝ, (f a) * (deriv f a) * (iteratedDeriv 2 f a) * (iteratedDeriv 3 f a) ≥ 0 := sorry", "formal_proof": null, "informal_stmt": "Let $f$ be a real function on the real line with continuous third derivative. Prove that there exists a point $a$ such that\n$f(a) \\cdot f^{\\prime}(a) \\cdot f^{\\prime \\prime}(a) \\cdot f^{\\prime \\prime \\prime}(a) \\geq 0$. \n\\begin{proof}\n If at least one of $f(a)$, $f'(a)$, $f''(a)$, or $f'''(a)$ vanishes\nat some point $a$, then we are done. Hence we may assume each of\n$f(x)$, $f'(x)$, $f''(x)$, and $f'''(x)$ is either strictly positive\nor strictly negative on the real line. By replacing $f(x)$ by $-f(x)$\nif necessary, we may assume $f''(x)>0$; by replacing $f(x)$\nby $f(-x)$ if necessary, we may assume $f'''(x)>0$. (Notice that these\nsubstitutions do not change the sign of $f(x) f'(x) f''(x) f'''(x)$.)\nNow $f''(x)>0$ implies that $f'(x)$ is increasing, and $f'''(x)>0$\nimplies that $f'(x)$ is convex, so that $f'(x+a)>f'(x)+a f''(x)$\nfor all $x$ and $a$. By\nletting $a$ increase in the latter inequality, we see that $f'(x+a)$\nmust be positive for sufficiently large $a$; it follows that\n$f'(x)>0$\nfor all $x$. Similarly, $f'(x)>0$ and $f''(x)>0$ imply\nthat $f(x)>0$ for all $x$. Therefore $f(x) f'(x) f''(x) f'''(x)>0$ for\nall $x$, and we are done.\n\\end{proof}", "informal_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_2-z_3|^2-|1-z_1z_2z_3|^2. \\] A routine calculation shows that \\begin{align*} f(\\alpha, \\beta, \\gamma)&= 10 - 6\\cos(\\alpha) - 6\\cos(\\beta) - 6\\cos(\\gamma) \\\\ &\\quad + 2\\cos(\\alpha + \\beta + \\gamma) + 2\\cos(\\alpha - \\beta) \\\\ &\\quad + 2\\cos(\\beta - \\gamma) + 2\\cos(\\gamma - \\alpha). \\end{align*} Since the function $f$ is continuously differentiable, and periodic in each variable, $f$ has a maximum and a minimum and it attains these values only at points where $\\nabla f=(0,0,0)$. A routine calculation now shows that \\begin{align*} \\frac{\\partial f}{\\partial \\alpha} + \\frac{\\partial f}{\\partial \\beta} + \\frac{\\partial f}{\\partial \\gamma} &= 6(\\sin(\\alpha) +\\sin(\\beta)+\\sin(\\gamma)- \\sin(\\alpha + \\beta + \\gamma)) \\\\ &= 24\\sin\\left(\\frac{\\alpha+\\beta}{2}\\right) \\sin\\left(\\frac{\\beta+\\gamma}{2}\\right) \\sin\\left(\\frac{\\gamma+\\alpha}{2}\\right). \\end{align*} Hence every critical point of $f$ must satisfy one of $z_1z_2=1$, $z_2z_3=1$, or $z_3z_1=1$. By symmetry, let us assume that $z_1z_2=1$. Then \\[ f = |3-2\\mathrm{Re}(z_1)-z_3|^2-|1-z_3|^2; \\] since $3-2\\mathrm{Re}(z_1)\\ge 1$, $f$ is nonnegative and can be zero only if the real part of $z_1$, and hence also $z_1$ itself, is equal to $1$."} -{"name": "Putnam_exercise_1998_b6", "source": "Putnam.lean", "header": "import Mathlib\n\nopen scoped BigOperators\n", "formal_statement": "theorem Putnam_exercise_1998_b6 (a b c : ℤ) :\n ∃ n : ℤ, n > 0 ∧ ¬ ∃ m : ℤ, Real.sqrt (n^3 + a*n^2 + b*n + c) = m := sorry", "formal_proof": null, "informal_stmt": "Prove that, for any integers $a, b, c$, there exists a positive integer $n$ such that $\\sqrt{n^3+a n^2+b n+c}$ is not an integer.\n\\begin{proof}\n We prove more generally that for any polynomial $P(z)$ with integer\ncoefficients which is not a perfect square, there exists a positive\ninteger $n$ such that $P(n)$ is not a perfect square. Of course it\nsuffices to assume $P(z)$ has no repeated factors, which is to say $P(z)$\nand its derivative $P'(z)$ are relatively prime.\n\nIn particular, if we carry out the Euclidean algorithm on $P(z)$ and $P'(z)$\nwithout dividing, we get an integer $D$ (the discriminant of $P$) such that\nthe greatest common divisor of $P(n)$ and $P'(n)$ divides $D$ for any $n$.\nNow there exist infinitely many primes $p$ such that $p$ divides $P(n)$ for\nsome $n$: if there were only finitely many, say, $p_1, \\dots, p_k$, then\nfor any $n$ divisible by $m = P(0) p_1 p_2 \\cdots p_k$, we have $P(n)\n\\equiv P(0) \\pmod{m}$, that is, $P(n)/P(0)$ is not divisible by $p_1,\n\\dots, p_k$, so must be $\\pm 1$, but then $P$ takes some value infinitely\nmany times, contradiction. In particular, we can choose some such $p$ not\ndividing $D$, and choose $n$ such that $p$ divides $P(n)$. Then $P(n+kp)\n\\equiv P(n) + kp P'(n) (\\mathrm{mod}\\,p)$\n(write out the Taylor series of the left side);\nin particular, since $p$ does not divide $P'(n)$, we can find some $k$\nsuch that $P(n+kp)$ is divisible by $p$ but not by $p^2$, and so\nis not a perfect square.\n\\end{proof}\n\n\n\n\n\\end{document}", "informal_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_2-z_3|^2-|1-z_1z_2z_3|^2. \\] A routine calculation shows that \\begin{align*} f(\\alpha, \\beta, \\gamma)&= 10 - 6\\cos(\\alpha) - 6\\cos(\\beta) - 6\\cos(\\gamma) \\\\ &\\quad + 2\\cos(\\alpha + \\beta + \\gamma) + 2\\cos(\\alpha - \\beta) \\\\ &\\quad + 2\\cos(\\beta - \\gamma) + 2\\cos(\\gamma - \\alpha). \\end{align*} Since the function $f$ is continuously differentiable, and periodic in each variable, $f$ has a maximum and a minimum and it attains these values only at points where $\\nabla f=(0,0,0)$. A routine calculation now shows that \\begin{align*} \\frac{\\partial f}{\\partial \\alpha} + \\frac{\\partial f}{\\partial \\beta} + \\frac{\\partial f}{\\partial \\gamma} &= 6(\\sin(\\alpha) +\\sin(\\beta)+\\sin(\\gamma)- \\sin(\\alpha + \\beta + \\gamma)) \\\\ &= 24\\sin\\left(\\frac{\\alpha+\\beta}{2}\\right) \\sin\\left(\\frac{\\beta+\\gamma}{2}\\right) \\sin\\left(\\frac{\\gamma+\\alpha}{2}\\right). \\end{align*} Hence every critical point of $f$ must satisfy one of $z_1z_2=1$, $z_2z_3=1$, or $z_3z_1=1$. By symmetry, let us assume that $z_1z_2=1$. Then \\[ f = |3-2\\mathrm{Re}(z_1)-z_3|^2-|1-z_3|^2; \\] since $3-2\\mathrm{Re}(z_1)\\ge 1$, $f$ is nonnegative and can be zero only if the real part of $z_1$, and hence also $z_1$ itself, is equal to $1$."} +{"name": "Cambridge_Tripos_exercise_2022_IA_4_I_1E_a", "source": "Cambridge-Tripos.lean", "header": "import Mathlib\n\nopen Filter Set\n", "formal_statement": "theorem Cambridge_Tripos_exercise_2022_IA_4_I_1E_a : ∀ N : ℕ, ∃ n ≥ N, (3*n+1).Prime ∧ (3*n+1) ≥ N := sorry", "formal_proof": null, "informal_stmt": null, "informal_proof": "The general strategy is to find a (large) number $n$ that is relatively prime to each of the existing list of such primes, and is also congruent to 2 modulo 3 . The prime factorization of $n$ cannot consist only of primes congruent to 1 modulo 3 , since the product of any number of such is still 1 modulo 3 . Hence there must be some prime factor of $n$ that is congruent to 2 modulo 3 , which must be not on our list by the construction of $n$. Now, how to construct such an $n$ ? Suppose the finite list is $\\left\\{p_1, p_2, \\ldots, p_k\\right\\}$. If $k$ is even, then take $n=p_1 p_2 \\cdots p_k+1$. If $k$ is odd, then take $n=\\left(p_1 p_2 \\cdots p_k\\right) p_k+1$."} +{"name": "Cambridge_Tripos_exercise_2022_IA_4_I_2D_a", "source": "Cambridge-Tripos.lean", "header": "import Mathlib\n\nopen Filter Set\n", "formal_statement": "theorem Cambridge_Tripos_exercise_2022_IA_4_I_2D_a : Irrational (2^((1:ℝ)/3) + 3^((1:ℝ)/3)) := sorry", "formal_proof": null, "informal_stmt": null, "informal_proof": "The general strategy is to find a (large) number $n$ that is relatively prime to each of the existing list of such primes, and is also congruent to 2 modulo 3 . The prime factorization of $n$ cannot consist only of primes congruent to 1 modulo 3 , since the product of any number of such is still 1 modulo 3 . Hence there must be some prime factor of $n$ that is congruent to 2 modulo 3 , which must be not on our list by the construction of $n$. Now, how to construct such an $n$ ? Suppose the finite list is $\\left\\{p_1, p_2, \\ldots, p_k\\right\\}$. If $k$ is even, then take $n=p_1 p_2 \\cdots p_k+1$. If $k$ is odd, then take $n=\\left(p_1 p_2 \\cdots p_k\\right) p_k+1$."} +{"name": "Cambridge_Tripos_exercise_2022_IB_3_II_13G_a_i", "source": "Cambridge-Tripos.lean", "header": "import Mathlib\n\nopen Filter Set\n", "formal_statement": "theorem Cambridge_Tripos_exercise_2022_IB_3_II_13G_a_i (U : Set ℂ) (hU : IsOpen U)\n (hU1 : Nonempty U) (hU2 : IsConnected U) (f : ℕ → ℂ → ℂ) (f' : ℂ → ℂ)\n (hf : ∀ n : ℕ, DifferentiableOn ℂ (f n) U)\n (hf1 : ∀ X ⊂ U, CompactSpace X →\n (TendstoUniformly (λ n => restrict X (f n)) (restrict X f') atTop)) :\n DifferentiableOn ℂ f' U := sorry", "formal_proof": null, "informal_stmt": null, "informal_proof": "The general strategy is to find a (large) number $n$ that is relatively prime to each of the existing list of such primes, and is also congruent to 2 modulo 3 . The prime factorization of $n$ cannot consist only of primes congruent to 1 modulo 3 , since the product of any number of such is still 1 modulo 3 . Hence there must be some prime factor of $n$ that is congruent to 2 modulo 3 , which must be not on our list by the construction of $n$. Now, how to construct such an $n$ ? Suppose the finite list is $\\left\\{p_1, p_2, \\ldots, p_k\\right\\}$. If $k$ is even, then take $n=p_1 p_2 \\cdots p_k+1$. If $k$ is odd, then take $n=\\left(p_1 p_2 \\cdots p_k\\right) p_k+1$."} +{"name": "Axler_exercise_1_2", "source": "Axler.lean", "header": "import Mathlib\n\nopen Fintype Complex Polynomial LinearMap FiniteDimensional Module Module.End\nopen scoped BigOperators InnerProductSpace\n", "formal_statement": "theorem Axler_exercise_1_2 :\n (⟨-1/2, Real.sqrt 3 / 2⟩ : ℂ) ^ 3 = -1 := sorry", "formal_proof": null, "informal_stmt": "Show that $\\frac{-1 + \\sqrt{3}i}{2}$ is a cube root of 1 (meaning that its cube equals 1).\n\\begin{proof}\n$$\n\\left(\\frac{-1+\\sqrt{3} i}{2}\\right)^2=\\frac{-1-\\sqrt{3} i}{2},\n$$\nhence\n$$\n\\left(\\frac{-1+\\sqrt{3} i}{2}\\right)^3=\\frac{-1-\\sqrt{3} i}{2} \\cdot \\frac{-1+\\sqrt{3} i}{2}=1\n$$\nThis means $\\frac{-1+\\sqrt{3} i}{2}$ is a cube root of 1.\n\\end{proof}", "informal_proof": "$$ \\left(\\frac{-1+\\sqrt{3} i}{2}\\right)^2=\\frac{-1-\\sqrt{3} i}{2}, $$ hence $$ \\left(\\frac{-1+\\sqrt{3} i}{2}\\right)^3=\\frac{-1-\\sqrt{3} i}{2} \\cdot \\frac{-1+\\sqrt{3} i}{2}=1 $$ This means $\\frac{-1+\\sqrt{3} i}{2}$ is a cube root of 1."} +{"name": "Axler_exercise_1_3", "source": "Axler.lean", "header": "import Mathlib\n\nopen Fintype Complex Polynomial LinearMap FiniteDimensional Module Module.End\nopen scoped BigOperators InnerProductSpace\n", "formal_statement": "theorem Axler_exercise_1_3 {F V : Type*} [AddCommGroup V] [Field F]\n [Module F V] {v : V} : -(-v) = v := sorry", "formal_proof": null, "informal_stmt": "Prove that $-(-v) = v$ for every $v \\in V$.\n\\begin{proof}\n By definition, we have\n$$\n(-v)+(-(-v))=0 \\quad \\text { and } \\quad v+(-v)=0 .\n$$\nThis implies both $v$ and $-(-v)$ are additive inverses of $-v$, by the uniqueness of additive inverse, it follows that $-(-v)=v$.\n\\end{proof}", "informal_proof": "$$ \\left(\\frac{-1+\\sqrt{3} i}{2}\\right)^2=\\frac{-1-\\sqrt{3} i}{2}, $$ hence $$ \\left(\\frac{-1+\\sqrt{3} i}{2}\\right)^3=\\frac{-1-\\sqrt{3} i}{2} \\cdot \\frac{-1+\\sqrt{3} i}{2}=1 $$ This means $\\frac{-1+\\sqrt{3} i}{2}$ is a cube root of 1."} +{"name": "Axler_exercise_1_4", "source": "Axler.lean", "header": "import Mathlib\n\nopen Fintype Complex Polynomial LinearMap FiniteDimensional Module Module.End\nopen scoped BigOperators InnerProductSpace\n", "formal_statement": "theorem Axler_exercise_1_4 {F V : Type*} [AddCommGroup V] [Field F]\n [Module F V] (v : V) (a : F): a • v = 0 ↔ a = 0 ∨ v = 0 := sorry", "formal_proof": null, "informal_stmt": "Prove that if $a \\in \\mathbf{F}$, $v \\in V$, and $av = 0$, then $a = 0$ or $v = 0$.\n\\begin{proof}\n If $a=0$, then we immediately have our result. So suppose $a \\neq 0$. Then, because $a$ is some nonzero real or complex number, it has a multiplicative inverse $\\frac{1}{a}$. Now suppose that $v$ is some vector such that\n$$\na v=0\n$$\nMultiply by $\\frac{1}{a}$ on both sides of this equation to get\n$$\n\\begin{aligned}\n\\frac{1}{a}(a v) & =\\frac{1}{a} 0 & & \\\\\n\\frac{1}{a}(a v) & =0 & & \\\\\n\\left(\\frac{1}{a} \\cdot a\\right) v & =0 & & \\text { (associativity) } \\\\\n1 v & =0 & & \\text { (definition of } 1/a) \\\\\nv & =0 & & \\text { (multiplicative identity) }\n\\end{aligned}\n$$\nHence either $a=0$ or, if $a \\neq 0$, then $v=0$.\n\\end{proof}", "informal_proof": "$$ \\left(\\frac{-1+\\sqrt{3} i}{2}\\right)^2=\\frac{-1-\\sqrt{3} i}{2}, $$ hence $$ \\left(\\frac{-1+\\sqrt{3} i}{2}\\right)^3=\\frac{-1-\\sqrt{3} i}{2} \\cdot \\frac{-1+\\sqrt{3} i}{2}=1 $$ This means $\\frac{-1+\\sqrt{3} i}{2}$ is a cube root of 1."} +{"name": "Axler_exercise_1_6", "source": "Axler.lean", "header": "import Mathlib\n\nopen Fintype Complex Polynomial LinearMap FiniteDimensional Module Module.End\nopen scoped BigOperators InnerProductSpace\n", "formal_statement": "theorem Axler_exercise_1_6 : ∃ U : Set (ℝ × ℝ),\n (U ≠ ∅) ∧\n (∀ (u v : ℝ × ℝ), u ∈ U ∧ v ∈ U → u + v ∈ U) ∧\n (∀ (u : ℝ × ℝ), u ∈ U → -u ∈ U) ∧\n (∀ U' : Submodule ℝ (ℝ × ℝ), U ≠ ↑U') := sorry", "formal_proof": null, "informal_stmt": "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$.\n\\begin{proof}\n \\[U=\\mathbb{Z}^2=\\left\\{(x, y) \\in \\mathbf{R}^2: x, y \\text { are integers }\\right\\}\\]\n$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 fails scalar multiplication. A discrete set like $\\mathbb{Z}^2$ does this.\n\\end{proof}", "informal_proof": "$$ \\left(\\frac{-1+\\sqrt{3} i}{2}\\right)^2=\\frac{-1-\\sqrt{3} i}{2}, $$ hence $$ \\left(\\frac{-1+\\sqrt{3} i}{2}\\right)^3=\\frac{-1-\\sqrt{3} i}{2} \\cdot \\frac{-1+\\sqrt{3} i}{2}=1 $$ This means $\\frac{-1+\\sqrt{3} i}{2}$ is a cube root of 1."} +{"name": "Axler_exercise_1_7", "source": "Axler.lean", "header": "import Mathlib\n\nopen Fintype Complex Polynomial LinearMap FiniteDimensional Module Module.End\nopen scoped BigOperators InnerProductSpace\n", "formal_statement": "theorem Axler_exercise_1_7 : ∃ U : Set (ℝ × ℝ),\n (U ≠ ∅) ∧\n (∀ (c : ℝ) (u : ℝ × ℝ), u ∈ U → c • u ∈ U) ∧\n (∀ U' : Submodule ℝ (ℝ × ℝ), U ≠ ↑U') := sorry", "formal_proof": null, "informal_stmt": "Give an example of a nonempty subset $U$ of $\\mathbf{R}^2$ such that $U$ is closed under scalar multiplication, but $U$ is not a subspace of $\\mathbf{R}^2$.\n\\begin{proof}\n$$\nU=\\left\\{(x, y) \\in \\mathbf{R}^2:|x|=|y|\\right\\}\n$$\nFor $(x, y) \\in U$ and $\\lambda \\in \\mathbb{R}$, it follows $\\lambda(x, y)=$ $(\\lambda x, \\lambda y)$, so $|\\lambda x|=|\\lambda||x|=|\\lambda||y|=|\\lambda y|$. Therefore, $\\lambda(x, y) \\in U$.\n\nOn the other hand, consider $a=(1,-1), b=$ $(1,1) \\in U$. Then, $a+b=(1,-1)+(1,1)=$ $(2,0) \\notin U$. So, $U$ is not a subspace of $\\mathbb{R}^2$.\n\\end{proof}", "informal_proof": "$$ \\left(\\frac{-1+\\sqrt{3} i}{2}\\right)^2=\\frac{-1-\\sqrt{3} i}{2}, $$ hence $$ \\left(\\frac{-1+\\sqrt{3} i}{2}\\right)^3=\\frac{-1-\\sqrt{3} i}{2} \\cdot \\frac{-1+\\sqrt{3} i}{2}=1 $$ This means $\\frac{-1+\\sqrt{3} i}{2}$ is a cube root of 1."} +{"name": "Axler_exercise_1_8", "source": "Axler.lean", "header": "import Mathlib\n\nopen Fintype Complex Polynomial LinearMap FiniteDimensional Module Module.End\nopen scoped BigOperators InnerProductSpace\n", "formal_statement": "theorem Axler_exercise_1_8 {F V : Type*} [AddCommGroup V] [Field F]\n [Module F V] {ι : Type*} (u : ι → Submodule F V) :\n ∃ U : Submodule F V, (⋂ (i : ι), (u i).carrier) = ↑U := sorry", "formal_proof": null, "informal_stmt": "Prove that the intersection of any collection of subspaces of $V$ is a subspace of $V$.\n\\begin{proof}\nLet $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$.\n\nTo 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 $0$ is in each subspace $V_i$, as they are subspaces and hence contain the additive identity.\n\nNext, we show that the intersection of subspaces is closed under addition. Let $u$ and $v$ be vectors in $V_1 \\cap V_2 \\cap \\ldots \\cap V_n$. By definition, $u$ and $v$ belong to each of the subspaces $V_i$. Since each $V_i$ is a subspace and therefore closed under addition, it follows that $u+v$ belongs to each $V_i$. Thus, $u+v$ belongs to the intersection $V_1 \\cap V_2 \\cap \\ldots \\cap V_n$.\n\nFinally, we show that the intersection of subspaces is closed under scalar multiplication. Let $a$ be a scalar in $F$ and let $v$ be a vector in $V_1 \\cap V_2 \\cap \\ldots \\cap V_n$. Since $v$ belongs to each $V_i$, we have $av$ belongs to each $V_i$ as well, as $V_i$ are subspaces and hence closed under scalar multiplication. Therefore, $av$ belongs to the intersection $V_1 \\cap V_2 \\cap \\ldots \\cap V_n$.\n\nThus, we have shown that $V_1 \\cap V_2 \\cap \\ldots \\cap V_n$ is a subspace of $V$.\n\\end{proof}", "informal_proof": "$$ \\left(\\frac{-1+\\sqrt{3} i}{2}\\right)^2=\\frac{-1-\\sqrt{3} i}{2}, $$ hence $$ \\left(\\frac{-1+\\sqrt{3} i}{2}\\right)^3=\\frac{-1-\\sqrt{3} i}{2} \\cdot \\frac{-1+\\sqrt{3} i}{2}=1 $$ This means $\\frac{-1+\\sqrt{3} i}{2}$ is a cube root of 1."} +{"name": "Axler_exercise_1_9", "source": "Axler.lean", "header": "import Mathlib\n\nopen Fintype Complex Polynomial LinearMap FiniteDimensional Module Module.End\nopen scoped BigOperators InnerProductSpace\n", "formal_statement": "theorem Axler_exercise_1_9 {F V : Type*} [AddCommGroup V] [Field F]\n [Module F V] (U W : Submodule F V):\n ∃ U' : Submodule F V, (U'.carrier = ↑U ∩ ↑W ↔ (U ≤ W ∨ W ≤ U)) := sorry", "formal_proof": null, "informal_stmt": "Prove that the union of two subspaces of $V$ is a subspace of $V$ if and only if one of the subspaces is contained in the other.\n\\begin{proof}\n To prove this one way, suppose for purposes of contradiction that for $U_1$ and $U_2$, which are subspaces of $V$, that $U_1 \\cup U_2$ is a subspace and neither is completely contained within the other. In other words, $U_1 \\nsubseteq U_2$ and $U_2 \\nsubseteq U_1$. We will show that you can pick a vector $v \\in U_1$ and a vector $u \\in U_2$ such that $v+u \\notin U_1 \\cup U_2$, proving that if $U_1 \\cup U_2$ is a subspace, one must be completely contained inside the other.\n\nIf $U_1 \\nsubseteq U_2$, we can pick a $v \\in U_1$ such that $v \\notin U_2$. Since $v$ is in the subspace $U_1$, then $(-v)$ must also be, by definition. Similarly, if $U_2 \\nsubseteq U_1$, then we can pick a $u \\in U_2$ such that $u \\notin U_1$. Since $u$ is in the subspace $U_2$, then $(-u)$ must also be, by definition.\n\nIf $v+u \\in U_1 \\cup U_2$, then $v+u$ must be in $U_1$ or $U_2$. But, $v+u \\in U_1 \\Rightarrow v+u+(-v) \\in U_1 \\Rightarrow u \\in U_1$\nSimilarly,\n$$\nv+u \\in U_2 \\Rightarrow v+u+(-u) \\in U_2 \\Rightarrow v \\in U_2\n$$\nThis is clearly a contradiction, as each element was defined to not be in these subspaces. Thus our initial assumption must have been wrong, and $U_1 \\subseteq U_2$ or $U_2 \\subseteq U_1$\nTo prove the other way, Let $U_1 \\subseteq U_2$ (WLOG). $U_1 \\subseteq U_2 \\Rightarrow U_1 \\cup U_2=U_2$. Since $U_2$ is a subspace, $U_1 \\cup U_2$ is as well. QED.\n\\end{proof}", "informal_proof": "$$ \\left(\\frac{-1+\\sqrt{3} i}{2}\\right)^2=\\frac{-1-\\sqrt{3} i}{2}, $$ hence $$ \\left(\\frac{-1+\\sqrt{3} i}{2}\\right)^3=\\frac{-1-\\sqrt{3} i}{2} \\cdot \\frac{-1+\\sqrt{3} i}{2}=1 $$ This means $\\frac{-1+\\sqrt{3} i}{2}$ is a cube root of 1."} +{"name": "Axler_exercise_3_1", "source": "Axler.lean", "header": "import Mathlib\n\nopen Fintype Complex Polynomial LinearMap FiniteDimensional Module Module.End\nopen scoped BigOperators InnerProductSpace\n", "formal_statement": "theorem Axler_exercise_3_1 {F V : Type*}\n [AddCommGroup V] [Field F] [Module F V] [FiniteDimensional F V]\n (T : V →ₗ[F] V) (hT : finrank F V = 1) :\n ∃ c : F, ∀ v : V, T v = c • v:= sorry", "formal_proof": null, "informal_stmt": "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$.\n\\begin{proof}\n If $\\operatorname{dim} V=1$, then in fact, $V=\\mathbf{F}$ and it is spanned by $1 \\in \\mathbf{F}$.\nLet $T$ be a linear map from $V$ to itself. Let $T(1)=\\lambda \\in V(=\\mathbf{F})$.\nStep 2\n2 of 3\nEvery $v \\in V$ is a scalar. Therefore,\n$$\n\\begin{aligned}\nT(v) & =T(v \\cdot 1) \\\\\n& =v T(1) \\ldots .(\\text { By the linearity of } T) \\\\\n& =v \\lambda\n\\end{aligned}\n$$\nHence, $T v=\\lambda v$ for every $v \\in V$.\n\\end{proof}", "informal_proof": "$$ \\left(\\frac{-1+\\sqrt{3} i}{2}\\right)^2=\\frac{-1-\\sqrt{3} i}{2}, $$ hence $$ \\left(\\frac{-1+\\sqrt{3} i}{2}\\right)^3=\\frac{-1-\\sqrt{3} i}{2} \\cdot \\frac{-1+\\sqrt{3} i}{2}=1 $$ This means $\\frac{-1+\\sqrt{3} i}{2}$ is a cube root of 1."} +{"name": "Axler_exercise_3_8", "source": "Axler.lean", "header": "import Mathlib\n\nopen Fintype Complex Polynomial LinearMap FiniteDimensional Module Module.End\nopen scoped BigOperators InnerProductSpace\n", "formal_statement": "theorem Axler_exercise_3_8 {F V W : Type*} [AddCommGroup V]\n [AddCommGroup W] [Field F] [Module F V] [Module F W]\n (L : V →ₗ[F] W) :\n ∃ U : Submodule F V, U ⊓ (ker L) = ⊥ ∧\n (range L = range (domRestrict L U)):= sorry", "formal_proof": null, "informal_stmt": "Suppose that $V$ is finite dimensional and that $T \\in \\mathcal{L}(V, W)$. Prove that there exists a subspace $U$ of $V$ such that $U \\cap \\operatorname{null} T=\\{0\\}$ and range $T=\\{T u: u \\in U\\}$.\n\\begin{proof}\n The point here is to note that every subspace of a vector space has a complementary subspace.\nIn this example, $U$ will precisely turn out to be the complementary subspace of null $T$. That is, $V=U \\oplus \\operatorname{null} T$\nHow should we characterize $U$ ? This can be achieved by extending a basis $B_1=\\left\\{v_1, v_2, \\ldots, v_m\\right\\}$ of null $T$ to a basis of $V$. Let $B_2=\\left\\{u_1, u_2, \\ldots, u_n\\right\\}$ be such that $B=B_1 \\cup B_2$ is a basis of $V$.\n\nDefine $U=\\operatorname{span}\\left(B_2\\right)$. Now, since $B_1$ and $B_2$ are complementary subsets of the basis $B$ of $V$, their spans will turn out to be complementary subspaces of $V$. Let's prove that $V=U \\oplus$ null $T$.\n\nLet $v \\in V$. Then, $v$ can be expressed as a linear combination of the vectors in $B$.\nLet $v=a_1 u_1+\\cdots+a_n u_n+c_1 v_1+\\cdots+c_m v_m$. However, since $\\left\\{u_1, u_2, \\ldots, u_n\\right\\}$ is a basis of $U, a_1 u_1+$ $\\cdots+a_n u_n=u \\in U$ and since $\\left\\{v_1, v_2, \\ldots, v_m\\right\\}$ is a basis of null $T, c_1 v_1+\\cdots+c_m v_m=w \\in$ null $T$.\nHence, $v=u+w \\in U+\\operatorname{null} T$. This shows that\n$$\nV=U+\\operatorname{null} T\n$$\nNow, let $v \\in U \\cap \\operatorname{null} T$.\nSince $v \\in U, u$ can be expressed as a linear combination of basis vectors of $U$. Let\n$$\nv=a_1 u_1+\\cdots+a_n u_n\n$$\nSimilarly, since $v \\in \\operatorname{null} T$, it can also be expressed as a linear combination of the basis vectors of null $T$. Let\n$$\nv=c_1 v_1+\\cdots+c_m v_m\n$$\nThe left hand sides of the above two equations are equal. Therefore, we can equate the right hand sides.\n$$\n\\begin{aligned}\n& a_1 u_1+\\cdots+a_n u_n=v=c_1 v_1+\\cdots+c_m v_m \\\\\n& a_1 u_1+\\cdots+a_n u_n-c_1 v_1-\\cdots-c_m v_m=0\n\\end{aligned}\n$$\nWe have found a linear combination of $u_i^{\\prime}$ 's and $v_i$ 's which is equal to zero. However, they are basis vectors of $V$. Hence, all the multipliers $c_i$ 's and $a_i$ 's must be zero implying that $v=0$.\nTherefore, if $v \\in U \\cap$ null $T$, then $v=0$. this means that\n$$\nU \\cap \\operatorname{null} T=\\{0\\}\n$$\nThe above shows that $U$ satisfies the first of the required conditions.\nNow let $w \\in$ range $T$. Then, there exists $v \\in V$ such that $T v=w$. This allows us to write $v=u+w$ where $u \\in U$ and $w \\in$ null $T$. This implies\n$$\n\\begin{aligned}\nw & =T v \\\\\n& =T(u+w) \\\\\n& =T u+T w \\\\\n& =T u+0 \\quad \\quad(\\text { since } w \\in \\operatorname{null} T) \\\\\n& =T u\n\\end{aligned}\n$$\nThis shows that if $w \\in$ range $T$ then $w=T u$ for some $u \\in U$. Therefore, range $T \\subseteq\\{T u \\mid u \\in U\\}$.\nSince $U$ is a subspace of $V$, it follows that $T u \\in$ range $T$ for all $u \\in U$. Thus, $\\{T u \\mid u \\in U\\} \\subseteq$ range $T$.\nTherefore, range $T=\\{T u \\mid u \\in U\\}$.\nThis shows that $U$ satisfies the second required condition as well.\n\\end{proof}", "informal_proof": "$$ \\left(\\frac{-1+\\sqrt{3} i}{2}\\right)^2=\\frac{-1-\\sqrt{3} i}{2}, $$ hence $$ \\left(\\frac{-1+\\sqrt{3} i}{2}\\right)^3=\\frac{-1-\\sqrt{3} i}{2} \\cdot \\frac{-1+\\sqrt{3} i}{2}=1 $$ This means $\\frac{-1+\\sqrt{3} i}{2}$ is a cube root of 1."} +{"name": "Axler_exercise_4_4", "source": "Axler.lean", "header": "import Mathlib\n\nopen Fintype Complex Polynomial LinearMap FiniteDimensional Module Module.End\nopen scoped BigOperators InnerProductSpace\n", "formal_statement": "theorem Axler_exercise_4_4 (p : Polynomial ℂ) :\n p.degree = @card (rootSet p ℂ) (rootSetFintype p ℂ) ↔\n Disjoint\n (@card (rootSet (derivative p) ℂ) (rootSetFintype (derivative p) ℂ))\n (@card (rootSet p ℂ) (rootSetFintype p ℂ)) := sorry", "formal_proof": null, "informal_stmt": "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.\n\\begin{proof}\n 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.\nTo prove that both $p$ and $p^{\\prime}$ have no roots in commons, we must now show that $p^{\\prime}\\left(\\lambda_j\\right) \\neq 0$ for every $j$. So, to do so, just fix $j$. The previous expression for $p$ shows that we can now write $p$ in the form of $p(z)=\\left(z-\\lambda_j\\right) q(z)$, which $q$ is a polynomial such that $q\\left(\\lambda_j\\right) \\neq 0$.\n\nWhen you differentiate both sides of the previous equation, then you would then have $p^{\\prime}(z)=(z-$ $\\left.\\lambda_j\\right) q^{\\prime}(z)+q(z)$\n\nTherefore: $\\left.=p^{\\prime}\\left(\\lambda_j\\right)=q \\lambda_j\\right)$\nEquals: $p^{\\prime}\\left(\\lambda_j\\right) \\neq 0$\n\nNow, to prove the other direction, we would now prove the contrapositive, which means that we will be proving that if $p$ has actually less than $m$ distinct roots, then both $p$ and $p^{\\prime}$ have at least one root in common.\n\nNow, for some root of $\\lambda$ of $p$, we can write $p$ is in the form of $\\left.p(z)=(z-\\lambda)^n q(z)\\right)$, which is where both $n \\geq 2$ and $q$ is a polynomial. When differentiating both sides of the previous equations, we would then have $p^{\\prime}(z)=(z-\\lambda)^n q^{\\prime}(z)+n(z-\\lambda)^{n-1} q(z)$.\nTherefore, $p^{\\prime}(\\lambda)=0$, which would make $\\lambda$ is a common root of both $p$ and $p^{\\prime}$.\n\\end{proof}", "informal_proof": "$$ \\left(\\frac{-1+\\sqrt{3} i}{2}\\right)^2=\\frac{-1-\\sqrt{3} i}{2}, $$ hence $$ \\left(\\frac{-1+\\sqrt{3} i}{2}\\right)^3=\\frac{-1-\\sqrt{3} i}{2} \\cdot \\frac{-1+\\sqrt{3} i}{2}=1 $$ This means $\\frac{-1+\\sqrt{3} i}{2}$ is a cube root of 1."} +{"name": "Axler_exercise_5_1", "source": "Axler.lean", "header": "import Mathlib\n\nopen Fintype Complex Polynomial LinearMap FiniteDimensional Module Module.End\nopen scoped BigOperators InnerProductSpace\n", "formal_statement": "theorem Axler_exercise_5_1 {F V : Type*} [AddCommGroup V] [Field F]\n [Module F V] {L : V →ₗ[F] V} {n : ℕ} (U : Fin n → Submodule F V)\n (hU : ∀ i : Fin n, Submodule.map L (U i) = U i) :\n Submodule.map L (∑ i : Fin n, U i : Submodule F V) =\n (∑ i : Fin n, U i : Submodule F V) := sorry", "formal_proof": null, "informal_stmt": "Suppose $T \\in \\mathcal{L}(V)$. Prove that if $U_{1}, \\ldots, U_{m}$ are subspaces of $V$ invariant under $T$, then $U_{1}+\\cdots+U_{m}$ is invariant under $T$.\n\\begin{proof}\n First off, assume that $U_1, \\ldots, U_m$ are subspaces of $V$ invariant under $T$. Now, consider a vector $u \\in$ $U_1+\\ldots+U_m$. There does exist $u_1 \\in U_1, \\ldots, u_m \\in U_m$ such that $u=u_1+\\ldots+u_m$.\n\nOnce you apply $T$ towards both sides of the previous equation, we would then get $T u=T u_1+\\ldots+$ $T u_m$.\n\nSince each $U_j$ is invariant under $T$, then we would have $T u_1 \\in U_1+\\ldots+T u_m$. This would then make the equation shows that $T u \\in U_1+\\ldots+T u_m$, which does imply that $U_1+. .+U_m$ is invariant under $T$\n\\end{proof}", "informal_proof": "$$ \\left(\\frac{-1+\\sqrt{3} i}{2}\\right)^2=\\frac{-1-\\sqrt{3} i}{2}, $$ hence $$ \\left(\\frac{-1+\\sqrt{3} i}{2}\\right)^3=\\frac{-1-\\sqrt{3} i}{2} \\cdot \\frac{-1+\\sqrt{3} i}{2}=1 $$ This means $\\frac{-1+\\sqrt{3} i}{2}$ is a cube root of 1."} +{"name": "Axler_exercise_5_4", "source": "Axler.lean", "header": "import Mathlib\n\nopen Fintype Complex Polynomial LinearMap FiniteDimensional Module Module.End\nopen scoped BigOperators InnerProductSpace\n", "formal_statement": "theorem Axler_exercise_5_4 {F V : Type*} [AddCommGroup V] [Field F]\n [Module F V] (S T : V →ₗ[F] V) (hST : S ∘ T = T ∘ S) (c : F):\n Submodule.map S (ker (T - c • LinearMap.id)) = ker (T - c • LinearMap.id) := sorry", "formal_proof": null, "informal_stmt": "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}$.\n\\begin{proof}\n 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$.\n\\end{proof}", "informal_proof": "$$ \\left(\\frac{-1+\\sqrt{3} i}{2}\\right)^2=\\frac{-1-\\sqrt{3} i}{2}, $$ hence $$ \\left(\\frac{-1+\\sqrt{3} i}{2}\\right)^3=\\frac{-1-\\sqrt{3} i}{2} \\cdot \\frac{-1+\\sqrt{3} i}{2}=1 $$ This means $\\frac{-1+\\sqrt{3} i}{2}$ is a cube root of 1."} +{"name": "Axler_exercise_5_11", "source": "Axler.lean", "header": "import Mathlib\n\nopen Fintype Complex Polynomial LinearMap FiniteDimensional Module Module.End\nopen scoped BigOperators InnerProductSpace\n", "formal_statement": "theorem Axler_exercise_5_11 {F V : Type*} [AddCommGroup V] [Field F]\n [Module F V] (S T : End F V) :\n (S * T).Eigenvalues = (T * S).Eigenvalues := sorry", "formal_proof": null, "informal_stmt": "Suppose $S, T \\in \\mathcal{L}(V)$. Prove that $S T$ and $T S$ have the same eigenvalues.\n\\begin{proof}\n To start, let $\\lambda \\in F$ be an eigenvalue of $S T$. Now, we would want $\\lambda$ to be an eigenvalue of $T S$. Since $\\lambda$, by itself, is an eigenvalue of $S T$, then there has to be a nonzero vector $v \\in V$ such that $(S T) v=\\lambda v$.\nNow, With a given reference that $(S T) v=\\lambda v$, you will then have the following: $(T S)(T v)=$ $T(S T v)=T(\\lambda v)=\\lambda T v$\nIf $T v \\neq 0$, then the listed equation above shows that $\\lambda$ is an eigenvalue of $T S$.\nIf $T v=0$, then $\\lambda=0$, since $S(T v)=\\lambda T v$. This also means that $T$ isn't invertible, which would imply that $T S$ isn't invertible, which can also be implied that $\\lambda$, which equals 0 , is an eigenvalue of $T S$.\nStep 3\n3 of 3\nNow, regardless of whether $T v=0$ or not, we would have shown that $\\lambda$ is an eigenvalue of $T S$. Since $\\lambda$ (was) an arbitrary eigenvalue of $S T$, we have shown that every single eigenvalue of $S T$ is an eigenvalue of $T S$. When you do reverse the roles of both $S$ and $T$, then we can conclude that that every single eigenvalue of $T S$ is also an eigenvalue of $S T$. Therefore, both $S T$ and $T S$ have the exact same eigenvalues.\n\\end{proof}", "informal_proof": "$$ \\left(\\frac{-1+\\sqrt{3} i}{2}\\right)^2=\\frac{-1-\\sqrt{3} i}{2}, $$ hence $$ \\left(\\frac{-1+\\sqrt{3} i}{2}\\right)^3=\\frac{-1-\\sqrt{3} i}{2} \\cdot \\frac{-1+\\sqrt{3} i}{2}=1 $$ This means $\\frac{-1+\\sqrt{3} i}{2}$ is a cube root of 1."} +{"name": "Axler_exercise_5_12", "source": "Axler.lean", "header": "import Mathlib\n\nopen Fintype Complex Polynomial LinearMap FiniteDimensional Module Module.End\nopen scoped BigOperators InnerProductSpace\n", "formal_statement": "theorem Axler_exercise_5_12 {F V : Type*} [AddCommGroup V] [Field F]\n [Module F V] {S : End F V}\n (hS : ∀ v : V, ∃ c : F, v ∈ eigenspace S c) :\n ∃ c : F, S = c • LinearMap.id := sorry", "formal_proof": null, "informal_stmt": "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.\n\\begin{proof}\n 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$.\n\nNow, to show that $T$ is a scalar multiple of the identity, then me must show that $a_v$ is independent of $v$ for $v \\in V\\{0\\}$. We would now want to show that $a_v=a_w$.\n\nFirst, just make the case of where $(v, w)$ is linearly dependent. Then, there does exist $b \\in F$ such that $w=b v$. Now, you would have the following: $a_W w=T w=T(b v)=b T v=b\\left(a_v v\\right)=a_v w$. This is showing that $a_v=a_w$.\nFinally, make the consideration to make $(v, w)$ be linearly independent. Now, we would have the following: $\\left.a_{(} v+w\\right)(v+w)=T(v+w)=T v+T w=a_v v+a_w w$.\n\nThat previous equation implies the following: $\\left.\\left.\\left(a_{(} v+w\\right)-a_v\\right) v+\\left(a_{(} v+w\\right)-a_w\\right) w=0$. Since $(v, w)$ is linearly independent, this would imply that both $\\left.a_{(} v+w\\right)=a_v$ and $\\left.a_{(} v+w\\right)=a_w$. Therefore, $a_v=a_w$.\n\\end{proof}", "informal_proof": "$$ \\left(\\frac{-1+\\sqrt{3} i}{2}\\right)^2=\\frac{-1-\\sqrt{3} i}{2}, $$ hence $$ \\left(\\frac{-1+\\sqrt{3} i}{2}\\right)^3=\\frac{-1-\\sqrt{3} i}{2} \\cdot \\frac{-1+\\sqrt{3} i}{2}=1 $$ This means $\\frac{-1+\\sqrt{3} i}{2}$ is a cube root of 1."} +{"name": "Axler_exercise_5_13", "source": "Axler.lean", "header": "import Mathlib\n\nopen Fintype Complex Polynomial LinearMap FiniteDimensional Module Module.End\nopen scoped BigOperators InnerProductSpace\n", "formal_statement": "theorem Axler_exercise_5_13 {F V : Type*} [AddCommGroup V] [Field F]\n [Module F V] [FiniteDimensional F V] {T : End F V}\n (hS : ∀ U : Submodule F V, finrank F U = finrank F V - 1 →\n Submodule.map T U = U) : ∃ c : F, T = c • LinearMap.id := sorry", "formal_proof": null, "informal_stmt": "Suppose $T \\in \\mathcal{L}(V)$ is such that every subspace of $V$ with dimension $\\operatorname{dim} V-1$ is invariant under $T$. Prove that $T$ is a scalar multiple of the identity operator.\n\\begin{proof}\n First off, let $T$ isn't a scalar multiple of the identity operator. So, there does exists that $v \\in V$ such that $u$ isn't an eigenvector of $T$. Therefore, $(u, T u)$ is linearly independent.\n\nNext, you should extend $(u, T u)$ to a basis of $\\left(u, T u, v_1, \\ldots, v_n\\right)$ of $V$. So, let $U=\\operatorname{span}\\left(u, v_1, \\ldots, v_n\\right)$. Then, $U$ is a subspace of $V$ and $\\operatorname{dim} U=\\operatorname{dim} V-1$. However, $U$ isn't invariant under $T$ since both $u \\in U$ and $T u \\in U$. This given contradiction to our hypothesis about $T$ actually shows us that our guess that $T$ is not a scalar multiple of the identity must have been false.\n\\end{proof}", "informal_proof": "$$ \\left(\\frac{-1+\\sqrt{3} i}{2}\\right)^2=\\frac{-1-\\sqrt{3} i}{2}, $$ hence $$ \\left(\\frac{-1+\\sqrt{3} i}{2}\\right)^3=\\frac{-1-\\sqrt{3} i}{2} \\cdot \\frac{-1+\\sqrt{3} i}{2}=1 $$ This means $\\frac{-1+\\sqrt{3} i}{2}$ is a cube root of 1."} +{"name": "Axler_exercise_5_20", "source": "Axler.lean", "header": "import Mathlib\n\nopen Fintype Complex Polynomial LinearMap FiniteDimensional Module Module.End\nopen scoped BigOperators InnerProductSpace\n", "formal_statement": "theorem Axler_exercise_5_20 {F V : Type*} [AddCommGroup V] [Field F]\n [Module F V] [FiniteDimensional F V] {S T : End F V}\n (h1 : card (T.Eigenvalues) = finrank F V)\n (h2 : ∀ v : V, ∃ c : F, v ∈ eigenspace S c ↔ ∃ c : F, v ∈ eigenspace T c) :\n S * T = T * S := sorry", "formal_proof": null, "informal_stmt": "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$.\n\\begin{proof}\n 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$.\n\nNow, for every $v_j$ is also an eigenvector of S, so $S v_j=a_j v_j$ for some $a_j \\in F$. For each $j$, we would then have $(S T) v_j=S\\left(T v_j\\right)=\\lambda_j S v_j=a_j \\lambda_j v_j$ and $(T S) v_j=T\\left(S v_j\\right)=a_j T v_j=a_j \\lambda_j v_j$. Since both operators, which are $S T$ and $T S$, agree on a basis, then both are equal.\n\\end{proof}", "informal_proof": "$$ \\left(\\frac{-1+\\sqrt{3} i}{2}\\right)^2=\\frac{-1-\\sqrt{3} i}{2}, $$ hence $$ \\left(\\frac{-1+\\sqrt{3} i}{2}\\right)^3=\\frac{-1-\\sqrt{3} i}{2} \\cdot \\frac{-1+\\sqrt{3} i}{2}=1 $$ This means $\\frac{-1+\\sqrt{3} i}{2}$ is a cube root of 1."} +{"name": "Axler_exercise_5_24", "source": "Axler.lean", "header": "import Mathlib\n\nopen Fintype Complex Polynomial LinearMap FiniteDimensional Module Module.End\nopen scoped BigOperators InnerProductSpace\n", "formal_statement": "theorem Axler_exercise_5_24 {V : Type*} [AddCommGroup V]\n [Module ℝ V] [FiniteDimensional ℝ V] {T : End ℝ V}\n (hT : ∀ c : ℝ, eigenspace T c = ⊥) {U : Submodule ℝ V}\n (hU : Submodule.map T U = U) : Even (finrank U) := sorry", "formal_proof": null, "informal_stmt": "Suppose $V$ is a real vector space and $T \\in \\mathcal{L}(V)$ has no eigenvalues. Prove that every subspace of $V$ invariant under $T$ has even dimension.\n\\begin{proof}\n First off, let us assume that $U$ is a subspace of $V$ that is invariant under $T$. Therefore, $\\left.T\\right|_U \\in \\mathcal{L}(U)$. If $\\operatorname{dim}$ $U$ were odd, then $\\left.T\\right|_U$ would have an eigenvalue $\\lambda \\in \\mathbb{R}$, so there would exist a nonzero vector $u \\in U$ such that\n$$\n\\left.T\\right|_U u=\\lambda u .\n$$\nSo, this would imply that $T_u=\\lambda u$, which would imply that $\\lambda$ is an eigenvalue of $T$. But $T$ has no eigenvalues, so $\\operatorname{dim} U$ must be even.\n\\end{proof}", "informal_proof": "$$ \\left(\\frac{-1+\\sqrt{3} i}{2}\\right)^2=\\frac{-1-\\sqrt{3} i}{2}, $$ hence $$ \\left(\\frac{-1+\\sqrt{3} i}{2}\\right)^3=\\frac{-1-\\sqrt{3} i}{2} \\cdot \\frac{-1+\\sqrt{3} i}{2}=1 $$ This means $\\frac{-1+\\sqrt{3} i}{2}$ is a cube root of 1."} +{"name": "Axler_exercise_6_2", "source": "Axler.lean", "header": "import Mathlib\n\nopen Fintype Complex Polynomial LinearMap FiniteDimensional Module Module.End\nopen scoped BigOperators InnerProductSpace\n", "formal_statement": "theorem Axler_exercise_6_2 {V : Type*} [NormedAddCommGroup V] [Module ℂ V]\n[InnerProductSpace ℂ V] (u v : V) :\n ⟪u, v⟫_ℂ = 0 ↔ ∀ (a : ℂ), ‖u‖ ≤ ‖u + a • v‖ := sorry", "formal_proof": null, "informal_stmt": "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}$.\n\\begin{proof}\n First off, let us suppose that $(u, v)=0$.\nNow, let $a \\in \\mathbb{F}$. Next, $u, a v$ are orthogonal.\nThe Pythagorean theorem thus implies that\n$$\n\\begin{aligned}\n\\|u+a v\\|^2 & =\\|u\\|^2+\\|a v\\|^2 \\\\\n& \\geq\\|u\\|^2\n\\end{aligned}\n$$\nSo, by taking the square roots, this will now give us $\\|u\\| \\leq\\|u+a v\\|$.\nNow, to prove the implication in the other direction, we must now let $\\|u\\| \\leq$ $\\|u+a v\\|$ for all $a \\in \\mathbb{F}$. Squaring this inequality, we get both:\n$$\n\\begin{gathered}\n\\|u\\|^2 a n d \\leq\\|u+a v\\|^2 \\\\\n=(u+a v, u+a v) \\\\\n=(u, u)+(u, a v)+(a v, u)+(a v, a v) \\\\\n=\\|u\\|^2+\\bar{a}(u, v)+a \\overline{(u, v)}+|a|^2\\|v\\|^2 \\\\\n\\|u\\|^2+2 \\Re \\bar{a}(u, v)+|a|^2\\|v\\|^2\n\\end{gathered}\n$$\nfor all $a \\in \\mathbb{F}$.\nTherefore,\n$$\n-2 \\Re \\bar{a}(u, v) \\leq|a|^2\\|v\\|^2\n$$\nfor all $a \\in \\mathbb{F}$. In particular, we can let $a$ equal $-t(u, v)$ for $t>0$. Substituting this value for $a$ into the inequality above gives\n$$\n2 t|(u, v)|^2 \\leq t^2|(u, v)|^2\\|v\\|^2\n$$\nfor all $t>0$.\nStep 4\n4 of 4\nDivide both sides of the inequality above by $t$, getting\n$$\n2|(u, v)|^2 \\leq t \\mid(u, v)^2\\|v\\|^2\n$$\nfor all $t>0$. If $v=0$, then $(u, v)=0$, as desired. If $v \\neq 0$, set $t$ equal to $1 /\\|v\\|^2$ in the inequality above, getting\n$$\n2|(u, v)|^2 \\leq|(u, v)|^2,\n$$\nwhich implies that $(u, v)=0$.\n\\end{proof}", "informal_proof": "$$ \\left(\\frac{-1+\\sqrt{3} i}{2}\\right)^2=\\frac{-1-\\sqrt{3} i}{2}, $$ hence $$ \\left(\\frac{-1+\\sqrt{3} i}{2}\\right)^3=\\frac{-1-\\sqrt{3} i}{2} \\cdot \\frac{-1+\\sqrt{3} i}{2}=1 $$ This means $\\frac{-1+\\sqrt{3} i}{2}$ is a cube root of 1."} +{"name": "Axler_exercise_6_3", "source": "Axler.lean", "header": "import Mathlib\n\nopen Fintype Complex Polynomial LinearMap FiniteDimensional Module Module.End\nopen scoped BigOperators InnerProductSpace\n", "formal_statement": "theorem Axler_exercise_6_3 {n : ℕ} (a b : Fin n → ℝ) :\n (∑ i, a i * b i) ^ 2 ≤ (∑ i : Fin n, i * a i ^ 2) * (∑ i, b i ^ 2 / i) := sorry", "formal_proof": null, "informal_stmt": "Prove that $\\left(\\sum_{j=1}^{n} a_{j} b_{j}\\right)^{2} \\leq\\left(\\sum_{j=1}^{n} j a_{j}{ }^{2}\\right)\\left(\\sum_{j=1}^{n} \\frac{b_{j}{ }^{2}}{j}\\right)$ for all real numbers $a_{1}, \\ldots, a_{n}$ and $b_{1}, \\ldots, b_{n}$.\n\\begin{proof}\n Let $a_1, a_2, \\ldots, a_n, b_1, b_2, \\ldots, b_n \\in R$.\nWe have that\n$$\n\\left(\\sum_{j=1}^n a_j b_j\\right)^2\n$$\nis equal to the\n$$\n\\left(\\sum_{j=1}^n a_j b_j \\frac{\\sqrt{j}}{\\sqrt{j}}\\right)^2=\\left(\\sum_{j=1}^n\\left(\\sqrt{j} a_j\\right)\\left(b_j \\frac{1}{\\sqrt{j}}\\right)\\right)^2\n$$\nThis can be observed as an inner product, and using the Cauchy-Schwarz Inequality, we get\n$$\n\\begin{aligned}\n&\\left(\\sum_{j=1}^n a_j b_j\\right)^2=\\left(\\sum_{j=1}^n\\left(\\sqrt{j} a_j\\right)\\left(b_j \\frac{1}{\\sqrt{j}}\\right)\\right)^2 \\\\\n&=\\left\\langle\\left(a, \\sqrt{2} a_2, \\ldots, \\sqrt{n} a_n\\right),\\left(b_1, \\frac{b_2}{\\sqrt{2}}, \\ldots, \\frac{b_n}{\\sqrt{n}}\\right)\\right\\rangle \\\\\n& \\leq\\left\\|\\left(a, \\sqrt{2} a_2, \\ldots, \\sqrt{n} a_n\\right)\\right\\|^2\\left\\|\\left(b_1, \\frac{b_2}{\\sqrt{2}}, \\ldots, \\frac{b_n}{\\sqrt{n}}\\right)\\right\\|^2 \\\\\n&=\\left(\\sum_{j=1}^n j a_j^2\\right)\\left(\\sum_{j=1}^n \\frac{b_j^2}{j}\\right) \\\\\n& \\text { Hence, }\\left(\\sum_{j=1}^n a_j b_j\\right)^2=\\left(\\sum_{j=1}^n j a_j^2\\right)\\left(\\sum_{j=1}^n \\frac{b_j^2}{j}\\right) .\n\\end{aligned}\n$$\n\\end{proof}", "informal_proof": "$$ \\left(\\frac{-1+\\sqrt{3} i}{2}\\right)^2=\\frac{-1-\\sqrt{3} i}{2}, $$ hence $$ \\left(\\frac{-1+\\sqrt{3} i}{2}\\right)^3=\\frac{-1-\\sqrt{3} i}{2} \\cdot \\frac{-1+\\sqrt{3} i}{2}=1 $$ This means $\\frac{-1+\\sqrt{3} i}{2}$ is a cube root of 1."} +{"name": "Axler_exercise_6_7", "source": "Axler.lean", "header": "import Mathlib\n\nopen Fintype Complex Polynomial LinearMap FiniteDimensional Module Module.End\nopen scoped BigOperators InnerProductSpace\n", "formal_statement": "theorem Axler_exercise_6_7 {V : Type*} [NormedAddCommGroup V] [InnerProductSpace ℂ V] (u v : V) :\n ⟪u, v⟫_ℂ = (‖u + v‖^2 - ‖u - v‖^2 + I*‖u + I•v‖^2 - I*‖u-I•v‖^2) / 4 := sorry", "formal_proof": null, "informal_stmt": "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$.\n\\begin{proof}\nLet $V$ be an inner-product space and $u, v\\in V$. Then \n$$\n\\begin{aligned}\n\\|u+v\\|^2 & =\\langle u+v, v+v\\rangle \\\\\n& =\\|u\\|^2+\\langle u, v\\rangle+\\langle v, u\\rangle+\\|v\\|^2 \\\\\n-\\|u-v\\|^2 & =-\\langle u-v, u-v\\rangle \\\\\n& =-\\|u\\|^2+\\langle u, v\\rangle+\\langle v, u\\rangle-\\|v\\|^2 \\\\\ni\\|u+i v\\|^2 & =i\\langle u+i v, u+i v\\rangle \\\\\n& =i\\|u\\|^2+\\langle u, v\\rangle-\\langle v, u\\rangle+i\\|v\\|^2 \\\\\n-i\\|u-i v\\|^2 & =-i\\langle u-i v, u-i v\\rangle \\\\\n& =-i\\|u\\|^2+\\langle u, v\\rangle-\\langle v, u\\rangle-i\\|v\\|^2 .\n\\end{aligned}\n$$\nThus $\\left(\\|u+v\\|^2\\right)-\\|u-v\\|^2+\\left(i\\|u+i v\\|^2\\right)-i\\|u-i v\\|^2=4\\langle u, v\\rangle.$\n\\end{proof}", "informal_proof": "$$ \\left(\\frac{-1+\\sqrt{3} i}{2}\\right)^2=\\frac{-1-\\sqrt{3} i}{2}, $$ hence $$ \\left(\\frac{-1+\\sqrt{3} i}{2}\\right)^3=\\frac{-1-\\sqrt{3} i}{2} \\cdot \\frac{-1+\\sqrt{3} i}{2}=1 $$ This means $\\frac{-1+\\sqrt{3} i}{2}$ is a cube root of 1."} +{"name": "Axler_exercise_6_13", "source": "Axler.lean", "header": "import Mathlib\n\nopen Fintype Complex Polynomial LinearMap FiniteDimensional Module Module.End\nopen scoped BigOperators InnerProductSpace\n", "formal_statement": "theorem Axler_exercise_6_13 {V : Type*} [NormedAddCommGroup V] [InnerProductSpace ℂ V] {n : ℕ}\n {e : Fin n → V} (he : Orthonormal ℂ e) (v : V) :\n ‖v‖^2 = ∑ i : Fin n, ‖⟪v, e i⟫_ℂ‖^2 ↔ v ∈ Submodule.span ℂ (e '' Set.univ) := sorry", "formal_proof": null, "informal_stmt": "Suppose $\\left(e_{1}, \\ldots, e_{m}\\right)$ is an orthonormal list of vectors in $V$. Let $v \\in V$. Prove that $\\|v\\|^{2}=\\left|\\left\\langle v, e_{1}\\right\\rangle\\right|^{2}+\\cdots+\\left|\\left\\langle v, e_{m}\\right\\rangle\\right|^{2}$ if and only if $v \\in \\operatorname{span}\\left(e_{1}, \\ldots, e_{m}\\right)$.\n\\begin{proof}\nIf $v \\in \\operatorname{span}\\left(e_1, \\ldots, e_m\\right)$, it means that\n$$\nv=\\alpha_1 e_1+\\ldots+\\alpha_m e_m .\n$$\nfor some scalars $\\alpha_i$. We know that $\\alpha_k=\\left\\langle v, e_k\\right\\rangle, \\forall k \\in\\{1, \\ldots, m\\}$. Therefore,\n$$\n\\begin{aligned}\n\\|v\\|^2 & =\\langle v, v\\rangle \\\\\n& =\\left\\langle\\alpha_1 e_1+\\ldots+\\alpha_m e_m, \\alpha_1 e_1+\\ldots+\\alpha_m e_m\\right\\rangle \\\\\n& =\\left|\\alpha_1\\right|^2\\left\\langle e_1, e_1\\right\\rangle+\\ldots+\\left|\\alpha_m\\right|^2\\left\\langle e_m, e_m\\right\\rangle \\\\\n& =\\left|\\alpha_1\\right|^2+\\ldots+\\left|\\alpha_m\\right|^2 \\\\\n& =\\left|\\left\\langle v, e_1\\right\\rangle\\right|^2+\\ldots+\\left|\\left\\langle v, e_m\\right\\rangle\\right|^2 .\n\\end{aligned}\n$$\n$\\Rightarrow$ Assume that $v \\notin \\operatorname{span}\\left(e_1, \\ldots, e_m\\right)$. Then, we must have\n$$\nv=v_{m+1}+\\frac{\\left\\langle v, v_0\\right\\rangle}{\\left\\|v_0\\right\\|^2} v_0,\n$$\nwhere $v_0=\\alpha_1 e_1+\\ldots+\\alpha_m e_m, \\alpha_k=\\left\\langle v, e_k\\right\\rangle, \\forall k \\in\\{1, \\ldots, m\\}$, and $v_{m+1}=v-$ $\\frac{\\left\\langle v, v_0\\right\\rangle}{\\left\\|v_0\\right\\|^2} v_0 \\neq 0$.\n\nWe have $\\left\\langle v_0, v_{m+1}\\right\\rangle=0$ (from which we get $\\left\\langle v, v_0\\right\\rangle=\\left\\langle v_0, v_0\\right\\rangle$ and $\\left\\langle v, v_{m+1}\\right\\rangle=$ $\\left.\\left\\langle v_{m+1}, v_{m+1}\\right\\rangle\\right)$. Now,\n$$\n\\begin{aligned}\n\\|v\\|^2 & =\\langle v, v\\rangle \\\\\n& =\\left\\langle v, v_{m+1}+\\frac{\\left\\langle v, v_0\\right\\rangle}{\\left\\|v_0\\right\\|^2} v_0\\right\\rangle \\\\\n& =\\left\\langle v, v_{m+1}\\right\\rangle+\\left\\langle v, \\frac{\\left\\langle v, v_0\\right\\rangle}{\\left\\|v_0\\right\\|^2} v_0\\right\\rangle \\\\\n& =\\left\\langle v_{m+1}, v_{m+1}\\right\\rangle+\\frac{\\left\\langle v_0, v_0\\right\\rangle}{\\left\\|v_0\\right\\|^2}\\left\\langle v_0, v_0\\right\\rangle \\\\\n& =\\left\\|v_{m+1}\\right\\|^2+\\left\\|v_0\\right\\|^2 \\\\\n& >\\left\\|v_0\\right\\|^2 \\\\\n& =\\left|\\alpha_1\\right|^2+\\ldots+\\left|\\alpha_m\\right|^2 \\\\\n& =\\left|\\left\\langle v, e_1\\right\\rangle\\right|^2+\\ldots+\\left|\\left\\langle v, e_m\\right\\rangle\\right|^2 .\n\\end{aligned}\n$$\nBy contrapositive, if $\\left\\|v_1\\right\\|^2=\\left|\\left\\langle v, e_1\\right\\rangle\\right|^2+\\ldots+\\left|\\left\\langle v, e_m\\right\\rangle\\right|^2$, then $v \\in \\operatorname{span}\\left(e_1, \\ldots, e_m\\right)$.\n\\end{proof}", "informal_proof": "$$ \\left(\\frac{-1+\\sqrt{3} i}{2}\\right)^2=\\frac{-1-\\sqrt{3} i}{2}, $$ hence $$ \\left(\\frac{-1+\\sqrt{3} i}{2}\\right)^3=\\frac{-1-\\sqrt{3} i}{2} \\cdot \\frac{-1+\\sqrt{3} i}{2}=1 $$ This means $\\frac{-1+\\sqrt{3} i}{2}$ is a cube root of 1."} +{"name": "Axler_exercise_6_16", "source": "Axler.lean", "header": "import Mathlib\n\nopen Fintype Complex Polynomial LinearMap FiniteDimensional Module Module.End\nopen scoped BigOperators InnerProductSpace\n", "formal_statement": "theorem Axler_exercise_6_16 {K V : Type*} [RCLike K] [NormedAddCommGroup V] [InnerProductSpace K V]\n {U : Submodule K V} :\n U.orthogonal = ⊥ ↔ U = ⊤ := sorry", "formal_proof": null, "informal_stmt": "Suppose $U$ is a subspace of $V$. Prove that $U^{\\perp}=\\{0\\}$ if and only if $U=V$\n\\begin{proof}\n $V=U \\bigoplus U^{\\perp}$, therefore $U^\\perp = \\{0\\}$ iff $U=V$. \n\\end{proof}", "informal_proof": "$$ \\left(\\frac{-1+\\sqrt{3} i}{2}\\right)^2=\\frac{-1-\\sqrt{3} i}{2}, $$ hence $$ \\left(\\frac{-1+\\sqrt{3} i}{2}\\right)^3=\\frac{-1-\\sqrt{3} i}{2} \\cdot \\frac{-1+\\sqrt{3} i}{2}=1 $$ This means $\\frac{-1+\\sqrt{3} i}{2}$ is a cube root of 1."} +{"name": "Axler_exercise_7_5", "source": "Axler.lean", "header": "import Mathlib\n\nopen Fintype Complex Polynomial LinearMap FiniteDimensional Module Module.End\nopen scoped BigOperators InnerProductSpace\n", "formal_statement": "theorem Axler_exercise_7_5 {V : Type*} [NormedAddCommGroup V] [InnerProductSpace ℂ V]\n [FiniteDimensional ℂ V] (hV : finrank V ≥ 2) :\n ∀ U : Submodule ℂ (End ℂ V), U.carrier ≠\n {T | T * adjoint T = adjoint T * T} := sorry", "formal_proof": null, "informal_stmt": "Show that if $\\operatorname{dim} V \\geq 2$, then the set of normal operators on $V$ is not a subspace of $\\mathcal{L}(V)$.\n\\begin{proof}\n First off, suppose that $\\operatorname{dim} V \\geq 2$. Next let $\\left(e_1, \\ldots, e_n\\right)$ be an orthonormal basis of $V$. Now, define $S, T \\in L(V)$ by both $S\\left(a_1 e_1+\\ldots+a_n e_n\\right)=a_2 e_1-a_1 e_2$ and $T\\left(a_1 e_1+\\ldots+\\right.$ $\\left.a_n e_n\\right)=a_2 e_1+a_1 e_2$. So, just by now doing a simple calculation verifies that $S^*\\left(a_1 e_1+\\right.$ $\\left.\\ldots+a_n e_n\\right)=-a_2 e_1+a_1 e_2$\n\nNow, based on this formula, another calculation would show that $S S^*=S^* S$. Another simple calculation would that that $T$ is self-adjoint. Therefore, both $S$ and $T$ are normal. However, $S+T$ is given by the formula of $(S+T)\\left(a_1 e_1+\\ldots+a_n e_n\\right)=2 a_2 e_1$. In this case, a simple calculator verifies that $(S+T)^*\\left(a_1 e_1+\\ldots+a_n e_n\\right)=2 a_1 e_2$.\n\nTherefore, there is a final simple calculation that shows that $(S+T)(S+T)^* \\neq(S+$ $T)^*(S+T)$. So, in other words, $S+T$ isn't normal. Therefore, the set of normal operators on $V$ isn't closed under addition and hence isn't a subspace of $L(V)$.\n\\end{proof}", "informal_proof": "$$ \\left(\\frac{-1+\\sqrt{3} i}{2}\\right)^2=\\frac{-1-\\sqrt{3} i}{2}, $$ hence $$ \\left(\\frac{-1+\\sqrt{3} i}{2}\\right)^3=\\frac{-1-\\sqrt{3} i}{2} \\cdot \\frac{-1+\\sqrt{3} i}{2}=1 $$ This means $\\frac{-1+\\sqrt{3} i}{2}$ is a cube root of 1."} +{"name": "Axler_exercise_7_6", "source": "Axler.lean", "header": "import Mathlib\n\nopen Fintype Complex Polynomial LinearMap FiniteDimensional Module Module.End\nopen scoped BigOperators InnerProductSpace\n", "formal_statement": "theorem Axler_exercise_7_6 {V : Type*} [NormedAddCommGroup V] [InnerProductSpace ℂ V]\n [FiniteDimensional ℂ V] (T : End ℂ V)\n (hT : T * adjoint T = adjoint T * T) :\n range T = range (adjoint T) := sorry", "formal_proof": null, "informal_stmt": "Prove that if $T \\in \\mathcal{L}(V)$ is normal, then $\\operatorname{range} T=\\operatorname{range} T^{*}.$\n\\begin{proof}\n Let $T \\in \\mathcal{L}(V)$ to be a normal operator.\nSuppose $u \\in \\operatorname{null} T$. Then, by $7.20$,\n$$\n0=\\|T u\\|=\\left\\|T^* u\\right\\|,\n$$\nwhich implies that $u \\in \\operatorname{null} T^*$.\nHence\n$$\n\\operatorname{null} T=\\operatorname{null} T^*\n$$\nbecause $\\left(T^*\\right)^*=T$ and the same argument can be repeated.\nNow we have\n$$\n\\begin{aligned}\n\\text { range } T & =\\left(\\text { null } T^*\\right)^{\\perp} \\\\\n& =(\\text { null } T)^{\\perp} \\\\\n& =\\operatorname{range} T^*,\n\\end{aligned}\n$$\nwhere the first and last equality follow from items (d) and (b) of 7.7.\nHence, range $T=$ range $T^*$.\n\\end{proof}", "informal_proof": "$$ \\left(\\frac{-1+\\sqrt{3} i}{2}\\right)^2=\\frac{-1-\\sqrt{3} i}{2}, $$ hence $$ \\left(\\frac{-1+\\sqrt{3} i}{2}\\right)^3=\\frac{-1-\\sqrt{3} i}{2} \\cdot \\frac{-1+\\sqrt{3} i}{2}=1 $$ This means $\\frac{-1+\\sqrt{3} i}{2}$ is a cube root of 1."} +{"name": "Axler_exercise_7_9", "source": "Axler.lean", "header": "import Mathlib\n\nopen Fintype Complex Polynomial LinearMap FiniteDimensional Module Module.End\nopen scoped BigOperators InnerProductSpace\n", "formal_statement": "theorem Axler_exercise_7_9 {V : Type*} [NormedAddCommGroup V] [InnerProductSpace ℂ V]\n [FiniteDimensional ℂ V] (T : End ℂ V)\n (hT : T * adjoint T = adjoint T * T) :\n IsSelfAdjoint T ↔ ∀ e : T.Eigenvalues, (e : ℂ).im = 0 := sorry", "formal_proof": null, "informal_stmt": "Prove that a normal operator on a complex inner-product space is self-adjoint if and only if all its eigenvalues are real.\n\\begin{proof}\n First off, suppose $V$ is a complex inner product space and $T \\in L(V)$ is normal. If $T$ is self-adjoint, then all its eigenvalues are real. So, conversely, let all of the eigenvalues of $T$ be real. By the complex spectral theorem, there's an orthonormal basis $\\left(e_1, \\ldots, e_n\\right)$ of $V$ consisting of eigenvectors of $T$. Thus, there exists real numbers $\\lambda_1, \\ldots, \\lambda_n$ such that $T e_j=\\lambda_j e_j$ for $j=$ $1, \\ldots, n$.\nThe matrix of $T$ with respect to the basis of $\\left(e_1, \\ldots, e_n\\right)$ is the diagonal matrix with $\\lambda_1, \\ldots, \\lambda_n$ on the diagonal. So, the matrix equals its conjugate transpose. Therefore, $T=T^*$. In other words, $T$ s self-adjoint.\n\\end{proof}", "informal_proof": "$$ \\left(\\frac{-1+\\sqrt{3} i}{2}\\right)^2=\\frac{-1-\\sqrt{3} i}{2}, $$ hence $$ \\left(\\frac{-1+\\sqrt{3} i}{2}\\right)^3=\\frac{-1-\\sqrt{3} i}{2} \\cdot \\frac{-1+\\sqrt{3} i}{2}=1 $$ This means $\\frac{-1+\\sqrt{3} i}{2}$ is a cube root of 1."} +{"name": "Axler_exercise_7_10", "source": "Axler.lean", "header": "import Mathlib\n\nopen Fintype Complex Polynomial LinearMap FiniteDimensional Module Module.End\nopen scoped BigOperators InnerProductSpace\n", "formal_statement": "theorem Axler_exercise_7_10 {V : Type*} [NormedAddCommGroup V] [InnerProductSpace ℂ V]\n [FiniteDimensional ℂ V] (T : End ℂ V)\n (hT : T * adjoint T = adjoint T * T) (hT1 : T^9 = T^8) :\n IsSelfAdjoint T ∧ T^2 = T := sorry", "formal_proof": null, "informal_stmt": "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$.\n\\begin{proof}\n 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,\n$$\nT e_1=\\lambda_j e_j\n$$\nfor $j=1 \\ldots n$.\n\nNext, by applying $T$ repeatedly to both sides of the equation above, we get $T^9 e_j=\\left(\\lambda_j\\right)^9 e_j$ and rei =8ej. Thus $T^8 e_j=\\left(\\lambda_j\\right)^8 e_j$, which implies that $\\lambda_j$ equals 0 or 1 . In particular, all the eigenvalues of $T$ are real. This would then imply that $T$ is self-adjoint.\n\nNow, by applying $T$ to both sides of the equation above, we get\n$$\n\\begin{aligned}\nT^2 e_j & =\\left(\\lambda_j\\right)^2 e_j \\\\\n& =\\lambda_j e_j \\\\\n& =T e_j\n\\end{aligned}\n$$\nwhich is where the second equality holds because $\\lambda_j$ equals 0 or 1 . Because $T^2$ and $T$ agree on a basis, they must be equal.\n\\end{proof}", "informal_proof": "$$ \\left(\\frac{-1+\\sqrt{3} i}{2}\\right)^2=\\frac{-1-\\sqrt{3} i}{2}, $$ hence $$ \\left(\\frac{-1+\\sqrt{3} i}{2}\\right)^3=\\frac{-1-\\sqrt{3} i}{2} \\cdot \\frac{-1+\\sqrt{3} i}{2}=1 $$ This means $\\frac{-1+\\sqrt{3} i}{2}$ is a cube root of 1."} +{"name": "Axler_exercise_7_11", "source": "Axler.lean", "header": "import Mathlib\n\nopen Fintype Complex Polynomial LinearMap FiniteDimensional Module Module.End\nopen scoped BigOperators InnerProductSpace\n", "formal_statement": "theorem Axler_exercise_7_11 {V : Type*} [NormedAddCommGroup V] [InnerProductSpace ℂ V]\n [FiniteDimensional ℂ V] {T : End ℂ V} (hT : T*adjoint T = adjoint T*T) :\n ∃ (S : End ℂ V), S ^ 2 = T := sorry", "formal_proof": null, "informal_stmt": "Suppose $V$ is a complex inner-product space. Prove that every normal operator on $V$ has a square root. (An operator $S \\in \\mathcal{L}(V)$ is called a square root of $T \\in \\mathcal{L}(V)$ if $S^{2}=T$.)\n\\begin{proof}\n Let $V$ be a complex inner product space.\nIt is known that an operator $S \\in \\mathcal{L}(V)$ is called a square root of $T \\in \\mathcal{L}(V)$ if\n$$\nS^2=T\n$$\nNow, suppose that $T$ is a normal operator on $V$.\nBy the Complex Spectral Theorem, there is $e_1, \\ldots, e_n$ an orthonormal basis of $V$ consisting of eigenvalues of $T$ and let $\\lambda_1, \\ldots, \\lambda_n$ denote their corresponding eigenvalues.\nDefine $S$ by\n$$\nS e_j=\\sqrt{\\lambda_j} e_j,\n$$\nfor each $j=1, \\ldots, n$.\nObviously, $S^2 e_j=\\lambda_j e_j=T e_j$.\nHence, $S^2=T$ so there exist a square root of $T$.\n\\end{proof}", "informal_proof": "$$ \\left(\\frac{-1+\\sqrt{3} i}{2}\\right)^2=\\frac{-1-\\sqrt{3} i}{2}, $$ hence $$ \\left(\\frac{-1+\\sqrt{3} i}{2}\\right)^3=\\frac{-1-\\sqrt{3} i}{2} \\cdot \\frac{-1+\\sqrt{3} i}{2}=1 $$ This means $\\frac{-1+\\sqrt{3} i}{2}$ is a cube root of 1."} +{"name": "Axler_exercise_7_14", "source": "Axler.lean", "header": "import Mathlib\n\nopen Fintype Complex Polynomial LinearMap FiniteDimensional Module Module.End\nopen scoped BigOperators InnerProductSpace\n", "formal_statement": "theorem Axler_exercise_7_14 {𝕜 V : Type*} [RCLike 𝕜] [NormedAddCommGroup V]\n [InnerProductSpace 𝕜 V] [FiniteDimensional 𝕜 V]\n {T : End 𝕜 V} (hT : IsSelfAdjoint T)\n {l : 𝕜} {ε : ℝ} (he : ε > 0) : ∃ v : V, ‖v‖= 1 ∧ (‖T v - l • v‖ < ε →\n (∃ l' : T.Eigenvalues, ‖l - l'‖ < ε)) := sorry", "formal_proof": null, "informal_stmt": "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$.\n\\begin{proof}\n Let $T \\in \\mathcal{L}(V)$ be a self-adjoint, and let $\\lambda \\in \\mathbf{F}$ and $\\epsilon>0$.\nBy 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.\nChoose an eigenvalue $\\lambda^{\\prime}$ of $T$ such that $\\left|\\lambda^{\\prime}-\\lambda\\right|^2$ is minimized.\nThere are $a_1, \\ldots, a_n \\in \\mathbb{F}$ such that\n$$\nv=a_1 e_1+\\cdots+a_n e_n .\n$$\nThus, we have\n$$\n\\begin{aligned}\n\\epsilon^2 & >|| T v-\\left.\\lambda v\\right|^2 \\\\\n& =\\left|\\left\\langle T v-\\lambda v, e_1\\right\\rangle\\right|^2+\\cdots+\\left|\\left\\langle T v-\\lambda v, e_n\\right\\rangle\\right|^2 \\\\\n& =\\left|\\lambda_1 a_1-\\lambda a_1\\right|^2+\\cdots+\\left|\\lambda_n a_n-\\lambda a_n\\right|^2 \\\\\n& =\\left|a_1\\right|^2\\left|\\lambda_1-\\lambda\\right|^2+\\cdots+\\left|a_n\\right|^2\\left|\\lambda_n-\\lambda\\right|^2 \\\\\n& \\geq\\left|a_1\\right|^2\\left|\\lambda^{\\prime}-\\lambda\\right|^2+\\cdots+\\left|a_n\\right|^2\\left|\\lambda^{\\prime}-\\lambda\\right|^2 \\\\\n& =\\left|\\lambda^{\\prime}-\\lambda\\right|^2\n\\end{aligned}\n$$\nwhere the second and fifth lines follow from $6.30$ (the fifth because $\\|v\\|=1$ ). Now, we taking the square root.\nHence, $T$ has an eigenvalue $\\lambda^{\\prime}$ such that $\\left|\\lambda^{\\prime}-\\lambda\\right|<\\epsilon$\n\\end{proof}\n\n\n\n\\end{document}", "informal_proof": "$$ \\left(\\frac{-1+\\sqrt{3} i}{2}\\right)^2=\\frac{-1-\\sqrt{3} i}{2}, $$ hence $$ \\left(\\frac{-1+\\sqrt{3} i}{2}\\right)^3=\\frac{-1-\\sqrt{3} i}{2} \\cdot \\frac{-1+\\sqrt{3} i}{2}=1 $$ This means $\\frac{-1+\\sqrt{3} i}{2}$ is a cube root of 1."} {"name": "Artin_exercise_2_2_9", "source": "Artin.lean", "header": "import Mathlib\n\nopen Function Fintype Subgroup Ideal Polynomial Submodule Zsqrtd\nopen scoped BigOperators\nnoncomputable section\n", "formal_statement": "theorem Artin_exercise_2_2_9 {G : Type*} [Group G] {a b : G}\n (h : a * b = b * a) :\n ∀ x y : closure {x | x = a ∨ x = b}, x*y = y*x := sorry", "formal_proof": null, "informal_stmt": "Let $H$ be the subgroup generated by two elements $a, b$ of a group $G$. Prove that if $a b=b a$, then $H$ is an abelian group.\n\\begin{proof}\n Since $a$ and $b$ commute, for any $g, h\\in H$ we can write $g=a^ib^j$ and $h = a^kb^l$. Then $gh = a^ib^ja^kb^l = a^kb^la^ib^j = hg$. Thus $H$ is abelian. \n\\end{proof}", "informal_proof": "Since $a$ and $b$ commute, for any $g, h\\in H$ we can write $g=a^ib^j$ and $h = a^kb^l$. Then $gh = a^ib^ja^kb^l = a^kb^la^ib^j = hg$. Thus $H$ is abelian."} {"name": "Artin_exercise_2_3_2", "source": "Artin.lean", "header": "import Mathlib\n\nopen Function Fintype Subgroup Ideal Polynomial Submodule Zsqrtd\nopen scoped BigOperators\nnoncomputable section\n", "formal_statement": "theorem Artin_exercise_2_3_2 {G : Type*} [Group G] (a b : G) :\n ∃ g : G, b* a = g * a * b * g⁻¹ := sorry", "formal_proof": null, "informal_stmt": "Prove that the products $a b$ and $b a$ are conjugate elements in a group.\n\\begin{proof}\n We have that $(a^{-1})ab(a^{-1})^{-1} = ba$. \n\\end{proof}", "informal_proof": "Since $a$ and $b$ commute, for any $g, h\\in H$ we can write $g=a^ib^j$ and $h = a^kb^l$. Then $gh = a^ib^ja^kb^l = a^kb^la^ib^j = hg$. Thus $H$ is abelian."} {"name": "Artin_exercise_2_4_19", "source": "Artin.lean", "header": "import Mathlib\n\nopen Function Fintype Subgroup Ideal Polynomial Submodule Zsqrtd\nopen scoped BigOperators\nnoncomputable section\n", "formal_statement": "theorem Artin_exercise_2_4_19 {G : Type*} [Group G] {x : G}\n (hx : orderOf x = 2) (hx1 : ∀ y, orderOf y = 2 → y = x) :\n x ∈ center G := sorry", "formal_proof": null, "informal_stmt": "Prove that if a group contains exactly one element of order 2 , then that element is in the center of the group.\n\\begin{proof}\n Let $x$ be the element of order two. Consider the element $z=y^{-1} x y$, we have: $z^2=\\left(y^{-1} x y\\right)^2=\\left(y^{-1} x y\\right)\\left(y^{-1} x y\\right)=e$. So: $z=x$, and $y^{-1} x y=x$. So: $x y=y x$. So: $x$ is in the center of $G$. \n\\end{proof}", "informal_proof": "Since $a$ and $b$ commute, for any $g, h\\in H$ we can write $g=a^ib^j$ and $h = a^kb^l$. Then $gh = a^ib^ja^kb^l = a^kb^la^ib^j = hg$. Thus $H$ is abelian."} @@ -288,87 +372,3 @@ {"name": "Artin_exercise_11_13_3", "source": "Artin.lean", "header": "import Mathlib\n\nopen Function Fintype Subgroup Ideal Polynomial Submodule Zsqrtd\nopen scoped BigOperators\nnoncomputable section\n", "formal_statement": "theorem Artin_exercise_11_13_3 (N : ℕ):\n ∃ p ≥ N, Nat.Prime p ∧ p + 1 ≡ 0 [MOD 4] := sorry", "formal_proof": null, "informal_stmt": "Prove that there are infinitely many primes congruent to $-1$ (modulo $4$).\n\\begin{proof}\n First we show a lemma: if $a \\equiv 3(\\bmod 4)$ then there exists a prime $p$ such that $p \\mid a$ and $p \\equiv 3(\\bmod 4)$.\n\n Clearly, all primes dividing $a$ are odd. Suppose all of them would be $\\equiv 1(\\bmod 4)$. Then their product would also be $a \\equiv 1(\\bmod 4)$, which is a contradiction.\n\nTo prove the main claim, suppose that $p_1, \\ldots, p_n$ would be all such primes. (In particular, we have $p_1=3$.) Consider $a=4 p_2 \\cdots p_n+3$. (Or you can take $a=4 p_2 \\cdots p_n-1$.) Show that $p_i \\nmid a$ for $i=1, \\ldots, n$. (The case $3 \\nmid a$ is solved differently than the other primes - this is the reason for omitting $p_1$ in the definition of $a$.) Then use the above lemma to get a contradiction.\n\\end{proof}", "informal_proof": "Since $a$ and $b$ commute, for any $g, h\\in H$ we can write $g=a^ib^j$ and $h = a^kb^l$. Then $gh = a^ib^ja^kb^l = a^kb^la^ib^j = hg$. Thus $H$ is abelian."} {"name": "Artin_exercise_13_4_10", "source": "Artin.lean", "header": "import Mathlib\n\nopen Function Fintype Subgroup Ideal Polynomial Submodule Zsqrtd\nopen scoped BigOperators\nnoncomputable section\n", "formal_statement": "theorem Artin_exercise_13_4_10\n {p : ℕ} {hp : Nat.Prime p} (h : ∃ r : ℕ, p = 2 ^ r + 1) :\n ∃ (k : ℕ), p = 2 ^ (2 ^ k) + 1 := sorry", "formal_proof": null, "informal_stmt": "Prove that if a prime integer $p$ has the form $2^r+1$, then it actually has the form $2^{2^k}+1$.\n\\begin{proof}\n In particular, we have\n$$\n\\frac{x^a+1}{x+1}=\\frac{(-x)^a-1}{(-x)-1}=1-x+x^2-\\cdots+(-x)^{a-1}\n$$\nby the geometric sum formula. In this case, specialize to $x=2^{2^m}$ and we have a nontrivial divisor.\n\\end{proof}", "informal_proof": "Since $a$ and $b$ commute, for any $g, h\\in H$ we can write $g=a^ib^j$ and $h = a^kb^l$. Then $gh = a^ib^ja^kb^l = a^kb^la^ib^j = hg$. Thus $H$ is abelian."} {"name": "Artin_exercise_13_6_10", "source": "Artin.lean", "header": "import Mathlib\n\nopen Function Fintype Subgroup Ideal Polynomial Submodule Zsqrtd\nopen scoped BigOperators\nnoncomputable section\n", "formal_statement": "theorem Artin_exercise_13_6_10 {K : Type*} [Field K] [Fintype Kˣ] :\n (∏ x : Kˣ, x) = -1 := sorry", "formal_proof": null, "informal_stmt": "Let $K$ be a finite field. Prove that the product of the nonzero elements of $K$ is $-1$.\n\\begin{proof}\n Since we are working with a finite field with $q$ elements, anyone of them is a root of the following polynomial\n$$\nx^q-x=0 .\n$$\nIn particular if we rule out the 0 element, any $a_i \\neq 0$ is a root of\n$$\nx^{q-1}-1=0 .\n$$\nThis polynomial splits completely in $\\mathbb{F}_q$ so we find\n$$\n\\left(x-a_1\\right) \\cdots\\left(x-a_{q-1}\\right)=0\n$$\nin particular\n$$\nx^{q-1}-1=\\left(x-a_1\\right) \\cdots\\left(x-a_{q-1}\\right)\n$$\nThus $a_1 \\cdots a_{q-1}=-1$.\n\\end{proof}\n\\end{document}", "informal_proof": "Since $a$ and $b$ commute, for any $g, h\\in H$ we can write $g=a^ib^j$ and $h = a^kb^l$. Then $gh = a^ib^ja^kb^l = a^kb^la^ib^j = hg$. Thus $H$ is abelian."} -{"name": "Ireland_Rosen_exercise_1_27", "source": "Ireland-Rosen.lean", "header": "import Mathlib\n\nopen Real\nopen scoped BigOperators\nnoncomputable section\n", "formal_statement": "theorem Ireland_Rosen_exercise_1_27 {n : ℕ} (hn : Odd n) : 8 ∣ (n^2 - 1) := sorry", "formal_proof": null, "informal_stmt": "For all odd $n$ show that $8 \\mid n^{2}-1$.\n\\begin{proof}\n 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$, otherwise it wouldn't divide three consecutive integers, which is impossible. As $n$ is odd, $n+1$ is even, so $(n+1)(n-1)$ is divisible by both 2 and 3 , so it is divisible by 6 .\n\\end{proof}", "informal_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$, otherwise it wouldn't divide three consecutive integers, which is impossible. As $n$ is odd, $n+1$ is even, so $(n+1)(n-1)$ is divisible by both 2 and 3 , so it is divisible by 6 ."} -{"name": "Ireland_Rosen_exercise_1_30", "source": "Ireland-Rosen.lean", "header": "import Mathlib\n\nopen Real\nopen scoped BigOperators\nnoncomputable section\n", "formal_statement": "theorem Ireland_Rosen_exercise_1_30 {n : ℕ} :\n ¬ ∃ a : ℤ, ∑ i : Fin n, (1 : ℚ) / (n+2) = a := sorry", "formal_proof": null, "informal_stmt": "Prove that $\\frac{1}{2}+\\frac{1}{3}+\\cdots+\\frac{1}{n}$ is not an integer.\n\\begin{proof}\nLet $2^s$ be the largest power of 2 occurring as a denominator in $H_n$, say $2^s=k \\leqslant n$. Write $H_n=$ $\\frac{1}{2^s}+\\left(1+1 / 2+\\ldots+1 /(k-1)+1 /(k+1)+\\ldots+1 / n\\right.$. The sum in parentheses can be written as $1 / 2^{s-1}$ times sum of fractions with odd denominators, so the denominator of the sum in parentheses will not be divisible by $2^s$, but it must equal $2^s$ by Ex $1.29$.\n\\end{proof}", "informal_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$, otherwise it wouldn't divide three consecutive integers, which is impossible. As $n$ is odd, $n+1$ is even, so $(n+1)(n-1)$ is divisible by both 2 and 3 , so it is divisible by 6 ."} -{"name": "Ireland_Rosen_exercise_1_31", "source": "Ireland-Rosen.lean", "header": "import Mathlib\n\nopen Real\nopen scoped BigOperators\nnoncomputable section\n", "formal_statement": "theorem Ireland_Rosen_exercise_1_31 : (⟨1, 1⟩ : GaussianInt) ^ 2 ∣ 2 := sorry", "formal_proof": null, "informal_stmt": "Show that 2 is divisible by $(1+i)^{2}$ in $\\mathbb{Z}[i]$.\n\\begin{proof}\nWe have $(1+i)^2=1+2 i-1=2 i$, so $2=-i(1+i)^2$.\n\\end{proof}", "informal_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$, otherwise it wouldn't divide three consecutive integers, which is impossible. As $n$ is odd, $n+1$ is even, so $(n+1)(n-1)$ is divisible by both 2 and 3 , so it is divisible by 6 ."} -{"name": "Ireland_Rosen_exercise_2_4", "source": "Ireland-Rosen.lean", "header": "import Mathlib\n\nopen Real\nopen scoped BigOperators\nnoncomputable section\n", "formal_statement": "theorem Ireland_Rosen_exercise_2_4 {a : ℤ} (ha : a ≠ 0)\n (f_a := sorry", "formal_proof": null, "informal_stmt": "If $a$ is a nonzero integer, then for $n>m$ show that $\\left(a^{2^{n}}+1, a^{2^{m}}+1\\right)=1$ or 2 depending on whether $a$ is odd or even.\n\\begin{proof} \n\\begin{align*}\n\\operatorname{ord}_p\\, n! &= \\sum_{k\\geq 1} \\left \\lfloor \\frac{n}{p^{k}}\\right \\rfloor \\leq \\sum_{k\\geq 1} \\frac{n}{p^{k}} = \\frac{n}{p} \\frac{1}{1 - \\frac{1}{p}} = \\frac{n}{p-1}\n\\end{align*}\n\nThe decomposition of $n!$ in prime factors is\n\n$n! = p_1^{\\alpha_1}p_2^{\\alpha_2}\\cdots p_k^{\\alpha_k}$ \nwhere $\\alpha_i = \\operatorname{ord}_{p_i}\\, n! \\leq \\frac{n}{p_i-1}$, and $p_i \\leq n, \\ i=1,2,\\cdots,k$.\n\nThen\n\\begin{align*}\nn! &\\leq p_1^{\\frac{n}{p_1-1}}p_2^{\\frac{n}{p_2-1}}\\cdots p_k^{\\frac{n}{p_n-1}}\\\\\n\\sqrt[n]{n!} &\\leq p_1^{\\frac{1}{p_1-1}}p_2^{\\frac{1}{p_2-1}}\\cdots p_k^{\\frac{1}{p_n-1}}\\\\\n&\\leq \\prod_{p\\leq n} p^{\\frac{1}{p-1}}\n\\end{align*}\n(the values of $p$ in this product describe all prime numbers $p\\leq n$.)\n\\end{proof}", "informal_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$, otherwise it wouldn't divide three consecutive integers, which is impossible. As $n$ is odd, $n+1$ is even, so $(n+1)(n-1)$ is divisible by both 2 and 3 , so it is divisible by 6 ."} -{"name": "Ireland_Rosen_exercise_2_21", "source": "Ireland-Rosen.lean", "header": "import Mathlib\n\nopen Real\nopen scoped BigOperators\nnoncomputable section\n", "formal_statement": "theorem Ireland_Rosen_exercise_2_21 {l : ℕ → ℝ}\n (hl : ∀ p n : ℕ, p.Prime → l (p^n) = log p )\n (hl1 : ∀ m : ℕ, ¬ IsPrimePow m → l m = 0) :\n l = λ n => ∑ d : Nat.divisors n, ArithmeticFunction.moebius (n/d) * log d := sorry", "formal_proof": null, "informal_stmt": "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)$.\n\\begin{proof} \n$$\n\\left\\{\n\\begin{array}{cccl}\n \\land(n)& = & \\log p & \\mathrm{if}\\ n =p^\\alpha,\\ \\alpha \\in \\mathbb{N}^* \\\\\n & = & 0 & \\mathrm{otherwise }.\n\\end{array}\n\\right.\n$$\nLet $n = p_1^{\\alpha_1}\\cdots p_t^{\\alpha_t}$ the decomposition of $n$ in prime factors. As $\\land(d) = 0$ for all divisors of $n$, except for $d = p_j^i, i>0, j=1,\\ldots t$,\n\\begin{align*}\n\\sum_{d \\mid n} \\land(d)&= \\sum_{i=1}^{\\alpha_1} \\land(p_1^{i}) + \\cdots+ \\sum_{i=1}^{\\alpha_t} \\land(p_t^{i})\\\\ \n&= \\alpha_1 \\log p_1+\\cdots + \\alpha_t \\log p_t\\\\\n&= \\log n\n\\end{align*}\nBy Mobius Inversion Theorem,\n$$\\land(n) = \\sum_{d \\mid n} \\mu\\left (\\frac{n}{d}\\right ) \\log d.$$\n\\end{proof}", "informal_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$, otherwise it wouldn't divide three consecutive integers, which is impossible. As $n$ is odd, $n+1$ is even, so $(n+1)(n-1)$ is divisible by both 2 and 3 , so it is divisible by 6 ."} -{"name": "Ireland_Rosen_exercise_2_27a", "source": "Ireland-Rosen.lean", "header": "import Mathlib\n\nopen Real\nopen scoped BigOperators\nnoncomputable section\n", "formal_statement": "theorem Ireland_Rosen_exercise_2_27a :\n ¬ Summable (λ i : {p : ℤ // Squarefree p} => (1 : ℚ) / i) := sorry", "formal_proof": null, "informal_stmt": "Show that $\\sum^{\\prime} 1 / n$, the sum being over square free integers, diverges.\n\\begin{proof}\n \nLet $S \\subset \\mathbb{N}^*$ the set of square free integers.\n\nLet $N \\in \\mathbb{N}^*$. Every integer $n, \\, 1\\leq n \\leq N$ can be written as $n = a b^2$, where $a,b$ are integers and $a$ is square free. Then $1\\leq a \\leq N$, and $1\\leq b \\leq \\sqrt{N}$, so\n$$\\sum_{n\\leq N} \\frac{1}{n} \\leq \\sum_{a \\in S, a\\leq N}\\ \\sum_{1\\leq b \\leq \\sqrt{N}} \\frac{1}{ab^2} \\leq \\sum_{a \\in S, a\\leq N}\\ \\frac{1}{a} \\, \\sum_{b=1}^\\infty \\frac{1}{b^2} = \\frac{\\pi^2}{6} \\sum_{a \\in S, a\\leq N}\\ \\frac{1}{a}.$$\nSo $$\\sum_{a \\in S, a\\leq N} \\frac{1}{a} \\geq \\frac{6}{\\pi^2} \\sum_{n\\leq N} \\frac{1}{n}.$$\nAs $\\sum_{n=1}^\\infty \\frac{1}{n}$ diverges, $\\lim\\limits_{N \\to \\infty} \\sum\\limits_{a \\in S, a\\leq N} \\frac{1}{a} = +\\infty$, so the family $\\left(\\frac{1}{a}\\right)_{a\\in S}$ of the inverse of square free integers is not summable.\n\nLet $S_N = \\prod_{p0$, so\n$$\\log S_N = \\sum_{k=1}^{l(N)} \\log\\left(1+\\frac{1}{p_k}\\right) \\leq \\sum_{k=1}^{l(N)} \\frac{1}{p_k}.$$\n$\\lim\\limits_{N\\to \\infty} \\log S_N = +\\infty$ and $\\lim\\limits_{N\\to \\infty} l(N) = +\\infty$, so\n$$\\lim_{N\\to \\infty} \\sum_{p1$. \n\nThen $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 congruent to 1, then $N \\equiv 1 \\pmod 6$ : this is a contradiction because $-1 \\not \\equiv 1 \\pmod 6$. So there exists a prime factor $p$ of $N$ such that $p\\equiv -1 \\pmod 6$.\n\nIf $p\\leq n$, then $p \\mid n!$, and $p \\mid N = n!-1$, so $p \\mid 1$. As $p$ is prime, this is a contradiction, so $p>n$. \n\nConclusion :\n\n for any integer $n$, there exists a prime $p >n$ such that $p \\equiv -1 \\pmod 6$ : there are infinitely many primes congruent to $-1$ modulo $6$.\n\\end{proof}", "informal_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$, otherwise it wouldn't divide three consecutive integers, which is impossible. As $n$ is odd, $n+1$ is even, so $(n+1)(n-1)$ is divisible by both 2 and 3 , so it is divisible by 6 ."} -{"name": "Ireland_Rosen_exercise_3_4", "source": "Ireland-Rosen.lean", "header": "import Mathlib\n\nopen Real\nopen scoped BigOperators\nnoncomputable section\n", "formal_statement": "theorem Ireland_Rosen_exercise_3_4 : ¬ ∃ x y : ℤ, 3*x^2 + 2 = y^2 := sorry", "formal_proof": null, "informal_stmt": "Show that the equation $3 x^{2}+2=y^{2}$ has no solution in integers.\n\\begin{proof} \nIf $3x^2+2 = y^2$, then $\\overline{y}^2 = \\overline{2}$ in $\\mathbb{Z}/3\\mathbb{Z}$.\n\n\nAs $\\{-1,0,1\\}$ is a complete set of residues modulo $3$, the squares in $\\mathbb{Z}/3\\mathbb{Z}$ are $\\overline{0} = \\overline{0}^2$ and $\\overline{1} = \\overline{1}^2 = (\\overline{-1})^2$, so $\\overline{2}$ is not a square in $\\mathbb{Z}/3\\mathbb{Z}$ : $\\overline{y}^2 = \\overline{2}$ is impossible in $\\mathbb{Z}/3\\mathbb{Z}$.\n\nThus $3x^2+2 = y^2$ has no solution in integers.\n\\end{proof}", "informal_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$, otherwise it wouldn't divide three consecutive integers, which is impossible. As $n$ is odd, $n+1$ is even, so $(n+1)(n-1)$ is divisible by both 2 and 3 , so it is divisible by 6 ."} -{"name": "Ireland_Rosen_exercise_3_5", "source": "Ireland-Rosen.lean", "header": "import Mathlib\n\nopen Real\nopen scoped BigOperators\nnoncomputable section\n", "formal_statement": "theorem Ireland_Rosen_exercise_3_5 : ¬ ∃ x y : ℤ, 7*x^3 + 2 = y^3 := sorry", "formal_proof": null, "informal_stmt": "Show that the equation $7 x^{3}+2=y^{3}$ has no solution in integers.\n\\begin{proof}\n 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$)\n\nFrom 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 solution in integers.\n\\end{proof}", "informal_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$, otherwise it wouldn't divide three consecutive integers, which is impossible. As $n$ is odd, $n+1$ is even, so $(n+1)(n-1)$ is divisible by both 2 and 3 , so it is divisible by 6 ."} -{"name": "Ireland_Rosen_exercise_3_10", "source": "Ireland-Rosen.lean", "header": "import Mathlib\n\nopen Real\nopen scoped BigOperators\nnoncomputable section\n", "formal_statement": "theorem Ireland_Rosen_exercise_3_10 {n : ℕ} (hn0 : ¬ n.Prime) (hn1 : n ≠ 4) :\n Nat.factorial (n-1) ≡ 0 [MOD n] := sorry", "formal_proof": null, "informal_stmt": "If $n$ is not a prime, show that $(n-1) ! \\equiv 0(n)$, except when $n=4$.\n\\begin{proof} \nSuppose that $n >1$ is not a prime. Then $n = uv$, where $2 \\leq u \\leq v \\leq n-1$.\n\n$\\bullet$ If $u \\neq v$, then $n = uv \\mid (n-1)! = 1\\times 2 \\times\\cdots \\times u \\times\\cdots \\times v \\times \\cdots \\times (n-1)$ (even if $u\\wedge v \\neq 1$ !).\n\n$\\bullet$ If $u=v$, $n = u^2$ is a square.\n\nIf $u$ is not prime, $u =st,\\ 2\\leq s \\leq t \\leq u-1 \\leq n-1$, and $n = u' v'$, where $u' =s,v' =st^2$ verify $2 \\leq u' < v' \\leq n-1$. As in the first case, $n = u'v' \\mid (n-1)!$. \n\nIf $u = p$ is a prime, then $n =p^2$.\n\nIn the case $p = 2$, $n = 4$ and $n=4 \\nmid (n-1)! = 6$. In the other case $p >2$, and $(n-1)! = (p^2 - 1)!$ contains the factors $p < 2p < p^2$, so $p^2 \\mid (p^2-1)!, n \\mid (n-1)!$.\n\nConclusion : if $n$ is not a prime, $(n - 1)! \\equiv 0 \\pmod n$, except when $n=4$.\n\\end{proof}", "informal_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$, otherwise it wouldn't divide three consecutive integers, which is impossible. As $n$ is odd, $n+1$ is even, so $(n+1)(n-1)$ is divisible by both 2 and 3 , so it is divisible by 6 ."} -{"name": "Ireland_Rosen_exercise_3_14", "source": "Ireland-Rosen.lean", "header": "import Mathlib\n\nopen Real\nopen scoped BigOperators\nnoncomputable section\n", "formal_statement": "theorem Ireland_Rosen_exercise_3_14 {p q n : ℕ} (hp0 : p.Prime ∧ p > 2)\n (hq0 : q.Prime ∧ q > 2) (hpq0 : p ≠ q) (hpq1 : p - 1 ∣ q - 1)\n (hn : n.gcd (p*q) = 1) :\n n^(q-1) ≡ 1 [MOD p*q] := sorry", "formal_proof": null, "informal_stmt": "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)$.\n\\begin{proof} \nAs $n \\wedge pq = 1, n\\wedge p=1, n \\wedge q = 1$, so from Fermat's Little Theorem\n$$n^{q-1} \\equiv 1 \\pmod q,\\qquad n^{p-1} \\equiv 1 \\pmod p.$$\n$p-1 \\mid q-1$, so there exists $k \\in \\mathbb{Z}$ such that $q-1 = k(p-1)$.\nThus\n$$n^{q-1} = (n^{p-1})^k \\equiv 1 \\pmod p.$$\n$p \\mid n^{q-1} - 1, q \\mid n^{q-1} - 1$, and $p\\wedge q = 1$, so $pq \\mid n^{q-1} - 1$ :\n$$n^{q-1} \\equiv 1 \\pmod{pq}.$$\n\\end{proof}", "informal_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$, otherwise it wouldn't divide three consecutive integers, which is impossible. As $n$ is odd, $n+1$ is even, so $(n+1)(n-1)$ is divisible by both 2 and 3 , so it is divisible by 6 ."} -{"name": "Ireland_Rosen_exercise_4_4", "source": "Ireland-Rosen.lean", "header": "import Mathlib\n\nopen Real\nopen scoped BigOperators\nnoncomputable section\n", "formal_statement": "theorem Ireland_Rosen_exercise_4_4 {p t: ℕ} (hp0 : p.Prime) (hp1 : p = 4*t + 1)\n (a : ZMod p) :\n IsPrimitiveRoot a p ↔ IsPrimitiveRoot (-a) p := sorry", "formal_proof": null, "informal_stmt": "Consider a prime $p$ of the form $4 t+1$. Show that $a$ is a primitive root modulo $p$ iff $-a$ is a primitive root modulo $p$.\n\\begin{proof}\n Suppose that $a$ is a primitive root modulo $p$. As $p-1$ is even, $(-a)^{p-1}=a^{p-1} \\equiv 1$ $(\\bmod p)$\nIf $(-a)^n \\equiv 1(\\bmod p)$, with $n \\in \\mathbb{N}$, then $a^n \\equiv(-1)^n(\\bmod p)$.\nTherefore $a^{2 n} \\equiv 1(\\bmod p)$. As $a$ is a primitive root modulo $p, p-1|2 n, 2 t| n$, so $n$ is even.\n\nHence $a^n \\equiv 1(\\bmod p)$, and $p-1 \\mid n$. So the least $n \\in \\mathbb{N}^*$ such that $(-a)^n \\equiv 1$ $(\\bmod p)$ is $p-1:$ the order of $-a$ modulo $p$ is $p-1,-a$ is a primitive root modulo $p$. Conversely, if $-a$ is a primitive root modulo $p$, we apply the previous result at $-a$ to to obtain that $-(-a)=a$ is a primitive root.\n\\end{proof}", "informal_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$, otherwise it wouldn't divide three consecutive integers, which is impossible. As $n$ is odd, $n+1$ is even, so $(n+1)(n-1)$ is divisible by both 2 and 3 , so it is divisible by 6 ."} -{"name": "Ireland_Rosen_exercise_4_5", "source": "Ireland-Rosen.lean", "header": "import Mathlib\n\nopen Real\nopen scoped BigOperators\nnoncomputable section\n", "formal_statement": "theorem Ireland_Rosen_exercise_4_5 {p t : ℕ} (hp0 : p.Prime) (hp1 : p = 4*t + 3)\n (a : ZMod p) :\n IsPrimitiveRoot a p ↔ ((-a) ^ ((p-1)/2) = 1 ∧ ∀ (k : ℕ), k < (p-1)/2 → (-a)^k ≠ 1) := sorry", "formal_proof": null, "informal_stmt": "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$.\n\\begin{proof}\n Let $a$ a primitive root modulo $p$.\nAs $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\n$$\na^{(p-1) / 2} \\equiv-1 \\quad(\\bmod p) .\n$$\nHence $(-a)^{(p-1) / 2}=(-1)^{2 t+1} a^{(p-1) / 2} \\equiv(-1) \\times(-1)=1(\\bmod p)$.\nSuppose that $(-a)^n \\equiv 1(\\bmod p)$, with $n \\in \\mathbb{N}$.\nThen $a^{2 n}=(-a)^{2 n} \\equiv 1(\\bmod p)$, so $p-1\\left|2 n, \\frac{p-1}{2}\\right| n$.\nSo $-a$ has order $(p-1) / 2$ modulo $p$.\nConversely, suppose that $-a$ has order $(p-1) / 2=2 t+1$ modulo $p$. Let $2, p_1, \\ldots p_k$ the prime factors of $p-1$, where $p_i$ are odd.\n$a^{(p-1) / 2}=a^{2 t+1}=-(-a)^{2 t+1}=-(-a)^{(p-1) / 2} \\equiv-1$, so $a^{(p-1) / 2} \\not \\equiv 1(\\bmod 2)$.\nAs $p-1$ is even, $(p-1) / p_i$ is even, so $a^{(p-1) / p_i}=(-a)^{(p-1) / p_i} \\not \\equiv 1(\\bmod p)($ since $-a$ has order $p-1)$.\nSo the order of $a$ is $p-1$ (see Ex. 4.8) : $a$ is a primitive root modulo $p$.\n\\end{proof}", "informal_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$, otherwise it wouldn't divide three consecutive integers, which is impossible. As $n$ is odd, $n+1$ is even, so $(n+1)(n-1)$ is divisible by both 2 and 3 , so it is divisible by 6 ."} -{"name": "Ireland_Rosen_exercise_4_6", "source": "Ireland-Rosen.lean", "header": "import Mathlib\n\nopen Real\nopen scoped BigOperators\nnoncomputable section\n", "formal_statement": "theorem Ireland_Rosen_exercise_4_6 {p n : ℕ} (hp : p.Prime) (hpn : p = 2^n + 1) :\n IsPrimitiveRoot 3 p := sorry", "formal_proof": null, "informal_stmt": "If $p=2^{n}+1$ is a Fermat prime, show that 3 is a primitive root modulo $p$.\n\\begin{proof}\n \\newcommand{\\legendre}[2]{\\genfrac{(}{)}{}{}{#1}{#2}}\nWrite $p = 2^k + 1$, with $k = 2^n$.\n\nWe suppose that $n>0$, so $k\\geq 2, p \\geq 5$. As $p$ is prime, $3^{p-1} \\equiv 1 \\pmod p$. \n\nIn other words, $3^{2^k} \\equiv 1 \\pmod p$ : the order of $3$ is a divisor of $2^k$, a power of $2$.\n\n$3$ has order $2^k$ modulo $p$ iff $3^{2^{k-1}} \\not \\equiv 1 \\pmod p$. As $\\left (3^{2^{k-1}} \\right)^2 \\equiv 1 \\pmod p$, where $p$ is prime, this is equivalent to $3^{2^{k-1}} \\equiv -1 \\pmod p$, which remains to prove.\n\n$3^{2^{k-1}} = 3^{(p-1)/2} \\equiv \\legendre{3}{p} \\pmod p$.\n\nAs the result is true for $p=5$, we can suppose $n\\geq 2$.\nFrom the law of quadratic reciprocity :\n$$\\legendre{3}{p} \\legendre{p}{3} = (-1)^{(p-1)/2} = (-1)^{2^{k-1}} = 1.$$\nSo $\\legendre{3}{p} = \\legendre{p}{3}$\n \n\\begin{align*}\np = 2^{2^n}+1 &\\equiv (-1)^{2^n} + 1 \\pmod 3\\\\\n&\\equiv 2 \\equiv -1 \\pmod 3,\n\\end{align*}\nso $\\legendre{3}{p} = \\legendre {p}{3} = -1$, that is to say\n$$3^{2^{k-1}} \\equiv -1 \\pmod p.$$\nThe order of $3$ modulo $p = 2^{2^n} + 1$ is $p-1 = 2^{2^n}$ : $3$ is a primitive root modulo $p$.\n\n(On the other hand, if $3$ is of order $p-1$ modulo $p$, then $p$ is prime, so\n$$ F_n = 2^{2^n} + 1 \\ \\mathrm{is}\\ \\mathrm{prime}\\ \\iff 3^{(F_n-1)/2} = 3^{2^{2^n - 1}} \\equiv -1 \\pmod {F_n}.)$$\n\\end{proof}", "informal_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$, otherwise it wouldn't divide three consecutive integers, which is impossible. As $n$ is odd, $n+1$ is even, so $(n+1)(n-1)$ is divisible by both 2 and 3 , so it is divisible by 6 ."} -{"name": "Ireland_Rosen_exercise_4_8", "source": "Ireland-Rosen.lean", "header": "import Mathlib\n\nopen Real\nopen scoped BigOperators\nnoncomputable section\n", "formal_statement": "theorem Ireland_Rosen_exercise_4_8 {p a : ℕ} (hp : Odd p) :\n IsPrimitiveRoot a p ↔ (∀ q : ℕ, q ∣ (p-1) → q.Prime → ¬ a^(p-1) ≡ 1 [MOD p]) := sorry", "formal_proof": null, "informal_stmt": "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$.\n\\begin{proof} \n$\\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$.\n\n$\\bullet$ In the other direction, suppose $a^{(p-1)/q} \\not \\equiv 1 \\pmod p$ for all prime divisors $q$ of $p - 1$.\n\nLet $\\delta$ the order of $a$, and $p-1 = q_1^{a_1}q_2^{a_2}\\cdots q_k^{a_k}$ the decomposition of $p-1$ in prime factors. As $\\delta \\mid p-1, \\delta = q_1^{b_1}p_2^{b_2}\\cdots q_k^{b_k}$, with $b_i \\leq a_i, i=1,2,\\ldots,k$. If $b_i < a_i$ for some index $i$, then $\\delta \\mid (p-1)/q_i$, so $a^{(p-1)/q_i} \\equiv 1 \\pmod p$, which is in contradiction with the hypothesis. Thus $b_i = a_i$ for all $i$, and $\\delta = q-1$ : $a$ is a primitive root modulo $p$.\n\\end{proof}", "informal_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$, otherwise it wouldn't divide three consecutive integers, which is impossible. As $n$ is odd, $n+1$ is even, so $(n+1)(n-1)$ is divisible by both 2 and 3 , so it is divisible by 6 ."} -{"name": "Ireland_Rosen_exercise_4_11", "source": "Ireland-Rosen.lean", "header": "import Mathlib\n\nopen Real\nopen scoped BigOperators\nnoncomputable section\n", "formal_statement": "theorem Ireland_Rosen_exercise_4_11 {p : ℕ} (hp : p.Prime) (k s: ℕ)\n (s := sorry", "formal_proof": null, "informal_stmt": "Prove that $1^{k}+2^{k}+\\cdots+(p-1)^{k} \\equiv 0(p)$ if $p-1 \\nmid k$ and $-1(p)$ if $p-1 \\mid k$.\n\\begin{proof} \nLet $S_k = 1^k+2^k+\\cdots+(p-1)^k$.\n\nLet $g$ a primitive root modulo $p$ : $\\overline{g}$ a generator of $\\mathbb{F}_p^*$.\n\nAs $(\\overline{1},\\overline{g},\\overline{g}^{2}, \\ldots, \\overline{g}^{p-2}) $ is a permutation of $ (\\overline{1},\\overline{2}, \\ldots,\\overline{p-1})$,\n\\begin{align*}\n\\overline{S_k} &= \\overline{1}^k + \\overline{2}^k+\\cdots+ \\overline{p-1}^k\\\\\n&= \\sum_{i=0}^{p-2} \\overline{g}^{ki} =\n\\left\\{\n\\begin{array}{ccc}\n\\overline{ p-1} = -\\overline{1} & \\mathrm{if} & p-1 \\mid k \\\\\n \\frac{ \\overline{g}^{(p-1)k} -1}{ \\overline{g}^k -1} = \\overline{0}& \\mathrm{if} & p-1 \\nmid k\n\\end{array}\n\\right.\n\\end{align*}\nsince $p-1 \\mid k \\iff \\overline{g}^k = \\overline{1}$.\n\nConclusion :\n\\begin{align*}\n1^k+2^k+\\cdots+(p-1)^k&\\equiv 0 \\pmod p\\ \\mathrm{if} \\ p-1 \\nmid k\\\\\n1^k+2^k+\\cdots+(p-1)^k&\\equiv -1 \\pmod p\\ \\mathrm{if} \\ p-1 \\mid k\\\\\n\\end{align*}\n\\end{proof}", "informal_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$, otherwise it wouldn't divide three consecutive integers, which is impossible. As $n$ is odd, $n+1$ is even, so $(n+1)(n-1)$ is divisible by both 2 and 3 , so it is divisible by 6 ."} -{"name": "Ireland_Rosen_exercise_5_13", "source": "Ireland-Rosen.lean", "header": "import Mathlib\n\nopen Real\nopen scoped BigOperators\nnoncomputable section\n", "formal_statement": "theorem Ireland_Rosen_exercise_5_13 {p x: ℤ} (hp : Prime p)\n (hpx : p ∣ (x^4 - x^2 + 1)) : p ≡ 1 [ZMOD 12] := sorry", "formal_proof": null, "informal_stmt": "Show that any prime divisor of $x^{4}-x^{2}+1$ is congruent to 1 modulo 12 .\n\\begin{proof} \n\\newcommand{\\legendre}[2]{\\genfrac{(}{)}{}{}{#1}{#2}}\n$\\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$.\n\n$\\bullet$ $p \\mid 4a^4 - 4 a^2 +4 = (2a-1)^2 + 3$, so $\\legendre{-3}{p} = 1$.\n\nAs $-3 \\equiv 1 \\pmod 4$, $\\legendre{-3}{p} = \\legendre{p}{3}$, so $\\legendre{p}{3} = 1$, thus $p \\equiv 1 \\pmod 3$.\n\n$4 \\mid p-1$ and $3 \\mid p-1$, thus $12 \\mid p-1$ : $$p \\equiv 1 \\pmod {12}.$$\n\\end{proof}", "informal_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$, otherwise it wouldn't divide three consecutive integers, which is impossible. As $n$ is odd, $n+1$ is even, so $(n+1)(n-1)$ is divisible by both 2 and 3 , so it is divisible by 6 ."} -{"name": "Ireland_Rosen_exercise_5_28", "source": "Ireland-Rosen.lean", "header": "import Mathlib\n\nopen Real\nopen scoped BigOperators\nnoncomputable section\n", "formal_statement": "theorem Ireland_Rosen_exercise_5_28 {p : ℕ} (hp : p.Prime) (hp1 : p ≡ 1 [MOD 4]):\n ∃ x, x^4 ≡ 2 [MOD p] ↔ ∃ A B, p = A^2 + 64*B^2 := sorry", "formal_proof": null, "informal_stmt": "Show that $x^{4} \\equiv 2(p)$ has a solution for $p \\equiv 1(4)$ iff $p$ is of the form $A^{2}+64 B^{2}$.\n\\begin{proof} \nIf $p\\equiv 1\\ [4]$ and if there exists $x \\in \\mathbb{Z}$ such that $x^4 \\equiv 2\\ [p]$, then\n$$2^{\\frac{p-1}{4} }\\equiv x^{p-1} \\equiv 1 \\ [p].$$ \n\nFrom Ex. 5.27, where $p = a^2 +b^2, a$ odd, we know that $$f^{\\frac{ab}{2}} \\equiv 2^{\\frac{p-1}{4} } \\equiv 1 \\ [p].$$\n\nSince $f^2 \\equiv -1\\ [p]$, the order of $f$ modulo $p$ is 4, thus $4 \\mid \\frac{ab}{2}$, so $8\\mid ab$.\n\nAs $a$ is odd, $8 | b$, then $p = A^2 + 64 B^2$ (with $A = a, B = b/8$).\n\n\\bigskip\n\nConversely, if $p=A^2+64 B^2$, then $p\\equiv A^2 \\equiv 1 \\ [4]$.\n\nLet $a=A,b=8B$. Then $$2^{\\frac{p-1}{4} } \\equiv f^{\\frac{ab}{2}} \\equiv f^{4AB} \\equiv (-1)^{2AB} \\equiv 1 \\ [p].$$\n\nAs $2^{\\frac{p-1}{4} } \\equiv 1 \\ [p]$, $x^4 \\equiv 2 \\ [p]$ has a solution in $\\mathbb{Z}$ (Prop. 4.2.1) : $2$ is a biquadratic residue modulo $p$.\n\nConclusion : \n\n$$\\exists A \\in \\mathbb{Z}, \\exists B \\in \\mathbb{Z}\\,, p = A^2+64 B^2 \\iff( p\\equiv 1 \\ [4] \\ \\mathrm{and} \\ \\exists x \\in \\mathbb{Z}, \\, x^4 \\equiv 2 \\ [p]).$$\n\\end{proof}", "informal_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$, otherwise it wouldn't divide three consecutive integers, which is impossible. As $n$ is odd, $n+1$ is even, so $(n+1)(n-1)$ is divisible by both 2 and 3 , so it is divisible by 6 ."} -{"name": "Ireland_Rosen_exercise_5_37", "source": "Ireland-Rosen.lean", "header": "import Mathlib\n\nopen Real\nopen scoped BigOperators\nnoncomputable section\n", "formal_statement": "theorem Ireland_Rosen_exercise_5_37 {p q : ℕ} [Fact (p.Prime)] [Fact (q.Prime)] {a : ℤ}\n (ha : a < 0) (h0 : p ≡ q [ZMOD 4*a]) (h1 : ¬ ((p : ℤ) ∣ a)) :\n legendreSym p a = legendreSym q a := sorry", "formal_proof": null, "informal_stmt": "Show that if $a$ is negative then $p \\equiv q(4 a) together with p\\not | a$ imply $(a / p)=(a / q)$.\n\\begin{proof} \n\\newcommand{\\legendre}[2]{\\genfrac{(}{)}{}{}{#1}{#2}}\nWrite $a = -A, A>0$. As $p \\equiv q \\pmod {4a}$, we know from Prop. 5.3.3. (b) that $(A/p) = (A/q)$.\n\nMoreover,\n\\begin{align*}\n\\legendre{a}{p}&= \\legendre{-A}{p} = (-1)^{(p-1)/2} \\legendre{A}{p}\\\\\n\\legendre{a}{q}&= \\legendre{-A}{q} = (-1^{(q-1)/2} \\legendre{A}{q}\n\\end{align*}\nAs $p \\equiv q \\pmod {4a}$, $ p = q + 4ak, k\\in \\mathbb{Z}$, so\n$$(-1)^{(p-1)/2} = (-1)^{(q+4ak-1)/2} = (-1)^{(q-1)/2},$$\nso $(a/p) = (a/q)$.\n\\end{proof}", "informal_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$, otherwise it wouldn't divide three consecutive integers, which is impossible. As $n$ is odd, $n+1$ is even, so $(n+1)(n-1)$ is divisible by both 2 and 3 , so it is divisible by 6 ."} -{"name": "Ireland_Rosen_exercise_12_12", "source": "Ireland-Rosen.lean", "header": "import Mathlib\n\nopen Real\nopen scoped BigOperators\nnoncomputable section\n", "formal_statement": "theorem Ireland_Rosen_exercise_12_12 : IsAlgebraic ℚ (sin (pi/12)) := sorry", "formal_proof": null, "informal_stmt": "Show that $\\sin (\\pi / 12)$ is an algebraic number.\n\\begin{proof}\n$$\n\\begin{aligned}\n \\sin \\pi/12=\\sin \\left(\\pi/4-\\pi/6\\right) & =\\sin \\pi/4 \\cos \\pi/6-\\cos \\pi/4 \\sin \\pi/6 \\\\\n& =\\frac{\\sqrt{3}}{2 \\sqrt{2}}-\\frac{1}{2 \\sqrt{2}} \\\\\n& =\\frac{\\sqrt{3}-1}{2 \\sqrt{2}}\n\\end{aligned}\n$$\n\\end{proof}", "informal_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$, otherwise it wouldn't divide three consecutive integers, which is impossible. As $n$ is odd, $n+1$ is even, so $(n+1)(n-1)$ is divisible by both 2 and 3 , so it is divisible by 6 ."} -{"name": "Ireland_Rosen_exercise_18_4", "source": "Ireland-Rosen.lean", "header": "import Mathlib\n\nopen Real\nopen scoped BigOperators\nnoncomputable section\n", "formal_statement": "theorem Ireland_Rosen_exercise_18_4 {n : ℕ} (hn : ∃ x y z w : ℤ,\n x^3 + y^3 = n ∧ z^3 + w^3 = n ∧ x ≠ z ∧ x ≠ w ∧ y ≠ z ∧ y ≠ w) :\n n ≥ 1729 := sorry", "formal_proof": null, "informal_stmt": "Show that 1729 is the smallest positive integer expressible as the sum of two different integral cubes in two ways.\n\\begin{proof}\n Let $n=a^3+b^3$, and suppose that $\\operatorname{gcd}(a, b)=1$. If a prime $p \\mid a^3+b^3$, then\n$$\n\\left(a b^{-1}\\right)^3 \\equiv_p-1\n$$\nThus $3 \\mid \\frac{p-1}{2}$, that is, $p \\equiv_6 1$.\nIf we have $n=a^3+b^3=c^3+d^3$, then we can factor $n$ as\n$$\n\\begin{aligned}\n& n=(a+b)\\left(a^2-a b+b^2\\right) \\\\\n& n=(c+d)\\left(c^2-c d+d^2\\right)\n\\end{aligned}\n$$\nThus we need $n$ to have at least 3 distinct prime factors, and so the smallest taxicab number is on the form\n$$\nn=(6 k+1)(12 k+1)(18 k+1)\n$$\n\\end{proof}\n\\end{document}", "informal_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$, otherwise it wouldn't divide three consecutive integers, which is impossible. As $n$ is odd, $n+1$ is even, so $(n+1)(n-1)$ is divisible by both 2 and 3 , so it is divisible by 6 ."} -{"name": "Munkres_exercise_13_1", "source": "Munkres.lean", "header": "import Mathlib\n\nopen Filter Set TopologicalSpace\nopen Topology\nnoncomputable section\n", "formal_statement": "theorem Munkres_exercise_13_1 (X : Type*) [TopologicalSpace X] (A : Set X)\n (h1 : ∀ x ∈ A, ∃ U : Set X, x ∈ U ∧ IsOpen U ∧ U ⊆ A) :\n IsOpen A := sorry", "formal_proof": null, "informal_stmt": "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$.\n\\begin{proof}\n 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\n$$\nA=\\bigcup_{x \\in A} U_x\n$$\nObserve that if we prove the above claim, then $A$ will be open, being a union of arbitrary open sets. Since, for each $x \\in A, U_x \\subset A \\Longrightarrow \\cup U_x \\subset A$. For the converse, observe that given any $x \\in A, x \\in U_x$ and hence in the union. Thus we proved our claim, and hence $A$ is an open set.\n\\end{proof}", "informal_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 each $x \\in A, U_x \\subset A \\Longrightarrow \\cup U_x \\subset A$. For the converse, observe that given any $x \\in A, x \\in U_x$ and hence in the union. Thus we proved our claim, and hence $A$ is an open set."} -{"name": "Munkres_exercise_13_3b", "source": "Munkres.lean", "header": "import Mathlib\n\nopen Filter Set TopologicalSpace\nopen Topology\nnoncomputable section\n", "formal_statement": "theorem Munkres_exercise_13_3b : ¬ ∀ X : Type, ∀s : Set (Set X),\n (∀ t : Set X, t ∈ s → (Set.Infinite tᶜ ∨ t = ∅ ∨ t = ⊤)) →\n (Set.Infinite (⋃₀ s)ᶜ ∨ (⋃₀ s) = ∅ ∨ (⋃₀ s) = ⊤) := sorry", "formal_proof": null, "informal_stmt": "Show that the collection $$\\mathcal{T}_\\infty = \\{U | X - U \\text{ is infinite or empty or all of X}\\}$$ does not need to be a topology on the set $X$.\n\\begin{proof}\n Let $X=\\mathbb{R}, U_1=(-\\infty, 0)$ and $U_2=(0, \\infty)$. Then $U_1$ and $U_2$ are in $\\mathcal{T}_{\\infty}$ but $U_1 \\cup U_2=\\mathbb{R} \\backslash\\{0\\}$ is not.\n\\end{proof}", "informal_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 each $x \\in A, U_x \\subset A \\Longrightarrow \\cup U_x \\subset A$. For the converse, observe that given any $x \\in A, x \\in U_x$ and hence in the union. Thus we proved our claim, and hence $A$ is an open set."} -{"name": "Munkres_exercise_13_4a1", "source": "Munkres.lean", "header": "import Mathlib\n\nopen Filter Set TopologicalSpace\nopen Topology\nnoncomputable section\n", "formal_statement": "theorem Munkres_exercise_13_4a1 (X I : Type*) (T : I → Set (Set X)) (h : ∀ i, is_topology X (T i)) :\n is_topology X (⋂ i : I, T i) := sorry", "formal_proof": null, "informal_stmt": "If $\\mathcal{T}_\\alpha$ is a family of topologies on $X$, show that $\\bigcap \\mathcal{T}_\\alpha$ is a topology on $X$.\n\\begin{proof}\n 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}_\\alpha$ since $\\mathcal{T}_\\alpha$ is a topology on $X$, so $\\bigcup_\\beta V_\\beta \\in \\bigcap_\\alpha \\mathcal{T}_\\alpha$. Similarly, if $U_1, \\ldots, U_n$ are elements of $\\bigcap_\\alpha \\mathcal{T}_\\alpha$, then for each $\\alpha$ we have $\\bigcup_{i=1}^n U_i \\in \\mathcal{T}_\\alpha$ and therefore $\\bigcup_{i=1}^n U_i \\in \\bigcap_\\alpha \\mathcal{T}_\\alpha$. It follows that $\\bigcap_\\alpha \\mathcal{T}_\\alpha$ is a topology on $X$.\n\\end{proof}", "informal_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 each $x \\in A, U_x \\subset A \\Longrightarrow \\cup U_x \\subset A$. For the converse, observe that given any $x \\in A, x \\in U_x$ and hence in the union. Thus we proved our claim, and hence $A$ is an open set."} -{"name": "Munkres_exercise_13_4a2", "source": "Munkres.lean", "header": "import Mathlib\n\nopen Filter Set TopologicalSpace\nopen Topology\nnoncomputable section\n", "formal_statement": "theorem Munkres_exercise_13_4a2 :\n ∃ (X I : Type*) (T : I → Set (Set X)),\n (∀ i, is_topology X (T i)) ∧ ¬ is_topology X (⋂ i : I, T i) := sorry", "formal_proof": null, "informal_stmt": "If $\\mathcal{T}_\\alpha$ is a family of topologies on $X$, show that $\\bigcup \\mathcal{T}_\\alpha$ does not need to be a topology on $X$.\n\\begin{proof}\n On the other hand, the union $\\bigcup_\\alpha \\mathcal{T}_\\alpha$ is in general not a topology on $X$. For instance, let $X=\\{a, b, c\\}$. Then $\\mathcal{T}_1=\\{\\emptyset, X,\\{a\\}\\}$ and $\\mathcal{T}_2=\\{\\emptyset, X,\\{b\\}\\}$ are topologies on $X$ but $\\mathcal{T}_1 \\cup \\mathcal{T}_2=$ $\\{\\emptyset, X,\\{a\\},\\{b\\}\\}$ is not.\n\\end{proof}", "informal_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 each $x \\in A, U_x \\subset A \\Longrightarrow \\cup U_x \\subset A$. For the converse, observe that given any $x \\in A, x \\in U_x$ and hence in the union. Thus we proved our claim, and hence $A$ is an open set."} -{"name": "Munkres_exercise_13_4b1", "source": "Munkres.lean", "header": "import Mathlib\n\nopen Filter Set TopologicalSpace\nopen Topology\nnoncomputable section\n", "formal_statement": "theorem Munkres_exercise_13_4b1 (X I : Type*) (T : I → Set (Set X)) (h : ∀ i, is_topology X (T i)) :\n ∃! T', is_topology X T' ∧ (∀ i, T i ⊆ T') ∧\n ∀ T'', is_topology X T'' → (∀ i, T i ⊆ T'') → T'' ⊆ T' := sorry", "formal_proof": null, "informal_stmt": "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$.\n\\begin{proof}\n (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 $\\mathcal{S}=\\bigcup_\\alpha \\mathcal{B}_\\alpha$. Then the collection $\\mathcal{B}$ of all finite intersections of elements of $\\mathcal{S}$ is a basis for $\\mathcal{T}$. Clearly $\\mathcal{T}_\\alpha \\subset \\mathcal{T}$ for all $\\alpha$. We now prove that if $\\mathcal{O}$ is a topology on $X$ such that $\\mathcal{T}_\\alpha \\subset \\mathcal{O}$ for all $\\alpha$, then $\\mathcal{T} \\subset \\mathcal{O}$. Given such $\\mathcal{O}$, we have $\\mathcal{B}_\\alpha \\subset \\mathcal{O}$ for all $\\alpha$, so $\\mathcal{S} \\subset \\mathcal{O}$. Since $\\mathcal{O}$ is a topology, it must contain all finite intersections of elements of $\\mathcal{S}$, so $\\mathcal{B} \\subset \\mathcal{O}$ and hence $\\mathcal{T} \\subset \\mathcal{O}$. We conclude that the topology $\\mathcal{T}$ generated by the subbasis $\\mathcal{S}=\\cup_\\alpha \\mathcal{B}_\\alpha$ is the unique smallest topology on $X$ containing all the collections $\\mathcal{T}_\\alpha$.\n\\end{proof}", "informal_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 each $x \\in A, U_x \\subset A \\Longrightarrow \\cup U_x \\subset A$. For the converse, observe that given any $x \\in A, x \\in U_x$ and hence in the union. Thus we proved our claim, and hence $A$ is an open set."} -{"name": "Munkres_exercise_13_4b2", "source": "Munkres.lean", "header": "import Mathlib\n\nopen Filter Set TopologicalSpace\nopen Topology\nnoncomputable section\n", "formal_statement": "theorem Munkres_exercise_13_4b2 (X I : Type*) (T : I → Set (Set X)) (h : ∀ i, is_topology X (T i)) :\n ∃! T', is_topology X T' ∧ (∀ i, T' ⊆ T i) ∧\n ∀ T'', is_topology X T'' → (∀ i, T'' ⊆ T i) → T' ⊆ T'' := sorry", "formal_proof": null, "informal_stmt": "Let $\\mathcal{T}_\\alpha$ be a family of topologies on $X$. Show that there is a unique largest topology on $X$ contained in all the collections $\\mathcal{T}_\\alpha$.\n\\begin{proof}\n Now we prove that there exists a unique largest topology contained in all $\\mathcal{T}_\\alpha$. Uniqueness of such topology is clear. Consider $\\mathcal{T}=\\bigcap_\\alpha \\mathcal{T}_\\alpha$. We already know that $\\mathcal{T}$ is a topology by, and clearly $\\mathcal{T} \\subset \\mathcal{T}_\\alpha$ for all $\\alpha$. If $\\mathcal{O}$ is another topology contained in all $\\mathcal{T}_\\alpha$, it must be contained in their intersection, so $\\mathcal{O} \\subset \\mathcal{T}$. I follows that $\\mathcal{T}$ is the unique largest topology contained in all $\\mathcal{T}_\\alpha$.\n\\end{proof}", "informal_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 each $x \\in A, U_x \\subset A \\Longrightarrow \\cup U_x \\subset A$. For the converse, observe that given any $x \\in A, x \\in U_x$ and hence in the union. Thus we proved our claim, and hence $A$ is an open set."} -{"name": "Munkres_exercise_13_5a", "source": "Munkres.lean", "header": "import Mathlib\n\nopen Filter Set TopologicalSpace\nopen Topology\nnoncomputable section\n", "formal_statement": "theorem Munkres_exercise_13_5a {X : Type*}\n [TopologicalSpace X] (A : Set (Set X)) (hA : IsTopologicalBasis A) :\n generateFrom A = generateFrom (sInter {T | is_topology X T ∧ A ⊆ T}) := sorry", "formal_proof": null, "informal_stmt": "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}$.\n\\begin{proof}\n 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}$, so that $U$ is a union of elements of $\\mathcal{A}$. Since each of this elements is also an element of $\\mathcal{O}$, their union $U$ belongs to $\\mathcal{O}$. Thus $\\mathcal{T} \\subset \\mathcal{O}$ and the equality holds.\n\\end{proof}", "informal_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 each $x \\in A, U_x \\subset A \\Longrightarrow \\cup U_x \\subset A$. For the converse, observe that given any $x \\in A, x \\in U_x$ and hence in the union. Thus we proved our claim, and hence $A$ is an open set."} -{"name": "Munkres_exercise_13_5b", "source": "Munkres.lean", "header": "import Mathlib\n\nopen Filter Set TopologicalSpace\nopen Topology\nnoncomputable section\n", "formal_statement": "theorem Munkres_exercise_13_5b {X : Type*}\n [t : TopologicalSpace X] (A : Set (Set X)) (hA : t = generateFrom A) :\n generateFrom A = generateFrom (sInter {T | is_topology X T ∧ A ⊆ T}) := sorry", "formal_proof": null, "informal_stmt": "Show that if $\\mathcal{A}$ is a subbasis for a topology on $X$, then the topology generated by $\\mathcal{A}$ equals the intersection of all topologies on $X$ that contain $\\mathcal{A}$.\n\\begin{proof}\n If we now considered $\\mathcal{A}$ as a subbasis, then the elements of $\\mathcal{T}$ are union of finite intersections of elements of $\\mathcal{A}$. The inclusion $\\mathcal{O} \\subset \\mathcal{T}$ is again clear and $\\mathcal{T} \\subset \\mathcal{O}$ holds since every union of finite intersections of elements of $\\mathcal{A}$ belongs to $\\mathcal{O}$.\n\\end{proof}", "informal_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 each $x \\in A, U_x \\subset A \\Longrightarrow \\cup U_x \\subset A$. For the converse, observe that given any $x \\in A, x \\in U_x$ and hence in the union. Thus we proved our claim, and hence $A$ is an open set."} -{"name": "Munkres_exercise_13_6", "source": "Munkres.lean", "header": "import Mathlib\n\nopen Filter Set TopologicalSpace\nopen Topology\nnoncomputable section\n", "formal_statement": "theorem Munkres_exercise_13_6 :\n ¬ (∀ U, Rl.IsOpen U → K_topology.IsOpen U) ∧ ¬ (∀ U, K_topology.IsOpen U → Rl.IsOpen U) := sorry", "formal_proof": null, "informal_stmt": "Show that the lower limit topology $\\mathbb{R}_l$ and $K$-topology $\\mathbb{R}_K$ are not comparable.\n\\begin{proof}\n 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 \\mathcal{T}_K$. Similarly, given the basis element $(-1,1) \\backslash K$ for $\\mathcal{T}_K$, there is no basis element for $\\mathcal{T}_{\\ell}$ containing 0 contained in $(-1,1) \\backslash K$, so $\\mathcal{T}_K \\not \\subset \\mathcal{T}_{\\ell}$.\n\\end{proof}", "informal_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 each $x \\in A, U_x \\subset A \\Longrightarrow \\cup U_x \\subset A$. For the converse, observe that given any $x \\in A, x \\in U_x$ and hence in the union. Thus we proved our claim, and hence $A$ is an open set."} -{"name": "Munkres_exercise_13_8a", "source": "Munkres.lean", "header": "import Mathlib\n\nopen Filter Set TopologicalSpace\nopen Topology\nnoncomputable section\n", "formal_statement": "theorem Munkres_exercise_13_8a :\n IsTopologicalBasis {S : Set ℝ | ∃ a b : ℚ, a < b ∧ S = Ioo ↑a ↑b} := sorry", "formal_proof": null, "informal_stmt": "Show that the collection $\\{(a,b) \\mid a < b, a \\text{ and } b \\text{ rational}\\}$ is a basis that generates the standard topology on $\\mathbb{R}$.\n\\begin{proof}\n Exercise 13.8. (a) First note that $\\mathcal{B}$ is a basis for a topology on $\\mathbb{R}$. This follows from the fact that the union of its elements is all of $\\mathbb{R}$ and the intersection of two elements of $\\mathcal{B}$ is either empty or another element of $\\mathcal{B}$. Let $\\mathcal{T}$ be the standard topology on $\\mathbb{R}$. Clearly the topology generated by $\\mathcal{B}$ is coarser than $\\mathcal{T}$. Let $U \\in \\mathcal{T}$ and $x \\in U$. Then $U$ contains an open interval with centre $x$. Since the rationals are dense in $\\mathbb{R}$ with the standard topology, there exists $q \\in \\mathbb{Q}$ such that $x \\in(x-q, x+q) \\subset U$. This proves that $\\mathcal{T}$ is coarser than the topology generated by $\\mathcal{B}$. We conclude that $\\mathcal{B}$ generates the standard topology on $\\mathbb{R}$.\n\\end{proof}", "informal_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 each $x \\in A, U_x \\subset A \\Longrightarrow \\cup U_x \\subset A$. For the converse, observe that given any $x \\in A, x \\in U_x$ and hence in the union. Thus we proved our claim, and hence $A$ is an open set."} -{"name": "Munkres_exercise_13_8b", "source": "Munkres.lean", "header": "import Mathlib\n\nopen Filter Set TopologicalSpace\nopen Topology\nnoncomputable section\n", "formal_statement": "theorem Munkres_exercise_13_8b :\n (generateFrom {S : Set ℝ | ∃ a b : ℚ, a < b ∧ S = Ico ↑a ↑b}).IsOpen ≠\n (lower_limit_topology ℝ).IsOpen := sorry", "formal_proof": null, "informal_stmt": "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}$.\n\\begin{proof}\n (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 greater than $r$. Then $[r, s)$ is a basis element for the topology of $\\mathbb{R}_{\\ell}$, but $[r, s)$ is not a union of elements of $\\mathcal{C}$. Indeed, suppose that $[r, s)=\\cup_\\alpha\\left[a_\\alpha, b_\\alpha\\right)$ for rationals $a_\\alpha, b_\\alpha$. Then $r \\in\\left[a_\\alpha, b_\\alpha\\right)$ for some $\\alpha$. Since $r$ is irrational we must have $a_\\alpha min (f x) (g x)) := sorry", "formal_proof": null, "informal_stmt": "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.\n\\begin{proof}\n 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 follows from the pasting lemma that\n$$\nh: X \\rightarrow Y, \\quad h(x)=\\min \\{f(x), g(x)\\}= \\begin{cases}f^{\\prime}(x) & \\text { if } x \\in A \\\\ g^{\\prime}(x) & \\text { if } x \\in B\\end{cases}\n$$\nis continuous\n\\end{proof}", "informal_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 each $x \\in A, U_x \\subset A \\Longrightarrow \\cup U_x \\subset A$. For the converse, observe that given any $x \\in A, x \\in U_x$ and hence in the union. Thus we proved our claim, and hence $A$ is an open set."} -{"name": "Munkres_exercise_18_13", "source": "Munkres.lean", "header": "import Mathlib\n\nopen Filter Set TopologicalSpace\nopen Topology\nnoncomputable section\n", "formal_statement": "theorem Munkres_exercise_18_13\n {X : Type*} [TopologicalSpace X] {Y : Type*} [TopologicalSpace Y]\n [T2Space Y] {A : Set X} {f : A → Y} (hf : Continuous f)\n (g : closure A → Y)\n (g_con : Continuous g) :\n ∀ (g' : closure A → Y), Continuous g' → (∀ (x : closure A), g x = g' x) := sorry", "formal_proof": null, "informal_stmt": "Let $A \\subset X$; let $f: A \\rightarrow Y$ be continuous; let $Y$ be Hausdorff. Show that if $f$ may be extended to a continuous function $g: \\bar{A} \\rightarrow Y$, then $g$ is uniquely determined by $f$.\n\\begin{proof}\n Let $h, g: \\bar{A} \\rightarrow Y$ be continuous extensions of $f$. Suppose that there is a point $x \\in \\bar{A}$ such that $h(x) \\neq g(x)$. Since $h=g$ on $A$, we must have $x \\in A^{\\prime}$. Since $Y$ is Hausdorff, there is a neighbourhood $U$ of $h(x)$ and a neighbourhood $V$ of $g(x)$ such that $U \\cap V=\\emptyset$. Since $h$ and $g$ are continuous, $h^{-1}(U) \\cap g^{-1}(V)$ is a neighbourhood of $x$. Since $x \\in A^{\\prime}$, there is a point $y \\in h^{-1}(U) \\cap g^{-1}(V) \\cap A$ different from $x$. But $h=g$ on $A$, so $g^{-1}(V) \\cap A=h^{-1}(V) \\cap A$ and hence $y \\in h^{-1}(U) \\cap h^{-1}(V)=h^{-1}(U \\cap V)=\\emptyset$, a contradiction. It follows that $h=g$ on $\\bar{A}$.\n\\end{proof}", "informal_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 each $x \\in A, U_x \\subset A \\Longrightarrow \\cup U_x \\subset A$. For the converse, observe that given any $x \\in A, x \\in U_x$ and hence in the union. Thus we proved our claim, and hence $A$ is an open set."} -{"name": "Munkres_exercise_19_6a", "source": "Munkres.lean", "header": "import Mathlib\n\nopen Filter Set TopologicalSpace\nopen Topology\nnoncomputable section\n", "formal_statement": "theorem Munkres_exercise_19_6a\n {n : ℕ}\n {f : Fin n → Type*} {x : ℕ → Πa, f a}\n (y : Πi, f i)\n [Πa, TopologicalSpace (f a)] :\n Tendsto x atTop (𝓝 y) ↔ ∀ i, Tendsto (λ j => (x j) i) atTop (𝓝 (y i)) := sorry", "formal_proof": null, "informal_stmt": "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$.\n\\begin{proof}\n 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$.\nFirst assume that the sequence $\\mathbf{x}_1, \\mathbf{x}_2, \\ldots$ converges to $\\mathbf{x}=\\left(x_\\alpha\\right)_\\alpha$ in the product space $\\prod_\\alpha X_\\alpha$. Fix an index $\\beta$ and let $U$ be a neighbourhood of $\\pi_\\beta(\\mathbf{x})=x_\\beta$. Let $V=\\prod_\\alpha U_\\alpha$, where $U_\\alpha=X_\\alpha$ for each $\\alpha \\neq \\beta$ and $U_\\beta=U$. Then $V$ is a neighbourhood of $\\mathbf{x}$, so there exists $N \\in \\mathbb{Z}_{+}$such that $\\mathbf{x}_n \\in V$ for all $n \\geq N$. Therefore $\\pi_\\beta\\left(\\mathbf{x}_n\\right)=x_n^\\beta \\in U$ for all $n \\geq N$. Since $U$ was arbitrary, it follows that $\\pi_\\beta\\left(\\mathbf{x}_1\\right), \\pi_\\beta\\left(\\mathbf{x}_2\\right), \\ldots$ converges to $\\pi_\\beta(\\mathbf{x})$. Since $\\beta$ was arbitrary, this holds for all indices $\\alpha$.\n\\end{proof}", "informal_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 each $x \\in A, U_x \\subset A \\Longrightarrow \\cup U_x \\subset A$. For the converse, observe that given any $x \\in A, x \\in U_x$ and hence in the union. Thus we proved our claim, and hence $A$ is an open set."} -{"name": "Munkres_exercise_20_2", "source": "Munkres.lean", "header": "import Mathlib\n\nopen Filter Set TopologicalSpace\nopen Topology\nnoncomputable section\n", "formal_statement": "theorem Munkres_exercise_20_2\n [TopologicalSpace (ℝ ×ₗ ℝ)] [OrderTopology (ℝ ×ₗ ℝ)]\n : MetrizableSpace (ℝ ×ₗ ℝ) := sorry", "formal_proof": null, "informal_stmt": "Show that $\\mathbb{R} \\times \\mathbb{R}$ in the dictionary order topology is metrizable.\n\\begin{proof}\n The dictionary order topology on $\\mathbb{R} \\times \\mathbb{R}$ is the same as the product topology $\\mathbb{R}_d \\times \\mathbb{R}$, where $\\mathbb{R}_d$ denotes $\\mathbb{R}$ with the discrete topology. We know that $\\mathbb{R}_d$ and $\\mathbb{R}$ are metrisable. Thus, it suffices to show that the product of two metrisable spaces is metrisable.\nSo let $X$ and $Y$ be metrisable spaces, with metrics $d$ and $d^{\\prime}$ respectively. On $X \\times Y$, define\n$$\n\\rho(x \\times y, w \\times z)=\\max \\left\\{d(x, w), d^{\\prime}(y, z)\\right\\} .\n$$\nThen $\\rho$ is a metric on $X \\times Y$; it remains to prove that it induces the product topology on $X \\times Y$. If $B_d\\left(x, r_1\\right) \\times B_d\\left(y, r_2\\right)$ is a basis element for the product space $X \\times Y$, and $r=\\min \\left\\{r_1, r_2\\right\\}$, then $x \\times y \\in B_\\rho(x \\times y, r) \\subset B_d\\left(x, r_1\\right) \\times B_d\\left(y, r_2\\right)$, so the product topology is coarser than the $\\rho$-topology. Conversely, if $B_\\rho(x \\times y, \\delta)$ is a basis element for the $\\rho$-topology, then $x \\times y \\in B_d(x, \\delta) \\times B_{d^{\\prime}}(y, \\delta) \\subset$ $B_\\rho(x \\times y, \\delta)$, so the product topology is finer than the $\\rho$-topology. It follows that both topologies are equal, so the product space $X \\times Y$ is metrisable.\n\\end{proof}", "informal_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 each $x \\in A, U_x \\subset A \\Longrightarrow \\cup U_x \\subset A$. For the converse, observe that given any $x \\in A, x \\in U_x$ and hence in the union. Thus we proved our claim, and hence $A$ is an open set."} -{"name": "Munkres_exercise_21_6a", "source": "Munkres.lean", "header": "import Mathlib\n\nopen Filter Set TopologicalSpace\nopen Topology\nnoncomputable section\n", "formal_statement": "theorem Munkres_exercise_21_6a\n (f : ℕ → I → ℝ )\n (h : ∀ x n, f n x = x ^ n) :\n ∀ x, ∃ y, Tendsto (λ n => f n x) atTop (𝓝 y) := sorry", "formal_proof": null, "informal_stmt": "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]$.\n\\begin{proof}\nIf $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\n\\end{proof}", "informal_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 each $x \\in A, U_x \\subset A \\Longrightarrow \\cup U_x \\subset A$. For the converse, observe that given any $x \\in A, x \\in U_x$ and hence in the union. Thus we proved our claim, and hence $A$ is an open set."} -{"name": "Munkres_exercise_21_6b", "source": "Munkres.lean", "header": "import Mathlib\n\nopen Filter Set TopologicalSpace\nopen Topology\nnoncomputable section\n", "formal_statement": "theorem Munkres_exercise_21_6b\n (f : ℕ → I → ℝ )\n (h : ∀ x n, f n x = x ^ n) :\n ¬ ∃ f₀, TendstoUniformly f f₀ atTop := sorry", "formal_proof": null, "informal_stmt": "Define $f_{n}:[0,1] \\rightarrow \\mathbb{R}$ by the equation $f_{n}(x)=x^{n}$. Show that the sequence $\\left(f_{n}\\right)$ does not converge uniformly.\n\\begin{proof}\n The sequence $\\left(f_n\\right)_n$ does not converge uniformly, since given $0<\\varepsilon<1$ and $N \\in \\mathbb{Z}_{+}$, for $x=\\varepsilon^{1 / N}$ we have $d\\left(f_N(x), f(x)\\right)=\\varepsilon$. We can also apply Theorem 21.6: the convergence is not uniform since $f$ is not continuous.\n\\end{proof}", "informal_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 each $x \\in A, U_x \\subset A \\Longrightarrow \\cup U_x \\subset A$. For the converse, observe that given any $x \\in A, x \\in U_x$ and hence in the union. Thus we proved our claim, and hence $A$ is an open set."} -{"name": "Munkres_exercise_21_8", "source": "Munkres.lean", "header": "import Mathlib\n\nopen Filter Set TopologicalSpace\nopen Topology\nnoncomputable section\n", "formal_statement": "theorem Munkres_exercise_21_8\n {X : Type*} [TopologicalSpace X] {Y : Type*} [MetricSpace Y]\n {f : ℕ → X → Y} {x : ℕ → X}\n (hf : ∀ n, Continuous (f n))\n (x₀ : X)\n (hx : Tendsto x atTop (𝓝 x₀))\n (f₀ : X → Y)\n (hh : TendstoUniformly f f₀ atTop) :\n Tendsto (λ n => f n (x n)) atTop (𝓝 (f₀ x₀)) := sorry", "formal_proof": null, "informal_stmt": "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 to $f(x)$.\n\\begin{proof}\n 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 all $x \\in X$ and all $n \\geq N_1$, so that $d\\left(f_n\\left(x_n\\right), f\\left(x_n\\right)\\right)<\\varepsilon / 2$ for all $n \\geq N_1$. Moreover, $f$ is continuous, so there exists $N_2 \\in \\mathbb{Z}_{+}$such that $d\\left(f\\left(x_n\\right), f(x)\\right)<\\varepsilon / 2$ for all $n \\geq N_2$. Thus, if $N>\\max \\left\\{N_1, N_2\\right\\}$, then\n$$\nd\\left(f_n\\left(x_n\\right), f(x)\\right) \\leq d\\left(f_n\\left(x_n\\right), f\\left(x_n\\right)\\right)+d\\left(f\\left(x_n\\right), f(x)\\right)<\\frac{\\varepsilon}{2}+\\frac{\\varepsilon}{2}=\\varepsilon\n$$\nfor all $n \\geq N$, so $f_n\\left(x_n\\right) \\in V$ for all $n \\geq N$. It follows that $\\left(f_n\\left(x_n\\right)\\right)_n$ converges to $f(x)$.\n\\end{proof}", "informal_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 each $x \\in A, U_x \\subset A \\Longrightarrow \\cup U_x \\subset A$. For the converse, observe that given any $x \\in A, x \\in U_x$ and hence in the union. Thus we proved our claim, and hence $A$ is an open set."} -{"name": "Munkres_exercise_22_2a", "source": "Munkres.lean", "header": "import Mathlib\n\nopen Filter Set TopologicalSpace\nopen Topology\nnoncomputable section\n", "formal_statement": "theorem Munkres_exercise_22_2a {X Y : Type*} [TopologicalSpace X]\n [TopologicalSpace Y] (p : X → Y) (h : Continuous p) :\n IsQuotientMap p ↔ ∃ (f : Y → X), Continuous f ∧ p ∘ f = id := sorry", "formal_proof": null, "informal_stmt": "Let $p: X \\rightarrow Y$ be a continuous map. Show that if there is a continuous map $f: Y \\rightarrow X$ such that $p \\circ f$ equals the identity map of $Y$, then $p$ is a quotient map.\n\\begin{proof}\nLet $1_Y: Y \\rightarrow Y$ be the identity map in $Y$. If $U$ is a subset of $Y$ and $p^{-1}(U)$ is open in $X$, then $f^{-1}\\left(p^{-1}(U)\\right)=1_Y^{-1}(U)=U$ is open in $Y$ by continuity of $f$. Thus $p$ is a quotient map.\n\\end{proof}", "informal_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 each $x \\in A, U_x \\subset A \\Longrightarrow \\cup U_x \\subset A$. For the converse, observe that given any $x \\in A, x \\in U_x$ and hence in the union. Thus we proved our claim, and hence $A$ is an open set."} -{"name": "Munkres_exercise_22_2b", "source": "Munkres.lean", "header": "import Mathlib\n\nopen Filter Set TopologicalSpace\nopen Topology\nnoncomputable section\n", "formal_statement": "theorem Munkres_exercise_22_2b {X : Type*} [TopologicalSpace X]\n {A : Set X} (r : X → A) (hr : Continuous r) (h : ∀ x : A, r x = x) :\n IsQuotientMap r := sorry", "formal_proof": null, "informal_stmt": "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.\n\\begin{proof}\nThe 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).\n\\end{proof}", "informal_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 each $x \\in A, U_x \\subset A \\Longrightarrow \\cup U_x \\subset A$. For the converse, observe that given any $x \\in A, x \\in U_x$ and hence in the union. Thus we proved our claim, and hence $A$ is an open set."} -{"name": "Munkres_exercise_22_5", "source": "Munkres.lean", "header": "import Mathlib\n\nopen Filter Set TopologicalSpace\nopen Topology\nnoncomputable section\n", "formal_statement": "theorem Munkres_exercise_22_5 {X Y : Type*} [TopologicalSpace X]\n [TopologicalSpace Y] (p : X → Y) (hp : IsOpenMap p)\n (A : Set X) (hA : IsOpen A) : IsOpenMap (p ∘ Subtype.val : A → Y) := sorry", "formal_proof": null, "informal_stmt": "Let $p \\colon X \\rightarrow Y$ be an open map. Show that if $A$ is open in $X$, then the map $q \\colon A \\rightarrow p(A)$ obtained by restricting $p$ is an open map.\n\\begin{proof}\nLet $U$ be open in $A$. Since $A$ is open in $X, U$ is open in $X$ as well, so $p(U)$ is open in $Y$. Since $q(U)=p(U)=p(U) \\cap p(A)$, the set $q(U)$ is open in $p(A)$. Thus $q$ is an open map.\n\\end{proof}", "informal_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 each $x \\in A, U_x \\subset A \\Longrightarrow \\cup U_x \\subset A$. For the converse, observe that given any $x \\in A, x \\in U_x$ and hence in the union. Thus we proved our claim, and hence $A$ is an open set."} -{"name": "Munkres_exercise_23_2", "source": "Munkres.lean", "header": "import Mathlib\n\nopen Filter Set TopologicalSpace\nopen Topology\nnoncomputable section\n", "formal_statement": "theorem Munkres_exercise_23_2 {X : Type*}\n [TopologicalSpace X] {A : ℕ → Set X} (hA : ∀ n, IsConnected (A n))\n (hAn : ∀ n, A n ∩ A (n + 1) ≠ ∅) :\n IsConnected (⋃ n, A n) := sorry", "formal_proof": null, "informal_stmt": "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.\n\\begin{proof}\n 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 $A_n \\subset B$ then $A_{n+1} \\subset B$, for if $A_{n+1} \\subset C$ then $A_n \\cap A_{n+1} \\subset B \\cap C=\\emptyset$, in contradiction with the assumption. By induction, $A_n \\subset B$ for all $n \\in \\mathbb{Z}_{+}$, so that $\\bigcup_n A_n \\subset B$. It follows that $\\bigcup_n A_n$ is connected.\n\\end{proof}", "informal_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 each $x \\in A, U_x \\subset A \\Longrightarrow \\cup U_x \\subset A$. For the converse, observe that given any $x \\in A, x \\in U_x$ and hence in the union. Thus we proved our claim, and hence $A$ is an open set."} -{"name": "Munkres_exercise_23_3", "source": "Munkres.lean", "header": "import Mathlib\n\nopen Filter Set TopologicalSpace\nopen Topology\nnoncomputable section\n", "formal_statement": "theorem Munkres_exercise_23_3 {X : Type*} [TopologicalSpace X]\n [TopologicalSpace X] {A : ℕ → Set X}\n (hAn : ∀ n, IsConnected (A n))\n (A₀ : Set X)\n (hA : IsConnected A₀)\n (h : ∀ n, A₀ ∩ A n ≠ ∅) :\n IsConnected (A₀ ∪ (⋃ n, A n)) := sorry", "formal_proof": null, "informal_stmt": "Let $\\left\\{A_{\\alpha}\\right\\}$ be a collection of connected subspaces of $X$; let $A$ be a connected subset of $X$. Show that if $A \\cap A_{\\alpha} \\neq \\varnothing$ for all $\\alpha$, then $A \\cup\\left(\\bigcup A_{\\alpha}\\right)$ is connected.\n\\begin{proof}\n For each $\\alpha$ we have $A \\cap A_\\alpha \\neq \\emptyset$, so each $A \\cup A_\\alpha$ is connected by Theorem 23.3. In turn $\\left\\{A \\cup A_\\alpha\\right\\}_\\alpha$ is a collection of connected spaces that have a point in common (namely any point in $A)$, so $\\bigcup_\\alpha\\left(A \\cup A_\\alpha\\right)=A \\cup\\left(\\bigcup_\\alpha A_\\alpha\\right)$ is connected. \n\\end{proof}", "informal_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 each $x \\in A, U_x \\subset A \\Longrightarrow \\cup U_x \\subset A$. For the converse, observe that given any $x \\in A, x \\in U_x$ and hence in the union. Thus we proved our claim, and hence $A$ is an open set."} -{"name": "Munkres_exercise_23_4", "source": "Munkres.lean", "header": "import Mathlib\n\nopen Filter Set TopologicalSpace\nopen Topology\nnoncomputable section\n", "formal_statement": "theorem Munkres_exercise_23_4 {X : Type*} [TopologicalSpace X] [CofiniteTopology X]\n (s : Set X) : Infinite s → IsConnected s := sorry", "formal_proof": null, "informal_stmt": "Show that if $X$ is an infinite set, it is connected in the finite complement topology.\n\\begin{proof}\n 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.\n\\end{proof}", "informal_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 each $x \\in A, U_x \\subset A \\Longrightarrow \\cup U_x \\subset A$. For the converse, observe that given any $x \\in A, x \\in U_x$ and hence in the union. Thus we proved our claim, and hence $A$ is an open set."} -{"name": "Munkres_exercise_23_6", "source": "Munkres.lean", "header": "import Mathlib\n\nopen Filter Set TopologicalSpace\nopen Topology\nnoncomputable section\n", "formal_statement": "theorem Munkres_exercise_23_6 {X : Type*}\n [TopologicalSpace X] {A C : Set X} (hc : IsConnected C)\n (hCA : C ∩ A ≠ ∅) (hCXA : C ∩ Aᶜ ≠ ∅) :\n C ∩ (frontier A) ≠ ∅ := sorry", "formal_proof": null, "informal_stmt": "Let $A \\subset X$. Show that if $C$ is a connected subspace of $X$ that intersects both $A$ and $X-A$, then $C$ intersects $\\operatorname{Bd} A$.\n\\begin{proof}\n Suppose that $C \\cap B d A=C \\cap \\bar{A} \\cap \\overline{X-A}=\\emptyset$. Then $C \\cap A$ and $C \\cap(X \\backslash A)$ are a pair of disjoint non-empty sets whose union is all of $C$, neither of which contains a limit point of the other. Indeed, if $C \\cap(X-A)$ contains a limit point $x$ of $C \\cap A$, then $x \\in C \\cap(X-A) \\cap A^{\\prime} \\subset C \\cap \\bar{A} \\cap \\overline{X-A}=\\emptyset$, a contradiction, and similarly $C \\cap A$ does not contain a limit point of $C \\cap(X-A)$. Then $C \\cap A$ and $C \\cap(X-A)$ constitute a separation of $C$, contradicting the fact that $C$ is connected (Lemma 23.1).\n\\end{proof}", "informal_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 each $x \\in A, U_x \\subset A \\Longrightarrow \\cup U_x \\subset A$. For the converse, observe that given any $x \\in A, x \\in U_x$ and hence in the union. Thus we proved our claim, and hence $A$ is an open set."} -{"name": "Munkres_exercise_23_9", "source": "Munkres.lean", "header": "import Mathlib\n\nopen Filter Set TopologicalSpace\nopen Topology\nnoncomputable section\n", "formal_statement": "theorem Munkres_exercise_23_9 {X Y : Type*}\n [TopologicalSpace X] [TopologicalSpace Y]\n (A₁ A₂ : Set X)\n (B₁ B₂ : Set Y)\n (hA : A₁ ⊂ A₂)\n (hB : B₁ ⊂ B₂)\n (hA : IsConnected A₂)\n (hB : IsConnected B₂) :\n IsConnected ({x | ∃ a b, x = (a, b) ∧ a ∈ A₂ ∧ b ∈ B₂} \\\n {x | ∃ a b, x = (a, b) ∧ a ∈ A₁ ∧ b ∈ B₁}) := sorry", "formal_proof": null, "informal_stmt": "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.\n\\begin{proof}\nThis 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\n$$\nU_x=(X \\times\\{d\\}) \\cup(\\{x\\} \\times Y)\n$$\nis connected since $X \\times\\{d\\}$ and $\\{x\\} \\times Y$ are connected and have the common point $x \\times d$. Then $U=\\bigcup_{x \\in X \\backslash A} U_x$ is connected because it is the union of the connected spaces $U_x$ which have the point $c \\times d$ in common. Similarly, for each $y \\in Y \\backslash B$ the set\n$$\nV_y=(X \\times\\{y\\}) \\cup(\\{c\\} \\times Y)\n$$\nis connected, so $V=\\bigcup_{y \\in Y \\backslash B} V_y$ is connected. Thus $(X \\times Y) \\backslash(A \\times B)=U \\cup V$ is connected since $c \\times d$ is a common point of $U$ and $V$.\n\\end{proof}", "informal_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 each $x \\in A, U_x \\subset A \\Longrightarrow \\cup U_x \\subset A$. For the converse, observe that given any $x \\in A, x \\in U_x$ and hence in the union. Thus we proved our claim, and hence $A$ is an open set."} -{"name": "Munkres_exercise_23_11", "source": "Munkres.lean", "header": "import Mathlib\n\nopen Filter Set TopologicalSpace\nopen Topology\nnoncomputable section\n", "formal_statement": "theorem Munkres_exercise_23_11 {X Y : Type*} [TopologicalSpace X] [TopologicalSpace Y]\n (p : X → Y) (hq : QuotientMap p)\n (hY : ConnectedSpace Y) (hX : ∀ y : Y, IsConnected (p ⁻¹' {y})) :\n ConnectedSpace X := sorry", "formal_proof": null, "informal_stmt": "Let $p: X \\rightarrow Y$ be a quotient map. Show that if each set $p^{-1}(\\{y\\})$ is connected, and if $Y$ is connected, then $X$ is connected.\n\\begin{proof}\n Suppose that $U$ and $V$ constitute a separation of $X$. If $y \\in p(U)$, then $y=p(x)$ for some $x \\in U$, so that $x \\in p^{-1}(\\{y\\})$. Since $p^{-1}(\\{y\\})$ is connected and $x \\in U \\cap p^{-1}(\\{y\\})$, we have $p^{-1}(\\{y\\}) \\subset U$. Thus $p^{-1}(\\{y\\}) \\subset U$ for all $y \\in p(U)$, so that $p^{-1}(p(U)) \\subset U$. The inclusion $U \\subset p^{-1}(p(U))$ if true for any subset and function, so we have the equality $U=p^{-1}(p(U))$ and therefore $U$ is saturated. Similarly, $V$ is saturated. Since $p$ is a quotient map, $p(U)$ and $p(V)$ are disjoint non-empty open sets in $Y$. But $p(U) \\cup p(V)=Y$ as $p$ is surjective, so $p(U)$ and $p(V)$ constitute a separation of $Y$, contradicting the fact that $Y$ is connected. We conclude that $X$ is connected.\n\\end{proof}", "informal_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 each $x \\in A, U_x \\subset A \\Longrightarrow \\cup U_x \\subset A$. For the converse, observe that given any $x \\in A, x \\in U_x$ and hence in the union. Thus we proved our claim, and hence $A$ is an open set."} -{"name": "Munkres_exercise_24_2", "source": "Munkres.lean", "header": "import Mathlib\n\nopen Filter Set TopologicalSpace\nopen Topology\nnoncomputable section\n", "formal_statement": "theorem Munkres_exercise_24_2 {f : (Metric.sphere 0 1 : Set ℝ) → ℝ}\n (hf : Continuous f) : ∃ x, f x = f (-x) := sorry", "formal_proof": null, "informal_stmt": "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)$.\n\\begin{proof}\n 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 intermediate value theorem, since $S^1$ is connected and $g(-x)<00$ and $f(1)<1$. Let $g:[0,1] \\rightarrow[0,1]$ be given by $g(x)=f(x)-x$. Then $g$ is continuous, $g(0)>0$ and $g(1)<0$. Since $[0,1]$ is connected and $g(1)<00$. Therefore $X$ must be uncountable.\n\\end{proof}", "informal_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 each $x \\in A, U_x \\subset A \\Longrightarrow \\cup U_x \\subset A$. For the converse, observe that given any $x \\in A, x \\in U_x$ and hence in the union. Thus we proved our claim, and hence $A$ is an open set."} -{"name": "Munkres_exercise_28_4", "source": "Munkres.lean", "header": "import Mathlib\n\nopen Filter Set TopologicalSpace\nopen Topology\nnoncomputable section\n", "formal_statement": "theorem Munkres_exercise_28_4 {X : Type*}\n [TopologicalSpace X] (hT1 : T1Space X) :\n countably_compact X ↔ limit_point_compact X := sorry", "formal_proof": null, "informal_stmt": "A space $X$ is said to be countably compact if every countable open covering of $X$ contains a finite subcollection that covers $X$. Show that for a $T_1$ space $X$, countable compactness is equivalent to limit point compactness.\n\\begin{proof}\n First let $X$ be a countable compact space. Note that if $Y$ is a closed subset of $X$, then $Y$ is countable compact as well, for if $\\left\\{U_n\\right\\}_{n \\in \\mathbb{Z}_{+}}$is a countable open covering of $Y$, then $\\left\\{U_n\\right\\}_{n \\in \\mathbb{Z}_{+}} \\cup(X \\backslash Y)$ is a countable open covering of $X$; there is a finite subcovering of $X$, hence a finite subcovering of $Y$. Now let $A$ be an infinite subset. We show that $A$ has a limit point. Let $B$ be a countable infinite subset of $A$. Suppose that $B$ has no limit point, so that $B$ is closed in $X$. Then $B$ is countable compact. Since $B$ has no limit point, for each $b \\in B$ there is a neighbourhood $U_b$ of $b$ that intersects $B$ in the point $b$ alone. Then $\\left\\{U_b\\right\\}_{b \\in B}$ is an open covering of $B$ with no finite subcovering, contradicting the fact that $B$ is countable compact. Hence $B$ has a limit point, so that $A$ has a limit point as well. Since $A$ was arbitrary, we deduce that $X$ is limit point compact. (Note that the $T_1$ property is not necessary in this direction.)\n\nNow assume that $X$ is a limit point compact $T_1$ space. We show that $X$ is countable compact. Suppose, on the contrary, that $\\left\\{U_n\\right\\}_{n \\in \\mathbb{Z}_{+}}$is a countable open covering of $X$ with no finite subcovering. For each $n$, take a point $x_n$ in $X$ not in $U_1 \\cup \\cdots \\cup U_n$. By assumption, the infinite set $A=\\left\\{x_n \\mid n \\in \\mathbb{Z}_{+}\\right\\}$has a limit point $y \\in X$. Since $\\left\\{U_n\\right\\}_{n \\in \\mathbb{Z}_{+}}$covers $X$, there exists $N \\in \\mathbb{Z}_{+}$such that $y \\in U_1 \\cup \\cdots \\cup U_N$. Now $X$ is $T_1$, so for each $i=1, \\ldots, N$ there exists a neighbourhood $V_i$ of $y$ that does not contain $x_i$. Then\n$$\nV=\\left(V_1 \\cap \\cdots \\cap V_N\\right) \\cap\\left(U_1 \\cup \\cdots \\cup U_N\\right)\n$$\nis a neighbourhood of $y$ that does not contain any of the points $x_i$, contradicting the fact that $y$ is a limit point of $A$. It follows that every countable open covering of $X$ must have a finite subcovering, so $X$ is countable compact.\n\\end{proof}", "informal_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 each $x \\in A, U_x \\subset A \\Longrightarrow \\cup U_x \\subset A$. For the converse, observe that given any $x \\in A, x \\in U_x$ and hence in the union. Thus we proved our claim, and hence $A$ is an open set."} -{"name": "Munkres_exercise_28_5", "source": "Munkres.lean", "header": "import Mathlib\n\nopen Filter Set TopologicalSpace\nopen Topology\nnoncomputable section\n", "formal_statement": "theorem Munkres_exercise_28_5\n (X : Type*) [TopologicalSpace X] :\n countably_compact X ↔ ∀ (C : ℕ → Set X), (∀ n, IsClosed (C n)) ∧\n (∀ n, C n ≠ ∅) ∧ (∀ n, C n ⊆ C (n + 1)) → ∃ x, ∀ n, x ∈ C n := sorry", "formal_proof": null, "informal_stmt": "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.\n\\begin{proof}\nWe 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\\}_{n \\in \\mathbb{Z}_{+}}$is a countable collection of open sets with no finite subcollection covering $X$, for if $U_{i_1} \\cup \\cdots \\cup U_{1_n}$ covers $X$, then $C_{i_1} \\cap \\cdots \\cap C_{i_n}$ is empty, contrary to the assumption. Hence $\\left\\{U_n\\right\\}_{n \\in \\mathbb{Z}_{+}}$does not cover $X$, so there exist $x \\in X \\backslash \\bigcup_{n \\in \\mathbb{Z}_{+}} U_n=\\bigcap_{n \\in Z_{+}}\\left(X \\backslash U_n\\right)=\\bigcap_{n \\in Z_{+}} C_n$.\n\nConversely, assume that every nested sequence $C_1 \\supset C_2 \\supset \\cdots$ of closed non-empty sets of $X$ has a non-empty intersection and let $\\left\\{U_n\\right\\}_{n \\in \\mathbb{Z}_{+}}$be a countable open covering of $X$. For each $n$, let $V_n=U_1 \\cup \\cdots \\cup U_n$ and $C_n=X \\backslash V_n$. Suppose that no finite subcollection of $\\left\\{U_n\\right\\}_{n \\in \\mathbb{Z}_{+}}$covers $X$. Then each $C_n$ is non-empty, so $C_1 \\supset C_2 \\supset \\cdots$ is a nested sequence of non-empty closed sets and $\\bigcap_{n \\in \\mathbb{Z}_{+}} C_n$ is non-empty by assumption. Then there exists $x \\in \\bigcap_{n \\in \\mathbb{Z}_{+}} C_n$, so that $x \\notin V_n$ for all $n$, contradicting the fact that $\\left\\{U_n\\right\\}_{n \\in \\mathbb{Z}_{+}}$covers $X$. It follows that there exists $N \\in \\mathbb{Z}_{+}$such that $C_N=\\emptyset$, so that $X=V_N$ and hence some finite subcollection of $\\left\\{U_n\\right\\}_{n \\in \\mathbb{Z}_{+}}$covers $X$. We deduce that $X$ is countable compact.\n\\end{proof}", "informal_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 each $x \\in A, U_x \\subset A \\Longrightarrow \\cup U_x \\subset A$. For the converse, observe that given any $x \\in A, x \\in U_x$ and hence in the union. Thus we proved our claim, and hence $A$ is an open set."} -{"name": "Munkres_exercise_28_6", "source": "Munkres.lean", "header": "import Mathlib\n\nopen Filter Set TopologicalSpace\nopen Topology\nnoncomputable section\n", "formal_statement": "theorem Munkres_exercise_28_6 {X : Type*} [MetricSpace X]\n [CompactSpace X] {f : X → X} (hf : Isometry f) :\n Function.Bijective f := sorry", "formal_proof": null, "informal_stmt": "Let $(X, d)$ be a metric space. If $f: X \\rightarrow X$ satisfies the condition $d(f(x), f(y))=d(x, y)$ for all $x, y \\in X$, then $f$ is called an isometry of $X$. Show that if $f$ is an isometry and $X$ is compact, then $f$ is bijective and hence a homeomorphism.\n\\begin{proof}\n Note that $f$ is an imbedding. It remains to prove that $f$ is surjective. Suppose it is not, and let $a \\in f(X)$. Since $X$ is compact, $f(X)$ is compact and hence closed (every metric space is Hausdorff). Thus, there exists $\\varepsilon>0$ such that the $\\varepsilon^{-}$ neighbourhood of $a$ is contained in $X \\backslash f(X)$. Set $x_1=a$, and inductively $x_{n+1}=f\\left(x_n\\right)$ for $n \\in \\mathbb{Z}_{+}$. We show that $d\\left(x_n, x_m\\right) \\geq \\varepsilon$ for $n \\neq m$. Indeed, we may assume $n0$ there exists $\\delta>0$ such that\n$$\nd_Y(f(x), f(y))<\\epsilon \\text { whenever } d_X(x, y)<\\delta \\text { and } x, y \\in A\n$$\nSo for this $\\delta>0$ there exists $N \\in \\mathbb{N}$ such that\n$$\nd_X\\left(x_n, x\\right)<\\frac{\\delta}{2} \\text { and } d_X\\left(y_n, x\\right)<\\frac{\\delta}{2}, \\text { foe all } n \\geq N .\n$$\nTherefore, we have that for all $n \\geq N$,\n$$\nd_X\\left(x_n, y_n\\right)<\\delta\n$$\nThus the equation (1) yields us that\n$$\nd_Y\\left(f\\left(x_n\\right), f\\left(y_n\\right)\\right)<\\epsilon \\text { for all } n \\geq N .\n$$\nNow since $\\lim _{n \\rightarrow \\infty} f\\left(x_n\\right)=a$ and $b=\\lim _{n \\rightarrow \\infty} f\\left(y_n\\right)$, so for the above $\\epsilon>0$ we have a natural number $K \\geq N$ such that\n$$\n\\begin{gathered}\nd_Y\\left(f\\left(x_n\\right), a\\right)<\\epsilon \\text { for all } n \\geq K \\text { and } \\\\\nd_Y\\left(f\\left(y_n\\right), b\\right)<\\epsilon \\text { for all } n \\geq K .\n\\end{gathered}\n$$\nMoreover, since $K \\geq N$, from $(2)$ we get\n$$\nd_Y\\left(f\\left(x_n\\right), f\\left(y_n\\right)\\right)<\\epsilon \\text { for all } n \\geq K .\n$$\nNow we calculate the following, for $n \\geq K$,\n$$\n\\begin{array}{rlr}\nd_Y(a, b) & \\leq & d_Y\\left(a, f\\left(x_n\\right)\\right)+d_Y\\left(f\\left(x_n\\right), f\\left(y_n\\right)\\right)+d\\left(f\\left(y_n\\right), b\\right) \\\\\n& < & \\epsilon+\\epsilon+\\epsilon \\text { by }(3),(4) \\text { and }(5) \\\\\n& = & 3 \\epsilon\n\\end{array}\n$$\nwhere the first inequality holds because of triangular inequality. Since $\\epsilon>0$ is arbitrary the above calculation shows that $d_Y(a, b)=0$. Thus, the above definition is independent of the choice of the sequence $\\left\\{x_n\\right\\}$ and hence the map $g$ is well defined. Moreover, from the construction it follows that $g$ is continuous on $\\bar{A}$.\nMoreover, we observe that $g$ is unique extension of $f$ by the construction.\nSo it remains to show that $g$ is uniformly continuous. In order to that we take a Cauchy sequence $\\left\\{a_n\\right\\} \\subset \\bar{A}$. Then since $\\bar{A}$ is a closed set so the sequence $\\left\\{a_n\\right\\}$ is convergent and hence $\\left\\{g\\left(a_n\\right)\\right\\}$ is also a convergent sequence as $g$ is continuous on $\\bar{A}$. So $\\left\\{g\\left(a_n\\right)\\right\\}$ is a Cauchy sequence in $Y$. Since a function is uniformly continuous if and only if it sends Cauchy sequences to Cauchy sequences, we conclude that $g$ is uniformly continuous.\n\\end{proof}\n\\end{document}", "informal_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 each $x \\in A, U_x \\subset A \\Longrightarrow \\cup U_x \\subset A$. For the converse, observe that given any $x \\in A, x \\in U_x$ and hence in the union. Thus we proved our claim, and hence $A$ is an open set."} -{"name": "Cambridge_Tripos_exercise_2022_IA_4_I_1E_a", "source": "Cambridge-Tripos.lean", "header": "import Mathlib\n\nopen Filter Set\n", "formal_statement": "theorem Cambridge_Tripos_exercise_2022_IA_4_I_1E_a : ∀ N : ℕ, ∃ n ≥ N, (3*n+1).Prime ∧ (3*n+1) ≥ N := sorry", "formal_proof": null, "informal_stmt": null, "informal_proof": "The general strategy is to find a (large) number $n$ that is relatively prime to each of the existing list of such primes, and is also congruent to 2 modulo 3 . The prime factorization of $n$ cannot consist only of primes congruent to 1 modulo 3 , since the product of any number of such is still 1 modulo 3 . Hence there must be some prime factor of $n$ that is congruent to 2 modulo 3 , which must be not on our list by the construction of $n$. Now, how to construct such an $n$ ? Suppose the finite list is $\\left\\{p_1, p_2, \\ldots, p_k\\right\\}$. If $k$ is even, then take $n=p_1 p_2 \\cdots p_k+1$. If $k$ is odd, then take $n=\\left(p_1 p_2 \\cdots p_k\\right) p_k+1$."} -{"name": "Cambridge_Tripos_exercise_2022_IA_4_I_2D_a", "source": "Cambridge-Tripos.lean", "header": "import Mathlib\n\nopen Filter Set\n", "formal_statement": "theorem Cambridge_Tripos_exercise_2022_IA_4_I_2D_a : Irrational (2^((1:ℝ)/3) + 3^((1:ℝ)/3)) := sorry", "formal_proof": null, "informal_stmt": null, "informal_proof": "The general strategy is to find a (large) number $n$ that is relatively prime to each of the existing list of such primes, and is also congruent to 2 modulo 3 . The prime factorization of $n$ cannot consist only of primes congruent to 1 modulo 3 , since the product of any number of such is still 1 modulo 3 . Hence there must be some prime factor of $n$ that is congruent to 2 modulo 3 , which must be not on our list by the construction of $n$. Now, how to construct such an $n$ ? Suppose the finite list is $\\left\\{p_1, p_2, \\ldots, p_k\\right\\}$. If $k$ is even, then take $n=p_1 p_2 \\cdots p_k+1$. If $k$ is odd, then take $n=\\left(p_1 p_2 \\cdots p_k\\right) p_k+1$."} -{"name": "Cambridge_Tripos_exercise_2022_IB_3_II_13G_a_i", "source": "Cambridge-Tripos.lean", "header": "import Mathlib\n\nopen Filter Set\n", "formal_statement": "theorem Cambridge_Tripos_exercise_2022_IB_3_II_13G_a_i (U : Set ℂ) (hU : IsOpen U)\n (hU1 : Nonempty U) (hU2 : IsConnected U) (f : ℕ → ℂ → ℂ) (f' : ℂ → ℂ)\n (hf : ∀ n : ℕ, DifferentiableOn ℂ (f n) U)\n (hf1 : ∀ X ⊂ U, CompactSpace X →\n (TendstoUniformly (λ n => restrict X (f n)) (restrict X f') atTop)) :\n DifferentiableOn ℂ f' U := sorry", "formal_proof": null, "informal_stmt": null, "informal_proof": "The general strategy is to find a (large) number $n$ that is relatively prime to each of the existing list of such primes, and is also congruent to 2 modulo 3 . The prime factorization of $n$ cannot consist only of primes congruent to 1 modulo 3 , since the product of any number of such is still 1 modulo 3 . Hence there must be some prime factor of $n$ that is congruent to 2 modulo 3 , which must be not on our list by the construction of $n$. Now, how to construct such an $n$ ? Suppose the finite list is $\\left\\{p_1, p_2, \\ldots, p_k\\right\\}$. If $k$ is even, then take $n=p_1 p_2 \\cdots p_k+1$. If $k$ is odd, then take $n=\\left(p_1 p_2 \\cdots p_k\\right) p_k+1$."} diff --git a/script/build_proofnet_jsonl.py b/script/build_proofnet_jsonl.py index 2847fca..c0b35de 100644 --- a/script/build_proofnet_jsonl.py +++ b/script/build_proofnet_jsonl.py @@ -131,10 +131,11 @@ def main(): outp.write('\n') # log missing informal - log_file = os.path.join(base, 'script', 'missing_informal.log') - with open(log_file, 'w', encoding='utf-8') as lf: - for nm in sorted(set(log_missing)): - lf.write(f"{nm}\n") + log_file = os.path.join(base, 'missing_informal.log') + if log_missing: + with open(log_file, 'w', encoding='utf-8') as lf: + for nm in sorted(set(log_missing)): + lf.write(f"{nm}\n") print(f"Generated {output_file}, logged {len(set(log_missing))} missing informal entries to {log_file}") if __name__ == '__main__':