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