name
stringlengths
12
16
split
stringclasses
1 value
informal_prefix
stringlengths
10
481
formal_statement
stringlengths
50
348
goal
stringlengths
22
299
header
stringclasses
17 values
formal_proof
stringclasses
1 value
exercise_1_13b
test
/-- Suppose that $f$ is holomorphic in an open set $\Omega$. Prove that if $\text{Im}(f)$ is constant, then $f$ is constant.-/
theorem exercise_1_13b {f : β„‚ β†’ β„‚} (Ξ© : Set β„‚) (a b : Ξ©) (h : IsOpen Ξ©) (hf : DifferentiableOn β„‚ f Ξ©) (hc : βˆƒ (c : ℝ), βˆ€ z ∈ Ξ©, (f z).im = c) : f a = f b :=
f : β„‚ β†’ β„‚ Ξ© : Set β„‚ a b : ↑Ω h : IsOpen Ξ© hf : DifferentiableOn β„‚ f Ξ© hc : βˆƒ c, βˆ€ z ∈ Ξ©, (f z).im = c ⊒ f ↑a = f ↑b
import Mathlib open Complex Filter Function Metric Finset open scoped BigOperators Topology
exercise_1_19a
test
/-- Prove that the power series $\sum nz^n$ does not converge on any point of the unit circle.-/
theorem exercise_1_19a (z : β„‚) (hz : abs z = 1) (s : β„• β†’ β„‚) (h : s = (Ξ» n => βˆ‘ i in (range n), i * z ^ i)) : Β¬ βˆƒ y, Tendsto s atTop (𝓝 y) :=
z : β„‚ hz : Complex.abs z = 1 s : β„• β†’ β„‚ h : s = fun n => βˆ‘ i ∈ range n, ↑i * z ^ i ⊒ Β¬βˆƒ y, Tendsto s atTop (𝓝 y)
import Mathlib open Complex Filter Function Metric Finset open scoped BigOperators Topology
exercise_1_19c
test
/-- Prove that the power series $\sum zn/n$ converges at every point of the unit circle except $z = 1$.-/
theorem exercise_1_19c (z : β„‚) (hz : abs z = 1) (hz2 : z β‰  1) (s : β„• β†’ β„‚) (h : s = (Ξ» n => βˆ‘ i in (range n), i * z / i)) : βˆƒ z, Tendsto s atTop (𝓝 z) :=
z : β„‚ hz : Complex.abs z = 1 hz2 : z β‰  1 s : β„• β†’ β„‚ h : s = fun n => βˆ‘ i ∈ range n, ↑i * z / ↑i ⊒ βˆƒ z, Tendsto s atTop (𝓝 z)
import Mathlib open Complex Filter Function Metric Finset open scoped BigOperators Topology
exercise_2_2
test
/-- Show that $\int_{0}^{\infty} \frac{\sin x}{x} d x=\frac{\pi}{2}$.-/
theorem exercise_2_2 : Tendsto (Ξ» y => ∫ x in (0 : ℝ)..y, Real.sin x / x) atTop (𝓝 (Real.pi / 2)) :=
⊒ Tendsto (fun y => ∫ (x : ℝ) in 0 ..y, x.sin / x) atTop (𝓝 (Real.pi / 2))
import Mathlib open Complex Filter Function Metric Finset open scoped BigOperators Topology
exercise_2_13
test
/-- Suppose $f$ is an analytic function defined everywhere in $\mathbb{C}$ and such that for each $z_0 \in \mathbb{C}$ at least one coefficient in the expansion $f(z) = \sum_{n=0}^\infty c_n(z - z_0)^n$ is equal to 0. Prove that $f$ is a polynomial.-/
theorem exercise_2_13 {f : β„‚ β†’ β„‚} (hf : βˆ€ zβ‚€ : β„‚, βˆƒ (s : Set β„‚) (c : β„• β†’ β„‚), IsOpen s ∧ zβ‚€ ∈ s ∧ βˆ€ z ∈ s, Tendsto (Ξ» n => βˆ‘ i in range n, (c i) * (z - zβ‚€)^i) atTop (𝓝 (f zβ‚€)) ∧ βˆƒ i, c i = 0) : βˆƒ (c : β„• β†’ β„‚) (n : β„•), f = Ξ» z => βˆ‘ i in range n, (c i) * z ^ n :=
f : β„‚ β†’ β„‚ hf : βˆ€ (zβ‚€ : β„‚), βˆƒ s c, IsOpen s ∧ zβ‚€ ∈ s ∧ βˆ€ z ∈ s, Tendsto (fun n => βˆ‘ i ∈ range n, c i * (z - zβ‚€) ^ i) atTop (𝓝 (f zβ‚€)) ∧ βˆƒ i, c i = 0 ⊒ βˆƒ c n, f = fun z => βˆ‘ i ∈ range n, c i * z ^ n
import Mathlib open Complex Filter Function Metric Finset open scoped BigOperators Topology
exercise_3_4
test
/-- Show that $ \int_{-\infty}^{\infty} \frac{x \sin x}{x^2 + a^2} dx = \pi e^{-a}$ for $a > 0$.-/
theorem exercise_3_4 (a : ℝ) (ha : 0 < a) : Tendsto (Ξ» y => ∫ x in -y..y, x * Real.sin x / (x ^ 2 + a ^ 2)) atTop (𝓝 (Real.pi * (Real.exp (-a)))) :=
a : ℝ ha : 0 < a ⊒ Tendsto (fun y => ∫ (x : ℝ) in -y..y, x * x.sin / (x ^ 2 + a ^ 2)) atTop (𝓝 (Real.pi * (-a).exp))
import Mathlib open Complex Filter Function Metric Finset open scoped BigOperators Topology
exercise_3_14
test
/-- Prove that all entire functions that are also injective take the form $f(z) = az + b$, $a, b \in \mathbb{C}$ and $a \neq 0$.-/
theorem exercise_3_14 {f : β„‚ β†’ β„‚} (hf : Differentiable β„‚ f) (hf_inj : Function.Injective f) : βˆƒ (a b : β„‚), f = (Ξ» z => a * z + b) ∧ a β‰  0 :=
f : β„‚ β†’ β„‚ hf : Differentiable β„‚ f hf_inj : Injective f ⊒ βˆƒ a b, (f = fun z => a * z + b) ∧ a β‰  0
import Mathlib open Complex Filter Function Metric Finset open scoped BigOperators Topology
exercise_5_1
test
/-- Prove that if $f$ is holomorphic in the unit disc, bounded and not identically zero, and $z_{1}, z_{2}, \ldots, z_{n}, \ldots$ are its zeros $\left(\left|z_{k}\right|<1\right)$, then $\sum_{n}\left(1-\left|z_{n}\right|\right)<\infty$.-/
theorem exercise_5_1 (f : β„‚ β†’ β„‚) (hf : DifferentiableOn β„‚ f (ball 0 1)) (hb : Bornology.IsBounded (Set.range f)) (h0 : f β‰  0) (zeros : β„• β†’ β„‚) (hz : βˆ€ n, f (zeros n) = 0) (hzz : Set.range zeros = {z | f z = 0 ∧ z ∈ (ball (0 : β„‚) 1)}) : βˆƒ (z : β„‚), Tendsto (Ξ» n => (βˆ‘ i in range n, (1 - zeros i))) atTop (𝓝 z) :=
f : β„‚ β†’ β„‚ hf : DifferentiableOn β„‚ f (ball 0 1) hb : Bornology.IsBounded (Set.range f) h0 : f β‰  0 zeros : β„• β†’ β„‚ hz : βˆ€ (n : β„•), f (zeros n) = 0 hzz : Set.range zeros = {z | f z = 0 ∧ z ∈ ball 0 1} ⊒ βˆƒ z, Tendsto (fun n => βˆ‘ i ∈ range n, (1 - zeros i)) atTop (𝓝 z)
import Mathlib open Complex Filter Function Metric Finset open scoped BigOperators Topology
exercise_1_1b
test
/-- If $r$ is rational $(r \neq 0)$ and $x$ is irrational, prove that $rx$ is irrational.-/
theorem exercise_1_1b (x : ℝ) (y : β„š) (h : y β‰  0) : ( Irrational x ) -> Irrational ( x * y ) :=
x : ℝ y : β„š h : y β‰  0 ⊒ Irrational x β†’ Irrational (x * ↑y)
import Mathlib open Topology Filter Real Complex TopologicalSpace Finset open scoped BigOperators
exercise_1_4
test
/-- Let $E$ be a nonempty subset of an ordered set; suppose $\alpha$ is a lower bound of $E$ and $\beta$ is an upper bound of $E$. Prove that $\alpha \leq \beta$.-/
theorem exercise_1_4 (Ξ± : Type*) [PartialOrder Ξ±] (s : Set Ξ±) (x y : Ξ±) (hβ‚€ : Set.Nonempty s) (h₁ : x ∈ lowerBounds s) (hβ‚‚ : y ∈ upperBounds s) : x ≀ y :=
Ξ± : Type u_1 inst✝ : PartialOrder Ξ± s : Set Ξ± x y : Ξ± hβ‚€ : s.Nonempty h₁ : x ∈ lowerBounds s hβ‚‚ : y ∈ upperBounds s ⊒ x ≀ y
import Mathlib open Topology Filter Real Complex TopologicalSpace Finset open scoped BigOperators
exercise_1_8
test
/-- Prove that no order can be defined in the complex field that turns it into an ordered field.-/
theorem exercise_1_8 : Β¬ βˆƒ (r : β„‚ β†’ β„‚ β†’ Prop), IsLinearOrder β„‚ r :=
⊒ Β¬βˆƒ r, IsLinearOrder β„‚ r
import Mathlib open Topology Filter Real Complex TopologicalSpace Finset open scoped BigOperators
exercise_1_12
test
/-- If $z_1, \ldots, z_n$ are complex, prove that $|z_1 + z_2 + \ldots + z_n| \leq |z_1| + |z_2| + \cdots + |z_n|$.-/
theorem exercise_1_12 (n : β„•) (f : β„• β†’ β„‚) : abs (βˆ‘ i in range n, f i) ≀ βˆ‘ i in range n, abs (f i) :=
n : β„• f : β„• β†’ β„‚ ⊒ Complex.abs (βˆ‘ i ∈ range n, f i) ≀ βˆ‘ i ∈ range n, Complex.abs (f i)
import Mathlib open Topology Filter Real Complex TopologicalSpace Finset open scoped BigOperators
exercise_1_14
test
/-- If $z$ is a complex number such that $|z|=1$, that is, such that $z \bar{z}=1$, compute $|1+z|^{2}+|1-z|^{2}$.-/
theorem exercise_1_14 (z : β„‚) (h : abs z = 1) : (abs (1 + z)) ^ 2 + (abs (1 - z)) ^ 2 = 4 :=
z : β„‚ h : Complex.abs z = 1 ⊒ Complex.abs (1 + z) ^ 2 + Complex.abs (1 - z) ^ 2 = 4
import Mathlib open Topology Filter Real Complex TopologicalSpace Finset open scoped BigOperators
exercise_1_17
test
/-- Prove that $|\mathbf{x}+\mathbf{y}|^{2}+|\mathbf{x}-\mathbf{y}|^{2}=2|\mathbf{x}|^{2}+2|\mathbf{y}|^{2}$ if $\mathbf{x} \in R^{k}$ and $\mathbf{y} \in R^{k}$.-/
theorem exercise_1_17 (n : β„•) (x y : EuclideanSpace ℝ (Fin n)) -- R^n : β€–x + yβ€–^2 + β€–x - yβ€–^2 = 2*β€–xβ€–^2 + 2*β€–yβ€–^2 :=
n : β„• x y : EuclideanSpace ℝ (Fin n) ⊒ β€–x + yβ€– ^ 2 + β€–x - yβ€– ^ 2 = 2 * β€–xβ€– ^ 2 + 2 * β€–yβ€– ^ 2
import Mathlib open Topology Filter Real Complex TopologicalSpace Finset open scoped BigOperators
exercise_1_18b
test
/-- If $k = 1$ and $\mathbf{x} \in R^{k}$, prove that there does not exist $\mathbf{y} \in R^{k}$ such that $\mathbf{y} \neq 0$ but $\mathbf{x} \cdot \mathbf{y}=0$-/
theorem exercise_1_18b : Β¬ βˆ€ (x : ℝ), βˆƒ (y : ℝ), y β‰  0 ∧ x * y = 0 :=
⊒ Β¬βˆ€ (x : ℝ), βˆƒ y, y β‰  0 ∧ x * y = 0
import Mathlib open Topology Filter Real Complex TopologicalSpace Finset open scoped BigOperators
exercise_2_19a
test
/-- If $A$ and $B$ are disjoint closed sets in some metric space $X$, prove that they are separated.-/
theorem exercise_2_19a {X : Type*} [MetricSpace X] (A B : Set X) (hA : IsClosed A) (hB : IsClosed B) (hAB : Disjoint A B) : SeparatedNhds A B :=
X : Type u_1 inst✝ : MetricSpace X A B : Set X hA : IsClosed A hB : IsClosed B hAB : Disjoint A B ⊒ SeparatedNhds A B
import Mathlib open Topology Filter Real Complex TopologicalSpace Finset open scoped BigOperators
exercise_2_25
test
/-- Prove that every compact metric space $K$ has a countable base.-/
theorem exercise_2_25 {K : Type*} [MetricSpace K] [CompactSpace K] : βˆƒ (B : Set (Set K)), Set.Countable B ∧ IsTopologicalBasis B :=
K : Type u_1 inst✝¹ : MetricSpace K inst✝ : CompactSpace K ⊒ βˆƒ B, B.Countable ∧ IsTopologicalBasis B
import Mathlib open Topology Filter Real Complex TopologicalSpace Finset open scoped BigOperators
exercise_2_27b
test
/-- Suppose $E\subset\mathbb{R}^k$ is uncountable, and let $P$ be the set of condensation points of $E$. Prove that at most countably many points of $E$ are not in $P$.-/
theorem exercise_2_27b (k : β„•) (E P : Set (EuclideanSpace ℝ (Fin k))) (hE : E.Nonempty ∧ Β¬ Set.Countable E) (hP : P = {x | βˆ€ U ∈ 𝓝 x, (P ∩ E).Nonempty ∧ Β¬ Set.Countable (P ∩ E)}) : Set.Countable (E \ P) :=
k : β„• E P : Set (EuclideanSpace ℝ (Fin k)) hE : E.Nonempty ∧ Β¬E.Countable hP : P = {x | βˆ€ U ∈ 𝓝 x, (P ∩ E).Nonempty ∧ Β¬(P ∩ E).Countable} ⊒ (E \ P).Countable
import Mathlib open Topology Filter Real Complex TopologicalSpace Finset open scoped BigOperators
exercise_2_29
test
/-- Prove that every open set in $\mathbb{R}$ is the union of an at most countable collection of disjoint segments.-/
theorem exercise_2_29 (U : Set ℝ) (hU : IsOpen U) : βˆƒ (f : β„• β†’ Set ℝ), (βˆ€ n, βˆƒ a b : ℝ, f n = {x | a < x ∧ x < b}) ∧ (βˆ€ n, f n βŠ† U) ∧ (βˆ€ n m, n β‰  m β†’ f n ∩ f m = βˆ…) ∧ U = ⋃ n, f n :=
U : Set ℝ hU : IsOpen U ⊒ βˆƒ f, (βˆ€ (n : β„•), βˆƒ a b, f n = {x | a < x ∧ x < b}) ∧ (βˆ€ (n : β„•), f n βŠ† U) ∧ (βˆ€ (n m : β„•), n β‰  m β†’ f n ∩ f m = βˆ…) ∧ U = ⋃ n, f n
import Mathlib open Topology Filter Real Complex TopologicalSpace Finset open scoped BigOperators
exercise_3_2a
test
/-- Prove that $\lim_{n \rightarrow \infty}\sqrt{n^2 + n} -n = 1/2$.-/
theorem exercise_3_2a : Tendsto (Ξ» (n : ℝ) => (sqrt (n^2 + n) - n)) atTop (𝓝 (1/2)) :=
⊒ Tendsto (fun n => √(n ^ 2 + n) - n) atTop (𝓝 (1 / 2))
import Mathlib open Topology Filter Real Complex TopologicalSpace Finset open scoped BigOperators
exercise_3_5
test
/-- For any two real sequences $\left\{a_{n}\right\},\left\{b_{n}\right\}$, prove that $\limsup _{n \rightarrow \infty}\left(a_{n}+b_{n}\right) \leq \limsup _{n \rightarrow \infty} a_{n}+\limsup _{n \rightarrow \infty} b_{n},$ provided the sum on the right is not of the form $\infty-\infty$.-/
theorem exercise_3_5 (a b : β„• β†’ ℝ) (h : limsup a + limsup b β‰  0) : limsup (Ξ» n => a n + b n) ≀ limsup a + limsup b :=
a b : β„• β†’ ℝ h : limsup a + limsup b β‰  0 ⊒ (limsup fun n => a n + b n) ≀ limsup a + limsup b
import Mathlib open Topology Filter Real Complex TopologicalSpace Finset open scoped BigOperators
exercise_3_7
test
/-- Prove that the convergence of $\Sigma a_{n}$ implies the convergence of $\sum \frac{\sqrt{a_{n}}}{n}$ if $a_n\geq 0$.-/
theorem exercise_3_7 (a : β„• β†’ ℝ) (h : βˆƒ y, (Tendsto (Ξ» n => (βˆ‘ i in (range n), a i)) atTop (𝓝 y))) : βˆƒ y, Tendsto (Ξ» n => (βˆ‘ i in (range n), sqrt (a i) / n)) atTop (𝓝 y) :=
a : β„• β†’ ℝ h : βˆƒ y, Tendsto (fun n => βˆ‘ i ∈ range n, a i) atTop (𝓝 y) ⊒ βˆƒ y, Tendsto (fun n => βˆ‘ i ∈ range n, √(a i) / ↑n) atTop (𝓝 y)
import Mathlib open Topology Filter Real Complex TopologicalSpace Finset open scoped BigOperators
exercise_3_13
test
/-- Prove that the Cauchy product of two absolutely convergent series converges absolutely.-/
theorem exercise_3_13 (a b : β„• β†’ ℝ) (ha : βˆƒ y, (Tendsto (Ξ» n => (βˆ‘ i in (range n), |a i|)) atTop (𝓝 y))) (hb : βˆƒ y, (Tendsto (Ξ» n => (βˆ‘ i in (range n), |b i|)) atTop (𝓝 y))) : βˆƒ y, (Tendsto (Ξ» n => (βˆ‘ i in (range n), Ξ» i => (βˆ‘ j in range (i + 1), a j * b (i - j)))) atTop (𝓝 y)) :=
a b : β„• β†’ ℝ ha : βˆƒ y, Tendsto (fun n => βˆ‘ i ∈ range n, |a i|) atTop (𝓝 y) hb : βˆƒ y, Tendsto (fun n => βˆ‘ i ∈ range n, |b i|) atTop (𝓝 y) ⊒ βˆƒ y, Tendsto (fun n => βˆ‘ i ∈ range n, fun i => βˆ‘ j ∈ range (i + 1), a j * b (i - j)) atTop (𝓝 y)
import Mathlib open Topology Filter Real Complex TopologicalSpace Finset open scoped BigOperators
exercise_3_21
test
/-- If $\left\{E_{n}\right\}$ is a sequence of closed nonempty and bounded sets in a complete metric space $X$, if $E_{n} \supset E_{n+1}$, and if $\lim _{n \rightarrow \infty} \operatorname{diam} E_{n}=0,$ then $\bigcap_{1}^{\infty} E_{n}$ consists of exactly one point.-/
theorem exercise_3_21 {X : Type*} [MetricSpace X] [CompleteSpace X] (E : β„• β†’ Set X) (hE : βˆ€ n, E n βŠƒ E (n + 1)) (hE' : Tendsto (Ξ» n => Metric.diam (E n)) atTop (𝓝 0)) : βˆƒ a, Set.iInter E = {a} :=
X : Type u_1 inst✝¹ : MetricSpace X inst✝ : CompleteSpace X E : β„• β†’ Set X hE : βˆ€ (n : β„•), E n βŠƒ E (n + 1) hE' : Tendsto (fun n => Metric.diam (E n)) atTop (𝓝 0) ⊒ βˆƒ a, Set.iInter E = {a}
import Mathlib open Topology Filter Real Complex TopologicalSpace Finset open scoped BigOperators
exercise_4_1a
test
/-- Suppose $f$ is a real function defined on $\mathbb{R}$ which satisfies $\lim_{h \rightarrow 0} f(x + h) - f(x - h) = 0$ for every $x \in \mathbb{R}$. Show that $f$ does not need to be continuous.-/
theorem exercise_4_1a : βˆƒ (f : ℝ β†’ ℝ), (βˆ€ (x : ℝ), Tendsto (Ξ» y => f (x + y) - f (x - y)) (𝓝 0) (𝓝 0)) ∧ Β¬ Continuous f :=
⊒ βˆƒ f, (βˆ€ (x : ℝ), Tendsto (fun y => f (x + y) - f (x - y)) (𝓝 0) (𝓝 0)) ∧ Β¬Continuous f
import Mathlib open Topology Filter Real Complex TopologicalSpace Finset open scoped BigOperators
exercise_4_3
test
/-- Let $f$ be a continuous real function on a metric space $X$. Let $Z(f)$ (the zero set of $f$ ) be the set of all $p \in X$ at which $f(p)=0$. Prove that $Z(f)$ is closed.-/
theorem exercise_4_3 {Ξ± : Type} [MetricSpace Ξ±] (f : Ξ± β†’ ℝ) (h : Continuous f) (z : Set Ξ±) (g : z = f⁻¹' {0}) : IsClosed z :=
Ξ± : Type inst✝ : MetricSpace Ξ± f : Ξ± β†’ ℝ h : Continuous f z : Set Ξ± g : z = f ⁻¹' {0} ⊒ IsClosed z
import Mathlib open Topology Filter Real Complex TopologicalSpace Finset open scoped BigOperators
exercise_4_4b
test
/-- Let $f$ and $g$ be continuous mappings of a metric space $X$ into a metric space $Y$, and let $E$ be a dense subset of $X$. Prove that if $g(p) = f(p)$ for all $p \in P$ then $g(p) = f(p)$ for all $p \in X$.-/
theorem exercise_4_4b {Ξ± : Type} [MetricSpace Ξ±] {Ξ² : Type} [MetricSpace Ξ²] (f g : Ξ± β†’ Ξ²) (s : Set Ξ±) (h₁ : Continuous f) (hβ‚‚ : Continuous g) (h₃ : Dense s) (hβ‚„ : βˆ€ x ∈ s, f x = g x) : f = g :=
Ξ± : Type inst✝¹ : MetricSpace Ξ± Ξ² : Type inst✝ : MetricSpace Ξ² f g : Ξ± β†’ Ξ² s : Set Ξ± h₁ : Continuous f hβ‚‚ : Continuous g h₃ : Dense s hβ‚„ : βˆ€ x ∈ s, f x = g x ⊒ f = g
import Mathlib open Topology Filter Real Complex TopologicalSpace Finset open scoped BigOperators
exercise_4_5b
test
/-- Show that there exist a set $E \subset \mathbb{R}$ and a real continuous function $f$ defined on $E$, such that there does not exist a continuous real function $g$ on $\mathbb{R}$ such that $g(x)=f(x)$ for all $x \in E$.-/
theorem exercise_4_5b : βˆƒ (E : Set ℝ) (f : ℝ β†’ ℝ), (ContinuousOn f E) ∧ (Β¬ βˆƒ (g : ℝ β†’ ℝ), Continuous g ∧ βˆ€ x ∈ E, f x = g x) :=
⊒ βˆƒ E f, ContinuousOn f E ∧ Β¬βˆƒ g, Continuous g ∧ βˆ€ x ∈ E, f x = g x
import Mathlib open Topology Filter Real Complex TopologicalSpace Finset open scoped BigOperators
exercise_4_8a
test
/-- Let $f$ be a real uniformly continuous function on the bounded set $E$ in $R^{1}$. Prove that $f$ is bounded on $E$.-/
theorem exercise_4_8a (E : Set ℝ) (f : ℝ β†’ ℝ) (hf : UniformContinuousOn f E) (hE : Bornology.IsBounded E) : Bornology.IsBounded (Set.image f E) :=
E : Set ℝ f : ℝ β†’ ℝ hf : UniformContinuousOn f E hE : Bornology.IsBounded E ⊒ Bornology.IsBounded (f '' E)
import Mathlib open Topology Filter Real Complex TopologicalSpace Finset open scoped BigOperators
exercise_4_11a
test
/-- Suppose $f$ is a uniformly continuous mapping of a metric space $X$ into a metric space $Y$ and prove that $\left\{f\left(x_{n}\right)\right\}$ is a Cauchy sequence in $Y$ for every Cauchy sequence $\{x_n\}$ in $X$.-/
theorem exercise_4_11a {X : Type*} [MetricSpace X] {Y : Type*} [MetricSpace Y] (f : X β†’ Y) (hf : UniformContinuous f) (x : β„• β†’ X) (hx : CauchySeq x) : CauchySeq (Ξ» n => f (x n)) :=
X : Type u_1 inst✝¹ : MetricSpace X Y : Type u_2 inst✝ : MetricSpace Y f : X β†’ Y hf : UniformContinuous f x : β„• β†’ X hx : CauchySeq x ⊒ CauchySeq fun n => f (x n)
import Mathlib open Topology Filter Real Complex TopologicalSpace Finset open scoped BigOperators
exercise_4_15
test
/-- Prove that every continuous open mapping of $R^{1}$ into $R^{1}$ is monotonic.-/
theorem exercise_4_15 {f : ℝ β†’ ℝ} (hf : Continuous f) (hof : IsOpenMap f) : Monotone f :=
f : ℝ β†’ ℝ hf : Continuous f hof : IsOpenMap f ⊒ Monotone f
import Mathlib open Topology Filter Real Complex TopologicalSpace Finset open scoped BigOperators
exercise_4_21a
test
/-- Suppose $K$ and $F$ are disjoint sets in a metric space $X, K$ is compact, $F$ is closed. Prove that there exists $\delta>0$ such that $d(p, q)>\delta$ if $p \in K, q \in F$.-/
theorem exercise_4_21a {X : Type*} [MetricSpace X] (K F : Set X) (hK : IsCompact K) (hF : IsClosed F) (hKF : Disjoint K F) : βˆƒ (Ξ΄ : ℝ), Ξ΄ > 0 ∧ βˆ€ (p q : X), p ∈ K β†’ q ∈ F β†’ dist p q β‰₯ Ξ΄ :=
X : Type u_1 inst✝ : MetricSpace X K F : Set X hK : IsCompact K hF : IsClosed F hKF : Disjoint K F ⊒ βˆƒ Ξ΄ > 0, βˆ€ (p q : X), p ∈ K β†’ q ∈ F β†’ dist p q β‰₯ Ξ΄
import Mathlib open Topology Filter Real Complex TopologicalSpace Finset open scoped BigOperators
exercise_5_1
test
/-- Let $f$ be defined for all real $x$, and suppose that $|f(x)-f(y)| \leq (x-y)^{2}$ for all real $x$ and $y$. Prove that $f$ is constant.-/
theorem exercise_5_1 {f : ℝ β†’ ℝ} (hf : βˆ€ x y : ℝ, |(f x - f y)| ≀ (x - y) ^ 2) : βˆƒ c, f = Ξ» x => c :=
f : ℝ β†’ ℝ hf : βˆ€ (x y : ℝ), |f x - f y| ≀ (x - y) ^ 2 ⊒ βˆƒ c, f = fun x => c
import Mathlib open Topology Filter Real Complex TopologicalSpace Finset open scoped BigOperators
exercise_5_3
test
/-- Suppose $g$ is a real function on $R^{1}$, with bounded derivative (say $\left|g^{\prime}\right| \leq M$ ). Fix $\varepsilon>0$, and define $f(x)=x+\varepsilon g(x)$. Prove that $f$ is one-to-one if $\varepsilon$ is small enough.-/
theorem exercise_5_3 {g : ℝ β†’ ℝ} (hg : Continuous g) (hg' : βˆƒ M : ℝ, βˆ€ x : ℝ, |deriv g x| ≀ M) : βˆƒ N, βˆ€ Ξ΅ > 0, Ξ΅ < N β†’ Function.Injective (Ξ» x : ℝ => x + Ξ΅ * g x) :=
g : ℝ β†’ ℝ hg : Continuous g hg' : βˆƒ M, βˆ€ (x : ℝ), |deriv g x| ≀ M ⊒ βˆƒ N, βˆ€ Ξ΅ > 0, Ξ΅ < N β†’ Function.Injective fun x => x + Ξ΅ * g x
import Mathlib open Topology Filter Real Complex TopologicalSpace Finset open scoped BigOperators
exercise_5_5
test
/-- Suppose $f$ is defined and differentiable for every $x>0$, and $f^{\prime}(x) \rightarrow 0$ as $x \rightarrow+\infty$. Put $g(x)=f(x+1)-f(x)$. Prove that $g(x) \rightarrow 0$ as $x \rightarrow+\infty$.-/
theorem exercise_5_5 {f : ℝ β†’ ℝ} (hfd : Differentiable ℝ f) (hf : Tendsto (deriv f) atTop (𝓝 0)) : Tendsto (Ξ» x => f (x + 1) - f x) atTop atTop :=
f : ℝ β†’ ℝ hfd : Differentiable ℝ f hf : Tendsto (deriv f) atTop (𝓝 0) ⊒ Tendsto (fun x => f (x + 1) - f x) atTop atTop
import Mathlib open Topology Filter Real Complex TopologicalSpace Finset open scoped BigOperators
exercise_5_7
test
/-- Suppose $f^{\prime}(x), g^{\prime}(x)$ exist, $g^{\prime}(x) \neq 0$, and $f(x)=g(x)=0$. Prove that $\lim _{t \rightarrow x} \frac{f(t)}{g(t)}=\frac{f^{\prime}(x)}{g^{\prime}(x)}.$-/
theorem exercise_5_7 {f g : ℝ β†’ ℝ} {x : ℝ} (hf' : DifferentiableAt ℝ f 0) (hg' : DifferentiableAt ℝ g 0) (hg'_ne_0 : deriv g 0 β‰  0) (f0 : f 0 = 0) (g0 : g 0 = 0) : Tendsto (Ξ» x => f x / g x) (𝓝 x) (𝓝 (deriv f x / deriv g x)) :=
f g : ℝ β†’ ℝ x : ℝ hf' : DifferentiableAt ℝ f 0 hg' : DifferentiableAt ℝ g 0 hg'_ne_0 : deriv g 0 β‰  0 f0 : f 0 = 0 g0 : g 0 = 0 ⊒ Tendsto (fun x => f x / g x) (𝓝 x) (𝓝 (deriv f x / deriv g x))
import Mathlib open Topology Filter Real Complex TopologicalSpace Finset open scoped BigOperators
exercise_5_17
test
/-- Suppose $f$ is a real, three times differentiable function on $[-1,1]$, such that $f(-1)=0, \quad f(0)=0, \quad f(1)=1, \quad f^{\prime}(0)=0 .$ Prove that $f^{(3)}(x) \geq 3$ for some $x \in(-1,1)$.-/
theorem exercise_5_17 {f : ℝ β†’ ℝ} (hf' : DifferentiableOn ℝ f (Set.Icc (-1) 1)) (hf'' : DifferentiableOn ℝ (deriv f) (Set.Icc 1 1)) (hf''' : DifferentiableOn ℝ (deriv (deriv f)) (Set.Icc 1 1)) (hf0 : f (-1) = 0) (hf1 : f 0 = 0) (hf2 : f 1 = 1) (hf3 : deriv f 0 = 0) : βˆƒ x, x ∈ Set.Ioo (-1 : ℝ) 1 ∧ deriv (deriv (deriv f)) x β‰₯ 3 :=
f : ℝ β†’ ℝ hf' : DifferentiableOn ℝ f (Set.Icc (-1) 1) hf'' : DifferentiableOn ℝ (deriv f) (Set.Icc 1 1) hf''' : DifferentiableOn ℝ (deriv (deriv f)) (Set.Icc 1 1) hf0 : f (-1) = 0 hf1 : f 0 = 0 hf2 : f 1 = 1 hf3 : deriv f 0 = 0 ⊒ βˆƒ x ∈ Set.Ioo (-1) 1, deriv (deriv (deriv f)) x β‰₯ 3
import Mathlib open Topology Filter Real Complex TopologicalSpace Finset open scoped BigOperators
exercise_2_1_18
test
/-- If $G$ is a finite group of even order, show that there must be an element $a \neq e$ such that $a=a^{-1}$.-/
theorem exercise_2_1_18 {G : Type*} [Group G] [Fintype G] (hG2 : Even (card G)) : βˆƒ (a : G), a β‰  1 ∧ a = a⁻¹ :=
G : Type u_1 inst✝¹ : Group G inst✝ : Fintype G hG2 : Even (card G) ⊒ βˆƒ a, a β‰  1 ∧ a = a⁻¹
import Mathlib open Fintype Set Real Ideal Polynomial open scoped BigOperators
exercise_2_1_26
test
/-- If $G$ is a finite group, prove that, given $a \in G$, there is a positive integer $n$, depending on $a$, such that $a^n = e$.-/
theorem exercise_2_1_26 {G : Type*} [Group G] [Fintype G] (a : G) : βˆƒ (n : β„•), a ^ n = 1 :=
G : Type u_1 inst✝¹ : Group G inst✝ : Fintype G a : G ⊒ βˆƒ n, a ^ n = 1
import Mathlib open Fintype Set Real Ideal Polynomial open scoped BigOperators
exercise_2_2_3
test
/-- If $G$ is a group in which $(a b)^{i}=a^{i} b^{i}$ for three consecutive integers $i$, prove that $G$ is abelian.-/
def exercise_2_2_3 {G : Type*} [Group G] {P : β„• β†’ Prop} {hP : P = Ξ» i => βˆ€ a b : G, (a*b)^i = a^i * b^i} (hP1 : βˆƒ n : β„•, P n ∧ P (n+1) ∧ P (n+2)) : CommGroup G :=
G : Type u_1 inst✝ : Group G P : β„• β†’ Prop hP : P = fun i => βˆ€ (a b : G), (a * b) ^ i = a ^ i * b ^ i hP1 : βˆƒ n, P n ∧ P (n + 1) ∧ P (n + 2) ⊒ CommGroup G
import Mathlib open Fintype Set Real Ideal Polynomial open scoped BigOperators
exercise_2_2_6c
test
/-- Let $G$ be a group in which $(a b)^{n}=a^{n} b^{n}$ for some fixed integer $n>1$ for all $a, b \in G$. For all $a, b \in G$, prove that $\left(a b a^{-1} b^{-1}\right)^{n(n-1)}=e$.-/
theorem exercise_2_2_6c {G : Type*} [Group G] {n : β„•} (hn : n > 1) (h : βˆ€ (a b : G), (a * b) ^ n = a ^ n * b ^ n) : βˆ€ (a b : G), (a * b * a⁻¹ * b⁻¹) ^ (n * (n - 1)) = 1 :=
G : Type u_1 inst✝ : Group G n : β„• hn : n > 1 h : βˆ€ (a b : G), (a * b) ^ n = a ^ n * b ^ n ⊒ βˆ€ (a b : G), (a * b * a⁻¹ * b⁻¹) ^ (n * (n - 1)) = 1
import Mathlib open Fintype Set Real Ideal Polynomial open scoped BigOperators
exercise_2_3_16
test
/-- If a group $G$ has no proper subgroups, prove that $G$ is cyclic of order $p$, where $p$ is a prime number.-/
theorem exercise_2_3_16 {G : Type*} [Group G] (hG : βˆ€ H : Subgroup G, H = ⊀ ∨ H = βŠ₯) : IsCyclic G ∧ βˆƒ (p : β„•) (Fin : Fintype G), Nat.Prime p ∧ @card G Fin = p :=
G : Type u_1 inst✝ : Group G hG : βˆ€ (H : Subgroup G), H = ⊀ ∨ H = βŠ₯ ⊒ IsCyclic G ∧ βˆƒ p Fin, p.Prime ∧ card G = p
import Mathlib open Fintype Set Real Ideal Polynomial open scoped BigOperators
exercise_2_5_23
test
/-- Let $G$ be a group such that all subgroups of $G$ are normal in $G$. If $a, b \in G$, prove that $ba = a^jb$ for some $j$.-/
theorem exercise_2_5_23 {G : Type*} [Group G] (hG : βˆ€ (H : Subgroup G), H.Normal) (a b : G) : βˆƒ (j : β„€) , b*a = a^j * b :=
G : Type u_1 inst✝ : Group G hG : βˆ€ (H : Subgroup G), H.Normal a b : G ⊒ βˆƒ j, b * a = a ^ j * b
import Mathlib open Fintype Set Real Ideal Polynomial open scoped BigOperators
exercise_2_5_31
test
/-- Suppose that $G$ is an abelian group of order $p^nm$ where $p \nmid m$ is a prime. If $H$ is a subgroup of $G$ of order $p^n$, prove that $H$ is a characteristic subgroup of $G$.-/
theorem exercise_2_5_31 {G : Type*} [CommGroup G] [Fintype G] {p m n : β„•} (hp : Nat.Prime p) (hp1 : Β¬ p ∣ m) (hG : card G = p^n*m) {H : Subgroup G} [Fintype H] (hH : card H = p^n) : Subgroup.Characteristic H :=
G : Type u_1 inst✝² : CommGroup G inst✝¹ : Fintype G p m n : β„• hp : p.Prime hp1 : Β¬p ∣ m hG : card G = p ^ n * m H : Subgroup G inst✝ : Fintype β†₯H hH : card β†₯H = p ^ n ⊒ H.Characteristic
import Mathlib open Fintype Set Real Ideal Polynomial open scoped BigOperators
exercise_2_5_43
test
/-- Prove that a group of order 9 must be abelian.-/
def exercise_2_5_43 (G : Type*) [Group G] [Fintype G] (hG : card G = 9) : CommGroup G :=
G : Type u_1 inst✝¹ : Group G inst✝ : Fintype G hG : card G = 9 ⊒ CommGroup G
import Mathlib open Fintype Set Real Ideal Polynomial open scoped BigOperators
exercise_2_5_52
test
/-- Let $G$ be a finite group and $\varphi$ an automorphism of $G$ such that $\varphi(x) = x^{-1}$ for more than three-fourths of the elements of $G$. Prove that $\varphi(y) = y^{-1}$ for all $y \in G$, and so $G$ is abelian.-/
theorem exercise_2_5_52 {G : Type*} [Group G] [Fintype G] (Ο† : G ≃* G) {I : Finset G} (hI : βˆ€ x ∈ I, Ο† x = x⁻¹) (hI1 : (0.75 : β„š) * card G ≀ card I) : βˆ€ x : G, Ο† x = x⁻¹ ∧ βˆ€ x y : G, x*y = y*x :=
G : Type u_1 inst✝¹ : Group G inst✝ : Fintype G Ο† : G ≃* G I : Finset G hI : βˆ€ x ∈ I, Ο† x = x⁻¹ hI1 : 0.75 * ↑(card G) ≀ ↑(card { x // x ∈ I }) ⊒ βˆ€ (x : G), Ο† x = x⁻¹ ∧ βˆ€ (x y : G), x * y = y * x
import Mathlib open Fintype Set Real Ideal Polynomial open scoped BigOperators
exercise_2_7_7
test
/-- If $\varphi$ is a homomorphism of $G$ onto $G'$ and $N \triangleleft G$, show that $\varphi(N) \triangleleft G'$.-/
theorem exercise_2_7_7 {G : Type*} [Group G] {G' : Type*} [Group G'] (Ο† : G β†’* G') (N : Subgroup G) [N.Normal] : (Subgroup.map Ο† N).Normal :=
G : Type u_1 inst✝² : Group G G' : Type u_2 inst✝¹ : Group G' Ο† : G β†’* G' N : Subgroup G inst✝ : N.Normal ⊒ (Subgroup.map Ο† N).Normal
import Mathlib open Fintype Set Real Ideal Polynomial open scoped BigOperators
exercise_2_8_15
test
/-- Prove that if $p > q$ are two primes such that $q \mid p - 1$, then any two nonabelian groups of order $pq$ are isomorphic.-/
def exercise_2_8_15 {G H: Type*} [Fintype G] [Group G] [Fintype H] [Group H] {p q : β„•} (hp : Nat.Prime p) (hq : Nat.Prime q) (h : p > q) (h1 : q ∣ p - 1) (hG : card G = p*q) (hH : card G = p*q) : G ≃* H :=
G : Type u_1 H : Type u_2 inst✝³ : Fintype G inst✝² : Group G inst✝¹ : Fintype H inst✝ : Group H p q : β„• hp : p.Prime hq : q.Prime h : p > q h1 : q ∣ p - 1 hG hH : card G = p * q ⊒ G ≃* H
import Mathlib open Fintype Set Real Ideal Polynomial open scoped BigOperators
exercise_2_10_1
test
/-- Let $A$ be a normal subgroup of a group $G$, and suppose that $b \in G$ is an element of prime order $p$, and that $b \not\in A$. Show that $A \cap (b) = (e)$.-/
theorem exercise_2_10_1 {G : Type*} [Group G] (A : Subgroup G) [A.Normal] {b : G} (hp : Nat.Prime (orderOf b)) : A βŠ“ (Subgroup.closure {b}) = βŠ₯ :=
G : Type u_1 inst✝¹ : Group G A : Subgroup G inst✝ : A.Normal b : G hp : (orderOf b).Prime ⊒ A βŠ“ Subgroup.closure {b} = βŠ₯
import Mathlib open Fintype Set Real Ideal Polynomial open scoped BigOperators
exercise_2_11_7
test
/-- If $P \triangleleft G$, $P$ a $p$-Sylow subgroup of $G$, prove that $\varphi(P) = P$ for every automorphism $\varphi$ of $G$.-/
theorem exercise_2_11_7 {G : Type*} [Group G] {p : β„•} (hp : Nat.Prime p) {P : Sylow p G} (hP : P.Normal) : Subgroup.Characteristic (P : Subgroup G) :=
G : Type u_1 inst✝ : Group G p : β„• hp : p.Prime P : Sylow p G hP : (↑P).Normal ⊒ (↑P).Characteristic
import Mathlib open Fintype Set Real Ideal Polynomial open scoped BigOperators
exercise_3_2_21
test
/-- If $\sigma, \tau$ are two permutations that disturb no common element and $\sigma \tau = e$, prove that $\sigma = \tau = e$.-/
theorem exercise_3_2_21 {Ξ± : Type*} [Fintype Ξ±] {Οƒ Ο„: Equiv.Perm Ξ±} (h1 : βˆ€ a : Ξ±, Οƒ a = a ↔ Ο„ a β‰  a) (h2 : Ο„ ∘ Οƒ = id) : Οƒ = 1 ∧ Ο„ = 1 :=
Ξ± : Type u_1 inst✝ : Fintype Ξ± Οƒ Ο„ : Equiv.Perm Ξ± h1 : βˆ€ (a : Ξ±), Οƒ a = a ↔ Ο„ a β‰  a h2 : ⇑τ ∘ ⇑σ = id ⊒ Οƒ = 1 ∧ Ο„ = 1
import Mathlib open Fintype Set Real Ideal Polynomial open scoped BigOperators
exercise_4_1_34
test
/-- Let $T$ be the group of $2\times 2$ matrices $A$ with entries in the field $\mathbb{Z}_2$ such that $\det A$ is not equal to 0. Prove that $T$ is isomorphic to $S_3$, the symmetric group of degree 3.-/
def exercise_4_1_34 : Equiv.Perm (Fin 3) ≃* Matrix.GeneralLinearGroup (Fin 2) (ZMod 2) :=
⊒ Equiv.Perm (Fin 3) ≃* GL (Fin 2) (ZMod 2)
import Mathlib open Fintype Set Real Ideal Polynomial open scoped BigOperators
exercise_4_2_6
test
/-- If $a^2 = 0$ in $R$, show that $ax + xa$ commutes with $a$.-/
theorem exercise_4_2_6 {R : Type*} [Ring R] (a x : R) (h : a ^ 2 = 0) : a * (a * x + x * a) = (x + x * a) * a :=
R : Type u_1 inst✝ : Ring R a x : R h : a ^ 2 = 0 ⊒ a * (a * x + x * a) = (x + x * a) * a
import Mathlib open Fintype Set Real Ideal Polynomial open scoped BigOperators
exercise_4_3_1
test
/-- If $R$ is a commutative ring and $a \in R$, let $L(a) = \{x \in R \mid xa = 0\}$. Prove that $L(a)$ is an ideal of $R$.-/
theorem exercise_4_3_1 {R : Type*} [CommRing R] (a : R) : βˆƒ I : Ideal R, {x : R | x*a=0} = I :=
R : Type u_1 inst✝ : CommRing R a : R ⊒ βˆƒ I, {x | x * a = 0} = ↑I
import Mathlib open Fintype Set Real Ideal Polynomial open scoped BigOperators
exercise_4_4_9
test
/-- Show that $(p - 1)/2$ of the numbers $1, 2, \ldots, p - 1$ are quadratic residues and $(p - 1)/2$ are quadratic nonresidues $\mod p$.-/
theorem exercise_4_4_9 (p : β„•) (hp : Nat.Prime p) : (βˆƒ S : Finset (ZMod p), S.card = (p-1)/2 ∧ βˆƒ x : ZMod p, x^2 = p) ∧ (βˆƒ S : Finset (ZMod p), S.card = (p-1)/2 ∧ Β¬ βˆƒ x : ZMod p, x^2 = p) :=
p : β„• hp : p.Prime ⊒ (βˆƒ S, S.card = (p - 1) / 2 ∧ βˆƒ x, x ^ 2 = ↑p) ∧ βˆƒ S, S.card = (p - 1) / 2 ∧ Β¬βˆƒ x, x ^ 2 = ↑p
import Mathlib open Fintype Set Real Ideal Polynomial open scoped BigOperators
exercise_4_5_23
test
/-- Let $F = \mathbb{Z}_7$ and let $p(x) = x^3 - 2$ and $q(x) = x^3 + 2$ be in $F[x]$. Show that $p(x)$ and $q(x)$ are irreducible in $F[x]$ and that the fields $F[x]/(p(x))$ and $F[x]/(q(x))$ are isomorphic.-/
theorem exercise_4_5_23 {p q: Polynomial (ZMod 7)} (hp : p = X^3 - 2) (hq : q = X^3 + 2) : Irreducible p ∧ Irreducible q ∧ (Nonempty $ Polynomial (ZMod 7) β§Έ span ({p} : Set $ Polynomial $ ZMod 7) ≃+* Polynomial (ZMod 7) β§Έ span ({q} : Set $ Polynomial $ ZMod 7)) :=
p q : (ZMod 7)[X] hp : p = X ^ 3 - 2 hq : q = X ^ 3 + 2 ⊒ Irreducible p ∧ Irreducible q ∧ Nonempty ((ZMod 7)[X] β§Έ span {p} ≃+* (ZMod 7)[X] β§Έ span {q})
import Mathlib open Fintype Set Real Ideal Polynomial open scoped BigOperators
exercise_4_6_2
test
/-- Prove that $f(x) = x^3 + 3x + 2$ is irreducible in $Q[x]$.-/
theorem exercise_4_6_2 : Irreducible (X^3 + 3*X + 2 : Polynomial β„š) :=
⊒ Irreducible (X ^ 3 + 3 * X + 2)
import Mathlib open Fintype Set Real Ideal Polynomial open scoped BigOperators
exercise_5_1_8
test
/-- If $F$ is a field of characteristic $p \neq 0$, show that $(a + b)^m = a^m + b^m$, where $m = p^n$, for all $a, b \in F$ and any positive integer $n$.-/
theorem exercise_5_1_8 {p m n: β„•} {F : Type*} [Field F] (hp : Nat.Prime p) (hF : CharP F p) (a b : F) (hm : m = p ^ n) : (a + b) ^ m = a^m + b^m :=
p m n : β„• F : Type u_1 inst✝ : Field F hp : p.Prime hF : CharP F p a b : F hm : m = p ^ n ⊒ (a + b) ^ m = a ^ m + b ^ m
import Mathlib open Fintype Set Real Ideal Polynomial open scoped BigOperators
exercise_5_3_7
test
/-- If $a \in K$ is such that $a^2$ is algebraic over the subfield $F$ of $K$, show that a is algebraic over $F$.-/
theorem exercise_5_3_7 {K : Type*} [Field K] {F : Subfield K} {a : K} (ha : IsAlgebraic F (a ^ 2)) : IsAlgebraic F a :=
K : Type u_1 inst✝ : Field K F : Subfield K a : K ha : IsAlgebraic (β†₯F) (a ^ 2) ⊒ IsAlgebraic (β†₯F) a
import Mathlib open Fintype Set Real Ideal Polynomial open scoped BigOperators
exercise_5_4_3
test
/-- If $a \in C$ is such that $p(a) = 0$, where $p(x) = x^5 + \sqrt{2}x^3 + \sqrt{5}x^2 + \sqrt{7}x + \sqrt{11}$, show that $a$ is algebraic over $\mathbb{Q}$ of degree at most 80.-/
theorem exercise_5_4_3 {a : β„‚} {p : β„‚ β†’ β„‚} (hp : p = Ξ» (x : β„‚) => x^5 + sqrt 2 * x^3 + sqrt 5 * x^2 + sqrt 7 * x + 11) (ha : p a = 0) : βˆƒ p : Polynomial β„‚ , p.degree < 80 ∧ a ∈ p.roots ∧ βˆ€ n : p.support, βˆƒ a b : β„€, p.coeff n = a / b :=
a : β„‚ p : β„‚ β†’ β„‚ hp : p = fun x => x ^ 5 + β†‘βˆš2 * x ^ 3 + β†‘βˆš5 * x ^ 2 + β†‘βˆš7 * x + 11 ha : p a = 0 ⊒ βˆƒ p, p.degree < 80 ∧ a ∈ p.roots ∧ βˆ€ (n : { x // x ∈ p.support }), βˆƒ a b, p.coeff ↑n = ↑a / ↑b
import Mathlib open Fintype Set Real Ideal Polynomial open scoped BigOperators
exercise_5_6_14
test
/-- If $F$ is of characteristic $p \neq 0$, show that all the roots of $x^m - x$, where $m = p^n$, are distinct.-/
theorem exercise_5_6_14 {p m n: β„•} (hp : Nat.Prime p) {F : Type*} [Field F] [CharP F p] (hm : m = p ^ n) : card (rootSet (X ^ m - X : Polynomial F) F) = m :=
p m n : β„• hp : p.Prime F : Type u_1 inst✝¹ : Field F inst✝ : CharP F p hm : m = p ^ n ⊒ card ↑((X ^ m - X).rootSet F) = m
import Mathlib open Fintype Set Real Ideal Polynomial open scoped BigOperators
exercise_2_26
test
/-- Prove that a set $U \subset M$ is open if and only if none of its points are limits of its complement.-/
theorem exercise_2_26 {M : Type*} [TopologicalSpace M] (U : Set M) : IsOpen U ↔ βˆ€ x ∈ U, Β¬ ClusterPt x (π“Ÿ Uᢜ) :=
M : Type u_1 inst✝ : TopologicalSpace M U : Set M ⊒ IsOpen U ↔ βˆ€ x ∈ U, Β¬ClusterPt x (π“Ÿ Uᢜ)
import Mathlib open Filter Real Function open scoped Topology
exercise_2_32a
test
/-- Show that every subset of $\mathbb{N}$ is clopen.-/
theorem exercise_2_32a (A : Set β„•) : IsClopen A :=
A : Set β„• ⊒ IsClopen A
import Mathlib open Filter Real Function open scoped Topology
exercise_2_46
test
/-- Assume that $A, B$ are compact, disjoint, nonempty subsets of $M$. Prove that there are $a_0 \in A$ and $b_0 \in B$ such that for all $a \in A$ and $b \in B$ we have $d(a_0, b_0) \leq d(a, b)$.-/
theorem exercise_2_46 {M : Type*} [MetricSpace M] {A B : Set M} (hA : IsCompact A) (hB : IsCompact B) (hAB : Disjoint A B) (hAβ‚€ : A β‰  βˆ…) (hBβ‚€ : B β‰  βˆ…) : βˆƒ aβ‚€ bβ‚€, aβ‚€ ∈ A ∧ bβ‚€ ∈ B ∧ βˆ€ (a : M) (b : M), a ∈ A β†’ b ∈ B β†’ dist aβ‚€ bβ‚€ ≀ dist a b :=
M : Type u_1 inst✝ : MetricSpace M A B : Set M hA : IsCompact A hB : IsCompact B hAB : Disjoint A B hAβ‚€ : A β‰  βˆ… hBβ‚€ : B β‰  βˆ… ⊒ βˆƒ aβ‚€ bβ‚€, aβ‚€ ∈ A ∧ bβ‚€ ∈ B ∧ βˆ€ (a b : M), a ∈ A β†’ b ∈ B β†’ dist aβ‚€ bβ‚€ ≀ dist a b
import Mathlib open Filter Real Function open scoped Topology
exercise_2_92
test
/-- Give a direct proof that the nested decreasing intersection of nonempty covering compact sets is nonempty.-/
theorem exercise_2_92 {Ξ± : Type*} [TopologicalSpace Ξ±] {s : β„• β†’ Set Ξ±} (hs : βˆ€ i, IsCompact (s i)) (hs : βˆ€ i, (s i).Nonempty) (hs : βˆ€ i, (s i) βŠƒ (s (i + 1))) : (β‹‚ i, s i).Nonempty :=
Ξ± : Type u_1 inst✝ : TopologicalSpace Ξ± s : β„• β†’ Set Ξ± hs✝¹ : βˆ€ (i : β„•), IsCompact (s i) hs✝ : βˆ€ (i : β„•), (s i).Nonempty hs : βˆ€ (i : β„•), s i βŠƒ s (i + 1) ⊒ (β‹‚ i, s i).Nonempty
import Mathlib open Filter Real Function open scoped Topology
exercise_3_1
test
/-- Assume that $f \colon \mathbb{R} \rightarrow \mathbb{R}$ satisfies $|f(t)-f(x)| \leq|t-x|^{2}$ for all $t, x$. Prove that $f$ is constant.-/
theorem exercise_3_1 {f : ℝ β†’ ℝ} (hf : βˆ€ x y, |f x - f y| ≀ |x - y| ^ 2) : βˆƒ c, f = Ξ» x => c :=
f : ℝ β†’ ℝ hf : βˆ€ (x y : ℝ), |f x - f y| ≀ |x - y| ^ 2 ⊒ βˆƒ c, f = fun x => c
import Mathlib open Filter Real Function open scoped Topology
exercise_3_63a
test
/-- Prove that $\sum 1/k(\log(k))^p$ converges when $p > 1$.-/
theorem exercise_3_63a (p : ℝ) (f : β„• β†’ ℝ) (hp : p > 1) (h : f = Ξ» (k : β„•) => (1 : ℝ) / (k * (log k) ^ p)) : βˆƒ l, Tendsto f atTop (𝓝 l) :=
p : ℝ f : β„• β†’ ℝ hp : p > 1 h : f = fun k => 1 / (↑k * (↑k).log ^ p) ⊒ βˆƒ l, Tendsto f atTop (𝓝 l)
import Mathlib open Filter Real Function open scoped Topology
exercise_4_15a
test
/-- A continuous, strictly increasing function $\mu \colon (0, \infty) \rightarrow (0, \infty)$ is a modulus of continuity if $\mu(s) \rightarrow 0$ as $s \rightarrow 0$. A function $f \colon [a, b] \rightarrow \mathbb{R}$ has modulus of continuity $\mu$ if $|f(s) - f(t)| \leq \mu(|s - t|)$ for all $s, t \in [a, b]$. Prove that a function is uniformly continuous if and only if it has a modulus of continuity.-/
theorem exercise_4_15a {Ξ± : Type*} (a b : ℝ) (F : Set (ℝ β†’ ℝ)) : (βˆ€ x : ℝ, βˆ€ Ξ΅ > 0, βˆƒ U ∈ (𝓝 x), (βˆ€ y z : U, βˆ€ f : ℝ β†’ ℝ, f ∈ F β†’ (dist (f y) (f z) < Ξ΅))) ↔ βˆƒ (ΞΌ : ℝ β†’ ℝ), βˆ€ (x : ℝ), (0 : ℝ) ≀ ΞΌ x ∧ Tendsto ΞΌ (𝓝 0) (𝓝 0) ∧ (βˆ€ (s t : ℝ) (f : ℝ β†’ ℝ), f ∈ F β†’ |(f s) - (f t)| ≀ ΞΌ (|s - t|)) :=
Ξ± : Type u_1 a b : ℝ F : Set (ℝ β†’ ℝ) ⊒ (βˆ€ (x Ξ΅ : ℝ), Ξ΅ > 0 β†’ βˆƒ U ∈ 𝓝 x, βˆ€ (y z : ↑U), βˆ€ f ∈ F, dist (f ↑y) (f ↑z) < Ξ΅) ↔ βˆƒ ΞΌ, βˆ€ (x : ℝ), 0 ≀ ΞΌ x ∧ Tendsto ΞΌ (𝓝 0) (𝓝 0) ∧ βˆ€ (s t : ℝ), βˆ€ f ∈ F, |f s - f t| ≀ ΞΌ |s - t|
import Mathlib open Filter Real Function open scoped Topology
exercise_2_3_2
test
/-- Prove that the products $a b$ and $b a$ are conjugate elements in a group.-/
theorem exercise_2_3_2 {G : Type*} [Group G] (a b : G) : βˆƒ g : G, b* a = g * a * b * g⁻¹ :=
G : Type u_1 inst✝ : Group G a b : G ⊒ βˆƒ g, b * a = g * a * b * g⁻¹
import Mathlib open Function Fintype Subgroup Ideal Polynomial Submodule Zsqrtd open scoped BigOperators
exercise_2_8_6
test
/-- Prove that the center of the product of two groups is the product of their centers.-/
noncomputable def exercise_2_8_6 {G H : Type*} [Group G] [Group H] : center (G Γ— H) ≃* (center G) Γ— (center H) :=
G : Type u_1 H : Type u_2 inst✝¹ : Group G inst✝ : Group H ⊒ β†₯(center (G Γ— H)) ≃* β†₯(center G) Γ— β†₯(center H)
import Mathlib open Function Fintype Subgroup Ideal Polynomial Submodule Zsqrtd open scoped BigOperators --center of (G Γ— H) equivalent, preserves multiplication with (center G) Γ— (center H)
exercise_3_2_7
test
/-- Prove that every homomorphism of fields is injective.-/
theorem exercise_3_2_7 {F : Type*} [Field F] {G : Type*} [Field G] (Ο† : F β†’+* G) : Injective Ο† :=
F : Type u_1 inst✝¹ : Field F G : Type u_2 inst✝ : Field G Ο† : F β†’+* G ⊒ Injective ⇑φ
import Mathlib open Function Fintype Subgroup Ideal Polynomial Submodule Zsqrtd open scoped BigOperators open RingHom
exercise_3_7_2
test
/-- Let $V$ be a vector space over an infinite field $F$. Prove that $V$ is not the union of finitely many proper subspaces.-/
theorem exercise_3_7_2 {K V : Type*} [Field K] [AddCommGroup V] [Module K V] {ΞΉ : Type*} [Fintype ΞΉ] (Ξ³ : ΞΉ β†’ Submodule K V) (h : βˆ€ i : ΞΉ, Ξ³ i β‰  ⊀) : (β‹‚ (i : ΞΉ), (Ξ³ i : Set V)) β‰  ⊀ :=
K : Type u_1 V : Type u_2 inst✝³ : Field K inst✝² : AddCommGroup V inst✝¹ : Module K V ΞΉ : Type u_3 inst✝ : Fintype ΞΉ Ξ³ : ΞΉ β†’ Submodule K V h : βˆ€ (i : ΞΉ), Ξ³ i β‰  ⊀ ⊒ β‹‚ i, ↑(Ξ³ i) β‰  ⊀
import Mathlib open Function Fintype Subgroup Ideal Polynomial Submodule Zsqrtd open scoped BigOperators
exercise_6_4_2
test
/-- Prove that no group of order $p q$, where $p$ and $q$ are prime, is simple.-/
theorem exercise_6_4_2 {G : Type*} [Group G] [Fintype G] {p q : β„•} (hp : Prime p) (hq : Prime q) (hG : card G = p*q) : IsSimpleGroup G β†’ false :=
G : Type u_1 inst✝¹ : Group G inst✝ : Fintype G p q : β„• hp : Prime p hq : Prime q hG : card G = p * q ⊒ IsSimpleGroup G β†’ false = true
import Mathlib open Function Fintype Subgroup Ideal Polynomial Submodule Zsqrtd open scoped BigOperators
exercise_6_4_12
test
/-- Prove that no group of order 224 is simple.-/
theorem exercise_6_4_12 {G : Type*} [Group G] [Fintype G] (hG : card G = 224) : IsSimpleGroup G β†’ false :=
G : Type u_1 inst✝¹ : Group G inst✝ : Fintype G hG : card G = 224 ⊒ IsSimpleGroup G β†’ false = true
import Mathlib open Function Fintype Subgroup Ideal Polynomial Submodule Zsqrtd open scoped BigOperators
exercise_10_1_13
test
/-- An element $x$ of a ring $R$ is called nilpotent if some power of $x$ is zero. Prove that if $x$ is nilpotent, then $1+x$ is a unit in $R$.-/
theorem exercise_10_1_13 {R : Type*} [Ring R] {x : R} (hx : IsNilpotent x) : IsUnit (1 + x) :=
R : Type u_1 inst✝ : Ring R x : R hx : IsNilpotent x ⊒ IsUnit (1 + x)
import Mathlib open Function Fintype Subgroup Ideal Polynomial Submodule Zsqrtd open scoped BigOperators
exercise_10_6_7
test
/-- Prove that every nonzero ideal in the ring of Gauss integers contains a nonzero integer.-/
theorem exercise_10_6_7 {I : Ideal GaussianInt} (hI : I β‰  βŠ₯) : βˆƒ (z : I), z β‰  0 ∧ (z : GaussianInt).im = 0 :=
I : Ideal GaussianInt hI : I β‰  βŠ₯ ⊒ βˆƒ z, z β‰  0 ∧ (↑z).im = 0
import Mathlib open Function Fintype Subgroup Ideal Polynomial Submodule Zsqrtd open scoped BigOperators
exercise_10_4_7a
test
/-- Let $I, J$ be ideals of a ring $R$ such that $I+J=R$. Prove that $I J=I \cap J$.-/
theorem exercise_10_4_7a {R : Type*} [CommRing R] [NoZeroDivisors R] (I J : Ideal R) (hIJ : I + J = ⊀) : I * J = I βŠ“ J :=
R : Type u_1 inst✝¹ : CommRing R inst✝ : NoZeroDivisors R I J : Ideal R hIJ : I + J = ⊀ ⊒ I * J = I βŠ“ J
import Mathlib open Function Fintype Subgroup Ideal Polynomial Submodule Zsqrtd open scoped BigOperators
exercise_11_2_13
test
/-- If $a, b$ are integers and if $a$ divides $b$ in the ring of Gauss integers, then $a$ divides $b$ in $\mathbb{Z}$.-/
theorem exercise_11_2_13 (a b : β„€) : (ofInt a : GaussianInt) ∣ ofInt b β†’ a ∣ b :=
a b : β„€ ⊒ ofInt a ∣ ofInt b β†’ a ∣ b
import Mathlib open Function Fintype Subgroup Ideal Polynomial Submodule Zsqrtd open scoped BigOperators
exercise_11_4_6a
test
/-- Prove that $x^2+x+1$ is irreducible in the field $\mathbb{F}_2$.-/
theorem exercise_11_4_6a {F : Type*} [Field F] [Fintype F] (hF : card F = 7) : Irreducible (X ^ 2 + 1 : Polynomial F) :=
F : Type u_1 inst✝¹ : Field F inst✝ : Fintype F hF : card F = 7 ⊒ Irreducible (X ^ 2 + 1)
import Mathlib open Function Fintype Subgroup Ideal Polynomial Submodule Zsqrtd open scoped BigOperators
exercise_11_4_6c
test
/-- Prove that $x^3 - 9$ is irreducible in $\mathbb{F}_{31}$.-/
theorem exercise_11_4_6c : Irreducible (X^3 - 9 : Polynomial (ZMod 31)) :=
⊒ Irreducible (X ^ 3 - 9)
import Mathlib open Function Fintype Subgroup Ideal Polynomial Submodule Zsqrtd open scoped BigOperators
exercise_11_13_3
test
/-- Prove that there are infinitely many primes congruent to $-1$ (modulo $4$).-/
theorem exercise_11_13_3 (N : β„•): βˆƒ p β‰₯ N, Nat.Prime p ∧ p + 1 ≑ 0 [MOD 4] :=
N : β„• ⊒ βˆƒ p β‰₯ N, p.Prime ∧ p + 1 ≑ 0 [MOD 4]
import Mathlib open Function Fintype Subgroup Ideal Polynomial Submodule Zsqrtd open scoped BigOperators
exercise_13_6_10
test
/-- Let $K$ be a finite field. Prove that the product of the nonzero elements of $K$ is $-1$.-/
theorem exercise_13_6_10 {K : Type*} [Field K] [Fintype Kˣ] : (∏ x : Kˣ, x) = -1 :=
K : Type u_1 inst✝¹ : Field K inst✝ : Fintype Kˣ ⊒ ∏ x : Kˣ, x = -1
import Mathlib open Function Fintype Subgroup Ideal Polynomial Submodule Zsqrtd open scoped BigOperators
exercise_1_2
test
/-- Show that $\frac{-1 + \sqrt{3}i}{2}$ is a cube root of 1 (meaning that its cube equals 1).-/
theorem exercise_1_2 : (⟨-1/2, Real.sqrt 3 / 2⟩ : β„‚) ^ 3 = -1 :=
⊒ { re := -1 / 2, im := √3 / 2 } ^ 3 = -1
import Mathlib open Fintype Complex Polynomial LinearMap FiniteDimensional Module Module.End open scoped BigOperators open scoped BigOperators
exercise_1_4
test
/-- Prove that if $a \in \mathbf{F}$, $v \in V$, and $av = 0$, then $a = 0$ or $v = 0$.-/
theorem exercise_1_4 {F V : Type*} [AddCommGroup V] [Field F] [Module F V] (v : V) (a : F): a β€’ v = 0 ↔ a = 0 ∨ v = 0 :=
F : Type u_1 V : Type u_2 inst✝² : AddCommGroup V inst✝¹ : Field F inst✝ : Module F V v : V a : F ⊒ a β€’ v = 0 ↔ a = 0 ∨ v = 0
import Mathlib open Fintype Complex Polynomial LinearMap FiniteDimensional Module Module.End open scoped BigOperators
exercise_1_7
test
/-- Give an example of a nonempty subset $U$ of $\mathbf{R}^2$ such that $U$ is closed under scalar multiplication, but $U$ is not a subspace of $\mathbf{R}^2$.-/
theorem exercise_1_7 : βˆƒ U : Set (ℝ Γ— ℝ), (U β‰  βˆ…) ∧ (βˆ€ (c : ℝ) (u : ℝ Γ— ℝ), u ∈ U β†’ c β€’ u ∈ U) ∧ (βˆ€ U' : Submodule ℝ (ℝ Γ— ℝ), U β‰  ↑U') :=
⊒ βˆƒ U, U β‰  βˆ… ∧ (βˆ€ (c : ℝ), βˆ€ u ∈ U, c β€’ u ∈ U) ∧ βˆ€ (U' : Submodule ℝ (ℝ Γ— ℝ)), U β‰  ↑U'
import Mathlib open Fintype Complex Polynomial LinearMap FiniteDimensional Module Module.End open scoped BigOperators
exercise_1_9
test
/-- Prove that the union of two subspaces of $V$ is a subspace of $V$ if and only if one of the subspaces is contained in the other.-/
theorem exercise_1_9 {F V : Type*} [AddCommGroup V] [Field F] [Module F V] (U W : Submodule F V): βˆƒ U' : Submodule F V, (U'.carrier = ↑U ∩ ↑W ↔ (U ≀ W ∨ W ≀ U)) :=
F : Type u_1 V : Type u_2 inst✝² : AddCommGroup V inst✝¹ : Field F inst✝ : Module F V U W : Submodule F V ⊒ βˆƒ U', U'.carrier = ↑U ∩ ↑W ↔ U ≀ W ∨ W ≀ U
import Mathlib open Fintype Complex Polynomial LinearMap FiniteDimensional Module Module.End open scoped BigOperators
exercise_3_8
test
/-- Suppose that $V$ is finite dimensional and that $T \in \mathcal{L}(V, W)$. Prove that there exists a subspace $U$ of $V$ such that $U \cap \operatorname{null} T=\{0\}$ and range $T=\{T u: u \in U\}$.-/
theorem exercise_3_8 {F V W : Type*} [AddCommGroup V] [AddCommGroup W] [Field F] [Module F V] [Module F W] (L : V β†’β‚—[F] W) : βˆƒ U : Submodule F V, U βŠ“ (ker L) = βŠ₯ ∧ (range L = range (domRestrict L U)) :=
F : Type u_1 V : Type u_2 W : Type u_3 inst✝⁴ : AddCommGroup V inst✝³ : AddCommGroup W inst✝² : Field F inst✝¹ : Module F V inst✝ : Module F W L : V β†’β‚—[F] W ⊒ βˆƒ U, U βŠ“ ker L = βŠ₯ ∧ range L = range (L.domRestrict U)
import Mathlib open Fintype Complex Polynomial LinearMap FiniteDimensional Module Module.End open scoped BigOperators
exercise_5_1
test
/-- Suppose $T \in \mathcal{L}(V)$. Prove that if $U_{1}, \ldots, U_{m}$ are subspaces of $V$ invariant under $T$, then $U_{1}+\cdots+U_{m}$ is invariant under $T$.-/
theorem exercise_5_1 {F V : Type*} [AddCommGroup V] [Field F] [Module F V] {L : V β†’β‚—[F] V} {n : β„•} (U : Fin n β†’ Submodule F V) (hU : βˆ€ i : Fin n, Submodule.map L (U i) = U i) : Submodule.map L (βˆ‘ i : Fin n, U i : Submodule F V) = (βˆ‘ i : Fin n, U i : Submodule F V) :=
F : Type u_1 V : Type u_2 inst✝² : AddCommGroup V inst✝¹ : Field F inst✝ : Module F V L : V β†’β‚—[F] V n : β„• U : Fin n β†’ Submodule F V hU : βˆ€ (i : Fin n), Submodule.map L (U i) = U i ⊒ Submodule.map L (βˆ‘ i : Fin n, U i) = βˆ‘ i : Fin n, U i
import Mathlib open Fintype Complex Polynomial LinearMap FiniteDimensional Module Module.End open scoped BigOperators
exercise_5_11
test
/-- Suppose $S, T \in \mathcal{L}(V)$. Prove that $S T$ and $T S$ have the same eigenvalues.-/
theorem exercise_5_11 {F V : Type*} [AddCommGroup V] [Field F] [Module F V] (S T : End F V) : (S * T).Eigenvalues = (T * S).Eigenvalues :=
F : Type u_1 V : Type u_2 inst✝² : AddCommGroup V inst✝¹ : Field F inst✝ : Module F V S T : End F V ⊒ (S * T).Eigenvalues = (T * S).Eigenvalues
import Mathlib open Fintype Complex Polynomial LinearMap FiniteDimensional Module Module.End open scoped BigOperators
exercise_5_13
test
/-- Suppose $T \in \mathcal{L}(V)$ is such that every subspace of $V$ with dimension $\operatorname{dim} V-1$ is invariant under $T$. Prove that $T$ is a scalar multiple of the identity operator.-/
theorem exercise_5_13 {F V : Type*} [AddCommGroup V] [Field F] [Module F V] [FiniteDimensional F V] {T : End F V} (hS : βˆ€ U : Submodule F V, finrank F U = finrank F V - 1 β†’ Submodule.map T U = U) : βˆƒ c : F, T = c β€’ LinearMap.id :=
F : Type u_1 V : Type u_2 inst✝³ : AddCommGroup V inst✝² : Field F inst✝¹ : Module F V inst✝ : FiniteDimensional F V T : End F V hS : βˆ€ (U : Submodule F V), finrank F β†₯U = finrank F V - 1 β†’ Submodule.map T U = U ⊒ βˆƒ c, T = c β€’ LinearMap.id
import Mathlib open Fintype Complex Polynomial LinearMap FiniteDimensional Module Module.End open scoped BigOperators
exercise_5_24
test
/-- Suppose $V$ is a real vector space and $T \in \mathcal{L}(V)$ has no eigenvalues. Prove that every subspace of $V$ invariant under $T$ has even dimension.-/
theorem exercise_5_24 {V : Type*} [AddCommGroup V] [Module ℝ V] [FiniteDimensional ℝ V] {T : End ℝ V} (hT : βˆ€ c : ℝ, eigenspace T c = βŠ₯) {U : Submodule ℝ V} (hU : Submodule.map T U = U) : Even (finrank U) :=
V : Type u_1 inst✝² : AddCommGroup V inst✝¹ : Module ℝ V inst✝ : FiniteDimensional ℝ V T : End ℝ V hT : βˆ€ (c : ℝ), T.eigenspace c = βŠ₯ U : Submodule ℝ V hU : Submodule.map T U = U ⊒ Even (finrank β†₯U)
import Mathlib open Fintype Complex Polynomial LinearMap FiniteDimensional Module Module.End open scoped BigOperators
exercise_6_3
test
/-- Prove that $\left(\sum_{j=1}^{n} a_{j} b_{j}\right)^{2} \leq\left(\sum_{j=1}^{n} j a_{j}{ }^{2}\right)\left(\sum_{j=1}^{n} \frac{b_{j}{ }^{2}}{j}\right)$ for all real numbers $a_{1}, \ldots, a_{n}$ and $b_{1}, \ldots, b_{n}$.-/
theorem exercise_6_3 {n : β„•} (a b : Fin n β†’ ℝ) : (βˆ‘ i, a i * b i) ^ 2 ≀ (βˆ‘ i : Fin n, i * a i ^ 2) * (βˆ‘ i, b i ^ 2 / i) :=
n : β„• a b : Fin n β†’ ℝ ⊒ (βˆ‘ i : Fin n, a i * b i) ^ 2 ≀ (βˆ‘ i : Fin n, ↑↑i * a i ^ 2) * βˆ‘ i : Fin n, b i ^ 2 / ↑↑i
import Mathlib open Fintype Complex Polynomial LinearMap FiniteDimensional Module Module.End open scoped BigOperators
exercise_6_13
test
/-- Suppose $\left(e_{1}, \ldots, e_{m}\right)$ is an or thonormal list of vectors in $V$. Let $v \in V$. Prove that $\|v\|^{2}=\left|\left\langle v, e_{1}\right\rangle\right|^{2}+\cdots+\left|\left\langle v, e_{m}\right\rangle\right|^{2}$ if and only if $v \in \operatorname{span}\left(e_{1}, \ldots, e_{m}\right)$.-/
theorem exercise_6_13 {V : Type*} [NormedAddCommGroup V] [InnerProductSpace β„‚ V] {n : β„•} {e : Fin n β†’ V} (he : Orthonormal β„‚ e) (v : V) : β€–vβ€–^2 = βˆ‘ i : Fin n, β€–βŸͺv, e i⟫_β„‚β€–^2 ↔ v ∈ Submodule.span β„‚ (e '' Set.univ) :=
V : Type u_1 inst✝¹ : NormedAddCommGroup V inst✝ : InnerProductSpace β„‚ V n : β„• e : Fin n β†’ V he : Orthonormal β„‚ e v : V ⊒ β€–vβ€– ^ 2 = βˆ‘ i : Fin n, β€–βŸͺv, e i⟫_β„‚β€– ^ 2 ↔ v ∈ Submodule.span β„‚ (e '' Set.univ)
import Mathlib open Fintype Complex Polynomial LinearMap FiniteDimensional Module Module.End open scoped BigOperators
exercise_7_5
test
/-- Show that if $\operatorname{dim} V \geq 2$, then the set of normal operators on $V$ is not a subspace of $\mathcal{L}(V)$.-/
theorem exercise_7_5 {V : Type*} [NormedAddCommGroup V] [InnerProductSpace β„‚ V] [FiniteDimensional β„‚ V] (hV : finrank V β‰₯ 2) : βˆ€ U : Submodule β„‚ (End β„‚ V), U.carrier β‰  {T | T * adjoint T = adjoint T * T} :=
V : Type u_1 inst✝² : NormedAddCommGroup V inst✝¹ : InnerProductSpace β„‚ V inst✝ : FiniteDimensional β„‚ V hV : finrank V β‰₯ 2 ⊒ βˆ€ (U : Submodule β„‚ (End β„‚ V)), U.carrier β‰  {T | T * adjoint T = adjoint T * T}
import Mathlib open Fintype Complex Polynomial LinearMap FiniteDimensional Module Module.End open scoped BigOperators
exercise_7_9
test
/-- Prove that a normal operator on a complex inner-product space is self-adjoint if and only if all its eigenvalues are real.-/
theorem exercise_7_9 {V : Type*} [NormedAddCommGroup V] [InnerProductSpace β„‚ V] [FiniteDimensional β„‚ V] (T : End β„‚ V) (hT : T * adjoint T = adjoint T * T) : IsSelfAdjoint T ↔ βˆ€ e : T.Eigenvalues, (e : β„‚).im = 0 :=
V : Type u_1 inst✝² : NormedAddCommGroup V inst✝¹ : InnerProductSpace β„‚ V inst✝ : FiniteDimensional β„‚ V T : End β„‚ V hT : T * adjoint T = adjoint T * T ⊒ IsSelfAdjoint T ↔ βˆ€ (e : T.Eigenvalues), (↑T e).im = 0
import Mathlib open Fintype Complex Polynomial LinearMap FiniteDimensional Module Module.End open scoped BigOperators
exercise_7_11
test
/-- Suppose $V$ is a complex inner-product space. Prove that every normal operator on $V$ has a square root. (An operator $S \in \mathcal{L}(V)$ is called a square root of $T \in \mathcal{L}(V)$ if $S^{2}=T$.)-/
theorem exercise_7_11 {V : Type*} [NormedAddCommGroup V] [InnerProductSpace β„‚ V] [FiniteDimensional β„‚ V] {T : End β„‚ V} (hT : T*adjoint T = adjoint T*T) : βˆƒ (S : End β„‚ V), S ^ 2 = T :=
V : Type u_1 inst✝² : NormedAddCommGroup V inst✝¹ : InnerProductSpace β„‚ V inst✝ : FiniteDimensional β„‚ V T : End β„‚ V hT : T * adjoint T = adjoint T * T ⊒ βˆƒ S, S ^ 2 = T
import Mathlib open Fintype Complex Polynomial LinearMap FiniteDimensional Module Module.End open scoped BigOperators
exercise_1_1_2a
test
/-- Prove the the operation $\star$ on $\mathbb{Z}$ defined by $a\star b=a-b$ is not commutative.-/
theorem exercise_1_1_2a : βˆƒ a b : β„€, a - b β‰  b - a :=
⊒ βˆƒ a b, a - b β‰  b - a
import Mathlib open Fintype Subgroup Set Polynomial Ideal open scoped BigOperators
exercise_1_1_4
test
/-- Prove that the multiplication of residue class $\mathbb{Z}/n\mathbb{Z}$ is associative.-/
theorem exercise_1_1_4 (n : β„•) : βˆ€ (a b c : β„•), (a * b) * c ≑ a * (b * c) [ZMOD n] :=
n : β„• ⊒ βˆ€ (a b c : β„•), ↑a * ↑b * ↑c ≑ ↑a * (↑b * ↑c) [ZMOD ↑n]
import Mathlib open Fintype Subgroup Set Polynomial Ideal open scoped BigOperators
exercise_1_1_15
test
/-- Prove that $(a_1a_2\dots a_n)^{-1} = a_n^{-1}a_{n-1}^{-1}\dots a_1^{-1}$ for all $a_1, a_2, \dots, a_n\in G$.-/
theorem exercise_1_1_15 {G : Type*} [Group G] (as : List G) : as.prod⁻¹ = (as.reverse.map (λ x => x⁻¹)).prod :=
G : Type u_1 inst✝ : Group G as : List G ⊒ as.prod⁻¹ = (List.map (fun x => x⁻¹) as.reverse).prod
import Mathlib open Fintype Subgroup Set Polynomial Ideal open scoped BigOperators
exercise_1_1_17
test
/-- Let $x$ be an element of $G$. Prove that if $|x|=n$ for some positive integer $n$ then $x^{-1}=x^{n-1}$.-/
theorem exercise_1_1_17 {G : Type*} [Group G] {x : G} {n : β„•} (hxn: orderOf x = n) : x⁻¹ = x ^ (n - 1 : β„€) :=
G : Type u_1 inst✝ : Group G x : G n : β„• hxn : orderOf x = n ⊒ x⁻¹ = x ^ (↑n - 1)
import Mathlib open Fintype Subgroup Set Polynomial Ideal open scoped BigOperators