name
stringlengths 14
14
| lean4_statement
stringlengths 75
1.48k
β | informal_statement
stringlengths 47
898
β | informal_solution
stringlengths 16
303
β | tags
stringclasses 36
values | coq_statement
stringlengths 91
1.51k
β | isabelle_statement
stringlengths 160
2.65k
β | lean4_proof
float64 |
---|---|---|---|---|---|---|---|
putnam_1975_a1 | abbrev putnam_1975_a1_solution : ((β€ Γ β€) β β€) Γ ((β€ Γ β€) β β€) := sorry
-- (fun (a, b) => a + b + 1, fun (a, b) => a - b)
theorem putnam_1975_a1
(nab : (β€ Γ β€ Γ β€) β Prop := fun (n, a, b) => n = (a^2 + (a : β))/2 + (b^2 + (b : β))/2)
(nxy : (β€ Γ β€ Γ β€) β Prop := fun (n, x, y) => 4*n + 1 = x^2 + y^2)
: (β n a b : β€, nab (n, a, b) β nxy (n, putnam_1975_a1_solution.1 (a, b), putnam_1975_a1_solution.2 (a, b))) β§
β n : β€, (β x y : β€, nxy (n, x, y)) β β a b : β€, nab (n, a, b) :=
sorry | If an integer $n$ can be written as the sum of two triangular numbers (that is, $n = \frac{a^2 + a}{2} + \frac{b^2 + b}{2}$ for some integers $a$ and $b$), express $4n + 1$ as the sum of the squares of two integers $x$ and $y$, giving $x$ and $y$ in terms of $a$ and $b$. Also, show that if $4n + 1 = x^2 + y^2$ for some integers $x$ and $y$, then $n$ can be written as the sum of two triangular numbers. | $x = a + b + 1$ and $y = a - b$ (or vice versa). | ['algebra', 'number_theory'] | Section putnam_1975_a1.
Theorem putnam_1975_a1:
forall (m: nat), exists (n: nat), m = Nat.div (n * (n+1)) 2 <-> exists (p q: nat), 4*m + 1 = p*p + q*q.
Proof. Admitted.
End putnam_1975_a1. | theory putnam_1975_a1 imports Complex_Main
begin
definition putnam_1975_a1_solution::"(int\<Rightarrow>int\<Rightarrow>int) \<times> (int\<Rightarrow>int\<Rightarrow>int)" where "putnam_1975_a1_solution \<equiv> undefined"
(* (\<lambda>a. \<lambda>b. a + b + 1, \<lambda>a. \<lambda>b. a - b) *)
theorem putnam_1975_a1:
fixes nab nxy::"int\<Rightarrow>int\<Rightarrow>int\<Rightarrow>bool"
defines "nab \<equiv> \<lambda>n::int. \<lambda>a::int. \<lambda>b::int. (n = (a^2 + a) / 2 + (b^2 + b) / 2)"
and "nxy \<equiv> \<lambda>n::int. \<lambda>x::int. \<lambda>y::int. (4 * n + 1 = x^2 + y^2)"
shows "(\<forall>n a b::int. nab n a b \<longrightarrow> nxy n ((fst putnam_1975_a1_solution) a b) ((snd putnam_1975_a1_solution) a b))
\<and> (\<forall>n::int. (\<exists>x y::int. nxy n x y) \<longrightarrow> (\<exists> a b::int. nab n a b))"
sorry
end | null |
putnam_1975_a2 | abbrev putnam_1975_a2_solution : (β Γ β) β Prop := sorry
-- fun (b, c) => c < 1 β§ c - b > -1 β§ c + b > -1
theorem putnam_1975_a2
: β b c : β, (β z : β, (X^2 + (C (b : β))*X + (C (c : β)) : Polynomial β).eval z = 0 β βzβ < 1) β putnam_1975_a2_solution (b, c) :=
sorry | For which ordered pairs $(b, c)$ of real numbers do both roots of $z^2 + bz + c$ lie strictly inside the unit disk (i.e., $\{|z| < 1\}$) in the complex plane? | The desired region is the strict interior of the triangle with vertices $(0, -1)$, $(2, 1)$, and $(-2, 1)$. | ['algebra'] | Section putnam_1975_a2.
Require Import List Reals Coquelicot.Coquelicot.
Open Scope C.
Definition putnam_1975_a2_solution : R -> R -> Prop := fun a b => b < 1 /\ b - a > -1 /\ b + a > -1.
Theorem putnam_1975_a2
: forall a b : R, (forall z : C, z * z + a * z + b = 0 -> Cmod z < 1) <-> putnam_1975_a2_solution a b.
Proof. Admitted.
End putnam_1975_a2. | theory putnam_1975_a2 imports Complex_Main
begin
definition putnam_1975_a2_solution::"real\<Rightarrow>real\<Rightarrow>bool" where "putnam_1975_a2_solution \<equiv> undefined"
(* \<lambda>b. \<lambda>c. c < 1 \<and> c - b > -1 \<and> c + b > -1 *)
theorem putnam_1975_a2:
shows "\<forall>b c::real. (\<forall>z::complex. (z^2 + b * z + c) = 0 \<longrightarrow> norm z < 1) \<longleftrightarrow> putnam_1975_a2_solution b c"
sorry
end | null |
putnam_1975_a3 | abbrev putnam_1975_a3_solution : ((β Γ β Γ β) β (β Γ β Γ β)) Γ ((β Γ β Γ β) β (β Γ β Γ β)) := sorry
-- (fun (a, b, c) => ((a/b)^(1/(b - a)), (1 - ((a/b)^(1/(b - a)))^b)^(1/b), 0), fun (a, b, c) => (0, (1 - ((b/c)^(1/(c - b)))^b)^(1/b), (b/c)^(1/(c - b))))
theorem putnam_1975_a3
(a b c : β)
(hi : 0 < a β§ a < b β§ b < c)
(P : (β Γ β Γ β) β Prop := fun (x, y, z) => x β₯ 0 β§ y β₯ 0 β§ z β₯ 0 β§ x^b + y^b + z^b = 1)
(f : (β Γ β Γ β) β β := fun (x, y, z) => x^a + y^b + z^c)
: (P (putnam_1975_a3_solution.1 (a, b, c)) β§ β x y z : β, P (x, y, z) β
f (x, y, z) β€ f (putnam_1975_a3_solution.1 (a, b, c))) β§
(P (putnam_1975_a3_solution.2 (a, b, c)) β§ β x y z : β, P (x, y, z) β
f (x, y, z) β₯ f (putnam_1975_a3_solution.2 (a, b, c))) :=
sorry | If $a$, $b$, and $c$ are real numbers satisfying $0 < a < b < c$, at what points in the set $$\{(x, y, z) \in \mathbb{R}^3 : x^b + y^b + z^b = 1, x \ge 0, y \ge 0, z \ge 0\}$$ does $f(x, y, z) = x^a + y^b + z^c$ attain its maximum and minimum? | $f$ attains its maximum at $\left(x_0, (1 - x_0^b)^{\frac{1}{b}}, 0\right)$ and its minimum at $\left(0, (1 - z_0^b)^{\frac{1}{b}}, z_0\right)$, where $x_0 = \left(\frac{a}{b}\right)^{\frac{1}{b-a}}$ and $z_0 = \left(\frac{b}{c}\right)^{\frac{1}{c-b}}$. | ['algebra'] | Section putnam_1975_a3.
Require Import Reals Coquelicot.Coquelicot.
Open Scope R.
Definition putnam_1975_a3_solution1 (a b c: R): R * R * R :=
(Rpower (a / b) (1 / (b - a)), (1 - (Rpower (a / b) (Rpower (b / (b - a)) (1 / b)))), 0).
Definition putnam_1975_a3_solution2 (a b c: R): R * R * R :=
(0, (1 - (Rpower (b / c) (Rpower (b / (c - b)) (1 / b)))), Rpower (b / c) (1 / (c - b))).
Theorem putnam_1975_a3
(a b c : R)
(hi : 0 < a /\ a < b /\ b < c)
(P : (R * R * R) -> Prop := fun xyz: R * R * R => let '(x, y, z) := xyz in (x >= 0 /\ y >= 0 /\ z >= 0 /\ Rpower x b + Rpower y b + Rpower z b = 1))
(f : (R * R * R) -> R := fun xyz: R * R * R => let '(x, y, z) := xyz in Rpower x a + Rpower y b + Rpower z c)
: (P (putnam_1975_a3_solution1 a b c) /\ forall x y z : R, P (x, y, z) ->
f (x, y, z) <= f (putnam_1975_a3_solution1 a b c)) /\
(P (putnam_1975_a3_solution2 a b c) /\ forall x y z : R, P (x, y, z) ->
f (x, y, z) >= f (putnam_1975_a3_solution2 a b c)).
Proof. Admitted.
End putnam_1975_a3. | theory putnam_1975_a3 imports Complex_Main
begin
definition putnam_1975_a3_solution::"(real\<Rightarrow>real\<Rightarrow>real\<Rightarrow>(real\<times>real\<times>real))\<times>(real\<Rightarrow>real\<Rightarrow>real\<Rightarrow>(real\<times>real\<times>real))" where "putnam_1975_a3_solution \<equiv> undefined"
(* ( \<lambda>a b c. ((a/b) powr (1/(b-a)), (1 - ((a/b) powr (1/(b-a))) powr b) powr (1/b), 0),
\<lambda>a b c. (0, (1 - ((b/c) powr (1/(c-b))) powr b) powr (1/b), (b/c) powr (1/(c-b))) ) *)
theorem putnam_1975_a3:
fixes a b c::real and P::"real\<times>real\<times>real\<Rightarrow>bool" and f::"real\<times>real\<times>real\<Rightarrow>real"
defines "P \<equiv> \<lambda>(x, y, z). x \<ge> 0 \<and> y \<ge> 0 \<and> z \<ge> 0 \<and> x powr b + y powr b + z powr b = 1"
and "f \<equiv> \<lambda>(x, y, z). x powr a + y powr b + z powr c"
assumes hi : "0 < a \<and> a < b \<and> b < c"
shows "(P ((fst putnam_1975_a3_solution) a b c) \<and> (\<forall>x y z::real. P (x, y, z) \<longrightarrow> f (x,y,z) \<le> f ((fst putnam_1975_a3_solution) a b c))) \<and>
(P ((snd putnam_1975_a3_solution) a b c) \<and> (\<forall>x y z::real. P (x, y, z) \<longrightarrow> f (x,y,z) \<ge> f ((snd putnam_1975_a3_solution) a b c)))"
sorry
end | null |
putnam_1975_b1 | abbrev putnam_1975_b1_solution : β€ := sorry
-- 7
theorem putnam_1975_b1
(H : Set (β€ Γ β€) := {(x, y) : (β€ Γ β€) | β u v w : β€, (x, y) = (u*3 + v*4 + w*5, u*8 + v*(-1) + w*4)})
: (β b : β€, H = {(x, y) : (β€ Γ β€) | β u v : β€, (x, y) = (u, u*b + v*putnam_1975_b1_solution)}) β§ putnam_1975_b1_solution > 0 :=
sorry | Let $H$ be a subgroup of the additive group of ordered pairs of integers under componentwise addition. If $H$ is generated by the elements $(3, 8)$, $(4, -1)$, and $(5, 4)$, then $H$ is also generated by two elements $(1, b)$ and $(0, a)$ for some integer $b$ and positive integer $a$. Find $a$. | $a$ must equal $7$. | ['abstract_algebra', 'number_theory'] | null | theory putnam_1975_b1 imports Complex_Main
begin
definition putnam_1975_b1_solution::int where "putnam_1975_b1_solution \<equiv> undefined"
(* 7 *)
theorem putnam_1975_b1:
fixes H::"(int \<times> int) set"
defines "H \<equiv> {(x, y). \<exists>u v w::int. (x, y) = (u*3 + v*4 + w*5, u*8 - v + w*4)}"
shows "\<exists>b::int. H = {(x, y). \<exists>u v::int. (x, y) = (u, u*b + v*putnam_1975_b1_solution)} \<and> putnam_1975_b1_solution > 0"
sorry
end | null |
putnam_1975_b3 | abbrev putnam_1975_b3_solution : β β β := sorry
-- fun k : β => 1/(Nat.factorial k)
theorem putnam_1975_b3
: β k : β, k > 0 β (β a : Multiset β, (β i β a, i > 0) β§ card a β₯ k β
(esymm a k)/(esymm a 1)^k β€ putnam_1975_b3_solution k) β§
β M : β, M < putnam_1975_b3_solution k β (β a : Multiset β, (β i β a, i > 0) β§ card a β₯ k β§
(esymm a k)/(esymm a 1)^k > M) :=
sorry | Let $s_k (a_1, a_2, \dots, a_n)$ denote the $k$-th elementary symmetric function; that is, the sum of all $k$-fold products of the $a_i$. For example, $s_1 (a_1, \dots, a_n) = \sum_{i=1}^{n} a_i$, and $s_2 (a_1, a_2, a_3) = a_1a_2 + a_2a_3 + a_1a_3$. Find the supremum $M_k$ (which is never attained) of $$\frac{s_k (a_1, a_2, \dots, a_n)}{(s_1 (a_1, a_2, \dots, a_n))^k}$$ across all $n$-tuples $(a_1, a_2, \dots, a_n)$ of positive real numbers with $n \ge k$. | The supremum $M_k$ is $rac{1}{k!}$. | ['analysis', 'algebra'] | null | theory putnam_1975_b3 imports Complex_Main
begin
definition putnam_1975_b3_solution::"nat\<Rightarrow>real" where "putnam_1975_b3_solution \<equiv> undefined"
(* \<lambda>k. 1 / (fact k) *)
theorem putnam_1975_b3:
fixes esymm::"nat \<Rightarrow> (real list) \<Rightarrow> real" and f::"nat \<Rightarrow> (real list) \<Rightarrow> real" and areq::"nat \<Rightarrow> (real list) \<Rightarrow> bool"
defines "esymm \<equiv> \<lambda>k. \<lambda>a. \<Sum>s \<in> { S::nat set. card S = k \<and> (\<forall>i \<in> S. i < length a) }. (\<Prod>i \<in> s. a!i)"
and "f \<equiv> \<lambda>k. \<lambda>a. (esymm k a) / (esymm 1 a)^k"
and "areq \<equiv> \<lambda>k. \<lambda>a. (\<forall>i \<in> {0..<length a}. a!i > 0) \<and> length a \<ge> k"
shows "\<forall>k::nat. \<forall>a::real list. k > 0 \<longrightarrow> areq k a \<longrightarrow> (f k a \<le> putnam_1975_b3_solution k \<and>
(\<forall>M::real. M < putnam_1975_b3_solution k \<longrightarrow> (\<exists>a::real list. areq k a \<and> f k a > M)))"
sorry
end | null |
putnam_1975_b4 | abbrev putnam_1975_b4_solution : Prop := sorry
-- False
theorem putnam_1975_b4
(P : β Γ β β Prop := fun (x, y) => x^2 + y^2 = 1)
: (β B β setOf P, IsClosed B β§ β x y : β, P (x, y) β Xor' ((x, y) β B) ((-x, -y) β B)) β putnam_1975_b4_solution :=
sorry | Let $C = \{(x, y) \in \mathbb{R}^2 : x^2 + y^2 = 1\}$ denote the unit circle. Does there exist $B \subseteq C$ for which $B$ is topologically closed and contains exactly one point from each pair of diametrically opposite points in $C$? | Such $B$ does not exist. | ['analysis'] | null | theory putnam_1975_b4 imports Complex_Main
begin
definition putnam_1975_b4_solution::bool where "putnam_1975_b4_solution \<equiv> undefined"
(* False *)
theorem putnam_1975_b4:
fixes P::"real\<Rightarrow>real\<Rightarrow>bool"
defines "P \<equiv> \<lambda>x. \<lambda>y. x^2 + y^2 = 1"
shows "(\<exists>B. B \<subseteq> {(x, y). P x y} \<and> closed B \<and> (\<forall> x y::real. P x y \<longrightarrow> (((x, y) \<in> B) \<noteq> ((-x, -y) \<in> B)))) \<longleftrightarrow> putnam_1975_b4_solution"
sorry
end | null |
putnam_1975_b5 | theorem putnam_1975_b5
(e : β := Real.exp 1)
(f : β β β β β)
(h0 : β x : β, f 0 x = e^x)
(hf : β n : β, β x : β, f (n + 1) x = x * (deriv (f n) x))
: β' n : β, (f n 1)/(Nat.factorial n) = e^e :=
sorry | Let $f_0(x) = e^x$ and $f_{n+1}(x) = xf'_n(x)$ for all $n \ge 0$. Prove that $$\sum_{n=0}^{\infty} \frac{f_n(1)}{n!} = e^e.$$ | null | ['analysis', 'algebra'] | Section putnam_1975_b5.
Require Import Factorial Reals Coquelicot.Coquelicot.
Theorem putnam_1975_b5
(f : nat -> nat -> R := fix f (n x: nat) :=
match n with
| O => exp (INR x)
| S n' => INR x * f n' x
end)
: Series (fun n => f n 1%nat / INR (fact n)) = exp (exp 1).
Proof. Admitted.
End putnam_1975_b5. | theory putnam_1975_b5 imports Complex_Main "HOL-Analysis.Derivative"
begin
theorem putnam_1975_b5:
fixes f::"nat\<Rightarrow>real\<Rightarrow>real"
assumes h0 : "\<forall>x::real. f 0 x = exp x"
and hf : "\<forall>n::nat. \<forall>x::real. f (n+1) x = x * (deriv (f n) x)"
shows "(\<Sum>n::nat. (f n 1) / (fact n)) = exp (exp 1)"
sorry
end | null |
putnam_1992_a1 | theorem putnam_1992_a1
(f : β€ β β€)
: ((f = fun n β¦ 1 - n) β (β n : β€, f (f n) = n) β§ (β n : β€, f (f (n + 2) + 2) = n) β§ (f 0 = 1)) :=
sorry | Prove that $f(n) = 1-n$ is the only integer-valued function defined on the integers that satisfies the following conditions.
\begin{itemize}
\item[(i)] $f(f(n)) = n$, for all integers $n$;
\item[(ii)] $f(f(n+2)+2) = n$ for all integers $n$;
\item[(iii)] $f(0) = 1$.
\end{itemize} | null | ['algebra'] | Section putnam_1992_a1.
Require Import Basics.
Theorem putnam_1992_a1:
forall (f: nat -> nat),
(forall (n: nat), f (f n) = n /\ f (f (n + 2)) + 2 = n) /\
f 0 = 1 <->
f = (fun n => 1 - n).
Proof. Admitted.
End putnam_1992_a1. | theory putnam_1992_a1 imports Complex_Main
begin
theorem putnam_1992_a1:
fixes f :: "int \<Rightarrow> int"
shows "(f = (\<lambda>n::int. 1 - n)) \<longleftrightarrow> ((\<forall>n::int. f (f n) = n) \<and> (\<forall>n::int. f (f (n+2) + 2) = n) \<and> f 0 = 1)"
sorry
end
| null |
putnam_1992_a2 | abbrev putnam_1992_a2_solution : β := sorry
-- 1992
theorem putnam_1992_a2
(C : β β β := fun Ξ± β¦ taylorCoeffWithin (fun x β¦ (1 + x) ^ Ξ±) 1992 Set.univ 0)
: (β« y in (0)..1, C (-y - 1) * β k in Finset.Icc (1 : β) 1992, 1 / (y + k) = putnam_1992_a2_solution) :=
sorry | Define $C(\alpha)$ to be the coefficient of $x^{1992}$ in the power series about $x=0$ of $(1 + x)^\alpha$. Evaluate
\[
\int_0^1 \left( C(-y-1) \sum_{k=1}^{1992} \frac{1}{y+k} \right)\,dy.
\] | Prove that the integral evaluates to $1992$. | ['analysis', 'algebra'] | Section putnam_1992_a2.
Require Import Reals Binomial Factorial Coquelicot.Coquelicot.
Open Scope R.
Definition putnam_1992_a2_solution := 1992.
Theorem putnam_1992_a2:
let C (a: R) := (Derive_n (fun x => Rpower (1 + x) a) 1992) 0 / INR (fact 1992) in
RInt (fun y => C( - y - 1 ) * (sum_n (fun k => 1 / (y + INR k)) 1992)) 0 1 = putnam_1992_a2_solution.
Proof. Admitted.
End putnam_1992_a2. | theory putnam_1992_a2 imports Complex_Main
"HOL-Analysis.Derivative"
"HOL-Analysis.Set_Integral"
"HOL-Analysis.Lebesgue_Measure"
begin
definition putnam_1992_a2_solution :: real where "putnam_1992_a2_solution \<equiv> undefined"
(* 1992 *)
theorem putnam_1992_a2:
fixes taylorcoeff :: "(real \<Rightarrow> real) \<Rightarrow> nat \<Rightarrow> real"
fixes C :: "real \<Rightarrow> real"
defines "taylorcoeff \<equiv> (\<lambda>(f::real\<Rightarrow>real)(n::nat). ((deriv^^n) f 0) / (fact n))"
and "C \<equiv> (\<lambda>\<alpha>::real. taylorcoeff (\<lambda>x::real. (1 + x) powr \<alpha>) 1992)"
shows "(set_lebesgue_integral lebesgue {0<..<1} (\<lambda>y::real. C (-y-1) * (\<Sum>k::nat=1..1992. 1 / (y + k)))) = putnam_1992_a2_solution"
sorry
end
| null |
putnam_1992_a3 | abbrev putnam_1992_a3_solution : β β Set (β Γ β Γ β) := sorry
-- fun m β¦ ite (Odd m) β
{(m + 1, 2 ^ (m / 2), 2 ^ (m / 2))}
theorem putnam_1992_a3
(m : β)
(mpos : m > 0)
(S : Set (β Γ β Γ β))
(hS : β n x y : β, (n, x, y) β S β n > 0 β§ x > 0 β§ y > 0 β§ Coprime n m β§ (x ^ 2 + y ^ 2) ^ m = (x * y) ^ n)
: (S = putnam_1992_a3_solution m) :=
sorry | For a given positive integer $m$, find all triples $(n, x, y)$ of positive integers, with $n$ relatively prime to $m$, which satisfy
\[
(x^2 + y^2)^m = (xy)^n.
\] | Prove that if $m$ is odd, there are no solutions, and if $m$ is even, the only solution is
$(n, x, y) = (m + 1, 2 ^ {m/2}, 2 ^{m/2})$. | ['algebra', 'number_theory'] | Section putnam_1992_a3.
Require Import Nat. From mathcomp Require Import div fintype perm ssrbool.
Definition putnam_1992_a3_solution (n x y: nat) := True.
Theorem putnam_1992_a3:
forall (m: nat), m > 0 ->
forall (n x y: nat), n > 0 /\ x > 0 /\ y > 0 /\ coprime n m ->
pow (pow x 2 + pow y 2) m = pow (x * y) m <->
putnam_1992_a3_solution n x y.
Proof. Admitted.
End putnam_1992_a3. | theory putnam_1992_a3 imports Complex_Main
begin
definition putnam_1992_a3_solution :: "nat \<Rightarrow> ((nat \<times> nat \<times> nat) set)" where "putnam_1992_a3_solution \<equiv> undefined"
(* (\<lambda>m::nat. if (odd m) then {} else {(m+1, 2^(nat \<lfloor>m/2\<rfloor>), 2^(nat \<lfloor>m/2\<rfloor>))}) *)
theorem putnam_1992_a3:
fixes m :: nat
and S :: "(nat \<times> nat \<times> nat) set"
assumes mpos: "m > 0"
and hS: "\<forall>n x y::nat. ((n, x, y) \<in> S \<longleftrightarrow> (n > 0 \<and> x > 0 \<and> y > 0 \<and> coprime n m \<and> (x^2 + y^2)^m = (x*y)^n))"
shows "S = putnam_1992_a3_solution m"
sorry
end
| null |
putnam_1992_a4 | abbrev putnam_1992_a4_solution : β β β := sorry
-- fun k β¦ ite (Even k) ((-1) ^ (k / 2) * factorial k) 0
theorem putnam_1992_a4
(f : β β β)
(hfdiff : ContDiff β β€ f)
(hf : β n : β, n > 0 β f (1 / n) = n ^ 2 / (n ^ 2 + 1))
: (β k : β, k > 0 β iteratedDeriv k f 0 = putnam_1992_a4_solution k) :=
sorry | Let $f$ be an infinitely differentiable real-valued function defined on the real numbers. If
\[
f\left( \frac{1}{n} \right) = \frac{n^2}{n^2 + 1}, \qquad n = 1, 2, 3, \dots,
\]
compute the values of the derivatives $f^{(k)}(0), k = 1, 2, 3, \dots$. | Prove that
\[
f^{(k)}(0) =
\begin{cases}
(-1)^{k/2}k! & \text{if $k$ is even;} \\
0 & \text{if $k$ is odd.} \\
\end{cases}
\] | ['analysis'] | Section putnam_1992_a4.
Require Import Nat Reals Coquelicot.Coquelicot.
Open Scope R.
Definition putnam_1992_a4_solution (k: nat) := if odd k then 0 else pow (-1) (k/2).
Theorem putnam_1992_a4:
let f (n: R) := (pow (1 / n) 2) / ((pow (1 / n) 2) + 1) in
let df_0 (k: nat) := (Derive_n f k) 0 in
forall (k: nat), gt k 0 -> df_0 k = putnam_1992_a4_solution k.
Proof. Admitted.
End putnam_1992_a4. | theory putnam_1992_a4 imports Complex_Main
"HOL-Analysis.Derivative"
begin
definition putnam_1992_a4_solution :: "nat \<Rightarrow> real" where "putnam_1992_a4_solution \<equiv> undefined"
(* (\<lambda>k::nat. if (even k) then ((-1)^(nat \<lfloor>k/2\<rfloor>) * fact k) else 0) *)
theorem putnam_1992_a4:
fixes f :: "real \<Rightarrow> real"
assumes hfdiff: "\<forall>k::nat. ((deriv^^k) f) C1_differentiable_on UNIV"
and hf: "\<forall>n::nat. (n > 0 \<longrightarrow> f (1/n) = n^2 / (n^2 + 1))"
shows "\<forall>k::nat. (k > 0 \<longrightarrow> (deriv^^k) f 0 = putnam_1992_a4_solution k)"
sorry
end
| null |
putnam_1992_a5 | theorem putnam_1992_a5
(a : β β β := fun n β¦ ite (Even {i | (digits 2 n).get i = 1}.ncard) 0 1)
: (Β¬β k > 0, β m > 0, β j β€ m - 1, a (k + j) = a (k + m + j) β§ a (k + m + j) = a (k + 2 * m + j)) :=
sorry | For each positive integer $n$, let $a_n = 0$ (or $1$) if the number of $1$'s in the binary representation of $n$ is even (or odd), respectively. Show that there do not exist positive integers $k$ and $m$ such that
\[
a_{k+j} = a_{k+m+j} = a_{k+2m+j},
\]
for $0 \leq j \leq m-1$. | null | ['algebra'] | Section putnam_1992_a5.
Require Import BinPos Nat ZArith.
Definition putnam_1992_a5_solution := 1.
Theorem putnam_1992_a5:
let k:=
fix count_ones (n : positive) : nat :=
match n with
| xH => 1
| xO n' => count_ones n'
| xI n' => 1 + count_ones n'
end in
let a (n: positive) := (k n) mod 2 in
~ exists (k m: nat),
forall (j: nat), 0 <= j <= m - 1 -> a (Pos.of_nat (k + j)) = a (Pos.of_nat (k + m + j)) /\ a (Pos.of_nat (k + m + j)) = a (Pos.of_nat (k + 2 * m + j)).
Proof. Admitted.
End putnam_1992_a5. | theory putnam_1992_a5 imports Complex_Main
begin
theorem putnam_1992_a5:
fixes num1s :: "nat \<Rightarrow> nat"
and a :: "nat \<Rightarrow> nat"
assumes hnum1s: "num1s 0 = 0 \<and> (\<forall>n::nat>0. num1s n = (if (odd n) then 1 else 0) + num1s (nat \<lfloor>n / 2\<rfloor>))"
defines "a \<equiv> (\<lambda>n::nat. if (even (num1s n)) then 0 else 1)"
shows "\<not>(\<exists>k::nat>0. \<exists>m::nat>0. \<forall>j::nat\<le>m-1. a (k+j) = a (k+m+j) \<and> a (k+m+j) = a (k+2*m+j))"
sorry
end
| null |
putnam_1992_b1 | abbrev putnam_1992_b1_solution : β β β€ := sorry
-- fun n β¦ 2 * n - 3
theorem putnam_1992_b1
(n : β)
(nge2 : n β₯ 2)
(A : Finset β β Set β := fun S β¦ {x | β a β S, β b β S, a β b β§ (a + b) / 2 = x})
(min : β€)
(hmineq : β S : Finset β, S.card = n β§ min = (A S).ncard)
(hminlb : β S : Finset β, S.card = n β min β€ (A S).ncard)
: (min = putnam_1992_b1_solution n) :=
sorry | Let $S$ be a set of $n$ distinct real numbers. Let $A_S$ be the set of numbers that occur as averages of two distinct elements of $S$. For a given $n \geq 2$, what is the smallest possible number of elements in $A_S$? | Show that the answer is $2n - 3$. | ['algebra'] | Section putnam_1992_b1.
Require Import Nat Ensembles Finite_sets Reals Coquelicot.Coquelicot.
Open Scope R.
Definition putnam_1992_b1_solution (n: nat) := sub (mul 2 n) 3.
Theorem putnam_1992_b1:
forall (n: nat) (E: Ensemble R),
let AE_criterion (E AE: Ensemble R) := cardinal R E n /\ forall (m: R), AE m <-> exists (p q: R), E p /\ E q /\ m = (p + q) / 2 in
gt n 2 ->
exists (minAE: nat),
(forall (AE: Ensemble R) (szAE: nat), cardinal R AE szAE /\ cardinal R AE minAE -> ge szAE minAE) <->
minAE = putnam_1992_b1_solution n.
Proof. Admitted.
End putnam_1992_b1. | theory putnam_1992_b1 imports Complex_Main
begin
definition putnam_1992_b1_solution :: "nat \<Rightarrow> nat" where "putnam_1992_b1_solution \<equiv> undefined"
(* (\<lambda>n::nat. 2*n - 3) *)
theorem putnam_1992_b1:
fixes n :: nat
and A :: "real set \<Rightarrow> real set"
and min :: nat
assumes nge2: "n \<ge> 2"
defines "A \<equiv> (\<lambda>S::real set. {x::real. (\<exists>a\<in>S. \<exists>b\<in>S. a \<noteq> b \<and> (a + b) / 2 = x)})"
and "min \<equiv> LEAST AScard::nat. (\<exists>S::real set. card S = n \<and> AScard = card (A S))"
shows "min = putnam_1992_b1_solution n"
sorry
end
| null |
putnam_1992_b2 | theorem putnam_1992_b2
(Q : β β β β β := fun n k β¦ coeff ((1 + X + X ^ 2 + X ^ 3) ^ n) k)
: (β n k : β, Q n k = β j : Finset.range (k + 1), choose n j * choose n (k - 2 * j)) :=
sorry | For nonnegative integers $n$ and $k$, define $Q(n, k)$ to be the coefficient of $x^k$ in the expansion of $(1 + x + x^2 + x^3)^n$. Prove that
\[
Q(n, k) = \sum_{j=0}^k \binom{n}{j} \binom{n}{k-2j},
\]
where $\binom{a}{b}$ is the standard binomial coefficient. (Reminder: For integers $a$ and $b$ with $a \geq 0$, $\binom{a}{b} = \frac{a!}{b!(a-b)!}$ for $0 \leq b \leq a$, with $\binom{a}{b} = 0$ otherwise.) | null | ['algebra'] | null | theory putnam_1992_b2 imports Complex_Main
"HOL-Computational_Algebra.Polynomial"
begin
theorem putnam_1992_b2:
fixes Q :: "nat \<Rightarrow> nat \<Rightarrow> nat"
defines "Q \<equiv> (\<lambda>n k::nat. coeff ((monom 1 0 + monom 1 1 + monom 1 2 + monom 1 3)^n) k)"
shows "\<forall>n k::nat. Q n k = (\<Sum>j::nat=0..k. (n choose j) * (n choose (k - 2*j)))"
sorry
end
| null |
putnam_1992_b4 | abbrev putnam_1992_b4_solution : β := sorry
-- 3984
theorem putnam_1992_b4
(valid : Polynomial β β Prop := fun p β¦ p β 0 β§ p.degree < 1992 β§ IsCoprime p (X ^ 3 - X))
(pair : Polynomial β β Polynomial β β Prop := fun p f β¦ β g : Polynomial β, iteratedDeriv 1992 (fun x β¦ p.eval x / (x ^ 3 - x)) = fun x β¦ f.eval x / g.eval x)
(min : β)
(hmineq : β p f : Polynomial β, (valid p β§ pair p f) β§ min = f.degree)
(hminlb : β p f : Polynomial β, (valid p β§ pair p f) β min β€ f.degree)
: (min = putnam_1992_b4_solution) :=
sorry | Let $p(x)$ be a nonzero polynomial of degree less than $1992$ having no nonconstant factor in common with $x^3 - x$. Let
\[
\frac{d^{1992}}{dx^{1992}} \left( \frac{p(x)}{x^3 - x} \right) = \frac{f(x)}{g(x)}
\]
for polynomials $f(x)$ and $g(x)$. Find the smallest possible degree of $f(x)$. | Show that the minimum degree is $3984$. | ['algebra'] | Section putnam_1992_b4.
From mathcomp Require Import ssrnat ssrnum ssralg poly polydiv seq.
Open Scope ring_scope.
Definition putnam_1992_b4_solution := 3984%nat.
Theorem putnam_1992_b4:
forall (R: numDomainType) (p: {poly R}),
gt (size p) 1992 /\ exists c: R, gcdp_rec p ('X^3 - 'X) = polyC c ->
let cond (f g: {poly R}) := derivn 1992 (p %/ ('X^3 - 'X)) = f %/ g in
exists mindeg,
((forall (f g: {poly R}), cond f g /\ ge (size f) mindeg) /\
(exists (f g: {poly R}), cond f g /\ size f = mindeg)) <->
mindeg = putnam_1992_b4_solution.
Proof. Admitted.
End putnam_1992_b4. | theory putnam_1992_b4 imports Complex_Main
"HOL-Computational_Algebra.Polynomial"
"HOL-Analysis.Derivative"
begin
definition putnam_1992_b4_solution :: nat where "putnam_1992_b4_solution \<equiv> undefined"
(* 3984 *)
theorem putnam_1992_b4:
fixes valid :: "(real poly) \<Rightarrow> bool"
and pair :: "(real poly) \<Rightarrow> (real poly) \<Rightarrow> bool"
and min :: nat
defines "valid \<equiv> (\<lambda>p::real poly. p \<noteq> 0 \<and> degree p < 1992 \<and> coprime p (monom 1 3 - monom 1 1))"
and "pair \<equiv> (\<lambda>p f::real poly. (\<exists>g::real poly. (deriv^^1992) (\<lambda>x::real. poly p x / (x^3 - x)) = (\<lambda>x::real. poly f x / poly g x)))"
and "min \<equiv> LEAST fdeg::nat. (\<exists>p f::real poly. valid p \<and> pair p f \<and> fdeg = degree f)"
shows "min = putnam_1992_b4_solution"
sorry
end
| null |
putnam_1992_b5 | abbrev putnam_1992_b5_solution : Prop := sorry
-- False
theorem putnam_1992_b5
(D : β β β := fun n β¦ Matrix.det (fun i j : Fin (n - 1) β¦ ite (i = j) (i + 3) 1))
: ((Bornology.IsBounded {x | β n β₯ 2, D n / factorial n = x}) β putnam_1992_b5_solution) :=
sorry | Let $D_n$ denote the value of the $(n-1) \times (n-1)$ determinant
\[
\left[
\begin{array}{cccccc}
3 & 1 & 1 & 1 & \cdots & 1 \\
1 & 4 & 1 & 1 & \cdots & 1 \\
1 & 1 & 5 & 1 & \cdots & 1 \\
1 & 1 & 1 & 6 & \cdots & 1 \\
\vdots & \vdots & \vdots & \vdots & \ddots & \vdots \\
1 & 1 & 1 & 1 & \cdots & n+1
\end{array}
\right].
\]
Is the set $\left\{ \frac{D_n}{n!} \right\}_{n \geq 2}$ bounded? | Prove that the set is not bounded. | ['linear_algebra', 'analysis'] | null | theory putnam_1992_b5 imports Complex_Main
"HOL-Combinatorics.Permutations"
begin
(* uses (nat \<Rightarrow> nat \<Rightarrow> nat) instead of (Fin n \<Rightarrow> Fin n \<Rightarrow> nat) and (nat \<Rightarrow> nat) instead of (Fin n \<Rightarrow> Fin n) *)
definition putnam_1992_b5_solution :: bool where "putnam_1992_b5_solution \<equiv> undefined"
(* False *)
theorem putnam_1992_b5:
fixes ndet :: "(nat \<Rightarrow> nat \<Rightarrow> nat) \<Rightarrow> nat \<Rightarrow> int"
and D :: "nat \<Rightarrow> int"
defines "ndet \<equiv> (\<lambda>(A::nat\<Rightarrow>nat\<Rightarrow>nat)(n::nat). (\<Sum>p\<in>{p'::nat\<Rightarrow>nat. p' permutes {0..(n-1)} \<and> (\<forall>i::nat\<ge>n. p' i = i)}. (sign p * (\<Prod>i::nat=0..(n-1). A i (p i)))))"
and "D \<equiv> (\<lambda>n::nat. ndet (\<lambda>i j::nat. if i = j then (i+3) else 1) (n - 1))"
shows "(\<exists>r::rat. \<forall>x\<in>{x'::rat. (\<exists>n::nat\<ge>2. (D n / fact n) = x')}. \<bar>x\<bar> \<le> r) \<longleftrightarrow> putnam_1992_b5_solution"
sorry
end
| null |
putnam_1992_b6 | theorem putnam_1992_b6
(n : β)
(npos : n > 0)
(M : Set (Matrix (Fin n) (Fin n) β))
(h1 : 1 β M)
(h2 : β A β M, β B β M, Xor' (A * B β M) (-A * B β M))
(h3 : β A β M, β B β M, (A * B = B * A) β¨ (A * B = -B * A))
(h4 : β A β M, A β 1 β β B β M, A * B = -B * A)
: (M.encard β€ n ^ 2) :=
sorry | Let $M$ be a set of real $n \times n$ matrices such that
\begin{itemize}
\item[(i)] $I \in M$, where $I$ is the $n \times n$ identity matrix;
\item[(ii)] if $A \in M$ and $B \in M$, then either $AB \in M$ or $-AB \in M$, but not both;
\item[(iii)] if $A \in M$ and $B \in M$, then either $AB = BA$ or $AB = -BA$;
\item[(iv)] if $A \in M$ and $A \neq I$, there is at least one $B \in M$ such that $AB = -BA$.
\end{itemize}
Prove that $M$ contains at most $n^2$ matrices. | null | ['linear_algebra'] | null | theory putnam_1992_b6 imports Complex_Main
"HOL-Analysis.Finite_Cartesian_Product"
begin
theorem putnam_1992_b6:
fixes n :: nat
and M :: "(real^'n^'n) set"
assumes npos: "n > 0"
and pncard: "CARD('n) = n"
and h1: "mat 1 \<in> M"
and h2: "\<forall>A\<in>M. \<forall>B\<in>M. (A**B \<in> M) \<noteq> (-A**B \<in> M)"
and h3: "\<forall>A\<in>M. \<forall>B\<in>M. (A**B = B**A) \<or> (A**B = -B**A)"
and h4: "\<forall>A\<in>M. (A \<noteq> mat 1 \<longrightarrow> (\<exists>B\<in>M. A**B = -B**A))"
shows "card M \<le> n^2"
sorry
end
| null |
putnam_2002_a1 | abbrev putnam_2002_a1_solution : β β β β β := sorry
-- (fun k n : β => (-k) ^ n * (n)!)
theorem putnam_2002_a1
(k : β)
(P : β β Polynomial β)
(kpos : k > 0)
(Pderiv : β n : β, β x : β, iteratedDeriv n (fun x' : β => 1 / (x' ^ k - 1)) x = ((P n).eval x) / ((x ^ k - 1) ^ (n + 1)))
: β n : β, (P n).eval 1 = putnam_2002_a1_solution k n :=
sorry | Let $k$ be a fixed positive integer. The $n$-th derivative of $\frac{1}{x^k-1}$ has the form $\frac{P_n(x)}{(x^k-1)^{n+1}}$ where $P_n(x)$ is a polynomial. Find $P_n(1)$. | Show that $P_n(1)=(-k)^nn!$ for all $n \geq 0$. | ['analysis', 'algebra'] | Section putnam_2002_a1.
Require Import Reals Factorial Coquelicot.Coquelicot.
Definition putnam_2002_a1_solution (k n: nat) := Rpower (-1 * INR k) (INR n) * INR (fact n).
Theorem putnam_2002_a1:
let p (a: nat -> R) (x: R) (n: nat) := sum_n (fun i => a i * x ^ i) n in
forall (N k: nat), gt k 0 -> exists (a: nat -> R) (n: nat), forall (x: R),
(Derive_n (fun x => 1 / (x ^ k - 1)) N) x = (p a x n) / (x ^ k - 1) ^ (n + 1) ->
p a x 1%nat = putnam_2002_a1_solution k n.
Proof. Admitted.
End putnam_2002_a1. | theory putnam_2002_a1 imports Complex_Main "HOL-Computational_Algebra.Polynomial" "HOL-Analysis.Derivative"
begin
definition putnam_2002_a1_solution::"nat\<Rightarrow>nat\<Rightarrow>real" where "putnam_2002_a1_solution \<equiv> undefined"
(* \<lambda>k. \<lambda>n. (-k) ^n * fact n *)
theorem putnam_2002_a1:
fixes k::nat and P::"nat \<Rightarrow> (real poly)"
assumes kpos : "k > 0"
and Pderiv : "\<forall>n::nat. \<forall>x::real. (deriv^^n) (\<lambda>x'::real. 1 / (x' ^ k - 1)) x = (poly (P n) x) / ((x^k - 1) ^ (n+1))"
shows "\<forall>n::nat. (poly (P n) 1) = putnam_2002_a1_solution k n"
sorry
end | null |
putnam_2002_a3 | theorem putnam_2002_a3
(n : β€)
(hn : n β₯ 2)
(Tn : β€)
(hTn : Tn = Set.ncard {S : Set β€ | S β Set.Icc 1 n β§ Nonempty S β§ β k : β€, k = ((1 : β) / S.ncard) * (β' s : S, s.1)})
: Even (Tn - n) :=
sorry | Let $n \geq 2$ be an integer and $T_n$ be the number of non-empty subsets $S$ of $\{1, 2, 3, \dots, n\}$ with the property that the average of the elements of $S$ is an integer. Prove that $T_n - n$ is always even. | null | ['algebra'] | null | theory putnam_2002_a3 imports Complex_Main
begin
theorem putnam_2002_a3:
fixes n Tn :: "int"
defines "Tn \<equiv> card {S :: int set. S \<subseteq> {1..16} \<and> S \<noteq> {} \<and> (\<exists> k :: int. k = (real 1)/(card S) * (\<Sum> s \<in> S. s))}"
assumes hn : "n \<ge> 2"
shows "even (Tn - n)"
sorry
end | null |
putnam_2002_a5 | theorem putnam_2002_a5
(a : β β β)
(ha : a 0 = 1 β§ β n : β, a (2*n + 1) = a n β§ a (2*n + 2) = a n + a (n + 1))
: β q : β, q > 0 β q β {a (n - 1) / a n | n β Ici 1} :=
sorry | Define a sequence by $a_0=1$, together with the rules
$a_{2n+1} = a_n$ and $a_{2n+2} = a_n + a_{n+1}$ for each
integer $n \geq 0$. Prove that every positive rational number
appears in the set
\[
\left\{ \frac{a_{n-1}}{a_n}: n \geq 1 \right\} =
\left\{ \frac{1}{1}, \frac{1}{2}, \frac{2}{1}, \frac{1}{3},
\frac{3}{2}, \dots \right\}.
\] | null | ['number_theory', 'algebra'] | null | theory putnam_2002_a5 imports
Complex_Main
begin
theorem putnam_2002_a5:
fixes a :: "nat \<Rightarrow> rat"
assumes ha: "a 0 = 1 \<and> (\<forall> n :: nat. a (2 * n + 1) = a n \<and> a (2 * n + 2) = a n + a (n + 1))"
shows "\<forall> q :: rat. q > 0 \<longrightarrow> q \<in> {a (n - 1) / a n | n :: nat. n \<ge> 1}"
sorry
end | null |
putnam_2002_a6 | abbrev putnam_2002_a6_solution : Set β := sorry
-- {2}
theorem putnam_2002_a6
(f : β β β β β)
(hf : β b : β, f b 1 = 1 β§ f b 2 = 2 β§ β n β Ici 3, f b n = n * f b (Nat.digits b n).length)
: {b β Ici 2 | β L : β, Tendsto (fun m : β => β n in Finset.Icc 1 m, 1/(f b n)) atTop (π L)} = putnam_2002_a6_solution :=
sorry | Fix an integer $b \geq 2$. Let $f(1) = 1$, $f(2) = 2$, and for each
$n \geq 3$, define $f(n) = n f(d)$, where $d$ is the number of
base-$b$ digits of $n$. For which values of $b$ does
\[
\sum_{n=1}^\infty \frac{1}{f(n)}
\]
converge? | The sum converges for $b=2$ and diverges for $b \geq 3$. | ['analysis', 'number_theory'] | null | theory putnam_2002_a6 imports
Complex_Main
begin
definition putnam_2002_a6_solution :: "nat set" where "putnam_2002_a6_solution \<equiv> undefined"
(* {2} *)
theorem putnam_2002_a6:
fixes f :: "nat \<Rightarrow> nat \<Rightarrow> nat"
and digitlength :: "nat \<Rightarrow> nat \<Rightarrow> nat"
defines "digitlength \<equiv> \<lambda> b n. LEAST k :: nat. n < b ^ k"
assumes hf: "\<forall> b :: nat. f b 1 = 1 \<and> f b 2 = 2 \<and> (\<forall> n \<in> {3..}. f b n = n * f b (digitlength b n))"
shows "{b \<in> {2..}. convergent (\<lambda> m :: nat. \<Sum> n = 1..m. 1 / f b n)} = putnam_2002_a6_solution"
sorry
end | null |
putnam_2002_b3 | theorem putnam_2002_b3
(e : β := Real.exp 1)
(f : β€ β β := fun n : β€ => 1/e - (1 - 1/n)^n)
: β n : β€, n > 1 β 1/(2*n*e) < f n β§ f n < 1/(n*e) :=
sorry | Show that, for all integers $n > 1$,
\[
\frac{1}{2ne} < \frac{1}{e} - \left( 1 - \frac{1}{n} \right)^n
< \frac{1}{ne}.
\] | null | ['algebra'] | Section putnam_2002_b3.
Require Import Reals Coquelicot.Coquelicot.
Open Scope R.
Theorem putnam_2002_b3:
forall (n: nat), ge n 1 ->
let n := INR n in 1 / (2 * n * exp 1) < 1 / (exp 1) - Rpower (1 - 1 / n) n < 1 / (n * (exp 1)).
Proof. Admitted.
End putnam_2002_b3. | theory putnam_2002_b3 imports
Complex_Main
begin
theorem putnam_2002_b3:
fixes e :: real
and f :: "int \<Rightarrow> real"
defines "e \<equiv> exp 1"
and "f \<equiv> \<lambda> n :: int. 1 / e - (1 - 1 / n) powi n"
shows "\<forall> n :: int. n > 1 \<longrightarrow> 1 / (2 * n * e) < f n \<and> f n < 1 / (n * e)"
sorry
end | null |
putnam_2002_b5 | theorem putnam_2002_b5
: β n : β, {b : β | (Nat.digits b n).length = 3 β§ List.Palindrome (Nat.digits b n)}.ncard β₯ 2002 :=
sorry | A palindrome in base $b$ is a positive integer whose base-$b$
digits read the same backwards and forwards; for example,
$2002$ is a 4-digit palindrome in base 10. Note that 200 is not
a palindrome in base 10, but it is the 3-digit palindrome
242 in base 9, and 404 in base 7. Prove that there is an integer
which is a 3-digit palindrome in base $b$ for at least 2002
different values of $b$. | null | ['number_theory'] | null | theory putnam_2002_b5 imports
Complex_Main
begin
fun digits :: "nat \<Rightarrow> nat \<Rightarrow> nat list" where
"digits b n = (if b < 2 then (replicate n 1) else (if n < b then [n] else [n mod b] @ digits b (n div b)))"
theorem putnam_2002_b5:
shows "\<exists> n :: nat. card {b :: nat. length (digits b n) = 3 \<and> digits b n = rev (digits b n)} \<ge> 2002"
sorry
end
| null |
putnam_2002_b6 | theorem putnam_2002_b6
(p : β)
(hp : Nat.Prime p)
(M : Matrix (Fin 3) (Fin 3) (MvPolynomial (Fin 3) β€) := fun r : Fin 3 => fun c : Fin 3 => (X c)^(p^(r : β)))
(cong : β β MvPolynomial (Fin 3) β€ Γ MvPolynomial (Fin 3) β€ β Prop := fun p : β => fun (f, g) => β n : Fin 3 ββ β, Int.ModEq p (f.coeff n) (g.coeff n))
: β S : Finset (MvPolynomial (Fin 3) β€), cong p ((det M), (β s in S, s)) β§ β s β S, (β a b c : β€, s = (C a)*(X 0) + (C b)*(X 1) + (C c)*(X 2)) :=
sorry | Let $p$ be a prime number. Prove that the determinant of the matrix
\[
\begin{pmatrix}
x & y & z \\
x^p & y^p & z^p \\
x^{p^2} & y^{p^2} & z^{p^2}
\end{pmatrix}
\]
is congruent modulo $p$ to a product of polynomials of the form
$ax+by+cz$, where $a,b,c$ are integers. (We say two integer
polynomials are congruent modulo $p$ if corresponding coefficients
are congruent modulo $p$.) | null | ['linear_algebra', 'number_theory', 'algebra'] | null | theory putnam_2002_b6 imports
Complex_Main
"HOL-Analysis.Finite_Cartesian_Product"
"HOL-Analysis.Determinants"
"HOL-Number_Theory.Cong"
"HOL-Computational_Algebra.Primes"
"HOL-Computational_Algebra.Polynomial"
begin
theorem putnam_2002_b6:
fixes p :: nat
and lincomb :: "int \<times> int \<times> int \<Rightarrow> int poly poly poly"
and M :: "(int poly poly poly)^3^3"
and cong :: "nat \<Rightarrow> int poly poly poly \<times> int poly poly poly \<Rightarrow> bool"
and idx :: "nat \<Rightarrow> 3"
defines "lincomb \<equiv> \<lambda> (a, b, c). monom (monom (monom a 0) 0) 1 + monom (monom (monom b 0) 1) 0 + monom (monom (monom c 1) 0) 0"
and "cong \<equiv> \<lambda> p (f, g). \<forall> r s t :: nat. [coeff (coeff (coeff f r) s) t = coeff (coeff (coeff g r) s) t] (mod (int p))"
assumes idxbij: "\<forall> s :: 3. \<exists>! r \<in> {0..2}. idx r = s"
and hp: "prime p"
and hM: "\<forall> r \<in> {0..2}. M$(idx r)$(idx 0) = monom (monom (monom 1 0) 0) (p ^ r) \<and> M$(idx r)$(idx 1) = monom (monom (monom 1 0) (p ^ r)) 0 \<and> M$(idx r)$(idx 2) = monom (monom (monom 1 (p ^ r)) 0) 0"
shows "\<exists> L :: (int \<times> int \<times> int) list. cong p (det M, foldr (\<lambda> t q. (lincomb t) * q) L 1)"
sorry
end | null |
putnam_1969_a2 | theorem putnam_1969_a2
(D : (n : β) β Matrix (Fin n) (Fin n) β := fun n => Ξ» i j => |i.1 - j.1| )
: β n, n β₯ 2 β (D n).det = (-1)^((n : β€)-1) * ((n : β€)-1) * 2^((n : β€)-2) :=
sorry | Let $D_n$ be the determinant of the $n$ by $n$ matrix whose value in the $i$th row and $j$th column is $|i-j|$. Show that $D_n = (-1)^{n-1} * (n-1) * (2^{n-2}).$ | null | ['linear_algebra'] | null | theory putnam_1969_a2 imports Complex_Main
"HOL-Combinatorics.Permutations"
begin
(* uses (nat \<Rightarrow> nat \<Rightarrow> real) instead of (Fin n \<Rightarrow> Fin n \<Rightarrow> real) and (nat \<Rightarrow> nat) instead of (Fin n \<Rightarrow> Fin n) *)
theorem putnam_1969_a2:
fixes D :: "nat \<Rightarrow> nat \<Rightarrow> real"
and ndet :: "(nat \<Rightarrow> nat \<Rightarrow> real) \<Rightarrow> nat \<Rightarrow> real"
defines "D \<equiv> (\<lambda>i j::nat. \<bar>i - j\<bar>)"
and "ndet \<equiv> (\<lambda>(A::nat\<Rightarrow>nat\<Rightarrow>real)(n::nat). (\<Sum>p\<in>{p'::nat\<Rightarrow>nat. p' permutes {0..(n-1)} \<and> (\<forall>i::nat\<ge>n. p' i = i)}. (sign p * (\<Prod>i::nat=0..(n-1). A i (p i)))))"
shows "\<forall>n::nat. (n > 0 \<longrightarrow> ndet D n = (-1)^(n-1) * (n-1) * 2^(n-2))"
sorry
end
| null |
putnam_1969_a4 | theorem putnam_1969_a4
: Tendsto (fun n => β i in Finset.Icc (1 : β€) n, (-1)^(i+1)*(i : β)^(-i)) atTop (π (β« x in Ioo (0 : β) 1, x^x)) :=
sorry | Show that $\int_0^1 x^x dx = \sum_{n=1}^{\infty} (-1)^{n+1}n^{-n}$. | null | ['analysis'] | null | theory putnam_1969_a4 imports Complex_Main
"HOL-Analysis.Interval_Integral"
begin
theorem putnam_1969_a4:
shows "filterlim (\<lambda>n::int. (\<Sum>i::int=1..n. (-1) powi (i+1) * i powi (-i))) (nhds (interval_lebesgue_integral lebesgue 0 1 (\<lambda>x::real. x powr x))) at_top"
sorry
end
| null |
putnam_1969_a6 | theorem putnam_1969_a6
(x : β β β)
(y : β β β)
(hy1 : β n β₯ 2, y n = x (n-1) + 2 * (x n))
(hy2 : β c : β, Tendsto y atTop (π c))
: β C : β, Tendsto x atTop (π C) :=
sorry | Let $(x_n)$ be a sequence, and let $y_n = x_{n-1} + 2*x_n$ for $n \geq 2$. Suppose that $(y_n)$ converges, then prove that $(x_n)$ converges. | null | ['analysis'] | null | theory putnam_1969_a6 imports Complex_Main
begin
theorem putnam_1969_a6:
fixes x :: "nat \<Rightarrow> real"
and y :: "nat \<Rightarrow> real"
assumes hy1: "\<forall>n::nat\<ge>2. y n = x (n-1) + 2*(x n)"
and hy2: "\<exists>c::real. filterlim y (nhds c) at_top"
shows "\<exists>C::real. filterlim x (nhds C) at_top"
sorry
end
| null |
putnam_1969_b1 | theorem putnam_1969_b1
(n : β)
(hnpos : n > 0)
(hn : 24 β£ (n + 1 : β€))
: 24 β£ β d in divisors n, (d : β€) :=
sorry | Let $n$ be a positive integer such that $n+1$ is divisible by $24$. Prove that the sum of all the divisors of $n$ is divisible by $24$. | null | ['number_theory'] | null | theory putnam_1969_b1 imports Complex_Main
begin
theorem putnam_1969_b1:
fixes n :: nat
assumes hnpos: "n > 0"
and hn: "24 dvd (n + 1)"
shows "24 dvd (\<Sum> {d::nat. d dvd n})"
sorry
end
| null |
putnam_1969_b2 | abbrev putnam_1969_b2_solution : Prop := sorry
-- False
theorem putnam_1969_b2
(G : Type*)
[Group G] [Finite G]
(h : β β Prop := fun n => β H : Fin n β Subgroup G, (β i : Fin n, (H i) < β€) β§ ((β€ : Set G) = β i : Fin n, (H i)))
: Β¬(h 2) β§ ((Β¬(h 3)) β putnam_1969_b2_solution) :=
sorry | Show that a finite group can not be the union of two of its proper subgroups. Does the statement remain true if 'two' is replaced by 'three'? | Show that the statement is no longer true if 'two' is replaced by 'three'. | ['abstract_algebra'] | null | theory putnam_1969_b2 imports Complex_Main
"HOL-Algebra.Group"
begin
(* uses (nat \<Rightarrow> ('a set)) instead of (Fin n \<Rightarrow> ('a set)) *)
definition putnam_1969_b2_solution :: bool where "putnam_1969_b2_solution \<equiv> undefined"
(* False *)
theorem putnam_1969_b2:
fixes G (structure)
and h :: "nat \<Rightarrow> bool"
assumes hG: "group G \<and> finite (carrier G)"
defines "h \<equiv> (\<lambda>n::nat. (\<exists>H::nat\<Rightarrow>('a set). (\<forall>i::nat\<in>{0..(n-1)}. subgroup (H i) G \<and> H i \<noteq> carrier G) \<and> (carrier G = (\<Union>i::nat\<in>{0..(n-1)}. H i))))"
shows "\<not>(h 2) \<and> ((\<not>(h 3)) \<longleftrightarrow> putnam_1969_b2_solution)"
sorry
end
| null |
putnam_1969_b3 | theorem putnam_1969_b3
(T : β β β)
(hT1 : β n : β, n β₯ 1 β (T n) * (T (n + 1)) = n)
(hT2 : Tendsto (fun n => (T n)/(T (n + 1))) atTop (π 1))
: Real.pi * (T 1)^2 = 2 :=
sorry | Suppose $T$ is a sequence which satisfies $T_n * T_{n+1} = n$ whenever $n \geq 1$, and also $\lim_{n \to \infty} \frac{T_n}{T_{n+1}} = 1. Show that $\pi * T_1^2 = 2$. | null | ['analysis'] | null | theory putnam_1969_b3 imports Complex_Main
begin
theorem putnam_1969_b3:
fixes T :: "nat \<Rightarrow> real"
assumes hT1: "\<forall>n::nat. (n \<ge> 1 \<longrightarrow> (T n) * (T (n+1)) = n)"
and hT2: "filterlim (\<lambda>n::nat. (T n) / (T (n+1))) (nhds 1) at_top"
shows "pi*(T 1)^2 = 2"
sorry
end
| null |
putnam_1969_b5 | theorem putnam_1969_b5
(a : β β β)
(ha : StrictMono a β§ (β x : β, a > 0))
(hinvasum : β C : β, Tendsto (fun n => β i : Fin n, 1/(a i)) atTop (π C))
(k : β β β := fun x => {n | a n β€ x}.ncard)
: Tendsto (fun t => (k t)/t) atTop (π 0) := sorry | Let $a_1 < a_2 < a_3 < \dots$ be an increasing sequence of positive integers. Assume that the sequences $\sum_{i = 1}^{\infty} 1/(a n)$ is convergent. For any number $x$, let $k(x)$ be the number of $a_n$'s which do not exceed $x$. Show that $\lim_{x \to \infty} k(x)/x = 0$. | null | ['analysis'] | null | theory putnam_1969_b5 imports Complex_Main
begin
theorem putnam_1969_b5:
fixes a :: "nat \<Rightarrow> real"
and k :: "real \<Rightarrow> nat"
assumes ha: "strict_mono a \<and> (\<forall>n::nat. a n > 0)"
and hinvasum: "\<exists>C::real. filterlim (\<lambda>n::nat. (\<Sum>i::nat=0..(n-1). 1/(a i))) (nhds C) at_top"
defines "k \<equiv> (\<lambda>x::real. card {n::nat. a n \<le> x})"
shows "filterlim (\<lambda>t::real. (k t)/t) (nhds 0) at_top"
sorry
end
| null |
putnam_1969_b6 | theorem putnam_1969_b6
(A : Matrix (Fin 3) (Fin 2) β)
(B : Matrix (Fin 2) (Fin 3) β)
(p : Fin 3 β Fin 3 β β)
(hp : p 0 0 = 8 β§ p 0 1 = 2 β§ p 0 2 = -2 β§
p 1 0 = 2 β§ p 1 1 = 5 β§ p 1 2 = 4 β§
p 2 0 = -2 β§ p 2 1 = 4 β§ p 2 2 = 5)
(hAB : A * B = Matrix.of p)
: B * A = 9 * (1 : Matrix (Fin 2) (Fin 2) β) :=
sorry | Let $A$ be a $3 \times 2$ matrix and $B$ be a $2 \times 3$ matrix such that $$AB =
\begin{pmatrix}
8 & 2 & -2 \\
2 & 5 & 4 \\
-2 & 4 & 5
\end{pmatrix}.
$$ Prove that $$BA =
\begin{pmatrix}
9 & 0 \\
0 & 9
\end{pmatrix}.$$ | null | ['linear_algebra'] | null | theory putnam_1969_b6 imports Complex_Main
"HOL-Analysis.Finite_Cartesian_Product"
begin
theorem putnam_1969_b6:
fixes A :: "real^2^3"
and B :: "real^3^2"
and p :: "real^3^3"
assumes hp: "p$1$1 = 8 \<and> p$1$2 = 2 \<and> p$1$3 = -2 \<and>
p$2$1 = 2 \<and> p$2$2 = 5 \<and> p$2$3 = 4 \<and>
p$3$1 = -2 \<and> p$3$2 = 4 \<and> p$3$3 = 5"
and hAB: "A ** B = p"
shows "B ** A = mat 9"
sorry
end
| null |
putnam_1977_a1 | abbrev putnam_1977_a1_solution : β := sorry
-- -7 / 8
theorem putnam_1977_a1
(y : β β β := fun x β¦ 2 * x ^ 4 + 7 * x ^ 3 + 3 * x - 5)
(S : Finset β)
(hS : S.card = 4)
: (Collinear β {P : Fin 2 β β | P 0 β S β§ P 1 = y (P 0)} β (β x in S, x) / 4 = putnam_1977_a1_solution) :=
sorry | Show that if four distinct points of the curve $y = 2x^4 + 7x^3 + 3x - 5$ are collinear, then their average $x$-coordinate is some constant $k$. Find $k$. | Prove that $k = -\frac{7}{8}$. | ['algebra'] | Section putnam_1977_a1.
Require Import Reals Coquelicot.Coquelicot.
Definition putnam_1977_a1_solution := 1.
Theorem putnam_1977_a1
(y : R -> R := fun x => 2 * x ^ 4 + 7 * x ^ 3 + 3 * x - 5)
(collinear : ((R * R) * (R * R) * (R * R) * (R * R)) -> Prop := fun ABCD =>
let '((Ax, Ay), (Bx, By), (Cx, Cy), (Dx, Dy)) := ABCD in
exists (m b : R),
m * Ax = Ay /\
m * Bx = By /\
m * Cx = Cy /\
m * Dx = Dy
)
: exists (k: R),
forall (ABCD: (R * R) * (R * R) * (R * R) * (R * R)),
let '((Ax, Ay), (Bx, By), (Cx, Cy), (Dx, Dy)) := ABCD in
(y Ax = Ay /\
y Bx = By /\
y Cx = Cy /\
y Dx = Dy /\
collinear ABCD) ->
(Ax + Bx + Cx + Dx) / 4 = k <->
k = putnam_1977_a1_solution.
Proof. Admitted.
End putnam_1977_a1. | theory putnam_1977_a1 imports Complex_Main "HOL-Analysis.Linear_Algebra"
begin
definition putnam_1977_a1_solution::real where "putnam_1977_a1_solution \<equiv> undefined"
(* -7/8 *)
theorem putnam_1977_a1:
fixes f::"real\<Rightarrow>real" and S::"real set"
defines "f \<equiv> \<lambda>x. 2 * x^4 + 7 * x^3 + 3 * x - 5"
assumes hS : "card S = 4"
shows "collinear {(x::real, y::real). x \<in> S \<and> y = f x} \<longrightarrow> (\<Sum>S) / 4 = putnam_1977_a1_solution"
sorry
end | null |
putnam_1977_a2 | abbrev putnam_1977_a2_solution : β β β β β β β β Prop := sorry
-- fun a b c d β¦ d = a β§ b = -c β¨ d = b β§ a = -c β¨ d = c β§ a = -b
theorem putnam_1977_a2
: (β a b c d : β, a β 0 β b β 0 β c β 0 β d β 0 β ((a + b + c = d β§ 1 / a + 1 / b + 1 / c = 1 / d) β putnam_1977_a2_solution a b c d)) :=
sorry | Find all real solutions $(a, b, c, d)$ to the equations $a + b + c = d$, $\frac{1}{a} + \frac{1}{b} + \frac{1}{c} = \frac{1}{d}$. | Prove that the solutions are $d = a$ and $b = -c$, $d = b$ and $a = -c$, or $d = c$ and $a = -b$, with $a, b, c, d$ nonzero. | ['algebra'] | Section putnam_1977_a2.
Require Import Reals.
Open Scope R.
Definition putnam_1977_a2_solution (a b c d: R) := c = -a /\ d = b.
Theorem putnam_1977_a2:
forall (a b c d: R), a + b + c = d /\ 1/a + 1/b + 1/c = 1/d ->
putnam_1977_a2_solution a b c d.
Proof. Admitted.
End putnam_1977_a2. | theory putnam_1977_a2 imports Complex_Main
begin
definition putnam_1977_a2_solution::"real\<Rightarrow>real\<Rightarrow>real\<Rightarrow>real\<Rightarrow>bool" where "putnam_1977_a2_solution \<equiv> undefined"
(* \<lambda>a. \<lambda>b. \<lambda>c. \<lambda>d. d = a \<and> b = -c \<or> d = b \<and> a = -c \<or> d = c \<and> a = -b *)
theorem putnam_1977_a2:
shows "\<forall>a b c d::real. a \<noteq> 0 \<longrightarrow> b \<noteq> 0 \<longrightarrow> c \<noteq> 0 \<longrightarrow> d \<noteq> 0 \<longrightarrow> ((a + b + c = d \<and> 1 / a + 1 / b + 1 / c = 1 / d)
\<longleftrightarrow> putnam_1977_a2_solution a b c d)"
sorry
end | null |
putnam_1977_a3 | abbrev putnam_1977_a3_solution : (β β β) β (β β β) β (β β β) := sorry
-- fun f g x β¦ g x - f (x - 3) + f (x - 1) + f (x + 1) - f (x + 3)
theorem putnam_1977_a3
(f g : β β β)
: let h := putnam_1977_a3_solution f g; (β x : β, f x = (h (x + 1) + h (x - 1)) / 2 β§ g x = (h (x + 4) + h (x - 4)) / 2) :=
sorry | Let $f, g, h$ be functions $\mathbb{R} \to \mathbb{R}$. Find an expression for $h(x)$ in terms of $f$ and $g$ such that $f(x) = \frac{h(x + 1) + h(x - 1)}{2}$ and $g(x) = \frac{h(x + 4) + h(x - 4)}{2}$. | Prove that $h(x) = g(x) - f(x - 3) + f(x - 1) + f(x + 1) - f(x + 3)$ suffices. | ['algebra'] | Section putnam_1977_a3.
Require Import Reals Coquelicot.Coquelicot.
Definition putnam_1977_a3_solution (f g: R -> R) : R -> R := fun x => g x - f (x - 3) + f (x - 1) + f (x + 1) - f (x + 3).
Theorem putnam_1977_a3
(f g h : R -> R)
(hf : Prop := f = fun x => (h (x + 1) + h (x - 1)) / 2)
(hg : Prop := g = fun x => (h (x + 4) + h (x - 4)) / 2)
: h = putnam_1977_a3_solution f g.
Proof. Admitted.
End putnam_1977_a3. | theory putnam_1977_a3 imports Complex_Main
begin
definition putnam_1977_a3_solution::"(real\<Rightarrow>real) \<Rightarrow> (real\<Rightarrow>real) \<Rightarrow> (real\<Rightarrow>real)" where "putnam_1977_a3_solution \<equiv> undefined"
(* \<lambda>f. \<lambda>g. \<lambda>x. g x - f (x-3) + f (x-1) + f (x+1) - f (x+3) *)
theorem putnam_1977_a3:
fixes f g::"real\<Rightarrow>real"
shows "let h = (putnam_1977_a3_solution f g) in (\<forall>x::real. f x = (h (x+1) + h (x-1)) / 2 \<and> g x = (h (x+4) + h (x-4)) / 2)"
sorry
end | null |
putnam_1977_a4 | abbrev putnam_1977_a4_solution : RatFunc β := sorry
-- RatFunc.X / (1 - RatFunc.X)
theorem putnam_1977_a4
: (β x β Ioo 0 1, putnam_1977_a4_solution.eval (id β) x = β' n : β, x ^ 2 ^ n / (1 - x ^ 2 ^ (n + 1))) :=
sorry | Find $\sum_{n=0}^{\infty} \frac{x^{2^n}}{1 - x^{2^{n+1}}}$ as a rational function of $x$ for $x \in (0, 1)$. | Prove that the sum equals $\frac{x}{1 - x}$. | ['algebra', 'analysis'] | Section putnam_1977_a4.
Require Import Reals Coquelicot.Coquelicot.
Definition putnam_1977_a4_solution (coeff1 coeff2 : nat -> Z) (n1 n2: nat) := (coeff1 = fun x => match x with | S O => Z.of_nat 1 | _ => Z.of_nat 0 end) /\ (coeff2 = fun x => match x with | O => Z.of_nat 1 | S O => (floor (-1)) | _ => Z.of_nat 0 end) /\ n1 = 1%nat /\ n2 = 1%nat.
Theorem putnam_1977_a4
(p: (nat -> Z) -> nat -> (R -> R) := fun coeff n => (fun x => sum_n (fun i => IZR (coeff i) * x ^ i) (n + 1)))
: forall (coeff1 coeff2: nat -> Z) (n1 n2: nat),
(IZR (coeff1 n1) <> 0 /\ IZR (coeff2 n2) <> 0) -> forall (x: R), 0 < x < 1 -> (p coeff1 n1) x / (p coeff2 n2) x = Series (fun n => x ^ (2 ^ n) / (1 - x ^ (2 ^ (n + 1)))) <->
putnam_1977_a4_solution coeff1 coeff2 n1 n2.
Proof. Admitted.
End putnam_1977_a4. | theory putnam_1977_a4 imports Complex_Main "HOL-Computational_Algebra.Polynomial"
begin
definition putnam_1977_a4_solution::"(real poly) \<times> (real poly)" where "putnam_1977_a4_solution \<equiv> undefined"
(* ([: 0, 1 :], [: 1, -1 :]) *)
theorem putnam_1977_a4:
shows "\<forall>x \<in> {0<..<1::real}. (poly (fst putnam_1977_a4_solution) x) / (poly (snd putnam_1977_a4_solution) x)
= (\<Sum>n::nat. x^2^n / (1 - x^2^(n+1)))"
sorry
end | null |
putnam_1977_a5 | theorem putnam_1977_a5
(p m n : β)
(hp : Nat.Prime p)
(hmgen : m β₯ n)
: (choose (p * m) (p * n) β‘ choose m n [MOD p]) :=
sorry | Let $p$ be a prime and $m \geq n$ be non-negative integers. Show that $\binom{pm}{pn} = \binom{m}{n} \pmod p$, where $\binom{m}{n}$ is the binomial coefficient. | null | ['algebra', 'number_theory'] | Section putnam_1977_a5.
Require Import Binomial Reals Znumtheory Coquelicot.Coquelicot.
Open Scope nat_scope.
Theorem putnam_1977_a5:
forall (p n m: nat), prime (Z.of_nat p) /\ m >= n ->
(Z.to_nat (floor (Binomial.C (p*m) (p*n)))) = (Z.to_nat (floor (Binomial.C m n))) mod p.
Proof. Admitted.
End putnam_1977_a5. | theory putnam_1977_a5 imports Complex_Main "HOL-Number_Theory.Cong"
begin
theorem putnam_1977_a5:
fixes p m n::nat
assumes hp : "prime p"
and hmgen : "m \<ge> n"
shows "[(p*m) choose (p * n) = m choose n] (mod p)"
sorry
end | null |
putnam_1977_a6 | abbrev putnam_1977_a6_solution : Prop := sorry
-- True
theorem putnam_1977_a6
(X : Set (β Γ β) := Set.prod (Icc 0 1) (Icc 0 1))
(room : (β Γ β) β β := fun (a,b) β¦ min (min a (1 - a)) (min b (1 - b)))
: ((β f : (β Γ β) β β, Continuous f β (β P β X, β« x in (P.1 - room P)..(P.1 + room P), β« y in (P.2 - room P)..(P.2 + room P), f (x, y) = 0) β (β P β X, f P = 0)) β putnam_1977_a6_solution) :=
sorry | Let $X$ be the square $[0, 1] \times [0, 1]$, and let $f : X \to \mathbb{R}$ be continuous. If $\int_Y f(x, y) \, dx \, dy = 0$ for all squares $Y$ such that
\begin{itemize}
\item[(1)] $Y \subseteq X$,
\item[(2)] $Y$ has sides parallel to those of $X$,
\item[(3)] at least one of $Y$'s sides is contained in the boundary of $X$,
\end{itemize}
is it true that $f(x, y) = 0$ for all $x, y$? | Prove that $f(x,y)$ must be identically zero. | ['analysis'] | null | theory putnam_1977_a6 imports Complex_Main "HOL-Analysis.Interval_Integral"
begin
definition putnam_1977_a6_solution::bool where "putnam_1977_a6_solution \<equiv> undefined"
(* True *)
theorem putnam_1977_a6:
fixes X::"(real \<times> real) set" and room::"real\<Rightarrow>real\<Rightarrow>real"
defines "X \<equiv> {(x, y). 0 \<le> x \<and> x \<le> 1 \<and> 0 \<le> y \<and> y \<le> 1}"
and "room \<equiv> \<lambda>x. \<lambda>y. min (min x (1 - x)) (min y (1 - y))"
shows "(\<forall>f. continuous_on UNIV f \<longrightarrow> (\<forall>(x, y) \<in> X. (set_lebesgue_integral lebesgue
{(a, b). a \<ge> x - (room x y) \<and> a \<le> x + (room x y) \<and> b \<ge> y - (room x y) \<and> b \<le> y + (room x y)} f ) = 0) \<longrightarrow> (\<forall>(x, y) \<in> X. f (x, y) = 0))
\<longleftrightarrow> putnam_1977_a6_solution"
sorry
end | null |
putnam_1977_b1 | abbrev putnam_1977_b1_solution : β := sorry
-- 2 / 3
theorem putnam_1977_b1
: (Tendsto (fun N β¦ β n in Finset.Icc (2 : β€) N, ((n : β) ^ 3 - 1) / (n ^ 3 + 1)) β€ (π putnam_1977_b1_solution)) :=
sorry | Find $\prod_{n=2}^{\infty} \frac{(n^3 - 1)}{(n^3 + 1)}$. | Prove that the product equals $\frac{2}{3}$. | ['algebra', 'analysis'] | Section putnam_1977_b1.
Require Import Reals Coquelicot.Series.
Open Scope R.
Definition putnam_1977_b1_solution := 2/3.
Theorem putnam_1977_b1:
Series (fun n => if (Rle_dec (INR n) 1) then 0 else (pow (INR n) 3 - 1)/ (pow (INR n) 3 + 1)) = putnam_1977_b1_solution.
Proof. Admitted.
End putnam_1977_b1. | theory putnam_1977_b1 imports Complex_Main
begin
definition putnam_1977_b1_solution::real where "putnam_1977_b1_solution \<equiv> undefined"
(* 2/3 *)
theorem putnam_1977_b1:
shows "(\<lambda>N. \<Prod>n=2..N. (n^3 - 1) / (n^3 + 1)) \<longlonglongrightarrow> putnam_1977_b1_solution"
sorry
end | null |
putnam_1977_b3 | abbrev putnam_1977_b3_solution : Prop := sorry
-- False
theorem putnam_1977_b3
(P : β Γ β Γ β β Prop := fun (a, b, c) => Irrational a β§ Irrational b β§ Irrational c β§ a > 0 β§ b > 0 β§ c > 0 β§ a + b + c = 1)
(balanced : β Γ β Γ β β Prop := fun (a, b, c) => a < 1/2 β§ b < 1/2 β§ c < 1/2)
(B : β Γ β Γ β β β Γ β Γ β := fun (a, b, c) => (ite (a > 1/2) (2*a - 1) (2*a), ite (b > 1/2) (2*b - 1) (2*b), ite (c > 1/2) (2*c - 1) (2*c)))
: (β t : β Γ β Γ β, P t β β n : β, balanced (B^[n] t)) β putnam_1977_b3_solution :=
sorry | An ordered triple $(a, b, c)$ of positive irrational numbers with $a + b + c = 1$ is considered $\textit{balanced}$ if all three elements are less than $\frac{1}{2}$. If a triple is not balanced, we can perform a ``balancing act'' $B$ defined by $B(a, b, c) = (f(a), f(b), f(c))$, where $f(x) = 2x - 1$ if $x > 1/2$ and $f(x) = 2x$ otherwise. Will finitely many iterations of this balancing act always eventually produce a balanced triple? | Not necessarily. | ['algebra'] | null | theory putnam_1977_b3 imports Complex_Main
begin
definition putnam_1977_b3_solution :: "bool" where
"putnam_1977_b3_solution \<equiv> undefined"
(* False *)
theorem putnam_1977_b3:
fixes P balanced :: "(real \<times> real \<times> real) \<Rightarrow> bool"
and B :: "(real \<times> real \<times> real) \<Rightarrow> (real \<times> real \<times> real)"
defines "P \<equiv> \<lambda> w :: real \<times> real \<times> real. let (a,b,c) = w in
(a \<notin> \<rat> \<and> b \<notin> \<rat> \<and> c \<notin> \<rat> \<and> a > 0 \<and> b > 0 \<and> c > 0 \<and> a + b + c = 1)"
and "balanced \<equiv> \<lambda> w :: real \<times> real \<times> real. let (a,b,c) = w in
(a < 1/2 \<and> b < 1/2 \<and> c < 1/2)"
and "B \<equiv> \<lambda> w :: real \<times> real \<times> real. let (a,b,c) = w in
((if a > 1/2 then (2 * a - 1) else (2 * a), if b > 1/2 then (2 * b - 1) else (2 * b), if c > 1/2 then (2 * c - 1) else (2 * c)))"
shows "(\<forall> t :: real \<times> real \<times> real. P t \<longrightarrow> (\<exists> n :: nat. balanced ((B^^n) t))) \<longleftrightarrow> putnam_1977_b3_solution"
sorry
end | null |
putnam_1977_b5 | theorem putnam_1977_b5
(n : β)
(hn : n > 1)
(a : Fin n β β)
(A : β)
(hA : A + β i : Fin n, (a i)^2 < (1/((n : β) - 1))*(β i : Fin n, a i)^2)
: β i j : Fin n, i < j β A < 2*(a i)*(a j) :=
sorry | If $a_1, a_2, \dots, a_n$ are real numbers with $n > 1$ and $A$ satisfies $$A + \sum_{i = 1}^{n} a_i^2 < \frac{1}{n-1}\left(\sum_{i=1}^{n}a_i\right)^2,$$ prove that $A < 2a_{i}a_{j}$ for all $i, j$ with $1 \le i < j \le n$. | null | ['algebra'] | Section putnam_1977_b5.
Require Import List Reals.
Open Scope R.
Theorem putnam_1977_b5:
forall (n: nat) (a: list R) (b: R),
length a = n ->
let sum1 := fold_left Rplus a 0 in
let sum2 := fold_left (fun acc x => Rplus acc (x*x)) a 0 in
forall (b: R),
b < sum1*sum1/(INR n-1) - sum2 ->
forall (i j: nat), R1 <= INR i <= INR n /\ 1 <= INR j <= INR n /\ i <> j -> b < 2 * (nth i a 0) * (nth j a 0).
Proof. Admitted.
End putnam_1977_b5. | theory putnam_1977_b5 imports Complex_Main
begin
theorem putnam_1977_b5:
fixes n :: "nat"
and a :: "nat \<Rightarrow> real"
and A :: "real"
assumes hn : "n > 1"
and hA : "A + (\<Sum> i \<in> {1..n}. (a i)^2) < 1/(real n - 1) * (\<Sum> i \<in> {1..n}. a i)^2"
shows "\<forall> i \<in> {1 :: nat..n}. \<forall> j \<in> {1 :: nat..n}. i < j \<longrightarrow> A < 2 * (a i) * (a j)"
sorry
end | null |
putnam_1977_b6 | theorem putnam_1977_b6
[Group G]
(H : Subgroup G)
(h : β := Nat.card H)
(a : G)
(ha : β x : H, (x*a)^3 = 1)
(P : Set G := {g : G | β xs : List H, (xs.length β₯ 1) β§ g = (List.map (fun h : H => h*a) xs).prod})
: (Finite P) β§ (P.ncard β€ 3*h^2) :=
sorry | Let $G$ be a group and $H$ be a subgroup of $G$ with $h$ elements. Suppose that $G$ contains some element $a$ such that $(xa)^3 = 1$ for all $x \in H$ (here $1$ represents the identity element of $G$). Let $P$ be the subset of $G$ containing all products of the form $x_1 a x_2 a \cdots x_n a$ with $n \ge 1$ and $x_i \in H$ for all $i \in \{1, 2, \dots, n\}$. Prove that $P$ is a finite set and contains no more than $3h^2$ elements. | null | ['abstract_algebra'] | null | theory putnam_1977_b6 imports Complex_Main
"HOL-Algebra.Group"
begin
theorem putnam_1977_b6:
fixes G (structure)
and h :: "nat"
and a :: "'a"
and P H :: "'a set"
defines "P \<equiv> {g :: 'a. \<exists> x :: 'a list. (length x \<ge> 1 \<and> (\<forall> i \<in> {1..length x}. x!i \<in> H) \<and> g = foldr (\<lambda> y z. y \<otimes>\<^bsub>G\<^esub> (z \<otimes>\<^bsub>G\<^esub> a)) x \<one>\<^bsub>G\<^esub>)}"
assumes hG : "Group.group G"
and ha : "a \<in> carrier G"
and hH : "finite H \<and> subgroup H G"
and hh : "h = card H"
and haH : "\<forall> x \<in> H. (x \<otimes>\<^bsub>G\<^esub> a)[^]3 = \<one>\<^bsub>G\<^esub>"
shows "finite P \<and> card P \<le> 3 * h^2"
sorry
end
| null |
putnam_2012_a2 | theorem putnam_2012_a2
(S : Type*) [CommSemigroup S]
(a b c : S)
(hS : β x y : S, β z : S, x * z = y)
(habc : a * c = b * c)
: a = b :=
sorry | Let $*$ be a commutative and associative binary operation on a set $S$. Assume that for every $x$ and $y$ in $S$, there exists $z$ in $S$ such that $x*z=y$. (This $z$ may depend on $x$ and $y$.) Show that if $a,b,c$ are in $S$ and $a*c=b*c$, then $a=b$. | null | ['abstract_algebra'] | Section putnam_2012_a2.
Require Import ssreflect.
Theorem putnam_2012_a2:
forall (S : Type),
let is_comm (op : S -> S -> S) := forall (x y: S), op x y = op y x in
let is_assc (op : S -> S -> S) := forall (x y z: S), op x (op y z) = op (op x y) z in
forall op, is_comm op /\ is_assc op /\ forall (x y: S), exists (z: S), op x z = y ->
forall (a b c: S), op a c = op b c -> a = b.
Proof. Admitted.
End putnam_2012_a2. | theory putnam_2012_a2 imports Complex_Main
begin
theorem putnam_2012_a2:
fixes Smul :: "'S \<Rightarrow> 'S \<Rightarrow> 'S" (infixl "\<^bold>*" 70)
and a b c :: 'S
assumes Smulasg: "abel_semigroup Smul"
and hS: "\<forall>x y::'S. \<exists>z::'S. x \<^bold>* z = y"
and habc: "a \<^bold>* c = b \<^bold>* c"
shows "a = b"
sorry
end
| null |
putnam_2012_a3 | abbrev putnam_2012_a3_solution : β β β := sorry
-- fun x : β => Real.sqrt (1 - x^2)
theorem putnam_2012_a3
(S : Set β := Set.Icc (-1 : β) 1)
(hf : (β β β) β Prop := fun f : β β β => ContinuousOn f S β§
(β x β S, f x = ((2 - x^2)/2)*f (x^2/(2 - x^2))) β§ f 0 = 1 β§
(β y : β, leftLim (fun x : β => (f x)/Real.sqrt (1 - x)) 1 = y))
: hf putnam_2012_a3_solution β§ β f : β β β, hf f β β x β S, f x = putnam_2012_a3_solution x :=
sorry | Let $f: [-1, 1] \to \mathbb{R}$ be a continuous function such that
\begin{itemize}
\item[(i)]
$f(x) = \frac{2-x^2}{2} f \left( \frac{x^2}{2-x^2} \right)$ for every $x$ in $[-1, 1]$,
\item[(ii)]
$f(0) = 1$, and
\item[(iii)]
$\lim_{x \to 1^-} \frac{f(x)}{\sqrt{1-x}}$ exists and is finite.
\end{itemize}
Prove that $f$ is unique, and express $f(x)$ in closed form. | $f(x) = \sqrt{1-x^2}$ for all $x \in [-1,1]$. | ['analysis', 'algebra'] | Section putnam_2012_a3.
Require Import Reals Coquelicot.Coquelicot.
Definition putnam_2012_a3_solution (x: R) := sqrt (1 - x ^ 2).
Theorem putnam_2012_a3:
forall (f: R -> R) (x: R), (-1 <= x <= 1 /\ continuity_pt f x /\
f x = (2 - x ^ 2) / 2 * f ((x ^ 2) / (2 - x ^ 2)) /\
f 0 = 1 /\
exists (c: R), filterlim (fun x => f x / sqrt (1 - x)) (at_left 1) (locally c)) <->
f x = putnam_2012_a3_solution x.
Proof. Admitted.
End putnam_2012_a3. | theory putnam_2012_a3 imports Complex_Main
begin
(* uses (real \<Rightarrow> real) instead of ({-1..1} \<Rightarrow> real) *)
definition putnam_2012_a3_solution :: "real \<Rightarrow> real" where "putnam_2012_a3_solution \<equiv> undefined"
(* (\<lambda>x::real. sqrt (1 - x^2)) *)
theorem putnam_2012_a3:
fixes S :: "real set"
and hf :: "(real \<Rightarrow> real) \<Rightarrow> bool"
defines "S \<equiv> {-1..1}"
and "hf \<equiv> (\<lambda>f::real\<Rightarrow>real. continuous_on S f \<and>
(\<forall>x\<in>S. f x = ((2 - x^2)/2)*f (x^2/(2 - x^2))) \<and> f 0 = 1 \<and>
(\<exists>y::real. filterlim (\<lambda>x::real. (f x)/sqrt (1 - x)) (nhds y) (at_left 1)))"
shows "hf putnam_2012_a3_solution \<and> (\<forall>f::real\<Rightarrow>real. hf f \<longrightarrow> (\<forall>x\<in>S. f x = putnam_2012_a3_solution x))"
sorry
end
| null |
putnam_2012_a4 | theorem putnam_2012_a4
(q r : β€)
(A B : Fin 2 β β)
(T : Set β)
(S : Set β€)
(qpos : q > 0)
(ABlt : A 0 < A 1 β§ B 0 < B 1)
(hT : T = {x : β | β b m : β€, ((b : β) β Set.Icc (B 0) (B 1)) β§ (x = b + m * q)})
(hS : S = {a : β€ | ((a : β) β Set.Icc (A 0) (A 1)) β§ (β t β T, r * a = t)})
: ((A 1 - A 0) * (B 1 - B 0) < q) β (β n : β, β a1 d : β, n > 2 β§ {s : β | s = round s β§ round s β S} = (Set.Icc (A 0) (A 1)) β© {x : β | β i : Fin n, x = a1 + i * d}) :=
sorry | Let $q$ and $r$ be integers with $q>0$, and let $A$ and $B$ be intervals on the real line. Let $T$ be the set of all $b+mq$ where $b$ and $m$ are integers with $b$ in $B$, and let $S$ be the set of all integers $a$ in $A$ such that $ra$ is in $T$. Show that if the product of the lengths of $A$ and $B$ is less than $q$, then $S$ is the intersection of $A$ with some arithmetic progression. | null | ['algebra'] | null | theory putnam_2012_a4 imports Complex_Main
begin
theorem putnam_2012_a4:
fixes q r :: "int"
and A B :: "real \<times> real"
and S :: "int set"
and T :: "real set"
defines "T \<equiv> {x :: real. \<exists> b m :: int. real_of_int b \<in> {fst B..snd B} \<and> x = b + m * q}"
and "S \<equiv> {a :: int. real_of_int a \<in> {fst A..snd A} \<and> (real_of_int (r * a)) \<in> T}"
assumes qpos : "q > 0"
and ABlt : "fst A < snd A \<and> fst B < snd B"
shows "((snd A - fst A) * (snd B - fst B) < q) \<longrightarrow> (\<exists> n :: nat. n > 2 \<and> (\<exists> a1 d :: real. {s :: real. round s \<in> S \<and> round s = s} = {fst A..snd A} \<inter> {x :: real. \<exists> i \<in> {1..n}. x = a1 + i * d}))"
sorry
end | null |
putnam_2012_a5 | abbrev putnam_2012_a5_solution : Set (β Γ β) := sorry
-- {q | let β¨n, _β© := q; n = 1} βͺ {(2,2)}
theorem putnam_2012_a5
(n p : β)
(hn : n > 0)
(hp : Nat.Prime p)
{F : Type*} [Field F] [Fintype F]
(hK : Fintype.card F = p)
(G : Matrix (Fin n) (Fin n) F β (Fin n β F) β (Fin n β F) β (Fin n β F))
(hG : β M : Matrix (Fin n) (Fin n) F, β v x : (Fin n β F), G M v x = v + mulVec M x)
: (n, p) β putnam_2012_a5_solution β
β M : Matrix (Fin n) (Fin n) F,
β v : (Fin n β F),
Β¬(β i j : Finset.range (p^n), i β j β§ (G M v)^[i + 1] 0 = (G M v)^[j + 1] 0) :=
sorry | Let $\FF_p$ denote the field of integers modulo a prime $p$, and let $n$ be a positive integer. Let $v$ be a fixed vector in $\FF_p^n$, let $M$ be an $n \times n$ matrix with entries of $\FF_p$, and define $G: \FF_p^n \to \FF_p^n$ by $G(x) = v + Mx$. Let $G^{(k)}$ denote the $k$-fold composition of $G$ with itself, that is, $G^{(1)}(x) = G(x)$ and $G^{(k+1)}(x) = G(G^{(k)}(x))$. Determine all pairs $p, n$ for which there exist $v$ and $M$ such that the $p^n$ vectors $G^{(k)}(0)$, $k=1,2,\dots,p^n$ are distinct. | Show that the solution is the pairs $(p,n)$ with $n = 1$ as well as the single pair $(2,2)$. | ['linear_algebra'] | null | theory putnam_2012_a5 imports
Complex_Main
"HOL-Computational_Algebra.Primes"
"HOL-Analysis.Finite_Cartesian_Product"
begin
definition putnam_2012_a5_solution :: "(nat \<times> nat) set" where "putnam_2012_a5_solution \<equiv> undefined"
(* {q. fst q = 1} \<union> {(2, 2)} *)
theorem putnam_2012_a5:
fixes n p :: nat
and G :: "('p::field)^'n^'n \<Rightarrow> 'p^'n \<Rightarrow> 'p^'n \<Rightarrow> 'p^'n"
defines "G \<equiv> \<lambda> (M :: 'p^'n^'n) (v :: 'p^'n) (x :: 'p^'n). v + M *v x"
assumes pcard: "CARD('p) = p"
and ncard: "CARD('n) = n"
and hn: "n > 0"
and hp: "prime p"
shows "(n, p) \<in> putnam_2012_a5_solution \<longleftrightarrow>
(\<exists> M :: 'p^'n^'n.
\<exists> v :: 'p^'n.
\<not>(\<exists> i \<in> {1..p^n}. \<exists> j \<in> {1..p^n}. i \<noteq> j \<and> ((G M v) ^^ i) 0 = ((G M v) ^^ j) 0))"
sorry
end | null |
putnam_2012_a6 | abbrev putnam_2012_a6_solution : Prop := sorry
-- True
theorem putnam_2012_a6
(p : ((β Γ β) β β) β Prop := fun f β¦ Continuous f β§ β x1 x2 y1 y2 : β, x2 > x1 β y2 > y1 β (x2 - x1) * (y2 - y1) = 1 β β« x in x1..x2, β« y in y1..y2, f (x, y) = 0)
: ((β f : (β Γ β) β β, β x y : β, p f β f (x, y) = 0) β putnam_2012_a6_solution) :=
sorry | Let $f(x,y)$ be a continuous, real-valued function on $\mathbb{R}^2$. Suppose that, for every rectangular region $R$ of area $1$, the double integral of $f(x,y)$ over $R$ equals $0$.
Must $f(x,y)$ be identically $0$? | Prove that $f(x,y)$ must be identically $0$. | ['analysis'] | Section putnam_2012_a6.
Require Import Reals. From Coquelicot Require Import Coquelicot Continuity RInt.
Open Scope R_scope.
Definition putnam_2012_a6_solution := True.
Theorem putnam_2012_a6:
forall (f: (R*R) -> R) (a: R*R), continuous f a ->
forall (a b c d : R), a > b /\ c > d /\ (a - b) * (c - d) = 1 ->
RInt (fun y => RInt (fun x => f (x, y)) a b) c d = 0
-> (f = fun _ => 0) <-> putnam_2012_a6_solution.
Proof. Admitted.
End putnam_2012_a6. | theory putnam_2012_a6 imports Complex_Main
"HOL-Analysis.Set_Integral"
"HOL-Analysis.Lebesgue_Measure"
begin
(* NOTE: this formalization differs from the original problem wording in only allowing axis-aligned rectangles.
The problem is solvable given this weaker hypothesis. *)
definition putnam_2012_a6_solution::bool where "putnam_2012_a6_solution \<equiv> undefined"
(* True *)
theorem putnam_2012_a6:
fixes p::"((real \<times> real) \<Rightarrow> real) \<Rightarrow> bool"
defines "p \<equiv> \<lambda>f. continuous_on UNIV f \<and> (\<forall>x1 x2 y1 y2::real. x2 > x1 \<longrightarrow> y2 > y1 \<longrightarrow> (x2 - x1) * (y2 - y1) = 1
\<longrightarrow> (set_lebesgue_integral lebesgue {(x, y). x \<ge> x1 \<and> x \<le> x2 \<and> y \<ge> y1 \<and> y \<le> y2} f = 0))"
shows "(\<forall>f::(real \<times> real) \<Rightarrow> real. \<forall>x y ::real. p f \<longrightarrow> f (x, y) = 0) \<longleftrightarrow> putnam_2012_a6_solution"
sorry
end
| null |
putnam_2012_b1 | theorem putnam_2012_b1
(nneg : Set β := Set.Ici 0)
(S : Set (nneg β β))
(rngS : β f β S, β x : nneg, f x β nneg)
(f1 : nneg β β := fun x β¦ exp x - 1)
(f2 : nneg β β := fun x β¦ Real.log (x + 1))
(hf1 : f1 β S)
(hf2 : f2 β S)
(hsum : β f β S, β g β S, (fun x β¦ (f x) + (g x)) β S)
(hcomp : β f β S, β g β S, β gnneg : nneg β nneg, ((β x : nneg, g x = gnneg x) β (fun x β¦ f (gnneg x)) β S))
(hdiff : β f β S, β g β S, (β x : nneg, f x β₯ g x) β (fun x β¦ (f x) - (g x)) β S)
: (β f β S, β g β S, (fun x β¦ (f x) * (g x)) β S) :=
sorry | Let $S$ be a class of functions from $[0, \infty)$ to $[0, \infty)$ that satisfies:
\begin{itemize}
\item[(i)]
The functions $f_1(x) = e^x - 1$ and $f_2(x) = \ln(x+1)$ are in $S$;
\item[(ii)]
If $f(x)$ and $g(x)$ are in $S$, the functions $f(x) + g(x)$ and $f(g(x))$ are in $S$;
\item[(iii)]
If $f(x)$ and $g(x)$ are in $S$ and $f(x) \geq g(x)$ for all $x \geq 0$, then the function
$f(x) - g(x)$ is in $S$.
\end{itemize}
Prove that if $f(x)$ and $g(x)$ are in $S$, then the function $f(x) g(x)$ is also in $S$. | null | ['algebra'] | Section putnam_2012_b1.
Require Import Reals RIneq.
Open Scope R.
Theorem putnam_2012_b1:
forall (A: list (R -> R)),
let fPlus (f g: R -> R) := fun x => f x + g x in
let fMinus (f g: R -> R) := fun x => f x - g x in
let fMult (f g: R -> R) := fun x => f x * g x in
let to_Rplus (f: R -> R) (x : R) : R := if Rle_dec x 0 then 0 else if Rle_dec (f x) 0 then 0 else f x in
let f1 := to_Rplus (fun x => (Rpower (exp 1) x) - 1) in
let f2 := to_Rplus (fun x => ln (x+1)) in
(In f1 A /\ In f2 A) /\
(forall (f g: R -> R), In f A /\ In g A -> In (fPlus f g) A) /\
(forall (f g: R -> R), In f A /\ In g A /\ forall (x: R), f x >= g x -> In (fMinus f g) A)
<->
(forall (f g: R -> R), In f A /\ In g A -> In (fMult f g) A).
Proof. Admitted.
End putnam_2012_b1. | theory putnam_2012_b1 imports Complex_Main
begin
(* NOTE: Isabelle doesn't support restricted domains, so we have to get around this by treating functions as products *)
theorem putnam_2012_b1:
fixes S::"((real\<times>real) set) set"
assumes f1 : "{(x, y). x \<ge> 0 \<and> y \<ge> 0 \<and> y = exp x - 1} \<in> S"
and f2 : "{(x, y). x \<ge> 0 \<and> y \<ge> 0 \<and> y = ln (x+1) } \<in> S"
and hsum : "\<forall>s \<in> S. \<forall>t \<in> S. {(x, y). (\<forall>(xs, ys) \<in> s. \<forall>(xt, yt) \<in> t. x = xs \<and> x = xt \<longrightarrow> y = ys + yt)} \<in> S"
and hcomp : "\<forall>s \<in> S. \<forall>t \<in> S. {(x, y). (\<forall>(xs, ys) \<in> s. \<forall>(xt, yt) \<in> t. x = xs \<and> ys = xt \<longrightarrow> y = yt)} \<in> S"
and hdiff : "\<forall>s \<in> S. \<forall>t \<in> S. (\<forall>(xs, ys) \<in> s. \<forall>(xt, yt) \<in> t. xs = xt \<longrightarrow> ys \<ge> yt) \<longrightarrow>
{(x, y). (\<forall>(xs, ys) \<in> s. \<forall>(xt, yt) \<in> t. x = xs \<and> x = xt \<longrightarrow> y = ys - yt)} \<in> S"
shows "\<forall>s \<in> S. \<forall>t \<in> S. {(x, y). (\<forall>(xs, ys) \<in> s. \<forall>(xt, yt) \<in> t. x = xs \<and> x = xt \<longrightarrow> y = ys * yt)} \<in> S"
sorry
end
| null |
putnam_2012_b4 | abbrev putnam_2012_b4_solution : Prop := True
-- True
theorem putnam_2012_b4
(a : β β β)
(ha0 : a 0 = 1)
(han : β n : β, a (n + 1) = a n + exp (-a n))
: ((β L : β, Tendsto (fun n β¦ a n - Real.log n) β€ (π L)) β putnam_2012_b4_solution) :=
sorry | Suppose that $a_0 = 1$ and that $a_{n+1} = a_n + e^{-a_n}$ for $n=0,1,2,\dots$. Does $a_n - \log n$
have a finite limit as $n \to \infty$? (Here $\log n = \log_e n = \ln n$.) | Prove that the sequence has a finite limit. | ['analysis'] | Section putnam_2012_b4.
Require Import Reals Coquelicot.Lim_seq.
Open Scope R.
Definition putnam_2012_b4_solution := True.
Theorem putnam_2012_b4:
let A :=
fix a (n: nat) : R :=
match n with
| O => 1
| S n' => a n' + Rpower (exp 1) ((-1) * a n')
end in
let B (n: nat) : R := A n - ln (INR n) in
ex_lim_seq B <-> putnam_2012_b4_solution.
Proof. Admitted.
End putnam_2012_b4. | theory putnam_2012_b4 imports Complex_Main
begin
definition putnam_2012_b4_solution::bool where "putnam_2012_b4_solution \<equiv> undefined"
(* True *)
theorem putnam_2012_b4:
fixes a::"nat\<Rightarrow>real"
assumes ha0 : "a 0 = 1"
and han : "\<forall>n::nat. a (n+1) = a n + exp (-a n)"
shows "(convergent (\<lambda>n. a n - ln n)) \<longleftrightarrow> putnam_2012_b4_solution"
sorry
end
| null |
putnam_2012_b5 | theorem putnam_2012_b5
(g1 g2 : β β β)
(hgim : β x : β, g1 x β₯ 1 β§ g2 x β₯ 1)
(hgbd : β B1 B2 : β, β x : β, g1 x β€ B1 β§ g2 x β€ B2)
: β h1 h2 : β β β, β x : β, sSup {((g1 s)^x * (g2 s)) | s : β} = sSup {(x * (h1 t) + h2 t) | t : β} :=
sorry | Prove that, for any two bounded functions $g_1, g_2: \RR \to [1, \infty)$, there exist functions $h_1, h_2: \RR o \RR$ such that, for every $x \in \RR$, \[ \sup_{s \in \RR} (g_1(s)^x g_2(s)) = \max_{t \in \RR} (x h_1(t) + h_2(t)).\] | null | ['analysis'] | null | theory putnam_2012_b5 imports
Complex_Main
begin
(* Note: This formalization (like its Lean counterpart) uses Sup instead of Max for the right-hand side of the goal. *)
theorem putnam_2012_b5:
fixes g1 g2 :: "real \<Rightarrow> real"
assumes hgim: "\<forall> x :: real. g1 x \<ge> 1 \<and> g2 x \<ge> 1"
and hgbd: "\<exists> B1 B2 :: real. \<forall> x :: real. g1 x \<le> B1 \<and> g2 x \<le> B2"
shows "\<exists> h1 h2 :: real \<Rightarrow> real. \<forall> x :: real. Sup {y. \<exists> s :: real. y = (g1 s) powr x * (g2 s)} = Sup {y. \<exists> t :: real. y = x * (h1 t) + h2 t}"
sorry
end | null |
putnam_2012_b6 | theorem putnam_2012_b6
(p : β)
(hpodd : Odd p)
(hpprime : Nat.Prime p)
(hpmod3 : p β‘ 2 [MOD 3])
(P : Equiv.Perm (Fin p))
(hP : β i : Fin p, P i = (i * i * i))
: Equiv.Perm.signAux P = 1 β (p β‘ 3 [MOD 4]) :=
sorry | Let $p$ be an odd prime number such that $p \equiv 2 \pmod{3}$. Define a permutation $\pi$ of the residue classes modulo $p$ by $\pi(x) \equiv x^3 \pmod{p}$. Show that $\pi$ is an even permutation if and only if $p \equiv 3 \pmod{4}$. | null | ['number_theory'] | null | theory putnam_2012_b6 imports
Complex_Main
"HOL-Library.Cardinality"
"HOL-Computational_Algebra.Primes"
"HOL-Number_Theory.Cong"
"HOL-Combinatorics.Permutations"
begin
theorem putnam_2012_b6:
fixes p :: nat
and P :: "('p::field) \<Rightarrow> 'p"
defines "P \<equiv> \<lambda> i :: 'p. i ^ 3"
assumes pcard: "CARD('p) = p"
and hpodd: "odd p"
and hpprime: "prime p"
and hpmod3: "[p = 2] (mod 3)"
shows "evenperm P \<longleftrightarrow> ([p = 3] (mod 4))"
sorry
end | null |
putnam_1978_a1 | theorem putnam_1978_a1
(S : Set β€ := {k | β j : β€, 0 β€ j β§ j β€ 33 β§ k = 3 * j + 1})
(T : Set β€)
(hT : T β S β§ T.ncard = 20)
: (β m β T, β n β T, m β n β§ m + n = 104) :=
sorry | Let $S = \{1, 4, 7, 10, 13, 16, \dots , 100\}$. Let $T$ be a subset of $20$ elements of $S$. Show that we can find two distinct elements of $T$ with sum $104$. | null | ['algebra'] | Section putnam_1978_a1.
Require Import Nat Ensembles Finite_sets.
Theorem putnam_1978_a1 :
forall (A B: Ensemble nat) (n: nat), A n <-> 1 <= n <= 100 /\ n mod 3 = 1 /\ B n -> A n /\ cardinal nat B 20 ->
exists (b1 b2: nat), B b1 /\ B b2 /\ b1 <> b2 -> b1 + b2 = 104.
Proof. Admitted.
End putnam_1978_a1. | theory putnam_1978_a1 imports Complex_Main
begin
theorem putnam_1978_a1:
fixes S T :: "nat set"
defines "S \<equiv> {k :: nat. \<exists> j :: nat \<le> 33. k = 3 * j + 1}"
assumes hT : "T \<subset> S \<and> card T = 20"
shows "\<exists> m \<in> T. \<exists> n \<in> T. m \<noteq> n \<and> m + n = 104"
sorry
end | null |
putnam_1978_a2 | theorem putnam_1978_a2
(n : β)
(npos : n > 0)
(a b : β)
(hab : a β b)
(c : Fin n β β)
(A : Matrix (Fin n) (Fin n) β := fun i j β¦ ite (i < j) a (ite (i > j) b (c i)))
(p : β β β := fun x β¦ β i : Fin n, (c i - x))
: (A.det = ((b * p a - a * p b) / (b - a))) :=
sorry | Let $A$ be the real $n \times n$ matrix $(a_{ij})$ where $a_{ij} = a$ for $i < j$, $b \; (\neq a)$ for $i > j$, and $c_i$ for $i = j$. Show that $\det A = \frac{b p(a) - a p(b)}{b - a}$, where $p(x) = \prod_{i=1}^n (c_i - x)$. | null | ['linear_algebra'] | null | theory putnam_1978_a2 imports Complex_Main
"HOL-Analysis.Finite_Cartesian_Product"
"HOL-Analysis.Determinants"
begin
theorem putnam_1978_a2:
fixes n :: "nat"
and a b :: "real"
and A :: "real^'n^'n"
and c :: "'n \<Rightarrow> real"
and p :: "real \<Rightarrow> real"
and prm :: "'n \<Rightarrow> nat"
defines "A \<equiv> \<chi> i j :: 'n. if prm i < prm j then a else (if prm i > prm j then b else c i)"
and "p \<equiv> \<lambda> x :: real. (\<Prod> i :: 'n \<in> UNIV. (c i - x))"
assumes htype : "CARD('n) = n"
and hprmresbij : "prm ` UNIV = {0..n-1}"
and hab : "a \<noteq> b"
and npos : "n > 0"
shows "det A = ((b * p a - a * p b) / (b - a))"
sorry
end | null |
putnam_1978_a3 | abbrev putnam_1978_a3_solution : β := sorry
-- 2
theorem putnam_1978_a3
(p : Polynomial β := 2 * (X ^ 6 + 1) + 4 * (X ^ 5 + X) + 3 * (X ^ 4 + X ^ 2) + 5 * X ^ 3)
(I : β β β := fun k β¦ β« x in Ioi 0, x ^ k / p.eval x)
: (putnam_1978_a3_solution β Ioo 0 5 β§ β k β Ioo 0 5, I putnam_1978_a3_solution β€ I k) :=
sorry | Let $p(x) = 2(x^6 + 1) + 4(x^5 + x) + 3(x^4 + x^2) + 5x^3$. For $k$ with $0 < k < 5$, let
\[
I_k = \int_0^{\infty} \frac{x^k}{p(x)} \, dx.
\]
For which $k$ is $I_k$ smallest? | Show that $I_k$ is smallest for $k = 2$. | ['analysis', 'algebra'] | Section putnam_1978_a3.
Require Import Reals Coquelicot.Coquelicot.
Definition putnam_1978_a3_solution (a b c d: R) := b.
Theorem putnam_1978_a3
(p : R -> R := fun x => 2 * (x ^ 6 + 1) + 4 * (x ^ 5 + x) + 3 * (x ^ 4 + x ^ 2) + 5 * x ^ 3)
(a : R := Lim_seq (fun nInc => RInt (fun x => x / p x) 0 (INR nInc)))
(b : R := Lim_seq (fun nInc => RInt (fun x => x ^ 2 / p x) 0 (INR nInc)))
(c : R := Lim_seq (fun nInc => RInt (fun x => x ^ 3 / p x) 0 (INR nInc)))
(d : R := Lim_seq (fun nInc => RInt (fun x => x ^ 4 / p x) 0 (INR nInc)))
: Rmin a (Rmin b (Rmin c d)) = putnam_1978_a3_solution a b c d.
Proof. Admitted.
End putnam_1978_a3. | theory putnam_1978_a3 imports Complex_Main
"HOL-Computational_Algebra.Polynomial"
"HOL-Analysis.Interval_Integral"
begin
definition putnam_1978_a3_solution :: "nat" where
"putnam_1978_a3_solution \<equiv> undefined"
(* 2 *)
theorem putnam_1978_a3:
fixes p :: "real poly"
and I :: "nat \<Rightarrow> real"
defines "p \<equiv> 2 * (monom 1 6 + monom 1 0) + 4 * (monom 1 5 + monom 1 1) + 3 * (monom 1 4 + monom 1 2) + monom 5 3"
and "I \<equiv> \<lambda> k :: nat. interval_lebesgue_integral lebesgue 0 PInfty (\<lambda> x :: real. x^k / (poly p x))"
shows "(\<forall> k \<in> {1..4}. I putnam_1978_a3_solution \<le> I k) \<and> (putnam_1978_a3_solution \<in> {1 :: nat..4})"
sorry
end | null |
putnam_1978_a4 | theorem putnam_1978_a4
(bypass : (S : Type) β [inst : Mul S] β Prop := fun S [Mul S] β¦ β a b c d : S, (a * b) * (c * d) = a * d)
: ((β (S : Type) (_ : Mul S), bypass S β β a b c : S, a * b = c β (c * c = c β§ β d : S, a * d = c * d))
β§ (β (S : Type) (_ : Mul S) (_ : Fintype S), bypass S β§ (β a : S, a * a = a) β§ (β a b : S, a * b = a β§ a β b) β§ (β a b : S, a * b β a))) :=
sorry | A binary operation (represented by multiplication) on $S$ has the property that $(ab)(cd) = ad$ for all $a, b, c, d$. Show that:
\begin{itemize}
\item[(1)] if $ab = c$, then $cc = c$;
\item[(2)] if $ab = c$, then $ad = cd$ for all $d$.
\end{itemize}
Find a set $S$, and such a binary operation, which also satisfies:
\begin{itemize}
\item[(A)] $a a = a$ for all $a$;
\item[(B)] $ab = a \neq b$ for some $a, b$;
\item[(C)] $ab \neq a$ for some $a, b$.
\end{itemize} | null | ['abstract_algebra'] | null | theory putnam_1978_a4 imports Complex_Main
begin
theorem putnam_1978_a4:
fixes bypass :: "('a set) \<Rightarrow> ('a \<Rightarrow> 'a \<Rightarrow> 'a) \<Rightarrow> bool"
fixes binop :: "('a set) \<Rightarrow> ('a \<Rightarrow> 'a \<Rightarrow> 'a) \<Rightarrow> bool"
defines "bypass \<equiv> \<lambda> S Smul. (\<forall> a \<in> S. \<forall> b \<in> S. \<forall> c \<in> S. \<forall> d \<in> S. Smul (Smul a b) (Smul c d) = Smul a d)"
assumes pauncount : "\<exists> pamap :: 'a \<Rightarrow> real. surj pamap"
shows "(\<forall> (S :: 'a set) (Smul :: 'a \<Rightarrow> 'a \<Rightarrow> 'a). ((binop S Smul \<and> bypass S Smul)
\<longrightarrow> (\<forall> a \<in> S. \<forall> b \<in> S. \<forall> c \<in> S. Smul a b = c \<longrightarrow> (Smul c c = c \<and> (\<forall> d \<in> S. Smul a d = Smul c d))))) \<and>
(\<exists> (S :: 'a set) (Smul :: 'a \<Rightarrow> 'a \<Rightarrow> 'a).
binop S Smul \<and> bypass S Smul \<and> finite S \<and> (\<forall> a \<in> S. Smul a a = a) \<and> (\<exists> a \<in> S. \<exists> b \<in> S. Smul a b = a \<and> a \<noteq> b) \<and> (\<exists> a \<in> S. \<exists> b \<in> S. Smul a b \<noteq> a))"
sorry
end | null |
putnam_1978_a5 | theorem putnam_1978_a5
(n : β)
(npos : n > 0)
(a : Fin n β β)
(ha : β i : Fin n, a i β Ioo 0 Real.pi)
(ΞΌ : β := β i : Fin n, a i / n)
: (β i : Fin n, sin (a i) / (a i) β€ (sin ΞΌ / ΞΌ) ^ n) :=
sorry | Let $a_1, a_2, \dots , a_n$ be reals in the interval $(0, \pi)$ with arithmetic mean $\mu$. Show that
\[
\prod_{i=1}^n \left( \frac{\sin a_i}{a_i} \right) \leq \left( \frac{\sin \mu}{\mu} \right)^n.
\] | null | ['analysis'] | Section putnam_1978_a5.
Require Import List Reals Coquelicot.Coquelicot.
Theorem putnam_1978_a5:
let mu (a: nat -> R) (n: nat) := (sum_n a n)/(INR n) in
let wrapper_a (a: nat -> R) := fun i => sin (a i) / (a i) in
forall (a: nat -> R) (n i: nat), 0 <= INR i < INR n /\ 0 < a i < PI ->
fold_right Rmult 1%R (map (wrapper_a a) (List.seq 0 n)) <= ((sin (mu a n))/(mu a n))^n.
Proof. Admitted.
End putnam_1978_a5. | theory putnam_1978_a5 imports Complex_Main
begin
theorem putnam_1978_a5:
fixes n :: "nat"
and \<mu> :: "real"
and a :: "nat \<Rightarrow> real"
defines "\<mu> \<equiv> (\<Sum> i \<in> {1..n}. a i)/(real n)"
assumes npos : "n > 0"
and ha : "\<forall> i :: nat. a i \<in> {0 :: real<..<pi}"
shows "(\<Prod> i \<in> {1..n}. sin (a i) / (a i)) \<le> (sin \<mu> / \<mu>)^n"
sorry
end | null |
putnam_1978_a6 | theorem putnam_1978_a6
(S : Finset (Fin 2 β β))
(n : β := S.card)
(npos : n > 0)
: ({pair : Set (Fin 2 β β) | β P β S, β Q β S, pair = {P, Q} β§ Euclidean.dist P Q = 1}.ncard < 2 * (n : β) ^ ((3 : β) / 2)) :=
sorry | Given $n$ distinct points in the plane, prove that fewer than $2n^{3/2}$ pairs of these points are a distance of $1$ apart. | null | ['geometry', 'combinatorics'] | Section putnam_1978_a6.
Require Import List Reals Coquelicot.Coquelicot.
Theorem putnam_1978_a6
(n : nat)
(npos : gt n 0)
(A : list (nat * nat))
(hA : length A = n)
(subA : list (nat * nat))
(hsubA : forall (P1 P2: (nat * nat)), let '(Ax, Ay) := P1 in let (Bx, By) := P2 in (In (Ax, Ay) subA /\ In (Bx, By) subA) <-> (In (Ax, Ay) A /\ In (Bx, By) A /\ (sqrt (INR ((Ax - Bx) ^ 2 + (Ay - By) ^ 2)) < 1)))
: INR (length subA) < 2 * INR n ^ (3 / 2).
Proof. Admitted.
End putnam_1978_a6. | theory putnam_1978_a6 imports Complex_Main
"HOL-Analysis.Elementary_Metric_Spaces"
begin
theorem putnam_1978_a6:
fixes S :: "(real \<times> real) set"
and n :: "nat"
defines "n \<equiv> card S"
assumes npos : "n > 0"
and Sfin : "finite S"
shows "card {pair :: (real \<times> real) set. \<exists> P \<in> S. \<exists> Q \<in> S. pair = {P, Q} \<and> dist P Q = 1} < 2 * (real n) powr ((real 3)/2)"
sorry
end | null |
putnam_1978_b2 | abbrev putnam_1978_b2_solution : β := sorry
-- 7 / 4
theorem putnam_1978_b2
: (β' i : β+, β' j : β+, (1 : β) / (i ^ 2 * j + 2 * i * j + i * j ^ 2) = putnam_1978_b2_solution) :=
sorry | Find
\[
\sum_{i=1}^{\infty} \sum_{j=1}^{\infty} \frac{1}{i^2j + 2ij + ij^2}.
\] | Prove that the sum evaluates to $\frac{7}{4}$. | ['algebra', 'analysis'] | Section putnam_1978_b2.
Require Import Reals Coquelicot.Coquelicot.
Definition putnam_1978_b2_solution := 7/4.
Theorem putnam_1978_b2:
Series (fun i => Series (fun j => 1/(INR i*INR i*INR j + 2*INR i*INR j + INR i*INR j*INR j))) = putnam_1978_b2_solution.
Proof. Admitted.
End putnam_1978_b2. | theory putnam_1978_b2 imports Complex_Main
begin
definition putnam_1978_b2_solution :: "rat" where
"putnam_1978_b2_solution \<equiv> undefined"
(* (rat_of_nat 7)/4 *)
theorem putnam_1978_b2:
shows "(\<Sum> i \<in> {1 :: nat..}. (\<Sum> j \<in> {1 :: nat..}. (rat_of_nat 1)/(rat_of_nat (i^2 * j + 2 * i * j + i * j^2)))) = putnam_1978_b2_solution"
sorry
end | null |
putnam_1978_b3 | theorem putnam_1978_b3
(P : β+ β Polynomial β)
(hP1 : P 1 = 1 + X)
(hP2 : P 2 = 1 + 2 * X)
(hPodd : β n, P (2 * n + 1) = P (2 * n) + C ((n : β) + 1) * X * P (2 * n - 1))
(hPeven : β n, P (2 * n + 2) = P (2 * n + 1) + C ((n : β) + 1) * X * P (2 * n))
(a : β+ β β)
(haroot : β n, (P n).eval (a n) = 0)
(haub : β n, β x, (P n).eval x = 0 β x β€ a n)
: (StrictMono a β§ Tendsto a β€ (π 0)) :=
sorry | The polynomials $P_n(x)$ are defined by
\begin{align*}
P_1(x) &= 1 + x, \\
P_2(x) &= 1 + 2x, \\
P_{2n+1}(x) &= P_{2n}(x) + (n + 1) x P_{2n-1}(x), \\
P_{2n+2}(x) &= P_{2n+1}(x) + (n + 1) x P_{2n}(x).
\end{align*}
Let $a_n$ be the largest real root of $P_n(x)$. Prove that $a_n$ is strictly monotonically increasing and tends to zero. | null | ['algebra', 'analysis'] | Section putnam_1978_b3.
Require Import Nat Reals Coquelicot.Coquelicot.
Theorem putnam_1978_b3
(p : nat -> (R -> R) := fix p (n: nat) :=
match n with
| O => fun x => 1 + x
| S O => fun x => 1 + 2 * x
| S n' => if even n'
then fun x => p n' x + INR (S (S n')) / 2 * x * p (pred n') x
else fun x => p n' x + INR (S n') / 2 * x * p (pred n') x
end)
(a : nat -> R)
(ha : forall (n: nat), p n (a n) = 0)
(huba : forall (n: nat), forall (r: R), p n r = 0 -> r <= (a n))
: (forall (i j: nat), lt i j -> a i <= a j) /\ Lim_seq a = 0.
Proof. Admitted.
End putnam_1978_b3. | theory putnam_1978_b3 imports Complex_Main
"HOL-Computational_Algebra.Polynomial"
begin
theorem putnam_1978_b3:
fixes P :: "nat \<Rightarrow> (real poly)"
and a :: "nat \<Rightarrow> real"
assumes hP1 : "P 1 = monom 1 0 + monom 1 1"
and hP2 : "P 2 = monom 1 0 + monom 2 1"
and hPodd : "\<forall> n :: nat \<ge> 1. P (2 * n + 1) = P (2 * n) + (monom (real n + 1) 1) * P (2 * n - 1)"
and hPeven : "\<forall> n :: nat \<ge> 1. P (2 * n + 2) = P (2 * n + 1) + (monom (real n + 1) 1) * P (2 * n)"
and hamax : "\<forall> n :: nat \<ge> 1. a n = (GREATEST x :: real. poly (P n) x = 0)"
and ha0 : "a 0 = -2"
shows "strict_mono a \<and> filterlim a (nhds 0) at_top"
sorry
end | null |
putnam_1978_b4 | theorem putnam_1978_b4
: (β N : β, β a b c d : β€, a > N β§ b > N β§ c > N β§ d > N β§ a ^ 2 + b ^ 2 + c ^ 2 + d ^ 2 = a * b * c + a * b * d + a * c * d + b * c * d) :=
sorry | Show that we can find integers $a, b, c, d$ such that $a^2 + b^2 + c^2 + d^2 = abc + abd + acd + bcd$, and the smallest of $a, b, c, d$ is arbitrarily large. | null | ['algebra'] | Section putnam_1978_b4.
Require Import Reals.
Open Scope R.
Theorem putnam_1978_b4:
forall (n: R), exists (a b c d: Z), IZR a > n /\ IZR b > n /\ IZR c > n /\ IZR d > n /\ IZR a * IZR a + IZR b * IZR b + IZR c * IZR c + IZR d * IZR d = IZR a * IZR b * IZR c + IZR a * IZR b * IZR d + IZR a * IZR c * IZR d + IZR b * IZR c * IZR d.
Proof. Admitted.
End putnam_1978_b4. | theory putnam_1978_b4 imports Complex_Main
begin
theorem putnam_1978_b4:
shows "\<forall>N::real. \<exists> a b c d::int. a > N \<and> b > N \<and> c > N \<and> d > N \<and> a^2 + b^2 + c^2 + d^2 = a*b*c + a*b*d + a*c*d + b*c*d"
sorry
end | null |
putnam_1978_b5 | abbrev putnam_1978_b5_solution : Polynomial β := sorry
-- 4 * X ^ 4 - 4 * X ^ 2 + 1
theorem putnam_1978_b5
(S : Set (Polynomial β) := {p : Polynomial β | p.degree = 4 β§ β x β Icc (-1) 1, p.eval x β Icc 0 1})
: (putnam_1978_b5_solution β S β§ (β p β S, p.coeff 4 β€ putnam_1978_b5_solution.coeff 4)) :=
sorry | Find the real polynomial $p(x)$ of degree $4$ with largest possible coefficient of $x^4$ such that $p([-1, 1]) \subseteq [0, 1]$. | Prove that $p(x) = 4x^4 - 4x^2 + 1$. | ['algebra'] | Section putnam_1978_b5.
Require Import Reals Coquelicot.Coquelicot.
Definition putnam_1978_b5_solution := fun n => match n with | O => 1 | S (S O) => -4 | S (S (S (S O))) => 4 | _ => 0 end.
Theorem putnam_1978_b5
(valid : (nat -> R) -> Prop := fun coeff =>
let p := fun x => sum_n (fun i => coeff i * x ^ i) 5 in
forall (x: R), -1 <= x <= 1 -> 0 <= p x <= 1
)
(maxcoeff : nat -> R)
(hm : valid maxcoeff)
(hubm : forall (coeff: nat -> R), valid coeff -> coeff 4%nat <= maxcoeff 4%nat)
: maxcoeff = putnam_1978_b5_solution.
Proof. Admitted.
End putnam_1978_b5. | theory putnam_1978_b5 imports Complex_Main "HOL-Computational_Algebra.Polynomial"
begin
definition putnam_1978_b5_solution::"real poly" where "putnam_1978_b5_solution \<equiv> undefined"
(* [: 1, 0, -4, 0, 4 :] *)
theorem putnam_1978_b5:
fixes S::"(real poly) set"
defines "S \<equiv> { p::(real poly). degree p = 4 \<and> (\<forall>x \<in> {-1..1::real}. (poly p x) \<in> {0..1})}"
shows "putnam_1978_b5_solution \<in> S \<and> (\<forall>p \<in> S. coeff p 4 \<le> coeff putnam_1978_b5_solution 4)"
sorry
end | null |
putnam_1978_b6 | theorem putnam_1978_b6
(a : β β β β β)
(ha : β i j, a i j β Icc 0 1)
(m n : β)
(mnpos : m > 0 β§ n > 0)
: ((β i in Finset.Icc 1 n, β j in Finset.Icc 1 (m * i), a i j / i) ^ 2 β€ 2 * m * β i in Finset.Icc 1 n, β j in Finset.Icc 1 (m * i), a i j) :=
sorry | Let $a_{ij}$ be real numbers in $[0, 1]$. Show that
\[
\left( \sum_{i=1}^n \sum_{j=1}^{mi} \frac{a_{ij}}{i} \right) ^2 \leq 2m \sum_{i=1}^n \sum_{j=1}^{mi} a_{ij}.
\] | null | ['algebra'] | Section putnam_1978_b6.
Require Import Reals Coquelicot.Coquelicot.
Open Scope R.
Theorem putnam_1978_b6:
forall (a: nat -> nat -> R) (n m: nat) (i j: nat),
0 <= a i j <= 1 ->
pow (sum_n (fun i => sum_n (fun j => (a i j)/INR i) m * INR i) n) 2 <= 2 * INR m * sum_n (fun i => sum_n (fun j => a i j) m*INR i) n.
Proof. Admitted.
End putnam_1978_b6. | theory putnam_1978_b6 imports Complex_Main
begin
theorem putnam_1978_b6:
fixes a::"nat\<Rightarrow>nat\<Rightarrow>real" and m n::nat
assumes ha : "\<forall>i j. a i j \<in> {0..1::real}"
and mnpos : "m > 0 \<and> n > 0"
shows "(\<Sum>i=1..n. (\<Sum>j=1..m*i. a i j / i))^2 \<le> 2 * m * (\<Sum>i=1..n. (\<Sum>j=1..m*i. a i j))"
sorry
end | null |
putnam_2019_a1 | abbrev putnam_2019_a1_solution : Set β€ := sorry
-- {n : β€ | n β₯ 0 β§ Β¬Int.ModEq 9 n 3 β§ Β¬Int.ModEq 9 n 6}
theorem putnam_2019_a1
: {n : β€ | β A B C : β€, A β₯ 0 β§ B β₯ 0 β§ C β₯ 0 β§ A^3 + B^3 + C^3 - 3*A*B*C = n} = putnam_2019_a1_solution :=
sorry | Determine all possible values of the expression
\[
A^3+B^3+C^3-3ABC
\]
where $A, B$, and $C$ are nonnegative integers. | The answer is all nonnegative integers not congruent to $3$ or $6 \pmod{9}$. | ['algebra'] | Section putnam_2019_a1.
Require Import ZArith Ensembles Coquelicot.Coquelicot.
Open Scope Z.
Definition putnam_2019_a1_solution : Ensemble Z := fun n => Z.ge n 0 /\ n mod 9 <> 3 /\ n mod 9 <> 6.
Theorem putnam_2019_a1
(A : Ensemble Z)
(hA : forall (n: Z), A n <-> exists (A B C: Z), A >= 0 /\ B >= 0 /\ C >= 0 /\ A ^ 3 + B ^ 3 + C ^ 3 - 3 * A * B * C = n)
: A = putnam_2019_a1_solution.
Proof. Admitted.
End putnam_2019_a1. | theory putnam_2019_a1 imports Complex_Main
"HOL-Number_Theory.Cong"
begin
definition putnam_2019_a1_solution :: "int set" where "putnam_2019_a1_solution \<equiv> undefined"
(* {n::int. n \<ge> 0 \<and> \<not>[n = 3] (mod 9) \<and> \<not>[n = 6] (mod 9)} *)
theorem putnam_2019_a1:
shows "{n::int. (\<exists>A::int\<ge>0. \<exists>B::int\<ge>0. \<exists>C::int\<ge>0. A^3 + B^3 + C^3 - 3*A*B*C = n)} = putnam_2019_a1_solution"
sorry
end
| null |
putnam_2019_a3 | abbrev putnam_2019_a3_solution : β := sorry
-- 2019^(-(1:β)/2019)
theorem putnam_2019_a3
(v : Polynomial β β Prop := fun b : Polynomial β => b.degree = 2019 β§ 1 β€ (b.coeff 0).re β§ (b.coeff 2019).re β€ 2019 β§
(β i : Fin 2020, (b.coeff i).im = 0) β§ (β i : Fin 2019, (b.coeff i).re < (b.coeff (i + 1)).re))
(ΞΌ : Polynomial β β β := fun b : Polynomial β => (Multiset.map (fun Ο : β => βΟβ) (Polynomial.roots b)).sum/2019)
: (β b : Polynomial β, v b β ΞΌ b β₯ putnam_2019_a3_solution) β§
β M : β, (β b : Polynomial β, v b β ΞΌ b β₯ M) β M β€ putnam_2019_a3_solution :=
sorry | Given real numbers $b_0, b_1, \dots, b_{2019}$ with $b_{2019} \neq 0$, let $z_1,z_2,\dots,z_{2019}$ be
the roots in the complex plane of the polynomial
\[
P(z) = \sum_{k=0}^{2019} b_k z^k.
\]
Let $\mu = (|z_1| + \cdots + |z_{2019}|)/2019$ be the average of the distances from $z_1,z_2,\dots,z_{2019}$ to the origin. Determine the largest constant $M$ such that $\mu \geq M$ for all choices of $b_0,b_1,\dots, b_{2019}$ that satisfy
\[
1 \leq b_0 < b_1 < b_2 < \cdots < b_{2019} \leq 2019.
\] | The answer is $M = 2019^{-1/2019}$. | ['algebra'] | null | theory putnam_2019_a3 imports Complex_Main
"HOL-Computational_Algebra.Polynomial"
begin
definition putnam_2019_a3_solution :: real where "putnam_2019_a3_solution \<equiv> undefined"
(* 2019 powr (-1/2019) *)
theorem putnam_2019_a3:
fixes proots :: "(complex poly) \<Rightarrow> (complex multiset)"
and v :: "(complex poly) \<Rightarrow> bool"
and \<mu> :: "(complex poly) \<Rightarrow> real"
defines "proots \<equiv> (\<lambda>p::complex poly. Abs_multiset (\<lambda>a::complex. order a p))"
defines "v \<equiv> (\<lambda>b::complex poly. degree b = 2019 \<and> 1 \<le> Re (coeff b 0) \<and> Re (coeff b 2019) \<le> 2019 \<and>
(\<forall>i::nat\<in>{0..2019}. Im (coeff b i) = 0) \<and> (\<forall>i::nat\<in>{0..2018}. Re (coeff b i) < Re (coeff b (i + 1))))"
and "\<mu> \<equiv> (\<lambda>b::complex poly. (\<Sum>\<^sub># (image_mset norm (proots b))) / 2019)"
shows "(GREATEST M::real. (\<forall>b::complex poly. (v b \<longrightarrow> \<mu> b \<ge> M))) = putnam_2019_a3_solution"
sorry
end
| null |
putnam_2019_a4 | abbrev putnam_2019_a4_solution : Prop := sorry
-- False
theorem putnam_2019_a4
(fint : ((Fin 3 β β) β β) β Prop)
(hfint : β f : (Fin 3 β β) β β, fint f = (β S : Fin 3 β β, (β« x in {p : Fin 3 β β | Euclidean.dist p S = 1}, f x) = 0))
: (β f : (Fin 3 β β) β β, (Continuous f β§ fint f) β (β x : Fin 3 β β, f x = 0)) β putnam_2019_a4_solution :=
sorry | Let $f$ be a continuous real-valued function on $\mathbb{R}^3$. Suppose that for every sphere $S$ of radius $1$, the integral of $f(x,y,z)$ over the surface of $S$ equals $0$. Must $f(x,y,z)$ be identically 0? | Show that the answer is no. | ['analysis'] | Section putnam_2019_a4.
Require Import PeanoNat. Require Import Reals Coquelicot.Derive.
Definition putnam_2019_a4_solution := false.
Theorem putnam_2019_a4:
forall (f: R -> R),
continuity f ->
forall (x y z: R), x*x + y*y + z*z = 1 ->
True.
Proof. Admitted.
End putnam_2019_a4. | theory putnam_2019_a4 imports Complex_Main
"HOL-Analysis.Set_Integral"
"HOL-Analysis.Lebesgue_Measure"
begin
definition putnam_2019_a4_solution :: bool where "putnam_2019_a4_solution \<equiv> undefined"
(* False *)
theorem putnam_2019_a4:
fixes fint :: "((real^3) \<Rightarrow> real) \<Rightarrow> bool"
assumes hfint: "\<forall>f::(real^3)\<Rightarrow>real. fint f = (\<forall>S::real^3. set_lebesgue_integral lebesgue (sphere S 1) f = 0)"
shows "(\<forall>f::(real^3)\<Rightarrow>real. (continuous_on UNIV f \<and> fint f) \<longrightarrow> (\<forall>x::real^3. f x = 0)) \<longleftrightarrow> putnam_2019_a4_solution"
sorry
end
| null |
putnam_2019_a5 | abbrev putnam_2019_a5_solution : β β β := sorry
-- (fun p : β => (p - 1) / 2)
theorem putnam_2019_a5
(p : β)
(q : Polynomial (ZMod p))
(a : β β ZMod p)
(npoly : β β Polynomial (ZMod p))
(ndiv : β β Prop)
(podd : Odd p)
(pprime : p.Prime)
(hq : β k : β, q.coeff k = a k)
(ha0 : a 0 = 0 β§ β k > p - 1, a k = 0)
(haother : β k : Set.Icc 1 (p - 1), a k = ((k : β) ^ ((p - 1) / 2)) % p)
(hnpoly : β n : β, β x : ZMod p, (npoly n).eval x = (x - 1) ^ n)
(hndiv : β n : β, ndiv n = (npoly n β£ q))
: ndiv (putnam_2019_a5_solution p) β§ β n, ndiv n β n β€ (putnam_2019_a5_solution p) :=
sorry | Let $p$ be an odd prime number, and let $\mathbb{F}_p$ denote the field of integers modulo $p$. Let $\mathbb{F}_p[x]$ be the ring of polynomials over $\mathbb{F}_p$, and let $q(x) \in \mathbb{F}_p[x]$ be given by $q(x)=\sum_{k=1}^{p-1} a_kx^k$, where $a_k=k^{(p-1)/2}\mod{p}$. Find the greatest nonnegative integer $n$ such that $(x-1)^n$ divides $q(x)$ in $\mathbb{F}_p[x]$. | Show that the answer is $\frac{p-1}{2}$. | ['abstract_algebra', 'number_theory', 'algebra'] | null | theory putnam_2019_a5 imports Complex_Main
"HOL-Computational_Algebra.Polynomial"
"HOL-Library.Cardinality"
begin
(* uses (nat \<Rightarrow> 'p) instead of (Fin p \<Rightarrow> 'p) and ('p \<Rightarrow> nat) instead of ('p \<Rightarrow> Fin p) *)
definition putnam_2019_a5_solution :: "nat \<Rightarrow> nat" where "putnam_2019_a5_solution \<equiv> undefined"
(* (\<lambda>p::nat. nat (round ((p - 1)/2))) *)
theorem putnam_2019_a5:
fixes p :: nat
and ppind :: "nat \<Rightarrow> 'p::comm_semiring_1"
and q :: "'p poly"
and a :: "nat \<Rightarrow> 'p"
and ppindinv :: "'p \<Rightarrow> nat"
and npoly :: "nat \<Rightarrow> ('p poly)"
and ndiv :: "nat \<Rightarrow> bool"
assumes podd: "odd p"
and pprime: "prime p"
and ppcard: "CARD('p) = p"
and hppind: "ppind ` {0..(p-1)} = UNIV"
and ppadd: "ppind 0 = 0 \<and> (\<forall>i::nat\<in>{0..(p-1)}. \<forall>j::nat\<in>{0..(p-1)}. ppind i + ppind j = ppind ((i + j) mod p))"
and ppmult: "ppind 1 = 1 \<and> (\<forall>i::nat\<in>{0..(p-1)}. \<forall>j::nat\<in>{0..(p-1)}. ppind i * ppind j = ppind ((i * j) mod p))"
and hq: "\<forall>k::nat. coeff q k = a k"
and ha0: "a 0 = 0 \<and> (\<forall>k::nat>(p-1). a k = 0)"
and haother: "\<forall>k::nat\<in>{1..(p-1)}. a k = ppind ((k ^ (nat (round ((p-1)/2)))) mod p)"
and hppindinv: "\<forall>i::nat\<in>{0..(p-1)}. ppindinv (ppind i) = i"
and hnpoly: "\<forall>n::nat. \<forall>x::'p. poly (npoly n) x = ppind (((ppindinv x - 1)^n) mod p)"
and hndiv: "\<forall>n::nat. ndiv n = ((npoly n) dvd q)"
shows "(GREATEST n::nat. ndiv n) = putnam_2019_a5_solution p"
sorry
end
| null |
putnam_2019_a6 | theorem putnam_2019_a6
(g : β β β)
(r : β)
(hcont : ContinuousOn g (Set.Icc 0 1))
(hdiff : ContDiffOn β 1 g (Set.Ioo 0 1) β§ DifferentiableOn β (deriv g) (Set.Ioo 0 1))
(rgt1 : r > 1)
(hlim : Tendsto (fun x => g x / x ^ r) (π[>] 0) (π 0))
: (Tendsto (deriv g) (π[>] 0) (π 0)) β¨ (Tendsto (fun x : β => sSup {x' ^ r * abs (iteratedDeriv 2 g x') | x' β Set.Ioc 0 x}) (π[>] 0) atTop) :=
sorry | Let \( g \) be a real-valued function that is continuous on the closed interval \([0,1]\) and twice differentiable on the open interval \((0,1)\). Suppose that for some real number $\( r > 1 \),\lim_{{x \to 0^+}} \frac{g(x)}{x^r} = 0.$ Prove that either $\lim_{{x \to 0^+}} g'(x) = 0$ or $\limsup_{{x \to 0^+}} x^r |g''(x)| = \infty.$ | null | ['analysis'] | Section putnam_2019_a6.
Require Import Reals Coquelicot.Coquelicot.
Definition putnam_2019_a6_solution := 1.
Theorem putnam_2019_a6
(g : R -> R)
(contg : forall (x: R), 0 <= x <= 1 -> continuity_pt g x)
(diff2g : forall (x: R), 0 < x < 1 -> ex_derive_n g 2 x)
(r : R)
(posr : r > 1)
(p : filterlim (fun x => (g x / Rpower x r)) (at_right 0) (locally 0))
:
(filterlim (Derive g) (at_right 0) (locally 0)) \/
~ exists (c: R), is_LimSup_seq (fun x => if Rlt_dec (INR x) 0 then 0 else Rpower (INR x) r * Rabs (Derive_n g 2 (INR x))) c.
Proof. Admitted.
End putnam_2019_a6. | theory putnam_2019_a6 imports Complex_Main
"HOL-Analysis.Derivative"
begin
theorem putnam_2019_a6:
fixes g :: "real \<Rightarrow> real"
and r :: real
assumes hcont: "continuous_on {0..1} g"
and hdiff: "g C1_differentiable_on {0<..<1} \<and> (deriv g) differentiable_on {0<..<1}"
and rgt1: "r > 1"
and hlim: "filterlim (\<lambda>x::real. g x / (x powr r)) (nhds 0) (at_right 0)"
shows "(filterlim (deriv g) (nhds 0) (at_right 0)) \<or> (filterlim (\<lambda>x::real. Sup {xrg::real. (\<exists>x'::real\<in>{0<..x}. xrg = (x' powr r) * \<bar>(deriv^^2) g x'\<bar>)}) at_top (at_right 0))"
sorry
end
| null |
putnam_2019_b1 | abbrev putnam_2019_b1_solution : β β β := sorry
-- (fun n : β => 5 * n + 1)
theorem putnam_2019_b1
(n : β)
(Pn : Set (Fin 2 β β€))
(pZtoR : (Fin 2 β β€) β (Fin 2 β β))
(sPnsquare : Finset (Fin 2 β β€) β Prop)
(hPn : Pn = {p : Fin 2 β β€ | (p 0 = 0 β§ p 1 = 0) β¨ (β k β€ n, (p 0) ^ 2 + (p 1) ^ 2 = 2 ^ k)})
(hpZtoR : β p : Fin 2 β β€, β i : Fin 2, (pZtoR p) i = p i)
(hsPnsquare : β sPn : Finset (Fin 2 β β€), sPnsquare sPn = (sPn.card = 4 β§ β p4 : Fin 4 β (Fin 2 β β€), Set.range p4 = sPn β§ (β s > 0, β i : Fin 4, Euclidean.dist (pZtoR (p4 i)) (pZtoR (p4 (i + 1))) = s) β§ (Euclidean.dist (pZtoR (p4 0)) (pZtoR (p4 2)) = Euclidean.dist (pZtoR (p4 1)) (pZtoR (p4 3)))))
: {sPn : Finset (Fin 2 β β€) | (sPn : Set (Fin 2 β β€)) β Pn β§ sPnsquare sPn}.encard = putnam_2019_b1_solution n :=
sorry | Denote by $\mathbb{Z}^2$ the set of all points $(x,y)$ in the plane with integer coordinates. For each integer $n \geq 0$, let $P_n$ be the subset of $\mathbb{Z}^2$ consisting of the point $(0,0)$ together with all points $(x,y)$ such that $x^2+y^2=2^k$ for some integer $k \leq n$. Determine, as a function of $n$, the number of four-point subsets of $P_n$ whose elements are the vertices of a square. | Show that the answer is $5n+1$. | ['geometry'] | null | theory putnam_2019_b1 imports
Complex_Main
"HOL-Analysis.Finite_Cartesian_Product"
begin
definition putnam_2019_b1_solution :: "nat \<Rightarrow> nat" where "putnam_2019_b1_solution \<equiv> undefined"
(* \<lambda> n. 5 * n + 1 *)
theorem putnam_2019_b1:
fixes n :: nat
and Pn :: "(int^2) set"
and pZtoR :: "(int^2) \<Rightarrow> (real^2)"
and sPnsquare :: "(int^2) set \<Rightarrow> bool"
defines "Pn \<equiv> {p :: int^2. (p$1 = 0 \<and> p$2 = 0) \<or> (\<exists> k \<le> n. (p$1) ^ 2 + (p$2) ^ 2 = 2 ^ k)}"
and "pZtoR \<equiv> \<lambda> p. \<chi> i. (real_of_int (p$i))"
and "sPnsquare \<equiv> \<lambda> sPn :: (int^2) set. \<exists> a b c d :: int^2. sPn = {a, b, c, d} \<and> (\<exists> (s :: real) > 0. dist (pZtoR a) (pZtoR b) = s \<and> dist (pZtoR b) (pZtoR c) = s \<and> dist (pZtoR c) (pZtoR d) = s \<and> dist (pZtoR d) (pZtoR a) = s \<and> dist (pZtoR a) (pZtoR c) = dist (pZtoR b) (pZtoR d))"
shows "card {sPn :: (int^2) set. sPn \<subseteq> Pn \<and> sPnsquare sPn} = putnam_2019_b1_solution n"
sorry
end | null |
putnam_2019_b2 | abbrev putnam_2019_b2_solution : β := sorry
-- 8/Real.pi^3
theorem putnam_2019_b2
(a : β β β := fun n : β => β k : Icc (1 : β€) (n - 1),
Real.sin ((2*k - 1)*Real.pi/(2*n))/((Real.cos ((k - 1)*Real.pi/(2*n))^2)*(Real.cos (k*Real.pi/(2*n))^2)))
: Tendsto (fun n : β => (a n)/n^3) atTop (π putnam_2019_b2_solution) :=
sorry | For all $n \geq 1$, let
\[
a_n = \sum_{k=1}^{n-1} \frac{\sin \left( \frac{(2k-1)\pi}{2n} \right)}{\cos^2 \left( \frac{(k-1)\pi}{2n} \right) \cos^2 \left( \frac{k\pi}{2n} \right)}.
\]
Determine
\[
\lim_{n \to \infty} \frac{a_n}{n^3}.
\] | The answer is $\frac{8}{\pi^3}$. | ['analysis'] | Section putnam_2019_b2.
Require Import Reals Coquelicot.Coquelicot.
Definition putnam_2019_b2_solution := 8 / PI ^ 3.
Theorem putnam_2019_b2
(a : nat -> R := fun n => sum_n (fun k => let k := INR k in let n := INR n in (sin (2 * (k + 1) * PI / (2 * n))) / ((cos ((k - 1) * PI / (2 * n))) ^ 2 * (cos ((k * PI) / (2 * n))) ^ 2)) (n - 1))
: Lim_seq (fun n => a n / INR n ^ 3) = putnam_2019_b2_solution.
Proof. Admitted.
End putnam_2019_b2. | theory putnam_2019_b2 imports Complex_Main
begin
definition putnam_2019_b2_solution :: real where "putnam_2019_b2_solution \<equiv> undefined"
(* 8 / pi^3 *)
theorem putnam_2019_b2:
fixes a :: "nat \<Rightarrow> real"
defines "a \<equiv> (\<lambda>n::nat. (\<Sum>k::int=1..(n-1). sin ((2*k-1)*pi/(2*n)) / ((cos ((k-1)*pi/(2*n)))^2 * (cos (k*pi/(2*n)))^2)))"
shows "filterlim (\<lambda>n::nat. (a n)/n^3) (nhds putnam_2019_b2_solution) at_top"
sorry
end
| null |
putnam_2019_b3 | theorem putnam_2019_b3
(n : β)
(hn : n > 0)
(Q : Matrix (Fin n) (Fin n) β)
(hQ0 : β i j : Fin n, i β j β dotProduct (Q i) (Q j) = 0 β§ dotProduct (Qα΅ i) (Qα΅ j) = 0)
(hQ1 : β i : Fin n, dotProduct (Q i) (Q i) = 1 β§ dotProduct (Qα΅ i) (Qα΅ i) = 1)
(u : Matrix (Fin n) (Fin 1) β)
(hu : uα΅*u = 1)
(P : Matrix (Fin n) (Fin n) β := 1 - (u * uα΅))
: (Q - 1).det β 0 β (P * Q - 1).det = 0 :=
sorry | Let $Q$ be an $n$-by-$n$ real orthogonal matrix, and let $u \in \mathbb{R}^n$ be a unit column vector (that is, $u^T u = 1$). Let $P = I - 2uu^T$, where $I$ is the $n$-by-$n$ identity matrix. Show that if $1$ is not an eigenvalue of $Q$, then $1$ is an eigenvalue of $PQ$. | null | ['linear_algebra'] | null | theory putnam_2019_b3 imports
Complex_Main
"HOL-Analysis.Determinants"
begin
theorem putnam_2019_b3:
fixes n :: nat
and Q :: "real^'n^'n"
and u :: "real^1^'n"
and P :: "real^'n^'n"
defines "P \<equiv> mat 1 - 2 *s u ** (transpose u)"
assumes hn: "n > 0"
and hncard: "CARD('n) = n"
and hQ0: "\<forall> i j :: 'n. i \<noteq> j \<longrightarrow> scalar_product (Q$i) (Q$j) = 0 \<and> scalar_product ((transpose Q)$i) ((transpose Q)$j) = 0"
and hQ1: "\<forall> i :: 'n. scalar_product (Q$i) (Q$i) = 1 \<and> scalar_product ((transpose Q)$i) ((transpose Q)$i) = 1"
and hu: "(transpose u) ** u = 1"
shows "det (Q - mat 1) \<noteq> 0 \<longrightarrow> det (P ** Q - mat 1) \<noteq> 0"
sorry
end | null |
putnam_2019_b5 | abbrev putnam_2019_b5_solution : β Γ β := sorry
-- β¨2019, 1010β©
theorem putnam_2019_b5
(F : β β β€)
(P : Polynomial β)
(hF : β x, x β₯ 3 β F x = F (x - 1) + F (x - 2))
(F12 : F 1 = 1 β§ F 2 = 1)
(Pdeg: Polynomial.degree P = 1008)
(hp: β n : β, (n β€ 1008) β P.eval (2 * n + 1 : β) = F (2 * n + 1))
: β j k : β, (P.eval 2019 = F j - F k) β β¨j, kβ© = putnam_2019_b5_solution :=
sorry | Let $F_m$ be the $m$th Fibonacci number, defined by $F_1 = F_2 = 1$ and $F_m = F_{m-1} + F_{m-2}$ for all $m \geq 3$. Let $p(x)$ be the polynomial of degree $1008$ such that $p(2n + 1) = F_{2n+1}$ for $n = 0,1,2,\ldots,1008$. Find integers $j$ and $k$ such that $p(2019) = F_j - F_k$. | Show that the solution takes the form of $(j, k) = (2019, 1010)$. | ['number_theory', 'algebra'] | Section putnam_2019_b5.
Require Import Nat PeanoNat Reals NewtonInt. From mathcomp Require Import bigop fintype ssrnat ssrnum ssralg fintype poly seq.
Local Open Scope ring_scope.
Theorem putnam_2019_b5:
let F :=
fix f (n: nat) : nat :=
match n with
| O => O
| S O => 1%nat
| S ((S n'') as n') => add (f n') (f n'')
end in
exists (R: numDomainType) (p: {poly R}), forall (n: nat),
and (le 0%nat n) (le n 1008%nat) -> size p = 1008%nat /\ (p.[2*n%:R+1]) = (F (add (mul 2 n) 1%nat))%:R
-> exists (j k: nat), p.[2019] = (F j)%:R - (F k)%:R.
Proof. Admitted.
End putnam_2019_b5. | theory putnam_2019_b5 imports Complex_Main
"HOL-Computational_Algebra.Polynomial"
begin
definition putnam_2019_b5_solution::"nat \<times> nat" where "putnam_2019_b5_solution \<equiv> undefined"
(* (2019, 1010) *)
theorem putnam_2019_b5:
fixes f::"nat\<Rightarrow>int" and p::"real poly"
assumes hf : "\<forall>x\<ge>3. f x = f (x-1) + f (x-2)"
and f12 : "f 1 = 1 \<and> f 2 = 1"
and pdeg : "degree p = 1008"
and hp : "\<forall>n\<le>1008. poly p (2 * n + 1) = f (2 * n + 1)"
shows "\<forall>j k::nat. (poly p 2019 = f j - f k) \<longleftrightarrow> ((j, k) = putnam_2019_b5_solution)"
sorry
end
| null |
putnam_2019_b6 | abbrev putnam_2019_b6_solution : Set β := sorry
-- Set.Ici 1
theorem putnam_2019_b6
(n : β)
(neighbors : (Fin n β β€) β (Fin n β β€) β Prop)
(hneighbors : β p q : Fin n β β€, neighbors p q = (β i : Fin n, abs (p i - q i) = 1 β§ β j β i, p j = q j))
: (n β₯ 1 β§ β S : Set (Fin n β β€), (β p β S, β q : Fin n β β€, neighbors p q β q β S) β§ (β p β S, {q β S | neighbors p q}.encard = 1)) β n β putnam_2019_b6_solution :=
sorry | Let \( \mathbb{Z}^n \) be the integer lattice in \( \mathbb{R}^n \). Two points in \( \mathbb{Z}^n \) are called neighbors if they differ by exactly 1 in one coordinate and are equal in all other coordinates. For which integers \( n \geq 1 \) does there exist a set of points \( S \subset \mathbb{Z}^n \) satisfying the following two conditions? \begin{enumerate} \item If \( p \) is in \( S \), then none of the neighbors of \( p \) is in \( S \). \item If \( p \in \mathbb{Z}^n \) is not in \( S \), then exactly one of the neighbors of \( p \) is in \( S \). \end{enumerate} | null | ['abstract_algebra'] | null | theory putnam_2019_b6 imports Complex_Main
begin
(* uses (nat \<Rightarrow> int) instead of (Fin n \<Rightarrow> int) *)
definition putnam_2019_b6_solution :: "nat set" where "putnam_2019_b6_solution \<equiv> undefined"
(* {1..} *)
theorem putnam_2019_b6:
fixes n :: nat
and neighbors :: "(nat \<Rightarrow> int) \<Rightarrow> (nat \<Rightarrow> int) \<Rightarrow> bool"
assumes hneighbors: "\<forall>p q::nat\<Rightarrow>int. neighbors p q = (\<exists>i::nat\<in>{0..(n-1)}. \<bar>p i - q i\<bar> = 1 \<and> (\<forall>j::nat\<in>{0..(n-1)}. (j \<noteq> i \<longrightarrow> p j = q j)))"
shows "(n \<ge> 1 \<and> (\<exists>S::(nat\<Rightarrow>int) set. (\<forall>p\<in>S. \<forall>q::nat\<Rightarrow>int. (neighbors p q \<longrightarrow> q \<notin> S)) \<and> (\<forall>p::nat\<Rightarrow>int. (p \<notin> S \<longrightarrow> card {q\<in>S. neighbors p q} = 1)))) \<longleftrightarrow> n \<in> putnam_2019_b6_solution"
sorry
end
| null |
putnam_1976_a2 | theorem putnam_1976_a2
(P : MvPolynomial (Fin 2) β€ := (X 0)^2*(X 1) + (X 0)*(X 1)^2)
(Q : MvPolynomial (Fin 2) β€ := (X 0)^2 + (X 0)*(X 1) + (X 2)^2)
(F : β β MvPolynomial (Fin 2) β€ := fun n : β => ((X 0) + (X 1))^n - (X 0)^n - (X 1)^n)
(G : β β MvPolynomial (Fin 2) β€ := fun n : β => ((X 0) + (X 1))^n + (X 0)^n + (X 1)^n)
(i : Fin 2 β MvPolynomial (Fin 2) β€ := fun j : Fin 2 => ite (j = 0) P Q)
: β n : β, n > 0 β β A : MvPolynomial (Fin 2) β€, F n = aeval i A β¨ G n = aeval i A :=
sorry | Let $P(x, y) = x^2y + xy^2$, $Q(x, y) = x^2 + xy + y^2$, $F_n(x, y) = (x + y)^n - x^n - y^n$, and $G_n(x, y) = (x + y)^n + x^n + y^n$. Prove that for all positive integers $n$, either $F_n$ or $G_n$ can be represented as a polynomial in $P$ and $Q$ with integer coefficients. | null | ['algebra'] | null | theory putnam_1976_a2 imports Complex_Main
"HOL-Computational_Algebra.Polynomial"
begin
(* Note: Annoying solution, but it works. Need to find a way to cast an int poly poly to int poly poly poly *)
theorem putnam_1976_a2:
fixes P Q :: "int poly poly"
and F G :: "nat \<Rightarrow> (int poly poly)"
and is_poly_PQ :: "int poly poly \<Rightarrow> bool"
defines "P \<equiv> [:0, [:0, 0, 1:]:] + [:0, 0, [:0, 1:]:]"
and "Q \<equiv> [:[:0, 0, 1:]:] + [:0, [:0, 1:]:] + [:0, 0, [:1:]:]"
and "F \<equiv> \<lambda> n :: nat. ([:[:0, 1:]:] + [:0, [:1:]:])^n - [:[:0, 1:]^n:] - [:0, [:1:]:]^n"
and "G \<equiv> \<lambda> n :: nat. ([:[:0, 1:]:] + [:0, [:1:]:])^n + [:[:0, 1:]^n:] + [:0, [:1:]:]^n"
shows "\<forall> n :: nat. n > 0 \<longrightarrow> (\<exists> A :: int poly poly. (\<forall> a b :: int. poly (poly (F n) [:b:]) a = poly (poly (A) [:(poly (poly Q [:b:]) a):]) (poly (poly P [:b:]) a))
\<or> (\<forall> a b :: int. poly (poly (G n) [:b:]) a = poly (poly (A) [:(poly (poly Q [:b:]) a):]) (poly (poly P [:b:]) a)))"
sorry
end | null |
putnam_1976_a3 | abbrev putnam_1976_a3_solution : Set (β Γ β Γ β Γ β) := sorry
-- {(3, 2, 2, 3), (2, 3, 3, 2)}
theorem putnam_1976_a3
: {(p, r, q, s) : β Γ β Γ β Γ β | Nat.Prime p β§ Nat.Prime q β§ r > 1 β§ s > 1 β§ |(p^r : β€) - q^s| = 1} = putnam_1976_a3_solution :=
sorry | Find all integer solutions $(p, r, q, s)$ of the equation $|p^r - q^s| = 1$, where $p$ and $q$ are prime and $r$ and $s$ are greater than $1$. | The only solutions are $(p, r, q, s) = (3, 2, 2, 3)$ and $(p, r, q, s) = (2, 3, 3, 2)$. | ['number_theory'] | Section putnam_1976_a3.
Require Import Nat ZArith Znumtheory.
Open Scope nat_scope.
Definition putnam_1976_a3_solution (p q n m: nat) := p = 2 /\ q = 3 /\ n = 3 /\ m = 2.
Theorem putnam_1976_a3:
forall (p q n m: nat), prime (Z.of_nat p) /\ prime (Z.of_nat q) /\ n >= 2 /\ m >= 2 ->
p^n = q^m + 1 \/ p^n = q^m -1
<-> putnam_1976_a3_solution p q n m.
Proof. Admitted.
End putnam_1976_a3. | theory putnam_1976_a3 imports Complex_Main
begin
definition putnam_1976_a3_solution :: "(nat \<times> nat \<times> nat \<times> nat) set" where
"putnam_1976_a3_solution \<equiv> undefined"
(* {(3,2,2,3), (2,3,3,2)} *)
theorem putnam_1976_a3:
shows "{z :: nat \<times> nat \<times> nat \<times> nat. let (p,q,r,s) = z in prime p \<and> prime q \<and> r > 1 \<and> s > 1 \<and> \<bar>int (p^r) - int (q^s)\<bar> = 1} = putnam_1976_a3_solution"
sorry
end | null |
putnam_1976_a4 | abbrev putnam_1976_a4_solution : (β β β) Γ (β β β) := sorry
-- (fun r : β => -1/(r + 1), fun r : β => -(r + 1)/r)
theorem putnam_1976_a4
(a b c d : β€)
(r : β)
(P : Polynomial β := X^3 + (C (a : β))*X^2 + (C (b : β))*X - (C 1))
(Q : Polynomial β := X^3 + (C (c : β))*X^2 + (C (d : β))*X + (C 1))
(hP : aeval r P = 0 β§ Irreducible P)
(hQ : aeval (r + 1) Q = 0)
: β s : β, aeval s P = 0 β§ (s = putnam_1976_a4_solution.1 r β¨ s = putnam_1976_a4_solution.2 r) :=
sorry | Let $r$ be a real root of $P(x) = x^3 + ax^2 + bx - 1$, where $a$ and $b$ are integers and $P$ is irreducible over the rationals. Suppose that $r + 1$ is a root of $x^3 + cx^2 + dx + 1$, where $c$ and $d$ are also integers. Express another root $s$ of $P$ as a function of $r$ that does not depend on the values of $a$, $b$, $c$, or $d$. | The possible answers are $s = -\frac{1}{r + 1}$ and $s = -\frac{r + 1}{r}$. | ['algebra'] | null | theory putnam_1976_a4 imports Complex_Main
"HOL-Computational_Algebra.Polynomial"
begin
definition putnam_1976_a4_solution :: "(real \<Rightarrow> real) \<times> (real \<Rightarrow> real)" where
"putnam_1976_a4_solution \<equiv> undefined"
(* (\<lambda> r :: real. -1/(r + 1), \<lambda> r :: real. -(r+1)/r) *)
theorem putnam_1976_a4:
fixes a b c d :: "int"
and r :: "real"
and P Q :: "rat poly"
defines "P \<equiv> [: -1, rat_of_int b, rat_of_int a, 1 :]"
and "Q \<equiv> [: 1, rat_of_int d, rat_of_int c, 1 :]"
assumes hP : "poly (map_poly of_rat P) r = 0 \<and> irreducible P"
and hQ : "poly (map_poly of_rat Q) (r+1) = 0"
shows "\<exists> s :: real. poly (map_poly of_rat P) s = 0 \<and> (s = (fst putnam_1976_a4_solution) r \<or> s = (snd putnam_1976_a4_solution) r)"
sorry
end | null |
putnam_1976_a6 | theorem putnam_1976_a6
(f : β β β)
(hfdiff : ContDiff β 2 f)
(hfbd : β x : β, |f x| β€ 1)
(hf0 : (f 0)^2 + (deriv f 0)^2 = 4)
: β y : β, (f y) + (iteratedDeriv 2 f y) = 0 :=
sorry | Suppose that $f : \mathbb{R} \to \mathbb{R}$ is a twice continuously differentiable function such that $|f(x)| \le 1$ for all real $x$ and $(f(0))^2 + (f'(0))^2 = 4$. Prove that $f(y) + f''(y) = 0$ for some real number $y$. | null | ['analysis', 'algebra'] | Section putnam_1976_a6.
Require Import Reals Coquelicot.Derive.
Theorem putnam_1976_a6:
forall (f: R -> R) (x: R), -1 <= x <= 1 ->
ex_derive_n f 2 x /\ (f 0)*(f 0) + ((Derive_n f 1) 0)*((Derive_n f 1) 0) = 4
<->
exists (a: R), f a + ((Derive_n f 2) a) = 0.
Proof. Admitted.
End putnam_1976_a6. | theory putnam_1976_a6 imports Complex_Main
"HOL-Analysis.Derivative"
begin
theorem putnam_1976_a6:
fixes f :: "real \<Rightarrow> real"
assumes hfcdiff1 : "f C1_differentiable_on UNIV"
and hfcdiff2 : "(deriv f) C1_differentiable_on UNIV"
and hfbd : "\<forall> x :: real. \<bar>f x\<bar> \<le> 1"
and hf0 : "(f 0)^2 + (deriv f 0)^2 = 4"
shows "\<exists> y :: real. f y + ((deriv^^2) f) y = 0"
sorry
end | null |
putnam_1976_b1 | abbrev putnam_1976_b1_solution : β Γ β := sorry
-- (4, 1)
theorem putnam_1976_b1
: Tendsto (fun n : β => ((1 : β)/n)*β k in Finset.Icc (1 : β€) n, (Int.floor ((2*n)/k) - 2*Int.floor (n/k))) β€
(π (Real.log putnam_1976_b1_solution.1 - putnam_1976_b1_solution.2)) :=
sorry | Find $$\lim_{n \to \infty} \frac{1}{n} \sum_{k=1}^{n}\left(\left\lfloor \frac{2n}{k} \right\rfloor - 2\left\lfloor \frac{n}{k} \right\rfloor\right).$$ Your answer should be in the form $\ln(a) - b$, where $a$ and $b$ are positive integers. | The limit equals $\ln(4) - 1$, so $a = 4$ and $b = 1$. | ['analysis'] | null | theory putnam_1976_b1 imports Complex_Main
begin
definition putnam_1976_b1_solution :: "real \<times> real" where
"putnam_1976_b1_solution \<equiv> undefined"
(* (4,1) *)
theorem putnam_1976_b1:
shows "filterlim (\<lambda> n :: nat. 1/(real n) * (\<Sum> k \<in> {1 :: nat..n}. \<lfloor>2*(real n)/(real k)\<rfloor> - 2 * \<lfloor>(real n)/(real k)\<rfloor>))
(nhds (ln (fst putnam_1976_b1_solution) - snd putnam_1976_b1_solution)) at_top"
sorry
end | null |
putnam_1976_b2 | abbrev putnam_1976_b2_solution : β Γ Set (List (β€ Γ β€)) := sorry
-- (8, {[(0, 0)], [(2, 0)], [(0, 1)], [(0, 2)], [(0, 3)], [(0, 4)], [(0, 5)], [(0, 6)]})
theorem putnam_1976_b2
(G : Type*) [Group G]
(A B : G)
(word : List (β€ Γ β€) β G := fun w : List (β€ Γ β€) => (List.map (fun t : β€ Γ β€ => A^(t.1)*B^(t.2)) w).prod)
(hG : β g : G, β w : List (β€ Γ β€), g = word w)
(hA : A^4 = 1 β§ A^2 β 1)
(hB : B^7 = 1 β§ B β 1)
(h1 : A*B*A^(-(1 : β€))*B = 1)
(S : Set G := {g : G | β C : G, C^2 = g})
: S.ncard = putnam_1976_b2_solution.1 β§ S = {word w | w β putnam_1976_b2_solution.2} :=
sorry | Let $G$ be a group generated by two elements $A$ and $B$; i.e., every element of $G$ can be expressed as a finite word $A^{n_1}B^{n_2} \cdots A^{n_{k-1}}B^{n_k}$, where the $n_i$ can assume any integer values and $A^0 = B^0 = 1$. Further assume that $A^4 = B^7 = ABA^{-1}B = 1$, but $A^2 \ne 1$ and $B \ne 1$. Find the number of elements of $G$ than can be written as $C^2$ for some $C \in G$ and express each such square as a word in $A$ and $B$. | There are $8$ such squares: $1$, $A^2$, $B$, $B^2$, $B^3$, $B^4$, $B^5$, and $B^6$. | ['abstract_algebra'] | null | theory putnam_1976_b2 imports Complex_Main
"HOL-Algebra.Group"
begin
definition putnam_1976_b2_solution :: "nat \<times> (((nat \<times> nat) list) set)" where
"putnam_1976_b2_solution \<equiv> undefined"
(* (8, {[(0,0)], [(2, 0)], [(0, 1)], [(0, 2)], [(0, 3)], [(0, 4)], [(0, 5)], [(0, 6)]}) *)
theorem putnam_1976_b2:
fixes G (structure)
and A B :: "'a"
and word :: "(int \<times> int) list \<Rightarrow> 'a"
and S :: "'a set"
defines "word \<equiv> \<lambda> w. foldr (\<lambda> y z. (A[^](fst y) \<otimes>\<^bsub>G\<^esub> A[^](snd y)) \<otimes>\<^bsub>G\<^esub> z) w \<one>\<^bsub>G\<^esub>"
and "S \<equiv> {g :: 'a. g \<in> carrier G \<and> (\<exists> C \<in> carrier G. C[^]2 = g)}"
assumes hAB : "A \<in> carrier G \<and> B \<in> carrier G"
and hA : "A[^]4 = \<one>\<^bsub>G\<^esub> \<and> A[^]2 \<noteq> \<one>\<^bsub>G\<^esub>"
and hB : "B[^]7 = \<one>\<^bsub>G\<^esub> \<and> B \<noteq> \<one>\<^bsub>G\<^esub>"
and h1 : "A \<otimes>\<^bsub>G\<^esub> B \<otimes>\<^bsub>G\<^esub> (inv A) \<otimes>\<^bsub>G\<^esub> B = \<one>\<^bsub>G\<^esub>"
and hG : "\<forall> g \<in> carrier G. \<exists> w :: (int \<times> int) list. g = word w"
shows " card S = fst putnam_1976_b2_solution \<and> S = {g :: 'a. \<exists> w \<in> (snd putnam_1976_b2_solution). g = word w}"
sorry
end | null |
putnam_1976_b5 | abbrev putnam_1976_b5_solution : β β Polynomial β€ := sorry
-- fun n => C (Nat.factorial n)
theorem putnam_1976_b5
: β n : β, β k in Finset.range (n + 1), C ((-(1 : β€))^k * Nat.choose n k) * (X - (C (k : β€)))^n = putnam_1976_b5_solution n :=
sorry | Find $$\sum_{k=0}^{n} (-1)^k {n \choose k} (x - k)^n.$$ | The sum equals $n!$. | ['algebra'] | Section putnam_1976_b5.
Require Import Factorial Reals Coquelicot.Coquelicot.
Open Scope R.
Definition putnam_1976_b5_solution (n: nat) : R -> R := fun x => INR (fact n).
Theorem putnam_1976_b5
: forall (n: nat), (fun x => sum_n (fun i => (-1) ^ i * Binomial.C n i * (x - INR i) ^ n) (n + 1)) = putnam_1976_b5_solution n.
Proof. Admitted.
End putnam_1976_b5. | theory putnam_1976_b5 imports Complex_Main
begin
definition putnam_1976_b5_solution::"nat\<Rightarrow>(real \<Rightarrow> real)" where "putnam_1976_b5_solution \<equiv> undefined"
(* \<lambda>n. \<lambda>x. fact n *)
theorem putnam_1976_b5:
shows "\<forall>n::nat. (\<lambda>x. (\<Sum>k=0..n. ((-1)^k * (n choose k)) * (x - k)^n)) = putnam_1976_b5_solution n"
sorry
end | null |
putnam_1976_b6 | theorem putnam_1976_b6
(Ο : β β β€ := fun N : β => β d in Nat.divisors N, (d : β€))
(quasiperfect : β β Prop := fun N : β => Ο N = 2*N + 1)
: β N : β, quasiperfect N β β m : β€, Odd m β§ m^2 = N :=
sorry | Let $\sigma(N)$ denote the sum of all positive integer divisors of $N$, including $1$ and $N$. Call a positive integer $N$ \textit{quasiperfect} if $\sigma(N) = 2N + 1$. Prove that every quasiperfect number is the square of an odd integer. | null | ['number_theory'] | Section putnam_1976_b6.
Require Import List Nat.
Theorem putnam_1976_b6:
let sigma (n : nat) := fold_right plus 0 (filter (fun m => Nat.eqb (n mod m) 0) (seq 1 (S n))) in
forall (n: nat), sigma n = 2*n + 1 -> exists (m: nat), (odd m = true )/\ n = m*m.
Proof. Admitted.
End putnam_1976_b6. | theory putnam_1976_b6 imports Complex_Main
begin
theorem putnam_1976_b6:
fixes \<sigma> :: "nat \<Rightarrow> nat"
and quasiperfect :: "nat \<Rightarrow> bool"
defines "\<sigma> \<equiv> \<lambda> N :: nat. (\<Sum> d \<in> {k :: nat. k dvd N}. d)"
and "quasiperfect \<equiv> \<lambda> N :: nat. \<sigma> N = 2 * N + 1"
shows "\<forall> N :: nat. quasiperfect N \<longrightarrow> (\<exists> m :: int. odd m \<and> m^2 = N)"
sorry
end | null |
putnam_2010_a1 | abbrev putnam_2010_a1_solution : β β β := sorry
-- (fun n : β => Nat.ceil ((n : β) / 2))
theorem putnam_2010_a1
(n : β)
(kboxes : β β Prop)
(npos : n > 0)
(hkboxes : β k : β, kboxes k = (β boxes : Fin n β Fin k, β i j : Fin k, (β' x : boxes β»ΒΉ' {i}, (x : β)) = (β' x : boxes β»ΒΉ' {j}, (x : β))))
: kboxes (putnam_2010_a1_solution n) β§ (β k : β, kboxes k β k β€ putnam_2010_a1_solution n) :=
sorry | Given a positive integer $n$, what is the largest $k$ such that the numbers $1,2,\dots,n$ can be put into $k$ boxes so that the sum of the numbers in each box is the same? [When $n=8$, the example $\{1,2,3,6\},\{4,8\},\{5,7\}$ shows that the largest $k$ is \emph{at least} $3$.] | Show that the largest such $k$ is $\lceil \frac{n}{2} \rceil$. | ['algebra'] | null | theory putnam_2010_a1 imports Complex_Main
begin
(* Boosted domains to naturals *)
definition putnam_2010_a1_solution :: "nat\<Rightarrow>nat" where
"putnam_2010_a1_solution \<equiv> undefined"
(* \<lambda>n. nat \<lceil>n/2\<rceil> *)
theorem putnam_2010_a1:
fixes n :: "nat" and k_boxes :: "nat\<Rightarrow>bool"
assumes hpos : "n > 0"
and hkboxes : "\<forall> k::nat. kboxes k = (\<exists> boxes :: nat\<Rightarrow>nat. (\<forall>m\<in>{1..n}. boxes m \<in> {1..k}) \<and> (\<forall>i\<in>{1..k}. \<forall>j\<in>{1..k}. (\<Sum>x\<in>{1..n}. (if (boxes x = i) then x else 0)) = (\<Sum>x\<in>{1..n}. (if (boxes x = j) then x else 0))))"
shows "(GREATEST k. kboxes k) = putnam_2010_a1_solution n"
sorry
end | null |
putnam_2010_a2 | abbrev putnam_2010_a2_solution : Set (β β β) := sorry
-- {f : β β β | β c d : β, β x : β, f x = c*x + d}
theorem putnam_2010_a2
: {f : β β β | Differentiable β f β§
β x : β, β n : β€, n > 0 β deriv f x = (f (x + n) - f x)/n} = putnam_2010_a2_solution :=
sorry | Find all differentiable functions $f:\mathbb{R} \to \mathbb{R}$ such that
\[
f'(x) = \frac{f(x+n)-f(x)}{n}
\]
for all real numbers $x$ and all positive integers $n$. | The solution consists of all functions of the form $f(x) = cx+d$ for some real numbers $c,d$. | ['analysis'] | Section putnam_2010_a2.
Require Import Reals Coquelicot.Coquelicot.
Definition putnam_2010_a2_solution (f: R -> R) := exists (c d: R), f = (fun x => c * x + d).
Theorem putnam_2010_a2:
forall (f: R -> R) (x: R) (n: nat), Derive f x = (f (x + (INR n)) - f x) / (INR n) <-> putnam_2010_a2_solution f.
Proof. Admitted.
End putnam_2010_a2. | theory putnam_2010_a2 imports Complex_Main
"HOL-Analysis.Derivative"
begin
definition putnam_2010_a2_solution :: "(real \<Rightarrow> real) set" where "putnam_2010_a2_solution \<equiv> undefined"
(* {f::real\<Rightarrow>real. (\<exists>c d::real. \<forall>x::real. f x = c*x + d)} *)
theorem putnam_2010_a2:
shows "{f::real\<Rightarrow>real. f differentiable_on UNIV \<and>
(\<forall>(x::real)(n::nat). (n > 0 \<longrightarrow> deriv f x = (f (x + n) - f x)/n))} = putnam_2010_a2_solution"
sorry
end
| null |
putnam_2010_a4 | theorem putnam_2010_a4
: β n : β, n > 0 β Β¬Nat.Prime (10^10^10^n + 10^10^n + 10^n - 1) :=
sorry | Prove that for each positive integer $n$, the number $10^{10^{10^n}} + 10^{10^n} + 10^n - 1$ is not prime. | null | ['number_theory'] | null | theory putnam_2010_a4 imports Complex_Main
"HOL-Computational_Algebra.Primes"
begin
theorem putnam_2010_a4:
fixes n :: nat
assumes n_pos : "n > 0"
shows "\<not> prime (10^(10^(10^n)) + 10^(10^n) + 10^n - 1)"
sorry
end
| null |
putnam_2010_a5 | theorem putnam_2010_a5
(G : Set (Fin 3 β β))
(hGgrp : Group G)
(hGcross : β a b : G, crossProduct a b = (a * b : Fin 3 β β) β¨ crossProduct (a : Fin 3 β β) b = 0)
: β a b : G, crossProduct (a : Fin 3 β β) b = 0 :=
sorry | Let $G$ be a group, with operation $*$. Suppose that \begin{enumerate} \item[(i)] $G$ is a subset of $\mathbb{R}^3$ (but $*$ need not be related to addition of vectors); \item[(ii)] For each $\mathbf{a},\mathbf{b} \in G$, either $\mathbf{a}\times \mathbf{b} = \mathbf{a}*\mathbf{b}$ or $\mathbf{a}\times \mathbf{b} = 0$ (or both), where $\times$ is the usual cross product in $\mathbb{R}^3$. \end{enumerate} Prove that $\mathbf{a} \times \mathbf{b} = 0$ for all $\mathbf{a}, \mathbf{b} \in G$. | null | ['abstract_algebra', 'algebra'] | null | theory putnam_2010_a5 imports Complex_Main
"HOL-Analysis.Cross3"
"HOL-Algebra.Group"
begin
theorem putnam_2010_a5:
fixes S :: "(real^3) monoid"
assumes hgroup : "Group.group S"
and hcross: "\<forall>a \<in> carrier S. \<forall>b \<in> carrier S. cross3 a b = a \<otimes>\<index> b \<or> cross3 a b = 0"
shows "\<forall>a \<in> carrier S. \<forall>b \<in> carrier S. cross3 a b = 0"
sorry
end
| null |
putnam_2010_a6 | theorem putnam_2010_a6
(f : β β β)
(hf : (StrictAntiOn f (Ici 0) β§ ContinuousOn f (Ici 0) β§ Tendsto f atTop (π 0)))
: Β¬β y : β, Tendsto (fun z : β => β« x in Ico 0 z, ((f x) - f (x + 1))/(f x)) atTop (π y) :=
sorry | Let $f:[0,\infty)\to \mathbb{R}$ be a strictly decreasing continuous function
such that $\lim_{x\to\infty} f(x) = 0$. Prove that
$\int_0^\infty \frac{f(x)-f(x+1)}{f(x)}\,dx$ diverges. | null | ['analysis'] | Section putnam_2010_a6.
Require Import Reals Coquelicot.Coquelicot.
Theorem putnam_2010_a6:
forall (f: R -> R) (x y: R), (x >= 0 /\ x < y -> f x > f y /\ continuity_pt f x /\ Lim_seq (fun n => f (INR n)) = 0) ->
~ ex_lim_seq (fun nInc => RInt (fun x => (f x - f (x + 1)) / f x) 0 (INR nInc)).
Proof. Admitted.
End putnam_2010_a6. | theory putnam_2010_a6 imports Complex_Main
"HOL-Analysis.Interval_Integral"
begin
(* uses (real \<Rightarrow> real) instead of ({0..} \<Rightarrow> real) *)
theorem putnam_2010_a6:
fixes f :: "real \<Rightarrow> real"
assumes hf: "strict_antimono_on {0..} f \<and> continuous_on {0..} f \<and> filterlim f (nhds 0) at_top"
shows "\<not>(\<exists>y::real. filterlim (\<lambda>z::real. interval_lebesgue_integral lebesgue 0 z (\<lambda>x::real. ((f x) - f (x + 1))/(f x))) (nhds y) at_top)"
sorry
end
| null |
putnam_2010_b1 | abbrev putnam_2010_b1_solution : Prop := sorry
-- False
theorem putnam_2010_b1 : (β a : β β β, β m : β, m > 0 β β' i : β, (a i)^m = m) β putnam_2010_b1_solution :=
sorry | Is there an infinite sequence of real numbers $a_1, a_2, a_3, \dots$ such that \[ a_1^m + a_2^m + a_3^m + \cdots = m \] for every positive integer $m$? | Show that the solution is no such infinite sequence exists. | ['analysis'] | Section putnam_2010_b1.
Require Import Reals Coquelicot.Coquelicot.
Definition putnam_2010_b1_solution := False.
Theorem putnam_2010_b1:
exists (a: nat -> R), forall (m: nat), gt m 0 ->
Series (fun i => (a i) ^ m) = (INR m) <-> putnam_2010_b1_solution.
Proof. Admitted.
End putnam_2010_b1. | theory putnam_2010_b1 imports Complex_Main
begin
definition putnam_2010_b1_solution :: bool where "putnam_2010_b1_solution \<equiv> undefined"
(* False *)
theorem putnam_2010_b1:
shows "(\<exists>a::nat\<Rightarrow>real. \<forall>m::nat>0. (\<Sum>i::nat. (a i)^m) = m) \<longleftrightarrow> putnam_2010_b1_solution"
sorry
end
| null |
putnam_2010_b2 | abbrev putnam_2010_b2_solution : β := sorry
-- 3
theorem putnam_2010_b2
(ABCintcoords : (Fin 2 β β) β (Fin 2 β β) β (Fin 2 β β) β Prop)
(ABCintdists : (Fin 2 β β) β (Fin 2 β β) β (Fin 2 β β) β Prop)
(ABCall : (Fin 2 β β) β (Fin 2 β β) β (Fin 2 β β) β Prop)
(hABCintcoords : β A B C : Fin 2 β β, ABCintcoords A B C = (β i : Fin 2, A i = round (A i) β§ B i = round (B i) β§ C i = round (C i)))
(hABCintdists : β A B C : Fin 2 β β, ABCintdists A B C = (Euclidean.dist A B = round (Euclidean.dist A B) β§ Euclidean.dist A C = round (Euclidean.dist A C) β§ Euclidean.dist B C = round (Euclidean.dist B C)))
(hABCall : β A B C : Fin 2 β β, ABCall A B C = (Β¬Collinear β {A, B, C} β§ ABCintcoords A B C β§ ABCintdists A B C))
: (β A B C : Fin 2 β β, ABCall A B C β§ Euclidean.dist A B = putnam_2010_b2_solution) β§ (β A B C : Fin 2 β β, ABCall A B C β Euclidean.dist A B β₯ putnam_2010_b2_solution) :=
sorry | Given that $A$, $B$, and $C$ are noncollinear points in the plane with integer coordinates such that the distances $AB$, $AC$, and $BC$ are integers, what is the smallest possible value of $AB$? | Show that the smallest distance is $3$. | ['geometry'] | Section putnam_2010_b2.
Require Import Reals Rgeom ZArith GeoCoq.Main.Tarski_dev.Ch16_coordinates_with_functions.
Context `{T2D:Tarski_2D} `{TE:@Tarski_euclidean Tn TnEQD}.
Open Scope R.
Definition putnam_2010_b2_solution := 3.
Theorem putnam_2010_b2
(pt_to_R : Tpoint -> (R * R))
(int_val : Tpoint -> Prop := fun P => exists (x y : Z), pt_to_R P = (IZR x, IZR y))
(dist : Tpoint -> Tpoint -> R := fun A B => let (a, b) := pt_to_R A in let (c, d) := pt_to_R B in dist_euc a b c d)
(p : Tpoint -> Tpoint -> Tpoint -> Prop :=
fun A B C => ~ Col A B C /\ int_val A /\ int_val B /\ int_val C /\
exists (z: Z), dist A B = IZR z /\ dist A C = IZR z /\ dist B C = IZR z)
(m : Z)
(hm : exists (A B C: Tpoint), p A B C)
(hmlb : forall (A B C: Tpoint), p A B C -> dist A B >= IZR m)
: IZR m = putnam_2010_b2_solution.
Proof. Admitted.
End putnam_2010_b2. | theory putnam_2010_b2 imports Complex_Main "HOL-Analysis.Analysis"
begin
definition putnam_2010_b2_solution::nat where "putnam_2010_b2_solution \<equiv> undefined"
(* 3 *)
theorem putnam_2010_b2:
fixes ABCintcoords::"(real \<times> real) \<Rightarrow> (real \<times> real) \<Rightarrow> (real \<times> real) \<Rightarrow> bool"
and ABCintdists::"(real \<times> real) \<Rightarrow> (real \<times> real) \<Rightarrow> (real \<times> real) \<Rightarrow> bool"
and ABCall::"(real \<times> real) \<Rightarrow> (real \<times> real) \<Rightarrow> (real \<times> real) \<Rightarrow> bool"
defines "ABCintcoords \<equiv> \<lambda>A. \<lambda>B. \<lambda>C. (fst A) \<in> \<int> \<and> (snd A) \<in> \<int> \<and> (fst B) \<in> \<int> \<and> (snd B) \<in> \<int> \<and> (fst C) \<in> \<int> \<and> (snd C) \<in> \<int>"
and "ABCintdists \<equiv> \<lambda>A. \<lambda>B. \<lambda>C. (dist A B) \<in> \<int> \<and> (dist B C) \<in> \<int> \<and> (dist A C) \<in> \<int>"
and "ABCall \<equiv> \<lambda>A. \<lambda>B. \<lambda>C. ABCintcoords A B C \<and> ABCintdists A B C \<and> \<not> collinear {A, B, C}"
shows "putnam_2010_b2_solution = (LEAST abdist. \<exists>A B C. ABCall A B C \<and> abdist = (dist A B))"
sorry
end | null |
putnam_2010_b4 | abbrev putnam_2010_b4_solution : Set (Polynomial β Γ Polynomial β) := sorry
-- {(p, q) : Polynomial β Γ Polynomial β | p.degree β€ 1 β§ q.degree β€ 1 β§ p.coeff 0 * q.coeff 1 - p.coeff 1 * q.coeff 0 = 1}
theorem putnam_2010_b4
(p q : Polynomial β)
: (β x : β, p.eval x * q.eval (x + 1) - p.eval (x + 1) * q.eval x = 1) β (p, q) β putnam_2010_b4_solution :=
sorry | Find all pairs of polynomials $p(x)$ and $q(x)$ with real coefficients for which $p(x)q(x+1)-p(x+1)q(x)=1$. | Show that the pairs $(p,q)$ satisfying the given equation are those of the form $p(x)=ax+b,q(x)=cx+d$ for $a,b,c,d \in \mathbb{R}$ such that $bc-ad=1$. | ['algebra'] | Section putnam_2010_b4.
Require Import Reals Coquelicot.Coquelicot.
Definition putnam_2010_b4_solution (c1 c2: nat -> R) (n m: nat) := exists (a b c d: R), b * c - a * d = 1 /\ n = 1%nat /\ m = 1%nat /\ c1 = (fun x => match x with | O => b | S O => a | _ => 0 end) /\ c2 = (fun x => match x with | O => d | S O => c | _ => 0 end).
Theorem putnam_2010_b4:
let P (c: nat -> R) (n: nat) (x: R) := sum_n (fun i => c i * x ^ i) (n + 1) in
forall (c1 c2: nat -> R) (n m: nat) (x: R),
(P c1 n x) * (P c2 m (x + 1)) - (P c1 n (x + 1)) * (P c2 m x) = 1 <->
putnam_2010_b4_solution c1 c2 n m.
Proof. Admitted.
End putnam_2010_b4. | theory putnam_2010_b4 imports Complex_Main
"HOL-Computational_Algebra.Polynomial"
begin
definition putnam_2010_b4_solution :: "(real poly \<times> real poly) set" where
"putnam_2010_b4_solution \<equiv> undefined"
(* {w :: real poly \<times> real poly. degree (fst w) \<le> 1 \<and> degree (snd w) \<le> 1 \<and> (coeff (fst w) 0) * (coeff (snd w) 1) - (coeff (snd w) 0) * (coeff (fst w) 1) = 1} *)
theorem putnam_2010_b4:
fixes p q :: "real poly"
shows "(p, q) \<in> putnam_2010_b4_solution \<longleftrightarrow> (\<forall> x :: real. (poly p x) * (poly q (x + 1)) - (poly p (x+1)) * (poly q x) = 1)"
sorry
end | null |
putnam_2010_b5 | abbrev putnam_2010_b5_solution : Prop := sorry
-- False
theorem putnam_2010_b5 : (β f : β β β, StrictMono f β§ Differentiable β f β§ (β x : β, deriv f x = f (f x))) β putnam_2010_b5_solution :=
sorry | Is there a strictly increasing function $f: \mathbb{R} \to \mathbb{R}$ such that $f'(x) = f(f(x))$ for all $x$? | Show that the solution is no such function exists. | ['analysis'] | Section putnam_2010_b5.
Require Import Reals Coquelicot.Coquelicot.
Definition putnam_2010_b5_solution := False.
Theorem putnam_2010_b5:
exists (f: R -> R), forall (x y: R), x < y -> f x < f y /\ Derive f x = f (f x) <-> putnam_2010_b5_solution.
Proof. Admitted.
End putnam_2010_b5. | theory putnam_2010_b5 imports Complex_Main
"HOL-Analysis.Derivative"
begin
definition putnam_2010_b5_solution :: bool where "putnam_2010_b5_solution \<equiv> undefined"
(* False *)
theorem putnam_2010_b5:
shows "(\<exists>f::real\<Rightarrow>real. strict_mono_on UNIV f \<and> f differentiable_on UNIV \<and> (\<forall>x::real. deriv f x = f (f x))) \<longleftrightarrow> putnam_2010_b5_solution"
sorry
end
| null |
putnam_2010_b6 | theorem putnam_2010_b6
(n : β)
(npos : n β₯ 1)
(A : Matrix (Fin n) (Fin n) β)
(Apow : β β Matrix (Fin n) (Fin n) β)
(hApow : β k > 0, Apow k = (fun i j : Fin n => (A i j) ^ k))
: (β k β Set.Icc 1 (n + 1), A ^ k = Apow k) β (β k β₯ 1, A ^ k = Apow k) :=
sorry | Let $A$ be an $n \times n$ matrix of real numbers for some $n \geq 1$. For each positive integer $k$, let $A^{[k]}$ be the matrix obtained by raising each entry to the $k$th power. Show that if $A^k=A^{[k]}$ for $k=1,2,\dots,n+1$, then $A^k=A^{[k]}$ for all $k \geq 1$. | null | ['linear_algebra'] | null | theory putnam_2010_b6 imports Complex_Main
"HOL-Analysis.Finite_Cartesian_Product"
begin
theorem putnam_2010_b6:
fixes n :: "nat"
and A :: "real^'n^'n"
and Apow :: "nat \<Rightarrow> real^'n^'n"
and matrixpow :: "real^'n^'n \<Rightarrow> nat \<Rightarrow> real^'n^'n"
assumes hApow : "\<forall> k > 0. Apow k = (\<chi> i j. (A$i$j)^k)"
and npos : "n \<ge> 1"
and cardn : "CARD('n) = n"
and hmatrixpow : "\<forall> M :: real^'n^'n. matrixpow M 0 = mat 1 \<and> (\<forall> k :: nat > 0. matrixpow M k = M ** (matrixpow M (k-1)))"
shows "(\<forall> k :: nat \<in> {1..n+1}. matrixpow A k = Apow k)\<longrightarrow>(\<forall> k \<ge> 1. matrixpow A k = Apow k)"
sorry
end | null |
putnam_2013_a2 | theorem putnam_2013_a2
(S : Set β€ := {n : β€ | n > 0 β§ Β¬β m : β€, m ^ 2 = n})
(P : β€ β List β€ β Prop := fun n : β€ => fun a : List β€ => a.length > 0 β§ n < a[0]! β§
(β m : β€, m ^ 2 = n * a.prod) β§ (β i : Fin (a.length - 1), a[i] < a[i+(1:β)]))
(T : β€ β Set β€ := fun n : β€ => {m : β€ | β a : List β€, P n a β§ a[a.length - 1]! = m})
(f : β€ β β€)
(hf : β n β S, ((β r β T n, f n = r) β§ β r β T n, f n β€ r))
: InjOn f S :=
sorry | Let $S$ be the set of all positive integers that are \emph{not} perfect squares. For $n$ in $S$, consider choices of integers
$a_1, a_2, \dots, a_r$ such that $n < a_1< a_2 < \cdots < a_r$
and $n \cdot a_1 \cdot a_2 \cdots a_r$ is a perfect square, and
let $f(n)$ be the minumum of $a_r$ over all such choices. For example,
$2 \cdot 3 \cdot 6$ is a perfect square, while $2 \cdot 3$, $2 \cdot 4$,
$2 \cdot 5$, $2 \cdot 3 \cdot 4$, $2 \cdot 3 \cdot 5$, $2 \cdot 4 \cdot 5$, and $2 \cdot 3 \cdot 4 \cdot 5$ are not, and so $f(2) = 6$.
Show that the function $f$ from $S$ to the integers is one-to-one. | null | ['number_theory', 'algebra'] | null | theory putnam_2013_a2 imports Complex_Main
begin
theorem putnam_2013_a2:
fixes S :: "nat set"
and P :: "nat \<Rightarrow> (int list) \<Rightarrow> bool"
and T :: "nat \<Rightarrow> (int set)"
and f :: "nat \<Rightarrow> int"
defines "S \<equiv> {n::nat. n > 0 \<and> \<not>(\<exists>m::int. m^2 = n)}"
and "P \<equiv> (\<lambda>(n::nat)(a::int list). length a > 0 \<and> n < a!0 \<and>
(\<exists>m::int. m^2 = n * (\<Prod>i::nat=0..((length a)-1). a!i)) \<and> (\<forall>i::nat\<in>{0..((length a)-2)}. a!i < a!(i+1)))"
and "T \<equiv> (\<lambda>n::nat. {m::int. (\<exists>a::int list. P n a \<and> last a = m)})"
assumes hf: "\<forall>n::nat\<in>S. f n = (LEAST r::int. r \<in> T n)"
shows "inj_on f S"
sorry
end
| null |
putnam_2013_a3 | theorem putnam_2013_a3
(n : β)
(a : Set.Icc 0 n β β)
(x : β)
(hx : 0 < x β§ x < 1)
(hsum: (β i : Set.Icc 0 n, a i / (1 - x ^ (i.1 + 1))) = 0)
: β y : β, 0 < y β§ y < 1 β§ (β i : Set.Icc 0 n, a i * y ^ i.1) = 0 :=
sorry | Suppose that the real numbers \( a_0, a_1, \ldots, a_n \) and \( x \), with \( 0 < x < 1 \), satisfy $ \frac{a_0}{1-x} + \frac{a_1}{(1-x)^2} + \cdots + \frac{a_n}{(1-x)^{n+1}} = 0. $ Prove that there exists a real number \( y \) with \( 0 < y < 1 \) such that $ a_0 + a_1y + \cdots + a_ny^n = 0. $. | null | ['number_theory'] | Section putnam_2013_a3.
Require Import Reals Coquelicot.Coquelicot.
Theorem putnam_2013_a3:
forall (a: nat -> R) (x: R) (n: nat), 0 < x < 1 /\ sum_n (fun i => a i / (1 - x ^ (i + 1))) (n + 1) = 0 ->
exists (y: R), 0 < y < 1 /\ sum_n (fun i => a i * y ^ i) (n + 1) = 0.
Proof. Admitted.
End putnam_2013_a3. | theory putnam_2013_a3 imports Complex_Main
begin
(* uses (nat \<Rightarrow> real) instead of ({0..n} \<Rightarrow> real) *)
theorem putnam_2013_a3:
fixes n :: nat
and a :: "nat \<Rightarrow> real"
and x :: real
assumes hx: "0 < x \<and> x < 1"
and hsum: "(\<Sum>i::nat=0..n. a i / (1 - x^(i+1))) = 0"
shows "\<exists>y::real. 0 < y \<and> y < 1 \<and> (\<Sum>i::nat=0..n. a i * y^i) = 0"
sorry
end
| null |
putnam_2013_a4 | theorem putnam_2013_a4
(n : β)
(circle : Fin n β Fin 2)
(Z N : Fin n Γ Fin (n + 1) β β€)
(k : β)
(ws : Fin k β Fin n Γ Fin (n + 1))
(Zsum Nsum : β€)
(npos : n β₯ 1)
(hZ : β w : Fin n Γ Fin (n + 1), Z w = β l : {x : Fin n | x < w.2}, if (circle (w.1 + l) = 0) then 1 else 0)
(hN : β w : Fin n Γ Fin (n + 1), N w = β l : {x : Fin n | x < w.2}, if (circle (w.1 + l) = 1) then 1 else 0)
(Zle1 : β w w' : Fin n Γ Fin (n + 1), w.2 = w'.2 β |(Z w : β€) - Z w'| β€ 1)
(kpos : k β₯ 1)
(hZsum : Zsum = ((1 : β) / k) * β j : Fin k, Z (ws j))
(hNsum : Nsum = ((1 : β) / k) * β j : Fin k, N (ws j))
: β w : Fin n Γ Fin (n + 1), Z w = Zsum β§ N w = Nsum :=
sorry | A finite collection of digits $0$ and $1$ is written around a circle. An \emph{arc} of length $L \geq 0$ consists of $L$ consecutive digits around the circle. For each arc $w$, let $Z(w)$ and $N(w)$ denote the number of $0$'s in $w$ and the number of $1$'s in $w$, respectively. Assume that $|Z(w)-Z(w')| \leq 1$ for any two arcs $w,w'$ of the same length. Suppose that some arcs $w_1,\dots,w_k$ have the property that $Z=\frac{1}{k}\sum_{j=1}^k Z(w_j)$ and $N=\frac{1}{k}\sum_{j=1}^k N(w_j)$ are both integers. Prove that there exists an arc $w$ with $Z(w)=Z$ and $N(w)=N$. | null | ['algebra'] | null | theory putnam_2013_a4 imports Complex_Main
begin
theorem putnam_2013_a4:
fixes n k :: "nat"
and Zsum Nsum :: "real"
and circle :: "nat \<Rightarrow> nat"
and Z N :: "(nat \<times> nat) \<Rightarrow> nat"
and ws :: "nat \<Rightarrow> (nat \<times> nat)"
defines "Zsum \<equiv> (1 / real_of_nat k) * (\<Sum> j\<in>{0..(n-1)}. Z (ws j))"
and "Nsum \<equiv> (1 / real_of_nat k) * (\<Sum> j\<in>{0..n-1}. N (ws j))"
assumes npos : "n \<ge> 1"
and kpos : "k \<ge> 1"
and hcircle : "\<forall> i :: nat. circle i \<in> {0 :: nat..1}"
and hZ : "\<forall> w \<in> {0..n-1} \<times> {0..n}. Z w = (\<Sum> l :: nat \<in> {0..snd w - 1}. if circle ((fst w + l) mod n) = 0 then 1 else 0)"
and hN : "\<forall> w \<in> {0..n-1} \<times> {0..n}. Z w = (\<Sum> l :: nat \<in> {0..snd w - 1}. if circle ((fst w + l) mod n) = 1 then 1 else 0)"
and Zle1 : "\<forall> w \<in> {0..n-1} \<times> {0..n}. \<forall> w' \<in> {0..n-1} \<times> {0..n}. (snd w) = (snd w') \<longrightarrow> \<bar>int (Z w) - int (Z w')\<bar> \<le> 1"
and hNZsum : "round Nsum = Nsum \<and> round Zsum = Zsum"
shows "\<exists> w :: nat \<times> nat. (fst w \<le> n-1 \<and> snd w \<le> n) \<and> ((real (Z w) = Zsum) \<and> (real (N w) = Nsum))"
sorry
end | null |
putnam_2013_a5 | theorem putnam_2013_a5
(m : β)
(area2 : (Fin 2 β β) β (Fin 2 β β) β (Fin 2 β β) β β)
(area3 : (Fin 3 β β) β (Fin 3 β β) β (Fin 3 β β) β β)
(areadef2 : (Fin m β Fin m β Fin m β β) β Prop)
(areadef3 : (Fin m β Fin m β Fin m β β) β Prop)
(mge3 : m β₯ 3)
(harea2 : β a b c : Fin 2 β β, area2 a b c = (MeasureTheory.volume (convexHull β {a, b, c})).toReal)
(harea3 : β a b c : Fin 3 β β, area3 a b c = (MeasureTheory.volume (convexHull β {a, b, c})).toReal)
(hareadef2 : β a : Fin m β Fin m β Fin m β β, areadef2 a = β A : Fin m β (Fin 2 β β), (β i : Fin m, β j : Fin m, β k : Fin m, if (i < j β§ j < k) then (a i j k * area2 (A i) (A j) (A k)) else 0) β₯ 0)
(hareadef3 : β a : Fin m β Fin m β Fin m β β, areadef3 a = β A : Fin m β (Fin 3 β β), (β i : Fin m, β j : Fin m, β k : Fin m, if (i < j β§ j < k) then (a i j k * area3 (A i) (A j) (A k)) else 0) β₯ 0)
: β a : Fin m β Fin m β Fin m β β, areadef2 a β areadef3 a :=
sorry | For $m \geq 3$, a list of $\binom{m}{3}$ real numbers $a_{ijk}$ ($1 \leq i<j<k \leq m$) is said to be \emph{area definite} for $\mathbb{R}^n$ if the inequality $\sum_{1 \leq i<j<k \leq m} a_{ijk} \cdot \text{Area}(\Delta A_iA_jA_k) \geq 0$ holds for every choice of $m$ points $A_1,\dots,A_m$ in $\mathbb{R}^n$. For example, the list of four numbers $a_{123}=a_{124}=a_{134}=1$, $a_{234}=-1$ is area definite for $\mathbb{R}^2$. Prove that if a list of $\binom{m}{3}$ numbers is area definite for $\mathbb{R}^2$, then it is area definite for $\mathbb{R}^3$. | null | ['geometry', 'linear_algebra'] | null | theory putnam_2013_a5 imports Complex_Main
"HOL-Analysis.Finite_Cartesian_Product"
"HOL-Analysis.Lebesgue_Measure"
begin
(* uses (nat \<Rightarrow> nat \<Rightarrow> nat \<Rightarrow> real), (nat \<Rightarrow> (real^2)), and (nat \<Rightarrow> (real^3)) instead of limiting inputs to (Fin m) and ensuring inputs are strictly increasing *)
theorem putnam_2013_a5:
fixes m :: nat
and area2 :: "(real^2) \<Rightarrow> (real^2) \<Rightarrow> (real^2) \<Rightarrow> real"
and area3 :: "(real^3) \<Rightarrow> (real^3) \<Rightarrow> (real^3) \<Rightarrow> real"
and areadef2 :: "(nat \<Rightarrow> nat \<Rightarrow> nat \<Rightarrow> real) \<Rightarrow> bool"
and areadef3 :: "(nat \<Rightarrow> nat \<Rightarrow> nat \<Rightarrow> real) \<Rightarrow> bool"
assumes mge3: "m \<ge> 3"
and harea2: "\<forall>a b c::real^2. area2 a b c = emeasure lebesgue (convex hull {a, b, c})"
and harea3: "\<forall>a b c::real^3. area3 a b c = emeasure lebesgue (convex hull {a, b, c})"
and hareadef2: "\<forall>a::nat\<Rightarrow>nat\<Rightarrow>nat\<Rightarrow>real. areadef2 a = (\<forall>A::nat\<Rightarrow>(real^2). (\<Sum>i::nat\<in>{0..(m-1)}. \<Sum>j::nat\<in>{i<..(m-1)}. \<Sum>k::nat\<in>{j<..(m-1)}. (a i j k * area2 (A i) (A j) (A k))) \<ge> 0)"
and hareadef3: "\<forall>a::nat\<Rightarrow>nat\<Rightarrow>nat\<Rightarrow>real. areadef3 a = (\<forall>A::nat\<Rightarrow>(real^3). (\<Sum>i::nat\<in>{0..(m-1)}. \<Sum>j::nat\<in>{i<..(m-1)}. \<Sum>k::nat\<in>{j<..(m-1)}. (a i j k * area3 (A i) (A j) (A k))) \<ge> 0)"
shows "\<forall>a::nat\<Rightarrow>nat\<Rightarrow>nat\<Rightarrow>real. (areadef2 a \<longrightarrow> areadef3 a)"
sorry
end
| null |
putnam_2013_a6 | theorem putnam_2013_a6
(w : β€ β β€ β β€)
(A : Finset (β€ Γ β€) β β€)
(hwn1 : w (-2) (-2) = -1 β§ w 2 (-2) = -1 β§ w (-2) 2 = -1 β§ w 2 2 = -1)
(hwn2 : w (-1) (-2) = -2 β§ w 1 (-2) = -2 β§ w (-2) (-1) = -2 β§ w 2 (-1) = -2 β§ w (-2) 1 = -2 β§ w 2 1 = -2 β§ w (-1) 2 = -2 β§ w 1 2 = -2)
(hw2 : w 0 (-2) = 2 β§ w (-2) 0 = 2 β§ w 2 0 = 2 β§ w 0 2 = 2)
(hw4 : w (-1) (-1) = 4 β§ w 1 (-1) = 4 β§ w (-1) 1 = 4 β§ w 1 1 = 4)
(hwn4 : w 0 (-1) = -4 β§ w (-1) 0 = -4 β§ w 1 0 = -4 β§ w 0 1 = -4)
(hw12 : w 0 0 = 12)
(hw0 : β a b : β€, (|a| > 2 β¨ |b| > 2) β w a b = 0)
(hA : β S : Finset (β€ Γ β€), A S = β s in S, β s' in S, w (s - s').1 (s - s').2)
: β S : Finset (β€ Γ β€), Nonempty S β A S > 0 :=
sorry | Define a function $w:\mathbb{Z} \times \mathbb{Z} \to \mathbb{Z}$ as follows. For $|a|,|b| \leq 2$, let $w(a,b)$ be as in the table shown; otherwise, let $w(a,b)=0$.
\begin{center}
\begin{tabular}{|cc|r|r|r|r|r|}
\hline
\multicolumn{2}{|c|}{\multirow{2}{*}{$w(a,b)$}} & \multicolumn{5}{|c|}{$b$} \\
& & -2 & -1 & 0 & 1 & 2 \\
\hline
& -2 & -1 & -2 & 2 & -2 & -1 \\
& -1 & -2 & 4 & -4 & 4 & -2 \\
$a$ & 0 & 2 & -4 & 12 & -4 & 2 \\
& 1 & -2 & 4 & -4 & 4 & -2 \\
& 2 & -1 & -2 & 2 & -2 & -1 \\
\hline
\end{tabular}
\end{center}
For every finite subset $S$ of $\mathbb{Z} \times \mathbb{Z}$, define $A(S)=\sum_{(\mathbf{s},\mathbf{s}') \in S \times S} w(\mathbf{s}-\mathbf{s}')$. Prove that if $S$ is any finite nonempty subset of $\mathbb{Z} \times \mathbb{Z}$, then $A(S)>0$. (For example, if $S=\{(0,1),(0,2),(2,0),(3,1)\}$, then the terms in $A(S)$ are $12,12,12,12,4,4,0,0,0,0,-1,-1,-2,-2,-4,-4$.) | null | ['algebra'] | Section putnam_2013_a6.
Require Import List ZArith.
Open Scope Z.
Theorem putnam_2013_a6:
let w (v: (Z*Z)) : Z :=
match v with
| (-2, -2) => -1 | (-2, -1) => -2 | (-2, 0) => 2 | (-2, 1) => -2 | (-2, 2) => -1
| (-1, -2) => -2 | (-1, -1) => 4 | (-1, 0) => -4 | (-1, 1) => 4 | (-1, 2) => -2
| ( 0, -2) => 0 | ( 0, -1) => -4 | ( 0, 0) => 12 | ( 0, 1) => -4 | ( 0, 2) => 2
| ( 1, -2) => 1 | ( 1, -1) => 4 | ( 1, 0) => -4 | ( 1, 1) => 4 | ( 1, 2) => -2
| ( 2, -2) => 2 | ( 2, -1) => -2 | ( 2, 0) => 2 | ( 2, 1) => -2 | ( 2, 2) => -1
| _ => 0
end in
let A (l : list (Z * Z * (Z * Z))) : Z :=
fst (fold_left (fun acc pq =>
let p := (fst (fst pq), snd (fst pq)) in
let q := (fst (snd pq), snd (snd pq)) in
(Z.add (fst acc) (w (fst p - fst q, snd p - snd q)), Z.add (snd acc) (w (fst p - fst q, snd p - snd q)))) l (0, 0))
in
forall (l : list (Z * Z * (Z * Z))), length l <> Z.to_nat 0 -> A l > 0.
Proof. Admitted.
End putnam_2013_a6. | theory putnam_2013_a6 imports Complex_Main
begin
theorem putnam_2013_a6:
fixes w :: "int \<Rightarrow> int \<Rightarrow> int"
and A :: "((int \<times> int) set) \<Rightarrow> int"
assumes hwn1: "w (-2) (-2) = -1 \<and> w 2 (-2) = -1 \<and> w (-2) 2 = -1 \<and> w 2 2 = -1"
and hwn2: "w (-1) (-2) = -2 \<and> w 1 (-2) = -2 \<and> w (-2) (-1) = -2 \<and> w 2 (-1) = -2 \<and> w (-2) 1 = -2 \<and> w 2 1 = -2 \<and> w (-1) 2 = -2 \<and> w 1 2 = -2"
and hw2: "w 0 (-2) = 2 \<and> w (-2) 0 = 2 \<and> w 2 0 = 2 \<and> w 0 2 = 2"
and hw4: "w (-1) (-1) = 4 \<and> w 1 (-1) = 4 \<and> w (-1) 1 = 4 \<and> w 1 1 = 4"
and hwn4: "w 0 (-1) = -4 \<and> w (-1) 0 = -4 \<and> w 1 0 = -4 \<and> w 0 1 = -4"
and hw12: "w 0 0 = 12"
and hw0: "\<forall>a b::int. (\<bar>a\<bar> > 2 \<or> \<bar>b\<bar> > 2) \<longrightarrow> w a b = 0"
and hA: "\<forall>S::(int\<times>int) set. finite S \<longrightarrow> A S = (\<Sum>s\<in>S. \<Sum>s'\<in>S. w (fst s-fst s') (snd s-snd s'))"
shows "\<forall>S::(int\<times>int) set. (finite S \<and> S \<noteq> {}) \<longrightarrow> A S > 0"
sorry
end
| null |
putnam_2013_b1 | abbrev putnam_2013_b1_solution : β€ := sorry
-- -1
theorem putnam_2013_b1
(c : β β β€)
(hc1 : c 1 = 1)
(hceven : β n : β, n > 0 β c (2 * n) = c n)
(hcodd : β n : β, n > 0 β c (2 * n + 1) = (-1) ^ n * c n)
: (β n : Set.Icc 1 2013, c n * c (n.1 + 2)) = putnam_2013_b1_solution :=
sorry | For positive integers $n$, let the numbers $c(n)$ be determined by the rules $c(1)=1$, $c(2n)=c(n)$, and $c(2n+1)=(-1)^nc(n)$. Find the value of $\sum_{n=1}^{2013} c(n)c(n+2)$. | Show that the desired sum is $-1$. | ['algebra'] | Section putnam_2013_b1.
Require Import ZArith Nat List Lia Ensembles Finite_sets Reals Program Coquelicot.Hierarchy.
Open Scope Z.
Program Fixpoint Aa (n : nat) {measure n} : Z :=
match n with
| O => 0
| S O => 1
| S (S m) => if even m then Aa (div2 (m+2)) else if even (div2 (m+2)) then Aa (div2 (m+2)) else (-1) * Aa (div2 (m+2))
end.
Next Obligation. Proof. destruct m. simpl; auto. induction m. simpl; auto. simpl. Admitted.
Theorem putnam_2013_b1:
sum_n (fun n => (Aa n)*(Aa (n+2))) 2013 = 1.
Proof. Admitted.
End putnam_2013_b1. | theory putnam_2013_b1 imports Complex_Main
begin
definition putnam_2013_b1_solution :: int where "putnam_2013_b1_solution \<equiv> undefined"
(* -1 *)
theorem putnam_2013_b1:
fixes c :: "nat \<Rightarrow> int"
assumes hc1: "c 1 = 1"
and hceven: "\<forall>n::nat. n > 0 \<longrightarrow> c (2*n) = c n"
and hcodd: "\<forall>n::nat. n > 0 \<longrightarrow> c (2*n+1) = (-1)^n * c n"
shows "(\<Sum>n::nat=1..2013. c n * c (n+2)) = putnam_2013_b1_solution"
sorry
end
| null |
putnam_2013_b2 | abbrev putnam_2013_b2_solution : β := sorry
-- 3
theorem putnam_2013_b2
(CN : β β Set (β β β) := fun N : β => {f : β β β | (β x : β, f x β₯ 0) β§
β a : List β, a.length = N + 1 β§ (β n : Fin (N + 1), 3 β£ (n : β) β a[n]! = 0) β§
β x : β, f x = 1 + β n in Finset.Icc 1 N, a[(n : β)]! * Real.cos (2*Real.pi*n*x)})
(C : Set (β β β) := β N β Ici 1, CN N)
: (β f β C, f 0 β€ putnam_2013_b2_solution) β§ β f β C, f 0 = putnam_2013_b2_solution :=
sorry | Let $C = \bigcup_{N=1}^\infty C_N$, where $C_N$ denotes the set of those `cosine polynomials' of the form
\[
f(x) = 1 + \sum_{n=1}^N a_n \cos(2 \pi n x)
\]
for which:
\begin{enumerate}
\item[(i)]
$f(x) \geq 0$ for all real $x$, and
\item[(ii)]
$a_n = 0$ whenever $n$ is a multiple of $3$.
\end{enumerate}
Determine the maximum value of $f(0)$ as $f$ ranges through $C$, and
prove that this maximum is attained. | The maximum value of $f(0)$ is $3$. | ['algebra'] | Section putnam_2013_b2.
Require Import Ensembles Finite_sets Reals Coquelicot.Coquelicot.
Definition putnam_2013_b2_solution := 3.
Theorem putnam_2013_b2:
forall (E: Ensemble (R -> R)) (f: R -> R),
(E f <->
(forall (x: R), exists (a: nat -> R) (N: nat), f x = 1 + sum_n (fun n => a n * cos (2 * PI * INR n * x)) N /\ f x >= 0 /\
forall (n: nat), n mod 3 = 0%nat -> a n = 0)) ->
exists (maxval: R), E f -> f 0 <= maxval /\ exists (f: R -> R), E f -> f 0 = maxval <->
maxval = putnam_2013_b2_solution.
Proof. Admitted.
End putnam_2013_b2. | theory putnam_2013_b2 imports Complex_Main
begin
definition putnam_2013_b2_solution :: real where "putnam_2013_b2_solution \<equiv> undefined"
(* 3 *)
theorem putnam_2013_b2:
fixes CN :: "nat \<Rightarrow> ((real \<Rightarrow> real) set)"
and C :: "(real \<Rightarrow> real) set"
defines "CN \<equiv> (\<lambda>N::nat. {f::real\<Rightarrow>real. (\<forall>x::real. f x \<ge> 0) \<and>
(\<exists>a::real list. length a = N+1 \<and> (\<forall>n::nat\<in>{0..N}. 3 dvd n \<longrightarrow> a!n = 0) \<and>
(\<forall>x::real. f x = 1 + (\<Sum>n::nat=1..N. a!n * cos (2*pi*n*x))))})"
and "C \<equiv> \<Union>N::nat\<in>{1..}. CN N"
shows "(GREATEST fzero::real. (\<exists>f\<in>C. fzero = f 0)) = putnam_2013_b2_solution"
sorry
end
| null |
putnam_2013_b3 | abbrev putnam_2013_b3_solution : Prop := sorry
-- True
theorem putnam_2013_b3
: (β (n : β) (P : Finset (Finset (Fin n))) (f : Finset (Fin n) β β),
P β β₯ β (β S β P, β S' β P, S βͺ S' β P β§ S β© S' β P) β
(β S β P, S β β₯ β β T β P, T β S β§ Finset.card T + 1 = Finset.card S) β
f β₯ = 0 β (β S β P, β S' β P, f (S βͺ S') = f S + f S' - f (S β© S')) β
β r : Fin n β β, β S β P, f S = β i in S, r i)
β putnam_2013_b3_solution :=
sorry | Let $\mathcal{P}$ be a nonempty collection of subsets of $\{1,\dots, n\}$ such that: \begin{enumerate} \item[(i)] if $S, S' \in \mathcal{P}$, then $S \cup S' \in \mathcal{P}$ and $S \cap S' \in \mathcal{P}$, and \item[(ii)] if $S \in \mathcal{P}$ and $S \neq \emptyset$, then there is a subset $T \subset S$ such that $T \in \mathcal{P}$ and $T$ contains exactly one fewer element than $S$. \end{enumerate} Suppose that $f: \mathcal{P} \to \mathbb{R}$ is a function such that $f(\emptyset) = 0$ and \[f(S \cup S') = f(S) + f(S') - f(S \cap S') \mbox{ for all $S,S' \in \mathcal{P}$.} \] Must there exist real numbers $f_1,\dots,f_n$ such that\[f(S) = \sum_{i \in S} f_i\] \n for every $S \in \mathcal{P}$? | null | ['set_theory'] | null | theory putnam_2013_b3 imports
Complex_Main
begin
(* This formalization uses "nat set" and "nat \<Rightarrow> real" instead of finite types ("Fin n" in Lean) *)
definition putnam_2013_b3_solution :: bool where "putnam_2013_b3_solution \<equiv> undefined"
(* True *)
theorem putnam_2013_b3:
shows "(\<forall> (n :: nat) (P :: nat set set) (f :: nat set \<Rightarrow> real).
P \<noteq> {} \<longrightarrow> (\<forall> S \<in> P. S \<subseteq> {1..n}) \<longrightarrow> (\<forall> S \<in> P. \<forall> S' \<in> P. S \<union> S' \<in> P \<and> S \<inter> S' \<in> P) \<longrightarrow>
(\<forall> S \<in> P. S \<noteq> {} \<longrightarrow> (\<exists> T \<in> P. T \<subset> S \<and> card T + 1 = card S)) \<longrightarrow>
f {} = 0 \<longrightarrow> (\<forall> S \<in> P. \<forall> S' \<in> P. f (S \<union> S') = f S + f S' - f (S \<inter> S')) \<longrightarrow>
(\<exists> r :: nat \<Rightarrow> real. \<forall> S \<in> P. f S = (\<Sum> i \<in> S. r i)))
\<longleftrightarrow> putnam_2013_b3_solution"
sorry
end | null |
putnam_2013_b4 | theorem putnam_2013_b4
(ΞΌ : (Set.Icc (0 : β) 1 β β) β β)
(Var : (Set.Icc (0 : β) 1 β β) β β)
(M : (Set.Icc (0 : β) 1 β β) β β)
(hΞΌ : β f : Set.Icc (0 : β) 1 β β, ΞΌ f = β« x : Set.Icc (0 : β) 1, f x)
(hVar : β f : Set.Icc (0 : β) 1 β β, Var f = β« x : Set.Icc (0 : β) 1, (f x - ΞΌ f) ^ 2)
(hM : β f : Set.Icc (0 : β) 1 β β, (β x : Set.Icc (0 : β) 1, |f x| = M f) β§ (β x : Set.Icc (0 : β) 1, |f x| β€ M f))
: β f g : Set.Icc (0 : β) 1 β β, (Continuous f β§ Continuous g) β Var (f * g) β€ 2 * Var f * (M g) ^ 2 + 2 * Var g * (M f) ^ 2 :=
sorry | For any continuous real-valued function $f$ defined on the interval $[0,1]$, let $\mu(f)=\int_0^1 f(x)\,dx,\text{Var}(f)=\int_0^1 (f(x)-\mu(f))^2\,dx,M(f)=\max_{0 \leq x \leq 1} |f(x)|$. Show that if $f$ and $g$ are continuous real-valued functions defined on the interval $[0,1]$, then $\text{Var}(fg) \leq 2\text{Var}(f)M(g)^2+2\text{Var}(g)M(f)^2$. | null | ['analysis'] | Section putnam_2013_b4.
Require Import Reals. From Coquelicot Require Import Coquelicot Continuity RInt.
Open Scope R.
Definition mu (f: R -> R) := RInt f 0 1.
Variable f: R -> R.
Check mu f.
Theorem putnam_2013_b4:
let fMult (f g: R -> R) := fun x => f x * g x in
let mu (f: R -> R) := RInt f 0 1 in
let var (f: R -> R) := fun x => f x - (mu f) in
let Var (f: R -> R) := RInt (fMult (var f) (var f)) 0 1 in
forall (f g: R -> R) (x: R), 0 <= x <= 1 -> continuity_pt f x /\ continuity_pt g x ->
exists (Mf: R), forall (x: R), 0 <= x <= 1 -> Mf = Rmax Mf (Rabs (f x)) /\
exists (Mg: R), forall (x: R), 0 <= x <= 1 -> Mg = Rmax Mg (Rabs (g x)) ->
Var (fMult f g) <= 2 * Var f * Mg*Mg + 2 * Var g * Mf * Mf.
Proof. Admitted.
End putnam_2013_b4. | theory putnam_2013_b4 imports Complex_Main
"HOL-Analysis.Set_Integral"
"HOL-Analysis.Lebesgue_Measure"
begin
(* uses (real \<Rightarrow> real) instead of ({0..1} \<Rightarrow> real) *)
theorem putnam_2013_b4:
fixes \<mu> :: "(real \<Rightarrow> real) \<Rightarrow> real"
and Var :: "(real \<Rightarrow> real) \<Rightarrow> real"
and M :: "(real \<Rightarrow> real) \<Rightarrow> real"
assumes h\<mu>: "\<forall>f::real\<Rightarrow>real. \<mu> f = set_lebesgue_integral lebesgue {0<..<1} f"
and hVar: "\<forall>f::real\<Rightarrow>real. Var f = set_lebesgue_integral lebesgue {0<..<1} (\<lambda>x::real. (f x - \<mu> f)^2)"
and hM: "\<forall>f::real\<Rightarrow>real. M f = (GREATEST y::real. (\<exists>x::real\<in>{0..1}. y = \<bar>f x\<bar>))"
shows "\<forall>f g::real\<Rightarrow>real. (continuous_on {0..1} f \<and> continuous_on {0..1} g) \<longrightarrow> (Var (\<lambda>x::real. f x*g x) \<le> 2*Var f*(M g)^2 + 2*Var g*(M f)^2)"
sorry
end
| null |
putnam_2013_b5 | theorem putnam_2013_b5
(n : β)
(k : Set.Icc 1 n)
(fiter : (Set.Icc 1 n β Set.Icc 1 n) β Prop)
(npos : n β₯ 1)
(hfiter : β f : Set.Icc 1 n β Set.Icc 1 n, fiter f = β x : Set.Icc 1 n, β j : β, f^[j] x β€ k)
: {f : Set.Icc 1 n β Set.Icc 1 n | fiter f}.encard = k * n ^ (n - 1) := sorry | Let $X=\{1,2,\dots,n\}$, and let $k \in X$. Show that there are exactly $k \cdot n^{n-1}$ functions $f:X \to X$ such that for every $x \in X$ there is a $j \geq 0$ such that $f^{(j)}(x) \leq k$. [Here $f^{(j)}$ denotes the $j$\textsuperscript{th} iterate of $f$, so that $f^{(0)}(x)=x$ and $f^{(j+1)}(x)=f(f^{(j)}(x))$.] | null | ['algebra'] | Section putnam_2013_b5.
Require Import Basics Reals Ensembles Finite_sets. From mathcomp Require Import fintype.
Theorem putnam_2013_b5:
forall (n: nat),
let fix compose_n (f : 'I_n -> 'I_n) (n : nat) :=
match n with
| O => fun x => x
| S n' => compose f (compose_n f n')
end in
forall (E: Ensemble ('I_n -> 'I_n)),
forall (f: 'I_n -> 'I_n), E f ->
forall (x: 'I_n), exists (j: nat) (k: 'I_n), (compose_n f j) x <= k ->
cardinal ('I_n -> 'I_n) E (k * n^(n-1)).
Proof. Admitted.
End putnam_2013_b5. | theory putnam_2013_b5 imports Complex_Main
begin
(* uses (nat \<Rightarrow> nat) instead of ({1..n} \<Rightarrow> {1..n}) *)
theorem putnam_2013_b5:
fixes n :: nat
and k :: nat
and fiter :: "(nat \<Rightarrow> nat) \<Rightarrow> bool"
assumes npos: "n \<ge> 1"
and kinX: "k \<in> {1..n}"
and hfiter: "\<forall>f::nat\<Rightarrow>nat. fiter f = (f ` {1..n} \<subseteq> {1..n} \<and> (\<forall>x::nat\<in>{1..n}. \<exists>j::nat. (f^^j) x \<le> k))"
shows "card {f::nat\<Rightarrow>nat. fiter f} = k * n^(n-1)"
sorry
end
| null |