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