{"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.", "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$.", "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.", "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$", "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.", "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.", "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$.", "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$.", "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$.", "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.", "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.", "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.", "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$.", "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.", "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]$.", "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]$.", "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$.", "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}$.", "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}$.", "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": "Pugh|exercise_2_12a", "formal_statement": "theorem exercise_2_12a (f : \u2115 \u2192 \u2115) (p : \u2115 \u2192 \u211d) (a : \u211d)\n (hf : injective f) (hp : tendsto p at_top (\ud835\udcdd a)) :\n tendsto (\u03bb n, p (f n)) at_top (\ud835\udcdd a) :=", "src_header": "import .common\n\nopen set real filter function ring_hom topological_space\n\nopen_locale big_operators\nopen_locale filter\nopen_locale topology \nnoncomputable theory \n\n", "nl_statement": "Let $(p_n)$ be a sequence and $f:\\mathbb{N}\\to\\mathbb{N}$. The sequence $(q_k)_{k\\in\\mathbb{N}}$ with $q_k=p_{f(k)}$ is called a rearrangement of $(p_n)$. Show that if $f$ is an injection, the limit of a sequence is unaffected by rearrangement.", "nl_proof": "\\begin{proof}\n\n Let $\\varepsilon>0$. Since $p_n \\rightarrow L$, we have that, for all $n$ except $n \\leq N$, $d\\left(p_n, L\\right)<\\epsilon$. Let $S=\\{n \\mid f(n) \\leq N\\}$, let $n_0$ be the largest $n \\in S$, we know there is such a largest $n$ because $f(n)$ is injective. Now we have that $\\forall n>n_0 f(n)>N$ which implies that $p_{f(n)} \\rightarrow L$, as required.\n\n\\end{proof}"} {"id": "Pugh|exercise_2_29", "formal_statement": "theorem exercise_2_29 (M : Type*) [metric_space M]\n (O C : set (set M))\n (hO : O = {s | is_open s})\n (hC : C = {s | is_closed s}) :\n \u2203 f : O \u2192 C, bijective f :=", "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": "Let $\\mathcal{T}$ be the collection of open subsets of a metric space $\\mathrm{M}$, and $\\mathcal{K}$ the collection of closed subsets. Show that there is a bijection from $\\mathcal{T}$ onto $\\mathcal{K}$.", "nl_proof": "\\begin{proof}\n\n The bijection given by $x\\mapsto X^C$ suffices. \n\n\\end{proof}"} {"id": "Pugh|exercise_2_41", "formal_statement": "theorem exercise_2_41 (m : \u2115) {X : Type*} [normed_space \u211d ((fin m) \u2192 \u211d)] :\n is_compact (metric.closed_ball 0 1) :=", "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": "Let $\\|\\cdot\\|$ be any norm on $\\mathbb{R}^{m}$ and let $B=\\left\\{x \\in \\mathbb{R}^{m}:\\|x\\| \\leq 1\\right\\}$. Prove that $B$ is compact.", "nl_proof": "\\begin{proof}\n\n Let us call $\\|\\cdot\\|_E$ the Euclidean norm in $\\mathbb{R}^m$. We start by claiming that there exist constants $C_1, C_2>0$ such that\n\n$$\n\nC_1\\|x\\|_E \\leq\\|x\\| \\leq C_2\\|x\\|_E, \\forall x \\in \\mathbb{R}^m .\n\n$$\n\nAssuming (1) to be true, let us finish the problem. First let us show that $B$ is bounded w.r.t. $d_E$, which is how we call the Euclidean distance in $\\mathbb{R}^m$. Indeed, given $x \\in B,\\|x\\|_E \\leq \\frac{1}{C_1}\\|x\\| \\leq \\frac{1}{C_1}$. Hence $B \\subset\\left\\{x \\in \\mathbb{R}^m: d_E(x, 0)<\\frac{1}{C_1}+1\\right\\}$, which means $B$ is bounded w.r.t $d_E$.\n\nNow let us show that $B$ is closed w.r.t. $d_E$. Let $x_n \\rightarrow x$ w.r.t. $d_E$, where $x_n \\in B$. Notice that this implies that $x_n \\rightarrow x$ w.r.t. $d(x, y)=\\|x-y\\|$, the distance coming from $\\|\\cdot\\|$, since by (1) we have\n\n$$\n\nd\\left(x_n, x\\right)=\\left\\|x_n-x\\right\\| \\leq C_2\\left\\|x_n-x\\right\\|_E \\rightarrow 0 .\n\n$$\n\nAlso, notice that\n\n$$\n\n\\|x\\| \\leq\\left\\|x_n-x\\right\\|+\\left\\|x_n\\right\\| \\leq\\left\\|x_n-x\\right\\|+1,\n\n$$\n\nhence passing to the limit we obtain that $\\|x\\| \\leq 1$, therefore $x \\in B$ and so $B$ is closed w.r.t. $d_E$. Since $B$ is closed and bounded w.r.t. $d_E$, it must be compact. Now we claim that the identity function, $i d:\\left(\\mathbb{R}^m, d_E\\right) \\rightarrow\\left(\\mathbb{R}^m, d\\right)$ where $\\left(\\mathbb{R}^m, d_E\\right)$ means we are using the distance $d_E$ in $\\mathbb{R}^m$ and $\\left(\\mathbb{R}^m, d\\right)$ means we are using the distance $d$ in $\\mathbb{R}^m$, is a homeomorphism. This follows by (1), since $i d$ is always a bijection, and it is continuous and its inverse is continuous by (1) (if $x_n \\rightarrow x$ w.r.t. $d_E$, then $x_n \\rightarrow x$ w.r.t. $d$ and vice-versa, by (1)). By a result we saw in class, since $B$ is compact in $\\left(\\mathbb{R}^m, d_E\\right)$ and $i d$ is a homeomorphism, then $i d(B)=B$ is compact w.r.t. $d$.\n\n\n\nWe are left with proving (1). Notice that it suffices to prove that $C_1 \\leq\\|x\\| \\leq$ $C_2, \\forall x \\in \\mathbb{R}^m$ with $\\|x\\|_E=1$. Indeed, if this is true, given $x \\in \\mathbb{R}^m$, either $\\|x\\|_E=0$ (which implies $x=0$ and (1) holds in this case), or $x /\\|x\\|_E=y$ is such that $\\|y\\|_E=1$, so $C_1 \\leq\\|y\\| \\leq C_2$, which implies $C_1\\|x\\|_E \\leq\\|x\\| \\leq C_2\\|x\\|_E$.\n\nWe want to show now that $\\|\\cdot\\|$ is continuous w.r.t. $d_E$, that is, given $\\varepsilon>0$ and $x \\in \\mathbb{R}^m$, there exists $\\delta>0$ such that if $d_E(x, y)<\\delta$, then $\\|\\mid x\\|-\\|y\\| \\|<\\varepsilon$.\n\n\n\nBy the triangle inequality, $\\|x\\|-\\|y\\| \\leq\\|x-y\\|$, and $\\|y\\|-\\|x\\| \\leq\\|x-y\\|$, therefore\n\n$$\n\n|\\|x||-\\| y|\\|\\leq\\| x-y \\| .\n\n$$\n\nWriting now $x=\\sum_{i=1}^m a_i e_i, y=\\sum_{i=1}^m b_i e_i$, where $e_i=(0, \\ldots, 1,0, \\ldots, 0)$ (with 1 in the i-th component), we obtain by the triangle inequality,\n\n$$\n\n\\begin{aligned}\n\n\\|x-y\\| & =\\left\\|\\sum_{i=1}^m\\left(a_i-b_i\\right) e_i\\right\\| \\leq \\sum_{i=1}^m\\left|a_i-b_i\\left\\|\\left|\\left\\|e_i\\right\\| \\leq \\max _{i=1, \\ldots, m}\\left\\|e_i\\right\\| \\sum_{i=1}^m\\right| a_i-b_i \\mid\\right.\\right. \\\\\n\n& =\\max _{i=1, \\ldots, m}\\left\\|e_i\\right\\| d_{s u m}(x, y) \\leq \\max _{i=1, \\ldots, m}\\left\\|e_i\\right\\| m d_{\\max }(x, y) \\\\\n\n& \\leq \\max _{i=1, \\ldots, m}\\left\\|e_i\\right\\| m d_E(x, y) .\n\n\\end{aligned}\n\n$$\n\nLet $\\delta=\\frac{\\varepsilon}{m \\max _{i=1, \\ldots, m}\\left\\|e_i\\right\\|}$. Then if $d_E(x, y)<\\delta,\\|x\\|-\\|y\\|||<\\varepsilon$.\n\nSince $\\|\\cdot\\|$ is continuous w.r.t. $d_E$ and $K=\\left\\{x \\in \\mathbb{R}^m:\\|x\\|_E=1\\right\\}$ is compact w.r.t. $d_E$, then the function $\\|\\cdot\\|$ achieves a maximum and a minimum value on $K$. Call $C_1=\\min _{x \\in K}\\|x\\|, C_2=\\max _{x \\in K}\\|x\\|$. Then\n\n$$\n\nC_1 \\leq\\|x\\| \\leq C_2, \\forall x \\in \\mathbb{R}^m \\text { such that }\\|x\\|_E=1,\n\n$$\n\nwhich is what we needed.\n\n\\end{proof}"} {"id": "Pugh|exercise_2_57", "formal_statement": "theorem exercise_2_57 {X : Type*} [topological_space X]\n : \u2203 (S : set X), is_connected S \u2227 \u00ac is_connected (interior S) :=", "src_header": "import .common\n\nopen set real filter function ring_hom topological_space\n\nopen_locale big_operators\nopen_locale filter\nopen_locale topology \nnoncomputable theory \n\n", "nl_statement": "Show that if $S$ is connected, it is not true in general that its interior is connected.", "nl_proof": "\\begin{proof}\n\n Consider $X=\\mathbb{R}^2$ and\n\n$$\n\nA=([-2,0] \\times[-2,0]) \\cup([0,2] \\times[0,2])\n\n$$\n\nwhich is connected, while $\\operatorname{int}(A)$ is not connected.\n\nTo see this consider the continuous function $f: \\mathbb{R}^2 \\rightarrow \\mathbb{R}$ is defined by $f(x, y)=x+y$. Let $U=f^{-1}(0,+\\infty)$ which is open in $\\mathbb{R}^2$ and so $U \\cap \\operatorname{int}(A)$ is open in $\\operatorname{int}(A)$. Also, since $(0,0) \\notin \\operatorname{int}(A)$, so for all $(x, y) \\in \\operatorname{int}(A), f(x, y) \\neq 0$ and $U \\cap \\operatorname{int}(A)=f^{-1}[0,+\\infty) \\cap \\operatorname{int}(A)$ is closed in $\\operatorname{int}(A)$. Furthermore, $(1,1)=f^{-1}(2) \\in U \\cap \\operatorname{int}(A)$ shows that $U \\cap \\operatorname{int}(A) \\neq \\emptyset$ while $(-1,-1) \\in \\operatorname{int}(A)$ and $(-1,-1) \\notin U$ shows that $U \\cap \\operatorname{int}(A) \\neq \\operatorname{int}(A)$.\n\n\\end{proof}"} {"id": "Pugh|exercise_2_126", "formal_statement": "theorem exercise_2_126 {E : set \u211d}\n (hE : \u00ac set.countable E) : \u2203 (p : \u211d), cluster_pt p (\ud835\udcdf E) :=", "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": "Suppose that $E$ is an uncountable subset of $\\mathbb{R}$. Prove that there exists a point $p \\in \\mathbb{R}$ at which $E$ condenses.", "nl_proof": "\\begin{proof}\n\n I think this is the proof by contrapositive that you were getting at.\n\nSuppose that $E$ has no limit points at all. Pick an arbitrary point $x \\in E$. Then $x$ cannot be a limit point, so there must be some $\\delta>0$ such that the ball of radius $\\delta$ around $x$ contains no other points of $E$ :\n\n$$\n\nB_\\delta(x) \\cap E=\\{x\\}\n\n$$\n\nCall this \"point 1 \". For the next point, take the closest element to $x$ and on its left; that is, choose the point\n\n$$\n\n\\max [E \\cap(-\\infty, x)]\n\n$$\n\nif it exists (that is important - if not, skip to the next step). Note that by the argument above, this supremum, should it exist, cannot equal $x$ and is therefore a new point in $E$.\n\n\n\nCall this \"point 2 \". Now take the first point to the right of $x$ for \"point 3 \". Take the first point to the left of point 2 for \"point 4 \". And so on, ad infinitum.\n\n\n\nThis gives a countable list of unique points; we must show that it exhausts the entire set $E$. Suppose not. Suppose there is some element $aa_1 \\in E$ such that $a_2$ is not in the list. Repeating, we generate an infinite monotone-increasing sequence $\\left\\{a_i\\right\\}$ of elements in $E$ and not in the list, which is clearly bounded above by $x$. By the Monotone\n\nConvergence Theorem this sequence has a limit. But that means the sequence $\\left\\{a_i\\right\\} \\subset E$ converges to a limit, and hence $E$ has a limit point, contradicting the assumption. Therefore our list exhausts $E$, and we have enumerated all its elements.\n\n\\end{proof}"} {"id": "Pugh|exercise_3_4", "formal_statement": "theorem exercise_3_4 (n : \u2115) :\n tendsto (\u03bb n, (sqrt (n + 1) - sqrt n)) at_top (\ud835\udcdd 0) :=", "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 $\\sqrt{n+1}-\\sqrt{n} \\rightarrow 0$ as $n \\rightarrow \\infty$.", "nl_proof": "\\begin{proof}\n\n $$\n\n\\sqrt{n+1}-\\sqrt{n}=\\frac{(\\sqrt{n+1}-\\sqrt{n})(\\sqrt{n+1}+\\sqrt{n})}{\\sqrt{n+1}+\\sqrt{n}}=\\frac{1}{\\sqrt{n+1}+\\sqrt{n}}<\\frac{1}{2 \\sqrt{n}}\n\n$$\n\n\\end{proof}"} {"id": "Pugh|exercise_3_63b", "formal_statement": "theorem exercise_3_63b (p : \u211d) (f : \u2115 \u2192 \u211d) (hp : p \u2264 1)\n (h : f = \u03bb k, (1 : \u211d) / (k * (log k) ^ p)) :\n \u00ac \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$ diverges when $p \\leq 1$.", "nl_proof": "\\begin{proof} \n\n Using the integral test, for a set $a$, we see\n\n$$\n\n\\lim _{b \\rightarrow \\infty} \\int_a^b \\frac{1}{x \\log (x)^c} d x=\\lim _{b \\rightarrow \\infty}\\left(\\frac{\\log (b)^{1-c}}{1-c}-\\frac{\\log (a)^{1-c}}{1-c}\\right)\n\n$$\n\nwhich goes to infinity if $c \\leq 1$ and converges if $c>1$. Thus,\n\n$$\n\n\\sum_{n=2}^{\\infty} \\frac{1}{n \\log (n)^c}\n\n$$\n\nconverges if and only if $c>1$. \n\n\\end{proof}"} {"id": "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.", "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.", "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 .$", "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.", "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$.", "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.", "nl_proof": "\\begin{proof}\n\n We may as well assume $p 0) (f : \u2115 \u2192 \u2102 \u2192 \u2102) \n (hf : \u2200 n : \u2115, f n = \u03bb z, (\u2211 (i : fin n), (n-i)* z^(i : \u2115))) : \n \u00ac (\u2203 z : \u2102, \u2016z\u2016 \u2264 1 \u2227 f n z = 0) :=", "src_header": "import .common \n\nopen real topological_space filter polynomial\nopen_locale topology big_operators complex_conjugate filter ennreal \n\n", "nl_statement": "Let $n$ be a positive integer, and let $f_{n}(z)=n+(n-1) z+$ $(n-2) z^{2}+\\cdots+z^{n-1}$. Prove that $f_{n}$ has no roots in the closed unit disk $\\{z \\in \\mathbb{C}:|z| \\leq 1\\}$.", "nl_proof": "\\begin{proof}\n\n Note first that $f_n(1) > 0$, so $1$ is not a root of $f_n$.\n\nNext, note that\n\n\\[\n\n(z-1)f_n(z) = z^n + \\cdots + z - n;\n\n\\]\n\nhowever, for $\\left| z \\right| \\leq 1$, we have \n\n$\\left| z^n + \\cdots + z \\right| \\leq n$ by the triangle inequality;\n\nequality can only occur if $z,\\dots,z^n$ have norm 1 and the same argument, which only happens for $z=1$.\n\nThus there can be no root of $f_n$ with $|z| \\leq 1$.\n\n\\end{proof}"} {"id": "Putnam|exercise_2017_b3", "formal_statement": "theorem exercise_2017_b3 (f : \u211d \u2192 \u211d) (c : \u2115 \u2192 \u211d)\n (hf : f = \u03bb x, (\u2211' (i : \u2115), (c i) * x^i)) \n (hc : \u2200 n, c n = 0 \u2228 c n = 1)\n (hf1 : f (2/3) = 3/2) : \n irrational (f (1/2)) :=", "src_header": "import .common \n\nopen real topological_space filter polynomial\nopen_locale topology big_operators complex_conjugate filter ennreal \n\n", "nl_statement": "Suppose that $f(x)=\\sum_{i=0}^{\\infty} c_{i} x^{i}$ is a power series for which each coefficient $c_{i}$ is 0 or 1 . Show that if $f(2 / 3)=3 / 2$, then $f(1 / 2)$ must be irrational.", "nl_proof": "\\begin{proof}\n\n Suppose by way of contradiction that $f(1/2)$ is rational. Then $\\sum_{i=0}^{\\infty} c_i 2^{-i}$ is the binary expansion of a rational number, and hence must be eventually periodic; that is, there exist some integers $m,n$ such that\n\n$c_i = c_{m+i}$ for all $i \\geq n$. We may then write\n\n\\[\n\nf(x) = \\sum_{i=0}^{n-1} c_i x^i + \\frac{x^n}{1-x^m} \\sum_{i=0}^{m-1} c_{n+i} x^i.\n\n\\]\n\nEvaluating at $x = 2/3$, we may equate $f(2/3) = 3/2$ with \n\n\\[\n\n\\frac{1}{3^{n-1}} \\sum_{i=0}^{n-1} c_i 2^i 3^{n-i-1} + \\frac{2^n 3^m}{3^{n+m-1}(3^m-2^m)} \\sum_{i=0}^{m-1} c_{n+i} 2^i 3^{m-1-i};\n\n\\]\n\nsince all terms on the right-hand side have odd denominator, the same must be true of the sum, a contradiction.\n\n\\end{proof}"} {"id": "Putnam|exercise_2010_a4", "formal_statement": "theorem exercise_2010_a4 (n : \u2115) : \n \u00ac nat.prime (10^10^10^n + 10^10^n + 10^n - 1) :=", "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 each positive integer $n$, the number $10^{10^{10^n}}+10^{10^n}+10^n-1$ is not prime.", "nl_proof": "\\begin{proof}\n\n Put\n\n\\[\n\nN = 10^{10^{10^n}} + 10^{10^n} + 10^n - 1.\n\n\\]\n\nWrite $n = 2^m k$ with $m$ a nonnegative integer and $k$ a positive odd integer.\n\nFor any nonnegative integer $j$,\n\n\\[\n\n10^{2^m j} \\equiv (-1)^j \\pmod{10^{2^m} + 1}.\n\n\\]\n\nSince $10^n \\geq n \\geq 2^m \\geq m+1$, $10^n$ is divisible by $2^n$ and hence by $2^{m+1}$,\n\nand similarly $10^{10^n}$ is divisible by $2^{10^n}$ and hence by $2^{m+1}$. It follows that\n\n\\[\n\nN \\equiv 1 + 1 + (-1) + (-1) \\equiv 0 \\pmod{10^{2^m} + 1}.\n\n\\]\n\nSince $N \\geq 10^{10^n} > 10^n + 1 \\geq 10^{2^m} + 1$, it follows that $N$ is composite.\n\n\\end{proof}"} {"id": "Putnam|exercise_2000_a2", "formal_statement": "theorem exercise_2000_a2 : \n \u2200 N : \u2115, \u2203 n : \u2115, n > N \u2227 \u2203 i : fin 6 \u2192 \u2115, n = (i 0)^2 + (i 1)^2 \u2227 \n n + 1 = (i 2)^2 + (i 3)^2 \u2227 n + 2 = (i 4)^2 + (i 5)^2 :=", "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 exist infinitely many integers $n$ such that $n, n+1, n+2$ are each the sum of the squares of two integers.", "nl_proof": "\\begin{proof}\n\n It is well-known that the equation $x^2-2y^2=1$ has infinitely\n\nmany solutions (the so-called ``Pell'' equation). Thus setting\n\n$n=2y^2$ (so that $n=y^2+y^2$, $n+1=x^2+0^2$, $n+2=x^2+1^2$)\n\nyields infinitely many $n$ with the desired property.\n\n\\end{proof}"} {"id": "Putnam|exercise_1998_a3", "formal_statement": "theorem exercise_1998_a3 (f : \u211d \u2192 \u211d) (hf : cont_diff \u211d 3 f) : \n \u2203 a : \u211d, (f a) * (deriv f a) * (iterated_deriv 2 f a) * (iterated_deriv 3 f a) \u2265 0 :=", "src_header": "import .common \n\nopen real topological_space filter polynomial\nopen_locale topology big_operators complex_conjugate filter ennreal \n\n", "nl_statement": "Let $f$ be a real function on the real line with continuous third derivative. Prove that there exists a point $a$ such that", "nl_proof": ""} {"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.", "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$.", "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)$.", "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$.", "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|$.", "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$.", "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$", "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|$.", "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.", "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.", "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.", "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\\}$.", "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$.", "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$.", "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.", "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$).", "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)$.", "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$.", "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$.", "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.", "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.", "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.", "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} .$", "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": "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$.", "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]$.", "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)$.", "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 .", "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.", "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)$.", "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$.", "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$.", "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 .", "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)$.", "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.", "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": "Axler|exercise_1_3", "formal_statement": "theorem exercise_1_3 {F V : Type*} [add_comm_group V] [field F]\n [module F V] {v : V} : -(-v) = 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": "Prove that $-(-v) = v$ for every $v \\in V$.", "nl_proof": "\\begin{proof}\n\n By definition, we have\n\n$$\n\n(-v)+(-(-v))=0 \\quad \\text { and } \\quad v+(-v)=0 .\n\n$$\n\nThis implies both $v$ and $-(-v)$ are additive inverses of $-v$, by the uniqueness of additive inverse, it follows that $-(-v)=v$.\n\n\\end{proof}"} {"id": "Axler|exercise_1_6", "formal_statement": "theorem exercise_1_6 : \u2203 U : set (\u211d \u00d7 \u211d),\n (U \u2260 \u2205) \u2227\n (\u2200 (u v : \u211d \u00d7 \u211d), u \u2208 U \u2227 v \u2208 U \u2192 u + v \u2208 U) \u2227\n (\u2200 (u : \u211d \u00d7 \u211d), u \u2208 U \u2192 -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 addition and under taking additive inverses (meaning $-u \\in U$ whenever $u \\in U$), but $U$ is not a subspace of $\\mathbf{R}^2$.", "nl_proof": "\\begin{proof}\n\n \\[U=\\mathbb{Z}^2=\\left\\{(x, y) \\in \\mathbf{R}^2: x, y \\text { are integers }\\right\\}\\]\n\n$U=\\mathbb{Z}^2$ satisfies the desired properties. To come up with this, note by assumption, $U$ must be closed under addition and subtraction, so in particular, it must contain 0 . We need to find a set which fails scalar multiplication. A discrete set like $\\mathbb{Z}^2$ does this.\n\n\\end{proof}"} {"id": "Axler|exercise_1_8", "formal_statement": "theorem exercise_1_8 {F V : Type*} [add_comm_group V] [field F]\n [module F V] {\u03b9 : Type*} (u : \u03b9 \u2192 submodule F V) :\n \u2203 U : submodule F V, (\u22c2 (i : \u03b9), (u i).carrier) = \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": "Prove that the intersection of any collection of subspaces of $V$ is a subspace of $V$.", "nl_proof": "\\begin{proof}\n\nLet $V_1, V_2, \\ldots, V_n$ be subspaces of the vector space $V$ over the field $F$. We must show that their intersection $V_1 \\cap V_2 \\cap \\ldots \\cap V_n$ is also a subspace of $V$.\n\n\n\nTo begin, we observe that the additive identity $0$ of $V$ is in $V_1 \\cap V_2 \\cap \\ldots \\cap V_n$. This is because $0$ is in each subspace $V_i$, as they are subspaces and hence contain the additive identity.\n\n\n\nNext, we show that the intersection of subspaces is closed under addition. Let $u$ and $v$ be vectors in $V_1 \\cap V_2 \\cap \\ldots \\cap V_n$. By definition, $u$ and $v$ belong to each of the subspaces $V_i$. Since each $V_i$ is a subspace and therefore closed under addition, it follows that $u+v$ belongs to each $V_i$. Thus, $u+v$ belongs to the intersection $V_1 \\cap V_2 \\cap \\ldots \\cap V_n$.\n\n\n\nFinally, we show that the intersection of subspaces is closed under scalar multiplication. Let $a$ be a scalar in $F$ and let $v$ be a vector in $V_1 \\cap V_2 \\cap \\ldots \\cap V_n$. Since $v$ belongs to each $V_i$, we have $av$ belongs to each $V_i$ as well, as $V_i$ are subspaces and hence closed under scalar multiplication. Therefore, $av$ belongs to the intersection $V_1 \\cap V_2 \\cap \\ldots \\cap V_n$.\n\n\n\nThus, we have shown that $V_1 \\cap V_2 \\cap \\ldots \\cap V_n$ is a subspace of $V$.\n\n\\end{proof}"} {"id": "Axler|exercise_3_1", "formal_statement": "theorem exercise_3_1 {F V : Type*} \n [add_comm_group V] [field F] [module F V] [finite_dimensional F V]\n (T : V \u2192\u2097[F] V) (hT : finrank F V = 1) :\n \u2203 c : F, \u2200 v : V, T v = c \u2022 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": "Show that every linear map from a one-dimensional vector space to itself is multiplication by some scalar. More precisely, prove that if $\\operatorname{dim} V=1$ and $T \\in \\mathcal{L}(V, V)$, then there exists $a \\in \\mathbf{F}$ such that $T v=a v$ for all $v \\in V$.", "nl_proof": "\\begin{proof}\n\n If $\\operatorname{dim} V=1$, then in fact, $V=\\mathbf{F}$ and it is spanned by $1 \\in \\mathbf{F}$.\n\nLet $T$ be a linear map from $V$ to itself. Let $T(1)=\\lambda \\in V(=\\mathbf{F})$.\n\nStep 2\n\n2 of 3\n\nEvery $v \\in V$ is a scalar. Therefore,\n\n$$\n\n\\begin{aligned}\n\nT(v) & =T(v \\cdot 1) \\\\\n\n& =v T(1) \\ldots .(\\text { By the linearity of } T) \\\\\n\n& =v \\lambda\n\n\\end{aligned}\n\n$$\n\nHence, $T v=\\lambda v$ for every $v \\in V$.\n\n\\end{proof}"} {"id": "Axler|exercise_4_4", "formal_statement": "theorem exercise_4_4 (p : polynomial \u2102) :\n p.degree = @card (root_set p \u2102) (polynomial.root_set_fintype p \u2102) \u2194\n disjoint\n (@card (root_set p.derivative \u2102) (polynomial.root_set_fintype p.derivative \u2102))\n (@card (root_set p \u2102) (polynomial.root_set_fintype p \u2102)) :=", "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 $p \\in \\mathcal{P}(\\mathbf{C})$ has degree $m$. Prove that $p$ has $m$ distinct roots if and only if $p$ and its derivative $p^{\\prime}$ have no roots in common.", "nl_proof": "\\begin{proof}\n\n First, let $p$ have $m$ distinct roots. Since $p$ has the degree of $m$, then this could imply that $p$ can be actually written in the form of $p(z)=c\\left(z-\\lambda_1\\right) \\ldots\\left(z-\\lambda_m\\right)$, which you have $\\lambda_1, \\ldots, \\lambda_m$ being distinct.\n\nTo prove that both $p$ and $p^{\\prime}$ have no roots in commons, we must now show that $p^{\\prime}\\left(\\lambda_j\\right) \\neq 0$ for every $j$. So, to do so, just fix $j$. The previous expression for $p$ shows that we can now write $p$ in the form of $p(z)=\\left(z-\\lambda_j\\right) q(z)$, which $q$ is a polynomial such that $q\\left(\\lambda_j\\right) \\neq 0$.\n\n\n\nWhen you differentiate both sides of the previous equation, then you would then have $p^{\\prime}(z)=(z-$ $\\left.\\lambda_j\\right) q^{\\prime}(z)+q(z)$\n\n\n\nTherefore: $\\left.=p^{\\prime}\\left(\\lambda_j\\right)=q \\lambda_j\\right)$\n\nEquals: $p^{\\prime}\\left(\\lambda_j\\right) \\neq 0$\n\n\n\nNow, to prove the other direction, we would now prove the contrapositive, which means that we will be proving that if $p$ has actually less than $m$ distinct roots, then both $p$ and $p^{\\prime}$ have at least one root in common.\n\n\n\nNow, for some root of $\\lambda$ of $p$, we can write $p$ is in the form of $\\left.p(z)=(z-\\lambda)^n q(z)\\right)$, which is where both $n \\geq 2$ and $q$ is a polynomial. When differentiating both sides of the previous equations, we would then have $p^{\\prime}(z)=(z-\\lambda)^n q^{\\prime}(z)+n(z-\\lambda)^{n-1} q(z)$.\n\nTherefore, $p^{\\prime}(\\lambda)=0$, which would make $\\lambda$ is a common root of both $p$ and $p^{\\prime}$.\n\n\\end{proof}"} {"id": "Axler|exercise_5_4", "formal_statement": "theorem exercise_5_4 {F V : Type*} [add_comm_group V] [field F]\n [module F V] (S T : V \u2192\u2097[F] V) (hST : S \u2218 T = T \u2218 S) (c : F):\n map S (T - c \u2022 id).ker = (T - c \u2022 id).ker :=", "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 $S, T \\in \\mathcal{L}(V)$ are such that $S T=T S$. Prove that $\\operatorname{null} (T-\\lambda I)$ is invariant under $S$ for every $\\lambda \\in \\mathbf{F}$.", "nl_proof": "\\begin{proof}\n\n First off, fix $\\lambda \\in F$. Secondly, let $v \\in \\operatorname{null}(T-\\lambda I)$. If so, then $(T-\\lambda I)(S v)=T S v-\\lambda S v=$ $S T v-\\lambda S v=S(T v-\\lambda v)=0$. Therefore, $S v \\in \\operatorname{null}(T-\\lambda I)$ since $n u l l(T-\\lambda I)$ is actually invariant under $S$.\n\n\\end{proof}"} {"id": "Axler|exercise_5_12", "formal_statement": "theorem exercise_5_12 {F V : Type*} [add_comm_group V] [field F]\n [module F V] {S : End F V}\n (hS : \u2200 v : V, \u2203 c : F, v \u2208 eigenspace S c) :\n \u2203 c : F, S = 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 vector in $V$ is an eigenvector of $T$. Prove that $T$ is a scalar multiple of the identity operator.", "nl_proof": "\\begin{proof}\n\n For every single $v \\in V$, there does exist $a_v \\in F$ such that $T v=a_v v$. Since $T 0=0$, then we have to make $a_0$ be the any number in F. However, for every single $v \\in V\\{0\\}$, then the value of $a_V$ is uniquely determined by the previous equation of $T v=a_v v$.\n\n\n\nNow, to show that $T$ is a scalar multiple of the identity, then me must show that $a_v$ is independent of $v$ for $v \\in V\\{0\\}$. We would now want to show that $a_v=a_w$.\n\n\n\nFirst, just make the case of where $(v, w)$ is linearly dependent. Then, there does exist $b \\in F$ such that $w=b v$. Now, you would have the following: $a_W w=T w=T(b v)=b T v=b\\left(a_v v\\right)=a_v w$. This is showing that $a_v=a_w$.\n\nFinally, make the consideration to make $(v, w)$ be linearly independent. Now, we would have the following: $\\left.a_{(} v+w\\right)(v+w)=T(v+w)=T v+T w=a_v v+a_w w$.\n\n\n\nThat previous equation implies the following: $\\left.\\left.\\left(a_{(} v+w\\right)-a_v\\right) v+\\left(a_{(} v+w\\right)-a_w\\right) w=0$. Since $(v, w)$ is linearly independent, this would imply that both $\\left.a_{(} v+w\\right)=a_v$ and $\\left.a_{(} v+w\\right)=a_w$. Therefore, $a_v=a_w$.\n\n\\end{proof}"} {"id": "Axler|exercise_5_20", "formal_statement": "theorem exercise_5_20 {F V : Type*} [add_comm_group V] [field F]\n [module F V] [finite_dimensional F V] {S T : End F V}\n (h1 : @card T.eigenvalues (eigenvalues.fintype T) = finrank F V)\n (h2 : \u2200 v : V, \u2203 c : F, v \u2208 eigenspace S c \u2194 \u2203 c : F, v \u2208 eigenspace T c) :\n S * T = T * S :=", "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 $T \\in \\mathcal{L}(V)$ has $\\operatorname{dim} V$ distinct eigenvalues and that $S \\in \\mathcal{L}(V)$ has the same eigenvectors as $T$ (not necessarily with the same eigenvalues). Prove that $S T=T S$.", "nl_proof": "\\begin{proof}\n\n First off, let $n=\\operatorname{dim} V$. so, there is a basis of $\\left(v_1, \\ldots, v_j\\right)$ of $V$ that consist of eigenvectors of $T$. Now, let $\\lambda_1, \\ldots, \\lambda_n$ be the corresponding eigenvalues, then we would have $T v_j=\\lambda_1 v_j$ for every single $j$.\n\n\n\nNow, for every $v_j$ is also an eigenvector of S, so $S v_j=a_j v_j$ for some $a_j \\in F$. For each $j$, we would then have $(S T) v_j=S\\left(T v_j\\right)=\\lambda_j S v_j=a_j \\lambda_j v_j$ and $(T S) v_j=T\\left(S v_j\\right)=a_j T v_j=a_j \\lambda_j v_j$. Since both operators, which are $S T$ and $T S$, agree on a basis, then both are equal.\n\n\\end{proof}"} {"id": "Axler|exercise_6_2", "formal_statement": "theorem exercise_6_2 {V : Type*} [add_comm_group V] [module \u2102 V]\n [inner_product_space \u2102 V] (u v : V) :\n \u27eau, v\u27eb_\u2102 = 0 \u2194 \u2200 (a : \u2102), \u2225u\u2225 \u2264 \u2225u + a \u2022 v\u2225 :=", "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 $u, v \\in V$. Prove that $\\langle u, v\\rangle=0$ if and only if $\\|u\\| \\leq\\|u+a v\\|$ for all $a \\in \\mathbf{F}$.", "nl_proof": "\\begin{proof}\n\n First off, let us suppose that $(u, v)=0$.\n\nNow, let $a \\in \\mathbb{F}$. Next, $u, a v$ are orthogonal.\n\nThe Pythagorean theorem thus implies that\n\n$$\n\n\\begin{aligned}\n\n\\|u+a v\\|^2 & =\\|u\\|^2+\\|a v\\|^2 \\\\\n\n& \\geq\\|u\\|^2\n\n\\end{aligned}\n\n$$\n\nSo, by taking the square roots, this will now give us $\\|u\\| \\leq\\|u+a v\\|$.\n\nNow, to prove the implication in the other direction, we must now let $\\|u\\| \\leq$ $\\|u+a v\\|$ for all $a \\in \\mathbb{F}$. Squaring this inequality, we get both:\n\n$$\n\n\\begin{gathered}\n\n\\|u\\|^2 a n d \\leq\\|u+a v\\|^2 \\\\\n\n=(u+a v, u+a v) \\\\\n\n=(u, u)+(u, a v)+(a v, u)+(a v, a v) \\\\\n\n=\\|u\\|^2+\\bar{a}(u, v)+a \\overline{(u, v)}+|a|^2\\|v\\|^2 \\\\\n\n\\|u\\|^2+2 \\Re \\bar{a}(u, v)+|a|^2\\|v\\|^2\n\n\\end{gathered}\n\n$$\n\nfor all $a \\in \\mathbb{F}$.\n\nTherefore,\n\n$$\n\n-2 \\Re \\bar{a}(u, v) \\leq|a|^2\\|v\\|^2\n\n$$\n\nfor all $a \\in \\mathbb{F}$. In particular, we can let $a$ equal $-t(u, v)$ for $t>0$. Substituting this value for $a$ into the inequality above gives\n\n$$\n\n2 t|(u, v)|^2 \\leq t^2|(u, v)|^2\\|v\\|^2\n\n$$\n\nfor all $t>0$.\n\nStep 4\n\n4 of 4\n\nDivide both sides of the inequality above by $t$, getting\n\n$$\n\n2|(u, v)|^2 \\leq t \\mid(u, v)^2\\|v\\|^2\n\n$$\n\nfor all $t>0$. If $v=0$, then $(u, v)=0$, as desired. If $v \\neq 0$, set $t$ equal to $1 /\\|v\\|^2$ in the inequality above, getting\n\n$$\n\n2|(u, v)|^2 \\leq|(u, v)|^2,\n\n$$\n\nwhich implies that $(u, v)=0$.\n\n\\end{proof}"} {"id": "Axler|exercise_6_7", "formal_statement": "theorem exercise_6_7 {V : Type*} [inner_product_space \u2102 V] (u v : V) :\n \u27eau, v\u27eb_\u2102 = (\u2225u + v\u2225^2 - \u2225u - v\u2225^2 + I*\u2225u + I\u2022v\u2225^2 - I*\u2225u-I\u2022v\u2225^2) / 4 :=", "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 $V$ is a complex inner-product space, then $\\langle u, v\\rangle=\\frac{\\|u+v\\|^{2}-\\|u-v\\|^{2}+\\|u+i v\\|^{2} i-\\|u-i v\\|^{2} i}{4}$ for all $u, v \\in V$.", "nl_proof": "\\begin{proof}\n\nLet $V$ be an inner-product space and $u, v\\in V$. Then \n\n$$\n\n\\begin{aligned}\n\n\\|u+v\\|^2 & =\\langle u+v, v+v\\rangle \\\\\n\n& =\\|u\\|^2+\\langle u, v\\rangle+\\langle v, u\\rangle+\\|v\\|^2 \\\\\n\n-\\|u-v\\|^2 & =-\\langle u-v, u-v\\rangle \\\\\n\n& =-\\|u\\|^2+\\langle u, v\\rangle+\\langle v, u\\rangle-\\|v\\|^2 \\\\\n\ni\\|u+i v\\|^2 & =i\\langle u+i v, u+i v\\rangle \\\\\n\n& =i\\|u\\|^2+\\langle u, v\\rangle-\\langle v, u\\rangle+i\\|v\\|^2 \\\\\n\n-i\\|u-i v\\|^2 & =-i\\langle u-i v, u-i v\\rangle \\\\\n\n& =-i\\|u\\|^2+\\langle u, v\\rangle-\\langle v, u\\rangle-i\\|v\\|^2 .\n\n\\end{aligned}\n\n$$\n\nThus $\\left(\\|u+v\\|^2\\right)-\\|u-v\\|^2+\\left(i\\|u+i v\\|^2\\right)-i\\|u-i v\\|^2=4\\langle u, v\\rangle.$\n\n\\end{proof}"} {"id": "Axler|exercise_6_16", "formal_statement": "theorem exercise_6_16 {K V : Type*} [is_R_or_C K] [inner_product_space K V]\n {U : submodule K V} : \n U.orthogonal = \u22a5 \u2194 U = \u22a4 :=", "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 $U$ is a subspace of $V$. Prove that $U^{\\perp}=\\{0\\}$ if and only if $U=V$", "nl_proof": "\\begin{proof}\n\n $V=U \\bigoplus U^{\\perp}$, therefore $U^\\perp = \\{0\\}$ iff $U=V$. \n\n\\end{proof}"} {"id": "Axler|exercise_7_6", "formal_statement": "theorem exercise_7_6 {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 T.range = T.adjoint.range :=", "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 $T \\in \\mathcal{L}(V)$ is normal, then $\\operatorname{range} T=\\operatorname{range} T^{*}.$", "nl_proof": "\\begin{proof}\n\n Let $T \\in \\mathcal{L}(V)$ to be a normal operator.\n\nSuppose $u \\in \\operatorname{null} T$. Then, by $7.20$,\n\n$$\n\n0=\\|T u\\|=\\left\\|T^* u\\right\\|,\n\n$$\n\nwhich implies that $u \\in \\operatorname{null} T^*$.\n\nHence\n\n$$\n\n\\operatorname{null} T=\\operatorname{null} T^*\n\n$$\n\nbecause $\\left(T^*\\right)^*=T$ and the same argument can be repeated.\n\nNow we have\n\n$$\n\n\\begin{aligned}\n\n\\text { range } T & =\\left(\\text { null } T^*\\right)^{\\perp} \\\\\n\n& =(\\text { null } T)^{\\perp} \\\\\n\n& =\\operatorname{range} T^*,\n\n\\end{aligned}\n\n$$\n\nwhere the first and last equality follow from items (d) and (b) of 7.7.\n\nHence, range $T=$ range $T^*$.\n\n\\end{proof}"} {"id": "Axler|exercise_7_10", "formal_statement": "theorem exercise_7_10 {V : Type*} [inner_product_space \u2102 V]\n [finite_dimensional \u2102 V] (T : End \u2102 V)\n (hT : T * T.adjoint = T.adjoint * T) (hT1 : T^9 = T^8) :\n is_self_adjoint T \u2227 T^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 and $T \\in \\mathcal{L}(V)$ is a normal operator such that $T^{9}=T^{8}$. Prove that $T$ is self-adjoint and $T^{2}=T$.", "nl_proof": "\\begin{proof}\n\n Based on the complex spectral theorem, there is an orthonormal basis of $\\left(e_1, \\ldots, e_n\\right)$ of $V$ consisting of eigenvectors of $T$. Now, let $\\lambda_1, \\ldots, \\lambda_n$ be the corresponding eigenvalues. Therefore,\n\n$$\n\nT e_1=\\lambda_j e_j\n\n$$\n\nfor $j=1 \\ldots n$.\n\n\n\nNext, by applying $T$ repeatedly to both sides of the equation above, we get $T^9 e_j=\\left(\\lambda_j\\right)^9 e_j$ and rei =8ej. Thus $T^8 e_j=\\left(\\lambda_j\\right)^8 e_j$, which implies that $\\lambda_j$ equals 0 or 1 . In particular, all the eigenvalues of $T$ are real. This would then imply that $T$ is self-adjoint.\n\n\n\nNow, by applying $T$ to both sides of the equation above, we get\n\n$$\n\n\\begin{aligned}\n\nT^2 e_j & =\\left(\\lambda_j\\right)^2 e_j \\\\\n\n& =\\lambda_j e_j \\\\\n\n& =T e_j\n\n\\end{aligned}\n\n$$\n\nwhich is where the second equality holds because $\\lambda_j$ equals 0 or 1 . Because $T^2$ and $T$ agree on a basis, they must be equal.\n\n\\end{proof}"} {"id": "Axler|exercise_7_14", "formal_statement": "theorem exercise_7_14 {\ud835\udd5c V : Type*} [is_R_or_C \ud835\udd5c]\n [inner_product_space \ud835\udd5c V] [finite_dimensional \ud835\udd5c V]\n {T : End \ud835\udd5c V} (hT : is_self_adjoint T)\n {l : \ud835\udd5c} {\u03b5 : \u211d} (he : \u03b5 > 0) : \u2203 v : V, \u2016v\u2016= 1 \u2227 (\u2016T v - l \u2022 v\u2016 < \u03b5 \u2192\n (\u2203 l' : T.eigenvalues, \u2016l - l'\u2016 < \u03b5)) :=", "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 self-adjoint, $\\lambda \\in \\mathbf{F}$, and $\\epsilon>0$. Prove that if there exists $v \\in V$ such that $\\|v\\|=1$ and $\\|T v-\\lambda v\\|<\\epsilon,$ then $T$ has an eigenvalue $\\lambda^{\\prime}$ such that $\\left|\\lambda-\\lambda^{\\prime}\\right|<\\epsilon$.", "nl_proof": "\\begin{proof}\n\n Let $T \\in \\mathcal{L}(V)$ be a self-adjoint, and let $\\lambda \\in \\mathbf{F}$ and $\\epsilon>0$.\n\nBy the Spectral Theorem, there is $e_1, \\ldots, e_n$ an orthonormal basis of $V$ consisting of eigenvectors of $T$ and let $\\lambda_1, \\ldots, \\lambda_n$ denote their corresponding eigenvalues.\n\nChoose an eigenvalue $\\lambda^{\\prime}$ of $T$ such that $\\left|\\lambda^{\\prime}-\\lambda\\right|^2$ is minimized.\n\nThere are $a_1, \\ldots, a_n \\in \\mathbb{F}$ such that\n\n$$\n\nv=a_1 e_1+\\cdots+a_n e_n .\n\n$$\n\nThus, we have\n\n$$\n\n\\begin{aligned}\n\n\\epsilon^2 & >|| T v-\\left.\\lambda v\\right|^2 \\\\\n\n& =\\left|\\left\\langle T v-\\lambda v, e_1\\right\\rangle\\right|^2+\\cdots+\\left|\\left\\langle T v-\\lambda v, e_n\\right\\rangle\\right|^2 \\\\\n\n& =\\left|\\lambda_1 a_1-\\lambda a_1\\right|^2+\\cdots+\\left|\\lambda_n a_n-\\lambda a_n\\right|^2 \\\\\n\n& =\\left|a_1\\right|^2\\left|\\lambda_1-\\lambda\\right|^2+\\cdots+\\left|a_n\\right|^2\\left|\\lambda_n-\\lambda\\right|^2 \\\\\n\n& \\geq\\left|a_1\\right|^2\\left|\\lambda^{\\prime}-\\lambda\\right|^2+\\cdots+\\left|a_n\\right|^2\\left|\\lambda^{\\prime}-\\lambda\\right|^2 \\\\\n\n& =\\left|\\lambda^{\\prime}-\\lambda\\right|^2\n\n\\end{aligned}\n\n$$\n\nwhere the second and fifth lines follow from $6.30$ (the fifth because $\\|v\\|=1$ ). Now, we taking the square root.\n\nHence, $T$ has an eigenvalue $\\lambda^{\\prime}$ such that $\\left|\\lambda^{\\prime}-\\lambda\\right|<\\epsilon$\n\n\\end{proof}"} {"id": "Dummit-Foote|exercise_1_1_3", "formal_statement": "theorem exercise_1_1_3 (n : \u2124) : \n \u2200 (a b c : \u2124), (a+b)+c \u2261 a+(b+c) [ZMOD n] :=", "src_header": "import .common \n\nopen set function nat int fintype real polynomial mv_polynomial\nopen subgroup ideal submodule zsqrtd gaussian_int char_p mul_aut matrix\n\nopen_locale pointwise\nopen_locale big_operators\nnoncomputable theory\n\n", "nl_statement": "Prove that the addition of residue classes $\\mathbb{Z}/n\\mathbb{Z}$ is associative.", "nl_proof": "\\begin{proof}\n\n We have\n\n$$\n\n\\begin{aligned}\n\n(\\bar{a}+\\bar{b})+\\bar{c} &=\\overline{a+b}+\\bar{c} \\\\\n\n&=\\overline{(a+b)+c} \\\\\n\n&=\\overline{a+(b+c)} \\\\\n\n&=\\bar{a}+\\overline{b+c} \\\\\n\n&=\\bar{a}+(\\bar{b}+\\bar{c})\n\n\\end{aligned}\n\n$$\n\nsince integer addition is associative.\n\n\\end{proof}"} {"id": "Dummit-Foote|exercise_1_1_5", "formal_statement": "theorem exercise_1_1_5 (n : \u2115) (hn : 1 < n) : \n is_empty (group (zmod n)) :=", "src_header": "import .common \n\nopen set function nat int fintype real polynomial mv_polynomial\nopen subgroup ideal submodule zsqrtd gaussian_int char_p mul_aut matrix\n\nopen_locale pointwise\nopen_locale big_operators\nnoncomputable theory\n\n", "nl_statement": "Prove that for all $n>1$ that $\\mathbb{Z}/n\\mathbb{Z}$ is not a group under multiplication of residue classes.", "nl_proof": "\\begin{proof}\n\n Note that since $n>1, \\overline{1} \\neq \\overline{0}$. Now suppose $\\mathbb{Z} /(n)$ contains a multiplicative identity element $\\bar{e}$. Then in particular,\n\n$$\n\n\\bar{e} \\cdot \\overline{1}=\\overline{1}\n\n$$\n\nso that $\\bar{e}=\\overline{1}$. Note, however, that\n\n$$\n\n\\overline{0} \\cdot \\bar{k}=\\overline{0}\n\n$$\n\nfor all k, so that $\\overline{0}$ does not have a multiplicative inverse. Hence $\\mathbb{Z} /(n)$ is not a group under multiplication.\n\n\\end{proof}"} {"id": "Dummit-Foote|exercise_1_1_16", "formal_statement": "theorem exercise_1_1_16 {G : Type*} [group G] \n (x : G) (hx : x ^ 2 = 1) :\n order_of x = 1 \u2228 order_of x = 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 $x$ be an element of $G$. Prove that $x^2=1$ if and only if $|x|$ is either $1$ or $2$.", "nl_proof": "\\begin{proof}\n\n $(\\Rightarrow)$ Suppose $x^2=1$. Then we have $0<|x| \\leq 2$, i.e., $|x|$ is either 1 or 2 .\n\n( $\\Leftarrow$ ) If $|x|=1$, then we have $x=1$ so that $x^2=1$. If $|x|=2$ then $x^2=1$ by definition. So if $|x|$ is 1 or 2 , we have $x^2=1$.\n\n\\end{proof}"} {"id": "Dummit-Foote|exercise_1_1_18", "formal_statement": "theorem exercise_1_1_18 {G : Type*} [group G]\n (x y : G) : x * y = y * x \u2194 y\u207b\u00b9 * x * y = x \u2194 x\u207b\u00b9 * y\u207b\u00b9 * x * y = 1 :=", "src_header": "import .common \n\nopen set function nat int fintype real polynomial mv_polynomial\nopen subgroup ideal submodule zsqrtd gaussian_int char_p mul_aut matrix\n\nopen_locale pointwise\nopen_locale big_operators\nnoncomputable theory\n\n", "nl_statement": "Let $x$ and $y$ be elements of $G$. Prove that $xy=yx$ if and only if $y^{-1}xy=x$ if and only if $x^{-1}y^{-1}xy=1$.", "nl_proof": "\\begin{proof}\n\nIf $x y=y x$, then $y^{-1} x y=y^{-1} y x=1 x=x$. Multiplying by $x^{-1}$ then gives $x^{-1} y^{-1} x y=1$.\n\n\n\nOn the other hand, if $x^{-1} y^{-1} x y=1$, then we may multiply on the left by $x$ to get $y^{-1} x y=x$. Then multiplying on the left by $y$ gives $x y=y x$ as desired.\n\n\\end{proof}"} {"id": "Dummit-Foote|exercise_1_1_22a", "formal_statement": "theorem exercise_1_1_22a {G : Type*} [group G] (x g : G) :\n order_of x = order_of (g\u207b\u00b9 * x * 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": "If $x$ and $g$ are elements of the group $G$, prove that $|x|=\\left|g^{-1} x g\\right|$.", "nl_proof": "\\begin{proof}\n\n First we prove a technical lemma:\n\n\n\n {\\bf Lemma.} For all $a, b \\in G$ and $n \\in \\mathbb{Z},\\left(b^{-1} a b\\right)^n=b^{-1} a^n b$.\n\nThe statement is clear for $n=0$. We prove the case $n>0$ by induction; the base case $n=1$ is clear. Now suppose $\\left(b^{-1} a b\\right)^n=b^{-1} a^n b$ for some $n \\geq 1$; then\n\n$$\n\n\\left(b^{-1} a b\\right)^{n+1}=\\left(b^{-1} a b\\right)\\left(b^{-1} a b\\right)^n=b^{-1} a b b^{-1} a^n b=b^{-1} a^{n+1} b .\n\n$$\n\nBy induction the statement holds for all positive $n$.\n\nNow suppose $n<0$; we have\n\n$$\n\n\\left(b^{-1} a b\\right)^n=\\left(\\left(b^{-1} a b\\right)^{-n}\\right)^{-1}=\\left(b^{-1} a^{-n} b\\right)^{-1}=b^{-1} a^n b .\n\n$$\n\nHence, the statement holds for all integers $n$.\n\nNow to the main result. Suppose first that $|x|$ is infinity and that $\\left|g^{-1} x g\\right|=n$ for some positive integer $n$. Then we have\n\n$$\n\n\\left(g^{-1} x g\\right)^n=g^{-1} x^n g=1,\n\n$$\n\nand multiplying on the left by $g$ and on the right by $g^{-1}$ gives us that $x^n=1$, a contradiction. Thus if $|x|$ is infinity, so is $\\left|g^{-1} x g\\right|$. Similarly, if $\\left|g^{-1} x g\\right|$ is infinite and $|x|=n$, we have\n\n$$\n\n\\left(g^{-1} x g\\right)^n=g^{-1} x^n g=g^{-1} g=1,\n\n$$\n\na contradiction. Hence if $\\left|g^{-1} x g\\right|$ is infinite, so is $|x|$.\n\nSuppose now that $|x|=n$ and $\\left|g^{-1} x g\\right|=m$ for some positive integers $n$ and $m$. We have\n\n$$\n\n\\left(g^{-1} x g\\right)^n=g^{-1} x^n g=g^{-1} g=1,\n\n$$\n\nSo that $m \\leq n$, and\n\n$$\n\n\\left(g^{-1} x g\\right)^m=g^{-1} x^m g=1,\n\n$$\n\nso that $x^m=1$ and $n \\leq m$. Thus $n=m$.\n\n\\end{proof}"} {"id": "Dummit-Foote|exercise_1_1_25", "formal_statement": "theorem exercise_1_1_25 {G : Type*} [group G] \n (h : \u2200 x : G, x ^ 2 = 1) : \u2200 a b : G, a*b = b*a :=", "src_header": "import .common \n\nopen set function nat int fintype real polynomial mv_polynomial\nopen subgroup ideal submodule zsqrtd gaussian_int char_p mul_aut matrix\n\nopen_locale pointwise\nopen_locale big_operators\nnoncomputable theory\n\n", "nl_statement": "Prove that if $x^{2}=1$ for all $x \\in G$ then $G$ is abelian.", "nl_proof": "\\begin{proof}\n\n Solution: Note that since $x^2=1$ for all $x \\in G$, we have $x^{-1}=x$. Now let $a, b \\in G$. We have\n\n$$\n\na b=(a b)^{-1}=b^{-1} a^{-1}=b a .\n\n$$\n\nThus $G$ is abelian.\n\n\\end{proof}"} {"id": "Dummit-Foote|exercise_1_1_34", "formal_statement": "theorem exercise_1_1_34 {G : Type*} [group G] {x : G} \n (hx_inf : order_of x = 0) (n m : \u2124) :\n x ^ n \u2260 x ^ m :=", "src_header": "import .common \n\nopen set function nat int fintype real polynomial mv_polynomial\nopen subgroup ideal submodule zsqrtd gaussian_int char_p mul_aut matrix\n\nopen_locale pointwise\nopen_locale big_operators\nnoncomputable theory\n\n", "nl_statement": "If $x$ is an element of infinite order in $G$, prove that the elements $x^{n}, n \\in \\mathbb{Z}$ are all distinct.", "nl_proof": "\\begin{proof}\n\n Solution: Suppose to the contrary that $x^a=x^b$ for some $0 \\leq a|x|>\\left|x^2\\right|>\\cdots,\n\n$$\n\nand in particular, $1>\\left|x^n\\right|$ for all $n$. So $x$ has infinite order in $\\mathbb{R}^{\\times}$.\n\nSimilarly, if $|x|>1$ (absolute value) then $x$ has infinite order in $\\mathbb{R}^{\\times}$. So $\\mathbb{R}^{\\times}$has 1 element of order 1,1 element of order 2 , and all other elements have infinite order.\n\nIn $\\mathbb{C}^{\\times}$, on the other hand, $i$ has order 4 . Thus $\\mathbb{R}^{\\times}$and $\\mathbb{C}^{\\times}$are not isomorphic.\n\n\\end{proof}"} {"id": "Dummit-Foote|exercise_1_6_17", "formal_statement": "theorem exercise_1_6_17 {G : Type*} [group G] (f : G \u2192 G) \n (hf : f = \u03bb g, g\u207b\u00b9) :\n \u2200 x y : G, f x * f y = f (x*y) \u2194 \u2200 x y : G, x*y = y*x :=", "src_header": "import .common \n\nopen set function nat int fintype real polynomial mv_polynomial\nopen subgroup ideal submodule zsqrtd gaussian_int char_p mul_aut matrix\n\nopen_locale pointwise\nopen_locale big_operators\nnoncomputable theory\n\n", "nl_statement": "Let $G$ be any group. Prove that the map from $G$ to itself defined by $g \\mapsto g^{-1}$ is a homomorphism if and only if $G$ is abelian.", "nl_proof": "\\begin{proof}\n\n $(\\Rightarrow)$ Suppose $G$ is abelian. Then\n\n$$\n\n\\varphi(a b)=(a b)^{-1}=b^{-1} a^{-1}=a^{-1} b^{-1}=\\varphi(a) \\varphi(b),\n\n$$\n\nso that $\\varphi$ is a homomorphism.\n\n$(\\Leftarrow)$ Suppose $\\varphi$ is a homomorphism, and let $a, b \\in G$. Then\n\n$$\n\na b=\\left(b^{-1} a^{-1}\\right)^{-1}=\\varphi\\left(b^{-1} a^{-1}\\right)=\\varphi\\left(b^{-1}\\right) \\varphi\\left(a^{-1}\\right)=\\left(b^{-1}\\right)^{-1}\\left(a^{-1}\\right)^{-1}=b a,\n\n$$\n\nso that $G$ is abelian.\n\n\\end{proof}"} {"id": "Dummit-Foote|exercise_2_1_5", "formal_statement": "theorem exercise_2_1_5 {G : Type*} [group G] [fintype G] \n (hG : card G > 2) (H : subgroup G) [fintype H] : \n card H \u2260 card G - 1 :=", "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 $G$ cannot have a subgroup $H$ with $|H|=n-1$, where $n=|G|>2$.", "nl_proof": "\\begin{proof}\n\n Solution: Under these conditions, there exists a nonidentity element $x \\in H$ and an element $y \\notin H$. Consider the product $x y$. If $x y \\in H$, then since $x^{-1} \\in H$ and $H$ is a subgroup, $y \\in H$, a contradiction. If $x y \\notin H$, then we have $x y=y$. Thus $x=1$, a contradiction. Thus no such subgroup exists.\n\n\\end{proof}"} {"id": "Dummit-Foote|exercise_2_4_4", "formal_statement": "theorem exercise_2_4_4 {G : Type*} [group G] (H : subgroup G) : \n subgroup.closure ((H : set G) \\ {1}) = \u22a4 :=", "src_header": "import .common \n\nopen set function nat int fintype real polynomial mv_polynomial\nopen subgroup ideal submodule zsqrtd gaussian_int char_p mul_aut matrix\n\nopen_locale pointwise\nopen_locale big_operators\nnoncomputable theory\n\n", "nl_statement": "Prove that if $H$ is a subgroup of $G$ then $H$ is generated by the set $H-\\{1\\}$.", "nl_proof": "\\begin{proof}\n\n If $H=\\{1\\}$ then $H-\\{1\\}$ is the empty set which indeed generates the trivial subgroup $H$. So suppose $|H|>1$ and pick a nonidentity element $h \\in H$. Since $1=h h^{-1} \\in\\langle H-\\{1\\}\\rangle$ (Proposition 9), we see that $H \\leq\\langle H-\\{1\\}\\rangle$. By minimality of $\\langle H-\\{1\\}\\rangle$, the reverse inclusion also holds so that $\\langle H-\\{1\\}\\rangle=$ $H$.\n\n\\end{proof}"} {"id": "Dummit-Foote|exercise_2_4_16b", "formal_statement": "theorem exercise_2_4_16b {n : \u2115} {hn : n \u2260 0} \n {R : subgroup (dihedral_group n)} \n (hR : R = subgroup.closure {dihedral_group.r 1}) : \n R \u2260 \u22a4 \u2227 \n \u2200 K : subgroup (dihedral_group n), R \u2264 K \u2192 K = R \u2228 K = \u22a4 :=", "src_header": "import .common \n\nopen set function nat int fintype real polynomial mv_polynomial\nopen subgroup ideal submodule zsqrtd gaussian_int char_p mul_aut matrix\n\nopen_locale pointwise\nopen_locale big_operators\nnoncomputable theory\n\n", "nl_statement": "Show that the subgroup of all rotations in a dihedral group is a maximal subgroup.", "nl_proof": "\\begin{proof}\n\n Fix a positive integer $n>1$ and let $H \\leq D_{2 n}$ consist of the rotations of $D_{2 n}$. That is, $H=\\langle r\\rangle$. Now, this subgroup is proper since it does not contain $s$. If $H$ is not maximal, then by the previous proof we know there is a maximal subset $K$ containing $H$. Then $K$ must contain a reflection $s r^k$ for $k \\in\\{0,1, \\ldots, n-1\\}$. Then since $s r^k \\in K$ and $r^{n-k} \\in K$, it follows by closure that\n\n$$\n\ns=\\left(s r^k\\right)\\left(r^{n-k}\\right) \\in K .\n\n$$\n\nBut $D_{2 n}=\\langle r, s\\rangle$, so this shows that $K=D_{2 n}$, which is a contradiction. Therefore $H$ must be maximal.\n\n\\end{proof}"} {"id": "Dummit-Foote|exercise_3_1_3a", "formal_statement": "theorem exercise_3_1_3a {A : Type*} [comm_group A] (B : subgroup A) :\n \u2200 a b : A \u29f8 B, a*b = b*a :=", "src_header": "import .common \n\nopen set function nat int fintype real polynomial mv_polynomial\nopen subgroup ideal submodule zsqrtd gaussian_int char_p mul_aut matrix\n\nopen_locale pointwise\nopen_locale big_operators\nnoncomputable theory\n\n", "nl_statement": "Let $A$ be an abelian group and let $B$ be a subgroup of $A$. Prove that $A / B$ is abelian.", "nl_proof": "\\begin{proof}\n\n Lemma: Let $G$ be a group. If $|G|=2$, then $G \\cong Z_2$.\n\nProof: Since $G=\\{e a\\}$ has an identity element, say $e$, we know that $e e=e, e a=a$, and $a e=a$. If $a^2=a$, we have $a=e$, a contradiction. Thus $a^2=e$. We can easily see that $G \\cong Z_2$.\n\n\n\nIf $A$ is abelian, every subgroup of $A$ is normal; in particular, $B$ is normal, so $A / B$ is a group. Now let $x B, y B \\in A / B$. Then\n\n$$\n\n(x B)(y B)=(x y) B=(y x) B=(y B)(x B) .\n\n$$\n\nHence $A / B$ is abelian.\n\n\\end{proof}"} {"id": "Dummit-Foote|exercise_3_1_22b", "formal_statement": "theorem exercise_3_1_22b {G : Type*} [group G] (I : Type*)\n (H : I \u2192 subgroup G) (hH : \u2200 i : I, subgroup.normal (H i)) : \n subgroup.normal (\u2a05 (i : I), H i):=", "src_header": "import .common \n\nopen set function nat int fintype real polynomial mv_polynomial\nopen subgroup ideal submodule zsqrtd gaussian_int char_p mul_aut matrix\n\nopen_locale pointwise\nopen_locale big_operators\nnoncomputable theory\n\n", "nl_statement": "Prove that the intersection of an arbitrary nonempty collection of normal subgroups of a group is a normal subgroup (do not assume the collection is countable).", "nl_proof": "\\begin{proof}\n\nLet $\\left\\{H_i \\mid i \\in I\\right\\}$ be an arbitrary collection of normal subgroups of $G$ and consider the intersection\n\n$$\n\n\\bigcap_{i \\in I} H_i\n\n$$\n\nTake an element $a$ in the intersection and an arbitrary element $g \\in G$. Then $g a g^{-1} \\in H_i$ because $H_i$ is normal for any $i \\in H$\n\nBy the definition of the intersection, this shows that $g a g^{-1} \\in \\bigcap_{i \\in I} H_i$ and therefore it is a normal subgroup.\n\n\\end{proof}"} {"id": "Dummit-Foote|exercise_3_2_11", "formal_statement": "theorem exercise_3_2_11 {G : Type*} [group G] {H K : subgroup G}\n (hHK : H \u2264 K) : \n H.index = K.index * H.relindex 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": "Let $H \\leq K \\leq G$. Prove that $|G: H|=|G: K| \\cdot|K: H|$ (do not assume $G$ is finite).", "nl_proof": "\\begin{proof}\n\n Proof. Let $G$ be a group and let $I$ be a nonempty set of indices, not necessarily countable. Consider the collection of subgroups $\\left\\{N_\\alpha \\mid \\alpha \\in I\\right\\}$, where $N_\\alpha \\unlhd G$ for each $\\alpha \\in I$. Let\n\n$$\n\nN=\\bigcap_{\\alpha \\in I} N_\\alpha .\n\n$$\n\nWe know $N$ is a subgroup of $G$. \n\nFor any $g \\in G$ and any $n \\in N$, we must have $n \\in N_\\alpha$ for each $\\alpha$. And since $N_\\alpha \\unlhd G$, we have $g n g^{-1} \\in N_\\alpha$ for each $\\alpha$. Therefore $g n g^{-1} \\in N$, which shows that $g N g^{-1} \\subseteq N$ for each $g \\in G$. As before, this is enough to complete the proof.\n\n\\end{proof}"} {"id": "Dummit-Foote|exercise_3_2_21a", "formal_statement": "theorem exercise_3_2_21a (H : add_subgroup \u211a) (hH : H \u2260 \u22a4) : H.index = 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": "Prove that $\\mathbb{Q}$ has no proper subgroups of finite index.", "nl_proof": "\\begin{proof}\n\n Solution: We begin with a lemma.\n\nLemma: If $D$ is a divisible abelian group, then no proper subgroup of $D$ has finite index.\n\nProof: We saw previously that no finite group is divisible and that every proper quotient $D / A$ of a divisible group is divisible; thus no proper quotient of a divisible group is finite. Equivalently, $[D: A]$ is not finite.\n\nBecause $\\mathbb{Q}$ and $\\mathbb{Q} / \\mathbb{Z}$ are divisible, the conclusion follows.\n\n\\end{proof}"} {"id": "Dummit-Foote|exercise_3_4_1", "formal_statement": "theorem exercise_3_4_1 (G : Type*) [comm_group G] [is_simple_group G] :\n is_cyclic G \u2227 \u2203 G_fin : fintype G, nat.prime (@card G G_fin) :=", "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 simple group then $G \\cong Z_{p}$ for some prime $p$ (do not assume $G$ is a finite group).", "nl_proof": "\\begin{proof}\n\n Solution: Let $G$ be an abelian simple group.\n\nSuppose $G$ is infinite. If $x \\in G$ is a nonidentity element of finite order, then $\\langle x\\rangle 1)\n (h_tran : \u2200 a b: \u03b1, \u2203 \u03c3 : equiv.perm \u03b1, \u03c3 a = b) : \n \u2203 \u03c3 : equiv.perm \u03b1, \u2200 a : \u03b1, \u03c3 a \u2260 a :=", "src_header": "import .common \n\nopen set function nat int fintype real polynomial mv_polynomial\nopen subgroup ideal submodule zsqrtd gaussian_int char_p mul_aut matrix\n\nopen_locale pointwise\nopen_locale big_operators\nnoncomputable theory\n\n", "nl_statement": "Let $G$ be a transitive permutation group on the finite set $A$ with $|A|>1$. Show that there is some $\\sigma \\in G$ such that $\\sigma(a) \\neq a$ for all $a \\in A$.", "nl_proof": "\\begin{proof}\n\n Let $G$ be a transitive permutation group on the finite set $A,|A|>1$. We want to find an element $\\sigma$ which doesn't stabilize anything, that is, we want a $\\sigma$ such that\n\n$$\n\n\\sigma \\notin G_a\n\n$$\n\nfor all $a \\in A$.\n\nSince the group is transitive, there is always a $g \\in G$ such that $b=g \\cdot a$. Let us see in what relationship the stabilizers of $a$ and $b$ are. We find\n\n$$\n\n\\begin{aligned}\n\nG_b & =\\{h \\in G \\mid h \\cdot b=b\\} \\\\\n\n& =\\{h \\in G \\mid h g \\cdot a=g \\cdot a\\} \\\\\n\n& =\\left\\{h \\in G \\mid g^{-1} h g \\cdot a=a\\right\\}\n\n\\end{aligned}\n\n$$\n\nPutting $h^{\\prime}=g^{-1} h g$, we have $h=g h^{\\prime} g^{-1}$ and\n\n$$\n\n\\begin{aligned}\n\nG_b & =g\\left\\{h^{\\prime} \\in H \\mid h^{\\prime} \\cdot a=a\\right\\} g^{-1} \\\\\n\n& =g G_a g^{-1}\n\n\\end{aligned}\n\n$$\n\nBy the above, the stabilizer subgroup of any element is conjugate to some other stabilizer subgroup. Now, the stabilizer cannot be all of $G$ (else $\\{a\\}$ would be a orbit). Thus it is a proper subgroup of $G$. By the previous exercise, we have\n\n$$\n\n\\bigcup_{a \\in A} G_a=\\bigcup_{g \\in G} g G_a g^{-1} \\subset G\n\n$$\n\n(the union of conjugates of a proper subgroup can never be all of $G$ ). This shows there is an element $\\sigma$ which is not in any stabilizer of any element of $A$. Then $\\sigma(a) \\neq a$ for all $a \\in A$, as we wanted to show.\n\n\\end{proof}"} {"id": "Dummit-Foote|exercise_4_2_14", "formal_statement": "theorem exercise_4_2_14 {G : Type*} [fintype G] [group G] \n (hG : \u00ac (card G).prime) (hG1 : \u2200 k \u2223 card G, \n \u2203 (H : subgroup G) (fH : fintype H), @card H fH = k) : \n \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": "Let $G$ be a finite group of composite order $n$ with the property that $G$ has a subgroup of order $k$ for each positive integer $k$ dividing $n$. Prove that $G$ is not simple.", "nl_proof": "\\begin{proof}\n\n Solution: Let $p$ be the smallest prime dividing $n$, and write $n=p m$. Now $G$ has a subgroup $H$ of order $m$, and $H$ has index $p$. Then $H$ is normal in $G$.\n\n\\end{proof}"} {"id": "Dummit-Foote|exercise_4_4_6a", "formal_statement": "theorem exercise_4_4_6a {G : Type*} [group G] (H : subgroup G)\n [subgroup.characteristic H] : subgroup.normal 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 characteristic subgroups are normal.", "nl_proof": "\\begin{proof}\n\n Let $H$ be a characterestic subgroup of $G$. By definition $\\alpha(H) \\subset H$ for every $\\alpha \\in \\operatorname{Aut}(G)$. So, $H$ is in particular invariant under the inner automorphism. Let $\\phi_g$ denote the conjugation automorphism by $g$. Then $\\phi_g(H) \\subset H \\Longrightarrow$ $g H g^{-1} \\subset H$. So, $H$ is normal. \n\n\\end{proof}"} {"id": "Dummit-Foote|exercise_4_4_7", "formal_statement": "theorem exercise_4_4_7 {G : Type*} [group G] {H : subgroup G} [fintype H]\n (hH : \u2200 (K : subgroup G) (fK : fintype K), card H = @card K fK \u2192 H = K) : \n H.characteristic :=", "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": "If $H$ is the unique subgroup of a given order in a group $G$ prove $H$ is characteristic in $G$.", "nl_proof": "\\begin{proof}\n\n Let $G$ be group and $H$ be the unique subgroup of order $n$. Now, let $\\sigma \\in \\operatorname{Aut}(G)$. Now Clearly $|\\sigma(G)|=n$, because $\\sigma$ is a one-one onto map. But then as $H$ is the only subgroup of order $n$, and because of the fact that a automorphism maps subgroups to subgroups, we have $\\sigma(H)=$ $H$ for every $\\sigma \\in \\operatorname{Aut}(G)$. Hence, $H$ is a characterestic subgroup of $G$.\n\n\\end{proof}"} {"id": "Dummit-Foote|exercise_4_5_1a", "formal_statement": "theorem exercise_4_5_1a {p : \u2115} {G : Type*} [group G] \n {P : subgroup G} (hP : is_p_group p P) (H : subgroup G) \n (hH : P \u2264 H) : is_p_group 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": "Prove that if $P \\in \\operatorname{Syl}_{p}(G)$ and $H$ is a subgroup of $G$ containing $P$ then $P \\in \\operatorname{Syl}_{p}(H)$.", "nl_proof": "\\begin{proof}\n\nIf $P \\leq H \\leq G$ is a Sylow $p$-subgroup of $G$, then $p$ does not divide $[G: P]$. Now $[G: P]=[G: H][H: P]$, so that $p$ does not divide $[H: P]$; hence $P$ is a Sylow $p$-subgroup of $H$.\n\n\\end{proof}"} {"id": "Dummit-Foote|exercise_4_5_14", "formal_statement": "theorem exercise_4_5_14 {G : Type*} [group G] [fintype G]\n (hG : card G = 312) :\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 312 has a normal Sylow $p$-subgroup for some prime $p$ dividing its order.", "nl_proof": "\\begin{proof}\n\n Since $|G|=351=3^{2}.13$, $G$ has $3-$Sylow subgroup of order $9$, as well as $13-$Sylow subgroup of order $13$. Now, we count the number of such subgroups. Let $n_{13}$ be the number of $13-$Sylow subgroup and $n_{3}$ be the number of $3-$Sylow subgroup. Now $n_{13}=1+13k$ where $1+13k|9$. The choices for $k$ is $0$. Hence, there is a unique $13-$Sylow subgroup and hence is normal.\n\n\n\n\\end{proof}"} {"id": "Dummit-Foote|exercise_4_5_16", "formal_statement": "theorem exercise_4_5_16 {p q r : \u2115} {G : Type*} [group G] \n [fintype G] (hpqr : p < q \u2227 q < r) \n (hpqr1 : p.prime \u2227 q.prime \u2227 r.prime)(hG : card G = p*q*r) : \n nonempty (sylow p G) \u2228 nonempty(sylow q G) \u2228 nonempty(sylow r 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": "Let $|G|=p q r$, where $p, q$ and $r$ are primes with $p1, r(q-1)-r>$ 0 . So the number of elements exceeds $p q r$. So, it proves that atleast $n_p$ or $n_q$ or $n_r$ is 1, which ultimately proves the result, because a unique Sylow-p subgroup is always normal.\n\n\\end{proof}"} {"id": "Dummit-Foote|exercise_4_5_18", "formal_statement": "theorem exercise_4_5_18 {G : Type*} [fintype G] [group G] \n (hG : card G = 200) : \n \u2203 N : sylow 5 G, N.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 200 has a normal Sylow 5-subgroup.", "nl_proof": "\\begin{proof}\n\n Let $G$ be a group of order $200=5^2 \\cdot 8$. Note that 5 is a prime not dividing 8 . Let $P \\in$ $S y l_5(G)$. [We know $P$ exists since $S y l_5(G) \\neq \\emptyset$ by Sylow's Theorem]\n\n\n\nThe number of Sylow 5-subgroups of $G$ is of the form $1+k \\cdot 5$, i.e., $n_5 \\equiv 1(\\bmod 5)$ and $n_5$ divides 8 . The only such number that divides 8 and equals $1 (\\bmod 5)$ is 1 so $n_5=1$. Hence $P$ is the unique Sylow 5-subgroup.\n\nSince $P$ is the unique Sylow 5-subgroup, this implies that $P$ is normal in $G$.\n\n\\end{proof}"} {"id": "Dummit-Foote|exercise_4_5_20", "formal_statement": "theorem exercise_4_5_20 {G : Type*} [fintype G] [group G]\n (hG : card G = 1365) : \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|=1365$ then $G$ is not simple.", "nl_proof": "\\begin{proof} \n\nSince $|G|=1365=3.5.7.13$, $G$ has $13-$Sylow subgroup of order $13$. Now, we count the number of such subgroups. Let $n_{13}$ be the number of $13-$Sylow subgroup. Now $n_{13}=1+13k$ where $1+13k|3.5.7$. The choices for $k$ is $0$. Hence, there is a unique $13-$Sylow subgroup and hence is normal. so $G$ is not simple.\n\n\\end{proof}"} {"id": "Dummit-Foote|exercise_4_5_22", "formal_statement": "theorem exercise_4_5_22 {G : Type*} [fintype G] [group G]\n (hG : card G = 132) : \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|=132$ then $G$ is not simple.", "nl_proof": "\\begin{proof} \n\nSince $|G|=132=2^{2}.3.11$, $G$ has $2-$Sylow subgroup of order $4$, as well as $11-$Sylow subgroup of order $11$, and $3-$Sylow subgroup of order $3$. Now, we count the number of such subgroups. Let $n_{11}$ be the number of $11-$Sylow subgroup and $n_{3}$ be the number of $3-$Sylow subgroup. Now $n_{11}=1+11k$ where $1+11k|12$. The choices for $k$ are $0$ or $1$. If $k=0$, there is only one $11-$Sylow subgroup and hence normal. So, assume now, that there are $12$ $11-$Sylow subgroup(for $k=1$). Now we look at $3-$ Sylow subgroups. $n_{3}=1+3k| 44$. So choice for $k$ are $0$, $1$, and $7$. If $k=0$, there is only one $3-$Sylow subgroup and hence normal. So, assume now, that there are $4$ $2-$Sylow subgroup (for $k=3$). Now we claim that simultaneously, there cannot be $12$ $11-$Sylow subgroup and $4$ $3-$Sylow subgroups provided there is more than one $2-$Sylow subgroups. So, either $2-$Sylow subgroup is normal or if not, then, either $11-$Sylow subgroup is normal being unique, or the $3-$Sylow subgroup is normal(We don't consider the possibility of $22$ $3-$Sylow subgroup because of obvious reason). Now, to prove the claim, we observe that there are $120$ elements of order $11$. Also there are $8$ elements of order $3$. So we already get $120+8+1=129$ distinct elements in the group. Let us count the number of $2-$Sylow subgroups in $G$. $n_{2}=1+2k|33$. The possibilities for $k$ are $0$, $1$, $5$, $16$. Now, assume there is more than one $2-$Sylow subgroups. Let $H_{1}$ and $H_{2}$ be two distinct $2-$Sylow subgroup. Now $|H_{1}|=4$. So we already get $129+3=132$ distinct elements in the group. Now $H_{2}$ being distinct from $H_{1}$, has at least one element which is not in $H_{1}$. This adds one more element in the group, at the least. Now already we have number of elements in the group exceeding the number of element in $G$. This gives a contradiction and proves the claim.\n\nHence $G$ is not simple.\n\n\\end{proof}"} {"id": "Dummit-Foote|exercise_4_5_28", "formal_statement": "theorem exercise_4_5_28 {G : Type*} [group G] [fintype G] \n (hG : card G = 105) (P : sylow 3 G) [hP : P.normal] : \n comm_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": "Let $G$ be a group of order 105. Prove that if a Sylow 3-subgroup of $G$ is normal then $G$ is abelian.", "nl_proof": "\\begin{proof}\n\n Given that $G$ is a group of order $1575=3^2 .5^2 .7$. Now, Let $n_p$ be the number of Sylow-p subgroups. It is given that Sylow-3 subgroup is normal and hence is unique, so $n_3=1$. First we prove that both Sylow-5 subgroup and Sylow 7-subgroup are normal. Let $P$ be the Sylow3 subgroup. Now, Consider $G / P$, which has order $5^2 .7$. Now, the number of Sylow $-5$ subgroup of $G / P$ is given by $1+5 k$, where $1+5 k \\mid 7$. Clearly $k=0$ is the only choice and hence there is a unique Sylow-5 subgroup of $G / P$, and hence normal. In the same way Sylow-7 subgroup of $G / P$ is also unique and hence normal. Consider now the canonical map $\\pi: G \\rightarrow G / P$. The inverse image of Sylow-5 subgroup of $G / P$ under $\\pi$, call it $H$, is a normal subgroup of $G$, and $|H|=3^2 .5^2$. Similarly, the inverse image of Sylow-7 subgroup of $G / P$ under $\\pi$ call it $K$ is also normal in $G$ and $|K|=3^2 .7$. Now, consider $H$. Observe first that the number of Sylow-5 subgroup in $H$ is $1+5 k$ such that $1+5 k \\mid 9$. Again $k=0$ and hence $H$ has a unique Sylow-5 subgroup, call it $P_1$. But, it is easy to see that $P_1$ is also a Sylow-5 subgroup of $G$, because $\\left|P_1\\right|=25$. But now any other Sylow 5 subgroup of $G$ is of the form $g P_1 g^{-1}$ for some $g \\in G$. But observe that since $P_1 \\subset H$ and $H$ is normal in $G$, so $g P_1 g^1 \\subset H$, and $g P_1 g^{-1}$ is also Sylow-5 subgroup of $H$. But, then as Sylow-5 subgroup of $H$ is unique we have $g P_1 g^{-1}=P_1$. This shows that Sylow-5 subgroup of $G$ is unique and hence normal in $G$.\n\n\n\nSimilarly, one can argue the same for $K$ and deduce that Sylow-7 subgroup of $G$ is unique and hence normal. So, the first part of the problem is done.\n\n\\end{proof}"} {"id": "Dummit-Foote|exercise_5_4_2", "formal_statement": "theorem exercise_5_4_2 {G : Type*} [group G] (H : subgroup G) : \n H.normal \u2194 \u2045(\u22a4 : subgroup G), H\u2046 \u2264 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 a subgroup $H$ of $G$ is normal if and only if $[G, H] \\leq H$.", "nl_proof": "\\begin{proof}\n\n $H \\unlhd G$ is equivalent to $g^{-1} h g \\in H, \\forall g \\in G, \\forall h \\in H$. We claim that holds if and only if $h^{-1} g^{-1} h g \\in H, \\forall g \\in G, \\forall h \\in H$, i.e., $\\left\\{h^{-1} g^{-1} h g: h \\in H, g \\in G\\right\\} \\subseteq H$. That holds by the following argument:\n\nIf $g^{-1} h g \\in H, \\forall g \\in G, \\forall h \\in H$, note that $h^{-1} \\in H$, so multiplying them, we also obtain an element of $H$.\n\nOn the other hand, if $h^{-1} g^{-1} h g \\in H, \\forall g \\in G, \\forall h \\in H$, then\n\n$$\n\nh h^{-1} g^{-1} h g=g^{-1} h g \\in H, \\forall g \\in G, \\forall h \\in H .\n\n$$\n\nSince $\\left\\{h^{-1} g^{-1} h g: h \\in H, g \\in G\\right\\} \\subseteq H \\Leftrightarrow\\left\\langle\\left\\{h^{-1} g^{-1} h g: h \\in H, g \\in G\\right\\}\\right\\rangle \\leq H$, we've solved the exercise by definition of $[H, G]$.\n\n\\end{proof}"} {"id": "Dummit-Foote|exercise_7_1_11", "formal_statement": "theorem exercise_7_1_11 {R : Type*} [ring R] [is_domain R] \n {x : R} (hx : x^2 = 1) : x = 1 \u2228 x = -1 :=", "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 $R$ is an integral domain and $x^{2}=1$ for some $x \\in R$ then $x=\\pm 1$.", "nl_proof": "\\begin{proof}\n\n Solution: If $x^2=1$, then $x^2-1=0$. Evidently, then,\n\n$$\n\n(x-1)(x+1)=0 .\n\n$$\n\nSince $R$ is an integral domain, we must have $x-1=0$ or $x+1=0$; thus $x=1$ or $x=-1$.\n\n\\end{proof}"} {"id": "Dummit-Foote|exercise_7_1_15", "formal_statement": "theorem exercise_7_1_15 {R : Type*} [ring R] (hR : \u2200 a : R, a^2 = a) :\n comm_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": "A ring $R$ is called a Boolean ring if $a^{2}=a$ for all $a \\in R$. Prove that every Boolean ring is commutative.", "nl_proof": "\\begin{proof}\n\n Solution: Note first that for all $a \\in R$,\n\n$$\n\n-a=(-a)^2=(-1)^2 a^2=a^2=a .\n\n$$\n\nNow if $a, b \\in R$, we have\n\n$$\n\na+b=(a+b)^2=a^2+a b+b a+b^2=a+a b+b a+b .\n\n$$\n\nThus $a b+b a=0$, and we have $a b=-b a$. But then $a b=b a$. Thus $R$ is commutative.\n\n\\end{proof}"} {"id": "Dummit-Foote|exercise_7_2_12", "formal_statement": "theorem exercise_7_2_12 {R G : Type*} [ring R] [group G] [fintype G] : \n \u2211 g : G, monoid_algebra.of R G g \u2208 center (monoid_algebra R 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": "Let $G=\\left\\{g_{1}, \\ldots, g_{n}\\right\\}$ be a finite group. Prove that the element $N=g_{1}+g_{2}+\\ldots+g_{n}$ is in the center of the group ring $R G$.", "nl_proof": "\\begin{proof}\n\n Let $M=\\sum_{i=1}^n r_i g_i$ be an element of $R[G]$. Note that for each $g_i \\in G$, the action of $g_i$ on $G$ by conjugation permutes the subscripts. Then we have the following.\n\n$$\n\n\\begin{aligned}\n\nN M &=\\left(\\sum_{i=1}^n g_i\\right)\\left(\\sum_{j=1}^n r_j g_j\\right) \\\\\n\n&=\\sum_{j=1}^n \\sum_{i=1}^n r_j g_i g_j \\\\\n\n&=\\sum_{j=1}^n \\sum_{i=1}^n r_j g_j g_j^{-1} g_i g_j \\\\\n\n&=\\sum_{j=1}^n r_j g_j\\left(\\sum_{i=1}^n g_j^{-1} g_i g_j\\right) \\\\\n\n&=\\sum_{j=1}^n r_j g_j\\left(\\sum_{i=1}^n g_i\\right) \\\\\n\n&=\\left(\\sum_{j=1}^n r_j g_j\\right)\\left(\\sum_{i=1}^n g_i\\right) \\\\\n\n&=M N .\n\n\\end{aligned}\n\n$$\n\nThus $N \\in Z(R[G])$.\n\n\\end{proof}"} {"id": "Dummit-Foote|exercise_7_3_37", "formal_statement": "theorem exercise_7_3_37 {R : Type*} {p m : \u2115} (hp : p.prime) \n (N : ideal $ zmod $ p^m) : \n is_nilpotent N \u2194 is_nilpotent (ideal.span ({p} : set $ zmod $ p^m)) :=", "src_header": "import .common \n\nopen set function nat int fintype real polynomial mv_polynomial\nopen subgroup ideal submodule zsqrtd gaussian_int char_p mul_aut matrix\n\nopen_locale pointwise\nopen_locale big_operators\nnoncomputable theory\n\n", "nl_statement": "An ideal $N$ is called nilpotent if $N^{n}$ is the zero ideal for some $n \\geq 1$. Prove that the ideal $p \\mathbb{Z} / p^{m} \\mathbb{Z}$ is a nilpotent ideal in the ring $\\mathbb{Z} / p^{m} \\mathbb{Z}$.", "nl_proof": "\\begin{proof}\n\n First we prove a lemma.\n\nLemma: Let $R$ be a ring, and let $I_1, I_2, J \\subseteq R$ be ideals such that $J \\subseteq I_1, I_2$. Then $\\left(I_1 / J\\right)\\left(I_2 / J\\right)=I_1 I_2 / J$.\n\nProof: ( $\\subseteq$ ) Let\n\n$$\n\n\\alpha=\\sum\\left(x_i+J\\right)\\left(y_i+J\\right) \\in\\left(I_1 / J\\right)\\left(I_2 / J\\right) .\n\n$$\n\nThen\n\n$$\n\n\\alpha=\\sum\\left(x_i y_i+J\\right)=\\left(\\sum x_i y_i\\right)+J \\in\\left(I_1 I_2\\right) / J .\n\n$$\n\nNow let $\\alpha=\\left(\\sum x_i y_i\\right)+J \\in\\left(I_1 I_2\\right) / J$. Then\n\n$$\n\n\\alpha=\\sum\\left(x_i+J\\right)\\left(y_i+J\\right) \\in\\left(I_1 / J\\right)\\left(I_2 / J\\right) .\n\n$$\n\nFrom this lemma and the lemma to Exercise 7.3.36, it follows by an easy induction that\n\n$$\n\n\\left(p \\mathbb{Z} / p^m \\mathbb{Z}\\right)^m=(p \\mathbb{Z})^m / p^m \\mathbb{Z}=p^m \\mathbb{Z} / p^m \\mathbb{Z} \\cong 0 .\n\n$$\n\nThus $p \\mathbb{Z} / p^m \\mathbb{Z}$ is nilpotent in $\\mathbb{Z} / p^m \\mathbb{Z}$.\n\n\\end{proof}"} {"id": "Dummit-Foote|exercise_8_1_12", "formal_statement": "theorem exercise_8_1_12 {N : \u2115} (hN : N > 0) {M M': \u2124} {d : \u2115}\n (hMN : M.gcd N = 1) (hMd : d.gcd N.totient = 1) \n (hM' : M' \u2261 M^d [ZMOD N]) : \n \u2203 d' : \u2115, d' * d \u2261 1 [ZMOD N.totient] \u2227 \n M \u2261 M'^d' [ZMOD N] :=", "src_header": "import .common \n\nopen set function nat int fintype real polynomial mv_polynomial\nopen subgroup ideal submodule zsqrtd gaussian_int char_p mul_aut matrix\n\nopen_locale pointwise\nopen_locale big_operators\nnoncomputable theory\n\n", "nl_statement": "Let $N$ be a positive integer. Let $M$ be an integer relatively prime to $N$ and let $d$ be an integer relatively prime to $\\varphi(N)$, where $\\varphi$ denotes Euler's $\\varphi$-function. Prove that if $M_{1} \\equiv M^{d} \\pmod N$ then $M \\equiv M_{1}^{d^{\\prime}} \\pmod N$ where $d^{\\prime}$ is the inverse of $d \\bmod \\varphi(N)$: $d d^{\\prime} \\equiv 1 \\pmod {\\varphi(N)}$.", "nl_proof": "\\begin{proof}\n\n Note that there is some $k \\in \\mathbb{Z}$ such that $M^{d d^{\\prime}} \\equiv M^{k \\varphi(N)+1} \\equiv\\left(M^{\\varphi(N)}\\right)^k \\cdot M \\bmod N$. By Euler's Theorem we have $M^{\\varphi(N)} \\equiv 1 \\bmod N$, so that $M_1^{d^{\\prime}} \\equiv M \\bmod N$.\n\n\\end{proof}"} {"id": "Dummit-Foote|exercise_8_3_4", "formal_statement": "theorem exercise_8_3_4 {R : Type*} {n : \u2124} {r s : \u211a} \n (h : r^2 + s^2 = n) : \n \u2203 a b : \u2124, a^2 + b^2 = n :=", "src_header": "import .common \n\nopen set function nat int fintype real polynomial mv_polynomial\nopen subgroup ideal submodule zsqrtd gaussian_int char_p mul_aut matrix\n\nopen_locale pointwise\nopen_locale big_operators\nnoncomputable theory\n\n", "nl_statement": "Prove that if an integer is the sum of two rational squares, then it is the sum of two integer squares.", "nl_proof": "\\begin{proof}\n\n Let $n=\\frac{a^2}{b^2}+\\frac{c^2}{d^2}$, or, equivalently, $n(b d)^2=a^2 d^2+c^2 b^2$. From this, we see that $n(b d)^2$ can be written as a sum of two squared integers. Therefore, if $q \\equiv 3(\\bmod 4)$ and $q^i$ appears in the prime power factorization of $n, i$ must be even. Let $j \\in \\mathbb{N} \\cup\\{0\\}$ such that $q^j$ divides $b d$. Then $q^{i-2 j}$ divides $n$. But since $i$ is even, $i-2 j$ is even as well. Consequently, $n$ can be written as a sum of two squared integers.\n\n\\end{proof}"} {"id": "Dummit-Foote|exercise_8_3_6a", "formal_statement": "theorem exercise_8_3_6a {R : Type*} [ring R]\n (hR : R = (gaussian_int \u29f8 ideal.span ({\u27e80, 1\u27e9} : set gaussian_int))) :\n is_field R \u2227 \u2203 finR : fintype R, @card R finR = 2 :=", "src_header": "import .common \n\nopen set function nat int fintype real polynomial mv_polynomial\nopen subgroup ideal submodule zsqrtd gaussian_int char_p mul_aut matrix\n\nopen_locale pointwise\nopen_locale big_operators\nnoncomputable theory\n\n", "nl_statement": "Prove that the quotient ring $\\mathbb{Z}[i] /(1+i)$ is a field of order 2.", "nl_proof": "\\begin{proof}\n\n Let $a+b i \\in \\mathbb{Z}[i]$. If $a \\equiv b \\bmod 2$, then $a+b$ and $b-a$ are even and $(1+i)\\left(\\frac{a+b}{2}+\\frac{b-a}{2} i\\right)=a+b i \\in\\langle 1+i\\rangle$. If $a \\not \\equiv b \\bmod 2$ then $a-1+b i \\in\\langle 1+i\\rangle$. Therefore every element of $\\mathbb{Z}[i]$ is in either $\\langle 1+i\\rangle$ or $1+\\langle 1+i\\rangle$, so $\\mathbb{Z}[i] /\\langle 1+i\\rangle$ is a finite ring of order 2 , which must be a field.\n\n\\end{proof}"} {"id": "Dummit-Foote|exercise_9_1_6", "formal_statement": "theorem exercise_9_1_6 : \u00ac is_principal \n (ideal.span ({X 0, X 1} : set (mv_polynomial (fin 2) \u211a))) :=", "src_header": "import .common \n\nopen set function nat int fintype real polynomial mv_polynomial\nopen subgroup ideal submodule zsqrtd gaussian_int char_p mul_aut matrix\n\nopen_locale pointwise\nopen_locale big_operators\nnoncomputable theory\n\n", "nl_statement": "Prove that $(x, y)$ is not a principal ideal in $\\mathbb{Q}[x, y]$.", "nl_proof": "\\begin{proof}\n\n Suppose, to the contrary, that $(x, y)=p$ for some polynomial $p \\in \\mathbb{Q}[x, y]$. From $x, y \\in$ $(x, y)=(p)$ there are $s, t \\in \\mathbb{Q}[x, y]$ such that $x=s p$ and $y=t p$.\n\nThen:\n\n$$\n\n\\begin{aligned}\n\n& 0=\\operatorname{deg}_y(x)=\\operatorname{deg}_y(s)+\\operatorname{deg}_y(p) \\text { so } \\\\\n\n& 0=\\operatorname{deg}_y(p) \\\\\n\n& 0=\\operatorname{deg}_x(y)=\\operatorname{deg}_x(s)+\\operatorname{deg}_x(p) \\text { so } \\\\\n\n& 0=\\operatorname{deg}_x(p) \\text { so }\n\n\\end{aligned}\n\n$$\n\nFrom : $\\quad 0=\\operatorname{deg}_y(p)=\\operatorname{deg}_x(p)$ we get $\\operatorname{deg}(p)=0$ and $p \\in \\mathbb{Q}$.\n\nBut $p \\in(p)=(x, y)$ so $p=a x+b y$ for some $a, b \\in \\mathbb{Q}[x, y]$\n\n$$\n\n\\begin{aligned}\n\n\\operatorname{deg}(p) & =\\operatorname{deg}(a x+b y) \\\\\n\n& =\\min (\\operatorname{deg}(a)+\\operatorname{deg}(x), \\operatorname{deg}(b)+\\operatorname{deg}(y)) \\\\\n\n& =\\min (\\operatorname{deg}(a)+1, \\operatorname{deg}(b)+1) \\geqslant 1\n\n\\end{aligned}\n\n$$\n\nwhich contradicts $\\operatorname{deg}(p)=0$.\n\nSo we conclude that $(x, y)$ is not principal ideal in $\\mathbb{Q}[x, y]$\n\n\\end{proof}"} {"id": "Dummit-Foote|exercise_9_3_2", "formal_statement": "theorem exercise_9_3_2 {f g : polynomial \u211a} (i j : \u2115)\n (hfg : \u2200 n : \u2115, \u2203 a : \u2124, (f*g).coeff = a) :\n \u2203 a : \u2124, f.coeff i * g.coeff j = a :=", "src_header": "import .common \n\nopen set function nat int fintype real polynomial mv_polynomial\nopen subgroup ideal submodule zsqrtd gaussian_int char_p mul_aut matrix\n\nopen_locale pointwise\nopen_locale big_operators\nnoncomputable theory\n\n", "nl_statement": "Prove that if $f(x)$ and $g(x)$ are polynomials with rational coefficients whose product $f(x) g(x)$ has integer coefficients, then the product of any coefficient of $g(x)$ with any coefficient of $f(x)$ is an integer.", "nl_proof": "\\begin{proof}\n\n Let $f(x), g(x) \\in \\mathbb{Q}[x]$ be such that $f(x) g(x) \\in \\mathbb{Z}[x]$.\n\nBy Gauss' Lemma there exists $r, s \\in \\mathbb{Q}$ such that $r f(x), s g(x) \\in \\mathbb{Z}[x]$, and $(r f(x))(s g(x))=r s f(x) g(x)=f(x) g(x)$. From this last relation we can conclude that $s=r^{-1}$.\n\n\n\nTherefore for any coefficient $f_i$ of $f(x)$ and $g_j$ of $g(x)$ we have that $r f_i, r^{-1} g_j \\in$ $\\mathbb{Z}$ and by multiplicative closure and commutativity of $\\mathbb{Z}$ we have that $r f_i r^{-1} g_j=$ $f_i g_j \\in \\mathbb{Z}$\n\n\\end{proof}"} {"id": "Dummit-Foote|exercise_9_4_2b", "formal_statement": "theorem exercise_9_4_2b : irreducible \n (X^6 + 30*X^5 - 15*X^3 + 6*X - 120 : polynomial \u2124) :=", "src_header": "import .common \n\nopen set function nat int fintype real polynomial mv_polynomial\nopen subgroup ideal submodule zsqrtd gaussian_int char_p mul_aut matrix\n\nopen_locale pointwise\nopen_locale big_operators\nnoncomputable theory\n\n", "nl_statement": "Prove that $x^6+30x^5-15x^3 + 6x-120$ is irreducible in $\\mathbb{Z}[x]$.", "nl_proof": "\\begin{proof}\n\n $$\n\nx^6+30 x^5-15 x^3+6 x-120\n\n$$\n\nThe coefficients of the low order.: $30,-15,0,6,-120$\n\nThey are divisible by the prime 3 , but $3^2=9$ doesn 't divide $-120$. So this polynomial is irreducible over $\\mathbb{Z}$. \n\n\\end{proof}"} {"id": "Dummit-Foote|exercise_9_4_2d", "formal_statement": "theorem exercise_9_4_2d {p : \u2115} (hp : p.prime \u2227 p > 2) \n {f : polynomial \u2124} (hf : f = (X + 2)^p): \n irreducible (\u2211 n in (f.support - {0}), (f.coeff n) * X ^ (n-1) : \n polynomial \u2124) :=", "src_header": "import .common \n\nopen set function nat int fintype real polynomial mv_polynomial\nopen subgroup ideal submodule zsqrtd gaussian_int char_p mul_aut matrix\n\nopen_locale pointwise\nopen_locale big_operators\nnoncomputable theory\n\n", "nl_statement": "Prove that $\\frac{(x+2)^p-2^p}{x}$, where $p$ is an odd prime, is irreducible in $\\mathbb{Z}[x]$.", "nl_proof": "\\begin{proof}\n\n$\\frac{(x+2)^p-2^p}{x} \\quad \\quad p$ is on add pprime $Z[x]$\n\n$$\n\n\\frac{(x+2)^p-2^p}{x} \\quad \\text { as a polynomial we expand }(x+2)^p\n\n$$\n\n$2^p$ cancels with $-2^p$, every remaining term has $x$ as $a$ factor\n\n$$\n\n\\begin{aligned}\n\n& x^{p-1}+2\\left(\\begin{array}{l}\n\np \\\\\n\n1\n\n\\end{array}\\right) x^{p-2}+2^2\\left(\\begin{array}{l}\n\np \\\\\n\n2\n\n\\end{array}\\right) x^{p-3}+\\ldots+2^{p-1}\\left(\\begin{array}{c}\n\np \\\\\n\np-1\n\n\\end{array}\\right) \\\\\n\n& 2^k\\left(\\begin{array}{l}\n\np \\\\\n\nk\n\n\\end{array}\\right) x^{p-k-1}=2^k \\cdot p \\cdot(p-1) \\ldots(p-k-1), \\quad 00$ be such that when $\\left|z-z_0\\right| \\leq r$, then $z \\in \\Omega$. Then by (1),\n\n$$\n\nk a_n=\\frac{1}{2 \\pi i} \\int_{\\left|z-z_0\\right|=r} \\frac{\\varphi^k(z)}{\\left(z-z_0\\right)^{n+1}} d z .\n\n$$\n\nSince $\\varphi^k(\\Omega) \\subset \\Omega$ and since $\\Omega$ is bounded, there exists $M>0$, independent of $k$, such that $\\left|\\varphi^k\\right| \\leq M$ on $\\Omega$. Then by (2),\n\n$$\n\nk\\left|a_n\\right| \\leq M r^{-n} .\n\n$$\n\nSince $k$ is arbitrary, $a_n=0$, a contradiction.\n\n\\end{proof}"} {"id": "Shakarchi|exercise_3_3", "formal_statement": "theorem exercise_3_3 (a : \u211d) (ha : 0 < a) :\n tendsto (\u03bb y, \u222b x in -y..y, real.cos x / (x ^ 2 + a ^ 2))\n at_top (\ud835\udcdd (real.pi * (real.exp (-a) / 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{\\cos x}{x^2 + a^2} dx = \\pi \\frac{e^{-a}}{a}$ for $a > 0$.", "nl_proof": "\\begin{proof}\n\n $\\cos x=\\frac{e^{i x}+e^{-i x}}{2}$. changing $x \\rightarrow-x$ we see that we can just integrate $e^{i x} /\\left(x^2+a^2\\right)$ and we'll get the same answer. Again, we use the same semicircle and part of the real line. The only pole is $x=i a$, it has order 1 and the residue at it is $\\lim _{x \\rightarrow i a} \\frac{e^{i x}}{x^2+a^2}(x-i a)=\\frac{e^{-a}}{2 i a}$, which multiplied by $2 \\pi i$ gives the answer.\n\n\\end{proof}"} {"id": "Shakarchi|exercise_3_9", "formal_statement": "theorem exercise_3_9 : \u222b x in 0..1, real.log (real.sin (real.pi * x)) = - real.log 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^1 \\log(\\sin \\pi x) dx = - \\log 2$.", "nl_proof": "\\begin{proof}\n\nConsider\n\n$$\n\n\\begin{gathered}\n\nf(z)=\\log \\left(1-e^{2 \\pi z i}\\right)=\\log \\left(e^{\\pi z i}\\left(e^{-\\pi z i}-e^{\\pi z i}\\right)\\right)=\\log (-2 i)+\\pi z i+\\log \\\\\n\n(\\sin (\\pi z))\n\n\\end{gathered}\n\n$$\n\nThen we have\n\n$$\n\n\\begin{aligned}\n\n\\int_0^1 f(z) d z & =\\log (-2 i)+\\frac{i \\pi}{2}+\\int_0^1 \\log (\\sin (\\pi z)) d z \\\\\n\n& =\\int_0^1 \\log (\\sin (\\pi z)) d z+\\log (-2 i)+\\log (i) \\\\\n\n& =\\log (2)+\\int_0^1 \\log (\\sin (\\pi z)) d z\n\n\\end{aligned}\n\n$$\n\nNow it suffices to show that $\\int_0^1 f(z) d z=0$. Consider the contour $C(\\epsilon, R)$ (which is the contour given in your question) given by the following.\n\n1. $C_1(\\epsilon, R)$ : The vertical line along the imaginary axis from $i R$ to $i \\epsilon$.\n\n2. $C_2(\\epsilon)$ : The quarter turn of radius $\\epsilon$ about 0 .\n\n3. $C_3(\\epsilon)$ : Along the real axis from $(\\epsilon, 1-\\epsilon)$.\n\n4. $C_4(\\epsilon)$ : The quarter turn of radius $\\epsilon$ about 1 .\n\n5. $C_5(\\epsilon, R)$ : The vertical line from $1+i \\epsilon$ to $1+i R$.\n\n6. $C_6(R)$ : The horizontal line from $1+i R$ to $i R$.\n\n$f(z)$ is analytic inside the contour $C$ and hence $\\oint_C f(z)=0$. This gives us\n\n$$\n\n\\begin{aligned}\n\n\\int_{C_1(\\epsilon, R)} f d z+\\int_{C_2(\\epsilon)} f d z+\\int_{C_3(\\epsilon)} f d z+\\int_{C_4(\\epsilon)} f d z+\\int_{C_5(\\epsilon, R)} f d z+\\int_{C_6(R)} f d z \\\\\n\n=0\n\n\\end{aligned}\n\n$$\n\nNow the integral along 1 cancels with the integral along 5 due to symmetry. Integrals along 2 and 4 scale as $\\epsilon \\log (\\epsilon)$. Integral along 6 goes to 0 as $R \\rightarrow \\infty$. This gives us\n\n$$\n\n\\lim _{\\epsilon \\rightarrow 0} \\int_{C_3(\\epsilon)} f d z=0\n\n$$\n\nwhich is what we need.\n\n\\end{proof}"} {"id": "Shakarchi|exercise_3_22", "formal_statement": "theorem exercise_3_22 (D : set \u2102) (hD : D = ball 0 1) (f : \u2102 \u2192 \u2102)\n (hf : differentiable_on \u2102 f D) (hfc : continuous_on f (closure D)) :\n \u00ac \u2200 z \u2208 (sphere (0 : \u2102) 1), f z = 1 / 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": "Show that there is no holomorphic function $f$ in the unit disc $D$ that extends continuously to $\\partial D$ such that $f(z) = 1/z$ for $z \\in \\partial D$.", "nl_proof": "\\begin{proof}\n\n Consider $g(r)=\\int_{|z|=r} f(z) d z$. Cauchy theorem implies that $g(r)=0$ for all $r<1$. Now since $\\left.f\\right|_{\\partial D}=1 / z$ we have $\\lim _{r \\rightarrow 1} \\int_{|z|=r} f(z) d z=\\int_{|z|=1} \\frac{1}{z} d z=\\frac{2}{\\pi i} \\neq 0$. Contradiction.\n\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$.", "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$.", "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$.", "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}$.", "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.", "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}$.", "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.", "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.", "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.", "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.", "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)$.", "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.", "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.", "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$.", "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.", "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.", "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.", "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.", "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.", "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\\}$.", "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.", "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}"}