text
stringlengths 0
3.34M
|
---|
informal statement If $k \geq 2$ and $\mathbf{x} \in R^{k}$, prove that there exists $\mathbf{y} \in R^{k}$ such that $\mathbf{y} \neq 0$ but $\mathbf{x} \cdot \mathbf{y}=0$formal statement theorem exercise_1_19
(n : β)
(a b c x : euclidean_space β (fin n))
(r : β)
(hβ : r > 0)
(hβ : 3 β’ c = 4 β’ b - a)
(hβ : 3 * r = 2 * βx - bβ)
: βx - aβ = 2 * βx - bβ β βx - cβ = r := |
informal statement Prove that $-(-v) = v$ for every $v \in V$.formal statement theorem exercise_1_6 : β U : set (β Γ β),
(U β β
) β§
(β (u v : β Γ β), u β U β§ v β U β u + v β U) β§
(β (u : β Γ β), u β U β -u β U) β§
(β U' : submodule β (β Γ β), U β βU') := |
informal statement Show that X is countably compact if and only if every nested sequence $C_1 \supset C_2 \supset \cdots$ of closed nonempty sets of X has a nonempty intersection.formal statement theorem exercise_29_1 : Β¬ locally_compact_space β := |
informal statement Show that $\int_0^1 \log(\sin \pi x) dx = - \log 2$.formal statement theorem exercise_3_22 (D : set β) (hD : D = ball 0 1) (f : β β β)
(hf : differentiable_on β f D) (hfc : continuous_on f (closure D)) :
Β¬ β z β (sphere (0 : β) 1), f z = 1 / z := |
theorem Q1007 (r : β€ β β€ β Prop) [is_equiv β€ r] (hβ : β n : β€, r n (n + 5))
(hβ : β n : β€, r n (n + 8)) (x y : β€) : r x y := sorry |
informal statement If $A \subset X$, a retraction of $X$ onto $A$ is a continuous map $r: X \rightarrow A$ such that $r(a)=a$ for each $a \in A$. Show that a retraction is a quotient map.formal statement theorem exercise_22_2b {X : Type*} [topological_space X]
{A : set X} (r : X β A) (hr : continuous r) (h : β x : A, r x = x) :
quotient_map r := |
informal statement If $f$ is defined on $E$, the graph of $f$ is the set of points $(x, f(x))$, for $x \in E$. In particular, if $E$ is a set of real numbers, and $f$ is real-valued, the graph of $f$ is a subset of the plane. Suppose $E$ is compact, and prove that $f$ is continuous on $E$ if and only if its graph is compact.formal statement theorem exercise_4_6
(f : β β β)
(E : set β)
(G : set (β Γ β))
(hβ : is_compact E)
(hβ : G = {(x, f x) | x β E})
: continuous_on f E β is_compact G := |
informal statement Suppose that $S, T \in \mathcal{L}(V)$ are such that $S T=T S$. Prove that $\operatorname{null} (T-\lambda I)$ is invariant under $S$ for every $\lambda \in \mathbf{F}$.formal statement theorem exercise_5_12 {F V : Type*} [add_comm_group V] [field F]
[module F V] {S : End F V}
(hS : β v : V, β c : F, v β eigenspace S c) :
β c : F, S = c β’ id := |
import topology.instances.real
open filter real
open_locale topological_space
theorem problem_5 (a : β) (f : β β β) :
(β N, β Ξ΅ > 0, β n β₯ N, abs (f n - a) < Ξ΅) β (β N, β n β₯ N, f n = a) :=
begin
sorry
end
|
open tactic
lemma a1 : true :=
begin
sleep 20000,
trivial
end
lemma a2 : true :=
begin
sleep 10000,
trivial
end
|
informal statement Show that if $X$ is a Hausdorff space that is locally compact at the point $x$, then for each neighborhood $U$ of $x$, there is a neighborhood $V$ of $x$ such that $\bar{V}$ is compact and $\bar{V} \subset U$.formal statement theorem exercise_30_13 {X : Type*} [topological_space 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 := |
informal statement If $\Sigma a_{n}$ converges, and if $\left\{b_{n}\right\}$ is monotonic and bounded, prove that $\Sigma a_{n} b_{n}$ converges.formal statement theorem exercise_3_20 {X : Type*} [metric_space X]
(p : β β X) (l : β) (r : X)
(hp : cauchy_seq p)
(hpl : tendsto (Ξ» n, p (l * n)) at_top (π r)) :
tendsto p at_top (π r) := |
informal statement Prove that if $R$ is an integral domain and $x^{2}=1$ for some $x \in R$ then $x=\pm 1$.formal statement theorem exercise_7_1_11 {R : Type*} [ring R] [is_domain R]
{x : R} (hx : x^2 = 1) : x = 1 β¨ x = -1 := |
informal statement Prove that $\lim_{n \rightarrow \infty} \sum_{i<n} a_i = \infty$, where $a_i = \sqrt{i + 1} -\sqrt{i}$.formal statement theorem exercise_3_8
(a b : β β β)
(h1 : β y, (tendsto (Ξ» n, (β i in (finset.range n), a i)) at_top (π y)))
(h2 : monotone b)
(h3 : metric.bounded (set.range b)) :
β y, tendsto (Ξ» n, (β i in (finset.range n), (a i) * (b i))) at_top (π y) := |
informal statement Prove that if a group contains exactly one element of order 2 , then that element is in the center of the group.formal statement theorem exercise_2_11_3 {G : Type*} [group G] [fintype G]
(hG : even (card G)) : β x : G, order_of x = 2 := |
open Classical
theorem dne (p : Prop) (h : ¬¬p) : p :=
Or.elim (em p)
(fun (hp : p) => hp)
(fun (hnp: Β¬p) => absurd hnp h)
theorem step (p : Prop) (h : Β¬(p β¨ Β¬ p)) : Β¬p :=
fun (hp : p) => h (Or.intro_left (Β¬p) (hp))
theorem exclmid (p : Prop) : p β¨ Β¬p :=
dne (p β¨ Β¬p) (
fun (h : Β¬(p β¨ Β¬p)) =>
h (Or.intro_right (p) (step p h))
) |
informal statement If $s_{1}=\sqrt{2}$, and $s_{n+1}=\sqrt{2+\sqrt{s_{n}}} \quad(n=1,2,3, \ldots),$ prove that $\left\{s_{n}\right\}$ converges, and that $s_{n}<2$ for $n=1,2,3, \ldots$.formal statement theorem exercise_3_3
: β (x : β), tendsto f at_top (π x) β§ β n, f n < 2 := |
informal statement Let $\Omega$ be a bounded open subset of $\mathbb{C}$, and $\varphi: \Omega \rightarrow \Omega$ a holomorphic function. Prove that if there exists a point $z_{0} \in \Omega$ such that $\varphi\left(z_{0}\right)=z_{0} \quad \text { and } \quad \varphi^{\prime}\left(z_{0}\right)=1$ then $\varphi$ is linear.formal statement theorem exercise_2_9
{f : β β β} (Ξ© : set β) (b : metric.bounded Ξ©) (h : is_open Ξ©)
(hf : differentiable_on β f Ξ©) (z β Ξ©) (hz : f z = z) (h'z : deriv f z = 1) :
β (f_lin : β βL[β] β), β x β Ξ©, f x = f_lin x := |
informal statement Show that if $X$ is an infinite set, it is connected in the finite complement topology.formal statement theorem exercise_23_4 {X : Type*} [topological_space X] [cofinite_topology X]
(s : set X) : set.infinite s β is_connected s := |
informal statement 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.formal statement theorem exercise_18_8b {X Y : Type*} [topological_space X] [topological_space Y]
[linear_order Y] [order_topology Y] {f g : X β Y}
(hf : continuous f) (hg : continuous g) :
continuous (Ξ» x, min (f x) (g x)) := |
informal statement Prove that if $P \in \operatorname{Syl}_{p}(G)$ and $H$ is a subgroup of $G$ containing $P$ then $P \in \operatorname{Syl}_{p}(H)$.formal statement theorem exercise_4_5_14 {G : Type*} [group G] [fintype G]
(hG : card G = 312) :
β (p : β) (P : sylow p G), P.normal := |
informal statement Let $\mathcal{T}$ be the collection of open subsets of a metric space $\mathrm{M}$, and $\mathcal{K}$ the collection of closed subsets. Show that there is a bijection from $\mathcal{T}$ onto $\mathcal{K}$.formal statement theorem exercise_2_41 (m : β) {X : Type*} [normed_space β ((fin m) β β)] :
is_compact (metric.closed_ball 0 1) := |
informal statement Prove that $\mathbb{Q}$ has no proper subgroups of finite index.formal statement theorem exercise_3_4_1 (G : Type*) [comm_group G] [is_simple_group G] :
is_cyclic G β§ β G_fin : fintype G, nat.prime (@card G G_fin) := |
informal statement Prove that subgroups of a solvable group are solvable.formal statement theorem exercise_3_4_5a {G : Type*} [group G]
(H : subgroup G) [is_solvable G] : is_solvable H := |
informal statement Suppose $T \in \mathcal{L}(V)$ is such that every vector in $V$ is an eigenvector of $T$. Prove that $T$ is a scalar multiple of the identity operator.formal statement theorem exercise_5_20 {F V : Type*} [add_comm_group V] [field F]
[module F V] [finite_dimensional F V] {S T : End F V}
(h1 : @card T.eigenvalues (eigenvalues.fintype T) = finrank F V)
(h2 : β v : V, β c : F, v β eigenspace S c β β c : F, v β eigenspace T c) :
S * T = T * S := |
informal statement If $f$ is defined on $E$, the graph of $f$ is the set of points $(x, f(x))$, for $x \in E$. In particular, if $E$ is a set of real numbers, and $f$ is real-valued, the graph of $f$ is a subset of the plane. Suppose $E$ is compact, and prove that $f$ is continuous on $E$ if and only if its graph is compact.formal statement theorem exercise_4_8b
(E : set β) :
β f : β β β, uniform_continuous_on f E β§ Β¬ metric.bounded (set.image f E) := |
informal statement Let $f$ be a real function on the real line with continuous third derivative. Prove that there exists a point $a$ such thatformal statement theorem exercise_1998_a3 (f : β β β) (hf : cont_diff β 3 f) :
β a : β, (f a) * (deriv f a) * (iterated_deriv 2 f a) * (iterated_deriv 3 f a) β₯ 0 := |
informal statement Prove that the power series $\sum zn/n^2$ converges at every point of the unit circle.formal statement theorem exercise_1_26
(f Fβ Fβ : β β β) (Ξ© : set β) (h1 : is_open Ξ©) (h2 : is_connected Ξ©)
(hFβ : differentiable_on β Fβ Ξ©) (hFβ : differentiable_on β Fβ Ξ©)
(hdFβ : β x β Ξ©, deriv Fβ x = f x) (hdFβ : β x β Ξ©, deriv Fβ x = f x)
: β c : β, β x, Fβ x = Fβ x + c := |
informal statement Prove that $\frac{(x+2)^p-2^p}{x}$, where $p$ is an odd prime, is irreducible in $\mathbb{Z}[x]$.formal statement theorem exercise_9_4_11 :
irreducible ((X 0)^2 + (X 1)^2 - 1 : mv_polynomial (fin 2) β) := |
informal statement Prove that there is no rational number whose square is $12$.formal statement theorem exercise_1_2 : Β¬ β (x : β), ( x ^ 2 = 12 ) := |
informal statement Suppose $f$ is continuous in a region $\Omega$. Prove that any two primitives of $f$ (if they exist) differ by a constant.formal statement theorem exercise_2_9
{f : β β β} (Ξ© : set β) (b : metric.bounded Ξ©) (h : is_open Ξ©)
(hf : differentiable_on β f Ξ©) (z β Ξ©) (hz : f z = z) (h'z : deriv f z = 1) :
β (f_lin : β βL[β] β), β x β Ξ©, f x = f_lin x := |
informal statement Prove that $x^3 - 3x - 1$ is irreducible over $\mathbb{Q}$.formal statement theorem exercise_5_5_2 : irreducible (X^3 - 3*X - 1 : polynomial β) := |
informal statement Prove that if $H$ is a subgroup of $G$ then $H$ is generated by the set $H-\{1\}$.formal statement theorem exercise_2_4_16b {n : β} {hn : n β 0}
{R : subgroup (dihedral_group n)}
(hR : R = subgroup.closure {dihedral_group.r 1}) :
R β β€ β§
β K : subgroup (dihedral_group n), R β€ K β K = R β¨ K = β€ := |
informal statement Prove that if $x^{2}=1$ for all $x \in G$ then $G$ is abelian.formal statement theorem exercise_1_1_34 {G : Type*} [group G] {x : G}
(hx_inf : order_of x = 0) (n m : β€) :
x ^ n β x ^ m := |
informal statement Prove that $x^3 - 3x - 1$ is irreducible over $\mathbb{Q}$.formal statement theorem exercise_2_2_9 {G : Type*} [group G] {a b : G}
(h : a * b = b * a) :
β x y : closure {x | x = a β¨ x = b}, x*y = y*x := |
informal statement Show that the collection $\{(a,b) \mid a < b, a \text{ and } b \text{ rational}\}$ is a basis that generates a topology different from the lower limit topology on $\mathbb{R}$.formal statement theorem exercise_13_8b :
(topological_space.generate_from {S : set β | β a b : β, a < b β§ S = Ico a b}).is_open β
(lower_limit_topology β).is_open := |
informal statement Prove that the quotient ring $\mathbb{Z}[i] /(1+i)$ is a field of order 2.formal statement theorem exercise_8_3_6a {R : Type*} [ring R]
(hR : R = (gaussian_int β§Έ ideal.span ({β¨0, 1β©} : set gaussian_int))) :
is_field R β§ β finR : fintype R, @card R finR = 2 := |
informal statement Let $H \leq K \leq G$. Prove that $|G: H|=|G: K| \cdot|K: H|$ (do not assume $G$ is finite).formal statement theorem exercise_3_2_21a (H : add_subgroup β) (hH : H β β€) : H.index = 0 := |
import data.real.basic
open classical
attribute [instance] prop_decidable
/-
Rigorous definition of a limit
For a sequence x_n, we say that \lim_{n \to \infty} x_n = l if
β Ξ΅ > 0, β N, n β₯ N β |x_n - l| < Ξ΅
-/
def lim_to_inf (x : β β β) (l : β) :=
β Ξ΅ > 0, β N, β n β₯ N, abs (x n - l) < Ξ΅
theorem exercise_1p3 (x y : β β β) (l : β)
(hβ : β n, abs (x n - l) β€ y n) (hβ : lim_to_inf y 0) :
lim_to_inf x l :=
begin
intros Ξ΅ Ξ΅_pos,
rcases hβ Ξ΅ Ξ΅_pos with β¨N, hNβ©,
use N,
intros n hn,
specialize hβ n,
specialize hN n hn,
calc
abs (x n - l) β€ y n : hβ
... β€ abs (y n) : le_abs_self (y n)
... β€ abs (y n - 0) : by rw sub_zero (y n)
... < Ξ΅ : hN,
end |
informal statement A uniformly continuous function of a uniformly continuous function is uniformly continuous.formal statement theorem exercise_4_12
{Ξ± Ξ² Ξ³ : Type*} [uniform_space Ξ±] [uniform_space Ξ²] [uniform_space Ξ³]
{f : Ξ± β Ξ²} {g : Ξ² β Ξ³}
(hf : uniform_continuous f) (hg : uniform_continuous g) :
uniform_continuous (g β f) := |
informal statement Let $N$ be a positive integer. Let $M$ be an integer relatively prime to $N$ and let $d$ be an integer relatively prime to $\varphi(N)$, where $\varphi$ denotes Euler's $\varphi$-function. Prove that if $M_{1} \equiv M^{d} \pmod N$ then $M \equiv M_{1}^{d^{\prime}} \pmod N$ where $d^{\prime}$ is the inverse of $d \bmod \varphi(N)$: $d d^{\prime} \equiv 1 \pmod {\varphi(N)}$.formal statement 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] := |
informal statement If $k \geq 2$ and $\mathbf{x} \in R^{k}$, prove that there exists $\mathbf{y} \in R^{k}$ such that $\mathbf{y} \neq 0$ but $\mathbf{x} \cdot \mathbf{y}=0$formal statement theorem exercise_1_18a
(n : β)
(h : n > 1)
(x : euclidean_space β (fin n)) -- R^n
: β (y : euclidean_space β (fin n)), y β 0 β§ (inner x y) = (0 : β) := |
informal statement Let $\|\cdot\|$ be any norm on $\mathbb{R}^{m}$ and let $B=\left\{x \in \mathbb{R}^{m}:\|x\| \leq 1\right\}$. Prove that $B$ is compact.formal statement theorem exercise_2_57 {X : Type*} [topological_space X]
: β (S : set X), is_connected S β§ Β¬ is_connected (interior S) := |
informal statement Let $G=\left\{g_{1}, \ldots, g_{n}\right\}$ be a finite group. Prove that the element $N=g_{1}+g_{2}+\ldots+g_{n}$ is in the center of the group ring $R G$.formal statement theorem exercise_7_2_12 {R G : Type*} [ring R] [group G] [fintype G] :
β g : G, monoid_algebra.of R G g β center (monoid_algebra R G) := |
informal statement If $x$ and $g$ are elements of the group $G$, prove that $|x|=\left|g^{-1} x g\right|$.formal statement theorem exercise_1_1_22a {G : Type*} [group G] (x g : G) :
order_of x = order_of (gβ»ΒΉ * x * g) := |
def f {Ξ±} (a b : Ξ±) := a
theorem f_Eq {Ξ±} (a b : Ξ±) : f a b = a :=
rfl
theorem ex1 (a b c : Ξ±) : f (f a b) c = a := by
simp [f_Eq]
#print ex1
theorem ex2 (p : Nat β Bool) (x : Nat) (h : p x = true) : (if p x then 1 else 2) = 1 := by
simp [h]
#print ex2
|
informal statement If $H$ is the unique subgroup of a given order in a group $G$ prove $H$ is characteristic in $G$.formal statement 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 := |
informal statement Let $R$ be a ring in which $x^3 = x$ for every $x \in R$. Prove that $R$ is commutative.formal statement theorem exercise_4_2_5 {R : Type*} [ring R]
(h : β x : R, x ^ 3 = x) : comm_ring R := |
informal statement Let $A$ be an abelian group and let $B$ be a subgroup of $A$. Prove that $A / B$ is abelian.formal statement theorem exercise_3_1_3a {A : Type*} [comm_group A] (B : subgroup A) :
β a b : A β§Έ B, a*b = b*a := |
informal statement Let $A$ be an abelian group and let $B$ be a subgroup of $A$. Prove that $A / B$ is abelian.formal statement theorem exercise_3_1_22b {G : Type*} [group G] (I : Type*)
(H : I β subgroup G) (hH : β i : I, subgroup.normal (H i)) :
subgroup.normal (β¨
(i : I), H i):= |
informal statement Let $N$ be a positive integer. Let $M$ be an integer relatively prime to $N$ and let $d$ be an integer relatively prime to $\varphi(N)$, where $\varphi$ denotes Euler's $\varphi$-function. Prove that if $M_{1} \equiv M^{d} \pmod N$ then $M \equiv M_{1}^{d^{\prime}} \pmod N$ where $d^{\prime}$ is the inverse of $d \bmod \varphi(N)$: $d d^{\prime} \equiv 1 \pmod {\varphi(N)}$.formal statement theorem exercise_8_3_4 {R : Type*} {n : β€} {r s : β}
(h : r^2 + s^2 = n) :
β a b : β€, a^2 + b^2 = n := |
/-
Copyright (c) 2020 Kevin Lacker. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Kevin Lacker
-/
import Mathlib.Algebra.Divisibility.Basic
import Mathlib.Tactic.Ring
import Mathlib.Data.Nat.Prime
/-!
# IMO 1959 Q1
Prove that the fraction `(21n+4)/(14n+3)` is irreducible for every
natural number `n`.
Since Lean doesn't have a concept of "irreducible fractions" per se,
we just formalize this as saying the numerator and denominator are
relatively prime.
-/
lemma calculation
(n k : β)
(h1 : k β£ 21 * n + 4)
(h2 : k β£ 14 * n + 3) :
k β£ 1 := by
have h3 : k β£ 2 * (21 * n + 4) := h1.mul_left 2
have h4 : k β£ 3 * (14 * n + 3) := h2.mul_left 3
have h5 : 3 * (14 * n + 3) = 2 * (21 * n + 4) + 1 := by ring
exact (Nat.dvd_add_right h3).mp (h5 βΈ h4)
theorem imo1959_q1 : β n : β, Nat.coprime (21 * n + 4) (14 * n + 3) :=
fun n => Nat.coprime_of_dvd' <| Ξ» k _ h1 h2 => calculation n k h1 h2
|
informal statement 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.formal statement theorem exercise_4_3_26 {Ξ± : Type*} [fintype Ξ±] (ha : fintype.card Ξ± > 1)
(h_tran : β a b: Ξ±, β Ο : equiv.perm Ξ±, Ο a = b) :
β Ο : equiv.perm Ξ±, β a : Ξ±, Ο a β a := |
informal statement Prove that if $x^{2}=1$ for all $x \in G$ then $G$ is abelian.formal statement theorem exercise_1_1_25 {G : Type*} [group G]
(h : β x : G, x ^ 2 = 1) : β a b : G, a*b = b*a := |
informal statement Suppose $\left\{p_{n}\right\}$ is a Cauchy sequence in a metric space $X$, and some sequence $\left\{p_{n l}\right\}$ converges to a point $p \in X$. Prove that the full sequence $\left\{p_{n}\right\}$ converges to $p$.formal statement theorem exercise_3_22 (X : Type*) [metric_space X] [complete_space X]
(G : β β set X) (hG : β n, is_open (G n) β§ dense (G n)) :
β x, β n, x β G n := |
informal statement Prove that a group of even order contains an element of order $2 .$formal statement theorem exercise_2_11_3 {G : Type*} [group G] [fintype G]
(hG : even (card G)) : β x : G, order_of x = 2 := |
import tactic --hide
lemma not_iff_imp_false (P : Prop) : Β¬ P β P β false := iff.rfl -- hide
/-Hint : Hint
Try using `rw not_iff_imp_false,`.
-/
/-Lemma
If $P$ is a logical statement then $P \implies Β¬ Β¬P$.
-/
lemma P_not_not_P (P : Prop) : P β Β¬ (Β¬ P) :=
begin
intro P,
rw not_iff_imp_false,
intro hp,
apply hp,
exact P,
end
|
informal statement Show that X is countably compact if and only if every nested sequence $C_1 \supset C_2 \supset \cdots$ of closed nonempty sets of X has a nonempty intersection.formal statement theorem exercise_28_5
(X : Type*) [topological_space X] :
countably_compact X β β (C : β β set X), (β n, is_closed (C n)) β§
(β n, C n β β
) β§ (β n, C n β C (n + 1)) β β x, β n, x β C n := |
informal statement If $x, y$ are complex, prove that $||x|-|y|| \leq |x-y|$.formal statement theorem exercise_1_16a
(n : β)
(d r : β)
(x y z : euclidean_space β (fin n)) -- R^n
(hβ : n β₯ 3)
(hβ : βx - yβ = d)
(hβ : d > 0)
(hβ : r > 0)
(hβ
: 2 * r > d)
: set.infinite {z : euclidean_space β (fin n) | βz - xβ = r β§ βz - yβ = r} := |
informal statement If $G$ is a finite group, prove that there is an integer $m > 0$ such that $a^m = e$ for all $a \in G$.formal statement theorem exercise_2_1_27 {G : Type*} [group G]
[fintype G] : β (m : β), β (a : G), a ^ m = 1 := |
informal statement Suppose (a) $f$ is continuous for $x \geq 0$, (b) $f^{\prime}(x)$ exists for $x>0$, (c) $f(0)=0$, (d) $f^{\prime}$ is monotonically increasing. Put $g(x)=\frac{f(x)}{x} \quad(x>0)$ and prove that $g$ is monotonically increasing.formal statement theorem exercise_5_15 {f : β β β} (a M0 M1 M2 : β)
(hf' : differentiable_on β f (set.Ici a))
(hf'' : differentiable_on β (deriv f) (set.Ici a))
(hM0 : M0 = Sup {(| f x | )| x β (set.Ici a)})
(hM1 : M1 = Sup {(| deriv f x | )| x β (set.Ici a)})
(hM2 : M2 = Sup {(| deriv (deriv f) x | )| x β (set.Ici a)}) :
(M1 ^ 2) β€ 4 * M0 * M2 := |
import Smt
theorem triv (p : Prop) : p β p := by
smt
|
informal statement If $G$ is a finite group, prove that there is an integer $m > 0$ such that $a^m = e$ for all $a \in G$.formal statement theorem exercise_2_2_5 {G : Type*} [group G]
(h : β (a b : G), (a * b) ^ 3 = a ^ 3 * b ^ 3 β§ (a * b) ^ 5 = a ^ 5 * b ^ 5) :
comm_group G := |
import tactic
open function
theorem challenge4 (X Y Z : Type) (f : X β Y) (g : Y β Z) : surjective (g β f) β surjective g :=
begin
intro h,
intro z,
cases h z with a ha,
use f a,
assumption,
end
|
informal statement Let $p$ be an odd prime. Show that $a$ is a primitive root modulo $p$ iff $a^{(p-1) / q} \not \equiv 1(p)$ for all prime divisors $q$ of $p-1$.formal statement theorem exercise_4_8 {p a : β} (hp : odd p) :
is_primitive_root a p β (β q β£ (p-1), q.prime β Β¬ a^(p-1) β‘ 1 [MOD p]) := |
informal statement Let $X$ be completely regular, let $A$ and $B$ be disjoint closed subsets of $X$. Show that if $A$ is compact, there is a continuous function $f \colon X \rightarrow [0, 1]$ such that $f(A) = \{0\}$ and $f(B) = \{1\}$.formal statement theorem exercise_33_8
(X : Type*) [topological_space X] [regular_space X]
(h : β x A, is_closed A β§ Β¬ x β A β
β (f : X β I), continuous f β§ f x = (1 : I) β§ f '' A = {0})
(A B : set X) (hA : is_closed A) (hB : is_closed B)
(hAB : disjoint A B)
(hAc : is_compact A) :
β (f : X β I), continuous f β§ f '' A = {0} β§ f '' B = {1} := |
informal statement Prove that $x^3 + 6x + 12$ is irreducible in $\mathbb{Q}$.formal statement theorem exercise_11_4_1b {F : Type*} [field F] [fintype F] (hF : card F = 2) :
irreducible (12 + 6 * X + X ^ 3 : polynomial F) := |
informal statement Suppose that $f(x)=\sum_{i=0}^{\infty} c_{i} x^{i}$ is a power series for which each coefficient $c_{i}$ is 0 or 1 . Show that if $f(2 / 3)=3 / 2$, then $f(1 / 2)$ must be irrational.formal statement theorem exercise_2010_a4 (n : β) :
Β¬ nat.prime (10^10^10^n + 10^10^n + 10^n - 1) := |
informal statement Let $F = \mathbb{Z}_p$ be the field of integers $\mod p$, where $p$ is a prime, and let $q(x) \in F[x]$ be irreducible of degree $n$. Show that $F[x]/(q(x))$ is a field having at exactly $p^n$ elements.formal statement theorem exercise_4_5_16 {p n: β} (hp : nat.prime p)
{q : polynomial (zmod p)} (hq : irreducible q) (hn : q.degree = n) :
β is_fin : fintype $ polynomial (zmod p) β§Έ ideal.span ({q} : set (polynomial $ zmod p)),
@card (polynomial (zmod p) β§Έ ideal.span {q}) is_fin = p ^ n β§
is_field (polynomial $ zmod p):= |
informal statement Prove that $x^3 + 6x + 12$ is irreducible in $\mathbb{Q}$.formal statement theorem exercise_11_4_6b {F : Type*} [field F] [fintype F] (hF : card F = 31) :
irreducible (X ^ 3 - 9 : polynomial F) := |
informal statement Suppose that $E$ is an uncountable subset of $\mathbb{R}$. Prove that there exists a point $p \in \mathbb{R}$ at which $E$ condenses.formal statement theorem exercise_2_126 {E : set β}
(hE : Β¬ set.countable E) : β (p : β), cluster_pt p (π E) := |
informal statement Prove that $\sum 1/k(\log(k))^p$ diverges when $p \leq 1$.formal statement theorem exercise_2_1_21 (G : Type*) [group G] [fintype G]
(hG : card G = 5) :
comm_group G := |
/-
Copyright (c) 2017 Microsoft Corporation. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Leonardo de Moura
-/
prelude
import Init.Data.Option.Basic
universe u v
theorem Option.eqOfEqSome {Ξ± : Type u} : β {x y : Option Ξ±}, (βz, x = some z β y = some z) β x = y
| none, none, h => rfl
| none, some z, h => Option.noConfusion ((h z).2 rfl)
| some z, none, h => Option.noConfusion ((h z).1 rfl)
| some z, some w, h => Option.noConfusion ((h w).2 rfl) (congrArg some)
theorem Option.eqNoneOfIsNone {Ξ± : Type u} : β {o : Option Ξ±}, o.isNone β o = none
| none, h => rfl
|
informal statement Let $f$ and $g$ be continuous mappings of a metric space $X$ into a metric space $Y$, and let $E$ be a dense subset of $X$. Prove that $f(E)$ is dense in $f(X)$.formal statement theorem exercise_4_5a
(f : β β β)
(E : set β)
(hβ : is_closed E)
(hβ : continuous_on f E)
: β (g : β β β), continuous g β§ β x β E, f x = g x := |
informal statement Prove that $x^2+y^2-1$ is irreducible in $\mathbb{Q}[x,y]$.formal statement theorem exercise_1_1a
(x : β) (y : β) :
( irrational x ) -> irrational ( x + y ) := |
informal statement Prove that $x^2+1$ is irreducible in $\mathbb{F}_7$formal statement theorem exercise_11_4_8 {p : β} (hp : prime p) (n : β) :
irreducible (X ^ n - p : polynomial β) := |
informal statement Let $G$ be a group of order 105. Prove that if a Sylow 3-subgroup of $G$ is normal then $G$ is abelian.formal statement theorem exercise_5_4_2 {G : Type*} [group G] (H : subgroup G) :
H.normal β β
(β€ : subgroup G), Hβ β€ H := |
import Smt
theorem addition (p q : Prop) : p β p β¨ q := by
smt
|
informal statement Let $\left\{A_{n}\right\}$ be a sequence of connected subspaces of $X$, such that $A_{n} \cap A_{n+1} \neq \varnothing$ for all $n$. Show that $\bigcup A_{n}$ is connected.formal statement theorem exercise_23_4 {X : Type*} [topological_space X] [cofinite_topology X]
(s : set X) : set.infinite s β is_connected s := |
informal statement Suppose that $S, T \in \mathcal{L}(V)$ are such that $S T=T S$. Prove that $\operatorname{null} (T-\lambda I)$ is invariant under $S$ for every $\lambda \in \mathbf{F}$.formal statement theorem exercise_5_4 {F V : Type*} [add_comm_group V] [field F]
[module F V] (S T : V ββ[F] V) (hST : S β T = T β S) (c : F):
map S (T - c β’ id).ker = (T - c β’ id).ker := |
informal statement Prove that the intersection of any collection of subspaces of $V$ is a subspace of $V$.formal statement theorem exercise_3_1 {F V : Type*}
[add_comm_group V] [field F] [module F V] [finite_dimensional F V]
(T : V ββ[F] V) (hT : finrank F V = 1) :
β c : F, β v : V, T v = c β’ v:= |
informal statement Prove that the addition of residue classes $\mathbb{Z}/n\mathbb{Z}$ is associative.formal statement theorem exercise_1_1_5 (n : β) (hn : 1 < n) :
is_empty (group (zmod n)) := |
informal statement If $p$ is a prime, show that $q(x) = 1 + x + x^2 + \cdots x^{p - 1}$ is irreducible in $Q[x]$.formal statement theorem exercise_4_6_3 :
infinite {a : β€ | irreducible (X^7 + 15*X^2 - 30*X + a : polynomial β)} := |
informal statement Show that there is no holomorphic function $f$ in the unit disc $D$ that extends continuously to $\partial D$ such that $f(z) = 1/z$ for $z \in \partial D$.formal statement theorem exercise_3_22 (D : set β) (hD : D = ball 0 1) (f : β β β)
(hf : differentiable_on β f D) (hfc : continuous_on f (closure D)) :
Β¬ β z β (sphere (0 : β) 1), f z = 1 / z := |
informal statement Suppose that $T \in \mathcal{L}(V)$ has $\operatorname{dim} V$ distinct eigenvalues and that $S \in \mathcal{L}(V)$ has the same eigenvectors as $T$ (not necessarily with the same eigenvalues). Prove that $S T=T S$.formal statement theorem exercise_5_20 {F V : Type*} [add_comm_group V] [field F]
[module F V] [finite_dimensional F V] {S T : End F V}
(h1 : @card T.eigenvalues (eigenvalues.fintype T) = finrank F V)
(h2 : β v : V, β c : F, v β eigenspace S c β β c : F, v β eigenspace T c) :
S * T = T * S := |
import data.finset.basic
import data.finset.lattice
import data.nat.basic
import data.nat.gcd.basic
import data.pnat.basic
/-
Indian Mathematical Olympiad 1998, Problem 8.
Let M be a positive integer and consider the set
S = { n β β : MΒ² β€ n < (M + 1)Β² }.
Prove that the products of the form a * b with a,b β S are all distinct.
-/
theorem lemma_1
(M : β)
(hM : 0 < M)
(a b c d : {x : β // M^2 β€ x β§ x < (M + 1)^2})
(h_ne : ({a, b}: finset β) β {c, d})
(h_wlog : a < c β§ a < d)
: a.val * b.val β c.val * d.val :=
begin
intro heq,
let p := nat.gcd a c,
-- let q = a / p and r = c / p
-- then gcd(q,r) = 1
-- Since q β£(ab/p) = cd / p = rd, we have qβ£d.
-- Now let s = d/q so that b = cd /a = rs.
-- Therefore, a = pq, b = rs, c = pr, d = qs for some positive integers p,q,r,s.
-- Since c > a, r > q, and r β₯ q + 1.
-- Since d > a, s > p, and s β₯ p + 1.
-- Therefore,,
-- b = rs β₯ (p + 1)(q + 1) = pq + p + q + 1
-- β₯ pq + 2 sqrt(pq) + 1 = a + 2 sqrt(a) + 1
-- β₯ M^2 + 2 M + 1 = (M + 1)^2
-- Then b is not in S, a contradiction.
sorry
end
theorem india1998_q8
(M : β)
(hM : 0 < M)
(a b c d : {x : β // M^2 β€ x β§ x < (M + 1)^2})
(h_ne : ({a, b}: finset β) β {c, d})
: a.val * b.val β c.val * d.val :=
begin
let m : option β := finset.min {a,b,c,d},
-- delegate to lemma_1 ...
sorry,
end
|
informal statement Show that there is an infinite number of solutions to $x^2 = -1$ in the quaternions.formal statement theorem exercise_4_2_5 {R : Type*} [ring R]
(h : β x : R, x ^ 3 = x) : comm_ring R := |
informal statement Suppose $\left\{p_{n}\right\}$ is a Cauchy sequence in a metric space $X$, and some sequence $\left\{p_{n l}\right\}$ converges to a point $p \in X$. Prove that the full sequence $\left\{p_{n}\right\}$ converges to $p$.formal statement theorem exercise_3_20 {X : Type*} [metric_space X]
(p : β β X) (l : β) (r : X)
(hp : cauchy_seq p)
(hpl : tendsto (Ξ» n, p (l * n)) at_top (π r)) :
tendsto p at_top (π r) := |
import data.real.basic
open classical
attribute [instance] prop_decidable
/-
Rigorous definition of a limit
For a sequence x_n, we say that \lim_{n \to \infty} x_n = l if
β Ξ΅ > 0, β N, n β₯ N β |x_n - l| < Ξ΅
-/
def lim_to_inf (x : β β β) (l : β) :=
β Ξ΅ > 0, β N, β n β₯ N, abs (x n - l) < Ξ΅
theorem exercise_1p4 (x : β β β) (l : β) (hβ : lim_to_inf x l) :
lim_to_inf (Ξ» n, abs (x n)) (abs l) :=
begin
intros Ξ΅ Ξ΅_pos,
rcases hβ Ξ΅ Ξ΅_pos with β¨N, hNβ©,
use N,
intros n hn,
calc
abs (abs (x n) - abs l) β€ abs ((x n) - l) : abs_abs_sub_le_abs_sub (x n) l
... < Ξ΅ : hN n hn
end |
informal statement If $x$ is an element of infinite order in $G$, prove that the elements $x^{n}, n \in \mathbb{Z}$ are all distinct.formal statement theorem exercise_1_1_34 {G : Type*} [group G] {x : G}
(hx_inf : order_of x = 0) (n m : β€) :
x ^ n β x ^ m := |
informal statement Suppose $f$ is a real function with domain $R^{1}$ which has the intermediate value property: if $f(a)<c<f(b)$, then $f(x)=c$ for some $x$ between $a$ and $b$. Suppose also, for every rational $r$, that the set of all $x$ with $f(x)=r$ is closed. Prove that $f$ is continuous.formal statement theorem exercise_4_19
{f : β β β} (hf : β a b c, a < b β f a < c β c < f b β β x, a < x β§ x < b β§ f x = c)
(hg : β r : β, is_closed {x | f x = r}) : continuous f := |
informal statement Let $G$ be a finite group of composite order $n$ with the property that $G$ has a subgroup of order $k$ for each positive integer $k$ dividing $n$. Prove that $G$ is not simple.formal statement theorem exercise_4_4_6a {G : Type*} [group G] (H : subgroup G)
[subgroup.characteristic H] : subgroup.normal H := |
informal statement Prove that a subgroup $H$ of $G$ is normal if and only if $[G, H] \leq H$.formal statement theorem exercise_5_4_2 {G : Type*} [group G] (H : subgroup G) :
H.normal β β
(β€ : subgroup G), Hβ β€ H := |
informal statement If $A \subset X$, a retraction of $X$ onto $A$ is a continuous map $r: X \rightarrow A$ such that $r(a)=a$ for each $a \in A$. Show that a retraction is a quotient map.formal statement theorem exercise_23_2 {X : Type*}
[topological_space X] {A : β β set X} (hA : β n, is_connected (A n))
(hAn : β n, A n β© A (n + 1) β β
) :
is_connected (β n, A n) := |
open classical
theorem Ex007(a b : Prop): (( a β b) β a) β a :=
assume H1:( a β b) β a,
have A:¬¬a,from not.intro
(
assume H2:Β¬a,
have B:a, from H1
(
assume H3:a,
show b, from absurd H3 H2
),
show false, from H2 B
),
by_contradiction
(
assume C:Β¬a,
show false, from A C
)
|
informal statement Prove that $x^2+1$ is irreducible in $\mathbb{F}_7$formal statement theorem exercise_11_4_6b {F : Type*} [field F] [fintype F] (hF : card F = 31) :
irreducible (X ^ 3 - 9 : polynomial F) := |
informal statement If $G_1$ and $G_2$ are cyclic groups of orders $m$ and $n$, respectively, prove that $G_1 \times G_2$ is cyclic if and only if $m$ and $n$ are relatively prime.formal statement theorem exercise_2_11_6 {G : Type*} [group G] {p : β} (hp : nat.prime p)
{P : sylow p G} (hP : P.normal) :
β (Q : sylow p G), P = Q := |
informal statement Let $H$ be the subgroup generated by two elements $a, b$ of a group $G$. Prove that if $a b=b a$, then $H$ is an abelian group.formal statement theorem exercise_2_4_19 {G : Type*} [group G] {x : G}
(hx : order_of x = 2) (hx1 : β y, order_of y = 2 β y = x) :
x β center G := |
informal statement Prove that if $P \in \operatorname{Syl}_{p}(G)$ and $H$ is a subgroup of $G$ containing $P$ then $P \in \operatorname{Syl}_{p}(H)$.formal statement theorem exercise_4_5_1a {p : β} {G : Type*} [group G]
{P : subgroup G} (hP : is_p_group p P) (H : subgroup G)
(hH : P β€ H) : is_p_group p H := |
informal statement Suppose $k \geq 3, x, y \in \mathbb{R}^k, |x - y| = d > 0$, and $r > 0$. Prove that if $2r > d$, there are infinitely many $z \in \mathbb{R}^k$ such that $|z-x|=|z-y|=r$.formal statement theorem exercise_1_16a
(n : β)
(d r : β)
(x y z : euclidean_space β (fin n)) -- R^n
(hβ : n β₯ 3)
(hβ : βx - yβ = d)
(hβ : d > 0)
(hβ : r > 0)
(hβ
: 2 * r > d)
: set.infinite {z : euclidean_space β (fin n) | βz - xβ = r β§ βz - yβ = r} := |