File size: 279,916 Bytes
d83e82d 265528f d83e82d 83dc2ba d83e82d 265528f 83dc2ba 265528f 83dc2ba 265528f d83e82d 83dc2ba d83e82d 265528f d83e82d 265528f | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 | {"id": "Rudin|exercise_1_1b", "formal_statement": "theorem exercise_1_1b\n(x : \u211d)\n(y : \u211a)\n(h : y \u2260 0)\n: ( irrational x ) -> irrational ( x * y ) :=", "src_header": "import .common\n\nopen real complex\nopen topological_space\nopen filter\nopen_locale real \nopen_locale topology\nopen_locale big_operators\nopen_locale complex_conjugate\nopen_locale filter\n\n\nnoncomputable theory\n\n", "nl_statement": "If $r$ is rational $(r \\neq 0)$ and $x$ is irrational, prove that $rx$ is irrational.", "nl_proof": "\\begin{proof}\n\n If $r x$ were rational, then $x=\\frac{r x}{r}$ would also be rational.\n\n\\end{proof}"}
{"id": "Rudin|exercise_1_4", "formal_statement": "theorem exercise_1_4\n(\u03b1 : Type*) [partial_order \u03b1]\n(s : set \u03b1)\n(x y : \u03b1)\n(h\u2080 : set.nonempty s)\n(h\u2081 : x \u2208 lower_bounds s)\n(h\u2082 : y \u2208 upper_bounds s)\n: x \u2264 y :=", "src_header": "import .common\n\nopen real complex\nopen topological_space\nopen filter\nopen_locale real \nopen_locale topology\nopen_locale big_operators\nopen_locale complex_conjugate\nopen_locale filter\n\n\nnoncomputable theory\n\n", "nl_statement": "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$.", "nl_proof": "\\begin{proof}\n\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\n\\end{proof}"}
{"id": "Rudin|exercise_1_8", "formal_statement": "theorem exercise_1_8 : \u00ac \u2203 (r : \u2102 \u2192 \u2102 \u2192 Prop), is_linear_order \u2102 r :=", "src_header": "import .common\n\nopen real complex\nopen topological_space\nopen filter\nopen_locale real \nopen_locale topology\nopen_locale big_operators\nopen_locale complex_conjugate\nopen_locale filter\n\n\nnoncomputable theory\n\n", "nl_statement": "Prove that no order can be defined in the complex field that turns it into an ordered field.", "nl_proof": "\\begin{proof}\n\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\n\\end{proof}"}
{"id": "Rudin|exercise_1_12", "formal_statement": "theorem exercise_1_12 (n : \u2115) (f : \u2115 \u2192 \u2102) : \n abs (\u2211 i in finset.range n, f i) \u2264 \u2211 i in finset.range n, abs (f i) :=", "src_header": "import .common\n\nopen real complex\nopen topological_space\nopen filter\nopen_locale real \nopen_locale topology\nopen_locale big_operators\nopen_locale complex_conjugate\nopen_locale filter\n\n\nnoncomputable theory\n\n", "nl_statement": "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|$.", "nl_proof": "\\begin{proof}\n\n We can apply the case $n=2$ and induction on $n$ to get\n\n$$\n\n\\begin{aligned}\n\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\n& \\leq\\left|z_1+z_2+\\cdots+z_{n-1}\\right|+\\left|z_n\\right| \\\\\n\n& \\leq\\left|z_1\\right|+\\left|z_2\\right|+\\cdots+\\left|z_{n-1}\\right|+\\left|z_n\\right|\n\n\\end{aligned}\n\n$$\n\n\\end{proof}"}
{"id": "Rudin|exercise_1_14", "formal_statement": "theorem exercise_1_14\n (z : \u2102) (h : abs z = 1)\n : (abs (1 + z)) ^ 2 + (abs (1 - z)) ^ 2 = 4 :=", "src_header": "import .common\n\nopen real complex\nopen topological_space\nopen filter\nopen_locale real \nopen_locale topology\nopen_locale big_operators\nopen_locale complex_conjugate\nopen_locale filter\n\n\nnoncomputable theory\n\n", "nl_statement": "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}$.", "nl_proof": "\\begin{proof}\n\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$$\n\n|1+z|^2+|1-z|^2=4 \\text {. }\n\n$$\n\n\\end{proof}"}
{"id": "Rudin|exercise_1_17", "formal_statement": "theorem exercise_1_17\n (n : \u2115)\n (x y : euclidean_space \u211d (fin n)) -- R^n\n : \u2016x + y\u2016^2 + \u2016x - y\u2016^2 = 2*\u2016x\u2016^2 + 2*\u2016y\u2016^2 :=", "src_header": "import .common\n\nopen real complex\nopen topological_space\nopen filter\nopen_locale real \nopen_locale topology\nopen_locale big_operators\nopen_locale complex_conjugate\nopen_locale filter\n\n\nnoncomputable theory\n\n", "nl_statement": "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}$.", "nl_proof": "\\begin{proof}\n\n The proof is a routine computation, using the relation\n\n$$\n\n|x \\pm y|^2=(x \\pm y) \\cdot(x \\pm y)=|x|^2 \\pm 2 x \\cdot y+|y|^2 .\n\n$$\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\n\\end{proof}"}
{"id": "Rudin|exercise_1_18b", "formal_statement": "theorem exercise_1_18b\n : \u00ac \u2200 (x : \u211d), \u2203 (y : \u211d), y \u2260 0 \u2227 x * y = 0 :=", "src_header": "import .common\n\nopen real complex\nopen topological_space\nopen filter\nopen_locale real \nopen_locale topology\nopen_locale big_operators\nopen_locale complex_conjugate\nopen_locale filter\n\n\nnoncomputable theory\n\n", "nl_statement": "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$", "nl_proof": "\\begin{proof}\n\n Not true when $k=1$, since the product of two nonzero real numbers is nonzero.\n\n\\end{proof}"}
{"id": "Rudin|exercise_2_19a", "formal_statement": "theorem exercise_2_19a {X : Type*} [metric_space X]\n (A B : set X) (hA : is_closed A) (hB : is_closed B) (hAB : disjoint A B) :\n separated_nhds A B :=", "src_header": "import .common\n\nopen real complex\nopen topological_space\nopen filter\nopen_locale real \nopen_locale topology\nopen_locale big_operators\nopen_locale complex_conjugate\nopen_locale filter\n\n\nnoncomputable theory\n\n", "nl_statement": "If $A$ and $B$ are disjoint closed sets in some metric space $X$, prove that they are separated.", "nl_proof": "\\begin{proof}\n\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\n\\end{proof}"}
{"id": "Rudin|exercise_2_25", "formal_statement": "theorem exercise_2_25 {K : Type*} [metric_space K] [compact_space K] :\n \u2203 (B : set (set K)), set.countable B \u2227 is_topological_basis B :=", "src_header": "import .common\n\nopen real complex\nopen topological_space\nopen filter\nopen_locale real \nopen_locale topology\nopen_locale big_operators\nopen_locale complex_conjugate\nopen_locale filter\n\n\nnoncomputable theory\n\n", "nl_statement": "Prove that every compact metric space $K$ has a countable base.", "nl_proof": "\\begin{proof}\n\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\n\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\n\\end{proof}"}
{"id": "Rudin|exercise_2_27b", "formal_statement": "theorem exercise_2_27b (k : \u2115) (E P : set (euclidean_space \u211d (fin k)))\n (hE : E.nonempty \u2227 \u00ac set.countable E)\n (hP : P = {x | \u2200 U \u2208 \ud835\udcdd x, (P \u2229 E).nonempty \u2227 \u00ac set.countable (P \u2229 E)}) :\n set.countable (E \\ P) :=", "src_header": "import .common\n\nopen real complex\nopen topological_space\nopen filter\nopen_locale real \nopen_locale topology\nopen_locale big_operators\nopen_locale complex_conjugate\nopen_locale filter\n\n\nnoncomputable theory\n\n", "nl_statement": "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$.", "nl_proof": "\\begin{proof}\n\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$.\n\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$.\n\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\n\\end{proof}"}
{"id": "Rudin|exercise_2_29", "formal_statement": "theorem exercise_2_29 (U : set \u211d) (hU : is_open U) :\n \u2203 (f : \u2115 \u2192 set \u211d), (\u2200 n, \u2203 a b : \u211d, f n = {x | a < x \u2227 x < b}) \u2227 (\u2200 n, f n \u2286 U) \u2227\n (\u2200 n m, n \u2260 m \u2192 f n \u2229 f m = \u2205) \u2227\n U = \u22c3 n, f n :=", "src_header": "import .common\n\nopen real complex\nopen topological_space\nopen filter\nopen_locale real \nopen_locale topology\nopen_locale big_operators\nopen_locale complex_conjugate\nopen_locale filter\n\n\nnoncomputable theory\n\n", "nl_statement": "Prove that every open set in $\\mathbb{R}$ is the union of an at most countable collection of disjoint segments.", "nl_proof": "\\begin{proof}\n\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$$\n\n\\min (x, z) \\geq \\min (\\min (x, y), \\min (y, z))\n\n$$\n\nand\n\n$$\n\n\\max (x, z) \\leq \\max (\\max (x, y), \\max (y, z))\n\n$$\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\n\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 $a<z<b$, there exists $c \\in A$ with $c<z$ and $d \\in B$ with $d>z$. 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 $z<a$. If $z$ were equivalent to $x$, then $[z, x]$ would be contained in $O$, and so we would have $z \\in A$. Hence $a$ would not be a lower bound for $A$. Similarly if $z>b$ and $z \\sim x$, then $b$ could not be an upper bound for $B$.\n\n\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\n\\end{proof}"}
{"id": "Rudin|exercise_3_2a", "formal_statement": "theorem exercise_3_2a\n : tendsto (\u03bb (n : \u211d), (sqrt (n^2 + n) - n)) at_top (\ud835\udcdd (1/2)) :=", "src_header": "import .common\n\nopen real complex\nopen topological_space\nopen filter\nopen_locale real \nopen_locale topology\nopen_locale big_operators\nopen_locale complex_conjugate\nopen_locale filter\n\n\nnoncomputable theory\n\n", "nl_statement": "Prove that $\\lim_{n \\rightarrow \\infty}\\sqrt{n^2 + n} -n = 1/2$.", "nl_proof": "\\begin{proof}\n\n Multiplying and dividing by $\\sqrt{n^2+n}+n$ yields\n\n$$\n\n\\sqrt{n^2+n}-n=\\frac{n}{\\sqrt{n^2+n}+n}=\\frac{1}{\\sqrt{1+\\frac{1}{n}}+1} .\n\n$$\n\nIt follows that the limit is $\\frac{1}{2}$.\n\n\\end{proof}"}
{"id": "Rudin|exercise_3_5", "formal_statement": "theorem exercise_3_5 -- TODO fix\n (a b : \u2115 \u2192 \u211d)\n (h : limsup a + limsup b \u2260 0) :\n limsup (\u03bb n, a n + b n) \u2264 limsup a + limsup b :=", "src_header": "import .common\n\nopen real complex\nopen topological_space\nopen filter\nopen_locale real \nopen_locale topology\nopen_locale big_operators\nopen_locale complex_conjugate\nopen_locale filter\n\n\nnoncomputable theory\n\n", "nl_statement": "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$.", "nl_proof": "\\begin{proof}\n\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\n\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$$\n\n\\lim _{m \\rightarrow \\infty} a_{n_{k_m}}=\\limsup _{k \\rightarrow \\infty} a_{n_k} .\n\n$$\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$$\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\n$$\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\n\\end{proof}"}
{"id": "Rudin|exercise_3_7", "formal_statement": "theorem exercise_3_7\n (a : \u2115 \u2192 \u211d)\n (h : \u2203 y, (tendsto (\u03bb n, (\u2211 i in (finset.range n), a i)) at_top (\ud835\udcdd y))) :\n \u2203 y, tendsto (\u03bb n, (\u2211 i in (finset.range n), sqrt (a i) / n)) at_top (\ud835\udcdd y) :=", "src_header": "import .common\n\nopen real complex\nopen topological_space\nopen filter\nopen_locale real \nopen_locale topology\nopen_locale big_operators\nopen_locale complex_conjugate\nopen_locale filter\n\n\nnoncomputable theory\n\n", "nl_statement": "Prove that the convergence of $\\Sigma a_{n}$ implies the convergence of $\\sum \\frac{\\sqrt{a_{n}}}{n}$ if $a_n\\geq 0$.", "nl_proof": "\\begin{proof}\n\n Since $\\left(\\sqrt{a_n}-\\frac{1}{n}\\right)^2 \\geq 0$, it follows that\n\n$$\n\n\\frac{\\sqrt{a_n}}{n} \\leq \\frac{1}{2}\\left(a_n^2+\\frac{1}{n^2}\\right) .\n\n$$\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<a_n\\right)$. Since $\\Sigma \\frac{1}{n^2}$ also converges ($p$ series, $p=2$ ), it follows that $\\Sigma \\frac{\\sqrt{a_n}}{n}$ converges.\n\n\\end{proof}"}
{"id": "Rudin|exercise_3_13", "formal_statement": "theorem exercise_3_13\n (a b : \u2115 \u2192 \u211d)\n (ha : \u2203 y, (tendsto (\u03bb n, (\u2211 i in (finset.range n), |a i|)) at_top (\ud835\udcdd y)))\n (hb : \u2203 y, (tendsto (\u03bb n, (\u2211 i in (finset.range n), |b i|)) at_top (\ud835\udcdd y))) :\n \u2203 y, (tendsto (\u03bb n, (\u2211 i in (finset.range n),\n \u03bb i, (\u2211 j in finset.range (i + 1), a j * b (i - j)))) at_top (\ud835\udcdd y)) :=", "src_header": "import .common\n\nopen real complex\nopen topological_space\nopen filter\nopen_locale real \nopen_locale topology\nopen_locale big_operators\nopen_locale complex_conjugate\nopen_locale filter\n\n\nnoncomputable theory\n\n", "nl_statement": "Prove that the Cauchy product of two absolutely convergent series converges absolutely.", "nl_proof": "\\begin{proof}\n\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$$\n\n\\begin{aligned}\n\nU_n &=\\sum_{k=0}^n \\sum_{l=0}^k a_l b_{k-l} \\\\\n\n&=\\sum_{k=0}^n \\sum_{l=0}^k a_l\\left(T_{k-l}-T_{k-l-1}\\right) \\\\\n\n&=\\sum_{k=0}^n \\sum_{j=0}^k a_{k-j}\\left(T_j-T_{j-1}\\right) \\\\\n\n&=\\sum_{k=0}^n \\sum_{j=0}^k\\left(a_{k-j}-a_{k-j-1}\\right) T_j \\\\\n\n&=\\sum_{j=0}^n \\sum_{k=j}^n\\left(a_{k-j}-a_{k-j-1}\\right) T_j\n\n&=\\sum_{j=0}^n a_{n-j} T_j \\\\\n\n&\\leq T \\sum_{m=0}^n a_m \\\\\n\n&=T S_n \\\\\n\n&\\leq S T .\n\n\\end{aligned}\n\n$$\n\nThus $U_n$ is bounded, and hence approaches a finite limit.\n\n\n\n\\end{proof}"}
{"id": "Rudin|exercise_3_21", "formal_statement": "theorem exercise_3_21\n {X : Type*} [metric_space X] [complete_space X]\n (E : \u2115 \u2192 set X)\n (hE : \u2200 n, E n \u2283 E (n + 1))\n (hE' : tendsto (\u03bb n, metric.diam (E n)) at_top (\ud835\udcdd 0)) :\n \u2203 a, set.Inter E = {a} :=", "src_header": "import .common\n\nopen real complex\nopen topological_space\nopen filter\nopen_locale real \nopen_locale topology\nopen_locale big_operators\nopen_locale complex_conjugate\nopen_locale filter\n\n\nnoncomputable theory\n\n", "nl_statement": "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.", "nl_proof": "\\begin{proof}\n\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\n\\end{proof}"}
{"id": "Rudin|exercise_4_1a", "formal_statement": "theorem exercise_4_1a\n : \u2203 (f : \u211d \u2192 \u211d), (\u2200 (x : \u211d), tendsto (\u03bb y, f(x + y) - f(x - y)) (\ud835\udcdd 0) (\ud835\udcdd 0)) \u2227 \u00ac continuous f :=", "src_header": "import .common\n\nopen real complex\nopen topological_space\nopen filter\nopen_locale real \nopen_locale topology\nopen_locale big_operators\nopen_locale complex_conjugate\nopen_locale filter\n\n\nnoncomputable theory\n\n", "nl_statement": "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.", "nl_proof": "\\begin{proof}\n\n $$\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$$\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\n\\end{proof}"}
{"id": "Rudin|exercise_4_3", "formal_statement": "theorem exercise_4_3\n {\u03b1 : Type} [metric_space \u03b1]\n (f : \u03b1 \u2192 \u211d) (h : continuous f) (z : set \u03b1) (g : z = f\u207b\u00b9' {0})\n : is_closed z :=", "src_header": "import .common\n\nopen real complex\nopen topological_space\nopen filter\nopen_locale real \nopen_locale topology\nopen_locale big_operators\nopen_locale complex_conjugate\nopen_locale filter\n\n\nnoncomputable theory\n\n", "nl_statement": "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.", "nl_proof": "\\begin{proof}\n\n $Z(f)=f^{-1}(\\{0\\})$, which is the inverse image of a closed set. Hence $Z(f)$ is closed.\n\n\\end{proof}"}
{"id": "Rudin|exercise_4_4b", "formal_statement": "theorem exercise_4_4b\n {\u03b1 : Type} [metric_space \u03b1]\n {\u03b2 : Type} [metric_space \u03b2]\n (f g : \u03b1 \u2192 \u03b2)\n (s : set \u03b1)\n (h\u2081 : continuous f)\n (h\u2082 : continuous g)\n (h\u2083 : dense s)\n (h\u2084 : \u2200 x \u2208 s, f x = g x)\n : f = g :=", "src_header": "import .common\n\nopen real complex\nopen topological_space\nopen filter\nopen_locale real \nopen_locale topology\nopen_locale big_operators\nopen_locale complex_conjugate\nopen_locale filter\n\n\nnoncomputable theory\n\n", "nl_statement": "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$.", "nl_proof": "\\begin{proof}\n\n The function $\\varphi: X \\rightarrow R^1$ given by\n\n$$\n\n\\varphi(p)=d_Y(f(p), g(p))\n\n$$\n\nis continuous, since\n\n$$\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$$\n\n(This inequality follows from the triangle inequality, since\n\n$$\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\n$$\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))$.)\n\nBy the previous problem, the zero set of $\\varphi$ is closed. But by definition\n\n$$\n\nZ(\\varphi)=\\{p: f(p)=g(p)\\} .\n\n$$\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\n\\end{proof}"}
{"id": "Rudin|exercise_4_5b", "formal_statement": "theorem exercise_4_5b\n : \u2203 (E : set \u211d) (f : \u211d \u2192 \u211d), (continuous_on f E) \u2227\n (\u00ac \u2203 (g : \u211d \u2192 \u211d), continuous g \u2227 \u2200 x \u2208 E, f x = g x) :=", "src_header": "import .common\n\nopen real complex\nopen topological_space\nopen filter\nopen_locale real \nopen_locale topology\nopen_locale big_operators\nopen_locale complex_conjugate\nopen_locale filter\n\n\nnoncomputable theory\n\n", "nl_statement": "Show that there exist a set $E \\subset \\mathbb{R}$ and a real continuous function $f$ defined on $E$, such that there does not exist a continuous real function $g$ on $\\mathbb{R}$ such that $g(x)=f(x)$ for all $x \\in E$.", "nl_proof": "\\begin{proof}\n\n Let $E:=(0,1)$, and define $f(x):=1 / x$ for all $x \\in E$. If $f$ has a continuous extension $g$ to $\\mathbb{R}$, then $g$ is continuous on $[-1,1]$, and therefore bounded by the intermediate value theorem. However, $f$ is not bounded in any neighborhood of $x=0$, so therefore $g$ is not bounded either, a contradiction.\n\n\\end{proof}"}
{"id": "Rudin|exercise_4_8a", "formal_statement": "theorem exercise_4_8a\n (E : set \u211d) (f : \u211d \u2192 \u211d) (hf : uniform_continuous_on f E)\n (hE : metric.bounded E) : metric.bounded (set.image f E) :=", "src_header": "import .common\n\nopen real complex\nopen topological_space\nopen filter\nopen_locale real \nopen_locale topology\nopen_locale big_operators\nopen_locale complex_conjugate\nopen_locale filter\n\n\nnoncomputable theory\n\n", "nl_statement": "Let $f$ be a real uniformly continuous function on the bounded set $E$ in $R^{1}$. Prove that $f$ is bounded on $E$.", "nl_proof": "\\begin{proof}\n\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)|<M$.\n\n\\end{proof}"}
{"id": "Rudin|exercise_4_11a", "formal_statement": "theorem exercise_4_11a\n {X : Type*} [metric_space X]\n {Y : Type*} [metric_space Y]\n (f : X \u2192 Y) (hf : uniform_continuous f)\n (x : \u2115 \u2192 X) (hx : cauchy_seq x) :\n cauchy_seq (\u03bb n, f (x n)) :=", "src_header": "import .common\n\nopen real complex\nopen topological_space\nopen filter\nopen_locale real \nopen_locale topology\nopen_locale big_operators\nopen_locale complex_conjugate\nopen_locale filter\n\n\nnoncomputable theory\n\n", "nl_statement": "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$.", "nl_proof": "\\begin{proof}\n\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\n\\end{proof}"}
{"id": "Rudin|exercise_4_15", "formal_statement": "theorem exercise_4_15 {f : \u211d \u2192 \u211d}\n (hf : continuous f) (hof : is_open_map f) :\n monotone f :=", "src_header": "import .common\n\nopen real complex\nopen topological_space\nopen filter\nopen_locale real \nopen_locale topology\nopen_locale big_operators\nopen_locale complex_conjugate\nopen_locale filter\n\n\nnoncomputable theory\n\n", "nl_statement": "Prove that every continuous open mapping of $R^{1}$ into $R^{1}$ is monotonic.", "nl_proof": "\\begin{proof}\n\n Suppose $f$ is continuous and not monotonic, say there exist points $a<b<c$ with $f(a)<f(b)$, and $f(c)<f(b)$. Then the maximum value of $f$ on the closed interval $[a, c]$ is assumed at a point $u$ in the open interval $(a, c)$. If there is also a point $v$ in the open interval $(a, c)$ where $f$ assumes its minimum value on $[a, c]$, then $f(a, c)=[f(v), f(u)]$. If no such point $v$ exists, then $f(a, c)=(d, f(u)]$, where $d=\\min (f(a), f(c))$. In either case, the image of $(a, c)$ is not open.\n\n\\end{proof}"}
{"id": "Rudin|exercise_4_21a", "formal_statement": "theorem exercise_4_21a {X : Type*} [metric_space X]\n (K F : set X) (hK : is_compact K) (hF : is_closed F) (hKF : disjoint K F) :\n \u2203 (\u03b4 : \u211d), \u03b4 > 0 \u2227 \u2200 (p q : X), p \u2208 K \u2192 q \u2208 F \u2192 dist p q \u2265 \u03b4 :=", "src_header": "import .common\n\nopen real complex\nopen topological_space\nopen filter\nopen_locale real \nopen_locale topology\nopen_locale big_operators\nopen_locale complex_conjugate\nopen_locale filter\n\n\nnoncomputable theory\n\n", "nl_statement": "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$.", "nl_proof": "\\begin{proof}\n\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$$\n\n\\rho_F(r)=\\min _{q \\in K} \\rho_F(q) .\n\n$$\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\n$$\n\nd(p, q) \\geq \\rho_F(q) \\geq \\rho_F(r)>\\delta .\n\n$$\n\nThis proves the positive assertion.\n\n\\end{proof}"}
{"id": "Rudin|exercise_5_1", "formal_statement": "theorem exercise_5_1\n {f : \u211d \u2192 \u211d} (hf : \u2200 x y : \u211d, | (f x - f y) | \u2264 (x - y) ^ 2) :\n \u2203 c, f = \u03bb x, c :=", "src_header": "import .common\n\nopen real complex\nopen topological_space\nopen filter\nopen_locale real \nopen_locale topology\nopen_locale big_operators\nopen_locale complex_conjugate\nopen_locale filter\n\n\nnoncomputable theory\n\n", "nl_statement": "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.", "nl_proof": "\\begin{proof}\n\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\n\\end{proof}"}
{"id": "Rudin|exercise_5_3", "formal_statement": "theorem exercise_5_3 {g : \u211d \u2192 \u211d} (hg : continuous g)\n (hg' : \u2203 M : \u211d, \u2200 x : \u211d, | deriv g x | \u2264 M) :\n \u2203 N, \u2200 \u03b5 > 0, \u03b5 < N \u2192 function.injective (\u03bb x : \u211d, x + \u03b5 * g x) :=", "src_header": "import .common\n\nopen real complex\nopen topological_space\nopen filter\nopen_locale real \nopen_locale topology\nopen_locale big_operators\nopen_locale complex_conjugate\nopen_locale filter\n\n\nnoncomputable theory\n\n", "nl_statement": "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.", "nl_proof": "\\begin{proof}\n\n If $0<\\varepsilon<\\frac{1}{M}$, we certainly have\n\n$$\n\nf^{\\prime}(x) \\geq 1-\\varepsilon M>0,\n\n$$\n\nand this implies that $f(x)$ is one-to-one, by the preceding problem.\n\n\\end{proof}"}
{"id": "Rudin|exercise_5_5", "formal_statement": "theorem exercise_5_5\n {f : \u211d \u2192 \u211d}\n (hfd : differentiable \u211d f)\n (hf : tendsto (deriv f) at_top (\ud835\udcdd 0)) :\n tendsto (\u03bb x, f (x + 1) - f x) at_top at_top :=", "src_header": "import .common\n\nopen real complex\nopen topological_space\nopen filter\nopen_locale real \nopen_locale topology\nopen_locale big_operators\nopen_locale complex_conjugate\nopen_locale filter\n\n\nnoncomputable theory\n\n", "nl_statement": "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$.", "nl_proof": "\\begin{proof}\n\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\n$$\n\nf(x+1)-f(x)=f^{\\prime}\\left(x_1\\right) .\n\n$$\n\nSince $\\left|f^{\\prime}\\left(x_1\\right)\\right|<\\varepsilon$, it follows that $|f(x+1)-f(x)|<\\varepsilon$, as required.\n\n\\end{proof}"}
{"id": "Rudin|exercise_5_7", "formal_statement": "theorem exercise_5_7\n {f g : \u211d \u2192 \u211d} {x : \u211d}\n (hf' : differentiable_at \u211d f 0)\n (hg' : differentiable_at \u211d g 0)\n (hg'_ne_0 : deriv g 0 \u2260 0)\n (f0 : f 0 = 0) (g0 : g 0 = 0) :\n tendsto (\u03bb x, f x / g x) (\ud835\udcdd x) (\ud835\udcdd (deriv f x / deriv g x)) :=", "src_header": "import .common\n\nopen real complex\nopen topological_space\nopen filter\nopen_locale real \nopen_locale topology\nopen_locale big_operators\nopen_locale complex_conjugate\nopen_locale filter\n\n\nnoncomputable theory\n\n", "nl_statement": "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)}.$", "nl_proof": "\\begin{proof}\n\n Since $f(x)=g(x)=0$, we have\n\n$$\n\n\\begin{aligned}\n\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\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\n&=\\frac{f^{\\prime}(x)}{g^{\\prime}(x)}\n\n\\end{aligned}\n\n$$\n\n\\end{proof}"}
{"id": "Rudin|exercise_5_17", "formal_statement": "theorem exercise_5_17\n {f : \u211d \u2192 \u211d}\n (hf' : differentiable_on \u211d f (set.Icc (-1) 1))\n (hf'' : differentiable_on \u211d (deriv f) (set.Icc 1 1))\n (hf''' : differentiable_on \u211d (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 \u2203 x, x \u2208 set.Ioo (-1 : \u211d) 1 \u2227 deriv (deriv (deriv f)) x \u2265 3 :=", "src_header": "import .common\n\nopen real complex\nopen topological_space\nopen filter\nopen_locale real \nopen_locale topology\nopen_locale big_operators\nopen_locale complex_conjugate\nopen_locale filter\n\n\nnoncomputable theory\n\n", "nl_statement": "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)$.", "nl_proof": "\\begin{proof}\n\n Following the hint, we observe that Theorem $5.15$ (Taylor's formula with remainder) implies that\n\n$$\n\n\\begin{aligned}\n\nf(1) &=f(0)+f^{\\prime}(0)+\\frac{1}{2} f^{\\prime \\prime}(0)+\\frac{1}{6} f^{(3)}(s) \\\\\n\nf(-1) &=f(0)-f^{\\prime}(0)+\\frac{1}{2} f^{\\prime \\prime}(0)-\\frac{1}{6} f^{(3)}(t)\n\n\\end{aligned}\n\n$$\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\n$$\n\n1=\\frac{1}{6}\\left(f^{(3)}(s)+f^{(3)}(t)\\right),\n\n$$\n\nwhich is the desired result. Note that we made no use of the hypothesis $f(0)=0$.\n\n\\end{proof}"}
{"id": "Munkres|exercise_13_3b", "formal_statement": "theorem exercise_13_3b : \u00ac \u2200 X : Type, \u2200s : set (set X),\n (\u2200 t : set X, t \u2208 s \u2192 (set.infinite t\u1d9c \u2228 t = \u2205 \u2228 t = \u22a4)) \u2192 \n (set.infinite (\u22c3\u2080 s)\u1d9c \u2228 (\u22c3\u2080 s) = \u2205 \u2228 (\u22c3\u2080 s) = \u22a4) :=", "src_header": "import .common \n\nopen set topological_space filter \nopen_locale classical topology filter \nnoncomputable theory \n\n", "nl_statement": "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$.", "nl_proof": "\\begin{proof}\n\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\n\\end{proof}"}
{"id": "Munkres|exercise_13_4a2", "formal_statement": "theorem exercise_13_4a2 :\n \u2203 (X I : Type*) (T : I \u2192 set (set X)),\n (\u2200 i, is_topology X (T i)) \u2227 \u00ac is_topology X (\u22c2 i : I, T i) :=", "src_header": "import .common \n\nopen set topological_space filter \nopen_locale classical topology filter \nnoncomputable theory \n\n", "nl_statement": "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$.", "nl_proof": "\\begin{proof}\n\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\n\\end{proof}"}
{"id": "Munkres|exercise_13_4b2", "formal_statement": "theorem exercise_13_4b2 (X I : Type*) (T : I \u2192 set (set X)) (h : \u2200 i, is_topology X (T i)) :\n \u2203! T', is_topology X T' \u2227 (\u2200 i, T' \u2286 T i) \u2227\n \u2200 T'', is_topology X T'' \u2192 (\u2200 i, T'' \u2286 T i) \u2192 T' \u2286 T'' :=", "src_header": "import .common \n\nopen set topological_space filter \nopen_locale classical topology filter \nnoncomputable theory \n\n", "nl_statement": "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$.", "nl_proof": "\\begin{proof}\n\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\n\\end{proof}"}
{"id": "Munkres|exercise_13_5b", "formal_statement": "theorem exercise_13_5b {X : Type*}\n [t : topological_space X] (A : set (set X)) (hA : t = generate_from A) :\n generate_from A = generate_from (sInter {T | is_topology X T \u2227 A \u2286 T}) :=", "src_header": "import .common \n\nopen set topological_space filter \nopen_locale classical topology filter \nnoncomputable theory \n\n", "nl_statement": "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}$.", "nl_proof": "\\begin{proof}\n\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\n\\end{proof}"}
{"id": "Munkres|exercise_13_8a", "formal_statement": "theorem exercise_13_8a :\n topological_space.is_topological_basis {S : set \u211d | \u2203 a b : \u211a, a < b \u2227 S = Ioo a b} :=", "src_header": "import .common \n\nopen set topological_space filter \nopen_locale classical topology filter \nnoncomputable theory \n\n", "nl_statement": "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}$.", "nl_proof": "\\begin{proof}\n\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\n\\end{proof}"}
{"id": "Munkres|exercise_16_1", "formal_statement": "theorem exercise_16_1 {X : Type*} [topological_space X]\n (Y : set X)\n (A : set Y) :\n \u2200 U : set A, is_open U \u2194 is_open (subtype.val '' U) :=", "src_header": "import .common \n\nopen set topological_space filter \nopen_locale classical topology filter \nnoncomputable theory \n\n", "nl_statement": "Show that if $Y$ is a subspace of $X$, and $A$ is a subset of $Y$, then the topology $A$ inherits as a subspace of $Y$ is the same as the topology it inherits as a subspace of $X$.", "nl_proof": "\\begin{proof}\n\n Exercise 16.1. Let $\\mathcal{T}$ be the topology $A$ inherits as a subspace of $Y$, and $\\mathcal{O}$ be the topology it inherits as a subspace of $X$. A (standard) basis element for $\\mathcal{T}$ has the form $U \\cap A$ where $U$ is open in $Y$, so is of the form $(Y \\cap V) \\cap A=V \\cap A$ where $V$ is open in $X$. Therefore every basis element for $\\mathcal{T}$ is also a basis element for $\\mathcal{O}$. Conversely, a (standard) basis element for $\\mathcal{O}$ have the form $W \\cap A=W \\cap Y \\cap A$ where $W$ is open in $X$. Since $W \\cap Y$ is open in $Y$, this is a basis element for $\\mathcal{T}$, so every basis element for $\\mathcal{O}$ is a basis element for $\\mathcal{T}$. It follows that $\\mathcal{T}=\\mathcal{O}$.\n\n\\end{proof}"}
{"id": "Munkres|exercise_16_6", "formal_statement": "theorem exercise_16_6\n (S : set (set (\u211d \u00d7 \u211d)))\n (hS : \u2200 s, s \u2208 S \u2192 \u2203 a b c d, (rational a \u2227 rational b \u2227 rational c \u2227 rational d\n \u2227 s = {x | \u2203 x\u2081 x\u2082, x = (x\u2081, x\u2082) \u2227 a < x\u2081 \u2227 x\u2081 < b \u2227 c < x\u2082 \u2227 x\u2082 < d})) :\n is_topological_basis S :=", "src_header": "import .common \n\nopen set topological_space filter \nopen_locale classical topology filter \nnoncomputable theory \n\n", "nl_statement": "Show that the countable collection \\[\\{(a, b) \\times (c, d) \\mid a < b \\text{ and } c < d, \\text{ and } a, b, c, d \\text{ are rational}\\}\\] is a basis for $\\mathbb{R}^2$.", "nl_proof": "\\begin{proof}\n\n We know that $\\mathcal{B}=\\{(a,b)|a<b, a \\text{ and } b \\text rational\\}$ is a basis for $\\mathcal{R}$, therefore the set we are concerned with in the above question is a basis for $\\mathcal{R}^2$. \n\n\\end{proof}"}
{"id": "Munkres|exercise_18_8a", "formal_statement": "theorem exercise_18_8a {X Y : Type*} [topological_space X] [topological_space Y]\n [linear_order Y] [order_topology Y] {f g : X \u2192 Y}\n (hf : continuous f) (hg : continuous g) :\n is_closed {x | f x \u2264 g x} :=", "src_header": "import .common \n\nopen set topological_space filter \nopen_locale classical topology filter \nnoncomputable theory \n\n", "nl_statement": "Let $Y$ be an ordered set in the order topology. Let $f, g: X \\rightarrow Y$ be continuous. Show that the set $\\{x \\mid f(x) \\leq g(x)\\}$ is closed in $X$.", "nl_proof": "\\begin{proof}\n\n We prove that $U=\\{x \\mid g(x)<f(x)\\}$ is open in $X$. Let $a \\in U$, so that $g(a)<f(a)$. If there is an element $c$ between $g(a)$ and $f(a)$, then $a \\in g^{-1}((-\\infty, c)) \\cap f^{-1}((c,+\\infty))$. If there are no elements between $g(a)$ and $f(a)$, then $a \\in g^{-1}\\left((-\\infty, f(a)) \\cap f^{-1}((g(a),+\\infty))\\right.$. Note that all these preimages are open since $f$ and $g$ are continuous. Thus $U=V \\cup W$, where\n\n$$\n\nV=\\bigcup_{c \\in X} g^{-1}((-\\infty, c)) \\cap f^{-1}((c,+\\infty)) \\quad \\text { and } \\quad W=\\bigcup_{\\substack{g(a)<f(a) \\\\(g(a), f(a))=\\emptyset}} g^{-1}\\left((-\\infty, f(a)) \\cap f^{-1}((g(a),+\\infty))\\right.\n\n$$\n\nare open in $X$. So $U$ is open in $X$ and therefore $X \\backslash U=\\{x \\mid f(x) \\leq g(x)\\}$ is closed in $X$.\n\n\\end{proof}"}
{"id": "Munkres|exercise_18_13", "formal_statement": "theorem exercise_18_13\n {X : Type*} [topological_space X] {Y : Type*} [topological_space Y]\n [t2_space Y] {A : set X} {f : A \u2192 Y} (hf : continuous f)\n (g : closure A \u2192 Y)\n (g_con : continuous g) :\n \u2200 (g' : closure A \u2192 Y), continuous g' \u2192 (\u2200 (x : closure A), g x = g' x) :=", "src_header": "import .common \n\nopen set topological_space filter \nopen_locale classical topology filter \nnoncomputable theory \n\n", "nl_statement": "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$.", "nl_proof": "\\begin{proof}\n\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\n\\end{proof}"}
{"id": "Munkres|exercise_20_2", "formal_statement": "theorem exercise_20_2\n [topological_space (\u211d \u00d7\u2097 \u211d)] [order_topology (\u211d \u00d7\u2097 \u211d)]\n : metrizable_space (\u211d \u00d7\u2097 \u211d) :=", "src_header": "import .common \n\nopen set topological_space filter \nopen_locale classical topology filter \nnoncomputable theory \n\n", "nl_statement": "Show that $\\mathbb{R} \\times \\mathbb{R}$ in the dictionary order topology is metrizable.", "nl_proof": "\\begin{proof}\n\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.\n\nSo let $X$ and $Y$ be metrisable spaces, with metrics $d$ and $d^{\\prime}$ respectively. On $X \\times Y$, define\n\n$$\n\n\\rho(x \\times y, w \\times z)=\\max \\left\\{d(x, w), d^{\\prime}(y, z)\\right\\} .\n\n$$\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\n\\end{proof}"}
{"id": "Munkres|exercise_21_6b", "formal_statement": "theorem exercise_21_6b\n (f : \u2115 \u2192 I \u2192 \u211d )\n (h : \u2200 x n, f n x = x ^ n) :\n \u00ac \u2203 f\u2080, tendsto_uniformly f f\u2080 at_top :=", "src_header": "import .common \n\nopen set topological_space filter \nopen_locale classical topology filter \nnoncomputable theory \n\n", "nl_statement": "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.", "nl_proof": "\\begin{proof}\n\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\n\\end{proof}"}
{"id": "Munkres|exercise_22_2a", "formal_statement": "theorem exercise_22_2a {X Y : Type*} [topological_space X]\n [topological_space Y] (p : X \u2192 Y) (h : continuous p) :\n quotient_map p \u2194 \u2203 (f : Y \u2192 X), continuous f \u2227 p \u2218 f = id :=", "src_header": "import .common \n\nopen set topological_space filter \nopen_locale classical topology filter \nnoncomputable theory \n\n", "nl_statement": "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.", "nl_proof": "\\begin{proof}\n\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\n\\end{proof}"}
{"id": "Munkres|exercise_22_5", "formal_statement": "theorem exercise_22_5 {X Y : Type*} [topological_space X]\n [topological_space Y] (p : X \u2192 Y) (hp : is_open_map p)\n (A : set X) (hA : is_open A) : is_open_map (p \u2218 subtype.val : A \u2192 Y) :=", "src_header": "import .common \n\nopen set topological_space filter \nopen_locale classical topology filter \nnoncomputable theory \n\n", "nl_statement": "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.", "nl_proof": "\\begin{proof}\n\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\n\\end{proof}"}
{"id": "Munkres|exercise_23_3", "formal_statement": "theorem exercise_23_3 {X : Type*} [topological_space X]\n [topological_space X] {A : \u2115 \u2192 set X}\n (hAn : \u2200 n, is_connected (A n))\n (A\u2080 : set X)\n (hA : is_connected A\u2080)\n (h : \u2200 n, A\u2080 \u2229 A n \u2260 \u2205) :\n is_connected (A\u2080 \u222a (\u22c3 n, A n)) :=", "src_header": "import .common \n\nopen set topological_space filter \nopen_locale classical topology filter \nnoncomputable theory \n\n", "nl_statement": "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.", "nl_proof": "\\begin{proof}\n\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\n\\end{proof}"}
{"id": "Munkres|exercise_23_6", "formal_statement": "theorem exercise_23_6 {X : Type*}\n [topological_space X] {A C : set X} (hc : is_connected C)\n (hCA : C \u2229 A \u2260 \u2205) (hCXA : C \u2229 A\u1d9c \u2260 \u2205) :\n C \u2229 (frontier A) \u2260 \u2205 :=", "src_header": "import .common \n\nopen set topological_space filter \nopen_locale classical topology filter \nnoncomputable theory \n\n", "nl_statement": "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$.", "nl_proof": "\\begin{proof}\n\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\n\\end{proof}"}
{"id": "Munkres|exercise_23_11", "formal_statement": "theorem exercise_23_11 {X Y : Type*} [topological_space X] [topological_space Y]\n (p : X \u2192 Y) (hq : quotient_map p)\n (hY : connected_space Y) (hX : \u2200 y : Y, is_connected (p \u207b\u00b9' {y})) :\n connected_space X :=", "src_header": "import .common \n\nopen set topological_space filter \nopen_locale classical topology filter \nnoncomputable theory \n\n", "nl_statement": "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.", "nl_proof": "\\begin{proof}\n\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\n\\end{proof}"}
{"id": "Munkres|exercise_24_3a", "formal_statement": "theorem exercise_24_3a [topological_space I] [compact_space I]\n (f : I \u2192 I) (hf : continuous f) :\n \u2203 (x : I), f x = x :=", "src_header": "import .common \n\nopen set topological_space filter \nopen_locale classical topology filter \nnoncomputable theory \n\n", "nl_statement": "Let $f \\colon X \\rightarrow X$ be continuous. Show that if $X = [0, 1]$, there is a point $x$ such that $f(x) = x$. (The point $x$ is called a fixed point of $f$.)", "nl_proof": "\\begin{proof}\n\n If $f(0)=0$ or $f(1)=1$ we are done, so suppose $f(0)>0$ 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)<0<g(0)$, by the intermediate value theorem there exists $x \\in(0,1)$ such that $g(x)=0$, that is, such that $f(x)=x$.\n\n\\end{proof}"}
{"id": "Munkres|exercise_25_9", "formal_statement": "theorem exercise_25_9 {G : Type*} [topological_space G] [group G]\n [topological_group G] (C : set G) (h : C = connected_component 1) :\n is_normal_subgroup C :=", "src_header": "import .common \n\nopen set topological_space filter \nopen_locale classical topology filter \nnoncomputable theory \n\n", "nl_statement": "Let $G$ be a topological group; let $C$ be the component of $G$ containing the identity element $e$. Show that $C$ is a normal subgroup of $G$.", "nl_proof": "\\begin{proof}\n\n Given $x \\in G$, the maps $y \\mapsto x y$ and $y \\mapsto y x$ are homeomorphisms of $G$ onto itself. Since $C$ is a component, $x C$ and $C x$ are both components that contain $x$, so they are equal. Hence $x C=C x$ for all $x \\in G$, so $C$ is a normal subgroup of $G$.\n\n\\end{proof}"}
{"id": "Munkres|exercise_26_12", "formal_statement": "theorem exercise_26_12 {X Y : Type*} [topological_space X] [topological_space Y]\n (p : X \u2192 Y) (h : function.surjective p) (hc : continuous p) (hp : \u2200 y, is_compact (p \u207b\u00b9' {y}))\n (hY : compact_space Y) : compact_space X :=", "src_header": "import .common \n\nopen set topological_space filter \nopen_locale classical topology filter \nnoncomputable theory \n\n", "nl_statement": "Let $p: X \\rightarrow Y$ be a closed continuous surjective map such that $p^{-1}(\\{y\\})$ is compact, for each $y \\in Y$. (Such a map is called a perfect map.) Show that if $Y$ is compact, then $X$ is compact.", "nl_proof": "\\begin{proof}\n\n We first show that if $U$ is an open set containing $p^{-1}(\\{y\\})$, then there is a neighbourhood $W$ of $y$ such that $p^{-1}(W)$ is contained in $U$. Since $X-U$ is closed in $X$, $p(X-U)$ is closed in $Y$ and does not contain $y$, so $W=Y \\backslash p(X \\backslash U)$ is a neighbourhood of $y$. Moreover, since $X \\backslash U \\subset p^{-1}(p(X \\backslash U)$ ) (by elementary set theory), we have\n\n$$\n\np^{-1}(W)=p^{-1}(Y \\backslash p(X \\backslash U))=p^{-1}(Y) \\backslash p^{-1}(p(X \\backslash U)) \\subset X \\backslash(X \\backslash U)=U .\n\n$$\n\nNow let $\\mathcal{A}$ be an open covering of $X$. For each $y \\in Y$, let $\\mathcal{A}_y$ be a subcollection of $\\mathcal{A}$ such that\n\n$$\n\np^{-1}(\\{y\\}) \\subset \\bigcup_{A \\in \\mathcal{A}_y} A .\n\n$$\n\nSince $p^{-1}(\\{y\\})$ is compact, there exists a finite subcollection of $\\mathcal{A}_y$ that also covers $p^{-1}(\\{y\\})$, say $\\left\\{A_y^1, \\ldots, A_y^{n_y}\\right\\}$. Thus $\\bigcup_{i=1}^{n_y} A_y^i$ is open and contains $p^{-1}(\\{y\\})$, so there exists a neighbourhood $W_y$ of $y$ such that $p^{-1}\\left(W_y\\right)$ is contained in $\\bigcup_{i=1}^{n_y} A_y^i$. Then $\\left\\{W_y\\right\\}_{y \\in Y}$ is an open covering of $Y$, so there exist $y_1, \\ldots, y_k \\in Y$ such that $\\left\\{W_{y_j}\\right\\}_{j=1}^k$ also covers $Y$. Then\n\n$$\n\nX=p^{-1}(Y) \\subset p^{-1}\\left(\\bigcup_{j=1}^k W_{y_j}\\right)=\\bigcup_{j=1}^k p^{-1}\\left(W_{y_j}\\right) \\subset \\bigcup_{j=1}^k\\left(\\bigcup_{i=1}^{n_{y_j}} A_{y_j}^i\\right)\n\n$$\n\nso\n\n$$\n\n\\left\\{A_{y_j}^i\\right\\}_{\\substack{j=1, \\ldots, k . \\\\ i=1, \\ldots, n_{y_j}}}\n\n$$\n\nis a finite subcollection of $\\mathcal{A}$ that also covers $X$. Therefore, $X$ is compact.\n\n\\end{proof}"}
{"id": "Munkres|exercise_28_4", "formal_statement": "theorem exercise_28_4 {X : Type*}\n [topological_space X] (hT1 : t1_space X) :\n countably_compact X \u2194 limit_point_compact X :=", "src_header": "import .common \n\nopen set topological_space filter \nopen_locale classical topology filter \nnoncomputable theory \n\n", "nl_statement": "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.", "nl_proof": "\\begin{proof}\n\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\n\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\n$$\n\nV=\\left(V_1 \\cap \\cdots \\cap V_N\\right) \\cap\\left(U_1 \\cup \\cdots \\cup U_N\\right)\n\n$$\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\n\\end{proof}"}
{"id": "Munkres|exercise_28_6", "formal_statement": "theorem exercise_28_6 {X : Type*} [metric_space X]\n [compact_space X] {f : X \u2192 X} (hf : isometry f) :\n function.bijective f :=", "src_header": "import .common \n\nopen set topological_space filter \nopen_locale classical topology filter \nnoncomputable theory \n\n", "nl_statement": "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.", "nl_proof": "\\begin{proof}\n\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 $n<m$. If $n \\geq 1$, then $d\\left(x_n, x_m\\right)=$ $d\\left(f^{-1}\\left(x_n\\right), f^{-1}\\left(x_m\\right)\\right)=d\\left(x_{n-1}, x_{m-1}\\right)$. By induction it follows that $d\\left(x_n, x_m\\right)=d\\left(x_{n-i}, x_{m-i}\\right)$ for all $i \\geq 1$, and hence $d\\left(x_n, x_m\\right)=d\\left(a, x_{m-n}\\right)=d\\left(a, f\\left(x_{m-n-1}\\right)\\right)$. Since $f\\left(x_{m-n-1}\\right) \\in f(X)$ and $B(a, \\varepsilon) \\cap f(X)=\\emptyset$, we have $d\\left(x_n, x_m\\right) \\geq \\varepsilon$, as claimed. Thus $\\left\\{x_n\\right\\}_{n \\in \\mathbb{Z}_{+}}$is a sequence with no convergent subsequence, so $X$ is not sequentially compact. This contradicts the fact that $X$ is compact. Therefore $f$ is surjective and hence a homeomorphism.\n\n\\end{proof}"}
{"id": "Munkres|exercise_29_4", "formal_statement": "theorem exercise_29_4 [topological_space (\u2115 \u2192 I)] :\n \u00ac locally_compact_space (\u2115 \u2192 I) :=", "src_header": "import .common \n\nopen set topological_space filter \nopen_locale classical topology filter \nnoncomputable theory \n\n", "nl_statement": "Show that $[0, 1]^\\omega$ is not locally compact in the uniform topology.", "nl_proof": "\\begin{proof}\n\n Consider $\\mathbf{0} \\in[0,1]^\\omega$ and suppose that $[0,1]^\\omega$ is locally compact at $\\mathbf{0}$. Then there exists a compact $C$ containing an open ball $B=B_\\rho(\\mathbf{0}, \\varepsilon) \\subset[0,1]^\\omega$. Note that $\\bar{B}=[0, \\varepsilon]^\\omega$. Then $[0, \\varepsilon]^\\omega$ is closed and contained in the compact $C$, so it is compact. But $[0, \\varepsilon]^\\omega$ is homeomorphic to $[0,1]^\\omega$, which is not compact by Exercise 28.1. This contradiction proves that $[0,1]^\\omega$ is not locally compact in the uniform topology.\n\n\\end{proof}"}
{"id": "Munkres|exercise_30_10", "formal_statement": "theorem exercise_30_10\n {X : \u2115 \u2192 Type*} [\u2200 i, topological_space (X i)]\n (h : \u2200 i, \u2203 (s : set (X i)), countable s \u2227 dense s) :\n \u2203 (s : set (\u03a0 i, X i)), countable s \u2227 dense s :=", "src_header": "import .common \n\nopen set topological_space filter \nopen_locale classical topology filter \nnoncomputable theory \n\n", "nl_statement": "Show that if $X$ is a countable product of spaces having countable dense subsets, then $X$ has a countable dense subset.", "nl_proof": "\\begin{proof}\n\n Let $\\left(X_n\\right)$ be spaces having countable dense subsets $\\left(A_n\\right)$. For each $n$, fix an arbitrary $x_n \\in X_n$. Consider the subset $A$ of $X$ defined by\n\n$$\n\nA=\\bigcup\\left\\{\\prod U_n: U_n=A_n \\text { for finitely many } n \\text { and is }\\left\\{x_n\\right\\} \\text { otherwise }\\right\\} .\n\n$$\n\nThis set is countable because the set of finite subsets of $\\mathbb{N}$ is countable and each of the inner sets is countable. Now, let $x \\in X$ and $V=\\prod V_n$ be a basis element containing $x$ such that each $V_n$ is open in $X_n$ and $V_n=X_n$ for all but finitely many $n$. For each $n$, if $V_n \\neq X_n$, choose a $y_n \\in\\left(A_n \\cap V_n\\right)$ (such a $y_n$ exists since $A_n$ is dense in $\\left.X_n\\right)$. Otherwise, let $y_n=x_n$. Then $\\left(y_n\\right) \\in(A \\cap V)$, proving that $A$ is dense in $X$.\n\n\\end{proof}"}
{"id": "Munkres|exercise_31_1", "formal_statement": "theorem exercise_31_1 {X : Type*} [topological_space X]\n (hX : regular_space X) (x y : X) :\n \u2203 (U V : set X), is_open U \u2227 is_open V \u2227 x \u2208 U \u2227 y \u2208 V \u2227 closure U \u2229 closure V = \u2205 :=", "src_header": "import .common \n\nopen set topological_space filter \nopen_locale classical topology filter \nnoncomputable theory \n\n", "nl_statement": "Show that if $X$ is regular, every pair of points of $X$ have neighborhoods whose closures are disjoint.", "nl_proof": "\\begin{proof}\n\n Let $x, y \\in X$ be two points such that $x \\neq y$. Since $X$ is regular (and thus Hausdorff), there exist disjoint open sets $U, V \\subseteq X$ such that $x \\in U$ and $y \\in V$.\n\nNote that $y \\notin \\bar{U}$. Otherwise $V$ must intersect $U$ in a point different from $y$ since $V$ is an open neighborhood of $y$, which is a contradiction since $U$ and $V$ are disjoint.\n\nSince $X$ is regular and $\\bar{U}$ is closed, there exist disjoint open sets $U^{\\prime}, V^{\\prime} \\subseteq X$ such that $\\bar{U} \\subseteq U^{\\prime}$ and $y \\in V^{\\prime}$.\n\n\n\nAnd now $U$ and $V^{\\prime}$ are neighborhoods of $x$ and $y$ whose closures are disjoint. If $\\bar{U} \\cap \\overline{V^{\\prime}} \\neq \\emptyset$, then it follows that $U^{\\prime} \\supseteq U$ intersects $\\overline{V^{\\prime}}$. Since $U^{\\prime}$ is open, it follows that $U^{\\prime}$ intersects $V^{\\prime}$, which is a contradiction.\n\n\\end{proof}"}
{"id": "Munkres|exercise_31_3", "formal_statement": "theorem exercise_31_3 {\u03b1 : Type*} [partial_order \u03b1]\n [topological_space \u03b1] (h : order_topology \u03b1) : regular_space \u03b1 :=", "src_header": "import .common \n\nopen set topological_space filter \nopen_locale classical topology filter \nnoncomputable theory \n\n", "nl_statement": "Show that every order topology is regular.", "nl_proof": "\\begin{proof}\n\n Let $X$ be an ordered set.\n\nFirst we show that $X$ is a $T_1$-space. For $x \\in X$ we have that\n\n$$\n\nX \\backslash\\{x\\}=\\langle-\\infty, x\\rangle \\cup\\langle x,+\\infty\\rangle\n\n$$\n\nwhich is an open set as an union of two open intervals. Therefore, the set $\\{x\\}$ is closed.\n\nStep 2\n\n2 of 3\n\nNow to prove that $X$ is regular we use Lemma $\\mathbf{3 1 . 1 .}$\n\nLet $x \\in X$ be any point and $U \\subseteq X$ any open neighborhood of $x$. Then there exist $a, b \\in X$ such that $x \\in\\langle a, b\\rangle \\subseteq U$. Now we have four possibilities.\n\n1. If there exist $x_1, x_2 \\in U$ such that $a<x_1<x<x_2<b$, then\n\n$$\n\nx \\in\\left\\langle x_1, x_2\\right\\rangle \\subseteq \\overline{\\left\\langle x_1, x_2\\right\\rangle} \\subseteq\\left[x_1, x_2\\right] \\subseteq\\langle a, b\\rangle \\subseteq U\n\n$$\n\n2. If there exists $x_1 \\in U$ such that $a<x_1<x$, but there's no $x_2 \\in U$ such that $x<x_2<b$, then\n\n$$\n\nx \\in\\left\\langle x_1, b\\right\\rangle=\\left(x_1, x\\right] \\subseteq \\overline{\\left(x_1, x\\right]} \\subseteq\\left[x_1, x\\right] \\subseteq\\langle a, b\\rangle \\subseteq U\n\n$$\n\n3. If there exists $x_2 \\in U$ such that $x<x_2<b$, but there's no $x_1 \\in U$ such that $a<x_1<x$, then\n\n$$\n\nx \\in\\left\\langle a, x_2\\right\\rangle=\\left[x, x_2\\right) \\subseteq \\overline{\\left[x, x_2\\right)} \\subseteq\\left[x, x_2\\right] \\subseteq\\langle a, b\\rangle \\subseteq U\n\n$$\n\n4. If there's no $x_1 \\in U$ such that $a<x_1<x$ and no $x_2 \\in U$ such that $x<x_2<b$, then\n\n$$\n\nx \\in\\langle a, b\\rangle=\\{x\\}=\\overline{\\{x\\}}=\\{x\\} \\subseteq U\n\n$$\n\nWe have that $\\overline{\\{x\\}}=\\{x\\}$ because $X$ is a $T_1$-space.\n\nIn all four cases we proved that there exists an open interval $V$ such that $x \\in V \\subseteq \\bar{V} \\subseteq U$, so $X$ is regular.\n\n\\end{proof}"}
{"id": "Munkres|exercise_32_2a", "formal_statement": "theorem exercise_32_2a\n {\u03b9 : Type*} {X : \u03b9 \u2192 Type*} [\u2200 i, topological_space (X i)]\n (h : \u2200 i, nonempty (X i)) (h2 : t2_space (\u03a0 i, X i)) :\n \u2200 i, t2_space (X i) :=", "src_header": "import .common \n\nopen set topological_space filter \nopen_locale classical topology filter \nnoncomputable theory \n\n", "nl_statement": "Show that if $\\prod X_\\alpha$ is Hausdorff, then so is $X_\\alpha$. Assume that each $X_\\alpha$ is nonempty.", "nl_proof": "\\begin{proof}\n\n Suppose that $X=\\prod_\\beta X_\\beta$ is Hausdorff and let $\\alpha$ be any index.\n\nLet $x, y \\in X_\\alpha$ be any points such that $x \\neq y$. Since all $X_\\beta$ are nonempty, there exist points $\\mathbf{x}, \\mathbf{y} \\in X$ such that $x_\\beta=y_\\beta$ for every $\\beta \\neq \\alpha$ and $x_\\alpha=x, y_\\alpha=y$.\n\nSince $x \\neq y$, it follows that $\\mathbf{x} \\neq \\mathbf{y}$. Since $X$ is Hausdorff, there exist open disjoint sets $U, V \\subseteq X$ such that $\\mathbf{x} \\in U$ and $\\mathbf{y} \\in V$.\n\nFor $\\beta \\neq \\alpha$ we have that $x_\\beta=y_\\beta \\in \\pi_\\beta(U) \\cap \\pi_\\beta(V)$, hence $\\pi_\\beta(U)$ and $\\pi_\\beta(V)$ are not disjoint.\n\nSince $U$ and $V$ are disjoint, it follows that $\\pi_\\alpha(U) \\cap \\pi_\\alpha(V)=\\emptyset$.\n\nWe also have that $x \\in \\pi_\\alpha(U)$ and $y \\in \\pi_\\alpha(V)$ and since the projections are open maps, it follows that the sets $\\pi_\\alpha(U)$ and $\\pi_\\alpha(V)$ are open.\n\nThis proves that $x$ and $y$ can be separated by open sets, so $X_\\alpha$ is Hausdorff.\n\n\\end{proof}"}
{"id": "Munkres|exercise_32_2c", "formal_statement": "theorem exercise_32_2c\n {\u03b9 : Type*} {X : \u03b9 \u2192 Type*} [\u2200 i, topological_space (X i)]\n (h : \u2200 i, nonempty (X i)) (h2 : normal_space (\u03a0 i, X i)) :\n \u2200 i, normal_space (X i) :=", "src_header": "import .common \n\nopen set topological_space filter \nopen_locale classical topology filter \nnoncomputable theory \n\n", "nl_statement": "Show that if $\\prod X_\\alpha$ is normal, then so is $X_\\alpha$. Assume that each $X_\\alpha$ is nonempty.", "nl_proof": "\\begin{proof}\n\n Suppose that $X=\\prod_\\beta X_\\beta$ is normal and let $\\alpha$ be any index.\n\nSince $X$ is normal, it follows that $X$ is Hausdorff (or regular), which then implies that $X_\\alpha$ is Hausdorff (or regular). This imples that $X_\\alpha$ satisfies the $T_1$ axiom.\n\nNow the proof that $X_\\alpha$ satisfies the $T_4$ axiom is the same as for regular spaces.\n\nIf $F, G \\subseteq X_\\alpha$ are disjoint closed sets, then $\\prod_\\beta F_\\beta$ and $\\prod_\\beta G_\\beta$, where $F_\\alpha=F, G_\\alpha=G$ and $F_\\beta=G_\\beta=X_\\beta$ for $\\beta \\neq \\alpha$, are disjoint closed sets in $X$.\n\nSince $X$ is normal (and therefore satisfies the $T_4$ axiom), there exist disjoint open sets $U, V \\subseteq X$ such that $\\prod_\\beta F_\\beta \\subseteq U$ and $\\prod_\\beta G_\\beta \\subseteq V$\n\nThen $\\pi_\\alpha(U)$ and $\\pi_\\alpha(V)$ are disjoint open sets in $X_\\alpha$ such that $F \\subseteq \\pi_\\alpha(U)$ and $G \\subseteq \\pi_\\alpha(V)$.\n\n\\end{proof}"}
{"id": "Munkres|exercise_33_7", "formal_statement": "theorem exercise_33_7 {X : Type*} [topological_space X]\n (hX : locally_compact_space X) (hX' : t2_space X) :\n \u2200 x A, is_closed A \u2227 \u00ac x \u2208 A \u2192\n \u2203 (f : X \u2192 I), continuous f \u2227 f x = 1 \u2227 f '' A = {0}\n :=", "src_header": "import .common \n\nopen set topological_space filter \nopen_locale classical topology filter \nnoncomputable theory \n\n", "nl_statement": "Show that every locally compact Hausdorff space is completely regular.", "nl_proof": "\\begin{proof}\n\n $X$ is a subspace of a compact Hausdorff space $Y$, its one-point compactification. $Y$ is normal, and so by the Urysohn lemma $Y$ is completely regular. Therefore by corollary $X$ is completely regular.\n\n\\end{proof}"}
{"id": "Munkres|exercise_34_9", "formal_statement": "theorem exercise_34_9\n (X : Type*) [topological_space X] [compact_space X]\n (X1 X2 : set X) (hX1 : is_closed X1) (hX2 : is_closed X2)\n (hX : X1 \u222a X2 = univ) (hX1m : metrizable_space X1)\n (hX2m : metrizable_space X2) : metrizable_space X :=", "src_header": "import .common \n\nopen set topological_space filter \nopen_locale classical topology filter \nnoncomputable theory \n\n", "nl_statement": "Let $X$ be a compact Hausdorff space that is the union of the closed subspaces $X_1$ and $X_2$. If $X_1$ and $X_2$ are metrizable, show that $X$ is metrizable.", "nl_proof": "\\begin{proof}\n\n Both $X_1$ and $X_2$ are compact, Hausdorff and metrizable, so by exercise 3 they are second countable, i.e. there are countable bases $\\left\\{U_{i, n} \\subset X_i \\mid n \\in \\mathbb{N}\\right\\}$ for $i \\in\\{1,2\\}$. By the same exercise it is enough to show that $X$ is second countable. If $X_1 \\cap X_2=\\emptyset$ both $X_1$ and $X_2$ are open and the union $\\left\\{U_{i, n} \\mid i \\in\\{1,2\\} ; n \\in \\mathbb{N}\\right\\}$ of their countable bases form a countable base for $X$.\n\n\n\nSuppose now $X_1 \\cap X_2 \\neq \\emptyset$. Let $x \\in X$ and $U \\subset X$ be an open neighborhood of $x$. If $x \\in X_i-X_j=X-$ $X_j$ then $U \\cap X_i$ is open in $X_i$ and there is a basis neighborhood $U_{i, n}$ of $x$ such that $x \\in U_{i, n} \\cap X-X_j$ is an open neighborhood of $x$ in the open subset $X-X_j$, so $U_{i, n} \\cap X-X_j$ is also open in $X$.\n\nSuppose now that $x \\in X_1 \\cap X_2$. We have that $U \\cap X_i$ is open in $X_i$ so there is a basis neighborhood $U_{i, n_i}$ contained in $U \\cap X_i$. By definition of sub-space topology there is some open subset $V_{i, n_i} \\subset X$ such that $U_{i, n_i}=$ $X_i \\cap V_{i, n_i}$. Then\n\n$$\n\nx \\in V_{1, n_1} \\cap V_{2, n_2}=\\left(V_{1, n_1} \\cap V_{2, n_2} \\cap X_1\\right) \\cup\\left(V_{1, n_1} \\cap V_{2, n_2} \\cap X_2\\right)=\\left(U_{1, n_1} \\cap V_{2, n_2}\\right) \\cup\\left(V_{1, n_1} \\cap U_{2, n_2}\\right) \\subset U\n\n$$\n\nTherefore the open subsets $U_{i, n} \\cap X-X_j$ and $V_{1, n_1} \\cap V_{2, n_2}$ form a countable base for $X$.\n\n\\end{proof}"}
{"id": "Munkres|exercise_43_2", "formal_statement": "theorem exercise_43_2 {X : Type*} [metric_space X]\n {Y : Type*} [metric_space Y] [complete_space Y] (A : set X)\n (f : X \u2192 Y) (hf : uniform_continuous_on f A) :\n \u2203! (g : X \u2192 Y), continuous_on g (closure A) \u2227\n uniform_continuous_on g (closure A) \u2227 \u2200 (x : A), g x = f x :=", "src_header": "import .common \n\nopen set topological_space filter \nopen_locale classical topology filter \nnoncomputable theory \n\n", "nl_statement": "Let $(X, d_X)$ and $(Y, d_Y)$ be metric spaces; let $Y$ be complete. Let $A \\subset X$. Show that if $f \\colon A \\rightarrow Y$ is uniformly continuous, then $f$ can be uniquely extended to a continuous function $g \\colon \\bar{A} \\rightarrow Y$, and $g$ is uniformly continuous.", "nl_proof": "\\begin{proof}\n\n Let $\\left(X, d_X\\right)$ and $\\left(Y, d_Y\\right)$ be metric spaces; let $Y$ be complete. Let $A \\subset X$. It is also given that $f: A \\longrightarrow X$ is a uniformly continuous function. Then we have to show that $f$ can be uniquely extended to a continuous function $g: \\bar{A} \\longrightarrow Y$, and $g$ is uniformly coninuous.\n\nWe define the function $g$ as follows:\n\n$$\n\ng(x)= \\begin{cases}f(x) & \\text { if } x \\in A \\\\ \\lim _{n \\rightarrow \\infty} f\\left(x_n\\right) & \\text { if } x \\in \\bar{A},\\end{cases}\n\n$$\n\nwhere $\\left\\{x_n\\right\\} \\subset A$ is some sequence in $A$ such that $\\lim _{n \\rightarrow \\infty} x_n=x$. Now we have to check that the above definition is well defined. We first note that since $\\left\\{x_n\\right\\} \\subset A$ is convergent in $X,\\left\\{x_n\\right\\}$ is Cauchy in $A$ and since $f$ is uniformly continuous on $A,\\left\\{f\\left(x_n\\right)\\right\\}$ is Cauchy in $Y$. Further, since $Y$ is complete $\\left\\{f\\left(x_n\\right)\\right\\}$ is convergent. So let us now consider two sequences $\\left\\{x_n\\right\\}$ and $\\left\\{y_n\\right\\}$ such that $\\lim _{n \\rightarrow \\infty} x_n=\\lim _{n \\rightarrow \\infty} y_n=x$. Then we need to prove that $\\lim _{n \\rightarrow \\infty} f\\left(x_n\\right)=\\lim _{n \\rightarrow \\infty} f\\left(y_n\\right)=f(x)$. Let\n\n$$\n\n\\lim _{n \\rightarrow \\infty} f\\left(x_n\\right)=a \\text { and } b=\\lim _{n \\rightarrow \\infty} f\\left(y_n\\right)\n\n$$\n\nNow since $f$ is uniformly continuous for any given $\\epsilon>0$ there exists $\\delta>0$ such that\n\n$$\n\nd_Y(f(x), f(y))<\\epsilon \\text { whenever } d_X(x, y)<\\delta \\text { and } x, y \\in A\n\n$$\n\nSo for this $\\delta>0$ there exists $N \\in \\mathbb{N}$ such that\n\n$$\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\n$$\n\nTherefore, we have that for all $n \\geq N$,\n\n$$\n\nd_X\\left(x_n, y_n\\right)<\\delta\n\n$$\n\nThus the equation (1) yields us that\n\n$$\n\nd_Y\\left(f\\left(x_n\\right), f\\left(y_n\\right)\\right)<\\epsilon \\text { for all } n \\geq N .\n\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$$\n\n\\begin{gathered}\n\nd_Y\\left(f\\left(x_n\\right), a\\right)<\\epsilon \\text { for all } n \\geq K \\text { and } \\\\\n\nd_Y\\left(f\\left(y_n\\right), b\\right)<\\epsilon \\text { for all } n \\geq K .\n\n\\end{gathered}\n\n$$\n\nMoreover, since $K \\geq N$, from $(2)$ we get\n\n$$\n\nd_Y\\left(f\\left(x_n\\right), f\\left(y_n\\right)\\right)<\\epsilon \\text { for all } n \\geq K .\n\n$$\n\nNow we calculate the following, for $n \\geq K$,\n\n$$\n\n\\begin{array}{rlr}\n\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\n& < & \\epsilon+\\epsilon+\\epsilon \\text { by }(3),(4) \\text { and }(5) \\\\\n\n& = & 3 \\epsilon\n\n\\end{array}\n\n$$\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}$.\n\nMoreover, we observe that $g$ is unique extension of $f$ by the construction.\n\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\n\\end{proof}"}
{"id": "Axler|exercise_1_2", "formal_statement": "theorem exercise_1_2 :\n (\u27e8-1/2, real.sqrt 3 / 2\u27e9 : \u2102) ^ 3 = -1 :=", "src_header": "import .common \n\nopen set fintype complex polynomial submodule linear_map finite_dimensional\nopen module module.End inner_product_space\n\nopen_locale big_operators\n\n", "nl_statement": "Show that $\\frac{-1 + \\sqrt{3}i}{2}$ is a cube root of 1 (meaning that its cube equals 1).", "nl_proof": "\\begin{proof}\n\n$$\n\n\\left(\\frac{-1+\\sqrt{3} i}{2}\\right)^2=\\frac{-1-\\sqrt{3} i}{2},\n\n$$\n\nhence\n\n$$\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\n$$\n\nThis means $\\frac{-1+\\sqrt{3} i}{2}$ is a cube root of 1.\n\n\\end{proof}"}
{"id": "Axler|exercise_1_4", "formal_statement": "theorem exercise_1_4 {F V : Type*} [add_comm_group V] [field F]\n [module F V] (v : V) (a : F): a \u2022 v = 0 \u2194 a = 0 \u2228 v = 0 :=", "src_header": "import .common \n\nopen set fintype complex polynomial submodule linear_map finite_dimensional\nopen module module.End inner_product_space\n\nopen_locale big_operators\n\n", "nl_statement": "Prove that if $a \\in \\mathbf{F}$, $v \\in V$, and $av = 0$, then $a = 0$ or $v = 0$.", "nl_proof": "\\begin{proof}\n\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\n$$\n\na v=0\n\n$$\n\nMultiply by $\\frac{1}{a}$ on both sides of this equation to get\n\n$$\n\n\\begin{aligned}\n\n\\frac{1}{a}(a v) & =\\frac{1}{a} 0 & & \\\\\n\n\\frac{1}{a}(a v) & =0 & & \\\\\n\n\\left(\\frac{1}{a} \\cdot a\\right) v & =0 & & \\text { (associativity) } \\\\\n\n1 v & =0 & & \\text { (definition of } 1/a) \\\\\n\nv & =0 & & \\text { (multiplicative identity) }\n\n\\end{aligned}\n\n$$\n\nHence either $a=0$ or, if $a \\neq 0$, then $v=0$.\n\n\\end{proof}"}
{"id": "Axler|exercise_1_7", "formal_statement": "theorem exercise_1_7 : \u2203 U : set (\u211d \u00d7 \u211d),\n (U \u2260 \u2205) \u2227\n (\u2200 (c : \u211d) (u : \u211d \u00d7 \u211d), u \u2208 U \u2192 c \u2022 u \u2208 U) \u2227\n (\u2200 U' : submodule \u211d (\u211d \u00d7 \u211d), U \u2260 \u2191U') :=", "src_header": "import .common \n\nopen set fintype complex polynomial submodule linear_map finite_dimensional\nopen module module.End inner_product_space\n\nopen_locale big_operators\n\n", "nl_statement": "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$.", "nl_proof": "\\begin{proof}\n\n$$\n\nU=\\left\\{(x, y) \\in \\mathbf{R}^2:|x|=|y|\\right\\}\n\n$$\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\n\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\n\\end{proof}"}
{"id": "Axler|exercise_1_9", "formal_statement": "theorem exercise_1_9 {F V : Type*} [add_comm_group V] [field F]\n [module F V] (U W : submodule F V):\n \u2203 U' : submodule F V, (U'.carrier = \u2191U \u2229 \u2191W \u2194 (U \u2264 W \u2228 W \u2264 U)) :=", "src_header": "import .common \n\nopen set fintype complex polynomial submodule linear_map finite_dimensional\nopen module module.End inner_product_space\n\nopen_locale big_operators\n\n", "nl_statement": "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.", "nl_proof": "\\begin{proof}\n\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\n\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\n\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$\n\nSimilarly,\n\n$$\n\nv+u \\in U_2 \\Rightarrow v+u+(-u) \\in U_2 \\Rightarrow v \\in U_2\n\n$$\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$\n\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\n\\end{proof}"}
{"id": "Axler|exercise_3_8", "formal_statement": "theorem exercise_3_8 {F V W : Type*} [add_comm_group V]\n [add_comm_group W] [field F] [module F V] [module F W]\n (L : V \u2192\u2097[F] W) :\n \u2203 U : submodule F V, U \u2293 L.ker = \u22a5 \u2227\n linear_map.range L = range (dom_restrict L U):=", "src_header": "import .common \n\nopen set fintype complex polynomial submodule linear_map finite_dimensional\nopen module module.End inner_product_space\n\nopen_locale big_operators\n\n", "nl_statement": "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\\}$.", "nl_proof": "\\begin{proof}\n\n The point here is to note that every subspace of a vector space has a complementary subspace.\n\nIn this example, $U$ will precisely turn out to be the complementary subspace of null $T$. That is, $V=U \\oplus \\operatorname{null} T$\n\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\n\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\n\n\nLet $v \\in V$. Then, $v$ can be expressed as a linear combination of the vectors in $B$.\n\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$.\n\nHence, $v=u+w \\in U+\\operatorname{null} T$. This shows that\n\n$$\n\nV=U+\\operatorname{null} T\n\n$$\n\nNow, let $v \\in U \\cap \\operatorname{null} T$.\n\nSince $v \\in U, u$ can be expressed as a linear combination of basis vectors of $U$. Let\n\n$$\n\nv=a_1 u_1+\\cdots+a_n u_n\n\n$$\n\nSimilarly, since $v \\in \\operatorname{null} T$, it can also be expressed as a tinear combination of the basis vectors of null $T$. Let\n\n$$\n\nv=c_1 v_1+\\cdots+c_m v_m\n\n$$\n\nThe left hand sides of the above two equations are equal. Therefore, we can equate the right hand sides.\n\n$$\n\n\\begin{aligned}\n\n& a_1 u_1+\\cdots+a_n u_n=v=c_1 v_1+\\cdots+c_m v_m \\\\\n\n& a_1 u_1+\\cdots+a_n u_n-c_1 v_1-\\cdots-c_m v_m=0\n\n\\end{aligned}\n\n$$\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$.\n\nTherefore, if $v \\in U \\cap$ null $T$, then $v=0$. this means that\n\n$$\n\nU \\cap \\operatorname{null} T=\\{0\\}\n\n$$\n\nThe above shows that $U$ satisfies the first of the required conditions.\n\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$$\n\n\\begin{aligned}\n\nw & =T v \\\\\n\n& =T(u+w) \\\\\n\n& =T u+T w \\\\\n\n& =T u+0 \\quad \\quad(\\text { since } w \\in \\operatorname{null} T) \\\\\n\n& =T u\n\n\\end{aligned}\n\n$$\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\\}$.\n\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$.\n\nTherefore, range $T=\\{T u \\mid u \\in U\\}$.\n\nThis shows that $U$ satisfies the second required condition as well.\n\n\\end{proof}"}
{"id": "Axler|exercise_5_1", "formal_statement": "theorem exercise_5_1 {F V : Type*} [add_comm_group V] [field F]\n [module F V] {L : V \u2192\u2097[F] V} {n : \u2115} (U : fin n \u2192 submodule F V)\n (hU : \u2200 i : fin n, map L (U i) = U i) :\n map L (\u2211 i : fin n, U i : submodule F V) =\n (\u2211 i : fin n, U i : submodule F V) :=", "src_header": "import .common \n\nopen set fintype complex polynomial submodule linear_map finite_dimensional\nopen module module.End inner_product_space\n\nopen_locale big_operators\n\n", "nl_statement": "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$.", "nl_proof": "\\begin{proof}\n\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\n\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\n\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\n\\end{proof}"}
{"id": "Axler|exercise_5_11", "formal_statement": "theorem exercise_5_11 {F V : Type*} [add_comm_group V] [field F]\n [module F V] (S T : End F V) :\n (S * T).eigenvalues = (T * S).eigenvalues :=", "src_header": "import .common \n\nopen set fintype complex polynomial submodule linear_map finite_dimensional\nopen module module.End inner_product_space\n\nopen_locale big_operators\n\n", "nl_statement": "Suppose $S, T \\in \\mathcal{L}(V)$. Prove that $S T$ and $T S$ have the same eigenvalues.", "nl_proof": "\\begin{proof}\n\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$.\n\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$\n\nIf $T v \\neq 0$, then the listed equation above shows that $\\lambda$ is an eigenvalue of $T S$.\n\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$.\n\nStep 3\n\n3 of 3\n\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\n\\end{proof}"}
{"id": "Axler|exercise_5_13", "formal_statement": "theorem exercise_5_13 {F V : Type*} [add_comm_group V] [field F]\n [module F V] [finite_dimensional F V] {T : End F V}\n (hS : \u2200 U : submodule F V, finrank F U = finrank F V - 1 \u2192\n map T U = U) : \u2203 c : F, T = c \u2022 id :=", "src_header": "import .common \n\nopen set fintype complex polynomial submodule linear_map finite_dimensional\nopen module module.End inner_product_space\n\nopen_locale big_operators\n\n", "nl_statement": "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.", "nl_proof": "\\begin{proof}\n\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\n\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\n\\end{proof}"}
{"id": "Axler|exercise_5_24", "formal_statement": "theorem exercise_5_24 {V : Type*} [add_comm_group V]\n [module \u211d V] [finite_dimensional \u211d V] {T : End \u211d V}\n (hT : \u2200 c : \u211d, eigenspace T c = \u22a5) {U : submodule \u211d V}\n (hU : map T U = U) : even (finrank U) :=", "src_header": "import .common \n\nopen set fintype complex polynomial submodule linear_map finite_dimensional\nopen module module.End inner_product_space\n\nopen_locale big_operators\n\n", "nl_statement": "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.", "nl_proof": "\\begin{proof}\n\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$$\n\n\\left.T\\right|_U u=\\lambda u .\n\n$$\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\n\\end{proof}"}
{"id": "Axler|exercise_6_3", "formal_statement": "theorem exercise_6_3 {n : \u2115} (a b : fin n \u2192 \u211d) :\n (\u2211 i, a i * b i) ^ 2 \u2264 (\u2211 i : fin n, i * a i ^ 2) * (\u2211 i, b i ^ 2 / i) :=", "src_header": "import .common \n\nopen set fintype complex polynomial submodule linear_map finite_dimensional\nopen module module.End inner_product_space\n\nopen_locale big_operators\n\n", "nl_statement": "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}$.", "nl_proof": "\\begin{proof}\n\n Let $a_1, a_2, \\ldots, a_n, b_1, b_2, \\ldots, b_n \\in R$.\n\nWe have that\n\n$$\n\n\\left(\\sum_{j=1}^n a_j b_j\\right)^2\n\n$$\n\nis equal to the\n\n$$\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\n$$\n\nThis can be observed as an inner product, and using the Cauchy-Schwarz Inequality, we get\n\n$$\n\n\\begin{aligned}\n\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\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\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\n&=\\left(\\sum_{j=1}^n j a_j^2\\right)\\left(\\sum_{j=1}^n \\frac{b_j^2}{j}\\right) \\\\\n\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\n\\end{aligned}\n\n$$\n\n\\end{proof}"}
{"id": "Axler|exercise_6_13", "formal_statement": "theorem exercise_6_13 {V : Type*} [inner_product_space \u2102 V] {n : \u2115}\n {e : fin n \u2192 V} (he : orthonormal \u2102 e) (v : V) :\n \u2016v\u2016^2 = \u2211 i : fin n, \u2016\u27eav, e i\u27eb_\u2102\u2016^2 \u2194 v \u2208 span \u2102 (e '' univ) :=", "src_header": "import .common \n\nopen set fintype complex polynomial submodule linear_map finite_dimensional\nopen module module.End inner_product_space\n\nopen_locale big_operators\n\n", "nl_statement": "Suppose $\\left(e_{1}, \\ldots, e_{m}\\right)$ is an or thonormal 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)$.", "nl_proof": "\\begin{proof}\n\nIf $v \\in \\operatorname{span}\\left(e_1, \\ldots, e_m\\right)$, it means that\n\n$$\n\nv=\\alpha_1 e_1+\\ldots+\\alpha_m e_m .\n\n$$\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$$\n\n\\begin{aligned}\n\n\\|v\\|^2 & =\\langle v, v\\rangle \\\\\n\n& =\\left\\langle\\alpha_1 e_1+\\ldots+\\alpha_m e_m, \\alpha_1 e_1+\\ldots+\\alpha_m e_m\\right\\rangle \\\\\n\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\n& =\\left|\\alpha_1\\right|^2+\\ldots+\\left|\\alpha_m\\right|^2 \\\\\n\n& =\\left|\\left\\langle v, e_1\\right\\rangle\\right|^2+\\ldots+\\left|\\left\\langle v, e_m\\right\\rangle\\right|^2 .\n\n\\end{aligned}\n\n$$\n\n$\\Rightarrow$ Assume that $v \\notin \\operatorname{span}\\left(e_1, \\ldots, e_m\\right)$. Then, we must have\n\n$$\n\nv=v_{m+1}+\\frac{\\left\\langle v, v_0\\right\\rangle}{\\left\\|v_0\\right\\|^2} v_0,\n\n$$\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\n\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$$\n\n\\begin{aligned}\n\n\\|v\\|^2 & =\\langle v, v\\rangle \\\\\n\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\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\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\n& =\\left\\|v_{m+1}\\right\\|^2+\\left\\|v_0\\right\\|^2 \\\\\n\n& >\\left\\|v_0\\right\\|^2 \\\\\n\n& =\\left|\\alpha_1\\right|^2+\\ldots+\\left|\\alpha_m\\right|^2 \\\\\n\n& =\\left|\\left\\langle v, e_1\\right\\rangle\\right|^2+\\ldots+\\left|\\left\\langle v, e_m\\right\\rangle\\right|^2 .\n\n\\end{aligned}\n\n$$\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\n\\end{proof}"}
{"id": "Axler|exercise_7_5", "formal_statement": "theorem exercise_7_5 {V : Type*} [inner_product_space \u2102 V] \n [finite_dimensional \u2102 V] (hV : finrank V \u2265 2) :\n \u2200 U : submodule \u2102 (End \u2102 V), U.carrier \u2260\n {T | T * T.adjoint = T.adjoint * T} :=", "src_header": "import .common \n\nopen set fintype complex polynomial submodule linear_map finite_dimensional\nopen module module.End inner_product_space\n\nopen_locale big_operators\n\n", "nl_statement": "Show that if $\\operatorname{dim} V \\geq 2$, then the set of normal operators on $V$ is not a subspace of $\\mathcal{L}(V)$.", "nl_proof": "\\begin{proof}\n\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\n\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\n\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. Thereofre, the set of normal operators on $V$ isn't closed under addition and hence isn't a subspace of $L(V)$.\n\n\\end{proof}"}
{"id": "Axler|exercise_7_9", "formal_statement": "theorem exercise_7_9 {V : Type*} [inner_product_space \u2102 V]\n [finite_dimensional \u2102 V] (T : End \u2102 V)\n (hT : T * T.adjoint = T.adjoint * T) :\n is_self_adjoint T \u2194 \u2200 e : T.eigenvalues, (e : \u2102).im = 0 :=", "src_header": "import .common \n\nopen set fintype complex polynomial submodule linear_map finite_dimensional\nopen module module.End inner_product_space\n\nopen_locale big_operators\n\n", "nl_statement": "Prove that a normal operator on a complex inner-product space is self-adjoint if and only if all its eigenvalues are real.", "nl_proof": "\\begin{proof}\n\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$.\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\n\\end{proof}"}
{"id": "Axler|exercise_7_11", "formal_statement": "theorem exercise_7_11 {V : Type*} [inner_product_space \u2102 V]\n [finite_dimensional \u2102 V] {T : End \u2102 V} (hT : T*T.adjoint = T.adjoint*T) :\n \u2203 (S : End \u2102 V), S ^ 2 = T :=", "src_header": "import .common \n\nopen set fintype complex polynomial submodule linear_map finite_dimensional\nopen module module.End inner_product_space\n\nopen_locale big_operators\n\n", "nl_statement": "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$.)", "nl_proof": "\\begin{proof}\n\n Let $V$ be a complex inner product space.\n\nIt is known that an operator $S \\in \\mathcal{L}(V)$ is called a square root of $T \\in \\mathcal{L}(V)$ if\n\n$$\n\nS^2=T\n\n$$\n\nNow, suppose that $T$ is a normal operator on $V$.\n\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.\n\nDefine $S$ by\n\n$$\n\nS e_j=\\sqrt{\\lambda_j} e_j,\n\n$$\n\nfor each $j=1, \\ldots, n$.\n\nObviously, $S^2 e_j=\\lambda_j e_j=T e_j$.\n\nHence, $S^2=T$ so there exist a square root of $T$.\n\n\\end{proof}"}
{"id": "Ireland-Rosen|exercise_1_30", "formal_statement": "theorem exercise_1_30 {n : \u2115} : \n \u00ac \u2203 a : \u2124, \u2211 (i : fin n), (1 : \u211a) / (n+2) = a :=", "src_header": "import .common \n\nopen set function nat int fintype real polynomial mv_polynomial\nopen zsqrtd gaussian_int char_p nat.arithmetic_function \n\nopen_locale big_operators\nnoncomputable theory\n\n", "nl_statement": "Prove that $\\frac{1}{2}+\\frac{1}{3}+\\cdots+\\frac{1}{n}$ is not an integer.", "nl_proof": "\\begin{proof}\n\nLet $2^s$ be the largest power of 2 occuring 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\n\\end{proof}"}
{"id": "Ireland-Rosen|exercise_2_4", "formal_statement": "theorem exercise_2_4 {a : \u2124} (ha : a \u2260 0) \n (f_a :=", "src_header": "import .common \n\nopen set function nat int fintype real polynomial mv_polynomial\nopen zsqrtd gaussian_int char_p nat.arithmetic_function \n\nopen_locale big_operators\nnoncomputable theory\n\n", "nl_statement": "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.", "nl_proof": "\\begin{proof} \n\n\\begin{align*}\n\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\n\\end{align*}\n\n\n\nThe decomposition of $n!$ in prime factors is\n\n\n\n$n! = p_1^{\\alpha_1}p_2^{\\alpha_2}\\cdots p_k^{\\alpha_k}$ \n\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\n\n\nThen\n\n\\begin{align*}\n\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\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\n&\\leq \\prod_{p\\leq n} p^{\\frac{1}{p-1}}\n\n\\end{align*}\n\n(the values of $p$ in this product describe all prime numbers $p\\leq n$.)\n\n\\end{proof}"}
{"id": "Ireland-Rosen|exercise_2_27a", "formal_statement": "theorem exercise_2_27a : \n \u00ac summable (\u03bb i : {p : \u2124 // squarefree p}, (1 : \u211a) / i) :=", "src_header": "import .common \n\nopen set function nat int fintype real polynomial mv_polynomial\nopen zsqrtd gaussian_int char_p nat.arithmetic_function \n\nopen_locale big_operators\nnoncomputable theory\n\n", "nl_statement": "Show that $\\sum^{\\prime} 1 / n$, the sum being over square free integers, diverges.", "nl_proof": "\\begin{proof}\n\n \n\nLet $S \\subset \\mathbb{N}^*$ the set of square free integers.\n\n\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\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}.$$\n\nSo $$\\sum_{a \\in S, a\\leq N} \\frac{1}{a} \\geq \\frac{6}{\\pi^2} \\sum_{n\\leq N} \\frac{1}{n}.$$\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\n\n\nLet $S_N = \\prod_{p<N}(1+1/p)$ , and $p_1,p_2,\\ldots, p_l\\ (l = l(N))$ all prime integers less than $N$. Then\n\n\\begin{align*}\n\nS_N &= \\left(1+\\frac{1}{p_1}\\right) \\cdots \\left(1+\\frac{1}{p_l}\\right)\\\\\n\n&=\\sum_{(\\varepsilon_1,\\cdots,\\varepsilon_l) \\in \\{0,1\\}^l } \\frac{1}{p_1^{\\varepsilon_1} \\cdots p_l^{\\varepsilon_l}}\n\n\\end{align*}\n\nWe prove this last formula by induction. This is true for $l=1$ : $\\sum_{\\varepsilon \\in \\{0,1\\}} 1/p_1^\\varepsilon = 1 + 1/p_1$.\n\n\n\nIf it is true for the integer $l$, then \n\n\\begin{align*}\n\n\\left(1+\\frac{1}{p_1}\\right) \\cdots \\left(1+\\frac{1}{p_l}\\right)\\left(1+\\frac{1}{p_{l+1}}\\right) &= \\sum_{(\\varepsilon_1,\\ldots,\\varepsilon_l) \\in \\{0,1\\}^l } \\frac{1}{p_1^{\\varepsilon_1} \\cdots p_l^{\\varepsilon_l}} \\left(1+\\frac{1}{p_{l+1}}\\right)\\\\\n\n&=\\sum_{(\\varepsilon_1,\\ldots,\\varepsilon_l) \\in \\{0,1\\}^l } \\frac{1}{p_1^{\\varepsilon_1} \\cdots p_l^{\\varepsilon_l}} + \\sum_{(\\varepsilon_1,\\ldots,\\varepsilon_l) \\in \\{0,1\\}^l } \\frac{1}{p_1^{\\varepsilon_1} \\cdots p_l^{\\varepsilon_l}p_{l+1}}\\\\\n\n&=\\sum_{(\\varepsilon_1,\\ldots,\\varepsilon_l,\\varepsilon_{l+1}) \\in \\{0,1\\}^{l+1} } \\frac{1}{p_1^{\\varepsilon_1} \\cdots p_l^{\\varepsilon_l}p_{l+1}^{\\varepsilon_{l+1}}} \n\n\\end{align*}\n\nSo it is true for all $l$. \n\n\n\nThus $S_N = \\sum_{n\\in \\Delta} \\frac{1}{n}$, where $\\Delta$ is the set of square free integers whose prime factors are less than $N$.\n\n\n\nAs $\\sum 1/n$, the sum being over square free integers, diverges, $\\lim\\limits_{N\\to \\infty} S_N = + \\infty$ :\n\n$$\\lim_{N \\to \\infty} \\prod_{p<N} \\left(1+\\frac{1}{p}\\right) = +\\infty.$$\n\n $e^x \\geq 1+x, x \\geq \\log (1+x)$ for $x>0$, so\n\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\n$\\lim\\limits_{N\\to \\infty} \\log S_N = +\\infty$ and $\\lim\\limits_{N\\to \\infty} l(N) = +\\infty$, so\n\n$$\\lim_{N\\to \\infty} \\sum_{p<N} \\frac{1}{p} = +\\infty.$$\n\n\\end{proof}"}
{"id": "Ireland-Rosen|exercise_3_4", "formal_statement": "theorem exercise_3_4 : \u00ac \u2203 x y : \u2124, 3*x^2 + 2 = y^2 :=", "src_header": "import .common \n\nopen set function nat int fintype real polynomial mv_polynomial\nopen zsqrtd gaussian_int char_p nat.arithmetic_function \n\nopen_locale big_operators\nnoncomputable theory\n\n", "nl_statement": "Show that the equation $3 x^{2}+2=y^{2}$ has no solution in integers.", "nl_proof": "\\begin{proof} \n\nIf $3x^2+2 = y^2$, then $\\overline{y}^2 = \\overline{2}$ in $\\mathbb{Z}/3\\mathbb{Z}$.\n\n\n\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\n\n\nThus $3x^2+2 = y^2$ has no solution in integers.\n\n\\end{proof}"}
{"id": "Ireland-Rosen|exercise_3_10", "formal_statement": "theorem exercise_3_10 {n : \u2115} (hn0 : \u00ac n.prime) (hn1 : n \u2260 4) : \n factorial (n-1) \u2261 0 [MOD n] :=", "src_header": "import .common \n\nopen set function nat int fintype real polynomial mv_polynomial\nopen zsqrtd gaussian_int char_p nat.arithmetic_function \n\nopen_locale big_operators\nnoncomputable theory\n\n", "nl_statement": "If $n$ is not a prime, show that $(n-1) ! \\equiv 0(n)$, except when $n=4$.", "nl_proof": "\\begin{proof} \n\nSuppose that $n >1$ is not a prime. Then $n = uv$, where $2 \\leq u \\leq v \\leq n-1$.\n\n\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\n\n$\\bullet$ If $u=v$, $n = u^2$ is a square.\n\n\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\n\n\nIf $u = p$ is a prime, then $n =p^2$.\n\n\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\n\n\nConclusion : if $n$ is not a prime, $(n - 1)! \\equiv 0 \\pmod n$, except when $n=4$.\n\n\\end{proof}"}
{"id": "Ireland-Rosen|exercise_4_4", "formal_statement": "theorem exercise_4_4 {p t: \u2115} (hp0 : p.prime) (hp1 : p = 4*t + 1) \n (a : zmod p) : \n is_primitive_root a p \u2194 is_primitive_root (-a) p :=", "src_header": "import .common \n\nopen set function nat int fintype real polynomial mv_polynomial\nopen zsqrtd gaussian_int char_p nat.arithmetic_function \n\nopen_locale big_operators\nnoncomputable theory\n\n", "nl_statement": "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$.", "nl_proof": "\\begin{proof}\n\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)$\n\nIf $(-a)^n \\equiv 1(\\bmod p)$, with $n \\in \\mathbb{N}$, then $a^n \\equiv(-1)^n(\\bmod p)$.\n\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\n\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\n\\end{proof}"}
{"id": "Ireland-Rosen|exercise_4_6", "formal_statement": "theorem exercise_4_6 {p n : \u2115} (hp : p.prime) (hpn : p = 2^n + 1) : \n is_primitive_root 3 p :=", "src_header": "import .common \n\nopen set function nat int fintype real polynomial mv_polynomial\nopen zsqrtd gaussian_int char_p nat.arithmetic_function \n\nopen_locale big_operators\nnoncomputable theory\n\n", "nl_statement": "If $p=2^{n}+1$ is a Fermat prime, show that 3 is a primitive root modulo $p$.", "nl_proof": "\\begin{proof}\n\n \\newcommand{\\legendre}[2]{\\genfrac{(}{)}{}{}{#1}{#2}}\n\nWrite $p = 2^k + 1$, with $k = 2^n$.\n\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\n\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\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\n\n$3^{2^{k-1}} = 3^{(p-1)/2} \\equiv \\legendre{3}{p} \\pmod p$.\n\n\n\nAs the result is true for $p=5$, we can suppose $n\\geq 2$.\n\nFrom the law of quadratic reciprocity :\n\n$$\\legendre{3}{p} \\legendre{p}{3} = (-1)^{(p-1)/2} = (-1)^{2^{k-1}} = 1.$$\n\nSo $\\legendre{3}{p} = \\legendre{p}{3}$\n\n \n\n\\begin{align*}\n\np = 2^{2^n}+1 &\\equiv (-1)^{2^n} + 1 \\pmod 3\\\\\n\n&\\equiv 2 \\equiv -1 \\pmod 3,\n\n\\end{align*}\n\nso $\\legendre{3}{p} = \\legendre {p}{3} = -1$, that is to say\n\n$$3^{2^{k-1}} \\equiv -1 \\pmod p.$$\n\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\n\n(On the other hand, if $3$ is of order $p-1$ modulo $p$, then $p$ is prime, so\n\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\n\\end{proof}"}
{"id": "Ireland-Rosen|exercise_4_11", "formal_statement": "theorem exercise_4_11 {p : \u2115} (hp : p.prime) (k s: \u2115) \n (s :=", "src_header": "import .common \n\nopen set function nat int fintype real polynomial mv_polynomial\nopen zsqrtd gaussian_int char_p nat.arithmetic_function \n\nopen_locale big_operators\nnoncomputable theory\n\n", "nl_statement": "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$.", "nl_proof": "\\begin{proof} \n\nLet $S_k = 1^k+2^k+\\cdots+(p-1)^k$.\n\n\n\nLet $g$ a primitive root modulo $p$ : $\\overline{g}$ a generator of $\\mathbb{F}_p^*$.\n\n\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\n\\begin{align*}\n\n\\overline{S_k} &= \\overline{1}^k + \\overline{2}^k+\\cdots+ \\overline{p-1}^k\\\\\n\n&= \\sum_{i=0}^{p-2} \\overline{g}^{ki} =\n\n\\left\\{\n\n\\begin{array}{ccc}\n\n\\overline{ p-1} = -\\overline{1} & \\mathrm{if} & p-1 \\mid k \\\\\n\n \\frac{ \\overline{g}^{(p-1)k} -1}{ \\overline{g}^k -1} = \\overline{0}& \\mathrm{if} & p-1 \\nmid k\n\n\\end{array}\n\n\\right.\n\n\\end{align*}\n\nsince $p-1 \\mid k \\iff \\overline{g}^k = \\overline{1}$.\n\n\n\nConclusion :\n\n\\begin{align*}\n\n1^k+2^k+\\cdots+(p-1)^k&\\equiv 0 \\pmod p\\ \\mathrm{if} \\ p-1 \\nmid k\\\\\n\n1^k+2^k+\\cdots+(p-1)^k&\\equiv -1 \\pmod p\\ \\mathrm{if} \\ p-1 \\mid k\\\\\n\n\\end{align*}\n\n\\end{proof}"}
{"id": "Ireland-Rosen|exercise_5_28", "formal_statement": "theorem exercise_5_28 {p : \u2115} (hp : p.prime) (hp1 : p \u2261 1 [MOD 4]): \n \u2203 x, x^4 \u2261 2 [MOD p] \u2194 \u2203 A B, p = A^2 + 64*B^2 :=", "src_header": "import .common \n\nopen set function nat int fintype real polynomial mv_polynomial\nopen zsqrtd gaussian_int char_p nat.arithmetic_function \n\nopen_locale big_operators\nnoncomputable theory\n\n", "nl_statement": "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}$.", "nl_proof": "\\begin{proof} \n\nIf $p\\equiv 1\\ [4]$ and if there exists $x \\in \\mathbb{Z}$ such that $x^4 \\equiv 2\\ [p]$, then\n\n$$2^{\\frac{p-1}{4} }\\equiv x^{p-1} \\equiv 1 \\ [p].$$ \n\n\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\n\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\n\n\nAs $a$ is odd, $8 | b$, then $p = A^2 + 64 B^2$ (with $A = a, B = b/8$).\n\n\n\n\\bigskip\n\n\n\nConversely, if $p=A^2+64 B^2$, then $p\\equiv A^2 \\equiv 1 \\ [4]$.\n\n\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\n\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\n\n\nConclusion : \n\n\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\n\\end{proof}"}
{"id": "Ireland-Rosen|exercise_12_12", "formal_statement": "theorem exercise_12_12 : is_algebraic \u211a (sin (real.pi/12)) :=", "src_header": "import .common \n\nopen set function nat int fintype real polynomial mv_polynomial\nopen zsqrtd gaussian_int char_p nat.arithmetic_function \n\nopen_locale big_operators\nnoncomputable theory\n\n", "nl_statement": "Show that $\\sin (\\pi / 12)$ is an algebraic number.", "nl_proof": "\\begin{proof}\n\n$$\n\n\\begin{aligned}\n\n \\sin \\pi/12=\\sin \\left(\\pi/4-\\pi/6\\right) & =\\sin \\pi/4 \\cos \\pi/6-\\cos \\pi/4 \\sin \\pi/6 \\\\\n\n& =\\frac{\\sqrt{3}}{2 \\sqrt{2}}-\\frac{1}{2 \\sqrt{2}} \\\\\n\n& =\\frac{\\sqrt{3}-1}{2 \\sqrt{2}}\n\n\\end{aligned}\n\n$$\n\n\\end{proof}"}
{"id": "Shakarchi|exercise_1_13b", "formal_statement": "theorem exercise_1_13b {f : \u2102 \u2192 \u2102} (\u03a9 : set \u2102) (a b : \u03a9) (h : is_open \u03a9)\n (hf : differentiable_on \u2102 f \u03a9) (hc : \u2203 (c : \u211d), \u2200 z \u2208 \u03a9, (f z).im = c) :\n f a = f b :=", "src_header": "import .common \n\nopen complex filter function interval_integral metric\n\nopen_locale big_operators\nopen_locale filter\nopen_locale topology\n\n", "nl_statement": "Suppose that $f$ is holomorphic in an open set $\\Omega$. Prove that if $\\text{Im}(f)$ is constant, then $f$ is constant.", "nl_proof": "\\begin{proof}\n\nLet $f(z)=f(x, y)=u(x, y)+i v(x, y)$, where $z=x+i y$.\n\nSince $\\operatorname{Im}(f)=$ constant,\n\n$$\n\n\\frac{\\partial v}{\\partial x}=0, \\frac{\\partial v}{\\partial y}=0 .\n\n$$\n\nBy the Cauchy-Riemann equations,\n\n$$\n\n\\frac{\\partial u}{\\partial x}=\\frac{\\partial v}{\\partial y}=0 .\n\n$$\n\nThus in $\\Omega$,\n\n$$\n\nf^{\\prime}(z)=\\frac{\\partial f}{\\partial x}=\\frac{\\partial u}{\\partial x}+i \\frac{\\partial v}{\\partial x}=0+0=0 .\n\n$$\n\nThus $f$ is constant.\n\n\\end{proof}"}
{"id": "Shakarchi|exercise_1_19a", "formal_statement": "theorem exercise_1_19a (z : \u2102) (hz : abs z = 1) (s : \u2115 \u2192 \u2102)\n (h : s = (\u03bb n, \u2211 i in (finset.range n), i * z ^ i)) :\n \u00ac \u2203 y, tendsto s at_top (\ud835\udcdd y) :=", "src_header": "import .common \n\nopen complex filter function interval_integral metric\n\nopen_locale big_operators\nopen_locale filter\nopen_locale topology\n\n", "nl_statement": "Prove that the power series $\\sum nz^n$ does not converge on any point of the unit circle.", "nl_proof": "\\begin{proof}\n\n For $z \\in S:=\\{z \\in \\mathbb{C}:|z|=1\\}$ it also holds $z^n \\in S$ for all $n \\in \\mathbb{N}$ (since in this case $\\left.\\left|z^n\\right|=|z|^n=1^n=1\\right)$\n\nThus, the sequence $\\left(a_n\\right)_{n \\in \\mathbb{N}}$ with $a_n=n z^n$ does not converge to zero which is necessary for the corresponding sum $\\sum_{n \\in \\mathbb{N}} a_n$ to be convergent. Hence this sum does not converge.\n\n\\end{proof}"}
{"id": "Shakarchi|exercise_1_19c", "formal_statement": "theorem exercise_1_19c (z : \u2102) (hz : abs z = 1) (hz2 : z \u2260 1) (s : \u2115 \u2192 \u2102)\n (h : s = (\u03bb n, \u2211 i in (finset.range n), i * z / i)) :\n \u2203 z, tendsto s at_top (\ud835\udcdd z) :=", "src_header": "import .common \n\nopen complex filter function interval_integral metric\n\nopen_locale big_operators\nopen_locale filter\nopen_locale topology\n\n", "nl_statement": "Prove that the power series $\\sum zn/n$ converges at every point of the unit circle except $z = 1$.", "nl_proof": "\\begin{proof}\n\n If $z=1$ then $\\sum z^n / n=\\sum 1 / n$ is divergent (harmonic series). If $|z|=1$ and $z \\neq 1$, write $z=e^{2 \\pi i t}$ with $t \\in(0,1)$ and apply Dirichlet's test: if $\\left\\{a_n\\right\\}$ is a sequence of real numbers and $\\left\\{b_n\\right\\}$ a sequence of complex numbers satisfying\n\n- $a_{n+1} \\leq a_n$\n\n- $\\lim _{n \\rightarrow \\infty} a_n=0$\n\n- $\\left|\\sum_{n=1}^N b_n\\right| \\leq M$ for every positive integer $N$ and some $M>0$,\n\nthen $\\sum a_n b_n$ converges. Let $a_n=1 / n$, so $a_n$ satisfies $a_{n+1} \\leq a_n$ and $\\lim _{n \\rightarrow \\infty} a_n=0$. Let $b_n=e^{2 \\pi i n t}$, then\n\n$$\n\n\\left|\\sum_{n=1}^N b_n\\right|=\\left|\\sum_{n=1}^N e^{2 \\pi i n t}\\right|=\\left|\\frac{e^{2 \\pi i t}-e^{2 \\pi i(N+1) t}}{1-e^{2 \\pi i t}}\\right| \\leq \\frac{2}{\\left|1-e^{2 \\pi i t}\\right|}=M \\text { for all } N\n\n$$\n\nThus $\\sum a_n b_n=\\sum z^n / n$ converges for every point in the unit circle except $z=1$.\n\n\\end{proof}"}
{"id": "Shakarchi|exercise_2_2", "formal_statement": "theorem exercise_2_2 :\n tendsto (\u03bb y, \u222b x in 0..y, real.sin x / x) at_top (\ud835\udcdd (real.pi / 2)) :=", "src_header": "import .common \n\nopen complex filter function interval_integral metric\n\nopen_locale big_operators\nopen_locale filter\nopen_locale topology\n\n", "nl_statement": "Show that $\\int_{0}^{\\infty} \\frac{\\sin x}{x} d x=\\frac{\\pi}{2}$.", "nl_proof": "\\begin{proof}\n\n We have $\\int_0^{\\infty} \\frac{\\sin x}{x} d x=\\frac{1}{2 * i} \\int_0^{\\infty} \\frac{e^{i * x}-e^{-i * x}}{x} d x=\\frac{1}{2 * i}\\left(\\int_0^{\\infty} \\frac{e^{i * x}-1}{x} d x-\\int_0^{\\infty} \\frac{e^{-i * x}-1}{x} d x=\\right.$ $\\frac{1}{2 * i} \\int_{-\\infty}^{\\infty} \\frac{e^{i * x}-1}{x} d x$. Now integrate along the big and small semicircles $C_0$ and $C_1$ shown below. For $C_0$ : we have that $\\int_{C_0} \\frac{1}{x} d x=\\pi * i$ and $\\left|\\int_{C_0} \\frac{e^{i * x}}{x} d x\\right| \\leq$ $2 *\\left|\\int_{C_{00}} \\frac{e^{i * x}}{x} d x\\right|+\\left|\\int_{C_{01}} \\frac{e^{i * x}}{x} d x\\right|$ where $C_{00}$ and $C_{01}$ are shown below $\\left(C_{01}\\right.$ contains the part of $C_0$ that has points with imaginary parts more than $a$ and $C_{00}$ is one of the other 2 components). We have $\\left|\\int_{C_{00}} \\frac{e^{i * x}}{x} d x\\right| \\leq$ $\\sup _{x \\in C_{00}}\\left(e^{i * x}\\right) / R * \\int_{C_{00}}|d x| \\leq e^{-a} * \\pi$ and $\\left|\\int_{C_{01}} \\frac{e^{i * x}}{x} d x\\right| \\leq\\left|\\int_{C_{01}} \\frac{1}{x} d x\\right| \\leq$ $\\frac{1}{R} * C * a$ for some constant $C$ (the constant $C$ exists because the length of the curve approaches $a$ as $a / R \\rightarrow 0)$. Thus, the integral of $e^{i * x} / x$ over $C_0$ is bounded by $A * e^{-a}+B * a / R$ for some constants $A$ and $B$. Pick $R$ large and $a=\\sqrt{R}$ and note that the above tends to 0 . About the integral over $C_1$ : We have $e^{i * x}-1=1+O(x)$ for $x \\rightarrow 0$ (this is again from $\\sin (x) / x \\rightarrow 1$ ),\n\n4\n\nso $\\left|\\int_{C_1} \\frac{e^{i * x}-1}{x} d x\\right| \\leq O(1) *\\left|\\int_{C_1} d x\\right| \\rightarrow 0$ as $x \\rightarrow 0$. Thus, we only care about the integral over $C_{00}$ which is $-\\pi * i$. Using Cauchy's theorem we get that our integral equals $\\frac{1}{2 * i}(-(\\pi * i))=\\pi / 2$.\n\n\\end{proof}"}
{"id": "Shakarchi|exercise_2_13", "formal_statement": "theorem exercise_2_13 {f : \u2102 \u2192 \u2102}\n (hf : \u2200 z\u2080 : \u2102, \u2203 (s : set \u2102) (c : \u2115 \u2192 \u2102), is_open s \u2227 z\u2080 \u2208 s \u2227\n \u2200 z \u2208 s, tendsto (\u03bb n, \u2211 i in finset.range n, (c i) * (z - z\u2080)^i) at_top (\ud835\udcdd (f z\u2080))\n \u2227 \u2203 i, c i = 0) :\n \u2203 (c : \u2115 \u2192 \u2102) (n : \u2115), f = \u03bb z, \u2211 i in finset.range n, (c i) * z ^ n :=", "src_header": "import .common \n\nopen complex filter function interval_integral metric\n\nopen_locale big_operators\nopen_locale filter\nopen_locale topology\n\n", "nl_statement": "Suppose $f$ is an analytic function defined everywhere in $\\mathbb{C}$ and such that for each $z_0 \\in \\mathbb{C}$ at least one coefficient in the expansion $f(z) = \\sum_{n=0}^\\infty c_n(z - z_0)^n$ is equal to 0. Prove that $f$ is a polynomial.", "nl_proof": "\\begin{proof}\n\nSay that at least one of the coefficients of the Taylor series vanishes is the same as saying that for every $a \\in \\mathbb{C}$ there is $m \\in \\mathbb{N}$ such that $f^{(m)}(a)=0$.\n\nConsider $A_n:=\\left\\{z \\in \\mathbb{C}: f^{(n)}(z)=0\\right\\}$ for each $n \\in \\mathbb{N}$. Note that:\n\n$f$ is polynomial iff $A_n$ is not countable for some $n \\in \\mathbb{N}$.\n\nIndeed, if $f$ is polynomial of degree $n$, then $f^{(n+1)}(z)=0$ for all $z \\in \\mathbb{C}$, then $A_{n+1}=\\mathbb{C}$, so, $A_{n+1}$ is not countable. Conversely, if there is $n \\in \\mathbb{C}$ such that $A_n$ is not countable, then $A_n$ has a limit point, then by Identity principle we have $f^{(n)}(z)=0$ for all $z \\in \\mathbb{C}$, so, $f$ is a polynomial of degree at most $n-1$.\n\n\n\nTherefore, tt suffices to show that there is $n \\in \\mathbb{N}$ such that $A_n$ is not countable. Indeed, consider $\\bigcup_{n \\in \\mathbb{N}} A_n$, by hypothesis for each $a \\in \\mathbb{C}$ there is $m \\in \\mathbb{N}$ such that $f^{(m)}(a)=0$, then $\\mathbb{C} \\subseteq \\bigcup_{n \\in \\mathbb{N}} A_n$. Therefore, $\\bigcup_{n \\in \\mathbb{N}} A_n$ is not countable, then there is $n \\in \\mathbb{N}$ such that $A_n$ is not countable.\n\n\\end{proof}"}
{"id": "Shakarchi|exercise_3_4", "formal_statement": "theorem exercise_3_4 (a : \u211d) (ha : 0 < a) :\n tendsto (\u03bb y, \u222b x in -y..y, x * real.sin x / (x ^ 2 + a ^ 2))\n at_top (\ud835\udcdd (real.pi * (real.exp (-a)))) :=", "src_header": "import .common \n\nopen complex filter function interval_integral metric\n\nopen_locale big_operators\nopen_locale filter\nopen_locale topology\n\n", "nl_statement": "Show that $ \\int_{-\\infty}^{\\infty} \\frac{x \\sin x}{x^2 + a^2} dx = \\pi e^{-a}$ for $a > 0$.", "nl_proof": "\\begin{proof}\n\n$$\n\nx /\\left(x^2+a^2\\right)=x / 2 i a(1 /(x-i a)-1 /(x+i a))=1 / 2 i a(i a /(x-i a)+i a /(x+\n\n$$\n\n$i a))=(1 /(x-i a)+1 /(x+i a)) / 2$. So we care about $\\sin (x)(1 /(x-i a)+$ $1 /(x+i a)) / 2$. Its residue at $x=i a$ is $\\sin (i a) / 2=\\left(e^{-a}-e^a\\right) / 4 i$.?\n\n\\end{proof}"}
{"id": "Shakarchi|exercise_3_14", "formal_statement": "theorem exercise_3_14 {f : \u2102 \u2192 \u2102} (hf : differentiable \u2102 f)\n (hf_inj : function.injective f) :\n \u2203 (a b : \u2102), f = (\u03bb z, a * z + b) \u2227 a \u2260 0 :=", "src_header": "import .common \n\nopen complex filter function interval_integral metric\n\nopen_locale big_operators\nopen_locale filter\nopen_locale topology\n\n", "nl_statement": "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$.", "nl_proof": "\\begin{proof}\n\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\n\\end{proof}"}
{"id": "Shakarchi|exercise_5_1", "formal_statement": "theorem exercise_5_1 (f : \u2102 \u2192 \u2102) (hf : differentiable_on \u2102 f (ball 0 1))\n (hb : bounded (set.range f)) (h0 : f \u2260 0) (zeros : \u2115 \u2192 \u2102) (hz : \u2200 n, f (zeros n) = 0)\n (hzz : set.range zeros = {z | f z = 0 \u2227 z \u2208 (ball (0 : \u2102) 1)}) :\n \u2203 (z : \u2102), tendsto (\u03bb n, (\u2211 i in finset.range n, (1 - zeros i))) at_top (\ud835\udcdd z) :=", "src_header": "import .common \n\nopen complex filter function interval_integral metric\n\nopen_locale big_operators\nopen_locale filter\nopen_locale topology\n\n", "nl_statement": "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$.", "nl_proof": "\\begin{proof}\n\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)|<M$ since $f$ is bounded. The partial sums of the series are boundend and therefore the series converges.\n\n\\end{proof}"}
{"id": "Putnam|exercise_2018_a5", "formal_statement": "theorem exercise_2018_a5 (f : \u211d \u2192 \u211d) (hf : cont_diff \u211d \u22a4 f)\n (hf0 : f 0 = 0) (hf1 : f 1 = 1) (hf2 : \u2200 x, f x \u2265 0) :\n \u2203 (n : \u2115) (x : \u211d), iterated_deriv n f x = 0 :=", "src_header": "import .common \n\nopen real topological_space filter polynomial\nopen_locale topology big_operators complex_conjugate filter ennreal \n\n", "nl_statement": "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$.", "nl_proof": "\\begin{proof}\n\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)$;\n\nnote that if $f$ is ultraconvex, then so is $f'$.\n\nDefine the set\n\n\\[\n\nS = \\{ f :\\thinspace \\mathbb{R} \\to \\mathbb{R} \\,|\\,f \\text{ ultraconvex and } f(0)=0\\}.\n\n\\]\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\n\nby the mean value theorem there exists $x \\in (0,x_0)$ for which $f'(x) = \\frac{f(x_0)}{x_0} < 0$.\n\nIn particular, $f'(0) = 0$, so $f' \\in S$ also.\n\n\n\nWe show by induction that for all $n \\geq 0$,\n\n\\[\n\nf(x) \\leq \\frac{f^{(n)}(1)}{n!} x^n \\qquad (f \\in S, x \\in [0,1]).\n\n\\]\n\nWe induct with base case $n=0$, which holds because any $f \\in S$ is nondecreasing. Given the claim for $n=m$,\n\nwe apply the induction hypothesis to $f' \\in S$ to see that\n\n\\[\n\nf'(t) \\leq \\frac{f^{(n+1)}(1)}{n!} t^n \\qquad (t \\in [0,1]),\n\n\\]\n\nthen integrate both sides from $0$ to $x$ to conclude.\n\n\n\nNow for $f \\in S$, we have $0 \\leq f(1) \\leq \\frac{f^{(n)}(1)}{n!}$ for all $n \\geq 0$. \n\nOn the other hand, by Taylor's theorem with remainder,\n\n\\[\n\nf(x) \\geq \\sum_{k=0}^n \\frac{f^{(k)}(1)}{k!}(x-1)^k \\qquad (x \\geq 1).\n\n\\]\n\nApplying this with $x=2$, we obtain $f(2) \\geq \\sum_{k=0}^n \\frac{f^{(k)}(1)}{k!}$ for all $n$;\n\nthis implies that $\\lim_{n\\to\\infty} \\frac{f^{(n)}(1)}{n!} = 0$.\n\nSince $f(1) \\leq \\frac{f^{(n)}(1)}{n!}$, we must have $f(1) = 0$.\n\n\n\nFor $f \\in S$, we proved earlier that $f(x) = 0$ for all $x\\leq 0$, as well as for $x=1$. Since\n\nthe function $g(x) = f(cx)$ is also ultraconvex for $c>0$, we also have $f(x) = 0$ for all $x>0$;\n\nhence $f$ is identically zero.\n\n\n\nTo sum up, if $f\\colon \\mathbb{R} \\to \\mathbb{R}$ is infinitely differentiable, $f(0)=0$, and $f(1) = 1$,\n\nthen $f$ cannot be ultraconvex. This implies the desired result.\n\n\\end{proof}"}
{"id": "Putnam|exercise_2018_b4", "formal_statement": "theorem exercise_2018_b4 (a : \u211d) (x : \u2115 \u2192 \u211d) (hx0 : x 0 = a)\n (hx1 : x 1 = a) \n (hxn : \u2200 n : \u2115, n \u2265 2 \u2192 x (n+1) = 2*(x n)*(x (n-1)) - x (n-2))\n (h : \u2203 n, x n = 0) : \n \u2203 c, function.periodic x c :=", "src_header": "import .common \n\nopen real topological_space filter polynomial\nopen_locale topology big_operators complex_conjugate filter ennreal \n\n", "nl_statement": "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.", "nl_proof": "\\begin{proof}\n\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\n\\begin{align*}\n\n|x_{n+1}| &= |2x_nx_{n-1}-x_{n-2}| \\\\\n\n&\\geq 2|x_n||x_{n-1}|-|x_{n-2}| \\\\\n\n&\\geq |x_n|(2|x_{n-1}|-1) \\geq |x_n|,\n\n\\end{align*} \n\nwhere the last step follows from $|x_{n-1}| \\geq |x_{n-2}| \\geq \\cdots \\geq |x_0| = 1$.\n\n\n\nWe may thus assume hereafter that $|a|\\leq 1$. We can then write $a = \\cos b$ for some $b \\in [0,\\pi]$. \n\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\n\\[\n\nx_n = \\cos(F_n b) \\qquad (n \\geq 0).\n\n\\]\n\nIndeed, this is true for $n=0,1,2$; given that it is true for $n \\leq m$, then\n\n\\begin{align*}\n\n2x_mx_{m-1}&=2\\cos(F_mb)\\cos(F_{m-1}b) \\\\\n\n&= \\cos((F_m-F_{m-1})b)+\\cos((F_m+F_{m-1})b) \\\\\n\n&= \\cos(F_{m-2}b)+\\cos(F_{m+1}b)\n\n\\end{align*}\n\nand so \n\n$x_{m+1} = 2x_mx_{m-1}-x_{m-2} = \\cos(F_{m+1}b)$. This completes the induction.\n\n\n\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\n\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\n\\begin{align*}\n\nx_{n+\\ell} &= \\cos\\left(\\frac{F_{n+\\ell}c}{d}(2\\pi)\\right)\\\\\n\n& = \\cos\\left(\\frac{F_n c}{d}(2\\pi)\\right) = x_n\n\n\\end{align*}\n\nfor all $n$. Thus the sequence $\\{x_n\\}$ is periodic, as desired.\n\n\\end{proof}"}
{"id": "Putnam|exercise_2014_a5", "formal_statement": "theorem exercise_2014_a5 (P : \u2115 \u2192 polynomial \u2124) \n (hP : \u2200 n, P n = \u2211 (i : fin n), (n+1) * X ^ n) : \n \u2200 (j k : \u2115), j \u2260 k \u2192 is_coprime (P j) (P k) :=", "src_header": "import .common \n\nopen real topological_space filter polynomial\nopen_locale topology big_operators complex_conjugate filter ennreal \n\n", "nl_statement": "Let", "nl_proof": ""}
{"id": "Putnam|exercise_2001_a5", "formal_statement": "theorem exercise_2001_a5 : \n \u2203! a n : \u2115, a > 0 \u2227 n > 0 \u2227 a^(n+1) - (a+1)^n = 2001 :=", "src_header": "import .common \n\nopen real topological_space filter polynomial\nopen_locale topology big_operators complex_conjugate filter ennreal \n\n", "nl_statement": "Prove that there are unique positive integers $a, n$ such that $a^{n+1}-(a+1)^n=2001$.", "nl_proof": "\\begin{proof}\n\n Suppose $a^{n+1} - (a+1)^n = 2001$.\n\nNotice that $a^{n+1} + [(a+1)^n - 1]$ is a multiple of $a$; thus\n\n$a$ divides $2002 = 2 \\times 7 \\times 11 \\times 13$.\n\n\n\nSince $2001$ is divisible by 3, we must have $a \\equiv 1 \\pmod{3}$,\n\notherwise one of $a^{n+1}$ and $(a+1)^n$ is a multiple of 3 and the\n\nother is not, so their difference cannot be divisible by 3. Now\n\n$a^{n+1} \\equiv 1 \\pmod{3}$, so we must have $(a+1)^n \\equiv 1\n\n\\pmod{3}$, which forces $n$ to be even, and in particular at least 2.\n\n\n\nIf $a$ is even, then $a^{n+1} - (a+1)^n \\equiv -(a+1)^n \\pmod{4}$.\n\nSince $n$ is even, $-(a+1)^n \\equiv -1 \\pmod{4}$. Since $2001 \\equiv 1\n\n\\pmod{4}$, this is impossible. Thus $a$ is odd, and so must divide\n\n$1001 = 7 \\times 11 \\times 13$. Moreover, $a^{n+1} - (a+1)^n \\equiv a\n\n\\pmod{4}$, so $a \\equiv 1 \\pmod{4}$.\n\n\n\nOf the divisors of $7 \\times 11 \\times 13$, those congruent to 1 mod 3\n\nare precisely those not divisible by 11 (since 7 and 13 are both\n\ncongruent to 1 mod 3). Thus $a$ divides $7 \\times 13$. Now\n\n$a \\equiv 1 \\pmod{4}$ is only possible if $a$ divides $13$.\n\n\n\nWe cannot have $a=1$, since $1 - 2^n \\neq 2001$ for any $n$. Thus\n\nthe only possibility is $a = 13$. One easily checks that $a=13, n=2$ is a\n\nsolution; all that remains is to check that no other $n$ works. In fact,\n\nif $n > 2$, then $13^{n+1} \\equiv 2001 \\equiv 1 \\pmod{8}$.\n\nBut $13^{n+1} \\equiv 13 \\pmod{8}$ since $n$ is even, contradiction.\n\nThus $a=13, n=2$ is the unique solution.\n\n\n\nNote: once one has that $n$ is even, one can use that $2002\n\n=a^{n+1} + 1 - (a+1)^n$ is divisible by $a+1$ to rule out cases.\n\n\\end{proof}"}
{"id": "Putnam|exercise_1999_b4", "formal_statement": "theorem exercise_1999_b4 (f : \u211d \u2192 \u211d) (hf: cont_diff \u211d 3 f) \n (hf1 : \u2200 (n \u2264 3) (x : \u211d), iterated_deriv n f x > 0) \n (hf2 : \u2200 x : \u211d, iterated_deriv 3 f x \u2264 f x) : \n \u2200 x : \u211d, deriv f x < 2 * f x :=", "src_header": "import .common \n\nopen real topological_space filter polynomial\nopen_locale topology big_operators complex_conjugate filter ennreal \n\n", "nl_statement": "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$.", "nl_proof": "\\begin{proof} \n\n\\setcounter{equation}{0}\n\nWe make repeated use of the following fact: if $f$ is a differentiable function on all of\n\n$\\mathbb{R}$, $\\lim_{x \\to -\\infty} f(x) \\geq 0$, and $f'(x) > 0$ for all $x \\in \\mathbb{R}$, then\n\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\n$x<y$ since $f'>0$, but then $\\lim_{x \\to -\\infty} f(x) \\leq f(y) < 0$.)\n\n\n\nFrom the inequality $f'''(x) \\leq f(x)$ we obtain\n\n\\[\n\nf'' f'''(x) \\leq f''(x) f(x) < f''(x) f(x) + f'(x)^2\n\n\\]\n\nsince $f'(x)$ is positive. Applying the fact to the difference between the right and left sides,\n\nwe get\n\n\\begin{equation}\n\n\\frac{1}{2} (f''(x))^2 < f(x) f'(x).\n\n\\end{equation}\n\n\n\nOn the other hand, since $f(x)$ and $f'''(x)$ are both positive for all $x$,\n\nwe have\n\n\\[\n\n2f'(x) f''(x) < 2f'(x)f''(x) + 2f(x) f'''(x).\n\n\\]\n\nApplying the fact to the difference between the sides yields\n\n\\begin{equation}\n\nf'(x)^2 \\leq 2f(x) f''(x).\n\n\\end{equation}\n\nCombining (1) and (2), we obtain\n\n\\begin{align*}\n\n\\frac{1}{2} \\left( \\frac{f'(x)^2}{2f(x)} \\right)^2\n\n&< \\frac{1}{2} (f''(x))^2 \\\\\n\n&< f(x) f'(x),\n\n\\end{align*}\n\nor $(f'(x))^3 < 8 f(x)^3$. We conclude $f'(x) < 2f(x)$, as desired.\n\n\\end{proof}"}
{"id": "Putnam|exercise_1998_b6", "formal_statement": "theorem exercise_1998_b6 (a b c : \u2124) : \n \u2203 n : \u2124, n > 0 \u2227 \u00ac \u2203 m : \u2124, sqrt (n^3 + a*n^2 + b*n + c) = m :=", "src_header": "import .common \n\nopen real topological_space filter polynomial\nopen_locale topology big_operators complex_conjugate filter ennreal \n\n", "nl_statement": "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.", "nl_proof": "\\begin{proof}\n\n We prove more generally that for any polynomial $P(z)$ with integer\n\ncoefficients which is not a perfect square, there exists a positive\n\ninteger $n$ such that $P(n)$ is not a perfect square. Of course it\n\nsuffices to assume $P(z)$ has no repeated factors, which is to say $P(z)$\n\nand its derivative $P'(z)$ are relatively prime.\n\n\n\nIn particular, if we carry out the Euclidean algorithm on $P(z)$ and $P'(z)$\n\nwithout dividing, we get an integer $D$ (the discriminant of $P$) such that\n\nthe greatest common divisor of $P(n)$ and $P'(n)$ divides $D$ for any $n$.\n\nNow there exist infinitely many primes $p$ such that $p$ divides $P(n)$ for\n\nsome $n$: if there were only finitely many, say, $p_1, \\dots, p_k$, then\n\nfor any $n$ divisible by $m = P(0) p_1 p_2 \\cdots p_k$, we have $P(n)\n\n\\equiv P(0) \\pmod{m}$, that is, $P(n)/P(0)$ is not divisible by $p_1,\n\n\\dots, p_k$, so must be $\\pm 1$, but then $P$ takes some value infinitely\n\nmany times, contradiction. In particular, we can choose some such $p$ not\n\ndividing $D$, and choose $n$ such that $p$ divides $P(n)$. Then $P(n+kp)\n\n\\equiv P(n) + kp P'(n) (\\mathrm{mod}\\,p)$\n\n(write out the Taylor series of the left side);\n\nin particular, since $p$ does not divide $P'(n)$, we can find some $k$\n\nsuch that $P(n+kp)$ is divisible by $p$ but not by $p^2$, and so\n\nis not a perfect square.\n\n\\end{proof}"}
{"id": "Pugh|exercise_2_26", "formal_statement": "theorem exercise_2_26 {M : Type*} [topological_space M]\n (U : set M) : is_open U \u2194 \u2200 x \u2208 U, \u00ac cluster_pt x (\ud835\udcdf U\u1d9c) :=", "src_header": "import .common\n\nopen set real filter function ring_hom topological_space\n\nopen_locale big_operators\nopen_locale filter\nopen_locale topology \nnoncomputable theory \n\n", "nl_statement": "Prove that a set $U \\subset M$ is open if and only if none of its points are limits of its complement.", "nl_proof": "\\begin{proof}\n\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)<r$ but $q \\notin U$. Applying this to $r=1 / n$ we obtain $q_n \\in U^c$ such that $d\\left(q_n, p\\right)<1 / n$. But then $q_n \\rightarrow p$ and $p$ is a limit of a sequence of points in $U^c$, a contradiction.\n\n\n\nAssume now that $U$ is open. Assume by contradiction there exists $p \\in U$ and $p_n \\in U^c$ such that $p_n \\rightarrow p$. Since $U$ is open, there exists $r>0$ such that $d(p, x)<r$ for $x \\in M$ implies $x \\in U$. But since $p_n \\rightarrow p$, there exists $n_0 \\in \\mathbb{N}$ such that $n \\geq n_0$ implies $d\\left(p_n, p\\right)<r$, therefore $p_n \\in U$ for $n \\geq n_0$, a contradiction since $p_n \\in U^c$.\n\n\\end{proof}"}
{"id": "Pugh|exercise_2_32a", "formal_statement": "theorem exercise_2_32a (A : set \u2115) : is_clopen A :=", "src_header": "import .common\n\nopen set real filter function ring_hom topological_space\n\nopen_locale big_operators\nopen_locale filter\nopen_locale topology \nnoncomputable theory \n\n", "nl_statement": "Show that every subset of $\\mathbb{N}$ is clopen.", "nl_proof": "\\begin{proof}\n\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\n\\end{proof}"}
{"id": "Pugh|exercise_2_46", "formal_statement": "theorem exercise_2_46 {M : Type*} [metric_space M]\n {A B : set M} (hA : is_compact A) (hB : is_compact B)\n (hAB : disjoint A B) (hA\u2080 : A \u2260 \u2205) (hB\u2080 : B \u2260 \u2205) :\n \u2203 a\u2080 b\u2080, a\u2080 \u2208 A \u2227 b\u2080 \u2208 B \u2227 \u2200 (a : M) (b : M),\n a \u2208 A \u2192 b \u2208 B \u2192 dist a\u2080 b\u2080 \u2264 dist a b :=", "src_header": "import .common\n\nopen set real filter function ring_hom topological_space\n\nopen_locale big_operators\nopen_locale filter\nopen_locale topology \nnoncomputable theory \n\n", "nl_statement": "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)$.", "nl_proof": "\\begin{proof}\n\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\n$$\n\nd\\left(a_0, b_0\\right) \\leq d(a, b) .\n\n$$\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\n\\end{proof}"}
{"id": "Pugh|exercise_2_92", "formal_statement": "theorem exercise_2_92 {\u03b1 : Type*} [topological_space \u03b1]\n {s : \u2115 \u2192 set \u03b1}\n (hs : \u2200 i, is_compact (s i))\n (hs : \u2200 i, (s i).nonempty)\n (hs : \u2200 i, (s i) \u2283 (s (i + 1))) :\n (\u22c2 i, s i).nonempty :=", "src_header": "import .common\n\nopen set real filter function ring_hom topological_space\n\nopen_locale big_operators\nopen_locale filter\nopen_locale topology \nnoncomputable theory \n\n", "nl_statement": "Give a direct proof that the nested decreasing intersection of nonempty covering compact sets is nonempty.", "nl_proof": "\\begin{proof}\n\n Let\n\n$$\n\nA_1 \\supset A_2 \\supset \\cdots \\supset A_n \\supset \\cdots\n\n$$\n\nbe a nested decreasing sequence of compacts. Suppose that $\\bigcap A_n=\\emptyset$. Take $U_n=A_n^c$, then\n\n$$\n\n\\bigcup U_n=\\bigcup A_n^c=\\left(\\bigcap A_n\\right)^c=A_1 .\n\n$$\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\n$$\n\nA_{\\alpha_1}^c \\cup A_{\\alpha_2}^c \\cup \\cdots \\cup A_{\\alpha_m}^c \\supset A_1\n\n$$\n\nor\n\n$$\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\n$$\n\nBut, this is true only if $A_{\\alpha_i}=\\emptyset$ for some $i$, a contradiction.\n\n\\end{proof}"}
{"id": "Pugh|exercise_3_1", "formal_statement": "theorem exercise_3_1 {f : \u211d \u2192 \u211d}\n (hf : \u2200 x y, |f x - f y| \u2264 |x - y| ^ 2) :\n \u2203 c, f = \u03bb x, c :=", "src_header": "import .common\n\nopen set real filter function ring_hom topological_space\n\nopen_locale big_operators\nopen_locale filter\nopen_locale topology \nnoncomputable theory \n\n", "nl_statement": "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.", "nl_proof": "\\begin{proof}\n\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$$\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\n$$\n\nso $f$ is differentiable in $\\mathbb{R}$ and $f^{\\prime}=0$. This implies that $f$ is constant, as seen in class.\n\n\\end{proof}"}
{"id": "Pugh|exercise_3_63a", "formal_statement": "theorem exercise_3_63a (p : \u211d) (f : \u2115 \u2192 \u211d) (hp : p > 1)\n (h : f = \u03bb k, (1 : \u211d) / (k * (log k) ^ p)) :\n \u2203 l, tendsto f at_top (\ud835\udcdd l) :=", "src_header": "import .common\n\nopen set real filter function ring_hom topological_space\n\nopen_locale big_operators\nopen_locale filter\nopen_locale topology \nnoncomputable theory \n\n", "nl_statement": "Prove that $\\sum 1/k(\\log(k))^p$ converges when $p > 1$.", "nl_proof": "\\begin{proof}\n\n Using the integral test, for a set $a$, we see\n\n$$\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\n$$\n\nwhich goes to infinity if $c \\leq 1$ and converges if $c>1$. Thus,\n\n$$\n\n\\sum_{n=2}^{\\infty} \\frac{1}{n \\log (n)^c}\n\n$$\n\nconverges if and only if $c>1$. \n\n\\end{proof}"}
{"id": "Pugh|exercise_4_15a", "formal_statement": "theorem exercise_4_15a {\u03b1 : Type*}\n (a b : \u211d) (F : set (\u211d \u2192 \u211d)) :\n (\u2200 (x : \u211d) (\u03b5 > 0), \u2203 (U \u2208 (\ud835\udcdd x)),\n (\u2200 (y z \u2208 U) (f : \u211d \u2192 \u211d), f \u2208 F \u2192 (dist (f y) (f z) < \u03b5)))\n \u2194\n \u2203 (\u03bc : \u211d \u2192 \u211d), \u2200 (x : \u211d), (0 : \u211d) \u2264 \u03bc x \u2227 tendsto \u03bc (\ud835\udcdd 0) (\ud835\udcdd 0) \u2227\n (\u2200 (s t : \u211d) (f : \u211d \u2192 \u211d), f \u2208 F \u2192 |(f s) - (f t)| \u2264 \u03bc (|s - t|)) :=", "src_header": "import .common\n\nopen set real filter function ring_hom topological_space\n\nopen_locale big_operators\nopen_locale filter\nopen_locale topology \nnoncomputable theory \n\n", "nl_statement": "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.", "nl_proof": "\\begin{proof}\n\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\n\n\nSuppose $f:\\left(X, d_X\\right) \\rightarrow\\left(Y, d_Y\\right)$ is uniformly continuous.\n\nLet $\\delta_1>0$ be such that $d_X(a, b)<\\delta_1$ implies $d_Y(f(a), f(b))<1$.\n\nDefine $w:[0, \\infty) \\rightarrow[0, \\infty]$ by\n\n$$\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\n$$\n\nWe'll show that $w$ is a modulus of continuity for $f \\ldots$\n\nBy definition of $w$, it's immediate that $w(0)=0$ and it's clear that\n\n$$\n\nd_Y(f(a), f(b)) \\leq w\\left(d_X(a, b)\\right)\n\n$$\n\nfor all $a, b \\in X$.\n\nIt remains to show $\\lim _{s \\rightarrow 0^{+}} w(s)=0$.\n\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))$\n\nLet $\\epsilon>0$.\n\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$.\n\nThus $L \\leq \\epsilon$ for all $\\epsilon>0$, hence $L=0$.\n\nThis completes the proof.\n\n\\end{proof}"}
{"id": "Herstein|exercise_2_1_18", "formal_statement": "theorem exercise_2_1_18 {G : Type*} [group G] \n [fintype G] (hG2 : even (fintype.card G)) :\n \u2203 (a : G), a \u2260 1 \u2227 a = a\u207b\u00b9 :=", "src_header": "import .common \n\nopen set function nat fintype real subgroup ideal polynomial submodule zsqrtd \nopen char_p mul_aut matrix\nopen_locale big_operators\nnoncomputable theory\n\n", "nl_statement": "If $G$ is a finite group of even order, show that there must be an element $a \\neq e$ such that $a=a^{-1}$.", "nl_proof": "\\begin{proof}\n\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$.\n\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 $n<k$-- and exactly one element of order 1 . Hence the number of elements of order 2 is\n\n$$\n\n2 k-2 n-1=2(k-n)-1\n\n$$\n\nThis cannot equal 0 as $2(k-n)$ is even and 1 is odd. Hence there's at least one element of order 2 in $G$, which concludes the proof.\n\n\\end{proof}"}
{"id": "Herstein|exercise_2_1_26", "formal_statement": "theorem exercise_2_1_26 {G : Type*} [group G] \n [fintype G] (a : G) : \u2203 (n : \u2115), a ^ n = 1 :=", "src_header": "import .common \n\nopen set function nat fintype real subgroup ideal polynomial submodule zsqrtd \nopen char_p mul_aut matrix\nopen_locale big_operators\nnoncomputable theory\n\n", "nl_statement": "If $G$ is a finite group, prove that, given $a \\in G$, there is a positive integer $n$, depending on $a$, such that $a^n = e$.", "nl_proof": "\\begin{proof}\n\n Because there are only a finite number of elements of $G$, it's clear that the set $\\left\\{a, a^2, a^3, \\ldots\\right\\}$ must be a finite set and in particular, there should exist some $i$ and $j$ such that $i \\neq j$ and $a^i=a^j$. WLOG suppose further that $i>j$ (just reverse the roles of $i$ and $j$ otherwise). Then multiply both sides by $\\left(a^j\\right)^{-1}=a^{-j}$ to get\n\n$$\n\na^i * a^{-j}=a^{i-j}=e\n\n$$\n\nThus the $n=i-j$ is a positive integer such that $a^n=e$.\n\n\\end{proof}"}
{"id": "Herstein|exercise_2_2_3", "formal_statement": "theorem exercise_2_2_3 {G : Type*} [group G]\n {P : \u2115 \u2192 Prop} {hP : P = \u03bb i, \u2200 a b : G, (a*b)^i = a^i * b^i}\n (hP1 : \u2203 n : \u2115, P n \u2227 P (n+1) \u2227 P (n+2)) : comm_group G :=", "src_header": "import .common \n\nopen set function nat fintype real subgroup ideal polynomial submodule zsqrtd \nopen char_p mul_aut matrix\nopen_locale big_operators\nnoncomputable theory\n\n", "nl_statement": "If $G$ is a group in which $(a b)^{i}=a^{i} b^{i}$ for three consecutive integers $i$, prove that $G$ is abelian.", "nl_proof": "\\begin{proof}\n\n Let $G$ be a group, $a, b \\in G$ and $i$ be any integer. Then from given condition,\n\n$$\n\n\\begin{aligned}\n\n(a b)^i & =a^i b^i \\\\\n\n(a b)^{i+1} & =a^{i+1} b^{i+1} \\\\\n\n(a b)^{i+2} & =a^{i+2} b^{i+2}\n\n\\end{aligned}\n\n$$\n\nFrom first and second, we get\n\n$$\n\na^{i+1} b^{i+1}=(a b)^i(a b)=a^i b^i a b \\Longrightarrow b^i a=a b^i\n\n$$\n\nFrom first and third, we get\n\n$$\n\na^{i+2} b^{i+2}=(a b)^i(a b)^2=a^i b^i a b a b \\Longrightarrow a^2 b^{i+1}=b^i a b a\n\n$$\n\nThis gives\n\n$$\n\na^2 b^{i+1}=a\\left(a b^i\\right) b=a b^i a b=b^i a^2 b\n\n$$\n\nFinally, we get\n\n$$\n\nb^i a b a=b^i a^2 b \\Longrightarrow b a=a b\n\n$$\n\nThis shows that $G$ is Abelian.\n\n\\end{proof}"}
{"id": "Herstein|exercise_2_2_6c", "formal_statement": "theorem exercise_2_2_6c {G : Type*} [group G] {n : \u2115} (hn : n > 1) \n (h : \u2200 (a b : G), (a * b) ^ n = a ^ n * b ^ n) :\n \u2200 (a b : G), (a * b * a\u207b\u00b9 * b\u207b\u00b9) ^ (n * (n - 1)) = 1 :=", "src_header": "import .common \n\nopen set function nat fintype real subgroup ideal polynomial submodule zsqrtd \nopen char_p mul_aut matrix\nopen_locale big_operators\nnoncomputable theory\n\n", "nl_statement": "Let $G$ be a group in which $(a b)^{n}=a^{n} b^{n}$ for some fixed integer $n>1$ for all $a, b \\in G$. For all $a, b \\in G$, prove that $\\left(a b a^{-1} b^{-1}\\right)^{n(n-1)}=e$.", "nl_proof": "\\begin{proof}\n\n We start with the following two intermediate results.\n\n(1) $(a b)^{n-1}=b^{n-1} a^{n-1}$.\n\n(2) $a^n b^{n-1}=b^{n-1} a^n$.\n\nTo prove (1), notice by the given condition for all $a, b \\in G$\n\n$(b a)^n=b^n a^n$, for some fixed integers $n>1$.\n\nThen,\n\n$(b a)^n=b^n a^n \\Longrightarrow b .(a b)(a b) \\ldots .(a b) . a=b\\left(b^{n-1} a^{n-1}\\right) a$, where $(a b)$ occurs $n-1$ times $\\Longrightarrow(a b)^{n-1}=b^{n-1} a^{n-1}$, by cancellation law.\n\nHence, for all $a, b \\in G$\n\n$$\n\n(a b)^{n-1}=b^{n-1} a^{n-1} .\n\n$$\n\nTo prove (2), notice by the given condition for all $a, b \\in G$\n\n$(b a)^n=b^n a^n$, for some fixed integers $n>1$.\n\nThen we have\n\n$$\n\n\\begin{aligned}\n\n& (b a)^n=b^n a^n \\\\\n\n\\Longrightarrow & b \\cdot(a b)(a b) \\ldots(a b) \\cdot a=b\\left(b^{n-1} a^{n-1}\\right) a, \\text { where }(a b) \\text { occurs } n-1 \\text { times } \\\\\n\n\\Longrightarrow & (a b)^{n-1}=b^{n-1} a^{n-1}, \\text { by cancellation law } \\\\\n\n\\Longrightarrow & (a b)^{n-1}(a b)=\\left(b^{n-1} a^{n-1}\\right)(a b) \\\\\n\n\\Longrightarrow & (a b)^n=b^{n-1} a^n b \\\\\n\n\\Longrightarrow & a^n b^n=b^{n-1} a^n b, \\text { given condition } \\\\\n\n\\Longrightarrow & a^n b^{n-1}=b^{n-1} a^n, \\text { by cancellation law. }\n\n\\end{aligned}\n\n$$\n\nTherefore for all $a, b \\in G$ we have\n\n$$\n\na^n b^{n-1}=b^{n-1} a^n\n\n$$\n\nIn order to show that\n\n$$\n\n\\left(a b a^{-1} b^{-1}\\right)^{n(n-1)}=e, \\text { for all } a, b \\in G\n\n$$\n\nit is enough to show that\n\n$$\n\n(a b)^{n(n-1)}=(b a)^{n(n-1)}, \\quad \\forall x, y \\in G .\n\n$$\n\nStep 3\n\nThis is because of\n\n$$\n\n\\begin{aligned}\n\n(a b)^{n(n-1)}=(b a)^{n(n-1)} & \\left.\\Longrightarrow(b a)^{-1}\\right)^{n(n-1)}(a b)^{n(n-1)}=e \\\\\n\n& \\Longrightarrow\\left(a^{-1} b^{-1}\\right)^{n(n-1)}(a b)^{n(n-1)}=e \\\\\n\n& \\Longrightarrow\\left(\\left(a^{-1} b^{-1}\\right)^n\\right)^{n-1}\\left((a b)^n\\right)(n-1)=e \\\\\n\n& \\Longrightarrow\\left((a b)^n\\left(a^{-1} b^{-1}\\right)^n\\right)^{n-1}=e, \\text { by }(1) \\\\\n\n& \\Longrightarrow\\left(a b a^{-1} b^{-1}\\right)^{n(n-1)}=e, \\text { ( given condition) }\n\n\\end{aligned}\n\n$$\n\nNow, it suffices to show that\n\n$$\n\n(a b)^{n(n-1)}=(b a)^{n(n-1)}, \\quad \\forall x, y \\in G .\n\n$$\n\nNow, we have\n\n$$\n\n\\begin{aligned}\n\n(a b)^{n(n-1)} & =\\left(a^n b^n\\right)^{n-1}, \\text { by the given condition } \\\\\n\n& =\\left(a^n b^{n-1} b\\right)^{n-1} \\\\\n\n& =\\left(b^{n-1} a^n b\\right)^{n-1}, \\text { by }(2) \\\\\n\n& =\\left(a^n b\\right)^{n-1}\\left(b^{n-1}\\right)^{n-1}, \\text { by }(1) \\\\\n\n& =b^{n-1}\\left(a^n\\right)^{n-1}\\left(b^{n-1}\\right)^{n-1}, \\text { by }(1) \\\\\n\n& =\\left(b^{n-1}\\left(a^{n-1}\\right)^n\\right)\\left(b^{n-1}\\right)^{n-1} \\\\\n\n& =\\left(a^{n-1}\\right)^n b^{n-1}\\left(b^{n-1}\\right)^{n-1}, \\text { by }(2) \\\\\n\n& =\\left(a^{n-1}\\right)^n\\left(b^{n-1}\\right)^n \\\\\n\n& =\\left(a^{n-1} b^{n-1}\\right)^n, \\text { by }(1) \\\\\n\n& =(b a)^{n(n-1)}, \\text { by }(1) .\n\n\\end{aligned}\n\n$$\n\nThis completes our proof.\n\n\\end{proof}"}
{"id": "Herstein|exercise_2_3_16", "formal_statement": "theorem exercise_2_3_16 {G : Type*} [group G]\n (hG : \u2200 H : subgroup G, H = \u22a4 \u2228 H = \u22a5) :\n is_cyclic G \u2227 \u2203 (p : \u2115) (fin : fintype G), nat.prime p \u2227 @card G fin = p :=", "src_header": "import .common \n\nopen set function nat fintype real subgroup ideal polynomial submodule zsqrtd \nopen char_p mul_aut matrix\nopen_locale big_operators\nnoncomputable theory\n\n", "nl_statement": "If a group $G$ has no proper subgroups, prove that $G$ is cyclic of order $p$, where $p$ is a prime number.", "nl_proof": "\\begin{proof}\n\n Case-1: $G=(e), e$ being the identity element in $G$. Then trivially $G$ is cyclic.\n\n Case-2: $G \\neq(e)$. Then there exists an non-identity element in $G.$ Let us consider an non-identity element in $G$, say $a\\neq (e)$. Now look at the cyclic subgroup generated by $a$, that is, $\\langle a\\rangle$. Since\n\n $a\\neq (e) \\in G,\\langle a\\rangle$ is a subgroup of $G$.\n\nIf $G \\neq\\langle a\\rangle$ then $\\langle a\\rangle$ is a proper non-trivial subgroup of $G$, which is an impossibility. Therfore we must have\n\n$$\n\nG=\\langle a\\rangle .\n\n$$\n\nThis implies, $G$ is a cyclic group generated by $a$. Then it follows that every non-identity element of $G$ is a generator of $G$. Now we claim that $G$ is finite.\n\n\\end{proof}"}
{"id": "Herstein|exercise_2_5_23", "formal_statement": "theorem exercise_2_5_23 {G : Type*} [group G] \n (hG : \u2200 (H : subgroup G), H.normal) (a b : G) :\n \u2203 (j : \u2124) , b*a = a^j * b:=", "src_header": "import .common \n\nopen set function nat fintype real subgroup ideal polynomial submodule zsqrtd \nopen char_p mul_aut matrix\nopen_locale big_operators\nnoncomputable theory\n\n", "nl_statement": "Let $G$ be a group such that all subgroups of $G$ are normal in $G$. If $a, b \\in G$, prove that $ba = a^jb$ for some $j$.", "nl_proof": "\\begin{proof}\n\n Let $G$ be a group where each subgroup is normal in $G$. let $a, b \\in G$.\n\n$$\n\n\\begin{aligned}\n\n \\langle a\\rangle\\triangleright G &\\Rightarrow b \\cdot\\langle a\\rangle=\\langle a\\rangle \\cdot b . \\\\\n\n& \\Rightarrow \\quad b \\cdot a=a^j \\cdot b \\text { for some } j \\in \\mathbb{Z}.\n\n\\end{aligned}\n\n$$\n\n(hence for $a_1 b \\in G \\quad a^j b=b \\cdot a$ ).\n\n\\end{proof}"}
{"id": "Herstein|exercise_2_5_31", "formal_statement": "theorem exercise_2_5_31 {G : Type*} [comm_group G] [fintype G]\n {p m n : \u2115} (hp : nat.prime p) (hp1 : \u00ac p \u2223 m) (hG : card G = p^n*m)\n {H : subgroup G} [fintype H] (hH : card H = p^n) : \n characteristic H :=", "src_header": "import .common \n\nopen set function nat fintype real subgroup ideal polynomial submodule zsqrtd \nopen char_p mul_aut matrix\nopen_locale big_operators\nnoncomputable theory\n\n", "nl_statement": "Suppose that $G$ is an abelian group of order $p^nm$ where $p \\nmid m$ is a prime. If $H$ is a subgroup of $G$ of order $p^n$, prove that $H$ is a characteristic subgroup of $G$.", "nl_proof": "\\begin{proof}\n\n Let $G$ be an abelian group of order $p^n m$, such that $p \\nmid m$. Now, Given that $H$ is a subgroup of order $p^n$. Since $G$ is abelian $H$ is normal. Now we want to prove that $H$ is a characterestic subgroup, that is $\\phi(H)=H$ for any automorphism $\\phi$ of $G$. Now consider $\\phi(H)$. Clearly $|\\phi(H)|=p^n$. Suppose $\\phi(H) \\neq H$, then $|H \\cap \\phi(H)|=p^s$, where $s<n$. Consider $H \\phi(H)$, this is a subgroup of $G$ as $H$ is normal. Also $|H \\phi(H)|=\\frac{|H||\\phi(H)|}{|H \\cap \\phi(H)|}=\\frac{p^{2 n}}{p^s}=p^{2 n-s}$, where $2 n-s>n$. By lagrange's theorem then $p^{2 n-s}\\left|p^n m \\Longrightarrow p^{n-s}\\right| m \\Longrightarrow p \\mid m$-contradiction. So $\\phi(H)=H$, and $H$ is characterestic subgroup of $G$.\n\n\\end{proof}"}
{"id": "Herstein|exercise_2_5_43", "formal_statement": "theorem exercise_2_5_43 (G : Type*) [group G] [fintype G]\n (hG : card G = 9) :\n comm_group G :=", "src_header": "import .common \n\nopen set function nat fintype real subgroup ideal polynomial submodule zsqrtd \nopen char_p mul_aut matrix\nopen_locale big_operators\nnoncomputable theory\n\n", "nl_statement": "Prove that a group of order 9 must be abelian.", "nl_proof": "\\begin{proof}\n\n We use the result from problem 40 which is as follows: Suppose $G$ is a group, $H$ is a subgroup and $|G|=n$ and $n \\nmid\\left(i_G(H)\\right) !$. Then there exists a normal subgroup $\\$ K \\backslash$ neq $\\{$ e $\\} \\$$ and $K \\subseteq H$.\n\nSo, we have now a group $G$ of order 9. Suppose that $G$ is cyclic, then $G$ is abelian and there is nothing more to prove. Suppose that $G$ s not cyclic,then there exists an element $a$ of order 3 , and $A=\\langle a\\rangle$. Now $i_G(A)=3$, now $9 \\nmid 3$ !, hence by the above result there is a normal subgroup $K$, non-trivial and $K \\subseteq A$. But $|A|=3$, a prime order subgroup, hence has no non-trivial subgroup, so $K=A$. So $A$ is normal subgroup. Now since $G$ is not cyclic any non-identity element is of order 3.So Let $a(\\neq$ $e) \\in G$.Consider $A=\\langle a\\rangle$. As shown before $A$ is normal. $a$ commutes with any if its powers. Now Let $b \\in G$ such that $b \\notin A$. Then $b a b^{-1} \\in A$ and hence $b a b^{-1}=a^i$.This implies $a=b^3 a b^{-3}=a^{i^3} \\Longrightarrow a^{i^3-1}=e$. So, 3 divides $i^3-1$. Also by fermat's little theorem 3 divides $i^2-1$.So 3 divides $i-1$. But $0 \\leq i \\leq 2$. So $i=1$, is the only possibility and hence $a b=b a$. So $a \\in Z(G)$ as $b$ was arbitrary. Since $a$ was arbitrary $G=Z(G)$. Hence $G$ is abelian.\n\n\\end{proof}"}
{"id": "Herstein|exercise_2_5_52", "formal_statement": "theorem exercise_2_5_52 {G : Type*} [group G] [fintype G]\n (\u03c6 : G \u2243* G) {I : finset G} (hI : \u2200 x \u2208 I, \u03c6 x = x\u207b\u00b9)\n (hI1 : (0.75 : \u211a) * card G \u2264 card I) : \n \u2200 x : G, \u03c6 x = x\u207b\u00b9 \u2227 \u2200 x y : G, x*y = y*x :=", "src_header": "import .common \n\nopen set function nat fintype real subgroup ideal polynomial submodule zsqrtd \nopen char_p mul_aut matrix\nopen_locale big_operators\nnoncomputable theory\n\n", "nl_statement": "Let $G$ be a finite group and $\\varphi$ an automorphism of $G$ such that $\\varphi(x) = x^{-1}$ for more than three-fourths of the elements of $G$. Prove that $\\varphi(y) = y^{-1}$ for all $y \\in G$, and so $G$ is abelian.", "nl_proof": "\\begin{proof}\n\nLet us start with considering $b$ to be an arbitrary element in $A$. \n\n\n\n1. Show that $\\left|A \\cap\\left(b^{-1} A\\right)\\right|>\\frac{|G|}{2}$, where\n\n$$\n\nb^{-1} A=\\left\\{b^{-1} a \\mid a \\in A\\right\\}\n\n$$\n\nFirst notice that if we consider a map $f: A \\rightarrow b^{-1} A$ defined by $f(a)=b^{-1} a$, for all $a \\in A$, then $f$ is a 1-1 map and so $\\left|b^{-1} A\\right| \\geq|A|>\\frac{3}{4}|G|$. Now using inclusion-exclusion principle we have\n\n$$\n\n\\left|A \\cap\\left(b^{-1} A\\right)\\right|=|A|+\\left|b^{-1} A\\right|-\\left|A \\cup\\left(b^{-1} A\\right)\\right|>\\frac{3}{4}|G|+\\frac{3}{4}|G|-|G|=\\frac{1}{2}|G|\n\n$$\n\n2. Argue that $A \\cap\\left(b^{-1} A\\right) \\subseteq C(b)$, where $C(b)$ is the centralizer of $b$ in $G$.\n\n\n\nSuppose $x \\in A \\cap\\left(b^{-1} A\\right)$, that means, $x \\in A$ and $x \\in b^{-1} A$. Thus there exist an element $a \\in A$ such that $x=$ $b^{-1} a$, which gives us $x b=a \\in A$. Now notice that $x, b \\in A$ and $x b \\in A$, therefore we get\n\n$$\n\n\\phi(x b)=(x b)^{-1} \\Longrightarrow \\phi(x) \\phi(b)=(x b)^{-1} \\Longrightarrow x^{-1} b^{-1}=b^{-1} x^{-1} \\Longrightarrow x b=b x\n\n$$\n\nTherefore, we get $x b=b x$, for any $x \\in A \\cap\\left(b^{-1} A\\right)$, that means, $x \\in C(b)$.\n\n\n\n3. Argue that $C(b)=G$.\n\nWe know that centralizer of an element in a group $G$ is a subgroup (See Page 53). Therefore $C(b)$ is a subgroup of $G$. From statements $\\mathbf{1}$ and $\\mathbf{2}$, we have\n\n$$\n\n|C(b)| \\geq\\left|A \\cap\\left(b^{-1} A\\right)\\right|>\\frac{|G|}{2}\n\n$$\n\nWe need to use the following remark to argue $C(b)=G$ from the above step.\n\nRemark. Let $G$ be a finite group and $H$ be a subgroup with more then $|G| / 2$ elements then $H=G$.\n\n\n\nProof of Remark. Suppose $|H|=p$ Then by Lagrange Theorem, there exist an $n \\in \\mathbb{N}$, such that $|G|=n p$, as $|H|$ divide $|G|$. Now by hypothesis $p>\\frac{G]}{2}$ gives us,\n\n$$\n\np>\\frac{|G|}{2} \\Longrightarrow n p>\\frac{n|G|}{2} \\Longrightarrow n<2 \\Longrightarrow n=1\n\n$$\n\nTherefore we get $H=G$.\n\n\n\nNow notice that $C(b)$ is a subgroup of $G$ with $C(b)$ having more than $|G| / 2$ elements. Therefore, $C(b)=G$.\n\n\n\n4. Show that $A \\in Z(G)$.\n\n\n\nWe know that $x \\in Z(G)$ if and only if $C(a)=G$. Now notice that, for any $b \\in A$ we have $C(b)=G$. Therefore, every element of $A$ is in the center of $G$, that means, $A \\subseteq Z(G)$.\n\n\n\n5. 5how that $Z(G)=G$.\n\n\n\nAs it is given that $|A|>\\frac{3|G|}{4}$ and $A \\leq|Z(G)|$, therefore we get\n\n$$\n\n|Z(G)|>\\frac{3}{4}|G|>\\frac{1}{2}|G| .\n\n$$\n\nAs $Z(G)$ is a subgroup of $G$, so by the above Remark we have $Z(G)=G$. Hence $G$ is abelian.\n\n\n\n6. Finally show that $A=G$.\n\n\n\nFirst notice that $A$ is a subgroup of $G$. To show this let $p, q \\in A$. Then we have\n\n$$\n\n\\phi(p q)=\\phi(p) \\phi(q)=p^{-1} q^{-1}=(q p)^{-1}=(p q)^{-1}, \\quad \\text { As } G \\text { is abelian. }\n\n$$\n\nTherefore, $p q \\in A$ and so we have $A$ is a subgroup of $G$. Again by applying the above remark. we get $A=G$. Therefore we have\n\n$$\n\n\\phi(y)=y^{-1}, \\quad \\text { for all } y \\in G\n\n$$\n\n\n\n\\end{proof}"}
{"id": "Herstein|exercise_2_7_7", "formal_statement": "theorem exercise_2_7_7 {G : Type*} [group G] {G' : Type*} [group G']\n (\u03c6 : G \u2192* G') (N : subgroup G) [N.normal] : \n (map \u03c6 N).normal :=", "src_header": "import .common \n\nopen set function nat fintype real subgroup ideal polynomial submodule zsqrtd \nopen char_p mul_aut matrix\nopen_locale big_operators\nnoncomputable theory\n\n", "nl_statement": "If $\\varphi$ is a homomorphism of $G$ onto $G'$ and $N \\triangleleft G$, show that $\\varphi(N) \\triangleleft G'$.", "nl_proof": "\\begin{proof}\n\nWe first claim that $\\varphi(N)$ is a subgroup of $G'$. To see this, note that since $N$ is a subgroup of $G$, the identity element $e_G$ of $G$ belongs to $N$. Therefore, the element $\\varphi(e_G) \\in \\varphi(N)$, so $\\varphi(N)$ is a non-empty subset of $G'$.\n\n\n\nNow, let $a', b' \\in \\varphi(N)$. Then there exist elements $a, b \\in N$ such that $\\varphi(a) = a'$ and $\\varphi(b) = b'$. Since $N$ is a subgroup of $G$, we have $a, b \\in N$, so $ab^{-1} \\in N$. Thus, we have\n\n$$\\varphi(ab^{-1}) = \\varphi(a) \\varphi(b^{-1}) = a'b'^{-1} \\in \\varphi(N),$$\n\nwhich shows that $a', b' \\in \\varphi(N)$ implies $a'b'^{-1} \\in \\varphi(N)$. Therefore, $\\varphi(N)$ is a subgroup of $G'$.\n\n\n\nNext, we will show that $\\varphi(N)$ is a normal subgroup of $G'$. Let $\\varphi(N) = N'$, a subgroup of $G'$. Let $x' \\in G'$ and $h' \\in N'$. Since $\\varphi$ is onto, there exist elements $x \\in G$ and $h \\in N$ such that $\\varphi(x) = x'$ and $\\varphi(h) = h'$.\n\n\n\nSince $N$ is a normal subgroup of $G$, we have $xhx^{-1} \\in N$. Thus,\n\n$$\\varphi(xhx^{-1}) = \\varphi(x)\\varphi(h)\\varphi(x^{-1}) = x'h'x'^{-1} \\in \\varphi(N),$$\n\nwhich shows that $x' \\in G'$ and $h' \\in N'$ implies $x'h'x'^{-1} \\in \\varphi(N)$. Therefore, $\\varphi(N)$ is a normal subgroup of $G'$. This completes the proof.\n\n\\end{proof}"}
{"id": "Herstein|exercise_2_8_15", "formal_statement": "theorem exercise_2_8_15 {G H: Type*} [fintype G] [group G] [fintype H]\n [group H] {p q : \u2115} (hp : nat.prime p) (hq : nat.prime q) \n (h : p > q) (h1 : q \u2223 p - 1) (hG : card G = p*q) (hH : card G = p*q) :\n G \u2243* H :=", "src_header": "import .common \n\nopen set function nat fintype real subgroup ideal polynomial submodule zsqrtd \nopen char_p mul_aut matrix\nopen_locale big_operators\nnoncomputable theory\n\n", "nl_statement": "Prove that if $p > q$ are two primes such that $q \\mid p - 1$, then any two nonabelian groups of order $pq$ are isomorphic.", "nl_proof": "\\begin{proof}\n\n For a nonabelian group of order $p q$, the structure of the group $G$ is set by determining the relation $a b a^{-1}=b^{k^{\\frac{p-1}{q}}}$ for some generator $k$ of the cyclic group. Here we are using the fact that $k^{\\frac{p-1}{q}}$ is a generator for the unique subgroup of order $q$ in $U_p$ (a cyclic group of order $m$ has a unique subgroup of order $d$ for each divisor $d$ of $m$ ). The other possible generators of this subgroup are $k^{\\frac{l(p-1)}{q}}$ for each $1 \\leq l \\leq q-1$, so these give potentially new group structures. Let $G^{\\prime}$ be a group with an element $c$ of order $q$, an element $d$ of order $p$ with structure defined by the relation $c d c^{-1}=d^{k^{\\frac{l(p-1)}{q}}}$. We may then define\n\n$$\n\n\\begin{aligned}\n\n\\phi: G^{\\prime} & \\rightarrow G \\\\\n\nc & \\mapsto a^l \\\\\n\nd & \\mapsto b\n\n\\end{aligned}\n\n$$\n\nsince $c$ and $a^l$ have the same order and $b$ and $d$ have the same order this is a well defined function.\n\nSince\n\n$$\n\n\\begin{aligned}\n\n\\phi(c) \\phi(d) \\phi(c)^{-1} & =a^l b a^{-l} \\\\\n\n& =b^{\\left(k^{\\frac{p-1}{q}}\\right)^l} \\\\\n\n& =b^{k^{\\frac{l(p-1)}{q}}} \\\\\n\n& =\\phi(d)^{k^{\\frac{l(p-1)}{q}}}\n\n\\end{aligned}\n\n$$\n\n$\\phi\\left(c^i d^j\\right)=a^{l i} b^j=e$ only if $i=j=0$, so $\\phi$ is 1-to-l. Therefore $G$ and $G^{\\prime}$ are isomorphic and so up to isomorphism there is only one nonabelian group of order $p q$.\n\n\\end{proof}"}
{"id": "Herstein|exercise_2_10_1", "formal_statement": "theorem exercise_2_10_1 {G : Type*} [group G] (A : subgroup G) \n [A.normal] {b : G} (hp : nat.prime (order_of b)) :\n A \u2293 (closure {b}) = \u22a5 :=", "src_header": "import .common \n\nopen set function nat fintype real subgroup ideal polynomial submodule zsqrtd \nopen char_p mul_aut matrix\nopen_locale big_operators\nnoncomputable theory\n\n", "nl_statement": "Let $A$ be a normal subgroup of a group $G$, and suppose that $b \\in G$ is an element of prime order $p$, and that $b \\not\\in A$. Show that $A \\cap (b) = (e)$.", "nl_proof": "\\begin{proof}\n\nIf $b \\in G$ has order $p$, then $(b)$ is a cyclic group of order $p$. Since $A$ is a subgroup of $G$, we have $A \\cap (b)$ is a subgroup of $G$. Also, $A \\cap (b) \\subseteq (b)$. So $A \\cap (b)$ is a subgroup of $(b)$. Since $(b)$ is a cyclic group of order $p$, the only subgroups of $(b)$ are $(e)$ and $(b)$ itself.\n\n\n\nTherefore, either $A \\cap (b) = (e)$ or $A \\cap (b) = (b)$. If $A \\cap (b) = (e)$, then we are done. Otherwise, if $A \\cap (b) = (b)$, then $A \\subseteq (b)$. Since $A$ is a subgroup of $G$ and $A \\subseteq (b)$, it follows that $A$ is a subgroup of $(b)$.\n\n\n\nSince the only subgroups of $(b)$ are $(e)$ and $(b)$ itself, we have either $A = (e)$ or $A = (b)$. If $A = (e)$, then $A \\cap (b) = (e)$ and we are done. But if $A = (b)$, then $b \\in A$ as $b \\in (b)$, which contradicts our hypothesis that $b \\notin A$. So $A \\neq (b)$.\n\n\n\nHence $A \\cap (b) \\neq (b)$. Therefore, $A \\cap (b) = (e)$. This completes our proof.\n\n\\end{proof}"}
{"id": "Herstein|exercise_2_11_7", "formal_statement": "theorem exercise_2_11_7 {G : Type*} [group G] {p : \u2115} (hp : nat.prime p)\n {P : sylow p G} (hP : P.normal) : \n characteristic (P : subgroup G) :=", "src_header": "import .common \n\nopen set function nat fintype real subgroup ideal polynomial submodule zsqrtd \nopen char_p mul_aut matrix\nopen_locale big_operators\nnoncomputable theory\n\n", "nl_statement": "If $P \\triangleleft G$, $P$ a $p$-Sylow subgroup of $G$, prove that $\\varphi(P) = P$ for every automorphism $\\varphi$ of $G$.", "nl_proof": "\\begin{proof}\n\n Let $\\phi$ be an automorphism of $G$. Let $P$ be a normal sylow p-subgroup. $\\phi(P)$ is also a sylow-p subgroup. But since $P$ is normal, it is unique. Hence $\\phi(P)=P$.\n\n\\end{proof}"}
{"id": "Herstein|exercise_3_2_21", "formal_statement": "theorem exercise_3_2_21 {\u03b1 : Type*} [fintype \u03b1] {\u03c3 \u03c4: equiv.perm \u03b1} \n (h1 : \u2200 a : \u03b1, \u03c3 a = a \u2194 \u03c4 a \u2260 a) (h2 : \u03c4 \u2218 \u03c3 = id) : \n \u03c3 = 1 \u2227 \u03c4 = 1 :=", "src_header": "import .common \n\nopen set function nat fintype real subgroup ideal polynomial submodule zsqrtd \nopen char_p mul_aut matrix\nopen_locale big_operators\nnoncomputable theory\n\n", "nl_statement": "If $\\sigma, \\tau$ are two permutations that disturb no common element and $\\sigma \\tau = e$, prove that $\\sigma = \\tau = e$.", "nl_proof": "\\begin{proof}\n\n Note that $\\sigma \\tau=e$ can equivalentnly be phrased as $\\tau$ being the inverse of $\\sigma$. Our statement is then equivalent to the statement that an inverse of a nonidentity permutation disturbs at least one same element as that permutation. To prove this, let $\\sigma$ be a nonidentity permutation, then let $\\left(i_1 \\cdots i_n\\right)$ be a cycle in $\\sigma$. Then we have that\n\n$$\n\n\\sigma\\left(i_1\\right)=i_2, \\sigma\\left(i_2\\right)=i_2, \\ldots, \\sigma\\left(i_{n-1}\\right)=i_n, \\sigma\\left(i_n\\right)=i_1,\n\n$$\n\nbut then also\n\n$$\n\ni_1=\\tau\\left(i_2\\right), i_2=\\tau\\left(i_3\\right), \\ldots, i_{n-1}=\\tau\\left(i_n\\right), i_n=\\tau\\left(i_1\\right),\n\n$$\n\ni.e. its inverse disturbs $i_1, \\ldots, i_n$.\n\n\\end{proof}"}
{"id": "Herstein|exercise_4_1_34", "formal_statement": "theorem exercise_4_1_34 : equiv.perm (fin 3) \u2243* general_linear_group (fin 2) (zmod 2) :=", "src_header": "import .common \n\nopen set function nat fintype real subgroup ideal polynomial submodule zsqrtd \nopen char_p mul_aut matrix\nopen_locale big_operators\nnoncomputable theory\n\n", "nl_statement": "Let $T$ be the group of $2\\times 2$ matrices $A$ with entries in the field $\\mathbb{Z}_2$ such that $\\det A$ is not equal to 0. Prove that $T$ is isomorphic to $S_3$, the symmetric group of degree 3.", "nl_proof": "\\begin{proof}\n\n The order of $T$ is $2^4-2^3-2^2+2=6$; we now find those six matrices:\n\n$$\n\n\\begin{array}{ll}\n\nA_1=\\left(\\begin{array}{ll}\n\n1 & 0 \\\\\n\n0 & 1\n\n\\end{array}\\right), & A_2=\\left(\\begin{array}{ll}\n\n0 & 1 \\\\\n\n1 & 0\n\n\\end{array}\\right) \\\\\n\nA_3=\\left(\\begin{array}{ll}\n\n1 & 0 \\\\\n\n1 & 1\n\n\\end{array}\\right), & A_4=\\left(\\begin{array}{ll}\n\n1 & 1 \\\\\n\n0 & 1\n\n\\end{array}\\right) \\\\\n\nA_5=\\left(\\begin{array}{ll}\n\n0 & 1 \\\\\n\n1 & 1\n\n\\end{array}\\right), & A_6=\\left(\\begin{array}{ll}\n\n1 & 1 \\\\\n\n1 & 0\n\n\\end{array}\\right)\n\n\\end{array}\n\n$$\n\nwith orders $1,2,2,2,3,3$ respectively.\n\nNote that $S_3$ is composed of elements\n\n$$\n\n\\text{ id, (1 2), (1 3), (2 3), (1 2 3), (1 3 2)} \n\n$$\n\nwith orders 1, 2, 2, 2, 3, 3 respectively. Also note that, by Problem 17 of generate $S_3$. We also have that $\\left(\\begin{array}{llll}1 & 3 & 2\\end{array}\\right)=\\left(\\begin{array}{llll}1 & 2 & 3\\end{array}\\right)\\left(\\begin{array}{lll}1 & 2 & 3\\end{array}\\right)$, that $\\left(\\begin{array}{lll}1 & 3\\end{array}\\right)=\\left(\\begin{array}{lll}1 & 2 & 3\\end{array}\\right)\\left(\\begin{array}{ll}1 & 2\\end{array}\\right)$, $\\left(\\begin{array}{ll}1 & 2\\end{array}\\right)\\left(\\begin{array}{lll}1 & 2 & 3\\end{array}\\right)=\\left(\\begin{array}{ll}2 & 3\\end{array}\\right)$ and $\\left(\\begin{array}{lll}1 & 2\\end{array}\\right)\\left(\\begin{array}{ll}1 & 2\\end{array}\\right)=\\mathrm{id}$\n\n\n\nNow we can check that $\\tau\\left(A_2\\right)=\\left(\\begin{array}{ll}1 & 2\\end{array}\\right), \\tau\\left(A_5\\right)=\\left(\\begin{array}{lll}1 & 2 & 3\\end{array}\\right)$ induces an isomorphism. We compute\n\n$$\n\n\\begin{aligned}\n\n& \\tau\\left(A_1\\right)=\\tau\\left(A_2 A_2\\right)=\\tau\\left(A_2\\right) \\tau\\left(A_2\\right)=\\mathrm{id} \\\\\n\n& \\tau\\left(A_3\\right)=\\tau\\left(A_5 A_2\\right)=\\tau\\left(A_5\\right) \\tau\\left(A_2\\right)=\\left(\\begin{array}{llll}\n\n1 & 2 & 3\n\n\\end{array}\\right)\\left(\\begin{array}{lll}\n\n1 & 2\n\n\\end{array}\\right)=\\left(\\begin{array}{ll}\n\n1 & 3\n\n\\end{array}\\right) \\\\\n\n& \\tau\\left(A_4\\right)=\\tau\\left(A_2 A_5\\right)=\\tau\\left(A_2\\right) \\tau\\left(A_5\\right)=\\left(\\begin{array}{lll}\n\n1 & 2\n\n\\end{array}\\right)\\left(\\begin{array}{lll}\n\n1 & 2 & 3\n\n\\end{array}\\right)=\\left(\\begin{array}{ll}\n\n2 & 3\n\n\\end{array}\\right) \\\\\n\n& \\tau\\left(A_6\\right)=\\tau\\left(A_5 A_5\\right)=\\tau\\left(A_5\\right) \\tau\\left(A_5\\right)=\\left(\\begin{array}{lll}\n\n1 & 3 & 2\n\n\\end{array}\\right)\n\n\\end{aligned}\n\n$$\n\nThus we see that $\\tau$ extendeds to an isomorphism, since $A_2$ and $A_5$ generate $T$, so that $\\tau\\left(A_i A_j\\right)=\\tau\\left(A_i\\right) \\tau\\left(A_j\\right)$ follows from writing $A_i$ and $A_j$ in terms of $A_2$ and $A_5$ and using the equlities and relations shown above.\n\n\\end{proof}"}
{"id": "Herstein|exercise_4_2_6", "formal_statement": "theorem exercise_4_2_6 {R : Type*} [ring R] (a x : R) \n (h : a ^ 2 = 0) : a * (a * x + x * a) = (x + x * a) * a :=", "src_header": "import .common \n\nopen set function nat fintype real subgroup ideal polynomial submodule zsqrtd \nopen char_p mul_aut matrix\nopen_locale big_operators\nnoncomputable theory\n\n", "nl_statement": "If $a^2 = 0$ in $R$, show that $ax + xa$ commutes with $a$.", "nl_proof": "\\begin{proof}\n\nWe need to show that\n\n$$\n\na(a x+x a)=(a x+x a) a \\text { for } a, x \\in R .\n\n$$\n\nNow,\n\n$$\n\n\\begin{gathered}\n\na(a x+x a)=a(a x)+a(x a) \\\\\n\n=a^2 x+a x a \\\\\n\n=0+a x a=a x a .\n\n\\end{gathered}\n\n$$\n\nAgain,\n\n$$\n\n\\begin{gathered}\n\n(a x+x a) a=(a x) a+(x a) a \\\\\n\n=a x a+x a^2 \\\\\n\n=a x a+0=a x a .\n\n\\end{gathered}\n\n$$\n\nIt follows that,\n\n$$\n\na(a x+x a)=(a x+x a) a, \\text { for } x, a \\in R .\n\n$$\n\nThis shows that $a x+x a$ commutes with $a$. This completes the proof.\n\n\\end{proof}"}
{"id": "Herstein|exercise_4_3_1", "formal_statement": "theorem exercise_4_3_1 {R : Type*} [comm_ring R] (a : R) :\n \u2203 I : ideal R, {x : R | x*a=0} = I :=", "src_header": "import .common \n\nopen set function nat fintype real subgroup ideal polynomial submodule zsqrtd \nopen char_p mul_aut matrix\nopen_locale big_operators\nnoncomputable theory\n\n", "nl_statement": "If $R$ is a commutative ring and $a \\in R$, let $L(a) = \\{x \\in R \\mid xa = 0\\}$. Prove that $L(a)$ is an ideal of $R$.", "nl_proof": "\\begin{proof}\n\n First, note that if $x \\in L(a)$ and $y \\in L(a)$ then $x a=0$ and $y a=0$, so that\n\n$$\n\n\\begin{aligned}\n\nx a-y a & =0 \\\\\n\n(x-y) a & =0,\n\n\\end{aligned}\n\n$$\n\ni.e. $L(a)$ is an additive subgroup of $R$. (We have used the criterion that $H$ is a subgroup of $G$ if for any $h_1, h_2 \\in H$ we have that $h_1 h_2^{-1} \\in H$. \n\n\n\nNow we prove the conclusion. Let $r \\in R$ and $b \\in L(a)$, then $b a=0$, and so $x b a=0$ which by associativity of multiplication in $R$ is equivalent to\n\n$$\n\n(x b) a=0,\n\n$$\n\nso that $x b \\in L(a)$. Since $R$ is commutative, (1) implies that $(bx)a=0$, so that $b x \\in L(a)$, which concludes the proof that $L(a)$ is an ideal.\n\n\\end{proof}"}
{"id": "Herstein|exercise_4_4_9", "formal_statement": "theorem exercise_4_4_9 (p : \u2115) (hp : nat.prime p) :\n (\u2203 S : finset (zmod p), S.card = (p-1)/2 \u2227 \u2203 x : zmod p, x^2 = p) \u2227 \n (\u2203 S : finset (zmod p), S.card = (p-1)/2 \u2227 \u00ac \u2203 x : zmod p, x^2 = p) :=", "src_header": "import .common \n\nopen set function nat fintype real subgroup ideal polynomial submodule zsqrtd \nopen char_p mul_aut matrix\nopen_locale big_operators\nnoncomputable theory\n\n", "nl_statement": "Show that $(p - 1)/2$ of the numbers $1, 2, \\ldots, p - 1$ are quadratic residues and $(p - 1)/2$ are quadratic nonresidues $\\mod p$.", "nl_proof": "\\begin{proof}\n\n To find all the quadratic residues $\\bmod p$ among the integers $1,2, \\ldots, p-1$, we compute the least positive residues modulo $p$ of the squares of the integers $1,2, \\ldots, p-1\\}$.\n\n\n\nSince there are $p-1$ squares to consider, and since each congruence $x^2 \\equiv a (\\bmod p)$ has either zero or two solutions, there must be exactly $\\frac{(p-1)}{2}$ quadratic residues mod $p$ among the integers $1,2, \\ldots, p-1$.\n\nThe remaining\n\n$$\n\n(p-1)-\\frac{(p-1)}{2}=\\frac{(p-1)}{2}\n\n$$\n\npositive integers less than $p-1$ are quadratic non-residues of $\\bmod p$.\n\n\\end{proof}"}
{"id": "Herstein|exercise_4_5_23", "formal_statement": "theorem exercise_4_5_23 {p q: polynomial (zmod 7)} \n (hp : p = X^3 - 2) (hq : q = X^3 + 2) : \n irreducible p \u2227 irreducible q \u2227 \n (nonempty $ polynomial (zmod 7) \u29f8 ideal.span ({p} : set $ polynomial $ zmod 7) \u2243+*\n polynomial (zmod 7) \u29f8 ideal.span ({q} : set $ polynomial $ zmod 7)) :=", "src_header": "import .common \n\nopen set function nat fintype real subgroup ideal polynomial submodule zsqrtd \nopen char_p mul_aut matrix\nopen_locale big_operators\nnoncomputable theory\n\n", "nl_statement": "Let $F = \\mathbb{Z}_7$ and let $p(x) = x^3 - 2$ and $q(x) = x^3 + 2$ be in $F[x]$. Show that $p(x)$ and $q(x)$ are irreducible in $F[x]$ and that the fields $F[x]/(p(x))$ and $F[x]/(q(x))$ are isomorphic.", "nl_proof": "\\begin{proof}\n\n We have that $p(x)$ and $q(x)$ are irreducible if they have no roots in $\\mathbb{Z}_7$, which can easily be checked. E.g. for $p(x)$ we have that $p(0)=5, p(1)=6, p(2)=6, p(3)=4, p(4)=6$, $p(5)=4, p(6)=4$, and similarly for $q(x)$.\n\n\n\nWe have that every element of $F[x] /(p(x))$ is equal to $a x^2+b x+c+(p(x))$, and likewise for $F[x] /(q(x))$. We consider a map $\\tau$ : $F[x] /(p(x)) \\rightarrow F[x] /(q(x))$ given by\n\n$$\n\n\\tau\\left(a x^2+b x+c+(p(x))\\right)=a x^2-b x+c+(q(x)) .\n\n$$\n\nThis map is obviously onto, and since $|F[x] /(p(x))|=|F[x] /(q(x))|=7^3$ by Problem 16, it is also one-to-one. We claim that it is a homomorphism. Additivity of $\\tau$ is immediate by the linearity of addition of polynomial coefficient, so we just have to check the multiplicativity; if $n=a x^2+b x+$ $c+(p(x))$ and $m=d x^2+e x+f+(p(x))$ then\n\n$$\n\n\\begin{aligned}\n\n\\tau(n m) & =\\tau\\left(a d x^4+(a e+b d) x^3+(a f+b e+c d) x^2+(b f+c e) x+c f+(p(x))\\right) \\\\\n\n& =\\tau\\left(2 a d x+2(a e+b d)+(a f+b e+c d) x^2+(b f+c e) x+c f+(p(x))\\right) \\\\\n\n& =\\tau\\left((a f+b e+c d) x^2+(b f+c e+2 a d) x+(c f+2 a e+2 b d)+(p(x))\\right) \\\\\n\n& =(a f+b e+c d) x^2-(b f+c e+2 a d) x+c f+2 a e+2 b d+(q(x)) \\\\\n\n& =a d x^4-(a e+b d) x^3+(a f+b e+c d) x^2-(b f+c e) x+c f+(q(x)) \\\\\n\n& =\\left(a x^2-b x+c+(q(x))\\right)\\left(d x^2-e x+f+(q(x))\\right) \\\\\n\n& =\\tau(n) \\tau(m) .\n\n\\end{aligned}\n\n$$\n\nwhere in the second equality we used that $x^3+p(x)=2+p(x)$ and in the fifth we used that $x^3+$ $q(x)=-2+q(x)$\n\n\\end{proof}"}
{"id": "Herstein|exercise_4_6_2", "formal_statement": "theorem exercise_4_6_2 : irreducible (X^3 + 3*X + 2 : polynomial \u211a) :=", "src_header": "import .common \n\nopen set function nat fintype real subgroup ideal polynomial submodule zsqrtd \nopen char_p mul_aut matrix\nopen_locale big_operators\nnoncomputable theory\n\n", "nl_statement": "Prove that $f(x) = x^3 + 3x + 2$ is irreducible in $Q[x]$.", "nl_proof": "\\begin{proof} \n\nLet us assume that $f(x)$ is reducible over $\\mathbb{Q}[x]$.\n\nThen there exists a rational root of $f(x)$.\n\nLet $p / q$ be a rational root of $f(x)$, where $\\operatorname{gcd}(p, q)=1$.\n\nThen $f(p / q)=0$.\n\nNow,\n\n$$\n\n\\begin{aligned}\n\n& f(p / q)=(p / q)^3+3(p / q)+2 \\\\\n\n\\Longrightarrow & (p / q)^3+3(p / q)+2=0 \\\\\n\n\\Longrightarrow & p^3+3 p q^2=-2 q^3 \\\\\n\n\\Longrightarrow & p\\left(p^2+3 q^2\\right)=-q^3\n\n\\end{aligned}\n\n$$\n\nIt follows that, $p$ divides $q$ which is a contradiction to the fact that $\\operatorname{gcd}(p, q)=1$.\n\nThis implies that $f(x)$ has no rational root.\n\nNow we know that, a polynomial of degree two or three over a field $F$ is reducible if and only if it has a root in $F$.\n\nNow $f(x)$ is a 3 degree polynomial having no root in $\\mathbb{Q}$.\n\nSo, $f(x)$ is irreducible in $\\mathbb{Q}[x]$.\n\nThis completes the proof.\n\n\\end{proof}"}
{"id": "Herstein|exercise_5_1_8", "formal_statement": "theorem exercise_5_1_8 {p m n: \u2115} {F : Type*} [field F] \n (hp : nat.prime p) (hF : char_p F p) (a b : F) (hm : m = p ^ n) : \n (a + b) ^ m = a^m + b^m :=", "src_header": "import .common \n\nopen set function nat fintype real subgroup ideal polynomial submodule zsqrtd \nopen char_p mul_aut matrix\nopen_locale big_operators\nnoncomputable theory\n\n", "nl_statement": "If $F$ is a field of characteristic $p \\neq 0$, show that $(a + b)^m = a^m + b^m$, where $m = p^n$, for all $a, b \\in F$ and any positive integer $n$.", "nl_proof": "\\begin{proof}\n\n Since $F$ is of characteristic $p$ and we have considered arbitrary two elements $a, b$ in $F$ we have\n\n$$\n\n\\begin{aligned}\n\n& p a=p b=0 \\\\\n\n& \\Longrightarrow p^n a=p^n b=0 \\\\\n\n& \\Longrightarrow m a=m b=0 \\text {. } \\\\\n\n&\n\n\\end{aligned}\n\n$$\n\nNow we know from Binomial Theorem that\n\n$$\n\n(a+b)^m=\\sum_{i=0}^m\\left(\\begin{array}{c}\n\nm \\\\\n\ni\n\n\\end{array}\\right) a^i b^{m-i}\n\n$$\n\nHere\n\n$$\n\n\\left(\\begin{array}{c}\n\nm \\\\\n\ni\n\n\\end{array}\\right)=\\frac{m !}{i !(m-i) !} .\n\n$$\n\nNow we know that for any integer $n$ and any integer $k$ satisfying $1 \\leq k<n, n$ always divides $\\left(\\begin{array}{l}n \\\\ k\\end{array}\\right)$. So in our case for $i$ in the range $1 \\leq i<m, m$ divides $\\left(\\begin{array}{c}m \\\\ i\\end{array}\\right)$. It follows that $p$ divides $\\left(\\begin{array}{c}m \\\\ i\\end{array}\\right)$, for $i$ satisfying $1 \\leq i<m$, since $m=p^n$ for any integer $n$. Therefore other than the terms $a^m$ and $b^m$ in the expansion $\\sum_{i=0}^m\\left(\\begin{array}{c}m \\\\ i\\end{array}\\right) a^i b^{m-i}$ will vanish due to char $p$ nature of $F$.\n\nHence we have\n\n$$\n\n\\sum_{i=0}^m\\left(\\begin{array}{c}\n\nm \\\\\n\ni\n\n\\end{array}\\right) a^i b^{m-i}=a^m+b^m\n\n$$\n\nThis follows that, for all $a, b \\in F$\n\n$$\n\n(a+b)^m=a^m+b^m .\n\n$$\n\nThis completes the proof.\n\n\\end{proof}"}
{"id": "Herstein|exercise_5_3_7", "formal_statement": "theorem exercise_5_3_7 {K : Type*} [field K] {F : subfield K} \n {a : K} (ha : is_algebraic F (a ^ 2)) : is_algebraic F a :=", "src_header": "import .common \n\nopen set function nat fintype real subgroup ideal polynomial submodule zsqrtd \nopen char_p mul_aut matrix\nopen_locale big_operators\nnoncomputable theory\n\n", "nl_statement": "If $a \\in K$ is such that $a^2$ is algebraic over the subfield $F$ of $K$, show that a is algebraic over $F$.", "nl_proof": "\\begin{proof}\n\n Since $a^2$ is algebraic over $F$, there exist a non-zero polynomial $f(x)$ in $F[x]$ such that $f\\left(a^2\\right)=0$. Consider a new polynomial $g(x)$ defined as $g(x)=f\\left(x^2\\right)$. Clearly $g(x) \\in F[x]$ and $g(a)=f\\left(a^2\\right)= 0$.\n\n\\end{proof}"}
{"id": "Herstein|exercise_5_4_3", "formal_statement": "theorem exercise_5_4_3 {a : \u2102} {p : \u2102 \u2192 \u2102} \n (hp : p = \u03bb x, x^5 + real.sqrt 2 * x^3 + real.sqrt 5 * x^2 + \n real.sqrt 7 * x + 11)\n (ha : p a = 0) : \n \u2203 p : polynomial \u2102 , p.degree < 80 \u2227 a \u2208 p.roots \u2227 \n \u2200 n : p.support, \u2203 a b : \u2124, p.coeff n = a / b :=", "src_header": "import .common \n\nopen set function nat fintype real subgroup ideal polynomial submodule zsqrtd \nopen char_p mul_aut matrix\nopen_locale big_operators\nnoncomputable theory\n\n", "nl_statement": "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.", "nl_proof": "\\begin{proof}\n\n Given $a \\in \\mathbb{C}$ such that $p(a)=0$, where\n\n$$\n\np(x)=x^5+\\sqrt{2} x^3+\\sqrt{5} x^2+\\sqrt{7} x+\\sqrt{11}\n\n$$\n\nHere, we note that $p(x) \\in \\mathbb{Q}(\\sqrt{2}, \\sqrt{5}, \\sqrt{7}, \\sqrt{11})$ and\n\n$$\n\n\\begin{aligned}\n\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\n& \\cdot[\\mathbb{Q}(\\sqrt{2}, \\sqrt{5}): \\mathbb{Q}(\\sqrt{2})] \\cdot[\\mathbb{Q}(\\sqrt{2}): \\mathbb{Q}] \\\\\n\n& =2 \\cdot 2 \\cdot 2 \\cdot 2 \\\\\n\n& =16\n\n\\end{aligned}\n\n$$\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$$\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\n$$\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$$\n\n[Q(\\sqrt{2}, \\sqrt{5}, \\sqrt{7}, \\sqrt{11}, a): \\mathbb{Q}] \\leq 16 \\cdot 5=80\n\n$$\n\n\\end{proof}"}
{"id": "Herstein|exercise_5_6_14", "formal_statement": "theorem exercise_5_6_14 {p m n: \u2115} (hp : nat.prime p) {F : Type*} \n [field F] [char_p F p] (hm : m = p ^ n) : \n card (root_set (X ^ m - X : polynomial F) F) = m :=", "src_header": "import .common \n\nopen set function nat fintype real subgroup ideal polynomial submodule zsqrtd \nopen char_p mul_aut matrix\nopen_locale big_operators\nnoncomputable theory\n\n", "nl_statement": "If $F$ is of characteristic $p \\neq 0$, show that all the roots of $x^m - x$, where $m = p^n$, are distinct.", "nl_proof": "\\begin{proof}\n\n Let us consider $f(x)=x^m-x$. Then $f \\in F[x]$.\n\nClaim: $f(x)$ has a multiple root in some extension of $F$ if and only if $f(x)$ is not relatively prime to its formal derivative, $f^{\\prime}(x)$. \n\n\n\nProof of the Claim: Let us assume that $f(x)$ has a multiple root in some extension of $F$. Let $y$ be a multiple root of $f(x)$. Then over a splitting field, we have\n\n$$\n\nf(x)=(x-y)^n g(x), \\text { for some integer } n \\geq 2 .\n\n$$\n\nHere $g(x)$ is a polynomial such that $g(y) \\neq 0$. Now taking derivative of $f$ we get\n\n$$\n\nf^{\\prime}(x)=n \\cdot(x-y)^{n-1} g(x)+(x-y)^n g^{\\prime}(x)\n\n$$\n\nhere $g^{\\prime}(x)$ implies derivative of $g$ with respect to $x$. Since we have $n \\geq 2$, this implies $(n-1) \\geq 1$. Hence, (1) shows that $f^{\\prime}(x)$ has $y$ as a root. Therefore, $f(x)$ is not relatively prime to $f^{\\prime}(x)$. We now prove the other direction.\n\nConversely, let us assume that $f(x)$ is not relatively prime to $f^{\\prime}(x)$. Let $y$ is a root of both $f(x)$ and $f^{\\prime}(x)$. Since $y$ is a root of $f(x)$, we can write\n\n$$\n\nf(x)=(x-y) \\cdot g(x)\n\n$$\n\nfor some polynomial $g(x)$. then taking derivative of $f(x)$ we have\n\n$$\n\nf^{\\prime}(x)=g(x)+(x-y) \\cdot g^{\\prime}(x)\n\n$$\n\nwhere $g^{\\prime}(x)$ is the derivative of $g(x)$ with respect to $x$. Since $y$ is a root of $f^{\\prime}(x)$ also we have\n\n$$\n\nf^{\\prime}(y)=0\n\n$$\n\nThen we have\n\n$$\n\n\\begin{aligned}\n\n& f^{\\prime}(y)=g(y)+(y-y) \\cdot g^{\\prime}(y) \\\\\n\n\\Longrightarrow & f^{\\prime}(y)=g(y) \\\\\n\n\\Longrightarrow & g(y)=0 .\n\n\\end{aligned}\n\n$$\n\nThis implies $y$ is a root of $g(x)$ also. Therefore we have\n\n$$\n\ng(x)=(x-y) \\cdot h(x)\n\n$$\n\nfor some polynomial $h(x)$. Now form (2) we have\n\n$$\n\nf(x)=(x-y)^2 \\cdot h(x) .\n\n$$\n\nThis follows that $y$ is a multiple root of $f(x)$. Therefore, $f(x)$ has a multiple root in some extension of the field $F$. This completes the proof of the Claim.\n\n\n\nIn our case, $f(x)=x^m-x$, where $m=p^n$. Now we calculate the derivative of $f$. That is\n\n$$\n\nf^{\\prime}(x)=m x^{m-1}-1=-1(\\bmod p) .\n\n$$\n\nBy the above condition it follows that, $f^{\\prime}$ has no root same as $f$, that is, $f(x)$ and $f^{\\prime}(x)$ are relatively prime. Hence, $f(x)$ has no multiple root in $F$. Since $f(x)=x^m-x$ is a polynomial of degree $m$, it follows that $f(x)$ has $m$ distinct roots in $F$, where $m=p^n$. This completes the proof.\n\n\\end{proof}"}
{"id": "Artin|exercise_2_3_2", "formal_statement": "theorem exercise_2_3_2 {G : Type*} [group G] (a b : G) :\n \u2203 g : G, b* a = g * a * b * g\u207b\u00b9 :=", "src_header": "import .common \n\nopen function fintype subgroup ideal polynomial submodule zsqrtd char_p\nopen_locale big_operators\nnoncomputable theory\n\n", "nl_statement": "Prove that the products $a b$ and $b a$ are conjugate elements in a group.", "nl_proof": "\\begin{proof}\n\n We have that $(a^{-1})ab(a^{-1})^{-1} = ba$. \n\n\\end{proof}"}
{"id": "Artin|exercise_2_8_6", "formal_statement": "theorem exercise_2_8_6 {G H : Type*} [group G] [group H] :\n center (G \u00d7 H) \u2243* (center G) \u00d7 (center H) :=", "src_header": "import .common \n\nopen function fintype subgroup ideal polynomial submodule zsqrtd char_p\nopen_locale big_operators\nnoncomputable theory\n\n", "nl_statement": "Prove that the center of the product of two groups is the product of their centers.", "nl_proof": "\\begin{proof}\n\n We have that $(g_1, g_2)\\cdot (h_1, h_2) = (h_1, h_2)\\cdot (g_1, g_2)$ if and only if $g_1h_1 = h_1g_1$ and $g_2h_2 = h_2g_2$. \n\n\\end{proof}"}
{"id": "Artin|exercise_3_2_7", "formal_statement": "theorem exercise_3_2_7 {F : Type*} [field F] {G : Type*} [field G]\n (\u03c6 : F \u2192+* G) : injective \u03c6 :=", "src_header": "import .common \n\nopen function fintype subgroup ideal polynomial submodule zsqrtd char_p\nopen_locale big_operators\nnoncomputable theory\n\n", "nl_statement": "Prove that every homomorphism of fields is injective.", "nl_proof": "\\begin{proof}\n\n Suppose $f(a)=f(b)$, then $f(a-b)=0=f(0)$. If $u=(a-b) \\neq 0$, then $f(u) f\\left(u^{-1}\\right)=f(1)=1$, but that means that $0 f\\left(u^{-1}\\right)=1$, which is impossible. Hence $a-b=0$ and $a=b$.\n\n\\end{proof}"}
{"id": "Artin|exercise_3_7_2", "formal_statement": "theorem exercise_3_7_2 {K V : Type*} [field K] [add_comm_group V]\n [module K V] {\u03b9 : Type*} [fintype \u03b9] (\u03b3 : \u03b9 \u2192 submodule K V)\n (h : \u2200 i : \u03b9, \u03b3 i \u2260 \u22a4) :\n (\u22c2 (i : \u03b9), (\u03b3 i : set V)) \u2260 \u22a4 :=", "src_header": "import .common \n\nopen function fintype subgroup ideal polynomial submodule zsqrtd char_p\nopen_locale big_operators\nnoncomputable theory\n\n", "nl_statement": "Let $V$ be a vector space over an infinite field $F$. Prove that $V$ is not the union of finitely many proper subspaces.", "nl_proof": "\\begin{proof}\n\n If $V$ is the set-theoretic union of $n$ proper subspaces $W_i$ ( $1 \\leq i \\leq n$ ), then $|F| \\leq n-1$.\n\nProof. We may suppose no $W_i$ is contained in the union of the other subspaces. Let $u \\in W_i, \\quad u \\notin \\bigcup_{j \\neq i} W_j$ and $v \\notin W_i$.\n\nThen $(v+F u) \\cap W_i=\\varnothing$ and $(v+F u) \\cap W_j(j \\neq i)$ contains at most one vector since otherwise $W_j$ would contain $u$. Hence\n\n$$\n\n|v+F u|=|F| \\leq n-1 .\n\n$$\n\nCorollary: Avoidance lemma for vector spaces.\n\nLet $E$ be a vector space over an infinite field. If a subspace is contained in a finite union of subspaces, it is contained in one of them.\n\n\\end{proof}"}
{"id": "Artin|exercise_6_4_2", "formal_statement": "theorem exercise_6_4_2 {G : Type*} [group G] [fintype G] {p q : \u2115}\n (hp : prime p) (hq : prime q) (hG : card G = p*q) :\n is_simple_group G \u2192 false :=", "src_header": "import .common \n\nopen function fintype subgroup ideal polynomial submodule zsqrtd char_p\nopen_locale big_operators\nnoncomputable theory\n\n", "nl_statement": "Prove that no group of order $p q$, where $p$ and $q$ are prime, is simple.", "nl_proof": "\\begin{proof}\n\n If $|G|=n=p q$ then the only two Sylow subgroups are of order $p$ and $q$.\n\nFrom Sylow's third theorem we know that $n_p \\mid q$ which means that $n_p=1$ or $n_p=q$.\n\nIf $n_p=1$ then we are done (by a corollary of Sylow's theorem)\n\nIf $n_p=q$ then we have accounted for $q(p-1)=p q-q$ elements of $G$ and so there is only one group of order $q$ and again we are done.\n\n\\end{proof}"}
{"id": "Artin|exercise_6_4_12", "formal_statement": "theorem exercise_6_4_12 {G : Type*} [group G] [fintype G]\n (hG : card G = 224) :\n is_simple_group G \u2192 false :=", "src_header": "import .common \n\nopen function fintype subgroup ideal polynomial submodule zsqrtd char_p\nopen_locale big_operators\nnoncomputable theory\n\n", "nl_statement": "Prove that no group of order 224 is simple.", "nl_proof": "\\begin{proof}\n\n The following proves there must exist a normal Sylow 2 -subgroup of order 32 ,\n\nSuppose there are $n_2=7$ Sylow 2 -subgroups in $G$. Making $G$ act on the set of these Sylow subgroups by conjugation (Mitt wrote about this but on the set of the other Sylow subgroups, which gives no contradiction), we get a homomorphism $G \\rightarrow S_7$ which must be injective if $G$ is simple (why?).\n\n\n\nBut this cannot be since then we would embed $G$ into $S_7$, which is impossible since $|G| \\nmid 7 !=\\left|S_7\\right|$ (why?)\n\n\\end{proof}"}
{"id": "Artin|exercise_10_1_13", "formal_statement": "theorem exercise_10_1_13 {R : Type*} [ring R] {x : R}\n (hx : is_nilpotent x) : is_unit (1 + x) :=", "src_header": "import .common \n\nopen function fintype subgroup ideal polynomial submodule zsqrtd char_p\nopen_locale big_operators\nnoncomputable theory\n\n", "nl_statement": "An element $x$ of a ring $R$ is called nilpotent if some power of $x$ is zero. Prove that if $x$ is nilpotent, then $1+x$ is a unit in $R$.", "nl_proof": "\\begin{proof}\n\n If $x^n=0$, then\n\n$$\n\n(1+x)\\left(\\sum_{k=0}^{n-1}(-1)^k x^k\\right)=1+(-1)^{n-1} x^n=1 .\n\n$$\n\n\\end{proof}"}
{"id": "Artin|exercise_10_6_7", "formal_statement": "theorem exercise_10_6_7 {I : ideal gaussian_int}\n (hI : I \u2260 \u22a5) : \u2203 (z : I), z \u2260 0 \u2227 (z : gaussian_int).im = 0 :=", "src_header": "import .common \n\nopen function fintype subgroup ideal polynomial submodule zsqrtd char_p\nopen_locale big_operators\nnoncomputable theory\n\n", "nl_statement": "Prove that every nonzero ideal in the ring of Gauss integers contains a nonzero integer.", "nl_proof": "\\begin{proof}\n\n Let $I$ be some nonzero ideal. Then there exists some $z \\in \\mathbb{Z}[i], z \\neq 0$ such that $z \\in I$. We know that $z=a+b i$, for some $a, b \\in \\mathbb{Z}$. We consider three cases:\n\n1. If $b=0$, then $z=a$, so $z \\in \\mathbb{Z} \\cap I$, and $z \\neq 0$, so the statement of the exercise holds.\n\n2. If $a=0$, then $z=i b$. Since $z \\neq 0$, we conclude that $b \\neq 0$. Since $I$ is an ideal in $\\mathbb{Z}[i]$, and $i \\in \\mathbb{Z}[i]$, we conclude that $i z \\in I$. Furthermore, $i z=-b \\in \\mathbb{Z}$. Thus, $i z$ is a nonzero integer which is in $I$.\n\n3. Let $a \\neq 0$ and $b \\neq 0$. Since $I$ is an ideal and $z \\in I$, we conclude that $z^2 \\in I$; that is,\n\n$$\n\n(a+b i)^2=a^2-b^2+2 a b i \\in I\n\n$$\n\nFurthermore, since $-2 a \\in \\mathbb{Z}[i]$, and $z \\in I$ and $I$ is an ideal, $-2 a z \\in I$; that is,\n\n$$\n\n-2 a z=-2 a(a+b i)=-2 a^2-2 a b i \\in I\n\n$$\n\nSince $I$ is closed under addition,\n\n$$\n\n\\left(a^2-b^2+2 a b i\\right)+\\left(-2 a^2-2 a b i\\right) \\in I \\Longrightarrow-a^2-b^2 \\in I\n\n$$\n\nNotice that $-a^2-b^2 \\neq 0$ since $a^2>0$ and $b^2>0$, so $-a^2-b^2<0$. Furthermore, it is an integer. Thus, we have found a nonzero integer in $I$.\n\n\\end{proof}"}
{"id": "Artin|exercise_10_4_7a", "formal_statement": "theorem exercise_10_4_7a {R : Type*} [comm_ring R] [no_zero_divisors R]\n (I J : ideal R) (hIJ : I + J = \u22a4) : I * J = I \u2293 J :=", "src_header": "import .common \n\nopen function fintype subgroup ideal polynomial submodule zsqrtd char_p\nopen_locale big_operators\nnoncomputable theory\n\n", "nl_statement": "Let $I, J$ be ideals of a ring $R$ such that $I+J=R$. Prove that $I J=I \\cap J$.", "nl_proof": "\\begin{proof}\n\n We have seen that $IJ \\subset I \\cap J$, so it remains to show that $I \\cap J \\subset IJ$. Since $I+J = (1)$, there are elements $i \\in I$ and $j \\in J$ such that $i+j = 1$. Let $k \\in I \\cap J$, and multiply $i+j=1$ through by $k$ to get $ki+kj = k$. Write this more suggestively as\n\n\\[ k = ik+kj. \\]\n\nThe first term is in $IJ$ because $k \\in J$, and the second term is in $IJ$ because $k \\in I$, so $k \\in IJ$ as desired.\n\n\\end{proof}"}
{"id": "Artin|exercise_11_2_13", "formal_statement": "theorem exercise_11_2_13 (a b : \u2124) :\n (of_int a : gaussian_int) \u2223 of_int b \u2192 a \u2223 b :=", "src_header": "import .common \n\nopen function fintype subgroup ideal polynomial submodule zsqrtd char_p\nopen_locale big_operators\nnoncomputable theory\n\n", "nl_statement": "If $a, b$ are integers and if $a$ divides $b$ in the ring of Gauss integers, then $a$ divides $b$ in $\\mathbb{Z}$.", "nl_proof": "\\begin{proof}\n\n Suppose $a|b$ in $\\mathbb{Z}[i]$ and $a,b\\in\\mathbb{Z}$. Then $a(x+yi)=b$ for $x,y\\in\\mathbb{Z}$. Expanding this we get $ax+ayi=b$, and equating imaginary parts gives us $ay=0$, implying $y=0$. \n\n\\end{proof}"}
{"id": "Artin|exercise_11_4_6a", "formal_statement": "theorem exercise_11_4_6a {F : Type*} [field F] [fintype F] (hF : card F = 7) :\n irreducible (X ^ 2 + 1 : polynomial F) :=", "src_header": "import .common \n\nopen function fintype subgroup ideal polynomial submodule zsqrtd char_p\nopen_locale big_operators\nnoncomputable theory\n\n", "nl_statement": "Prove that $x^2+x+1$ is irreducible in the field $\\mathbb{F}_2$.", "nl_proof": "\\begin{proof}\n\n If $x^2+x+1$ were reducible in $\\mathbb{F}_2$, its factors must be linear. But we neither have that $0^2+0+1=$ nor $1^2+1+1=0$, therefore $x^2+x+1$ is irreducible. \n\n\\end{proof}"}
{"id": "Artin|exercise_11_4_6c", "formal_statement": "theorem exercise_11_4_6c : irreducible (X^3 - 9 : polynomial (zmod 31)) :=", "src_header": "import .common \n\nopen function fintype subgroup ideal polynomial submodule zsqrtd char_p\nopen_locale big_operators\nnoncomputable theory\n\n", "nl_statement": "Prove that $x^3 - 9$ is irreducible in $\\mathbb{F}_{31}$.", "nl_proof": "\\begin{proof}\n\n If $p(x) = x^3-9$ were reducible, it would have a linear factor, since it either has a linear factor and a quadratic factor or three linear factors. We can then verify by brute force that $p(x)\\neq 0$ for $x \\in \\mathbb{F}_31$. \n\n\\end{proof}"}
{"id": "Artin|exercise_11_13_3", "formal_statement": "theorem exercise_11_13_3 (N : \u2115):\n \u2203 p \u2265 N, nat.prime p \u2227 p + 1 \u2261 0 [MOD 4] :=", "src_header": "import .common \n\nopen function fintype subgroup ideal polynomial submodule zsqrtd char_p\nopen_locale big_operators\nnoncomputable theory\n\n", "nl_statement": "Prove that there are infinitely many primes congruent to $-1$ (modulo $4$).", "nl_proof": "\\begin{proof}\n\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\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\n\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\n\\end{proof}"}
{"id": "Artin|exercise_13_6_10", "formal_statement": "theorem exercise_13_6_10 {K : Type*} [field K] [fintype K\u02e3] :\n \u220f (x : K\u02e3), x = -1 :=", "src_header": "import .common \n\nopen function fintype subgroup ideal polynomial submodule zsqrtd char_p\nopen_locale big_operators\nnoncomputable theory\n\n", "nl_statement": "Let $K$ be a finite field. Prove that the product of the nonzero elements of $K$ is $-1$.", "nl_proof": "\\begin{proof}\n\n Since we are working with a finite field with $q$ elements, anyone of them is a root of the following polynomial\n\n$$\n\nx^q-x=0 .\n\n$$\n\nIn particular if we rule out the 0 element, any $a_i \\neq 0$ is a root of\n\n$$\n\nx^{q-1}-1=0 .\n\n$$\n\nThis polynomial splits completely in $\\mathbb{F}_q$ so we find\n\n$$\n\n\\left(x-a_1\\right) \\cdots\\left(x-a_{q-1}\\right)=0\n\n$$\n\nin particular\n\n$$\n\nx^{q-1}-1=\\left(x-a_1\\right) \\cdots\\left(x-a_{q-1}\\right)\n\n$$\n\nThus $a_1 \\cdots a_{q-1}=-1$.\n\n\\end{proof}"}
{"id": "Dummit-Foote|exercise_1_1_2a", "formal_statement": "theorem exercise_1_1_2a : \u2203 a b : \u2124, a - b \u2260 b - a :=", "src_header": "import .common \n\nopen set function nat int fintype real polynomial mv_polynomial\nopen subgroup ideal submodule zsqrtd gaussian_int char_p mul_aut matrix\n\nopen_locale pointwise\nopen_locale big_operators\nnoncomputable theory\n\n", "nl_statement": "Prove the the operation $\\star$ on $\\mathbb{Z}$ defined by $a\\star b=a-b$ is not commutative.", "nl_proof": "\\begin{proof}\n\n Not commutative since\n\n$$\n\n1 \\star(-1)=1-(-1)=2\n\n$$\n\n$$\n\n(-1) \\star 1=-1-1=-2 .\n\n$$\n\n\\end{proof}"}
{"id": "Dummit-Foote|exercise_1_1_4", "formal_statement": "theorem exercise_1_1_4 (n : \u2115) : \n \u2200 (a b c : \u2115), (a * b) * c \u2261 a * (b * c) [ZMOD n] :=", "src_header": "import .common \n\nopen set function nat int fintype real polynomial mv_polynomial\nopen subgroup ideal submodule zsqrtd gaussian_int char_p mul_aut matrix\n\nopen_locale pointwise\nopen_locale big_operators\nnoncomputable theory\n\n", "nl_statement": "Prove that the multiplication of residue class $\\mathbb{Z}/n\\mathbb{Z}$ is associative.", "nl_proof": "\\begin{proof}\n\n We have\n\n$$\n\n\\begin{aligned}\n\n(\\bar{a} \\cdot \\bar{b}) \\cdot \\bar{c} &=\\overline{a \\cdot b} \\cdot \\bar{c} \\\\\n\n&=\\overline{(a \\cdot b) \\cdot c} \\\\\n\n&=\\overline{a \\cdot(b \\cdot c)} \\\\\n\n&=\\bar{a} \\cdot \\overline{b \\cdot c} \\\\\n\n&=\\bar{a} \\cdot(\\bar{b} \\cdot \\bar{c})\n\n\\end{aligned}\n\n$$\n\nsince integer multiplication is associative.\n\n\\end{proof}"}
{"id": "Dummit-Foote|exercise_1_1_15", "formal_statement": "theorem exercise_1_1_15 {G : Type*} [group G] (as : list G) :\n as.prod\u207b\u00b9 = (as.reverse.map (\u03bb x, x\u207b\u00b9)).prod :=", "src_header": "import .common \n\nopen set function nat int fintype real polynomial mv_polynomial\nopen subgroup ideal submodule zsqrtd gaussian_int char_p mul_aut matrix\n\nopen_locale pointwise\nopen_locale big_operators\nnoncomputable theory\n\n", "nl_statement": "Prove that $(a_1a_2\\dots a_n)^{-1} = a_n^{-1}a_{n-1}^{-1}\\dots a_1^{-1}$ for all $a_1, a_2, \\dots, a_n\\in G$.", "nl_proof": "\\begin{proof}\n\n For $n=1$, note that for all $a_1 \\in G$ we have $a_1^{-1}=a_1^{-1}$.\n\nNow for $n \\geq 2$ we proceed by induction on $n$. For the base case, note that for all $a_1, a_2 \\in G$ we have\n\n$$\n\n\\left(a_1 \\cdot a_2\\right)^{-1}=a_2^{-1} \\cdot a_1^{-1}\n\n$$\n\nsince\n\n$$\n\na_1 \\cdot a_2 \\cdot a_2^{-1} a_1^{-1}=1 .\n\n$$\n\nFor the inductive step, suppose that for some $n \\geq 2$, for all $a_i \\in G$ we have\n\n$$\n\n\\left(a_1 \\cdot \\ldots \\cdot a_n\\right)^{-1}=a_n^{-1} \\cdot \\ldots \\cdot a_1^{-1} .\n\n$$\n\nThen given some $a_{n+1} \\in G$, we have\n\n$$\n\n\\begin{aligned}\n\n\\left(a_1 \\cdot \\ldots \\cdot a_n \\cdot a_{n+1}\\right)^{-1} &=\\left(\\left(a_1 \\cdot \\ldots \\cdot a_n\\right) \\cdot a_{n+1}\\right)^{-1} \\\\\n\n&=a_{n+1}^{-1} \\cdot\\left(a_1 \\cdot \\ldots \\cdot a_n\\right)^{-1} \\\\\n\n&=a_{n+1}^{-1} \\cdot a_n^{-1} \\cdot \\ldots \\cdot a_1^{-1},\n\n\\end{aligned}\n\n$$\n\nusing associativity and the base case where necessary.\n\n\\end{proof}"}
{"id": "Dummit-Foote|exercise_1_1_17", "formal_statement": "theorem exercise_1_1_17 {G : Type*} [group G] {x : G} {n : \u2115}\n (hxn: order_of x = n) :\n x\u207b\u00b9 = x ^ (n - 1 : \u2124) :=", "src_header": "import .common \n\nopen set function nat int fintype real polynomial mv_polynomial\nopen subgroup ideal submodule zsqrtd gaussian_int char_p mul_aut matrix\n\nopen_locale pointwise\nopen_locale big_operators\nnoncomputable theory\n\n", "nl_statement": "Let $x$ be an element of $G$. Prove that if $|x|=n$ for some positive integer $n$ then $x^{-1}=x^{n-1}$.", "nl_proof": "\\begin{proof}\n\n We have $x \\cdot x^{n-1}=x^n=1$, so by the uniqueness of inverses $x^{-1}=x^{n-1}$.\n\n\\end{proof}"}
{"id": "Dummit-Foote|exercise_1_1_20", "formal_statement": "theorem exercise_1_1_20 {G : Type*} [group G] {x : G} :\n order_of x = order_of x\u207b\u00b9 :=", "src_header": "import .common \n\nopen set function nat int fintype real polynomial mv_polynomial\nopen subgroup ideal submodule zsqrtd gaussian_int char_p mul_aut matrix\n\nopen_locale pointwise\nopen_locale big_operators\nnoncomputable theory\n\n", "nl_statement": "For $x$ an element in $G$ show that $x$ and $x^{-1}$ have the same order.", "nl_proof": "\\begin{proof}\n\n Recall that the order of a group element is either a positive integer or infinity.\n\nSuppose $|x|$ is infinite and that $\\left|x^{-1}\\right|=n$ for some $n$. Then\n\n$$\n\nx^n=x^{(-1) \\cdot n \\cdot(-1)}=\\left(\\left(x^{-1}\\right)^n\\right)^{-1}=1^{-1}=1,\n\n$$\n\na contradiction. So if $|x|$ is infinite, $\\left|x^{-1}\\right|$ must also be infinite. Likewise, if $\\left|x^{-1}\\right|$ is infinite, then $\\left|\\left(x^{-1}\\right)^{-1}\\right|=|x|$ is also infinite.\n\nSuppose now that $|x|=n$ and $\\left|x^{-1}\\right|=m$ are both finite. Then we have\n\n$$\n\n\\left(x^{-1}\\right)^n=\\left(x^n\\right)^{-1}=1^{-1}=1,\n\n$$\n\nso that $m \\leq n$. Likewise, $n \\leq m$. Hence $m=n$ and $x$ and $x^{-1}$ have the same order.\n\n\\end{proof}"}
{"id": "Dummit-Foote|exercise_1_1_22b", "formal_statement": "theorem exercise_1_1_22b {G: Type*} [group G] (a b : G) : \n order_of (a * b) = order_of (b * a) :=", "src_header": "import .common \n\nopen set function nat int fintype real polynomial mv_polynomial\nopen subgroup ideal submodule zsqrtd gaussian_int char_p mul_aut matrix\n\nopen_locale pointwise\nopen_locale big_operators\nnoncomputable theory\n\n", "nl_statement": "Deduce that $|a b|=|b a|$ for all $a, b \\in G$.", "nl_proof": "\\begin{proof}\n\n Let $a$ and $b$ be arbitrary group elements. Letting $x=a b$ and $g=a$, we see that\n\n$$\n\n|a b|=\\left|a^{-1} a b a\\right|=|b a| .\n\n$$\n\n\\end{proof}"}
{"id": "Dummit-Foote|exercise_1_1_29", "formal_statement": "theorem exercise_1_1_29 {A B : Type*} [group A] [group B] :\n \u2200 x y : A \u00d7 B, x*y = y*x \u2194 (\u2200 x y : A, x*y = y*x) \u2227 \n (\u2200 x y : B, x*y = y*x) :=", "src_header": "import .common \n\nopen set function nat int fintype real polynomial mv_polynomial\nopen subgroup ideal submodule zsqrtd gaussian_int char_p mul_aut matrix\n\nopen_locale pointwise\nopen_locale big_operators\nnoncomputable theory\n\n", "nl_statement": "Prove that $A \\times B$ is an abelian group if and only if both $A$ and $B$ are abelian.", "nl_proof": "\\begin{proof}\n\n $(\\Rightarrow)$ Suppose $a_1, a_2 \\in A$ and $b_1, b_2 \\in B$. Then\n\n$$\n\n\\left(a_1 a_2, b_1 b_2\\right)=\\left(a_1, b_1\\right) \\cdot\\left(a_2, b_2\\right)=\\left(a_2, b_2\\right) \\cdot\\left(a_1, b_1\\right)=\\left(a_2 a_1, b_2 b_1\\right) .\n\n$$\n\nSince two pairs are equal precisely when their corresponding entries are equal, we have $a_1 a_2=a_2 a_1$ and $b_1 b_2=b_2 b_1$. Hence $A$ and $B$ are abelian.\n\n$(\\Leftarrow)$ Suppose $\\left(a_1, b_1\\right),\\left(a_2, b_2\\right) \\in A \\times B$. Then we have\n\n$$\n\n\\left(a_1, b_1\\right) \\cdot\\left(a_2, b_2\\right)=\\left(a_1 a_2, b_1 b_2\\right)=\\left(a_2 a_1, b_2 b_1\\right)=\\left(a_2, b_2\\right) \\cdot\\left(a_1, b_1\\right) .\n\n$$\n\nHence $A \\times B$ is abelian.\n\n\\end{proof}"}
{"id": "Dummit-Foote|exercise_1_3_8", "formal_statement": "theorem exercise_1_3_8 : infinite (equiv.perm \u2115) :=", "src_header": "import .common \n\nopen set function nat int fintype real polynomial mv_polynomial\nopen subgroup ideal submodule zsqrtd gaussian_int char_p mul_aut matrix\n\nopen_locale pointwise\nopen_locale big_operators\nnoncomputable theory\n\n", "nl_statement": "Prove that if $\\Omega=\\{1,2,3, \\ldots\\}$ then $S_{\\Omega}$ is an infinite group", "nl_proof": "\\begin{proof}\n\n Recall that the codomain of an injective function must be at least as large (in cardinality) as the domain of the function. With that in mind, define the function\n\n$$\n\n\\begin{gathered}\n\nf: \\mathbb{N} \\rightarrow S_{\\mathbb{N}} \\\\\n\nf(n)=(1 n)\n\n\\end{gathered}\n\n$$\n\nwhere $(1 n)$ is the cycle decomposition of an element of $S_{\\mathbb{N}}$ (specifically it's the function given by $g(1)=n, g(2)=2, g(3)=3, \\ldots)$. The function $f$ maps every natural number to a distinct one of these functions. Hence $f$ is injective. Hence $\\infty=|\\mathbb{N}| \\leq\\left|S_{\\mathbb{N}}\\right|$.\n\n\\end{proof}"}
{"id": "Dummit-Foote|exercise_1_6_11", "formal_statement": "theorem exercise_1_6_11 {A B : Type*} [group A] [group B] : \n A \u00d7 B \u2243* B \u00d7 A :=", "src_header": "import .common \n\nopen set function nat int fintype real polynomial mv_polynomial\nopen subgroup ideal submodule zsqrtd gaussian_int char_p mul_aut matrix\n\nopen_locale pointwise\nopen_locale big_operators\nnoncomputable theory\n\n", "nl_statement": "Let $A$ and $B$ be groups. Prove that $A \\times B \\cong B \\times A$.", "nl_proof": "\\begin{proof}\n\n We know from set theory that the mapping $\\varphi: A \\times B \\rightarrow B \\times A$ given by $\\varphi((a, b))=(b, a)$ is a bijection with inverse $\\psi: B \\times A \\rightarrow A \\times B$ given by $\\psi((b, a))=(a, b)$. Also $\\varphi$ is a homomorphism, as we show below.\n\nLet $a_1, a_2 \\in A$ and $b_1, b_2 \\in B$. Then\n\n$$\n\n\\begin{aligned}\n\n\\varphi\\left(\\left(a_1, b_1\\right) \\cdot\\left(a_2, b_2\\right)\\right) &=\\varphi\\left(\\left(a_1 a_2, b_1 b_2\\right)\\right) \\\\\n\n&=\\left(b_1 b_2, a_1 a_2\\right) \\\\\n\n&=\\left(b_1, a_1\\right) \\cdot\\left(b_2, a_2\\right) \\\\\n\n&=\\varphi\\left(\\left(a_1, b_1\\right)\\right) \\cdot \\varphi\\left(\\left(a_2, b_2\\right)\\right)\n\n\\end{aligned}\n\n$$\n\nHence $A \\times B \\cong B \\times A$.\n\n\\end{proof}"}
{"id": "Dummit-Foote|exercise_1_6_23", "formal_statement": "theorem exercise_1_6_23 {G : Type*} \n [group G] (\u03c3 : mul_aut G) (hs : \u2200 g : G, \u03c3 g = 1 \u2192 g = 1) \n (hs2 : \u2200 g : G, \u03c3 (\u03c3 g) = g) :\n \u2200 x y : G, x*y = y*x :=", "src_header": "import .common \n\nopen set function nat int fintype real polynomial mv_polynomial\nopen subgroup ideal submodule zsqrtd gaussian_int char_p mul_aut matrix\n\nopen_locale pointwise\nopen_locale big_operators\nnoncomputable theory\n\n", "nl_statement": "Let $G$ be a finite group which possesses an automorphism $\\sigma$ such that $\\sigma(g)=g$ if and only if $g=1$. If $\\sigma^{2}$ is the identity map from $G$ to $G$, prove that $G$ is abelian.", "nl_proof": "\\begin{proof}\n\n Solution: We define a mapping $f: G \\rightarrow G$ by $f(x)=x^{-1} \\sigma(x)$.\n\nClaim: $f$ is injective.\n\nProof of claim: Suppose $f(x)=f(y)$. Then $y^{-1} \\sigma(y)=x^{-1} \\sigma(x)$, so that $x y^{-1}=\\sigma(x) \\sigma\\left(y^{-1}\\right)$, and $x y^{-1}=\\sigma\\left(x y^{-1}\\right)$. Then we have $x y^{-1}=1$, hence $x=y$. So $f$ is injective.\n\n\n\nSince $G$ is finite and $f$ is injective, $f$ is also surjective. Then every $z \\in G$ is of the form $x^{-1} \\sigma(x)$ for some $x$. Now let $z \\in G$ with $z=x^{-1} \\sigma(x)$. We have\n\n$$\n\n\\sigma(z)=\\sigma\\left(x^{-1} \\sigma(x)\\right)=\\sigma(x)^{-1} x=\\left(x^{-1} \\sigma(x)\\right)^{-1}=z^{-1} .\n\n$$\n\nThus $\\sigma$ is in fact the inversion mapping, and we assumed that $\\sigma$ is a homomorphism. By a previous example, then, $G$ is abelian.\n\n\\end{proof}"}
{"id": "Dummit-Foote|exercise_2_1_13", "formal_statement": "theorem exercise_2_1_13 (H : add_subgroup \u211a) {x : \u211a} \n (hH : x \u2208 H \u2192 (1 / x) \u2208 H):\n H = \u22a5 \u2228 H = \u22a4 :=", "src_header": "import .common \n\nopen set function nat int fintype real polynomial mv_polynomial\nopen subgroup ideal submodule zsqrtd gaussian_int char_p mul_aut matrix\n\nopen_locale pointwise\nopen_locale big_operators\nnoncomputable theory\n\n", "nl_statement": "Let $H$ be a subgroup of the additive group of rational numbers with the property that $1 / x \\in H$ for every nonzero element $x$ of $H$. Prove that $H=0$ or $\\mathbb{Q}$.", "nl_proof": "\\begin{proof}\n\n Solution: First, suppose there does not exist a nonzero element in $H$. Then $H=0$.\n\nNow suppose there does exist a nonzero element $a \\in H$; without loss of generality, say $a=p / q$ in lowest terms for some integers $p$ and $q$ - that is, $\\operatorname{gcd}(p, q)=1$. Now $q \\cdot \\frac{p}{q}=p \\in H$, and since $q / p \\in H$, we have $p \\cdot \\frac{q}{p} \\in H$. There exist integers $x, y$ such that $q x+p y=1$; note that $q x \\in H$ and $p y \\in H$, so that $1 \\in H$. Thus $n \\in H$ for all $n \\in \\mathbb{Z}$. Moreover, if $n \\neq 0,1 / n \\in H$. Then $m / n \\in H$ for all integers $m, n$ with $n \\neq 0$; hence $H=\\mathbb{Q}$.\n\n\\end{proof}"}
{"id": "Dummit-Foote|exercise_2_4_16a", "formal_statement": "theorem exercise_2_4_16a {G : Type*} [group G] {H : subgroup G} \n (hH : H \u2260 \u22a4) : \n \u2203 M : subgroup G, M \u2260 \u22a4 \u2227\n \u2200 K : subgroup G, M \u2264 K \u2192 K = M \u2228 K = \u22a4 \u2227 \n H \u2264 M :=", "src_header": "import .common \n\nopen set function nat int fintype real polynomial mv_polynomial\nopen subgroup ideal submodule zsqrtd gaussian_int char_p mul_aut matrix\n\nopen_locale pointwise\nopen_locale big_operators\nnoncomputable theory\n\n", "nl_statement": "A subgroup $M$ of a group $G$ is called a maximal subgroup if $M \\neq G$ and the only subgroups of $G$ which contain $M$ are $M$ and $G$. Prove that if $H$ is a proper subgroup of the finite group $G$ then there is a maximal subgroup of $G$ containing $H$.", "nl_proof": "\\begin{proof}\n\nIf $H$ is maximal, then we are done. If $H$ is not maximal, then there is a subgroup $K_1$ of $G$ such that $H<K_1<G$. If $K_1$ is maximal, we are done. But if $K_1$ is not maximal, there is a subgroup $K_2$ with $H<K_1<K_2<G$. If $K_2$ is maximal, we are done, and if not, keep repeating the procedure. Since $G$ is finite, this process must eventually come to an end, so that $K_n$ is maximal for some positive integer $n$. Then $K_n$ is a maximal subgroup containing $H$.\n\n\\end{proof}"}
{"id": "Dummit-Foote|exercise_2_4_16c", "formal_statement": "theorem exercise_2_4_16c {n : \u2115} (H : add_subgroup (zmod n)) : \n \u2203 p : \u2115, nat.prime p \u2227 H = add_subgroup.closure {p} \u2194 \n H \u2260 \u22a4 \u2227 \u2200 K : add_subgroup (zmod n), H \u2264 K \u2192 K = H \u2228 K = \u22a4 :=", "src_header": "import .common \n\nopen set function nat int fintype real polynomial mv_polynomial\nopen subgroup ideal submodule zsqrtd gaussian_int char_p mul_aut matrix\n\nopen_locale pointwise\nopen_locale big_operators\nnoncomputable theory\n\n", "nl_statement": "Show that if $G=\\langle x\\rangle$ is a cyclic group of order $n \\geq 1$ then a subgroup $H$ is maximal if and only $H=\\left\\langle x^{p}\\right\\rangle$ for some prime $p$ dividing $n$.", "nl_proof": "\\begin{proof}\n\n Suppose $H$ is a maximal subgroup of $G$. Then $H$ is cyclic, and we may write $H=\\left\\langle x^k\\right\\rangle$ for some integer $k$, with $k>1$. Let $d=(n, k)$. Since $H$ is a proper subgroup, we know by Proposition 6 that $d>1$. Choose a prime factor $p$ of $d$. If $k=p=d$ then $k \\mid n$ as required.\n\n\n\nIf, however, $k$ is not prime, then consider the subgroup $K=\\left\\langle x^p\\right\\rangle$. Since $p$ is a proper divisor of $k$, it follows that $H<K$. But $H$ is maximal, so we must have $K=G$. Again by Proposition 6 , we must then have $(p, n)=1$. However, $p$ divides $d$ which divides $n$, so $p \\mid n$ and $(p, n)=p>1$, a contradiction. Therefore $k=p$ and the left-to-right implication holds.\n\nNow, for the converse, suppose $H=\\left\\langle x^p\\right\\rangle$ for $p$ a prime dividing $n$. If $H$ is not maximal then the first part of this exercise shows that there is a maximal subgroup $K$ containing $H$. Then $K=\\left\\langle x^q\\right\\rangle$. So $x^p \\in\\left\\langle x^q\\right\\rangle$, which implies $q \\mid p$. But the only divisors of $p$ are 1 and $p$. If $q=1$ then $K=G$ and $K$ cannot be a proper subgroup, and if $q=p$ then $H=K$ and $H$ cannot be a proper subgroup of $K$. This contradiction shows that $H$ is maximal.\n\n\\end{proof}"}
{"id": "Dummit-Foote|exercise_3_1_22a", "formal_statement": "theorem exercise_3_1_22a (G : Type*) [group G] (H K : subgroup G) \n [subgroup.normal H] [subgroup.normal K] :\n subgroup.normal (H \u2293 K) :=", "src_header": "import .common \n\nopen set function nat int fintype real polynomial mv_polynomial\nopen subgroup ideal submodule zsqrtd gaussian_int char_p mul_aut matrix\n\nopen_locale pointwise\nopen_locale big_operators\nnoncomputable theory\n\n", "nl_statement": "Prove that if $H$ and $K$ are normal subgroups of a group $G$ then their intersection $H \\cap K$ is also a normal subgroup of $G$.", "nl_proof": "\\begin{proof}\n\n Suppose $H$ and $K$ are normal subgroups of $G$. We already know that $H \\cap K$ is a subgroup of $G$, so we need to show that it is normal. Choose any $g \\in G$ and any $x \\in H \\cap K$. Since $x \\in H$ and $H \\unlhd G$, we know $g x g^{-1} \\in H$. Likewise, since $x \\in K$ and $K \\unlhd G$, we have $g x g^{-1} \\in K$. Therefore $g x g^{-1} \\in H \\cap K$. This shows that $g(H \\cap K) g^{-1} \\subseteq H \\cap K$, and this is true for all $g \\in G$. By Theorem 6 (5) (which we will prove in Exercise 3.1.25), this is enough to show that $H \\cap K \\unlhd G$.\n\n\\end{proof}"}
{"id": "Dummit-Foote|exercise_3_2_8", "formal_statement": "theorem exercise_3_2_8 {G : Type*} [group G] (H K : subgroup G)\n [fintype H] [fintype K] \n (hHK : nat.coprime (fintype.card H) (fintype.card K)) : \n H \u2293 K = \u22a5 :=", "src_header": "import .common \n\nopen set function nat int fintype real polynomial mv_polynomial\nopen subgroup ideal submodule zsqrtd gaussian_int char_p mul_aut matrix\n\nopen_locale pointwise\nopen_locale big_operators\nnoncomputable theory\n\n", "nl_statement": "Prove that if $H$ and $K$ are finite subgroups of $G$ whose orders are relatively prime then $H \\cap K=1$.", "nl_proof": "\\begin{proof}\n\n Solution: Let $|H|=p$ and $|K|=q$. We saw in a previous exercise that $H \\cap K$ is a subgroup of both $H$ and $K$; by Lagrange's Theorem, then, $|H \\cap K|$ divides $p$ and $q$. Since $\\operatorname{gcd}(p, q)=1$, then, $|H \\cap K|=1$. Thus $H \\cap K=1$.\n\n\\end{proof}"}
{"id": "Dummit-Foote|exercise_3_2_16", "formal_statement": "theorem exercise_3_2_16 (p : \u2115) (hp : nat.prime p) (a : \u2115) :\n nat.coprime a p \u2192 a ^ p \u2261 a [ZMOD p] :=", "src_header": "import .common \n\nopen set function nat int fintype real polynomial mv_polynomial\nopen subgroup ideal submodule zsqrtd gaussian_int char_p mul_aut matrix\n\nopen_locale pointwise\nopen_locale big_operators\nnoncomputable theory\n\n", "nl_statement": "Use Lagrange's Theorem in the multiplicative group $(\\mathbb{Z} / p \\mathbb{Z})^{\\times}$to prove Fermat's Little Theorem: if $p$ is a prime then $a^{p} \\equiv a(\\bmod p)$ for all $a \\in \\mathbb{Z}$.", "nl_proof": "\\begin{proof}\n\n Solution: If $p$ is prime, then $\\varphi(p)=p-1$ (where $\\varphi$ denotes the Euler totient). Thus\n\n$$\n\n\\mid\\left((\\mathbb{Z} /(p))^{\\times} \\mid=p-1 .\\right.\n\n$$\n\nSo for all $a \\in(\\mathbb{Z} /(p))^{\\times}$, we have $|a|$ divides $p-1$. Hence\n\n$$\n\na=1 \\cdot a=a^{p-1} a=a^p \\quad(\\bmod p) .\n\n$$\n\n\\end{proof}"}
{"id": "Dummit-Foote|exercise_3_3_3", "formal_statement": "theorem exercise_3_3_3 {p : primes} {G : Type*} [group G] \n {H : subgroup G} [hH : H.normal] (hH1 : H.index = p) : \n \u2200 K : subgroup G, K \u2264 H \u2228 H \u2294 K = \u22a4 \u2228 (K \u2293 H).relindex K = p :=", "src_header": "import .common \n\nopen set function nat int fintype real polynomial mv_polynomial\nopen subgroup ideal submodule zsqrtd gaussian_int char_p mul_aut matrix\n\nopen_locale pointwise\nopen_locale big_operators\nnoncomputable theory\n\n", "nl_statement": "Prove that if $H$ is a normal subgroup of $G$ of prime index $p$ then for all $K \\leq G$ either $K \\leq H$, or $G=H K$ and $|K: K \\cap H|=p$.", "nl_proof": "\\begin{proof}\n\n Solution: Suppose $K \\backslash N \\neq \\emptyset$; say $k \\in K \\backslash N$. Now $G / N \\cong \\mathbb{Z} /(p)$ is cyclic, and moreover is generated by any nonidentity- in particular by $\\bar{k}$\n\n\n\nNow $K N \\leq G$ since $N$ is normal. Let $g \\in G$. We have $g N=k^a N$ for some integer a. In particular, $g=k^a n$ for some $n \\in N$, hence $g \\in K N$. We have $[K: K \\cap N]=p$ by the Second Isomorphism Theorem.\n\n\\end{proof}"}
{"id": "Dummit-Foote|exercise_3_4_4", "formal_statement": "theorem exercise_3_4_4 {G : Type*} [comm_group G] [fintype G] {n : \u2115}\n (hn : n \u2223 (fintype.card G)) :\n \u2203 (H : subgroup G) (H_fin : fintype H), @card H H_fin = n :=", "src_header": "import .common \n\nopen set function nat int fintype real polynomial mv_polynomial\nopen subgroup ideal submodule zsqrtd gaussian_int char_p mul_aut matrix\n\nopen_locale pointwise\nopen_locale big_operators\nnoncomputable theory\n\n", "nl_statement": "Use Cauchy's Theorem and induction to show that a finite abelian group has a subgroup of order $n$ for each positive divisor $n$ of its order.", "nl_proof": "\\begin{proof}\n\n Let $G$ be a finite abelian group. We use induction on $|G|$. Certainly the result holds for the trivial group. And if $|G|=p$ for some prime $p$, then the positive divisors of $|G|$ are 1 and $p$ and the result is again trivial.\n\n\n\nNow assume that the statement is true for all groups of order strictly smaller than $|G|$, and let $n$ be a positive divisor of $|G|$ with $n>1$. First, if $n$ is prime then Cauchy's Theorem allows us to find an element $x \\in G$ having order $n$. Then $\\langle x\\rangle$ is the desired subgroup. On the other hand, if $n$ is not prime, then $n$ has a prime divisor $p$, so that $n=k p$ for some integer $k$. Cauchy's Theorem allows us to find an element $x$ having order $p$. Set $N=\\langle x\\rangle$. By Lagrange's Theorem,\n\n$$\n\n|G / N|=\\frac{|G|}{|N|}<|G| .\n\n$$\n\nNow, by the inductive hypothesis, the group $G / N$ must have a subgroup of order $k$. And by the Lattice Isomorphism Theorem, this subgroup has the form $H / N$ for some subgroup $H$ of $G$. Then $|H|=k|N|=k p=n$, so that $H$ has order $n$. This completes the inductive step.\n\n\\end{proof}"}
{"id": "Dummit-Foote|exercise_3_4_5b", "formal_statement": "theorem exercise_3_4_5b {G : Type*} [group G] [is_solvable G] \n (H : subgroup G) [subgroup.normal H] : \n is_solvable (G \u29f8 H) :=", "src_header": "import .common \n\nopen set function nat int fintype real polynomial mv_polynomial\nopen subgroup ideal submodule zsqrtd gaussian_int char_p mul_aut matrix\n\nopen_locale pointwise\nopen_locale big_operators\nnoncomputable theory\n\n", "nl_statement": "Prove that quotient groups of a solvable group are solvable.", "nl_proof": "\\begin{proof}\n\n Next, note that\n\n$$\n\nH_i=G_i \\cap H=\\left(G_i \\cap G_{i+1}\\right) \\cap H=G_i \\cap H_{i+1} .\n\n$$\n\nBy the Second Isomorphism Theorem, we then have\n\n$$\n\nH_{i+1} / H_i=H_{i+1} /\\left(H_{i+1} \\cap G_i\\right) \\cong H_{i+1} G_i / G_i \\leq G_{i+1} / G_i .\n\n$$\n\nSince $H_{i+1} / H_i$ is isomorphic to a subgroup of the abelian group $G_{i+1} / G_i$, it follows that $H_{i+1} / H_i$ is also abelian. This completes the proof that $H$ is solvable.\n\nNext, let $N \\unlhd G$. For each $i$, define\n\n$$\n\nN_i=G_i N, \\quad 0 \\leq i \\leq n .\n\n$$\n\nNow let $g \\in N_{i+1}$, where $g=g_0 n_0$ with $g_0 \\in G_{i+1}$ and $n_0 \\in N$. Also let $x \\in N_i$, where $x=g_1 n_1$ with $g_1 \\in G_i$ and $n_1 \\in N$. Then\n\n$$\n\ng x g^{-1}=g_0 n_0 g_1 n_1 n_0^{-1} g_0^{-1} .\n\n$$\n\nNow, since $N$ is normal in $G, N g=g N$, so $n_0 g_1=g_1 n_2$ for some $n_2 \\in N$. Then\n\n$$\n\ng x g^{-1}=g_0 g_1\\left(n_2 n_1 n_0^{-1}\\right) g_0^{-1}=g_0 g_1 n_3 g_0^{-1}\n\n$$\n\nfor some $n_3 \\in N$. Then $n_3 g_0^{-1}=g_0^{-1} n_4$ for some $n_4 \\in N$. And $g_0 g_1 g_0^{-1} \\in G_i$ since $G_i \\unlhd G_{i+1}$, so\n\n$$\n\ng x g^{-1}=g_0 g_1 g_0^{-1} n_4 \\in N_i .\n\n$$\n\nThis shows that $N_i \\unlhd N_{i+1}$. So by the Lattice Isomorphism Theorem, we have $N_{i+1} / N \\unlhd N_i / N$. This shows that\n\n$$\n\n1=N_0 / N \\unlhd N_1 / N \\unlhd N_2 / N \\unlhd \\cdots \\unlhd N_n / N=G / N .\n\n$$\n\nMoreover, the Third Isomorphism Theorem says that\n\n$$\n\n\\left(N_{i+1} / N\\right) /\\left(N_i / N\\right) \\cong N_{i+1} / N_i,\n\n$$\n\nso the proof will be complete if we can show that $N_{i+1} / N_i$ is abelian.\n\nLet $x, y \\in N_{i+1} / N_i$. Then\n\n$$\n\nx=\\left(g_0 n_0\\right) N_i \\quad \\text { and } \\quad y=\\left(g_1 n_1\\right) N_i\n\n$$\n\nfor some $g_0, g_1 \\in G_{i+1}$ and $n_0, n_1 \\in N$. We have\n\n$$\n\n\\begin{aligned}\n\nx y x^{-1} y^{-1} & =\\left(g_0 n_0\\right)\\left(g_1 n_1\\right)\\left(g_0 n_0\\right)^{-1}\\left(g_1 n_1\\right)^{-1} N_i \\\\\n\n& =g_0 n_0 g_1 n_1 n_0^{-1} g_0^{-1} n_1^{-1} g_1^{-1} N_i .\n\n\\end{aligned}\n\n$$\n\nSince $N \\unlhd G, g N=N g$ for any $g \\in G$, so we can find $n_2 \\in N$ such that\n\n$$\n\nx y x^{-1} y^{-1}=g_0 g_1 g_0^{-1} g^{-1} n_2 N_i .\n\n$$\n\nNow $N_i=G_i N=N G_i$ since $N \\unlhd G$ (see Proposition 14 and its corollary). Therefore\n\n$$\n\nn_2 N_i=n_2 N G_i=N G_i=G_i N\n\n$$\n\nand we get\n\n$$\n\nx y x^{-1} y^{-1}=g_0 g_1 g_0^{-1} g^{-1} G_i N=G_i N .\n\n$$\n\nSo $x y x^{-1} y^{-1}=1 N_i$ or $x y=y x$. This completes the proof that $G / N$ is solvable.\n\n\\end{proof}"}
{"id": "Dummit-Foote|exercise_4_2_8", "formal_statement": "theorem exercise_4_2_8 {G : Type*} [group G] {H : subgroup G} \n {n : \u2115} (hn : n > 0) (hH : H.index = n) : \n \u2203 K \u2264 H, K.normal \u2227 K.index \u2264 n.factorial :=", "src_header": "import .common \n\nopen set function nat int fintype real polynomial mv_polynomial\nopen subgroup ideal submodule zsqrtd gaussian_int char_p mul_aut matrix\n\nopen_locale pointwise\nopen_locale big_operators\nnoncomputable theory\n\n", "nl_statement": "Prove that if $H$ has finite index $n$ then there is a normal subgroup $K$ of $G$ with $K \\leq H$ and $|G: K| \\leq n!$.", "nl_proof": "\\begin{proof}\n\n Solution: $G$ acts on the cosets $G / H$ by left multiplication. Let $\\lambda: G \\rightarrow S_{G / H}$ be the permutation representation induced by this action, and let $K$ be the kernel of the representation.\n\nNow $K$ is normal in $G$, and $K \\leq \\operatorname{stab}_G(H)=H$. By the First Isomorphism Theorem, we have an injective group homomorphism $\\bar{\\lambda}: G / K \\rightarrow S_{G / H}$. Since $\\left|S_{G / H}\\right|=n !$, we have $[G: K] \\leq n !$.\n\n\\end{proof}"}
{"id": "Dummit-Foote|exercise_4_2_9a", "formal_statement": "theorem exercise_4_2_9a {G : Type*} [fintype G] [group G] {p \u03b1 : \u2115} \n (hp : p.prime) (ha : \u03b1 > 0) (hG : card G = p ^ \u03b1) : \n \u2200 H : subgroup G, H.index = p \u2192 H.normal :=", "src_header": "import .common \n\nopen set function nat int fintype real polynomial mv_polynomial\nopen subgroup ideal submodule zsqrtd gaussian_int char_p mul_aut matrix\n\nopen_locale pointwise\nopen_locale big_operators\nnoncomputable theory\n\n", "nl_statement": "Prove that if $p$ is a prime and $G$ is a group of order $p^{\\alpha}$ for some $\\alpha \\in \\mathbb{Z}^{+}$, then every subgroup of index $p$ is normal in $G$.", "nl_proof": "\\begin{proof}\n\n Solution: Let $G$ be a group of order $p^k$ and $H \\leq G$ a subgroup with $[G: H]=p$. Now $G$ acts on the conjugates $g H g^{-1}$ by conjugation, since\n\n$$\n\ng_1 g_2 \\cdot H=\\left(g_1 g_2\\right) H\\left(g_1 g_2\\right)^{-1}=g_1\\left(g_2 H g_2^{-1}\\right) g_1^{-1}=g_1 \\cdot\\left(g_2 \\cdot H\\right)\n\n$$\n\nand $1 \\cdot H=1 H 1=H$. Moreover, under this action we have $H \\leq \\operatorname{stab}(H)$. By Exercise 3.2.11, we have\n\n$$\n\n[G: \\operatorname{stab}(H)][\\operatorname{stab}(H): H]=[G: H]=p,\n\n$$\n\na prime.\n\nIf $[G: \\operatorname{stab}(H)]=p$, then $[\\operatorname{stab}(H): H]=1$ and we have $H=\\operatorname{stab}(H)$; moreover, $H$ has exactly $p$ conjugates in $G$. Let $\\varphi: G \\rightarrow S_p$ be the permutation representation induced by the action of $G$ on the conjugates of $H$, and let $K$ be the kernel of this representation. Now $K \\leq \\operatorname{stab}(H)=H$. By the first isomorphism theorem, the induced map $\\bar{\\varphi}: G / K \\rightarrow S_p$ is injective, so that $|G / K|$ divides $p$ !. Note, however, that $|G / K|$ is a power of $p$ and that the only powers of $p$ that divide $p$ ! are 1 and $p$. So $[G: K]$ is 1 or $p$. If $[G: K]=1$, then $G=K$ so that $g H g^{-1}=H$ for all $g \\in G$; then $\\operatorname{stab}(H)=G$ and we have $[G: \\operatorname{stab}(H)]=1$, a contradiction. Now suppose $[G: K]=p$. Again by Exercise $3.2$.11 we have $[G: K]=[G: H][H: K]$, so that $[H: K]=1$, hence $H=K$. Again, this implies that $H$ is normal so that $g H g^{-1}=H$ for all $g \\in G$, and we have $[G: \\operatorname{stab}(H)]=1$, a contradiction. Thus $[G: \\operatorname{stab}(H)] \\neq p$\n\nIf $[G: \\operatorname{stab}(H)]=1$, then $G=\\operatorname{stab}(H)$. That is, $g H g^{-1}=H$ for all $g \\in G$; thus $H \\leq G$ is normal.\n\n\\end{proof}"}
{"id": "Dummit-Foote|exercise_4_4_2", "formal_statement": "theorem exercise_4_4_2 {G : Type*} [fintype G] [group G] \n {p q : nat.primes} (hpq : p \u2260 q) (hG : card G = p*q) : \n is_cyclic G :=", "src_header": "import .common \n\nopen set function nat int fintype real polynomial mv_polynomial\nopen subgroup ideal submodule zsqrtd gaussian_int char_p mul_aut matrix\n\nopen_locale pointwise\nopen_locale big_operators\nnoncomputable theory\n\n", "nl_statement": "Prove that if $G$ is an abelian group of order $p q$, where $p$ and $q$ are distinct primes, then $G$ is cyclic.", "nl_proof": "\\begin{proof}\n\n Let $G$ be an abelian group of order $p q$. We need to prove that if $p$ and $q$ are distinct primes than $G$ is cyclic. By Cauchy's theorem there are $a, b \\in G$ with $a$ of order $p$ and $b$ of order $q$. Since $(|a|,|b|)=1$ and $a b=b a$ then $|a b|=|a| \\cdot|b|=p q$. Therefore $a b$ is an element of order $p q$, the order of $G$, which means $G$ is cyclic.\n\n\\end{proof}"}
{"id": "Dummit-Foote|exercise_4_4_6b", "formal_statement": "theorem exercise_4_4_6b : \n \u2203 (G : Type*) (hG : group G) (H : @subgroup G hG), @characteristic G hG H \u2227 \u00ac @subgroup.normal G hG H :=", "src_header": "import .common \n\nopen set function nat int fintype real polynomial mv_polynomial\nopen subgroup ideal submodule zsqrtd gaussian_int char_p mul_aut matrix\n\nopen_locale pointwise\nopen_locale big_operators\nnoncomputable theory\n\n", "nl_statement": "Prove that there exists a normal subgroup that is not characteristic.", "nl_proof": "\\begin{proof}\n\n We have to produce a group $G$ and a subgroup $H$ such that $H$ is normal in $G$, but not characterestic. Consider the Klein's four group $G=\\{ e, a, b, a b\\}$. This is an abelian group with each element having order 2. Consider $H=\\{ e, a\\}$. $H$ is normal in $G$. Define $\\sigma: G \\rightarrow G$ as $\\sigma(a)=b, \\sigma(b)=a, \\sigma(a b)=a b$. Clearly $\\sigma$ does not fix $H$. So, $H$ is not characterestic.\n\n\\end{proof}"}
{"id": "Dummit-Foote|exercise_4_4_8a", "formal_statement": "theorem exercise_4_4_8a {G : Type*} [group G] (H K : subgroup G) \n (hHK : H \u2264 K) [hHK1 : (H.subgroup_of K).normal] [hK : K.normal] : \n H.normal :=", "src_header": "import .common \n\nopen set function nat int fintype real polynomial mv_polynomial\nopen subgroup ideal submodule zsqrtd gaussian_int char_p mul_aut matrix\n\nopen_locale pointwise\nopen_locale big_operators\nnoncomputable theory\n\n", "nl_statement": "Let $G$ be a group with subgroups $H$ and $K$ with $H \\leq K$. Prove that if $H$ is characteristic in $K$ and $K$ is normal in $G$ then $H$ is normal in $G$.", "nl_proof": "\\begin{proof}\n\nWe prove that $H$ is invariant under every inner automorphism of $G$. Consider a inner automorphism $\\phi_g$ of $G$. Now, $\\left.\\phi_g\\right|_K$ is a automorphism of $K$ because $K$ is normal in $G$. But $H$ is a characterestic subgroup of $K$, so $\\left.\\phi_g\\right|_K(H) \\subset H$, so in general $\\phi_g(H) \\subset H$. Hence $H$ is characteretstic in $G$.\n\n\\end{proof}"}
{"id": "Dummit-Foote|exercise_4_5_13", "formal_statement": "theorem exercise_4_5_13 {G : Type*} [group G] [fintype G]\n (hG : card G = 56) :\n \u2203 (p : \u2115) (P : sylow p G), P.normal :=", "src_header": "import .common \n\nopen set function nat int fintype real polynomial mv_polynomial\nopen subgroup ideal submodule zsqrtd gaussian_int char_p mul_aut matrix\n\nopen_locale pointwise\nopen_locale big_operators\nnoncomputable theory\n\n", "nl_statement": "Prove that a group of order 56 has a normal Sylow $p$-subgroup for some prime $p$ dividing its order.", "nl_proof": "\\begin{proof} \n\nSince $|G|=56=2^{3}.7$, $G$ has $2-$Sylow subgroup of order $8$, as well as $7-$Sylow subgroup of order $7$. Now, we count the number of such subgroups. Let $n_{7}$ be the number of $7-$Sylow subgroup and $n_{2}$ be the number of $2-$Sylow subgroup. Now $n_{7}=1+7k$ where $1+7k|8$. The choices for $k$ are $0$ or $1$. If $k=0$, there is only one $7-$Sylow subgroup and hence normal. So, assume now, that there are $8$ $7-$Sylow subgroup(for $k=1$). Now we look at $2-$ Sylow subgroups. $n_{2}=1+2k| 7$. So choice for $k$ are $0$ and $3$. If $k=0$, there is only one $2-$Sylow subgroup and hence normal. So, assume now, that there are $7$ $2-$Sylow subgroup (for $k=3$). Now we claim that simultaneously, there cannot be $8$ $7-$Sylow subgroup and $7$ $2-$Sylow subgroup. So, either $7-$Sylow subgroup is normal being unique, or the $2-$Sylow subgroup is normal. Now, to prove the claim, we observe that there are 48 elements of order $7$. Let $H_{1}$ and $H_{2}$ be two distinct $2-$Sylow subgroup. Now $|H_{1}|=8$. So we already get $48+8=56$ distinct elements in the group. Now $H_{2}$ being distinct from $H_{1}$, has at least one element which is not in $H_{1}$. This adds one more element in the group, at the least. Now already we have number of elements in the group exceeding the number of element in $G$. This gives a contradiction and proves the claim.\n\n\\end{proof}"}
{"id": "Dummit-Foote|exercise_4_5_15", "formal_statement": "theorem exercise_4_5_15 {G : Type*} [group G] [fintype G] \n (hG : card G = 351) : \n \u2203 (p : \u2115) (P : sylow p G), P.normal :=", "src_header": "import .common \n\nopen set function nat int fintype real polynomial mv_polynomial\nopen subgroup ideal submodule zsqrtd gaussian_int char_p mul_aut matrix\n\nopen_locale pointwise\nopen_locale big_operators\nnoncomputable theory\n\n", "nl_statement": "Prove that a group of order 351 has a normal Sylow $p$-subgroup for some prime $p$ dividing its order.", "nl_proof": "\\begin{proof}\n\n Since $|G|=351=3^{2}.13$, $G$ has $3-$Sylow subgroup of order $9$, as well as $13-$Sylow subgroup of order $13$. Now, we count the number of such subgroups. Let $n_{13}$ be the number of $13-$Sylow subgroup and $n_{3}$ be the number of $3-$Sylow subgroup. Now $n_{13}=1+13k$ where $1+13k|9$. The choices for $k$ is $0$. Hence, there is a unique $13-$Sylow subgroup and hence is normal.\n\n\\end{proof}"}
{"id": "Dummit-Foote|exercise_4_5_17", "formal_statement": "theorem exercise_4_5_17 {G : Type*} [fintype G] [group G] \n (hG : card G = 105) : \n nonempty(sylow 5 G) \u2227 nonempty(sylow 7 G) :=", "src_header": "import .common \n\nopen set function nat int fintype real polynomial mv_polynomial\nopen subgroup ideal submodule zsqrtd gaussian_int char_p mul_aut matrix\n\nopen_locale pointwise\nopen_locale big_operators\nnoncomputable theory\n\n", "nl_statement": "Prove that if $|G|=105$ then $G$ has a normal Sylow 5 -subgroup and a normal Sylow 7-subgroup.", "nl_proof": "\\begin{proof} \n\nSince $|G|=105=3.5.7$, $G$ has $3-$Sylow subgroup of order $3$, as well as $5-$Sylow subgroup of order $5$ and, $7-$Sylow subgroup of order 7. Now, we count the number of such subgroups. Let $n_{3}$ be the number of $3-$Sylow subgroup, $n_{5}$ be the number of $5-$Sylow subgroup, and $n_{7}$ be the number of $7-$Sylow subgroup. Now $n_{7}=1+7k$ where $1+7k|15$. The choices for $k$ are $0$ or $1$. If $k=0$, there is only one $7-$Sylow subgroup and hence normal. So, assume now, that there are $15$ $7-$Sylow subgroup(for $k=1$). Now we look at $5-$ Sylow subgroups. $n_{5}=1+5k| 21$. So choice for $k$ are $0$ and $4$. If $k=0$, there is only one $5-$Sylow subgroup and hence normal. So, assume now, that there are $24$ $5-$Sylow subgroup (for $k=4$). Now we claim that simultaneously, there cannot be $15$ $7-$Sylow subgroup and $24$ $5-$Sylow subgroup. So, either $7-$Sylow subgroup is normal being unique, or the $5-$Sylow subgroup is normal. Now, to prove the claim, we observe that there are 90 elements of order $7$. Also, see that there are $24\\times 4=96$ number of elements of order 5. So we get $90+94=184$ number of elements which exceeds the order of the group. This gives a contradiction and proves the claim. So, now we have proved that there is either a normal $5-$Sylow subgroup or a normal $7-$Sylow subgroup.\n\n Now we prove that indeed both $5-$ Sylow subgroup and 7 -Sylow subgroup are normal. Assume that 7 -Sylow subgroup is normal. So, there is a unique 7 -Sylow subgroup, say $H$. Now assume that there are 245 -Sylow subgroups. So, we get again $24 \\times 4=96$ elements of order 5 . From $H$ we get 7 elements which gives us total of $96+7=103$ elements. Now consider the number of 3 -Sylow subgroups. $n_3=1+3 k \\mid 35$. Then the possibilities for $k$ are 0 and 2 . But we can rule out $k=2$ because having 73 -Sylow subgroup, will mean we have 14 elements of order 3 . So we get $103+14=117$ elements in total which exceeds the order of the group. So we have now that there is a unique 3 -Sylow subgroup and hence normal. Call that subgroup $K$. Now take any one 5 -Sylow subgroup, call it $L$. Now observe $L K$ is a subgroup of $G$ with order 15 . We know that a group of order 15 is cyclic by an example in Page-143 of the book. So, there is an element of order 15. Actually we have $\\phi(15)=8$ number of elements of order 15. But then again we already had 103 elements and then we actually get at least $103+8=111$ elements which exceeds the order of the group. So, there can't be 24 5-Sylow subgroups, and hence there is a unique 5-Sylow subgroup, and hence normal.\n\n\\end{proof}"}
{"id": "Dummit-Foote|exercise_4_5_19", "formal_statement": "theorem exercise_4_5_19 {G : Type*} [fintype G] [group G] \n (hG : card G = 6545) : \u00ac is_simple_group G :=", "src_header": "import .common \n\nopen set function nat int fintype real polynomial mv_polynomial\nopen subgroup ideal submodule zsqrtd gaussian_int char_p mul_aut matrix\n\nopen_locale pointwise\nopen_locale big_operators\nnoncomputable theory\n\n", "nl_statement": "Prove that if $|G|=6545$ then $G$ is not simple.", "nl_proof": "\\begin{proof} \n\nSince $|G|=132=2^{2}.3.11$, $G$ has $2-$Sylow subgroup of order $4$, as well as $11-$Sylow subgroup of order $11$, and $3-$Sylow subgroup of order $3$. Now, we count the number of such subgroups. Let $n_{11}$ be the number of $11-$Sylow subgroup and $n_{3}$ be the number of $3-$Sylow subgroup. Now $n_{11}=1+11k$ where $1+11k|12$. The choices for $k$ are $0$ or $1$. If $k=0$, there is only one $11-$Sylow subgroup and hence normal. So, assume now, that there are $12$ $11-$Sylow subgroup(for $k=1$). Now we look at $3-$ Sylow subgroups. $n_{3}=1+3k| 44$. So choice for $k$ are $0$, $1$, and $7$. If $k=0$, there is only one $3-$Sylow subgroup and hence normal. So, assume now, that there are $4$ $2-$Sylow subgroup (for $k=3$). Now we claim that simultaneously, there cannot be $12$ $11-$Sylow subgroup and $4$ $3-$Sylow subgroups provided there is more than one $2-$Sylow subgroups. So, either $2-$Sylow subgroup is normal or if not, then, either $11-$Sylow subgroup is normal being unique, or the $3-$Sylow subgroup is normal(We don't consider the possibility of $22$ $3-$Sylow subgroup because of obvious reason). Now, to prove the claim, we observe that there are $120$ elements of order $11$. Also there are $8$ elements of order $3$. So we already get $120+8+1=129$ distinct elements in the group. Let us count the number of $2-$Sylow subgroups in $G$. $n_{2}=1+2k|33$. The possibilities for $k$ are $0$, $1$, $5$, $16$. Now, assume there is more than one $2-$Sylow subgroups. Let $H_{1}$ and $H_{2}$ be two distinct $2-$Sylow subgroup. Now $|H_{1}|=4$. So we already get $129+3=132$ distinct elements in the group. Now $H_{2}$ being distinct from $H_{1}$, has at least one element which is not in $H_{1}$. This adds one more element in the group, at the least. Now already we have number of elements in the group exceeding the number of element in $G$. This gives a contradiction and proves the claim.\n\nHence $G$ is not simple.\n\n\\end{proof}"}
{"id": "Dummit-Foote|exercise_4_5_21", "formal_statement": "theorem exercise_4_5_21 {G : Type*} [fintype G] [group G]\n (hG : card G = 2907) : \u00ac is_simple_group G :=", "src_header": "import .common \n\nopen set function nat int fintype real polynomial mv_polynomial\nopen subgroup ideal submodule zsqrtd gaussian_int char_p mul_aut matrix\n\nopen_locale pointwise\nopen_locale big_operators\nnoncomputable theory\n\n", "nl_statement": "Prove that if $|G|=2907$ then $G$ is not simple.", "nl_proof": "\\begin{proof} \n\nSince $|G|=2907=3^{2}.17.19$, $G$ has $19-$Sylow subgroup of order $19$. Now, we count the number of such subgroups. Let $n_{19}$ be the number of $19-$Sylow subgroup. Now $n_{19}=1+19k$ where $1+19k|3^{2}.17$. The choices for $k$ is $0$. Hence, there is a unique $19-$Sylow subgroup and hence is normal. so $G$ is not simple.\n\n\\end{proof}"}
{"id": "Dummit-Foote|exercise_4_5_23", "formal_statement": "theorem exercise_4_5_23 {G : Type*} [fintype G] [group G]\n (hG : card G = 462) : \u00ac is_simple_group G :=", "src_header": "import .common \n\nopen set function nat int fintype real polynomial mv_polynomial\nopen subgroup ideal submodule zsqrtd gaussian_int char_p mul_aut matrix\n\nopen_locale pointwise\nopen_locale big_operators\nnoncomputable theory\n\n", "nl_statement": "Prove that if $|G|=462$ then $G$ is not simple.", "nl_proof": "\\begin{proof}\n\n Let $G$ be a group of order $462=11 \\cdot 42$. Note that 11 is a prime not dividing 42 . Let $P \\in$ $S y l_{11}(G)$. [We know $P$ exists since $S y l_{11}(G) \\neq \\emptyset$]. Note that $|P|=11^1=11$ by definition. \n\n\n\nThe number of Sylow 11-subgroups of $G$ is of the form $1+k \\cdot 11$, i.e., $n_{11} \\equiv 1$ (mod 11) and $n_{11}$ divides 42 . The only such number that divides 42 and equals 1 (mod 11) is 1 so $n_{11}=1$. Hence $P$ is the unique Sylow 11-subgroup.\n\n\n\nSince $P$ is the unique Sylow Il-subgroup, this implies that $P$ is normal in $G$.\n\n\\end{proof}"}
{"id": "Dummit-Foote|exercise_4_5_33", "formal_statement": "theorem exercise_4_5_33 {G : Type*} [group G] [fintype G] {p : \u2115} \n (P : sylow p G) [hP : P.normal] (H : subgroup G) [fintype H] : \n \u2200 R : sylow p H, R.to_subgroup = (H \u2293 P.to_subgroup).subgroup_of H \u2227\n nonempty (sylow p H) :=", "src_header": "import .common \n\nopen set function nat int fintype real polynomial mv_polynomial\nopen subgroup ideal submodule zsqrtd gaussian_int char_p mul_aut matrix\n\nopen_locale pointwise\nopen_locale big_operators\nnoncomputable theory\n\n", "nl_statement": "Let $P$ be a normal Sylow $p$-subgroup of $G$ and let $H$ be any subgroup of $G$. Prove that $P \\cap H$ is the unique Sylow $p$-subgroup of $H$.", "nl_proof": "\\begin{proof}\n\n Let $G$ be a group and $P$ is a normal $p$-Sylow subgroup of $G .|G|=p^a . m$ where $p \\nmid m$. Then $|P|=p^a$. Let $H$ be a subgroup of $G$. Now if $|H|=k$ such that $p \\nmid k$. Then $P \\cap H=\\{e\\}$. There is nothing to prove in this case. Let $|H|=p^b . n$, where $b \\leq a$, and $p \\nmid n$. Now consider $P H$ which is a subgroup of $G$, as $P$ is normal. Now $|P H|=\\frac{|P||H|}{|P \\cap H|}=\\frac{p^{a+b} \\cdot n}{|P \\cap H|}$. Now since $P H \\leq G$, so $|P H|=p^a$.l, as $P \\leq P H$. This forces $|P \\cap H|=p^b$. So by order consideration we have $P \\cap H$ is a sylow $-p$ subgroup of $H$. Now we know $P$ is unique $p$ - Sylow subgroup. Suppose $H$ has a sylow-p subgroup distinct from $P \\cap H$, call it $H_1$. Now $H_1$ is a p-subgroup of $G$. So, $H_1$ is contained in some Sylow-p subgroup of $G$, call it $P_1$. Clearly $P_1$ is distinct from $P$, which is a contradiction. So $P \\cap H$ is the only $p$-Sylow subgroup of $H$, and hence normal in $H$\n\n\\end{proof}"}
{"id": "Dummit-Foote|exercise_7_1_2", "formal_statement": "theorem exercise_7_1_2 {R : Type*} [ring R] {u : R}\n (hu : is_unit u) : is_unit (-u) :=", "src_header": "import .common \n\nopen set function nat int fintype real polynomial mv_polynomial\nopen subgroup ideal submodule zsqrtd gaussian_int char_p mul_aut matrix\n\nopen_locale pointwise\nopen_locale big_operators\nnoncomputable theory\n\n", "nl_statement": "Prove that if $u$ is a unit in $R$ then so is $-u$.", "nl_proof": "\\begin{proof}\n\n Solution: Since $u$ is a unit, we have $u v=v u=1$ for some $v \\in R$. Thus, we have\n\n$$\n\n(-v)(-u)=v u=1\n\n$$\n\nand\n\n$$\n\n(-u)(-v)=u v=1 .\n\n$$\n\nThus $-u$ is a unit.\n\n\\end{proof}"}
{"id": "Dummit-Foote|exercise_7_1_12", "formal_statement": "theorem exercise_7_1_12 {F : Type*} [field F] {K : subring F}\n (hK : (1 : F) \u2208 K) : is_domain K :=", "src_header": "import .common \n\nopen set function nat int fintype real polynomial mv_polynomial\nopen subgroup ideal submodule zsqrtd gaussian_int char_p mul_aut matrix\n\nopen_locale pointwise\nopen_locale big_operators\nnoncomputable theory\n\n", "nl_statement": "Prove that any subring of a field which contains the identity is an integral domain.", "nl_proof": "\\begin{proof}\n\n Solution: Let $R \\subseteq F$ be a subring of a field. (We need not yet assume that $1 \\in R$ ). Suppose $x, y \\in R$ with $x y=0$. Since $x, y \\in F$ and the zero element in $R$ is the same as that in $F$, either $x=0$ or $y=0$. Thus $R$ has no zero divisors. If $R$ also contains 1 , then $R$ is an integral domain.\n\n\\end{proof}"}
{"id": "Dummit-Foote|exercise_7_2_2", "formal_statement": "theorem exercise_7_2_2 {R : Type*} [ring R] (p : polynomial R) :\n p \u2223 0 \u2194 \u2203 b : R, b \u2260 0 \u2227 b \u2022 p = 0 :=", "src_header": "import .common \n\nopen set function nat int fintype real polynomial mv_polynomial\nopen subgroup ideal submodule zsqrtd gaussian_int char_p mul_aut matrix\n\nopen_locale pointwise\nopen_locale big_operators\nnoncomputable theory\n\n", "nl_statement": "Let $p(x)=a_{n} x^{n}+a_{n-1} x^{n-1}+\\cdots+a_{1} x+a_{0}$ be an element of the polynomial ring $R[x]$. Prove that $p(x)$ is a zero divisor in $R[x]$ if and only if there is a nonzero $b \\in R$ such that $b p(x)=0$.", "nl_proof": "\\begin{proof}\n\n Solution: If $b p(x)=0$ for some nonzero $b \\in R$, then it is clear that $p(x)$ is a zero divisor.\n\nNow suppose $p(x)$ is a zero divisor; that is, for some $q(x)=\\sum_{i=0}^m b_i x^i$, we have $p(x) q(x)=0$. We may choose $q(x)$ to have minimal degree among the nonzero polynomials with this property.\n\nWe will now show by induction that $a_i q(x)=0$ for all $0 \\leq i \\leq n$.\n\nFor the base case, note that\n\n$$\n\np(x) q(x)=\\sum_{k=0}^{n+m}\\left(\\sum_{i+j=k} a_i b_j\\right) x^k=0 .\n\n$$\n\nThe coefficient of $x^{n+m}$ in this product is $a_n b_m$ on one hand, and 0 on the other. Thus $a_n b_m=0$. Now $a_n q(x) p(x)=0$, and the coefficient of $x^m$ in $q$ is $a_n b_m=0$. Thus the degree of $a_n q(x)$ is strictly less than that of $q(x)$; since $q(x)$ has minimal degree among the nonzero polynomials which multiply $p(x)$ to 0 , in fact $a_n q(x)=0$. More specifically, $a_n b_i=0$ for all $0 \\leq i \\leq m$.\n\nFor the inductive step, suppose that for some $0 \\leq t<n$, we have $a_r q(x)=0$ for all $t<r \\leq n$. Now\n\n$$\n\np(x) q(x)=\\sum_{k=0}^{n+m}\\left(\\sum_{i+j=k} a_i b_j\\right) x^k=0 .\n\n$$\n\nOn one hand, the coefficient of $x^{m+t}$ is $\\sum_{i+j=m+t} a_i b_j$, and on the other hand, it is 0 . Thus\n\n$$\n\n\\sum_{i+j=m+t} a_i b_j=0 .\n\n$$\n\nBy the induction hypothesis, if $i \\geq t$, then $a_i b_j=0$. Thus all terms such that $i \\geq t$ are zero. If $i<t$, then we must have $j>m$, a contradiction. Thus we have $a_t b_m=0$. As in the base case,\n\n$$\n\na_t q(x) p(x)=0\n\n$$\n\nand $a_t q(x)$ has degree strictly less than that of $q(x)$, so that by minimality, $a_t q(x)=0$.\n\nBy induction, $a_i q(x)=0$ for all $0 \\leq i \\leq n$. In particular, $a_i b_m=0$. Thus $b_m p(x)=0$.\n\n\\end{proof}"}
{"id": "Dummit-Foote|exercise_7_3_16", "formal_statement": "theorem exercise_7_3_16 {R S : Type*} [ring R] [ring S] \n {\u03c6 : R \u2192+* S} (hf : surjective \u03c6) : \n \u03c6 '' (center R) \u2282 center S :=", "src_header": "import .common \n\nopen set function nat int fintype real polynomial mv_polynomial\nopen subgroup ideal submodule zsqrtd gaussian_int char_p mul_aut matrix\n\nopen_locale pointwise\nopen_locale big_operators\nnoncomputable theory\n\n", "nl_statement": "Let $\\varphi: R \\rightarrow S$ be a surjective homomorphism of rings. Prove that the image of the center of $R$ is contained in the center of $S$.", "nl_proof": "\\begin{proof}\n\n Suppose $r \\in \\varphi[Z(R)]$. Then $r=\\varphi(z)$ for some $z \\in Z(R)$. Now let $x \\in S$. Since $\\varphi$ is surjective, we have $x=\\varphi y$ for some $y \\in R$. Now\n\n$$\n\nx r=\\varphi(y) \\varphi(z)=\\varphi(y z)=\\varphi(z y)=\\varphi(z) \\varphi(y)=r x .\n\n$$\n\nThus $r \\in Z(S)$.\n\n\\end{proof}"}
{"id": "Dummit-Foote|exercise_7_4_27", "formal_statement": "theorem exercise_7_4_27 {R : Type*} [comm_ring R] (hR : (0 : R) \u2260 1) \n {a : R} (ha : is_nilpotent a) (b : R) : \n is_unit (1-a*b) :=", "src_header": "import .common \n\nopen set function nat int fintype real polynomial mv_polynomial\nopen subgroup ideal submodule zsqrtd gaussian_int char_p mul_aut matrix\n\nopen_locale pointwise\nopen_locale big_operators\nnoncomputable theory\n\n", "nl_statement": "Let $R$ be a commutative ring with $1 \\neq 0$. Prove that if $a$ is a nilpotent element of $R$ then $1-a b$ is a unit for all $b \\in R$.", "nl_proof": "\\begin{proof}\n\n $\\mathfrak{N}(R)$ is an ideal of $R$. Thus for all $b \\in R,-a b$ is nilpotent. Hence $1-a b$ is a unit in $R$.\n\n\\end{proof}"}
{"id": "Dummit-Foote|exercise_8_2_4", "formal_statement": "theorem exercise_8_2_4 {R : Type*} [ring R][no_zero_divisors R] \n [cancel_comm_monoid_with_zero R] [gcd_monoid R]\n (h1 : \u2200 a b : R, a \u2260 0 \u2192 b \u2260 0 \u2192 \u2203 r s : R, gcd a b = r*a + s*b)\n (h2 : \u2200 a : \u2115 \u2192 R, (\u2200 i j : \u2115, i < j \u2192 a i \u2223 a j) \u2192 \n \u2203 N : \u2115, \u2200 n \u2265 N, \u2203 u : R, is_unit u \u2227 a n = u * a N) : \n is_principal_ideal_ring R :=", "src_header": "import .common \n\nopen set function nat int fintype real polynomial mv_polynomial\nopen subgroup ideal submodule zsqrtd gaussian_int char_p mul_aut matrix\n\nopen_locale pointwise\nopen_locale big_operators\nnoncomputable theory\n\n", "nl_statement": "Let $R$ be an integral domain. Prove that if the following two conditions hold then $R$ is a Principal Ideal Domain: (i) any two nonzero elements $a$ and $b$ in $R$ have a greatest common divisor which can be written in the form $r a+s b$ for some $r, s \\in R$, and (ii) if $a_{1}, a_{2}, a_{3}, \\ldots$ are nonzero elements of $R$ such that $a_{i+1} \\mid a_{i}$ for all $i$, then there is a positive integer $N$ such that $a_{n}$ is a unit times $a_{N}$ for all $n \\geq N$.", "nl_proof": "\\begin{proof}\n\n Let $I \\leq R$ be a nonzero ideal and let $I / \\sim$ be the set of equivalence classes of elements of $I$ with regards to the relation of being associates. We can equip $I / \\sim$ with a partial order with $[x] \\leq[y]$ if $y \\mid x$. Condition (ii) implies all chains in $I / \\sim$ have an upper bound, so By Zorn's lemma $I / \\sim$ contains a maximal element, i.e. $I$ contains a class of associated elements which are minimal with respect to divisibility.\n\n\n\nNow let $a, b \\in I$ be two elements such that $[a]$ and $[b]$ are minimal with respect to divisibility. By condition (i) $a$ and $b$ have a greatest common divisor $d$ which can be expressed as $d=$ $a x+b y$ for some $x, y \\in R$. In particular, $d \\in I$. Since $a$ and $b$ are minimal with respect to divisibility, we have that $[a]=[b]=[d]$. Therefore $I$ has at least one element $a$ that is minimal with regard to divisibility and all such elements are associate, and we have $I=\\langle a\\rangle$ and so $I$ is principal. We conclude $R$ is a principal ideal domain.\n\n\\end{proof}"}
{"id": "Dummit-Foote|exercise_8_3_5a", "formal_statement": "theorem exercise_8_3_5a {n : \u2124} (hn0 : n > 3) (hn1 : squarefree n) : \n irreducible (2 :zsqrtd $ -n) \u2227 \n irreducible (\u27e80, 1\u27e9 : zsqrtd $ -n) \u2227 \n irreducible (1 + \u27e80, 1\u27e9 : zsqrtd $ -n) :=", "src_header": "import .common \n\nopen set function nat int fintype real polynomial mv_polynomial\nopen subgroup ideal submodule zsqrtd gaussian_int char_p mul_aut matrix\n\nopen_locale pointwise\nopen_locale big_operators\nnoncomputable theory\n\n", "nl_statement": "Let $R=\\mathbb{Z}[\\sqrt{-n}]$ where $n$ is a squarefree integer greater than 3. Prove that $2, \\sqrt{-n}$ and $1+\\sqrt{-n}$ are irreducibles in $R$.", "nl_proof": "\\begin{proof}\n\n Suppose $a=a_1+a_2 \\sqrt{-n}, b=b_1+b_2 \\sqrt{-n} \\in R$ are such that $2=a b$, then $N(a) N(b)=4$. Without loss of generality we can assume $N(a) \\leq N(b)$, so $N(a)=1$ or $N(a)=2$. Suppose $N(a)=2$, then $a_1^2+n a_2^2=2$ and since $n>3$ we have $a_2=0$, which implies $a_1^2=2$, a contradiction. So $N(a)=1$ and $a$ is a unit. Therefore 2 is irreducible in $R$.\n\n\n\nSuppose now $\\sqrt{-n}=a b$, then $N(a) N(b)=n$ and we can assume $N(a)<$ $N(b)$ since $n$ is square free. Suppose $N(a)>1$, then $a_1^2+n a_2^2>1$ and $a_1^2+n a_2^2 \\mid n$, so $a_2=0$, and therefore $a_1^2 \\mid n$. Since $n$ is squarefree, $a_1=\\pm 1$, a contradiction. Therefore $N(a)=1$ and so $a$ is a unit and $\\sqrt{-n}$ is irreducible.\n\n\n\nSuppose $1+\\sqrt{-n}=a b$, then $N(a) N(b)=n+1$ and we can assume $N(a) \\leq N(b)$. Suppose $N(a)>1$, then $a_1^2+n a_2^2>1$ and $a_1^2+n a_2^2 \\mid n+1$. If $\\left|a_2\\right| \\geq 2$, then since $n>3$ we have a contradiction since $N(a)$ is too large. If $\\left|a_2\\right|=1$, then $a_1^2+n$ divides $1+n$ and so $a_1=\\pm 1$, and in either case $N(a)=n+1$ which contradicts $N(a) \\leq N(b)$. If $a_2=0$ then $a_1^2\\left(b_1^2+n b_2^2\\right)=\\left(a_1 b_1\\right)^2+n\\left(a_1 b_2\\right)^2=n+1$. If $\\left|a_1 b_2\\right| \\geq 2$ we have a contradiction. If $\\left|a_1 b_2\\right|=1$ then $a_1=\\pm 1$ which contradicts $N(a)>1$. If $\\left|a_1 b_2\\right|=0$, then $b_2=0$ and so $a_1 b_1=\\sqrt{-n}$, a contradiction. Therefore $N(a)=1$ and so $a$ is a unit and $1+\\sqrt{-n}$ is irreducible.\n\n\\end{proof}"}
{"id": "Dummit-Foote|exercise_8_3_6b", "formal_statement": "theorem exercise_8_3_6b {q : \u2115} (hq0 : q.prime) \n (hq1 : q \u2261 3 [ZMOD 4]) {R : Type*} [ring R]\n (hR : R = (gaussian_int \u29f8 ideal.span ({q} : set gaussian_int))) : \n is_field R \u2227 \u2203 finR : fintype R, @card R finR = q^2 :=", "src_header": "import .common \n\nopen set function nat int fintype real polynomial mv_polynomial\nopen subgroup ideal submodule zsqrtd gaussian_int char_p mul_aut matrix\n\nopen_locale pointwise\nopen_locale big_operators\nnoncomputable theory\n\n", "nl_statement": "Let $q \\in \\mathbb{Z}$ be a prime with $q \\equiv 3 \\bmod 4$. Prove that the quotient ring $\\mathbb{Z}[i] /(q)$ is a field with $q^{2}$ elements.", "nl_proof": "\\begin{proof}\n\n The division algorithm gives us that every element of $\\mathbb{Z}[i] /\\langle q\\rangle$ is represented by an element $a+b i$ such that $0 \\leq a, b<q$. Each such choice is distinct since if $a_1+b_1 i+\\langle q\\rangle=a_2+b_2 i+\\langle q\\rangle$, then $\\left(a_1-a_2\\right)+\\left(b_1-b_2\\right) i$ is divisible by $q$, so $a_1 \\equiv a_2 \\bmod q$ and $b_1 \\equiv b_2 \\bmod q$. So $\\mathbb{Z}[i] /\\langle q\\rangle$ has order $q^2$.\n\n\n\nSince $q \\equiv 3 \\bmod 4, q$ is irreducible, hence prime in $\\mathbb{Z}[i]$. Therefore $\\langle q\\rangle$ is a prime ideal in $\\mathbb{Z}[i]$, and so $\\mathbb{Z}[i] /\\langle q\\rangle$ is an integral domain. So $\\mathbb{Z}[i] /\\langle q\\rangle$ is a field.\n\n\\end{proof}"}
{"id": "Dummit-Foote|exercise_9_1_10", "formal_statement": "theorem exercise_9_1_10 {f : \u2115 \u2192 mv_polynomial \u2115 \u2124} \n (hf : f = \u03bb i, X i * X (i+1)): \n infinite (minimal_primes (mv_polynomial \u2115 \u2124 \u29f8 ideal.span (range f))) :=", "src_header": "import .common \n\nopen set function nat int fintype real polynomial mv_polynomial\nopen subgroup ideal submodule zsqrtd gaussian_int char_p mul_aut matrix\n\nopen_locale pointwise\nopen_locale big_operators\nnoncomputable theory\n\n", "nl_statement": "Prove that the ring $\\mathbb{Z}\\left[x_{1}, x_{2}, x_{3}, \\ldots\\right] /\\left(x_{1} x_{2}, x_{3} x_{4}, x_{5} x_{6}, \\ldots\\right)$ contains infinitely many minimal prime ideals.", "nl_proof": "\\begin{proof}\n\n Let $R=\\mathbb{Z}\\left[x_1, x_2, \\ldots, x_n\\right]$ and consider the ideal $K=\\left(x_{2 k+1} x_{2 k+2} \\mid k \\in \\mathbb{Z}_{+}\\right)$in $R$.\n\nConsider the family of subsets $X=\\left\\{\\left\\{x_{2 k+1}, x_{2 k+2}\\right\\} \\mid k \\in \\mathbb{Z}_{+}\\right\\}$, and $Y$ the set of choice function on $X$, ie the set of functions $\\lambda: \\mathbb{Z}_{+} \\rightarrow \\cup_{\\mathbb{Z}_{+}}\\left\\{x_{2 k+1}, x_{2 k+2}\\right\\}$ with $\\lambda(a) \\in$ $\\left\\{x_{2 a+1}, x_{2 a+2}\\right\\}$\n\nFor each $\\lambda \\in Y$ we have the ideal $I_\\lambda=(\\lambda(0), \\lambda(1), \\ldots)$.\n\nAll these ideals are distinct, ie for $\\lambda \\neq \\lambda^{\\prime}$ we have $I_\\lambda \\neq I_{\\lambda^{\\prime}}$.\n\nWe also have that by construction $K \\subset I_\\lambda$ for all $\\lambda \\in Y$.\n\nBy the Third Isomorphism Treorem\n\n$$\n\n(R / K) /\\left(I_\\lambda / K\\right) \\cong R / I_\\lambda\n\n$$\n\nNote also that $R / I_\\lambda$ is isomorphic to the polynomial ring over $R$ with indeterminates the $x_i$ not in the image of $\\lambda$, and since there is a countably infinite number of them we can conclude $R / I_\\lambda \\cong R$, an integral domain. Therefore $I_\\lambda / K$ is a prime ideal of $R / K$\n\n\n\nWe prove now that $I_\\lambda / K$ is a minimal prime ideal. Let $J / K \\subseteq I_\\lambda / K$ be a prime ideal. For each pair $\\left(x_{2 k+1}, x_{2 k+2}\\right)$ we have that $x_{2 k+1} x_{2 k+2} \\in K$ so $x_{2 k+1} x_{2 k+2} \\bmod K \\in J / K$ so $J$ must contain one of the elements in $\\left\\{x_{2 k+1}, x_{2 k+2}\\right\\}$. But since $J / K \\subseteq I_\\lambda / K$ it must be $\\lambda(k)$ for all $k \\in \\mathbb{Z}_{+}$. Therefore $J / K=I_\\lambda / K$\n\n\\end{proof}"}
{"id": "Dummit-Foote|exercise_9_4_2a", "formal_statement": "theorem exercise_9_4_2a : irreducible (X^4 - 4*X^3 + 6 : polynomial \u2124) :=", "src_header": "import .common \n\nopen set function nat int fintype real polynomial mv_polynomial\nopen subgroup ideal submodule zsqrtd gaussian_int char_p mul_aut matrix\n\nopen_locale pointwise\nopen_locale big_operators\nnoncomputable theory\n\n", "nl_statement": "Prove that $x^4-4x^3+6$ is irreducible in $\\mathbb{Z}[x]$.", "nl_proof": "\\begin{proof}\n\n$$\n\nx^4-4 x^3+6\n\n$$\n\nThe polynomial is irreducible by Eisenstiens Criterion since the prime $2$ doesnt divide the leading coefficient 2 divide coefficients of the low order term $-4,0,0$ but 6 is not divided by the square of 2.\n\n\\end{proof}"}
{"id": "Dummit-Foote|exercise_9_4_2c", "formal_statement": "theorem exercise_9_4_2c : irreducible \n (X^4 + 4*X^3 + 6*X^2 + 2*X + 1 : polynomial \u2124) :=", "src_header": "import .common \n\nopen set function nat int fintype real polynomial mv_polynomial\nopen subgroup ideal submodule zsqrtd gaussian_int char_p mul_aut matrix\n\nopen_locale pointwise\nopen_locale big_operators\nnoncomputable theory\n\n", "nl_statement": "Prove that $x^4+4x^3+6x^2+2x+1$ is irreducible in $\\mathbb{Z}[x]$.", "nl_proof": "\\begin{proof}\n\n$$\n\np(x)=x^4+6 x^3+4 x^2+2 x+1\n\n$$\n\nWe calculate $p(x-1)$\n\n$$\n\n\\begin{aligned}\n\n(x-1)^4 & =x^4-4 x^3+6 x^2-4 x+1 \\\\\n\n6(x-1)^3 & =6 x^3-18 x^2+18 x-6 \\\\\n\n4(x-1)^2 & =4 x^2-8 x+4 \\\\\n\n2(x-1) & =2 x-2 \\\\\n\n1 & =1\n\n\\end{aligned}\n\n$$\n\n$$\n\n\\begin{aligned}\n\n& p(x-1)=(x-1)^4+6(x-1)^3+4(x-1)^2+2(x-1)+1=x^4+2 x^3-8 x^2+ \\\\\n\n& 8 x-2 \\\\\n\n& q(x)=x^4+2 x^3-8 x^2+8 x-2\n\n\\end{aligned}\n\n$$\n\n$q(x)$ is irreducible by Eisenstiens Criterion since the prime $\\$ 2 \\$$ divides the lower coefficient but $\\$ 2^{\\wedge} 2 \\$$ doesnt divide constant $-2$. Any factorization of $p(x)$ would provide a factor of $p(x)(x-1)$\n\nSince:\n\n$$\n\n\\begin{aligned}\n\n& p(x)=a(x) b(x) \\\\\n\n& q(x)=p(x)(x-1)=a(x-1) b(x-1)\n\n\\end{aligned}\n\n$$\n\nWe get a contradiction with the irreducibility of $p(x-1)$, so $p(x)$ is irreducible in $Z[x]$\n\n\\end{proof}"}
{"id": "Dummit-Foote|exercise_9_4_9", "formal_statement": "theorem exercise_9_4_9 : \n irreducible (X^2 - C sqrtd : polynomial (zsqrtd 2)) :=", "src_header": "import .common \n\nopen set function nat int fintype real polynomial mv_polynomial\nopen subgroup ideal submodule zsqrtd gaussian_int char_p mul_aut matrix\n\nopen_locale pointwise\nopen_locale big_operators\nnoncomputable theory\n\n", "nl_statement": "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.", "nl_proof": "\\begin{proof}\n\n$Z[\\sqrt{2}]$ is an Euclidean domain, and so a unique factorization domain.\n\nWe have to prove $p(x)=x^2-\\sqrt{2}$ irreducible.\n\nSuppose to the contrary.\n\nif $p(x)$ is reducible then it must have root.\n\nLet $a+b \\sqrt{2}$ be a root of $x^2-\\sqrt{2}$.\n\nNow we have\n\n$$\n\na^2+2 b^2+2 a b \\sqrt{2}=\\sqrt{2}\n\n$$\n\nBy comparing the coefficients we get $2 a b=1$ for some pair of integers $a$ and $b$, a contradiction.\n\nSo $p(x)$ is irredicible over $Z[\\sqrt{2}]$.\n\n\\end{proof}"}
{"id": "Dummit-Foote|exercise_11_1_13", "formal_statement": "theorem exercise_11_1_13 {\u03b9 : Type*} [fintype \u03b9] : \n (\u03b9 \u2192 \u211d) \u2243\u2097[\u211a] \u211d :=", "src_header": "import .common \n\nopen set function nat int fintype real polynomial mv_polynomial\nopen subgroup ideal submodule zsqrtd gaussian_int char_p mul_aut matrix\n\nopen_locale pointwise\nopen_locale big_operators\nnoncomputable theory\n\n", "nl_statement": "Prove that as vector spaces over $\\mathbb{Q}, \\mathbb{R}^n \\cong \\mathbb{R}$, for all $n \\in \\mathbb{Z}^{+}$.", "nl_proof": "\\begin{proof} \n\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\n\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\n\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\n\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\n\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\n\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\n\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\n\\end{proof}"} |