name
stringlengths
12
16
split
stringclasses
1 value
informal_prefix
stringlengths
50
384
formal_statement
stringlengths
50
339
goal
stringlengths
18
313
header
stringclasses
20 values
exercise_1_1_25
valid
/-- Prove that if $x^{2}=1$ for all $x \in G$ then $G$ is abelian.-/
theorem exercise_1_1_25 {G : Type*} [Group G] (h : βˆ€ x : G, x ^ 2 = 1) : βˆ€ a b : G, a*b = b*a :=
G : Type u_1 inst✝ : Group G h : βˆ€ (x : G), x ^ 2 = 1 ⊒ βˆ€ (a b : G), a * b = b * a
import Mathlib open Fintype Subgroup Set Polynomial Ideal open scoped BigOperators
exercise_1_1_34
valid
/-- If $x$ is an element of infinite order in $G$, prove that the elements $x^{n}, n \in \mathbb{Z}$ are all distinct.-/
theorem exercise_1_1_34 {G : Type*} [Group G] {x : G} (hx_inf : orderOf x = 0) (n m : β„€) : x ^ n β‰  x ^ m :=
G : Type u_1 inst✝ : Group G x : G hx_inf : orderOf x = 0 n m : β„€ ⊒ x ^ n β‰  x ^ m
import Mathlib open Fintype Subgroup Set Polynomial Ideal open scoped BigOperators
exercise_1_6_4
valid
/-- Prove that the multiplicative groups $\mathbb{R}-\{0\}$ and $\mathbb{C}-\{0\}$ are not isomorphic.-/
theorem exercise_1_6_4 : IsEmpty (Multiplicative ℝ ≃* Multiplicative β„‚) :=
⊒ IsEmpty (Multiplicative ℝ ≃* Multiplicative β„‚)
import Mathlib open Fintype Subgroup Set Polynomial Ideal open scoped BigOperators
exercise_1_6_17
valid
/-- 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.-/
theorem exercise_1_6_17 {G : Type*} [Group G] (f : G β†’ G) (hf : f = Ξ» g => g⁻¹) : βˆ€ x y : G, f x * f y = f (x*y) ↔ βˆ€ x y : G, x*y = y*x :=
G : Type u_1 inst✝ : Group G f : G β†’ G hf : f = fun g => g⁻¹ ⊒ βˆ€ (x y : G), f x * f y = f (x * y) ↔ βˆ€ (x y : G), x * y = y * x
import Mathlib open Fintype Subgroup Set Polynomial Ideal open scoped BigOperators
exercise_2_1_5
valid
/-- Prove that $G$ cannot have a subgroup $H$ with $|H|=n-1$, where $n=|G|>2$.-/
theorem exercise_2_1_5 {G : Type*} [Group G] [Fintype G] (hG : card G > 2) (H : Subgroup G) [Fintype H] : card H β‰  card G - 1 :=
G : Type u_1 inst✝² : Group G inst✝¹ : Fintype G hG : card G > 2 H : Subgroup G inst✝ : Fintype β†₯H ⊒ card β†₯H β‰  card G - 1
import Mathlib open Fintype Subgroup Set Polynomial Ideal open scoped BigOperators
exercise_2_4_4
valid
/-- Prove that if $H$ is a subgroup of $G$ then $H$ is generated by the set $H-\{1\}$.-/
theorem exercise_2_4_4 {G : Type*} [Group G] (H : Subgroup G) : closure ((H : Set G) \ {1}) = ⊀ :=
G : Type u_1 inst✝ : Group G H : Subgroup G ⊒ Subgroup.closure (↑H \ {1}) = ⊀
import Mathlib open Fintype Subgroup Set Polynomial Ideal open scoped BigOperators
exercise_2_4_16b
valid
/-- Show that the subgroup of all rotations in a dihedral group is a maximal subgroup.-/
theorem exercise_2_4_16b {n : β„•} {hn : n β‰  0} {R : Subgroup (DihedralGroup n)} (hR : R = Subgroup.closure {DihedralGroup.r 1}) : R β‰  ⊀ ∧ βˆ€ K : Subgroup (DihedralGroup n), R ≀ K β†’ K = R ∨ K = ⊀ :=
n : β„• hn : n β‰  0 R : Subgroup (DihedralGroup n) hR : R = Subgroup.closure {DihedralGroup.r 1} ⊒ R β‰  ⊀ ∧ βˆ€ (K : Subgroup (DihedralGroup n)), R ≀ K β†’ K = R ∨ K = ⊀
import Mathlib open Fintype Subgroup Set Polynomial Ideal open scoped BigOperators
exercise_3_1_3a
valid
/-- Let $A$ be an abelian group and let $B$ be a subgroup of $A$. Prove that $A / B$ is abelian.-/
theorem exercise_3_1_3a {A : Type*} [CommGroup A] (B : Subgroup A) : βˆ€ a b : A β§Έ B, a*b = b*a :=
A : Type u_1 inst✝ : CommGroup A B : Subgroup A ⊒ βˆ€ (a b : A β§Έ B), a * b = b * a
import Mathlib open Fintype Subgroup Set Polynomial Ideal open scoped BigOperators
exercise_3_1_22b
valid
/-- 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).-/
theorem exercise_3_1_22b {G : Type*} [Group G] (I : Type*) (H : I β†’ Subgroup G) (hH : βˆ€ i : I, Normal (H i)) : Normal (β¨… (i : I), H i) :=
G : Type u_1 inst✝ : Group G I : Type u_2 H : I β†’ Subgroup G hH : βˆ€ (i : I), (H i).Normal ⊒ (β¨… i, H i).Normal
import Mathlib open Fintype Subgroup Set Polynomial Ideal open scoped BigOperators
exercise_3_2_11
valid
/-- Let $H \leq K \leq G$. Prove that $|G: H|=|G: K| \cdot|K: H|$ (do not assume $G$ is finite).-/
theorem exercise_3_2_11 {G : Type*} [Group G] {H K : Subgroup G} (hHK : H ≀ K) : H.index = K.index * H.relindex K :=
G : Type u_1 inst✝ : Group G H K : Subgroup G hHK : H ≀ K ⊒ H.index = K.index * H.relindex K
import Mathlib open Fintype Subgroup Set Polynomial Ideal open scoped BigOperators
exercise_3_2_21a
valid
/-- Prove that $\mathbb{Q}$ has no proper subgroups of finite index.-/
theorem exercise_3_2_21a (H : AddSubgroup β„š) (hH : H β‰  ⊀) : H.index = 0 :=
H : AddSubgroup β„š hH : H β‰  ⊀ ⊒ H.index = 0
import Mathlib open Fintype Subgroup Set Polynomial Ideal open scoped BigOperators
exercise_3_4_1
valid
/-- 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).-/
theorem exercise_3_4_1 (G : Type*) [CommGroup G] [IsSimpleGroup G] : IsCyclic G ∧ βˆƒ G_fin : Fintype G, Nat.Prime (@card G G_fin) :=
G : Type u_1 inst✝¹ : CommGroup G inst✝ : IsSimpleGroup G ⊒ IsCyclic G ∧ βˆƒ G_fin, (card G).Prime
import Mathlib open Fintype Subgroup Set Polynomial Ideal open scoped BigOperators
exercise_3_4_5a
valid
/-- Prove that subgroups of a solvable group are solvable.-/
theorem exercise_3_4_5a {G : Type*} [Group G] (H : Subgroup G) [IsSolvable G] : IsSolvable H :=
G : Type u_1 inst✝¹ : Group G H : Subgroup G inst✝ : IsSolvable G ⊒ IsSolvable β†₯H
import Mathlib open Fintype Subgroup Set Polynomial Ideal open scoped BigOperators
exercise_3_4_11
valid
/-- Prove that if $H$ is a nontrivial normal subgroup of the solvable group $G$ then there is a nontrivial subgroup $A$ of $H$ with $A \unlhd G$ and $A$ abelian.-/
theorem exercise_3_4_11 {G : Type*} [Group G] [IsSolvable G] {H : Subgroup G} (hH : H β‰  βŠ₯) [H.Normal] : βˆƒ A ≀ H, A.Normal ∧ βˆ€ a b : A, a*b = b*a :=
G : Type u_1 inst✝² : Group G inst✝¹ : IsSolvable G H : Subgroup G hH : H β‰  βŠ₯ inst✝ : H.Normal ⊒ βˆƒ A ≀ H, A.Normal ∧ βˆ€ (a b : β†₯A), a * b = b * a
import Mathlib open Fintype Subgroup Set Polynomial Ideal open scoped BigOperators
exercise_4_3_26
valid
/-- 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$.-/
theorem exercise_4_3_26 {Ξ± : Type*} [Fintype Ξ±] (ha : card Ξ± > 1) (h_tran : βˆ€ a b: Ξ±, βˆƒ Οƒ : Equiv.Perm Ξ±, Οƒ a = b) : βˆƒ Οƒ : Equiv.Perm Ξ±, βˆ€ a : Ξ±, Οƒ a β‰  a :=
Ξ± : Type u_1 inst✝ : Fintype Ξ± ha : card Ξ± > 1 h_tran : βˆ€ (a b : Ξ±), βˆƒ Οƒ, Οƒ a = b ⊒ βˆƒ Οƒ, βˆ€ (a : Ξ±), Οƒ a β‰  a
import Mathlib open Fintype Subgroup Set Polynomial Ideal open scoped BigOperators
exercise_4_2_14
valid
/-- 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.-/
theorem exercise_4_2_14 {G : Type*} [Fintype G] [Group G] (hG : Β¬ (card G).Prime) (hG1 : βˆ€ k : β„•, k ∣ card G β†’ βˆƒ (H : Subgroup G) (fH : Fintype H), @card H fH = k) : Β¬ IsSimpleGroup G :=
G : Type u_1 inst✝¹ : Fintype G inst✝ : Group G hG : Β¬(card G).Prime hG1 : βˆ€ (k : β„•), k ∣ card G β†’ βˆƒ H fH, card β†₯H = k ⊒ Β¬IsSimpleGroup G
import Mathlib open Fintype Subgroup Set Polynomial Ideal open scoped BigOperators
exercise_4_4_6a
valid
/-- Prove that characteristic subgroups are normal.-/
theorem exercise_4_4_6a {G : Type*} [Group G] (H : Subgroup G) [Characteristic H] : Normal H :=
G : Type u_1 inst✝¹ : Group G H : Subgroup G inst✝ : H.Characteristic ⊒ H.Normal
import Mathlib open Fintype Subgroup Set Polynomial Ideal open scoped BigOperators
exercise_4_4_7
valid
/-- If $H$ is the unique subgroup of a given order in a group $G$ prove $H$ is characteristic in $G$.-/
theorem exercise_4_4_7 {G : Type*} [Group G] {H : Subgroup G} [Fintype H] (hH : βˆ€ (K : Subgroup G) (fK : Fintype K), card H = @card K fK β†’ H = K) : H.Characteristic :=
G : Type u_1 inst✝¹ : Group G H : Subgroup G inst✝ : Fintype β†₯H hH : βˆ€ (K : Subgroup G) (fK : Fintype β†₯K), card β†₯H = card β†₯K β†’ H = K ⊒ H.Characteristic
import Mathlib open Fintype Subgroup Set Polynomial Ideal open scoped BigOperators
exercise_4_5_1a
valid
/-- 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)$.-/
theorem exercise_4_5_1a {p : β„•} {G : Type*} [Group G] {P : Subgroup G} (hP : IsPGroup p P) (H : Subgroup G) (hH : P ≀ H) : IsPGroup p H :=
p : β„• G : Type u_1 inst✝ : Group G P : Subgroup G hP : IsPGroup p β†₯P H : Subgroup G hH : P ≀ H ⊒ IsPGroup p β†₯H
import Mathlib open Fintype Subgroup Set Polynomial Ideal open scoped BigOperators
exercise_4_5_14
valid
/-- Prove that a group of order 312 has a normal Sylow $p$-subgroup for some prime $p$ dividing its order.-/
theorem exercise_4_5_14 {G : Type*} [Group G] [Fintype G] (hG : card G = 312) : βˆƒ (p : β„•) (P : Sylow p G), P.Normal :=
G : Type u_1 inst✝¹ : Group G inst✝ : Fintype G hG : card G = 312 ⊒ βˆƒ p P, (↑P).Normal
import Mathlib open Fintype Subgroup Set Polynomial Ideal open scoped BigOperators
exercise_4_5_16
valid
/-- Let $|G|=p q r$, where $p, q$ and $r$ are primes with $p<q<r$. Prove that $G$ has a normal Sylow subgroup for either $p, q$ or $r$.-/
theorem exercise_4_5_16 {p q r : β„•} {G : Type*} [Group G] [Fintype G] (hpqr : p < q ∧ q < r) (hpqr1 : p.Prime ∧ q.Prime ∧ r.Prime)(hG : card G = p*q*r) : Nonempty (Sylow p G) ∨ Nonempty (Sylow q G) ∨ Nonempty (Sylow r G) :=
p q r : β„• G : Type u_1 inst✝¹ : Group G inst✝ : Fintype G hpqr : p < q ∧ q < r hpqr1 : p.Prime ∧ q.Prime ∧ r.Prime hG : card G = p * q * r ⊒ Nonempty (Sylow p G) ∨ Nonempty (Sylow q G) ∨ Nonempty (Sylow r G)
import Mathlib open Fintype Subgroup Set Polynomial Ideal open scoped BigOperators
exercise_4_5_18
valid
/-- Prove that a group of order 200 has a normal Sylow 5-subgroup.-/
theorem exercise_4_5_18 {G : Type*} [Fintype G] [Group G] (hG : card G = 200) : βˆƒ N : Sylow 5 G, N.Normal :=
G : Type u_1 inst✝¹ : Fintype G inst✝ : Group G hG : card G = 200 ⊒ βˆƒ N, (↑N).Normal
import Mathlib open Fintype Subgroup Set Polynomial Ideal open scoped BigOperators
exercise_4_5_20
valid
/-- Prove that if $|G|=1365$ then $G$ is not simple.-/
theorem exercise_4_5_20 {G : Type*} [Fintype G] [Group G] (hG : card G = 1365) : Β¬ IsSimpleGroup G :=
G : Type u_1 inst✝¹ : Fintype G inst✝ : Group G hG : card G = 1365 ⊒ ¬IsSimpleGroup G
import Mathlib open Fintype Subgroup Set Polynomial Ideal open scoped BigOperators
exercise_4_5_22
valid
/-- Prove that if $|G|=132$ then $G$ is not simple.-/
theorem exercise_4_5_22 {G : Type*} [Fintype G] [Group G] (hG : card G = 132) : Β¬ IsSimpleGroup G :=
G : Type u_1 inst✝¹ : Fintype G inst✝ : Group G hG : card G = 132 ⊒ ¬IsSimpleGroup G
import Mathlib open Fintype Subgroup Set Polynomial Ideal open scoped BigOperators
exercise_4_5_28
valid
/-- Let $G$ be a group of order 105. Prove that if a Sylow 3-subgroup of $G$ is normal then $G$ is abelian.-/
def exercise_4_5_28 {G : Type*} [Group G] [Fintype G] (hG : card G = 105) (P : Sylow 3 G) [hP : P.Normal] : CommGroup G :=
G : Type u_1 inst✝¹ : Group G inst✝ : Fintype G hG : card G = 105 P : Sylow 3 G hP : (↑P).Normal ⊒ CommGroup G
import Mathlib open Fintype Subgroup Set Polynomial Ideal open scoped BigOperators
exercise_5_4_2
valid
/-- Prove that a subgroup $H$ of $G$ is normal if and only if $[G, H] \leq H$.-/
theorem exercise_5_4_2 {G : Type*} [Group G] (H : Subgroup G) : H.Normal ↔ ⁅(⊀ : Subgroup G), H⁆ ≀ H :=
G : Type u_1 inst✝ : Group G H : Subgroup G ⊒ H.Normal ↔ β…βŠ€, H⁆ ≀ H
import Mathlib open Fintype Subgroup Set Polynomial Ideal open scoped BigOperators
exercise_7_1_11
valid
/-- Prove that if $R$ is an integral domain and $x^{2}=1$ for some $x \in R$ then $x=\pm 1$.-/
theorem exercise_7_1_11 {R : Type*} [Ring R] [IsDomain R] {x : R} (hx : x^2 = 1) : x = 1 ∨ x = -1 :=
R : Type u_1 inst✝¹ : Ring R inst✝ : IsDomain R x : R hx : x ^ 2 = 1 ⊒ x = 1 ∨ x = -1
import Mathlib open Fintype Subgroup Set Polynomial Ideal open scoped BigOperators
exercise_7_1_15
valid
/-- A ring $R$ is called a Boolean ring if $a^{2}=a$ for all $a \in R$. Prove that every Boolean ring is commutative.-/
def exercise_7_1_15 {R : Type*} [Ring R] (hR : βˆ€ a : R, a^2 = a) : CommRing R :=
R : Type u_1 inst✝ : Ring R hR : βˆ€ (a : R), a ^ 2 = a ⊒ CommRing R
import Mathlib open Fintype Subgroup Set Polynomial Ideal open scoped BigOperators
exercise_7_2_12
valid
/-- 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$.-/
theorem exercise_7_2_12 {R G : Type*} [Ring R] [Group G] [Fintype G] : βˆ‘ g : G, MonoidAlgebra.of R G g ∈ center (MonoidAlgebra R G) :=
R : Type u_1 G : Type u_2 inst✝² : Ring R inst✝¹ : Group G inst✝ : Fintype G ⊒ βˆ‘ g : G, (MonoidAlgebra.of R G) g ∈ Set.center (MonoidAlgebra R G)
import Mathlib open Fintype Subgroup Set Polynomial Ideal open scoped BigOperators
exercise_7_3_37
valid
/-- 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}$.-/
theorem exercise_7_3_37 {p m : β„•} (hp : p.Prime) : IsNilpotent (span ({↑p} : Set $ ZMod $ p^m) : Ideal $ ZMod $ p^m) :=
p m : β„• hp : p.Prime ⊒ IsNilpotent (span {↑p})
import Mathlib open Fintype Subgroup Set Polynomial Ideal open scoped BigOperators
exercise_8_1_12
valid
/-- 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)}$.-/
theorem exercise_8_1_12 {N : β„•} (hN : N > 0) {M M': β„€} {d : β„•} (hMN : M.gcd N = 1) (hMd : d.gcd N.totient = 1) (hM' : M' ≑ M^d [ZMOD N]) : βˆƒ d' : β„•, d' * d ≑ 1 [ZMOD N.totient] ∧ M ≑ M'^d' [ZMOD N] :=
N : β„• hN : N > 0 M M' : β„€ d : β„• hMN : M.gcd ↑N = 1 hMd : d.gcd N.totient = 1 hM' : M' ≑ M ^ d [ZMOD ↑N] ⊒ βˆƒ d', ↑d' * ↑d ≑ 1 [ZMOD ↑N.totient] ∧ M ≑ M' ^ d' [ZMOD ↑N]
import Mathlib open Fintype Subgroup Set Polynomial Ideal open scoped BigOperators
exercise_8_3_4
valid
/-- Prove that if an integer is the sum of two rational squares, then it is the sum of two integer squares.-/
theorem exercise_8_3_4 {R : Type*} {n : β„€} {r s : β„š} (h : r^2 + s^2 = n) : βˆƒ a b : β„€, a^2 + b^2 = n :=
R : Type u_1 n : β„€ r s : β„š h : r ^ 2 + s ^ 2 = ↑n ⊒ βˆƒ a b, a ^ 2 + b ^ 2 = n
import Mathlib open Fintype Subgroup Set Polynomial Ideal open scoped BigOperators
exercise_8_3_6a
valid
/-- Prove that the quotient ring $\mathbb{Z}[i] /(1+i)$ is a field of order 2.-/
theorem exercise_8_3_6a {R : Type} [Ring R] (hR : R = (GaussianInt β§Έ span ({⟨0, 1⟩} : Set GaussianInt))) : IsField R ∧ βˆƒ finR : Fintype R, @card R finR = 2 :=
R : Type inst✝ : Ring R hR : R = (GaussianInt β§Έ span {{ re := 0, im := 1 }}) ⊒ IsField R ∧ βˆƒ finR, card R = 2
import Mathlib open Fintype Subgroup Set Polynomial Ideal open scoped BigOperators
exercise_9_1_6
valid
/-- Prove that $(x, y)$ is not a principal ideal in $\mathbb{Q}[x, y]$.-/
theorem exercise_9_1_6 : Β¬ Submodule.IsPrincipal (span ({MvPolynomial.X 0, MvPolynomial.X 1} : Set (MvPolynomial (Fin 2) β„š))) :=
⊒ ¬Submodule.IsPrincipal (span {MvPolynomial.X 0, MvPolynomial.X 1})
import Mathlib open Fintype Subgroup Set Polynomial Ideal open scoped BigOperators
exercise_9_3_2
valid
/-- 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.-/
theorem exercise_9_3_2 {f g : Polynomial β„š} (i j : β„•) (hfg : βˆ€ n : β„•, βˆƒ a : β„€, (f*g).coeff = a) : βˆƒ a : β„€, f.coeff i * g.coeff j = a :=
f g : β„š[X] i j : β„• hfg : β„• β†’ βˆƒ a, (f * g).coeff = ↑a ⊒ βˆƒ a, f.coeff i * g.coeff j = ↑a
import Mathlib open Fintype Subgroup Set Polynomial Ideal open scoped BigOperators
exercise_9_4_2b
valid
/-- Prove that $x^6+30x^5-15x^3 + 6x-120$ is irreducible in $\mathbb{Z}[x]$.-/
theorem exercise_9_4_2b : Irreducible (X^6 + 30*X^5 - 15*X^3 + 6*X - 120 : Polynomial β„€) :=
⊒ Irreducible (X ^ 6 + 30 * X ^ 5 - 15 * X ^ 3 + 6 * X - 120)
import Mathlib open Fintype Subgroup Set Polynomial Ideal open scoped BigOperators
exercise_9_4_2d
valid
/-- Prove that $\frac{(x+2)^p-2^p}{x}$, where $p$ is an odd prime, is irreducible in $\mathbb{Z}[x]$.-/
theorem exercise_9_4_2d {p : β„•} (hp : p.Prime ∧ p > 2) {f : Polynomial β„€} (hf : f = (X + 2)^p): Irreducible (βˆ‘ n in (f.support \ {0}), (f.coeff n : Polynomial β„€) * X ^ (n-1) : Polynomial β„€) :=
p : β„• hp : p.Prime ∧ p > 2 f : β„€[X] hf : f = (X + 2) ^ p ⊒ Irreducible (βˆ‘ n ∈ f.support \ {0}, ↑(f.coeff n) * X ^ (n - 1))
import Mathlib open Fintype Subgroup Set Polynomial Ideal open scoped BigOperators
exercise_9_4_11
valid
/-- Prove that $x^2+y^2-1$ is irreducible in $\mathbb{Q}[x,y]$.-/
theorem exercise_9_4_11 : Irreducible ((MvPolynomial.X 0)^2 + (MvPolynomial.X 1)^2 - 1 : MvPolynomial (Fin 2) β„š) :=
⊒ Irreducible (MvPolynomial.X 0 ^ 2 + MvPolynomial.X 1 ^ 2 - 1)
import Mathlib open Fintype Subgroup Set Polynomial Ideal open scoped BigOperators
exercise_13_1
valid
/-- 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$.-/
theorem exercise_13_1 (X : Type*) [TopologicalSpace X] (A : Set X) (h1 : βˆ€ x ∈ A, βˆƒ U : Set X, x ∈ U ∧ IsOpen U ∧ U βŠ† A) : IsOpen A :=
X : Type u_1 inst✝ : TopologicalSpace X A : Set X h1 : βˆ€ x ∈ A, βˆƒ U, x ∈ U ∧ IsOpen U ∧ U βŠ† A ⊒ IsOpen A
import Mathlib open Filter Set TopologicalSpace open scoped Topology
exercise_13_4a1
valid
/-- If $\mathcal{T}_\alpha$ is a family of topologies on $X$, show that $\bigcap \mathcal{T}_\alpha$ is a topology on $X$.-/
theorem exercise_13_4a1 (X I : Type*) (T : I β†’ Set (Set X)) (h : βˆ€ i, is_topology X (T i)) : is_topology X (β‹‚ i : I, T i) :=
X : Type u_1 I : Type u_2 T : I β†’ Set (Set X) h : βˆ€ (i : I), is_topology X (T i) ⊒ is_topology X (β‹‚ i, T i)
import Mathlib open Filter Set TopologicalSpace open scoped Topology def is_topology (X : Type*) (T : Set (Set X)) := univ ∈ T ∧ (βˆ€ s t, s ∈ T β†’ t ∈ T β†’ s ∩ t ∈ T) ∧ (βˆ€s, (βˆ€t ∈ s, t ∈ T) β†’ sUnion s ∈ T)
exercise_13_4b1
valid
/-- 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$.-/
theorem exercise_13_4b1 (X I : Type*) (T : I β†’ Set (Set X)) (h : βˆ€ i, is_topology X (T i)) : βˆƒ! T', is_topology X T' ∧ (βˆ€ i, T i βŠ† T') ∧ βˆ€ T'', is_topology X T'' β†’ (βˆ€ i, T i βŠ† T'') β†’ T'' βŠ† T' :=
X : Type u_1 I : Type u_2 T : I β†’ Set (Set X) h : βˆ€ (i : I), is_topology X (T i) ⊒ βˆƒ! T', is_topology X T' ∧ (βˆ€ (i : I), T i βŠ† T') ∧ βˆ€ (T'' : Set (Set X)), is_topology X T'' β†’ (βˆ€ (i : I), T i βŠ† T'') β†’ T'' βŠ† T'
import Mathlib open Filter Set TopologicalSpace open scoped Topology def is_topology (X : Type*) (T : Set (Set X)) := univ ∈ T ∧ (βˆ€ s t, s ∈ T β†’ t ∈ T β†’ s ∩ t ∈ T) ∧ (βˆ€s, (βˆ€t ∈ s, t ∈ T) β†’ sUnion s ∈ T)
exercise_13_5a
valid
/-- 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}$.-/
theorem exercise_13_5a {X : Type*} [TopologicalSpace X] (A : Set (Set X)) (hA : IsTopologicalBasis A) : generateFrom A = generateFrom (sInter {T | is_topology X T ∧ A βŠ† T}) :=
X : Type u_1 inst✝ : TopologicalSpace X A : Set (Set X) hA : IsTopologicalBasis A ⊒ generateFrom A = generateFrom (β‹‚β‚€ {T | is_topology X T ∧ A βŠ† T})
import Mathlib open Filter Set TopologicalSpace open scoped Topology def is_topology (X : Type*) (T : Set (Set X)) := univ ∈ T ∧ (βˆ€ s t, s ∈ T β†’ t ∈ T β†’ s ∩ t ∈ T) ∧ (βˆ€s, (βˆ€t ∈ s, t ∈ T) β†’ sUnion s ∈ T)
exercise_13_6
valid
/-- Show that the lower limit topology $\mathbb{R}_l$ and $K$-topology $\mathbb{R}_K$ are not comparable.-/
theorem exercise_13_6 : Β¬ (βˆ€ U, Rl.IsOpen U β†’ K_topology.IsOpen U) ∧ Β¬ (βˆ€ U, K_topology.IsOpen U β†’ Rl.IsOpen U) :=
⊒ (Β¬βˆ€ (U : Set ℝ), TopologicalSpace.IsOpen U β†’ TopologicalSpace.IsOpen U) ∧ Β¬βˆ€ (U : Set ℝ), TopologicalSpace.IsOpen U β†’ TopologicalSpace.IsOpen U
import Mathlib open Filter Set TopologicalSpace open scoped Topology def lower_limit_topology (X : Type) [Preorder X] := generateFrom {S : Set X | βˆƒ a b, a < b ∧ S = Ico a b} def Rl := lower_limit_topology ℝ def K : Set ℝ := {r | βˆƒ n : β„•, r = 1 / n} def K_topology := generateFrom ({S : Set ℝ | βˆƒ a b, a < b ∧ S = Ioo a b} βˆͺ {S : Set ℝ | βˆƒ a b, a < b ∧ S = Ioo a b \ K})
exercise_13_8b
valid
/-- 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}$.-/
theorem exercise_13_8b : (generateFrom {S : Set ℝ | βˆƒ a b : β„š, a < b ∧ S = Ico ↑a ↑b}).IsOpen β‰  (lower_limit_topology ℝ).IsOpen :=
⊒ TopologicalSpace.IsOpen β‰  TopologicalSpace.IsOpen
import Mathlib open Filter Set TopologicalSpace open scoped Topology def lower_limit_topology (X : Type) [Preorder X] := generateFrom {S : Set X | βˆƒ a b, a < b ∧ S = Ico a b}
exercise_16_4
valid
/-- A map $f: X \rightarrow Y$ is said to be an open map if for every open set $U$ of $X$, the set $f(U)$ is open in $Y$. Show that $\pi_{1}: X \times Y \rightarrow X$ and $\pi_{2}: X \times Y \rightarrow Y$ are open maps.-/
theorem exercise_16_4 {X Y : Type*} [TopologicalSpace X] [TopologicalSpace Y] (π₁ : X Γ— Y β†’ X) (Ο€β‚‚ : X Γ— Y β†’ Y) (h₁ : π₁ = Prod.fst) (hβ‚‚ : Ο€β‚‚ = Prod.snd) : IsOpenMap π₁ ∧ IsOpenMap Ο€β‚‚ :=
X : Type u_1 Y : Type u_2 inst✝¹ : TopologicalSpace X inst✝ : TopologicalSpace Y π₁ : X Γ— Y β†’ X Ο€β‚‚ : X Γ— Y β†’ Y h₁ : π₁ = Prod.fst hβ‚‚ : Ο€β‚‚ = Prod.snd ⊒ IsOpenMap π₁ ∧ IsOpenMap Ο€β‚‚
import Mathlib open Filter Set TopologicalSpace open scoped Topology
exercise_17_4
valid
/-- Show that if $U$ is open in $X$ and $A$ is closed in $X$, then $U-A$ is open in $X$, and $A-U$ is closed in $X$.-/
theorem exercise_17_4 {X : Type*} [TopologicalSpace X] (U A : Set X) (hU : IsOpen U) (hA : IsClosed A) : IsOpen (U \ A) ∧ IsClosed (A \ U) :=
X : Type u_1 inst✝ : TopologicalSpace X U A : Set X hU : IsOpen U hA : IsClosed A ⊒ IsOpen (U \ A) ∧ IsClosed (A \ U)
import Mathlib open Filter Set TopologicalSpace open scoped Topology
exercise_18_8b
valid
/-- Let $Y$ be an ordered set in the order topology. Let $f, g: X \rightarrow Y$ be continuous. Let $h: X \rightarrow Y$ be the function $h(x)=\min \{f(x), g(x)\}.$ Show that $h$ is continuous.-/
theorem exercise_18_8b {X Y : Type*} [TopologicalSpace X] [TopologicalSpace Y] [LinearOrder Y] [OrderTopology Y] {f g : X β†’ Y} (hf : Continuous f) (hg : Continuous g) : Continuous (Ξ» x => min (f x) (g x)) :=
X : Type u_1 Y : Type u_2 inst✝³ : TopologicalSpace X inst✝² : TopologicalSpace Y inst✝¹ : LinearOrder Y inst✝ : OrderTopology Y f g : X β†’ Y hf : Continuous f hg : Continuous g ⊒ Continuous fun x => min (f x) (g x)
import Mathlib open Filter Set TopologicalSpace open scoped Topology
exercise_19_6a
valid
/-- Let $\mathbf{x}_1, \mathbf{x}_2, \ldots$ be a sequence of the points of the product space $\prod X_\alpha$. Show that this sequence converges to the point $\mathbf{x}$ if and only if the sequence $\pi_\alpha(\mathbf{x}_i)$ converges to $\pi_\alpha(\mathbf{x})$ for each $\alpha$.-/
theorem exercise_19_6a {n : β„•} {f : Fin n β†’ Type*} {x : β„• β†’ Ξ a, f a} (y : Ξ i, f i) [Ξ a, TopologicalSpace (f a)] : Tendsto x atTop (𝓝 y) ↔ βˆ€ i, Tendsto (Ξ» j => (x j) i) atTop (𝓝 (y i)) :=
n : β„• f : Fin n β†’ Type u_1 x : β„• β†’ (a : Fin n) β†’ f a y : (i : Fin n) β†’ f i inst✝ : (a : Fin n) β†’ TopologicalSpace (f a) ⊒ Tendsto x atTop (𝓝 y) ↔ βˆ€ (i : Fin n), Tendsto (fun j => x j i) atTop (𝓝 (y i))
import Mathlib open Filter Set TopologicalSpace open scoped Topology
exercise_21_6a
valid
/-- Define $f_{n}:[0,1] \rightarrow \mathbb{R}$ by the equation $f_{n}(x)=x^{n}$. Show that the sequence $\left(f_{n}(x)\right)$ converges for each $x \in[0,1]$.-/
theorem exercise_21_6a (f : β„• β†’ I β†’ ℝ ) (h : βˆ€ x n, f n x = x ^ n) : βˆ€ x, βˆƒ y, Tendsto (Ξ» n => f n x) atTop (𝓝 y) :=
f : β„• β†’ ↑I β†’ ℝ h : βˆ€ (x : ↑I) (n : β„•), f n x = ↑x ^ n ⊒ βˆ€ (x : ↑I), βˆƒ y, Tendsto (fun n => f n x) atTop (𝓝 y)
import Mathlib open Filter Set TopologicalSpace open scoped Topology abbrev I : Set ℝ := Icc 0 1
exercise_21_8
valid
/-- Let $X$ be a topological space and let $Y$ be a metric space. Let $f_{n}: X \rightarrow Y$ be a sequence of continuous functions. Let $x_{n}$ be a sequence of points of $X$ converging to $x$. Show that if the sequence $\left(f_{n}\right)$ converges uniformly to $f$, then $\left(f_{n}\left(x_{n}\right)\right)$ converges to $f(x)$.-/
theorem exercise_21_8 {X : Type*} [TopologicalSpace X] {Y : Type*} [MetricSpace Y] {f : β„• β†’ X β†’ Y} {x : β„• β†’ X} (hf : βˆ€ n, Continuous (f n)) (xβ‚€ : X) (hx : Tendsto x atTop (𝓝 xβ‚€)) (fβ‚€ : X β†’ Y) (hh : TendstoUniformly f fβ‚€ atTop) : Tendsto (Ξ» n => f n (x n)) atTop (𝓝 (fβ‚€ xβ‚€)) :=
X : Type u_1 inst✝¹ : TopologicalSpace X Y : Type u_2 inst✝ : MetricSpace Y f : β„• β†’ X β†’ Y x : β„• β†’ X hf : βˆ€ (n : β„•), Continuous (f n) xβ‚€ : X hx : Tendsto x atTop (𝓝 xβ‚€) fβ‚€ : X β†’ Y hh : TendstoUniformly f fβ‚€ atTop ⊒ Tendsto (fun n => f n (x n)) atTop (𝓝 (fβ‚€ xβ‚€))
import Mathlib open Filter Set TopologicalSpace open scoped Topology
exercise_22_2b
valid
/-- 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.-/
theorem exercise_22_2b {X : Type*} [TopologicalSpace X] {A : Set X} (r : X β†’ A) (hr : Continuous r) (h : βˆ€ x : A, r x = x) : QuotientMap r :=
X : Type u_1 inst✝ : TopologicalSpace X A : Set X r : X β†’ ↑A hr : Continuous r h : βˆ€ (x : ↑A), r ↑x = x ⊒ QuotientMap r
import Mathlib open Filter Set TopologicalSpace open scoped Topology
exercise_23_2
valid
/-- 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.-/
theorem exercise_23_2 {X : Type*} [TopologicalSpace X] {A : β„• β†’ Set X} (hA : βˆ€ n, IsConnected (A n)) (hAn : βˆ€ n, A n ∩ A (n + 1) β‰  βˆ…) : IsConnected (⋃ n, A n) :=
X : Type u_1 inst✝ : TopologicalSpace X A : β„• β†’ Set X hA : βˆ€ (n : β„•), IsConnected (A n) hAn : βˆ€ (n : β„•), A n ∩ A (n + 1) β‰  βˆ… ⊒ IsConnected (⋃ n, A n)
import Mathlib open Filter Set TopologicalSpace open scoped Topology
exercise_23_4
valid
/-- Show that if $X$ is an infinite set, it is connected in the finite complement topology.-/
theorem exercise_23_4 {X : Type*} [TopologicalSpace X] [CofiniteTopology X] (s : Set X) : Infinite s β†’ IsConnected s :=
X : Type u_1 inst✝¹ : TopologicalSpace X inst✝ : CofiniteTopology X s : Set X ⊒ Infinite ↑s β†’ IsConnected s
import Mathlib open Filter Set TopologicalSpace open scoped Topology set_option checkBinderAnnotations false
exercise_23_9
valid
/-- 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.-/
theorem exercise_23_9 {X Y : Type*} [TopologicalSpace X] [TopologicalSpace Y] (A₁ Aβ‚‚ : Set X) (B₁ Bβ‚‚ : Set Y) (hA : A₁ βŠ‚ Aβ‚‚) (hB : B₁ βŠ‚ Bβ‚‚) (hA : IsConnected Aβ‚‚) (hB : IsConnected Bβ‚‚) : IsConnected ({x | βˆƒ a b, x = (a, b) ∧ a ∈ Aβ‚‚ ∧ b ∈ Bβ‚‚} \ {x | βˆƒ a b, x = (a, b) ∧ a ∈ A₁ ∧ b ∈ B₁}) :=
X : Type u_1 Y : Type u_2 inst✝¹ : TopologicalSpace X inst✝ : TopologicalSpace Y A₁ Aβ‚‚ : Set X B₁ Bβ‚‚ : Set Y hA✝ : A₁ βŠ‚ Aβ‚‚ hB✝ : B₁ βŠ‚ Bβ‚‚ hA : IsConnected Aβ‚‚ hB : IsConnected Bβ‚‚ ⊒ IsConnected ({x | βˆƒ a b, x = (a, b) ∧ a ∈ Aβ‚‚ ∧ b ∈ Bβ‚‚} \ {x | βˆƒ a b, x = (a, b) ∧ a ∈ A₁ ∧ b ∈ B₁})
import Mathlib open Filter Set TopologicalSpace open scoped Topology
exercise_24_2
valid
/-- 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)$.-/
theorem exercise_24_2 {f : (Metric.sphere 0 1 : Set ℝ) β†’ ℝ} (hf : Continuous f) : βˆƒ x, f x = f (-x) :=
f : ↑(Metric.sphere 0 1) β†’ ℝ hf : Continuous f ⊒ βˆƒ x, f x = f (-x)
import Mathlib open Filter Set TopologicalSpace open scoped Topology
exercise_25_4
valid
/-- Let $X$ be locally path connected. Show that every connected open set in $X$ is path connected.-/
theorem exercise_25_4 {X : Type*} [TopologicalSpace X] [LocPathConnectedSpace X] (U : Set X) (hU : IsOpen U) (hcU : IsConnected U) : IsPathConnected U :=
X : Type u_1 inst✝¹ : TopologicalSpace X inst✝ : LocPathConnectedSpace X U : Set X hU : IsOpen U hcU : IsConnected U ⊒ IsPathConnected U
import Mathlib open Filter Set TopologicalSpace open scoped Topology
exercise_26_11
valid
/-- Let $X$ be a compact Hausdorff space. Let $\mathcal{A}$ be a collection of closed connected subsets of $X$ that is simply ordered by proper inclusion. Then $Y=\bigcap_{A \in \mathcal{A}} A$ is connected.-/
theorem exercise_26_11 {X : Type*} [TopologicalSpace X] [CompactSpace X] [T2Space X] (A : Set (Set X)) (hA : βˆ€ (a b : Set X), a ∈ A β†’ b ∈ A β†’ a βŠ† b ∨ b βŠ† a) (hA' : βˆ€ a ∈ A, IsClosed a) (hA'' : βˆ€ a ∈ A, IsConnected a) : IsConnected (β‹‚β‚€ A) :=
X : Type u_1 inst✝² : TopologicalSpace X inst✝¹ : CompactSpace X inst✝ : T2Space X A : Set (Set X) hA : βˆ€ (a b : Set X), a ∈ A β†’ b ∈ A β†’ a βŠ† b ∨ b βŠ† a hA' : βˆ€ a ∈ A, IsClosed a hA'' : βˆ€ a ∈ A, IsConnected a ⊒ IsConnected (β‹‚β‚€ A)
import Mathlib open Filter Set TopologicalSpace open scoped Topology
exercise_27_4
valid
/-- Show that a connected metric space having more than one point is uncountable.-/
theorem exercise_27_4 {X : Type*} [MetricSpace X] [ConnectedSpace X] (hX : βˆƒ x y : X, x β‰  y) : Β¬ Countable (univ : Set X) :=
X : Type u_1 inst✝¹ : MetricSpace X inst✝ : ConnectedSpace X hX : βˆƒ x y, x β‰  y ⊒ Β¬Countable ↑univ
import Mathlib open Filter Set TopologicalSpace open scoped Topology
exercise_28_5
valid
/-- 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.-/
theorem exercise_28_5 (X : Type*) [TopologicalSpace X] : countably_compact X ↔ βˆ€ (C : β„• β†’ Set X), (βˆ€ n, IsClosed (C n)) ∧ (βˆ€ n, C n β‰  βˆ…) ∧ (βˆ€ n, C n βŠ† C (n + 1)) β†’ βˆƒ x, βˆ€ n, x ∈ C n :=
X : Type u_1 inst✝ : TopologicalSpace X ⊒ countably_compact X ↔ βˆ€ (C : β„• β†’ Set X), ((βˆ€ (n : β„•), IsClosed (C n)) ∧ (βˆ€ (n : β„•), C n β‰  βˆ…) ∧ βˆ€ (n : β„•), C n βŠ† C (n + 1)) β†’ βˆƒ x, βˆ€ (n : β„•), x ∈ C n
import Mathlib open Filter Set TopologicalSpace open scoped Topology def countably_compact (X : Type*) [TopologicalSpace X] := βˆ€ U : β„• β†’ Set X, (βˆ€ i, IsOpen (U i)) ∧ ((univ : Set X) βŠ† ⋃ i, U i) β†’ (βˆƒ t : Finset β„•, (univ : Set X) βŠ† ⋃ i ∈ t, U i)
exercise_29_1
valid
/-- Show that the rationals $\mathbb{Q}$ are not locally compact.-/
theorem exercise_29_1 : Β¬ LocallyCompactSpace β„š :=
⊒ Β¬LocallyCompactSpace β„š
import Mathlib open Filter Set TopologicalSpace open scoped Topology
exercise_29_10
valid
/-- 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$.-/
theorem exercise_29_10 {X : Type*} [TopologicalSpace X] [T2Space X] (x : X) (hx : βˆƒ U : Set X, x ∈ U ∧ IsOpen U ∧ (βˆƒ K : Set X, U βŠ‚ K ∧ IsCompact K)) (U : Set X) (hU : IsOpen U) (hxU : x ∈ U) : βˆƒ (V : Set X), IsOpen V ∧ x ∈ V ∧ IsCompact (closure V) ∧ closure V βŠ† U :=
X : Type u_1 inst✝¹ : TopologicalSpace X inst✝ : T2Space X x : X hx : βˆƒ U, x ∈ U ∧ IsOpen U ∧ βˆƒ K, U βŠ‚ K ∧ IsCompact K U : Set X hU : IsOpen U hxU : x ∈ U ⊒ βˆƒ V, IsOpen V ∧ x ∈ V ∧ IsCompact (closure V) ∧ closure V βŠ† U
import Mathlib open Filter Set TopologicalSpace open scoped Topology
exercise_30_13
valid
/-- Show that if $X$ has a countable dense subset, every collection of disjoint open sets in $X$ is countable.-/
theorem exercise_30_13 {X : Type*} [TopologicalSpace X] (h : βˆƒ (s : Set X), Countable s ∧ Dense s) (U : Set (Set X)) (hU : βˆ€ (x y : Set X), x ∈ U β†’ y ∈ U β†’ x β‰  y β†’ x ∩ y = βˆ…) : Countable U :=
X : Type u_1 inst✝ : TopologicalSpace X h : βˆƒ s, Countable ↑s ∧ Dense s U : Set (Set X) hU : βˆ€ (x y : Set X), x ∈ U β†’ y ∈ U β†’ x β‰  y β†’ x ∩ y = βˆ… ⊒ Countable ↑U
import Mathlib open Filter Set TopologicalSpace open scoped Topology
exercise_31_2
valid
/-- Show that if $X$ is normal, every pair of disjoint closed sets have neighborhoods whose closures are disjoint.-/
theorem exercise_31_2 {X : Type*} [TopologicalSpace X] [NormalSpace X] {A B : Set X} (hA : IsClosed A) (hB : IsClosed B) (hAB : Disjoint A B) : βˆƒ (U V : Set X), IsOpen U ∧ IsOpen V ∧ A βŠ† U ∧ B βŠ† V ∧ closure U ∩ closure V = βˆ… :=
X : Type u_1 inst✝¹ : TopologicalSpace X inst✝ : NormalSpace X A B : Set X hA : IsClosed A hB : IsClosed B hAB : Disjoint A B ⊒ βˆƒ U V, IsOpen U ∧ IsOpen V ∧ A βŠ† U ∧ B βŠ† V ∧ closure U ∩ closure V = βˆ…
import Mathlib open Filter Set TopologicalSpace open scoped Topology
exercise_32_1
valid
/-- Show that a closed subspace of a normal space is normal.-/
theorem exercise_32_1 {X : Type*} [TopologicalSpace X] (hX : NormalSpace X) (A : Set X) (hA : IsClosed A) : NormalSpace {x // x ∈ A} :=
X : Type u_1 inst✝ : TopologicalSpace X hX : NormalSpace X A : Set X hA : IsClosed A ⊒ NormalSpace { x // x ∈ A }
import Mathlib open Filter Set TopologicalSpace open scoped Topology
exercise_32_2b
valid
/-- Show that if $\prod X_\alpha$ is regular, then so is $X_\alpha$. Assume that each $X_\alpha$ is nonempty.-/
theorem exercise_32_2b {ΞΉ : Type*} {X : ΞΉ β†’ Type*} [βˆ€ i, TopologicalSpace (X i)] (h : βˆ€ i, Nonempty (X i)) (h2 : RegularSpace (Ξ  i, X i)) : βˆ€ i, RegularSpace (X i) :=
ΞΉ : Type u_1 X : ΞΉ β†’ Type u_2 inst✝ : (i : ΞΉ) β†’ TopologicalSpace (X i) h : βˆ€ (i : ΞΉ), Nonempty (X i) h2 : RegularSpace ((i : ΞΉ) β†’ X i) ⊒ βˆ€ (i : ΞΉ), RegularSpace (X i)
import Mathlib open Filter Set TopologicalSpace open scoped Topology
exercise_32_3
valid
/-- Show that every locally compact Hausdorff space is regular.-/
theorem exercise_32_3 {X : Type*} [TopologicalSpace X] (hX : LocallyCompactSpace X) (hX' : T2Space X) : RegularSpace X :=
X : Type u_1 inst✝ : TopologicalSpace X hX : LocallyCompactSpace X hX' : T2Space X ⊒ RegularSpace X
import Mathlib open Filter Set TopologicalSpace open scoped Topology
exercise_33_8
valid
/-- 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\}$.-/
theorem exercise_33_8 (X : Type*) [TopologicalSpace X] [RegularSpace X] (h : βˆ€ x A, IsClosed A ∧ Β¬ x ∈ A β†’ βˆƒ (f : X β†’ I), Continuous f ∧ f x = (1 : I) ∧ f '' A = {0}) (A B : Set X) (hA : IsClosed A) (hB : IsClosed B) (hAB : Disjoint A B) (hAc : IsCompact A) : βˆƒ (f : X β†’ I), Continuous f ∧ f '' A = {0} ∧ f '' B = {1} :=
X : Type u_1 inst✝¹ : TopologicalSpace X inst✝ : RegularSpace X h : βˆ€ (x : X) (A : Set X), IsClosed A ∧ x βˆ‰ A β†’ βˆƒ f, Continuous f ∧ f x = 1 ∧ f '' A = {0} A B : Set X hA : IsClosed A hB : IsClosed B hAB : Disjoint A B hAc : IsCompact A ⊒ βˆƒ f, Continuous f ∧ f '' A = {0} ∧ f '' B = {1}
import Mathlib open Filter Set TopologicalSpace open scoped Topology abbrev I : Set ℝ := Icc 0 1
exercise_38_6
valid
/-- Let $X$ be completely regular. Show that $X$ is connected if and only if the Stone-Čech compactification of $X$ is connected.-/
theorem exercise_38_6 {X : Type*} (X : Type*) [TopologicalSpace X] [RegularSpace X] (h : βˆ€ x A, IsClosed A ∧ Β¬ x ∈ A β†’ βˆƒ (f : X β†’ I), Continuous f ∧ f x = (1 : I) ∧ f '' A = {0}) : IsConnected (univ : Set X) ↔ IsConnected (univ : Set (StoneCech X)) :=
X✝ : Type u_1 X : Type u_2 inst✝¹ : TopologicalSpace X inst✝ : RegularSpace X h : βˆ€ (x : X) (A : Set X), IsClosed A ∧ x βˆ‰ A β†’ βˆƒ f, Continuous f ∧ f x = 1 ∧ f '' A = {0} ⊒ IsConnected univ ↔ IsConnected univ
import Mathlib open Filter Set TopologicalSpace open scoped Topology abbrev I : Set ℝ := Icc 0 1
exercise_1_27
valid
/-- For all odd $n$ show that $8 \mid n^{2}-1$.-/
theorem exercise_1_27 {n : β„•} (hn : Odd n) : 8 ∣ (n^2 - 1) :=
n : β„• hn : Odd n ⊒ 8 ∣ n ^ 2 - 1
import Mathlib open Real open scoped BigOperators
exercise_1_31
valid
/-- Show that 2 is divisible by $(1+i)^{2}$ in $\mathbb{Z}[i]$.-/
theorem exercise_1_31 : (⟨1, 1⟩ : GaussianInt) ^ 2 ∣ 2 :=
⊒ { re := 1, im := 1 } ^ 2 ∣ 2
import Mathlib open Real open scoped BigOperators
exercise_2_21
valid
/-- 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)$.-/
theorem exercise_2_21 {l : β„• β†’ ℝ} (hl : βˆ€ p n : β„•, p.Prime β†’ l (p^n) = log p ) (hl1 : βˆ€ m : β„•, Β¬ IsPrimePow m β†’ l m = 0) : l = Ξ» n => βˆ‘ d : Nat.divisors n, ArithmeticFunction.moebius (n/d) * log d :=
l : β„• β†’ ℝ hl : βˆ€ (p n : β„•), p.Prime β†’ l (p ^ n) = (↑p).log hl1 : βˆ€ (m : β„•), Β¬IsPrimePow m β†’ l m = 0 ⊒ l = fun n => βˆ‘ d : { x // x ∈ n.divisors }, ↑(ArithmeticFunction.moebius (n / ↑d)) * (↑↑d).log
import Mathlib open Real open scoped BigOperators
exercise_3_1
valid
/-- Show that there are infinitely many primes congruent to $-1$ modulo 6 .-/
theorem exercise_3_1 : Infinite {p : Nat.Primes // p ≑ -1 [ZMOD 6]} :=
⊒ Infinite { p // ↑↑p ≑ -1 [ZMOD 6] }
import Mathlib open Real open scoped BigOperators
exercise_3_5
valid
/-- Show that the equation $7 x^{3}+2=y^{3}$ has no solution in integers.-/
theorem exercise_3_5 : Β¬ βˆƒ x y : β„€, 7*x^3 + 2 = y^3 :=
⊒ Β¬βˆƒ x y, 7 * x ^ 3 + 2 = y ^ 3
import Mathlib open Real open scoped BigOperators
exercise_3_14
valid
/-- 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)$.-/
theorem exercise_3_14 {p q n : β„•} (hp0 : p.Prime ∧ p > 2) (hq0 : q.Prime ∧ q > 2) (hpq0 : p β‰  q) (hpq1 : p - 1 ∣ q - 1) (hn : n.gcd (p*q) = 1) : n^(q-1) ≑ 1 [MOD p*q] :=
p q n : β„• hp0 : p.Prime ∧ p > 2 hq0 : q.Prime ∧ q > 2 hpq0 : p β‰  q hpq1 : p - 1 ∣ q - 1 hn : n.gcd (p * q) = 1 ⊒ n ^ (q - 1) ≑ 1 [MOD p * q]
import Mathlib open Real open scoped BigOperators
exercise_4_5
valid
/-- 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$.-/
theorem exercise_4_5 {p t : β„•} (hp0 : p.Prime) (hp1 : p = 4*t + 3) (a : ZMod p) : IsPrimitiveRoot a p ↔ ((-a) ^ ((p-1)/2) = 1 ∧ βˆ€ (k : β„•), k < (p-1)/2 β†’ (-a)^k β‰  1) :=
p t : β„• hp0 : p.Prime hp1 : p = 4 * t + 3 a : ZMod p ⊒ IsPrimitiveRoot a p ↔ (-a) ^ ((p - 1) / 2) = 1 ∧ βˆ€ k < (p - 1) / 2, (-a) ^ k β‰  1
import Mathlib open Real open scoped BigOperators
exercise_4_8
valid
/-- 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$.-/
theorem exercise_4_8 {p a : β„•} (hp : Odd p) : IsPrimitiveRoot a p ↔ (βˆ€ q : β„•, q ∣ (p-1) β†’ q.Prime β†’ Β¬ a^(p-1) ≑ 1 [MOD p]) :=
p a : β„• hp : Odd p ⊒ IsPrimitiveRoot a p ↔ βˆ€ (q : β„•), q ∣ p - 1 β†’ q.Prime β†’ Β¬a ^ (p - 1) ≑ 1 [MOD p]
import Mathlib open Real open scoped BigOperators
exercise_5_13
valid
/-- Show that any prime divisor of $x^{4}-x^{2}+1$ is congruent to 1 modulo 12 .-/
theorem exercise_5_13 {p x: β„€} (hp : Prime p) (hpx : p ∣ (x^4 - x^2 + 1)) : p ≑ 1 [ZMOD 12] :=
p x : β„€ hp : Prime p hpx : p ∣ x ^ 4 - x ^ 2 + 1 ⊒ p ≑ 1 [ZMOD 12]
import Mathlib open Real open scoped BigOperators
exercise_5_37
valid
/-- Show that if $a$ is negative then $p \equiv q(4 a) together with p\not | a$ imply $(a / p)=(a / q)$.-/
theorem exercise_5_37 {p q : β„•} [Fact (p.Prime)] [Fact (q.Prime)] {a : β„€} (ha : a < 0) (h0 : p ≑ q [ZMOD 4*a]) (h1 : Β¬ ((p : β„€) ∣ a)) : legendreSym p a = legendreSym q a :=
p q : β„• inst✝¹ : Fact p.Prime inst✝ : Fact q.Prime a : β„€ ha : a < 0 h0 : ↑p ≑ ↑q [ZMOD 4 * a] h1 : ¬↑p ∣ a ⊒ legendreSym p a = legendreSym q a
import Mathlib open Real open scoped BigOperators
exercise_18_4
valid
/-- Show that 1729 is the smallest positive integer expressible as the sum of two different integral cubes in two ways.-/
theorem exercise_18_4 {n : β„•} (hn : βˆƒ x y z w : β„€, x^3 + y^3 = n ∧ z^3 + w^3 = n ∧ x β‰  z ∧ x β‰  w ∧ y β‰  z ∧ y β‰  w) : n β‰₯ 1729 :=
n : β„• hn : βˆƒ x y z w, x ^ 3 + y ^ 3 = ↑n ∧ z ^ 3 + w ^ 3 = ↑n ∧ x β‰  z ∧ x β‰  w ∧ y β‰  z ∧ y β‰  w ⊒ n β‰₯ 1729
import Mathlib open Real open scoped BigOperators
exercise_2020_b5
valid
/-- For $j \in\{1,2,3,4\}$, let $z_{j}$ be a complex number with $\left|z_{j}\right|=1$ and $z_{j} \neq 1$. Prove that $3-z_{1}-z_{2}-z_{3}-z_{4}+z_{1} z_{2} z_{3} z_{4} \neq 0 .$-/
theorem exercise_2020_b5 (z : Fin 4 β†’ β„‚) (hz0 : βˆ€ n, β€–z nβ€– < 1) (hz1 : βˆ€ n : Fin 4, z n β‰  1) : 3 - z 0 - z 1 - z 2 - z 3 + (z 0) * (z 1) * (z 2) * (z 3) β‰  0 :=
z : Fin 4 β†’ β„‚ hz0 : βˆ€ (n : Fin 4), β€–z nβ€– < 1 hz1 : βˆ€ (n : Fin 4), z n β‰  1 ⊒ 3 - z 0 - z 1 - z 2 - z 3 + z 0 * z 1 * z 2 * z 3 β‰  0
import Mathlib open scoped BigOperators open scoped BigOperators
exercise_2018_b2
valid
/-- 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\}$.-/
theorem exercise_2018_b2 (n : β„•) (hn : n > 0) (f : β„• β†’ β„‚ β†’ β„‚) (hf : βˆ€ n : β„•, f n = Ξ» (z : β„‚) => (βˆ‘ i : Fin n, (n-i)* z^(i : β„•))) : Β¬ (βˆƒ z : β„‚, β€–zβ€– ≀ 1 ∧ f n z = 0) :=
n : β„• hn : n > 0 f : β„• β†’ β„‚ β†’ β„‚ hf : βˆ€ (n : β„•), f n = fun z => βˆ‘ i : Fin n, (↑n - ↑↑i) * z ^ ↑i ⊒ Β¬βˆƒ z, β€–zβ€– ≀ 1 ∧ f n z = 0
import Mathlib open scoped BigOperators
exercise_2017_b3
valid
/-- 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.-/
theorem exercise_2017_b3 (f : ℝ β†’ ℝ) (c : β„• β†’ ℝ) (hf : f = Ξ» x => (βˆ‘' (i : β„•), (c i) * x^i)) (hc : βˆ€ n, c n = 0 ∨ c n = 1) (hf1 : f (2/3) = 3/2) : Irrational (f (1/2)) :=
f : ℝ β†’ ℝ c : β„• β†’ ℝ hf : f = fun x => βˆ‘' (i : β„•), c i * x ^ i hc : βˆ€ (n : β„•), c n = 0 ∨ c n = 1 hf1 : f (2 / 3) = 3 / 2 ⊒ Irrational (f (1 / 2))
import Mathlib open scoped BigOperators
exercise_2010_a4
valid
/-- Prove that for each positive integer $n$, the number $10^{10^{10^n}}+10^{10^n}+10^n-1$ is not prime.-/
theorem exercise_2010_a4 (n : β„•) : Β¬ Nat.Prime (10^10^10^n + 10^10^n + 10^n - 1) :=
n : β„• ⊒ Β¬(10 ^ 10 ^ 10 ^ n + 10 ^ 10 ^ n + 10 ^ n - 1).Prime
import Mathlib open scoped BigOperators
exercise_2000_a2
valid
/-- 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.-/
theorem exercise_2000_a2 : βˆ€ N : β„•, βˆƒ n : β„•, n > N ∧ βˆƒ i : Fin 6 β†’ β„•, n = (i 0)^2 + (i 1)^2 ∧ n + 1 = (i 2)^2 + (i 3)^2 ∧ n + 2 = (i 4)^2 + (i 5)^2 :=
⊒ βˆ€ (N : β„•), βˆƒ n > N, βˆƒ i, n = i 0 ^ 2 + i 1 ^ 2 ∧ n + 1 = i 2 ^ 2 + i 3 ^ 2 ∧ n + 2 = i 4 ^ 2 + i 5 ^ 2
import Mathlib open scoped BigOperators
exercise_1998_a3
valid
/-- Let $f$ be a real function on the real line with continuous third derivative. Prove that there exists a point $a$ such that-/
theorem exercise_1998_a3 (f : ℝ β†’ ℝ) (hf : ContDiff ℝ 3 f) : βˆƒ a : ℝ, (f a) * (deriv f a) * (iteratedDeriv 2 f a) * (iteratedDeriv 3 f a) β‰₯ 0 :=
f : ℝ β†’ ℝ hf : ContDiff ℝ 3 f ⊒ βˆƒ a, f a * deriv f a * iteratedDeriv 2 f a * iteratedDeriv 3 f a β‰₯ 0
import Mathlib open scoped BigOperators