{"id": "Rudin|exercise_1_1a", "formal_statement": "theorem exercise_1_1a\n (x : \u211d) (y : \u211a) :\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 $r+x$ is irrational.\n", "nl_proof": "\\begin{proof}\n\n If $r$ and $r+x$ were both rational, then $x=r+x-r$ would also be rational.\n\n\\end{proof}"} {"id": "Rudin|exercise_1_2", "formal_statement": "theorem exercise_1_2 : \u00ac \u2203 (x : \u211a), ( x ^ 2 = 12 ) :=", "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 there is no rational number whose square is $12$.\n", "nl_proof": "\\begin{proof}\n\n Suppose $m^2=12 n^2$, where $m$ and $n$ have no common factor. It follows that $m$ must be even, and therefore $n$ must be odd. Let $m=2 r$. Then we have $r^2=3 n^2$, so that $r$ is also odd. Let $r=2 s+1$ and $n=2 t+1$. Then\n\n$$\n\n4 s^2+4 s+1=3\\left(4 t^2+4 t+1\\right)=12 t^2+12 t+3,\n\n$$\n\nso that\n\n$$\n\n4\\left(s^2+s-3 t^2-3 t\\right)=2 .\n\n$$\n\nBut this is absurd, since 2 cannot be a multiple of 4 .\n\n\\end{proof}"} {"id": "Rudin|exercise_1_5", "formal_statement": "theorem exercise_1_5 (A minus_A : set \u211d) (hA : A.nonempty) \n (hA_bdd_below : bdd_below A) (hminus_A : minus_A = {x | -x \u2208 A}) :\n Inf A = Sup minus_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": "Let $A$ be a nonempty set of real numbers which is bounded below. Let $-A$ be the set of all numbers $-x$, where $x \\in A$. Prove that $\\inf A=-\\sup (-A)$.\n", "nl_proof": "\\begin{proof}\n\n We need to prove that $-\\sup (-A)$ is the greatest lower bound of $A$. For brevity, let $\\alpha=-\\sup (-A)$. We need to show that $\\alpha \\leq x$ for all $x \\in A$ and $\\alpha \\geq \\beta$ if $\\beta$ is any lower bound of $A$.\n\n\n\nSuppose $x \\in A$. Then, $-x \\in-A$, and, hence $-x \\leq \\sup (-A)$. It follows that $x \\geq-\\sup (-A)$, i.e., $\\alpha \\leq x$. Thus $\\alpha$ is a lower bound of $A$.\n\n\n\nNow let $\\beta$ be any lower bound of $A$. This means $\\beta \\leq x$ for all $x$ in $A$. Hence $-x \\leq-\\beta$ for all $x \\in A$, which says $y \\leq-\\beta$ for all $y \\in-A$. This means $-\\beta$ is an upper bound of $-A$. Hence $-\\beta \\geq \\sup (-A)$ by definition of sup, i.e., $\\beta \\leq-\\sup (-A)$, and so $-\\sup (-A)$ is the greatest lower bound of $A$.\n\n\\end{proof}"} {"id": "Rudin|exercise_1_11a", "formal_statement": "theorem exercise_1_11a (z : \u2102) : \n \u2203 (r : \u211d) (w : \u2102), abs w = 1 \u2227 z = r * w :=", "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, prove that there exists an $r\\geq 0$ and a complex number $w$ with $| w | = 1$ such that $z = rw$.\n", "nl_proof": "\\begin{proof}\n\n If $z=0$, we take $r=0, w=1$. (In this case $w$ is not unique.) Otherwise we take $r=|z|$ and $w=z /|z|$, and these choices are unique, since if $z=r w$, we must have $r=r|w|=|r w|=|z|, z / r$\n\n\\end{proof}"} {"id": "Rudin|exercise_1_13", "formal_statement": "theorem exercise_1_13 (x y : \u2102) : \n |(abs x) - (abs y)| \u2264 abs (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 $x, y$ are complex, prove that $||x|-|y|| \\leq |x-y|$.\n", "nl_proof": "\\begin{proof}\n\n Since $x=x-y+y$, the triangle inequality gives\n\n$$\n\n|x| \\leq|x-y|+|y|\n\n$$\n\nso that $|x|-|y| \\leq|x-y|$. Similarly $|y|-|x| \\leq|x-y|$. Since $|x|-|y|$ is a real number we have either ||$x|-| y||=|x|-|y|$ or ||$x|-| y||=|y|-|x|$. In either case, we have shown that ||$x|-| y|| \\leq|x-y|$.\n\n\\end{proof}"} {"id": "Rudin|exercise_1_16a", "formal_statement": "theorem exercise_1_16a\n (n : \u2115)\n (d r : \u211d)\n (x y z : euclidean_space \u211d (fin n)) -- R^n\n (h\u2081 : n \u2265 3)\n (h\u2082 : \u2016x - y\u2016 = d)\n (h\u2083 : d > 0)\n (h\u2084 : r > 0)\n (h\u2085 : 2 * r > d)\n : set.infinite {z : euclidean_space \u211d (fin n) | \u2016z - x\u2016 = r \u2227 \u2016z - y\u2016 = 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": "Suppose $k \\geq 3, x, y \\in \\mathbb{R}^k, |x - y| = d > 0$, and $r > 0$. Prove that if $2r > d$, there are infinitely many $z \\in \\mathbb{R}^k$ such that $|z-x|=|z-y|=r$.\n", "nl_proof": "\\begin{proof}\n\n (a) Let w be any vector satisfying the following two equations:\n\n$$\n\n\\begin{aligned}\n\n\\mathbf{w} \\cdot(\\mathbf{x}-\\mathbf{y}) &=0, \\\\\n\n|\\mathbf{w}|^2 &=r^2-\\frac{d^2}{4} .\n\n\\end{aligned}\n\n$$\n\nFrom linear algebra it is known that all but one of the components of a solution $\\mathbf{w}$ of the first equation can be arbitrary. The remaining component is then uniquely determined. Also, if $w$ is any non-zero solution of the first equation, there is a unique positive number $t$ such that $t$ w satisfies both equations. (For example, if $x_1 \\neq y_1$, the first equation is satisfied whenever\n\n$$\n\nz_1=\\frac{z_2\\left(x_2-y_2\\right)+\\cdots+z_k\\left(x_k-y_k\\right)}{y_1-x_1} .\n\n$$\n\nIf $\\left(z_1, z_2, \\ldots, z_k\\right)$ satisfies this equation, so does $\\left(t z_1, t z_2, \\ldots, t z_k\\right)$ for any real number $t$.) Since at least two of these components can vary independently, we can find a solution with these components having any prescribed ratio. This ratio does not change when we multiply by the positive number $t$ to obtain a solution of both equations. Since there are infinitely many ratios, there are infinitely many distinct solutions. For each such solution $\\mathbf{w}$ the vector $\\mathbf{z}=$ $\\frac{1}{2} \\mathrm{x}+\\frac{1}{2} \\mathrm{y}+\\mathrm{w}$ is a solution of the required equation. For\n\n$$\n\n\\begin{aligned}\n\n|\\mathrm{z}-\\mathbf{x}|^2 &=\\left|\\frac{\\mathbf{y}-\\mathbf{x}}{2}+\\mathbf{w}\\right|^2 \\\\\n\n&=\\left|\\frac{\\mathbf{y}-\\mathbf{x}}{2}\\right|^2+2 \\mathbf{w} \\cdot \\frac{\\mathbf{x}-\\mathbf{y}}{2}+|\\mathbf{w}|^2 \\\\\n\n&=\\frac{d^2}{4}+0+r^2-\\frac{d^2}{4} \\\\\n\n&=r^2\n\n\\end{aligned}\n\n$$\n\nand a similar relation holds for $|z-y|^2$.\n\n\\end{proof}"} {"id": "Rudin|exercise_1_18a", "formal_statement": "theorem exercise_1_18a\n (n : \u2115)\n (h : n > 1)\n (x : euclidean_space \u211d (fin n)) -- R^n\n : \u2203 (y : euclidean_space \u211d (fin n)), y \u2260 0 \u2227 (inner x y) = (0 : \u211d) :=", "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 \\geq 2$ and $\\mathbf{x} \\in R^{k}$, prove that there exists $\\mathbf{y} \\in R^{k}$ such that $\\mathbf{y} \\neq 0$ but $\\mathbf{x} \\cdot \\mathbf{y}=0$\n", "nl_proof": "\\begin{proof}\n\n If $\\mathbf{x}$ has any components equal to 0 , then $\\mathbf{y}$ can be taken to have the corresponding components equal to 1 and all others equal to 0 . If all the components of $\\mathbf{x}$ are nonzero, $\\mathbf{y}$ can be taken as $\\left(-x_2, x_1, 0, \\ldots, 0\\right)$. This is, of course, not true when $k=1$, since the product of two nonzero real numbers is nonzero.\n\n\\end{proof}"} {"id": "Rudin|exercise_1_19", "formal_statement": "theorem exercise_1_19\n (n : \u2115)\n (a b c x : euclidean_space \u211d (fin n))\n (r : \u211d)\n (h\u2081 : r > 0)\n (h\u2082 : 3 \u2022 c = 4 \u2022 b - a)\n (h\u2083 : 3 * r = 2 * \u2016x - b\u2016)\n : \u2016x - a\u2016 = 2 * \u2016x - b\u2016 \u2194 \u2016x - c\u2016 = 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": "Suppose $a, b \\in R^k$. Find $c \\in R^k$ and $r > 0$ such that $|x-a|=2|x-b|$ if and only if $| x - c | = r$. Prove that $3c = 4b - a$ and $3r = 2 |b - a|$.\n", "nl_proof": "\\begin{proof}\n\n Since the solution is given to us, all we have to do is verify it, i.e., we need to show that the equation\n\n$$\n\n|\\mathrm{x}-\\mathrm{a}|=2|\\mathrm{x}-\\mathrm{b}|\n\n$$\n\nis equivalent to $|\\mathrm{x}-\\mathbf{c}|=r$, which says\n\n$$\n\n\\left|\\mathbf{x}-\\frac{4}{3} \\mathbf{b}+\\frac{1}{3} \\mathbf{a}\\right|=\\frac{2}{3}|\\mathbf{b}-\\mathbf{a}| .\n\n$$\n\nIf we square both sides of both equations, we an equivalent pair of equations, the first of which reduces to\n\n$$\n\n3|\\mathbf{x}|^2+2 \\mathbf{a} \\cdot \\mathbf{x}-8 \\mathbf{b} \\cdot \\mathbf{x}-|\\mathbf{a}|^2+4|\\mathbf{b}|^2=0,\n\n$$\n\nand the second of which reduces to this equation divided by 3 . Hence these equations are indeed equivalent.\n\n\\end{proof}"} {"id": "Rudin|exercise_2_24", "formal_statement": "theorem exercise_2_24 {X : Type*} [metric_space X]\n (hX : \u2200 (A : set X), infinite A \u2192 \u2203 (x : X), x \u2208 closure A) :\n separable_space 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": "Let $X$ be a metric space in which every infinite subset has a limit point. Prove that $X$ is separable.\n", "nl_proof": "\\begin{proof}\n\n We observe that if the process of constructing $x_j$ did not terminate, the result would be an infinite set of points $x_j, j=1,2, \\ldots$, such that $d\\left(x_i, x_j\\right) \\geq \\delta$ for $i \\neq j$. It would then follow that for any $x \\in X$, the open ball $B_{\\frac{\\delta}{2}}(x)$ contains at most one point of the infinite set, hence that no point could be a limit point of this set, contrary to hypothesis. Hence $X$ is totally bounded, i.e., for each $\\delta>0$ there is a finite set $x_1, \\ldots, x_{N\\delta}$such that $X=\\bigcup_{j / 1}^{N\\delta} B_\\delta\\left(x_j\\right)$\n\n\n\nLet $x_{n_1}, \\ldots, x_{n N_n}$ be such that $X=\\bigcup_{j / 1}^{N_n} B_{\\frac{1}{n}}\\left(x_{n j}\\right), n=1,2, \\ldots$ We claim that $\\left\\{x_{n j}: 1 \\leq j \\leq N_n ; n=1,2, \\ldots\\right\\}$ is a countable dense subset of $X$. Indeed\n\n25\n\nif $x \\in X$ and $\\delta>0$, then $x \\in B_{\\frac{1}{n}}\\left(x_{n j}\\right)$ for some $x_{n j}$ for some $n>\\frac{1}{\\delta}$, and hence $d\\left(x, x_{n j}\\right)<\\delta$. By definition, this means that $\\left\\{x_{n j}\\right\\}$ is dense in $X$.\n\n\\end{proof}"} {"id": "Rudin|exercise_2_27a", "formal_statement": "theorem exercise_2_27a (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, \u00ac set.countable (P \u2229 E)}) :\n is_closed P \u2227 P = {x | cluster_pt x (\ud835\udcdf 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 $P$ is perfect.\n", "nl_proof": "\\begin{proof}\n\n We see that $E \\cap W$ is at most countable, being a countable union of at-most-countable sets. It remains to show that $P=W^c$, and that $P$ is perfect.\n\n\\end{proof}"} {"id": "Rudin|exercise_2_28", "formal_statement": "theorem exercise_2_28 (X : Type*) [metric_space X] [separable_space X]\n (A : set X) (hA : is_closed A) :\n \u2203 P\u2081 P\u2082 : set X, A = P\u2081 \u222a P\u2082 \u2227\n is_closed P\u2081 \u2227 P\u2081 = {x | cluster_pt x (\ud835\udcdf P\u2081)} \u2227\n set.countable P\u2082 :=", "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 closed set in a separable metric space is the union of a (possibly empty) perfect set and a set which is at most countable.\n", "nl_proof": "\\begin{proof}\n\n If $E$ is closed, it contains all its limit points, and hence certainly all its condensation points. Thus $E=P \\cup(E \\backslash P)$, where $P$ is perfect (the set of all condensation points of $E$ ), and $E \\backslash P$ is at most countable.\n\n\n\nSince a perfect set in a separable metric space has the same cardinality as the real numbers, the set $P$ must be empty if $E$ is countable. The at-mostcountable set $E \\backslash P$ cannot be perfect, hence must have isolated points if it is nonempty.\n\n\\end{proof}"} {"id": "Rudin|exercise_3_1a", "formal_statement": "theorem exercise_3_1a\n (f : \u2115 \u2192 \u211d)\n (h : \u2203 (a : \u211d), tendsto (\u03bb (n : \u2115), f n) at_top (\ud835\udcdd a))\n : \u2203 (a : \u211d), tendsto (\u03bb (n : \u2115), |f n|) at_top (\ud835\udcdd 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": "Prove that convergence of $\\left\\{s_{n}\\right\\}$ implies convergence of $\\left\\{\\left|s_{n}\\right|\\right\\}$.\n", "nl_proof": "\\begin{proof}\n\n Let $\\varepsilon>0$. Since the sequence $\\left\\{s_n\\right\\}$ is a Cauchy sequence, there exists $N$ such that $\\left|s_m-s_n\\right|<\\varepsilon$ for all $m>N$ and $n>N$. We then have $\\left| |s_m| - |s_n| \\right| \\leq\\left|s_m-s_n\\right|<\\varepsilon$ for all $m>N$ and $n>N$. Hence the sequence $\\left\\{\\left|s_n\\right|\\right\\}$ is also a Cauchy sequence, and therefore must converge.\n\n\\end{proof}"} {"id": "Rudin|exercise_3_3", "formal_statement": "theorem exercise_3_3\n : \u2203 (x : \u211d), tendsto f at_top (\ud835\udcdd x) \u2227 \u2200 n, f n < 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": "If $s_{1}=\\sqrt{2}$, and $s_{n+1}=\\sqrt{2+\\sqrt{s_{n}}} \\quad(n=1,2,3, \\ldots),$ prove that $\\left\\{s_{n}\\right\\}$ converges, and that $s_{n}<2$ for $n=1,2,3, \\ldots$.\n", "nl_proof": "\\begin{proof}\n\n Since $\\sqrt{2}<2$, it is manifest that if $s_n<2$, then $s_{n+1}<\\sqrt{2+2}=2$. Hence it follows by induction that $\\sqrt{2}1$, i.e., $s_n>s_n^2-2=s_{n-1}$. Hence the sequence is an increasing sequence that is bounded above (by 2 ) and so converges. Since the limit $s$ satisfies $s^2-s-2=0$, it follows that the limit is 2.\n\n\\end{proof}"} {"id": "Rudin|exercise_3_6a", "formal_statement": "theorem exercise_3_6a\n: tendsto (\u03bb (n : \u2115), (\u2211 i in finset.range n, g i)) 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": "Prove that $\\lim_{n \\rightarrow \\infty} \\sum_{i0$ there exists $N$ such that $\\left|\\sum_{k=m+1}^n a_k b_k\\right|\\langle\\varepsilon$ if $n\\rangle$ $m \\geq N$. To do this, let $S_n=\\sum_{k=1}^n a_k\\left(S_0=0\\right)$, so that $a_k=S_k-S_{k-1}$ for $k=1,2, \\ldots$ Let $M$ be an uppper bound for both $\\left|b_n\\right|$ and $\\left|S_n\\right|$, and let $S=\\sum a_n$ and $b=\\lim b_n$. Choose $N$ so large that the following three inequalities hold for all $m>N$ and $n>N$ :\n\n$$\n\n\\left|b_n S_n-b S\\right|<\\frac{\\varepsilon}{3} ; \\quad\\left|b_m S_m-b S\\right|<\\frac{\\varepsilon}{3} ; \\quad\\left|b_m-b_n\\right|<\\frac{\\varepsilon}{3 M} .\n\n$$\n\nThen if $n>m>N$, we have, from the formula for summation by parts,\n\n$$\n\n\\sum_{k=m+1}^n a_n b_n=b_n S_n-b_m S_m+\\sum_{k=m}^{n-1}\\left(b_k-b_{k+1}\\right) S_k\n\n$$\n\nOur assumptions yield immediately that $\\left|b_n S_n-b_m S_m\\right|<\\frac{2 \\varepsilon}{3}$, and\n\n$$\n\n\\left|\\sum_{k=m}^{n-1}\\left(b_k-b_{k+1}\\right) S_k\\right| \\leq M \\sum_{k=m}^{n-1}\\left|b_k-b_{k+1}\\right| .\n\n$$\n\nSince the sequence $\\left\\{b_n\\right\\}$ is monotonic, we have\n\n$$\n\n\\sum_{k=m}^{n-1}\\left|b_k-b_{k+1}\\right|=\\left|\\sum_{k=m}^{n-1}\\left(b_k-b_{k+1}\\right)\\right|=\\left|b_m-b_n\\right|<\\frac{\\varepsilon}{3 M},\n\n$$\n\nfrom which the desired inequality follows.\n\n\\end{proof}"} {"id": "Rudin|exercise_3_20", "formal_statement": "theorem exercise_3_20 {X : Type*} [metric_space X]\n (p : \u2115 \u2192 X) (l : \u2115) (r : X)\n (hp : cauchy_seq p)\n (hpl : tendsto (\u03bb n, p (l * n)) at_top (\ud835\udcdd r)) :\n tendsto p at_top (\ud835\udcdd 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": "Suppose $\\left\\{p_{n}\\right\\}$ is a Cauchy sequence in a metric space $X$, and some sequence $\\left\\{p_{n l}\\right\\}$ converges to a point $p \\in X$. Prove that the full sequence $\\left\\{p_{n}\\right\\}$ converges to $p$.\n", "nl_proof": "\\begin{proof}\n\n Let $\\varepsilon>0$. Choose $N_1$ so large that $d\\left(p_m, p_n\\right)<\\frac{\\varepsilon}{2}$ if $m>N_1$ and $n>N_1$. Then choose $N \\geq N_1$ so large that $d\\left(p_{n_k}, p\\right)<\\frac{\\varepsilon}{2}$ if $k>N$. Then if $n>N$, we have\n\n$$\n\nd\\left(p_n, p\\right) \\leq d\\left(p_n, p_{n_{N+1}}\\right)+d\\left(p_{n_{N+1}}, p\\right)<\\varepsilon\n\n$$\n\nFor the first term on the right is less than $\\frac{\\varepsilon}{2}$ since $n>N_1$ and $n_{N+1}>N+1>$ $N_1$. The second term is less than $\\frac{\\varepsilon}{2}$ by the choice of $N$.\n\n\\end{proof}"} {"id": "Rudin|exercise_3_22", "formal_statement": "theorem exercise_3_22 (X : Type*) [metric_space X] [complete_space X]\n (G : \u2115 \u2192 set X) (hG : \u2200 n, is_open (G n) \u2227 dense (G n)) :\n \u2203 x, \u2200 n, x \u2208 G 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 $X$ is a nonempty complete metric space, and $\\left\\{G_{n}\\right\\}$ is a sequence of dense open sets of $X$. Prove Baire's theorem, namely, that $\\bigcap_{1}^{\\infty} G_{n}$ is not empty.\n", "nl_proof": "\\begin{proof}\n\n Let $F_n$ be the complement of $G_n$, so that $F_n$ is closed and contains no open sets. We shall prove that any nonempty open set $U$ contains a point not in any $F_n$, hence in all $G_n$. To this end, we note that $U$ is not contained in $F_1$, so that there is a point $x_1 \\in U \\backslash F_1$. Since $U \\backslash F_1$ is open, there exists $r_1>0$ such that $B_1$, defined as the open ball of radius $r_1$ about $x_1$, is contained in $U \\backslash F_1$. Let $E_1$ be the open ball of radius $\\frac{r_1}{2}$ about $x_1$, so that the closure of $E_1$ is contained in $B_1$. Now $F_2$ does not contain $E_1$, and so we can find a point $x_2 \\in E_1 \\backslash F_2$. Since $E_1 \\backslash F_2$ is an open set, there exists a positive number $r_2$ such that $B_2$, the open ball of radius $R_2$ about $x_2$, is contained in $E_1 \\backslash F_2$, which in turn is contained in $U \\backslash\\left(F_1 \\cup F_2\\right)$. We let $E_2$ be the open ball of radius $\\frac{r_2}{2}$ about $x_2$, so that $\\bar{E}_2 \\subseteq B_2$. Proceeding in this way, we construct a sequence of open balls $E_j$, such that $E_j \\supseteq \\bar{E}_{j+1}$, and the diameter of $E_j$ tends to zero. By the previous exercise, there is a point $x$ belonging to all the sets $\\bar{E}_j$, hence to all the sets $U \\backslash\\left(F_1 \\cup F_2 \\cup \\cdots \\cup F_n\\right)$. Thus the point $x$ belongs to $U \\cap\\left(\\cap_1^{\\infty} G_n\\right)$.\n\n\\end{proof}"} {"id": "Rudin|exercise_4_2a", "formal_statement": "theorem exercise_4_2a\n {\u03b1 : Type} [metric_space \u03b1]\n {\u03b2 : Type} [metric_space \u03b2]\n (f : \u03b1 \u2192 \u03b2)\n (h\u2081 : continuous f)\n : \u2200 (x : set \u03b1), f '' (closure x) \u2286 closure (f '' 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": "If $f$ is a continuous mapping of a metric space $X$ into a metric space $Y$, prove that $f(\\overline{E}) \\subset \\overline{f(E)}$ for every set $E \\subset X$. ($\\overline{E}$ denotes the closure of $E$).\n", "nl_proof": "\\begin{proof}\n\n Let $x \\in \\bar{E}$. We need to show that $f(x) \\in \\overline{f(E)}$. To this end, let $O$ be any neighborhood of $f(x)$. Since $f$ is continuous, $f^{-1}(O)$ contains (is) a neighborhood of $x$. Since $x \\in \\bar{E}$, there is a point $u$ of $E$ in $f^{-1}(O)$. Hence $\\frac{f(u)}{f(E)} \\in O \\cap f(E)$. Since $O$ was any neighborhood of $f(x)$, it follows that $f(x) \\in \\overline{f(E)}$\n\n\\end{proof}"} {"id": "Rudin|exercise_4_4a", "formal_statement": "theorem exercise_4_4a\n {\u03b1 : Type} [metric_space \u03b1]\n {\u03b2 : Type} [metric_space \u03b2]\n (f : \u03b1 \u2192 \u03b2)\n (s : set \u03b1)\n (h\u2081 : continuous f)\n (h\u2082 : dense s)\n : f '' set.univ \u2286 closure (f '' s) :=", "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 $f(E)$ is dense in $f(X)$.\n", "nl_proof": "\\begin{proof}\n\n To prove that $f(E)$ is dense in $f(X)$, simply use that $f(X)=f(\\bar{E}) \\subseteq \\overline{f(E)}$.\n\n\\end{proof}"} {"id": "Rudin|exercise_4_5a", "formal_statement": "theorem exercise_4_5a\n (f : \u211d \u2192 \u211d)\n (E : set \u211d)\n (h\u2081 : is_closed E)\n (h\u2082 : continuous_on f E)\n : \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": "If $f$ is a real continuous function defined on a closed set $E \\subset \\mathbb{R}$, prove that there exist continuous real functions $g$ on $\\mathbb{R}$ such that $g(x)=f(x)$ for all $x \\in E$.\n", "nl_proof": "\\begin{proof}\n\nFollowing the hint, let the complement of $E$ consist of a countable collection of finite open intervals $\\left(a_k, b_k\\right)$ together with possibly one or both of the the semi-infinite intervals $(b,+\\infty)$ and $(-\\infty, a)$. The function $f(x)$ is already defined at $a_k$ and $b_k$, as well as at $a$ and $b$ (if these last two points exist). Define $g(x)$ to be $f(b)$ for $x>b$ and $f(a)$ for $x0$. To choose $\\delta>0$ such that $|x-u|<\\delta$ implies $|g(x)-g(u)|<\\varepsilon$, we consider three cases.\n\ni. If $x>b$, let $\\delta=x-b$. Then if $|x-u|<\\delta$, it follows that $u>b$ also, so that $g(u)=f(b)=g(x)$, and $|g(u)-g(x)|=0<\\varepsilon$. Similarly if $xa_k+\\delta_1$. Let us consider the second of these cases and show how to get $|f(u)-f(x)|<\\varepsilon$ for $xx$ we have $a_k0$ be given. Choose $\\eta>0$ so that $d_Y(f(x), f(u))<\\frac{\\varepsilon}{2}$ if $d_E(x, y)<\\eta$. Then let $\\delta=\\min \\left(\\eta, \\frac{\\varepsilon}{2}\\right)$. It is easy to see that $\\rho(\\varphi(x), \\varphi(u))<\\varepsilon$ if $d_E(x, u)<\\delta$. Conversely if $\\varphi$ is continuous, it is obvious from the inequality $\\rho(\\varphi(x), \\varphi(u)) \\geq d_Y(f(x), f(u))$ that $f$ is continuous.\n\n\n\nFrom these facts we deduce immediately that the graph of a continuous function $f$ on a compact set $E$ is compact, being the image of $E$ under the continuous mapping $\\varphi$. Conversely, if $f$ is not continuous at some point $x$, there is a sequence of points $x_n$ converging to $x$ such that $f\\left(x_n\\right)$ does not converge to $f(x)$. If no subsequence of $f\\left(x_n\\right)$ converges, then the sequence $\\left\\{\\left(x_n, f\\left(x_n\\right)\\right\\}_{n=1}^{\\infty}\\right.$ has no convergent subsequence, and so the graph is not compact. If some subsequence of $f\\left(x_n\\right)$ converges, say $f\\left(x_{n_k}\\right) \\rightarrow z$, but $z \\neq f(x)$, then the graph of $f$ fails to contain the limit point $(x, z)$, and hence is not closed. A fortiori it is not compact.\n\n\\end{proof}"} {"id": "Rudin|exercise_4_8b", "formal_statement": "theorem exercise_4_8b\n (E : set \u211d) :\n \u2203 f : \u211d \u2192 \u211d, uniform_continuous_on f E \u2227 \u00ac 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 $E$ be a bounded set in $R^{1}$. Prove that there exists a real function $f$ such that $f$ is uniformly continuous and is not bounded on $E$.\n", "nl_proof": "\\begin{proof}\n\n The function $f(x)=x$ is uniformly continuous on the entire line, but not bounded.\n\n\\end{proof}"} {"id": "Rudin|exercise_4_12", "formal_statement": "theorem exercise_4_12\n {\u03b1 \u03b2 \u03b3 : Type*} [uniform_space \u03b1] [uniform_space \u03b2] [uniform_space \u03b3]\n {f : \u03b1 \u2192 \u03b2} {g : \u03b2 \u2192 \u03b3}\n (hf : uniform_continuous f) (hg : uniform_continuous g) :\n uniform_continuous (g \u2218 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": "A uniformly continuous function of a uniformly continuous function is uniformly continuous.\n", "nl_proof": "\\begin{proof}\n\n Let $f: X \\rightarrow Y$ and $g: Y \\rightarrow Z$ be uniformly continuous. Then $g \\circ f: X \\rightarrow Z$ is uniformly continuous, where $g \\circ f(x)=g(f(x))$ for all $x \\in X$.\n\nTo prove this fact, let $\\varepsilon>0$ be given. Then, since $g$ is uniformly continuous, there exists $\\eta>0$ such that $d_Z(g(u), g(v))<\\varepsilon$ if $d_Y(u, v)<\\eta$. Since $f$ is uniformly continuous, there exists $\\delta>0$ such that $d_Y(f(x), f(y))<\\eta$ if $d_X(x, y)<\\delta$\n\n\n\nIt is then obvious that $d_Z(g(f(x)), g(f(y)))<\\varepsilon$ if $d_X(x, y)<\\delta$, so that $g \\circ f$ is uniformly continuous.\n\n\\end{proof}"} {"id": "Rudin|exercise_4_19", "formal_statement": "theorem exercise_4_19\n {f : \u211d \u2192 \u211d} (hf : \u2200 a b c, a < b \u2192 f a < c \u2192 c < f b \u2192 \u2203 x, a < x \u2227 x < b \u2227 f x = c)\n (hg : \u2200 r : \u211a, is_closed {x | f x = r}) : 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 with domain $R^{1}$ which has the intermediate value property: if $f(a) 0)\n (hg : g = f\u207b\u00b9)\n (hg_diff : differentiable_on \u211d g (set.Ioo a b)) :\n differentiable_on \u211d g (set.Ioo a b) \u2227\n \u2200 x \u2208 set.Ioo a b, deriv g x = 1 / deriv f 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)>0$ in $(a, b)$. Prove that $f$ is strictly increasing in $(a, b)$, and let $g$ be its inverse function. Prove that $g$ is differentiable, and that $g^{\\prime}(f(x))=\\frac{1}{f^{\\prime}(x)} \\quad(a0$. Hence $f(c)0$ there exists $\\eta>0$ such that\n\n$$\n\n\\left|\\frac{1}{\\frac{f(x+h)-f(x)}{h}}-\\frac{1}{f^{\\prime}(x)}\\right|<\\varepsilon\n\n$$\n\nif $0<|h|<\\eta$. Since $h=g(y+k)-g(y)$, there exists $\\delta>0$ such that $0<|h|<\\eta$ if $0<|k|<\\delta$. The proof is now complete. \n\n\\end{proof}"} {"id": "Rudin|exercise_5_4", "formal_statement": "theorem exercise_5_4 {n : \u2115}\n (C : \u2115 \u2192 \u211d)\n (hC : \u2211 i in (finset.range (n + 1)), (C i) / (i + 1) = 0) :\n \u2203 x, x \u2208 (set.Icc (0 : \u211d) 1) \u2227 \u2211 i in finset.range (n + 1), (C i) * (x^i) = 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 $C_{0}+\\frac{C_{1}}{2}+\\cdots+\\frac{C_{n-1}}{n}+\\frac{C_{n}}{n+1}=0,$ where $C_{0}, \\ldots, C_{n}$ are real constants, prove that the equation $C_{0}+C_{1} x+\\cdots+C_{n-1} x^{n-1}+C_{n} x^{n}=0$ has at least one real root between 0 and 1.\n", "nl_proof": "\\begin{proof}\n\n Consider the polynomial\n\n$$\n\np(x)=C_0 x+\\frac{C_1}{2} x^2+\\cdots+\\frac{C_{n-1}}{n} x^n+\\frac{C_n}{n+1} x^{n+1},\n\n$$\n\nwhose derivative is\n\n$$\n\np^{\\prime}(x)=C_0+C_1 x+\\cdots+C_{n-1} x^{n-1}+C_n x^n .\n\n$$\n\nIt is obvious that $p(0)=0$, and the hypothesis of the problem is that $p(1)=0$. Hence Rolle's theorem implies that $p^{\\prime}(x)=0$ for some $x$ between 0 and 1 .\n\n\\end{proof}"} {"id": "Rudin|exercise_5_6", "formal_statement": "theorem exercise_5_6\n {f : \u211d \u2192 \u211d}\n (hf1 : continuous f)\n (hf2 : \u2200 x, differentiable_at \u211d f x)\n (hf3 : f 0 = 0)\n (hf4 : monotone (deriv f)) :\n monotone_on (\u03bb x, f x / x) (set.Ioi 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": "Suppose (a) $f$ is continuous for $x \\geq 0$, (b) $f^{\\prime}(x)$ exists for $x>0$, (c) $f(0)=0$, (d) $f^{\\prime}$ is monotonically increasing. Put $g(x)=\\frac{f(x)}{x} \\quad(x>0)$ and prove that $g$ is monotonically increasing.\n", "nl_proof": "\\begin{proof}\n\n Put\n\n$$\n\ng(x)=\\frac{f(x)}{x} \\quad(x>0)\n\n$$\n\nand prove that $g$ is monotonically increasing.\n\nBy the mean-value theorem\n\n$$\n\nf(x)=f(x)-f(0)=f^{\\prime}(c) x\n\n$$\n\nfor some $c \\in(0, x)$. Since $f^{\\prime}$ is monotonically increasing, this result implies that $f(x)0,\n\n$$\n\nso that $g$ is also monotonically increasing.\n\n\\end{proof}"} {"id": "Rudin|exercise_5_15", "formal_statement": "theorem exercise_5_15 {f : \u211d \u2192 \u211d} (a M0 M1 M2 : \u211d)\n (hf' : differentiable_on \u211d f (set.Ici a))\n (hf'' : differentiable_on \u211d (deriv f) (set.Ici a))\n (hM0 : M0 = Sup {(| f x | )| x \u2208 (set.Ici a)})\n (hM1 : M1 = Sup {(| deriv f x | )| x \u2208 (set.Ici a)})\n (hM2 : M2 = Sup {(| deriv (deriv f) x | )| x \u2208 (set.Ici a)}) :\n (M1 ^ 2) \u2264 4 * M0 * M2 :=", "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 $a \\in R^{1}, f$ is a twice-differentiable real function on $(a, \\infty)$, and $M_{0}, M_{1}, M_{2}$ are the least upper bounds of $|f(x)|,\\left|f^{\\prime}(x)\\right|,\\left|f^{\\prime \\prime}(x)\\right|$, respectively, on $(a, \\infty)$. Prove that $M_{1}^{2} \\leq 4 M_{0} M_{2} .$\n", "nl_proof": "\\begin{proof}\n\n The inequality is obvious if $M_0=+\\infty$ or $M_2=+\\infty$, so we shall assume that $M_0$ and $M_2$ are both finite. We need to show that\n\n$$\n\n\\left|f^{\\prime}(x)\\right| \\leq 2 \\sqrt{M_0 M_2}\n\n$$\n\nfor all $x>a$. We note that this is obvious if $M_2=0$, since in that case $f^{\\prime}(x)$ is constant, $f(x)$ is a linear function, and the only bounded linear function is a constant, whose derivative is zero. Hence we shall assume from now on that $0-1$. Now $f^{\\prime}(x)=\\frac{4 x}{\\left(x^2+1\\right)^2}$ for $x>0$ and $f^{\\prime}(x)=4 x$ for $x<0$. It thus follows from Exercise 9 above that $f^{\\prime}(0)=0$, and that $f^{\\prime}(x)$ is continuous. Likewise $f^{\\prime \\prime}(x)=4$ for $x<0$ and $f^{\\prime \\prime}(x)=\\frac{4-4 x^2}{\\left(x^2+1\\right)^3}=-4 \\frac{x^2-1}{\\left(x^2+1\\right)^3}$. This shows that $\\left|f^{\\prime \\prime}(x)\\right|<4$ for $x>0$ and also that $\\lim _{x \\rightarrow 0} f^{\\prime \\prime}(x)=4$. Hence Exercise 9 again implies that $f^{\\prime \\prime}(x)$ is continuous and $f^{\\prime \\prime}(0)=4$.\n\n\n\nOn $n$-dimensional space let $\\mathbf{f}(x)=\\left(f_1(x), \\ldots, f_n(x)\\right), M_0=\\sup |\\mathbf{f}(x)|$, $M_1=\\sup \\left|\\mathbf{f}^{\\prime}(x)\\right|$, and $M_2=\\sup \\left|\\mathbf{f}^{\\prime \\prime}(x)\\right|$. Just as in the numerical case, there is nothing to prove if $M_2=0$ or $M_0=+\\infty$ or $M_2=+\\infty$, and so we assume $0a$, and let $\\mathbf{u}=\\frac{1}{\\left|\\mathbf{f}^{\\prime}\\left(x_0\\right)\\right|} \\mathbf{f}^{\\prime}\\left(x_0\\right)$. Consider the real-valued function $\\varphi(x)=\\mathrm{u} \\cdot \\mathrm{f}(x)$. Let $N_0, N_1$, and $N_2$ be the suprema of $|\\varphi(x)|,\\left|\\varphi^{\\prime}(x)\\right|$, and $\\left|\\varphi^{\\prime \\prime}(x)\\right|$ respectively. By the Schwarz inequality we have (since $|\\mathbf{u}|=1) N_0 \\leq M_0$ and $N_2 \\leq M_2$, while $N_1 \\geq \\varphi\\left(x_0\\right)=\\left|\\mathbf{f}^{\\prime}\\left(x_0\\right)\\right|>a$. We therefore have $a^2<4 N_0 N_2 \\leq 4 M_0 M_2$. Since $a$ was any positive number less than $M_1$, we have $M_1^2 \\leq 4 M_0 M_2$, i.e., the result holds also for vector-valued functions.\n\n\n\nEquality can hold on any $R^n$, as we see by taking $\\mathbf{f}(x)=(f(x), 0, \\ldots, 0)$ or $\\mathbf{f}(x)=(f(x), f(x), \\ldots, f(x))$, where $f(x)$ is a real-valued function for which equality holds.\n\n\n\n\\end{proof}"} {"id": "Munkres|exercise_13_1", "formal_statement": "theorem exercise_13_1 (X : Type*) [topological_space X] (A : set X)\n (h1 : \u2200 x \u2208 A, \u2203 U : set X, x \u2208 U \u2227 is_open U \u2227 U \u2286 A) :\n is_open A :=", "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 topological space; let $A$ be a subset of $X$. Suppose that for each $x \\in A$ there is an open set $U$ containing $x$ such that $U \\subset A$. Show that $A$ is open in $X$.\n", "nl_proof": "\\begin{proof}\n\n Since, from the given hypothesis given any $x \\in A$ there exists an open set containing $x$ say, $U_x$ such that $U_x \\subset A$. Thus, we claim that\n\n$$\n\nA=\\bigcup_{x \\in A} U_x\n\n$$\n\nObserve that if we prove the above claim, then $A$ will be open, being a union of arbitrary open sets. Since, for each $x \\in A, U_x \\subset A \\Longrightarrow \\cup U_x \\subset A$. For the converse, observe that given any $x \\in A, x \\in U_x$ and hence in the union. Thus we proved our claim, and hence $A$ is an open set.\n\n\\end{proof}"} {"id": "Munkres|exercise_13_4a1", "formal_statement": "theorem exercise_13_4a1 (X I : Type*) (T : I \u2192 set (set X)) (h : \u2200 i, is_topology X (T i)) :\n 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 $\\bigcap \\mathcal{T}_\\alpha$ is a topology on $X$.\n", "nl_proof": "\\begin{proof}\n\n Since $\\emptyset$ and $X$ belong to $\\mathcal{T}_\\alpha$ for each $\\alpha$, they belong to $\\bigcap_\\alpha \\mathcal{T}_\\alpha$. Let $\\left\\{V_\\beta\\right\\}_\\beta$ be a collection of open sets in $\\bigcap_\\alpha \\mathcal{T}_\\alpha$. For any fixed $\\alpha$ we have $\\cup_\\beta V_\\beta \\in \\mathcal{T}_\\alpha$ since $\\mathcal{T}_\\alpha$ is a topology on $X$, so $\\bigcup_\\beta V_\\beta \\in \\bigcap_\\alpha \\mathcal{T}_\\alpha$. Similarly, if $U_1, \\ldots, U_n$ are elements of $\\bigcap_\\alpha \\mathcal{T}_\\alpha$, then for each $\\alpha$ we have $\\bigcup_{i=1}^n U_i \\in \\mathcal{T}_\\alpha$ and therefore $\\bigcup_{i=1}^n U_i \\in \\bigcap_\\alpha \\mathcal{T}_\\alpha$. It follows that $\\bigcap_\\alpha \\mathcal{T}_\\alpha$ is a topology on $X$.\n\n\\end{proof}"} {"id": "Munkres|exercise_13_4b1", "formal_statement": "theorem exercise_13_4b1 (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 i \u2286 T') \u2227\n \u2200 T'', is_topology X T'' \u2192 (\u2200 i, T i \u2286 T'') \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 smallest topology on $X$ containing all the collections $\\mathcal{T}_\\alpha$.\n", "nl_proof": "\\begin{proof}\n\n (b) First we prove that there is a unique smallest topology on $X$ containing all the collections $\\mathcal{T}_\\alpha$. Uniqueness of such topology is clear. For each $\\alpha$ let $\\mathcal{B}_\\alpha$ be a basis for $\\mathcal{T}_\\alpha$. Let $\\mathcal{T}$ be the topology generated by the subbasis $\\mathcal{S}=\\bigcup_\\alpha \\mathcal{B}_\\alpha$. Then the collection $\\mathcal{B}$ of all finite intersections of elements of $\\mathcal{S}$ is a basis for $\\mathcal{T}$. Clearly $\\mathcal{T}_\\alpha \\subset \\mathcal{T}$ for all $\\alpha$. We now prove that if $\\mathcal{O}$ is a topology on $X$ such that $\\mathcal{T}_\\alpha \\subset \\mathcal{O}$ for all $\\alpha$, then $\\mathcal{T} \\subset \\mathcal{O}$. Given such $\\mathcal{O}$, we have $\\mathcal{B}_\\alpha \\subset \\mathcal{O}$ for all $\\alpha$, so $\\mathcal{S} \\subset \\mathcal{O}$. Since $\\mathcal{O}$ is a topology, it must contain all finite intersections of elements of $\\mathcal{S}$, so $\\mathcal{B} \\subset \\mathcal{O}$ and hence $\\mathcal{T} \\subset \\mathcal{O}$. We conclude that the topology $\\mathcal{T}$ generated by the subbasis $\\mathcal{S}=\\cup_\\alpha \\mathcal{B}_\\alpha$ is the unique smallest topology on $X$ containing all the collections $\\mathcal{T}_\\alpha$.\n\n\\end{proof}"} {"id": "Munkres|exercise_13_5a", "formal_statement": "theorem exercise_13_5a {X : Type*}\n [topological_space X] (A : set (set X)) (hA : is_topological_basis 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 basis for a topology on $X$, then the topology generated by $\\mathcal{A}$ equals the intersection of all topologies on $X$ that contain $\\mathcal{A}$.\n", "nl_proof": "\\begin{proof}\n\n Let $\\mathcal{T}$ be the topology generated by $\\mathcal{A}$ and let $\\mathcal{O}$ be the intersection of all topologies on $X$ that contains $\\mathcal{A}$. Clearly $\\mathcal{O} \\subset \\mathcal{T}$ since $\\mathcal{T}$ is a topology on $X$ that contain $\\mathcal{A}$. Conversely, let $U \\in \\mathcal{T}$, so that $U$ is a union of elements of $\\mathcal{A}$. Since each of this elements is also an element of $\\mathcal{O}$, their union $U$ belongs to $\\mathcal{O}$. Thus $\\mathcal{T} \\subset \\mathcal{O}$ and the equality holds.\n\n\\end{proof}"} {"id": "Munkres|exercise_13_6", "formal_statement": "theorem exercise_13_6 :\n \u00ac (\u2200 U, Rl.is_open U \u2192 K_topology.is_open U) \u2227 \u00ac (\u2200 U, K_topology.is_open U \u2192 Rl.is_open U) :=", "src_header": "import .common \n\nopen set topological_space filter \nopen_locale classical topology filter \nnoncomputable theory \n\n", "nl_statement": "Show that the lower limit topology $\\mathbb{R}_l$ and $K$-topology $\\mathbb{R}_K$ are not comparable.\n", "nl_proof": "\\begin{proof}\n\n Let $\\mathcal{T}_{\\ell}$ and $\\mathcal{T}_K$ denote the topologies of $\\mathbb{R}_{\\ell}$ and $\\mathbb{R}_K$ respectively. Given the basis element $[0,1)$ for $\\mathcal{T}_{\\ell}$, there is no basis element for $\\mathcal{T}_K$ containing 0 and contained in $[0,1)$, so $\\mathcal{T}_{\\ell} \\not \\subset \\mathcal{T}_K$. Similarly, given the basis element $(-1,1) \\backslash K$ for $\\mathcal{T}_K$, there is no basis element for $\\mathcal{T}_{\\ell}$ containing 0 contained in $(-1,1) \\backslash K$, so $\\mathcal{T}_K \\not \\subset \\mathcal{T}_{\\ell}$.\n\n\\end{proof}"} {"id": "Munkres|exercise_13_8b", "formal_statement": "theorem exercise_13_8b :\n (topological_space.generate_from {S : set \u211d | \u2203 a b : \u211a, a < b \u2227 S = Ico a b}).is_open \u2260\n (lower_limit_topology \u211d).is_open :=", "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 a topology different from the lower limit topology on $\\mathbb{R}$.\n", "nl_proof": "\\begin{proof}\n\n (b) $\\mathcal{C}$ is a basis for a topology on $\\mathbb{R}$ since the union of its elements is $\\mathbb{R}$ and the intersection of two elements of $\\mathcal{C}$ is either empty or another element of $\\mathcal{C}$. Now consider $[r, s)$ where $r$ is any irrational number and $s$ is any real number greater than $r$. Then $[r, s)$ is a basis element for the topology of $\\mathbb{R}_{\\ell}$, but $[r, s)$ is not a union of elements of $\\mathcal{C}$. Indeed, suppose that $[r, s)=\\cup_\\alpha\\left[a_\\alpha, b_\\alpha\\right)$ for rationals $a_\\alpha, b_\\alpha$. Then $r \\in\\left[a_\\alpha, b_\\alpha\\right)$ for some $\\alpha$. Since $r$ is irrational we must have $a_\\alpha0$ be such that $f(x) \\in B_d(f(x), \\varepsilon) \\subset V$. Since $\\left(f_n\\right)_n$ converges uniformly to $f$, there exists $N_1 \\in \\mathbb{Z}_{+}$such that $d\\left(f_n(x), f(x)\\right)<\\varepsilon / 2$ for all $x \\in X$ and all $n \\geq N_1$, so that $d\\left(f_n\\left(x_n\\right), f\\left(x_n\\right)\\right)<\\varepsilon / 2$ for all $n \\geq N_1$. Moreover, $f$ is continuous, so there exists $N_2 \\in \\mathbb{Z}_{+}$such that $d\\left(f\\left(x_n\\right), f(x)\\right)<\\varepsilon / 2$ for all $n \\geq N_2$. Thus, if $N>\\max \\left\\{N_1, N_2\\right\\}$, then\n\n$$\n\nd\\left(f_n\\left(x_n\\right), f(x)\\right) \\leq d\\left(f_n\\left(x_n\\right), f\\left(x_n\\right)\\right)+d\\left(f\\left(x_n\\right), f(x)\\right)<\\frac{\\varepsilon}{2}+\\frac{\\varepsilon}{2}=\\varepsilon\n\n$$\n\nfor all $n \\geq N$, so $f_n\\left(x_n\\right) \\in V$ for all $n \\geq N$. It follows that $\\left(f_n\\left(x_n\\right)\\right)_n$ converges to $f(x)$.\n\n\\end{proof}"} {"id": "Munkres|exercise_22_2b", "formal_statement": "theorem exercise_22_2b {X : Type*} [topological_space X]\n {A : set X} (r : X \u2192 A) (hr : continuous r) (h : \u2200 x : A, r x = x) :\n quotient_map r :=", "src_header": "import .common \n\nopen set topological_space filter \nopen_locale classical topology filter \nnoncomputable theory \n\n", "nl_statement": "If $A \\subset X$, a retraction of $X$ onto $A$ is a continuous map $r: X \\rightarrow A$ such that $r(a)=a$ for each $a \\in A$. Show that a retraction is a quotient map.\n", "nl_proof": "\\begin{proof}\n\nThe inclusion map $i: A \\rightarrow X$ is continuous and $r \\circ i=1_A$ is the identity. Thus $r$ is a quotient map by (a).\n\n\\end{proof}"} {"id": "Munkres|exercise_23_2", "formal_statement": "theorem exercise_23_2 {X : Type*}\n [topological_space X] {A : \u2115 \u2192 set X} (hA : \u2200 n, is_connected (A n))\n (hAn : \u2200 n, A n \u2229 A (n + 1) \u2260 \u2205) :\n is_connected (\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_{n}\\right\\}$ be a sequence of connected subspaces of $X$, such that $A_{n} \\cap A_{n+1} \\neq \\varnothing$ for all $n$. Show that $\\bigcup A_{n}$ is connected.\n", "nl_proof": "\\begin{proof}\n\n Suppose that $\\bigcup_n A_n=B \\cup C$, where $B$ and $C$ are disjoint open subsets of $\\bigcup_n A_n$. Since $A_1$ is connected and a subset of $B \\cup C$, by Lemma $23.2$ it lies entirely within either $B$ or $C$. Without any loss of generality, we may assume $A_1 \\subset B$. Note that given $n$, if $A_n \\subset B$ then $A_{n+1} \\subset B$, for if $A_{n+1} \\subset C$ then $A_n \\cap A_{n+1} \\subset B \\cap C=\\emptyset$, in contradiction with the assumption. By induction, $A_n \\subset B$ for all $n \\in \\mathbb{Z}_{+}$, so that $\\bigcup_n A_n \\subset B$. It follows that $\\bigcup_n A_n$ is connected.\n\n\\end{proof}"} {"id": "Munkres|exercise_23_4", "formal_statement": "theorem exercise_23_4 {X : Type*} [topological_space X] [cofinite_topology X]\n (s : set X) : set.infinite s \u2192 is_connected 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 an infinite set, it is connected in the finite complement topology.\n", "nl_proof": "\\begin{proof}\n\n Suppose that $A$ is a non-empty subset of $X$ that is both open and closed, i.e., $A$ and $X \\backslash A$ are finite or all of $X$. Since $A$ is non-empty, $X \\backslash A$ is finite. Thus $A$ cannot be finite as $X \\backslash A$ is infinite, so $A$ is all of $X$. Therefore $X$ is connected.\n\n\\end{proof}"} {"id": "Munkres|exercise_23_9", "formal_statement": "theorem exercise_23_9 {X Y : Type*}\n [topological_space X] [topological_space Y]\n (A\u2081 A\u2082 : set X)\n (B\u2081 B\u2082 : set Y)\n (hA : A\u2081 \u2282 A\u2082)\n (hB : B\u2081 \u2282 B\u2082)\n (hA : is_connected A\u2082)\n (hB : is_connected B\u2082) :\n is_connected ({x | \u2203 a b, x = (a, b) \u2227 a \u2208 A\u2082 \u2227 b \u2208 B\u2082} \\\n {x | \u2203 a b, x = (a, b) \u2227 a \u2208 A\u2081 \u2227 b \u2208 B\u2081}) :=", "src_header": "import .common \n\nopen set topological_space filter \nopen_locale classical topology filter \nnoncomputable theory \n\n", "nl_statement": "Let $A$ be a proper subset of $X$, and let $B$ be a proper subset of $Y$. If $X$ and $Y$ are connected, show that $(X \\times Y)-(A \\times B)$ is connected.\n", "nl_proof": "\\begin{proof}\n\nThis is similar to the proof of Theorem 23.6. Take $c \\times d \\in(X \\backslash A) \\times(Y \\backslash B)$. For each $x \\in X \\backslash A$, the set\n\n$$\n\nU_x=(X \\times\\{d\\}) \\cup(\\{x\\} \\times Y)\n\n$$\n\nis connected since $X \\times\\{d\\}$ and $\\{x\\} \\times Y$ are connected and have the common point $x \\times d$. Then $U=\\bigcup_{x \\in X \\backslash A} U_x$ is connected because it is the union of the connected spaces $U_x$ which have the point $c \\times d$ in common. Similarly, for each $y \\in Y \\backslash B$ the set\n\n$$\n\nV_y=(X \\times\\{y\\}) \\cup(\\{c\\} \\times Y)\n\n$$\n\nis connected, so $V=\\bigcup_{y \\in Y \\backslash B} V_y$ is connected. Thus $(X \\times Y) \\backslash(A \\times B)=U \\cup V$ is connected since $c \\times d$ is a common point of $U$ and $V$.\n\n\\end{proof}"} {"id": "Munkres|exercise_24_2", "formal_statement": "theorem exercise_24_2 {f : (metric.sphere 0 1 : set \u211d) \u2192 \u211d}\n (hf : continuous f) : \u2203 x, f 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 $f: S^{1} \\rightarrow \\mathbb{R}$ be a continuous map. Show there exists a point $x$ of $S^{1}$ such that $f(x)=f(-x)$.\n", "nl_proof": "\\begin{proof}\n\n Let $f: S^1 \\rightarrow \\mathbb{R}$ be continuous. Let $x \\in S^1$. If $f(x)=f(-x)$ we are done, so assume $f(x) \\neq f(-x)$. Define $g: S^1 \\rightarrow \\mathbb{R}$ by setting $g(x)=f(x)-f(-x)$. Then $g$ is continuous. Suppose $f(x)>f(-x)$, so that $g(x)>0$. Then $-x \\in S^1$ and $g(-x)<0$. By the intermediate value theorem, since $S^1$ is connected and $g(-x)<00$. Therefore $X$ must be uncountable.\n\n\\end{proof}"} {"id": "Munkres|exercise_28_5", "formal_statement": "theorem exercise_28_5\n (X : Type*) [topological_space X] :\n countably_compact X \u2194 \u2200 (C : \u2115 \u2192 set X), (\u2200 n, is_closed (C n)) \u2227\n (\u2200 n, C n \u2260 \u2205) \u2227 (\u2200 n, C n \u2286 C (n + 1)) \u2192 \u2203 x, \u2200 n, x \u2208 C n :=", "src_header": "import .common \n\nopen set topological_space filter \nopen_locale classical topology filter \nnoncomputable theory \n\n", "nl_statement": "Show that X is countably compact if and only if every nested sequence $C_1 \\supset C_2 \\supset \\cdots$ of closed nonempty sets of X has a nonempty intersection.\n", "nl_proof": "\\begin{proof}\n\nWe could imitate the proof of Theorem 26.9, but we prove directly each direction. First let $X$ be countable compact and let $C_1 \\supset C_2 \\supset \\cdots$ be a nested sequence of closed nonempty sets of $X$. For each $n \\in \\mathbb{Z}_{+}, U_n=X \\backslash C_n$ is open in $X$. Then $\\left\\{U_n\\right\\}_{n \\in \\mathbb{Z}_{+}}$is a countable collection of open sets with no finite subcollection covering $X$, for if $U_{i_1} \\cup \\cdots \\cup U_{1_n}$ covers $X$, then $C_{i_1} \\cap \\cdots \\cap C_{i_n}$ is empty, contrary to the assumption. Hence $\\left\\{U_n\\right\\}_{n \\in \\mathbb{Z}_{+}}$does not cover $X$, so there exist $x \\in X \\backslash \\bigcup_{n \\in \\mathbb{Z}_{+}} U_n=\\bigcap_{n \\in Z_{+}}\\left(X \\backslash U_n\\right)=\\bigcap_{n \\in Z_{+}} C_n$.\n\n\n\nConversely, assume that every nested sequence $C_1 \\supset C_2 \\supset \\cdots$ of closed non-empty sets of $X$ has a non-empty intersection and let $\\left\\{U_n\\right\\}_{n \\in \\mathbb{Z}_{+}}$be a countable open covering of $X$. For each $n$, let $V_n=U_1 \\cup \\cdots \\cup U_n$ and $C_n=X \\backslash V_n$. Suppose that no finite subcollection of $\\left\\{U_n\\right\\}_{n \\in \\mathbb{Z}_{+}}$covers $X$. Then each $C_n$ is non-empty, so $C_1 \\supset C_2 \\supset \\cdots$ is a nested sequence of non-empty closed sets and $\\bigcap_{n \\in \\mathbb{Z}_{+}} C_n$ is non-empty by assumption. Then there exists $x \\in \\bigcap_{n \\in \\mathbb{Z}_{+}} C_n$, so that $x \\notin V_n$ for all $n$, contradicting the fact that $\\left\\{U_n\\right\\}_{n \\in \\mathbb{Z}_{+}}$covers $X$. It follows that there exists $N \\in \\mathbb{Z}_{+}$such that $C_N=\\emptyset$, so that $X=V_N$ and hence some finite subcollection of $\\left\\{U_n\\right\\}_{n \\in \\mathbb{Z}_{+}}$covers $X$. We deduce that $X$ is countable compact.\n\n\\end{proof}"} {"id": "Munkres|exercise_29_1", "formal_statement": "theorem exercise_29_1 : \u00ac locally_compact_space \u211a :=", "src_header": "import .common \n\nopen set topological_space filter \nopen_locale classical topology filter \nnoncomputable theory \n\n", "nl_statement": "Show that the rationals $\\mathbb{Q}$ are not locally compact.\n", "nl_proof": "\\begin{proof}\n\n First, we prove that each set $\\mathbb{Q} \\cap[a, b]$, where $a, b$ are irrational numbers, is not compact. Indeed, since $\\mathbb{Q} \\cap[a, b]$ is countable, we can write $\\mathbb{Q} \\cap[a, b]=\\left\\{q_1, q_2, \\ldots\\right\\}$. Then $\\left\\{U_i\\right\\}_{i \\in \\mathbb{Z}_{+}}$, where $U_i=\\mathbb{Q} \\cap\\left[a, q_i\\right)$ for each $i$, is an open covering of $\\mathbb{Q} \\cap[a, b]$ with no finite subcovering. Now let $x \\in \\mathbb{Q}$ and suppose that $\\mathbb{Q}$ is locally compact at $x$. Then there exists a compact set $C$ containing a neighbourhood $U$ of $x$. Then $U$ contains a set $\\mathbb{Q} \\cap[a, b]$ where $a, b$ are irrational numbers. Since this set is closed and contained in the compact $C$, it follows $\\mathbb{Q} \\cap[a, b]$ is compact, a contradiction. Therefore, $\\mathbb{Q}$ is not locally compact.\n\n\\end{proof}"} {"id": "Munkres|exercise_29_10", "formal_statement": "theorem exercise_29_10 {X : Type*}\n [topological_space X] [t2_space X] (x : X)\n (hx : \u2203 U : set X, x \u2208 U \u2227 is_open U \u2227 (\u2203 K : set X, U \u2282 K \u2227 is_compact K))\n (U : set X) (hU : is_open U) (hxU : x \u2208 U) :\n \u2203 (V : set X), is_open V \u2227 x \u2208 V \u2227 is_compact (closure V) \u2227 closure V \u2286 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 $X$ is a Hausdorff space that is locally compact at the point $x$, then for each neighborhood $U$ of $x$, there is a neighborhood $V$ of $x$ such that $\\bar{V}$ is compact and $\\bar{V} \\subset U$.\n", "nl_proof": "\\begin{proof}\n\n Let $U$ be a neighbourhood of $x$. Since $X$ is locally compact at $x$, there exists a compact subspace $C$ of $X$ containing a neighbourhood $W$ of $x$. Then $U \\cap W$ is open in $X$, hence in $C$. Thus, $C \\backslash(U \\cap W)$ is closed in $C$, hence compact. Since $X$ is Hausdorff, there exist disjoint open sets $V_1$ and $V_2$ of $X$ containing $x$ and $C \\backslash(U \\cap W)$ respectively. Let $V=V_1 \\cap U \\cap W$. Since $\\bar{V}$ is closed in $C$, it is compact. Furthermore, $\\bar{V}$ is disjoint from $C \\backslash(U \\cap W) \\supset C \\backslash U$, so $\\bar{V} \\subset U$.\n\n\\end{proof}"} {"id": "Munkres|exercise_30_13", "formal_statement": "theorem exercise_30_13 {X : Type*} [topological_space X]\n (h : \u2203 (s : set X), countable s \u2227 dense s) (U : set (set X))\n (hU : \u2200 (x y : set X), x \u2208 U \u2192 y \u2208 U \u2192 x \u2260 y \u2192 x \u2229 y = \u2205) :\n countable 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 $X$ has a countable dense subset, every collection of disjoint open sets in $X$ is countable.\n", "nl_proof": "\\begin{proof}\n\n Let $\\mathcal{U}$ be a collection of disjoint open sets in $X$ and let $A$ be a countable dense subset of $X$.\n\nSince $A$ is dense in $X$, every $U \\in \\mathcal{U}$ intesects $S$. Therefore, there exists a point $x_U \\in U \\cap S$.\n\nLet $U_1, U_2 \\in \\mathcal{U}, U_1 \\neq U_2$. Then $x_{U_1} \\neq x_{U_2}$ since $U_1 \\cap U_2=\\emptyset$.\n\nThus, the function $\\mathcal{U} \\rightarrow S$ given by $U \\mapsto x_U$ is injective and therefore, since $S$ is countable, it follows that $\\mathcal{U}$ is countable.\n\n\\end{proof}"} {"id": "Munkres|exercise_31_2", "formal_statement": "theorem exercise_31_2 {X : Type*}\n [topological_space X] [normal_space X] {A B : set X}\n (hA : is_closed A) (hB : is_closed B) (hAB : disjoint A B) :\n \u2203 (U V : set X), is_open U \u2227 is_open V \u2227 A \u2286 U \u2227 B \u2286 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 normal, every pair of disjoint closed sets have neighborhoods whose closures are disjoint.\n", "nl_proof": "\\begin{proof}\n\n Let $A$ and $B$ be disjoint closed sets. Then there exist disjoint open sets $U$ and $V$ containing $A$ and $B$ respectively.\n\n\n\nSince $X \\backslash V$ is closed and contains $U$, the closure of $U$ is contained in $X \\backslash V$ hence $B$ and closure of $U$ are disjoint.\n\n\n\nRepeat steps 1 and 2 for $B$ and $\\bar{U}$ instead of $A$ and $B$ respectively and you will have open set $V^{\\prime}$ which contains $B$ and its closure doesn't intersect with $\\bar{U}$.\n\n\\end{proof}"} {"id": "Munkres|exercise_32_1", "formal_statement": "theorem exercise_32_1 {X : Type*} [topological_space X]\n (hX : normal_space X) (A : set X) (hA : is_closed A) :\n normal_space {x // x \u2208 A} :=", "src_header": "import .common \n\nopen set topological_space filter \nopen_locale classical topology filter \nnoncomputable theory \n\n", "nl_statement": "Show that a closed subspace of a normal space is normal.\n", "nl_proof": "\\begin{proof}\n\n Let $X$ be a normal space and $Y$ a closed subspace of $X$.\n\nFirst we shows that $Y$ is a $T_1$-space.\n\nLet $y \\in Y$ be any point. Since $X$ is normal, $X$ is also a $T_1$ space and therefore $\\{y\\}$ is closed in $X$.\n\nThen it follows that $\\{y\\}=\\{y\\} \\cap Y$ is closed in $Y$ (in relative topology).\n\nNow let's prove that $X$ is a $T_4$-space.\n\nLet $F, G \\subseteq Y$ be disjoint closed sets. Since $F$ and $G$ are closed in $Y$ and $Y$ is closed in $X$, it follows that $F$ and $G$ are closed in $X$.\n\n\n\nSince $X$ is normal, $X$ is also a $T_4$-space and therefore there exist disjoint open sets $U, V \\subseteq$ $X$ such that $F \\subseteq U$ and $G \\subseteq V$.\n\nHowever, then $U \\cap Y$ and $V \\cap Y$ are open disjoint sets in $Y$ (in relative topology) which separate $F$ and $G$.\n\n\\end{proof}"} {"id": "Munkres|exercise_32_2b", "formal_statement": "theorem exercise_32_2b\n {\u03b9 : Type*} {X : \u03b9 \u2192 Type*} [\u2200 i, topological_space (X i)]\n (h : \u2200 i, nonempty (X i)) (h2 : regular_space (\u03a0 i, X i)) :\n \u2200 i, regular_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 regular, then so is $X_\\alpha$. Assume that each $X_\\alpha$ is nonempty.\n", "nl_proof": "\\begin{proof}\n\n Suppose that $X=\\prod_\\beta X_\\beta$ is regular and let $\\alpha$ be any index.\n\nWe have to prove that $X_\\alpha$ satisfies the $T_1$ and the $T_3$ axiom.\n\nSince $X$ is regular, it follows that $X$ is Hausdorff, which then implies that $X_\\alpha$ is Hausdorff. However, this implies that $X_\\alpha$ satisfies the $T_1$ axiom.\n\n\n\nLet now $F \\subseteq X_\\alpha$ be a closed set and $x \\in X_\\alpha \\backslash F$ a point.\n\nThen $\\prod_\\beta F_\\beta$, where $F_\\alpha=F$ and $F_\\beta=X_\\beta$ for $\\beta \\neq \\alpha$, is a closed set in $X$ since $\\left(\\prod_\\beta F_\\beta\\right)^c=\\prod_\\beta U_\\beta$, where $U_\\alpha=F^c$ and $U_\\beta=X_\\beta$ for $\\beta \\neq \\alpha$, which is an open set because it is a base element for the product topology.\n\nSince all $X_\\beta$ are nonempty, there exists a point $\\mathbf{x} \\in X$ such that $x_\\alpha=x$. Then $\\mathbf{x} \\notin \\prod_\\beta F_\\beta$.\n\nNow since $X$ is regular (and therefore satisfies the $T_3$ axiom), there exist disjoint open sets $U, V \\subseteq X$ such that $\\mathbf{x} \\in U$ and $\\prod_\\beta F_\\beta \\subseteq V$.\n\n\n\nNow for every $\\beta \\neq \\alpha$ we have that $x_\\beta \\in X_\\beta=\\pi_\\beta(V)$. However, since $x_\\beta \\in \\pi_\\beta(U)$, it follows that $\\pi_\\beta(U) \\cap \\pi_\\beta(V) \\neq \\emptyset$.\n\nThen $U \\cap V=\\emptyset$ implies that $\\pi_\\alpha(U) \\cap \\pi_\\alpha(V)=\\emptyset$.. Also, $x \\in \\pi_\\alpha(U)$ and $F \\subseteq \\pi_\\alpha(V)$ and $\\pi_\\alpha(U), \\pi_\\alpha(V)$ are open sets since $\\pi_\\alpha$ is an open map.\n\nTherefore, $X_\\alpha$ satisfies the $T_3$ axiom.\n\n\\end{proof}"} {"id": "Munkres|exercise_32_3", "formal_statement": "theorem exercise_32_3 {X : Type*} [topological_space X]\n (hX : locally_compact_space X) (hX' : t2_space X) :\n regular_space X :=", "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 regular.\n", "nl_proof": "\\begin{proof}\n\n Let $X$ be a LCH space.\n\nThen it follows that for every $x \\in X$ and for every open neighborhood $U \\subseteq X$ of $x$ there exists an open neighborhood $V \\subseteq X$ of $x$ such that $\\bar{V} \\subseteq U$ (and $\\bar{V}$ is compact, but this is not important here).\n\nSince $X$ is a Hausdorff space, it satisfies the $T_1$ axiom.\n\nThen it follows that $X$ is regular.\n\n\\end{proof}"} {"id": "Munkres|exercise_33_8", "formal_statement": "theorem exercise_33_8\n (X : Type*) [topological_space X] [regular_space X]\n (h : \u2200 x A, is_closed A \u2227 \u00ac x \u2208 A \u2192\n \u2203 (f : X \u2192 I), continuous f \u2227 f x = (1 : I) \u2227 f '' A = {0})\n (A B : set X) (hA : is_closed A) (hB : is_closed B)\n (hAB : disjoint A B)\n (hAc : is_compact A) :\n \u2203 (f : X \u2192 I), continuous f \u2227 f '' A = {0} \u2227 f '' B = {1} :=", "src_header": "import .common \n\nopen set topological_space filter \nopen_locale classical topology filter \nnoncomputable theory \n\n", "nl_statement": "Let $X$ be completely regular, let $A$ and $B$ be disjoint closed subsets of $X$. Show that if $A$ is compact, there is a continuous function $f \\colon X \\rightarrow [0, 1]$ such that $f(A) = \\{0\\}$ and $f(B) = \\{1\\}$.\n", "nl_proof": "\\begin{proof}\n\n Since $X$ is completely regular $\\forall a \\in A, \\exists f_a: X \\rightarrow[0,1]: f_a(a)=0$ and $f_a(B)=\\{1\\}$. For some $\\epsilon_a \\in(0,1)$ we have that $U_a:=f_a^{-1}([0, \\epsilon))$ is an open neighborhood of $a$ that does not intersect $B$. We therefore have an open covering $\\left\\{U_a \\mid a \\in A\\right\\}$ of $A$, so since $A$ is compact we have a finite subcover $\\left\\{U_{a_i} \\mid 1 \\leq i \\leq m\\right\\}$. For each $1 \\leq i \\leq m$ define\n\n$$\n\n\\begin{aligned}\n\n\\tilde{f}_{a_i}: X & \\rightarrow[0,1] \\\\\n\nx & \\mapsto \\frac{\\max \\left(f_{a_i}(x), \\epsilon_{a_i}\\right)-\\epsilon_{a_i}}{1-\\epsilon_{a_i}}\n\n\\end{aligned}\n\n$$\n\nso that $\\forall x \\in U_{a_i}: \\tilde{f}_{a_i}(x)=0$ and $\\forall x \\in B, \\forall 1 \\leq i \\leq m: \\tilde{f}_{a_i}(x)=1$, and define $f:=$ $\\prod_{i=1}^m \\tilde{f}_{a_i}$. Then since $A \\subset \\cup_{i=1}^m U_{a_i}$ we have that $f(A)=\\{0\\}$ and also we have $f(B)=\\{1\\}$.\n\n\\end{proof}"} {"id": "Munkres|exercise_38_6", "formal_statement": "theorem exercise_38_6 {X : Type*}\n (X : Type*) [topological_space X] [regular_space X]\n (h : \u2200 x A, is_closed A \u2227 \u00ac x \u2208 A \u2192\n \u2203 (f : X \u2192 I), continuous f \u2227 f x = (1 : I) \u2227 f '' A = {0}) :\n is_connected (univ : set X) \u2194 is_connected (univ : set (stone_cech 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 completely regular. Show that $X$ is connected if and only if the Stone-\u010cech compactification of $X$ is connected.\n", "nl_proof": "\\begin{proof}\n\n The closure of a connected set is connected, so if $X$ is connected so is $\\beta(X)$\n\nSuppose $X$ is the union of disjoint open subsets $U, V \\subset X$. Define the continuous map\n\n$$\n\n\\begin{aligned}\n\n& f: X \\rightarrow\\{0,1\\} \\\\\n\n& x \\mapsto \\begin{cases}0, & x \\in U \\\\\n\n1, & x \\in V\\end{cases}\n\n\\end{aligned}\n\n$$\n\nBy the fact that $\\{0,1\\}$ is compact and Hausdorff we can extend $f$ to a surjective map $\\bar{f}: \\beta(X) \\rightarrow\\{0,1\\}$ such that $\\bar{f}^{-1}(\\{0\\})$ and $\\bar{f}^{-1}(\\{1\\})$ are disjoint open sets that cover $\\beta(X)$, which makes this space not-connected.\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).\n", "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$.\n", "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$.\n", "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.\n", "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\\}$.\n", "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$.\n", "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.\n", "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.\n", "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.\n", "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}$.\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 \u2225v\u2225^2 = \u2211 i : fin n, \u2225\u27eav, e i\u27eb_\u2102\u2225^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)$.\n", "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)$.\n", "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.\n", "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$.)\n", "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_27", "formal_statement": "theorem exercise_1_27 {n : \u2115} (hn : odd n) : 8 \u2223 (n^2 - 1) :=", "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": "For all odd $n$ show that $8 \\mid n^{2}-1$.\n", "nl_proof": "\\begin{proof}\n\n We have $n^2-1=(n+1)(n-1)$. Since $n$ is odd, both $n+1, n-1$ are even, and moreso, one of these must be divisible by 4 , as one of the two consecutive odd numbers is divisible by 4 . Thus, their product is divisible by 8 . Similarly, if 3 does not divide $n$, it must divide one of $n-1, n+1$, otherwise it wouldn't divide three consecutive integers, which is impossible. As $n$ is odd, $n+1$ is even, so $(n+1)(n-1)$ is divisible by both 2 and 3 , so it is divisible by 6 .\n\n\\end{proof}"} {"id": "Ireland-Rosen|exercise_1_31", "formal_statement": "theorem exercise_1_31 : (\u27e81, 1\u27e9 : gaussian_int) ^ 2 \u2223 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 2 is divisible by $(1+i)^{2}$ in $\\mathbb{Z}[i]$.\n", "nl_proof": "\\begin{proof}\n\nWe have $(1+i)^2=1+2 i-1=2 i$, so $2=-i(1+i)^2$.\n\n\\end{proof}"} {"id": "Ireland-Rosen|exercise_2_21", "formal_statement": "theorem exercise_2_21 {l : \u2115 \u2192 \u211d} \n (hl : \u2200 p n : \u2115, p.prime \u2192 l (p^n) = log p )\n (hl1 : \u2200 m : \u2115, \u00ac is_prime_pow m \u2192 l m = 0) :\n l = \u03bb n, \u2211 d : divisors n, moebius (n/d) * log d :=", "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": "Define $\\wedge(n)=\\log p$ if $n$ is a power of $p$ and zero otherwise. Prove that $\\sum_{A \\mid n} \\mu(n / d) \\log d$ $=\\wedge(n)$.\n", "nl_proof": "\\begin{proof} \n\n$$\n\n\\left\\{\n\n\\begin{array}{cccl}\n\n \\land(n)& = & \\log p & \\mathrm{if}\\ n =p^\\alpha,\\ \\alpha \\in \\mathbb{N}^* \\\\\n\n & = & 0 & \\mathrm{otherwise }.\n\n\\end{array}\n\n\\right.\n\n$$\n\nLet $n = p_1^{\\alpha_1}\\cdots p_t^{\\alpha_t}$ the decomposition of $n$ in prime factors. As $\\land(d) = 0$ for all divisors of $n$, except for $d = p_j^i, i>0, j=1,\\ldots t$,\n\n\\begin{align*}\n\n\\sum_{d \\mid n} \\land(d)&= \\sum_{i=1}^{\\alpha_1} \\land(p_1^{i}) + \\cdots+ \\sum_{i=1}^{\\alpha_t} \\land(p_t^{i})\\\\ \n\n&= \\alpha_1 \\log p_1+\\cdots + \\alpha_t \\log p_t\\\\\n\n&= \\log n\n\n\\end{align*}\n\nBy Mobius Inversion Theorem,\n\n$$\\land(n) = \\sum_{d \\mid n} \\mu\\left (\\frac{n}{d}\\right ) \\log d.$$\n\n\\end{proof}"} {"id": "Ireland-Rosen|exercise_3_1", "formal_statement": "theorem exercise_3_1 : infinite {p : primes // p \u2261 -1 [ZMOD 6]} :=", "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 there are infinitely many primes congruent to $-1$ modulo 6 .\n", "nl_proof": "\\begin{proof} \n\nLet $n$ any integer such that $n\\geq 3$, and $N = n! -1 = 2 \\times 3 \\times\\cdots\\times n - 1 >1$. \n\n\n\nThen $N \\equiv -1 \\pmod 6$. As $6k +2, 6k +3, 6k +4$ are composite for all integers $k$, every prime factor of $N$ is congruent to $1$ or $-1$ modulo $6$. If every prime factor of $N$ was congruent to 1, then $N \\equiv 1 \\pmod 6$ : this is a contradiction because $-1 \\not \\equiv 1 \\pmod 6$. So there exists a prime factor $p$ of $N$ such that $p\\equiv -1 \\pmod 6$.\n\n\n\nIf $p\\leq n$, then $p \\mid n!$, and $p \\mid N = n!-1$, so $p \\mid 1$. As $p$ is prime, this is a contradiction, so $p>n$. \n\n\n\nConclusion :\n\n\n\n for any integer $n$, there exists a prime $p >n$ such that $p \\equiv -1 \\pmod 6$ : there are infinitely many primes congruent to $-1$ modulo $6$.\n\n\\end{proof}"} {"id": "Ireland-Rosen|exercise_3_5", "formal_statement": "theorem exercise_3_5 : \u00ac \u2203 x y : \u2124, 7*x^3 + 2 = y^3 :=", "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 $7 x^{3}+2=y^{3}$ has no solution in integers.\n", "nl_proof": "\\begin{proof}\n\n If $7x^2 + 2 = y^3,\\ x,y \\in \\mathbb{Z}$, then $y^3 \\equiv 2 \\pmod 7$ (so $y \\not \\equiv 0 \\pmod 7$)\n\n\n\nFrom Fermat's Little Theorem, $y^6 \\equiv 1 \\pmod 7$, so $2^2 \\equiv y^6 \\equiv 1 \\pmod 7$, which implies $7 \\mid 2^2-1 = 3$ : this is a contradiction. Thus the equation $7x^2 + 2 = y^3$ has no solution in integers.\n\n\\end{proof}"} {"id": "Ireland-Rosen|exercise_3_14", "formal_statement": "theorem exercise_3_14 {p q n : \u2115} (hp0 : p.prime \u2227 p > 2) \n (hq0 : q.prime \u2227 q > 2) (hpq0 : p \u2260 q) (hpq1 : p - 1 \u2223 q - 1)\n (hn : n.gcd (p*q) = 1) : \n n^(q-1) \u2261 1 [MOD p*q] :=", "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": "Let $p$ and $q$ be distinct odd primes such that $p-1$ divides $q-1$. If $(n, p q)=1$, show that $n^{q-1} \\equiv 1(p q)$.\n", "nl_proof": "\\begin{proof} \n\nAs $n \\wedge pq = 1, n\\wedge p=1, n \\wedge q = 1$, so from Fermat's Little Theorem\n\n$$n^{q-1} \\equiv 1 \\pmod q,\\qquad n^{p-1} \\equiv 1 \\pmod p.$$\n\n$p-1 \\mid q-1$, so there exists $k \\in \\mathbb{Z}$ such that $q-1 = k(p-1)$.\n\nThus\n\n$$n^{q-1} = (n^{p-1})^k \\equiv 1 \\pmod p.$$\n\n$p \\mid n^{q-1} - 1, q \\mid n^{q-1} - 1$, and $p\\wedge q = 1$, so $pq \\mid n^{q-1} - 1$ :\n\n$$n^{q-1} \\equiv 1 \\pmod{pq}.$$\n\n\\end{proof}"} {"id": "Ireland-Rosen|exercise_4_5", "formal_statement": "theorem exercise_4_5 {p t : \u2115} (hp0 : p.prime) (hp1 : p = 4*t + 3)\n (a : zmod p) :\n is_primitive_root a p \u2194 ((-a) ^ ((p-1)/2) = 1 \u2227 \u2200 (k : \u2115), k < (p-1)/2 \u2192 (-a)^k \u2260 1) :=", "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+3$. Show that $a$ is a primitive root modulo $p$ iff $-a$ has order $(p-1) / 2$.\n", "nl_proof": "\\begin{proof}\n\n Let $a$ a primitive root modulo $p$.\n\nAs $a^{p-1} \\equiv 1(\\bmod p), p \\mid\\left(a^{(p-1) / 2}-1\\right)\\left(a^{(p-1) / 2}+1\\right)$, so $p \\mid a^{(p-1) / 2}-1$ or $p \\mid$ $a^{(p-1) / 2}+1$. As $a$ is a primitive root modulo $p, a^{(p-1) / 2} \\not \\equiv 1(\\bmod p)$, so\n\n$$\n\na^{(p-1) / 2} \\equiv-1 \\quad(\\bmod p) .\n\n$$\n\nHence $(-a)^{(p-1) / 2}=(-1)^{2 t+1} a^{(p-1) / 2} \\equiv(-1) \\times(-1)=1(\\bmod p)$.\n\nSuppose that $(-a)^n \\equiv 1(\\bmod p)$, with $n \\in \\mathbb{N}$.\n\nThen $a^{2 n}=(-a)^{2 n} \\equiv 1(\\bmod p)$, so $p-1\\left|2 n, \\frac{p-1}{2}\\right| n$.\n\nSo $-a$ has order $(p-1) / 2$ modulo $p$.\n\nConversely, suppose that $-a$ has order $(p-1) / 2=2 t+1$ modulo $p$. Let $2, p_1, \\ldots p_k$ the prime factors of $p-1$, where $p_i$ are odd.\n\n$a^{(p-1) / 2}=a^{2 t+1}=-(-a)^{2 t+1}=-(-a)^{(p-1) / 2} \\equiv-1$, so $a^{(p-1) / 2} \\not \\equiv 1(\\bmod 2)$.\n\nAs $p-1$ is even, $(p-1) / p_i$ is even, so $a^{(p-1) / p_i}=(-a)^{(p-1) / p_i} \\not \\equiv 1(\\bmod p)($ since $-a$ has order $p-1)$.\n\nSo the order of $a$ is $p-1$ (see Ex. 4.8) : $a$ is a primitive root modulo $p$.\n\n\\end{proof}"} {"id": "Ireland-Rosen|exercise_4_8", "formal_statement": "theorem exercise_4_8 {p a : \u2115} (hp : odd p) : \n is_primitive_root a p \u2194 (\u2200 q \u2223 (p-1), q.prime \u2192 \u00ac a^(p-1) \u2261 1 [MOD 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": "Let $p$ be an odd prime. Show that $a$ is a primitive root modulo $p$ iff $a^{(p-1) / q} \\not \\equiv 1(p)$ for all prime divisors $q$ of $p-1$.\n", "nl_proof": "\\begin{proof} \n\n$\\bullet$ If $a$ is a primitive root, then $a^k \\not \\equiv 1$ for all $k, 1\\leq k < p-1$, so $a^{(p-1)/q} \\not \\equiv 1 \\pmod p$ for all prime divisors $q$ of $p - 1$.\n\n\n\n$\\bullet$ In the other direction, suppose $a^{(p-1)/q} \\not \\equiv 1 \\pmod p$ for all prime divisors $q$ of $p - 1$.\n\n\n\nLet $\\delta$ the order of $a$, and $p-1 = q_1^{a_1}q_2^{a_2}\\cdots q_k^{a_k}$ the decomposition of $p-1$ in prime factors. As $\\delta \\mid p-1, \\delta = q_1^{b_1}p_2^{b_2}\\cdots q_k^{b_k}$, with $b_i \\leq a_i, i=1,2,\\ldots,k$. If $b_i < a_i$ for some index $i$, then $\\delta \\mid (p-1)/q_i$, so $a^{(p-1)/q_i} \\equiv 1 \\pmod p$, which is in contradiction with the hypothesis. Thus $b_i = a_i$ for all $i$, and $\\delta = q-1$ : $a$ is a primitive root modulo $p$.\n\n\\end{proof}"} {"id": "Ireland-Rosen|exercise_5_13", "formal_statement": "theorem exercise_5_13 {p x: \u2124} (hp : prime p) \n (hpx : p \u2223 (x^4 - x^2 + 1)) : p \u2261 1 [ZMOD 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 any prime divisor of $x^{4}-x^{2}+1$ is congruent to 1 modulo 12 .\n", "nl_proof": "\\begin{proof} \n\n\\newcommand{\\legendre}[2]{\\genfrac{(}{)}{}{}{#1}{#2}}\n\n$\\bullet$ As $a^6 +1 = (a^2+1)(a^4-a^2+1)$, $p\\mid a^4 - a^2+1$ implies $p \\mid a^6 + 1$, so $\\legendre{-1}{p} = 1$ and $p\\equiv 1 \\pmod 4$.\n\n\n\n$\\bullet$ $p \\mid 4a^4 - 4 a^2 +4 = (2a-1)^2 + 3$, so $\\legendre{-3}{p} = 1$.\n\n\n\nAs $-3 \\equiv 1 \\pmod 4$, $\\legendre{-3}{p} = \\legendre{p}{3}$, so $\\legendre{p}{3} = 1$, thus $p \\equiv 1 \\pmod 3$.\n\n\n\n$4 \\mid p-1$ and $3 \\mid p-1$, thus $12 \\mid p-1$ : $$p \\equiv 1 \\pmod {12}.$$\n\n\\end{proof}"} {"id": "Ireland-Rosen|exercise_5_37", "formal_statement": "theorem exercise_5_37 {p q : \u2115} [fact(p.prime)] [fact(q.prime)] {a : \u2124}\n (ha : a < 0) (h0 : p \u2261 q [ZMOD 4*a]) (h1 : \u00ac ((p : \u2124) \u2223 a)) :\n legendre_sym p a = legendre_sym q 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": "Show that if $a$ is negative then $p \\equiv q(4 a) together with p\\not | a$ imply $(a / p)=(a / q)$.\n", "nl_proof": "\\begin{proof} \n\n\\newcommand{\\legendre}[2]{\\genfrac{(}{)}{}{}{#1}{#2}}\n\nWrite $a = -A, A>0$. As $p \\equiv q \\pmod {4a}$, we know from Prop. 5.3.3. (b) that $(A/p) = (A/q)$.\n\n\n\nMoreover,\n\n\\begin{align*}\n\n\\legendre{a}{p}&= \\legendre{-A}{p} = (-1)^{(p-1)/2} \\legendre{A}{p}\\\\\n\n\\legendre{a}{q}&= \\legendre{-A}{q} = (-1^{(q-1)/2} \\legendre{A}{q}\n\n\\end{align*}\n\nAs $p \\equiv q \\pmod {4a}$, $ p = q + 4ak, k\\in \\mathbb{Z}$, so\n\n$$(-1)^{(p-1)/2} = (-1)^{(q+4ak-1)/2} = (-1)^{(q-1)/2},$$\n\nso $(a/p) = (a/q)$.\n\n\\end{proof}"} {"id": "Ireland-Rosen|exercise_18_4", "formal_statement": "theorem exercise_18_4 {n : \u2115} (hn : \u2203 x y z w : \u2124, \n x^3 + y^3 = n \u2227 z^3 + w^3 = n \u2227 x \u2260 z \u2227 x \u2260 w \u2227 y \u2260 z \u2227 y \u2260 w) : \n n \u2265 1729 :=", "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 1729 is the smallest positive integer expressible as the sum of two different integral cubes in two ways.\n", "nl_proof": "\\begin{proof}\n\n Let $n=a^3+b^3$, and suppose that $\\operatorname{gcd}(a, b)=1$. If a prime $p \\mid a^3+b^3$, then\n\n$$\n\n\\left(a b^{-1}\\right)^3 \\equiv_p-1\n\n$$\n\nThus $3 \\mid \\frac{p-1}{2}$, that is, $p \\equiv_6 1$.\n\nIf we have $n=a^3+b^3=c^3+d^3$, then we can factor $n$ as\n\n$$\n\n\\begin{aligned}\n\n& n=(a+b)\\left(a^2-a b+b^2\\right) \\\\\n\n& n=(c+d)\\left(c^2-c d+d^2\\right)\n\n\\end{aligned}\n\n$$\n\nThus we need $n$ to have atleast 3 disctinct prime factors, and so the smallest taxicab number is on the form\n\n$$\n\nn=(6 k+1)(12 k+1)(18 k+1)\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.\n", "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.\n", "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$.\n", "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}$.\n", "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.\n", "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$.\n", "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$.\n", "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$.\n", "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)| 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.\n", "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\n", "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$.\n", "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$.\n", "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$x0$, 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.\n", "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.\n", "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)0$ such that $d(p, x) 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$.\n", "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.\n", "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_21", "formal_statement": "theorem exercise_2_1_21 (G : Type*) [group G] [fintype G]\n (hG : card G = 5) :\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": "Show that a group of order 5 must be abelian.\n", "nl_proof": "\\begin{proof}\n\n Suppose $G$ is a group of order 5 which is not abelian. Then there exist two non-identity elements $a, b \\in G$ such that $a * b \\neq$ $b * a$. Further we see that $G$ must equal $\\{e, a, b, a * b, b * a\\}$. To see why $a * b$ must be distinct from all the others, not that if $a *$ $b=e$, then $a$ and $b$ are inverses and hence $a * b=b * a$.\n\nContradiction. If $a * b=a$ (or $=b$ ), then $b=e$ (or $a=e$ ) and $e$ commutes with everything. Contradiction. We know by supposition that $a * b \\neq b * a$. Hence all the elements $\\{e, a, b, a * b, b * a\\}$ are distinct.\n\n\n\nNow consider $a^2$. It can't equal $a$ as then $a=e$ and it can't equal $a * b$ or $b * a$ as then $b=a$. Hence either $a^2=e$ or $a^2=b$.\n\nNow consider $a * b * a$. It can't equal $a$ as then $b * a=e$ and hence $a * b=b * a$. Similarly it can't equal $b$. It also can't equal $a * b$ or $b * a$ as then $a=e$. Hence $a * b * a=e$.\n\n\n\nSo then we additionally see that $a^2 \\neq e$ because then $a^2=e=$ $a * b * a$ and consequently $a=b * a$ (and hence $b=e$ ). So $a^2=b$. But then $a * b=a * a^2=a^2 * a=b * a$. Contradiction.\n\nHence starting with the assumption that there exists an order 5 abelian group $G$ leads to a contradiction. Thus there is no such group.\n\n\\end{proof}"} {"id": "Herstein|exercise_2_1_27", "formal_statement": "theorem exercise_2_1_27 {G : Type*} [group G] \n [fintype G] : \u2203 (m : \u2115), \u2200 (a : G), a ^ m = 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 there is an integer $m > 0$ such that $a^m = e$ for all $a \\in G$.\n", "nl_proof": "\\begin{proof}\n\n Let $n_1, n_2, \\ldots, n_k$ be the orders of all $k$ elements of $G=$ $\\left\\{a_1, a_2, \\ldots, a_k\\right\\}$. Let $m=\\operatorname{lcm}\\left(n_1, n_2, \\ldots, n_k\\right)$. Then, for any $i=$ $1, \\ldots, k$, there exists an integer $c$ such that $m=n_i c$. Thus\n\n$$\n\na_i^m=a_i^{n_i c}=\\left(a_i^{n_i}\\right)^c=e^c=e\n\n$$\n\nHence $m$ is a positive integer such that $a^m=e$ for all $a \\in G$.\n\n\\end{proof}"} {"id": "Herstein|exercise_2_2_5", "formal_statement": "theorem exercise_2_2_5 {G : Type*} [group G] \n (h : \u2200 (a b : G), (a * b) ^ 3 = a ^ 3 * b ^ 3 \u2227 (a * b) ^ 5 = a ^ 5 * b ^ 5) :\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": "Let $G$ be a group in which $(a b)^{3}=a^{3} b^{3}$ and $(a b)^{5}=a^{5} b^{5}$ for all $a, b \\in G$. Show that $G$ is abelian.\n", "nl_proof": "\\begin{proof}\n\n We have\n\n$$\n\n\\begin{aligned}\n\n& (a b)^3=a^3 b^3, \\text { for all } a, b \\in G \\\\\n\n\\Longrightarrow & (a b)(a b)(a b)=a\\left(a^2 b^2\\right) b \\\\\n\n\\Longrightarrow & a(b a)(b a) b=a\\left(a^2 b^2\\right) b \\\\\n\n\\Longrightarrow & (b a)^2=a^2 b^2, \\text { by cancellation law. }\n\n\\end{aligned}\n\n$$\n\nAgain,\n\n$$\n\n\\begin{aligned}\n\n& (a b)^5=a^5 b^5, \\text { for all } a, b \\in G \\\\\n\n\\Longrightarrow & (a b)(a b)(a b)(a b)(a b)=a\\left(a^4 b^4\\right) b \\\\\n\n\\Longrightarrow & a(b a)(b a)(b a)(b a) b=a\\left(a^4 b^4\\right) b \\\\\n\n\\Longrightarrow & (b a)^4=a^4 b^4, \\text { by cancellation law. }\n\n\\end{aligned}\n\n$$\n\nNow by combining two cases we have\n\n$$\n\n\\begin{aligned}\n\n& (b a)^4=a^4 b^4 \\\\\n\n\\Longrightarrow & \\left((b a)^2\\right)^2=a^2\\left(a^2 b^2\\right) b^2 \\\\\n\n\\Longrightarrow & \\left(a^2 b^2\\right)^2=a^2\\left(a^2 b^2\\right) b^2 \\\\\n\n\\Longrightarrow & \\left(a^2 b^2\\right)\\left(a^2 b^2\\right)=a^2\\left(a^2 b^2\\right) b^2 \\\\\n\n\\Longrightarrow & a^2\\left(b^2 a^2\\right) b^2=a^2\\left(a^2 b^2\\right) b^2 \\\\\n\n\\Longrightarrow & b^2 a^2=a^2 b^2, \\text { by cancellation law. } \\\\\n\n\\Longrightarrow & b^2 a^2=(b a)^2, \\text { since }(b a)^2=a^2 b^2 \\\\\n\n\\Longrightarrow & b(b a) a=(b a)(b a) \\\\\n\n\\Longrightarrow & b(b a) a=b(a b) a \\\\\n\n\\Longrightarrow & b a=a b, \\text { by cancellation law. }\n\n\\end{aligned}\n\n$$\n\nIt follows that, $a b=b a$ for all $a, b \\in G$. Hence $G$ is abelian\n\n\\end{proof}"} {"id": "Herstein|exercise_2_3_17", "formal_statement": "theorem exercise_2_3_17 {G : Type*} [has_mul G] [group G] (a x : G) : \n set.centralizer {x\u207b\u00b9*a*x} = \n (\u03bb g : G, x\u207b\u00b9*g*x) '' (set.centralizer {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 $G$ is a group and $a, x \\in G$, prove that $C\\left(x^{-1} a x\\right)=x^{-1} C(a) x$\n", "nl_proof": "\\begin{proof}\n\n Note that\n\n$$\n\nC(a):=\\{x \\in G \\mid x a=a x\\} .\n\n$$\n\nLet us assume $p \\in C\\left(x^{-1} a x\\right)$. Then,\n\n$$\n\n\\begin{aligned}\n\n& p\\left(x^{-1} a x\\right)=\\left(x^{-1} a x\\right) p \\\\\n\n\\Longrightarrow & \\left(p x^{-1} a\\right) x=x^{-1}(a x p) \\\\\n\n\\Longrightarrow & x\\left(p x^{-1} a\\right)=(a x p) x^{-1} \\\\\n\n\\Longrightarrow & \\left(x p x^{-1}\\right) a=a\\left(x p x^{-1}\\right) \\\\\n\n\\Longrightarrow & x p x^{-1} \\in C(a) .\n\n\\end{aligned}\n\n$$\n\nTherefore,\n\n$$\n\np \\in C\\left(x^{-1} a x\\right) \\Longrightarrow x p x^{-1} \\in C(a) .\n\n$$\n\nThus,\n\n$$\n\nC\\left(x^{-1} a x\\right) \\subset x^{-1} C(a) x .\n\n$$\n\nLet us assume\n\n$$\n\nq \\in x^{-1} C(a) x .\n\n$$\n\nThen there exists an element $y$ in $C(a)$ such that\n\n$$\n\nq=x^{-1} y x\n\n$$\n\nNow,\n\n$$\n\ny \\in C(a) \\Longrightarrow y a=a y .\n\n$$\n\nAlso,\n\n$$\n\nq\\left(x^{-1} a x\\right)=\\left(x^{-1} y x\\right)\\left(x^{-1} a x\\right)=x^{-1}(y a) x=x^{-1}(y a) x=\\left(x^{-1} y x\\right)\\left(x^{-1} a x\\right)=\\left(x^{-1} y x\\right) q .\n\n$$\n\nTherefore,\n\n$$\n\nq\\left(x^{-1} a x\\right)=\\left(x^{-1} y x\\right) q\n\n$$\n\nSo,\n\n$$\n\nq \\in C\\left(x^{-1} a x\\right) .\n\n$$\n\nConsequently we have\n\n$$\n\nx^{-1} C(a) x \\subset C\\left(x^{-1} a x\\right) .\n\n$$\n\nIt follows from the aforesaid argument\n\n$$\n\nC\\left(x^{-1} a x\\right)=x^{-1} C(a) x .\n\n$$\n\nThis completes the proof.\n\n\\end{proof}"} {"id": "Herstein|exercise_2_4_36", "formal_statement": "theorem exercise_2_4_36 {a n : \u2115} (h : a > 1) :\n n \u2223 (a ^ n - 1).totient :=", "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 > 1$ is an integer, show that $n \\mid \\varphi(a^n - 1)$, where $\\phi$ is the Euler $\\varphi$-function.\n", "nl_proof": "\\begin{proof}\n\n Proof: We have $a>1$. First we propose to prove that\n\n$$\n\n\\operatorname{Gcd}\\left(a, a^n-1\\right)=1 .\n\n$$\n\nIf possible, let us assume that\n\n$\\operatorname{Gcd}\\left(a, a^n-1\\right)=d$, where $d>1$.\n\nThen\n\n$d$ divides $a$ as well as $a^n-1$.\n\nNow,\n\n$d$ divides $a \\Longrightarrow d$ divides $a^n$.\n\nThis is an impossibility, since $d$ divides $a^n-1$ by our assumption. Consequently, $d$ divides 1 , which implies $d=1$. Hence we are contradict to the fact that $d>1$. Therefore\n\n$$\n\n\\operatorname{Gcd}\\left(a, a^n-1\\right)=1 .\n\n$$\n\nThen $a \\in U_{a^n-1}$, where $U_n$ is a group defined by\n\n$$\n\nU_n:=\\left\\{\\bar{a} \\in \\mathbb{Z}_n \\mid \\operatorname{Gcd}(a, n)=1\\right\\} .\n\n$$\n\nWe know that order of an element divides the order of the group. Here order of the group $U_{a^n-1}$ is $\\phi\\left(a^n-1\\right)$ and $a \\in U_{a^n-1}$. This follows that $\\mathrm{o}(a)$ divides $\\phi\\left(a^n-1\\right)$.\n\n\\end{proof}"} {"id": "Herstein|exercise_2_5_30", "formal_statement": "theorem exercise_2_5_30 {G : Type*} [group G] [fintype G]\n {p m : \u2115} (hp : nat.prime p) (hp1 : \u00ac p \u2223 m) (hG : card G = p*m) \n {H : subgroup G} [fintype H] [H.normal] (hH : card H = p):\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| = pm$, where $p \\nmid m$ and $p$ is a prime. If $H$ is a normal subgroup of order $p$ in $G$, prove that $H$ is characteristic.\n", "nl_proof": "\\begin{proof}\n\n Let $G$ be a group of order $p m$, such that $p \\nmid m$. Now, Given that $H$ is a normal subgroup of order $p$. 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$. Suppose $\\phi(H) \\neq H$, then $H \\cap \\phi (H)=\\{ e\\}$. Consider $H \\phi(H)$, this is a subgroup of $G$ as $H$ is normal. Also $|H \\phi(H)|=p^2$. By lagrange's theorem then $p^2 \\mid$ $p 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_37", "formal_statement": "theorem exercise_2_5_37 (G : Type*) [group G] [fintype G]\n (hG : card G = 6) (hG' : is_empty (comm_group G)) :\n G \u2243* equiv.perm (fin 3) :=", "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 nonabelian group of order 6, prove that $G \\simeq S_3$.\n", "nl_proof": "\\begin{proof}\n\n Suppose $G$ is a non-abelian group of order 6 . We need to prove that $G \\cong S_3$. Since $G$ is non-abelian, we conclude that there is no element of order 6. Now all the nonidentity element has order either 2 or 3 . All elements cannot be order 3 .This is because except the identity elements there are 5 elements, but order 3 elements occur in pair, that is $a, a^2$, both have order 3 , and $a \\neq a^2$. So, this is a contradiction, as there are only 5 elements. So, there must be an element of order 2 . All elements of order 2 will imply that $G$ is abelian, hence there is also element of order 3 . Let $a$ be an element of order 2 , and $b$ be an element of order 3 . So we have $e, a, b, b^2$, already 4 elements. Now $a b \\neq e, b, b^2$. So $a b$ is another element distinct from the ones already constructed. $a b^2 \\neq e, b, a b, b^2, a$. So, we have got another element distinct from the other. So, now $ G=\\left\\{e, a, b, b^2, a b, a b^2\\right\\}$. Also, ba must be equal to one of these elements. But $b a \\neq e, a, b, b^2$. Also if $b a=a b$, the group will become abelian. so $b a=a b^2$. So what we finally get is $G=\\left\\langle a, b \\mid a^2=e=b^3, b a=a b^2\\right\\rangle$. Hence $G \\cong S_3$.\n\n\\end{proof}"} {"id": "Herstein|exercise_2_5_44", "formal_statement": "theorem exercise_2_5_44 {G : Type*} [group G] [fintype G] {p : \u2115}\n (hp : nat.prime p) (hG : card G = p^2) :\n \u2203 (N : subgroup G) (fin : fintype N), @card N fin = p \u2227 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": "Prove that a group of order $p^2$, $p$ a prime, has a normal subgroup of order $p$.\n", "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 \\neq \\{ e \\}$ and $K \\subseteq H$.\n\n\n\nSo, we have now a group $G$ of order $p^2$. Suppose that the group is cyclic, then it is abelian and any subgroup of order $p$ is normal. Now let us suppose that $G$ is not cyclic, then there exists an element $a$ of order $p$, and $A=\\langle a\\rangle$. Now $i_G(A)=p$, so $p^2 \\nmid p$ ! , hence by the above result there is a normal subgroup $K$, non-trivial and $K \\subseteq A$. But $|A|=p$, a prime order subgroup, hence has no non-trivial subgroup, so $K=A$. so $A$ is normal subgroup.\n\n\\end{proof}"} {"id": "Herstein|exercise_2_6_15", "formal_statement": "theorem exercise_2_6_15 {G : Type*} [comm_group G] {m n : \u2115} \n (hm : \u2203 (g : G), order_of g = m) \n (hn : \u2203 (g : G), order_of g = n) \n (hmn : m.coprime n) :\n \u2203 (g : G), order_of g = m * n :=", "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 an abelian group and if $G$ has an element of order $m$ and one of order $n$, where $m$ and $n$ are relatively prime, prove that $G$ has an element of order $mn$.\n", "nl_proof": "\\begin{proof}\n\nLet $G$ be an abelian group, and let $a$ and $b$ be elements in $G$ of order $m$ and $n$, respectively, where $m$ and $n$ are relatively prime. We will show that the product $ab$ has order $mn$ in $G$, which will prove that $G$ has an element of order $mn$.\n\n\n\nTo show that $ab$ has order $mn$, let $k$ be the order of $ab$ in $G$. We have $a^m = e$, $b^n = e$, and $(ab)^k = e$, where $e$ denotes the identity element of $G$. Since $G$ is abelian, we have\n\n$$(ab)^{mn} = a^{mn}b^{mn} = e \\cdot e = e.$$\n\nThus, $k$ is a divisor of $mn$.\n\n\n\nNow, observe that $a^k = b^{-k}$. Since $m$ and $n$ are relatively prime, there exist integers $x$ and $y$ such that $mx + ny = 1$. Taking $kx$ on both sides of the equation, we get $a^{kx} = b^{-kx}$, or equivalently, $(a^k)^x = (b^k)^{-x}$. It follows that $a^{kx} = (a^m)^{xny} = e$, and similarly, $b^{ky} = (b^n)^{mxk} = e$. Therefore, $m$ divides $ky$ and $n$ divides $kx$. Since $m$ and $n$ are relatively prime, it follows that $mn$ divides $k$. Hence, $k = mn$, and $ab$ has order $mn$ in $G$. This completes the proof.\n\n\\end{proof}"} {"id": "Herstein|exercise_2_8_12", "formal_statement": "theorem exercise_2_8_12 {G H : Type*} [fintype G] [fintype H] \n [group G] [group H] (hG : card G = 21) (hH : card H = 21) \n (hG1 : is_empty(comm_group G)) (hH1 : is_empty (comm_group H)) :\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 any two nonabelian groups of order 21 are isomorphic.\n", "nl_proof": "\\begin{proof}\n\n By Cauchy's theorem we have that if $G$ is a group of order 21 then it has an element $a$ of order 3 and an element $b$ of order 7. By exercise 2.5.41 we have that the subgroup generated by $b$ is normal, so there is some $i=0,1,2,3,4,5,6$ such that $a b a^{-1}=b^i$. We know $i \\neq$ 0 since that implies $a b=a$ and so that $b=e$, a contradiction, and we know $i \\neq 1$ since then $a b=b a$ and this would imply $G$ is abelian, which we are assuming is not the case.\n\nNow, $a$ has order 3 so we must have $b=a^3 b a^{-3}=b^{i^3}$ mod 7 , and so $i$ is restricted by the modular equation $i^3 \\equiv 1 \\bmod 7$\n\n\\begin{center}\n\n\\begin{tabular}{|c|c|}\n\n\\hline$x$ & $x^3 \\bmod 7$ \\\\\n\n\\hline 2 & 1 \\\\\n\n\\hline 3 & 6 \\\\\n\n\\hline 4 & 1 \\\\\n\n\\hline 5 & 6 \\\\\n\n\\hline 6 & 6 \\\\\n\n\\hline\n\n\\end{tabular}\n\n\\end{center}\n\nTherefore the only options are $i=2$ and $i=4$. Now suppose $G$ is such that $a b a^{-1}=b^2$ and let $G^{\\prime}$ be another group of order 21 with an element $c$ of order 3 and an element $d$ of order 7 such that $c d c^{-1}=d^4$. We now prove that $G$ and $G^{\\prime}$ are isomorphic. Define\n\n$$\n\n\\begin{aligned}\n\n\\phi: G & \\rightarrow G^{\\prime} \\\\\n\na & \\mapsto c^{-1} \\\\\n\nb & \\mapsto d\n\n\\end{aligned}\n\n$$\n\nsince $a$ and $c^{-1}$ have the same order and $b$ and $d$ have the same order this is a well defined function. Since\n\n$$\n\n\\begin{aligned}\n\n\\phi(a) \\phi(b) \\phi(a)^{-1} & =c^{-1} d c \\\\\n\n& =\\left(c d^{-1} c^{-1}\\right)^{-1} \\\\\n\n& =\\left(d^{-4}\\right)^{-1} \\\\\n\n& =d^4 \\\\\n\n& =\\left(d^2\\right)^2 \\\\\n\n& =\\phi(b)^2\n\n\\end{aligned}\n\n$$\n\n$\\phi$ is actually a homomorphism. For any $c^i d^j \\in G^{\\prime}$ we have $\\phi\\left(a^{-i} b^j\\right)=c^i d^j$ so $\\phi$ is onto and $\\phi\\left(a^i b^j\\right)=c^{-i} d^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 21 .\n\n\\end{proof}"} {"id": "Herstein|exercise_2_9_2", "formal_statement": "theorem exercise_2_9_2 {G H : Type*} [fintype G] [fintype H] [group G] \n [group H] (hG : is_cyclic G) (hH : is_cyclic H) :\n is_cyclic (G \u00d7 H) \u2194 (card G).coprime (card 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": "If $G_1$ and $G_2$ are cyclic groups of orders $m$ and $n$, respectively, prove that $G_1 \\times G_2$ is cyclic if and only if $m$ and $n$ are relatively prime.\n", "nl_proof": "\\begin{proof}\n\n The order of $G \\times H$ is $n$. $m$. Thus, $G \\times H$ is cyclic iff it has an element with order n. $m$. Suppose $\\operatorname{gcd}(n . m)=1$. This implies that $g^m$ has order $n$, and analogously $h^n$ has order $m$. That is, $g \\times h$ has order $n$. $m$, and therefore $G \\times H$ is cyclic.\n\n\n\nSuppose now that $\\operatorname{gcd}(n . m)>1$. Let $g^k$ be an element of $G$ and $h^j$ be an element of $H$. Since the lowest common multiple of $n$ and $m$ is lower than the product $n . m$, that is, $\\operatorname{lcm}(n, m)1$, then $Z(G)$, the center of $G$, has more than one element; that is, if $|G|=p^k$ with $k\\geq 1$, then $|Z(G)|>1$.\n\n\n\n\\textit{Proof of the lemma:} Consider the class equation\n\n$$\n\n|G|=|Z(G)|+\\sum_{a \\notin Z(G)}[G: C(a)],\n\n$$\n\nwhere $C(a)$ denotes the centralizer of $a$ in $G$. If $G=Z(G)$, then the lemma is immediate. Suppose $Z(G)$ is a proper subset of $G$ and consider an element $a\\in G$ such that $a\\notin Z(G)$. Then $C(a)$ is a proper subgroup of $G$. Since $C(a)$ is a subgroup of a $p$-group, $[G:C(a)]$ is divisible by $p$ for all $a\\notin Z(G)$. This implies that $p$ divides $|G|=|Z(G)|+\\sum_{a\\notin Z(G)} [G:C(a)]$.\n\n\n\nSince $p$ also divides $|G|$, it follows that $p$ divides $|Z(G)|$. Hence, $|Z(G)|>1$. $\\Box$\n\n\n\nThis proves our \\textbf{lemma}.\n\n\n\nWe will prove the result by induction on $n$.\n\nIf $n=1$, the $G$ is a cyclic group of prime order and hence every subgroup of $G$ is normal in $G$. Thus, the result is true for $n=1$.\n\nSuppose the result is true for all groups of order $p^m$, where $1 \\leq mp^{n-1}$. Thus, $|N(H)|=p^n$ and $N(H)=G$.\n\nIn this case $H$ is normal in $G$.\n\nLet $H=N(H)$. Then $Z(G)$, the center of $G$, is a subset of $H$ and $Z(G) \\neq$ $\\{e\\}$.\n\nBy Cauchy's theorem and the above Claim, there exists $a \\in Z(G)$ such that $o(a)=p$.\n\nLet $K=\\langle a\\rangle$, a cyclic group generated by $a$.\n\nThen $K$ is a normal subgroup of $G$ of order $p$. Now, $|H / K|=p^{n-2}$ and $|G / K|=p^{n-1}$.\n\nThus, by induction hypothesis, $H / K$ is a normal subgroup of $G / K$.\n\n\\end{proof}"} {"id": "Herstein|exercise_4_1_19", "formal_statement": "theorem exercise_4_1_19 : infinite {x : quaternion \u211d | x^2 = -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": "Show that there is an infinite number of solutions to $x^2 = -1$ in the quaternions.\n", "nl_proof": "\\begin{proof}\n\nLet $x=a i+b j+c k$ then\n\n$$\n\nx^2=(a i+b j+c k)(a i+b j+c k)=-a^2-b^2-c^2=-1\n\n$$\n\nThis gives $a^2+b^2+c^2=1$ which has infinitely many solutions for $-13$.\n\nLet us take $p=3$. Then the sum\n\n$$\n\n\\frac{1}{1}+\\frac{1}{2}+\\ldots+\\frac{1}{(p-1)}\n\n$$\n\nbecomes\n\n$$\n\n1+\\frac{1}{3-1}=1+\\frac{1}{2}=\\frac{3}{2} .\n\n$$\n\nTherefore in this case $\\quad \\frac{a}{b}=\\frac{3}{2} \\quad$ implies $3 \\mid a$, i.e. $p \\mid a$.\n\nNow for odd prime $p>3$.\n\nLet us consider $f(x)=(x-1)(x-2) \\ldots(x-(p-1))$.\n\nNow, by Fermat, we know that the coefficients of $f(x)$ other than the $x^{p-1}$ and $x^0$ are divisible by $p$.\n\nSo if,\n\n$$\n\n\\begin{array}{r}\n\nf(x)=x^{p-1}+\\sum_{i=0}^{p-2} a_i x^i \\\\\n\n\\text { and } p>3 .\n\n\\end{array}\n\n$$\n\nThen $p \\mid a_2$, and\n\n$$\n\nf(p) \\equiv a_1 p+a_0 \\quad\\left(\\bmod p^3\\right)\n\n$$\n\nBut we see that\n\n$$\n\nf(x)=(-1)^{p-1} f(p-x) \\text { for any } x,\n\n$$\n\nso if $p$ is odd,\n\n$$\n\nf(p)=f(0)=a_0,\n\n$$\n\nSo it follows that:\n\n$$\n\n0=f(p)-a_0 \\equiv a_1 p \\quad\\left(\\bmod p^3\\right)\n\n$$\n\nTherefore,\n\n$$\n\n0 \\equiv a_1 \\quad\\left(\\bmod p^2\\right) .\n\n$$\n\nHence,\n\n$$\n\n0 \\equiv a_1 \\quad(\\bmod p) .\n\n$$\n\nNow our sum is just $\\frac{a_1}{(p-1) !}=\\frac{a}{b}$.\n\nIt follows that $p$ divides $a$. This completes the proof.\n\n\\end{proof}"} {"id": "Herstein|exercise_4_3_25", "formal_statement": "theorem exercise_4_3_25 (I : ideal (matrix (fin 2) (fin 2) \u211d)) : \n I = \u22a5 \u2228 I = \u22a4 :=", "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 $R$ be the ring of $2 \\times 2$ matrices over the real numbers; suppose that $I$ is an ideal of $R$. Show that $I = (0)$ or $I = R$.\n", "nl_proof": "\\begin{proof}\n\n Suppose that $I$ is a nontrivial ideal of $R$, and let\n\n$$\n\nA=\\left(\\begin{array}{ll}\n\na & b \\\\\n\nc & d\n\n\\end{array}\\right)\n\n$$\n\nwhere not all of $a, b, c d$ are zero. Suppose, without loss of generality -- our steps would be completely analogous, modulo some different placement of 1 s in our matrices, if we assumed some other element to be nonzero -- that $a \\neq 0$. Then we have that\n\n$$\n\n\\left(\\begin{array}{ll}\n\n1 & 0 \\\\\n\n0 & 0\n\n\\end{array}\\right)\\left(\\begin{array}{ll}\n\na & b \\\\\n\nc & d\n\n\\end{array}\\right)=\\left(\\begin{array}{ll}\n\na & b \\\\\n\n0 & 0\n\n\\end{array}\\right) \\in I\n\n$$\n\nand so\n\n$$\n\n\\left(\\begin{array}{ll}\n\na & b \\\\\n\n0 & 0\n\n\\end{array}\\right)\\left(\\begin{array}{ll}\n\n1 & 0 \\\\\n\n0 & 0\n\n\\end{array}\\right)=\\left(\\begin{array}{ll}\n\na & 0 \\\\\n\n0 & 0\n\n\\end{array}\\right) \\in I\n\n$$\n\nso that\n\n$$\n\n\\left(\\begin{array}{ll}\n\nx & 0 \\\\\n\n0 & 0\n\n\\end{array}\\right) \\in I\n\n$$\n\nfor any real $x$. Now, also for any real $x$,\n\n$$\n\n\\left(\\begin{array}{ll}\n\nx & 0 \\\\\n\n0 & 0\n\n\\end{array}\\right)\\left(\\begin{array}{ll}\n\n0 & 1 \\\\\n\n0 & 0\n\n\\end{array}\\right)=\\left(\\begin{array}{ll}\n\n0 & x \\\\\n\n0 & 0\n\n\\end{array}\\right) \\in I .\n\n$$\n\nLikewise\n\n$$\n\n\\left(\\begin{array}{ll}\n\n0 & 0 \\\\\n\n1 & 0\n\n\\end{array}\\right)\\left(\\begin{array}{ll}\n\n0 & x \\\\\n\n0 & 0\n\n\\end{array}\\right)=\\left(\\begin{array}{ll}\n\n0 & 0 \\\\\n\n0 & x\n\n\\end{array}\\right) \\in I\n\n$$\n\nand\n\n$$\n\n\\left(\\begin{array}{ll}\n\n0 & 0 \\\\\n\n0 & x\n\n\\end{array}\\right)\\left(\\begin{array}{ll}\n\n0 & 0 \\\\\n\n1 & 0\n\n\\end{array}\\right)=\\left(\\begin{array}{ll}\n\n0 & 0 \\\\\n\nx & 0\n\n\\end{array}\\right)\n\n$$\n\nThus, as\n\n$$\n\n\\left(\\begin{array}{ll}\n\na & b \\\\\n\nc & d\n\n\\end{array}\\right)=\\left(\\begin{array}{ll}\n\na & 0 \\\\\n\n0 & 0\n\n\\end{array}\\right)+\\left(\\begin{array}{ll}\n\n0 & b \\\\\n\n0 & 0\n\n\\end{array}\\right)+\\left(\\begin{array}{ll}\n\n0 & 0 \\\\\n\nc & 0\n\n\\end{array}\\right)+\\left(\\begin{array}{ll}\n\n0 & 0 \\\\\n\n0 & d\n\n\\end{array}\\right)\n\n$$\n\nand since all the terms on the right side are in $I$ and $I$ is an additive group, it follows that\n\n$$\n\n\\left(\\begin{array}{ll}\n\na & b \\\\\n\nc & d\n\n\\end{array}\\right)\n\n$$\n\nfor arbitrary $a, b, c, d$ is in $I$, i.e. $I=R$\n\nNote that the intuition for picking these matrices is that, if we denote by $E_{i j}$ the matrix with 1 at position $(i, j)$ and 0 elsewhere, then\n\n$$\n\nE_{i j}\\left(\\begin{array}{ll}\n\na_{1,1} & a_{1,2} \\\\\n\na_{2,1} & a_{2,2}\n\n\\end{array}\\right) E_{n m}=a_{j, n} E_{i m}\n\n$$\n\n\\end{proof}"} {"id": "Herstein|exercise_4_5_16", "formal_statement": "theorem exercise_4_5_16 {p n: \u2115} (hp : nat.prime p) \n {q : polynomial (zmod p)} (hq : irreducible q) (hn : q.degree = n) :\n \u2203 is_fin : fintype $ polynomial (zmod p) \u29f8 ideal.span ({q} : set (polynomial $ zmod p)), \n @card (polynomial (zmod p) \u29f8 ideal.span {q}) is_fin = p ^ n \u2227 \n is_field (polynomial $ zmod 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": "Let $F = \\mathbb{Z}_p$ be the field of integers $\\mod p$, where $p$ is a prime, and let $q(x) \\in F[x]$ be irreducible of degree $n$. Show that $F[x]/(q(x))$ is a field having at exactly $p^n$ elements.\n", "nl_proof": "\\begin{proof}\n\n In the previous problem we have shown that any for any $p(x) \\in F[x]$, we have that\n\n$$\n\np(x)+(q(x))=a_{n-1} x^{n-1}+\\cdots+a_1 x+a_0+(q(x))\n\n$$\n\nfor some $a_{n-1}, \\ldots, a_0 \\in F$, and that there are $p^n$ choices for these numbers, so that $F[x] /(q(x)) \\leq p^n$. In order to show that equality holds, we have to show that each of these choices induces a different element of $F[x] /(q(x))$; in other words, that each different polynomial of degree $n-1$ or lower belongs to a different coset of $(q(x))$ in $F[x]$.\n\n\n\nSuppose now, then, that\n\n$$\n\na_{n-1} x^{n-1}+\\cdots+a_1 x+a_0+(q(x))=b_{n-1} x^{n-1}+\\cdots+b_1 x+b_0+(q(x))\n\n$$\n\nwhich is equivalent with $\\left(a_{n-1}-b_{n-1}\\right)^{n-1}+\\cdots\\left(a_1-b_1\\right) x+\\left(a_0-b_0\\right) \\in(q(x))$, which is in turn equivalent with there being a $w(x) \\in F[x]$ such that\n\n$$\n\nq(x) w(x)=\\left(a_{n-1}-b_{n-1}\\right)^{n-1}+\\cdots\\left(a_1-b_1\\right) x+\\left(a_0-b_0\\right) .\n\n$$\n\nDegree of the right hand side is strictly smaller than $n$, while the degree of the left hand side is greater or equal to $n$ except if $w(x)=0$, so that if equality is hold we must have that $w(x)=0$, but then since polynomials are equal iff all of their coefficient are equal we get that $a_{n-1}-b_{n-1}=$ $0, \\ldots, a_1-b_1=0, a_0-b_0=0$, i.e.\n\n$$\n\na_{n-1}=b_{n-1}, \\ldots, a_1=b_1, a_0=b_0\n\n$$\n\nwhich is what we needed to prove.\n\n\\end{proof}"} {"id": "Herstein|exercise_4_5_25", "formal_statement": "theorem exercise_4_5_25 {p : \u2115} (hp : nat.prime p) :\n irreducible (\u2211 i : finset.range p, X ^ p : 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": "If $p$ is a prime, show that $q(x) = 1 + x + x^2 + \\cdots x^{p - 1}$ is irreducible in $Q[x]$.\n", "nl_proof": "\\begin{proof}\n\n Lemma: Let $F$ be a field and $f(x) \\in F[x]$. If $c \\in F$ and $f(x+c)$ is irreducible in $F[x]$, then $f(x)$ is irreducible in $F[x]$.\n\nProof of the Lemma: Suppose that $f(x)$ is reducible, i.e., there exist non-constant $g(x), h(x) \\in F[x]$ so that\n\n$$\n\nf(x)=g(x) h(x) .\n\n$$\n\nIn particular, then we have\n\n$$\n\nf(x+c)=g(x+c) h(x+c) .\n\n$$\n\nNote that $g(x+c)$ and $h(x+c)$ have the same degree at $g(x)$ and $h(x)$ respectively; in particular, they are non-constant polynomials. So our assumption is wrong.\n\nHence, $f(x)$ is irreducible in $F[x]$. This proves our Lemma.\n\n\n\nNow recall the identity\n\n$$\n\n\\frac{x^p-1}{x-1}=x^{p-1}+x^{p-2}+\\ldots \\ldots+x^2+x+1 .\n\n$$\n\nWe prove that $f(x+1)$ is $\\$$ |textbffirreducible in $\\mathbb{Q}[x]$ and then apply the Lemma to conclude that $f(x)$ is irreducible in $\\mathbb{Q}[x] .3 \\$$ Note that\n\n$$\n\n\\begin{aligned}\n\n& f(x+1)=\\frac{(x+1)^p-1}{x} \\\\\n\n& =\\frac{x^p+p x^{p-1}+\\ldots+p x}{x} \\\\\n\n& =x^{p-1}+p x^{p-2}+\\ldots .+p .\n\n\\end{aligned}\n\n$$\n\nUsing that the binomial coefficients occurring above are all divisible by $p$, we have that $f(x+1)$ is irreducible $\\mathbb{Q}[x]$ by Eisenstein's criterion applied with prime $p$. \n\n\n\nThen by the lemma $f(x)$ is irreducible $\\mathbb{Q}[x]$. This completes the proof.\n\n\\end{proof}"} {"id": "Herstein|exercise_4_6_3", "formal_statement": "theorem exercise_4_6_3 :\n infinite {a : \u2124 | irreducible (X^7 + 15*X^2 - 30*X + a : 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": "Show that there is an infinite number of integers a such that $f(x) = x^7 + 15x^2 - 30x + a$ is irreducible in $Q[x]$.\n", "nl_proof": "\\begin{proof}\n\n Via Eisenstein's criterion and observation that 5 divides 15 and $-30$, it is sufficient to find infinitely many $a$ such that 5 divides $a$, but $5^2=25$ doesn't divide $a$. For example $5 \\cdot 2^k$ for $k=0,1, \\ldots$ is one such infinite sequence.\n\n\\end{proof}"} {"id": "Herstein|exercise_5_2_20", "formal_statement": "theorem exercise_5_2_20 {F V \u03b9: Type*} [infinite F] [field F] \n [add_comm_group V] [module F V] {u : \u03b9 \u2192 submodule F V} \n (hu : \u2200 i : \u03b9, u i \u2260 \u22a4) : \n (\u22c3 i : \u03b9, (u i : set V)) \u2260 \u22a4 :=", "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 $V$ be a vector space over an infinite field $F$. Show that $V$ cannot be the set-theoretic union of a finite number of proper subspaces of $V$.\n", "nl_proof": "\\begin{proof}\n\n Assume that $V$ can be written as the set-theoretic union of $n$ proper subspaces $U_1, U_2, \\ldots, U_n$. Without loss of generality, we may assume that no $U_i$ is contained in the union of other subspaces.\n\n\n\nLet $u \\in U_i$ but $u \\notin \\bigcup_{j \\neq i} U_j$ and $v \\notin U_i$. Then, we have $(v + Fu) \\cap U_i = \\varnothing$, and $(v + Fu) \\cap U_j$ for $j \\neq i$ contains at most one vector, since otherwise $U_j$ would contain $u$.\n\n\n\nTherefore, we have $|v + Fu| \\leq |F| \\leq n-1$. However, since $n$ is a finite natural number, this contradicts the fact that the field $F$ is finite.\n\n\n\nThus, our assumption that $V$ can be written as the set-theoretic union of proper subspaces is wrong, and the claim is proven.\n\n\\end{proof}"} {"id": "Herstein|exercise_5_3_10", "formal_statement": "theorem exercise_5_3_10 : is_algebraic \u211a (cos (real.pi / 180)) :=", "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 $\\cos 1^{\\circ}$ is algebraic over $\\mathbb{Q}$.\n", "nl_proof": "\\begin{proof}\n\n Since $\\left(\\cos \\left(1^{\\circ}\\right)+i \\sin \\left(1^{\\circ}\\right)\\right)^{360}=1$, the number $\\cos \\left(1^{\\circ}\\right)+i \\sin \\left(1^{\\circ}\\right)$ is algebraic. And the real part and the imaginary part of an algebraic number are always algebraic numbers.\n\n\\end{proof}"} {"id": "Herstein|exercise_5_5_2", "formal_statement": "theorem exercise_5_5_2 : irreducible (X^3 - 3*X - 1 : 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 $x^3 - 3x - 1$ is irreducible over $\\mathbb{Q}$.\n", "nl_proof": "\\begin{proof}\n\nLet $p(x)=x^3-3 x-1$. Then\n\n$$\n\np(x+1)=(x+1)^3-3(x+1)-1=x^3+3 x^2-3\n\n$$\n\nWe have $3|3,3| 0$ but $3 \\nmid 1$ and $3^2 \\nmid 3$. Thus the polynomial is irreducible over $\\mathbb{Q}$ by 3 -Eisenstein criterion.\n\n\\end{proof}"} {"id": "Artin|exercise_2_2_9", "formal_statement": "theorem exercise_2_2_9 {G : Type*} [group G] {a b : G}\n (h : a * b = b * a) :\n \u2200 x y : closure {x | x = a \u2228 x = b}, x*y = y*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": "Let $H$ be the subgroup generated by two elements $a, b$ of a group $G$. Prove that if $a b=b a$, then $H$ is an abelian group.\n", "nl_proof": "\\begin{proof}\n\n Since $a$ and $b$ commute, for any $g, h\\in H$ we can write $g=a^ib^j$ and $h = a^kb^l$. Then $gh = a^ib^ja^kb^l = a^kb^la^ib^j = hg$. Thus $H$ is abelian. \n\n\\end{proof}"} {"id": "Artin|exercise_2_4_19", "formal_statement": "theorem exercise_2_4_19 {G : Type*} [group G] {x : G}\n (hx : order_of x = 2) (hx1 : \u2200 y, order_of y = 2 \u2192 y = x) :\n x \u2208 center G :=", "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 if a group contains exactly one element of order 2 , then that element is in the center of the group.\n", "nl_proof": "\\begin{proof}\n\n Let $x$ be the element of order two. Consider the element $z=y^{-1} x y$, we have: $z^2=\\left(y^{-1} x y\\right)^2=\\left(y^{-1} x y\\right)\\left(y^{-1} x y\\right)=e$. So: $z=x$, and $y^{-1} x y=x$. So: $x y=y x$. So: $x$ is in the center of $G$. \n\n\\end{proof}"} {"id": "Artin|exercise_2_11_3", "formal_statement": "theorem exercise_2_11_3 {G : Type*} [group G] [fintype G]\n (hG : even (card G)) : \u2203 x : G, order_of x = 2 :=", "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 a group of even order contains an element of order $2 .$\n", "nl_proof": "\\begin{proof}\n\n Pair up if possible each element of $G$ with its inverse, and observe that\n\n$$\n\ng^2 \\neq e \\Longleftrightarrow g \\neq g^{-1} \\Longleftrightarrow \\text { there exists the pair }\\left(g, g^{-1}\\right)\n\n$$\n\nNow, there is one element that has no pairing: the unit $e$ (since indeed $e=e^{-1} \\Longleftrightarrow e^2=e$ ), so since the number of elements of $G$ is even there must be at least one element more, say $e \\neq a \\in G$, without a pairing, and thus $a=a^{-1} \\Longleftrightarrow a^2=e$\n\n\\end{proof}"} {"id": "Artin|exercise_3_5_6", "formal_statement": "theorem exercise_3_5_6 {K V : Type*} [field K] [add_comm_group V]\n [module K V] {S : set V} (hS : set.countable S)\n (hS1 : span K S = \u22a4) {\u03b9 : Type*} (R : \u03b9 \u2192 V)\n (hR : linear_independent K R) : countable \u03b9 :=", "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 which is spanned by a countably infinite set. Prove that every linearly independent subset of $V$ is finite or countably infinite.\n", "nl_proof": "\\begin{proof}\n\n Let $A$ be the countable generating set, and let $U$ be an uncountable linearly independent set. It can be extended to a basis $B$ of the whole space. Now consider the subset $C$ of elements of $B$ that appear in the $B$-decompositions of elements of $A$.\n\nSince only finitely many elements are involved in the decomposition of each element of $A$, the set $C$ is countable. But $C$ also clearly generates the vector space $V$. This contradicts the fact that it is a proper subset of the basis $B$ (since $B$ is uncountable).\n\n\\end{proof}"} {"id": "Artin|exercise_6_1_14", "formal_statement": "theorem exercise_6_1_14 (G : Type*) [group G]\n (hG : is_cyclic $ G \u29f8 (center G)) :\n center G = \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 $Z$ be the center of a group $G$. Prove that if $G / Z$ is a cyclic group, then $G$ is abelian and hence $G=Z$.\n", "nl_proof": "\\begin{proof}\n\n We have that $G / Z(G)$ is cyclic, and so there is an element $x \\in G$ such that $G / Z(G)=\\langle x Z(G)\\rangle$, where $x Z(G)$ is the coset with representative $x$. Now let $g \\in G$\n\nWe know that $g Z(G)=(x Z(G))^m$ for some $m$, and by definition $(x Z(G))^m=x^m Z(G)$.\n\nNow, in general, if $H \\leq G$, we have by definition too that $a H=b H$ if and only if $b^{-1} a \\in H$.\n\nIn our case, we have that $g Z(G)=x^m Z(G)$, and this happens if and only if $\\left(x^m\\right)^{-1} g \\in Z(G)$.\n\nThen, there's a $z \\in Z(G)$ such that $\\left(x^m\\right)^{-1} g=z$, and so $g=x^m z$.\n\n\n\n$g, h \\in G$ implies that $g=x^{a_1} z_1$ and $h=x^{a_2} z_2$, so\n\n$$\n\n\\begin{aligned}\n\ng h & =\\left(x^{a_1} z_1\\right)\\left(x^{a_2} z_2\\right) \\\\\n\n& =x^{a_1} x^{a_2} z_1 z_2 \\\\\n\n& =x^{a_1+a_2} z_2 z_1 \\\\\n\n& =\\ldots=\\left(x^{a_2} z_2\\right)\\left(x^{a_1} z_1\\right)=h g .\n\n\\end{aligned}\n\n$$\n\nTherefore, $G$ is abelian.\n\n\\end{proof}"} {"id": "Artin|exercise_6_4_3", "formal_statement": "theorem exercise_6_4_3 {G : Type*} [group G] [fintype G] {p q : \u2115}\n (hp : prime p) (hq : prime q) (hG : card G = p^2 *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^2 q$, where $p$ and $q$ are prime, is simple.\n", "nl_proof": "\\begin{proof}\n\n We may as well assume $p1$. 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 $H1$, 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$.\n", "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$.\n", "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}$.\n", "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$.\n", "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.\n", "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.\n", "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!$.\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$.\n", "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.\n", "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 {G : Type*} [group G] : \n \u2203 H : subgroup G, H.characteristic \u2227 \u00ac 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 there exists a normal subgroup that is not characteristic.\n", "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$.\n", "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.\n", "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.\n", "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.\n", "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.\n", "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.\n", "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.\n", "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$.\n", "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$.\n", "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.\n", "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$.\n", "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 tm$, 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$.\n", "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$.\n", "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$.\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$.\n", "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.\n", "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