name,lean4_statement,informal_statement,informal_solution,tags,coq_statement,isabelle_statement,lean4_proof putnam_1981_a1,"abbrev putnam_1981_a1_solution : ℝ := sorry -- 1/8 theorem putnam_1981_a1 (P : ℕ → ℕ → Prop := fun n k : ℕ => 5^k ∣ ∏ m in Finset.Icc 1 n, (m^m : ℤ)) (E : ℕ → ℕ) (hE : ∀ n ∈ Ici 1, P n (E n) ∧ ∀ k : ℕ, P n k → k ≤ E n) : Tendsto (fun n : ℕ => ((E n) : ℝ)/n^2) atTop (𝓝 putnam_1981_a1_solution) := sorry",Let $E(n)$ be the greatest integer $k$ such that $5^k$ divides $1^1 2^2 3^3 \cdots n^n$. Find $\lim_{n \rightarrow \infty} \frac{E(n)}{n^2}$.,The limit equals $\frac{1}{8}$.,"['analysis', 'number_theory']","Section putnam_1981_a1. Require Import Nat Reals Coquelicot.Coquelicot. From mathcomp Require Import div. Definition putnam_1981_a1_solution := 1 / 8. Theorem putnam_1981_a1 (prod_n : (nat -> nat) -> nat -> nat := fix prod_n (m: nat -> nat) (n : nat) := match n with | O => m 0%nat | S n' => mul (m n') (prod_n m n') end) (P : nat -> nat -> Prop := fun n k => 5 ^ k %| prod_n (fun m => Nat.pow m m) (S n) = true) (f : nat -> nat) (hf : forall (n: nat), gt n 1 -> P n (f n) /\ forall (k: nat), P n k -> le k (f n)) : Lim_seq (fun n => INR (f n) / INR n ^ 2) = putnam_1981_a1_solution. Proof. Admitted. End putnam_1981_a1.","theory putnam_1981_a1 imports Complex_Main begin definition putnam_1981_a1_solution::real where ""putnam_1981_a1_solution \ undefined"" (* 1/8 *) theorem putnam_1981_a1: fixes P::""nat\nat\bool"" and E::""nat\nat"" defines ""P \ \n. \k. 5^k dvd (\m=1..n. m^m)"" and ""E \ \n. (GREATEST k. P n k)"" shows ""(\n. (E n) / n^2) \ putnam_1981_a1_solution"" sorry end", putnam_1981_a3,"abbrev putnam_1981_a3_solution : Prop := sorry -- False theorem putnam_1981_a3 (f : ℝ → ℝ := fun t : ℝ => Real.exp (-t) * ∫ y in (Ico 0 t), ∫ x in (Ico 0 t), (Real.exp x - Real.exp y) / (x - y)) : (∃ L : ℝ, Tendsto f atTop (𝓝 L)) ↔ putnam_1981_a3_solution := sorry",Does the limit $$lim_{t \rightarrow \infty}e^{-t}\int_{0}^{t}\int_{0}^{t}\frac{e^x - e^y}{x - y} dx dy$$exist?,The limit does not exist.,['analysis'],"Section putnam_1981_a3. Require Import Reals Coquelicot.Coquelicot. Definition putnam_1981_a3_solution := 14. Theorem putnam_1981_a3: Lim_seq (fun k => exp (-1*INR k) * (RInt (fun x => (RInt (fun y => (exp x - exp y) / (x - y)) 0 (INR k))) 0 (INR k))) = putnam_1981_a3_solution. Proof. Admitted. End putnam_1981_a3.","theory putnam_1981_a3 imports Complex_Main ""HOL-Analysis.Interval_Integral"" begin definition putnam_1981_a3_solution::bool where ""putnam_1981_a3_solution \ undefined"" (* False *) theorem putnam_1981_a3: fixes f::""real\real"" defines ""f \ \t::real. exp (-t) * interval_lebesgue_integral lebesgue 0 t (\y::real. interval_lebesgue_integral lebesgue 0 t (\x::real. (exp x - exp y) / (x - y)))"" shows ""(\L::real. (f \ L)) \ putnam_1981_a3_solution"" sorry end", putnam_1981_a5,"abbrev putnam_1981_a5_solution : Prop := sorry -- True theorem putnam_1981_a5 (Q : Polynomial ℝ → Polynomial ℝ := fun P : Polynomial ℝ => (X^2 + 1)*P*(derivative P) + X*(P^2 + (derivative P)^2)) (n : Polynomial ℝ → ℝ := fun P : Polynomial ℝ => {x ∈ Ioi 1 | P.eval x = 0}.ncard) : (∀ P : Polynomial ℝ, {x : ℝ | (Q P).eval x = 0}.ncard ≥ 2*(n P) - 1) ↔ putnam_1981_a5_solution := sorry","Let $P(x)$ be a polynomial with real coefficients; let $$Q(x) = (x^2 + 1)P(x)P'(x) + x((P(x))^2 + (P'(x))^2).$$ Given that $P$ has $n$ distinct real roots all greater than $1$, prove or disprove that $Q$ must have at least $2n - 1$ distinct real roots.",$Q(x)$ must have at least $2n - 1$ distinct real roots.,['algebra'],,"theory putnam_1981_a5 imports Complex_Main ""HOL-Computational_Algebra.Polynomial"" begin definition putnam_1981_a5_solution::bool where ""putnam_1981_a5_solution \ undefined"" (* True *) theorem putnam_1981_a5: fixes Q::""(real poly) \ (real poly)"" and n::""(real poly) \ real"" defines ""Q \ \P. [: 1, 0, 1 :] * P * (pderiv P) + [: 0, 1 :] * (P^2 + (pderiv P)^2)"" and ""n \ \P. card {x::real. x > 1 \ (poly P x) = 0}"" shows ""(\P. card {x::real. poly (Q P) x = 0} \ 2 * (n P) - 1) \ putnam_1981_a5_solution"" sorry end", putnam_1981_b1,"abbrev putnam_1981_b1_solution : ℝ := sorry -- -1 theorem putnam_1981_b1 (f : ℕ → ℝ := fun n : ℕ => (1/n^5) * ∑ h in Finset.Icc 1 n, ∑ k in Finset.Icc 1 n, (5*(h : ℝ)^4 - 18*h^2*k^2 + 5*k^4)) : Tendsto f atTop (𝓝 putnam_1981_b1_solution) := sorry",Find the value of $$\lim_{n \rightarrow \infty} \frac{1}{n^5}\sum_{h=1}^{n}\sum_{k=1}^{n}(5h^4 - 18h^2k^2 + 5k^4).$$,The limit equals $-1$.,['analysis'],"Section putnam_1981_b1. Require Import Reals Coquelicot.Coquelicot. Definition putnam_1981_b1_solution := -1. Theorem putnam_1981_b1: Lim_seq (fun n => 1/(pow (INR n) 5) * (sum_n (fun r => (sum_n (fun s => 5 * pow (INR r) 4 - 18 * pow (INR r) 2 * pow (INR s) 2 + 5 * pow (INR s) 4) n)) n)) = putnam_1981_b1_solution. Proof. Admitted. End putnam_1981_b1.","theory putnam_1981_b1 imports Complex_Main begin definition putnam_1981_b1_solution::real where ""putnam_1981_b1_solution \ undefined"" (* -1 *) theorem putnam_1981_b1: fixes f::""nat\real"" defines ""f \ \n. 1/n^5 * (\h=1..n. (\k=1..n. (5*h^4 -18*h^2*k^2 + 5*k^4)))"" shows ""f \ putnam_1981_b1_solution"" sorry end", putnam_1981_b2,"abbrev putnam_1981_b2_solution : ℝ := sorry -- 12 - 8 * Real.sqrt 2 theorem putnam_1981_b2 (P : ℝ × ℝ × ℝ → Prop := fun (r, s, t) => 1 ≤ r ∧ r ≤ s ∧ s ≤ t ∧ t ≤ 4) (f : ℝ × ℝ × ℝ → ℝ := fun (r, s, t) => (r - 1)^2 + (s/r - 1)^2 + (t/s - 1)^2 + (4/t - 1)^2) : (∃ r : ℝ, ∃ s : ℝ, ∃ t : ℝ, P (r, s, t) ∧ f (r, s, t) = putnam_1981_b2_solution) ∧ ∀ r : ℝ, ∀ s : ℝ, ∀ t : ℝ, P (r, s, t) → f (r, s, t) ≥ putnam_1981_b2_solution := sorry","Determine the minimum value attained by $$(r - 1)^2 + (\frac{s}{r} - 1)^2 + (\frac{t}{s} - 1)^2 + (\frac{4}{t} - 1)^2$$ across all choices of real $r$, $s$, and $t$ that satisfy $1 \le r \le s \le t \le 4$.",The minimum is $12 - 8\sqrt{2}$.,['algebra'],"Section putnam_1981_b2. Require Import Reals. Open Scope R. Definition putnam_1981_b2_solution := 12 - 8 * sqrt 2. Theorem putnam_1981_b2: let f (a b c: R) := pow (a-1) 2 + pow (b / a - 1) 2 + pow (c / b - 1) 2 + pow (4 / c - 1) 2 in (forall (a b c: R), 1 <= a /\ a <= b /\ b <= c /\ c <= 4 -> putnam_1981_b2_solution <= f a b c) /\ (exists (a b c: R), 1 <= a /\ a <= b /\ b <= c /\ c <= 4 -> putnam_1981_b2_solution = f a b c). Proof. Admitted. End putnam_1981_b2.","theory putnam_1981_b2 imports Complex_Main begin definition putnam_1981_b2_solution::real where ""putnam_1981_b2_solution \ undefined"" (* 12 - 8 * sqrt 2 *) theorem putnam_1981_b2: fixes P::""real\real\real\bool"" and f::""real\real\real\real"" defines ""P \ \r. \s. \t. 1 \ r \ r \ s \ s \ t \ t \ 4"" and ""f \ \r. \s. \t. (r-1)^2 + (s/r - 1)^2 + (t/s - 1)^2 + (4/t - 1)^2"" shows ""putnam_1981_b2_solution = (LEAST z::real. \r. \s. \t. P r s t \ z = f r s t)"" sorry end", putnam_1981_b3,"theorem putnam_1981_b3 (P : ℕ → Prop := fun n : ℕ => ∀ p : ℕ, (Nat.Prime p ∧ p ∣ n^2 + 3) → ∃ k : ℕ, (p : ℤ) ∣ (k : ℤ)^2 + 3 ∧ k^2 < n) : ∀ n : ℕ, ∃ m : ℕ, (m : ℤ) > n ∧ P m := sorry","Prove that, for infinitely many positive integers $n$, all primes $p$ that divide $n^2 + 3$ also divide $k^2 + 3$ for some integer $k$ such that $k^2 < n$.",,['number_theory'],"Section putnam_1981_b3. Require Import Nat ZArith Znumtheory. From mathcomp Require Import div. Open Scope nat_scope. Theorem putnam_1981_b3: ~ exists (N: nat), forall (n: nat), (forall (p: nat), prime (Z.of_nat p) /\ p %| pow n 2 + 3 = true -> exists (m: nat), p %| pow m 2 + 3 = true /\ pow m 2 < n) -> n < N. Proof. Admitted. End putnam_1981_b3.","theory putnam_1981_b3 imports Complex_Main ""HOL-Computational_Algebra.Primes"" begin theorem putnam_1981_b3: fixes P::""nat\bool"" defines ""P \ \n. \p::nat. (prime p \ p dvd (n^2 + 3)) \ (\k::nat. k^2 < n \ p dvd (k^2 + 3))"" shows ""\n::nat. \m::nat. m > n \ P m"" sorry end", putnam_1981_b4,"abbrev putnam_1981_b4_solution : Prop := sorry -- False theorem putnam_1981_b4 (VAB : Set (Matrix (Fin 5) (Fin 7) ℝ) → Prop) (Vrank : Set (Matrix (Fin 5) (Fin 7) ℝ) → ℕ → Prop) (hVAB : ∀ V : Set (Matrix (Fin 5) (Fin 7) ℝ), VAB V = (∀ A ∈ V, ∀ B ∈ V, ∀ r s : ℝ, r • A + s • B ∈ V)) (hVrank : ∀ (V : Set (Matrix (Fin 5) (Fin 7) ℝ)) (k : ℕ), Vrank V k = ∃ A ∈ V, A.rank = k) : (∀ V : Set (Matrix (Fin 5) (Fin 7) ℝ), (VAB V ∧ Vrank V 0 ∧ Vrank V 1 ∧ Vrank V 2 ∧ Vrank V 4 ∧ Vrank V 5) → Vrank V 3) ↔ putnam_1981_b4_solution := sorry","Let $V$ be a set of $5$ by $7$ matrices, with real entries and with the property that $rA+sB \in V$ whenever $A,B \in V$ and $r$ and $s$ are scalars (i.e., real numbers). \emph{Prove or disprove} the following assertion: If $V$ contains matrices of ranks $0$, $1$, $2$, $4$, and $5$, then it also contains a matrix of rank $3$. [The rank of a nonzero matrix $M$ is the largest $k$ such that the entries of some $k$ rows and some $k$ columns form a $k$ by $k$ matrix with a nonzero determinant.]",Show that the assertion is false.,['linear_algebra'],,"theory putnam_1981_b4 imports Complex_Main ""HOL-Analysis.Finite_Cartesian_Product"" ""HOL-Analysis.Cartesian_Space"" begin definition putnam_1981_b4_solution :: bool where ""putnam_1981_b4_solution \ undefined"" (* False *) theorem putnam_1981_b4: fixes VAB :: ""(real^7^5) set \ bool"" and Vrank :: ""(real^7^5) set \ nat \ bool"" defines ""VAB \ \ V :: (real^7^5) set. \ A \ V. \ B \ V. \ r s :: real. r *\<^sub>R A + s *\<^sub>R B \ V"" and ""Vrank \ \ (V :: (real^7^5) set) (k :: nat). \ A \ V. rank A = k"" shows ""(\ V :: (real^7^5) set. (VAB V \ Vrank V 0 \ Vrank V 1 \ Vrank V 2 \ Vrank V 4 \ Vrank V 5) \ Vrank V 3) \ putnam_1981_b4_solution"" sorry end", putnam_1981_b5,"abbrev putnam_1981_b5_solution : Prop := sorry -- True theorem putnam_1981_b5 (sumbits : List ℕ → ℤ) (B : ℕ → ℤ) (hsumbits : ∀ bits : List ℕ, sumbits bits = ∑ i : Fin bits.length, (bits[i] : ℤ)) (hB : ∀ n > 0, B n = sumbits (Nat.digits 2 n)) : (∃ q : ℚ, Real.exp (∑' n : Set.Ici 1, B n / ((n : ℝ) * ((n : ℝ) + 1))) = q) ↔ putnam_1981_b5_solution := sorry","Let $B(n)$ be the number of ones in the base two expression for the positive integer $n$. For example, $B(6)=B(110_2)=2$ and $B(15)=B(1111_2)=4$. Determine whether or not $\exp \left(\sum_{n=1}^\infty \frac{B(n)}{n(n+1)}\right)$ is a rational number. Here $\exp(x)$ denotes $e^x$.",Show that the expression is a rational number.,"['analysis', 'algebra']","Section putnam_1981_b5. Require Import BinNums Nat NArith Coquelicot.Coquelicot. Definition putnam_1981_b5_solution := True. Theorem putnam_1981_b5: let f := 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 k := Series (fun n => Rdefinitions.Rdiv (Raxioms.INR (f (Pos.of_nat n))) (Raxioms.INR (n + pow n 2))) in exists (a b: nat), Rtrigo_def.exp k = Rdefinitions.Rdiv (Raxioms.INR a) (Raxioms.INR b) <-> putnam_1981_b5_solution. Proof. Admitted. End putnam_1981_b5.","theory putnam_1981_b5 imports Complex_Main begin definition putnam_1981_b5_solution :: bool where ""putnam_1981_b5_solution \ undefined"" (* True *) theorem putnam_1981_b5: fixes B :: ""nat \ nat"" defines ""B \ \ n. card {k :: nat. odd (n div (2 ^ k))}"" shows ""(\ q :: rat. exp (\ n :: nat. B (n + 1) / ((n + 1) * (n + 2))) = q) \ putnam_1981_b5_solution"" sorry end", putnam_2007_a1,"abbrev putnam_2007_a1_solution : Set ℝ := sorry -- {2/3, 3/2, (13 + Real.sqrt 601)/12, (13 - Real.sqrt 601)/12} def reflect_tangent (f g : ℝ → ℝ) := ContDiff ℝ 1 f ∧ ContDiff ℝ 1 g ∧ (∃ x y : ℝ, f x = y ∧ g y = x ∧ (deriv f) x = 1 / (deriv g) y) theorem putnam_2007_a1 : ∀ a : ℝ, reflect_tangent (fun x => a * x^2 + a * x + 1/24) (fun y => a * y^2 + a * y + 1/24) ↔ a ∈ putnam_2007_a1_solution := sorry",Find all values of $\alpha$ for which the curves $y = \alpha*x^2 + \alpha*x + 1/24$ and $x = \alpha*y^2 + \alpha*y + 1/24$ are tangent to each other.,"Show that the solution is the set \{2/3, 3/2, (13 + \sqrt{601})/12, (13 - \sqrt{601})/12}.","['algebra', 'geometry']",,"theory putnam_2007_a1 imports Complex_Main ""HOL-Analysis.Derivative"" begin (* Note: Modified definition of tangent to handle this, but this is a bit of cheating - You would have to know that this works *) definition putnam_2007_a1_solution :: ""real set"" where ""putnam_2007_a1_solution \ undefined"" (* {2/3, 3/2, (13 + sqrt 601)/12, (13 - sqrt 601)/12} *) definition reflect_tangent :: ""(real \ real) \ (real \ real) \ bool"" where ""reflect_tangent \ (\f g::real\real. f C1_differentiable_on UNIV \ g C1_differentiable_on UNIV \ (\x y::real. f x = y \ g y = x \ deriv f x = 1 / deriv g y))"" theorem putnam_2007_a1: shows ""\a::real. (reflect_tangent (\x::real. a*x^2 + a*x + 1/24) (\y::real. a*y^2 + a*y + 1/24) \ a \ putnam_2007_a1_solution)"" sorry end ", putnam_2007_a2,"abbrev putnam_2007_a2_solution : ENNReal := sorry -- 4 theorem putnam_2007_a2 (Sinterpos : Set (Fin 2 → ℝ) → Prop) (Sinterneg : Set (Fin 2 → ℝ) → Prop) (Sconv : Set (Fin 2 → ℝ) → Prop) (hSinterpos : ∀ S : Set (Fin 2 → ℝ), Sinterpos S = ((∃ p ∈ S, p 0 > 0 ∧ p 1 > 0 ∧ p 0 * p 1 = 1) ∧ (∃ p ∈ S, p 0 < 0 ∧ p 1 < 0 ∧ p 0 * p 1 = 1))) (hSinterneg : ∀ S : Set (Fin 2 → ℝ), Sinterneg S = ((∃ p ∈ S, p 0 < 0 ∧ p 1 > 0 ∧ p 0 * p 1 = -1) ∧ (∃ p ∈ S, p 0 > 0 ∧ p 1 < 0 ∧ p 0 * p 1 = -1))) (hSconv : ∀ S : Set (Fin 2 → ℝ), Sconv S = (Convex ℝ S ∧ Sinterpos S ∧ Sinterneg S)) : (∃ S : Set (Fin 2 → ℝ), Sconv S ∧ MeasureTheory.volume S = putnam_2007_a2_solution) ∧ (∀ S : Set (Fin 2 → ℝ), Sconv S → MeasureTheory.volume S ≥ putnam_2007_a2_solution) := sorry",Find the least possible area of a convex set in the plane that intersects both branches of the hyperbola $xy=1$ and both branches of the hyperbola $xy=-1$. (A set $S$ in the plane is called \emph{convex} if for any two points in $S$ the line segment connecting them is contained in $S$.),Show that the minimum is $4$.,['geometry'],,"theory putnam_2007_a2 imports Complex_Main ""HOL-Analysis.Lebesgue_Measure"" begin definition putnam_2007_a2_solution :: ennreal where ""putnam_2007_a2_solution \ undefined"" (* 4 *) theorem putnam_2007_a2: fixes Sinterpos :: ""((real^2) set) \ bool"" and Sinterneg :: ""((real^2) set) \ bool"" and Sconv :: ""((real^2) set) \ bool"" assumes hSinterpos: ""\S::(real^2) set. Sinterpos S = ((\p\S. p$1 > 0 \ p$2 > 0 \ p$1*p$2 = 1) \ (\p\S. p$1 < 0 \ p$2 < 0 \ p$1*p$2 = 1))"" assumes hSinterneg: ""\S::(real^2) set. Sinterneg S = ((\p\S. p$1 < 0 \ p$2 > 0 \ p$1*p$2 = -1) \ (\p\S. p$1 > 0 \ p$2 < 0 \ p$1*p$2 = -1))"" assumes hSconv: ""\S::(real^2) set. Sconv S = (convex S \ Sinterpos S \ Sinterneg S)"" shows ""(LEAST area::ennreal. (\S::(real^2) set. Sconv S \ emeasure lebesgue S = area)) = putnam_2007_a2_solution"" sorry end ", putnam_2007_a4,"abbrev putnam_2007_a4_solution : Set (Polynomial ℝ) := sorry -- {f : Polynomial ℝ | ∃ d : ℕ, ∃ c ≥ (1 : ℤ) - d, ∀ n : ℝ, f.eval n = (1 / 9) * ((10 ^ c) * (9 * n + 1) ^ d - 1)} theorem putnam_2007_a4 (S : Set (Polynomial ℝ)) (repunit : ℝ → Prop := fun x ↦ x > 0 ∧ x = floor x ∧ ∀ d ∈ (digits 10 (floor x)), d = 1) (hS : ∀ f : Polynomial ℝ, f ∈ S ↔ (∀ n : ℝ, repunit n → repunit (f.eval n))) : (S = putnam_2007_a4_solution) := sorry","A \emph{repunit} is a positive integer whose digits in base 10 are all ones. Find all polynomials $f$ with real coefficients such that if $n$ is a repunit, then so is $f(n)$.","Show that the desired polynomials $f$ are those of the form \[ f(n) = \frac{1}{9}(10^c (9n+1)^d - 1) \] for integers $d \geq 0$ and $c \geq 1-d$.","['analysis', 'algebra', 'number_theory']","Section putnam_2007_a4. Require Import Reals Zpower Coquelicot.Coquelicot. Definition putnam_2007_a4_solution (f: R -> R) := exists (c d: Z), Z.ge d 0 /\ Z.ge c (1 - d) /\ f = (fun n => (IZR (Zpower 10 c) * IZR (Zpower (9 * floor n + 1) d) - 1) / 9). Theorem putnam_2007_a4: let repunit (n: R) := n = IZR (floor n) /\ n > 0 /\ exists (m: nat), n = sum_n (fun i => 10 ^ i) m in forall (c: nat -> R) (n: nat), let f (x: R) := sum_n (fun i => c i * x ^ i) (n + 1) in repunit (INR n) -> repunit (f (INR n)) <-> putnam_2007_a4_solution f. Proof. Admitted. End putnam_2007_a4.","theory putnam_2007_a4 imports Complex_Main ""HOL-Computational_Algebra.Polynomial"" begin definition putnam_2007_a4_solution :: ""(real poly) set"" where ""putnam_2007_a4_solution \ undefined"" (* {f :: real poly. \ d :: nat. \ c :: int. c \ 1 - d \ (\ n :: real. poly f n = (1 / 9) * ((10 powr c) * (9 * n + 1) ^ d - 1))} *) theorem putnam_2007_a4: fixes repunit :: ""real \ bool"" defines ""repunit \ \ x :: real. x > 0 \ x = real_of_int (floor x) \ (\ i :: nat. (10 ^ i \ floor x) \ ((floor x) div (10 ^ i)) mod 10 = 1)"" shows ""{f :: real poly. \ n :: real. repunit n \ repunit (poly f n)} = putnam_2007_a4_solution"" sorry end", putnam_2007_a5,"theorem putnam_2007_a5 (G : Type*) [Group G] [Fintype G] (p : ℕ) (n : ℕ) (hp : Nat.Prime p) (hn : n = {g : G | orderOf g = p}.encard) : n = 0 ∨ p ∣ (n + 1) := sorry",,,[],,"theory putnam_2007_a5 imports Complex_Main ""HOL-Algebra.Multiplicative_Group"" ""HOL-Computational_Algebra.Primes"" begin theorem putnam_2007_a5: fixes G (structure) and p :: nat and n :: nat assumes hG: ""group G \ finite (carrier G)"" and hp: ""prime p"" and hn: ""n \ card {g::'a. g \ carrier G \ (group.ord G) g = p}"" shows ""n = 0 \ p dvd (n+1)"" sorry end ", putnam_2007_b1,"theorem putnam_2007_b1 (f : Polynomial ℤ) (hf : ∀ n : ℕ, f.coeff n ≥ 0) (hfnconst : ∃ n : ℕ, n > 0 ∧ f.coeff n > 0) (n : ℤ) (hn : n > 0) : f.eval n ∣ f.eval (f.eval n + 1) ↔ n = 1 := sorry","Let $f$ be a nonconstant polynomial with positive integer coefficients. Prove that if $n$ is a positive integer, then $f(n)$ divides $f(f(n) + 1)$ if and only if $n = 1$",,['algebra'],"Section putnam_2007_b1. Require Import Nat Reals Coquelicot.Coquelicot. From mathcomp Require Import div. Theorem putnam_2007_b1: forall (c: nat -> nat) (n: nat), gt n 0 /\ forall (x: nat), gt (c x) 0 -> let f (x: nat) := sum_n (fun i => INR (mul (c i) (x ^ i))) (n + 1) in Z.to_nat (floor (f n)) %| Z.to_nat (floor (f (Z.to_nat (floor (f n + 1))))) = true <-> n = 1%nat. Proof. Admitted. End putnam_2007_b1.","theory putnam_2007_b1 imports Complex_Main ""HOL-Computational_Algebra.Polynomial"" begin (* Note: Since the coefficient is defined for all natural numbers, the condition here is modified to nonnegative which is what makes sense *) theorem putnam_2007_b1: fixes f :: ""int poly"" and n :: int assumes hf: ""\n'::nat. poly.coeff f n' \ 0"" and hfnconst: ""\n'::nat. n' > 0 \ poly.coeff f n' > 0"" and hn: ""n > 0"" shows ""((poly f n) dvd (poly f (poly f n + 1))) \ n = 1"" sorry end ", putnam_2007_b2,"theorem putnam_2007_b2 (f : ℝ → ℝ) (hf : ContDiffOn ℝ 1 f (Icc 0 1)) (hfint : ∫ x in (0)..1, f x = 0) (max : ℝ) (heqmax : ∃ x ∈ Icc (0 : ℝ) 1, |deriv f x| = max) (hmaxub : ∀ x ∈ Icc (0 : ℝ) 1, |deriv f x| ≤ max) : (∀ α ∈ (Ioo (0 : ℝ) 1), |∫ x in (0)..α, f x| ≤ (1 / 8) * max) := sorry","Suppose that $f: [0,1] \to \mathbb{R}$ has a continuous derivative and that $\int_0^1 f(x)\,dx = 0$. Prove that for every $\alpha \in (0,1)$, \[ \left| \int_0^\alpha f(x)\,dx \right| \leq \frac{1}{8} \max_{0 \leq x \leq 1} |f'(x)|. \]",,['analysis'],"Section putnam_2007_b2. Require Import Reals Coquelicot.Coquelicot. Theorem putnam_2007_b2: forall (f: R -> R), (forall (x: R), 0 <= x <= 1 /\ continuity_pt f x /\ ex_derive f x /\ RInt f 0 1 = 0) -> exists (max_f_prime_abs: R), (forall (x: R), 0 <= x <= 1 -> max_f_prime_abs >= Rabs (Derive f x)) /\ (exists (x: R), 0 <= x <= 1 -> max_f_prime_abs = Rabs (Derive f x)) /\ forall (a: R), 0 < a < 1 -> Rabs (RInt f 0 a) = max_f_prime_abs / 8. Proof. Admitted. End putnam_2007_b2.","theory putnam_2007_b2 imports Complex_Main ""HOL-Analysis.Derivative"" ""HOL-Analysis.Set_Integral"" ""HOL-Analysis.Lebesgue_Measure"" begin theorem putnam_2007_b2: fixes f :: ""real \ real"" assumes hf: ""f C1_differentiable_on {0..1}"" and hfint: ""set_lebesgue_integral lebesgue {0..1} f = 0"" shows ""\ \ \ {0<..<1}. \set_lebesgue_integral lebesgue {0..\} f\ \ (1 / 8) * (GREATEST y. \ x \ {0..1}. \deriv f x\ = y)"" sorry end", putnam_2007_b3,"abbrev putnam_2007_b3_solution : ℝ := sorry -- (2 ^ 2006 / Real.sqrt 5) * (((1 + Real.sqrt 5) / 2) ^ 3997 - ((1 + Real.sqrt 5) / 2) ^ (-3997 : ℤ)) theorem putnam_2007_b3 (x : ℕ → ℝ) (hx0 : x 0 = 1) (hx : ∀ n : ℕ, x (n + 1) = 3 * (x n) + ⌊(x n) * Real.sqrt 5⌋) : (x 2007 = putnam_2007_b3_solution) := sorry","Let $x_0 = 1$ and for $n \geq 0$, let $x_{n+1} = 3x_n + \lfloor x_n \sqrt{5} \rfloor$. In particular, $x_1 = 5$, $x_2 = 26$, $x_3 = 136$, $x_4 = 712$. Find a closed-form expression for $x_{2007}$. ($\lfloor a \rfloor$ means the largest integer $\leq a$.)","Prove that $x_{2007} = \frac{2^{2006}}{\sqrt{5}}(\alpha^{3997}-\alpha^{-3997})$, where $\alpha = \frac{1+\sqrt{5}}{2}$.",['analysis'],"Section putnam_2007_b3. Require Import Reals Coquelicot.Coquelicot. Definition putnam_2007_b3_solution := let a := (1 + sqrt 5) / 2 in 2 ^ 2006 / sqrt 5 * (a ^ 3997 - Rpower a (-3997)). Theorem putnam_2007_b3: let fix x (n: nat) := match n with | O => 1 | S n' => 3 * x n' + IZR (floor (x n' * sqrt (INR n))) end in x 2007%nat = putnam_2007_b3_solution. Proof. Admitted. End putnam_2007_b3.","theory putnam_2007_b3 imports Complex_Main begin definition putnam_2007_b3_solution :: real where ""putnam_2007_b3_solution \ undefined"" (* (2 ^ 2006 / sqrt 5) * ((((1 + sqrt 5) / 2) powr 3997) - (((1 + sqrt 5) / 2) powr -3997)) *) theorem putnam_2007_b3: fixes x :: ""nat \ real"" assumes hx0: ""x 0 = 1"" and hx: ""\ n :: nat. x (n + 1) = 3 * (x n) + floor (x n + sqrt 5)"" shows ""x 2007 = putnam_2007_b3_solution"" sorry end", putnam_2007_b4,"abbrev putnam_2007_b4_solution : ℕ → ℕ := sorry -- fun n ↦ 2 ^ (n + 1) theorem putnam_2007_b4 (n : ℕ) (npos : n > 0) : ({(P, Q) : (Polynomial ℝ) × (Polynomial ℝ) | P ^ 2 + Q ^ 2 = Polynomial.X ^ (2 * n) + 1 ∧ P.degree > Q.degree}.ncard = putnam_2007_b4_solution n) := sorry","Let $n$ be a positive integer. Find the number of pairs $P, Q$ of polynomials with real coefficients such that \[ (P(X))^2 + (Q(X))^2 = X^{2n} + 1 \] and $\deg P > \deg Q$.",Show that the number of pairs is $2^{n+1}$.,['algebra'],,"theory putnam_2007_b4 imports Complex_Main ""HOL-Computational_Algebra.Polynomial"" begin definition putnam_2007_b4_solution :: ""nat \ nat"" where ""putnam_2007_b4_solution \ undefined"" (* \ n. 2 ^ (n + 1) *) theorem putnam_2007_b4: fixes n :: nat assumes npos: ""n > 0"" shows ""card {(P :: real poly, Q :: real poly). P ^ 2 + Q ^ 2 = (monom 1 (2 * n)) + 1 \ degree P > degree Q} = putnam_2007_b4_solution n"" sorry end", putnam_2007_b5,"theorem putnam_2007_b5 (k : ℕ) (kpos : k > 0) : (∃ P : Finset.range k → Polynomial ℝ, ∀ n : ℤ, ⌊(n : ℝ) / k⌋ ^ k = ∑ i : Finset.range k, (P i).eval (n : ℝ) * ⌊(n : ℝ) / k⌋ ^ (i : ℕ)) := sorry","Let $k$ be a positive integer. Prove that there exist polynomials $P_0(n), P_1(n), \dots, P_{k-1}(n)$ (which may depend on $k$) such that for any integer $n$, \[ \left\lfloor \frac{n}{k} \right\rfloor^k = P_0(n) + P_1(n) \left\lfloor \frac{n}{k} \right\rfloor + \cdots + P_{k-1}(n) \left\lfloor \frac{n}{k} \right\rfloor^{k-1}. \] ($\lfloor a \rfloor$ means the largest integer $\leq a$.)",,['algebra'],,"theory putnam_2007_b5 imports Complex_Main ""HOL-Computational_Algebra.Polynomial"" begin theorem putnam_2007_b5: fixes k :: nat assumes kpos: ""k > 0"" shows ""\ P :: real poly list. length P = k \ (\ n :: int. \n / k\ ^ k = (\ i = 0..(k - 1). poly (P!i) n * \n / k\ ^ i))"" sorry end", putnam_1980_a2,"abbrev putnam_1980_a2_solution : ℕ → ℕ → ℕ := sorry -- (fun r s : ℕ => (1 + 4 * r + 6 * r ^ 2) * (1 + 4 * s + 6 * s ^ 2)) theorem putnam_1980_a2 (r s : ℕ) (abcdlcm : ℕ → ℕ → ℕ → ℕ → Prop) (rspos : r > 0 ∧ s > 0) (habcdlcm : ∀ a b c d : ℕ, abcdlcm a b c d = (a > 0 ∧ b > 0 ∧ c > 0 ∧ d > 0 ∧ (3 ^ r * 7 ^ s = Nat.lcm (Nat.lcm a b) c) ∧ (3 ^ r * 7 ^ s = Nat.lcm (Nat.lcm a b) d) ∧ (3 ^ r * 7 ^ s = Nat.lcm (Nat.lcm a c) d) ∧ (3 ^ r * 7 ^ s = Nat.lcm (Nat.lcm b c) d))) : {(a, b, c, d) : ℕ × ℕ × ℕ × ℕ | abcdlcm a b c d}.encard = putnam_1980_a2_solution r s := sorry","Let $r$ and $s$ be positive integers. Derive a formula for the number of ordered quadruples $(a,b,c,d)$ of positive integers such that $3^r \cdot 7^s=\text{lcm}[a,b,c]=\text{lcm}[a,b,d]=\text{lcm}[a,c,d]=\text{lcm}[b,c,d]$. The answer should be a function of $r$ and $s$. (Note that $\text{lcm}[x,y,z]$ denotes the least common multiple of $x,y,z$.)",Show that the number is $(1+4r+6r^2)(1+4s+6s^2)$.,['number_theory'],"Section putnam_1980_a2. Require Import Nat Ensembles Finite_sets. Definition putnam_1980_a2_solution (m n: nat) := (6*m*m + 3*m + 1) * (6*n*n + 3*n + 1). Theorem putnam_1980_a2: let gcd3 (a b c: nat) := gcd (gcd a b) c in exists (f: Ensemble (nat*nat)), forall (m n: nat) (a b c d: nat), (f (m, n) <-> gcd3 a b c = 3 ^ m * 7 ^ n \/ gcd3 a b d = 3 ^ m * 7 ^ n \/ gcd3 a c d = 3 ^ m * 7 ^ n \/ gcd3 b c d = 3 ^ m * 7 ^ n) -> cardinal (nat*nat) f (putnam_1980_a2_solution m n). Proof. Admitted. End putnam_1980_a2.","theory putnam_1980_a2 imports Complex_Main begin definition putnam_1980_a2_solution :: ""nat \ nat \ nat"" where ""putnam_1980_a2_solution \ undefined"" (* \ r s :: nat. (1 + 4 * r + 6 * r ^ 2) * (1 + 4 * s + 6 * s ^ 2) *) theorem putnam_1980_a2: fixes r s :: nat and abcdlcm :: ""nat \ nat \ nat \ nat \ bool"" defines ""abcdlcm \ \ a b c d :: nat. a > 0 \ b > 0 \ c > 0 \ d > 0 \ 3 ^ r * 7 ^ s = lcm (lcm a b) c \ 3 ^ r * 7 ^ s = lcm (lcm a b) d \ 3 ^ r * 7 ^ s = lcm (lcm a c) d \ 3 ^ r * 7 ^ s = lcm (lcm b c) d"" assumes rspos: ""r > 0 \ s > 0"" shows ""card {(a, b, c, d). abcdlcm a b c d} = putnam_1980_a2_solution r s"" sorry end", putnam_1980_a3,"abbrev putnam_1980_a3_solution : ℝ := sorry -- Real.pi / 4 theorem putnam_1980_a3 : ∫ x in Set.Ioo 0 (Real.pi / 2), 1 / (1 + (Real.tan x) ^ (Real.sqrt 2)) = putnam_1980_a3_solution := sorry",Evaluate $\int_0^{\pi/2}\frac{dx}{1+(\tan x)^{\sqrt{2}}}$.,Show that the integral is $\pi/4$.,['analysis'],"Section putnam_1980_a3. Require Import Reals Coquelicot.Coquelicot. Open Scope R. Definition putnam_1980_a3_solution := PI/4. Theorem putnam_1980_a3: let f (x: R) := 1/(1 + Rpower (tan x) (sqrt 2)) in RInt f 0 PI/2 = putnam_1980_a3_solution. Proof. Admitted. End putnam_1980_a3.","theory putnam_1980_a3 imports Complex_Main ""HOL-Analysis.Interval_Integral"" begin definition putnam_1980_a3_solution :: real where ""putnam_1980_a3_solution \ undefined"" (* pi / 4 *) theorem putnam_1980_a3: shows ""interval_lebesgue_integral lebesgue 0 (pi / 2) (\ x :: real. 1 / (1 + (tan x) powr (sqrt 2))) = putnam_1980_a3_solution"" sorry end", putnam_1980_a4,"theorem putnam_1980_a4 (abcvals : ℤ → ℤ → ℤ → Prop) (habcvals : ∀ a b c : ℤ, abcvals a b c = (¬(a = 0 ∧ b = 0 ∧ c = 0) ∧ |a| < 1000000 ∧ |b| < 1000000 ∧ |c| < 1000000)) : (∃ a b c : ℤ, abcvals a b c ∧ |a + b * Real.sqrt 2 + c * Real.sqrt 3| < 10 ^ (-(11 : ℝ))) ∧ (∀ a b c : ℤ, abcvals a b c → |a + b * Real.sqrt 2 + c * Real.sqrt 3| > 10 ^ (-(21 : ℝ))) := sorry","\begin{enumerate} \item[(a)] Prove that there exist integers $a,b,c$, not all zero and each of absolute value less than one million, such that $|a+b\sqrt{2}+c\sqrt{3}|<10^{-11}$. \item[(b)] Let $a,b,c$ be integers, not all zero and each of absolute value less than one million. Prove that $|a+b\sqrt{2}+c\sqrt{3}|>10^{-21}$. \end{enumerate}",,['algebra'],"Section putnam_1980_a4. Require Import Reals BinInt. Open Scope Z. Theorem putnam_1980_a4: (forall (a b c: Z), (~ (a = 0 \/ b = 0 /\ c = 0) /\ Z.abs a < 10^6 /\ Z.abs b < 10^6 /\ Z.abs c < 10^6) -> Rgt (Rabs (Rplus (Rplus (IZR a) (Rmult (IZR b) (sqrt 2))) (Rmult (IZR c) (sqrt 3)))) (Rpower 10 (-21)) ) /\ (exists (a b c: Z), Rlt (Rabs (Rplus (IZR a) (Rplus (Rmult (IZR b) (sqrt 2)) (Rmult (IZR c) (sqrt 3))))) (Rpower 10 (-11)) ). Proof. Admitted. End putnam_1980_a4.","theory putnam_1980_a4 imports Complex_Main begin theorem putnam_1980_a4: fixes abcvals :: ""int \ int \ int \ bool"" defines ""abcvals \ \ a b c :: int. \(a = 0 \ b = 0 \ c = 0) \ \a\ < 1000000 \ \b\ < 1000000 \ \c\ < 1000000"" shows ""(\ a b c :: int. abcvals a b c \ \a + b * sqrt 2 + c * sqrt 3\ < 10 powi -11) \ (\ a b c :: int. abcvals a b c \ \a + b * sqrt 2 + c * sqrt 3\ > 10 powi -21)"" sorry end ", putnam_1980_a5,"theorem putnam_1980_a5 (P : Polynomial ℝ) (xeqs : ℝ → Prop) (Pnonconst : P.degree > 0) (hxeqs : ∀ x : ℝ, xeqs x = (0 = (∫ t in (0)..x, P.eval t * Real.sin t) ∧ 0 = (∫ t in (0)..x, P.eval t * Real.cos t))) : {x : ℝ | xeqs x}.Finite := sorry","Let $P(t)$ be a nonconstant polynomial with real coefficients. Prove that the system of simultaneous equations $0=\int_0^xP(t)\sin t\,dt=\int_0^xP(t)\cos t\,dt$ has only finitely many real solutions $x$.",,['analysis'],"Section putnam_1980_a5. Require Import Reals Coquelicot.Coquelicot. Theorem putnam_1980_a5 (n : nat) (npos : gt n 0) (coeff : nat -> R) (hcoeff : coeff n <> 0) (p : R -> R := fun x => sum_n (fun i => coeff i * x ^ i) (S n)) (h1 : nat -> Prop := fun a => RInt (fun x => p x * sin x) 0 (INR a) = 0) (h2 : nat -> Prop := fun a => RInt (fun x => p x * cos x) 0 (INR a) = 0) : exists (m: nat), forall (b: nat), h1 b /\ h2 b -> lt b m. Proof. Admitted. End putnam_1980_a5.","theory putnam_1980_a5 imports Complex_Main ""HOL-Computational_Algebra.Polynomial"" ""HOL-Analysis.Interval_Integral"" begin theorem putnam_1980_a5: fixes P :: ""real poly"" and xeqs :: ""real \ bool"" defines ""xeqs \ \ x :: real. 0 = interval_lebesgue_integral lebesgue 0 x (\ t. poly P t * sin t) \ 0 = interval_lebesgue_integral lebesgue 0 x (\ t. poly P t * cos t)"" assumes Pnonconst: ""degree P > 0"" shows ""finite {x :: real. xeqs x}"" sorry end", putnam_1980_a6,"abbrev putnam_1980_a6_solution : ℝ := sorry -- 1 / Real.exp 1 theorem putnam_1980_a6 (C : Set (ℝ → ℝ)) (uleint : ℝ → Prop) (hC : C = {f : ℝ → ℝ | ContDiffOn ℝ 1 f (Set.Icc 0 1) ∧ f 0 = 0 ∧ f 1 = 1}) (huleint : ∀ u : ℝ, uleint u = ∀ f ∈ C, u ≤ (∫ x in Set.Ioo 0 1, |deriv f x - f x|)) : uleint putnam_1980_a6_solution ∧ (∀ u : ℝ, uleint u → u ≤ putnam_1980_a6_solution) := sorry","Let $C$ be the class of all real valued continuously differentiable functions $f$ on the interval $0 \leq x \leq 1$ with $f(0)=0$ and $f(1)=1$. Determine the largest real number $u$ such that $u \leq \int_0^1|f'(x)-f(x)|\,dx$ for all $f$ in $C$.",Show that $u=1/e$.,['analysis'],,"theory putnam_1980_a6 imports Complex_Main ""HOL-Analysis.Interval_Integral"" begin definition putnam_1980_a6_solution :: real where ""putnam_1980_a6_solution \ undefined"" (* 1 / exp 1 *) theorem putnam_1980_a6: fixes C :: ""(real \ real) set"" and uleint :: ""real \ bool"" defines ""C \ {f :: real \ real. f C1_differentiable_on {0..1} \ f 0 = 0 \ f 1 = 1}"" and ""uleint \ \ u :: real. \ f \ C. u \ interval_lebesgue_integral lebesgue 0 1 (\ x. \deriv f x - f x\)"" shows ""(GREATEST u. uleint u) = putnam_1980_a6_solution"" sorry end", putnam_1980_b1,"abbrev putnam_1980_b1_solution : Set ℝ := sorry -- {c : ℝ | c ≥ 1 / 2} theorem putnam_1980_b1 (c : ℝ) : (∀ x : ℝ, (Real.exp x + Real.exp (-x)) / 2 ≤ Real.exp (c * x ^ 2)) ↔ c ∈ putnam_1980_b1_solution := sorry",For which real numbers $c$ is $(e^x+e^{-x})/2 \leq e^{cx^2}$ for all real $x$?,Show that the inequality holds if and only if $c \geq 1/2$.,['analysis'],"Section putnam_1980_b1. Require Import Reals Rtrigo_def. Open Scope R. Definition putnam_1980_b1_solution (k: R) := k >= 1/2. Theorem putnam_1980_b1: forall (k: R), forall (x: R), cosh x <= exp (k*x*x) <-> putnam_1980_b1_solution k. Proof. Admitted. End putnam_1980_b1.","theory putnam_1980_b1 imports Complex_Main begin definition putnam_1980_b1_solution :: ""real set"" where ""putnam_1980_b1_solution \ undefined"" (* {c :: real. c \ 1 / 2} *) theorem putnam_1980_b1: fixes c :: real shows ""(\ x :: real. (exp x + exp (-x)) / 2 \ exp (c * x ^ 2)) \ c \ putnam_1980_b1_solution"" sorry end", putnam_1980_b3,"abbrev putnam_1980_b3_solution : Set ℝ := sorry -- {a : ℝ | a ≥ 3} theorem putnam_1980_b3 (a : ℝ) (u : ℕ → ℝ) (hu : u 0 = a ∧ (∀ n : ℕ, u (n + 1) = 2 * u n - n ^ 2)) : (∀ n : ℕ, u n > 0) ↔ a ∈ putnam_1980_b3_solution := sorry",For which real numbers $a$ does the sequence defined by the initial condition $u_0=a$ and the recursion $u_{n+1}=2u_n-n^2$ have $u_n>0$ for all $n \geq 0$? (Express the answer in the simplest form.),Show that $u_n>0$ for all $n \geq 0$ if and only if $a \geq 3$.,['algebra'],"Section putnam_1980_b3. Require Import Reals. Open Scope R. Definition putnam_1980_b3_solution (b: R) := b >= 3. Theorem putnam_1980_b3: forall (b: R), let A := fix a (n: nat) : R := match n with | O => b | S n' => 2 * a n' - INR (n' * n') end in forall (n: nat), A n > 0 <-> putnam_1980_b3_solution b. Proof. Admitted. End putnam_1980_b3.","theory putnam_1980_b3 imports Complex_Main begin definition putnam_1980_b3_solution :: ""real set"" where ""putnam_1980_b3_solution \ undefined"" (* {a :: real. a \ 3} *) theorem putnam_1980_a3: fixes a :: real and u :: ""nat \ real"" assumes hu: ""u 0 = a \ (\ n :: nat. u (n + 1) = 2 * (u n) - n ^ 2)"" shows ""(\ n :: nat. u n > 0) \ a \ putnam_1980_b3_solution"" sorry end", putnam_1980_b4,"theorem putnam_1980_b4 {T : Type} (X : Finset T) (A : Fin 1066 → Finset T) (hX : X.card ≥ 10) (hA : ∀ i : Fin 1066, A i ⊆ X ∧ (A i).card > ((1 : ℚ)/2) * X.card) : ∃ Y : Finset T, Y ⊆ X ∧ Y.card = 10 ∧ ∀ i : Fin 1066, ∃ y ∈ Y, y ∈ A i := sorry","Let $X$ be a finite set with at least $10$ elements; for each $i \in \{0, 1, ..., 1065\}$, let $A_i \subseteq X$ satisfy $|A_i| > \frac{1}{2}|X|$. Prove that there exist $10$ elements $x_1, x_2, \dots, x_{10} \in X$ such that each $A_i$ contains at least one of $x_1, x_2, \dots, x_{10}$.",,"['set_theory', 'combinatorics']",,"theory putnam_1980_b4 imports Complex_Main begin theorem putnam_1980_b4: fixes X :: ""'t set"" and A :: ""nat \ 't set"" assumes Xfin: ""finite X"" and hX: ""card X \ 10"" and hA: ""\ i \ {1 .. 1066}. A i \ X \ card (A i) > (1 / 2) * card X"" shows ""\ Y :: 't set. Y \ X \ card Y = 10 \ (\ i \ {1 .. 1066}. \ y \ Y. y \ A i)"" sorry end", putnam_1980_b5,"abbrev putnam_1980_b5_solution : ℝ → Prop := sorry -- fun t : ℝ => 1 ≥ t theorem putnam_1980_b5 (T : Set ℝ := Icc 0 1) (P : ℝ → (ℝ → ℝ) → Prop := fun t : ℝ => fun f : ℝ → ℝ => f 1 - 2*f (2/3) + f (1/3) ≥ t*(f (2/3) - 2*f (1/3) + f 0)) (Convex : (ℝ → ℝ) → Prop := fun f : ℝ → ℝ => ∀ u ∈ T, ∀ v ∈ T, ∀ s ∈ T, f (s*u + (1 - s)*v) ≤ s*(f u) + (1 - s)*(f v)) (S : ℝ → Set (ℝ → ℝ) := fun t : ℝ => {f : ℝ → ℝ | (∀ x ∈ T, f x ≥ 0) ∧ StrictMonoOn f T ∧ Convex f ∧ ContinuousOn f T ∧ P t f}) : ∀ t : ℝ, t ≥ 0 → ((∀ f ∈ S t, ∀ g ∈ S t, f * g ∈ S t) ↔ putnam_1980_b5_solution t) := sorry","A function $f$ is convex on $[0, 1]$ if and only if $$f(su + (1-s)v) \le sf(u) + (1 - s)f(v)$$ for all $s \in [0, 1]$. Let $S_t$ denote the set of all nonnegative increasing convex continuous functions $f : [0, 1] \rightarrow \mathbb{R}$ such that $$f(1) - 2f\left(\frac{2}{3}\right) + f\left(\frac{1}{3}\right) \ge t\left(f\left(\frac{2}{3}\right) - 2f\left(\frac{1}{3}\right) + f(0)\right).$$ For which real numbers $t \ge 0$ is $S_t$ closed under multiplication?",$S_t$ is closed under multiplication if and only if $1 \ge t$.,"['analysis', 'algebra']",,"theory putnam_1980_b5 imports Complex_Main begin definition putnam_1980_b5_solution :: ""real \ bool"" where ""putnam_1980_b5_solution \ undefined"" (* \ t :: real. 1 \ t *) theorem putnam_1980_b5: fixes T :: ""real set"" and P :: ""real \ (real \ real) \ bool"" and Convex :: ""(real \ real) \ bool"" and S :: ""real \ (real \ real) set"" defines ""T \ {0..1}"" and ""P \ \ (t :: real) (f :: real \ real). f 1 - 2 * f (2 / 3) + f (1 / 3) \ t * (f (2 / 3) - 2 * f (1 / 3) + f 0)"" and ""Convex \ \ f :: real \ real. \ u \ T. \ v \ T. \ s \ T. f (s * u + (1 - s) * v) \ s * (f u) + (1 - s) * (f v)"" and ""S \ \ t :: real. {f :: real \ real. (\ x \ T. f x \ 0) \ strict_mono_on T f \ Convex f \ continuous_on T f \ P t f}"" shows ""\ t :: real. t \ 0 \ ((\ f \ S t. \ g \ S t. (\ x. f x * g x) \ S t) \ putnam_1980_b5_solution t)"" sorry end", putnam_1980_b6,"theorem putnam_1980_b6 (G : ℤ × ℤ → ℚ) (hG : ∀ d n : ℕ, d ≤ n → (d = 1 → G (d, n) = 1/(n : ℚ)) ∧ (d > 1 → G (d, n) = (d/(n : ℚ))*∑ i in Finset.Icc d n, G ((d : ℤ) - 1, (i : ℤ) - 1))) : ∀ d p : ℕ, 1 < d ∧ d ≤ p ∧ Prime p → ¬p ∣ (G (d, p)).den := sorry","For integers $d, n$ with $1 \le d \le n$, let $G(1, n) = \frac{1}{n}$ and $G(d, n) = \frac{d}{n}\sum_{i=d}^{n}G(d - 1, i - 1)$ for all $d > 1$. If $1 < d \le p$ for some prime $p$, prove that the reduced denominator of $G(d, p)$ is not divisible by $p$.",,"['number_theory', 'algebra']","Section putnam_1980_b6. Require Import Reals Nat Znumtheory QArith Coquelicot.Coquelicot. From mathcomp Require Import div. Theorem putnam_1980_b6: let A := fix f (n i: nat) := match (n,i) with | (O,i') => 1/INR i' | (S n', i') => (INR n' + 1)/(INR i') * sum_n (fun x => f n' (Nat.add n' x)) (Nat.sub i' n') end in forall (n p: nat), and (gt p n) (gt n 1) /\ prime (Z.of_nat p) -> exists (a b: nat), A n p = INR a/INR b /\ p %| b/(gcd a b) = false. Proof. Admitted. End putnam_1980_b6.","theory putnam_1980_b6 imports Complex_Main ""HOL-Computational_Algebra.Primes"" begin theorem putnam_1980_b6: fixes G :: ""nat \ nat \ rat"" assumes hG: ""\ d n :: nat. d \ n \ ((d = 1 \ G (d, n) = 1 / n) \ (d > 1 \ G (d, n) = (d / n) * (\ i = d..n. G (d - 1, i - 1))))"" shows ""\ d p :: nat. (1 < d \ d \ p \ prime p) \ \(p dvd (snd (quotient_of (G (d, p)))))"" sorry end ", putnam_1984_a2,"abbrev putnam_1984_a2_solution : ℚ := sorry -- 2 theorem putnam_1984_a2 : ∑' k : Set.Ici 1, (6 ^ (k : ℕ) / ((3 ^ ((k : ℕ) + 1) - 2 ^ ((k : ℕ) + 1)) * (3 ^ (k : ℕ) - 2 ^ (k : ℕ)))) = putnam_1984_a2_solution := sorry",Express $\sum_{k=1}^\infty (6^k/(3^{k+1}-2^{k+1})(3^k-2^k))$ as a rational number.,Show that the sum converges to $2$.,['analysis'],"Section putnam_1984_a2. Require Import Reals Coquelicot.Coquelicot. Open Scope nat_scope. Definition putnam_1984_a2_solution := 2%R. Theorem putnam_1984_a2: let f (n: nat) := Rdiv (pow 6 n) ((pow 3 (n+1) - pow 2 (n+1)) * pow 3 n - pow 2 n) in Series f = putnam_1984_a2_solution. Proof. Admitted. End putnam_1984_a2.","theory putnam_1984_a2 imports Complex_Main begin definition putnam_1984_a2_solution :: ""rat"" where ""putnam_1984_a2_solution \ undefined"" (* 2 *) theorem putnam_1984_a2: shows ""(\ (k :: nat) \ {1..}. 6^k/((3^(k+1) - 2^(k+1))*(3^k - 2^k))) = putnam_1984_a2_solution"" sorry end", putnam_1984_a3,"abbrev putnam_1984_a3_solution : MvPolynomial (Fin 3) ℝ := sorry -- (MvPolynomial.X 2) ^ 2 * ((MvPolynomial.X 0) ^ 2 - (MvPolynomial.X 1) ^ 2) theorem putnam_1984_a3 (n : ℕ) (a b : ℝ) (Mn : ℝ → Matrix (Fin (2 * n)) (Fin (2 * n)) ℝ) (polyabn : Fin 3 → ℝ) (npos : n > 0) (aneb : a ≠ b) (hMnx : ∀ x : ℝ, ∀ i : Fin (2 * n), (Mn x) i i = x) (hMna : ∀ x : ℝ, ∀ i j : Fin (2 * n), (i ≠ j ∧ Even ((i : ℕ) + j)) → (Mn x) i j = a) (hMnb : ∀ x : ℝ, ∀ i j : Fin (2 * n), (i ≠ j ∧ Odd ((i : ℕ) + j)) → (Mn x) i j = b) (hpolyabn : polyabn 0 = a ∧ polyabn 1 = b ∧ polyabn 2 = n) : Tendsto (fun x : ℝ => (Mn x).det / (x - a) ^ (2 * n - 2)) (𝓝[≠] a) (𝓝 (MvPolynomial.eval polyabn putnam_1984_a3_solution)) := sorry","Let $n$ be a positive integer. Let $a,b,x$ be real numbers, with $a \neq b$, and let $M_n$ denote the $2n \times 2n$ matrix whose $(i,j)$ entry $m_{ij}$ is given by \[ m_{ij}=\begin{cases} x & \text{if }i=j, \\ a & \text{if }i \neq j\text{ and }i+j\text{ is even}, \\ b & \text{if }i \neq j\text{ and }i+j\text{ is odd}. \end{cases} \] Thus, for example, $M_2=\begin{pmatrix} x & b & a & b \\ b & x & b & a \\ a & b & x & b \\ b & a & b & x \end{pmatrix}$. Express $\lim_{x \to a} \det M_n/(x-a)^{2n-2}$ as a polynomial in $a$, $b$, and $n$, where $\det M_n$ denotes the determinant of $M_n$.",Show that $\lim_{x \to a} \frac{\det M_n}{(x-a)^{2n-2}}=n^2(a^2-b^2)$.,"['linear_algebra', 'analysis']",,"theory putnam_1984_a3 imports Complex_Main ""HOL-Computational_Algebra.Polynomial"" ""HOL-Analysis.Finite_Cartesian_Product"" ""HOL-Analysis.Determinants"" begin definition putnam_1984_a3_solution :: ""real poly poly poly"" where ""putnam_1984_a3_solution \ undefined"" (* (monom 1 2) * ([:[:monom 1 2:]:] - [:monom 1 2:]) *) theorem putnam_1984_a3: fixes n :: ""nat"" and a b :: ""real"" and Mn :: ""real \ (real^'i^'i)"" and ni :: ""'i \ nat"" assumes hij : ""CARD('i) = 2*n"" and hn : ""bij_betw ni (UNIV :: 'i set) {1..2*n}"" and npos : ""n > 0"" and aneb : ""a \ b"" and hMnx : ""\ x :: real. \ i :: 'i. (Mn x)$i$i = x"" and hMna : ""\ x :: real. \ i j :: 'i. (ni i \ nj j \ even (ni i + nj j)) \ (Mn x)$i$j = a"" and hMnb : ""\ x :: real. \ i j :: 'i. (ni i \ nj j \ odd (ni i + nj j)) \ (Mn x)$i$j = b"" shows ""filterlim (\ x :: real. det (Mn x) / (x - a) ^ (2 * n - 2)) (nhds (poly (poly (poly putnam_1984_a3_solution [:[:(n::real):]:]) [:b:]) a)) (at a)"" sorry end", putnam_1984_a5,"abbrev putnam_1984_a5_solution : ℕ × ℕ × ℕ × ℕ × ℕ := sorry -- (1, 9, 8, 4, 25) theorem putnam_1984_a5 (R : Set (Fin 3 → ℝ)) (w : (Fin 3 → ℝ) → ℝ) (hR : R = {p : Fin 3 → ℝ | (∀ i : Fin 3, p i ≥ 0) ∧ p 0 + p 1 + p 2 ≤ 1}) (hw : ∀ p : Fin 3 → ℝ, w p = 1 - p 0 - p 1 - p 2) : let (a, b, c, d, n) := putnam_1984_a5_solution; a > 0 ∧ b > 0 ∧ c > 0 ∧ d > 0 ∧ n > 0 ∧ (∫ p in R, (p 0) ^ 1 * (p 1) ^ 9 * (p 2) ^ 8 * (w p) ^ 4 = ((a)! * (b)! * (c)! * (d)! : ℝ) / (n)!) := sorry","Let $R$ be the region consisting of all triples $(x,y,z)$ of nonnegative real numbers satisfying $x+y+z \leq 1$. Let $w=1-x-y-z$. Express the value of the triple integral $\iiint_R x^1y^9z^8w^4\,dx\,dy\,dz$ in the form $a!b!c!d!/n!$, where $a$, $b$, $c$, $d$, and $n$ are positive integers.",Show that the integral we desire is $1!9!8!4!/25!$.,['analysis'],"Section putnam_1984_a5. Require Import Reals Factorial Coquelicot.Coquelicot. Open Scope R. Definition putnam_1984_a5_solution := INR (fact 9 * fact 8 * fact 4 / fact 25). Theorem putnam_1984_a5: RInt (fun z => RInt (fun y => RInt (fun x => x * pow y 9 * pow z 8 * pow (1 - x - y - z) 4) 0 (1 - y - z)) 0 (1 - z)) 0 1 = putnam_1984_a5_solution. Proof. Admitted. End putnam_1984_a5.","theory putnam_1984_a5 imports Complex_Main ""HOL-Analysis.Finite_Cartesian_Product"" ""HOL-Analysis.Set_Integral"" begin definition putnam_1984_a5_solution :: ""nat \ nat \ nat \ nat \ nat"" where ""putnam_1984_a5_solution \ undefined"" (* (1, 9, 8, 4, 25) *) theorem putnam_1984_a5: fixes R :: ""(real \ real \ real) set"" and w :: ""(real \ real \ real) \ real"" defines ""R \ {(x :: real, y :: real, z :: real). x \ 0 \ y \ 0 \ z \ 0 \ x + y + z \ 1}"" and ""w \ \ (x :: real, y :: real, z :: real). 1 - x - y - z"" shows ""let (a, b, c, d, n) = putnam_1984_a5_solution in a > 0 \ b > 0 \ c > 0 \ d > 0 \ n > 0 \ set_lebesgue_integral lebesgue R (\ (x, y, z). x^1 * y^9 * z^8 * (w (x, y, z))^4) = (real_of_nat ((fact a) * (fact b) * (fact c) * (fact d)))/(fact n)"" sorry end", putnam_1984_a6,"abbrev putnam_1984_a6_solution : Prop × ℕ := sorry -- (True, 4) theorem putnam_1984_a6 (lastnzdig : List ℕ → ℕ) (f : ℕ → ℕ) (kadistinct : ℕ → (ℕ → ℕ) → Prop := fun k : ℕ => fun a : ℕ → ℕ => (k ≥ 1 ∧ ∀ i j : Fin k, i ≠ j → a i ≠ a j)) (gpeq : (ℕ → ℕ) → ℕ → Prop := fun g : ℕ → ℕ => fun p : ℕ => (p > 0 ∧ ∀ s ≥ 1, g s = g (s + p))) (hlastnzdig : ∀ digs : List ℕ, (∃ i : Fin digs.length, digs[i] ≠ 0) → lastnzdig digs ≠ 0 ∧ (∃ i : Fin digs.length, digs[i] = lastnzdig digs ∧ ∀ j < i, digs[j] = 0)) (hf : ∀ n > 0, f n = lastnzdig (Nat.digits 10 (n)!)) : ∃ g : ℕ → ℕ, (∀ (k : ℕ) (a : ℕ → ℕ), kadistinct k a → g (∑ i : Fin k, a i) = f (∑ i : Fin k, 5 ^ (a i))) ∧ (if putnam_1984_a6_solution.1 = True then (gpeq g putnam_1984_a6_solution.2 ∧ ∀ p : ℕ, gpeq g p → p ≥ putnam_1984_a6_solution.2) else (¬∃ p : ℕ, gpeq g p)) := sorry","Let $n$ be a positive integer, and let $f(n)$ denote the last nonzero digit in the decimal expansion of $n!$. For instance, $f(5)=2$. \begin{enumerate} \item[(a)] Show that if $a_1,a_2,\dots,a_k$ are \emph{distinct} nonnegative integers, then $f(5^{a_1}+5^{a_2}+\dots+5^{a_k})$ depends only on the sum $a_1+a_2+\dots+a_k$. \item[(b)] Assuming part (a), we can define $g(s)=f(5^{a_1}+5^{a_2}+\dots+5^{a_k})$, where $s=a_1+a_2+\dots+a_k$. Find the least positive integer $p$ for which $g(s)=g(s + p)$, for all $s \geq 1$, or else show that no such $p$ exists. \end{enumerate}",Show that the least such $p$ is $p=4$.,"['algebra', 'number_theory']",,"theory putnam_1984_a6 imports Complex_Main ""HOL-Number_Theory.Cong"" begin definition putnam_1984_a6_solution :: ""bool \ nat"" where ""putnam_1984_a6_solution \ undefined"" (* (True, 4) *) theorem putnam_1984_a6: fixes f :: ""nat \ nat"" and kadistinct :: ""nat \ (nat \ nat) \ bool"" and gpeq :: ""(nat \ nat) \ nat \ bool"" defines ""kadistinct \ \ (k :: nat) (a :: nat \ nat). k \ 1 \ (\ i j :: nat. (i < k \ j < k \ i \ j) \ a i \ a j)"" and ""gpeq \ \ (g :: nat \ nat) (p :: nat). p > 0 \ (\ (s :: nat) \ 1. g s = g (s + p))"" assumes hf : ""\ n > 0. f n = (if [n \ 0] (mod 10) then (n mod 10) else f (n div 10))"" shows ""let (b, n) = putnam_1984_a6_solution in \ g :: nat \ nat. (\ (k :: nat) (a :: nat \ nat). kadistinct k a \ g (\ i=0..(k-1). a i) = f (\ i=0..(k-1). 5^(a i))) \ (if b then gpeq g n \ (\ p :: nat. gpeq g p \ p \ n) else \(\ p :: nat. gpeq g p))"" sorry end", putnam_1984_b1,"abbrev putnam_1984_b1_solution : Polynomial ℝ × Polynomial ℝ := sorry -- (Polynomial.X + 3, -Polynomial.X - 2) theorem putnam_1984_b1 (f : ℕ → ℤ) (hf : ∀ n > 0, f n = ∑ i : Set.Icc 1 n, ((i)! : ℤ)) : let (P, Q) := putnam_1984_b1_solution; ∀ n ≥ 1, f (n + 2) = P.eval (n : ℝ) * f (n + 1) + Q.eval (n : ℝ) * f n := sorry","Let $n$ be a positive integer, and define $f(n)=1!+2!+\dots+n!$. Find polynomials $P(x)$ and $Q(x)$ such that $f(n+2)=P(n)f(n+1)+Q(n)f(n)$ for all $n \geq 1$.",Show that we can take $P(x)=x+3$ and $Q(x)=-x-2$.,['algebra'],"Section putnam_1984_b1. Require Import Factorial ZArith Reals Coquelicot.Coquelicot. Open Scope Z. Definition putnam_1984_b1_solution (coeff1 coeff2 : nat -> Z) (n1 n2 : Z) := (coeff1 = fun x => match x with | O => 3 | S O => 1 | _ => 0 end) /\ (coeff2 = fun x => match x with | O => -2 | S O => -1 | _ => 0 end) /\ n1 = 1 /\ n2 = 1. Theorem putnam_1984_b1 (f : nat -> Z := fun n => (floor (sum_n (fun i => INR (fact (i + 1))) n))) (p: (nat -> Z) -> Z -> (nat -> Z) := fun coeff n => (fun x => (floor (sum_n (fun i => IZR ((coeff i) * (Z.of_nat (x ^ i)))) (Z.to_nat n + 1))))) : exists (coeff1 coeff2 : nat -> Z) (n1 n2 : Z), let fix F (n: nat) := match n with | O => f 0%nat | S O => f 1%nat | S ((S n'') as n') => (p coeff1 n1) n' * F n' + (p coeff2 n2) n'' * F n'' end in f = F -> putnam_1984_b1_solution coeff1 coeff2 n1 n2. Proof. Admitted. End putnam_1984_b1.","theory putnam_1984_b1 imports Complex_Main ""HOL-Computational_Algebra.Polynomial"" begin definition putnam_1984_b1_solution :: ""(real poly) \ (real poly)"" where ""putnam_1984_b1_solution \ undefined"" (* (monom 1 1 + monom 3 0, monom (-1) 1 + monom (-2) 0) *) theorem putnam_1984_b1: fixes f :: ""nat \ nat"" assumes hf : ""\ n > 0. f n = (\ i=1..n. (fact i))"" shows ""let (P, Q) = putnam_1984_b1_solution in \ n \ 1. f (n + 2) = (poly P n) * (f (n + 1)) + (poly Q n) * (f n)"" sorry end", putnam_1984_b2,"abbrev putnam_1984_b2_solution : ℝ := sorry -- 8 theorem putnam_1984_b2 (f : ℝ → ℝ → ℝ) (hf : ∀ u v : ℝ, f u v = (u - v) ^ 2 + (Real.sqrt (2 - u ^ 2) - 9 / v) ^ 2) : (∃ u : Set.Ioo 0 (Real.sqrt 2), ∃ v > 0, f u v = putnam_1984_b2_solution) ∧ (∀ u : Set.Ioo 0 (Real.sqrt 2), ∀ v > 0, f u v ≥ putnam_1984_b2_solution) := sorry",Find the minimum value of $(u-v)^2+(\sqrt{2-u^2}-\frac{9}{v})^2$ for $00$.,Show that the minimum value is $8$.,"['geometry', 'analysis']","Section putnam_1984_b2. Require Import Reals Coquelicot.Coquelicot. Open Scope R. Definition putnam_1984_b2_solution := 8. Theorem putnam_1984_b2: let f (x y: R) := pow (x - y) 2 + pow (sqrt (2 - pow x 2) - 9 / y) 2 in exists (m: R), (forall (x y: R), 0 < x < sqrt 2 /\ y > 0 -> f x y >= m) /\ (exists (x y: R), 0 < x < sqrt 2 /\ y > 0 -> f x y = m) -> m = putnam_1984_b2_solution. Proof. Admitted. End putnam_1984_b2.","theory putnam_1984_b2 imports Complex_Main begin definition putnam_1984_b2_solution :: ""real"" where ""putnam_1984_b2_solution \ undefined"" (* 8 *) theorem putnam_1984_b2: fixes f :: ""real \ real \ real"" defines ""f \ \ u v :: real. (u - v)^2 + (sqrt (2 - u^2) - 9/v)^2"" shows ""(LEAST (r :: real) . (\ u \ {0<.. v > 0. f u v = r)) = putnam_1984_b2_solution"" sorry end", putnam_1984_b3,"abbrev putnam_1984_b3_solution : Prop := sorry -- True theorem putnam_1984_b3 : (∀ (F : Type*) (_ : Fintype F), Fintype.card F ≥ 2 → (∃ mul : F → F → F, ∀ x y z : F, (mul x z = mul y z → x = y) ∧ (mul x (mul y z) ≠ mul (mul x y) z))) ↔ putnam_1984_b3_solution := sorry","Prove or disprove the following statement: If $F$ is a finite set with two or more elements, then there exists a binary operation $*$ on F such that for all $x,y,z$ in $F$, \begin{enumerate} \item[(i)] $x*z=y*z$ implies $x=y$ (right cancellation holds), and \item[(ii)] $x*(y*z) \neq (x*y)*z$ (\emph{no} case of associativity holds). \end{enumerate}",Show that the statement is true.,['abstract_algebra'],,"theory putnam_1984_b3 imports Complex_Main ""HOL-Library.Cardinality"" begin definition putnam_1984_b3_solution :: ""bool"" where ""putnam_1984_b3_solution \ undefined"" (* True *) theorem putnam_1984_b3: shows ""((CARD('a) \ 2 \ (\ n :: nat. CARD('a) = n)) \ (\ mul :: 'a \ 'a \ 'a. \ x y z :: 'a. (mul x z = mul y z \ x = y) \ (mul x (mul y z) \ mul (mul x y) z))) \ putnam_1984_b3_solution"" sorry end", putnam_1984_b5,"abbrev putnam_1984_b5_solution : ℤ × Polynomial ℝ × Polynomial ℕ := sorry -- (2, (Polynomial.X * (Polynomial.X - 1)) / 2, Polynomial.X) theorem putnam_1984_b5 (sumbits : List ℕ → ℕ) (d : ℕ → ℕ) (m : ℕ) (hsumbits : ∀ bits : List ℕ, sumbits bits = ∑ i : Fin bits.length, bits[i]) (hd : ∀ k : ℕ, d k = sumbits (Nat.digits 2 k)) (mpos : m > 0) : let (a, f, g) := putnam_1984_b5_solution; ∑ k : Set.Icc 0 (2 ^ m - 1), (-(1 : ℤ)) ^ (d k) * (k : ℕ) ^ m = (-1) ^ m * (a : ℝ) ^ (f.eval (m : ℝ)) * (g.eval m)! := sorry","For each nonnegative integer $k$, let $d(k)$ denote the number of $1$'s in the binary expansion of $k$ (for example, $d(0)=0$ and $d(5)=2$). Let $m$ be a positive integer. Express $\sum_{k=0}^{2^m-1} (-1)^{d(k)}k^m$ in the form $(-1)^ma^{f(m)}(g(m))!$, where $a$ is an integer and $f$ and $g$ are polynomials.",Show that $\sum_{k=0}^{2^m-1} (-1)^{d(k)}k^m=(-1)^m2^{m(m-1)/2}m!$.,"['algebra', 'analysis']","Section putnam_1984_b5. Require Import Nat Reals Coquelicot.Coquelicot. Definition putnam_1984_b5_solution (coeff1 coeff2 : nat -> R) (n1 n2: nat) (a: Z) := a = 2%Z /\ (coeff1 = fun x => match x with | O => 0 | S O => -1 / 2 | S (S O) => 1 / 2 | _ => 0 end) /\ (coeff2 = fun x => match x with | O => 0 | S O => INR x | _ => 0 end) /\ n1 = 2%nat /\ n2 = 1%nat. Theorem putnam_1984_b5 (f : positive -> nat := fix f (n : positive) : nat := match n with | xH => 1%nat | xO n' => f n' | xI n' => add 1 (f n') end) (g : nat -> R := fun m => sum_n (fun k => (-1) ^ (f (Pos.of_nat k)) * INR k ^ m) (2 ^ m - 1)) (p: (nat -> R) -> nat -> (R -> R) := fun coeff n => (fun x => sum_n (fun i => coeff i * x ^ i) (n + 1))) : forall (m : nat), exists (a : Z) (coeff1 coeff2 : nat -> R) (n1 n2: nat), g m = (-1) ^ m * Rpower (IZR a) ((p coeff1 n1) (INR m)) * INR (fact (Z.to_nat (floor ((p coeff2 n2) (INR m))))) <-> putnam_1984_b5_solution coeff1 coeff2 n1 n2 a. Proof. Admitted. End putnam_1984_b5.","theory putnam_1984_b5 imports Complex_Main ""HOL-Computational_Algebra.Polynomial"" begin definition putnam_1984_b5_solution :: ""int \ (real poly) \ (nat poly)"" where ""putnam_1984_b5_solution \ undefined"" (* (2, ((monom 1 1) * ((monom 1 1) - 1)) * (monom (1/2) 0), monom 1 1) *) theorem putnam_1984_b5: fixes d :: ""nat \ nat"" and m :: ""nat"" assumes mpos : ""m > 0"" and hd : ""\ n::nat. d n = (if n < 2 then n else ((n mod 2::nat) + d (n div 2::nat)))"" shows ""let (a, f, g) = putnam_1984_b5_solution in (\ k=0..(2^m-1). (-1::int)^(d k) * k^m) = (-1::int)^m * (a powr (poly f m)) * (fact (poly g m))"" sorry end", putnam_2009_a1,"abbrev putnam_2009_a1_solution : Prop := sorry -- True theorem putnam_2009_a1 : ((∀ f : (ℝ × ℝ) → ℝ, (∀ O v : ℝ × ℝ, v ≠ (0, 0) → f (O.1, O.2) + f (O.1 + v.1, O.2 + v.2) + f (O.1 + v.1 - v.2, O.2 + v.2 + v.1) + f (O.1 - v.2, O.2 + v.1) = 0) → ∀ P : ℝ × ℝ, f P = 0) ↔ putnam_2009_a1_solution) := sorry","Let $f$ be a real-valued function on the plane such that for every square $ABCD$ in the plane, $f(A)+f(B)+f(C)+f(D)=0$. Does it follow that $f(P)=0$ for all points $P$ in the plane?",Prove that $f$ is identically $0$.,"['geometry', 'algebra']","Section putnam_2009_a1. Require Import Reals GeoCoq.Main.Tarski_dev.Ch16_coordinates_with_functions. Context `{T2D:Tarski_2D} `{TE:@Tarski_euclidean Tn TnEQD}. Open Scope R. Definition putnam_2009_a1_solution := True. Theorem putnam_2009_a1 (f: Tpoint -> R) : ((forall (A B C D: Tpoint), Square A B C D -> f A + f B + f C + f D = 0) -> forall (P : Tpoint), f P = 0) <-> putnam_2009_a1_solution. Proof. Admitted. End putnam_2009_a1.","theory putnam_2009_a1 imports Complex_Main begin definition putnam_2009_a1_solution :: bool where ""putnam_2009_a1_solution \ undefined"" (* True *) theorem putnam_2009_a1: shows ""(\f::(real\real)\real. (\A v::real\real. v \ (0, 0) \ f (fst A, snd A) + f (fst A+fst v, snd A+snd v) + f (fst A+fst v-snd v, snd A+snd v+fst v) + f (fst A-snd v, snd A+fst v) = 0) \ (\P::real\real. f P = 0)) \ putnam_2009_a1_solution"" sorry end ", putnam_2009_a3,"abbrev putnam_2009_a3_solution : ℝ := sorry -- 0 theorem putnam_2009_a3 (cos_matrix : (n : ℕ) → Matrix (Fin n) (Fin n) ℝ) (hM : ∀ n : ℕ, ∀ i j : Fin n, (cos_matrix n) i j = Real.cos (1 + n * i + j)) : Tendsto (fun n => (cos_matrix n).det) atTop (𝓝 putnam_2009_a3_solution) := sorry","Let $d_n$ be the determinant of the $n \times n$ matrix whose entries, from left to right and then from top to bottom, are $\cos 1, \cos 2, \dots, \cos n^2$. (For example,\[ d_3 = \left|\begin{matrix} \cos 1 & \cos 2 & \cos 3 \\ \cos 4 & \cos 5 & \cos 6 \\ \cos 7 & \cos 8 & \cos 9 \end{matrix} \right|. \]The argument of $\cos$ is always in radians, not degrees.) Evaluate $\lim_{n\to\infty} d_n$.",Show that the limit is 0.,"['linear_algebra', 'analysis']",,"theory putnam_2009_a3 imports Complex_Main ""HOL-Combinatorics.Permutations"" begin definition putnam_2009_a3_solution :: real where ""putnam_2009_a3_solution \ undefined"" (* 0 *) theorem putnam_2009_a3: fixes cos_matrix :: ""nat \ (nat \ nat \ real)"" and ndet :: ""nat \ (nat \ nat \ real) \ real"" assumes hM: ""\n::nat. \i::nat\{0..(n-1)}. \j::nat\{0..(n-1)}. (cos_matrix n) i j = cos (1 + n * i + j)"" defines ""ndet \ (\(n::nat)(A::nat\nat\real). (\p\{p'::nat\nat. p' permutes {0..(n-1)} \ (\i::nat\n. p' i = i)}. (sign p * (\i::nat=0..(n-1). A i (p i)))))"" shows ""filterlim (\n::nat. ndet n (cos_matrix n)) (nhds putnam_2009_a3_solution) at_top"" sorry end ", putnam_2009_a4,"abbrev putnam_2009_a4_solution : Prop := sorry -- False theorem putnam_2009_a4 : ((∀ S : Set ℚ, 0 ∈ S → (∀ x ∈ S, x + 1 ∈ S ∧ x - 1 ∈ S) → (∀ x ∈ S, x ∉ ({0, 1} : Set ℚ) → 1 / (x * (x - 1)) ∈ S) → ∀ r : ℚ, r ∈ S) ↔ putnam_2009_a4_solution) := sorry","Let $S$ be a set of rational numbers such that \begin{enumerate} \item[(a)] $0 \in S$; \item[(b)] If $x \in S$ then $x+1\in S$ and $x-1\in S$; and \item[(c)] If $x\in S$ and $x\not\in\{0,1\}$, then $\frac{1}{x(x-1)}\in S$. \end{enumerate} Must $S$ contain all rational numbers?",Prove that $S$ need not contain all rationals.,['number_theory'],"Section putnam_2009_a4. Require Import Ensembles QArith. Definition putnam_2009_a4_solution := False. Theorem putnam_2009_a4: forall (E: Ensemble Q), (forall (q: Q), E q <-> q = 0 /\ E q -> E (q + 1) /\ E (q - 1) /\ E q /\ q <> 0 /\ q <> 1 -> E (1 / (q * (q - 1)))) -> forall (q: Q), E q <-> putnam_2009_a4_solution. Proof. Admitted. End putnam_2009_a4.","theory putnam_2009_a4 imports Complex_Main begin definition putnam_2009_a4_solution :: bool where ""putnam_2009_a4_solution \ undefined"" (* False *) theorem putnam_2009_a4: shows ""(\S::rat set. 0 \ S \ (\x\S. x+1 \ S \ x-1 \ S) \ (\x\S. x \ {0, 1} \ 1 / (x*(x-1)) \ S) \ (\r::rat. r \ S)) \ putnam_2009_a4_solution"" sorry end ", putnam_2009_a5,"abbrev putnam_2009_a5_solution : Prop := sorry -- False theorem putnam_2009_a5 : (∃ (G : Type*) (_ : CommGroup G) (_ : Fintype G), ∏ g : G, orderOf g = 2^2009) ↔ putnam_2009_a5_solution := sorry",Is there a finite abelian group $G$ such that the product of the orders of all its elements is 2^{2009}?,Show that the answer is no such finite abelian group exists.,['abstract_algebra'],,"theory putnam_2009_a5 imports Complex_Main ""HOL-Algebra.Multiplicative_Group"" begin definition putnam_2009_a5_solution :: bool where ""putnam_2009_a5_solution \ undefined"" (* False *) theorem putnam_2009_a5: assumes pacount: ""\pamap::'a\nat. surj pamap"" shows ""(\G::'a monoid. finite (carrier G) \ comm_group G \ (\g\(carrier G). (group.ord G) g) = 2^2009) \ putnam_2009_a5_solution"" sorry end ", putnam_2009_b1,"theorem putnam_2009_b1 (isquotprodprimefact : ℚ → Prop := fun q => (∃ (k m : ℕ) (a : Fin k → ℕ) (b : Fin m → ℕ), (∀ i : Fin k, Nat.Prime (a i)) ∧ (∀ j : Fin m, Nat.Prime (b j)) ∧ (q = (∏ i : Fin k, Nat.factorial (a i))/(∏ j : Fin m, Nat.factorial (b j))) )) : ∀ q : ℚ, q > 0 → isquotprodprimefact q := sorry","Show that every positive rational number can be written as a quotient of products of factorails of (not necessarily distinct) primes. For example, 10/9 = (2! * 5!)/(3! * 3! * 3!).",,['number_theory'],"Section putnam_2009_b1. Require Import List QArith Znumtheory Reals. Open Scope Q. Theorem putnam_2009_b1: let fix factl (l : list nat) : list nat := match l with | nil => nil | h :: t => fact h :: t end in forall (q: Q), q > 0 -> exists (n d: list nat), (forall x, (In x n \/ In x d)-> prime (Z.of_nat x)) /\ inject_Z (Z.of_nat (fold_left Nat.mul (factl n) 1%nat)) / inject_Z (Z.of_nat (fold_left Nat.mul (factl d) 1%nat)) = q. Proof. Admitted. End putnam_2009_b1.","theory putnam_2009_b1 imports Complex_Main ""HOL-Computational_Algebra.Primes"" begin (* uses (nat \ nat) instead of (Fin k \ nat) and (Fin m \ nat) *) theorem putnam_2009_b1: fixes isquotprodprimefact :: ""rat \ bool"" defines ""isquotprodprimefact \ (\q::rat. (\(k::nat)(m::nat)(a::nat\nat)(b::nat\nat). (\i::nat\{0..(k-1)}. prime (a i)) \ (\j::nat\{0..(m-1)}. prime (b j)) \ q = (\i::nat=0..(k-1). fact (a i)) / (\j::nat=0..(m-1). fact (b j))))"" shows ""\q::rat. (q > 0 \ isquotprodprimefact q)"" sorry end ", putnam_2009_b3,"abbrev putnam_2009_b3_solution : Set ℤ := sorry -- {n : ℤ | ∃ k ≥ 1, n = 2 ^ k - 1} theorem putnam_2009_b3 (mediocre : ℤ → Set ℤ → Prop := fun n S ↦ (S ⊆ Icc 1 n) ∧ ∀ a ∈ S, ∀ b ∈ S, 2 ∣ a + b → (a + b) / 2 ∈ S) (A : ℤ → ℤ := fun n ↦ {S : Set ℤ | mediocre n S}.ncard) : ({n : ℤ | n > 0 ∧ A (n + 2) - 2 * A (n + 1) + A n = 1} = putnam_2009_b3_solution) := sorry","Call a subset $S$ of $\{1, 2, \dots, n\}$ \emph{mediocre} if it has the following property: Whenever $a$ and $b$ are elements of $S$ whose average is an integer, that average is also an element of $S$. Let $A(n)$ be the number of mediocre subsets of $\{1,2,\dots,n\}$. [For instance, every subset of $\{1,2,3\}$ except $\{1,3\}$ is mediocre, so $A(3) = 7$.] Find all positive integers $n$ such that $A(n+2) - 2A(n+1) + A(n) = 1$.",Show that the answer is $n = 2^k - 1$ for some integer $k$.,['number_theory'],,"theory putnam_2009_b3 imports Complex_Main begin definition putnam_2009_b3_solution :: ""nat set"" where ""putnam_2009_b3_solution \ undefined"" (* {n::nat. (\k::nat\1. n = 2^k - 1)} *) theorem putnam_2009_b3: fixes mediocre :: ""nat \ nat set \ bool"" and A :: ""nat \ int"" defines ""mediocre \ (\(n::nat)(S::nat set). S \ {1..n} \ (\a\S. \b\S. 2 dvd (a + b) \ (nat (round ((a + b)/2))) \ S))"" and ""A \ (\n::nat. card {S::nat set. mediocre n S})"" shows ""{n::nat. n > 0 \ A (n+2) - 2*A (n+1) + A n = 1} = putnam_2009_b3_solution"" sorry end ", putnam_2009_b4,"abbrev putnam_2009_b4_solution : ℕ := sorry -- 2020050 theorem putnam_2009_b4 (balanced : MvPolynomial (Fin 2) ℝ → Prop := fun P ↦ ∀ r > 0, (∫ x in Metric.sphere 0 r, MvPolynomial.eval x P) / (2 * Real.pi * r) = 0) (V : Set (MvPolynomial (Fin 2) ℝ)) [AddCommGroup V] [Module ℝ V] (hV : ∀ P : MvPolynomial (Fin 2) ℝ, P ∈ V ↔ balanced P ∧ P.totalDegree ≤ 2009) : (Module.rank V = putnam_2009_b4_solution) := sorry","Say that a polynomial with real coefficients in two variables, $x,y$, is \emph{balanced} if the average value of the polynomial on each circle centered at the origin is $0$. The balanced polynomials of degree at most $2009$ form a vector space $V$ over $\mathbb{R}$. Find the dimension of $V$.",Prove that the dimension of $V$ is $2020050$.,"['algebra', 'linear_algebra']",,"theory putnam_2009_b4 imports Complex_Main ""HOL-Computational_Algebra.Polynomial"" ""HOL-Analysis.Set_Integral"" ""HOL-Analysis.Lebesgue_Measure"" begin definition putnam_2009_b4_solution :: nat where ""putnam_2009_b4_solution \ undefined"" (* 2020050 *) definition mvpolyscale :: ""real \ (real poly poly) \ (real poly poly)"" where ""mvpolyscale \ (\(c::real)(P::real poly poly). smult (monom c 0) P)"" interpretation mvpolyspace: vector_space ""mvpolyscale"" sorry theorem putnam_2009_b4: fixes balanced :: ""(real poly poly) \ bool"" and V :: ""(real poly poly) set"" defines ""balanced \ (\P::real poly poly. (\r::real>0. (set_lebesgue_integral lebesgue (sphere 0 r) (\x::real^2. poly (poly P (monom (x$2) 0)) (x$1))) / (2*pi*r) = 0))"" assumes hV: ""\P::real poly poly. (P \ V \ (balanced P \ degree P \ 2009 \ (\i::nat. degree (coeff P i) \ 2009)))"" shows ""mvpolyspace.dim V = putnam_2009_b4_solution"" sorry end ", putnam_2009_b5,"theorem putnam_2009_b5 (f : ℝ → ℝ) (hfdiff : DifferentiableOn ℝ f (Ioi 1)) (hf : ∀ x > 1, deriv f x = (x ^ 2 - (f x) ^ 2) / ((x ^ 2) * ((f x) ^ 2 + 1))) : (Tendsto f ⊤ ⊤) := sorry","Let $f: (1, \infty) \to \mathbb{R}$ be a differentiable function such that \[ f'(x) = \frac{x^2 - f(x)^2}{x^2 (f(x)^2 + 1)} \qquad \mbox{for all $x>1$.} \] Prove that $\lim_{x \to \infty} f(x) = \infty$.",,['analysis'],"Section putnam_2009_b5. Require Import Reals Coquelicot.Coquelicot. Theorem putnam_2009_b5: forall (f: R -> R) (x: R), (1 < x /\ ex_derive f x /\ Derive f x = (x ^ 2 - (f x) ^ 2) / (x ^ 2 * ((f x) ^ 2 + 1))) -> ~ ex_lim_seq (fun n => f (INR n)). Proof. Admitted. End putnam_2009_b5.","theory putnam_2009_b5 imports Complex_Main ""HOL-Analysis.Derivative"" begin (* uses (real \ real) instead of ({1<..} \ real) *) theorem putnam_2009_b5: fixes f :: ""real \ real"" assumes hfdiff: ""f differentiable_on {1<..}"" and f: ""\x::real>1. deriv f x = (x^2 - (f x)^2) / (x^2 * ((f x)^2 + 1))"" shows ""filterlim f at_top at_top"" sorry end ", putnam_2009_b6,"theorem putnam_2009_b6 (n : ℕ) (npos : n > 0) : (∃ a : ℕ → ℤ, a 0 = 0 ∧ a 2009 = n ∧ ∀ i : Icc 1 2009, ((∃ j k : ℕ, j < i ∧ a i = a j + 2 ^ k) ∨ ∃ b c : ℕ, b < i ∧ c < i ∧ a b > 0 ∧ a c > 0 ∧ a i = (a b) % (a c))) := sorry","Prove that for every positive integer $n$, there is a sequence of integers $a_0, a_1, \dots, a_{2009}$ with $a_0 = 0$ and $a_{2009} = n$ such that each term after $a_0$ is either an earlier term plus $2^k$ for some nonnegative integer $k$, or of the form $b\,\mathrm{mod}\,c$ for some earlier positive terms $b$ and $c$. [Here $b\,\mathrm{mod}\,c$ denotes the remainder when $b$ is divided by $c$, so $0 \leq (b\,\mathrm{mod}\,c) < c$.]",,['number_theory'],"Section putnam_2009_b6. Require Import List ZArith Coquelicot.Coquelicot. Open Scope Z. Theorem putnam_2009_b6: forall (n: Z), n > 0 -> exists (a: list Z), length a = 2009%nat /\ nth 0 a 0 = 0 /\ nth 2008 a 0 = n /\ forall (i: nat), and (le 1 i) (lt i 2009) -> exists (j: nat), and (le 0 j) (lt j i) /\ ((exists (k: Z), k > 0 /\ nth i a 0 = nth j a 0 + 2 ^ k) \/ exists (b c: Z), b > 0 /\ c > 0 /\ nth i a 0 = b mod c). Proof. Admitted. End putnam_2009_b6.","theory putnam_2009_b6 imports Complex_Main begin (* uses (nat \ int) instead of ({0..2009} \ int) *) theorem putnam_2009_b6: fixes n :: nat assumes npos: ""n > 0"" shows ""\a::nat\int. a 0 = 0 \ a 2009 = n \ (\i::nat\{1..2009}. (\j::natk::nat. a i = a j + 2^k) \ (\b::natc::nat 0 \ a c > 0 \ a i = (a b) mod (a c)))"" sorry end ", putnam_2020_a1,"abbrev putnam_2020_a1_solution : ℕ := sorry -- 508536 theorem putnam_2020_a1 : Set.ncard {x : ℕ | (2020 ∣ x) ∧ (Nat.log 10 x) + 1 ≤ 2020 ∧ (∃ k l, k ≥ l ∧ x = ∑ i in Finset.range (k-l+1), 10 ^ (i+l))} = putnam_2020_a1_solution := sorry","Find the number of positive integers $N$ satisfying: (i) $N$ is divisible by $2020$, (ii) $N$ has at most $2020$ decimal digits, (iii) The decimal digits of $N$ are a string of consecutive ones followed by a string of consecutive zeros.",Show that the solution is $508536$.,"['number_theory', 'algebra']","Section putnam_2020_a1. Require Import Ensembles Finite_sets Rdefinitions Reals Rpower. From mathcomp Require Import bigop div fintype ssralg ssrnat ssrnum. Definition putnam_2020_a1_solution := 508536. Theorem putnam_2020_a1: exists (A: Ensemble nat), forall (n: nat), ( (2020 %| n = true /\ (Rle (Rlog (INR 10) (INR n) + R1) (INR 2020)) /\ exists (k l: nat), k >= l = true /\ n = \sum_(i < k-l+1) 10^(i+l)) <-> A n ) -> cardinal nat A putnam_2020_a1_solution. Proof. Admitted. End putnam_2020_a1.","theory putnam_2020_a1 imports Complex_Main begin definition putnam_2020_a1_solution::nat where ""putnam_2020_a1_solution \ undefined"" (* 508536 *) theorem putnam_2020_a1: fixes S::""nat set"" defines ""S \ {x. (2020 dvd x) \ \log 10 x\ + 1 \ 2020 \ (\k l::nat. k \ l \ x = (\i=0..(k-l). 10^(i+l)))}"" shows ""card S = putnam_2020_a1_solution"" sorry end ", putnam_2020_a2,"abbrev putnam_2020_a2_solution : ℕ → ℕ := sorry -- fun k ↦ 4 ^ k theorem putnam_2020_a2 (k : ℕ) : (∑ j in Finset.Icc 0 k, 2 ^ (k - j) * Nat.choose (k + j) j = putnam_2020_a2_solution k) := sorry","Let $k$ be a nonnegative integer. Evaluate \[ \sum_{j=0}^k 2^{k-j} \binom{k+j}{j}. \] ",Show that the answer is $4^k$.,['algebra'],"Section putnam_2020_a2. Require Import Reals Coquelicot.Coquelicot. Definition putnam_2020_a2_solution := fun k => 4 ^ k. Theorem putnam_2020_a2 : (fun k => sum_n (fun j => 2 ^ (k - j) * Binomial.C (k + j) j) (k + 1)) = putnam_2020_a2_solution. Proof. Admitted. End putnam_2020_a2.","theory putnam_2020_a2 imports Complex_Main begin definition putnam_2020_a2_solution :: ""nat \ nat"" where ""putnam_2020_a2_solution \ undefined"" (* \ k. 4 ^ k *) theorem putnam_2020_a2: fixes k :: nat shows ""(\ j = 0..k. 2 ^ (k - j) * (k + j choose j)) = putnam_2020_a2_solution k"" sorry end", putnam_2020_a3,"abbrev putnam_2020_a3_solution : Prop := sorry -- False theorem putnam_2020_a3 (a : ℕ → ℝ) (ha0 : a 0 = Real.pi / 2) (ha : ∀ n : ℕ, n ≥ 1 → a n = Real.sin (a (n - 1))) : (∃ L : ℝ, Tendsto (fun m : ℕ => ∑ n : Icc 1 m, (a n)^2) atTop (𝓝 L)) ↔ putnam_2020_a3_solution := sorry","Let $a_0 = \pi/2$, and let $a_n = \sin(a_{n-1})$ for $n \geq 1$. Determine whether \[ \sum_{n=1}^\infty a_n^2 \] converges.",The series diverges.,['analysis'],"Section putnam_2020_a3. Require Import Reals Coquelicot.Coquelicot. Definition putnam_2020_a3_solution := False. Theorem putnam_2020_a3 (a : nat -> R := fix a (n: nat) := match n with | O => PI / 2 | S n' => sin (a n') end) : ex_lim_seq (fun n => (a n) ^ 2) <-> putnam_2020_a3_solution. Proof. Admitted. End putnam_2020_a3.","theory putnam_2020_a3 imports Complex_Main begin definition putnam_2020_a3_solution :: bool where ""putnam_2020_a3_solution \ undefined"" (* False *) theorem putnam_2020_a3: fixes a :: ""nat \ real"" assumes ha0: ""a 0 = pi/2"" and ha: ""\n::nat\1. a n = sin (a (n-1))"" shows ""(\L::real. filterlim (\m::nat. (\n::nat=1..m. (a n)^2)) (nhds L) at_top) \ putnam_2020_a3_solution"" sorry end ", putnam_2020_a5,"abbrev putnam_2020_a5_solution : ℤ := sorry -- (Nat.fib 4040) - 1 theorem putnam_2020_a5 (a : ℤ → ℕ := fun n : ℤ => {S : Finset ℕ | (∀ k ∈ S, k > 0) ∧ ∑ k : S, Nat.fib k = n}.ncard) : a putnam_2020_a5_solution = 2020 ∧ ∀ n : ℤ, a n = 2020 → n ≤ putnam_2020_a5_solution := sorry","Let $a_n$ be the number of sets $S$ of positive integers for which \[ \sum_{k \in S} F_k = n, \] where the Fibonacci sequence $(F_k)_{k \geq 1}$ satisfies $F_{k+2} = F_{k+1} + F_k$ and begins $F_1 = 1, F_2 = 1, F_3 = 2, F_4 = 3$. Find the largest integer $n$ such that $a_n = 2020$.",The answer is $n=F_{4040}-1$.,"['number_theory', 'combinatorics']",,"theory putnam_2020_a5 imports Complex_Main ""HOL-Number_Theory.Fib"" begin definition putnam_2020_a5_solution :: int where ""putnam_2020_a5_solution \ undefined"" (* (fib 4040) - 1 *) theorem putnam_2020_a5: fixes a :: ""int \ nat"" defines ""a \ (\n::int. card {S::nat set. finite S \ (\k\S. k > 0) \ (\k\S. fib k) = n})"" shows ""(GREATEST n::int. a n = 2020) = putnam_2020_a5_solution"" sorry end ", putnam_2020_a6,"abbrev putnam_2020_a6_solution : ℝ := sorry -- Real.pi / 4 theorem putnam_2020_a6 (f : ℤ → (ℝ → ℝ) := fun N : ℤ => fun x : ℝ => ∑ n in Finset.Icc 0 N, (N + 1/2 - n)/((N + 1)*(2*n + 1)) * Real.sin ((2*n + 1)*x)) : (∀ N > 0, ∀ x : ℝ, f N x ≤ putnam_2020_a6_solution) ∧ ∀ M : ℝ, (∀ N > 0, ∀ x : ℝ, f N x ≤ M) → M ≥ putnam_2020_a6_solution := sorry","For a positive integer $N$, let $f_N$ be the function defined by \[ f_N(x) = \sum_{n=0}^N \frac{N+1/2-n}{(N+1)(2n+1)} \sin((2n+1)x). \] Determine the smallest constant $M$ such that $f_N(x) \leq M$ for all $N$ and all real $x$.",The smallest constant $M$ is $\pi/4$.,['algebra'],"Section putnam_2020_a6. Require Import Reals Coquelicot.Coquelicot. Definition putnam_2020_a6_solution := PI / 4. Theorem putnam_2020_a6 (f : Z -> (R -> R) := fun Nz : Z => fun x : R => sum_n (fun n => let N := IZR Nz in let n := INR n in (N + 1 / 2 - n) / ((N + 1) * (2 * n + 1)) * sin ((2 * n + 1) * x)) (Z.to_nat Nz + 1)) (M : R) (hM : forall (N: Z), Z.gt N 0 -> forall (x: R), f N x <= M) (hMlb : forall (n: R), (forall (N: Z), Z.gt N 0 -> forall (x: R), f N x <= n) -> n >= M) : M = putnam_2020_a6_solution. Proof. Admitted. End putnam_2020_a6.","theory putnam_2020_a6 imports Complex_Main begin definition putnam_2020_a6_solution :: real where ""putnam_2020_a6_solution \ undefined"" (* pi/4 *) theorem putnam_2020_a6: fixes f :: ""int \ (real \ real)"" assumes ""f \ (\N::int. (\x::real. (\n::int=0..N. (N + 1/2 - n) / ((N + 1)*(2*n + 1)) * sin ((2*n + 1)*x))))"" shows ""(LEAST M::real. (\N::int>0. \x::real. f N x \ M)) = putnam_2020_a6_solution"" sorry end ", putnam_2020_b1,"abbrev putnam_2020_b1_solution : ℕ := sorry -- 1990 theorem putnam_2020_b1 (d : ℕ → ℕ := fun n : ℕ => ∑ i : Fin (Nat.digits 2 n).length, (Nat.digits 2 n)[i]!) (S : ℤ := ∑ k : Icc 1 2020, ((-1)^(d k))*(k : ℕ)^3) : S % 2020 = putnam_2020_b1_solution := sorry","For a positive integer $n$, define $d(n)$ to be the sum of the digits of $n$ when written in binary (for example, $d(13) = 1+1+0+1=3)$. Let \[ S = \sum_{k=1}^{2020} (-1)^{d(k)} k^3. \] Determine $S$ modulo 2020.",The answer is $1990$.,['algebra'],"Section putnam_2020_b1. Require Import ZArith Reals Coquelicot.Coquelicot. Open Scope Z. Definition putnam_2020_b1_solution := 1990. Theorem putnam_2020_b1 (d : positive -> Z := fix d (n : positive) := match n with | xH => 1 | xO n' => d n'%positive | xI n' => 1 + d n'%positive end) (A := sum_n (fun k => IZR ((-1) ^ (d (Pos.of_nat (S k))) * (Z.of_nat k) ^ 3)) 2020) : (floor A) mod 2020 = putnam_2020_b1_solution. Proof. Admitted. End putnam_2020_b1.","theory putnam_2020_b1 imports Complex_Main begin definition putnam_2020_b1_solution :: nat where ""putnam_2020_b1_solution \ undefined"" (* 1990 *) theorem putnam_2020_b1: fixes d :: ""int \ nat"" and S :: ""int"" assumes ""d \ (\n::int. if n = 0 then 0 else ((n mod 2) + d \n / 2\))"" and ""S \ \k::int=1..2020. (-1)^(d k) * k^3"" shows ""S mod 2020 = putnam_2020_b1_solution"" sorry end ", putnam_2020_b4,"abbrev putnam_2020_b4_solution : ℝ := sorry -- 1 / 4040 theorem putnam_2020_b4 (V : ℕ → Set (ℕ → ℤ) := fun n ↦ ({s : ℕ → ℤ | s 0 = 0 ∧ (∀ j ≥ 2 * n, s j = 0) ∧ (∀ j ∈ Icc 1 (2 * n), |s j - s (j - 1)| = 1)})) (q : ℕ → (ℕ → ℤ) → ℝ := fun n s ↦ 1 + ∑ j in Finset.Icc 1 (2 * n - 1), 3 ^ (s j)) (M : ℕ → ℝ := fun n ↦ (∑' v : V n, 1 / (q n v)) / (V n).ncard) : (M 2020 = putnam_2020_b4_solution) := sorry","Let $n$ be a positive integer, and let $V_n$ be the set of integer $(2n+1)$-tuples $\mathbf{v} = (s_0, s_1, \cdots, s_{2n-1}, s_{2n})$ for which $s_0 = s_{2n} = 0$ and $|s_j - s_{j-1}| = 1$ for $j=1,2,\cdots,2n$. Define \[ q(\mathbf{v}) = 1 + \sum_{j=1}^{2n-1} 3^{s_j}, \] and let $M(n)$ be the average of $\frac{1}{q(\mathbf{v})}$ over all $\mathbf{v} \in V_n$. Evaluate $M(2020)$.",Show that the answer is $\frac{1}{4040}$.,['algebra'],,"theory putnam_2020_b4 imports Complex_Main begin definition putnam_2020_b4_solution :: real where ""putnam_2020_b4_solution \ undefined"" (* 1 / 4040 *) theorem putnam_2020_b4: fixes V :: ""nat \ (nat \ int) set"" and q :: ""nat \ (nat \ int) \ real"" and M :: ""nat \ real"" defines ""V \ \ n. {s. s 0 = 0 \ (\ j \ 2 * n. s j = 0) \ (\ j \ {1 .. (2 * n)}. \s j - s (j - 1)\ = 1)}"" and ""q \ \ n s. 1 + (\ j = 1 .. 2 * n - 1. 3 powr (s j))"" and ""M \ \ n. (\ v \ V n. 1 / (q n v)) / card (V n)"" shows ""M 2020 = putnam_2020_b4_solution"" sorry end", putnam_2020_b5,"theorem putnam_2020_b5 (z : Fin 4 → ℂ) (hzle1 : ∀ n, ‖z n‖ < 1) (hzne1 : ∀ n, z n ≠ 1) : 3 - z 0 - z 1 - z 2 - z 3 + (z 0) * (z 1) * (z 2) * (z 3) ≠ 0:= sorry","For $j \in \{1, 2, 3, 4\}$, let $z_j$ be a complex number with $|z_j| = 1$ and $z_j \neq 1$. Prove that \[ 3 - z_1 - z_2 - z_3 - z_4 + z_1 z_2 z_3 z_4 \neq 0. \]",,['algebra'],,"theory putnam_2020_b5 imports Complex_Main begin (* Note: Boosted domain to infinite set *) theorem putnam_2020_b5: fixes z :: ""nat \ complex"" assumes hz: ""\n \ {1..4}. norm (z n) = 1"" and hzne1: ""\n \ {1..4}. z n \ 1"" shows ""3 - z 1 - z 2 - z 3 - z 4 + z 1 * z 2 * z 3 * z 4 \ 0"" sorry end ", putnam_2020_b6,"theorem putnam_2020_b6 (n : ℕ) (npos : n > 0) : ∑ k : Fin n, ((-1) ^ Int.floor ((k.1 + 1) * (Real.sqrt 2 - 1)) : ℝ) ≥ 0 := sorry",Let $n$ be a positive integer. Prove that $\sum_{k=1}^n(-1)^{\lfloor k(\sqrt{2}-1) \rfloor} \geq 0$.,,['algebra'],"Section putnam_2020_b6. Require Import Reals. From Coquelicot Require Import Coquelicot Hierarchy Rcomplements. Local Open Scope R. Theorem putnam_2020_b6: let A (k: nat) := (-1)^(Z.to_nat (floor (INR k * (sqrt 2 - 1)))) in let B (n: nat) := sum_n A n in forall (n: nat), B n >= 0. Proof. Admitted. End putnam_2020_b6.","theory putnam_2020_b6 imports Complex_Main begin theorem putnam_2020_b6: fixes n :: nat assumes npos: ""n > 0"" shows ""(\k::nat=1..n. (-1) ^ (nat \k * (sqrt 2 - 1)\)) \ 0"" sorry end ", putnam_1970_a1,"theorem putnam_1970_a1 (a b : ℝ) (ha : a > 0) (hb : b > 0) (f : ℝ → ℝ := fun x : ℝ => Real.exp (a*x) * Real.cos (b*x)) (p : ℕ → ℝ) (hp : ∃ c : ℝ, c > 0 ∧ ∀ x ∈ ball 0 c, ∑' n : ℕ, (p n)*x^n = f x) (S : Set ℕ := {n : ℕ | p n = 0}) : S = ∅ ∨ ¬Finite S := sorry","Prove that, for all $a > 0$ and $b > 0$, the power series of $e^{ax} \cos (bx)$ with respect to $x$ has either zero or infinitely many zero coefficients.",,['analysis'],,"theory putnam_1970_a1 imports Complex_Main ""HOL-Analysis.Elementary_Metric_Spaces"" begin theorem putnam_1970_a1: fixes a b :: real and f :: ""real \ real"" and p :: ""nat \ real"" and S :: ""nat set"" defines ""f \ (\x::real. exp (a*x) * cos (b*x))"" assumes hp: ""\a::real>0. (\x::real\(ball 0 a). (\n::nat. (p n)*x^n) = f x)"" defines ""S \ {n::nat. p n = 0}"" shows ""S = {} \ infinite S"" sorry end ", putnam_1970_a3,"abbrev putnam_1970_a3_solution : ℕ × ℕ := sorry -- (3, 1444) theorem putnam_1970_a3 (L : ℕ → ℕ) (hL : ∀ n : ℕ, L n ≤ (Nat.digits 10 n).length ∧ (∀ k : ℕ, k < L n → (Nat.digits 10 n)[k]! = (Nat.digits 10 n)[0]!) ∧ (L n ≠ (Nat.digits 10 n).length → (Nat.digits 10 n)[L n]! ≠ (Nat.digits 10 n)[0]!)) : (∃ n : ℕ, (Nat.digits 10 (n^2))[0]! ≠ 0 ∧ L (n^2) = putnam_1970_a3_solution.1) ∧ (∀ n : ℕ, (Nat.digits 10 (n^2))[0]! ≠ 0 → L (n^2) ≤ putnam_1970_a3_solution.1) ∧ (∃ m : ℕ, m^2 = putnam_1970_a3_solution.2) ∧ L (putnam_1970_a3_solution.2) = putnam_1970_a3_solution.1 ∧ (Nat.digits 10 putnam_1970_a3_solution.2)[0]! ≠ 0 ∧ ∀ n : ℕ, (Nat.digits 10 (n^2))[0]! ≠ 0 ∧ L (n^2) = putnam_1970_a3_solution.1 → n^2 ≥ putnam_1970_a3_solution.2 := sorry","Find the length of the longest possible sequence of equal nonzero digits (in base 10) in which a perfect square can terminate. Also, find the smallest square that attains this length.",The maximum attainable length is $3$; the smallest such square is $38^2 = 1444$.,['number_theory'],,"theory putnam_1970_a3 imports Complex_Main begin fun digits :: ""nat \ (nat list)"" where ""digits n = (if n < 10 then [n] else ([n mod 10::nat] @ digits (n div 10::nat)))"" definition putnam_1970_a3_solution :: ""nat \ nat"" where ""putnam_1970_a3_solution \ undefined"" (* (3, 1444) *) theorem putnam_1970_a3: fixes L :: ""nat \ nat"" assumes hL: ""\n::nat. L n \ length (digits n) \ (\k::nat<(L n). (digits n)!k = (digits n)!0) \ (L n \ length (digits n) \ (digits n)!(L n) \ (digits n)!0)"" shows ""(GREATEST d::nat. (\n::nat. (digits (n^2))!0 \ 0 \ d = L (n^2))) = fst putnam_1970_a3_solution \ (LEAST m::nat. (\n::nat. n^2 = m) \ (digits m)!0 \ 0 \ L m = fst putnam_1970_a3_solution) = snd putnam_1970_a3_solution"" sorry end ", putnam_1970_a4,"theorem putnam_1970_a4 (x : ℕ → ℝ) (hxlim : Tendsto (fun n => x n - x (n-2)) atTop (𝓝 0)) : Tendsto (fun n => (x n - x (n-1))/n) atTop (𝓝 0) := sorry",Suppose $(x_n)$ is a sequence such that $\lim_{n \to \infty} (x_n - x_{n-2} = 0$. Prove that $\lim_{n \to \infty} \frac{x_n - x_{n-1}}{n} = 0$.,,['analysis'],,"theory putnam_1970_a4 imports Complex_Main begin theorem putnam_1970_a4: fixes x :: ""nat \ real"" assumes hxlim: ""filterlim (\n::nat. x n - x (n-2)) (nhds 0) at_top"" shows ""filterlim (\n::nat. (x n - x (n-1)) / n) (nhds 0) at_top"" sorry end ", putnam_1970_b1,"abbrev putnam_1970_b1_solution : ℝ := sorry -- Real.exp (2 * Real.log 5 - 4 + 2 * Real.arctan 2) theorem putnam_1970_b1 : Tendsto (fun n => 1/(n^4) * ∏ i in Finset.Icc (1 : ℤ) (2*n), ((n^2 + i^2) : ℝ)^((1 : ℝ)/n)) atTop (𝓝 putnam_1970_b1_solution) := sorry",Evaluate the infinite product $\lim_{n \to \infty} \frac{1}{n^4} \prod_{i = 1}^{2n} (n^2 + i^2)^{1/n}$.,Show that the solution is $e^{2 \log(5) - 4 + 2 arctan(2)}$.,['analysis'],,"theory putnam_1970_b1 imports Complex_Main begin definition putnam_1970_b1_solution :: real where ""putnam_1970_b1_solution \ undefined"" (* exp (2*ln 5 - 4 + 2*arctan 2) *) theorem putnam_1970_b1: shows ""filterlim (\n::nat. 1/(n^4) * (\i::nat=1..(2*n). (n^2 + i^2) powr (1/n))) (nhds putnam_1970_b1_solution) at_top"" sorry end ", putnam_1970_b3,"theorem putnam_1970_b3 (S : Set (ℝ × ℝ)) (a b : ℝ) (hab : a < b) (hS : ∀ s ∈ S, s.1 ∈ Ioo a b) (hSclosed : IsClosed S) : IsClosed {y | ∃ x : ℝ, ⟨x,y⟩ ∈ S} := sorry",A closed subset $S$ of $\mathbb{R}^2$ lies in $a < x < b$. Show that its projection on the y-axis is closed.,,['analysis'],,"theory putnam_1970_b3 imports Complex_Main ""HOL-Analysis.Finite_Cartesian_Product"" begin theorem putnam_1970_b3: fixes S :: ""(real^2) set"" and a b :: real assumes hab: ""a < b"" and hS: ""\s\S. s$1 \ {a<..s\S. y = s$2)}"" sorry end ", putnam_1970_b5,"theorem putnam_1970_b5 (ramp : ℤ → (ℝ → ℝ) := fun n => (fun x => if x ≤ -n then -n else (if -n < x ∧ x ≤ n then x else n))) (F : ℝ → ℝ) : Continuous F ↔ (∀ n : ℕ, Continuous ((ramp n) ∘ F)) := sorry","Let $u_n$ denote the function $u_n(x) = -n$ if $x \leq -n$, $x$ if $-n < x \leq n$, and $n$ otherwise. Let $F$ be a function on the reals. Show that $F$ is continuous if and only if $u_n \circ F$ is continuous for all natural numbers $n$.",,['analysis'],,"theory putnam_1970_b5 imports Complex_Main begin theorem putnam_1970_b5: fixes ramp :: ""int \ (real \ real)"" and F :: ""real \ real"" defines ""ramp \ (\n::int. (\x::real. if x \ -n then -n else if (-n < x \ x \ n) then x else n))"" shows ""continuous_on UNIV F \ (\n::nat. continuous_on UNIV ((ramp n) \ F))"" sorry end ", putnam_1986_a1,"abbrev putnam_1986_a1_solution : ℝ := sorry -- 18 theorem putnam_1986_a1 (S : Set ℝ := {x : ℝ | x ^ 4 + 36 ≤ 13 * x ^ 2}) (f : ℝ → ℝ := fun x ↦ x ^ 3 - 3 * x) : (∀ x ∈ S, f x ≤ putnam_1986_a1_solution ∧ ∃ x ∈ S, f x = putnam_1986_a1_solution) := sorry","Find, with explanation, the maximum value of $f(x)=x^3-3x$ on the set of all real numbers $x$ satisfying $x^4+36 \leq 13x^2$.",Show that the maximum value is $18$.,"['algebra', 'analysis']","Section putnam_1986_a1. Require Import Reals Coquelicot.Coquelicot. Open Scope R. Definition putnam_1986_a1_solution := 18. Theorem putnam_1986_a1: let f (x: R) := pow x 3 in let on_S (x: R) := pow x 4 - 13 * pow x 2 + 36 <= 0 in exists (m: R), (forall (x: R), on_S x -> m >= f x) /\ (exists (x: R), on_S x -> m = f x) <-> m = putnam_1986_a1_solution. Proof. Admitted. End putnam_1986_a1.","theory putnam_1986_a1 imports Complex_Main begin definition putnam_1986_a1_solution::real where ""putnam_1986_a1_solution \ undefined"" (* 18 *) theorem putnam_1986_a1: fixes f::""real\real"" defines ""f \ \x. x^3 - 3 * x"" shows ""putnam_1986_a1_solution = (GREATEST y. (\x. y = f x \ x^4 + 36 \ 13 * x^2))"" sorry end ", putnam_1986_a2,"abbrev putnam_1986_a2_solution : ℕ := sorry -- 3 theorem putnam_1986_a2 : (Nat.floor ((10 ^ 20000 : ℝ) / (10 ^ 100 + 3)) % 10 = putnam_1986_a2_solution) := sorry","What is the units (i.e., rightmost) digit of \[ \left\lfloor \frac{10^{20000}}{10^{100}+3}\right\rfloor ? \]",Show that the answer is $3$.,['algebra'],"Section putnam_1986_a2. Require Import Nat. Definition putnam_1986_a2_solution := 3. Theorem putnam_1986_a2: 10 ^ (20000) / (10 ^ (100) + 3) mod 10 = putnam_1986_a2_solution. Proof. Admitted. End putnam_1986_a2.","theory putnam_1986_a2 imports Complex_Main begin definition putnam_1986_a2_solution::nat where ""putnam_1986_a2_solution \ undefined"" (* 3 *) theorem putnam_1986_a2: shows ""putnam_1986_a2_solution = \(10^20000) / (10^100 + 3)\ mod 10"" sorry end ", putnam_1986_a3,"abbrev putnam_1986_a3_solution : ℝ := sorry -- Real.pi / 2 theorem putnam_1986_a3 (cot : ℝ → ℝ := fun θ ↦ cos θ / sin θ) (arccot : ℝ → ℝ) (harccot : ∀ t : ℝ, t ≥ 0 → arccot t ∈ Set.Ioc 0 (Real.pi / 2) ∧ cot (arccot t) = t) : (∑' n : ℕ, arccot (n ^ 2 + n + 1) = putnam_1986_a3_solution) := sorry","Evaluate $\sum_{n=0}^\infty \mathrm{Arccot}(n^2+n+1)$, where $\mathrm{Arccot}\,t$ for $t \geq 0$ denotes the number $\theta$ in the interval $0 < \theta \leq \pi/2$ with $\cot \theta = t$.",Show that the sum equals $\pi/2$.,['analysis'],"Section putnam_1986_a3. Require Import Reals Coquelicot.Coquelicot. Open Scope R. Definition putnam_1986_a3_solution := PI / 2. Theorem putnam_1986_a3: Series (fun n => 1/ atan (pow (INR n) 2 + INR n + 1)) = putnam_1986_a3_solution. Proof. Admitted. End putnam_1986_a3.","theory putnam_1986_a3 imports Complex_Main begin definition putnam_1986_a3_solution::real where ""putnam_1986_a3_solution \ undefined"" (* pi / 2 *) theorem putnam_1986_a3: fixes arccot::""real\real"" defines ""arccot \ \y. (THE x. 0 < x \ x \ pi/2 \ cot x = y)"" shows ""(\n::nat. arccot (n^2 + n + 1)) = putnam_1986_a3_solution"" sorry end ", putnam_1986_a4,"abbrev putnam_1986_a4_solution : ℚ × ℚ × ℚ × ℚ × ℚ × ℚ × ℚ := sorry -- (1, 4, 2, 3, -4, 2, 1) theorem putnam_1986_a4 (f : ℕ → ℕ := fun n ↦ {A : Matrix (Fin n) (Fin n) ℤ | (∀ i j : Fin n, A i j ∈ ({-1, 0, 1} : Set ℤ)) ∧ ∃ S : ℤ, ∀ ϕ : Perm (Fin n), ∑ i : Fin n, A i (ϕ i) = S}.ncard) : let (a1, b1, a2, b2, a3, b3, a4) := putnam_1986_a4_solution; (∀ n > 0, f n = a1 * b1 ^ n + a2 * b2 ^ n + a3 * b3 ^ n + a4) := sorry","A \emph{transversal} of an $n\times n$ matrix $A$ consists of $n$ entries of $A$, no two in the same row or column. Let $f(n)$ be the number of $n \times n$ matrices $A$ satisfying the following two conditions: \begin{enumerate} \item[(a)] Each entry $\alpha_{i,j}$ of $A$ is in the set $\{-1,0,1\}$. \item[(b)] The sum of the $n$ entries of a transversal is the same for all transversals of $A$. \end{enumerate} An example of such a matrix $A$ is \[ A = \left( \begin{array}{ccc} -1 & 0 & -1 \\ 0 & 1 & 0 \\ 0 & 1 & 0 \end{array} \right). \] Determine with proof a formula for $f(n)$ of the form \[ f(n) = a_1 b_1^n + a_2 b_2^n + a_3 b_3^n + a_4, \] where the $a_i$'s and $b_i$'s are rational numbers.",Prove that $f(n) = 4^n + 2 \cdot 3^n - 4 \cdot 2^n + 1$.,['linear_algebra'],,"theory putnam_1986_a4 imports Complex_Main ""HOL-Analysis.Finite_Cartesian_Product"" ""HOL-Combinatorics.Permutations"" begin definition putnam_1986_a4_solution::""rat\rat\rat\rat\rat\rat\rat"" where ""putnam_1986_a4_solution \ undefined"" (* (1, 4, 2, 3, -4, 2, 1) *) theorem putnam_1986_a4: fixes n::nat and f::nat defines ""f \ card {A::int^'a^'a. CARD('a) = n \ (\i::'a. \j::'a. (A$i$j) \ {-1, 0, 1}) \ (\S::int. \f::'a\'a. f permutes UNIV \ S = (\i::'a \ UNIV. A$i$(f i)))}"" assumes npos : ""n > 0"" shows ""let (a1, b1, a2, b2, a3, b3, a4) = putnam_1986_a4_solution in (f = a1 * b1^n + a2 * b2^n + a3 * b3^n + a4)"" sorry end ", putnam_1986_a6,"abbrev putnam_1986_a6_solution : (ℕ → ℕ) → ℕ → ℝ := sorry -- fun b n ↦ (∏ i : Finset.Icc 1 n, b i) / Nat.factorial n theorem putnam_1986_a6 (n : ℕ) (npos : n > 0) (a : ℕ → ℝ) (b : ℕ → ℕ) (bpos : ∀ i ∈ Finset.Icc 1 n, b i > 0) (binj : ∀ i ∈ Finset.Icc 1 n, ∀ j ∈ Finset.Icc 1 n, b i = b j → i = j) (f : Polynomial ℝ) (hf : ∀ x : ℝ, (1 - x) ^ n * f.eval x = 1 + ∑ i : Finset.Icc 1 n, (a i) * x ^ (b i)) : (f.eval 1 = putnam_1986_a6_solution b n) := sorry","Let $a_1, a_2, \dots, a_n$ be real numbers, and let $b_1, b_2, \dots, b_n$ be distinct positive integers. Suppose that there is a polynomial $f(x)$ satisfying the identity \[ (1-x)^n f(x) = 1 + \sum_{i=1}^n a_i x^{b_i}. \] Find a simple expression (not involving any sums) for $f(1)$ in terms of $b_1, b_2, \dots, b_n$ and $n$ (but independent of $a_1, a_2, \dots, a_n$).",Show that $f(1) = b_1 b_2 \dots b_n / n!$.,['algebra'],"Section putnam_1986_a6. Require Import Reals Factorial Coquelicot.Coquelicot. Definition putnam_1986_a6_solution (m: nat -> R) (n: nat) := let fix prod_n (m: nat -> R) (n : nat) : R := match n with | O => m 0%nat | S n' => m n' * prod_n m n' end in prod_n m n / INR (fact n). Theorem putnam_1986_a6: forall (n: nat), forall (a m: nat -> R) (i j: nat), Nat.lt i j -> 0 < m i < m j -> let p (x: R) := sum_n (fun n => a n * Rpower x (m n)) n in exists (q: R -> R), forall (x: R), p x = (1 - x) ^ n * (q x) -> q 1 = putnam_1986_a6_solution m n. Proof. Admitted. End putnam_1986_a6.","theory putnam_1986_a6 imports Complex_Main ""HOL-Computational_Algebra.Polynomial"" begin definition putnam_1986_a6_solution::""(nat\nat) \ nat \ real"" where ""putnam_1986_a6_solution \ undefined"" (* \b. \n. (\i=1..n. b i) / fact n *) theorem putnam_1986_a6: fixes n::nat and a::""nat\real"" and b::""nat\nat"" and f::""real poly"" assumes npos : ""n > 0"" and bpos : ""\i \ {1..n::nat}. b i > 0"" and binj : ""\i \ {1..n::nat}. \j \ {1..n::nat}. b i = b j \ i = j"" and hf : ""\x::real. (1 - x) ^ n * (poly f x) = 1 + (\i=1..n. (a i) * x ^ (b i))"" shows ""poly f 1 = putnam_1986_a6_solution b n"" sorry end ", putnam_1986_b2,"abbrev putnam_1986_b2_solution : Finset (ℂ × ℂ × ℂ) := sorry -- {(0, 0, 0), (0, -1, 1), (1, 0, -1), (-1, 1, 0)} theorem putnam_1986_b2 : ({T : ℂ × ℂ × ℂ | ∃ x y z : ℂ, T = (x - y, y - z, z - x) ∧ x * (x - 1) + 2 * y * z = y * (y - 1) + 2 * z * x ∧ y * (y - 1) + 2 * z * x = z * (z - 1) + 2 * x * y} = putnam_1986_b2_solution) := sorry","Prove that there are only a finite number of possibilities for the ordered triple $T=(x-y,y-z,z-x)$, where $x,y,z$ are complex numbers satisfying the simultaneous equations \[ x(x-1)+2yz = y(y-1)+2zx = z(z-1)+2xy, \] and list all such triples $T$.","Show that the possibilities for $T$ are $(0, 0, 0), \, (0, -1, 1), \, (1, 0, -1), \, (-1, 1, 0)$.",['algebra'],"Section putnam_1986_b2. Require Import Reals Ensembles Finite_sets Coquelicot.Coquelicot. Open Scope C. Definition putnam_1986_b2_solution (xyz : C*C*C) := xyz = (RtoC 0, RtoC 0, RtoC 0) \/ xyz = (RtoC 1, RtoC 0, RtoC (-1)) \/ xyz = (RtoC (-1), RtoC 1, RtoC 0) \/ xyz = (RtoC 0, RtoC (-1), RtoC 1). Theorem putnam_1986_b2: exists (n: nat), forall (E: Ensemble (C*C*C)) (xyz: C*C*C), let x := fst (fst xyz) in let y := snd (fst xyz) in let z := snd xyz in (E (x-y,y-z,z-x) <-> x * (x - 1) * 2 * y * z = y * (y - 1) * 2 * z * x /\ y * (y - 1) * 2 * z * x = z * (z - 1) + 2 * x * y) -> exists (n: nat), cardinal (C*C*C) E n /\ putnam_1986_b2_solution xyz. Proof. Admitted. End putnam_1986_b2.","theory putnam_1986_b2 imports Complex_Main begin definition putnam_1986_b2_solution::""(complex\complex\complex) set"" where ""putnam_1986_b2_solution \ undefined"" (* {(0, 0, 0), (0, -1, 1), (1, 0, -1), (-1, 1, 0)} *) theorem putnam_1986_b2: shows ""putnam_1986_b2_solution = {T. \x y z::complex. T = (x - y, y - z, z - x) \ x*(x-1) + 2*y*z = y*(y-1) + 2*z*x \ y*(y-1) + 2*z*x = z*(z-1) + 2*x*y}"" sorry end ", putnam_1986_b3,"theorem putnam_1986_b3 (cong : Polynomial ℤ → Polynomial ℤ → ℤ → Prop := fun f g m ↦ ∀ i : ℕ, m ∣ (f - g).coeff i) (n p : ℕ) (nppos : n > 0 ∧ p > 0) (pprime : Nat.Prime p) (f g h r s : Polynomial ℤ) (hcoprime : cong (r * f + s * g) 1 p) (hprod : cong (f * g) h p) : (∃ F G : Polynomial ℤ, cong F f p ∧ cong G g p ∧ cong (F * G) h (p ^ n)) := sorry","Let $\Gamma$ consist of all polynomials in $x$ with integer coefficients. For $f$ and $g$ in $\Gamma$ and $m$ a positive integer, let $f \equiv g \pmod{m}$ mean that every coefficient of $f-g$ is an integral multiple of $m$. Let $n$ and $p$ be positive integers with $p$ prime. Given that $f,g,h,r$ and $s$ are in $\Gamma$ with $rf+sg\equiv 1 \pmod{p}$ and $fg \equiv h \pmod{p}$, prove that there exist $F$ and $G$ in $\Gamma$ with $F \equiv f \pmod{p}$, $G \equiv g \pmod{p}$, and $FG \equiv h \pmod{p^n}$.",,"['number_theory', 'algebra']",,"theory putnam_1986_b3 imports Complex_Main ""HOL-Computational_Algebra.Polynomial"" ""HOL-Computational_Algebra.Primes"" begin theorem putnam_1986_b3: fixes cong::""(int poly) \ (int poly) \ int \ bool"" and n p::nat and f g h r s::""int poly"" defines ""cong \ \f. \g. \m. \i::nat. m dvd (coeff (f - g) i)"" assumes nppos : ""n > 0 \ p > 0"" and pprime : ""prime p"" and hcoprime : ""cong (r * f + s * g) [:1:] p"" and hprod : ""cong (f * g) h p"" shows ""\F G:: int poly. cong F f p \ cong G g p \ cong (F * G) h (p ^ n)"" sorry end ", putnam_1986_b4,"abbrev putnam_1986_b4_solution : Prop := sorry -- True theorem putnam_1986_b4 (G : ℝ → ℝ) (hGeq : ∀ r : ℝ, ∃ m n : ℤ, G r = |r - sqrt (m ^ 2 + 2 * n ^ 2)|) (hGlb : ∀ r : ℝ, ∀ m n : ℤ, G r ≤ |r - sqrt (m ^ 2 + 2 * n ^ 2)|) : (Tendsto G ⊤ (𝓝 0) ↔ putnam_1986_b4_solution) := sorry","For a positive real number $r$, let $G(r)$ be the minimum value of $|r - \sqrt{m^2+2n^2}|$ for all integers $m$ and $n$. Prove or disprove the assertion that $\lim_{r\to \infty}G(r)$ exists and equals $0$.",Show that the limit exists and equals $0$.,['analysis'],"Section putnam_1986_b4. Require Import Reals Coquelicot.Coquelicot. Definition putnam_1986_b4_solution := True. Theorem putnam_1986_b4 (G : R -> R) (hGeq : forall (r: R), exists (m n: Z), G r = Rabs (r - sqrt (IZR (m ^ 2 + 2 * n ^ 2)))) (hGlb : forall (r: R), forall (m n: Z), G r <= Rabs (r - sqrt (IZR (m ^ 2 + 2 * n ^ 2)))) : Lim_seq (fun n => G (INR n)) = 0 <-> putnam_1986_b4_solution. Proof. Admitted. End putnam_1986_b4.","theory putnam_1986_b4 imports Complex_Main begin definition putnam_1986_b4_solution::bool where ""putnam_1986_b4_solution \ undefined"" (* True *) theorem putnam_1986_b4: fixes G::""real\real"" defines ""G \ \r. (LEAST y. \ m n::int. y = \r - sqrt (m^2 + 2*n^2)\)"" shows ""(G \ 0) \ putnam_1986_b4_solution"" sorry end ", putnam_1986_b5,"abbrev putnam_1986_b5_solution : Prop := sorry -- False theorem putnam_1986_b5 (f : MvPolynomial (Fin 3) ℝ := (X 0) ^ 2 + (X 1) ^ 2 + (X 2) ^ 2 + (X 0) * (X 1) * (X 2)) (perms : Set (Set (MvPolynomial (Fin 3) ℝ)) := {{X 0, X 1, X 2}, {X 0, -X 1, -X 2}, {-X 0, X 1, -X 2}, {-X 0, -X 1, X 2}}) : ((∀ pqr : Fin 3 → MvPolynomial (Fin 3) ℝ, (∀ xyz : Fin 3 → ℝ, MvPolynomial.eval (fun i ↦ MvPolynomial.eval xyz (pqr i)) f = MvPolynomial.eval xyz f) → ({pqr 0, pqr 1, pqr 2} ∈ perms)) ↔ putnam_1986_b5_solution) := sorry","Let $f(x,y,z) = x^2+y^2+z^2+xyz$. Let $p(x,y,z), q(x,y,z)$, $r(x,y,z)$ be polynomials with real coefficients satisfying \[ f(p(x,y,z), q(x,y,z), r(x,y,z)) = f(x,y,z). \] Prove or disprove the assertion that the sequence $p,q,r$ consists of some permutation of $\pm x, \pm y, \pm z$, where the number of minus signs is $0$ or $2$.",Prove that the assertion is false.,['algebra'],,"theory putnam_1986_b5 imports Complex_Main ""HOL-Computational_Algebra.Polynomial"" begin definition putnam_1986_b5_solution::bool where ""putnam_1986_b5_solution \ undefined"" (* False *) theorem putnam_1986_b5: fixes f::""real poly poly poly"" and perms::""((real poly poly poly) set) set"" and eval::""(real poly poly poly) \real\real\real\real"" defines ""f \ [:[:[: 0, 0, 1:], 0, 1:], [:0, [:0, 1:]:], 1:]"" (* x^2 + y^2 + z^2 + xyz = ((0 + 0z + z^2) + 0y + y^2) + (0 + (0 + z)y) x + x^2 *) and ""perms \ { {[:0, 1:], [:[:0, 1:]:], [:[:[:0, 1:]:]:]}, {[:0, 1:], [:[:0, -1:]:], [:[:[:0, -1:]:]:]}, {[:0, -1:], [:[:0, 1:]:], [:[:[:0, -1:]:]:]}, {[:0, -1:], [:[:0, -1:]:], [:[:[:0, 1:]:]:]} }"" and ""eval \ \P. \x. \y. \z. poly (poly (poly P [:[:z:]:]) [:y:]) x"" shows ""(\p q r::real poly poly poly. (\x y z::real. eval f x y z = eval f (eval p x y z) (eval q x y z) (eval r x y z)) \ ({p, q, r} \ perms)) \ putnam_1986_b5_solution"" sorry end ", putnam_1986_b6,"theorem putnam_1986_b6 (n : ℕ) (npos : n > 0) (F : Type*) [Field F] (A B C D : Matrix (Fin n) (Fin n) F) (hsymm : IsSymm (A * Bᵀ) ∧ IsSymm (C * Dᵀ)) (hid : A * Dᵀ - B * Cᵀ = 1) : (Aᵀ * D - Cᵀ * B = 1) := sorry","Suppose $A,B,C,D$ are $n \times n$ matrices with entries in a field $F$, satisfying the conditions that $AB^T$ and $CD^T$ are symmetric and $AD^T - BC^T = I$. Here $I$ is the $n \times n$ identity matrix, and if $M$ is an $n \times n$ matrix, $M^T$ is its transpose. Prove that $A^T D - C^T B = I$.",,['linear_algebra'],,"theory putnam_1986_b6 imports Complex_Main ""HOL-Algebra.Ring"" ""HOL-Analysis.Finite_Cartesian_Product"" begin theorem putnam_1986_b6: fixes n::nat and F::""('a::{semiring_1, minus}, 'm) ring_scheme"" (structure) and A B C D::""'a^'b^'b"" assumes npos : ""n > 0"" and Ffield : ""field F"" and matdim : ""CARD('b) = n"" and hsymm1 : ""A ** transpose B = transpose (A ** transpose B)"" and hsymm2 : ""C ** transpose D = transpose (C ** transpose D)"" and hid : ""A ** transpose D - B ** transpose C = 1"" shows ""transpose A ** D - transpose C ** B = 1"" sorry end ", putnam_2000_a1,"abbrev putnam_2000_a1_solution : ℝ → Set ℝ := sorry -- (fun A : ℝ => Set.Ioo 0 (A ^ 2)) theorem putnam_2000_a1 (A : ℝ) (Apos : A > 0) : ({S : ℝ | ∃ x : ℕ → ℝ, (∀ j : ℕ, x j > 0) ∧ (∑' j : ℕ, x j) = A ∧ (∑' j : ℕ, (x j) ^ 2) = S} = putnam_2000_a1_solution A) := sorry","Let $A$ be a positive real number. What are the possible values of $\sum_{j=0}^\infty x_j^2$, given that $x_0,x_1,\ldots$ are positive numbers for which $\sum_{j=0}^\infty x_j=A$?","Show that the possible values comprise the interval $(0,A^2)$.",['analysis'],"Section putnam_2000_a1. Require Import Reals Coquelicot.Coquelicot. Definition putnam_2000_a1_solution (x A: R) := 0 < x < A ^ 2. Theorem putnam_2000_a1: forall (A: R), A > 0 -> forall (x: nat -> R), Series x = A -> putnam_2000_a1_solution (Series (fun j => x j ^ 2)) A. Proof. Admitted. End putnam_2000_a1.","theory putnam_2000_a1 imports Complex_Main begin definition putnam_2000_a1_solution :: ""real \ real set"" where ""putnam_2000_a1_solution \ undefined"" (* \ A. {0 <..< A ^ 2} *) theorem putnam_2000_a1: fixes A :: real assumes Apos: ""A > 0"" shows ""{S :: real. \ x :: nat \ real. (\ j :: nat. x j > 0) \ (\ j :: nat. x j) = A \ (\ j :: nat. (x j) ^ 2) = S} = putnam_2000_a1_solution A"" sorry end", putnam_2000_a2,"theorem putnam_2000_a2 : ∀ n : ℕ, ∃ N : ℤ, ∃ i : Fin 6 → ℕ, N > n ∧ N = (i 0)^2 + (i 1)^2 ∧ N + 1 = (i 2)^2 + (i 3)^2 ∧ N + 2 = (i 4)^2 + (i 5)^2 := sorry","Prove that there exist infinitely many integers $n$ such that $n,n+1,n+2$ are each the sum of the squares of two integers.",,['number_theory'],,"theory putnam_2000_a2 imports Complex_Main begin definition sum_of_squares:: ""int \ bool"" where ""sum_of_squares n \ \a b::int. n = a^2 + b^2"" theorem putnam_2000_a2: shows ""\n :: int. \m::int. m > n \ sum_of_squares m \ sum_of_squares (m+1) \ sum_of_squares (m+2)"" sorry end ", putnam_2000_a4,"theorem putnam_2000_a4 : ∃ y : ℝ, Tendsto (fun B : ℝ => ∫ x in Set.Ioo 0 B, Real.sin x * Real.sin (x ^ 2)) atTop (𝓝 y) := sorry","Show that the improper integral $\lim_{B \to \infty} \int_0^B \sin(x)\sin(x^2)\,dx$ converges.",,['analysis'],"Section putnam_2000_a4. Require Import Reals Coquelicot.Coquelicot. Theorem putnam_2000_a4: ex_lim_seq (fun n => sum_n (fun x => sin (INR x) * sin ((INR x) ^ 2)) n). Proof. Admitted. End putnam_2000_a4.","theory putnam_2000_a4 imports Complex_Main ""HOL-Analysis.Interval_Integral"" begin theorem putnam_2000_a4: shows ""\ y :: real. ((\ B. interval_lebesgue_integral lebesgue 0 B (\ x. sin x * sin (x ^ 2))) \ y) at_top"" sorry end", putnam_2000_a5,"theorem putnam_2000_a5 (r : ℝ) (z : Fin 2 → ℝ) (p : Fin 3 → (Fin 2 → ℝ)) (rpos : r > 0) (pdiff : ∀ n m : Fin 3, (n ≠ m) → (p n ≠ p m)) (pint : ∀ (n : Fin 3) (i : Fin 2), p n i = round (p n i)) (pcirc : ∀ n : Fin 3, p n ∈ Metric.sphere z r) : ∃ n m : Fin 3, (n ≠ m) ∧ (dist (p n) (p m) ≥ r ^ ((1 : ℝ) / 3)) := sorry",Three distinct points with integer coordinates lie in the plane on a circle of radius $r>0$. Show that two of these points are separated by a distance of at least $r^{1/3}$.,,['algebra'],,"theory putnam_2000_a5 imports Complex_Main ""HOL-Analysis.Finite_Cartesian_Product"" begin theorem putnam_2000_a5: fixes r :: real and z :: ""real^2"" and S :: ""(real^2) set"" assumes rpos: ""r > 0"" and Scard: ""finite S \ card S = 3"" and pint: ""\ p \ S. p$1 = round (p$1) \ p$2 = round (p$2)"" and pcirc: ""\ p \ S. p \ sphere z r"" shows ""\ p \ S. \ q \ S. dist p q \ r powr (1 / 3)"" sorry end", putnam_2000_a6,"theorem putnam_2000_a6 (f : Polynomial ℤ) (a : ℕ → ℤ) (ha0 : a 0 = 0) (ha : ∀ n : ℕ, a (n + 1) = f.eval (a n)) : ((∃ m > 0, a m = 0) → (a 1 = 0 ∨ a 2 = 0)) := sorry","Let $f(x)$ be a polynomial with integer coefficients. Define a sequence $a_0,a_1,\ldots$ of integers such that $a_0=0$ and $a_{n+1}=f(a_n)$ for all $n\geq 0$. Prove that if there exists a positive integer $m$ for which $a_m=0$ then either $a_1=0$ or $a_2=0$.",,['algebra'],,"theory putnam_2000_a6 imports Complex_Main ""HOL-Computational_Algebra.Polynomial"" begin theorem putnam_2000_a6: fixes f :: ""int poly"" and a :: ""nat \ int"" assumes ha0: ""a 0 = 0"" and ha: ""\n::nat. a (n + 1) = poly f (a n)"" shows ""(\m::nat>0. a m = 0) \ (a 1 = 0 \ a 2 = 0)"" sorry end ", putnam_2000_b1,"theorem putnam_2000_b1 (N : ℕ) (a b c : Fin N → ℤ) (Nge1 : N ≥ 1) (hodd : ∀ j : Fin N, Odd (a j) ∨ Odd (b j) ∨ Odd (c j)) : (∃ r s t : ℤ, {j : Fin N | Odd (r * a j + s * b j + t * c j)}.ncard ≥ (4 * N : ℝ) / 7) := sorry","Let $a_j,b_j,c_j$ be integers for $1\leq j\leq N$. Assume for each $j$, at least one of $a_j,b_j,c_j$ is odd. Show that there exist integers $r$, $s$, $t$ such that $ra_j+sb_j+tc_j$ is odd for at least $4N/7$ values of $j$, $1\leq j\leq N$.",,['algebra'],"Section putnam_2000_b1. Require Import List Nat Reals ZArith. Open Scope Z. Theorem putnam_2000_b1: forall (a b c: nat -> Z) (n: nat), (forall (j: nat), and (le 1 j) (le j n) -> Z.odd (a j) =true \/ Z.odd (b j) = true \/ Z.odd (c j) = true) -> exists (l: list nat), ge (length l) (4 * n / 7) /\ forall (j: nat), In j l -> and (le 1 j) (le j n) /\ exists (r s t: Z), Z.odd (Z.add (Z.add (Z.mul r (a j)) (Z.mul s (b j))) (Z.mul t (c j))) = true. Proof. Admitted. End putnam_2000_b1.","theory putnam_2000_b1 imports Complex_Main begin (* uses (nat \ int) instead of (Fin N \ int) *) theorem putnam_2000_b1: fixes n :: nat and a b c :: ""nat \ int"" assumes Nge1: ""N \ 1"" and hodd: ""\j::nat\{0..(N-1)}. odd (a j) \ odd (b j) \ odd (c j)"" shows ""\r s t::int. card {j::nat\{0..(N-1)}. odd (r * a j + s * b j + t * c j)} \ 4*N/7"" sorry end ", putnam_2000_b2,"theorem putnam_2000_b2 : (∀ m n : ℕ, m ≥ 1 → n ≥ m → n ∣ Nat.gcd m n * Nat.choose n m) := sorry","Prove that the expression \[ \frac{gcd(m,n)}{n}\binom{n}{m} \] is an integer for all pairs of integers $n\geq m\geq 1$.",,"['number_theory', 'algebra']","Section putnam_2000_b2. Require Import Nat Reals. Open Scope R. Theorem putnam_2000_b2: forall (n m: nat), and (ge n m) (ge m 1) -> exists (c: Z), INR (gcd m n) / INR n * Binomial.C n m = IZR c. Proof. Admitted. End putnam_2000_b2.","theory putnam_2000_b2 imports Complex_Main begin theorem putnam_2000_b2: shows ""\m n::nat. (m \ 1 \ n \ m \ n dvd ((gcd m n) * (n choose m)))"" sorry end ", putnam_2000_b3,"theorem putnam_2000_b3 (N : ℕ) (Npos : N > 0) (a : Fin (N + 1) → ℝ) (haN : a N ≠ 0) (f : ℝ → ℝ := fun t ↦ ∑ j : Icc 1 N, a j * Real.sin (2 * Real.pi * j * t)) (mult : (ℝ → ℝ) → ℝ → ℕ) (hmult : ∀ g : ℝ → ℝ, ∀ t : ℝ, (∃ c : ℕ, iteratedDeriv c g t ≠ 0) → (iteratedDeriv (mult g t) g t ≠ 0 ∧ ∀ k < (mult g t), iteratedDeriv k g t = 0)) (M : ℕ → ℕ := fun k ↦ ∑' t : Ico (0 : ℝ) 1, mult (iteratedDeriv k f) t) : ((∀ i j : ℕ, i ≤ j → M i ≤ M j) ∧ Tendsto M ⊤ (𝓝 (2 * N))) := sorry","Let $f(t)=\sum_{j=1}^N a_j \sin(2\pi jt)$, where each $a_j$ is real and $a_N$ is not equal to $0$. Let $N_k$ denote the number of zeroes (including multiplicities) of $\frac{d^k f}{dt^k}$. Prove that \[ N_0\leq N_1\leq N_2\leq \cdots \mbox{ and } \lim_{k\to\infty} N_k = 2N. \]",,['analysis'],,"theory putnam_2000_b3 imports Complex_Main ""HOL-Analysis.Derivative"" begin (* uses (nat \ real) instead of (Fin (N + 1) \ real) *) theorem putnam_2000_b3: fixes N :: nat and a :: ""nat \ real"" and f :: ""real \ real"" and mult :: ""(real \ real) \ real \ nat"" and M :: ""nat \ nat"" assumes Npos: ""N > 0"" and haN: ""a N \ 0"" defines ""f \ (\t::real. (\j::nat=1..N. a j * sin (2*pi*j*t)))"" assumes hmult: ""\(g::real\real)(t::real). ((\c::nat. (deriv^^c) g t \ 0) \ mult g t = (LEAST k::nat. (deriv^^k) g t \ 0))"" defines ""M \ (\k::nat. (\\<^sub>\t::real\{0..<1}. mult ((deriv^^k) f) t))"" shows ""(\i j::nat. (i \ j \ M i \ M j)) \ filterlim M (nhds (2*N)) at_top"" sorry end ", putnam_2000_b4,"theorem putnam_2000_b4 (f : ℝ → ℝ) (hfcont : Continuous f) (hf : ∀ x : ℝ, f (2 * x ^ 2 - 1) = 2 * x * f x) : ∀ x : ℝ, x ∈ Icc (-1) 1 → f x = 0 := sorry",Let $f(x)$ be a continuous function such that $f(2x^2-1)=2xf(x)$ for all $x$. Show that $f(x)=0$ for $-1\leq x\leq 1$.,,['analysis'],,"theory putnam_2000_b4 imports Complex_Main begin theorem putnam_2000_b4: fixes f :: ""real \ real"" assumes hf : ""\x. f (2 * x^2 - 1) = 2 * x * f x"" and f_cont : ""continuous_on UNIV f"" shows ""\x. x \ -1 \ x \ 1 \ f x = 0"" sorry end ", putnam_2000_b5,"theorem putnam_2000_b5 (S : ℕ → Set ℤ) (hSfin : ∀ n : ℕ, Set.Finite (S n)) (hSpos : ∀ n : ℕ, ∀ s ∈ S n, s > 0) (hSdef : ∀ n : ℕ, ∀ a : ℤ, a ∈ S (n + 1) ↔ Xor' (a - 1 ∈ S n) (a ∈ S n)) : (∀ n : ℕ, ∃ N ≥ n, S N = S 0 ∪ {M : ℤ | M - N ∈ S 0}) := sorry","Let $S_0$ be a finite set of positive integers. We define finite sets $S_1,S_2,\ldots$ of positive integers as follows: the integer $a$ is in $S_{n+1}$ if and only if exactly one of $a-1$ or $a$ is in $S_n$. Show that there exist infinitely many integers $N$ for which $S_N=S_0\cup\{N+a: a\in S_0\}$.",,['algebra'],,"theory putnam_2000_b5 imports Complex_Main begin theorem putnam_2000_b5: fixes S :: ""nat \ int set"" assumes hSfin: ""\n::nat. finite (S n)"" and hSpos: ""\n::nat. (\s\(S n). s > 0)"" and hSdef: ""\n::nat. (\a::int. (a \ S (n + 1) \ (((a - 1) \ S n) \ (a \ S n))))"" shows ""\n::nat. \N::nat\n. S N = S 0 \ {M::int. M - N \ S 0}"" sorry end ", putnam_1995_a1,"theorem putnam_1995_a1 (S : Set ℝ) (hS : ∀ a ∈ S, ∀ b ∈ S, a * b ∈ S) (T U : Set ℝ) (hsub : T ⊆ S ∧ U ⊆ S) (hunion : T ∪ U = S) (hdisj : T ∩ U = ∅) (hT3 : ∀ a ∈ T, ∀ b ∈ T, ∀ c ∈ T, a * b * c ∈ T) (hU3 : ∀ a ∈ U, ∀ b ∈ U, ∀ c ∈ U, a * b * c ∈ U) : (∀ a ∈ T, ∀ b ∈ T, a * b ∈ T) ∨ (∀ a ∈ U, ∀ b ∈ U, a * b ∈ U) := sorry","Let $S$ be a set of real numbers which is closed under multiplication (that is, if $a$ and $b$ are in $S$, then so is $ab$). Let $T$ and $U$ be disjoint subsets of $S$ whose union is $S$. Given that the product of any {\em three} (not necessarily distinct) elements of $T$ is in $T$ and that the product of any three elements of $U$ is in $U$, show that at least one of the two subsets $T,U$ is closed under multiplication.",,['algebra'],,"theory putnam_1995_a1 imports Complex_Main begin theorem putnam_1995_a1: fixes S :: ""real set"" and T U :: ""real set"" assumes hS: ""\a\S. \b\S. a * b \ S"" and hsub: ""T \ S \ U \ S"" and hunion: ""T \ U = S"" and hdisj: ""T \ U = {}"" and hT3: ""\a\T. \b\T. \c\T. a * b * c \ T"" and hU3: ""\a\U. \b\U. \c\U. a * b * c \ U"" shows ""(\a\T. \b\T. a * b \ T) \ (\a\U. \b\U. a * b \ U)"" sorry end ", putnam_1995_a2,"abbrev putnam_1995_a2_solution : Set (ℝ × ℝ) := sorry -- {x | let ⟨a,b⟩ := x; a = b} theorem putnam_1995_a2 (habconv : (ℝ × ℝ) → Prop := fun ⟨a,b⟩ => ∃ limit : ℝ, Tendsto (fun t : ℝ => ∫ x in (Set.Icc b t), (sqrt (sqrt (x + a) - sqrt x) - sqrt (sqrt x - sqrt (x - b)))) atTop (𝓝 limit)) : ∀ ab : ℝ × ℝ, habconv ab ↔ ab ∈ putnam_1995_a2_solution := sorry","For what pairs $(a,b)$ of positive real numbers does the improper integral \[ \int_{b}^{\infty} \left( \sqrt{\sqrt{x+a}-\sqrt{x}} - \sqrt{\sqrt{x}-\sqrt{x-b}} \right)\,dx \] converge?","Show that the solution is those pairs $(a,b)$ where $a = b$.",['analysis'],"Section putnam_1995_a2. Require Import Reals Coquelicot.Coquelicot. Open Scope R. Definition putnam_1995_a2_solution (a b: R) := a = b. Theorem putnam_1995_a2: forall (a b: R), a > 0 /\ b > 0 /\ ex_lim_seq (fun n => RInt (fun x => sqrt (sqrt (x + a) - sqrt x) - sqrt (sqrt x - (x - b))) b (INR n)) <-> putnam_1995_a2_solution a b. Proof. Admitted. End putnam_1995_a2.","theory putnam_1995_a2 imports Complex_Main ""HOL-Analysis.Interval_Integral"" begin definition putnam_1995_a2_solution :: ""(real \ real) set"" where ""putnam_1995_a2_solution \ undefined"" (* {(a::real,b::real). a = b} *) theorem putnam_1995_a2: fixes habconv :: ""(real \ real) \ bool"" defines ""habconv \ (\(a::real,b::real). (\limit::real. filterlim (\t::real. interval_lebesgue_integral lebesgue b t (\x::real. sqrt (sqrt (x+a) - sqrt x) - sqrt (sqrt x - sqrt (x-b)))) (nhds limit) at_top))"" shows ""\ab::real\real. habconv ab \ ab \ putnam_1995_a2_solution"" sorry end ", putnam_1995_a3,"theorem putnam_1995_a3 (relation : (Fin 9 → ℤ) → (Fin 9 → ℤ) → Prop) (digits_to_num : (Fin 9 → ℤ) → ℤ := fun dig => ∑ i : Fin 9, (dig i) * 10^i.1) (hrelation : ∀ d e : (Fin 9 → ℤ), relation d e ↔ (∀ i : Fin 9, d i < 10 ∧ d i ≥ 0 ∧ e i < 10 ∧ e i ≥ 0) ∧ (∀ i : Fin 9, 7 ∣ (digits_to_num (fun j : Fin 9 => if j = i then e j else d j)))) : ∀ d e f : (Fin 9 → ℤ), ((relation d e) ∧ (relation e f)) → (∀ i : Fin 9, 7 ∣ d i - f i) := sorry","The number $d_{1}d_{2}\dots d_{9}$ has nine (not necessarily distinct) decimal digits. The number $e_{1}e_{2}\dots e_{9}$ is such that each of the nine 9-digit numbers formed by replacing just one of the digits $d_{i}$ is $d_{1}d_{2}\dots d_{9}$ by the corresponding digit $e_{i}$ ($1 \leq i \leq 9$) is divisible by 7. The number $f_{1}f_{2}\dots f_{9}$ is related to $e_{1}e_{2}\dots e_{9}$ is the same way: that is, each of the nine numbers formed by replacing one of the $e_{i}$ by the corresponding $f_{i}$ is divisible by 7. Show that, for each $i$, $d_{i}-f_{i}$ is divisible by 7. [For example, if $d_{1}d_{2}\dots d_{9} = 199501996$, then $e_{6}$ may be 2 or 9, since $199502996$ and $199509996$ are multiples of 7.]",,['number_theory'],,"theory putnam_1995_a3 imports Complex_Main begin (* uses (nat \ int) instead of (Fin 9 \ int) *) theorem putnam_1995_a3: fixes relation :: ""(nat \ int) \ (nat \ int) \ bool"" and digits_to_num :: ""(nat \ int) \ int"" defines ""digits_to_num \ (\dig::nat\int. (\i::nat=0..8. (dig i) * 10^i))"" assumes hrelation: ""\d e::nat\int. (relation d e \ ((\i::nat\{0..8}. d i < 10 \ d i \ 0 \ e i < 10 \ e i \ 0) \ (\i::nat\{0..8}. 7 dvd (digits_to_num (\j::nat. if j = i then e j else d j)))))"" shows ""\d e f::nat\int. ((relation d e \ relation e f) \ (\i::nat\{0..8}. 7 dvd (d i - f i)))"" sorry end ", putnam_1995_a4,"theorem putnam_1995_a4 (n : ℕ) (hn : n > 0) (necklace : Fin n → ℤ) (hnecklacesum : ∑ i : Fin n, necklace i = n - 1) : ∃ cut : Fin n, ∀ k : Fin n, ∑ i : {j : Fin n | j.1 ≤ k}, necklace (cut + i) ≤ k := sorry","Suppose we have a necklace of $n$ beads. Each bead is labeled with an integer and the sum of all these labels is $n-1$. Prove that we can cut the necklace to form a string whose consecutive labels $x_{1},x\_{2},\dots,x_{n}$ satisfy \[\sum_{i=1}^{k} x_{i} \leq k-1 \qquad \mbox{for} \quad k=1,2,\dots,n.\]",,['combinatorics'],,"theory putnam_1995_a4 imports Complex_Main begin (* uses (nat \ int) instead of (Fin n \ int) *) theorem putnam_1995_a4: fixes n :: nat and necklace :: ""nat \ int"" assumes hn: ""n > 0"" and hnecklacesum: ""(\i::nat=0..(n-1). necklace i) = n - 1"" shows ""\cut::nat\{0..(n-1)}. \k::nat\{0..(n-1)}. (\i::nat\k. necklace ((cut + i) mod n)) \ k"" sorry end ", putnam_1995_a5,"abbrev putnam_1995_a5_solution : Prop := sorry -- True theorem putnam_1995_a5 (hdiffx : (n : ℕ) → (Fin n → (ℝ → ℝ)) → Prop := (fun (n : ℕ) (x : Fin n → (ℝ → ℝ)) => ∀ i : Fin n, Differentiable ℝ (x i))) (ha : (n : ℕ) → (Fin n → Fin n → ℝ) → Prop := (fun (n : ℕ) (a : Fin n → Fin n → ℝ) => ∀ i j : Fin n, a i j > 0)) (hcomb : (n : ℕ) → (Fin n → (ℝ → ℝ)) → (Fin n → Fin n → ℝ) → Prop := (fun (n : ℕ) (x : Fin n → (ℝ → ℝ)) (a : Fin n → Fin n → ℝ) => ∀ t : ℝ, ∀ i : Fin n, (deriv (x i)) t = ∑ j : Fin n, (a i j) * ((x j) t))) (hxlim : (n : ℕ) → (Fin n → (ℝ → ℝ)) → Prop := (fun (n : ℕ) (x : Fin n → (ℝ → ℝ)) => ∀ i : Fin n, Tendsto (x i) atTop (𝓝 0))) : putnam_1995_a5_solution ↔ (∀ (n : ℕ) (x : Fin n → (ℝ → ℝ)) (a : Fin n → Fin n → ℝ), (n > 0 ∧ hdiffx n x ∧ ha n a ∧ hcomb n x a ∧ hxlim n x) → ¬(∀ b : Fin n → ℝ, (∀ t : ℝ, ∑ i : Fin n, (b i) * ((x i) t) = 0) → (∀ i : Fin n, b i = 0))) := sorry","Let $x_{1},x_{2},\dots,x_{n}$ be differentiable (real-valued) functions of a single variable $f$ which satisfy \begin{align*} \frac{dx_{1}}{dt} &= a_{11}x_{1} + a_{12}x_{2} + \cdots + a_{1n}x_{n} \ \frac{dx_{2}}{dt} &= a_{21}x_{1} + a_{22}x_{2} + \cdots + a_{2n}x_{n} \ \vdots && \vdots \ \frac{dx_{n}}{dt} &= a_{n1}x_{1} + a_{n2}x_{2} + \cdots + a_{nn}x_{n} \end{align*} for some constants $a_{ij}>0$. Suppose that for all $i$, $x_{i}(t) \to 0$ as $t \to \infty$. Are the functions $x_{1},x_{2},\dots,x_{n}$ necessarily linearly dependent?","Show that the answer is yes, the functions must be linearly dependent.","['linear_algebra', 'analysis']",,"theory putnam_1995_a5 imports Complex_Main ""HOL-Analysis.Derivative"" begin (* uses (nat \ (real \ real)) instead of (Fin n \ (real \ real)) and (nat \ nat \ real) instead of (Fin n \ Fin n \ real) *) definition putnam_1995_a5_solution :: bool where ""putnam_1995_a5_solution \ undefined"" (* True *) theorem putnam_1995_a5: fixes hdiffx :: ""nat \ (nat \ (real \ real)) \ bool"" and ha :: ""nat \ (nat \ nat \ real) \ bool"" and hcomb :: ""nat \ (nat \ (real \ real)) \ (nat \ nat \ real) \ bool"" and hxlim :: ""nat \ (nat \ (real \ real)) \ bool"" defines ""hdiffx \ (\(n::nat)(x::nat\(real\real)). (\i::nat\{0..(n-1)}. (x i) differentiable_on UNIV))"" and ""ha \ (\(n::nat)(a::nat\nat\real). (\i::nat\{0..(n-1)}. \j::nat\{0..(n-1)}. a i j > 0))"" and ""hcomb \ (\(n::nat)(x::nat\(real\real))(a::nat\nat\real). (\t::real. \i::nat\{0..(n-1)}. deriv (x i) t = (\j::nat=0..(n-1). (a i j) * ((x j) t))))"" and ""hxlim \ (\(n::nat)(x::nat\(real\real)). (\i::nat\{0..(n-1)}. filterlim (x i) (nhds 0) at_top))"" shows ""putnam_1995_a5_solution \ (\(n::nat)(x::nat\(real\real))(a::nat\nat\real). (n > 0 \ hdiffx n x \ ha n a \ hcomb n x a \ hxlim n x) \ \(\b::nat\real. (\t::real. (\i::nat=0..(n-1). (b i) * ((x i) t)) = 0) \ (\i::nat\{0..(n-1)}. b i = 0)))"" sorry end ", putnam_1995_b1,"theorem putnam_1995_b1 (part_ct : Finpartition (Finset.range 9) → (Finset.range 9) → ℕ) (hp : ∀ partition k, part_ct partition k = (Exists.choose (Finpartition.exists_mem partition k.2)).card) : ∀ Pt1 Pt2 : Finpartition (Finset.range 9), ∃ x y : Finset.range 9, x ≠ y ∧ part_ct Pt1 x = part_ct Pt1 y ∧ part_ct Pt2 x = part_ct Pt2 y := sorry","For a partition $\pi$ of $\{1, 2, 3, 4, 5, 6, 7, 8, 9\}$, let $\pi(x)$ be the number of elements in the part containing $x$. Prove that for any two partitions $\pi$ and $\pi'$, there are two distinct numbers $x$ and $y$ in $\{1, 2, 3, 4, 5, 6, 7, 8, 9\}$ such that $\pi(x) = \pi(y)$ and $\pi'(x) = \pi'(y)$. [A {\em partition} of a set $S$ is a collection of disjoint subsets (parts) whose union is $S$.]",,['combinatorics'],,"theory putnam_1995_b1 imports Complex_Main ""HOL-Library.Disjoint_Sets"" begin theorem putnam_1995_b1: fixes part_ct :: ""(nat set set) \ nat \ nat"" assumes hp: ""\(partition::nat set set)(k::nat). (\part\partition. (k \ part \ part_ct partition k = card part))"" shows ""\Pt1 Pt2::nat set set. ((partition_on {1..9} Pt1 \ partition_on {1..9} Pt2) \ (\x::nat\{1..9}. \y::nat\{1..9}. x \ y \ part_ct Pt1 x = part_ct Pt1 y \ part_ct Pt2 x = part_ct Pt2 y))"" sorry end ", putnam_1995_b3,"abbrev putnam_1995_b3_solution : ℕ → ℤ := sorry -- fun n => if n = 1 then 45 else if n = 2 then 10 * 45^2 else 0 theorem putnam_1995_b3 (n : ℕ) (hn : n > 0) (digits_set := {f : ℕ → ℕ | f 0 ≠ 0 ∧ (∀ i : Fin (n ^ 2), f i ≤ 9) ∧ (∀ i ≥ n ^ 2, f i = 0)}) (digits_to_matrix : (ℕ → ℕ) → Matrix (Fin n) (Fin n) ℤ := fun f => (fun i j => f (i.1 * n + j.1))) : ∑' f : digits_set, (digits_to_matrix f).det = putnam_1995_b3_solution n := sorry","To each positive integer with $n^{2}$ decimal digits, we associate the determinant of the matrix obtained by writing the digits in order across the rows. For example, for $n=2$, to the integer 8617 we associate $\det \left( \begin{array}{cc} 8 & 6 \ 1 & 7 \end{array} \right) = 50$. Find, as a function of $n$, the sum of all the determinants associated with $n^{2}$-digit integers. (Leading digits are assumed to be nonzero; for example, for $n=2$, there are 9000 determinants.)","Show that the solution is $45$ if $n = 1$, $45^2*10$ if $n = 2$, and $0$ if $n$ is greater than 3.",['linear_algebra'],,"theory putnam_1995_b3 imports Complex_Main ""HOL-Analysis.Determinants"" begin (* Boosted the domain/range of digits_set to nat *) definition putnam_1995_b3_solution :: ""nat \ int"" where ""putnam_1995_b3_solution \ undefined"" (* (\n::nat. if n = 1 then 45 else if n = 2 then (10 * 45^2) else 0) *) theorem putnam_1995_b3: fixes n :: nat and digits_set :: ""(nat \ nat) set"" and pnind :: ""'n::finite \ nat"" and digits_to_matrix :: ""(nat \ nat) \ (int^'n^'n)"" assumes hn: ""n > 0"" defines ""digits_set \ {f::nat\nat. f 0 \ 0 \ (\i::nat\{0..(n^2-1)}. f i \ 9) \ (\i::nat\n^2. f i = 0)}"" assumes pncard: ""CARD('n) = n"" and hpnind: ""pnind ` UNIV = {0..(n-1)}"" defines ""digits_to_matrix \ (\f::nat\nat. (\ i j::'n. f ((pnind i) * n + (pnind j))))"" shows ""(\f\digits_set. det (digits_to_matrix f)) = putnam_1995_b3_solution n"" sorry end ", putnam_1995_b4,"abbrev putnam_1995_b4_solution : ℤ × ℤ × ℤ × ℤ := sorry -- ⟨3,1,5,2⟩ theorem putnam_1995_b4 (contfrac : ℝ) (hcontfrac : contfrac = 2207 - 1/contfrac) : let ⟨a,b,c,d⟩ := putnam_1995_b4_solution; contfrac^((1 : ℝ)/8) = (a + b * sqrt c)/d := sorry","Evaluate \[ \sqrt[8]{2207 - \frac{1}{2207-\frac{1}{2207-\dots}}}. \] Express your answer in the form $\frac{a+b\sqrt{c}}{d}$, where $a,b,c,d$ are integers.",Show that the solution is $(3 + 1*\sqrt{5})/2.,['algebra'],"Section putnam_1995_b4. Require Import Reals ZArith Coquelicot.Coquelicot. Open Scope R. Definition putnam_1995_b4_solution (a b c d: Z) := (a, b, c, d) = (3%Z,1%Z,5%Z,2%Z). Theorem putnam_1995_b4: exists (a b c d: Z), exists (contfrac: R), contfrac = 2207 - 1 / contfrac -> pow contfrac (1 / 8) = (IZR a + IZR b * sqrt (IZR c))/IZR d <-> putnam_1995_b4_solution a b c d. Proof. Admitted. End putnam_1995_b4.","theory putnam_1995_b4 imports Complex_Main begin definition putnam_1995_b4_solution :: ""int \ int \ int \ int"" where ""putnam_1995_b4_solution \ undefined"" (* (3,1,5,2) *) theorem putnam_1995_b4: fixes contfrac :: real assumes hcontfrac: ""contfrac = 2207 - 1/contfrac"" shows ""let (a,b,c,d) = putnam_1995_b4_solution in (contfrac powr (1/8) = (a + b * sqrt c) / d)"" sorry end ", putnam_1995_b6,"theorem putnam_1995_b6 (S : ℝ → Set ℕ := fun α => {x : ℕ | ∃ n : ℕ, n ≥ 1 ∧ x = floor (n * α)}) : ¬ ∃ α β γ : ℝ, α > 0 ∧ β > 0 ∧ γ > 0 ∧ (S α) ∩ (S β) = ∅ ∧ (S β) ∩ (S γ) = ∅ ∧ (S α) ∩ (S γ) = ∅ ∧ ℕ+ = (S α) ∪ (S β) ∪ (S γ) := sorry","For a positive real number $\alpha$, define \[ S(\alpha) = \{ \lfloor n\alpha \rfloor : n = 1,2,3,\dots \}. \] Prove that $\{1,2,3,\dots\}$ cannot be expressed as the disjoint union of three sets $S(\alpha), S(\beta)$ and $S(\gamma)$. [As usual, $\lfloor x \rfloor$ is the greatest integer $\leq x$.]",,"['algebra', 'number_theory']",,"theory putnam_1995_b6 imports Complex_Main begin theorem putnam_1995_b6: fixes S :: ""real \ (nat set)"" defines ""S \ (\\::real. {x::nat. (\n::nat. n \ 1 \ x = \n*\\)})"" shows ""\(\\ \ \::real. \ > 0 \ \ > 0 \ \ > 0 \ (S \) \ (S \) = {} \ (S \) \ (S \) = {} \ (S \) \ (S \) = {} \ {1::nat..} = (S \) \ (S \) \ (S \))"" sorry end ", putnam_1989_a1,"abbrev putnam_1989_a1_solution : ℕ := sorry -- 1 theorem putnam_1989_a1 (pdigalt : List ℕ → Prop) (hpdigalt : ∀ pdig : List ℕ, pdigalt pdig = Odd pdig.length ∧ (∀ i : Fin pdig.length, pdig.get i = if Even (i : ℕ) then 1 else 0)) : {p : ℕ | p > 0 ∧ p.Prime ∧ pdigalt (Nat.digits 10 p)}.encard = putnam_1989_a1_solution := sorry","How many primes among the positive integers, written as usual in base $10$, are alternating $1$'s and $0$'s, beginning and ending with $1$?",Show that there is only one such prime.,"['algebra', 'number_theory']","Section putnam_1989_a1. Require Import Nat Reals ZArith Znumtheory Coquelicot.Coquelicot. Open Scope R. Definition putnam_1989_a1_solution (x: R) := x = INR 101. Theorem putnam_1989_a1: let a (n: nat) : R := sum_n (fun n => if odd n then INR (10^(n-1)) else R0) (2*n+2) in forall (n: nat), prime (floor (a n)) -> putnam_1989_a1_solution (a n). Proof. Admitted. End putnam_1989_a1.","theory putnam_1989_a1 imports Complex_Main ""HOL-Computational_Algebra.Primes"" begin definition putnam_1989_a1_solution::nat where ""putnam_1989_a1_solution \ undefined"" (* 1 *) theorem putnam_1989_a1: fixes pdigalt::""(nat list) \ bool"" defines ""pdigalt \ \pdig. odd (length pdig) \ (\i \ {0..<(length pdig)}. pdig!i = (if (even i) then 1 else 0))"" shows ""putnam_1989_a1_solution = card {p::nat. p > 0 \ prime p \ (\dig. (foldr (\a b. a + 10 * b) dig 0) = p \ pdigalt dig)}"" sorry end", putnam_1989_a2,"abbrev putnam_1989_a2_solution : ℝ → ℝ → ℝ := sorry -- (fun a b : ℝ => (Real.exp (a ^ 2 * b ^ 2) - 1) / (a * b)) theorem putnam_1989_a2 (a b : ℝ) (abpos : a > 0 ∧ b > 0) : ∫ x in Set.Ioo 0 a, ∫ y in Set.Ioo 0 b, Real.exp (max (b ^ 2 * x ^ 2) (a ^ 2 * y ^ 2)) = putnam_1989_a2_solution a b := sorry","Evaluate $\int_0^a \int_0^b e^{\max\{b^2x^2,a^2y^2\}}\,dy\,dx$ where $a$ and $b$ are positive.",Show that the value of the integral is $(e^{a^2b^2}-1)/(ab)$.,['analysis'],"Section putnam_1989_a2. Require Import Reals Coquelicot.Coquelicot. Open Scope R. Definition putnam_1989_a2_solution (a b: R) := (exp (pow (a*b) 2) - 1)/(a * b). Theorem putnam_1989_a2: forall (a b: R), let f (x y: R) := Rmax (pow (b*x) 2) (pow (a*y) 2) in RInt (fun x => (RInt (fun y => exp (f x y)) 0 b)) 0 a = putnam_1989_a2_solution a b. Proof. Admitted. End putnam_1989_a2.","theory putnam_1989_a2 imports Complex_Main ""HOL-Analysis.Interval_Integral"" begin definition putnam_1989_a2_solution::""real\real\real"" where ""putnam_1989_a2_solution \ undefined"" (* \a b::real. (exp (a^2 * b^2) - 1) / (a * b) *) theorem putnam_1989_a2: fixes a b::real assumes abpos : ""a > 0 \ b > 0"" shows ""set_lebesgue_integral lebesgue {(x::real, y::real). x \ {0..a} \ y \ {0..b}} (\ (x, y). exp (max (b^2 * x^2) (a^2 * y^2))) = putnam_1989_a2_solution a b"" sorry end", putnam_1989_a3,"theorem putnam_1989_a3 (z : ℂ) (hz : 11 * z ^ 10 + 10 * I * z ^ 9 + 10 * I * z - 11 = 0) : (‖z‖ = 1) := sorry","Prove that if \[ 11z^{10}+10iz^9+10iz-11=0, \] then $|z|=1.$ (Here $z$ is a complex number and $i^2=-1$.)",,['algebra'],"Section putnam_1989_a3. Require Import Reals Coquelicot.Coquelicot. From Coqtail Require Import Cpow. Open Scope C. Theorem putnam_1989_a3: let f (z: C) := 11 * Cpow z 10 + 10 * Ci * Cpow z 9 + 10 * Ci * z - 11 in forall (x: C), f x = 0 <-> Cmod x = R1. Proof. Admitted. End putnam_1989_a3.","theory putnam_1989_a3 imports Complex_Main begin theorem putnam_1989_a3: fixes z :: complex assumes hz: ""11 * z ^ 10 + 10 * \ * z ^ 9 + 10 * \ * z - 11 = 0"" shows ""norm z = 1"" sorry end", putnam_1989_a6,"theorem putnam_1989_a6 (F : Type*) [Field F] [Fintype F] (hF : Fintype.card F = 2) (α : PowerSeries F) (hα : ∀ n : ℕ, let bin := [1] ++ (digits 2 n) ++ [1]; PowerSeries.coeff F n α = ite (∀ i j : Fin bin.length, i < j → bin.get i = 1 → bin.get j = 1 → (∀ k, i < k → k < j → bin.get k = 0) → Even ((j : ℕ) - (i : ℕ) - 1)) 1 0) : (α ^ 3 + PowerSeries.X * α + 1 = 0) := sorry","Let $\alpha=1+a_1x+a_2x^2+\cdots$ be a formal power series with coefficients in the field of two elements. Let \[ a_n = \begin{cases} 1 & \parbox{2in}{if every block of zeros in the binary expansion of $n$ has an even number of zeros in the block} \\[.3in] 0 & \text{otherwise.} \end{cases} \] (For example, $a_{36}=1$ because $36=100100_2$ and $a_{20}=0$ because $20=10100_2.$) Prove that $\alpha^3+x\alpha+1=0.$",,"['algebra', 'abstract_algebra']",,"theory putnam_1989_a6 imports Complex_Main ""HOL-Algebra.Ring"" ""HOL-Computational_Algebra.Formal_Power_Series"" ""HOL-Library.Cardinality"" begin fun digits :: ""nat \ nat list"" where ""digits n = (if n = 0 then [] else ([n mod 2] @ digits (n div 2)))"" theorem putnam_1989_a6: fixes \ :: ""('a::field) fps"" and X :: ""'a fps"" defines ""\ \ Abs_fps (\ n :: nat. let bin = [1] @ (digits n) @ [1] in (if (\ i \ {0 ..< length bin}. \ j \ {0 ..< length bin}. i < j \ bin!i = 1 \ bin!j = 1 \ (\ k :: nat. i < k \ k < j \ bin!k = 0) \ even (j - i - 1)) then 1 else 0))"" and ""X \ Abs_fps (\ n :: nat. if n = 1 then 1 else 0)"" assumes hF: ""CARD ('a) = 2"" shows ""\ ^ 3 + X * \ + 1 = 0"" sorry end", putnam_1989_b2,"abbrev putnam_1989_b2_solution : Prop := sorry -- True theorem putnam_1989_b2 (pow : (S : Type) → ℕ → S → S) (hpow1 : ∀ (S : Type) (_ : Semigroup S), ∀ s : S, pow S 1 s = s) (hpown : ∀ (S : Type) (_ : Semigroup S), ∀ s : S, ∀ n > 0, pow S (n + 1) s = s * (pow S n s)) : ((∀ (S : Type) (_ : Nonempty S) (_ : Semigroup S) (_ : IsCancelMul S), (∀ a : S, Finite {x | ∃ n : ℕ, n > 0 ∧ pow S n a = x}) → ∃ (_ : Group S), True) ↔ putnam_1989_b2_solution) := sorry","Let $S$ be a non-empty set with an associative operation that is left and right cancellative ($xy=xz$ implies $y=z$, and $yx=zx$ implies $y=z$). Assume that for every $a$ in $S$ the set $\{a^n:\,n=1, 2, 3, \ldots\}$ is finite. Must $S$ be a group?",Prove that $S$ must be a group.,['abstract_algebra'],,"theory putnam_1989_b2 imports Complex_Main ""HOL-Algebra.Complete_Lattice"" ""HOL-Library.FuncSet"" begin record 'a semigroup = ""'a partial_object"" + mult :: ""['a, 'a] \ 'a"" (infixl ""\\"" 70) locale semigroup = fixes G (structure) assumes m_closed [intro, simp]: ""\x \ carrier G; y \ carrier G\ \ x \ y \ carrier G"" and m_assoc: ""\x \ carrier G; y \ carrier G; z \ carrier G\ \ (x \ y) \ z = x \ (y \ z)"" (* Note: this problem includes a quantifier over algebraic structures of a certain type. We therefore assume that this type has cardinality at least that of the reals.*) definition putnam_1989_b2_solution :: bool where ""putnam_1989_b2_solution \ undefined"" (* True *) theorem putnam_1989_b2: fixes cancel :: ""'a semigroup \ bool"" and group :: ""'a semigroup \ bool"" defines ""cancel \ \ S. \ x \ carrier S. \ y \ carrier S. \ z \ carrier S. (x \\<^bsub>S\<^esub> y = x \\<^bsub>S\<^esub> z \ y = z) \ (y \\<^bsub>S\<^esub> x = z \\<^bsub>S\<^esub> x \ y = z)"" and ""group \ \ S. \ e \ carrier S. \ x \ carrier S. x \\<^bsub>S\<^esub> e = x \ e \\<^bsub>S\<^esub> x = x \ (\ y \ carrier S. x \\<^bsub>S\<^esub> y = e \ y \\<^bsub>S\<^esub> x = e)"" assumes pacard: ""\ pamap :: 'a \ real. surj pamap"" shows ""(\ S :: 'a semigroup. (carrier S \ {} \ cancel S \ (\ a \ carrier S. finite {x \ carrier S. \ n :: nat. x = foldr (\\<^bsub>S\<^esub>) (replicate n a) a})) \ group S) \ putnam_1989_b2_solution"" sorry end", putnam_1989_b3,"abbrev putnam_1989_b3_solution : ℕ → ℝ → ℝ := sorry -- fun n c ↦ c * factorial n / (3 ^ n * ∏ m in Finset.Icc (1 : ℤ) n, (1 - 2 ^ (-m))) theorem putnam_1989_b3 (f : ℝ → ℝ) (hfdiff : Differentiable ℝ f) (hfderiv : ∀ x > 0, deriv f x = -3 * f x + 6 * f (2 * x)) (hdecay : ∀ x ≥ 0, |f x| ≤ Real.exp (-Real.sqrt x)) (μ : ℕ → ℝ := fun n ↦ ∫ x in Set.Ioi 0, x ^ n * (f x)) : ((∀ n : ℕ, μ n = putnam_1989_b3_solution n (μ 0)) ∧ (∃ L : ℝ, Tendsto (fun n ↦ (μ n) * 3 ^ n / factorial n) ⊤ (𝓝 L)) ∧ (Tendsto (fun n ↦ (μ n) * 3 ^ n / factorial n) ⊤ (𝓝 0) → μ 0 = 0)) := sorry","Let $f$ be a function on $[0,\infty)$, differentiable and satisfying \[ f'(x)=-3f(x)+6f(2x) \] for $x>0$. Assume that $|f(x)|\le e^{-\sqrt{x}}$ for $x\ge 0$ (so that $f(x)$ tends rapidly to $0$ as $x$ increases). For $n$ a non-negative integer, define \[ \mu_n=\int_0^\infty x^n f(x)\,dx \] (sometimes called the $n$th moment of $f$). \begin{enumerate} \item[a)] Express $\mu_n$ in terms of $\mu_0$. \item[b)] Prove that the sequence $\{\mu_n \frac{3^n}{n!}\}$ always converges, and that the limit is $0$ only if $\mu_0=0$. \end{enumerate}","Show that for each $n \geq 0$, $\mu_n = \frac{n!}{3^n} \left( \prod_{m=1}^{n}(1 - 2^{-m}) \right)^{-1} \mu_0$.",['analysis'],,"theory putnam_1989_b3 imports Complex_Main ""HOL-Analysis.Interval_Integral"" begin definition putnam_1989_b3_solution :: ""nat \ real \ real"" where ""putnam_1989_b3_solution \ undefined"" (* \ n c. c * fact n / (3 ^ n * (\ m = 1..n. 1 - 2 powi (-m))) *) theorem putnam_1989_b3: fixes f :: ""real \ real"" and \ :: ""nat \ real"" defines ""\ \ \ n. interval_lebesgue_integral lebesgue 0 \ (\ x. x ^ n * f x)"" assumes hfdiff: ""f differentiable_on {0..}"" and hfderiv: ""\ x > 0. deriv f x = -3 * f x + 6 * f (2 * x)"" and hdecay: ""\ x \ 0. \f x\ \ exp (-sqrt x)"" shows ""(\ n :: nat. \ n = putnam_1989_b3_solution n (\ 0)) \ convergent (\ n :: nat. \ n * 3 ^ n / fact n) \ (((\ n :: nat. \ n * 3 ^ n / fact n) \ 0) \ (\ 0 = 0))"" sorry end", putnam_1989_b4,"abbrev putnam_1989_b4_solution : Prop := sorry -- True theorem putnam_1989_b4 : ((∃ S : Type, Countable S ∧ Infinite S ∧ ∃ C : Set (Set S), ¬Countable C ∧ (∀ R ∈ C, R ≠ ∅) ∧ (∀ A ∈ C, ∀ B ∈ C, A ≠ B → (A ∩ B).Finite)) ↔ putnam_1989_b4_solution) := sorry",Can a countably infinite set have an uncountable collection of non-empty subsets such that the intersection of any two of them is finite?,Prove that such a collection exists.,['set_theory'],,"theory putnam_1989_b4 imports Complex_Main ""HOL-Library.Countable_Set"" begin definition putnam_1989_b4_solution :: bool where ""putnam_1989_b4_solution \ undefined"" (* True *) theorem putnam_1989_b4: shows ""(\ C :: nat set set. uncountable C \ (\ R \ C. R \ {}) \ (\ A \ C. \ B \ C. A \ B \ finite (A \ B))) \ putnam_1989_b4_solution"" sorry end", putnam_1997_a3,"abbrev putnam_1997_a3_solution : ℝ := sorry -- Real.sqrt (Real.exp 1) theorem putnam_1997_a3 (series1 : ℝ → ℝ := fun x => ∑' n : ℕ, (-1)^n * x^(2*n + 1)/(∏ i : Finset.range n, 2 * ((i : ℝ) + 1))) (series2 : ℝ → ℝ := fun x => ∑' n : ℕ, x^(2*n)/(∏ i : Finset.range n, (2 * ((i : ℝ) + 1))^2)) : Tendsto (fun t => ∫ x in Set.Icc 0 t, series1 x * series2 x) atTop (𝓝 (putnam_1997_a3_solution)) := sorry","Evaluate \begin{gather*} \int_0^\infty \left(x-\frac{x^3}{2}+\frac{x^5}{2\cdot 4}-\frac{x^7}{2\cdot 4\cdot 6}+\cdots\right) \\ \left(1+\frac{x^2}{2^2}+\frac{x^4}{2^2\cdot 4^2}+\frac{x^6}{2^2\cdot 4^2 \cdot 6^2}+\cdots\right)\,dx. \end{gather*}",Show that the solution is $\sqrt{e}$.,['analysis'],"Section putnam_1997_a3. Require Import Reals Coquelicot.Coquelicot. Open Scope R. Definition putnam_1997_a3_solution := sqrt (exp 1). Theorem putnam_1997_a3: let fix even_fact (n : nat) : R := match n with | O => 1 | S n' => (2 * INR n) * even_fact n' end in let fix even_fact_sqr (n : nat) : R := match n with | O => 1 | S n' => pow (2 * INR n) 2 * even_fact n' end in let f (x: R) := Series (fun n => pow (-1) n * pow x (2 * n + 1) / even_fact n) in let g (x: R) := Series (fun n => pow x (2 * n) / even_fact_sqr n) in Lim_seq (fun n => sum_n (fun m => RInt (fun x => f x * g x) 0 (INR m)) n) = putnam_1997_a3_solution. Proof. Admitted. End putnam_1997_a3.","theory putnam_1997_a3 imports Complex_Main ""HOL-Analysis.Interval_Integral"" begin definition putnam_1997_a3_solution::real where ""putnam_1997_a3_solution \ undefined"" (* sqrt (exp 1) *) theorem putnam_1997_a3: fixes series1 series2::""real\real"" defines ""series1 \ \x. (\n::nat. (-1)^n * x^(2*n+1) / (\i=0.. \x. (\n::nat. x^(2*n) / (\i=0..t::real. interval_lebesgue_integral lebesgue 0 t (\x. series1 x * series2 x)) \ putnam_1997_a3_solution) at_top"" sorry end", putnam_1997_a4,"theorem putnam_1997_a4 (G : Type*) [Group G] (φ : G → G) (hφ : ∀ g1 g2 g3 h1 h2 h3 : G, (g1 * g2 * g3 = 1 ∧ h1 * h2 * h3 = 1) → φ g1 * φ g2 * φ g3 = φ h1 * φ h2 * φ h3) : ∃ a : G, let ψ := fun g => a * φ g; ∀ x y : G, ψ (x * y) = ψ x * ψ y := sorry","Let $G$ be a group with identity $e$ and $\phi:G\rightarrow G$ a function such that \[\phi(g_1)\phi(g_2)\phi(g_3)=\phi(h_1)\phi(h_2)\phi(h_3)\] whenever $g_1g_2g_3=e=h_1h_2h_3$. Prove that there exists an element $a\in G$ such that $\psi(x)=a\phi(x)$ is a homomorphism (i.e. $\psi(xy)=\psi(x)\psi(y)$ for all $x,y\in G$).",,['abstract_algebra'],,"theory putnam_1997_a4 imports Complex_Main begin theorem putnam_1997_a4: fixes Gmul::""'g \ 'g \ 'g"" (infixl ""\<^bold>*"" 70) and e::'g and inv::""'g\'g"" and \::""'g\'g"" assumes hgroup : ""group (\<^bold>*) e inv"" and hphi : ""\ g1 g2 g3 h1 h2 h3::'g. (g1 \<^bold>* g2 \<^bold>* g3 = e \ h1 \<^bold>* h2 \<^bold>* h3 = e) \ \ g1 \<^bold>* \ g2 \<^bold>* \ g3 = \ h1 \<^bold>* \ h2 \<^bold>* \ h3"" shows ""\a::'g. \x y::'g. a \<^bold>* \ (x \<^bold>* y) = (a \<^bold>* \ x) \<^bold>* (a \<^bold>* \ y)"" sorry end", putnam_1997_a5,"abbrev putnam_1997_a5_solution : Prop := sorry -- True theorem putnam_1997_a5 (N := fun (n : ℕ+) => {t : Fin n → ℕ+ | (∀ i j : Fin n, i < j → t i <= t j) ∧ (∑ i : Fin n, (1 : ℝ)/(t i) = 1) }) : Odd (N 10).ncard ↔ putnam_1997_a5_solution := sorry","Let $N_n$ denote the number of ordered $n$-tuples of positive integers $(a_1,a_2,\ldots,a_n)$ such that $1/a_1 + 1/a_2 +\ldots + 1/a_n=1$. Determine whether $N_{10}$ is even or odd.",Show that $N_{10}$ is odd.,['number_theory'],"Section putnam_1997_a5. Require Import Nat Ensembles Finite_sets List Reals Coquelicot.Coquelicot. Open Scope R. Definition putnam_1997_a5_solution := True. Theorem putnam_1997_a5: forall (E: Ensemble (list nat)) (l: list nat), length l = 10%nat /\ (E l <-> sum_n (fun i => 1/ INR (nth i l 0%nat)) 10 = 1) -> exists (m: nat), cardinal (list nat) E m /\ odd m = true <-> putnam_1997_a5_solution. Proof. Admitted. End putnam_1997_a5.","theory putnam_1997_a5 imports Complex_Main begin definition putnam_1997_a5_solution where ""putnam_1997_a5_solution \ undefined"" (* True *) theorem putnam_1997_a5: fixes N::""nat\nat"" defines ""N \ \n. card {t::nat list. (size t = n) \ (\i \ {0.. 0) \ (\i \ {0..j \ {0.. t!i \ t!j) \ (\i=0.. putnam_1997_a5_solution"" sorry end", putnam_1997_a6,"abbrev putnam_1997_a6_solution : ℤ → ℤ → ℝ := sorry -- fun n k => Nat.choose (n.toNat-1) (k.toNat-1) theorem putnam_1997_a6 (n : ℤ) (hn : n > 0) (C : ℝ) (x : ℝ → (ℤ → ℝ)) (hx0 : ∀ c : ℝ, x c 0 = 0) (hx1 : ∀ c : ℝ, x c 1 = 1) (hxk : ∀ c : ℝ, ∀ k ≥ 0, x c (k + 2) = (c*(x c (k + 1)) - (n - k)*(x c k))/(k + 1)) (S : Set ℝ := {c : ℝ | x c (n + 1) = 0}) (hC : C = sSup S) : ∀ k : Set.Icc 1 n, x C k = putnam_1997_a6_solution n k := sorry","For a positive integer $n$ and any real number $c$, define $x_k$ recursively by $x_0=0$, $x_1=1$, and for $k\geq 0$, \[x_{k+2}= rac{cx_{k+1}-(n-k)x_k}{k+1}.\] Fix $n$ and then take $c$ to be the largest value for which $x_{n+1}=0$. Find $x_k$ in terms of $n$ and $k$, $1\leq k\leq n$.",Show that the solution is that $x_k = {n - 1 \choose k - 1}$.,['algebra'],"Section putnam_1997_a6. Require Import Binomial Nat Reals Coquelicot.Coquelicot. Open Scope R. Definition putnam_1997_a6_solution (n k: nat) := Binomial.C (n - 1) (k - 1). Theorem putnam_1997_a6: let fix x (n: nat) (c: R) (k: nat) : R := match k with | O => 0 | S O => 1 | S ((S k'') as k') => (c * x n c k' - INR (n - k) * x n c k'') / INR k' end in forall (n: nat), exists (maxc: R), forall (c: R), x n c (S n) = 0 /\ x n maxc (S n) = 0 -> c <= maxc -> forall (k: nat), and (le 1 k) (le k n) -> x n c k = putnam_1997_a6_solution n k. Proof. Admitted. End putnam_1997_a6.","theory putnam_1997_a6 imports Complex_Main begin definition putnam_1997_a6_solution :: ""int \ int \ real"" where ""putnam_1997_a6_solution \ undefined"" (* \ n k. (nat n-1) choose (nat k-1) *) theorem putnam_1997_a6: fixes n :: ""int"" and C :: ""real"" and x :: ""real \ (int \ real)"" and S :: ""real set"" defines ""S \ {c :: real. x c (n + 1) = 0}"" assumes hx0 : ""\ c :: real. x c 0 = 0"" and hx1 : ""\ c :: real. x c 1 = 1"" and hxk : ""\ (c :: real) (k :: nat). x c (k + 2) = (c * (x c (k+1)) - (n-k) * (x c k))/(k+1)"" and hC : ""C = (GREATEST s. s \ S)"" and hn : ""n > 0"" shows ""\ k \ {1..n}. x C k = putnam_1997_a6_solution n k"" sorry end", putnam_1997_b1,"abbrev putnam_1997_b1_solution : ℕ → ℝ := sorry -- fun n => n noncomputable def dist_to_int : ℝ → ℝ := fun r => |r - round r| theorem putnam_1997_b1 (F : ℕ → ℝ := fun n => ∑ m in Finset.Icc 1 (6 * n - 1), min (dist_to_int (m/(6*n)) ) (dist_to_int (m/(3*n)))) : ∀ n, n > 0 → F n = putnam_1997_b1_solution n := sorry","Let $\{x\}$ denote the distance between the real number $x$ and the nearest integer. For each positive integer $n$, evaluate \[F_n=\sum_{m=1}^{6n-1} \min(\{\frac{m}{6n}\},\{\frac{m}{3n}\}).\] (Here $\min(a,b)$ denotes the minimum of $a$ and $b$.)",Show that the solution is $n$.,['algebra'],"Section putnam_1997_b1. Require Import Reals Coquelicot.Coquelicot. Open Scope R. Definition putnam_1997_b1_solution (n: nat) := INR n. Theorem putnam_1997_b1: let rnd (x: R) := Rmin (Rabs (IZR (floor x) - x)) (Rabs (IZR (floor (x + 1)) - x)) in forall (n: nat), gt n 0 -> sum_n (fun m => Rmin (rnd ((INR m + 1) / (6 * INR n))) (rnd ((INR m + 1) / (3 * INR n)))) (6 * n - 1) = putnam_1997_b1_solution n. Proof. Admitted. End putnam_1997_b1.","theory putnam_1997_b1 imports Complex_Main begin definition putnam_1997_b1_solution :: ""nat \ real"" where ""putnam_1997_b1_solution \ undefined"" (* \ n. n *) definition dist_to_int :: ""real \ real"" where ""dist_to_int r = \r - round r\"" theorem putnam_1997_b1: fixes F :: ""nat \ real"" defines ""F \ \ n. (\ m \ {1..6*n-1}. min (dist_to_int (m/(6*n))) (dist_to_int (m/(3*n))))"" shows ""\ n :: nat > 0. F n = putnam_1997_b1_solution n"" sorry end", putnam_1997_b2,"theorem putnam_1997_b2 (f g : ℝ → ℝ) (hg : ∀ x : ℝ, g x ≥ 0) (hfderiv1 : ContDiff ℝ 1 f) (hfderiv2 : Differentiable ℝ (deriv f)) (hfg : ∀ x : ℝ, f x + iteratedDeriv 2 f x = -x * g x * deriv f x) : IsBounded (range (fun x => |f x|)) := sorry","Let $f$ be a twice-differentiable real-valued function satisfying \[f(x)+f''(x)=-xg(x)f'(x),\] where $g(x)\geq 0$ for all real $x$. Prove that $|f(x)|$ is bounded.",,['analysis'],"Section putnam_1997_b2. Require Import Reals Coquelicot.Coquelicot. Open Scope R. Theorem putnam_1997_b2: forall (f g: R -> R), exists (M: R), forall (x: R), ex_derive_n f 2 x /\ g x >= 0 /\ f x + Derive_n f 2 x = -x * g x * Derive f x -> -M <= f x <= M. Proof. Admitted. End putnam_1997_b2.","theory putnam_1997_b2 imports Complex_Main ""HOL-Analysis.Derivative"" begin theorem putnam_1997_b2: fixes f g :: ""real \ real"" assumes hg : ""\ x :: real. g x \ 0"" and hfdiff : ""(f differentiable_on UNIV) \ (deriv f) differentiable_on UNIV"" and hfg : ""\ x :: real. f x + (deriv^^2) f x = -x * g x * (deriv f x)"" shows ""bounded (image f UNIV)"" sorry end ", putnam_1997_b3,"abbrev putnam_1997_b3_solution : Set ℕ := sorry -- {n | (1 ≤ n ∧ n ≤ 4) ∨ (20 ≤ n ∧ n ≤ 24) ∨ (100 ≤ n ∧ n ≤ 104) ∨ (120 ≤ n ∧ n ≤ 124)} theorem putnam_1997_b3 (n : ℕ) (hn : n > 0) : n ∈ putnam_1997_b3_solution ↔ ¬5 ∣ (∑ m in Finset.Icc 1 n, 1/m : ℚ).den := sorry","For each positive integer $n$, write the sum $\sum_{m=1}^n 1/m$ in the form $p_n/q_n$, where $p_n$ and $q_n$ are relatively prime positive integers. Determine all $n$ such that 5 does not divide $q_n$.","Show that the solution is the set of natural numbers which are between $1$ and $4$, or between $20$ and $24$, or between $100$ and $104$, or between $120$ and $124$.",['number_theory'],"Section putnam_1997_b3. Require Import Reals Coquelicot.Coquelicot. From mathcomp Require Import div. Open Scope R. Definition putnam_1997_b3_solution (n: nat) := and (le 1 n) (le n 4) \/ and (le 20 n) (le n 24) \/ and (le 100 n) (le n 104) \/ and (le 120 n) (le n 124). Theorem putnam_1997_b3: forall (n: nat), gt n 0 -> exists (p q: nat), gt p 0 /\ gt q 0 /\ coprime p q = true /\ sum_n (fun m => 1 / INR (m + 1)) n = INR p / INR q -> neq (q mod 5) 0 -> putnam_1997_b3_solution n. Proof. Admitted. End putnam_1997_b3.","theory putnam_1997_b3 imports Complex_Main begin definition putnam_1997_b3_solution :: ""nat set"" where ""putnam_1997_b3_solution \ undefined"" (* {n :: nat. (1 \ n \ n \ 4) \ (20 \ n \ n \ 24) \ (100 \ n \ n \ 104) \ (120 \ n \ n \ 124)} *) theorem putnam_1997_b3: fixes n :: ""nat"" assumes hn : ""n > 0"" shows ""n \ putnam_1997_b3_solution \ \ (5 dvd (snd (quotient_of (\ m \ {1..n}. 1/(rat_of_nat m)))))"" sorry end", putnam_1997_b4,"theorem putnam_1997_b4 (a : ℕ → ℕ → ℤ) (ha : ∀ n m : ℕ, a n m = coeff ((1 + X + X^2)^m) n) : ∀ k : ℕ, k ≥ 0 → (∑ i in Finset.Icc 0 (Nat.floor (2*k/(3 : ℚ))), (-1)^(i : ℕ) * (a (k - i) i : ℝ)) ∈ Set.Icc (0 : ℝ) 1 := sorry","Let $a_{m,n}$ denote the coefficient of $x^n$ in the expansion of $(1+x+x^2)^m$. Prove that for all [integers] $k\geq 0$, \[0\leq \sum_{i=0}^{\lfloor \frac{2k}{3}\rfloor} (-1)^i a_{k-i,i}\leq 1.\]",,['algebra'],,"theory putnam_1997_b4 imports Complex_Main ""HOL-Computational_Algebra.Polynomial"" begin theorem putnam_1997_b4: fixes a :: ""nat \ nat \ int"" assumes ha : ""\ n m :: nat. a n m = coeff ((monom 1 0 + monom 1 1 + monom 1 2)^m) n"" shows ""\ k :: nat \ 0. (\ i \ {0..nat \((2*(rat_of_nat k)))/(rat_of_nat 3)\}. (-1)^(i) * (a (k-i) i)) \ {0 :: real..1}"" sorry end", putnam_1997_b5,"theorem putnam_1997_b5 (n : ℕ) (hn : n ≥ 2) : tetration 2 n ≡ tetration 2 (n-1) [MOD n] := sorry","Prove that for $n\geq 2$, \[\overbrace{2^{2^{\cdots^{2}}}}^{\mbox{$n$ terms}} \equiv \overbrace{2^{2^{\cdots^{2}}}}^{\mbox{$n-1$ terms}} \quad \pmod{n}.\]",,['number_theory'],"Section putnam_1997_b5. Require Import Nat. Theorem putnam_1997_b5: let fix pow_n (b n: nat) : nat := match n with | O => 1 | S n' => b * pow_n b n' end in forall (n: nat), n >= 2 -> pow_n 2 n-1 mod n = pow_n 2 n-2. Proof. Admitted. End putnam_1997_b5.","theory putnam_1997_b5 imports Complex_Main ""HOL-Number_Theory.Cong"" begin theorem putnam_1997_b5: fixes n :: ""nat"" and tetration :: ""nat \ nat \ nat"" assumes hn : ""n \ 2"" and htetrationbase : ""\ a :: nat. tetration a 0 = 1"" and htetration : ""\ a n :: nat. tetration a (n+1) = a^(tetration a n)"" shows ""[tetration 2 n = tetration 2 (n-1)] (mod n)"" sorry end", putnam_2005_a1,"theorem putnam_2005_a1 : ∀ n : ℤ, n > 0 → (∃ k : ℕ, ∃ a : Fin k → Fin 2 → ℕ, n = ∑ i : Fin k, 2^(a i 0)*3^(a i 1) ∧ (∀ i j : Fin k, i ≠ j → ¬(2^(a i 0)*3^(a i 0) ∣ 2^(a j 0)*3^(a j 1)))) := sorry","Show that every positive integer is a sum of one or more numbers of the form $2^r 3^s$, where $r$ and $s$ are nonnegative integers and no summand divides another.",,['number_theory'],"Section putnam_2005_a1. Require Import Nat List Coquelicot.Coquelicot. Theorem putnam_2005_a1: forall (n: nat), n > 0 -> exists (l: list nat), forall (p q: nat), In p l /\ In q l -> exists (r1 s1 r2 s2: nat), p = 2 ^ r1 * 3 ^ s1 /\ q = 2 ^ r2 * 3 ^ s2 /\ p mod q <> 0 /\ q mod p <> 0. Proof. Admitted. End putnam_2005_a1.","theory putnam_2005_a1 imports Complex_Main begin theorem putnam_2005_a1: shows ""\ n :: int. n > 0 \ (\ k :: nat. \ a :: nat \ (nat \ nat). n = (\ i\{1..k}. 2^(fst (a i)) * 3^(snd (a i))) \ (\ i \ {1..k}. \ j \ {1..k}. i \ j \ (\ (2^(fst (a i)) * 3^(snd (a i)) dvd 2^(fst (a j)) * 3^(snd (a j))))))"" sorry end", putnam_2005_a3,"theorem putnam_2005_a3 (p : Polynomial ℂ) (n : ℕ) (g : ℂ → ℂ) (pdeg : p.degree = n) (pzeros : ∀ z : ℂ, p.eval z = 0 → Complex.abs z = 1) (hg : ∀ z : ℂ, g z = (p.eval z) / z ^ ((n : ℂ) / 2)) : ∀ z : ℂ, (deriv g z = 0) → (Complex.abs z = 1) := sorry",Let $p(z)$ be a polynomial of degree $n$ all of whose zeros have absolute value $1$ in the complex plane. Put $g(z)=p(z)/z^{n/2}$. Show that all zeros of $g'(z)=0$ have absolute value $1$.,,"['analysis', 'algebra']","Section putnam_2005_a3. Require Import Reals Coquelicot.Coquelicot. From Coqtail Require Import Cpow. Theorem putnam_2005_a3: forall (c: nat -> Z) (n: nat), let p (z: C) := sum_n (fun i => IZR (c i) * Cpow z i) (n + 1) in forall (r: C), p r = 0 -> r = RtoC (-1) /\ r = RtoC 1 -> let g (z: C) := p z / Cpow z (n / 2) in forall (r: C), g r = 0 -> r = RtoC (-1) /\ r = RtoC 1. Proof. Admitted. End putnam_2005_a3.","theory putnam_2005_a3 imports Complex_Main ""HOL-Computational_Algebra.Polynomial"" begin theorem putnam_2005_a3: fixes p :: ""complex poly"" and n :: nat and g :: ""complex \ complex"" assumes pdeg: ""degree p = n"" and pzeros: ""\z::complex. (poly p z = 0 \ norm z = 1)"" and hg: ""\z::complex. g z = (poly p z) / csqrt (z^n)"" shows ""\z::complex. (deriv g z = 0 \ norm z = 1)"" sorry end ", putnam_2005_a4,"theorem putnam_2005_a4 (n : ℕ) (H : Matrix (Fin n) (Fin n) ℝ) (a b : ℕ) (S : Matrix (Fin a) (Fin b) ℝ) (npos : n ≥ 1) (Hentries : ∀ i j : Fin n, H i j = 1 ∨ H i j = -1) (Hortho : H.HasOrthogonalRows) (hab : 1 ≤ a ∧ a ≤ n ∧ 1 ≤ b ∧ b ≤ n) (Ssub : ∃ (rri : Fin a → Fin n) (cri : Fin b → Fin n), rri.Injective ∧ cri.Injective ∧ S = H.submatrix rri cri) (Sentries : ∀ (i : Fin a) (j : Fin b), S i j = 1) : a * b ≤ n := sorry",Let $H$ be an $n \times n$ matrix all of whose entries are $\pm 1$ and whose rows are mutually orthogonal. Suppose $H$ has an $a \times b$ submatrix whose entries are all $1$. Show that $ab \leq n$.,,['linear_algebra'],,"theory putnam_2005_a4 imports Complex_Main ""HOL-Analysis.Derivative"" begin theorem putnam_2005_a4: fixes n :: nat and H :: ""real^'n^'n"" and a b :: nat and S :: ""real^'b^'a"" assumes npos: ""n \ 1"" and ncard: ""CARD('n) = n"" and Hentries: ""\i j::'n. H$i$j = 1 \ H$i$j = -1"" and Hortho: ""\i j::'n. (i \ j \ orthogonal (row i H) (row j H))"" and hab: ""1 \ a \ a \ n \ 1 \ b \ b \ n"" and abcard: ""CARD('a) = a \ CARD('b) = b"" and Ssub: ""\(rri::'a\'n)(cri::'b\'n). inj rri \ inj cri \ (\(i::'a)(j::'b). S$i$j = H$(rri i)$(cri j))"" and Sentries: ""\(i::'a)(j::'b). S$i$j = 1"" shows ""a*b \ n"" sorry end ", putnam_2005_a5,"abbrev putnam_2005_a5_solution : ℝ := sorry -- Real.pi * (Real.log 2) / 8 theorem putnam_2005_a5 : ∫ x in (0:ℝ)..1, (Real.log (x+1))/(x^2 + 1) = putnam_2005_a5_solution := sorry","Evaluate $\int_0^1 \frac{\ln(x+1)}{x^2+1}\,dx$.",Show that the solution is $\pi / 8 * \log 2$.,['analysis'],"Section putnam_2005_a5. Require Import Reals Coquelicot.Coquelicot. Definition putnam_2005_a5_solution := PI * (ln 2 / ln 10) / 8. Theorem putnam_2005_a5: RInt (fun x => ln (x + 1) / (x ^ 2 + 1)) 0 1 = putnam_2005_a5_solution. Proof. Admitted. End putnam_2005_a5.","theory putnam_2005_a5 imports Complex_Main ""HOL-Analysis.Lebesgue_Measure"" ""HOL-Analysis.Set_Integral"" begin definition putnam_2005_a5_solution :: ""real"" where ""putnam_2005_a5_solution \ undefined"" (* pi * (ln 2) / 8 *) theorem putnam_2005_a5: shows ""interval_lebesgue_integral lebesgue 0 1 (\ x :: real. (ln (x + 1))/(x^2 + 1)) = putnam_2005_a5_solution"" sorry end ", putnam_2005_b1,"abbrev putnam_2005_b1_solution : MvPolynomial (Fin 2) ℝ := sorry -- (MvPolynomial.X 1 - 2 * MvPolynomial.X 0) * (MvPolynomial.X 1 - 2 * MvPolynomial.X 0 - 1) theorem putnam_2005_b1 : putnam_2005_b1_solution ≠ 0 ∧ ∀ a : ℝ, MvPolynomial.eval (fun n : Fin 2 => if (n = 0) then (Int.floor a : ℝ) else (Int.floor (2 * a))) putnam_2005_b1_solution = 0 := sorry","Find a nonzero polynomial $P(x,y)$ such that $P(\lfloor a \rfloor,\lfloor 2a \rfloor)=0$ for all real numbers $a$. (Note: $\lfloor \nu \rfloor$ is the greatest integer less than or equal to $\nu$.)","Show that $P(x,y)=(y-2x)(y-2x-1)$ works.",['algebra'],"Section putnam_2005_b1. Require Import Reals Coquelicot.Coquelicot. Definition putnam_2005_b1_solution (c: nat -> nat -> R) (n m: nat) := n = 2%nat /\ m = 2%nat /\ c = fun x y => match x, y with | 0, 1 => -1 | 0, 2 => 1 | 1, 0 => 2 | 1, 1 => -4 | 2, 0 => 4 | _, _ => 0 end. Theorem putnam_2005_b1: exists (c: nat -> nat -> R) (n m: nat), let p (x y: R) := sum_n (fun i => (sum_n (fun j => c i j * x ^ i * y ^ j) m)) (n + 1) in forall (a: R), p (IZR (floor a)) (IZR (floor (2 * a))) = 0 <-> putnam_2005_b1_solution c n m. Proof. Admitted. End putnam_2005_b1.","theory putnam_2005_b1 imports Complex_Main ""HOL-Computational_Algebra.Polynomial"" begin (* there might be multiple possible correct answers *) definition putnam_2005_b1_solution :: ""real poly poly"" where ""putnam_2005_b1_solution \ undefined"" (* (monom (monom 1 0) 1 - 2*(monom (monom 1 1) 0)) * (monom (monom 1 0) 1 - 2*(monom (monom 1 1) 0) - 1) *) theorem putnam_2005_b1: shows ""putnam_2005_b1_solution \ 0 \ (\a::real. poly (poly putnam_2005_b1_solution [:\2*a\:]) \a\ = 0)"" sorry end ", putnam_2005_b2,"abbrev putnam_2005_b2_solution : Set (ℕ × (ℕ → ℤ)) := sorry -- {(n, k) : ℕ × (ℕ → ℤ) | (n = 1 ∧ k 0 = 1) ∨ (n = 3 ∧ (k '' {0, 1, 2} = {2, 3, 6})) ∨ (n = 4 ∧ (∀ i : Fin 4, k i = 4))} theorem putnam_2005_b2 (n : ℕ) (k : ℕ → ℤ) (nkpos : Prop) (nkeq1 : Prop) (nkeq2 : Prop) (hnkpos : nkpos = (n > 0 ∧ (∀ i : Fin n, k i > 0))) (hnkeq1 : nkeq1 = (∑ i : Fin n, k i = 5 * n - 4)) (hnkeq2 : nkeq2 = (∑ i : Fin n, (1 : ℝ) / (k i) = 1)) : (nkpos ∧ nkeq1 ∧ nkeq2) ↔ (n, k) ∈ putnam_2005_b2_solution := sorry","Find all positive integers $n,k_1,\dots,k_n$ such that $k_1+\cdots+k_n=5n-4$ and $\frac{1}{k_1}+\cdots+\frac{1}{k_n}=1$.","Show that the solutions are $n=1$ and $k_1=1$, $n=3$ and $(k_1,k_2,k_3)$ is a permutation of $(2,3,6)$, and $n=4$ and $(k_1,k_2,k_3,k_4)=(4,4,4,4)$.",['algebra'],"Section putnam_2005_b2. Require Import Nat List Reals Coquelicot.Coquelicot. Import ListNotations. Definition putnam_2005_b2_solution (n: nat) (k: list nat) := (n, k) = (1%nat, [1%nat]) \/ (n, k) = (3%nat, [2%nat; 3%nat; 6%nat]) \/ (n, k) = (3%nat, [2%nat; 6%nat; 3%nat]) \/ (n, k) = (3%nat, [3%nat; 2%nat; 6%nat]) \/ (n, k) = (3%nat, [3%nat; 6%nat; 2%nat]) \/ (n, k) = (3%nat, [6%nat; 2%nat; 3%nat]) \/ (n, k) = (3%nat, [6%nat; 3%nat; 2%nat]) \/ (n, k) = (4%nat, [4%nat; 4%nat; 4%nat; 4%nat]). Theorem putnam_2005_b2: forall (n: nat) (k: list nat), forall (x: nat), fold_left add k 0%nat = sub (mul 5 n) 4 /\ sum_n (fun n => 1 / INR (nth n k 0%nat)) n = 1 <-> putnam_2005_b2_solution n k. Proof. Admitted. End putnam_2005_b2.","theory putnam_2005_b2 imports Complex_Main begin (* uses (nat \ nat) instead of (Fin n \ nat) *) definition putnam_2005_b2_solution :: ""(nat \ (nat \ nat)) set"" where ""putnam_2005_b2_solution \ undefined"" (* {(n::nat,k::nat\nat). (n = 1 \ k 0 = 1) \ (n = 3 \ k ` {0,1,2} = {2,3,6}) \ (n = 4 \ (\i::nat\{0..3}. k i = 4))} *) theorem putnam_2005_b2: fixes n :: nat and k :: ""nat \ nat"" and nkpos :: bool and nkeq1 :: bool and nkeq2 :: bool assumes ""nkpos \ (n > 0 \ (\i::nat\{0..(n-1)}. k i > 0))"" and ""nkeq1 \ ((\i::nat=0..(n-1). k i) = 5*n - 4)"" and ""nkeq2 \ ((\i::nat=0..(n-1). (1 / k i)) = 1)"" shows ""(nkpos \ nkeq1 \ nkeq2) \ (n, k) \ putnam_2005_b2_solution"" sorry end ", putnam_2005_b3,"abbrev putnam_2005_b3_solution : Set (Set.Ioi (0 : ℝ) → Set.Ioi (0 : ℝ)) := sorry -- {f : Set.Ioi (0 : ℝ) → Set.Ioi (0 : ℝ) | ∃ c d : ℝ, c > 0 ∧ d > 0 ∧ (d = 1 → c = 1) ∧ (∀ x : Set.Ioi (0 : ℝ), f x = c * x ^ d)} theorem putnam_2005_b3 (f : ℝ → ℝ) (fexa : Prop) (hfexa : fexa = (∃ a > 0, ∀ x > 0, deriv f (a / x) = x / f x)) : (DifferentiableOn ℝ f (Set.Ioi (0 : ℝ)) ∧ fexa) ↔ (∃ f' ∈ putnam_2005_b3_solution, ∀ x : Set.Ioi (0 : ℝ), f' x = f x) := sorry","Find all differentiable functions $f:(0,\infty) \to (0,\infty)$ for which there is a positive real number $a$ such that $f'(\frac{a}{x})=\frac{x}{f(x)}$ for all $x>0$.","Show that the functions are precisely $f(x)=cx^d$ for $c,d>0$ arbitrary except that we must take $c=1$ in case $d=1$.",['analysis'],"Section putnam_2005_b3. Require Import Reals Coquelicot.Coquelicot. Definition putnam_2005_b3_solution (f: R -> R) := exists (c d: R), c > 0 /\ d > 0 /\ f = (fun x => c * Rpower x d). Theorem putnam_2005_b3: forall (f: R -> R) (x: R), x > 0 /\ f x > 0 /\ ex_derive f x -> exists (a: R), Derive f (a / x) = x / f x <-> putnam_2005_b3_solution f. Proof. Admitted. End putnam_2005_b3.","theory putnam_2005_b3 imports Complex_Main ""HOL-Analysis.Derivative"" begin (* uses (real \ real) instead of ({0<..} \ {0<..}) *) definition putnam_2005_b3_solution :: ""(real \ real) set"" where ""putnam_2005_b3_solution \ undefined"" (* {f::real\real. (\c d::real. c > 0 \ d > 0 \ (d = 1 \ c = 1) \ (\x::real\{0<..}. f x = c * x powr d))} *) theorem putnam_2005_b3: fixes f :: ""real \ real"" and fexa :: bool assumes hfexa: ""fexa \ (\a::real>0. \x::real>0. deriv f (a/x) = x / f x)"" shows ""(f differentiable_on {0<..} \ fexa) \ f \ putnam_2005_b3_solution"" sorry end ", putnam_2005_b4,"theorem putnam_2005_b4 (m n : ℤ) (mnpos : m > 0 ∧ n > 0) (f : ℤ → ℤ → ℕ) (hf : ∀ m' > 0, ∀ n' > 0, f m' n' = Set.encard {x : Finset.Icc 1 n' → ℤ | ∑ i : Finset.Icc 1 n', |x i| ≤ m'}) : f m n = f n m := sorry","For positive integers $m$ and $n$, let $f(m,n)$ denote the number of $n$-tuples $(x_1,x_2,\dots,x_n)$ of integers such that $|x_1|+|x_2|+\cdots+|x_n| \leq m$. Show that $f(m,n)=f(n,m)$.",,['algebra'],"Section putnam_2005_b4. Require Import List Ensembles Finite_sets ZArith. Open Scope Z. Theorem putnam_2005_b4: let fix absl (l : list Z) : list Z := match l with | nil => nil | h :: t => Z.abs h :: t end in forall (m n: nat), forall (E1 E2: Ensemble (list Z)) (l1 l2: list Z), length l1 = n /\ length l2 = m /\ (E1 l1 <-> fold_left Z.add (absl l1) 0 <= Z.of_nat m) /\ (E2 l2 <-> fold_left Z.add (absl l2) 0 <= Z.of_nat n) <-> exists (a: nat), cardinal (list Z) E1 a /\ cardinal (list Z) E2 a. Proof. Admitted. End putnam_2005_b4.","theory putnam_2005_b4 imports Complex_Main begin theorem putnam_2005_b4: fixes m n::nat and f::""nat\nat\nat"" assumes mnpos : ""m > 0 \ n > 0"" and ""\m' > 0. \n' > 0. f m' n' = card {x::int list. size x = n' \ (\i=0.. m'}"" shows ""f m n = f n m"" sorry end ", putnam_2005_b6,"theorem putnam_2005_b6 (n : ℕ) (v : Equiv.Perm (Fin n) → ℕ) (npos : n ≥ 1) (hv : ∀ p : Equiv.Perm (Fin n), v p = Set.encard {i : Fin n | p i = i}) : (∑ p : Equiv.Perm (Fin n), (Equiv.Perm.signAux p : ℤ) / (v p + 1 : ℝ)) = (-1) ^ (n + 1) * (n / (n + 1 : ℝ)) := sorry","Let $S_n$ denote the set of all permutations of the numbers $1,2,\dots,n$. For $\pi \in S_n$, let $\sigma(\pi)=1$ if $\pi$ is an even permutation and $\sigma(\pi)=-1$ if $\pi$ is an odd permutation. Also, let $\nu(\pi)$ denote the number of fixed points of $\pi$. Show that $\sum_{\pi \in S_n} \frac{\sigma(\pi)}{\nu(\pi)+1}=(-1)^{n+1}\frac{n}{n+1}$.",,"['linear_algebra', 'algebra']",,"theory putnam_2005_b6 imports Complex_Main ""HOL-Combinatorics.Permutations"" begin theorem putnam_2005_b6: fixes n::nat and S::""(nat\nat) set"" and \::""(nat\nat) \ int"" and v::""(nat\nat) \ int"" defines ""S \ {p. p permutes {1..n}}"" and ""\ \ \p. if (evenperm p) then 1 else -1"" and ""v \ \p. card {x::nat. x > 0 \ x \ n \ p x = x}"" assumes npos : ""n > 0"" shows ""(\p \ S. rat_of_int (\ p) / (rat_of_int (v p) + 1)) = (-1)^(n+1) * (rat_of_nat n) / (rat_of_nat n+1)"" sorry end ", putnam_1966_a1,"theorem putnam_1966_a1 (f : ℤ → ℤ := fun n : ℤ => ∑ m in Finset.Icc 1 n, (if Even m then m / 2 else (m - 1)/2)) : ∀ x y : ℤ, x > 0 ∧ y > 0 ∧ x > y → x * y = f (x + y) - f (x - y) := sorry",,,[],,"theory putnam_1966_a1 imports Complex_Main begin theorem putnam_1966_a1: fixes f :: ""int \ int"" defines ""f \ \ n :: int. \ m = 1..n. (if even m then m div 2 else (m - 1) div 2)"" shows ""\ x y :: int. (x > 0 \ y > 0 \ x > y) \ x * y = f (x + y) - f (x - y)"" sorry end", putnam_1966_a3,"theorem putnam_1966_a3 (x : ℕ → ℝ) (hx1 : 0 < x 1 ∧ x 1 < 1) (hxi : ∀ n ≥ 1, x (n + 1) = (x n) * (1 - (x n))) : Tendsto (fun n : ℕ => n * (x n)) ⊤ (𝓝 1) := sorry",,,[],,"theory putnam_1966_a3 imports Complex_Main begin theorem putnam_1966_a3: fixes x :: ""nat \ real"" assumes hx1: ""0 < x 1 \ x 1 < 1"" and hxi: ""\ n \ 1. x (n + 1) = x n * (1 - x n)"" shows ""(\ n. n * x n) \ 1"" sorry end", putnam_1966_a4,"theorem putnam_1966_a4 (a : ℕ → ℤ) (ha1 : a 1 = 2) (hai : ∀ n ≥ 1, a (n + 1) = (if ∃ m : ℤ, m^2 = a n + 1 = True then a n + 2 else a n + 1)) : ∀ n ≥ 1, a n = n + round (Real.sqrt n) := sorry",,,[],,"theory putnam_1966_a4 imports Complex_Main begin theorem putnam_1966_a4: fixes a :: ""nat \ int"" assumes ha1: ""a 1 = 2"" and hai: ""\ n \ 1. a (n + 1) = (if (\ m :: int. m ^ 2 = a n + 1) then a n + 2 else a n + 1)"" shows ""\ n \ 1. a n = n + round (sqrt n)"" sorry end", putnam_1966_a5,"theorem putnam_1966_a5 (C : Set (ℝ → ℝ) := {f : ℝ → ℝ | Continuous f}) (T : (ℝ → ℝ) → (ℝ → ℝ)) (linearT : ∀ a b : ℝ, ∀ f ∈ C, ∀ g ∈ C, T ((fun x => a)*f + (fun x => b)*g) = (fun x => a)*(T f) + (fun x => b)*(T g)) (localT : ∀ r s : ℝ, r ≤ s → ∀ f ∈ C, ∀ g ∈ C, (∀ x ∈ Set.Icc r s, f x = g x) → (∀ x ∈ Set.Icc r s, T f x = T g x)) : ∃ f ∈ C, ∀ g ∈ C, T g = f * g := sorry",,,[],,"theory putnam_1966_a5 imports Complex_Main ""HOL-Library.Extended_Real"" begin theorem putnam_1966_a5: fixes C :: ""(real \ real) set"" and T :: ""(real \ real) \ (real \ real)"" defines ""C \ {f :: real \ real. continuous_on UNIV f}"" assumes imageTC: ""\ f \ C. T f \ C"" and linearT: ""\ a b :: real. \ f \ C. \ g \ C. T (\ x. a * f x + b * g x) = (\ x. a * T f x + b * T g x)"" and localT: ""\ (r :: ereal) (s :: ereal). r < s \ (\ f \ C. \ g \ C. (\ x :: real. r < x \ x < s \ f x = g x) \ (\ x :: real. r < x \ x < s \ T f x = T g x))"" shows ""\ f \ C. \ g \ C. T g = (\ x. f x * g x)"" sorry end", putnam_1966_a6,"theorem putnam_1966_a6 (a : ℕ → (ℕ → ℝ)) (ha : ∀ n ≥ 1, a n n = n ∧ ∀ m ≥ 1, m < n → a n m = m * Real.sqrt (1 + a n (m + 1))) : Tendsto (fun n => a n 1) ⊤ (𝓝 3) := sorry",,,[],,"theory putnam_1966_a6 imports Complex_Main begin theorem putnam_1966_a6: fixes a :: ""nat \ nat \ real"" assumes ha: ""\ n \ 1. a n n = n \ (\ m \ 1. m < n \ a n m = m * sqrt (1 + a n (m + 1)))"" shows ""(\ n. a n 1) \ 3"" sorry end", putnam_1966_b2,"theorem putnam_1966_b2 (S : ℤ → Set ℤ := fun n : ℤ => {n, n + 1, n + 2, n + 3, n + 4, n + 5, n + 6, n + 7, n + 8, n + 9}) : ∀ n : ℤ, ∃ k ∈ S n, ∀ m ∈ S n, k ≠ m → IsCoprime m k := sorry",,,[],,"theory putnam_1966_b2 imports Complex_Main begin theorem putnam_1966_b2: fixes S :: ""int \ int set"" defines ""S \ \ n :: int. {n, n + 1, n + 2, n + 3, n + 4, n + 5, n + 6, n + 7, n + 8, n + 9}"" shows ""\ n :: int. \ k \ S n. \ m \ S n. k \ m \ coprime m k"" sorry end", putnam_1966_b3,"theorem putnam_1966_b3 (p : ℕ → ℝ) (hpos : ∀ n : ℕ, p n > 0) (hconv : ∃ r : ℝ, Tendsto (fun m : ℕ => ∑ n in Finset.Icc 1 m, 1/(p n)) ⊤ (𝓝 r)) : ∃ r : ℝ, Tendsto (fun m : ℕ => ∑ n in Finset.Icc 1 m, (p n) * n^2/(∑ i in Finset.Icc 1 n, p i)^2) ⊤ (𝓝 r) := sorry",,,[],,"theory putnam_1966_b3 imports Complex_Main begin theorem putnam_1966_b3: fixes p :: ""nat \ real"" assumes hpos: ""\ n :: nat. p n > 0"" and hconv: ""convergent (\ m. \ n = 1..m. 1 / p n)"" shows ""convergent (\ m. \ n = 1..m. (p n) * n ^ 2 / (\ i = 1..n. p i) ^ 2)"" sorry end", putnam_1966_b4,"theorem putnam_1966_b4 (m n : ℕ) (a : Finset ℕ) (hS : (∀ i ∈ a, i > 0) ∧ a.card = m * n + 1) : ∃ b ⊆ a, (b.card = m + 1 ∧ ∀ j ∈ b, ∀ i ∈ b, i ≠ j → ¬(j ∣ i)) ∨ (b.card = n + 1 ∧ ∀ j ∈ b, j ≠ sSup b → j ∣ sInf {i ∈ b | i > j}) := sorry",,,[],,"theory putnam_1966_b4 imports Complex_Main begin theorem putnam_1966_b4: fixes m n :: nat and a :: ""nat set"" assumes ha: ""(\ i \ a. i > 0) \ card a = m * n + 1"" shows ""\ b \ a. (card b = m + 1 \ (\ j \ b. \ i \ b. i \ j \ \(j dvd i)) \ (card b = n + 1 \ (\ j \ b. \ i \ b. j < i \ j dvd i)))"" sorry end", putnam_1966_b6,"theorem putnam_1966_b6 (y : ℝ → ℝ) (hy : Differentiable ℝ y ∧ Differentiable ℝ (deriv y)) (diffeq : deriv (deriv y) + Real.exp * y = 0) : ∃ r s N : ℝ, ∀ x > N, r ≤ y x ∧ y x ≤ s := sorry",,,[],,"theory putnam_1966_b6 imports Complex_Main ""HOL-Analysis.Derivative"" begin theorem putnam_1966_b6: fixes y :: ""real \ real"" assumes hy: ""y differentiable_on UNIV \ (deriv y) differentiable_on UNIV"" and diffeq: ""\ x :: real. (deriv (deriv y)) x + (exp x) * (y x) = 0"" shows ""\ r s N :: real. \ x > N. r \ y x \ y x \ s"" sorry end", putnam_2001_a1,"theorem putnam_2001_a1 (S : Type*) [Mul S] (hS : ∀ a b : S, (a * b) * a = b) : ∀ a b : S, a * (b * a) = b := sorry","Consider a set $S$ and a binary operation $*$, i.e., for each $a,b\in S$, $a*b\in S$. Assume $(a*b)*a=b$ for all $a,b\in S$. Prove that $a*(b*a)=b$ for all $a,b\in S$.",,['abstract_algebra'],,"theory putnam_2001_a1 imports Complex_Main begin theorem putnam_2001_a1: fixes op :: ""'a => 'a => 'a"" assumes hop : ""\a b :: 'a. op (op a b) a = b"" shows ""\a b :: 'a. op a (op b a) = b"" sorry end ", putnam_2001_a3,"abbrev putnam_2001_a3_solution : Set ℤ := sorry -- {m : ℤ | ∃ k : ℤ, k^2 = m ∨ 2*k^2 = m} theorem putnam_2001_a3 (P : ℤ → Polynomial ℤ := fun m : ℤ => (Polynomial.X)^4 - (Polynomial.C (2*m + 4))*(Polynomial.X)^2 + Polynomial.C ((m - 2)^2)) : {m : ℤ | ∃ a : Polynomial ℤ, ∃ b : Polynomial ℤ, P m = a * b ∧ (∃ n ∈ Ici 1, a.coeff n ≠ 0) ∧ (∃ n ∈ Ici 1, b.coeff n ≠ 0)} = putnam_2001_a3_solution := sorry","For each integer $m$, consider the polynomial \[P_m(x)=x^4-(2m+4)x^2+(m-2)^2.\] For what values of $m$ is $P_m(x)$ the product of two non-constant polynomials with integer coefficients?","$P_m(x)$ factors into two nonconstant polynomials over the integers if and only if $m$ is either a square or twice a square.",['algebra'],"Section putnam_2001_a3. Require Import Reals Coquelicot.Coquelicot. Definition putnam_2001_a3_solution (m: Z) := exists (n: Z), m = Z.mul n n \/ m = Z.mul 2 (Z.mul n n). Theorem putnam_2001_a3: let P (m: Z) (x: R) := x ^ 4 - (2 * IZR m + 4) * x ^ 2 + (IZR m - 2) ^ 2 in let p (a: nat -> Z) (x: R) (n: nat) := sum_n (fun i => IZR (a i) * x ^ i) n in forall (m: Z), exists (a1 a2: nat -> Z) (n1 n2: nat), forall (x: R), P m x = p a1 x n1 * p a2 x n2 <-> putnam_2001_a3_solution m. Proof. Admitted. End putnam_2001_a3.","theory putnam_2001_a3 imports Complex_Main ""HOL-Computational_Algebra.Polynomial"" begin definition putnam_2001_a3_solution :: ""int set"" where ""putnam_2001_a3_solution \ undefined"" (* {m :: int. \ k :: int. k ^ 2 = m \ 2 * k ^ 2 = m} *) theorem putnam_2001_a3: fixes P :: ""int \ int poly"" defines ""P \ \ m :: int. monom 1 4 - monom (2 * m + 4) 2 + monom ((m - 2) ^ 2) 0"" shows ""{m :: int. \ a b :: int poly. P m = a * b \ (\ n \ {1..}. coeff a n \ 0) \ (\ n \ {1..}. coeff b n \ 0)} = putnam_2001_a3_solution"" sorry end", putnam_2001_a5,"theorem putnam_2001_a5 : ∃! (a : ℤ) (n : ℕ), a > 0 ∧ n > 0 ∧ a^(n+1) - (a+1)^n = 2001 := sorry","Prove that there are unique positive integers $a$, $n$ such that $a^{n+1}-(a+1)^n=2001$.",,['number_theory'],"Section putnam_2001_a5. Require Import Nat. Theorem putnam_2001_a5 : exists! (a n: nat), a > 0 /\ n > 0 /\ a ^ (n + 1) - (a + 1) ^ n = 2001. Proof. Admitted. End putnam_2001_a5.","theory putnam_2001_a5 imports Complex_Main begin theorem putnam_2001_a5: shows ""\! (a :: int). \! (n :: nat). a > 0 \ \ n > 0 \ a^(n+1) - (a+1)^n = 2001"" sorry end", putnam_2001_b1,"theorem putnam_2001_b1 (n : ℕ) (nums : Fin n → Fin n → ℤ) (colors : Fin n → Fin n → Fin 2) (npos : n > 0) (neven : Even n) (hnums : ∀ k l : Fin n, nums k l = k * n + l + 1) (hcolorsrows : ∀ k : Fin n, (∑ l : Fin n, (if (colors k l = 0) then 1 else 0)) = n / 2) (hcolorscols : ∀ l : Fin n, (∑ k : Fin n, (if (colors k l = 0) then 1 else 0)) = n / 2) : (∑ k : Fin n, ∑ l : Fin n, (if (colors k l = 0) then (nums k l) else 0)) = (∑ k : Fin n, ∑ l : Fin n, (if (colors k l = 1) then (nums k l) else 0)) := sorry","Let $n$ be an even positive integer. Write the numbers $1,2,\ldots,n^2$ in the squares of an $n \times n$ grid so that the $k$-th row, from left to right, is $(k-1)n+1,(k-1)n+2,\ldots,(k-1)n+n$. Color the squares of the grid so that half of the squares in each row and in each column are red and the other half are black (a checkerboard coloring is one possibility). Prove that for each coloring, the sum of the numbers on the red squares is equal to the sum of the numbers on the black squares.",,['algebra'],,"theory putnam_2001_b1 imports Complex_Main begin theorem putnam_2001_b1: fixes n :: nat and nums :: ""nat \ nat \ nat"" and colors :: ""nat \ nat \ nat"" assumes npos: ""n > 0"" and neven: ""even n"" and hnums: ""\ k \ {0 ..< n}. \ l \ {0 ..< n}. nums k l = k * n + l + 1"" and hcolorsrng: ""\ k \ {0 ..< n}. \ l \ {0 ..< n}. colors k l \ {0, 1}"" and hcolorsrows: ""\ k \ {0 ..< n}. (\ l = 0 ..< n. colors k l) = n div 2"" and hcolorscols: ""\ l \ {0 ..< n}. (\ k = 0 ..< n. colors k l) = n div 2"" shows ""(\ k = 0 ..< n. \ l = 0 ..< n. if colors k l = 0 then nums k l else 0) = (\ k = 0 ..< n. \ l = 0 ..< n. if colors k l = 1 then nums k l else 0)"" sorry end", putnam_2001_b2,"abbrev putnam_2001_b2_solution : Set (ℝ × ℝ) := sorry -- {((3 ^ ((1 : ℝ) / 5) + 1) / 2, (3 ^ ((1 : ℝ) / 5) - 1) / 2)} theorem putnam_2001_b2 (x y : ℝ) (eq1 : Prop) (eq2 : Prop) (heq1 : eq1 = (1 / x + 1 / (2 * y) = (x ^ 2 + 3 * y ^ 2) * (3 * x ^ 2 + y ^ 2))) (heq2 : eq2 = (1 / x - 1 / (2 * y) = 2 * (y ^ 4 - x ^ 4))) : (eq1 ∧ eq2) ↔ (x, y) ∈ putnam_2001_b2_solution := sorry","Find all pairs of real numbers $(x,y)$ satisfying the system of equations \begin{align*} \frac{1}{x}+\frac{1}{2y}&=(x^2+3y^2)(3x^2+y^2) \\ \frac{1}{x}-\frac{1}{2y}&=2(y^4-x^4). \end{align*}",Show that $x=(3^{1/5}+1)/2$ and $y=(3^{1/5}-1)/2$ is the unique solution satisfying the given equations.,['algebra'],"Section putnam_2001_b2. Require Import Reals Coquelicot.Coquelicot. Definition putnam_2001_b2_solution (x y: R) := x = (3 ^ (1 / 5) + 1) / 2 /\ y = (3 ^ (1 / 5) - 1) / 2. Theorem putnam_2001_b2: forall (x y: R), 1 / x + 1 / (2 * y) = (x ^ 2 + 3 * y ^ 2) * (3 * x ^ 2 + y ^ 2) /\ 1 / x - 1 / (2 * y) = 2 * (y ^ 4 - x ^ 4) <-> putnam_2001_b2_solution x y. Proof. Admitted. End putnam_2001_b2.","theory putnam_2001_b2 imports Complex_Main begin definition putnam_2001_b2_solution :: ""(real \ real) set"" where ""putnam_2001_b2_solution \ undefined"" (* {((3 powr (1 / 5) + 1) / 2, (3 powr (1 / 5) - 1) / 2)} *) theorem putnam_2001_b2: fixes x y :: real and eq1 eq2 :: bool defines ""eq1 \ 1 / x + 1 / (2 * y) = (x ^ 2 + 3 * y ^ 2) * (3 * x ^ 2 + y ^ 2)"" and ""eq2 \ 1 / x - 1 / (2 * y) = 2 * (y ^ 4 - x ^ 4)"" shows ""(eq1 \ eq2) \ (x, y) \ putnam_2001_b2_solution"" sorry end", putnam_2001_b3,"abbrev putnam_2001_b3_solution : ℝ := sorry -- 3 theorem putnam_2001_b3 : ∑' n : Set.Ici 1, ((2 : ℝ) ^ (round (Real.sqrt n)) + (2 : ℝ) ^ (-round (Real.sqrt n))) / 2 ^ (n : ℝ) = putnam_2001_b3_solution := sorry","For any positive integer $n$, let $\langle n \rangle$ denote the closest integer to $\sqrt{n}$. Evaluate $\sum_{n=1}^\infty \frac{2^{\langle n \rangle}+2^{-\langle n \rangle}}{2^n}$.",Show that the sum is $3$.,['analysis'],"Section putnam_2001_b3. Require Import Reals Coquelicot.Coquelicot. Definition putnam_2001_b3_solution := 3. Theorem putnam_2001_b3: forall (n: nat), ge n 0 -> let closest (n: nat) := let n := INR n in Rmin ((n - sqrt n) - IZR (floor (n - sqrt n))) (IZR (floor (n + 1 - sqrt n)) - (n - sqrt n)) in Lim_seq (fun n => sum_n (fun n => (Rpower 2 (closest n) + Rpower 2 (- closest n)) / (2 ^ n)) n) = putnam_2001_b3_solution. Proof. Admitted. End putnam_2001_b3.","theory putnam_2001_b3 imports Complex_Main begin definition putnam_2001_b3_solution :: real where ""putnam_2001_b3_solution \ undefined"" (* 3 *) theorem putnam_2001_b3: shows ""(\ n :: nat. (2 powr (round (sqrt (n + 1))) + 2 powr (- round (sqrt (n + 1)))) / 2 powr (n + 1)) = putnam_2001_b3_solution"" sorry end", putnam_2001_b4,"abbrev putnam_2001_b4_solution : Prop := sorry -- True theorem putnam_2001_b4 (S : Set ℚ) (hS : S = univ \ {-1, 0, 1}) (f : S → S) (hf : ∀ x : S, f x = x - 1 / (x : ℚ)) : ⋂ n ∈ Ici 1, f^[n] '' univ = ∅ ↔ putnam_2001_b4_solution := sorry","Let $S$ denote the set of rational numbers different from $\{-1,0,1\}$. Define $f:S\rightarrow S$ by $f(x)=x-1/x$. Prove or disprove that \[\bigcap_{n=1}^\infty f^{(n)}(S) = \emptyset,\] where $f^{(n)}$ denotes $f$ composed with itself $n$ times.",,['algebra'],,"theory putnam_2001_b4 imports Complex_Main begin definition putnam_2001_b4_solution::bool where ""putnam_2001_b4_solution \ undefined"" (* True *) theorem putnam_2001_b4: fixes f :: ""rat \ rat"" and S :: ""rat set"" defines ""f \ \x. x - 1/x"" and ""S \ \ - {-1, 0, 1}"" shows ""putnam_2001_b4_solution = ((\n \ {1..}. image (f^^n) S) = {}) "" sorry end ", putnam_2001_b5,"theorem putnam_2001_b5 (a b : ℝ) (g : ℝ → ℝ) (abint : 0 < a ∧ a < 1 / 2 ∧ 0 < b ∧ b < 1 / 2) (gcont : Continuous g) (hg : ∀ x : ℝ, g (g x) = a * g x + b * x) : ∃ c : ℝ, ∀ x : ℝ, g x = c * x := sorry","Let $a$ and $b$ be real numbers in the interval $(0,1/2)$, and let $g$ be a continuous real-valued function such that $g(g(x))=ag(x)+bx$ for all real $x$. Prove that $g(x)=cx$ for some constant $c$.",,['analysis'],"Section putnam_2001_b5. Require Import Reals Coquelicot.Coquelicot. Theorem putnam_2001_b5: forall (a b: R) (g: R -> R), 0 < a < 1/2 /\ 0 < b < 1/2 /\ continuity g /\ forall (x: R), g (g x) = a * g x + b * x -> exists (c: R), g x = c * x. Proof. Admitted. End putnam_2001_b5.","theory putnam_2001_b5 imports Complex_Main begin theorem putnam_2001_b5: fixes a b :: real and g :: ""real \ real"" assumes abint: ""a \ {0 <..< 1 / 2} \ b \ {0 <..< 1 / 2}"" and gcont: ""continuous_on UNIV g"" and hg : ""\ x :: real. g (g x) = a * g x + b * x"" shows ""\ c :: real. \ x :: real. g x = c * x"" sorry end", putnam_2001_b6,"abbrev putnam_2001_b6_solution : Prop := sorry -- True theorem putnam_2001_b6 (aposinc : (ℤ → ℝ) → Prop) (alim : (ℤ → ℝ) → Prop) (haposinc : ∀ a : ℤ → ℝ, aposinc a = ∀ n ≥ 1, a n > 0 ∧ a n < a (n + 1)) (halim : ∀ a : ℤ → ℝ, alim a = Tendsto (fun n : ℤ => a (n + 1) / (n + 1)) atTop (𝓝 0)) : (∀ a : ℤ → ℝ, (aposinc a ∧ alim a) → {n : ℤ | n > 0 ∧ (∀ i ∈ Set.Icc 1 (n - 1), a (n - i) + a (n + i) < 2 * a n)}.Infinite) ↔ putnam_2001_b6_solution := sorry","Assume that $(a_n)_{n \geq 1}$ is an increasing sequence of positive real numbers such that $\lim a_n/n=0$. Must there exist infinitely many positive integers $n$ such that $a_{n-i}+a_{n+i}<2a_n$ for $i=1,2,\ldots,n-1$?","Show that the answer is yes, there must exist infinitely many such $n$.",['analysis'],"Section putnam_2001_b6. Require Import Nat Reals Coquelicot.Coquelicot. Definition putnam_2001_b6_solution := True. Theorem putnam_2001_b6: forall (a: nat -> R), (forall (i j: nat), lt i j -> a i < a j) /\ Lim_seq (fun n => a n / INR n) = 0 -> forall (n: nat), exists (m: nat), gt m n /\ forall (i: nat), and (le 1 i) (le i (n - 1)) -> a (sub n i) + a (add n i) < 2 * a n /\ a (sub m i) + a (add m i) < 2 * a m. Proof. Admitted. End putnam_2001_b6.","theory putnam_2001_b6 imports Complex_Main begin definition putnam_2001_b6_solution :: bool where ""putnam_2001_b6_solution \ undefined"" (* True *) theorem putnam_2001_b6: fixes aposinc alim :: ""(nat \ real) \ bool"" defines ""aposinc \ \ a. \ n \ 1. a n > 0 \ a n < a (n + 1)"" and ""alim \ \ a. (\ n :: nat. a (n + 1) / (n + 1)) \ 0"" shows ""(\ a :: nat \ real. (aposinc a \ alim a) \ infinite {n :: nat. n > 0 \ (\ i \ {1 .. n - 1}. a (n - i) + a (n + i) < 2 * a n)}) \ putnam_2001_b6_solution"" sorry end", putnam_1968_a1,"theorem putnam_1968_a1 : 22/7 - Real.pi = ∫ x in (0)..1, x^4 * (1 - x)^4 / (1 + x^2) := sorry",,,[],,"theory putnam_1968_a1 imports Complex_Main ""HOL-Analysis.Interval_Integral"" begin theorem putnam_1968_a1: shows ""22 / 7 - pi = interval_lebesgue_integral lebesgue 0 1 (\ x. x ^ 4 * (1 - x) ^ 4 / (1 + x ^ 2))"" sorry end", putnam_1968_a2,"theorem putnam_1968_a2 (a b c d e f : ℤ) (ε : ℝ) (hne : a * d ≠ b * c) (hε : ε > 0) (q1 : ℚ := |r * a + s * b - e|) (q2 : ℚ := |r * c + s * d - f|) : ∃ r s : ℚ, 0 < q1 ∧ q1 < ε ∧ 0 < q2 ∧ q2 < ε := sorry",,,[],,"theory putnam_1968_a2 imports Complex_Main begin theorem putnam_1968_a2: fixes a b c d e f :: int and \ :: real assumes hne: ""a * d \ b * c"" and h\: ""\ > 0"" shows ""\ r s :: rat. 0 < real_of_rat \r * rat_of_int a + s * rat_of_int b - rat_of_int e\ \ real_of_rat \r * rat_of_int a + s * rat_of_int b - rat_of_int e\ < \ \ 0 < real_of_rat \r * rat_of_int c + s * rat_of_int d - rat_of_int f\ \ real_of_rat \r * rat_of_int c + s * rat_of_int d - rat_of_int f\ < \"" sorry end", putnam_1968_a3,"theorem putnam_1968_a3 {a : Type} (S : Finset a) (ha : SDiff (Finset a)) : ∃ l : List (Finset a), (∀ i : Fin l.length, l[i] ⊆ S) ∧ l[0]! = ∅ ∧ (∀ s ⊆ S, ∃! i : Fin l.length, l[i] = s) ∧ ∀ i ∈ Finset.range (l.length - 1), (l[i]! ⊆ l[i+1]! ∧ (l[i+1]! \ l[i]!).card = 1) ∨ (l[i+1]! ⊆ l[i]! ∧ (l[i]! \ l[i+1]!).card = 1) := sorry",,,[],,"theory putnam_1968_a3 imports Complex_Main begin theorem putnam_1968_a3: shows ""\ l :: ('a::finite) set list. l!0 = {} \ (\ S :: 'a set. \! i \ {0 ..< length l}. l!i = S) \ (\ i \ {0 ..< length l - 1}. \ a :: 'a. (a \ l!i \ l!(i+1) = insert a (l!i)) \ (a \ l!(i+1) \ l!i = insert a (l!(i+1))))"" sorry end", putnam_1968_a4,"theorem putnam_1968_a4 (n : ℕ) (S : Fin n → (Fin 3 → ℝ)) (hS : ∀ i : Fin n, (S i 0)^2 + (S i 1)^2 + (S i 2)^2 = 1) : ∑ i : Fin n, ∑ j : Fin n, (if i < j then (Euclidean.dist (S i) (S j))^2 else (0 : ℝ)) ≤ n^2 := sorry",,,[],,"theory putnam_1968_a4 imports Complex_Main ""HOL-Analysis.Finite_Cartesian_Product"" begin (* Note: This formalization uses ""nat"" instead of ""Fin n"" as the domain of S *) theorem putnam_1968_a4: fixes n :: nat and S :: ""nat \ real^3"" assumes hS: ""\ i \ {0.. i = 0.. j = 0.. n ^ 2"" sorry end", putnam_1968_a5,"abbrev putnam_1968_a5_solution : ℝ := sorry -- 8 theorem putnam_1968_a5 (V : Set ℝ[X] := {P : ℝ[X] | P.degree = 2 ∧ ∀ x ∈ Set.Icc 0 1, |P.eval x| ≤ 1}) : sSup {|(derivative P).eval 0| | P ∈ V} = putnam_1968_a5_solution := sorry",,,[],,"theory putnam_1968_a5 imports Complex_Main ""HOL-Computational_Algebra.Polynomial"" begin definition putnam_1968_a5_solution :: real where ""putnam_1968_a5_solution \ undefined"" (* 8 *) theorem putnam_1968_a5: fixes V :: ""real poly set"" defines ""V \ {P :: real poly. degree P = 2 \ (\ x \ {0..1}. \poly P x\ \ 1)}"" shows ""Sup {y :: real. \ P \ V. \poly (pderiv p) 0\ = y} = putnam_1968_a5_solution"" sorry end", putnam_1968_a6,"abbrev putnam_1968_a6_solution : Set ℂ[X] := sorry -- {X - 1, -(X - 1), X + 1, -(X + 1), X^2 + X - 1, -(X^2 + X - 1), X^2 - X - 1, -(X^2 - X - 1), X^3 + X^2 - X - 1, -(X^3 + X^2 - X - 1), X^3 - X^2 - X + 1, -(X^3 - X^2 - X + 1)} theorem putnam_1968_a6 : {P : ℂ[X] | P.natDegree ≥ 1 ∧ (∀ k ∈ Set.Icc 0 P.natDegree, P.coeff k = 1 ∨ P.coeff k = -1) ∧ ∀ z : ℂ, P.eval z = 0 → ∃ r : ℝ, r = z} = putnam_1968_a6_solution := sorry",,,[],,"theory putnam_1968_a6 imports Complex_Main ""HOL-Computational_Algebra.Polynomial"" begin definition putnam_1968_a6_solution :: ""complex poly set"" where ""putnam_1968_a6_solution \ undefined"" (* {P :: complex poly. \ l \ {[-1, 1], [1, 1], [-1, 1, 1], [-1, -1, 1], [-1, -1, 1, 1], [1, -1, -1, 1]}. P = Poly l \ P = -(Poly l)} *) theorem putnam_1968_a6: shows ""{P :: complex poly. degree P \ 1 \ (\ k \ {0 .. degree P}. coeff P k = 1 \ coeff P k = -1) \ (\ z :: complex. poly P z = 0 \ (\ r :: real. r = z))} = putnam_1968_a6_solution"" sorry end", putnam_1968_b2,"theorem putnam_1968_b2 [Group G] (hG : Finite G) (A : Set G) (hA : A.ncard > (Nat.card G : ℚ)/2) : ∀ g : G, ∃ x ∈ A, ∃ y ∈ A, g = x * y := sorry",,,[],,"theory putnam_1968_b2 imports Complex_Main ""HOL-Algebra.Multiplicative_Group"" begin theorem putnam_1968_b2: fixes A :: ""'a set"" and G :: ""'a monoid"" assumes hG: ""group G \ finite (carrier G)"" and hAsG: ""A \ carrier G"" and hA: ""card A > card (carrier G) / 2"" shows ""\ g \ carrier G. \ x y. x \ A \ y \ A \ g = x \\<^bsub>G\<^esub> y"" sorry end", putnam_1968_b4,"theorem putnam_1968_b4 (f : ℝ → ℝ) (hf : Continuous f ∧ ∃ r : ℝ, Tendsto (fun y => ∫ x in ball 0 y, f x) ⊤ (𝓝 r)) : ∃ r : ℝ, Tendsto (fun y => ∫ x in ball 0 y, f (x - 1/x)) ⊤ (𝓝 r) ∧ Tendsto (fun y => ∫ x in ball 0 y, f x) ⊤ (𝓝 r) := sorry",,,[],,"theory putnam_1968_b4 imports Complex_Main ""HOL-Analysis.Interval_Integral"" begin theorem putnam_1968_b4: fixes f :: ""real \ real"" assumes hf: ""continuous_on UNIV f \ (\ r :: real. ((\ y. interval_lebesgue_integral lebesgue (-y) y f) \ r) at_top)"" shows ""\ r :: real. ((\ y. interval_lebesgue_integral lebesgue (-y) y (\ x. f (x - 1 / x))) \ r) at_top \ ((\ y. interval_lebesgue_integral lebesgue (-y) y f) \ r) at_top"" sorry end", putnam_1968_b5,"abbrev putnam_1968_b5_solution : ℕ → ℕ := sorry -- fun p => p^2 + p theorem putnam_1968_b5 (p : ℕ) (hp : Prime p) : {M : Matrix (Fin 2) (Fin 2) (ZMod p) | M 0 0 + M 1 1 = 1 ∧ M 0 0 * M 1 1 - M 0 1 * M 1 0 = 0}.ncard = putnam_1968_b5_solution p := sorry",,,[],,"theory putnam_1968_b5 imports Complex_Main ""HOL-Computational_Algebra.Primes"" ""HOL-Analysis.Finite_Cartesian_Product"" begin definition putnam_1968_b5_solution :: ""nat \ nat"" where ""putnam_1968_b5_solution \ undefined"" (* \ p. p ^ 2 + p *) theorem putnam_1968_b5: fixes p :: nat assumes hp: ""prime p"" and pcard: ""CARD('p::field) = p"" shows ""card {M :: 'p^2^2. M$1$1 + M$2$2 = 1 \ M$1$1 * M$2$2 - M$1$2 * M$2$1 = 0} = putnam_1968_b5_solution p"" sorry end", putnam_1968_b6,"theorem putnam_1968_b6 : ¬∃ K : ℕ → Set ℚ, (∀ n : ℕ, IsCompact (K n)) ∧ (∀ S : Set ℚ, IsCompact S → ∃ n : ℕ, S ⊆ K n) := sorry",,,[],,"theory putnam_1968_b6 imports Complex_Main begin theorem putnam_1968_b6: fixes compactQ :: ""real set \ bool"" defines ""compactQ \ \ S. compact S \ (\ r \ S. \ q :: rat. q = r)"" shows ""\(\ K :: nat \ real set. (\ n :: nat. compactQ (K n)) \ (\ S :: real set. compactQ S \ (\ n :: nat. S \ K n)))"" sorry end", putnam_1967_a1,"theorem putnam_1967_a1 (n : ℕ) (a : Set.Icc 1 n → ℝ) (f : ℝ → ℝ := (fun x : ℝ => ∑ i : Set.Icc 1 n, a i * Real.sin (i * x))) (npos : n > 0) (flesin : ∀ x : ℝ, abs (f x) ≤ abs (Real.sin x)) : abs (∑ i : Set.Icc 1 n, i * a i) ≤ 1 := sorry","Let $f(x)=a_1\sin x+a_2\sin 2x+\dots+a_n\sin nx$, where $a_1,a_2,\dots,a_n$ are real numbers and where $n$ is a positive integer. Given that $|f(x)| \leq |\sin x|$ for all real $x$, prove that $|a_1|+|2a_2|+\dots+|na_n| \leq 1$.",,['analysis'],,"theory putnam_1967_a1 imports Complex_Main begin (* uses (nat \ real) instead of ({1..n} \ real) *) theorem putnam_1967_a1: fixes n :: nat and a :: ""nat \ real"" and f :: ""real \ real"" defines ""f \ (\x::real. (\i::nat=1..n. a i * sin (i*x)))"" assumes npos: ""n > 0"" and flesin: ""\x::real. \f x\ \ \sin x\"" shows ""\\i::nat=1..n. i * a i\ \ 1"" sorry end ", putnam_1967_a2,"theorem putnam_1967_a2 (S : ℕ → ℤ) (hS0 : S 0 = 1) (hSn : ∀ n ≥ 1, S n = {A : Matrix (Fin n) (Fin n) ℕ | (∀ i j : Fin n, A i j = A j i) ∧ (∀ j : Fin n, (∑ i : Fin n, A i j) = 1)}.ncard) : (∀ n ≥ 1, S (n + 1) = S n + n * S (n - 1)) ∧ (∀ x : ℝ, (∑' n : ℕ, S n * (x ^ n / (n)!)) = Real.exp (x + x ^ 2 / 2)) := sorry","Define $S_0$ to be $1$. For $n \geq 1$, let $S_n$ be the number of $n \times n$ matrices whose elements are nonnegative integers with the property that $a_{ij}=a_{ji}$, ($i,j=1,2,\dots,n$) and where $\sum_{i=1}^n a_{ij}=1$, ($j=1,2,\dots,n$). Prove \begin{enumerate} \item[(a)] $S_{n+1}=S_n+nS_{n-1}$ \item[(b)] $\sum_{n=0}^\infty S_n\frac{x^n}{n!} = \exp(x+x^2/2)$, where $\exp(x)=e^x$. \end{enumerate}",,"['linear_algebra', 'analysis']",,"theory putnam_1967_a2 imports Complex_Main begin (* uses (nat \ nat \ nat) instead of (Fin n \ Fin n \ nat) *) theorem putnam_1967_a2: fixes S :: ""nat \ int"" assumes hS0: ""S 0 = 1"" and hSn: ""\n::nat\1. S n = card {A::nat\nat\nat. (\i::nat\{0..(n-1)}. \j::nat\{0..(n-1)}. A i j = A j i) \ (\j::nat\{0..(n-1)}. (\i::nat=0..(n-1). A i j) = 1) \ (\i j::nat. ((i \ n \ j \ n) \ A i j = 0))}"" shows ""(\n::nat\1. S (n+1) = S n + n * S (n-1)) \ (\x::real. (\n::nat. S n * (x^n / fact n)) = exp (x + x^2/2))"" sorry end ", putnam_1967_a3,"abbrev putnam_1967_a3_solution : ℕ := sorry -- 5 theorem putnam_1967_a3 (pform : Polynomial ℝ → Prop := (fun p : Polynomial ℝ => p.degree = 2 ∧ ∀ i ∈ Finset.range 3, p.coeff i = round (p.coeff i))) (pzeros : Polynomial ℝ → Prop := (fun p : Polynomial ℝ => ∃ z1 z2 : Set.Ioo (0 : ℝ) 1, z1 ≠ z2 ∧ p.eval z1.1 = 0 ∧ p.eval z2.1 = 0)) (pall : Polynomial ℝ → Prop := (fun p : Polynomial ℝ => pform p ∧ pzeros p ∧ p.coeff 2 > 0)) : (∃ p : Polynomial ℝ, pall p ∧ p.coeff 2 = putnam_1967_a3_solution) ∧ (∀ p : Polynomial ℝ, pall p → p.coeff 2 ≥ putnam_1967_a3_solution) := sorry",Consider polynomial forms $ax^2-bx+c$ with integer coefficients which have two distinct zeros in the open interval $0 undefined"" (* 5 *) theorem putnam_1967_a3: fixes pform :: ""(real poly) \ bool"" and pzeros :: ""(real poly) \ bool"" and pall :: ""(real poly) \ bool"" defines ""pform \ (\p::real poly. degree p = 2 \ (\i::nat\{0..2}. coeff p i \ \))"" and ""pzeros \ (\p::real poly. (\z1::real\{0<..<1}. \z2::real\{0<..<1}. z1 \ z2 \ poly p z1 = 0 \ poly p z2 = 0))"" and ""pall \ (\p::real poly. pform p \ pzeros p \ coeff p 2 > 0)"" shows ""(LEAST coeff2::nat. (\p::real poly. pall p \ coeff2 = coeff p 2)) = putnam_1967_a3_solution"" sorry end ", putnam_1967_a4,"theorem putnam_1967_a4 (lambda : ℝ) (hlambda : lambda > 1 / 2) : ¬∃ u : ℝ → ℝ, ∀ x ∈ Set.Icc 0 1, u x = 1 + lambda * (∫ y in Set.Ioo x 1, u y * u (y - x)) := sorry","Show that if $\lambda > \frac{1}{2}$ there does not exist a real-valued function $u$ such that for all $x$ in the closed interval $0 \leq x \leq 1$, $u(x)=1+\lambda\int_x^1 u(y)u(y-x)\,dy$.",,['analysis'],,"theory putnam_1967_a4 imports Complex_Main ""HOL-Analysis.Interval_Integral"" begin theorem putnam_1967_a4: fixes lambda :: real assumes hlambda: ""lambda > 1/2"" shows ""\(\u::real\real. \x::real\{0..1}. u x = 1 + lambda * (interval_lebesgue_integral lebesgue x 1 (\y::real. u y * u (y - x))))"" sorry end ", putnam_1967_b2,"theorem putnam_1967_b2 (p r : ℝ) (A B C α β γ : ℝ) (prbound : 0 ≤ p ∧ p ≤ 1 ∧ 0 ≤ r ∧ r ≤ 1) (id1 : ∀ x y : ℝ, (p * x + (1 - p) * y) ^ 2 = A * x ^ 2 + B * x * y + C * y ^ 2) (id2 : ∀ x y : ℝ, (p * x + (1 - p) * y) * (r * x + (1 - r) * y) = α * x ^ 2 + β * x * y + γ * y ^ 2) : max (max A B) C ≥ 4 / 9 ∧ max (max α β) γ ≥ 4 / 9 := sorry","Let $0 \leq p \leq 1$ and $0 \leq r \leq 1$ and consider the identities \begin{enumerate} \item[(a)] $(px+(1-p)y)^2=Ax^2+Bxy+Cy^2$, \item[(b)] $(px+(1-p)y)(rx+(1-r)y)=\alpha x^2+\beta xy+\gamma y^2$. \end{enumerate} Show that (with respect to $p$ and $r$) \begin{enumerate} \item[(a)] $\max\{A,B,C\} \geq 4/9$, \item[(b)] $\max\{\alpha,\beta,\gamma\} \geq 4/9$. \end{enumerate}",,['algebra'],,"theory putnam_1967_b2 imports Complex_Main begin theorem putnam_1967_b2: fixes p r :: real and A B C \ \ \ :: real assumes prbound: ""0 \ p \ p \ 1 \ 0 \ r \ r \ 1"" and id1: ""\x y::real. (p*x + (1-p)*y)^2 = A*x^2 + B*x*y + C*y^2"" and id2: ""\x y::real. (p*x + (1-p)*y) * (r*x + (1-r)*y) = \*x^2 + \*x*y + \*y^2"" shows ""max (max A B) C \ 4/9 \ max (max \ \) \ \ 4/9"" sorry end ", putnam_1967_b3,"theorem putnam_1967_b3 (f g : ℝ → ℝ) (fgcont : Continuous f ∧ Continuous g) (fgperiod : Function.Periodic f 1 ∧ Function.Periodic g 1) : Tendsto (fun n : ℤ => ∫ x in Set.Ioo 0 1, f x * g (n * x)) atTop (𝓝 ((∫ x in Set.Ioo 0 1, f x) * (∫ x in Set.Ioo 0 1, g x))) := sorry","If $f$ and $g$ are continuous and periodic functions with period $1$ on the real line, then $\lim_{n \to \infty} \int_0^1 f(x)g(nx)\,dx=(\int_0^1 f(x)\,dx)(\int_0^1 g(x)\,dx)$.",,['analysis'],,"theory putnam_1967_b3 imports Complex_Main ""HOL-Library.Periodic_Fun"" ""HOL-Analysis.Interval_Integral"" begin theorem putnam_1967_b3: fixes f g :: ""real \ real"" assumes fgcont: ""continuous_on UNIV f \ continuous_on UNIV g"" and fgperiod: ""periodic_fun_simple' f \ periodic_fun_simple' g"" shows ""filterlim (\n::int. interval_lebesgue_integral lebesgue 0 1 (\x::real. f x * g (n*x))) (nhds ((interval_lebesgue_integral lebesgue 0 1 f) * (interval_lebesgue_integral lebesgue 0 1 g))) at_top"" sorry end ", putnam_2011_a2,"abbrev putnam_2011_a2_solution : ℝ := sorry -- 2/Real.pi theorem putnam_2011_a2 (a b : ℕ → ℝ) (habn : ∀ n : ℕ, a n > 0 ∧ b n > 0) (hab1 : a 0 = 1 ∧ b 0 = 1) (hb : ∀ n ≥ 1, b n = b (n-1) * a n - 2) (hbnd : ∃ B : ℝ, ∀ n : ℕ, |b n| ≤ B) : Tendsto (fun n => ∑ i : Fin n, 1/(∏ j : Fin (i + 1), (a j))) atTop (𝓝 putnam_2011_a2_solution) := sorry","Let $a_1,a_2,\dots$ and $b_1,b_2,\dots$ be sequences of positive real numbers such that $a_1 = b_1 = 1$ and $b_n = b_{n-1} a_n - 2$ for$n=2,3,\dots$. Assume that the sequence $(b_j)$ is bounded. Prove tha \[ S = \sum_{n=1}^\infty \frac{1}{a_1...a_n} \] converges, and evaluate $S$.",Show that the solution is $S = 3/2$.,['analysis'],"Section putnam_2011_a2. Require Import Reals Coquelicot.Coquelicot. Definition putnam_2011_a2_solution := 3 / 2. Theorem putnam_2011_a2: let fix prod_n (m: nat -> R) (n : nat) : R := match n with | O => m 0%nat | S n' => m n' * prod_n m n' end in forall (a: nat -> R), let fix b (n: nat) := match n with | O => 1 | S n' => b n' * a n - 2 end in exists (M: nat), (forall (n: nat), a n > 0 /\ b n > 0 /\ -1 * INR M <= b n <= INR M) -> Series (fun n => prod_n a n) = putnam_2011_a2_solution. Proof. Admitted. End putnam_2011_a2.","theory putnam_2011_a2 imports Complex_Main begin definition putnam_2011_a2_solution :: real where ""putnam_2011_a2_solution \ undefined"" (* 2/pi *) theorem putnam_2011_a2: fixes a b :: ""nat \ real"" assumes habn: ""\n::nat. a n > 0 \ b n > 0"" and hab1: ""a 0 = 1 \ b 0 = 1"" and hb: ""\n::nat\1. b n = b (n-1) * a n - 2"" and hbnd: ""\B::real. \n::nat. \b n\ \ B"" shows ""filterlim (\n::nat. \i::nat=0..(n-1). 1 / (\j::nat=0..i. a j)) (nhds putnam_2011_a2_solution) at_top"" sorry end ", putnam_2011_a3,"abbrev putnam_2011_a3_solution : ℝ × ℝ := sorry -- (-1, 2 / Real.pi) theorem putnam_2011_a3 : putnam_2011_a3_solution.2 > 0 ∧ Tendsto (fun r : ℝ => (r ^ putnam_2011_a3_solution.1 * ∫ x in Set.Ioo 0 (Real.pi / 2), x ^ r * Real.sin x) / (∫ x in Set.Ioo 0 (Real.pi / 2), x ^ r * Real.cos x)) atTop (𝓝 putnam_2011_a3_solution.2) := sorry","Find a real number $c$ and a positive number $L$ for which $\lim_{r \to \infty} \frac{r^c \int_0^{\pi/2} x^r\sin x\,dx}{\int_0^{\pi/2} x^r\cos x\,dx}=L$.","Show that $(c,L)=(-1,2/\pi)$ works.",['analysis'],"Section putnam_2011_a3. Require Import Reals Coquelicot.Coquelicot. Definition putnam_2011_a3_solution := (-1, 2 / PI). Theorem putnam_2011_a3: exists (c L: R), L > 0 -> Lim_seq (fun r => (Rpower (INR r) c * RInt (fun x => x ^ r * sin x) 0 PI / 2) / (RInt (fun x => x ^ r * cos x) 0 PI / 2)) = L <-> (c, L) = putnam_2011_a3_solution. Proof. Admitted. End putnam_2011_a3.","theory putnam_2011_a3 imports Complex_Main ""HOL-Analysis.Set_Integral"" ""HOL-Analysis.Lebesgue_Measure"" begin (* there may be multiple possible correct answers *) definition putnam_2011_a3_solution :: ""real \ real"" where ""putnam_2011_a3_solution \ undefined"" (* (-1, 2/pi) *) theorem putnam_2011_a3: shows ""let (c, L) = putnam_2011_a3_solution in (L > 0 \ filterlim (\r::real. (r powr c * (set_lebesgue_integral lebesgue {0<..<(pi/2)} (\x::real. x powr r * sin x))) / (set_lebesgue_integral lebesgue {0<..<(pi/2)} (\x::real. x powr r * cos x))) (nhds L) at_top)"" sorry end ", putnam_2011_a4,"abbrev putnam_2011_a4_solution : Set ℕ := sorry -- {n : ℕ | Odd n} theorem putnam_2011_a4 (n : ℕ) (nmat : Prop) (npos : n > 0) (hnmat : ∃ A : Matrix (Fin n) (Fin n) ℤ, (∀ r : Fin n, Even ((A r) ⬝ᵥ (A r))) ∧ (∀ r1 r2 : Fin n, r1 ≠ r2 → Odd ((A r1) ⬝ᵥ (A r2)))) : nmat ↔ n ∈ putnam_2011_a4_solution := sorry","For which positive integers $n$ is there an $n \times n$ matrix with integer entries such that every dot product of a row with itself is even, while every dot product of two different rows is odd?",Show that the answer is $n$ odd.,['linear_algebra'],,"theory putnam_2011_a4 imports Complex_Main ""HOL-Analysis.Finite_Cartesian_Product"" ""HOL-Analysis.Infinite_Sum"" begin (* uses (nat \ 'n) instead of (Fin n \ 'n) *) definition putnam_2011_a4_solution :: ""nat set"" where ""putnam_2011_a4_solution \ undefined"" (* {n::nat. odd n} *) theorem putnam_2011_a4: fixes n :: nat and intinner :: ""int^'n \ int^'n \ int"" and nmat :: bool assumes npos: ""n > 0"" and pncard: ""CARD('n) = n"" and hintinner2: ""\u v::int^'n. intinner u v = (\\<^sub>\i::'n. u$i * v$i)"" and hnmat: ""\A::int^'n^'n. (\r::'n. even (intinner (row r A) (row r A))) \ (\r1 r2::'n. r1 \ r2 \ odd (intinner (row r1 A) (row r2 A)))"" shows ""nmat \ n \ putnam_2011_a4_solution"" sorry end ", putnam_2011_b1,"theorem putnam_2011_b1 (h k : ℤ) (hkpos : h > 0 ∧ k > 0) : ∀ ε > 0, ∃ m n : ℤ, m > 0 ∧ n > 0 ∧ ε < |h * Real.sqrt m - k * Real.sqrt n| ∧ |h * Real.sqrt m - k * Real.sqrt n| < 2 * ε := sorry","Let $h$ and $k$ be positive integers. Prove that for every $\epsilon>0$, there are positive integers $m$ and $n$ such that $\epsilon<|h\sqrt{m}-k\sqrt{n}|<2\epsilon$.",,['algebra'],"Section putnam_2011_b1. Require Import Reals ZArith Coquelicot.Coquelicot. Theorem putnam_2011_b1: forall (h k: Z), Z.gt h 0 /\ Z.gt k 0 -> forall (ep: R), ep > 0 /\ exists (m n: Z), ep < Rabs (IZR h * sqrt (IZR m) - IZR k * sqrt (IZR n)) < 2 * ep. Proof. Admitted. End putnam_2011_b1.","theory putnam_2011_b1 imports Complex_Main begin theorem putnam_2011_b1: fixes h k :: nat assumes hkpos: ""h > 0 \ k > 0"" shows ""\\>0. \m n::nat. m > 0 \ n > 0 \ \ < \h * sqrt m - k * sqrt n\ \ \h * sqrt m - k * sqrt n\ < 2*\"" sorry end ", putnam_2011_b2,"abbrev putnam_2011_b2_solution : Set ℕ := sorry -- {2, 5} theorem putnam_2011_b2 (S : Set (Fin 3 → ℕ)) (t : ℕ) (t7inS : Prop) (hS : S = {s : Fin 3 → ℕ | (s 0).Prime ∧ (s 1).Prime ∧ (s 2).Prime ∧ ∃ x : ℚ, (s 0) * x ^ 2 + (s 1) * x + (s 2) = 0}) (ht7inS : t7inS = ({s ∈ S | ∃ i : Fin 3, s i = t}.encard ≥ 7)) : (t.Prime ∧ t7inS) ↔ t ∈ putnam_2011_b2_solution := sorry","Let $S$ be the set of all ordered triples $(p,q,r)$ of prime numbers for which at least one rational number $x$ satisfies $px^2+qx+r=0$. Which primes appear in seven or more elements of $S$?",Show that only the primes $2$ and $5$ appear seven or more times.,['number_theory'],,"theory putnam_2011_b2 imports Complex_Main ""HOL-Computational_Algebra.Primes"" begin definition putnam_2011_b2_solution :: ""nat set"" where ""putnam_2011_b2_solution \ undefined"" (* {2, 5} *) theorem putnam_2011_b2: fixes S :: ""(nat \ nat \ nat) set"" and t :: nat and t7inS :: bool assumes hS: ""S \ {(p::nat,q::nat,r::nat). prime p \ prime q \ prime r \ (\x::rat. p*x^2 + q*x + r = 0)}"" and ht7inS: ""t7inS \ (card {s\S. fst s = t \ fst (snd s) = t \ snd (snd s) = t} \ 7)"" shows ""(prime t \ t7inS) \ t \ putnam_2011_b2_solution"" sorry end ", putnam_2011_b3,"abbrev putnam_2011_b3_solution : Prop := sorry -- True theorem putnam_2011_b3 : ((∀ f g : ℝ → ℝ, g 0 ≠ 0 → ContinuousAt g 0 → DifferentiableAt ℝ (fun x ↦ f x * g x) 0 → DifferentiableAt ℝ (fun x ↦ f x / g x) 0 → (DifferentiableAt ℝ f 0)) ↔ putnam_2011_b3_solution) := sorry","Let $f$ and $g$ be (real-valued) functions defined on an open interval containing $0$, with $g$ nonzero and continuous at $0$. If $fg$ and $f/g$ are differentiable at $0$, must $f$ be differentiable at $0$?",Prove that $f$ is differentiable.,['analysis'],"Section putnam_2011_b3. Require Import Reals Coquelicot.Coquelicot. Definition putnam_2011_b3_solution := True. Theorem putnam_2011_b3: forall (f g: R -> R) (a b: R), (a < 0 < b /\ forall (x: R), a < x < b -> g x > 0 /\ continuity_pt g 0 /\ ex_derive f (g 0) /\ ex_derive (fun x => f x / g x) 0) -> ex_derive f 0 <-> putnam_2011_b3_solution. Proof. Admitted. End putnam_2011_b3.","theory putnam_2011_b3 imports Complex_Main ""HOL-Analysis.Derivative"" begin definition putnam_2011_b3_solution :: bool where ""putnam_2011_b3_solution \ undefined"" (* True *) theorem putnam_2011_b3: shows ""(\f g::real\real. g 0 \ 0 \ continuous_on {0} g \ (\x::real. f x*g x) differentiable_on {0} \ (\x::real. f x/g x) differentiable_on {0} \ f differentiable_on {0}) \ putnam_2011_b3_solution"" sorry end ", putnam_2011_b5,"theorem putnam_2011_b5 (a : ℕ → ℝ) (h : ∃ A : ℝ, ∀ n : ℕ, ∫ x : ℝ, ((∑ i : Finset.range n, 1 / (1 + (x - a i) ^ 2)) ^ 2) ≤ A * n) : (∃ B : ℝ, B > 0 ∧ ∀ n : ℕ, ∑' i : Finset.range n, ∑' j : Finset.range n, (1 + (a i - a j) ^ 2) ≥ B * n ^ 3) := sorry","Let $a_1, a_2, \dots$ be real numbers. Suppose that there is a constant $A$ such that for all $n$, \[ \int_{-\infty}^\infty \left( \sum_{i=1}^n \frac{1}{1 + (x-a_i)^2} \right)^2\,dx \leq An. \] Prove there is a constant $B>0$ such that for all $n$, \[ \sum_{i,j=1}^n (1 + (a_i - a_j)^2) \geq Bn^3. \]",,['analysis'],"Section putnam_2011_b5. Require Import Reals Coquelicot.Coquelicot. Theorem putnam_2011_b5: forall (a: nat -> R), (exists (A: R), forall (n: nat), Lim_seq (fun nInc => (RInt (fun x => (sum_n (fun i => 1 / (1 + (x - a i) ^ 2)) n)) (-1 * INR nInc) (INR nInc)) ^ 2) <= A * INR n) -> exists (B: R), B > 0 /\ forall (n: nat), sum_n (fun i => (sum_n (fun j => 1 + (a i - a j) ^ 2)) n) n >= B * INR n ^ 3. Proof. Admitted. End putnam_2011_b5.","theory putnam_2011_b5 imports Complex_Main ""HOL-Analysis.Set_Integral"" ""HOL-Analysis.Lebesgue_Measure"" begin theorem putnam_2011_b5: fixes a :: ""nat \ real"" assumes h: ""\A::real. \n::nat. (set_lebesgue_integral lebesgue \ (\x::real. (\i::nat=0..(n-1). 1 / (1 + (x-a i)^2)) ^ 2)) \ A*n"" shows ""\B::real>0. \n::nat. (\i::nat=0..(n-1). \j::nat=0..(n-1). 1 + (a i-a j)^2) \ B*n^3"" sorry end ", putnam_2011_b6,"theorem putnam_2011_b6 (p : ℕ) (hp : Odd p ∧ Nat.Prime p) : {n ∈ Finset.range p | ¬ p ∣ ∑ k : Finset.range p, Nat.factorial k * n^(k : ℕ)}.ncard ≥ (p + 1)/2 := sorry","Let $p$ be an odd prime. Show that for at least $(p+1)/2$ values of $n$ in $\{0,1,2,\dots,p-1\}$, \[ \sum_{k=0}^{p-1} k! n^k \qquad \mbox{is not divisible by $p$.} \]",,['number_theory'],"Section putnam_2011_b6. Require Import Nat List Factorial Ensembles Finite_sets Reals Znumtheory ZArith Coquelicot.Coquelicot. Open Scope nat_scope. Theorem putnam_2011_b6: forall (p: nat), prime (Z.of_nat p) /\ odd p = true -> let l := seq 0 p in exists (E: Ensemble nat), (forall (n: nat), E n -> and (le 0 n) (lt n p)) /\ cardinal nat E ((p + 1) / 2) /\ forall (n: nat), E n -> Z.to_nat (floor (sum_n (fun k => INR (fact k * n ^ k)) p)) mod p <> 0. Proof. Admitted. End putnam_2011_b6.","theory putnam_2011_b6 imports Complex_Main ""HOL-Computational_Algebra.Primes"" begin theorem putnam_2011_b6: fixes p :: nat assumes hp: ""odd p \ prime p"" shows ""card {n::nat\{0..(p-1)}. \(p dvd (\k::nat=0..(p-1). fact k * n^k))} \ (p + 1)/2"" sorry end ", putnam_2017_a1,"abbrev putnam_2017_a1_solution : Set ℤ := sorry -- {x : ℤ | x > 0 ∧ (x = 1 ∨ 5 ∣ x)} theorem putnam_2017_a1 (Q : Set (Set ℤ)) (Spos : ∀ S ∈ Q, ∀ x ∈ S, x > 0) (S2 : ∀ S ∈ Q, 2 ∈ S) (Sn : ∀ S ∈ Q, ∀ n, n ^ 2 ∈ S → n ∈ S) (Sn5 : ∀ S ∈ Q, ∀ n, n ∈ S → (n + 5) ^ 2 ∈ S) : Set.univ \ (⋂ T ∈ Q, T) = putnam_2017_a1_solution := sorry","Let $S$ be the smallest set of positive integers such that (a) $2$ is in $S$, (b) $n$ is in $S$ whenever $n^2$ is in $S$, and (c) $(n+5)^2$ is in $S$ whenever $n$ is in $S$. Which positive integers are not in $S$?.","Show that all solutions are in the set $\{x \in \mathbb{Z}\, |\, x > 0 \land (x = 1 \lor 5 \mid x)\}",['number_theory'],"Section putnam_2017_a1. From mathcomp Require Import div. Definition putnam_2017_a1_solution (A: nat -> Prop) (x: nat) := x > 0 /\ (x = 1 \/ 5 %| x = true) -> ~ A x. Theorem putnam_2017_a1: exists (A: nat -> Prop), forall (B: nat -> Prop), let valid_set (A: nat -> Prop): Prop := forall (n: nat), A 2 /\ A (n*n) -> A n /\ A n -> A ((n+5)*(n+5)) in valid_set A /\ valid_set B /\ forall (n: nat), A n -> B n -> putnam_2017_a1_solution A n. Proof. Admitted. End putnam_2017_a1.","theory putnam_2017_a1 imports Complex_Main begin definition putnam_2017_a1_solution::""int set"" where ""putnam_2017_a1_solution \ undefined"" (* { x::int . x > 0 \ (x = 1 \ 5 dvd x) } *) theorem putnam_2017_a1: shows ""putnam_2017_a1_solution = (LEAST S. 2 \ S \ (\n. n^2 \ S \ n \ S) \ (\n. n \ S \ (n+5)^2 \ S) \ (\n \ S. n > 0))"" sorry end ", putnam_2017_a2,"theorem putnam_2017_a2 (Q : ℕ → ℝ → ℝ) (hQbase : ∀ x : ℝ, Q 0 x = 1 ∧ Q 1 x = x) (hQn : ∀ n ≥ 2, ∀ x : ℝ, Q n x = ((Q (n - 1) x) ^ 2 - 1) / Q (n - 2) x) : ∀ n > 0, ∃ P : Polynomial ℝ, (∀ i : ℕ, P.coeff i = round (P.coeff i)) ∧ Q n = P.eval := sorry","Let $Q_0(x)=1$, $Q_1(x)=x$, and $Q_n(x)=\frac{(Q_{n-1}(x))^2-1}{Q_{n-2}(x)}$ for all $n \geq 2$. Show that, whenever $n$ is a positive integer, $Q_n(x)$ is equal to a polynomial with integer coefficients.",,['algebra'],"Section putnam_2017_a2. Require Import Nat QArith Reals. From mathcomp Require Import seq ssrnat ssrnum ssralg poly. Local Open Scope ring_scope. Theorem putnam_2017_a2: let Q := fix q (n: nat) (x: R): R := match n with | O => R1 | S O => x | S ((S n'') as n') => Rdiv (Rminus (Rmult (q n' x) (q n' x)) 1) (q n'' x) end in forall (n: nat), ge n 0 -> exists (R: numDomainType) (p: {poly R}) (i: nat), (exists (z: Z), p`_i = if (Z.ltb z 0) then -(Z.to_nat z)%:R else (Z.to_nat z)%:R) /\ exists (z: Z), forall (x: RbaseSymbolsImpl.R), Q n x = IZR z /\ (if (Z.ltb z 0) then -(Z.to_nat z)%:R else (Z.to_nat z)%:R) = p.[n%:R]. Proof. Admitted. End putnam_2017_a2.","theory putnam_2017_a2 imports Complex_Main ""HOL-Computational_Algebra.Polynomial"" begin theorem putnam_2017_a2: fixes Q :: ""nat \ real \ real"" assumes hQbase: ""\x::real. Q 0 x = 1 \ Q 1 x = x"" and hQn: ""\n::nat>2. \x::real. Q n x = ((Q (n-1) x)^2 - 1) / Q (n-2) x"" shows ""\n::nat>0. \P::real poly. (\i::nat. coeff P i = round (coeff P i)) \ Q n = poly P"" sorry end ", putnam_2017_a3,"theorem putnam_2017_a3 (a b : ℝ) (f g : ℝ → ℝ) (I : ℕ → ℝ) (altb : a < b) (fgcont : ContinuousOn f (Set.Icc a b) ∧ ContinuousOn g (Set.Icc a b)) (fgimg : f '' (Set.Icc a b) ⊆ Set.Ioi 0 ∧ g '' (Set.Icc a b) ⊆ Set.Ioi 0) (fgint : ∫ x in Set.Ioo a b, f x = ∫ x in Set.Ioo a b, g x) (fneg : ∃ x : Set.Icc a b, f x ≠ g x) (hI : ∀ n > 0, I n = ∫ x in Set.Ioo a b, ((f x) ^ (n + 1)) / ((g x) ^ n)) : (∀ n > 0, I (n + 1) > I n) ∧ Tendsto I atTop atTop := sorry","Let $a$ and $b$ be real numbers with $a forall (f g: R -> R) (x: R), a <= x <= b -> continuity_pt f x /\ f x > 0 /\ g x > 0 -> (RInt f a b = RInt g a b) /\ (exists (x: R), a <= x <= b /\ f x <> g x) -> let I_n (n: nat) := RInt (fun x => (f x)^(n+1)/(g x)^n) a b in forall (n: nat), I_n n < I_n (Nat.add n 1) /\ ~ ex_lim_seq I_n. Proof. Admitted. End putnam_2017_a3.","theory putnam_2017_a3 imports Complex_Main ""HOL-Analysis.Set_Integral"" ""HOL-Analysis.Lebesgue_Measure"" begin (* uses (real \ real) instead of ({a..b} \ {0<..}) *) theorem putnam_2017_a3: fixes a b :: real and f g :: ""real \ real"" and I :: ""nat \ real"" assumes altb: ""a < b"" and fgcont: ""continuous_on {a..b} f \ continuous_on {a..b} g"" and fgimg: ""f ` {a..b} \ {0<..} \ g ` {a..b} \ {0<..}"" and fgint: ""set_lebesgue_integral lebesgue {a<..x::real\{a..b}. f x \ g x"" and hI: ""\n::nat>0. I n = set_lebesgue_integral lebesgue {a<..x::real. (f x)^(n+1) / (g x)^n)"" shows ""(\n::nat>0. I (n+1) > I n) \ filterlim I at_top at_top"" sorry end ", putnam_2017_a4,"theorem putnam_2017_a4 (N : ℕ) (score : Fin (2 * N) → Fin 11) (hsurj : ∀ k : Fin 11, ∃ i : Fin (2 * N), score i = k) (havg : (∑ i : Fin (2 * N), (score i : ℝ)) / (2 * N) = 7.4) : (∃ s : Finset (Fin (2 * N)), s.card = N ∧ (∑ i in s, (score i : ℝ)) / N = 7.4 ∧ (∑ i in sᶜ, (score i : ℝ)) / N = 7.4) := sorry","A class with $2N$ students took a quiz, on which the possible scores were $0,1,\dots,10$. Each of these scores occurred at least once, and the average score was exactly $7.4$. Show that the class can be divided into two groups of $N$ students in such a way that the average score for each group was exactly $7.4$.",,['algebra'],"Section putnam_2017_a4. Require Import Nat Ensembles List Finite_sets Reals Coquelicot.Coquelicot. From mathcomp Require Import div fintype seq ssrbool. Theorem putnam_2017_a4 (N : nat) (M : nat := mul 2 N) (score : nat -> 'I_11) (hsurj : forall (k: 'I_11), exists (i : 'I_M), score i = k) (havg : (sum_n (fun i => INR (nat_of_ord (score i))) M) / INR M = 7.4) (E_bool : nat -> bool) : exists (presS: nat -> Prop) (E: Ensemble nat), cardinal nat E N /\ forall (n: nat), E n <-> (presS n /\ and (le 0 n) (le n 10)) /\ (forall i, E_bool i = true <-> E i) /\ (sum_n (fun i => if (E_bool i) then INR (nat_of_ord (score i)) else 0) N) / INR N = 7.4 /\ (sum_n (fun i => if E_bool i then 0 else INR (nat_of_ord (score i))) N) / INR N = 7.4. Proof. Admitted. End putnam_2017_a4.","theory putnam_2017_a4 imports Complex_Main begin theorem putnam_2017_a4: fixes N :: nat and score :: ""nat \ nat"" assumes hrng : ""\ i \ {0 .. 2 * N - 1}. score i \ {0 .. 10}"" and hsurj: ""\ k \ {0 .. 10}. \ i \ {0 .. 2 * N - 1}. score i = k"" and havg: ""(\ i = 0 .. (2 * N - 1). score i) / (2 * N) = 7.4"" shows ""\ s \ {0 .. 2 * N - 1}. card s = N \ (\ i \ s. score i) / N = 7.4 \ (\ i \ {0 .. 2 * N - 1} - s. score i) / N = 7.4"" sorry end", putnam_2017_b1,"theorem putnam_2017_b1 (lines : Set (Set (Fin 2 → ℝ)) := {L : Set (Fin 2 → ℝ) | ∃ v w : Fin 2 → ℝ, w ≠ 0 ∧ L = {p : Fin 2 → ℝ | ∃ t : ℝ, p = v + t • w}}) (L1 L2 : Set (Fin 2 → ℝ)) (L1L2lines : L1 ∈ lines ∧ L2 ∈ lines) (L1L2distinct : L1 ≠ L2) : L1 ∩ L2 ≠ ∅ ↔ (∀ lambda : ℝ, lambda ≠ 0 → ∀ P : Fin 2 → ℝ, (P ∉ L1 ∧ P ∉ L2) → ∃ A1 A2 : Fin 2 → ℝ, A1 ∈ L1 ∧ A2 ∈ L2 ∧ (A2 - P = lambda • (A1 - P))) := sorry","Let $L_1$ and $L_2$ be distinct lines in the plane. Prove that $L_1$ and $L_2$ intersect if and only if, for every real number $\lambda \neq 0$ and every point $P$ not on $L_1$ or $L_2$, there exist points $A_1$ on $L_1$ and $A_2$ on $L_2$ such that $\overrightarrow{PA_2}=\lambda \overrightarrow{PA_1}$.",,['geometry'],,"theory putnam_2017_b1 imports Complex_Main ""HOL-Analysis.Finite_Cartesian_Product"" begin theorem putnam_2017_b1: fixes lines :: ""(real^2) set set"" and L1 L2 :: ""(real^2) set"" defines ""lines \ {L :: (real^2) set. \ v w :: real^2. w \ 0 \ L = {p :: real^2. \ t :: real. p = v + t *s w}}"" assumes L1L2lines: ""L1 \ lines \ L2 \ lines"" and L1L2distinct: ""L1 \ L2"" shows ""(L1 \ L2 \ {}) \ (\ (lambda :: real) \ 0. \ P :: real^2. (P \ L1 \ P \ L2) \ (\ A1 A2 :: real^2. A1 \ L1 \ A2 \ L2 \ A2 - P = lambda *s (A1 - P)))"" sorry end", putnam_2017_b2,"abbrev putnam_2017_b2_solution : ℕ := sorry -- 16 theorem putnam_2017_b2 (mina : ℤ) (hmina : mina ≥ 0) (S : ℤ → ℕ → ℤ := fun a k ↦ ∑ i : Fin k, a + i) (p : ℤ → ℕ → Prop := fun N k ↦ ∃ a > 0, S a k = N) (q : ℤ → Prop := fun N ↦ p N 2017 ∧ ∀ k : ℕ, k > 1 → k ≠ 2017 → ¬p N k) (hqmina : q (S mina 2017)) (hminalb : ∀ a > 0, q (S a 2017) → mina ≤ a) : (mina = putnam_2017_b2_solution) := sorry","Suppose that a positive integer $N$ can be expressed as the sum of $k$ consecutive positive integers \[ N = a + (a+1) +(a+2) + \cdots + (a+k-1) \] for $k=2017$ but for no other values of $k>1$. Considering all positive integers $N$ with this property, what is the smallest positive integer $a$ that occurs in any of these expressions?",Prove that the smallest value of $a$ is $16$.,['algebra'],"Section putnam_2017_b2. Require Import Nat ZArith Coquelicot.Coquelicot. Definition putnam_2017_b2_solution := 16. Theorem putnam_2017_b2 (mina : nat) (posMin : mina > 0) (A : nat -> nat -> nat := fun a k => Z.to_nat (floor (sum_n (fun i => Raxioms.INR (a + (i + 1))) k))) (p : nat -> nat -> Prop := fun N k => exists (a: nat), a > 0 /\ A a k = N) (q : nat -> Prop := fun N => p N 2017 /\ forall (k: nat), k > 1 -> k <> 2017 -> ~ p N k) (hmina : q (A mina 2017)) (hminalb : (forall (a: nat), a > 0 /\ q (A a 2017) -> mina <= a)) : mina = putnam_2017_b2_solution. Proof. Admitted. End putnam_2017_b2.","theory putnam_2017_b2 imports Complex_Main begin definition putnam_2017_b2_solution :: nat where ""putnam_2017_b2_solution \ undefined"" (* 16 *) theorem putnam_2017_b2: fixes S :: ""nat \ nat \ nat"" and p :: ""nat \ nat \ bool"" and q :: ""nat \ bool"" defines ""S \ \ a k. \ i \ {0 .. k - 1}. a + i"" and ""p \ \ N k. \ a > 0. S a k = N"" and ""q \ \ N. p N 2017 \ (\ k > 1. k \ 2017 \ \p N k)"" shows ""(LEAST a. a > 0 \ q (S a 2017)) = putnam_2017_b2_solution"" sorry end", putnam_2017_b3,"theorem putnam_2017_b3 (f : ℝ → ℝ) (c : ℕ → ℝ) (hc : ∀ n, c n = 0 ∨ c n = 1) (hf : ∀ x, f x = ∑' n : ℕ, (c n) * x^n) : f (2/3) = 3/2 → Irrational (f 1/2) := sorry","Suppose that $f(x) = \sum_{i=0}^\infty c_i x^i$ is a power series for which each coefficient $c_i$ is $0$ or $1$. Show that if $f(2/3) = 3/2$, then $f(1/2)$ must be irrational.",,['number_theory'],,"theory putnam_2017_b3 imports Complex_Main begin theorem putnam_2017_b3: fixes f :: ""real \ real"" and c :: ""nat \ real"" defines hf: ""f \ \x. \i::nat. c (i) * x^i"" assumes hc: ""\n. c n = 0 \ c n = 1"" and ""f (2/3) = 3/2"" shows ""f (1/2) \ \"" sorry end ", putnam_2017_b4,"abbrev putnam_2017_b4_solution : ℝ := sorry -- (log 2) ^ 2 theorem putnam_2017_b4 : (∑' k : ℕ, 3 * log (4 * k + 2) / (4 * k + 2) - log (4 * k + 3) / (4 * k + 3) - log (4 * k + 4) / (4 * k + 4) - log (4 * k + 5) / (4 * k + 5) = putnam_2017_b4_solution) := sorry","Evaluate the sum \begin{gather*} \sum_{k=0}^\infty \left( 3 \cdot \frac{\ln(4k+2)}{4k+2} - \frac{\ln(4k+3)}{4k+3} - \frac{\ln(4k+4)}{4k+4} - \frac{\ln(4k+5)}{4k+5} ight) \ = 3 \cdot \frac{\ln 2}{2} - \frac{\ln 3}{3} - \frac{\ln 4}{4} - \frac{\ln 5}{5} + 3 \cdot \frac{\ln 6}{6} - \frac{\ln 7}{7} \ - \frac{\ln 8}{8} - \frac{\ln 9}{9} + 3 \cdot \frac{\ln 10}{10} - \cdots . \end{gather*} (As usual, $\ln x$ denotes the natural logarithm of $x$.)",Prove that the sum equals $(\ln 2)^2$.,['algebra'],"Section putnam_2017_b4. Require Import Reals Coquelicot.Coquelicot. Definition putnam_2017_b4_solution := (ln 2 / ln 10) ^ 2. Theorem putnam_2017_b4 : Lim_seq (fun n => sum_n (fun k => let k := INR k in (3 * ln (4 * k + 2) / (4 * k + 2) - ln (4 * k + 3) / (4 * k + 3) - ln (4 * k + 4) / (4 * k + 4) - ln (4 * k + 5) / (4 * k + 5))) n) = putnam_2017_b4_solution . Proof. Admitted. End putnam_2017_b4.","theory putnam_2017_b4 imports Complex_Main begin definition putnam_2017_b4_solution :: real where ""putnam_2017_b4_solution \ undefined"" (* (ln 2) ^ 2 *) theorem putnam_2017_b4: shows ""(\ k :: nat. 3 * ln (4 * k + 2) / (4 * k + 2) - ln (4 * k + 3) / (4 * k + 3) - ln (4 * k + 4) / (4 * k - 4) - ln (4 * k + 5) / (4 * k + 5)) = putnam_2017_b4_solution"" sorry end", putnam_2017_b6,"abbrev putnam_2017_b6_solution : ℕ := sorry -- 2016! / 1953! - 63! * 2016 theorem putnam_2017_b6 (S : Finset (Finset.range 64 → Finset.Icc 1 2017)) (hs : ∀ x : (Finset.range 64 → Finset.Icc 1 2017), x ∈ S ↔ (Injective x ∧ (2017 ∣ (∑ i : Finset.range 64, if i ≤ (⟨1, by norm_num⟩ : Finset.range 64) then (x i : ℤ) else i * (x i : ℤ))))) : (S.card = putnam_2017_b6_solution) := sorry","Find the number of ordered $64$-tuples $(x_0,x_1,\dots,x_{63})$ such that $x_0,x_1,\dots,x_{63}$ are distinct elements of $\{1,2,\dots,2017\}$ and \[ x_0 + x_1 + 2x_2 + 3x_3 + \cdots + 63 x_{63} \] is divisible by 2017.",Prove that the answer is $\frac{2016!}{1953!} - 63! \cdot 2016$,"['algebra', 'number_theory']",,"theory putnam_2017_b6 imports Complex_Main begin definition putnam_2017_b6_solution::nat where ""putnam_2017_b6_solution \ undefined"" (* (fact 2016) / (fact 1953) - (fact 63) * 2016 *) theorem putnam_2017_b6: fixes S::""(nat list) set"" defines ""S \ {x. (size x = 64) \ (\i\{0..63}. x!i \ 1 \ x!i \ 2017) \ (\i\{0..63}. \j\{0..63}. x!i = x!j \ i = j) \ (2017 dvd (x!0 + (\i=1..63. (i * x!i))))}"" shows ""card S = putnam_2017_b6_solution"" sorry end ", putnam_2014_a1,"theorem putnam_2014_a1 (f : ℝ → ℝ) (hf : ∀ x : ℝ, f x = (1 - x + x ^ 2) * Real.exp x) (hfdiff : ContDiff ℝ ⊤ f) (c : ℕ → ℝ) (hc : ∀ k : ℕ, c k = taylorCoeffWithin f k Set.univ 0) : ∀ k : ℕ, c k ≠ 0 → ∃ q : ℚ, c k = q ∧ (q.num = 1 ∨ Prime q.num.natAbs) := sorry",Prove that every nonzero coefficient of the Taylor series of \[(1 - x + x^2)e^x\] about $x=0$ is a rational number whose numerator (in lowest terms) is either $1$ or a prime number.,,"['analysis', 'number_theory']",,"theory putnam_2014_a1 imports Complex_Main ""HOL-Analysis.Derivative"" ""HOL-Computational_Algebra.Primes"" begin theorem putnam_2014_a1: fixes f::""real\real"" and coeff::""nat\real"" and n::nat defines ""f \ \x. (1 - x + x^2) * exp (x)"" and ""coeff \ \n. (deriv^^n) f 0 / fact n"" assumes non_zero : ""coeff n \ 0"" shows ""\r::rat. coeff n = r \ (fst (quotient_of r) = 1 \ prime (fst (quotient_of r)))"" sorry end ", putnam_2014_a2,"abbrev putnam_2014_a2_solution : ℕ → ℝ := sorry -- (fun n : ℕ => (-1) ^ (n - 1) / ((n - 1)! * (n)!)) theorem putnam_2014_a2 (n : ℕ) (A : Matrix (Fin n) (Fin n) ℝ) (npos : n > 0) (hA : ∀ i j : Fin n, A i j = 1 / min (i.1 + 1 : ℚ) (j.1 + 1)) : A.det = putnam_2014_a2_solution n := sorry","Let $A$ be the $n \times n$ matrix whose entry in the $i$-th row and $j$-th column is $\frac{1}{\min(i,j)}$ for $1 \leq i,j \leq n$. Compute $\det(A)$.",Show that the determinant is $\frac{(-1)^{n-1}}{(n-1)!n!}$.,['linear_algebra'],"Section putnam_2014_a2. From mathcomp Require Import div. Theorem putnam_2014_a2: True. Proof. Admitted. End putnam_2014_a2.","theory putnam_2014_a2 imports Complex_Main ""HOL-Analysis.Determinants"" begin definition putnam_2014_a2_solution :: ""nat \ real"" where ""putnam_2014_a2_solution \ undefined"" (* (\n::nat. (-1)^(n-1) / (fact (n-1) * fact n)) *) theorem putnam_2014_a2: fixes n :: nat and A :: ""real^'n^'n"" assumes npos: ""n > 0"" and pncard: ""CARD('n) = n"" and hA: ""\pnind::nat\'n. pnind ` {0..(n-1)} = UNIV \ (\i::nat\{0..(n-1)}. \j::nat\{0..(n-1)}. A$(pnind i)$(pnind j) = 1 / min (i+1) (j+1))"" shows ""det A = putnam_2014_a2_solution n"" sorry end ", putnam_2014_a3,"abbrev putnam_2014_a3_solution : ℝ := sorry -- 3 / 7 theorem putnam_2014_a3 (a : ℕ → ℝ) (a0 : a 0 = 5 / 2) (ak : ∀ k ≥ 1, a k = (a (k - 1)) ^ 2 - 2) : Tendsto (fun n : ℕ => ∏ k in Finset.range n, (1 - 1 / a k)) atTop (𝓝 putnam_2014_a3_solution) := sorry",Let \( a_0 = \frac{5}{2} \) and \( a_k = a_{k-1}^2 - 2 \) for \( k \geq 1 \). Compute \( \prod_{k=0}^{\infty} \left(1 - rac{1}{a_k}\right) \) in closed form.,Show that the solution is 3/7.,['number_theory'],"Section putnam_2014_a3. Require Import Reals Coquelicot.Coquelicot. Definition putnam_2014_a3_solution := 3 / 7. Theorem putnam_2014_a3: let fix prod_n (m: nat -> R) (n : nat) : R := match n with | O => m 0%nat | S n' => m n' * prod_n m n' end in let fix a (n: nat) := match n with | O => 5 / 2 | S n' => (a n') ^ 2 - 2 end in Lim_seq (fun n => prod_n (fun k => 1 - 1 / a k) n) = putnam_2014_a3_solution. Proof. Admitted. End putnam_2014_a3.","theory putnam_2014_a3 imports Complex_Main begin definition putnam_2014_a3_solution :: real where ""putnam_2014_a3_solution \ undefined"" (* 3/7 *) theorem putnam_2014_a3: fixes a :: ""nat \ real"" assumes a0: ""a 0 = 5/2"" and ak: ""\k::nat\1. a k = (a (k-1))^2 - 2"" shows ""filterlim (\n::nat. (\k::nat=0..(n-1). (1 - 1/(a k)))) (nhds putnam_2014_a3_solution) at_top"" sorry end ", putnam_2014_a5,"theorem putnam_2014_a5 (P : ℕ → Polynomial ℂ) (hP : ∀ n, P n = ∑ i in Finset.Icc 1 n, i * Polynomial.X ^ (i - 1)) : ∀ (j k : ℕ), (j > 0 ∧ k > 0) → j ≠ k → IsCoprime (P j) (P k) := sorry",Let \[ P_n(x) = 1 + 2 x + 3 x^2 + \cdots + n x^{n-1}.\] Prove that the polynomials $P_j(x)$ and $P_k(x)$ are relatively prime for all positive integers $j$ and $k$ with $j \neq k$.,,['algebra'],,"theory putnam_2014_a5 imports Complex_Main ""HOL-Computational_Algebra.Polynomial"" begin theorem putnam_2014_a5: fixes pf :: ""nat \ real poly"" and j k :: nat assumes hdeg : ""\n. degree (pf n) = n - 1"" and hpf : ""\n. \p k"" and jpos : ""j > 0"" and kpos : ""k > 0"" shows ""\ a b:: real poly. a * (pf j) + b * (pf k) = 1"" sorry end ", putnam_2014_a6,"abbrev putnam_2014_a6_solution : ℕ → ℕ := sorry -- (fun n : ℕ => n ^ n) theorem putnam_2014_a6 (n : ℕ) (kex : ℕ → Prop) (npos : n > 0) (hkex : ∀ k ≥ 1, kex k = ∃ M N : Fin k → Matrix (Fin n) (Fin n) ℝ, ∀ i j : Fin k, ((∃ p : Fin n, (M i * N j) p p = 0) ↔ i ≠ j)) : (putnam_2014_a6_solution n ≥ 1 ∧ kex (putnam_2014_a6_solution n)) ∧ (∀ k ≥ 1, kex k → k ≤ putnam_2014_a6_solution n) := sorry","Let \( n \) be a positive integer. What is the largest \( k \) for which there exist \( n \times n \) matrices \( M_1, \ldots, M_k \) and \( N_1, \ldots, N_k \) with real entries such that for all \( i \) and \( j \), the matrix product \( M_i N_j \) has a zero entry somewhere on its diagonal if and only if \( i \neq j \)?",Show that the solution has the form k \<= n ^ n.,['linear_algebra'],,"theory putnam_2014_a6 imports Complex_Main ""HOL-Analysis.Finite_Cartesian_Product"" begin (* uses (nat \ real^'n^'n) instead of (Fin k \ real^'n^'n) *) definition putnam_2014_a6_solution :: ""nat \ nat"" where ""putnam_2014_a6_solution \ undefined"" (* (\n::nat. n^n) *) theorem putnam_2014_a6: fixes n :: nat and kex :: ""nat \ bool"" assumes npos: ""n > 0"" and pncard: ""CARD('n) = n"" and hkex: ""\k::nat\1. kex k = (\M N::nat\real^'n^'n. \i::nat\{0..(k-1)}. \j::nat\{0..(k-1)}. ((\p::'n. (M i ** N j)$p$p = 0) \ i \ j))"" shows ""(GREATEST k::nat. k \ 1 \ kex k) = putnam_2014_a6_solution n"" sorry end ", putnam_2014_b1,"abbrev putnam_2014_b1_solution : Set ℕ := sorry -- {n : ℕ | n > 0 ∧ ¬∃ a ∈ digits 10 n, a = 0} theorem putnam_2014_b1 (overexpansion : ℕ → List ℕ → Prop := fun N d ↦ N = ∑ i : Fin d.length, (d.get i) * 10 ^ i.1 ∧ d.getLastI ≠ 0 ∧ ∀ a ∈ d, a ∈ Finset.range 11) (S : Set ℕ) (hS : ∀ N : ℕ, N ∈ S ↔ N > 0 ∧ ∃! d : List ℕ, overexpansion N d) : (S = putnam_2014_b1_solution) := sorry","A \emph{base $10$ over-expansion} of a positive integer $N$ is an expression of the form \[ N = d_k 10^k + d_{k-1} 10^{k-1} + \cdots + d_0 10^0 \] with $d_k \neq 0$ and $d_i \in \{0,1,2,\dots,10\}$ for all $i$. For instance, the integer $N = 10$ has two base $10$ over-expansions: $10 = 10 \cdot 10^0$ and the usual base $10$ expansion $10 = 1 \cdot 10^1 + 0 \cdot 10^0$. Which positive integers have a unique base $10$ over-expansion?",Prove that the answer is the integers with no $0$'s in their usual base $10$ expansion.,['algebra'],"Section putnam_2014_b1. Require Import Nat Ensembles List. From mathcomp Require Import div fintype seq ssrbool. Fixpoint hd (n: nat) (l:list 'I_n) := match l with | nil => 0 | x :: _ => x end. Fixpoint expandl (n: nat) (l : list 'I_n) : nat := match l with | nil => 0 | h :: t => (nat_of_ord h) * 10 ^ (length l - 1) + (expandl n t) end. Definition putnam_2014_b1_solution : Ensemble nat := fun n => n > 0 /\ exists l : list 'I_10, 0 <> hd 10 l /\ In ord0 l /\ expandl 10 l = n. Theorem putnam_2014_b1 (n := 11) (overexpansion : nat -> list 'I_n -> Prop := fun N l => N = expandl 11 l) (A : Ensemble nat) (hA : forall N : nat, A N <-> N > 0 /\ exists! (l: list 'I_n), overexpansion N l) : (A = putnam_2014_b1_solution). Proof. Admitted. End putnam_2014_b1.","theory putnam_2014_b1 imports Complex_Main begin definition putnam_2014_b1_solution :: ""nat set"" where ""putnam_2014_b1_solution \ undefined"" (* {n::nat. n > 0 \ (\d::nat. (\n / 10^d\ > 0) \ (\n / 10^d\ mod 10 \ 0))} *) theorem putnam_2014_b1: fixes overexpansion :: ""nat \ (nat list) \ bool"" and S :: ""nat set"" defines ""overexpansion \ (\(N::nat)(d::nat list). N = (\i::nat=0..((length d)-1). (d!i)*10^i) \ last d \ 0 \ (\i::nat\{0..((length d)-1)}. d!i \ {0..10}))"" assumes hS: ""\N::nat. (N \ S \ (N > 0 \ (\!d::nat list. overexpansion N d)))"" shows ""S = putnam_2014_b1_solution"" sorry end ", putnam_2014_b2,"abbrev putnam_2014_b2_solution : ℝ := sorry -- Real.log (4 / 3) theorem putnam_2014_b2 (fbound : (ℝ → ℝ) → Prop := (fun f : ℝ → ℝ => ∀ x : Set.Icc (1 : ℝ) 3, -1 ≤ f x ∧ f x ≤ 1)) (finteq0 : (ℝ → ℝ) → Prop := (fun f : ℝ → ℝ => (∫ x in Set.Ioo 1 3, f x) = 0)) (fint : (ℝ → ℝ) → ℝ := (fun f : ℝ → ℝ => ∫ x in Set.Ioo 1 3, (f x) / x)) : (∃ f : ℝ → ℝ, fbound f ∧ finteq0 f ∧ fint f = putnam_2014_b2_solution) ∧ (∀ f : ℝ → ℝ, (fbound f ∧ finteq0 f) → fint f ≤ putnam_2014_b2_solution) := sorry","Suppose that \( f \) is a function on the interval \([1,3]\) such that \(-1 \leq f(x) \leq 1\) for all \( x \) and \( \int_{1}^{3} f(x) \, dx = 0 \). How large can \(\int_{1}^{3} \frac{f(x)}{x} \, dx \) be?",Show that the solution is log (4 / 3).,['analysis'],"Section putnam_2014_b2. Require Import Reals Coquelicot.Coquelicot. Definition putnam_2014_b2_solution := ln (4 / 3) / ln 10. Theorem putnam_2014_b2: exists (m: R), ((forall (f: R -> R) (x: R), 1 <= x <= 3 /\ -1 <= f x <= 1 /\ RInt f 0 3 = 0 -> RInt (fun x => f x / x) 1 3 <= m) /\ (exists (f: R -> R) (x: R), 1 <= x <= 3 /\ -1 <= f x <= 1 /\ RInt f 0 3 = 0 -> RInt (fun x => f x / x) 1 3 = m)) <-> m = putnam_2014_b2_solution. Proof. Admitted. End putnam_2014_b2.","theory putnam_2014_b2 imports Complex_Main ""HOL-Analysis.Interval_Integral"" begin (* uses (real \ real) instead of ({1..3} \ real) *) definition putnam_2014_b2_solution :: real where ""putnam_2014_b2_solution \ undefined"" (* ln (4/3) *) theorem putnam_2014_b2: fixes fbound :: ""(real \ real) \ bool"" and finteq0 :: ""(real \ real) \ bool"" and fint :: ""(real \ real) \ real"" defines ""fbound \ (\f::real\real. (\x::real\{1..3}. -1 \ f x \ f x \ 1))"" and ""finteq0 \ (\f::real\real. (interval_lebesgue_integral lebesgue 1 3 f) = 0)"" and ""fint \ (\f::real\real. interval_lebesgue_integral lebesgue 1 3 (\x::real. (f x)/x))"" shows ""(GREATEST ffint::real. (\f::real\real. fbound f \ finteq0 f \ ffint = fint f)) = putnam_2014_b2_solution"" sorry end ", putnam_2014_b3,"theorem putnam_2014_b3 (m n : ℕ) (A : Matrix (Fin m) (Fin n) ℚ) (mnpos : m > 0 ∧ n > 0) (Aprime : {p : ℕ | p.Prime ∧ ∃ (i : Fin m) (j : Fin n), |A i j| = p}.encard ≥ m + n) : A.rank ≥ 2 := sorry",Let $A$ be an $m \times n$ matrix with rational entries. Suppose that there are at least $m+n$ distinct prime numbers among the absolute values of the entries of $A$. Show that the rank of $A$ is at least 2.,,"['linear_algebra', 'number_theory']",,"theory putnam_2014_b3 imports Complex_Main ""HOL-Analysis.Cartesian_Space"" ""HOL-Computational_Algebra.Primes"" begin theorem putnam_2014_b3: fixes m n :: nat and A :: ""rat^'n^'m"" assumes mnpos: ""m > 0 \ n > 0"" and pmpncard: ""CARD('m) = m \ CARD('n) = n"" and Aprime: ""card {p::nat. prime p \ (\(i::'m)(j::'n). \A$i$j\ = p)} \ m + n"" shows ""rank A \ 2"" sorry end ", putnam_2014_b4,"theorem putnam_2014_b4 (n : ℕ) (P: Polynomial ℂ) (npos : n > 0) (Px : P.degree = n ∧ ∀ k ∈ Set.Icc 0 n, P.coeff k = 2 ^ (k * (n - k))) : ∀ r ∈ P.roots, r.im = 0 := sorry","Show that for each positive integer \( n \), all the roots of the polynomial $ \sum_{k=0}^{n} 2^k(n-k)x^k $ are real numbers.",,['algebra'],"Section putnam_2014_b4. Require Import Reals Coquelicot.Coquelicot. Open Scope C. Theorem putnam_2014_b4: let fix sum_n_C (m: nat -> C) (n : nat) : C := match n with | O => m 0%nat | S n' => m n' + sum_n_C m n' end in forall (n: nat) (r: C), sum_n_C (fun k => (2 * ((INR k) * (INR n - INR k)) * r ^ k)) n = 0 <-> exists (q: R), r = RtoC q. Proof. Admitted. End putnam_2014_b4.","theory putnam_2014_b4 imports Complex_Main ""HOL-Computational_Algebra.Polynomial"" begin theorem putnam_2014_b4: fixes n :: nat and P :: ""complex poly"" assumes npos: ""n > 0"" and Px: ""degree P = n \ (\k::nat\{0..n}. coeff P k = 2 ^ (k*(n-k)))"" shows ""\r::complex. (poly P r = 0 \ Im r = 0)"" sorry end ", putnam_2014_b6,"theorem putnam_2014_b6 (f : ℝ → ℝ) (hlip : ∃ K > 0, ∀ x ∈ Icc 0 1, ∀ y ∈ Icc 0 1, |f x - f y| ≤ K * |x - y|) (hrat : ∀ r ∈ Icc (0 : ℚ) 1, ∃ a b : ℤ, f r = a + b * r) : (∃ I : Finset (Interval ℝ), (∀ Ii ∈ I, ∃ m c : ℝ, ∀ x ∈ coeHom Ii, f x = c + m * x) ∧ Icc 0 1 = ⋃ Ii ∈ I, coeHom Ii) := sorry","Let $f: [0,1] \to \mathbb{R}$ be a function for which there exists a constant $K>0$ such that $\left| f(x) - f(y) \right| \leq K \left| x - y \right|$ for all $x,y \in [0,1]$. Suppose also that for each rational number $r \in [0,1]$, there exist integers $a$ and $b$ such that $f(r) = a + br$. Prove that there exist finitely many intervals $I_1, \dots, I_n$ such that $f$ is a linear function on each $I_i$ and $[0,1] = \bigcup_{i=1}^n I_i$.",,"['analysis', 'number_theory']",,"theory putnam_2014_b6 imports Complex_Main begin (* uses (real \ real) instead of ({0..1} \ real) *) theorem putnam_2014_b6: fixes f :: ""real \ real"" assumes hlip: ""\K::real>0. \x::real\{0..1}. \y::real\{0..1}. \f x - f y\ \ K*\x - y\"" and hrat: ""\r::rat\{0..1}. \a b::int. f (real_of_rat r) = a + b*r"" shows ""\I::(real set) set. finite I \ (\Ii\I. (\a b::real. a \ b \ Ii = {a..b}) \ (\m c::real. \x::real\Ii. f x = c + m*x)) \ {0..1} = \ I"" sorry end ", putnam_1988_a2,"abbrev putnam_1988_a2_solution : Prop := sorry -- True theorem putnam_1988_a2 (f : ℝ → ℝ := fun x ↦ Real.exp (x ^ 2)) : ((∃ a b : ℝ, a < b ∧ ∃ g : ℝ → ℝ, (∃ x ∈ Ioo a b, g x ≠ 0) ∧ DifferentiableOn ℝ g (Ioo a b) ∧ ∀ x ∈ Ioo a b, deriv (fun y ↦ f y * g y) x = (deriv f x) * (deriv g x)) ↔ putnam_1988_a2_solution) := sorry","A not uncommon calculus mistake is to believe that the product rule for derivatives says that $(fg)' = f'g'$. If $f(x)=e^{x^2}$, determine, with proof, whether there exists an open interval $(a,b)$ and a nonzero function $g$ defined on $(a,b)$ such that this wrong product rule is true for $x$ in $(a,b)$.","Show that such $(a,b)$ and $g$ exist.",['analysis'],"Section putnam_1988_a2. Require Import Basics Reals Coquelicot.Coquelicot. Open Scope R. Definition putnam_1988_a2_solution := True. Theorem putnam_1988_a2: let f (x: R) := exp (pow x 2) in exists (a b: R) (g: R -> R), forall (x: R), a < x < b -> Derive (compose f g) = compose (Derive f) (Derive g) <-> putnam_1988_a2_solution. Proof. Admitted. End putnam_1988_a2.","theory putnam_1988_a2 imports Complex_Main ""HOL-Analysis.Derivative"" begin definition putnam_1988_a2_solution :: bool where ""putnam_1988_a2_solution \ undefined"" (* True *) theorem putnam_1988_a2: fixes f :: ""real \ real"" defines ""f \ \ x. exp (x ^ 2)"" shows ""(\ a b :: real. a < b \ (\ g :: real \ real. (\ x \ {a<.. 0) \ g differentiable_on {a<.. (\ x \ {a<.. y. f y * g y) x = (deriv f x) * (deriv g x)))) \ putnam_1988_a2_solution"" sorry end", putnam_1988_a3,"abbrev putnam_1988_a3_solution : Set ℝ := sorry -- {x | x > 1 / 2} theorem putnam_1988_a3 : ({x : ℝ | ∃ L : ℝ, Tendsto (fun t ↦ ∑ n in Finset.Icc (1 : ℕ) t, (((1 / n) / Real.sin (1 / n) - 1) ^ x)) ⊤ (𝓝 L)} = putnam_1988_a3_solution) := sorry","Determine, with proof, the set of real numbers $x$ for which \[ \sum_{n=1}^\infty \left( \frac{1}{n} \csc \frac{1}{n} - 1 \right)^x \] converges.",Show that the series converges if and only if $x > \frac{1}{2}$.,['analysis'],"Section putnam_1988_a3. Require Import Reals Coquelicot.Coquelicot. Open Scope R. Definition putnam_1988_a3_solution (a: R) := a > 1/2. Theorem putnam_1988_a3: forall (a: R), ex_lim_seq (fun m => sum_n (fun n => Rpower (1/INR n * (1 / sin (1/INR n) - 1)) a) m) <-> putnam_1988_a3_solution a. Proof. Admitted. End putnam_1988_a3.","theory putnam_1988_a3 imports Complex_Main begin definition putnam_1988_a3_solution :: ""real set"" where ""putnam_1988_a3_solution \ undefined"" (* {x :: real. x > 1 / 2} *) theorem putnam_1988_a3: shows ""{x :: real. convergent (\ t :: nat. (\ n = 1..t. (1 / n) / sin (1 / n) - 1) powr x)} = putnam_1988_a3_solution"" sorry end", putnam_1988_a4,"abbrev putnam_1988_a4_solution : Prop × Prop := sorry -- (True, False) theorem putnam_1988_a4 (p : ℕ → Prop := fun n ↦ ∀ color : (Fin 2 → ℝ) → Fin n, ∃ p q : Fin 2 → ℝ, color p = color q ∧ Euclidean.dist p q = 1) : (let (a, b) := putnam_1988_a4_solution; (p 3 ↔ a) ∧ (p 9 ↔ b)) := sorry","\begin{enumerate} \item[(a)] If every point of the plane is painted one of three colors, do there necessarily exist two points of the same color exactly one inch apart? \item[(b)] What if ``three'' is replaced by ``nine''? \end{enumerate}","Prove that the points must exist with three colors, but not necessarily with nine.","['geometry', 'combinatorics']",,"theory putnam_1988_a4 imports Complex_Main ""HOL-Analysis.Finite_Cartesian_Product"" begin definition putnam_1988_a4_solution :: ""bool \ bool"" where ""putnam_1988_a4_solution \ (True, False)"" (* (True, False) *) theorem putnam_1988_a4: fixes p :: ""nat \ bool"" defines ""p \ \ n :: nat. (\ color :: real^2 \ nat. (\ v :: real^2. color v < n) \ (\ p q :: real^2. color p = color q \ dist p q = 1))"" shows ""let (a, b) = putnam_1988_a4_solution in (p 3 \ a) \ (p 9 \ b)"" sorry end", putnam_1988_a5,"theorem putnam_1988_a5 : (∃ f : ℝ → ℝ, (∀ x > 0, f (f x) = 6 * x - f x ∧ f x > 0) ∧ (∀ g : ℝ → ℝ, (∀ x > 0, g (g x) = 6 * x - g x ∧ g x > 0) → (∀ x > 0, f x = g x))) := sorry","Prove that there exists a \emph{unique} function $f$ from the set $\mathrm{R}^+$ of positive real numbers to $\mathrm{R}^+$ such that \[ f(f(x)) = 6x-f(x) \] and \[ f(x)>0 \] for all $x>0$.",,['analysis'],"Section putnam_1988_a5. Require Import Basics Reals. Open Scope R. Theorem putnam_1988_a5: exists! (f: R -> R), forall (x: R), (x > 0 -> f x > 0) -> (compose f f) x = 6 * x - f x. Proof. Admitted. End putnam_1988_a5.","theory putnam_1988_a5 imports Complex_Main begin theorem putnam_1988_a5: shows ""\ f :: real \ real. (\ x > 0. f (f x) = 6 * x - f x \ f x > 0) \ (\ g :: real \ real. (\ x > 0. g (g x) = 6 * x - g x \ g x > 0) \ (\ x > 0. f x = g x))"" sorry end", putnam_1988_a6,"abbrev putnam_1988_a6_solution : Prop := sorry -- True theorem putnam_1988_a6 : (∀ (F V : Type*) (_ : Field F) (_ : AddCommGroup V) (_ : Module F V) (_ : FiniteDimensional F V) (n : ℕ) (A : Module.End F V) (evecs : Set V), (n = FiniteDimensional.finrank F V ∧ evecs ⊆ {v : V | ∃ f : F, A.HasEigenvector f v} ∧ evecs.encard = n + 1 ∧ (∀ sevecs : Fin n → V, (Set.range sevecs ⊆ evecs ∧ (Set.range sevecs).encard = n) → LinearIndependent F sevecs)) → (∃ c : F, A = c • LinearMap.id)) ↔ putnam_1988_a6_solution := sorry","If a linear transformation $A$ on an $n$-dimensional vector space has $n+1$ eigenvectors such that any $n$ of them are linearly independent, does it follow that $A$ is a scalar multiple of the identity? Prove your answer.","Show that the answer is yes, $A$ must be a scalar multiple of the identity.",['linear_algebra'],,"theory putnam_1988_a6 imports Complex_Main ""HOL-Algebra.Ring"" ""HOL-Analysis.Finite_Cartesian_Product"" begin (* This problem requires a quantifier over structures over arbitrary types, so those types are assumed to be uncountable. *) definition putnam_1988_a6_solution :: bool where ""putnam_1988_a6_solution \ undefined"" (* True *) theorem putnam_1988_a6: assumes pacard: ""\ amap :: 'a \ real. surj amap"" and pbcard: ""\ bmap :: 'b \ (real^nat). surj bmap"" shows ""(\ (F :: ('a,'m) ring_scheme) (V :: ('b,'n) ring_scheme) (scale :: 'a \ 'b \ 'b) (A :: 'b \ 'b) (n :: nat). n > 0 \ field F \ abelian_group V \ (\ a \ carrier F. \ b \ carrier F. \ x \ carrier V. \ y \ carrier V. scale a (x \\<^bsub>V\<^esub> y) = scale a x \\<^bsub>V\<^esub> scale a y \ scale (a \\<^bsub>F\<^esub> b) x = scale a x \\<^bsub>V\<^esub> scale b x \ scale a (scale b x) = scale (a \\<^bsub>F\<^esub> b) x \ scale \\<^bsub>F\<^esub> x = x \ A (scale a x \\<^bsub>V\<^esub> scale b y) = scale a (A x) \\<^bsub>V\<^esub> scale b (A y)) \ n = (GREATEST k :: nat. \ s :: 'b list. set s \ carrier V \ length s = k \ card (set s) = k \ (\ coeffs :: 'a list. set coeffs \ carrier F \ length coeffs = n \ (\\<^bsub>V\<^esub> i \ {0..\<^bsub>V\<^esub> \ (\ i \ {0..\<^bsub>F\<^esub>))) \ (\ evecs \ ((carrier V) - {\\<^bsub>V\<^esub>}). card evecs = n + 1 \ (\ evec \ evecs. \ a \ carrier F. A evec = scale a evec) \ (\ sevecs :: 'b list. set sevecs \ evecs \ length sevecs = n \ card (set sevecs) = n \ (\ coeffs :: 'a list. set coeffs \ carrier F \ length coeffs = n \ (\\<^bsub>V\<^esub> i \ {0..\<^bsub>V\<^esub> \ (\ i \ {0..\<^bsub>F\<^esub>)))) \ (\ a \ carrier F. \ x \ carrier V. A x = scale a x)) \ putnam_1988_a6_solution"" sorry end", putnam_1988_b1,"theorem putnam_1988_b1 : ∀ a ≥ 2, ∀ b ≥ 2, ∃ x y z : ℤ, x > 0 ∧ y > 0 ∧ z > 0 ∧ a * b = x * y + x * z + y * z + 1 := sorry","A \emph{composite} (positive integer) is a product $ab$ with $a$ and $b$ not necessarily distinct integers in $\{2,3,4,\dots\}$. Show that every composite is expressible as $xy+xz+yz+1$, with $x,y,z$ positive integers.",,"['number_theory', 'algebra']","Section putnam_1988_b1. Require Import ZArith Znumtheory. Open Scope Z. Theorem putnam_1988_b1: forall (n: Z), n > 3 /\ ~ prime n -> exists (a b c: Z), a > 0 /\ b > 0 /\ c > 0 /\ n = a * b + b * c + c * a + 1. Proof. Admitted. End putnam_1988_b1.","theory putnam_1988_b1 imports Complex_Main begin theorem putnam_1988_b1: shows ""\ (a :: int) \ 2. \ (b :: int) \ 2. \ x y z:: int. x > 0 \ y > 0 \ z > 0 \ a * b = x * y + x * z + y * z + 1"" sorry end", putnam_1988_b2,"abbrev putnam_1988_b2_solution : Prop := sorry -- True theorem putnam_1988_b2 : (∀ x y : ℝ, (y ≥ 0 ∧ y * (y + 1) ≤ (x + 1) ^ 2) → (y * (y - 1) ≤ x ^ 2)) ↔ putnam_1988_b2_solution := sorry","Prove or disprove: If $x$ and $y$ are real numbers with $y \geq 0$ and $y(y+1) \leq (x+1)^2$, then $y(y-1) \leq x^2$.",Show that this is true.,['algebra'],"Section putnam_1988_b2. Require Import Reals Coquelicot.Coquelicot. Open Scope R. Definition putnam_1988_b2_solution := True. Theorem putnam_1988_b2: forall (a: R), a >= 0 -> forall (x: R), pow (x + 1) 2 >= a * (a + 1) -> pow x 2 >= a * (a - 1) <-> putnam_1988_b2_solution. Proof. Admitted. End putnam_1988_b2.","theory putnam_1988_b2 imports Complex_Main begin definition putnam_1988_b2_solution :: bool where ""putnam_1988_b2_solution \ undefined"" (* True *) theorem putnam_1988_b2: shows ""(\ x y :: real. (y \ 0 \ y * (y + 1) \ (x + 1) ^ 2) \ y * (y - 1) \ x ^ 2) \ putnam_1988_b2_solution"" sorry end", putnam_1988_b3,"abbrev putnam_1988_b3_solution : ℝ := sorry -- (1 + Real.sqrt 3) / 2 theorem putnam_1988_b3 (r : ℤ → ℝ) (hr : ∀ n ≥ 1, (∃ c d : ℤ, (c ≥ 0 ∧ d ≥ 0) ∧ c + d = n ∧ r n = |c - d * Real.sqrt 3|) ∧ (∀ c d : ℤ, (c ≥ 0 ∧ d ≥ 0 ∧ c + d = n) → |c - d * Real.sqrt 3| ≥ r n)) : putnam_1988_b3_solution > 0 ∧ (∀ n : ℤ, n ≥ 1 → r n ≤ putnam_1988_b3_solution) ∧ (∀ g > 0, (∀ n ≥ 1, r n ≤ g) → g ≥ putnam_1988_b3_solution) := sorry","For every $n$ in the set $N=\{1,2,\dots\}$ of positive integers, let $r_n$ be the minimum value of $|c-d \sqrt{3}|$ for all nonnegative integers $c$ and $d$ with $c+d=n$. Find, with proof, the smallest positive real number $g$ with $r_n \leq g$ for all $n \in N$.",Show that the smallest such $g$ is $(1+\sqrt{3})/2$.,['algebra'],"Section putnam_1988_b3. Require Import Reals Coquelicot.Coquelicot. Definition putnam_1988_b3_solution := (1 + sqrt 3) / 2. Theorem putnam_1988_b3 (r : Z -> R) (hr : forall (n: Z), Z.ge n 1 -> (exists c d : Z, (Z.ge c 0 /\ Z.ge d 0) /\ Z.eq (Z.add c d) n /\ r n = Rabs (IZR c - IZR d * sqrt 3)) /\ (forall c d : Z, (Z.ge c 0 /\ Z.ge d 0 /\ (Z.add c d) = n) -> Rabs (IZR c - IZR d * sqrt 3) >= r n)) : putnam_1988_b3_solution > 0 /\ (forall n : Z, Z.ge n 1 -> r n <= putnam_1988_b3_solution) /\ (forall (g: R), g > 0 -> (forall (n: Z), Z.ge n 1 /\ r n <= g) -> g >= putnam_1988_b3_solution). Proof. Admitted. End putnam_1988_b3.","theory putnam_1988_b3 imports Complex_Main begin definition putnam_1988_b3_solution :: real where ""putnam_1988_b3_solution \ undefined"" (* (1 + sqrt 3) / 2 *) theorem putnam_1988_b3: fixes r :: ""nat \ real"" assumes hr: ""\ n \ 1. r n = (LEAST s. \ c d :: nat. c + d = n \ s = \c - d * (sqrt 3)\)"" shows ""(LEAST g :: real. g > 0 \ (\ n \ 1. r n \ g)) = putnam_1988_b3_solution"" sorry end", putnam_1988_b4,"theorem putnam_1988_b4 (a : ℕ → ℝ) (appos : (ℕ → ℝ) → Prop) (apconv : (ℕ → ℝ) → Prop) (apposconv : (ℕ → ℝ) → Prop) (happos : ∀ a' : ℕ → ℝ, appos a' = ∀ n ≥ 1, a' n > 0) (hapconv : ∀ a' : ℕ → ℝ, apconv a' = ∃ s : ℝ, Tendsto (fun N : ℕ => ∑ n : Set.Icc 1 N, a' n) atTop (𝓝 s)) (happosconv : ∀ a' : ℕ → ℝ, apposconv a' = (appos a' ∧ apconv a')) : apposconv a → apposconv (fun n : ℕ => (a n) ^ ((n : ℝ) / (n + 1))) := sorry","Prove that if $\sum_{n=1}^\infty a_n$ is a convergent series of positive real numbers, then so is $\sum_{n=1}^\infty (a_n)^{n/(n+1)}$.",,['analysis'],"Section putnam_1988_b4. Require Import Reals Coquelicot.Coquelicot. Open Scope R. Theorem putnam_1988_b4: let b (n: nat) (a: nat -> R) := Rpower (a n) (INR n/(INR n + 1)) in forall (a: nat -> R) (n: nat), a n > 0 -> ex_lim_seq (fun n => sum_n a n) -> ex_lim_seq (fun n => sum_n (fun m => (b m a)) n). Proof. Admitted. End putnam_1988_b4.","theory putnam_1988_b4 imports Complex_Main begin theorem putnam_1988_b4: fixes a :: ""nat \ real"" and appos :: ""(nat \ real) \ bool"" and apconv :: ""(nat \ real) \ bool"" and apposconv :: ""(nat \ real) \ bool"" defines ""appos \ \ a' :: nat \ real. \ n \ 1. a' n > 0"" and ""apconv \ \ a' :: nat \ real. convergent (\ N :: nat. \ n = 1..N. a' n)"" and ""apposconv \ \ a'. appos a' \ apconv a'"" shows ""apposconv a \ apposconv (\ n :: nat. (a n) powr (n / (n + 1)))"" sorry end", putnam_1988_b5,"abbrev putnam_1988_b5_solution : ℕ → ℕ := sorry -- (fun n : ℕ => 2 * n) theorem putnam_1988_b5 (n : ℕ) (Mn : Matrix (Fin (2 * n + 1)) (Fin (2 * n + 1)) ℝ) (npos : n > 0) (Mnskewsymm : ∀ i j : Fin (2 * n + 1), Mn i j = -(Mn j i)) (hMn1 : ∀ i j : Fin (2 * n + 1), (1 ≤ (i.1 : ℤ) - j.1 ∧ (i.1 : ℤ) - j.1 ≤ n) → Mn i j = 1) (hMnn1 : ∀ i j : Fin (2 * n + 1), (i.1 : ℤ) - j.1 > n → Mn i j = -1) : Mn.rank = putnam_1988_b5_solution n := sorry","For positive integers $n$, let $M_n$ be the $2n+1$ by $2n+1$ skew-symmetric matrix for which each entry in the first $n$ subdiagonals below the main diagonal is $1$ and each of the remaining entries below the main diagonal is $-1$. Find, with proof, the rank of $M_n$. (According to one definition, the rank of a matrix is the largest $k$ such that there is a $k \times k$ submatrix with nonzero determinant.) One may note that \begin{align*} M_1&=\begin{pmatrix} 0 & -1 & 1 \\ 1 & 0 & -1 \\ -1 & 1 & 0 \end{pmatrix} \\ M_2&=\begin{pmatrix} 0 & -1 & -1 & 1 & 1 \\ 1 & 0 & -1 & -1 & 1 \\ 1 & 1 & 0 & -1 & -1 \\ -1 & 1 & 1 & 0 & -1 \\ -1 & -1 & 1 & 1 & 0 \end{pmatrix}. \end{align*}",Show that the rank of $M_n$ equals $2n$.,['linear_algebra'],,"theory putnam_1988_b5 imports Complex_Main ""HOL-Analysis.Finite_Cartesian_Product"" ""HOL-Analysis.Cartesian_Space"" begin definition putnam_1988_b5_solution :: ""nat \ nat"" where ""putnam_1988_b5_solution \ undefined"" (* \ n :: nat. 2 * n *) theorem putnam_1988_b5: fixes n :: nat and Mn :: ""real^'m^'m"" and idx :: ""nat \ 'm"" assumes npos: ""n > 0"" and ncard: ""CARD('m) = 2 * n + 1"" and idxbij: ""\ m :: 'm. \! i \ {1 .. 2 * n + 1}. idx i = m"" and Mnskewsymm: ""\ i \ {1 .. 2 * n + 1}. \ j \ {1 .. 2 * n + 1}. Mn$(idx i)$(idx j) = -(Mn$(idx j)$(idx i))"" and hMn1: ""\ i \ {1 .. 2 * n + 1}. \ j \ {1 .. 2 * n + 1}. (1 \ i - j \ i - j \ n) \ Mn$(idx i)$(idx j) = 1"" and hMnn1: ""\ i \ {1 .. 2 * n + 1}. \ j \ {1 .. 2 * n + 1}. i - j > n \ Mn$(idx i)$(idx j) = -1"" shows ""rank Mn = putnam_1988_b5_solution n"" sorry end", putnam_1988_b6,"theorem putnam_1988_b6 (trinums : Set ℤ) (htrinums : trinums = {t : ℤ | ∃ n : ℤ, t ≥ 0 ∧ t = (n * (n + 1)) / 2}) : {(a, b) : ℤ × ℤ | ∀ t > 0, (a * t + b) ∈ trinums ↔ t ∈ trinums}.encard = ⊤ := sorry","Prove that there exist an infinite number of ordered pairs $(a,b)$ of integers such that for every positive integer $t$, the number $at+b$ is a triangular number if and only if $t$ is a triangular number. (The triangular numbers are the $t_n=n(n+1)/2$ with $n$ in $\{0,1,2,\dots\}$.)",,"['number_theory', 'algebra']","Section putnam_1988_b6. Require Import Ensembles Finite_sets. Theorem putnam_1988_b6: let triangular (n: nat) := exists (m: nat), n = Nat.div (m * (m + 1)) 2 in exists (E: Ensemble (nat*nat)), forall (a b: nat), (E (a, b) <-> exists (m: nat), triangular m <-> triangular (Nat.mul a m + b) ) -> ~ exists (n: nat), cardinal (nat*nat) E n. Proof. Admitted. End putnam_1988_b6.","theory putnam_1988_b6 imports Complex_Main begin theorem putnam_1988_b6: fixes trinums :: ""int set"" defines ""trinums \ {t :: int. \ n :: nat. t = (n * (n + 1)) / 2}"" shows ""infinite {(a :: int, b :: int). \ t > 0. (a * t + b) \ trinums \ t \ trinums}"" sorry end", putnam_2022_a1,"abbrev putnam_2022_a1_solution : Set (ℝ × ℝ) := sorry -- {(a, b) | (a = 0 ∧ b = 0) ∨ (|a| ≥ 1) ∨ (0 < |a| ∧ |a| < 1 ∧ (b < (Real.log (1 - (1 - Real.sqrt (1 - a^2))/a))^2 - |a| * (1 - Real.sqrt (1 - a^2))/a ∨ b > (Real.log (1 - (1 + Real.sqrt (1 - a^2))/a))^2 - |a| * (1 + Real.sqrt (1 - a^2))/a))} theorem putnam_2022_a1 : {(a, b) | ∃! x : ℝ, a * x + b = Real.log (1 + x^2)} = putnam_2022_a1_solution := sorry","Determine all ordered pairs of real numbers $(a,b)$ such that the line $y = ax+b$ intersects the curve $y = \ln(1+x^2)$ in exactly one point.","Show that the solution is the set of ordered pairs $(a,b)$ which satisfy at least one of (1) $a = b = 0$, (2) $|a| \geq 1$, and (3) $0 < |a| < 1$ and $b < \log(1 - r_{-})^2 - |a|r_{-}$ or $b > \log(1 + r_{+})^2 + |a|r_{+}$ where $r_{\pm} = \frac{1 \pm \sqrt{1 - a^2}}{a}$.",['algebra'],"Section putnam_2022_a1. Require Import Reals Coquelicot.Coquelicot. Definition putnam_2022_a1_solution (a b: R) := (a = 0 /\ b = 0) \/ (Rabs a >= 1) \/ (Rabs a < 1 /\ (b < ln (1 - (1 - sqrt (1 - a ^ 2)) / a) ^ 2 - Rabs a * (1 - (1 - sqrt (1 - a ^ 2)) / a) \/ b > ln (1 - (1 + sqrt (1 - a ^ 2) / a) ^ 2 - Rabs a * (1 + sqrt (1 - a ^ 2) / a)))). Theorem putnam_2022_a1 : forall a b : R, (exists! (x: R), a * x + b = ln (1 + x ^ 2) / ln 10) <-> putnam_2022_a1_solution a b. Proof. Admitted. End putnam_2022_a1.","theory putnam_2022_a1 imports Complex_Main begin definition putnam_2022_a1_solution :: ""(real \ real) set"" where ""putnam_2022_a1_solution \ undefined"" (* {(a, b). (a = 0 \ b = 0) \ ((abs a) \ 1) \ (0 < (abs a) \ (abs a) < 1 \ (b < (ln (1 - (1 - sqrt (1 - a^2))/a))^2 - (abs a) * (1 - sqrt (1 - a^2))/a \ b > (ln (1 - (1 + sqrt (1 - a^2))/a))^2 - (abs a) * (1 + sqrt (1 - a^2))/a))} *) theorem putnam_2022_a1: shows ""{(a, b). \! x :: real. a * x + b = ln (1 + x^2)} = putnam_2022_a1_solution"" sorry end", putnam_2022_a2,"abbrev putnam_2022_a2_solution : ℕ → ℕ := sorry -- fun n => 2*n - 2 theorem putnam_2022_a2 (n : ℕ) (hn : n ≥ 2) (S : Set ℝ[X] := {P : ℝ[X] | natDegree P = n}) (negs : ℝ[X] → ℕ := fun P : ℝ[X] => ∑ i in Finset.range (P.natDegree + 1), if P.coeff i < 0 then 1 else 0) : sSup {negs (P^2) | P ∈ S} = putnam_2022_a2_solution n := sorry","Let $n$ be an integer with $n \geq 2$. Over all real polynomials $p(x)$ of degree $n$, what is the largest possible number of negative coefficients of $p(x)^2$?",Show that the solution is $2n - 2$.,['algebra'],"Section putnam_2022_a2. Require Import Basics Nat Reals Coquelicot.Coquelicot. Definition putnam_2022_a2_solution : nat -> nat := fun n => sub (mul 2 n) 2. Theorem putnam_2022_a2 (n : nat) (hn : ge n 2) (num_neg_coeff : nat -> (nat -> R) -> nat := fun n coeff => Z.to_nat (floor (sum_n (fun i => if Rlt_dec (coeff i) 0 then 1 else 0) (n + 1)))) : forall (P : R -> R) (coeff1 coeff2: nat -> R) (n: nat), (((coeff1 n <> 0 /\ P = (fun x => sum_n (fun i => coeff1 i * x ^ i) (n + 1))) /\ compose P P = (fun x => sum_n (fun i => coeff2 i * x ^ i) (n + 1))) -> ge (num_neg_coeff n coeff2) (putnam_2022_a2_solution n)) /\ (exists (P : R -> R) (coeff1 coeff2: nat -> R) (n: nat), ((coeff1 n <> 0 /\ P = (fun x => sum_n (fun i => coeff1 i * x ^ i) (n + 1))) /\ compose P P = (fun x => sum_n (fun i => coeff2 i * x ^ i) (n + 1))) -> num_neg_coeff n coeff2 = putnam_2022_a2_solution n). Proof. Admitted. End putnam_2022_a2.","theory putnam_2022_a2 imports Complex_Main ""HOL-Computational_Algebra.Polynomial"" begin definition putnam_2022_a2_solution :: ""nat \ nat"" where ""putnam_2022_a2_solution \ undefined"" (* \ n. 2*n - 2 *) theorem putnam_2022_a2: fixes n :: ""nat"" and S :: ""(real poly) set"" and negs :: ""(real poly) \ nat"" defines ""S \ {P :: real poly. degree P = 2*n}"" and ""negs \ \ P :: real poly. \ i=0..(degree P). (if coeff P i < 0 then 1 else 0)"" assumes hn : ""n \ 2"" shows ""(GREATEST m :: nat. \ P \ S. negs (P^2) = m) = putnam_2022_a2_solution n"" sorry end", putnam_2022_a3,"theorem putnam_2022_a3 (p : ℕ) (hp : Nat.Prime p ∧ p > 5) (f : ℕ := {a : ℕ → (ZMod p) | ∀ n : ℕ, a n ≠ 0 ∧ a n * a (n + 2) = 1 + a (n + 1)}.ncard) : f ≡ 0 [MOD 5] ∨ f ≡ 2 [MOD 5] := sorry","Let $p$ be a prime number greater than 5. Let $f(p)$ denote the number of infinite sequences $a_1, a_2, a_3, \dots$ such that $a_n \in \{1, 2, \dots, p-1\}$ and $a_n a_{n+2} \equiv 1 + a_{n+1} \pmod{p}$ for all $n \geq 1$. Prove that $f(p)$ is congruent to 0 or 2 $\pmod{5}$.",,['number_theory'],,"theory putnam_2022_a3 imports Complex_Main ""HOL-Number_Theory.Cong"" begin theorem putnam_2022_a3: fixes p :: ""nat"" and f :: ""nat"" defines ""f \ card {a :: nat \ int. \ n :: nat. a n \ {1..(p-1)} \ [a n * a (n + 2) = 1 + a (n + 1)] (mod p)}"" assumes hp : ""prime p \ p > 5"" shows ""[f = 0] (mod 5) \ [f = 2] (mod 5)"" sorry end", putnam_2022_a6,"abbrev putnam_2022_a6_solution : ℕ → ℕ := sorry -- (fun n : ℕ => n) theorem putnam_2022_a6 (n : ℕ) (xlt : (ℕ → ℝ) → Prop) (mxsum : ℕ → (ℕ → ℝ) → Prop) (mexx : ℕ → Prop) (npos : n > 0) (hxlt : ∀ x : ℕ → ℝ, xlt x = ((-1 < x 1) ∧ (∀ i : Set.Icc 1 (2 * n - 1), x i < x (i + 1)) ∧ (x (2 * n) < 1))) (hmxsum : ∀ m : ℕ, ∀ x : ℕ → ℝ, mxsum m x = ∀ k ∈ Set.Icc 1 m, (∑ i : Fin n, ((x (2 * (i.1 + 1))) ^ (2 * k - 1) - (x (2 * (i.1 + 1) - 1)) ^ (2 * k - 1))) = 1) (hmexx : ∀ m : ℕ, mexx m = ∃ x : ℕ → ℝ, xlt x ∧ mxsum m x) : mexx (putnam_2022_a6_solution n) ∧ (∀ m : ℕ, mexx m → m ≤ putnam_2022_a6_solution n) := sorry","Let $n$ be a positive integer. Determine, in terms of $n$, the largest integer $m$ with the following property: There exist real numbers $x_1,\dots,x_{2n}$ with $-1 n. Theorem putnam_2022_a6: forall (N M n: nat), n = mul 2 N -> exists (s: 'I_n -> R) (i i0 : 'I_n), s i < s (ordS i) /\ s (nth i0 (enum 'I_n) 0) > -1 /\ s (nth i0 (enum 'I_n) (n-1)) < 1 -> forall (k: nat), and (le 1 k) (le k M) -> let valid (M : nat) : Prop := sum_n (fun i => (((s (nth i0 (enum 'I_n) (i+1))))^(2*k-1) - ((s (nth i0 (enum 'I_n) i)))^(2*k-1))) (n-1) = 1 in valid M <-> le M (putnam_2022_a6_solution n) /\ valid (putnam_2022_a6_solution n). Proof. Admitted. End putnam_2022_a6.","theory putnam_2022_a6 imports Complex_Main begin (* uses (nat \ real) instead of (Fin (2*n) \ real) *) definition putnam_2022_a6_solution :: ""nat \ nat"" where ""putnam_2022_a6_solution \ undefined"" (* (\n::nat. n) *) theorem putnam_2022_a6: fixes n :: nat and xlt :: ""(nat \ real) \ bool"" and mxsum :: ""nat \ (nat \ real) \ bool"" and mexx :: ""nat \ bool"" assumes npos: ""n > 0"" and hxlt: ""\x::nat\real. xlt x = (-1 < x 1 \ (\i::nat\{1..(2*n-1)}. x i < x (i + 1)) \ x (2*n) < 1)"" and hmxsum: ""\(m::nat)(x::nat\real). mxsum m x = (\k::nat\{1..m}. ((\i::nat=1..n. ((x (2*i))^(2*k-1) - (x (2*i-1))^(2*k-1))) = 1))"" and hmexx: ""\m::nat. mexx m = (\x::nat\real. xlt x \ mxsum m x)"" shows ""(GREATEST m::nat. mexx m) = putnam_2022_a6_solution n"" sorry end ", putnam_2022_b1,"theorem putnam_2022_b1 (n : ℕ) (P : Polynomial ℝ) (B : Polynomial ℝ) (npos : n ≥ 1) (Pconst : P.coeff 0 = 0) (Pdegree : P.degree = n) (Pint : ∀ k : Set.Icc 1 n, P.coeff k = round (P.coeff k)) (Podd : Odd (round (P.coeff 1))) (hB : ∀ x : ℝ, Real.exp (P.eval x) = B.eval x) : ∀ k : ℕ, B.coeff k ≠ 0 := sorry","Suppose that $P(x)=a_1x+a_2x^2+\cdots+a_nx^n$ is a polynomial with integer coefficients, with $a_1$ odd. Suppose that $e^{P(x)}=b_0+b_1x+b_2x^2+\dots$ for all $x$. Prove that $b_k$ is nonzero for all $k \geq 0$.",,"['analysis', 'algebra']","Section putnam_2022_b1. Require Import Nat Factorial ZArith. From mathcomp Require Import fintype ssralg ssrnat ssrnum poly polydiv. Local Open Scope ring_scope. Theorem putnam_2022_b1: forall (R: numDomainType) (n : nat) (a: nat -> Z), forall (i: nat), le i n /\ (Z.odd (a 0%nat) = true) -> let p : {poly R} := \sum_(i < n) (if (0 forall (i: nat), p`_i >= 0 = true. Proof. Admitted. End putnam_2022_b1.","theory putnam_2022_b1 imports Complex_Main begin theorem putnam_2022_b1: fixes n :: nat and P :: ""real poly"" and B :: ""real poly"" assumes npos: ""n \ 1"" and Pconst: ""coeff P 0 = 0"" and Pdegree: ""degree P = n"" and Pint: ""\k::nat\{1..n}. coeff P k = round (coeff P k)"" and podd: ""odd (round (coeff P 1))"" and hB: ""\x::real. exp (poly P x) = poly B x"" shows ""\k::nat. coeff B k \ 0"" sorry end ", putnam_2022_b2,"abbrev putnam_2022_b2_solution : Set ℕ := sorry -- {1, 7} theorem putnam_2022_b2 (n : ℕ) (Scross : Finset (Fin 3 → ℝ) → Prop) (hScross : ∀ S : Finset (Fin 3 → ℝ), Scross S = (S = {u : Fin 3 → ℝ | ∃ v w : S, u = crossProduct v w})) : (n > 0 ∧ ∃ S : Finset (Fin 3 → ℝ), S.card = n ∧ Scross S) ↔ n ∈ putnam_2022_b2_solution := sorry","Let $\times$ represent the cross product in $\mathbb{R}^3$. For what positive integers $n$ does there exist a set $S \subset \mathbb{R}^3$ with exactly $n$ elements such that $S=\{v imes w:v,w \in S\}$?",Show that the possible values of $n$ are $1$ and $7$.,['algebra'],"Section putnam_2022_b2. Require Import Ensembles Finite_sets List Reals. Require Import GeoCoq.Main.Tarski_dev.Ch16_coordinates_with_functions. Context `{T2D:Tarski_2D} `{TE:@Tarski_euclidean Tn TnEQD}. Import ListNotations. Definition vect3:= (F * F * F)%type. Definition cross_prod (v w : vect3) := let '(v1, v2, v3) := v in let '(w1, w2, w3) := w in (SubF (MulF v2 w3) (MulF v3 w2), SubF (MulF v3 w1) (MulF v1 w3), SubF (MulF v1 w2) (MulF v2 w1)). Definition putnam_2022_b2_solution := [1; 7]. Theorem putnam_2022_b2: forall (n: nat), n > 0 /\ exists (A: Ensemble vect3), forall (u: vect3), A u <-> exists (v w: vect3), u = cross_prod v w /\ cardinal vect3 A n -> In n putnam_2022_b2_solution. Proof. Admitted. End putnam_2022_b2.","theory putnam_2022_b2 imports Complex_Main begin definition putnam_2022_b2_solution :: ""nat set"" where ""putnam_2022_b2_solution \ undefined"" (* {1, 7} *) theorem putnam_2022_b2: fixes n :: nat and Scross :: ""(real^3) set \ bool"" assumes hScross: ""\S::(real^3) set. Scross S = (S = {u::real^3. (\v\S. \w\S. u = cross3 v w)})"" shows ""(n > 0 \ (\S::(real^3) set. finite S \ card S = n \ Scross S)) \ n \ putnam_2022_b2_solution"" sorry end ", putnam_2022_b4,"abbrev putnam_2022_b4_solution : Set ℕ := sorry -- {n : ℕ | 3 ∣ n ∧ n ≥ 9} theorem putnam_2022_b4 (n : ℕ) (ap3 : ℝ → ℝ → ℝ → Prop) (xprog : (ℕ → ℝ) → Prop) (hap3 : ∀ x0 x1 x2 : ℝ, ap3 x0 x1 x2 = ∀ o0 o1 o2 : ℝ, (o0 < o1 ∧ o1 < o2 ∧ ({o0, o1, o2} : Set ℝ) = {x0, x1, x2}) → (o1 - o0 = o2 - o1)) (hxprog : ∀ x : ℕ → ℝ, xprog x = ((∀ i j : Fin n, i.1 ≠ j.1 → x i.1 ≠ x j.1) ∧ (∀ i : Fin n, ap3 (x i.1) (x ((i.1 + 1) % n)) (x ((i.1 + 2) % n))))) : (n ≥ 4 ∧ ∃ x : ℕ → ℝ, xprog x) ↔ n ∈ putnam_2022_b4_solution := sorry","Find all integers $n$ with $n \geq 4$ for which there exists a sequence of distinct real numbers $x_1,\dots,x_n$ such that each of the sets $\{x_1,x_2,x_3\},\{x_2,x_3,x_4\},\dots,\{x_{n-2},x_{n-1},x_n\},\{x_{n-1},x_n,x_1\}$, and $\{x_n,x_1,x_2\}$ forms a $3$-term arithmetic progression when arranged in increasing order.",Show that the values of $n$ in question are the multiples of $3$ starting with $9$.,['algebra'],"Section putnam_2022_b4. Require Import Reals. From mathcomp Require Import fintype seq ssrbool. Definition putnam_2022_b4_solution := fun x => (x > 9) /\ (x mod 3 = 0). Local Open Scope R. Theorem putnam_2022_b4: forall (n: nat) (s: 'I_n -> R), ge n 4 -> forall (i i0: 'I_n), (2 * (s (nth i0 (enum 'I_n) ((i-1) mod n))) = s (nth i0 (enum 'I_n) (i mod n)) + s (nth i0 (enum 'I_n) ((i+1) mod n))) \/ (2 * (s (nth i0 (enum 'I_n) (i mod n))) = s (nth i0 (enum 'I_n) ((i-1) mod n)) + s (nth i0 (enum 'I_n) ((i+1) mod n))) \/ (2 * (s (nth i0 (enum 'I_n) ((i+1) mod n))) = s (nth i0 (enum 'I_n) ((i-1) mod n)) + s (nth i0 (enum 'I_n) (i mod n))) <-> putnam_2022_b4_solution n. Proof. Admitted. End putnam_2022_b4.","theory putnam_2022_b4 imports Complex_Main begin (* uses (nat \ real) instead of (Fin n \ real) *) definition putnam_2022_b4_solution :: ""nat set"" where ""putnam_2022_b4_solution \ undefined"" (* {n::nat. 3 dvd n \ n \ 9} *) theorem putnam_2022_b4: fixes n :: nat and ap3 :: ""real \ real \ real \ bool"" and xprog :: ""(nat \ real) \ bool"" assumes hap3: ""\x0 x1 x2::real. ap3 x0 x1 x2 = (\o0 o1 o2::real. (o0 < o1 \ o1 < o2 \ {o0, o1, o2} = {x0, x1, x2}) \ (o1 - o0 = o2 - o1))"" and hxprog: ""\x::nat\real. xprog x = ((\i::nat\{0..(n-1)}. \j::nat\{0..(n-1)}. i \ j \ x i \ x j) \ (\i::nat\{0..(n-1)}. ap3 (x i) (x ((i + 1) mod n)) (x ((i + 2) mod n))))"" shows ""(n \ 4 \ (\x::nat\real. xprog x)) \ n \ putnam_2022_b4_solution"" sorry end ", putnam_2022_b6,"abbrev putnam_2022_b6_solution : Set (Set.Ioi (0 : ℝ) → Set.Ioi (0 : ℝ)) := sorry -- {f : Set.Ioi (0 : ℝ) → Set.Ioi (0 : ℝ) | ∃ c : ℝ, c ≥ 0 ∧ ∀ x : Set.Ioi (0 : ℝ), f x = 1 / (1 + c * x)} theorem putnam_2022_b6 (f : Set.Ioi (0 : ℝ) → Set.Ioi (0 : ℝ)) (eq : Prop) (heq : eq = ∃ fr : ℝ → ℝ, (∀ x : Set.Ioi (0 : ℝ), fr x = f x) ∧ (∀ x y : Set.Ioi (0 : ℝ), fr (x * fr y) + fr (y * fr x) = 1 + fr (x + y))) : (Continuous f ∧ eq) ↔ f ∈ putnam_2022_b6_solution := sorry","Find all continuous functions $f:\mathbb{R}^+ \to \mathbb{R}^+$ such that $f(xf(y))+f(yf(x))=1+f(x+y)$ for all $x,y>0$.",Show that the only such functions are the functions $f(x)=\frac{1}{1+cx}$ for some $c \geq 0$.,['analysis'],"Section putnam_2022_b6. Require Import Reals. Local Open Scope R. Definition putnam_2022_b6_solution := fun (f : R -> R) => exists (c : R), c >= 0 /\ forall (x : R), x >= 0 /\ f x >= 0 -> f x = 1 / (1 + c * x). Theorem putnam_2022_b6: forall (f: R -> R) (x y: R), x > 0 /\ y > 0 /\ f x > 0 /\ f y > 0 -> f (x * f y) + f (y * f x) = 1 + f (x + y) <-> putnam_2022_b6_solution f. Proof. Admitted. End putnam_2022_b6.","theory putnam_2022_b6 imports Complex_Main begin (* uses (real \ real) instead of ({0<..} \ {0<..}) *) definition putnam_2022_b6_solution :: ""(real \ real) set"" where ""putnam_2022_b6_solution \ undefined"" (* {f::real\real. (\c::real. c \ 0 \ (\x::real>0. f x = 1/(1+c*x)))} *) theorem putnam_2022_b6: fixes f :: ""real \ real"" and eq :: bool assumes heq: ""eq = (\x::real>0. \y::real>0. f (x*f y) + f (y*f x) = 1 + f (x+y))"" shows ""(continuous_on {0<..} f \ eq) \ f \ putnam_2022_b6_solution"" sorry end ", putnam_1973_a3,"theorem putnam_1973_a3 (b : ℤ → ℝ := fun n => sInf {k + n/k | k > 0}) : ∀ n : ℤ, n > 0 → floor (b n) = floor (Real.sqrt (4 * n + 1)) := sorry",Let $n$ be a fixed positive integer and let $b(n)$ be the minimum value of $k + \frac{n}{k}$ as $k$ is allowed to range through all positive integers. Prove that $b(n)$ and $\sqrt{4n + 1}$ have the same integer part.,,['number_theory'],,"theory putnam_1973_a3 imports Complex_Main begin theorem putnam_1973_a3: fixes b :: ""nat \ real"" defines ""b \ (\n::nat. (LEAST knk::real. (\k::nat>0. knk = k + n/k)))"" shows ""\n::nat. (n > 0 \ \b n\ = \sqrt (4*n + 1)\)"" sorry end ", putnam_1973_a4,"abbrev putnam_1973_a4_solution : ℕ := sorry -- 3 theorem putnam_1973_a4 (f : ℝ → ℝ := fun x => 2^x - 1 - x^2) : putnam_1973_a4_solution = {x : ℝ | f x = 0}.ncard := sorry",How many zeros does the function $f(x) = 2^x - 1 - x^2$ have on the real line?,Show that the solution is 3.,['analysis'],,"theory putnam_1973_a4 imports Complex_Main begin definition putnam_1973_a4_solution :: nat where ""putnam_1973_a4_solution \ undefined"" (* 3 *) theorem putnam_1973_a4: fixes f :: ""real \ real"" defines ""f \ (\x::real. 2 powr x - 1 - x^2)"" shows ""putnam_1973_a4_solution = card {x::real. (f x = 0)}"" sorry end ", putnam_1973_a6,"theorem putnam_1973_a6 (h_nint : ℕ → (Fin 7 → (ℝ × ℝ)) → ℕ := fun n lines => {p : ℝ × ℝ | ∃! S : Set (Fin 7), S.ncard = n ∧ p ∈ ⋂ i ∈ S, {pts | pts.2 = (lines i).1 * pts.1 + (lines i).2}}.ncard) : ¬ ∃ lines : Fin 7 → (ℝ × ℝ), (∀ i j : Fin 7, i ≠ j → lines i ≠ lines j) ∧ h_nint 3 lines ≥ 6 ∧ h_nint 2 lines ≥ 4 := sorry",Prove that it is impossible for seven distinct straight lines to be situated in the Euclidean plane so as to have at least six points where exactly three of these lines intersect and at least four points where exactly two of these lines interest.,,['geometry'],,"theory putnam_1973_a6 imports Complex_Main begin (* Note: Uses the slope/intercept formulation of line in the plane *) (* uses (nat \ real) instead of (Fin 7 \ real) *) theorem putnam_1973_a6: fixes h_nint :: ""nat \ (nat \ (real \ real)) \ nat"" defines ""h_nint \ (\(n::nat)(lines::nat\(real\real)). card {p::real\real. (\!S::nat set. S \ {0..6} \ card S = n \ p \ (\i\S. {pts::real\real. (snd pts = fst (lines i) * fst pts + snd (lines i))}))})"" shows ""\(\lines::nat\(real\real). (\i::nat\{0..6}. \j::nat\{0..6}. (i \ j \ lines i \ lines j)) \ h_nint 3 lines \ 6 \ h_nint 2 lines \ 4)"" sorry end ", putnam_1973_b1,"theorem putnam_1973_b1 (n : ℕ) (a : Finset.Icc 1 (2 * n + 1) → ℤ) (h_remove : ∀ S : Finset (Finset.Icc 1 (2 * n + 1)), S.card = 2*n → ∃ T, T ⊆ S ∧ T.card = n ∧ ∑ i in T, a i = ∑ i in (S \ T), a i) : ∀ i j : Finset.Icc 1 (2 * n + 1), a i = a j := sorry","Let $a_1, \dots, a_{2n + 1}$ be a set of integers such that, if any one of them is removed, the remaining ones can be divided into two sets of $n$ integers with equal sums. Prove $a_1 = a_2 = \dots = a_{2n+1}$.",,['algebra'],,"theory putnam_1973_b1 imports Complex_Main begin (* uses (nat \ int) instead of ({1..(2*n+1)} \ int) *) theorem putnam_1973_b1: fixes n :: nat and a :: ""nat \ int"" assumes h_remove: ""\S::nat set. ((S \ {1..(2*n+1)} \ card S = 2*n) \ (\T::nat set. T \ S \ card T = n \ (\i\T. a i) = (\i\(S-T). a i)))"" shows ""\i::nat\{1..(2*n+1)}. \j::nat\{1..(2*n+1)}. a i = a j"" sorry end ", putnam_1973_b2,"theorem putnam_1973_b2 (z : ℂ) (hzrat : ∃ q1 q2 : ℚ, z.re = q1 ∧ z.im = q2) (hznorm : ‖z‖ = 1) : ∀ n : ℤ, ∃ q : ℚ, ‖z^(2*n) - 1‖ = q := sorry",Let $z = x+iy$ be a complex number with $x$ and $y$ rational and with $\| z \| = 1$. Show thaat the number $\| z^{2n} - 1 \|$ is rational for every integer $n$.,,['number_theory'],,"theory putnam_1973_b2 imports Complex_Main begin theorem putnam_1973_b2: fixes z :: complex assumes hzrat: ""\q1 q2::rat. Re z = q1 \ Im z = q2"" and hznorm: ""norm z = 1"" shows ""\n::int. (\q::rat. norm (z powi (2*n) - 1) = q)"" sorry end ", putnam_1973_b3,"theorem putnam_1973_b3 (p : ℕ) (pgt1 : p > 1) (hprime : ∀ x ∈ Set.Ico 0 p, Nat.Prime (x^2 - x + p)) : ∃! triple : ℤ × ℤ × ℤ, let (a,b,c) := triple; b^2 - 4*a*c = 1 - 4*p ∧ 0 < a ∧ a ≤ c ∧ -a ≤ b ∧ b < a := sorry","Let $p > 1$ be an integer with the property that $x^2 - x + p$ is prime for all $x$ in the range $0 < x < p$. Show there exists exactly one triple of integers $a,b,c$ satisfying $b^2 - 4ac = 1 - 4p$, $0 < a \leq c$, and $-a \leq b < a$.",,"['number_theory', 'algebra']",,"theory putnam_1973_b3 imports Complex_Main ""HOL-Computational_Algebra.Primes"" begin theorem putnam_1973_b3: fixes p :: nat assumes pgt1: ""p > 1"" and hprime: ""\x::nat\{0..!triple::int\int\int. let (a,b,c) = triple in (b^2 - 4*a*c = 1 - 4*p \ 0 < a \ a \ c \ -a \ b \ b < a)"" sorry end ", putnam_1973_b4,"abbrev putnam_1973_b4_solution : ℝ → ℝ := sorry -- (fun x => x) theorem putnam_1973_b4 (f : ℝ → ℝ) (hprop : (ℝ → ℝ) → Prop := fun g => ContDiff ℝ 1 g ∧ (∀ x : ℝ, 0 < deriv g x ∧ deriv g x ≤ 1) ∧ g 0 = 0) (hf : hprop f) : (∫ x in Icc 0 1, f x)^2 ≥ ∫ x in Icc 0 1, (f x)^3 ∧ (hprop putnam_1973_b4_solution ∧ (∫ x in Icc 0 1, putnam_1973_b4_solution x)^2 = ∫ x in Icc 0 1, (putnam_1973_b4_solution x)^3) := sorry","Suppose $f$ is a function on $[0,1]$ with continuous derivative satisfying $0 < f'(x) \leq 1$ and $f 0 = 0$. Prove that $\left[\int_0^1 f(x) dx\right]]^2 \geq \int_0^1 (f(x))^3 dx$, and find an example where equality holds.",Show that one such example where equality holds is the identity function.,['analysis'],,"theory putnam_1973_b4 imports Complex_Main ""HOL-Analysis.Interval_Integral"" begin (* Note: Boosted domain to real, which is fine because you can extend any such function f from [0,1] to real satisfying the same properties. *) (* Note: There may be multiple correct answers. *) definition putnam_1973_b4_solution :: ""real \ real"" where ""putnam_1973_b4_solution \ undefined"" (* (\x::real. x) *) theorem putnam_1973_b4: fixes f :: ""real \ real"" and hprop :: ""(real \ real) \ bool"" defines ""hprop \ (\g::real\real. g C1_differentiable_on UNIV \ (\x::real. 0 < deriv g x \ deriv g x \ 1) \ g 0 = 0)"" assumes hf: ""hprop f"" shows ""((interval_lebesgue_integral lebesgue 0 1 f)^2 \ interval_lebesgue_integral lebesgue 0 1 (\x::real. (f x)^3)) \ (hprop putnam_1973_b4_solution \ ((interval_lebesgue_integral lebesgue 0 1 putnam_1973_b4_solution)^2 = interval_lebesgue_integral lebesgue 0 1 (\x::real. (putnam_1973_b4_solution x)^3)))"" sorry end ", 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\int\int) \ (int\int\int)"" where ""putnam_1975_a1_solution \ undefined"" (* (\a. \b. a + b + 1, \a. \b. a - b) *) theorem putnam_1975_a1: fixes nab nxy::""int\int\int\bool"" defines ""nab \ \n::int. \a::int. \b::int. (n = (a^2 + a) / 2 + (b^2 + b) / 2)"" and ""nxy \ \n::int. \x::int. \y::int. (4 * n + 1 = x^2 + y^2)"" shows ""(\n a b::int. nab n a b \ nxy n ((fst putnam_1975_a1_solution) a b) ((snd putnam_1975_a1_solution) a b)) \ (\n::int. (\x y::int. nxy n x y) \ (\ a b::int. nab n a b))"" sorry end", 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\real\bool"" where ""putnam_1975_a2_solution \ undefined"" (* \b. \c. c < 1 \ c - b > -1 \ c + b > -1 *) theorem putnam_1975_a2: shows ""\b c::real. (\z::complex. (z^2 + b * z + c) = 0 \ norm z < 1) \ putnam_1975_a2_solution b c"" sorry end", 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\real\real\(real\real\real))\(real\real\real\(real\real\real))"" where ""putnam_1975_a3_solution \ undefined"" (* ( \a b c. ((a/b) powr (1/(b-a)), (1 - ((a/b) powr (1/(b-a))) powr b) powr (1/b), 0), \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\real\real\bool"" and f::""real\real\real\real"" defines ""P \ \(x, y, z). x \ 0 \ y \ 0 \ z \ 0 \ x powr b + y powr b + z powr b = 1"" and ""f \ \(x, y, z). x powr a + y powr b + z powr c"" assumes hi : ""0 < a \ a < b \ b < c"" shows ""(P ((fst putnam_1975_a3_solution) a b c) \ (\x y z::real. P (x, y, z) \ f (x,y,z) \ f ((fst putnam_1975_a3_solution) a b c))) \ (P ((snd putnam_1975_a3_solution) a b c) \ (\x y z::real. P (x, y, z) \ f (x,y,z) \ f ((snd putnam_1975_a3_solution) a b c)))"" sorry end", 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']",,"theory putnam_1975_b1 imports Complex_Main begin definition putnam_1975_b1_solution::int where ""putnam_1975_b1_solution \ undefined"" (* 7 *) theorem putnam_1975_b1: fixes H::""(int \ int) set"" defines ""H \ {(x, y). \u v w::int. (x, y) = (u*3 + v*4 + w*5, u*8 - v + w*4)}"" shows ""\b::int. H = {(x, y). \u v::int. (x, y) = (u, u*b + v*putnam_1975_b1_solution)} \ putnam_1975_b1_solution > 0"" sorry end", 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']",,"theory putnam_1975_b3 imports Complex_Main begin definition putnam_1975_b3_solution::""nat\real"" where ""putnam_1975_b3_solution \ undefined"" (* \k. 1 / (fact k) *) theorem putnam_1975_b3: fixes esymm::""nat \ (real list) \ real"" and f::""nat \ (real list) \ real"" and areq::""nat \ (real list) \ bool"" defines ""esymm \ \k. \a. \s \ { S::nat set. card S = k \ (\i \ S. i < length a) }. (\i \ s. a!i)"" and ""f \ \k. \a. (esymm k a) / (esymm 1 a)^k"" and ""areq \ \k. \a. (\i \ {0.. 0) \ length a \ k"" shows ""\k::nat. \a::real list. k > 0 \ areq k a \ (f k a \ putnam_1975_b3_solution k \ (\M::real. M < putnam_1975_b3_solution k \ (\a::real list. areq k a \ f k a > M)))"" sorry end", 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'],,"theory putnam_1975_b4 imports Complex_Main begin definition putnam_1975_b4_solution::bool where ""putnam_1975_b4_solution \ undefined"" (* False *) theorem putnam_1975_b4: fixes P::""real\real\bool"" defines ""P \ \x. \y. x^2 + y^2 = 1"" shows ""(\B. B \ {(x, y). P x y} \ closed B \ (\ x y::real. P x y \ (((x, y) \ B) \ ((-x, -y) \ B)))) \ putnam_1975_b4_solution"" sorry end", 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.$$,,"['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\real\real"" assumes h0 : ""\x::real. f 0 x = exp x"" and hf : ""\n::nat. \x::real. f (n+1) x = x * (deriv (f n) x)"" shows ""(\n::nat. (f n 1) / (fact n)) = exp (exp 1)"" sorry end", 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}",,['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 \ int"" shows ""(f = (\n::int. 1 - n)) \ ((\n::int. f (f n) = n) \ (\n::int. f (f (n+2) + 2) = n) \ f 0 = 1)"" sorry end ", 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 \ undefined"" (* 1992 *) theorem putnam_1992_a2: fixes taylorcoeff :: ""(real \ real) \ nat \ real"" fixes C :: ""real \ real"" defines ""taylorcoeff \ (\(f::real\real)(n::nat). ((deriv^^n) f 0) / (fact n))"" and ""C \ (\\::real. taylorcoeff (\x::real. (1 + x) powr \) 1992)"" shows ""(set_lebesgue_integral lebesgue {0<..<1} (\y::real. C (-y-1) * (\k::nat=1..1992. 1 / (y + k)))) = putnam_1992_a2_solution"" sorry end ", 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 \ ((nat \ nat \ nat) set)"" where ""putnam_1992_a3_solution \ undefined"" (* (\m::nat. if (odd m) then {} else {(m+1, 2^(nat \m/2\), 2^(nat \m/2\))}) *) theorem putnam_1992_a3: fixes m :: nat and S :: ""(nat \ nat \ nat) set"" assumes mpos: ""m > 0"" and hS: ""\n x y::nat. ((n, x, y) \ S \ (n > 0 \ x > 0 \ y > 0 \ coprime n m \ (x^2 + y^2)^m = (x*y)^n))"" shows ""S = putnam_1992_a3_solution m"" sorry end ", 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 \ real"" where ""putnam_1992_a4_solution \ undefined"" (* (\k::nat. if (even k) then ((-1)^(nat \k/2\) * fact k) else 0) *) theorem putnam_1992_a4: fixes f :: ""real \ real"" assumes hfdiff: ""\k::nat. ((deriv^^k) f) C1_differentiable_on UNIV"" and hf: ""\n::nat. (n > 0 \ f (1/n) = n^2 / (n^2 + 1))"" shows ""\k::nat. (k > 0 \ (deriv^^k) f 0 = putnam_1992_a4_solution k)"" sorry end ", 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$.",,['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 \ nat"" and a :: ""nat \ nat"" assumes hnum1s: ""num1s 0 = 0 \ (\n::nat>0. num1s n = (if (odd n) then 1 else 0) + num1s (nat \n / 2\))"" defines ""a \ (\n::nat. if (even (num1s n)) then 0 else 1)"" shows ""\(\k::nat>0. \m::nat>0. \j::nat\m-1. a (k+j) = a (k+m+j) \ a (k+m+j) = a (k+2*m+j))"" sorry end ", 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 \ nat"" where ""putnam_1992_b1_solution \ undefined"" (* (\n::nat. 2*n - 3) *) theorem putnam_1992_b1: fixes n :: nat and A :: ""real set \ real set"" and min :: nat assumes nge2: ""n \ 2"" defines ""A \ (\S::real set. {x::real. (\a\S. \b\S. a \ b \ (a + b) / 2 = x)})"" and ""min \ LEAST AScard::nat. (\S::real set. card S = n \ AScard = card (A S))"" shows ""min = putnam_1992_b1_solution n"" sorry end ", 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.)",,['algebra'],,"theory putnam_1992_b2 imports Complex_Main ""HOL-Computational_Algebra.Polynomial"" begin theorem putnam_1992_b2: fixes Q :: ""nat \ nat \ nat"" defines ""Q \ (\n k::nat. coeff ((monom 1 0 + monom 1 1 + monom 1 2 + monom 1 3)^n) k)"" shows ""\n k::nat. Q n k = (\j::nat=0..k. (n choose j) * (n choose (k - 2*j)))"" sorry end ", 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 \ undefined"" (* 3984 *) theorem putnam_1992_b4: fixes valid :: ""(real poly) \ bool"" and pair :: ""(real poly) \ (real poly) \ bool"" and min :: nat defines ""valid \ (\p::real poly. p \ 0 \ degree p < 1992 \ coprime p (monom 1 3 - monom 1 1))"" and ""pair \ (\p f::real poly. (\g::real poly. (deriv^^1992) (\x::real. poly p x / (x^3 - x)) = (\x::real. poly f x / poly g x)))"" and ""min \ LEAST fdeg::nat. (\p f::real poly. valid p \ pair p f \ fdeg = degree f)"" shows ""min = putnam_1992_b4_solution"" sorry end ", 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']",,"theory putnam_1992_b5 imports Complex_Main ""HOL-Combinatorics.Permutations"" begin (* uses (nat \ nat \ nat) instead of (Fin n \ Fin n \ nat) and (nat \ nat) instead of (Fin n \ Fin n) *) definition putnam_1992_b5_solution :: bool where ""putnam_1992_b5_solution \ undefined"" (* False *) theorem putnam_1992_b5: fixes ndet :: ""(nat \ nat \ nat) \ nat \ int"" and D :: ""nat \ int"" defines ""ndet \ (\(A::nat\nat\nat)(n::nat). (\p\{p'::nat\nat. p' permutes {0..(n-1)} \ (\i::nat\n. p' i = i)}. (sign p * (\i::nat=0..(n-1). A i (p i)))))"" and ""D \ (\n::nat. ndet (\i j::nat. if i = j then (i+3) else 1) (n - 1))"" shows ""(\r::rat. \x\{x'::rat. (\n::nat\2. (D n / fact n) = x')}. \x\ \ r) \ putnam_1992_b5_solution"" sorry end ", 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.",,['linear_algebra'],,"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 \ M"" and h2: ""\A\M. \B\M. (A**B \ M) \ (-A**B \ M)"" and h3: ""\A\M. \B\M. (A**B = B**A) \ (A**B = -B**A)"" and h4: ""\A\M. (A \ mat 1 \ (\B\M. A**B = -B**A))"" shows ""card M \ n^2"" sorry end ", 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\nat\real"" where ""putnam_2002_a1_solution \ undefined"" (* \k. \n. (-k) ^n * fact n *) theorem putnam_2002_a1: fixes k::nat and P::""nat \ (real poly)"" assumes kpos : ""k > 0"" and Pderiv : ""\n::nat. \x::real. (deriv^^n) (\x'::real. 1 / (x' ^ k - 1)) x = (poly (P n) x) / ((x^k - 1) ^ (n+1))"" shows ""\n::nat. (poly (P n) 1) = putnam_2002_a1_solution k n"" sorry end", 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.",,['algebra'],,"theory putnam_2002_a3 imports Complex_Main begin theorem putnam_2002_a3: fixes n Tn :: ""int"" defines ""Tn \ card {S :: int set. S \ {1..16} \ S \ {} \ (\ k :: int. k = (real 1)/(card S) * (\ s \ S. s))}"" assumes hn : ""n \ 2"" shows ""even (Tn - n)"" sorry end", 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\}. \]",,"['number_theory', 'algebra']",,"theory putnam_2002_a5 imports Complex_Main begin theorem putnam_2002_a5: fixes a :: ""nat \ rat"" assumes ha: ""a 0 = 1 \ (\ n :: nat. a (2 * n + 1) = a n \ a (2 * n + 2) = a n + a (n + 1))"" shows ""\ q :: rat. q > 0 \ q \ {a (n - 1) / a n | n :: nat. n \ 1}"" sorry end", 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']",,"theory putnam_2002_a6 imports Complex_Main begin definition putnam_2002_a6_solution :: ""nat set"" where ""putnam_2002_a6_solution \ undefined"" (* {2} *) theorem putnam_2002_a6: fixes f :: ""nat \ nat \ nat"" and digitlength :: ""nat \ nat \ nat"" defines ""digitlength \ \ b n. LEAST k :: nat. n < b ^ k"" assumes hf: ""\ b :: nat. f b 1 = 1 \ f b 2 = 2 \ (\ n \ {3..}. f b n = n * f b (digitlength b n))"" shows ""{b \ {2..}. convergent (\ m :: nat. \ n = 1..m. 1 / f b n)} = putnam_2002_a6_solution"" sorry end", 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}. \]",,['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 \ real"" defines ""e \ exp 1"" and ""f \ \ n :: int. 1 / e - (1 - 1 / n) powi n"" shows ""\ n :: int. n > 1 \ 1 / (2 * n * e) < f n \ f n < 1 / (n * e)"" sorry end", 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$.",,['number_theory'],,"theory putnam_2002_b5 imports Complex_Main begin fun digits :: ""nat \ nat \ 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 ""\ n :: nat. card {b :: nat. length (digits b n) = 3 \ digits b n = rev (digits b n)} \ 2002"" sorry end ", 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$.)",,"['linear_algebra', 'number_theory', 'algebra']",,"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 \ int \ int \ int poly poly poly"" and M :: ""(int poly poly poly)^3^3"" and cong :: ""nat \ int poly poly poly \ int poly poly poly \ bool"" and idx :: ""nat \ 3"" defines ""lincomb \ \ (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 \ \ p (f, g). \ r s t :: nat. [coeff (coeff (coeff f r) s) t = coeff (coeff (coeff g r) s) t] (mod (int p))"" assumes idxbij: ""\ s :: 3. \! r \ {0..2}. idx r = s"" and hp: ""prime p"" and hM: ""\ r \ {0..2}. M$(idx r)$(idx 0) = monom (monom (monom 1 0) 0) (p ^ r) \ M$(idx r)$(idx 1) = monom (monom (monom 1 0) (p ^ r)) 0 \ M$(idx r)$(idx 2) = monom (monom (monom 1 (p ^ r)) 0) 0"" shows ""\ L :: (int \ int \ int) list. cong p (det M, foldr (\ t q. (lincomb t) * q) L 1)"" sorry end", 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}).$,,['linear_algebra'],,"theory putnam_1969_a2 imports Complex_Main ""HOL-Combinatorics.Permutations"" begin (* uses (nat \ nat \ real) instead of (Fin n \ Fin n \ real) and (nat \ nat) instead of (Fin n \ Fin n) *) theorem putnam_1969_a2: fixes D :: ""nat \ nat \ real"" and ndet :: ""(nat \ nat \ real) \ nat \ real"" defines ""D \ (\i j::nat. \i - j\)"" and ""ndet \ (\(A::nat\nat\real)(n::nat). (\p\{p'::nat\nat. p' permutes {0..(n-1)} \ (\i::nat\n. p' i = i)}. (sign p * (\i::nat=0..(n-1). A i (p i)))))"" shows ""\n::nat. (n > 0 \ ndet D n = (-1)^(n-1) * (n-1) * 2^(n-2))"" sorry end ", 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}$.,,['analysis'],,"theory putnam_1969_a4 imports Complex_Main ""HOL-Analysis.Interval_Integral"" begin theorem putnam_1969_a4: shows ""filterlim (\n::int. (\i::int=1..n. (-1) powi (i+1) * i powi (-i))) (nhds (interval_lebesgue_integral lebesgue 0 1 (\x::real. x powr x))) at_top"" sorry end ", 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.",,['analysis'],,"theory putnam_1969_a6 imports Complex_Main begin theorem putnam_1969_a6: fixes x :: ""nat \ real"" and y :: ""nat \ real"" assumes hy1: ""\n::nat\2. y n = x (n-1) + 2*(x n)"" and hy2: ""\c::real. filterlim y (nhds c) at_top"" shows ""\C::real. filterlim x (nhds C) at_top"" sorry end ", 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$.,,['number_theory'],,"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 (\ {d::nat. d dvd n})"" sorry end ", 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'],,"theory putnam_1969_b2 imports Complex_Main ""HOL-Algebra.Group"" begin (* uses (nat \ ('a set)) instead of (Fin n \ ('a set)) *) definition putnam_1969_b2_solution :: bool where ""putnam_1969_b2_solution \ undefined"" (* False *) theorem putnam_1969_b2: fixes G (structure) and h :: ""nat \ bool"" assumes hG: ""group G \ finite (carrier G)"" defines ""h \ (\n::nat. (\H::nat\('a set). (\i::nat\{0..(n-1)}. subgroup (H i) G \ H i \ carrier G) \ (carrier G = (\i::nat\{0..(n-1)}. H i))))"" shows ""\(h 2) \ ((\(h 3)) \ putnam_1969_b2_solution)"" sorry end ", 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$.",,['analysis'],,"theory putnam_1969_b3 imports Complex_Main begin theorem putnam_1969_b3: fixes T :: ""nat \ real"" assumes hT1: ""\n::nat. (n \ 1 \ (T n) * (T (n+1)) = n)"" and hT2: ""filterlim (\n::nat. (T n) / (T (n+1))) (nhds 1) at_top"" shows ""pi*(T 1)^2 = 2"" sorry end ", 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$.",,['analysis'],,"theory putnam_1969_b5 imports Complex_Main begin theorem putnam_1969_b5: fixes a :: ""nat \ real"" and k :: ""real \ nat"" assumes ha: ""strict_mono a \ (\n::nat. a n > 0)"" and hinvasum: ""\C::real. filterlim (\n::nat. (\i::nat=0..(n-1). 1/(a i))) (nhds C) at_top"" defines ""k \ (\x::real. card {n::nat. a n \ x})"" shows ""filterlim (\t::real. (k t)/t) (nhds 0) at_top"" sorry end ", 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}.$$",,['linear_algebra'],,"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 \ p$1$2 = 2 \ p$1$3 = -2 \ p$2$1 = 2 \ p$2$2 = 5 \ p$2$3 = 4 \ p$3$1 = -2 \ p$3$2 = 4 \ p$3$3 = 5"" and hAB: ""A ** B = p"" shows ""B ** A = mat 9"" sorry end ", 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 \ undefined"" (* -7/8 *) theorem putnam_1977_a1: fixes f::""real\real"" and S::""real set"" defines ""f \ \x. 2 * x^4 + 7 * x^3 + 3 * x - 5"" assumes hS : ""card S = 4"" shows ""collinear {(x::real, y::real). x \ S \ y = f x} \ (\S) / 4 = putnam_1977_a1_solution"" sorry end", 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\real\real\real\bool"" where ""putnam_1977_a2_solution \ undefined"" (* \a. \b. \c. \d. d = a \ b = -c \ d = b \ a = -c \ d = c \ a = -b *) theorem putnam_1977_a2: shows ""\a b c d::real. 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 end", 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\real) \ (real\real) \ (real\real)"" where ""putnam_1977_a3_solution \ undefined"" (* \f. \g. \x. g x - f (x-3) + f (x-1) + f (x+1) - f (x+3) *) theorem putnam_1977_a3: fixes f g::""real\real"" shows ""let h = (putnam_1977_a3_solution f g) in (\x::real. f x = (h (x+1) + h (x-1)) / 2 \ g x = (h (x+4) + h (x-4)) / 2)"" sorry end", 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) \ (real poly)"" where ""putnam_1977_a4_solution \ undefined"" (* ([: 0, 1 :], [: 1, -1 :]) *) theorem putnam_1977_a4: shows ""\x \ {0<..<1::real}. (poly (fst putnam_1977_a4_solution) x) / (poly (snd putnam_1977_a4_solution) x) = (\n::nat. x^2^n / (1 - x^2^(n+1)))"" sorry end", 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.",,"['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 \ n"" shows ""[(p*m) choose (p * n) = m choose n] (mod p)"" sorry end", 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'],,"theory putnam_1977_a6 imports Complex_Main ""HOL-Analysis.Interval_Integral"" begin definition putnam_1977_a6_solution::bool where ""putnam_1977_a6_solution \ undefined"" (* True *) theorem putnam_1977_a6: fixes X::""(real \ real) set"" and room::""real\real\real"" defines ""X \ {(x, y). 0 \ x \ x \ 1 \ 0 \ y \ y \ 1}"" and ""room \ \x. \y. min (min x (1 - x)) (min y (1 - y))"" shows ""(\f. continuous_on UNIV f \ (\(x, y) \ X. (set_lebesgue_integral lebesgue {(a, b). a \ x - (room x y) \ a \ x + (room x y) \ b \ y - (room x y) \ b \ y + (room x y)} f ) = 0) \ (\(x, y) \ X. f (x, y) = 0)) \ putnam_1977_a6_solution"" sorry end", 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 \ undefined"" (* 2/3 *) theorem putnam_1977_b1: shows ""(\N. \n=2..N. (n^3 - 1) / (n^3 + 1)) \ putnam_1977_b1_solution"" sorry end", 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'],,"theory putnam_1977_b3 imports Complex_Main begin definition putnam_1977_b3_solution :: ""bool"" where ""putnam_1977_b3_solution \ undefined"" (* False *) theorem putnam_1977_b3: fixes P balanced :: ""(real \ real \ real) \ bool"" and B :: ""(real \ real \ real) \ (real \ real \ real)"" defines ""P \ \ w :: real \ real \ real. let (a,b,c) = w in (a \ \ \ b \ \ \ c \ \ \ a > 0 \ b > 0 \ c > 0 \ a + b + c = 1)"" and ""balanced \ \ w :: real \ real \ real. let (a,b,c) = w in (a < 1/2 \ b < 1/2 \ c < 1/2)"" and ""B \ \ w :: real \ real \ 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 ""(\ t :: real \ real \ real. P t \ (\ n :: nat. balanced ((B^^n) t))) \ putnam_1977_b3_solution"" sorry end", 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$.",,['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 \ real"" and A :: ""real"" assumes hn : ""n > 1"" and hA : ""A + (\ i \ {1..n}. (a i)^2) < 1/(real n - 1) * (\ i \ {1..n}. a i)^2"" shows ""\ i \ {1 :: nat..n}. \ j \ {1 :: nat..n}. i < j \ A < 2 * (a i) * (a j)"" sorry end", 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.",,['abstract_algebra'],,"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 \ {g :: 'a. \ x :: 'a list. (length x \ 1 \ (\ i \ {1..length x}. x!i \ H) \ g = foldr (\ y z. y \\<^bsub>G\<^esub> (z \\<^bsub>G\<^esub> a)) x \\<^bsub>G\<^esub>)}"" assumes hG : ""Group.group G"" and ha : ""a \ carrier G"" and hH : ""finite H \ subgroup H G"" and hh : ""h = card H"" and haH : ""\ x \ H. (x \\<^bsub>G\<^esub> a)[^]3 = \\<^bsub>G\<^esub>"" shows ""finite P \ card P \ 3 * h^2"" sorry end ", 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$.",,['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 \ 'S \ 'S"" (infixl ""\<^bold>*"" 70) and a b c :: 'S assumes Smulasg: ""abel_semigroup Smul"" and hS: ""\x y::'S. \z::'S. x \<^bold>* z = y"" and habc: ""a \<^bold>* c = b \<^bold>* c"" shows ""a = b"" sorry end ", 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 \ real) instead of ({-1..1} \ real) *) definition putnam_2012_a3_solution :: ""real \ real"" where ""putnam_2012_a3_solution \ undefined"" (* (\x::real. sqrt (1 - x^2)) *) theorem putnam_2012_a3: fixes S :: ""real set"" and hf :: ""(real \ real) \ bool"" defines ""S \ {-1..1}"" and ""hf \ (\f::real\real. continuous_on S f \ (\x\S. f x = ((2 - x^2)/2)*f (x^2/(2 - x^2))) \ f 0 = 1 \ (\y::real. filterlim (\x::real. (f x)/sqrt (1 - x)) (nhds y) (at_left 1)))"" shows ""hf putnam_2012_a3_solution \ (\f::real\real. hf f \ (\x\S. f x = putnam_2012_a3_solution x))"" sorry end ", 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.",,['algebra'],,"theory putnam_2012_a4 imports Complex_Main begin theorem putnam_2012_a4: fixes q r :: ""int"" and A B :: ""real \ real"" and S :: ""int set"" and T :: ""real set"" defines ""T \ {x :: real. \ b m :: int. real_of_int b \ {fst B..snd B} \ x = b + m * q}"" and ""S \ {a :: int. real_of_int a \ {fst A..snd A} \ (real_of_int (r * a)) \ T}"" assumes qpos : ""q > 0"" and ABlt : ""fst A < snd A \ fst B < snd B"" shows ""((snd A - fst A) * (snd B - fst B) < q) \ (\ n :: nat. n > 2 \ (\ a1 d :: real. {s :: real. round s \ S \ round s = s} = {fst A..snd A} \ {x :: real. \ i \ {1..n}. x = a1 + i * d}))"" sorry end", 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'],,"theory putnam_2012_a5 imports Complex_Main ""HOL-Computational_Algebra.Primes"" ""HOL-Analysis.Finite_Cartesian_Product"" begin definition putnam_2012_a5_solution :: ""(nat \ nat) set"" where ""putnam_2012_a5_solution \ undefined"" (* {q. fst q = 1} \ {(2, 2)} *) theorem putnam_2012_a5: fixes n p :: nat and G :: ""('p::field)^'n^'n \ 'p^'n \ 'p^'n \ 'p^'n"" defines ""G \ \ (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) \ putnam_2012_a5_solution \ (\ M :: 'p^'n^'n. \ v :: 'p^'n. \(\ i \ {1..p^n}. \ j \ {1..p^n}. i \ j \ ((G M v) ^^ i) 0 = ((G M v) ^^ j) 0))"" sorry end", 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 \ undefined"" (* True *) theorem putnam_2012_a6: fixes p::""((real \ real) \ real) \ bool"" defines ""p \ \f. continuous_on UNIV f \ (\x1 x2 y1 y2::real. x2 > x1 \ y2 > y1 \ (x2 - x1) * (y2 - y1) = 1 \ (set_lebesgue_integral lebesgue {(x, y). x \ x1 \ x \ x2 \ y \ y1 \ y \ y2} f = 0))"" shows ""(\f::(real \ real) \ real. \x y ::real. p f \ f (x, y) = 0) \ putnam_2012_a6_solution"" sorry end ", 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$.",,['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\real) set) set"" assumes f1 : ""{(x, y). x \ 0 \ y \ 0 \ y = exp x - 1} \ S"" and f2 : ""{(x, y). x \ 0 \ y \ 0 \ y = ln (x+1) } \ S"" and hsum : ""\s \ S. \t \ S. {(x, y). (\(xs, ys) \ s. \(xt, yt) \ t. x = xs \ x = xt \ y = ys + yt)} \ S"" and hcomp : ""\s \ S. \t \ S. {(x, y). (\(xs, ys) \ s. \(xt, yt) \ t. x = xs \ ys = xt \ y = yt)} \ S"" and hdiff : ""\s \ S. \t \ S. (\(xs, ys) \ s. \(xt, yt) \ t. xs = xt \ ys \ yt) \ {(x, y). (\(xs, ys) \ s. \(xt, yt) \ t. x = xs \ x = xt \ y = ys - yt)} \ S"" shows ""\s \ S. \t \ S. {(x, y). (\(xs, ys) \ s. \(xt, yt) \ t. x = xs \ x = xt \ y = ys * yt)} \ S"" sorry end ", 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 \ undefined"" (* True *) theorem putnam_2012_b4: fixes a::""nat\real"" assumes ha0 : ""a 0 = 1"" and han : ""\n::nat. a (n+1) = a n + exp (-a n)"" shows ""(convergent (\n. a n - ln n)) \ putnam_2012_b4_solution"" sorry end ", 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)).\]",,['analysis'],,"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 \ real"" assumes hgim: ""\ x :: real. g1 x \ 1 \ g2 x \ 1"" and hgbd: ""\ B1 B2 :: real. \ x :: real. g1 x \ B1 \ g2 x \ B2"" shows ""\ h1 h2 :: real \ real. \ x :: real. Sup {y. \ s :: real. y = (g1 s) powr x * (g2 s)} = Sup {y. \ t :: real. y = x * (h1 t) + h2 t}"" sorry end", 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}$.,,['number_theory'],,"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) \ 'p"" defines ""P \ \ 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 \ ([p = 3] (mod 4))"" sorry end", 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$.",,['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 \ {k :: nat. \ j :: nat \ 33. k = 3 * j + 1}"" assumes hT : ""T \ S \ card T = 20"" shows ""\ m \ T. \ n \ T. m \ n \ m + n = 104"" sorry end", 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)$.",,['linear_algebra'],,"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 \ real"" and p :: ""real \ real"" and prm :: ""'n \ nat"" defines ""A \ \ i j :: 'n. if prm i < prm j then a else (if prm i > prm j then b else c i)"" and ""p \ \ x :: real. (\ i :: 'n \ UNIV. (c i - x))"" assumes htype : ""CARD('n) = n"" and hprmresbij : ""prm ` UNIV = {0..n-1}"" and hab : ""a \ b"" and npos : ""n > 0"" shows ""det A = ((b * p a - a * p b) / (b - a))"" sorry end", 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 \ undefined"" (* 2 *) theorem putnam_1978_a3: fixes p :: ""real poly"" and I :: ""nat \ real"" defines ""p \ 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 \ \ k :: nat. interval_lebesgue_integral lebesgue 0 PInfty (\ x :: real. x^k / (poly p x))"" shows ""(\ k \ {1..4}. I putnam_1978_a3_solution \ I k) \ (putnam_1978_a3_solution \ {1 :: nat..4})"" sorry end", 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}",,['abstract_algebra'],,"theory putnam_1978_a4 imports Complex_Main begin theorem putnam_1978_a4: fixes bypass :: ""('a set) \ ('a \ 'a \ 'a) \ bool"" fixes binop :: ""('a set) \ ('a \ 'a \ 'a) \ bool"" defines ""bypass \ \ S Smul. (\ a \ S. \ b \ S. \ c \ S. \ d \ S. Smul (Smul a b) (Smul c d) = Smul a d)"" assumes pauncount : ""\ pamap :: 'a \ real. surj pamap"" shows ""(\ (S :: 'a set) (Smul :: 'a \ 'a \ 'a). ((binop S Smul \ bypass S Smul) \ (\ a \ S. \ b \ S. \ c \ S. Smul a b = c \ (Smul c c = c \ (\ d \ S. Smul a d = Smul c d))))) \ (\ (S :: 'a set) (Smul :: 'a \ 'a \ 'a). binop S Smul \ bypass S Smul \ finite S \ (\ a \ S. Smul a a = a) \ (\ a \ S. \ b \ S. Smul a b = a \ a \ b) \ (\ a \ S. \ b \ S. Smul a b \ a))"" sorry end", 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. \]",,['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 \ :: ""real"" and a :: ""nat \ real"" defines ""\ \ (\ i \ {1..n}. a i)/(real n)"" assumes npos : ""n > 0"" and ha : ""\ i :: nat. a i \ {0 :: real<.. i \ {1..n}. sin (a i) / (a i)) \ (sin \ / \)^n"" sorry end", 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.",,"['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 \ real) set"" and n :: ""nat"" defines ""n \ card S"" assumes npos : ""n > 0"" and Sfin : ""finite S"" shows ""card {pair :: (real \ real) set. \ P \ S. \ Q \ S. pair = {P, Q} \ dist P Q = 1} < 2 * (real n) powr ((real 3)/2)"" sorry end", 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 \ undefined"" (* (rat_of_nat 7)/4 *) theorem putnam_1978_b2: shows ""(\ i \ {1 :: nat..}. (\ j \ {1 :: nat..}. (rat_of_nat 1)/(rat_of_nat (i^2 * j + 2 * i * j + i * j^2)))) = putnam_1978_b2_solution"" sorry end", 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.",,"['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 \ (real poly)"" and a :: ""nat \ real"" assumes hP1 : ""P 1 = monom 1 0 + monom 1 1"" and hP2 : ""P 2 = monom 1 0 + monom 2 1"" and hPodd : ""\ n :: nat \ 1. P (2 * n + 1) = P (2 * n) + (monom (real n + 1) 1) * P (2 * n - 1)"" and hPeven : ""\ n :: nat \ 1. P (2 * n + 2) = P (2 * n + 1) + (monom (real n + 1) 1) * P (2 * n)"" and hamax : ""\ n :: nat \ 1. a n = (GREATEST x :: real. poly (P n) x = 0)"" and ha0 : ""a 0 = -2"" shows ""strict_mono a \ filterlim a (nhds 0) at_top"" sorry end", 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.",,['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 ""\N::real. \ a b c d::int. 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 end", 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 \ undefined"" (* [: 1, 0, -4, 0, 4 :] *) theorem putnam_1978_b5: fixes S::""(real poly) set"" defines ""S \ { p::(real poly). degree p = 4 \ (\x \ {-1..1::real}. (poly p x) \ {0..1})}"" shows ""putnam_1978_b5_solution \ S \ (\p \ S. coeff p 4 \ coeff putnam_1978_b5_solution 4)"" sorry end", 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}. \]",,['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\nat\real"" and m n::nat assumes ha : ""\i j. a i j \ {0..1::real}"" and mnpos : ""m > 0 \ n > 0"" shows ""(\i=1..n. (\j=1..m*i. a i j / i))^2 \ 2 * m * (\i=1..n. (\j=1..m*i. a i j))"" sorry end", 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 \ undefined"" (* {n::int. n \ 0 \ \[n = 3] (mod 9) \ \[n = 6] (mod 9)} *) theorem putnam_2019_a1: shows ""{n::int. (\A::int\0. \B::int\0. \C::int\0. A^3 + B^3 + C^3 - 3*A*B*C = n)} = putnam_2019_a1_solution"" sorry end ", 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'],,"theory putnam_2019_a3 imports Complex_Main ""HOL-Computational_Algebra.Polynomial"" begin definition putnam_2019_a3_solution :: real where ""putnam_2019_a3_solution \ undefined"" (* 2019 powr (-1/2019) *) theorem putnam_2019_a3: fixes proots :: ""(complex poly) \ (complex multiset)"" and v :: ""(complex poly) \ bool"" and \ :: ""(complex poly) \ real"" defines ""proots \ (\p::complex poly. Abs_multiset (\a::complex. order a p))"" defines ""v \ (\b::complex poly. degree b = 2019 \ 1 \ Re (coeff b 0) \ Re (coeff b 2019) \ 2019 \ (\i::nat\{0..2019}. Im (coeff b i) = 0) \ (\i::nat\{0..2018}. Re (coeff b i) < Re (coeff b (i + 1))))"" and ""\ \ (\b::complex poly. (\\<^sub># (image_mset norm (proots b))) / 2019)"" shows ""(GREATEST M::real. (\b::complex poly. (v b \ \ b \ M))) = putnam_2019_a3_solution"" sorry end ", 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 \ undefined"" (* False *) theorem putnam_2019_a4: fixes fint :: ""((real^3) \ real) \ bool"" assumes hfint: ""\f::(real^3)\real. fint f = (\S::real^3. set_lebesgue_integral lebesgue (sphere S 1) f = 0)"" shows ""(\f::(real^3)\real. (continuous_on UNIV f \ fint f) \ (\x::real^3. f x = 0)) \ putnam_2019_a4_solution"" sorry end ", 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']",,"theory putnam_2019_a5 imports Complex_Main ""HOL-Computational_Algebra.Polynomial"" ""HOL-Library.Cardinality"" begin (* uses (nat \ 'p) instead of (Fin p \ 'p) and ('p \ nat) instead of ('p \ Fin p) *) definition putnam_2019_a5_solution :: ""nat \ nat"" where ""putnam_2019_a5_solution \ undefined"" (* (\p::nat. nat (round ((p - 1)/2))) *) theorem putnam_2019_a5: fixes p :: nat and ppind :: ""nat \ 'p::comm_semiring_1"" and q :: ""'p poly"" and a :: ""nat \ 'p"" and ppindinv :: ""'p \ nat"" and npoly :: ""nat \ ('p poly)"" and ndiv :: ""nat \ 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 \ (\i::nat\{0..(p-1)}. \j::nat\{0..(p-1)}. ppind i + ppind j = ppind ((i + j) mod p))"" and ppmult: ""ppind 1 = 1 \ (\i::nat\{0..(p-1)}. \j::nat\{0..(p-1)}. ppind i * ppind j = ppind ((i * j) mod p))"" and hq: ""\k::nat. coeff q k = a k"" and ha0: ""a 0 = 0 \ (\k::nat>(p-1). a k = 0)"" and haother: ""\k::nat\{1..(p-1)}. a k = ppind ((k ^ (nat (round ((p-1)/2)))) mod p)"" and hppindinv: ""\i::nat\{0..(p-1)}. ppindinv (ppind i) = i"" and hnpoly: ""\n::nat. \x::'p. poly (npoly n) x = ppind (((ppindinv x - 1)^n) mod p)"" and hndiv: ""\n::nat. ndiv n = ((npoly n) dvd q)"" shows ""(GREATEST n::nat. ndiv n) = putnam_2019_a5_solution p"" sorry end ", 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.$",,['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 \ real"" and r :: real assumes hcont: ""continuous_on {0..1} g"" and hdiff: ""g C1_differentiable_on {0<..<1} \ (deriv g) differentiable_on {0<..<1}"" and rgt1: ""r > 1"" and hlim: ""filterlim (\x::real. g x / (x powr r)) (nhds 0) (at_right 0)"" shows ""(filterlim (deriv g) (nhds 0) (at_right 0)) \ (filterlim (\x::real. Sup {xrg::real. (\x'::real\{0<..x}. xrg = (x' powr r) * \(deriv^^2) g x'\)}) at_top (at_right 0))"" sorry end ", 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'],,"theory putnam_2019_b1 imports Complex_Main ""HOL-Analysis.Finite_Cartesian_Product"" begin definition putnam_2019_b1_solution :: ""nat \ nat"" where ""putnam_2019_b1_solution \ undefined"" (* \ n. 5 * n + 1 *) theorem putnam_2019_b1: fixes n :: nat and Pn :: ""(int^2) set"" and pZtoR :: ""(int^2) \ (real^2)"" and sPnsquare :: ""(int^2) set \ bool"" defines ""Pn \ {p :: int^2. (p$1 = 0 \ p$2 = 0) \ (\ k \ n. (p$1) ^ 2 + (p$2) ^ 2 = 2 ^ k)}"" and ""pZtoR \ \ p. \ i. (real_of_int (p$i))"" and ""sPnsquare \ \ sPn :: (int^2) set. \ a b c d :: int^2. sPn = {a, b, c, d} \ (\ (s :: real) > 0. dist (pZtoR a) (pZtoR b) = s \ dist (pZtoR b) (pZtoR c) = s \ dist (pZtoR c) (pZtoR d) = s \ dist (pZtoR d) (pZtoR a) = s \ dist (pZtoR a) (pZtoR c) = dist (pZtoR b) (pZtoR d))"" shows ""card {sPn :: (int^2) set. sPn \ Pn \ sPnsquare sPn} = putnam_2019_b1_solution n"" sorry end", 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 \ undefined"" (* 8 / pi^3 *) theorem putnam_2019_b2: fixes a :: ""nat \ real"" defines ""a \ (\n::nat. (\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 (\n::nat. (a n)/n^3) (nhds putnam_2019_b2_solution) at_top"" sorry end ", 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$.",,['linear_algebra'],,"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 \ mat 1 - 2 *s u ** (transpose u)"" assumes hn: ""n > 0"" and hncard: ""CARD('n) = n"" and hQ0: ""\ i j :: 'n. i \ j \ scalar_product (Q$i) (Q$j) = 0 \ scalar_product ((transpose Q)$i) ((transpose Q)$j) = 0"" and hQ1: ""\ i :: 'n. scalar_product (Q$i) (Q$i) = 1 \ scalar_product ((transpose Q)$i) ((transpose Q)$i) = 1"" and hu: ""(transpose u) ** u = 1"" shows ""det (Q - mat 1) \ 0 \ det (P ** Q - mat 1) \ 0"" sorry end", 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 \ nat"" where ""putnam_2019_b5_solution \ undefined"" (* (2019, 1010) *) theorem putnam_2019_b5: fixes f::""nat\int"" and p::""real poly"" assumes hf : ""\x\3. f x = f (x-1) + f (x-2)"" and f12 : ""f 1 = 1 \ f 2 = 1"" and pdeg : ""degree p = 1008"" and hp : ""\n\1008. poly p (2 * n + 1) = f (2 * n + 1)"" shows ""\j k::nat. (poly p 2019 = f j - f k) \ ((j, k) = putnam_2019_b5_solution)"" sorry end ", 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}",,['abstract_algebra'],,"theory putnam_2019_b6 imports Complex_Main begin (* uses (nat \ int) instead of (Fin n \ int) *) definition putnam_2019_b6_solution :: ""nat set"" where ""putnam_2019_b6_solution \ undefined"" (* {1..} *) theorem putnam_2019_b6: fixes n :: nat and neighbors :: ""(nat \ int) \ (nat \ int) \ bool"" assumes hneighbors: ""\p q::nat\int. neighbors p q = (\i::nat\{0..(n-1)}. \p i - q i\ = 1 \ (\j::nat\{0..(n-1)}. (j \ i \ p j = q j)))"" shows ""(n \ 1 \ (\S::(nat\int) set. (\p\S. \q::nat\int. (neighbors p q \ q \ S)) \ (\p::nat\int. (p \ S \ card {q\S. neighbors p q} = 1)))) \ n \ putnam_2019_b6_solution"" sorry end ", 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.",,['algebra'],,"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 \ (int poly poly)"" and is_poly_PQ :: ""int poly poly \ bool"" defines ""P \ [:0, [:0, 0, 1:]:] + [:0, 0, [:0, 1:]:]"" and ""Q \ [:[:0, 0, 1:]:] + [:0, [:0, 1:]:] + [:0, 0, [:1:]:]"" and ""F \ \ n :: nat. ([:[:0, 1:]:] + [:0, [:1:]:])^n - [:[:0, 1:]^n:] - [:0, [:1:]:]^n"" and ""G \ \ n :: nat. ([:[:0, 1:]:] + [:0, [:1:]:])^n + [:[:0, 1:]^n:] + [:0, [:1:]:]^n"" shows ""\ n :: nat. n > 0 \ (\ A :: int poly poly. (\ a b :: int. poly (poly (F n) [:b:]) a = poly (poly (A) [:(poly (poly Q [:b:]) a):]) (poly (poly P [:b:]) a)) \ (\ a b :: int. poly (poly (G n) [:b:]) a = poly (poly (A) [:(poly (poly Q [:b:]) a):]) (poly (poly P [:b:]) a)))"" sorry end", 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 \ nat \ nat \ nat) set"" where ""putnam_1976_a3_solution \ undefined"" (* {(3,2,2,3), (2,3,3,2)} *) theorem putnam_1976_a3: shows ""{z :: nat \ nat \ nat \ nat. let (p,q,r,s) = z in prime p \ prime q \ r > 1 \ s > 1 \ \int (p^r) - int (q^s)\ = 1} = putnam_1976_a3_solution"" sorry end", 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'],,"theory putnam_1976_a4 imports Complex_Main ""HOL-Computational_Algebra.Polynomial"" begin definition putnam_1976_a4_solution :: ""(real \ real) \ (real \ real)"" where ""putnam_1976_a4_solution \ undefined"" (* (\ r :: real. -1/(r + 1), \ 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 \ [: -1, rat_of_int b, rat_of_int a, 1 :]"" and ""Q \ [: 1, rat_of_int d, rat_of_int c, 1 :]"" assumes hP : ""poly (map_poly of_rat P) r = 0 \ irreducible P"" and hQ : ""poly (map_poly of_rat Q) (r+1) = 0"" shows ""\ s :: real. poly (map_poly of_rat P) s = 0 \ (s = (fst putnam_1976_a4_solution) r \ s = (snd putnam_1976_a4_solution) r)"" sorry end", 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$.,,"['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 \ real"" assumes hfcdiff1 : ""f C1_differentiable_on UNIV"" and hfcdiff2 : ""(deriv f) C1_differentiable_on UNIV"" and hfbd : ""\ x :: real. \f x\ \ 1"" and hf0 : ""(f 0)^2 + (deriv f 0)^2 = 4"" shows ""\ y :: real. f y + ((deriv^^2) f) y = 0"" sorry end", 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'],,"theory putnam_1976_b1 imports Complex_Main begin definition putnam_1976_b1_solution :: ""real \ real"" where ""putnam_1976_b1_solution \ undefined"" (* (4,1) *) theorem putnam_1976_b1: shows ""filterlim (\ n :: nat. 1/(real n) * (\ k \ {1 :: nat..n}. \2*(real n)/(real k)\ - 2 * \(real n)/(real k)\)) (nhds (ln (fst putnam_1976_b1_solution) - snd putnam_1976_b1_solution)) at_top"" sorry end", 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'],,"theory putnam_1976_b2 imports Complex_Main ""HOL-Algebra.Group"" begin definition putnam_1976_b2_solution :: ""nat \ (((nat \ nat) list) set)"" where ""putnam_1976_b2_solution \ 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 \ int) list \ 'a"" and S :: ""'a set"" defines ""word \ \ w. foldr (\ y z. (A[^](fst y) \\<^bsub>G\<^esub> A[^](snd y)) \\<^bsub>G\<^esub> z) w \\<^bsub>G\<^esub>"" and ""S \ {g :: 'a. g \ carrier G \ (\ C \ carrier G. C[^]2 = g)}"" assumes hAB : ""A \ carrier G \ B \ carrier G"" and hA : ""A[^]4 = \\<^bsub>G\<^esub> \ A[^]2 \ \\<^bsub>G\<^esub>"" and hB : ""B[^]7 = \\<^bsub>G\<^esub> \ B \ \\<^bsub>G\<^esub>"" and h1 : ""A \\<^bsub>G\<^esub> B \\<^bsub>G\<^esub> (inv A) \\<^bsub>G\<^esub> B = \\<^bsub>G\<^esub>"" and hG : ""\ g \ carrier G. \ w :: (int \ int) list. g = word w"" shows "" card S = fst putnam_1976_b2_solution \ S = {g :: 'a. \ w \ (snd putnam_1976_b2_solution). g = word w}"" sorry end", 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\(real \ real)"" where ""putnam_1976_b5_solution \ undefined"" (* \n. \x. fact n *) theorem putnam_1976_b5: shows ""\n::nat. (\x. (\k=0..n. ((-1)^k * (n choose k)) * (x - k)^n)) = putnam_1976_b5_solution n"" sorry end", 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.",,['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 \ :: ""nat \ nat"" and quasiperfect :: ""nat \ bool"" defines ""\ \ \ N :: nat. (\ d \ {k :: nat. k dvd N}. d)"" and ""quasiperfect \ \ N :: nat. \ N = 2 * N + 1"" shows ""\ N :: nat. quasiperfect N \ (\ m :: int. odd m \ m^2 = N)"" sorry end", 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'],,"theory putnam_2010_a1 imports Complex_Main begin (* Boosted domains to naturals *) definition putnam_2010_a1_solution :: ""nat\nat"" where ""putnam_2010_a1_solution \ undefined"" (* \n. nat \n/2\ *) theorem putnam_2010_a1: fixes n :: ""nat"" and k_boxes :: ""nat\bool"" assumes hpos : ""n > 0"" and hkboxes : ""\ k::nat. kboxes k = (\ boxes :: nat\nat. (\m\{1..n}. boxes m \ {1..k}) \ (\i\{1..k}. \j\{1..k}. (\x\{1..n}. (if (boxes x = i) then x else 0)) = (\x\{1..n}. (if (boxes x = j) then x else 0))))"" shows ""(GREATEST k. kboxes k) = putnam_2010_a1_solution n"" sorry end", 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 \ real) set"" where ""putnam_2010_a2_solution \ undefined"" (* {f::real\real. (\c d::real. \x::real. f x = c*x + d)} *) theorem putnam_2010_a2: shows ""{f::real\real. f differentiable_on UNIV \ (\(x::real)(n::nat). (n > 0 \ deriv f x = (f (x + n) - f x)/n))} = putnam_2010_a2_solution"" sorry end ", 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.",,['number_theory'],,"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 ""\ prime (10^(10^(10^n)) + 10^(10^n) + 10^n - 1)"" sorry end ", 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$.",,"['abstract_algebra', 'algebra']",,"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: ""\a \ carrier S. \b \ carrier S. cross3 a b = a \\ b \ cross3 a b = 0"" shows ""\a \ carrier S. \b \ carrier S. cross3 a b = 0"" sorry end ", 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.",,['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 \ real) instead of ({0..} \ real) *) theorem putnam_2010_a6: fixes f :: ""real \ real"" assumes hf: ""strict_antimono_on {0..} f \ continuous_on {0..} f \ filterlim f (nhds 0) at_top"" shows ""\(\y::real. filterlim (\z::real. interval_lebesgue_integral lebesgue 0 z (\x::real. ((f x) - f (x + 1))/(f x))) (nhds y) at_top)"" sorry end ", 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 \ undefined"" (* False *) theorem putnam_2010_b1: shows ""(\a::nat\real. \m::nat>0. (\i::nat. (a i)^m) = m) \ putnam_2010_b1_solution"" sorry end ", 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 \ undefined"" (* 3 *) theorem putnam_2010_b2: fixes ABCintcoords::""(real \ real) \ (real \ real) \ (real \ real) \ bool"" and ABCintdists::""(real \ real) \ (real \ real) \ (real \ real) \ bool"" and ABCall::""(real \ real) \ (real \ real) \ (real \ real) \ bool"" defines ""ABCintcoords \ \A. \B. \C. (fst A) \ \ \ (snd A) \ \ \ (fst B) \ \ \ (snd B) \ \ \ (fst C) \ \ \ (snd C) \ \"" and ""ABCintdists \ \A. \B. \C. (dist A B) \ \ \ (dist B C) \ \ \ (dist A C) \ \"" and ""ABCall \ \A. \B. \C. ABCintcoords A B C \ ABCintdists A B C \ \ collinear {A, B, C}"" shows ""putnam_2010_b2_solution = (LEAST abdist. \A B C. ABCall A B C \ abdist = (dist A B))"" sorry end", 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 \ real poly) set"" where ""putnam_2010_b4_solution \ undefined"" (* {w :: real poly \ real poly. degree (fst w) \ 1 \ degree (snd w) \ 1 \ (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) \ putnam_2010_b4_solution \ (\ x :: real. (poly p x) * (poly q (x + 1)) - (poly p (x+1)) * (poly q x) = 1)"" sorry end", 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 \ undefined"" (* False *) theorem putnam_2010_b5: shows ""(\f::real\real. strict_mono_on UNIV f \ f differentiable_on UNIV \ (\x::real. deriv f x = f (f x))) \ putnam_2010_b5_solution"" sorry end ", 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$.",,['linear_algebra'],,"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 \ real^'n^'n"" and matrixpow :: ""real^'n^'n \ nat \ real^'n^'n"" assumes hApow : ""\ k > 0. Apow k = (\ i j. (A$i$j)^k)"" and npos : ""n \ 1"" and cardn : ""CARD('n) = n"" and hmatrixpow : ""\ M :: real^'n^'n. matrixpow M 0 = mat 1 \ (\ k :: nat > 0. matrixpow M k = M ** (matrixpow M (k-1)))"" shows ""(\ k :: nat \ {1..n+1}. matrixpow A k = Apow k)\(\ k \ 1. matrixpow A k = Apow k)"" sorry end", 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.",,"['number_theory', 'algebra']",,"theory putnam_2013_a2 imports Complex_Main begin theorem putnam_2013_a2: fixes S :: ""nat set"" and P :: ""nat \ (int list) \ bool"" and T :: ""nat \ (int set)"" and f :: ""nat \ int"" defines ""S \ {n::nat. n > 0 \ \(\m::int. m^2 = n)}"" and ""P \ (\(n::nat)(a::int list). length a > 0 \ n < a!0 \ (\m::int. m^2 = n * (\i::nat=0..((length a)-1). a!i)) \ (\i::nat\{0..((length a)-2)}. a!i < a!(i+1)))"" and ""T \ (\n::nat. {m::int. (\a::int list. P n a \ last a = m)})"" assumes hf: ""\n::nat\S. f n = (LEAST r::int. r \ T n)"" shows ""inj_on f S"" sorry end ", 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. $.",,['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 \ real) instead of ({0..n} \ real) *) theorem putnam_2013_a3: fixes n :: nat and a :: ""nat \ real"" and x :: real assumes hx: ""0 < x \ x < 1"" and hsum: ""(\i::nat=0..n. a i / (1 - x^(i+1))) = 0"" shows ""\y::real. 0 < y \ y < 1 \ (\i::nat=0..n. a i * y^i) = 0"" sorry end ", 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$.",,['algebra'],,"theory putnam_2013_a4 imports Complex_Main begin theorem putnam_2013_a4: fixes n k :: ""nat"" and Zsum Nsum :: ""real"" and circle :: ""nat \ nat"" and Z N :: ""(nat \ nat) \ nat"" and ws :: ""nat \ (nat \ nat)"" defines ""Zsum \ (1 / real_of_nat k) * (\ j\{0..(n-1)}. Z (ws j))"" and ""Nsum \ (1 / real_of_nat k) * (\ j\{0..n-1}. N (ws j))"" assumes npos : ""n \ 1"" and kpos : ""k \ 1"" and hcircle : ""\ i :: nat. circle i \ {0 :: nat..1}"" and hZ : ""\ w \ {0..n-1} \ {0..n}. Z w = (\ l :: nat \ {0..snd w - 1}. if circle ((fst w + l) mod n) = 0 then 1 else 0)"" and hN : ""\ w \ {0..n-1} \ {0..n}. Z w = (\ l :: nat \ {0..snd w - 1}. if circle ((fst w + l) mod n) = 1 then 1 else 0)"" and Zle1 : ""\ w \ {0..n-1} \ {0..n}. \ w' \ {0..n-1} \ {0..n}. (snd w) = (snd w') \ \int (Z w) - int (Z w')\ \ 1"" and hNZsum : ""round Nsum = Nsum \ round Zsum = Zsum"" shows ""\ w :: nat \ nat. (fst w \ n-1 \ snd w \ n) \ ((real (Z w) = Zsum) \ (real (N w) = Nsum))"" sorry end", 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 nat \ nat \ real), (nat \ (real^2)), and (nat \ (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) \ (real^2) \ (real^2) \ real"" and area3 :: ""(real^3) \ (real^3) \ (real^3) \ real"" and areadef2 :: ""(nat \ nat \ nat \ real) \ bool"" and areadef3 :: ""(nat \ nat \ nat \ real) \ bool"" assumes mge3: ""m \ 3"" and harea2: ""\a b c::real^2. area2 a b c = emeasure lebesgue (convex hull {a, b, c})"" and harea3: ""\a b c::real^3. area3 a b c = emeasure lebesgue (convex hull {a, b, c})"" and hareadef2: ""\a::nat\nat\nat\real. areadef2 a = (\A::nat\(real^2). (\i::nat\{0..(m-1)}. \j::nat\{i<..(m-1)}. \k::nat\{j<..(m-1)}. (a i j k * area2 (A i) (A j) (A k))) \ 0)"" and hareadef3: ""\a::nat\nat\nat\real. areadef3 a = (\A::nat\(real^3). (\i::nat\{0..(m-1)}. \j::nat\{i<..(m-1)}. \k::nat\{j<..(m-1)}. (a i j k * area3 (A i) (A j) (A k))) \ 0)"" shows ""\a::nat\nat\nat\real. (areadef2 a \ areadef3 a)"" sorry end ", 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$.)",,['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 \ int \ int"" and A :: ""((int \ int) set) \ int"" assumes hwn1: ""w (-2) (-2) = -1 \ w 2 (-2) = -1 \ w (-2) 2 = -1 \ w 2 2 = -1"" and 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"" and hw2: ""w 0 (-2) = 2 \ w (-2) 0 = 2 \ w 2 0 = 2 \ w 0 2 = 2"" and hw4: ""w (-1) (-1) = 4 \ w 1 (-1) = 4 \ w (-1) 1 = 4 \ w 1 1 = 4"" and hwn4: ""w 0 (-1) = -4 \ w (-1) 0 = -4 \ w 1 0 = -4 \ w 0 1 = -4"" and hw12: ""w 0 0 = 12"" and hw0: ""\a b::int. (\a\ > 2 \ \b\ > 2) \ w a b = 0"" and hA: ""\S::(int\int) set. finite S \ A S = (\s\S. \s'\S. w (fst s-fst s') (snd s-snd s'))"" shows ""\S::(int\int) set. (finite S \ S \ {}) \ A S > 0"" sorry end ", 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 \ undefined"" (* -1 *) theorem putnam_2013_b1: fixes c :: ""nat \ int"" assumes hc1: ""c 1 = 1"" and hceven: ""\n::nat. n > 0 \ c (2*n) = c n"" and hcodd: ""\n::nat. n > 0 \ c (2*n+1) = (-1)^n * c n"" shows ""(\n::nat=1..2013. c n * c (n+2)) = putnam_2013_b1_solution"" sorry end ", 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 \ undefined"" (* 3 *) theorem putnam_2013_b2: fixes CN :: ""nat \ ((real \ real) set)"" and C :: ""(real \ real) set"" defines ""CN \ (\N::nat. {f::real\real. (\x::real. f x \ 0) \ (\a::real list. length a = N+1 \ (\n::nat\{0..N}. 3 dvd n \ a!n = 0) \ (\x::real. f x = 1 + (\n::nat=1..N. a!n * cos (2*pi*n*x))))})"" and ""C \ \N::nat\{1..}. CN N"" shows ""(GREATEST fzero::real. (\f\C. fzero = f 0)) = putnam_2013_b2_solution"" sorry end ", 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}$?",,['set_theory'],,"theory putnam_2013_b3 imports Complex_Main begin (* This formalization uses ""nat set"" and ""nat \ real"" instead of finite types (""Fin n"" in Lean) *) definition putnam_2013_b3_solution :: bool where ""putnam_2013_b3_solution \ undefined"" (* True *) theorem putnam_2013_b3: shows ""(\ (n :: nat) (P :: nat set set) (f :: nat set \ real). P \ {} \ (\ S \ P. S \ {1..n}) \ (\ S \ P. \ S' \ P. S \ S' \ P \ S \ S' \ P) \ (\ S \ P. S \ {} \ (\ T \ P. T \ S \ card T + 1 = card S)) \ f {} = 0 \ (\ S \ P. \ S' \ P. f (S \ S') = f S + f S' - f (S \ S')) \ (\ r :: nat \ real. \ S \ P. f S = (\ i \ S. r i))) \ putnam_2013_b3_solution"" sorry end", 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$.",,['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 \ real) instead of ({0..1} \ real) *) theorem putnam_2013_b4: fixes \ :: ""(real \ real) \ real"" and Var :: ""(real \ real) \ real"" and M :: ""(real \ real) \ real"" assumes h\: ""\f::real\real. \ f = set_lebesgue_integral lebesgue {0<..<1} f"" and hVar: ""\f::real\real. Var f = set_lebesgue_integral lebesgue {0<..<1} (\x::real. (f x - \ f)^2)"" and hM: ""\f::real\real. M f = (GREATEST y::real. (\x::real\{0..1}. y = \f x\))"" shows ""\f g::real\real. (continuous_on {0..1} f \ continuous_on {0..1} g) \ (Var (\x::real. f x*g x) \ 2*Var f*(M g)^2 + 2*Var g*(M f)^2)"" sorry end ", 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))$.]",,['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 \ nat) instead of ({1..n} \ {1..n}) *) theorem putnam_2013_b5: fixes n :: nat and k :: nat and fiter :: ""(nat \ nat) \ bool"" assumes npos: ""n \ 1"" and kinX: ""k \ {1..n}"" and hfiter: ""\f::nat\nat. fiter f = (f ` {1..n} \ {1..n} \ (\x::nat\{1..n}. \j::nat. (f^^j) x \ k))"" shows ""card {f::nat\nat. fiter f} = k * n^(n-1)"" sorry end ", putnam_2023_a1,"abbrev putnam_2023_a1_solution : ℕ := sorry -- 18 theorem putnam_2023_a1 (f : ℕ → ℝ → ℝ) (hf : ∀ n > 0, f n = fun x : ℝ => ∏ i in Finset.Icc 1 n, Real.cos (i * x)) : putnam_2023_a1_solution > 0 ∧ |iteratedDeriv 2 (f putnam_2023_a1_solution) 0| > 2023 ∧ ∀ n > 0, n < putnam_2023_a1_solution → (|iteratedDeriv 2 (f n) 0| ≤ 2023) := sorry","For a positive integer $n$, let $f_n(x) = \cos(x) \cos(2x) \cos(3x) \cdots \cos(nx)$. Find the smallest $n$ such that $|f_n''(0)| > 2023$.",Show that the solution is $n = 18$.,['analysis'],,"theory putnam_2023_a1 imports Complex_Main ""HOL-Analysis.Derivative"" begin definition putnam_2023_a1_solution::nat where ""putnam_2023_a1_solution \ undefined"" (* 18 *) theorem putnam_2023_a1: fixes n :: nat and f :: ""nat \ real \ real"" defines ""f \ \n. \x. \i=1..n. cos (real i * x)"" shows ""putnam_2023_a1_solution = (LEAST m::nat. m > 0 \ abs ((deriv^^2) (f m) 0) > 2023)"" sorry end ", putnam_2023_a2,"abbrev putnam_2023_a2_solution : ℕ → Set ℝ := sorry -- fun n => {(1 : ℝ)/(factorial n), -(1 : ℝ)/(factorial n)} theorem putnam_2023_a2 (n : ℕ) (hn : n > 0 ∧ Even n) (p : Polynomial ℝ) (hp : Polynomial.Monic p ∧ p.degree = 2*n) (S : Set ℝ := {x : ℝ | ∃ k : ℤ, x = k ∧ 1 ≤ |k| ∧ |k| ≤ n}) (hpinv : ∀ k ∈ S, p.eval (1/k) = k^2) : {x : ℝ | p.eval (1/x) = x^2} \ S = putnam_2023_a2_solution n := sorry","Let $n$ be an even positive integer. Let $p$ be a monic, real polynomial of degree $2n$; that is to say, $p(x) = x^{2n} + a_{2n-1} x^{2n-1} + \cdots + a_1 x + a_0$ for some real coefficients $a_0, \dots, a_{2n-1}$. Suppose that $p(1/k) = k^2$ for all integers $k$ such that $1 \leq |k| \leq n$. Find all other real numbers $x$ for which $p(1/x) = x^2$.",Show that the other real numbers satisfying $p(1/x) = x^2$ are $\pm rac{1}{n!}.$,['algebra'],"Section putnam_2023_a2. Require Import Nat Ensembles Factorial Reals Coquelicot.Coquelicot. Definition putnam_2023_a2_solution : Ensemble R := fun x => exists (n: nat), x = -1 / INR (fact n) \/ x = 1 / INR (fact n). Theorem putnam_2023_a2 (n : nat) (hn0 : gt n 0) (hnev : even n = true) (coeff: nat -> R) (p : R -> R := fun x => sum_n (fun i => coeff i * x ^ i) (2 * n + 1)) (monic_even : coeff (mul 2 n) = 1) (hpinv : forall k : Z, and (Z.le 1 (Z.abs k)) (Z.le (Z.abs k) (Z.of_nat n)) -> p (1 / (IZR k)) = IZR (k ^ 2)) : (fun x => (p (1 / x) = x ^ 2 /\ ~ exists k : Z, x = IZR k /\ Z.le (Z.abs k) (Z.of_nat n))) = putnam_2023_a2_solution. Proof. Admitted. End putnam_2023_a2.","theory putnam_2023_a2 imports Complex_Main ""HOL-Computational_Algebra.Polynomial"" begin definition putnam_2023_a2_solution :: ""nat \ (real set)"" where ""putnam_2023_a2_solution \ undefined"" (* \ n :: nat. {(1 :: real)/(fact n), -(1 :: real)/(fact n)} *) theorem putnam_2023_a2: fixes n :: ""nat"" and p :: ""real poly"" and S :: ""real set"" defines ""S \ {x :: real. \ k :: int. x = k \ 1 \ abs k \ abs k \ n}"" assumes hn : ""n > 0 \ even n"" and hp : ""lead_coeff p = 1 \ degree p = 2*n"" and hpinv : ""\ k \ S. poly p (1/k) = k^2"" shows ""{x :: real. poly p (1/x) = x^2} - S = putnam_2023_a2_solution n"" sorry end", putnam_2023_a3,"abbrev putnam_2023_a3_solution : ℝ := sorry -- Real.pi / 2 theorem putnam_2023_a3 : sInf {r > 0 | ∃ f g : ℝ → ℝ, Differentiable ℝ f ∧ Differentiable ℝ g ∧ f 0 > 0 ∧ g 0 = 0 ∧ (∀ x : ℝ, |deriv f x| ≤ |g x| ∧ |deriv g x| ≤ |f x|) ∧ f r = 0} = putnam_2023_a3_solution := sorry","Determine the smallest positive real number $r$ such that there exist differentiable functions $f\colon \mathbb{R} \to \mathbb{R}$ and $g\colon \mathbb{R} \to \mathbb{R}$ satisfying \begin{enumerate} \item[(a)] $f(0) > 0$, \item[(b)] $g(0) = 0$, \item[(c)] $|f'(x)| \leq |g(x)|$ for all $x$, \item[(d)] $|g'(x)| \leq |f(x)|$ for all $x$, and \item[(e)] $f(r) = 0$. \end{enumerate}",Show that the solution is $r = \pi/2$.,['analysis'],"Section putnam_2023_a3. Require Import Reals Coquelicot.Coquelicot. Definition putnam_2023_a3_solution := PI / 2. Theorem putnam_2023_a3 (r : R) (hr : r > 0) (p : R -> Prop := fun t => exists (f g : R -> R), f 0 = 0 /\ g 0 = 0 /\ forall (x: R), Rabs (Derive f x) <= Rabs (g x) /\ forall (x: R), Rabs (Derive g x) <= Rabs (f x) /\ f t = 0) : (forall (t: R), t > 0 -> t < r -> ~ (p t)) <-> r = putnam_2023_a3_solution. Proof. Admitted. End putnam_2023_a3.","theory putnam_2023_a3 imports Complex_Main ""HOL-Analysis.Derivative"" begin definition putnam_2023_a3_solution :: ""real"" where ""putnam_2023_a3_solution \ undefined"" (* pi / 2 *) theorem putnam_2023_a3: shows ""(LEAST r :: real. r > 0 \ (\ f g :: real \ real. Differentiable f UNIV \ Differentiable g UNIV \ f 0 > 0 \ g 0 = 0 \ (\ x :: real. abs (deriv f x) \ abs (g x) \ abs (deriv g x) \ abs(f x)) \ f r = 0)) = putnam_2023_a3_solution"" sorry end", putnam_2023_b2,"abbrev putnam_2023_b2_solution : ℕ := sorry -- 3 theorem putnam_2023_b2 : sInf {(digits 2 (2023*n)).sum | n > 0} = putnam_2023_b2_solution := sorry","For each positive integer $n$, let $k(n)$ be the number of ones in the binary representation of $2023 \cdot n$. What is the minimum value of $k(n)$?",Show that the minimum is $3$.,['number_theory'],"Section putnam_2023_b2. Require Import BinNums Nat NArith. Definition putnam_2023_b2_solution := 3. Theorem putnam_2023_b2: 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 (forall (n: nat), k (Pos.of_nat (2023*n)) >= putnam_2023_b2_solution) /\ (exists (n: nat), k (Pos.of_nat (2023*n)) = putnam_2023_b2_solution). Proof. Admitted. End putnam_2023_b2.","theory putnam_2023_b2 imports Complex_Main ""HOL-Number_Theory.Cong"" begin definition putnam_2023_b2_solution :: ""nat"" where ""putnam_2023_b2_solution \ undefined"" (* 3 *) theorem putnam_2023_b2: fixes ones :: ""nat \ nat"" assumes h0 : ""ones 0 = 0"" and hi : ""\ n > 0. ones n = ones (n div 2) + (if [n = 1] (mod 2) then 1 else 0)"" shows ""(LEAST k :: nat. \ n > 0. ones (2023*n) = k) = putnam_2023_b2_solution"" sorry end", putnam_2023_a5,"abbrev putnam_2023_a5_solution : Set ℂ := sorry -- {-(3^1010 - 1)/2, -(3^1010 - 1)/2 + Real.sqrt (9^1010 - 1) * Complex.I/4, -(3^1010 - 1)/2 - Real.sqrt (9^1010 - 1) * Complex.I/4} theorem putnam_2023_a5 : {z : ℂ | ∑ k in Finset.Icc 0 (3^1010 - 1), (-2)^(num_ones (digits 3 k)) * (z + k)^2023 = 0} = putnam_2023_a5_solution := sorry","For a nonnegative integer $k$, let $f(k)$ be the number of ones in the base 3 representation of $k$. Find all complex numbers $z$ such that \[ \sum_{k=0}^{3^{1010}-1} (-2)^{f(k)} (z+k)^{2023} = 0. \]",Show that the solution is the set of complex numbers $\{- \frac{3^{1010} - 1}{2} \pm \frac{\sqrt{9^{1010} - 1}}{4} * i \}$,['algebra'],,"theory putnam_2023_a5 imports Complex_Main ""HOL-Number_Theory.Cong"" begin definition putnam_2023_a5_solution :: ""complex set"" where ""putnam_2023_a5_solution \ undefined"" (* {-(3^1010 - 1)/2, -(3^1010 - 1)/2 + sqrt (9^1010 - 1) * \/4, -(3^1010 - 1)/2 - sqrt (9^1010 - 1) * \/4} *) theorem putnam_2023_a5: fixes num_ones :: ""nat \ nat"" assumes h0 : ""num_ones 0 = 0"" and hi : ""\ n > 0. num_ones n = (num_ones (n div 3)) + (if [n = 1] (mod 3) then 1 else 0)"" shows ""{z :: complex. (\ k=0..(3^1010 - 1). ((-2)^(num_ones k) * (z + k)^2023)) = 0} = putnam_2023_a5_solution"" sorry end", putnam_2023_b4,"abbrev putnam_2023_b4_solution : ℝ := sorry -- 29 theorem putnam_2023_b4 (tne : ℕ → (ℕ → ℝ) → Set ℝ) (fdiff : ℕ → (ℕ → ℝ) → (ℝ → ℝ) → Prop) (flim : ℕ → (ℕ → ℝ) → (ℝ → ℝ) → Prop) (fderiv1 : ℕ → (ℕ → ℝ) → (ℝ → ℝ) → Prop) (fderiv2 : ℕ → (ℕ → ℝ) → (ℝ → ℝ) → Prop) (fall : ℕ → (ℕ → ℝ) → (ℝ → ℝ) → Prop) (tinc : ℕ → (ℕ → ℝ) → Prop) (Tall : ℝ → Prop) (htne : ∀ n : ℕ, ∀ ts : ℕ → ℝ, tne n ts = {t : ℝ | t > ts 0 ∧ ∀ i : Fin n, t ≠ ts (i.1 + 1)}) (hfdiff : ∀ n : ℕ, ∀ ts : ℕ → ℝ, ∀ f : ℝ → ℝ, fdiff n ts f = (ContinuousOn f (Set.Ici (ts 0)) ∧ ContDiffOn ℝ 1 f (tne n ts) ∧ DifferentiableOn ℝ (derivWithin f (tne n ts)) (tne n ts))) (hflim : ∀ n : ℕ, ∀ ts : ℕ → ℝ, ∀ f : ℝ → ℝ, flim n ts f = ∀ k : Fin (n + 1), Tendsto (derivWithin f (tne n ts)) (𝓝[>] (ts k.1)) (𝓝 0)) (hfderiv1 : ∀ n : ℕ, ∀ ts : ℕ → ℝ, ∀ f : ℝ → ℝ, fderiv1 n ts f = ∀ k : Fin n, ∀ t ∈ Set.Ioo (ts k.1) (ts (k.1 + 1)), iteratedDerivWithin 2 f (tne n ts) t = k.1 + 1) (hfderiv2 : ∀ n : ℕ, ∀ ts : ℕ → ℝ, ∀ f : ℝ → ℝ, fderiv2 n ts f = ∀ t > ts n, iteratedDerivWithin 2 f (tne n ts) t = n + 1) (hfall : ∀ n : ℕ, ∀ ts : ℕ → ℝ, ∀ f : ℝ → ℝ, fall n ts f = (fdiff n ts f ∧ f (ts 0) = 0.5 ∧ flim n ts f ∧ fderiv1 n ts f ∧ fderiv2 n ts f)) (htinc : ∀ n : ℕ, ∀ ts : ℕ → ℝ, tinc n ts = ∀ k : Fin n, ts (k.1 + 1) ≥ ts k.1 + 1) (hTall : ∀ T : ℝ, Tall T = ((T ≥ 0) ∧ ∃ n : ℕ, ∃ ts : ℕ → ℝ, ∃ f : ℝ → ℝ, tinc n ts ∧ fall n ts f ∧ f (ts 0 + T) = 2023)) : Tall putnam_2023_b4_solution ∧ ∀ T : ℝ, Tall T → T ≥ putnam_2023_b4_solution := sorry","For a nonnegative integer $n$ and a strictly increasing sequence of real numbers $t_0,t_1,\dots,t_n$, let $f(t)$ be the corresponding real-valued function defined for $t \geq t_0$ by the following properties: \begin{enumerate} \item[(a)] $f(t)$ is continuous for $t \geq t_0$, and is twice differentiable for all $t>t_0$ other than $t_1,\dots,t_n$; \item[(b)] $f(t_0)=1/2$; \item[(c)] $\lim_{t \to t_k^+} f'(t)=0$ for $0 \leq k \leq n$; \item[(d)] For $0 \leq k \leq n-1$, we have $f''(t)=k+1$ when $t_kt_n$. \end{enumerate} Considering all choices of $n$ and $t_0,t_1,\dots,t_n$ such that $t_k \geq t_{k-1}+1$ for $1 \leq k \leq n$, what is the least possible value of $T$ for which $f(t_0+T)=2023$?",Show that the minimum value of $T$ is $29$.,['analysis'],"Section putnam_2023_b4. Require Import Reals Coquelicot.Derive Coquelicot.Hierarchy. From mathcomp Require Import div fintype seq ssrbool. Definition putnam_2023_b4_solution := 29. Theorem putnam_2023_b4: forall (n: nat) (s: 'I_n -> R) (i i0 : 'I_n), s i < s (ordS i) -> let t0 := s (nth i0 (enum 'I_n) 0) in forall (f : R -> R) (t: R), ( ((t >= t0 -> continuity_pt f t) /\ (t > t0 /\ ~ exists i, s i = t -> ex_derive_n f 2 t)) /\ (f t0 = 0.5) /\ (forall k: 'I_n, let tk := s k in filterlim (Derive_n f 1) (at_right tk) (locally 0)) /\ (forall k: 'I_n, k <> nth i0 (enum 'I_n) (n-1) -> let tk := s k in tk < t < tk+1 -> (Derive_n f 2) = (fun _ => INR k+1)) /\ (forall m: 'I_n, t > s (nth i0 (enum 'I_n) m) -> (Derive_n f 2) = (fun _ => INR m+1)) ) -> forall (T: R), f(t0+T) = 2023 <-> T >= putnam_2023_b4_solution /\ f(t0 + putnam_2023_b4_solution) = 2023. Proof. Admitted. End putnam_2023_b4.","theory putnam_2023_b4 imports Complex_Main ""HOL-Analysis.Derivative"" begin (* uses (nat \ real) instead of (Fin (n+1) \ real) and (real \ real) instead of ({(ts 0)..} \ real) *) definition putnam_2023_b4_solution :: real where ""putnam_2023_b4_solution \ undefined"" (* 29 *) theorem putnam_2023_b4: fixes tne :: ""nat \ (nat \ real) \ real set"" and fdiff :: ""nat \ (nat \ real) \ (real \ real) \ bool"" and flim :: ""nat \ (nat \ real) \ (real \ real) \ bool"" and fderiv1 :: ""nat \ (nat \ real) \ (real \ real) \ bool"" and fderiv2 :: ""nat \ (nat \ real) \ (real \ real) \ bool"" and fall :: ""nat \ (nat \ real) \ (real \ real) \ bool"" and tinc :: ""nat \ (nat \ real) \ bool"" and Tall :: ""real \ bool"" assumes htne: ""\(n::nat)(ts::nat\real). tne n ts = {t::real. t > ts 0 \ (\i::nat\{1..n}. t \ ts i)}"" and hfdiff: ""\(n::nat)(ts::nat\real)(f::real\real). fdiff n ts f = (continuous_on {(ts 0)..} f \ f C1_differentiable_on (tne n ts) \ (deriv f) differentiable_on (tne n ts))"" and hflim: ""\(n::nat)(ts::nat\real)(f::real\real). flim n ts f = (\k::nat\{0..n}. filterlim (deriv f) (nhds 0) (at_right (ts k)))"" and hfderiv1: ""\(n::nat)(ts::nat\real)(f::real\real). fderiv1 n ts f = (\k::nat\{0..(n-1)}. \t::real\{(ts k)<..<(ts (k+1))}. (deriv^^2) f t = k+1)"" and hfderiv2: ""\(n::nat)(ts::nat\real)(f::real\real). fderiv2 n ts f = (\t::real>(ts n). (deriv^^2) f t = n+1)"" and hfall: ""\(n::nat)(ts::nat\real)(f::real\real). fall n ts f = (fdiff n ts f \ f (ts 0) = 0.5 \ flim n ts f \ fderiv1 n ts f \ fderiv2 n ts f)"" and htinc: ""\(n::nat)(ts::nat\real). tinc n ts = (\k::nat\{0..(n-1)}. ts (k+1) \ ts k + 1)"" and hTall: ""\T::real. Tall T = (T \ 0 \ (\(n::nat)(ts::nat\real)(f::real\real). tinc n ts \ fall n ts f \ f (ts 0 + T) = 2023))"" shows ""(LEAST T::real. Tall T) = putnam_2023_b4_solution"" sorry end ", putnam_2023_b5,"abbrev putnam_2023_b5_solution : Set ℕ := sorry -- {n : ℕ | n = 1 ∨ n ≡ 2 [MOD 4]} theorem putnam_2023_b5 (n : ℕ) (perm : Prop) (hperm : perm = ∀ m : ℤ, IsRelPrime m n → ∃ p : Equiv.Perm (Fin n), ∀ k : Fin n, (p (p k)).1 + 1 ≡ m * (k.1 + 1) [ZMOD n]) : (n > 0 ∧ perm) ↔ n ∈ putnam_2023_b5_solution := sorry","Determine which positive integers $n$ have the following property: For all integers $m$ that are relatively prime to $n$, there exists a permutation $\pi:\{1,2,\dots,n\} \to \{1,2,\dots,n\}$ such that $\pi(\pi(k)) \equiv mk \pmod{n}$ for all $k \in \{1,2,\dots,n\}$.",Show that the desired property holds if and only if $n=1$ or $n \equiv 2 \pmod{4}$.,['number_theory'],"Section putnam_2023_b5. Require Import PeanoNat. From mathcomp Require Import div fintype perm ssrbool. Theorem putnam_2023_b5: forall (m n: nat), coprime m n -> exists (π: {perm 'I_n}), forall (k: 'I_n), (π (π k))%%n mod n = m*k%%n. Proof. Admitted. End putnam_2023_b5.","theory putnam_2023_b5 imports Complex_Main ""HOL-Number_Theory.Cong"" ""HOL-Combinatorics.Permutations"" begin definition putnam_2023_b5_solution :: ""nat set"" where ""putnam_2023_b5_solution \ undefined"" (* {n::nat. n = 1 \ [n = 2] (mod 4)} *) theorem putnam_2023_b5: fixes n :: nat and perm :: bool assumes hperm: ""perm = (\m::int. coprime m n \ (\p::nat\nat. p permutes {1..n} \ (\k::nat\{1..n}. [p (p k) = m*k] (mod n))))"" shows ""(n > 0 \ perm) \ n \ putnam_2023_b5_solution"" sorry end ", putnam_2023_b6,"abbrev putnam_2023_b6_solution : ℕ → ℤ := sorry -- (fun n : ℕ => (-1) ^ (Nat.ceil (n / 2) - 1) * 2 * Nat.ceil (n / 2)) theorem putnam_2023_b6 (n : ℕ) (S : Matrix (Fin n) (Fin n) ℤ) (npos : n > 0) (hS : ∀ i j : Fin n, S i j = ∑' a : ℕ, ∑' b : ℕ, if a * (i.1 + 1) + b * (j.1 + 1) = n then 1 else 0) : S.det = putnam_2023_b6_solution n := sorry","Let $n$ be a positive integer. For $i$ and $j$ in $\{1,2,\dots,n\}$, let $s(i,j)$ be the number of pairs $(a,b)$ of nonnegative integers satisfying $ai+bj=n$. Let $S$ be the $n$-by-$n$ matrix whose $(i,j)$ entry is $s(i,j)$. For example, when $n=5$, we have $S = \begin{bmatrix} 6 & 3 & 2 & 2 & 2 \\ 3 & 0 & 1 & 0 & 1 \\ 2 & 1 & 0 & 0 & 1 \\ 2 & 0 & 0 & 0 & 1 \\ 2 & 1 & 1 & 1 & 2 \end{bmatrix}$. Compute the determinant of $S$.",Show that the determinant equals $(-1)^{\lceil n/2 \rceil-1}2\lceil\frac{n}{2}\rceil$.,['linear_algebra'],"Section putnam_2023_b6. Require Import Nat Finite_sets. From mathcomp Require Import matrix ssrbool ssralg fintype. Variable putnam_2023_b6_solution : nat -> nat. Local Open Scope ring_scope. Theorem putnam_2023_b6: forall (n: nat), let s (i j: nat) := cardinal (nat*nat) (fun p => let (a, b) := p in 1 <= i <= n /\ 1 <= j <= n /\ eq (add (mul a i) (mul b j)) n) in (\matrix_(i < n, j < n) s i j) = (\matrix_(i < n, j < n) s i j). Proof. Admitted. End putnam_2023_b6.","theory putnam_2023_b6 imports Complex_Main ""HOL-Analysis.Determinants"" begin (* uses (nat \ 'n) instead of (Fin n \ 'n) *) definition putnam_2023_b6_solution :: ""nat \ int"" where ""putnam_2023_b6_solution \ undefined"" (* (\n::nat. (-1)^(nat (\n/2\-1)) * 2 * \n/2\) *) theorem putnam_2023_b6: fixes n :: nat and S :: ""int^'n^'n"" assumes npos: ""n > 0"" and pncard: ""CARD('n) = n"" and hS: ""\pnind::nat\'n. (pnind ` {0..(n-1)} = UNIV \ (\i::nat\{0..(n-1)}. \j::nat\{0..(n-1)}. S$(pnind i)$(pnind j) = card {(a::nat,b::nat). a*(i+1) + b*(j+1) = n}))"" shows ""det S = putnam_2023_b6_solution n"" sorry end ", putnam_1996_a3,"abbrev putnam_1996_a3_solution : Prop := sorry -- False theorem putnam_1996_a3 (student_choices : Finset.range 20 → Set (Finset.range 6)) : putnam_1996_a3_solution ↔ ∃ S : Set (Finset.range 20), ∃ c1 c2 : Finset.range 6, c1 ≠ c2 ∧ S.ncard = 5 ∧ ({c1, c2} ⊆ ⋂ s ∈ S, student_choices s ∨ ({c1, c2} ⊆ ⋂ s ∈ S, (student_choices s)ᶜ)) := sorry",Suppose that each of 20 students has made a choice of anywhere from 0 to 6 courses from a total of 6 courses offered. Prove or disprove: there are 5 students and 2 courses such that all 5 have chosen both courses or all 5 have chosen neither course.,Show that the solution is that the statement is false.,['combinatorics'],,"theory putnam_1996_a3 imports Complex_Main begin definition putnam_1996_a3_solution :: ""bool"" where ""putnam_1996_a3_solution \ undefined"" (* False *) theorem putnam_1996_a3: fixes student_choices :: ""nat \ (nat set)"" assumes hinrange : ""\ n :: nat. student_choices n \ {1..6}"" shows ""putnam_1996_a3_solution \ (\ S :: nat set. S \ {1::nat..20} \ card S = 5 \ (\ c1 \ {1 :: nat..6}. \ c2 \ {1 :: nat..6}. c1 \ c2 \ ({c1, c2} \ (\ s \ S. student_choices s) \ {c1, c2} \ (\ s \ S. UNIV - (student_choices s))) ))"" sorry end", putnam_1996_a4,"theorem putnam_1996_a4 (A : Type*) [Finite A] (S : Set (A × A × A)) (hSdistinct : ∀ a b c : A, ⟨a, b, c⟩ ∈ S → a ≠ b ∧ b ≠ c ∧ a ≠ c) (hS1 : ∀ a b c : A, ⟨a, b, c⟩ ∈ S ↔ ⟨b, c, a⟩ ∈ S) (hS2 : ∀ a b c : A, ⟨a, b, c⟩ ∈ S ↔ ⟨c, b, a⟩ ∉ S) (hS3 : ∀ a b c d : A, (⟨a, b, c⟩ ∈ S ∧ ⟨c, d, a⟩ ∈ S) ↔ (⟨b,c,d⟩ ∈ S ∧ ⟨d,a,b⟩ ∈ S)) : ∃ g : A → ℝ, Injective g ∧ (∀ a b c : A, g a < g b ∧ g b < g c → ⟨a,b,c⟩ ∈ S) := sorry","Let $S$ be the set of ordered triples $(a, b, c)$ of distinct elements of a finite set $A$. Suppose that \begin{enumerate} \item $(a,b,c) \in S$ if and only if $(b,c,a) \in S$; \item $(a,b,c) \in S$ if and only if $(c,b,a) \notin S$; \item $(a,b,c)$ and $(c,d,a)$ are both in $S$ if and only if $(b,c,d)$ and $(d,a,b)$ are both in $S$. \end{enumerate} Prove that there exists a one-to-one function $g$ from $A$ to $\R$ such that $g(a) < g(b) < g(c)$ implies $(a,b,c) \in S$.",,['algebra'],,"theory putnam_1996_a4 imports Complex_Main begin theorem putnam_1996_a4: fixes S :: ""('A \ 'A \ 'A) set"" and n :: ""nat"" assumes hA : ""CARD('A) = n"" and hS1 : "" \ a b c :: 'A. (a, b, c) \ S \ (b, c, a) \ S"" and hS2 : "" \ a b c :: 'A. (a, b, c) \ S \ (c, b, a) \ S"" and hS3 : "" \ a b c d :: 'A. ((a, b, c) \ S \ (c, d, a) \ S) \ ((b, c, d) \ S \ (d, a, b) \ S)"" shows ""\ g :: 'A \ real. inj g \ (\ a b c :: 'A. (g a < g b \ g c < g c) \ (a, b, c) \ S)"" sorry end", putnam_1996_a5,"theorem putnam_1996_a5 (p : ℕ) (hpprime : Prime p) (hpge3 : p > 3) (k : ℕ := Nat.floor (2*p/(3 : ℚ))) : p^2 ∣ ∑ i in Finset.Icc 1 k, Nat.choose p i := sorry","If $p$ is a prime number greater than 3 and $k = \lfloor 2p/3 \rfloor$, prove that the sum \[\binom p1 + \binom p2 + \cdots + \binom pk \] of binomial coefficients is divisible by $p^2$.",,['number_theory'],"Section putnam_1996_a5. Require Import Binomial Reals Znumtheory Coquelicot.Coquelicot. From mathcomp Require Import div. Open Scope R. Theorem putnam_1996_a5: forall (p: nat), prime (Z.of_nat p) /\ gt p 3 -> let k := floor (2 * INR p / 3) in exists (m: nat), sum_n (fun i => Binomial.C p (i+1)) (Z.to_nat k) = INR m * pow (INR p) 2. Proof. Admitted. End putnam_1996_a5.","theory putnam_1996_a5 imports Complex_Main begin theorem putnam_1996_a5: fixes p k :: ""nat"" defines ""k \ nat \2 * p / 3\"" assumes hpprime : ""prime p"" and hpge3 : ""p > 3"" shows ""p^2 dvd (\ i \ {1 :: nat..k}. p choose i)"" sorry end", putnam_1996_a6,"abbrev putnam_1996_a6_solution : ℝ → Set (ℝ → ℝ) := sorry -- (fun c : ℝ => if c ≤ 1 / 4 then {f : ℝ → ℝ | ∃ d : ℝ, ∀ x : ℝ, f x = d} else {f : ℝ → ℝ | ContinuousOn f (Set.Icc 0 c) ∧ f 0 = f c ∧ (∀ x > 0, f x = f (x ^ 2 + c)) ∧ (∀ x < 0, f x = f (-x))}) theorem putnam_1996_a6 (c : ℝ) (f : ℝ → ℝ) (cgt0 : c > 0) : (Continuous f ∧ ∀ x : ℝ, f x = f (x ^ 2 + c)) ↔ f ∈ putnam_1996_a6_solution c := sorry","Let $c>0$ be a constant. Give a complete description, with proof, of the set of all continuous functions $f:\mathbb{R} \to \mathbb{R}$ such that $f(x)=f(x^2+c)$ for all $x \in \mathbb{R}$.","Show that if $c \leq 1/4$ then $f$ must be constant, and if $c>1/4$ then $f$ can be defined on $[0,c]$ as any continuous function with equal values on the endpoints, then extended to $x>c$ by the relation $f(x)=f(x^2+c)$, then extended further to $x<0$ by the relation $f(x)=f(-x)$.","['analysis', 'algebra']","Section putnam_1996_a6. Require Import Reals Coquelicot.Coquelicot. Open Scope R. Definition putnam_1996_a6_solution (c: R) (f: R -> R) := if Rle_dec c (1/4) then exists (d: R), f = (fun _ => d) else forall (x: R), 0 <= x <= c -> continuity_pt f x /\ f 0 = f c /\ forall (x: R), x > 0 -> f x = f (pow x 2 + c) /\ (forall (x: R), x < 0 -> f x = f (-x)). Theorem putnam_1996_a6: forall (c: R), c > 0 -> forall (f: R -> R), continuity f /\ forall (x: R), f x = pow x 2 + c <-> putnam_1996_a6_solution c f. Proof. Admitted. End putnam_1996_a6.","theory putnam_1996_a6 imports Complex_Main begin definition putnam_1996_a6_solution :: ""real \ ((real \ real) set)"" where ""putnam_1996_a6_solution \ undefined"" (* \ c :: real. if c \ 1 / 4 then {f :: real \ real. \ d :: real. \ x :: real. f x = d} else {f :: real \ real. continuous_on {0..c} f \ f 0 = f c \ (\ x > 0. f x = f (x ^ 2 + c)) \ (\ x < 0. f x = f (-x))} *) theorem putnam_1996_a6: fixes c :: real and f :: ""real \ real"" assumes cgt0: ""c > 0"" shows ""(continuous_on UNIV f \ (\ x :: real. f x = f (x ^ 2 + c))) \ f \ putnam_1996_a6_solution c"" sorry end", putnam_1996_b1,"abbrev putnam_1996_b1_solution : ℕ → ℕ := sorry -- Nat.fib theorem putnam_1996_b1 (selfish : Finset ℕ → Prop) (n : ℕ) (hselfish : ∀ s : Finset ℕ, selfish s = (s.card ∈ s)) (npos : n ≥ 1) : {s : Finset ℕ | (s : Set ℕ) ⊆ Set.Icc 1 n ∧ selfish s ∧ (∀ ss : Finset ℕ, ss ⊂ s → ¬selfish ss)}.encard = putnam_1996_b1_solution n := sorry","Define a \emph{selfish} set to be a set which has its own cardinality (number of elements) as an element. Find, with proof, the number of subsets of $\{1,2,\ldots,n\}$ which are \emph{minimal} selfish sets, that is, selfish sets none of whose proper subsets is selfish.","Show that the number of subsets is $F_n$, the $n$th Fibonacci number.",['algebra'],,"theory putnam_1996_b1 imports Complex_Main begin fun putnam_1996_b1_solution :: ""nat \ nat"" where ""putnam_1996_b1_solution n = undefined"" (* ""putnam_1996_b1_solution 0 = 0"" | ""putnam_1996_b1_solution (Suc 0) = 1"" | ""putnam_1996_b1_solution (Suc (Suc n)) = putnam_1996_b1_solution n + putnam_1996_b1_solution (Suc n)"" *) theorem putnam_1996_b1: fixes selfish :: ""nat set \ bool"" and n :: nat defines ""selfish \ \ s. card s \ s"" assumes npos: ""n \ 1"" shows ""card {s :: nat set. s \ {1..n} \ selfish s \ (\ ss :: nat set. ss \ s \ \selfish ss)} = putnam_1996_b1_solution n"" sorry end", putnam_1996_b2,"theorem putnam_1996_b2 (n : ℕ) (prododd : ℝ) (npos : n > 0) (hprododd : prododd = ∏ i in Finset.range (2 * n), if Odd i then i else 1) : ((2 * n - 1 : ℝ) / Real.exp 1) ^ ((2 * n - 1 : ℝ) / 2) < prododd ∧ prododd < ((2 * n + 1 : ℝ) / Real.exp 1) ^ ((2 * n + 1 : ℝ) / 2) := sorry","Show that for every positive integer $n$, $(\frac{2n-1}{e})^{\frac{2n-1}{2}}<1 \cdot 3 \cdot 5 \cdots (2n-1)<(\frac{2n+1}{e})^{\frac{2n+1}{2}}$.",,['analysis'],"Section putnam_1996_b2. Require Import Reals Coquelicot.Coquelicot. Open Scope R. Theorem putnam_1996_b2: let fix odd_fact (n : nat) : R := match n with | O => 1 | S n' => (2 * INR n - 1) * odd_fact n' end in forall (n: nat), gt n 0 -> pow ((2 * INR n - 1) / exp 1) ((2 * n - 1) / 2) < odd_fact n < pow ((2 * INR n + 1) / exp 1) ((2 * n + 1) / 2). Proof. Admitted. End putnam_1996_b2.","theory putnam_1996_b2 imports Complex_Main begin theorem putnam_1996_b2: fixes n :: nat and prododd :: real defines ""prododd \ \ i \ {1 .. 2 * n - 1}. if odd i then i else 1"" assumes npos: ""n > 0"" shows ""((2 * n - 1) / exp 1) powr ((2 * n - 1) / 2) < prododd \ prododd < ((2 * n + 1) / exp 1) powr ((2 * n + 1) / 2)"" sorry end", putnam_1996_b3,"abbrev putnam_1996_b3_solution : ℕ → ℕ := sorry -- (fun n : ℕ => (2 * n ^ 3 + 3 * n ^ 2 - 11 * n + 18) / 6) theorem putnam_1996_b3 (n : ℕ) (xset : (ℕ → ℤ) → Prop) (xsum : (ℕ → ℤ) → ℤ) (nge2 : n ≥ 2) (hxset : ∀ x : ℕ → ℤ, xset x = (x '' (Finset.range n) = Set.Icc (1 : ℤ) n)) (hxsum : ∀ x : ℕ → ℤ, xsum x = ∑ i : Fin n, x i * x ((i + 1) % n)) : (∃ x : ℕ → ℤ, xset x ∧ xsum x = putnam_1996_b3_solution n) ∧ (∀ x : ℕ → ℤ, xset x → xsum x ≤ putnam_1996_b3_solution n) := sorry","Given that $\{x_1,x_2,\ldots,x_n\}=\{1,2,\ldots,n\}$, find, with proof, the largest possible value, as a function of $n$ (with $n \geq 2$), of $x_1x_2+x_2x_3+\cdots+x_{n-1}x_n+x_nx_1$.",Show that the maximum is $(2n^3+3n^2-11n+18)/6$.,['algebra'],"Section putnam_1996_b3. Require Import Nat List Reals Coquelicot.Coquelicot. Open Scope R. Definition putnam_1996_b3_solution := 1. Theorem putnam_1996_b3: exists (m: nat), (forall (n: nat), ge n 2 -> sum_n (fun i => INR ((nth i (seq 1 (S n)) 0%nat) * (nth ((i + 1) mod n) (seq 1 (S n)) 0%nat))) n <= INR m) /\ (exists (n: nat), ge n 2 -> sum_n (fun i => INR ((nth i (seq 1 (S n)) 0%nat) * (nth ((i + 1) mod n) (seq 1 (S n))) 0%nat)) n = INR m). Proof. Admitted. End putnam_1996_b3.","theory putnam_1996_b3 imports Complex_Main begin definition putnam_1996_b3_solution :: ""nat \ nat"" where ""putnam_1996_b3_solution \ undefined"" (* \ n :: nat. (2 * n ^ 3 + 3 * n ^ 2 - 11 * n + 18) div 6 *) theorem putnam_1996_b3: fixes n :: nat and xset :: ""(nat \ nat) \ bool"" and xsum :: ""(nat \ nat) \ nat"" defines ""xset \ \ x :: nat \ nat. x ` {0 .. n - 1} = {1 .. n}"" and ""xsum \ \ x :: nat \ nat. \ i = 0 .. n - 1. x i * x ((i + 1) mod n)"" assumes nge2 : ""n \ 2"" shows ""(GREATEST S. \ x :: nat \ nat. xset x \ xsum x = S) = putnam_1996_b3_solution n"" sorry end", putnam_1996_b4,"abbrev putnam_1996_b4_solution : Prop := sorry -- False theorem putnam_1996_b4 (matsin : Matrix (Fin 2) (Fin 2) ℝ → Matrix (Fin 2) (Fin 2) ℝ) (mat1996 : Matrix (Fin 2) (Fin 2) ℝ) (hmatsin : ∀ A : Matrix (Fin 2) (Fin 2) ℝ, matsin A = ∑' n : ℕ, ((-(1 : ℝ)) ^ n / (2 * n + 1)!) • A ^ (2 * n + 1)) (hmat1996 : mat1996 0 0 = 1 ∧ mat1996 0 1 = 1996 ∧ mat1996 1 0 = 0 ∧ mat1996 1 1 = 1) : (∃ A : Matrix (Fin 2) (Fin 2) ℝ, matsin A = mat1996) ↔ putnam_1996_b4_solution := sorry","For any square matrix $A$, we can define $\sin A$ by the usual power series: $\sin A=\sum_{n=0}^\infty \frac{(-1)^n}{(2n+1)!}A^{2n+1}$. Prove or disprove: there exists a $2 \times 2$ matrix $A$ with real entries such that $\sin A=\begin{pmatrix} 1 & 1996 \\ 0 & 1 \end{pmatrix}$.",Show that there does not exist such a matrix $A$.,['linear_algebra'],"Section putnam_1996_b4. Require Import Factorial Reals Coquelicot.Coquelicot. Open Scope R. Definition putnam_1996_b4_solution := False. Theorem putnam_1996_b4: let fix Mmult_n {T : Ring} {n : nat} (A : matrix n n) (p : nat) := match p with | O => A | S p' => @Mmult T n n n A (Mmult_n A p') end in let scale_c (c: R) (A: matrix 2 2) := mk_matrix 2 2 (fun i j => c * coeff_mat 0 A i j) in let sinA_mat (n: nat) (A: matrix 2 2) := scale_c ((pow (-1) n) / INR (fact (2 * n + 1))) (Mmult_n A (Nat.add (Nat.mul 2 n) 1)) in exists (A: matrix 2 2), Series (fun n => coeff_mat 0 (sinA_mat n A) 0 0) = 1 /\ Series (fun n => coeff_mat 0 (sinA_mat n A) 0 1) = 1996 /\ Series (fun n => coeff_mat 0 (sinA_mat n A) 1 0) = 0 /\ Series (fun n => coeff_mat 0 (sinA_mat n A) 1 1) = 1 <-> putnam_1996_b4_solution. Proof. Admitted. End putnam_1996_b4.","theory putnam_1996_b4 imports Complex_Main ""HOL-Analysis.Finite_Cartesian_Product"" begin definition putnam_1996_b4_solution :: bool where ""putnam_1996_b4_solution \ undefined"" (* False *) theorem putnam_1996_b4: fixes matsin :: ""real^2^2 \ real^2^2"" and mat1996 :: ""real^2^2"" and matpow :: ""real^2^2 \ nat \ real^2^2"" defines ""matsin \ \ A :: real^2^2. \ n :: nat. ((-1) ^ n / fact (2 * n + 1)) *\<^sub>R (matpow A (2 * n + 1))"" and ""mat1996 \ \ i j. if i = 1 then (if j = 1 then 1 else 1996) else (if j = 1 then 0 else 1)"" assumes hmatpow: ""\ A :: real^2^2. matpow A 0 = mat 1 \ (\ k :: nat. matpow A (k + 1) = A * (matpow A k))"" shows ""(\ A :: real^2^2. matsin A = mat1996) \ putnam_1996_b4_solution"" sorry end", putnam_1996_b5,"abbrev putnam_1996_b5_solution : ℕ → ℕ := sorry -- (fun n : ℕ => if Even n then (3 * 2 ^ (n / 2) - 2) else (2 ^ ((n + 1) / 2) - 2)) theorem putnam_1996_b5 (n : ℕ) (STdelta : (Fin n → Fin 2) → Fin n → Fin n → ℤ) (Sbalanced : (Fin n → Fin 2) → Prop) (hSTdelta : ∀ S : Fin n → Fin 2, ∀ T1 T2 : Fin n, T1 ≤ T2 → (STdelta S T1 T2 = ∑ i : Set.Icc T1 T2, if S i = 1 then 1 else -1)) (hSbalanced : ∀ S : Fin n → Fin 2, Sbalanced S = ∀ T1 T2 : Fin n, T1 ≤ T2 → (-2 ≤ STdelta S T1 T2 ∧ STdelta S T1 T2 ≤ 2)) : {S : Fin n → Fin 2 | Sbalanced S}.encard = putnam_1996_b5_solution n := sorry","Given a finite string $S$ of symbols $X$ and $O$, we write $\Delta(S)$ for the number of $X$'s in $S$ minus the number of $O$'s. For example, $\Delta(XOOXOOX)=-1$. We call a string $S$ \emph{balanced} if every substring $T$ of (consecutive symbols of) $S$ has $-2 \leq \Delta(T) \leq 2$. Thus, $XOOXOOX$ is not balanced, since it contains the substring $OOXOO$. Find, with proof, the number of balanced strings of length $n$.","Show that the number of balanced strings of length $n$ is $3 \cdot 2^{n/2}-2$ if $n$ is even, and $2^{(n+1)/2}-2$ if $n$ is odd.",['algebra'],,"theory putnam_1996_b5 imports Complex_Main begin definition putnam_1996_b5_solution :: ""nat \ nat"" where ""putnam_1996_b5_solution \ undefined"" (* \ n :: nat. 2 ^ ((n + 2) div 2) + 2 ^ ((n + 1) div 2) - 2 *) theorem putnam_1996_b5: fixes n :: nat and STdelta :: ""(nat \ bool) \ nat \ nat \ int"" and Sbalanced :: ""(nat \ bool) \ bool"" defines ""STdelta \ \ S :: nat \ bool. \ T1 T2 :: nat. \ i = T1 .. T2. if S i then 1 else -1"" and ""Sbalanced \ \ (S :: nat \ bool). \ T1 \ {0 .. n - 1}. \ T2 \ {0 .. n - 1}. T1 \ T2 \ (-2 \ STdelta S T1 T2 \ STdelta S T1 T2 \ 2)"" shows ""card {S :: nat \ bool. Sbalanced S \ (\ i \ n. S i = False)} = putnam_1996_b5_solution n"" sorry end", putnam_2016_a1,"abbrev putnam_2016_a1_solution : ℕ := sorry -- 8 theorem putnam_2016_a1 : (∀ j : ℕ+, (∀ P : ℤ[X], ∀ k : ℤ, 2016 ∣ (derivative^[j] P).eval k) → j ≥ putnam_2016_a1_solution) ∧ (∀ P : ℤ[X], ∀ k : ℤ, 2016 ∣ (derivative^[putnam_2016_a1_solution] P).eval k) := sorry","Find the smallest positive integer $j$ such that for every polynomial $p(x)$ with integer coefficients and for every integer $k$, the integer \[ p^{(j)}(k) = \left. \frac{d^j}{dx^j} p(x) \right|_{x=k} \] (the $j$-th derivative of $p(x)$ at $k$) is divisible by 2016.",Show that the solution is $18$.,"['algebra', 'number_theory']",,"theory putnam_2016_a1 imports Complex_Main ""HOL-Computational_Algebra.Polynomial"" begin definition putnam_2016_a1_solution :: nat where ""putnam_2016_a1_solution \ undefined"" (* 8 *) theorem putnam_2016_a1: shows ""putnam_2016_a1_solution = (LEAST j :: nat. j > 0 \ (\ P :: int poly. \ k :: int. 2016 dvd poly ((pderiv ^^ j) P) k))"" sorry end", putnam_2016_a2,"abbrev putnam_2016_a2_solution : ℝ := sorry -- (3 + sqrt 5) / 2 theorem putnam_2016_a2 (p : ℕ → ℕ → Prop := fun n ↦ fun m ↦ Nat.choose m (n - 1) > Nat.choose (m - 1) n) (M : ℕ → ℕ) (hpM : ∀ n : ℕ, p n (M n)) (hMub : ∀ n : ℕ, ∀ m : ℕ, p n m → m ≤ M n) : (Tendsto (fun n ↦ ((M n : ℝ) / (n : ℝ))) ⊤ (𝓝 putnam_2016_a2_solution)) := sorry","Given a positive integer $n$, let $M(n)$ be the largest integer $m$ such that \[ inom{m}{n-1} > \binom{m-1}{n}. \] Evaluate \[ \lim_{n o \infty} \frac{M(n)}{n}. \]",Show that the answer is $\frac{3 + \sqrt{5}}{2}$.,['analysis'],"Section putnam_2016_a2. Require Import Reals Coquelicot.Coquelicot. Definition putnam_2016_a2_solution := (3 + sqrt 5) / 2. Theorem putnam_2016_a2 (p : nat -> nat -> Prop := fun n m => Binomial.C m (n - 1) > Binomial.C (m - 1) n) (M : nat -> nat) (pM : forall n : nat, p n (M n)) (hMub : forall n m : nat, p n m -> le m (M n)) : Lim_seq (fun n => (INR (M n) / INR n)) = putnam_2016_a2_solution. Proof. Admitted. End putnam_2016_a2.","theory putnam_2016_a2 imports Complex_Main begin definition putnam_2016_a2_solution :: real where ""putnam_2016_a2_solution \ undefined"" (* (3 + sqrt 5) / 2 *) theorem putnam_2016_a2: fixes M :: ""nat \ nat"" defines ""M \ \ n. GREATEST m. m choose (n - 1) > (m - 1) choose n"" shows ""(\ n. M n / n) \ putnam_2016_a2_solution"" sorry end", putnam_2016_a3,"abbrev putnam_2016_a3_solution : ℝ := sorry -- 3 * Real.pi / 8 theorem putnam_2016_a3 (f : ℝ → ℝ) (hf : ∀ x : ℝ, x ≠ 0 → f x + f (1 - 1 / x) = arctan x) : (∫ x in (0)..1, f x = putnam_2016_a3_solution) := sorry","Suppose that $f$ is a function from $\mathbb{R}$ to $\mathbb{R}$ such that \[ f(x) + f\left( 1 - \frac{1}{x} \right) = \arctan x \] for all real $x \neq 0$. (As usual, $y = \arctan x$ means $-\pi/2 < y < \pi/2$ and $\tan y = x$.) Find \[ \int_0^1 f(x)\,dx. \]",Prove that the answer is $\frac{3\pi}{8}$.,['analysis'],"Section putnam_2017_b6. Require Import Ensembles Finite_sets Factorial List. From mathcomp Require Import div. Definition putnam_2017_b6_solution := Nat.div (fact 2016) (fact 1953) - fact 63 * 2016. Theorem putnam_2017_b6: exists (A: Ensemble (list nat)), forall (l: list nat), (A l <-> (length l = 64 /\ NoDup l /\ forall (n: nat), In n l -> 1 <= n <= 2017) -> let Hweighted_sum := fix weighted_sum (l: list nat) (i: nat) : nat := match l with | nil => 0 | x :: xs => (if Nat.ltb i 2 then x else i * x) + weighted_sum xs (i + 1) end in Hweighted_sum l 0 %| 2017 = true) <-> cardinal (list nat) A putnam_2017_b6_solution. Proof. Admitted. Section putnam_2016_a3. Require Import Reals Coquelicot.RInt Coquelicot.Hierarchy. Definition putnam_2016_a3_solution := 3 * PI / 8. Theorem putnam_2016_a3: forall (f: R -> R), let g (x: R) := (f x) + f (1 - 1/x) in forall(x: R), x <> 0 -> g x = atan x -> RInt f 0 1 = putnam_2016_a3_solution. Proof. Admitted. End putnam_2016_a3.","theory putnam_2016_a3 imports Complex_Main ""HOL-Analysis.Set_Integral"" ""HOL-Analysis.Lebesgue_Measure"" begin definition putnam_2016_a3_solution::real where ""putnam_2016_a3_solution \ undefined"" (* 3 * pi / 8 *) theorem putnam_2016_a3: fixes f::""real\real"" assumes hf : ""\x. x \ 0 \ f x + f (1 - 1 / x) = arctan x"" shows ""set_lebesgue_integral lebesgue {0..1} f = putnam_2016_a3_solution"" sorry end ", putnam_2016_a5,"theorem putnam_2016_a5 (G : Type*) [Group G] (Gfin : Fintype G) (g h : G) (ghgen : Group.closure {g, h} = G ∧ ¬Group.closure {g} = G ∧ ¬Group.closure {h} = G) (godd : Odd (orderOf g)) (S : Set G := {g * h, g⁻¹ * h, g * h⁻¹, g⁻¹ * h⁻¹}) : (∀ x : G, ∃ mn : List G, 1 ≤ mn.length ∧ mn.length ≤ Gfin.card ∧ ∀ i : Fin mn.length, mn.get i ∈ S ∧ x = List.prod mn) := sorry","Suppose that $G$ is a finite group generated by the two elements $g$ and $h$, where the order of $g$ is odd. Show that every element of $G$ can be written in the form \[ g^{m_1} h^{n_1} g^{m_2} h^{n_2} \cdots g^{m_r} h^{n_r} \] with $1 \leq r \leq |G|$ and $m_1, n_1, m_2, n_2, \ldots, m_r, n_r \in \{-1, 1\}$. (Here $|G|$ is the number of elements of $G$.)",,['abstract_algebra'],"Section putnam_2016_a5. Theorem putnam_2016_a5: True. Proof. Admitted. End putnam_2016_a5.","theory putnam_2016_a5 imports Complex_Main ""HOL-Algebra.Multiplicative_Group"" begin theorem putnam_2016_a5: fixes G (structure) and g h::""'a"" and S::""'a set"" defines ""S \ {g \ h, inv g \ h, g \ inv h, inv g \ inv h}"" assumes hG : ""Group.group G \ finite (carrier G)"" and ghgen : ""generate G {h, g} = carrier G \ generate G {h} \ carrier G \ generate G {g} \ carrier G"" and godd : ""odd ( (group.ord G) g)"" shows ""\x \ carrier G. \ mn::'a list. \i\{0.. 1 \ size mn \ card (carrier G) \ mn!i \ S \ x = foldr (\\<^bsub>G\<^esub>) mn \"" sorry end ", putnam_2016_a6,"abbrev putnam_2016_a6_solution : ℝ := sorry -- 5 / 6 theorem putnam_2016_a6 (C : ℝ) (max : Polynomial ℝ → ℝ) (hmax : ∀ P : Polynomial ℝ, ∃ x ∈ Icc 0 1, |P.eval x| = max P) (hmaxub : ∀ P : Polynomial ℝ, ∀ x ∈ Icc 0 1, |P.eval x| ≤ max P) (p : ℝ → Prop := fun c ↦ ∀ P : Polynomial ℝ, P.degree = 3 → (∃ x ∈ Icc 0 1, P.eval x = 0) → ∫ x in (0)..1, |P.eval x| ≤ c * max P) (hpC : p C) (hClb : ∀ c : ℝ, p c → C ≤ c) : (C = putnam_2016_a6_solution) := sorry","Find the smallest constant $C$ such that for every real polynomial $P(x)$ of degree $3$ that has a root in the interval $[0,1]$, \[ \int_0^1 \left| P(x) \right|\,dx \leq C \max_{x \in [0,1]} \left| P(x) \right|. \]",Prove that the smallest such value of $C$ is $\frac{5}{6}$.,['algebra'],"Section putnam_2016_a6. Require Import Reals Coquelicot.Coquelicot. Definition putnam_2016_a6_solution := 5 / 6. Theorem putnam_2016_a6 (C : R) (max : (R -> R) -> R) (hmax : forall (P : R -> R) (coeff: nat -> R) (n: nat), (coeff n <> 0 /\ P = (fun x => sum_n (fun i => coeff i * x ^ i) (n + 1))) -> exists (x: R), 0 <= x <= 1 /\ Rabs (P x) = max P) (hmaxub : forall (P : R -> R) (coeff: nat -> R) (n: nat), (coeff n <> 0 /\ P = (fun x => sum_n (fun i => coeff i * x ^ i) (n + 1))) -> forall (x: R), 0 <= x <= 1 /\ Rabs (P x) <= max P) (p : R -> Prop := fun c => forall (P : R -> R) (coeff: nat -> R), (coeff 3%nat <> R0 /\ P = (fun x => sum_n (fun i => coeff i * x ^ i) 4)) -> (exists (x: R), 0 <= x <= 1 /\ P x = 0) -> RInt P 0 1 <= c * max P) (hpC : p C) (hClb : forall c : R, p c -> C <= c) : (C = putnam_2016_a6_solution). Proof. Admitted. End putnam_2016_a6.","theory putnam_2016_a6 imports Complex_Main ""HOL-Computational_Algebra.Polynomial"" ""HOL-Analysis.Set_Integral"" ""HOL-Analysis.Lebesgue_Measure"" begin definition putnam_2016_a6_solution :: real where ""putnam_2016_a6_solution \ undefined"" (* 5 / 6 *) theorem putnam_2016_a6: shows ""(LEAST C :: real. \ P :: real poly. (degree P = 3) \ (\ x \ {0..1}. poly P x = 0) \ set_lebesgue_integral lebesgue {0..1} (\ x. \poly P x\) \ C * (GREATEST y. \ x \ {0..1}. \poly P x\ = y)) = putnam_2016_a6_solution"" sorry end", putnam_2016_b1,"abbrev putnam_2016_b1_solution : ℝ := sorry -- exp 1 - 1 theorem putnam_2016_b1 (x : ℕ → ℝ) (hx0 : x 0 = 1) (hxn : ∀ n : ℕ, x (n + 1) = log (exp (x n) - (x n))) : (∑' n : ℕ, x n = putnam_2016_b1_solution) := sorry","Let $x_0,x_1,x_2,\dots$ be the sequence such that $x_0=1$ and for $n \geq 0$, \[ x_{n+1} = \ln(e^{x_n} - x_n) \] (as usual, the function $\ln$ is the natural logarithm). Show that the infinite series \[ x_0 + x_1 + x_2 + \cdots \] converges and find its sum.",The sum converges to $e - 1$.,['analysis'],"Section putnam_2016_b1. Require Import Reals Coquelicot.Coquelicot. Definition putnam_2016_b1_solution := 1. Theorem putnam_2016_b1 (x : nat -> R := fix x (n: nat) := match n with | O => 1 | S n' => ln (exp (x n') - x n') end) : Series x = putnam_2016_b1_solution. Proof. Admitted. End putnam_2016_b1.","theory putnam_2016_b1 imports Complex_Main begin definition putnam_2016_b1_solution :: real where ""putnam_2016_b1_solution \ undefined"" (* exp 1 - 1 *) theorem putnam_2016_b1: fixes x :: ""nat \ real"" assumes hx0: ""x 0 = 1"" and hxn: ""\ n :: nat. x (n + 1) = ln (exp (x n) - x n)"" shows ""(\ n :: nat. x n) = putnam_2016_b1_solution"" sorry end", putnam_2016_b2,"abbrev putnam_2016_b2_solution : ℝ × ℝ := sorry -- (3 / 4, 4 / 3) theorem putnam_2016_b2 (squarish : ℤ → Prop := fun n ↦ IsSquare n ∨ ∃ w : ℤ, IsSquare |n - w ^ 2| ∧ ∀ v : ℕ, |n - w ^ 2| ≤ |n - v ^ 2|) (S : ℤ → ℕ := fun n ↦ {i ∈ Finset.Icc 1 n | squarish i}.ncard) (p : ℝ → ℝ → Prop := fun α ↦ fun β ↦ α > 0 ∧ β > 0 ∧ Tendsto (fun N ↦ S N / (N : ℝ) ^ α) ⊤ (𝓝 β)) : ((∀ α β : ℝ, ((α, β) = putnam_2016_b2_solution ↔ p α β)) ∨ ¬∃ α β : ℝ, p α β) := sorry","Define a positive integer $n$ to be \emph{squarish} if either $n$ is itself a perfect square or the distance from $n$ to the nearest perfect square is a perfect square. For example, $2016$ is squarish, because the nearest perfect square to $2016$ is $45^2 = 2025$ and $2025 - 2016 = 9$ is a perfect square. (Of the positive integers between $1$ and $10$, only $6$ and $7$ are not squarish.) For a positive integer $N$, let $S(N)$ be the number of squarish integers between $1$ and $N$, inclusive. Find positive constants $\alpha$ and $\beta$ such that \[ \lim_{N \to \infty} \frac{S(N)}{N^\alpha} = \beta, \] or show that no such constants exist.",Prove that the limit exists for $\alpha = \frac{3}{4}$ and equals $\beta = \frac{4}{3}$.,['analysis'],"Section putnam_2016_b2. Require Import Bool Reals Coquelicot.Lim_seq Coquelicot.Rbar. Theorem putnam_2016_b2: let squarish (n: nat) := existsb ( fun m => Nat.eqb n (m * m) || (forallb (fun p => leb ((n-m)*(n-m)) ((n-p)*(n-p))) (seq 0 (S n))) ) (seq 0 (S n)) in let squarish_set (n : nat) : list nat := filter (fun x => squarish x) (seq 1 n) in exists (a b: nat), Lim_seq (fun N => INR (length (squarish_set N)) / INR (N^a)) = Finite (INR b). Proof. Admitted. End putnam_2016_b2.","theory putnam_2016_b2 imports Complex_Main begin definition is_square::""int\bool"" where ""is_square n \ \x::nat. n = x * x"" definition squarish::""int\bool"" where ""squarish n \ is_square n \ (\w::int. is_square (abs (n - w * w)) \ (\v::nat. abs (n - w * w) \ abs (n - v * v)))"" definition putnam_2016_b2_solution::""(real \ real)"" where ""putnam_2016_b2_solution \ undefined"" (* (3/4, 4/3) *) theorem putnam_2016_b2: fixes S::""nat\nat"" and p::""real\real\bool"" defines ""S \ \n::nat. card {i \ {1..n}. squarish i}"" and ""p \ \a::real. \b::real. a > 0 \ b > 0 \ ((\n. S n / (n powr a)) \ b)"" shows ""(\a b::real. (a, b) = putnam_2016_b2_solution \ p a b) \ (\a b::real. \ (p a b))"" sorry end ", putnam_2016_b5,"abbrev putnam_2016_b5_solution : Set (Set.Ioi (1 : ℝ) → Set.Ioi (1 : ℝ)) := sorry -- {f : Set.Ioi (1 : ℝ) → Set.Ioi (1 : ℝ) | ∃ c : ℝ, c > 0 ∧ ∀ x : Set.Ioi (1 : ℝ), (f x : ℝ) = x ^ c} theorem putnam_2016_b5 (f : Set.Ioi (1 : ℝ) → Set.Ioi (1 : ℝ)) (fle : Prop) (hfle : fle = ∀ x y : Set.Ioi (1 : ℝ), ((x : ℝ) ^ 2 ≤ y ∧ y ≤ (x : ℝ) ^ 3) → ((f x : ℝ) ^ 2 ≤ f y ∧ f y ≤ (f x : ℝ) ^ 3)) : fle ↔ f ∈ putnam_2016_b5_solution := sorry","Find all functions $f$ from the interval $(1,\infty)$ to $(1,\infty)$ with the following property: if $x,y \in (1,\infty)$ and $x^2 \leq y \leq x^3$, then $(f(x))^2 \leq f(y) \leq (f(x))^3$.",Show that the only such functions are the functions $f(x)=x^c$ for some $c>0$.,['algebra'],"Section putnam_2016_b5. Require Import Reals Rpower. Local Open Scope R. Definition putnam_2016_b5_solution (f: R -> R) : Prop := exists (c: R), c > 0 /\ forall (x: R), x > 1 -> f x = Rpower x c . Theorem putnam_2016_b5: forall (f: R -> R), forall (x y: R), (x > 1 /\ y > 1 /\ f x > 1 /\ f y > 1) /\ (x*x <= y <= x*x*x) -> (f x)*(f x) <= f y <= (f x)*(f x)*(f x) <-> putnam_2016_b5_solution f. Proof. Admitted. End putnam_2016_b5.","theory putnam_2016_b5 imports Complex_Main begin (* uses ((real \ real) set) instead of (({1<..} \ {1<..}) set) *) definition putnam_2016_b5_solution :: ""(real \ real) set"" where ""putnam_2016_b5_solution \ undefined"" (* {f::real\real. (\c::real. c > 0 \ (\x::real>1. f x = x powr c))} *) theorem putnam_2016_b5: fixes f :: ""real \ real"" and fle :: bool assumes hfle: ""fle = (\x::real>1. \y::real>1. (x^2 \ y \ y \ x^3) \ ((f x)^2 \ f y \ f y \ (f x)^3))"" shows ""fle \ f \ putnam_2016_b5_solution"" sorry end ", putnam_2016_b6,"abbrev putnam_2016_b6_solution : ℝ := sorry -- 1 theorem putnam_2016_b6 : ∑' k : ℕ, ((-1 : ℝ) ^ ((k + 1 : ℤ) - 1) / (k + 1 : ℝ)) * ∑' n : ℕ, (1 : ℝ) / ((k + 1) * (2 ^ n) + 1) = putnam_2016_b6_solution := sorry",Evaluate $\sum_{k=1}^\infty \frac{(-1)^{k-1}}{k} \sum_{n=0}^\infty \frac{1}{k2^n+1}$.,Show that the desired sum equals $1$.,['analysis'],"Section putnam_2016_b6. Require Import List Reals Coquelicot.Hierarchy Coquelicot.Series. Definition putnam_2016_b6_solution := 1. Theorem putnam_2016_b6: Series (fun k => (-1)^k/(INR k+1) * Series (fun n => 1/(INR k*(2^n)+1))) = putnam_2016_b6_solution. Proof. Admitted. End putnam_2016_b6.","theory putnam_2016_b6 imports Complex_Main ""HOL-Analysis.Infinite_Sum"" begin definition putnam_2016_b6_solution :: real where ""putnam_2016_b6_solution \ undefined"" (* 1 *) theorem putnam_2016_b6: shows ""(\\<^sub>\k::nat\{1..}. ((-1)^(k-1) / k) * (\n::nat. 1 / (k*2^n + 1))) = putnam_2016_b6_solution"" sorry end ", putnam_1982_a2,"abbrev putnam_1982_a2_solution : Prop := sorry -- True theorem putnam_1982_a2 (B : ℕ → ℝ → ℝ := fun n x ↦ ∑ k in Finset.Icc 1 n, k ^ x) (f : ℕ → ℝ := fun n ↦ B n (logb n 2) / (n * logb 2 n) ^ 2) : (∃ L : ℝ, Tendsto (fun N ↦ ∑ j in Finset.Icc 2 N, f j) ⊤ (𝓝 L)) ↔ putnam_1982_a2_solution := sorry","For positive real $x$, let $B_n(x)=1^x+2^x+3^x+\dots+n^x$. Prove or disprove the convergence of $\sum_{n=2}^\infty \frac{B_n(\log_n2)}{(n\log_2n)^2}$.",Show that the given series converges.,['analysis'],"Section putnam_1982_a2. Require Import Reals Coquelicot.Coquelicot. Open Scope R. Definition putnam_1982_a2_solution := True. Theorem putnam_1982_a2: let B (n: nat) (x: R) := sum_n (fun n => Rpower (INR n) x) n in let f (n: nat) := B n (ln 2 / ln (INR n)) / (INR n) * Rpower (ln 2 / ln (INR n)) 2 in ex_series (fun n => if (lt_dec n 2) then 0 else f n) <-> putnam_1982_a2_solution. Proof. Admitted. End putnam_1982_a2.","theory putnam_1982_a2 imports Complex_Main begin definition putnam_1982_a2_solution :: ""bool"" where ""putnam_1982_a2_solution \ undefined"" (* True *) theorem putnam_1982_a2: fixes B :: ""nat \ real \ real"" and f :: ""nat \ real"" defines ""B \ \ (n :: nat) (x :: real). (\ k \ {1 :: nat..n}. (real k) powr x)"" and ""f \ \ n :: nat. (B n (log n 2)) / ((n * (log 2 n)) ^ 2)"" shows ""putnam_1982_a2_solution \ (\ L :: real. filterlim (\ N :: nat. (\ j \ {2..N}. f j)) (nhds L) at_top)"" sorry end", putnam_1982_a3,"abbrev putnam_1982_a3_solution : ℝ := sorry -- (Real.pi / 2) * log Real.pi theorem putnam_1982_a3 : (Tendsto (fun t ↦ ∫ x in (0)..t, (arctan (Real.pi * x) - arctan x) / x) ⊤ (𝓝 putnam_1982_a3_solution)) := sorry","Evaluate $\int_0^{\infty} \frac{\tan^{-1}(\pi x) - \tan^{-1} x}{x} \, dx$.",Show that the integral evaluates to $\frac{\pi}{2} \ln \pi$.,['analysis'],"Section putnam_1982_a3. Require Import Reals Coquelicot.Coquelicot. Open Scope R. Definition putnam_1982_a3_solution := PI / 2 * ln PI. Theorem putnam_1982_a3: let f (x: R) := (atan (PI * x) - atan x) / x in Lim_seq (fun n => RInt f 0 (INR n)) = putnam_1982_a3_solution. Proof. Admitted. End putnam_1982_a3.","theory putnam_1982_a3 imports Complex_Main ""HOL-Analysis.Interval_Integral"" begin definition putnam_1982_a3_solution :: ""real"" where ""putnam_1982_a3_solution \ undefined"" (* (pi / 2) * ln pi *) theorem putnam_1982_a3: shows ""filterlim (\ t :: real. (interval_lebesgue_integral lebesgue 0 t (\ x. (arctan (pi * x) - arctan x)/x))) (nhds putnam_1982_a3_solution) at_top"" sorry end", putnam_1982_a5,"theorem putnam_1982_a5 (a b c d : ℤ) (hpos : a > 0 ∧ b > 0 ∧ c > 0 ∧ d > 0) (hac : a + c ≤ 1982) (hfrac : (a : ℝ) / b + (c : ℝ) / d < 1) : (1 - (a : ℝ) / b - (c : ℝ) / d > 1 / 1983 ^ 3) := sorry","Let $a, b, c, d$ be positive integers satisfying $a + c \leq 1982$ and $\frac{a}{b} + \frac{c}{d} < 1$. Prove that $1 - \frac{a}{b} - \frac{c}{d} > \frac{1}{1983^3}$.",,['algebra'],"Section putnam_1982_a5. Require Import Reals. Open Scope R. Theorem putnam_1982_a5: forall (a b c d: nat), Nat.le (Nat.add a c) 1982 /\ INR a / INR b + INR c / INR d < 1 -> 1 - INR a / INR b - INR c / INR d > 1/pow 1983 3. Proof. Admitted. End putnam_1982_a5.","theory putnam_1982_a5 imports Complex_Main begin theorem putnam_1982_a5: fixes a b c d :: ""nat"" assumes hpos : ""a > 0 \ b > 0 \ c > 0 \ d > 0"" and hac : ""a + c \ 1982"" and hfrac : ""(real a) / b + (real c) / d < 1"" shows ""(1 - (real a)/b - (real c)/d) > 1 / 1983^3"" sorry end", putnam_1982_a6,"abbrev putnam_1982_a6_solution : Prop := sorry -- False theorem putnam_1982_a6 (S : Set ℕ := Ici 1) (hb : (ℕ → ℕ) → Prop := fun b : ℕ → ℕ => BijOn b S S) (hx : (ℕ → ℝ) → Prop := fun x : ℕ → ℝ => StrictAntiOn (fun n : ℕ => |x n|) S) (limb : (ℕ → ℕ) × (ℕ → ℝ) → Prop := fun (b, x) => Tendsto (fun n : ℕ => |b n - (n : ℤ)| * |x n|) atTop (𝓝 0)) (limx : (ℕ → ℝ) → Prop := fun x : ℕ → ℝ => Tendsto (fun n : ℕ => ∑ k in Finset.Icc 1 n, x k) atTop (𝓝 1)) : (∀ b : ℕ → ℕ, ∀ x : ℕ → ℝ, hb b ∧ hx x ∧ limb (b, x) ∧ limx x → Tendsto (fun n : ℕ => ∑ k in Finset.Icc 1 n, x (b k)) atTop (𝓝 1)) ↔ putnam_1982_a6_solution := sorry","Let $b$ be a bijection from the positive integers to the positive integers. Also, let $x_1, x_2, x_3, \dots$ be an infinite sequence of real numbers with the following properties: \begin{enumerate} \item $|x_n|$ is a strictly decreasing function of $n$; \item $\lim_{n \rightarrow \infty} |b(n) - n| \cdot |x_n| = 0$; \item $\lim_{n \rightarrow \infty}\sum_{k = 1}^{n} x_k = 1$. \end{enumerate} Prove or disprove: these conditions imply that $$\lim_{n \rightarrow \infty} \sum_{k = 1}^{n} x_{b(k)} = 1.$$",The limit need not equal $1$.,['analysis'],"Section putnam_1982_a6. Require Import Nat Reals Coquelicot.Coquelicot. Open Scope R. Definition putnam_1982_a6_solution := False. Theorem putnam_1982_a6: forall (a: nat -> R), (Series a = 1 /\ forall (i j: nat), le i j -> Rabs (a i) > Rabs (a j)) /\ forall (f: nat -> nat), Lim_seq (fun i => Rabs (INR (f i - i)) * Rabs (a i)) = 0 -> Series (fun i => a (f i)) = 1 -> putnam_1982_a6_solution. Proof. Admitted. End putnam_1982_a6.","theory putnam_1982_a6 imports Complex_Main begin definition putnam_1982_a6_solution::bool where ""putnam_1982_a6_solution \ undefined"" (* False *) theorem putnam_1982_a6: fixes hb::""(nat\nat) \ bool"" and hx limx::""(nat\real) \ bool"" and limb::""(nat\nat) \ (nat\real) \ bool"" defines ""hb \ \b. bij_betw b {1..} {1..}"" and ""hx \ \x. strict_antimono_on {1..} (\n. abs(x n))"" and ""limb \ \b::nat\nat. \x::nat\real. (\n. (abs (b n - n)) * (abs (x n))) \ 0"" and ""limx \ \x. (\n. (\k=1..n. x k)) \ 1"" shows ""(\b::nat\nat. \x::nat\real. hb b \ hx x \ limb b x \ limx x \ ((\n. (\k=1..n. x (b k))) \ 1)) \ putnam_1982_a6_solution"" sorry end", putnam_1982_b2,"abbrev putnam_1982_b2_solution : Polynomial ℝ := sorry -- C Real.pi * (2*X - 1)^2 theorem putnam_1982_b2 (A : ℝ × ℝ → ℕ := fun (x, y) => {(m, n) : ℤ × ℤ | m^2 + n^2 ≤ x^2 + y^2}.ncard) (g : ℝ := ∑' k : ℕ, Real.exp (-k^2)) (I : ℝ := ∫ y : ℝ, ∫ x : ℝ, A (x, y) * Real.exp (-x^2 - y^2)) : I = putnam_1982_b2_solution.eval g := sorry","Let $A(x, y)$ denote the number of points $(m, n)$ with integer coordinates $m$ and $n$ where $m^2 + n^2 \le x^2 + y^2$. Also, let $g = \sum_{k = 0}^{\infty} e^{-k^2}$. Express the value $$\int_{-\infty}^{\infty}\int_{-\infty}^{\infty} A(x, y)e^{-x^2 - y^2} dx dy$$ as a polynomial in $g$.",The desired polynomial is $\pi(2g - 1)^2$.,['analysis'],,"theory putnam_1982_b2 imports Complex_Main ""HOL-Computational_Algebra.Polynomial"" ""HOL-Analysis.Interval_Integral"" begin definition putnam_1982_b2_solution::""real poly"" where ""putnam_1982_b2_solution \ undefined"" (* [: pi :] * [: -1, 2 :] ^2 *) theorem putnam_1982_b2: fixes A::""real\real\nat"" and g I::real defines ""A \ \x::real. \y::real. card {(m::int, n::int). m^2 + n^2 \ x^2 + y^2}"" and ""g \ \n::nat. exp (- (n^2))"" and ""I \ interval_lebesgue_integral lebesgue MInfty PInfty (\x. interval_lebesgue_integral lebesgue MInfty PInfty (\y. A x y * exp (- (x^2) - y^2)))"" shows ""I = poly putnam_1982_b2_solution g"" sorry end", putnam_1982_b3,"abbrev putnam_1982_b3_solution : ℝ := sorry -- 4/3 * (Real.sqrt 2 - 1) theorem putnam_1982_b3 (p : ℕ → ℝ := fun n : ℕ => {(c, d) : Finset.Icc 1 n × Finset.Icc 1 n | ∃ m : ℕ, m^2 = c + d}.ncard / n^2) : Tendsto (fun n : ℕ => p n * Real.sqrt n) atTop (𝓝 putnam_1982_b3_solution) := sorry","Let $p_n$ denote the probability that $c + d$ will be a perfect square if $c$ and $d$ are selected independently and uniformly at random from $\{1, 2, 3, \dots, n\}$. Express $\lim_{n \rightarrow \infty} p_n \sqrt{n}$ in the form $r(\sqrt{s} - t)$ for integers $s$ and $t$ and rational $r$.",The limit equals $\frac{4}{3}(\sqrt{2} - 1)$.,"['analysis', 'number_theory', 'probability']",,"theory putnam_1982_b3 imports Complex_Main begin definition putnam_1982_b3_solution::real where ""putnam_1982_b3_solution \ undefined"" (* 4/3 * (sqrt 2 - 1) *) theorem putnam_1982_b3: fixes p::""nat\real"" defines ""p \ \n. card {(c::nat, d::nat). c \ {1..n} \ d \ {1..n} \ (\m::nat. m^2 = c + d) } / n^2"" shows ""(\n. p n * sqrt n) \ putnam_1982_b3_solution"" sorry end", putnam_1982_b4,"abbrev putnam_1982_b4_solution : Prop × Prop := sorry -- (True, True) theorem putnam_1982_b4 (hn : Finset ℤ → Prop := fun n : Finset ℤ => ∀ k : ℤ, ∏ i in n, i ∣ ∏ i in n, (i + k)) : ((∀ n : Finset ℤ, hn n → (∃ i ∈ n, |i| = 1)) ↔ putnam_1982_b4_solution.1) ∧ ((∀ n : Finset ℤ, (hn n ∧ ∀ i ∈ n, i > 0) → n = Finset.Icc (1 : ℤ) (n.card)) ↔ putnam_1982_b4_solution.2) := sorry","Let $n_1, n_2, \dots, n_s$ be distinct integers such that, for every integer $k$, $n_1n_2\cdots n_s$ divides $(n_1 + k)(n_2 + k) \cdots (n_s + k)$. Prove or provide a counterexample to the following claims: \begin{enumerate} \item For some $i$, $|n_i| = 1$. \item If all $n_i$ are positive, then $\{n_1, n_2, \dots, n_s\} = \{1, 2, \dots, s\}$. \end{enumerate}",Both claims are true.,['number_theory'],,"theory putnam_1982_b4 imports Complex_Main begin definition putnam_1982_b4_solution::""bool \ bool"" where ""putnam_1982_b4_solution \ undefined"" (* True, True *) theorem putnam_1982_b4: fixes hn::""(int set) \ bool"" defines ""hn \ \n. (\k::int. (\i \ n. i) dvd (\i \ n. (i + k)))"" shows ""((\n::(int set). hn n \ (\i \ n. abs(i) = 1)) \ fst putnam_1982_b4_solution) \ ((\n::(int set). (hn n \ (\i \ n. i > 0)) \ n = {1..card n})) \ snd putnam_1982_b4_solution"" sorry end", putnam_1982_b5,"theorem putnam_1982_b5 (T : Set ℝ := Ioi (Real.exp (Real.exp 1))) (S : ℝ → ℕ → ℝ) (hS : ∀ x ∈ T, S x 0 = (Real.exp 1) ∧ ∀ n : ℕ, S x (n + 1) = Real.logb (S x n) x) (g : ℝ → ℝ) : ∀ x ∈ T, (∃ L : ℝ, Tendsto (S x) atTop (𝓝 L)) ∧ (∀ x ∈ T, Tendsto (S x) atTop (𝓝 (g x))) → ContinuousOn g T := sorry","For all $x > e^e$, let $S = u_0, u_1, \dots$ be a recursively defined sequence with $u_0 = e$ and $u_{n+1} = \log_{u_n} x$ for all $n \ge 0$. Prove that $S_x$ converges to some real number $g(x)$ and that this function $g$ is continuous for $x > e^e$.",,['analysis'],"Section putnam_1982_b5. Require Import Reals Coquelicot.Coquelicot. Open Scope R. Theorem putnam_1982_b5: let F := fix f (n: nat) (x: R) := match n with | O => exp 1 | S n' => ln x / ln (f n' x) end in forall (x: R), x > Rpower (exp 1) (exp 1) -> ex_lim_seq (fun n => F n x) /\ let g (x: R) := Lim_seq (fun n => F n x) in continuity_pt g x. Proof. Admitted. End putnam_1982_b5.","theory putnam_1982_b5 imports Complex_Main begin theorem putnam_1982_b5: fixes T::""real set"" and S::""real\nat\real"" and g::""real \ real"" defines ""T \ {(exp (exp 1))<..}"" assumes hS : ""\x \ T. S x 0 = exp 1 \ (\n::nat. S x (n+1) = log (S x n) x)"" shows ""\x \ T. (\L::real. (S x \ L)) \ (\x \ T. (S x \ g x)) \ continuous_on T g"" sorry end", putnam_1983_a1,"abbrev putnam_1983_a1_solution : ℕ := sorry -- 2301 theorem putnam_1983_a1 : {n : ℤ | n > 0 ∧ (n ∣ 10 ^ 40 ∨ n ∣ 20 ^ 30)}.encard = putnam_1983_a1_solution := sorry","How many positive integers $n$ are there such that $n$ is an exact divisor of at least one of the numbers $10^{40},20^{30}$?",Show that the desired count is $2301$.,['number_theory'],"Section putnam_1983_a1. Require Import Nat Ensembles Finite_sets. From mathcomp Require Import div. Definition putnam_1983_a1_solution := 2301. Theorem putnam_1983_a1: exists (E: Ensemble nat), forall (n: nat), (E n <-> n %| 10^(40) = true \/ n %| 20^(30) = true) -> cardinal nat E putnam_1983_a1_solution. Proof. Admitted. End putnam_1983_a1.","theory putnam_1983_a1 imports Complex_Main begin definition putnam_1983_a1_solution :: ""nat"" where ""putnam_1983_a1_solution \ undefined"" (* 2301 *) theorem putnam_1983_a1: shows ""card {n :: nat. n > 0 \ (n dvd 10^40 \ n dvd 20^30)} = putnam_1983_a1_solution"" sorry end", putnam_1983_a3,"theorem putnam_1983_a3 (p : ℕ) (F : ℕ → ℕ) (poddprime : Odd p ∧ p.Prime) (hF : ∀ n : ℕ, F n = ∑ i in Finset.range (p - 1), (i + 1) * n ^ i) : ∀ a ∈ Finset.Icc 1 p, ∀ b ∈ Finset.Icc 1 p, a ≠ b → ¬(F a ≡ F b [MOD p]) := sorry","Let $p$ be in the set $\{3,5,7,11,\dots\}$ of odd primes and let $F(n)=1+2n+3n^2+\dots+(p-1)n^{p-2}$. Prove that if $a$ and $b$ are distinct integers in $\{0,1,2,\dots,p-1\}$ then $F(a)$ and $F(b)$ are not congruent modulo $p$, that is, $F(a)-F(b)$ is not exactly divisible by $p$.",,"['number_theory', 'algebra']","Section putnam_1983_a3. Require Import Nat Reals ZArith Znumtheory Coquelicot.Coquelicot. Open Scope R. Theorem putnam_1983_a3: let f (n p: nat) : R := sum_n (fun i => INR ((i+1) * n^i)) (p-1) in forall (p m n: nat), odd p = true /\ prime (Z.of_nat p) /\ (floor (f m p)) mod Z.of_nat p = (floor (f n p)) mod Z.of_nat p -> Z.of_nat m mod Z.of_nat p = Z.of_nat n mod Z.of_nat p. Proof. Admitted. End putnam_1983_a3.","theory putnam_1983_a3 imports Complex_Main ""HOL-Number_Theory.Cong"" begin theorem putnam_1983_a3: fixes p :: ""nat"" and F :: ""nat \ nat"" defines ""F \ \ n::nat. (\ i=0..(p-2). ((i + 1) * n^i))"" assumes hp : ""odd p \ prime p"" shows ""\ a b :: nat. ((a < p \ b < p \ a \ b) \ \([F a = F b] (mod p)))"" sorry end", putnam_1983_a4,"theorem putnam_1983_a4 (k : ℕ) (kpos : k > 0) (m : ℕ := 6 * k - 1) (S : ℤ := ∑ j in Finset.Icc 1 (2 * k - 1), (-1) ^ (j + 1) * choose m (3 * j - 1)) : (S ≠ 0) := sorry","Prove that for $m = 5 \pmod 6$, \[ \binom{m}{2} - \binom{m}{5} + \binom{m}{8} - \binom{m}{11} + ... - \binom{m}{m-6} + \binom{m}{m-3} \neq 0. \]",,['algebra'],"Section putnam_1983_a4. Require Import Binomial Reals Znumtheory Coquelicot.Coquelicot. Open Scope nat_scope. Theorem putnam_1983_a4: forall (m: nat), m mod 6 = 5 -> sum_n (fun n => (if (eq_nat_dec (n mod 3) 2) then Binomial.C m n else R0)) (m-2) <> R0. Proof. Admitted. End putnam_1983_a4.","theory putnam_1983_a4 imports Complex_Main begin theorem putnam_1983_a4: fixes k m :: ""nat"" and S :: ""int"" defines ""m \ 6*k-1"" and ""S \ \ j::nat \ {1..2*k-1}. (-1)^(j+1) * (m choose (3 * j -1))"" assumes kpos : ""k > 0"" shows ""S \ 0"" sorry end", putnam_1983_a5,"abbrev putnam_1983_a5_solution : Prop := sorry -- True theorem putnam_1983_a5 : ((∃ α : ℝ, α > 0 ∧ ∀ n : ℕ, n > 0 → Even (⌊α ^ n⌋ - n)) ↔ putnam_1983_a5_solution) := sorry",Prove or disprove that there exists a positive real number $\alpha$ such that $[\alpha_n] - n$ is even for all integers $n > 0$. (Here $[x]$ denotes the greatest integer less than or equal to $x$.),Prove that such an $\alpha$ exists.,['analysis'],"Section putnam_1983_a5. Require Import Nat Reals Coquelicot.Coquelicot. Definition putnam_1983_a5_solution := true. Theorem putnam_1983_a5: exists (a: R), forall (n: nat), gt n 0 -> even (Z.to_nat (floor (Rpower a (INR n))) - n) = putnam_1983_a5_solution. Proof. Admitted. End putnam_1983_a5.","theory putnam_1983_a5 imports Complex_Main begin definition putnam_1983_a5_solution :: ""bool"" where ""putnam_1983_a5_solution \ undefined"" (* True *) theorem putnam_1983_a5: shows ""putnam_1983_a5_solution \ (\ \ :: real. \ > 0 \ (\ n :: nat. n > 0 \ even (\\^n\ - n)))"" sorry end", putnam_1983_a6,"abbrev putnam_1983_a6_solution : ℝ := sorry -- 2 / 9 theorem putnam_1983_a6 (F : ℝ → ℝ := fun a ↦ (a ^ 4 / exp (a ^ 3)) * ∫ x in (0)..a, ∫ y in (0)..(a - x), exp (x ^ 3 + y ^ 3)) : (Tendsto F ⊤ (𝓝 putnam_1983_a6_solution)) := sorry","Let $T$ be the triangle with vertices $(0, 0)$, $(a, 0)$, and $(0, a)$. Find $\lim_{a \to \infty} a^4 \exp(-a^3) \int_T \exp(x^3+y^3) \, dx \, dy$.",Show that the integral evaluates to $\frac{2}{9}$.,['analysis'],"Section putnam_1983_a6. Require Import Reals Coquelicot.Coquelicot. Definition putnam_1983_a6_solution := 2 / 9. Theorem putnam_1983_a6 : Lim_seq (fun a => let a := INR a in a ^ 4 * exp (-a ^ 3) * RInt (fun x => RInt (fun y => exp (x ^ 3 + y ^ 3)) 0 (a - x)) 0 a) = putnam_1983_a6_solution. Proof. Admitted. End putnam_1983_a6.","theory putnam_1983_a6 imports Complex_Main ""HOL-Analysis.Set_Integral"" ""HOL-Analysis.Lebesgue_Measure"" begin definition putnam_1983_a6_solution :: ""real"" where ""putnam_1983_a6_solution \ undefined"" (* 2/9 *) theorem putnam_1983_a6: fixes F :: ""real \ real"" defines ""F \ \ a. (a^4 / exp (a^3)) * (set_lebesgue_integral lebesgue {(x :: real, y :: real). 0 \ x \ x \ a \ 0 \ y \ y \ a - x} (\ (x,y). exp (x^3 + y^3)))"" shows ""filterlim F (nhds putnam_1983_a6_solution) at_top"" sorry end", putnam_1983_b2,"abbrev putnam_1983_b2_solution : Prop := sorry -- True theorem putnam_1983_b2 (f : ℕ+ → ℕ := fun n ↦ {M : Multiset ℕ | (∀ m ∈ M, ∃ k : ℕ, m = (2 ^ k : ℤ)) ∧ (∀ m ∈ M, M.count m ≤ 3) ∧ (M.sum : ℤ) = n}.ncard) : ((∃ p : Polynomial ℝ, ∀ n : ℕ+, ⌊p.eval (n : ℝ)⌋ = f n) ↔ putnam_1983_b2_solution) := sorry","Let $f(n)$ be the number of ways of representing $n$ as a sum of powers of $2$ with no power being used more than $3$ times. For example, $f(7) = 4$ (the representations are $4 + 2 + 1$, $4 + 1 + 1 + 1$, $2 + 2 + 2 + 1$, $2 + 2 + 1 + 1 + 1$). Can we find a real polynomial $p(x)$ such that $f(n) = [p(n)]$, where $[u]$ denotes the greatest integer less than or equal to $u$?",Prove that such a polynomial exists.,['algebra'],,"theory putnam_1983_b2 imports Complex_Main ""HOL-Computational_Algebra.Polynomial"" begin definition putnam_1983_b2_solution :: ""bool"" where ""putnam_1983_b2_solution \ undefined"" (* True *) theorem putnam_1983_b2: fixes f :: ""nat \ nat"" defines ""f \ \ n. card {M :: nat multiset. (\ m \# M. \ k :: nat. m = 2^k) \ (\ m \# M. count M m \ 3) \ (\\<^sub># M = n)}"" shows ""putnam_1983_b2_solution \ (\ p :: real poly. \ n :: nat. n > 0 \ \poly p (real n)\ = f n)"" sorry end", putnam_1983_b4,"theorem putnam_1983_b4 (f : ℕ → ℤ := fun n ↦ n + Int.floor (Real.sqrt n)) (a : ℕ → ℕ) (ha0 : a 0 > 0) (han : ∀ n : ℕ, a (n + 1) = f (a n)) : (∃ i : ℕ, ∃ s : ℤ, a i = s ^ 2) := sorry","Let $f(n) = n + [\sqrt n]$, where $[x]$ denotes the greatest integer less than or equal to $x$. Define the sequence $a_i$ by $a_0 = m$, $a_{n+1} = f(a_n)$. Prove that it contains at least one square.",,['algebra'],"Section putnam_1983_b4. Require Import Reals Coquelicot.Coquelicot. Open Scope R. Theorem putnam_1983_b4: exists (m: nat), let f (n: R) := n + IZR (floor (sqrt n)) in let A := fix a (n: nat) := match n with | O => INR m | S n' => f (a n') end in exists (i: nat) (q: Z), A i = IZR (floor (A i)) /\ floor (A i) = Z.mul q q. Proof. Admitted. End putnam_1983_b4.","theory putnam_1983_b4 imports Complex_Main begin theorem putnam_1983_b4: fixes a f :: ""nat \ nat"" defines ""f \ \ n :: nat. n + (nat \sqrt (real n)\)"" assumes ha0 : ""a 0 > 0"" and han : ""\ n :: nat. a (n + 1) = f (a n)"" shows ""\ i :: nat. \ s :: nat. a i = s^2"" sorry end", putnam_1983_b5,"abbrev putnam_1983_b5_solution : ℝ := sorry -- log (4 / Real.pi) theorem putnam_1983_b5 (dist : ℝ → ℝ := fun x ↦ min (x - ⌊x⌋) (⌈x⌉ - x)) (fact : Tendsto (fun N ↦ ∏ n in Finset.Icc 1 N, (2 * n / (2 * n - 1)) * (2 * n / (2 * n + 1)) : ℕ → ℝ) ⊤ (𝓝 (Real.pi / 2))) : (Tendsto (fun n ↦ (1 / n) * ∫ x in (1)..n, dist (n / x) : ℕ → ℝ) ⊤ (𝓝 putnam_1983_b5_solution)) := sorry","Define $\left\lVert x \right\rVert$ as the distance from $x$ to the nearest integer. Find $\lim_{n \to \infty} \frac{1}{n} \int_{1}^{n} \left\lVert \frac{n}{x} \right\rVert \, dx$. You may assume that $\prod_{n=1}^{\infty} \frac{2n}{(2n-1)} \cdot \frac{2n}{(2n+1)} = \frac{\pi}{2}$.",Show that the limit equals $\ln \left( \frac{4}{\pi} \right)$.,['analysis'],"Section putnam_1983_b5. Require Import Nat Reals Coquelicot.Coquelicot. Open Scope R. Definition putnam_1983_b5_solution := ln (4/PI). Theorem putnam_1983_b5: let mindist (x: R) := Rmin (Rabs (x - IZR (floor x))) (Rabs (x - IZR (floor (x+1)))) in Lim_seq (fun n => 1/(INR n) * (RInt (fun x => mindist (INR n/x)) 1 (INR n))) = putnam_1983_b5_solution. Proof. Admitted. End putnam_1983_b5.","theory putnam_1983_b5 imports Complex_Main ""HOL-Analysis.Interval_Integral"" begin definition putnam_1983_b5_solution :: ""real"" where ""putnam_1983_b5_solution \ undefined"" (* ln (4 / pi) *) theorem putnam_1983_b5: fixes dist :: ""real \ real"" defines ""dist \ \ x :: real. \x - round x\"" assumes fact : ""filterlim (\N :: nat. (\ n :: nat \ {1..N}. (2 * n / (2 * n - 1)) * (2 * n / (2 * n + 1)))) (nhds (pi / 2)) at_top"" shows ""filterlim (\ n :: real. (1/n) * (interval_lebesgue_integral lebesgue 1 n (\ x :: real. dist (n/x)))) (nhds putnam_1983_b5_solution) at_top"" sorry end", putnam_1983_b6,"theorem putnam_1983_b6 (n : ℕ) (npos : n > 0) (α : ℂ) (hα : α ^ (2 ^ n + 1) - 1 = 0 ∧ α ≠ 1) : (∃ p q : Polynomial ℤ, (aeval α p) ^ 2 + (aeval α q) ^ 2 = -1) := sorry","Let $n$ be a positive integer and let $\alpha \neq 1$ be a complex $(2n + 1)\textsuperscript{th}$ root of unity. Prove that there always exist polynomials $p(x)$, $q(x)$ with integer coefficients such that $p(\alpha)^2 + q(\alpha)^2 = -1$.",,['algebra'],,"theory putnam_1983_b6 imports Complex_Main ""HOL-Computational_Algebra.Polynomial"" begin theorem putnam_1983_b6: fixes n :: ""nat"" and \ :: ""complex"" and integralcoeffs :: ""complex poly \ bool"" defines ""integralcoeffs \ \ p. (\ n :: nat. (\ k :: int. complex_of_int k = Re (coeff p n)) \ Im (coeff p n) = 0)"" assumes npos : ""n > 0"" and h\ : ""\^(2^n + 1) - 1 = 0 \ \ \ 1"" shows ""\ p q :: complex poly. integralcoeffs p \ integralcoeffs q \ (poly p \)^2 + (poly q \)^2 = -1"" sorry end ", putnam_2003_a1,"abbrev putnam_2003_a1_solution : ℕ → ℕ := sorry -- fun n => n theorem putnam_2003_a1 (n : ℕ) (hn : n > 0) : Set.encard {a : ℕ → ℤ | ∃ k > 0, (∑ i : Fin k, a i = n) ∧ (∀ i : Fin k, a i > 0) ∧ (∀ i : Fin (k - 1), a i ≤ a (i + 1)) ∧ a (k - 1) ≤ a 0 + 1 ∧ (∀ i ≥ k, a i = 0)} = putnam_2003_a1_solution n := sorry",,,[],"Section putnam_2003_a1. Require Import Nat List Ensembles Finite_sets Coquelicot.Coquelicot. Definition putnam_2003_a1_solution (n: nat) := n. Theorem putnam_2003_a1: forall (n: nat), n > 0 -> forall (E: Ensemble (list nat)) (l: list nat), E l <-> forall (i j: nat), i < length l /\ j < length l /\ i < j -> nth i l 0 <= nth j l 0 /\ fold_left add l 0 = n -> cardinal (list nat) E (putnam_2003_a1_solution n). Proof. Admitted. End putnam_2003_a1.","theory putnam_2003_a1 imports Complex_Main begin (* uses (nat \ int) instead of (Fin k \ int) *) definition putnam_2003_a1_solution :: ""nat \ nat"" where ""putnam_2003_a1_solution \ undefined"" (* (\n::nat. n) *) theorem putnam_2003_a1: fixes n :: nat assumes hn: ""n > 0"" shows ""card {a::nat\int. (\k::nat>0. (\i::nat=0..(k-1). a i) = n \ (\i::nat\{0..(k-1)}. a i > 0) \ (\i::nat\{0..(k-2)}. a i \ a (i+1)) \ a (k-1) \ a 0 + 1 \ (\i::nat\k. a i = 0))} = putnam_2003_a1_solution n"" sorry end ", putnam_2003_a2,"theorem putnam_2003_a2 (n : ℕ) (a b : Fin n → ℝ) (abnneg : ∀ i : Fin n, a i ≥ 0 ∧ b i ≥ 0) : (∏ i : Fin n, a i) ^ ((1 : ℝ) / n) + (∏ i : Fin n, b i) ^ ((1 : ℝ) / n) ≤ (∏ i : Fin n, (a i + b i)) ^ ((1 : ℝ) / n) := sorry","Let $a_1,a_2,\dots,a_n$ and $b_1,b_2,\dots,b_n$ be nonnegative real numbers. Show that $(a_1a_2 \cdots a_n)^{1/n}+(b_1b_2 \cdots b_n)^{1/n} \leq [(a_1+b_1)(a_2+b_2) \cdots (a_n+b_n)]^{1/n}$.",,['algebra'],"Section putnam_2003_a2. Require Import List Reals Coquelicot.Coquelicot. Theorem putnam_2003_a2: let fix suml (l1 l2 : list R) : list R := match l1, l2 with | nil, _ => nil | _, nil => nil | h1 :: t1, h2 :: t2 => (h1 + h2) :: suml t1 t2 end in forall (n: nat) (a b: list R), length a = n /\ length b = n -> (fold_left Rmult a 1) ^ (1 / n) + (fold_left Rmult b 1) ^ (1 / n) <= (fold_left Rmult (suml a b) 1) ^ (1 / n). Proof. Admitted. End putnam_2003_a2.","theory putnam_2003_a2 imports Complex_Main begin (* Note: Boosted domain to infinite set *) theorem putnam_2003_a2: fixes n::nat and a b::""nat\real"" assumes abnneg : ""\i \ {0.. 0 \ b i \ 0"" shows ""((\i=0..i=0.. ((\i=0.. f minx = putnam_2003_a3_solution. Proof. Admitted. End putnam_2003_a3.","theory putnam_2003_a3 imports Complex_Main begin definition putnam_2003_a3_solution::real where ""putnam_2003_a3_solution \ undefined"" (* 2 * sqrt 2 - 1 *) theorem putnam_2003_a3: fixes f::""real\real"" defines ""f \ \x::real. abs(sin x + cos x + tan x + 1 / tan x + 1 / cos x + 1 / sin x)"" shows ""putnam_2003_a3_solution = (LEAST y. \x::real. f x = y)"" sorry end", putnam_2003_a4,"theorem putnam_2003_a4 (a b c A B C : ℝ) (aAne0 : a ≠ 0 ∧ A ≠ 0) (hle : ∀ x : ℝ, |a * x ^ 2 + b * x + c| ≤ |A * x ^ 2 + B * x + C|) : |b ^ 2 - 4 * a * c| ≤ |B ^ 2 - 4 * A * C| := sorry","Suppose that $a,b,c,A,B,C$ are real numbers, $a \ne 0$ and $A \ne 0$, such that $|ax^2+bx+c| \leq |Ax^2+Bx+C|$ for all real numbers $x$. Show that $|b^2-4ac| \leq |B^2-4AC|$.",,['algebra'],"Section putnam_2003_a4. Require Import Reals Coquelicot.Coquelicot. Theorem putnam_2003_a4: forall (a b c A B C: R), a <> 0 /\ A <> 0 /\ forall (x: R), Rabs (a * x ^ 2 + b * x + c) <= Rabs (A * x ^ 2 + B * x + C) -> Rabs (b ^ 2 - 4 * a * c) <= Rabs (B ^ 2 - 4 * A * C). Proof. Admitted. End putnam_2003_a4.","theory putnam_2003_a4 imports Complex_Main begin theorem putnam_2003_a4: fixes a b c A B C::real assumes aAne0 : ""a \ 0 \ A \ 0"" and hle : ""\x::real. abs(a * x^2 + b * x + c) \ abs(A * x^2 + B * x + C)"" shows ""abs(b^2 - 4 * a * c) \ abs(B^2 - 4 * A * C)"" sorry end", putnam_2003_a6,"abbrev putnam_2003_a6_solution : Prop := sorry -- True theorem putnam_2003_a6 (r : Set ℕ → ℕ → ℕ) (hr : ∀ (S : Set ℕ) (n : ℕ), r S n = ∑' s1 : S, ∑' s2 : S, if (s1 ≠ s2 ∧ s1 + s2 = n) then 1 else 0) : (∃ A B : Set ℕ, A ∪ B = ℕ ∧ A ∩ B = ∅ ∧ (∀ n : ℕ, r A n = r B n)) ↔ putnam_2003_a6_solution := sorry","For a set $S$ of nonnegative integers, let $r_S(n)$ denote the number of ordered pairs $(s_1,s_2)$ such that $s_1 \in S$, $s_2 \in S$, $s_1 \ne s_2$, and $s_1+s_2=n$. Is it possible to partition the nonnegative integers into two sets $A$ and $B$ in such a way that $r_A(n)=r_B(n)$ for all $n$?",Show that such a partition is possible.,['algebra'],,"theory putnam_2003_a6 imports Complex_Main begin definition putnam_2003_a6_solution::bool where ""putnam_2003_a6_solution \ undefined"" (* True *) theorem putnam_2003_a6: fixes r::""(nat set) \ nat \ nat"" defines ""r \ \S. \n. card {(s1, s2). s1 \ S \ s2 \ S \ s1 \ s2 \ s1 + s2 = n}"" shows ""(\A B::nat set. A \ B = \ \ A \ B = {} \ (\n::nat. r A n = r B n)) \ putnam_2003_a6_solution"" sorry end", putnam_2003_b1,"abbrev putnam_2003_b1_solution : Prop := sorry -- False theorem putnam_2003_b1 : (∃ a b c d : Polynomial ℝ, (∀ x y : ℝ, 1 + x * y + x ^ 2 * y ^ 2 = a.eval x * c.eval y + b.eval x * d.eval y)) ↔ putnam_2003_b1_solution := sorry",,,[],"Section putnam_2003_b1. Require Import Reals Coquelicot.Coquelicot. Definition putnam_2003_b1_solution := True. Theorem putnam_2003_b1: let p (coeff: nat -> R) (x: R) (n: nat) := sum_n (fun i => coeff i * x ^ i) n in exists (coeffa coeffb coeffc coeffd: nat -> R) (na nb nc nd: nat), forall (x y: R), 1 + x * y * (x * y) ^ 2 = (p coeffa x na) * (p coeffc y nc) + (p coeffb x nb) * (p coeffd y nd). Proof. Admitted. End putnam_2003_b1.","theory putnam_2003_b1 imports Complex_Main ""HOL-Computational_Algebra.Polynomial"" begin definition putnam_2003_b1_solution :: bool where ""putnam_2003_b1_solution \ undefined"" (* False *) theorem putnam_2003_b1: shows ""(\a b c d::real poly. (\x y::real. 1 + x*y + x^2*y^2 = poly a x * poly c y + poly b x * poly d y)) \ putnam_2003_b1_solution"" sorry end ", putnam_2003_b3,"theorem putnam_2003_b3 (multicc : ℕ → ℕ → Prop) (lcmicc : ℕ → ℕ) (hmulticc : ∀ n mult : ℕ, multicc n mult = ∀ i : Set.Icc 1 n, i.1 ∣ mult) (hlcmicc : ∀ n : ℕ, multicc n (lcmicc n) ∧ (∀ n' : ℕ, multicc n n' → n' ≥ (lcmicc n))) : ∀ n > 0, (n)! = ∏ i : Set.Icc 1 n, lcmicc (n / i.1) := sorry","Show that for each positive integer $n$, $n!=\prod_{i=1}^n \text{lcm}\{1,2,\dots,\lfloor n/i \rfloor\}$. (Here lcm denotes the least common multiple, and $\lfloor x \rfloor$ denotes the greatest integer $\leq x$.)",,['number_theory'],"Section putnam_2003_b3. Require Import Nat List Reals Coquelicot.Coquelicot. Theorem putnam_2003_b3: let fix lcm_n (args : list nat) : nat := match args with | nil => 0%nat | h :: args' => div (h * (lcm_n args')) (gcd h (lcm_n args')) end in let fix prod_n (m: nat -> R) (n : nat) : R := match n with | O => m 0%nat | S n' => m n' * prod_n m n' end in forall (n: nat), gt n 0 -> INR (fact n) = prod_n (fun i => INR (lcm_n (seq 0 (div n (i + 1))))) n. Proof. Admitted. End putnam_2003_b3.","theory putnam_2003_b3 imports Complex_Main begin theorem putnam_2003_b3: fixes n::nat assumes npos : ""n > 0"" shows ""fact n = (\i=1..n. Lcm {1..\n / i\})"" sorry end", putnam_2003_b4,"theorem putnam_2003_b4 (f : ℝ → ℝ) (a b c d e : ℤ) (r1 r2 r3 r4 : ℝ) (ane0 : a ≠ 0) (hf1 : ∀ z : ℝ, f z = a * z ^ 4 + b * z ^ 3 + c * z ^ 2 + d * z + e) (hf2 : ∀ z : ℝ, f z = a * (z - r1) * (z - r2) * (z - r3) * (z - r4)) : (¬Irrational (r1 + r2) ∧ r1 + r2 ≠ r3 + r4) → ¬Irrational (r1 * r2) := sorry","Let $f(z)=az^4+bz^3+cz^2+dz+e=a(z-r_1)(z-r_2)(z-r_3)(z-r_4)$ where $a,b,c,d,e$ are integers, $a \neq 0$. Show that if $r_1+r_2$ is a rational number and $r_1+r_2 \neq r_3+r_4$, then $r_1r_2$ is a rational number.",,"['number_theory', 'algebra']","Section putnam_2003_b4. Require Import Reals ZArith Coquelicot.Coquelicot. Theorem putnam_2003_b4: forall (a b c d e: Z), ~ Z.eq a 0 -> let a := IZR a in let b := IZR b in let c := IZR c in let d := IZR d in let e := IZR e in exists (r1 r2 r3 r4: R), forall (z: R), a * z ^ 4 + b * z ^ 3 + c * z ^ 2 + d * z + e = a * (z - r1) * (z - r2) * (z - r3) * (z - r4) -> (exists (p q: Z), r1 + r2 = IZR p / IZR q) /\ r1 + r2 <> r3 + r4 -> exists (p q: Z), r1 * r2 = IZR p / IZR q. Proof. Admitted. End putnam_2003_b4.","theory putnam_2003_b4 imports Complex_Main begin theorem putnam_2003_b4: fixes f::""real\real"" and a b c d e::int and r1 r2 r3 r4::real defines ""f \ \z::real. a * z^4 + b * z^3 + c * z^2 + d * z + e"" assumes ane0 : ""a \ 0"" and hf : ""\z::real. f z = a * (z - r1) * (z - r2) * (z - r3) * (z - r4)"" shows ""((r1 + r2) \ \ \ r1 + r2 \ r3 + r4) \ (r1 * r2) \ \"" sorry end", putnam_2003_b6,"theorem putnam_2003_b6 (f : ℝ → ℝ) (hf : Continuous f) : (∫ x in (0 : ℝ)..1, (∫ y in (0 : ℝ)..1, |f x + f y|)) ≥ (∫ x in (0 : ℝ)..1, |f x|) := sorry","Let $f(x)$ be a continuous real-valued function defined on the interval $[0,1]$. Show that \[ \int_0^1 \int_0^1 | f(x) + f(y) |\,dx\,dy \geq \int_0^1 |f(x)|\,dx. \]",,['analysis'],"Section putnam_2003_b6. Require Import Reals Coquelicot.Coquelicot. Theorem putnam_2003_b6: forall (f: R -> R) (x: R), 0 <= x <= 1 -> continuity_pt f x -> RInt (fun x => RInt (fun y => Rabs (f x + f y)) 0 1) 0 1 >= RInt (fun x => Rabs (f x)) 0 1. Proof. Admitted. End putnam_2003_b6.","theory putnam_2003_b6 imports Complex_Main ""HOL-Analysis.Lebesgue_Measure"" ""HOL-Analysis.Set_Integral"" begin theorem putnam_2003_b6: fixes f :: ""real \ real"" assumes hf : ""continuous_on UNIV f"" shows ""set_lebesgue_integral lebesgue {(x, y). 0 \ x \ x \ 1 \ 0 \ y \ y \ 1} (\ t :: real \ real. \f (fst t) + f (snd t)\) \ interval_lebesgue_integral lebesgue 0 1 f"" sorry end", putnam_1990_a1,"abbrev putnam_1990_a1_solution : (ℕ → ℤ) × (ℕ → ℤ) := sorry -- (fun n : ℕ => (n)!, fun n : ℕ => 2 ^ n) theorem putnam_1990_a1 (T : ℕ → ℤ) (hT012 : T 0 = 2 ∧ T 1 = 3 ∧ T 2 = 6) (hTn : ∀ n ≥ 3, T n = (n + 4) * T (n - 1) - 4 * n * T (n - 2) + (4 * n - 8) * T (n - 3)) : T = putnam_1990_a1_solution.1 + putnam_1990_a1_solution.2 := sorry","Let $T_0=2,T_1=3,T_2=6$, and for $n \geq 3$, $T_n=(n+4)T_{n-1}-4nT_{n-2}+(4n-8)T_{n-3}$. The first few terms are $2,3,6,14,40,152,784,5168,40576$. Find, with proof, a formula for $T_n$ of the form $T_n=A_n+B_n$, where $\{A_n\}$ and $\{B_n\}$ are well-known sequences.",Show that we have $T_n=n!+2^n$.,['algebra'],"Section putnam_1990_a1. Require Import Nat Factorial Coquelicot.Coquelicot. Definition putnam_1990_a1_solution := (fun n => fact n, fun n => pow 2 n). Theorem putnam_1990_a1: let A := fix a (n: nat) : nat := match n with | O => 2 | S O => 3 | S (S O) => 6 | S (S (S n''' as n'') as n') => (n + 4) * a n' - 4 * n * a n'' + (4 * n - 8) * a n''' end in exists (b c: nat -> nat), forall (n: nat), A n = b n + c n <-> (b,c) = putnam_1990_a1_solution. Proof. Admitted. End putnam_1990_a1.","theory putnam_1990_a1 imports Complex_Main begin definition putnam_1990_a1_solution::""((nat\int)\(nat\int))"" where ""putnam_1990_a1_solution \ undefined"" (* (\n. fact n, \n. 2^n) *) theorem putnam_1990_a1: fixes T::""nat\int"" assumes hT012 : ""T 0 = 2 \ T 1 = 3 \ T 2 = 6"" and hTn : ""\n \ 3. T n = (n+4) * T (n-1) - 4 * n * T (n-2) + (4 * n - 8) * T (n-3)"" shows ""T = (\n. (fst putnam_1990_a1_solution) n + (snd putnam_1990_a1_solution) n)"" sorry end", putnam_1990_a2,"abbrev putnam_1990_a2_solution : Prop := sorry -- True theorem putnam_1990_a2 (numform : ℝ → Prop) (hnumform : ∀ x : ℝ, numform x = ∃ n m : ℕ, x = n ^ ((1 : ℝ) / 3) - m ^ ((1 : ℝ) / 3)) : (∃ s : ℕ → ℝ, (∀ i : ℕ, numform (s i)) ∧ Tendsto s atTop (𝓝 (Real.sqrt 2))) ↔ putnam_1990_a2_solution := sorry","Is $\sqrt{2}$ the limit of a sequence of numbers of the form $\sqrt[3]{n}-\sqrt[3]{m}$ ($n,m=0,1,2,\dots$)?",Show that the answer is yes.,['analysis'],"Section putnam_1990_a2. Require Import Reals Coquelicot.Coquelicot. Open Scope R. Definition putnam_1990_a2_solution := True. Theorem putnam_1990_a2: let numform (x: R) : Prop := exists (n m: nat), x = pow (INR n) (1/3) - pow (INR m) (1/3) in exists (s: nat -> R), forall (i: nat), numform (s i) /\ Lim_seq s = sqrt 2 <-> putnam_1990_a2_solution. Proof. Admitted. End putnam_1990_a2.","theory putnam_1990_a2 imports Complex_Main begin definition putnam_1990_a2_solution::bool where ""putnam_1990_a2_solution \ undefined"" (* True *) theorem putnam_1990_a2: fixes numform::""real\bool"" defines ""numform \ \x. (\n m::nat. x = n powr (1/3) - m powr (1/3))"" shows ""(\s::nat\real. (\i::nat. numform (s i)) \ (s \ (sqrt 2))) \ putnam_1990_a2_solution"" sorry end", putnam_1990_a5,"abbrev putnam_1990_a5_solution : Prop := sorry -- False theorem putnam_1990_a5 : (∀ n ≥ 1, ∀ A B : Matrix (Fin n) (Fin n) ℝ, A * B * A * B = 0 → B * A * B * A = 0) ↔ putnam_1990_a5_solution := sorry","If $\mathbf{A}$ and $\mathbf{B}$ are square matrices of the same size such that $\mathbf{ABAB}=\mathbf{0}$, does it follow that $\mathbf{BABA}=\mathbf{0}$?",Show that the answer is no.,['linear_algebra'],"Section putnam_1990_a5. From mathcomp Require Import matrix ssralg. Open Scope ring_scope. Theorem putnam_1990_a5: forall (R: ringType) (n: nat) (A B: 'M[R]_n), mulmx (mulmx (mulmx A B) A) B = 0 -> mulmx (mulmx (mulmx B A) B) A = 0. Proof. Admitted. End putnam_1990_a5.","theory putnam_1990_a5 imports Complex_Main ""HOL-Analysis.Finite_Cartesian_Product"" begin definition putnam_1990_a5_solution::bool where ""putnam_1990_a5_solution \ undefined"" (* False *) theorem putnam_1990_a5: fixes A B::""real^'a^'a"" and n::nat assumes matsize : ""CARD('a) = n \ n \ 1"" and habab : ""A ** B ** A ** B = mat 0"" shows ""(B ** A ** B ** A = mat 0) \ putnam_1990_a5_solution"" sorry end", putnam_1990_a6,"abbrev putnam_1990_a6_solution : ℕ := sorry -- 17711 theorem putnam_1990_a6 (STadmiss : (Fin 2 → (Finset (Fin 10))) → Prop) (hSTadmiss : ∀ ST : Fin 2 → (Finset (Fin 10)), STadmiss ST = ((∀ s ∈ ST 0, (s+1) > (ST 1).card) ∧ (∀ t ∈ ST 1, (t+1) > (ST 0).card))) : {ST : Fin 2 → (Finset (Fin 10)) | STadmiss ST}.encard = putnam_1990_a6_solution := sorry","If $X$ is a finite set, let $|X|$ denote the number of elements in $X$. Call an ordered pair $(S,T)$ of subsets of $\{1,2,\dots,n\}$ \emph{admissible} if $s>|T|$ for each $s \in S$, and $t>|S|$ for each $t \in T$. How many admissible ordered pairs of subsets of $\{1,2,\dots,10\}$ are there? Prove your answer.","Show that the number of admissible ordered pairs of subsets of $\{1,2,\dots,10\}$ equals the $22$nd Fibonacci number $F_{22}=17711$.",['algebra'],,"theory putnam_1990_a6 imports Complex_Main begin definition putnam_1990_a6_solution::nat where ""putnam_1990_a6_solution \ undefined"" (* 17711 *) theorem putnam_1990_a6: fixes STadmiss::""(nat set) \ (nat set) \ bool"" defines ""STadmiss \ \S. \T. S \ {1..10} \ T \ {1..10} \ (\s \ S. s > (card T)) \ (\t \ T. t > (card S))"" shows ""card {(S::(nat set), T::(nat set)) . STadmiss S T} = putnam_1990_a6_solution"" sorry end", putnam_1990_b1,"abbrev putnam_1990_b1_solution : Set (ℝ → ℝ) := sorry -- {fun x : ℝ => (Real.sqrt 1990) * Real.exp x, fun x : ℝ => -(Real.sqrt 1990) * Real.exp x} theorem putnam_1990_b1 (f : ℝ → ℝ) (fint : Prop) (hfint : fint = ∀ x : ℝ, (f x) ^ 2 = (∫ t in Set.Ioo 0 x, (f t) ^ 2 + (deriv f t) ^ 2) + 1990) : (ContDiff ℝ 1 f ∧ fint) ↔ f ∈ putnam_1990_b1_solution := sorry","Find all real-valued continuously differentiable functions $f$ on the real line such that for all $x$, $(f(x))^2=\int_0^x [(f(t))^2+(f'(t))^2]\,dt+1990$.","Show that there are two such functions, namely $f(x)=\sqrt{1990}e^x$, and $f(x)=-\sqrt{1990}e^x$.",['analysis'],"Section putnam_1990_b1. Require Import Reals Coquelicot.Coquelicot. Open Scope R. Definition putnam_1990_b1_solution (f: R -> R) := f = (fun x => sqrt 1990 * exp x) /\ f = (fun x => -sqrt 1990 * exp x). Theorem putnam_1990_b1: forall (f: R -> R), continuity f /\ forall x, ex_derive_n f 1 x -> forall x, pow (f x) 2 = RInt (fun t => pow (f t) 2 + pow ((Derive f) t) 2) 0 x + 1990 -> putnam_1990_b1_solution f. Proof. Admitted. End putnam_1990_b1.","theory putnam_1990_b1 imports Complex_Main ""HOL-Analysis.Interval_Integral"" begin definition putnam_1990_b1_solution::""(real\real) set"" where ""putnam_1990_b1_solution \ undefined"" (* { (\x. (sqrt 1990) * exp x), (\x. - (sqrt 1990) * exp x)} *) theorem putnam_1990_b1: fixes f f'::""real\real"" assumes fderiv : ""\x::real. (f has_derivative f') (nhds x)"" shows ""((\x::real. (f x)^2 = (interval_lebesgue_integral lebesgue 0 x (\t. (f t)^2 + (f' t)^2)) + 1990) \ continuous_on UNIV f') \ f \ putnam_1990_b1_solution"" sorry end", putnam_1990_b2,"theorem putnam_1990_b2 (x z : ℝ) (P : ℕ → ℝ) (xlt1 : |x| < 1) (zgt1 : |z| > 1) (hP : ∀ j ≥ 1, P j = (∏ i : Fin j, (1 - z * x ^ (i : ℕ))) / (∏ i : Set.Icc 1 j, (z - x ^ (i : ℕ)))) : 1 + (∑' j : Set.Ici 1, (1 + x ^ (j : ℕ)) * P j) = 0 := sorry","Prove that for $|x|<1$, $|z|>1$, $1+\sum_{j=1}^\infty (1+x^j)P_j=0$, where $P_j$ is $\frac{(1-z)(1-zx)(1-zx^2) \cdots (1-zx^{j-1})}{(z-x)(z-x^2)(z-x^3) \cdots (z-x^j)}$.",,['analysis'],"Section putnam_1990_b2. Require Import Reals Coquelicot.Coquelicot. Open Scope R. Theorem putnam_1990_b2: forall (x z: R), Rabs x < 1 /\ Rabs z > 1 -> let P (j: nat) := (sum_n (fun i => 1 - z * x ^ i) j) / (sum_n (fun i => z - x ^ i) j+1) in 1 + Series (fun j => 1 + x ^ (j+1) * P j) = 0. Proof. Admitted. End putnam_1990_b2.","theory putnam_1990_b2 imports Complex_Main begin theorem putnam_1990_b2: fixes x z::real and P::""nat\real"" defines ""P \ \j. (\i=0..i=1..j. (z - x^i))"" assumes xlt1 : ""abs(x) < 1"" and zgt1 : ""abs(z) > 1"" shows ""1 + (\j::nat. (1 + x^(j+1)) * P j) = 0"" sorry end", putnam_1990_b3,"theorem putnam_1990_b3 (S : Set (Matrix (Fin 2) (Fin 2) ℕ)) (hS : ∀ A ∈ S, ∀ i j : Fin 2, (∃ x : ℤ, A i j = x ^ 2) ∧ A i j ≤ 200) : (S.encard > 50387) → (∃ A ∈ S, ∃ B ∈ S, A ≠ B ∧ A * B = B * A) := sorry","Let $S$ be a set of $2 \times 2$ integer matrices whose entries $a_{ij}$ (1) are all squares of integers, and, (2) satisfy $a_{ij} \leq 200$. Show that if $S$ has more than $50387$ ($=15^4-15^2-15+2$) elements, then it has two elements that commute.",,['linear_algebra'],"Section putnam_1990_b3. Require Import Ensembles Finite_sets Reals Coquelicot.Coquelicot. Open Scope R. Theorem putnam_1990_b3 (Mmult_n := fix Mmult_n {T : Ring} (A : matrix 2 2) (p : nat) := match p with | O => A | S p' => @Mmult T 2 2 2 A (Mmult_n A p') end) (E : Ensemble (matrix 2 2) := fun (A: matrix 2 2) => forall (i j: nat), and (le 0 i) (lt i 2) /\ and (le 0 j) (lt j 2) -> (coeff_mat 0 A i j) <= 200 /\ exists (m: nat), coeff_mat 0 A i j = INR m ^ 2) : exists (sz : nat), gt sz 50387 /\ cardinal (matrix 2 2) E sz -> exists (A B: matrix 2 2), E A /\ E B /\ Mmult A B = Mmult B A. Proof. Admitted. End putnam_1990_b3.","theory putnam_1990_b3 imports Complex_Main ""HOL-Analysis.Finite_Cartesian_Product"" begin theorem putnam_1990_b3: fixes S::""(nat^2^2) set"" assumes hS : ""\A \ S. (\i \ {1..2}. \j \ {1..2}. ((\x::nat. A$i$j = x^2) \ A$i$j \ 200))"" shows ""card S > 50387 \ (\A \ S. \B \ S. A \ B \ A ** B = B ** A)"" sorry end", putnam_1990_b4,"abbrev putnam_1990_b4_solution : Prop := sorry -- True theorem putnam_1990_b4 : (∀ (G : Type*) (_ : Fintype G) (_ : Group G) (n : ℕ) (a b : G), (n = Fintype.card G ∧ a ≠ b ∧ G = Subgroup.closure {a, b}) → (∃ g : ℕ → G, (∀ x : G, {i : Fin (2 * n) | g i = x}.encard = 2) ∧ (∀ i : Fin (2 * n), (g ((i + 1) % (2 * n)) = g i * a) ∨ (g ((i + 1) % (2 * n)) = g i * b))) ↔ putnam_1990_b4_solution) := sorry","Let $G$ be a finite group of order $n$ generated by $a$ and $b$. Prove or disprove: there is a sequence $g_1,g_2,g_3,\dots,g_{2n}$ such that \begin{itemize} \item[(1)] every element of $G$ occurs exactly twice, and \item[(2)] $g_{i+1}$ equals $g_ia$ or $g_ib$ for $i=1,2,\dots,2n$. (Interpret $g_{2n+1}$ as $g_1$.) \end{itemize}",Show that such a sequence does exist.,['abstract_algebra'],,"theory putnam_1990_b4 imports Complex_Main ""HOL-Algebra.Multiplicative_Group"" begin (* Note: Boosted domain to infinite set *) definition putnam_1990_b4_solution::bool where ""putnam_1990_b4_solution \ undefined"" (* True *) theorem putnam_1990_b4: fixes G (structure) and n::nat and a b::""'a"" assumes hG : ""Group.group G \ finite (carrier G) \ card (carrier G) = n"" and abgen : ""generate G {a, b} = carrier G \ a \ b"" shows ""(\g::nat\'a. (\x \ carrier G. card {i::nat. i < 2 * n \ g i = x} = 2) \ (\i \ {0..<(2*n)}. (g ((i+1) mod (2*n)) = g i \ a) \ (g ((i+1) mod (2*n)) = g i \ b))) \ putnam_1990_b4_solution"" sorry end", putnam_1990_b5,"abbrev putnam_1990_b5_solution : Prop := sorry -- True theorem putnam_1990_b5 (anpoly : (ℕ → ℝ) → ℕ → Polynomial ℝ) (hanpoly : ∀ (a : ℕ → ℝ) (n : ℕ), (anpoly a n).degree = n ∧ (∀ i : Fin (n + 1), (anpoly a n).coeff i = a i)) : (∃ a : ℕ → ℝ, (∀ i : ℕ, a i ≠ 0) ∧ (∀ n ≥ 1, {r : ℝ | (anpoly a n).eval r = 0}.encard = n)) ↔ putnam_1990_b5_solution := sorry","Is there an infinite sequence $a_0,a_1,a_2,\dots$ of nonzero real numbers such that for $n=1,2,3,\dots$ the polynomial $p_n(x)=a_0+a_1x+a_2x^2+\cdots+a_nx^n$ has exactly $n$ distinct real roots?","Show that the answer is yes, such an infinite sequence exists.","['algebra', 'analysis']","Section putnam_1990_b5. Require Import Reals Ensembles Finite_sets Coquelicot.Coquelicot. Definition putnam_1990_b5_solution := True. Open Scope R. Theorem putnam_1990_b5: exists (a: nat -> R), let pn (n: nat) (x: R) := sum_n (fun i => a i * pow x i) n in forall (n: nat), gt n 0 -> exists (roots: Ensemble R), cardinal R roots n /\ forall (r: R), roots r <-> pn n r = 0 <-> putnam_1990_b5_solution. Proof. Admitted. End putnam_1990_b5.","theory putnam_1990_b5 imports Complex_Main ""HOL-Computational_Algebra.Polynomial"" begin definition putnam_1990_b5_solution::bool where ""putnam_1990_b5_solution \ undefined"" (* True *) theorem putnam_1990_b5: fixes anpoly::""(nat\real) \ nat \ (real poly)"" assumes hanpoly : ""\a. \n. degree (anpoly a n) = n \ (\i::nat \ {0..n}. coeff (anpoly a n) i = a i)"" shows ""(\a. (\i::nat. a i \ 0) \ (\n \ 1. n = card {r::real. poly (anpoly a n) r = 0})) \ putnam_1990_b5_solution"" sorry end", putnam_2008_a1,"theorem putnam_2008_a1 (f : ℝ → ℝ → ℝ) (hf : ∀ x y z : ℝ, f x y + f y z + f z x = 0) : ∃ g : ℝ → ℝ, ∀ x y : ℝ, f x y = g x - g y := sorry","Let $f:\mathbb{R}^2 \to \mathbb{R}$ be a function such that $f(x,y)+f(y,z)+f(z,x)=0$ for all real numbers $x$, $y$, and $z$. Prove that there exists a function $g:\mathbb{R} \to \mathbb{R}$ such that $f(x,y)=g(x)-g(y)$ for all real numbers $x$ and $y$.",,['algebra'],"Section putnam_2008_a1. Require Import Reals Coquelicot.Coquelicot. Theorem putnam_2008_a1: forall (f: R -> R -> R) (x y z: R), f x y + f y z + f z x = 0 -> exists (g: R -> R), forall (x y: R), f x y = g x - g y. Proof. Admitted. End putnam_2008_a1.","theory putnam_2008_a1 imports Complex_Main begin theorem putnam_2008_a1: fixes f :: ""real \ real \ real"" assumes hf : ""\ x y z :: real. f x y + f y z + f z x = 0"" shows ""\ g :: real \ real. \ x y :: real. f x y = g x - g y"" sorry end", putnam_2008_a4,"abbrev putnam_2008_a4_solution : Prop := sorry -- False theorem putnam_2008_a4 (f : ℝ → ℝ) (hf : f = fun x => if x ≤ Real.exp 1 then x else x * (f (Real.log x))) : (∃ r : ℝ, Tendsto (fun N : ℕ => ∑ n in Finset.range N, 1/(f (n + 1))) atTop (𝓝 r)) ↔ putnam_2008_a4_solution := sorry",Define $f : \mathbb{R} \to \mathbb{R} by $f(x) = x$ if $x \leq e$ and $f(x) = x * f(\ln(x))$ if $x > e$. Does $\sum_{n=1}^{\infty} 1/(f(n))$ converge?,Show that the sum does not converge.,['algebra'],"Section putnam_2008_a4. Require Import Reals Coquelicot.Coquelicot. Definition putnam_2008_a4_solution := False. Theorem putnam_2008_a4: forall (f: R -> R) (x: R), f x = (if (Rle_dec x (exp 1)) then x else x * f (ln x)) -> ex_lim_seq (fun nInc => sum_n (fun n => 1 / f (INR n)) nInc) <-> putnam_2008_a4_solution. Proof. Admitted. End putnam_2008_a4.","theory putnam_2008_a4 imports Complex_Main begin definition putnam_2008_a4_solution :: bool where ""putnam_2008_a4_solution \ undefined"" (* False *) theorem putnam_2008_a4: fixes f :: ""real \ real"" assumes hf: ""f \ (\x::real. if x \ exp 1 then x else (x * f (ln x)))"" shows ""(\r::real. filterlim (\N::nat. (\n::nat=1..N. 1/f n)) (nhds r) at_top) \ putnam_2008_a4_solution"" sorry end ", putnam_2008_a6,"theorem putnam_2008_a6 : (∃ c : ℝ, c > 0 ∧ ∀ G [Group G] (fing : Fintype G), fing.card > 1 → ∃ s : List G, s.length ≤ c * Real.log (fing.card : ℝ) ∧ ∀ g : G, ∃ t : List G, t.Sublist s ∧ t.prod = g) := sorry","Prove that there exists a constant $c>0$ such that in every nontrivial finite group $G$ there exists a sequence of length at most $c \log |G|$ with the property that each element of $G$ equals the product of some subsequence. (The elements of $G$ in the sequence are not required to be distinct. A \emph{subsequence} of a sequence is obtained by selecting some of the terms, not necessarily consecutive, without reordering them; for example, $4, 4, 2$ is a subsequence of $2, 4, 6, 4, 2$, but $2, 2, 4$ is not.)",,['abstract_algebra'],,"theory putnam_2008_a6 imports Complex_Main ""HOL-Algebra.Multiplicative_Group"" begin theorem putnam_2008_a6: shows ""\ c :: real. c > 0 \ (\ G :: 'a monoid. group G \ finite (carrier G) \ card (carrier G) > 1 \ (\ s :: 'a list. length s \ c * ln (card (carrier G)) \ (\ g \ carrier G. \ t \ set (subseqs s). foldr (\\<^bsub>G\<^esub>) t (\\<^bsub>G\<^esub>) = g)))"" sorry end", putnam_2008_b1,"abbrev putnam_2008_b1_solution : ℕ := sorry -- 2 def is_rational_point (p : Fin 2 → ℝ) : Prop := ∃ (a b : ℚ), a = p 0 ∧ b = p 1 def real_circle (c : Fin 2 → ℝ) (r : ℝ) : Set (Fin 2 → ℝ) := {p : Fin 2 → ℝ | Euclidean.dist p c = r} theorem putnam_2008_b1 : ∀ (c : Fin 2 → ℝ) (r : ℝ), ¬ is_rational_point c → (Set.ncard {p : Fin 2 → ℝ | p ∈ real_circle c r ∧ is_rational_point p} ≤ putnam_2008_b1_solution) ∧ ∃ (c : Fin 2 → ℝ) (r : ℝ), ¬ is_rational_point c ∧ (Set.ncard {p : Fin 2 → ℝ | p ∈ real_circle c r ∧ is_rational_point p} = putnam_2008_b1_solution) := sorry",What is the maximum number of rational points that can lie on a circle in $\mathbb{R}^2$ whose center is not a rational point? (A \emph{rational point} is a point both of whose coordinates are rational numbers.),Show that the maximum number is $2$.,['number_theory'],,"theory putnam_2008_b1 imports Complex_Main ""HOL-Analysis.Finite_Cartesian_Product"" ""HOL-Analysis.Elementary_Metric_Spaces"" begin definition putnam_2008_b1_solution :: ""nat"" where ""putnam_2008_b1_solution \ undefined"" (* 2 *) definition is_rational_point :: ""real^2 \ bool"" where ""is_rational_point \ (\p::real^2. (\a b::rat. a = p$1 \ b = p$2))"" theorem putnam_2008_b1: shows ""(GREATEST np::nat. (\(c::real^2)(r::real). \is_rational_point c \ np = card {p::real^2. p \ sphere c r \ is_rational_point p})) = putnam_2008_b1_solution"" sorry end ", putnam_2008_b2,"abbrev putnam_2008_b2_solution : ℝ := sorry -- -1 theorem putnam_2008_b2 (F : ℕ → ℝ → ℝ) (hF0 : ∀ x : ℝ, F 0 x = Real.log x) (hFn : ∀ n : ℕ, ∀ x > 0, F (n + 1) x = ∫ t in Set.Ioo 0 x, F n t) : Tendsto (fun n : ℕ => ((n)! * F n 1) / Real.log n) atTop (𝓝 putnam_2008_b2_solution) := sorry","Let $F_0(x)=\ln x$. For $n \geq 0$ and $x>0$, let $F_{n+1}(x)=\int_0^x F_n(t)\,dt$. Evaluate $\lim_{n \to \infty} \frac{n!F_n(1)}{\ln n}$.",Show that the desired limit is $-1$.,['analysis'],"Section putnam_2008_b2. Require Import Factorial Reals Coquelicot.Coquelicot. Definition putnam_2008_b2_solution := -1. Theorem putnam_2008_b2: let fix F (n: nat) (x: R) := match n with | O => ln x | S n' => RInt (fun t => F n' t) 0 x end in Lim_seq (fun n => INR (fact n) * F n 1 / ln (INR n)) = putnam_2008_b2_solution. Proof. Admitted. End putnam_2008_b2.","theory putnam_2008_b2 imports Complex_Main ""HOL-Analysis.Interval_Integral"" begin definition putnam_2008_b2_solution :: ""real"" where ""putnam_2008_b2_solution \ undefined"" (* -1 *) theorem putnam_2008_b2: fixes F :: ""nat \ real \ real"" assumes hF0 : ""\ x :: real. F 0 x = ln x"" and hFn : ""\ n :: nat. \ x > 0. F (n + 1) x = interval_lebesgue_integral lebesgue 0 x (F n)"" shows ""filterlim (\ n :: nat. (fact n) * (F n 1) / ln n) (nhds putnam_2008_b2_solution) at_top"" sorry end", putnam_2008_b4,"theorem putnam_2008_b4 (p : ℕ) (hp : Nat.Prime p) (h : Polynomial ℤ) (hh : ∀ i j : Finset.range (p ^ 2), h.eval i ≡ h.eval j [ZMOD p ^ 2] → i = j) : (∀ i j : Finset.range (p ^ 3), h.eval i ≡ h.eval j [ZMOD p ^ 3] → i = j) := sorry","Let $p$ be a prime number. Let $h(x)$ be a polynomial with integer coefficients such that $h(0), h(1), \dots, h(p^2-1)$ are distinct modulo $p^2$. Show that $h(0), h(1), \dots, h(p^3-1)$ are distinct modulo $p^3$.",,"['algebra', 'number_theory']","Section putnam_2008_b4. Require Import Nat Reals Coquelicot.Coquelicot. Theorem putnam_2008_b4: forall (p: nat), Znumtheory.prime (Z.of_nat p) -> exists (c: nat -> Z) (n: nat), let h (x: nat) := Z.to_nat (floor (sum_n (fun i => IZR (c i) * INR (x ^ i)) (n + 1))) in (forall (i j: nat), i <> j /\ and (le 0 i) (le i (p ^ 2 - 1)) /\ and (le 0 j) (le j (p ^ 2 - 1)) -> (h i) mod (p ^ 2) <> h j mod p ^ 2) -> (forall (i j: nat), i <> j /\ and (le 0 i) (le i (p ^ 3 - 1)) /\ and (le 0 j) (le j (p ^ 3 - 1)) -> h i mod p ^ 2 <> h j mod p ^ 3). Proof. Admitted. End putnam_2008_b4.","theory putnam_2008_b4 imports Complex_Main ""HOL-Computational_Algebra.Primes"" ""HOL-Computational_Algebra.Polynomial"" ""HOL-Number_Theory.Cong"" begin theorem putnam_2008_b4: fixes p :: nat and h :: ""int poly"" assumes hp: ""prime p"" and hh: ""\ i \ {0 .. p ^ 2 - 1}. \ j \ {0 .. p ^ 2 - 1}. [poly h i = poly h j] (mod p ^ 2) \ i = j"" shows ""\ i \ {0 .. p ^ 3 - 1}. \ j \ {0 .. p ^ 3 - 1}. [poly h i = poly h j] (mod p ^ 3) \ i = j"" sorry end", putnam_2008_b5,"abbrev putnam_2008_b5_solution : Set (ℝ → ℝ) := sorry -- {fun (x : ℝ) => x + n | n : ℤ} ∪ {fun (x : ℝ) => -x + n | n : ℤ} theorem putnam_2008_b5 (fqsat : (ℝ → ℝ) → ℚ → Prop := fun f q => ContDiff ℝ 1 f ∧ (∃ p : ℚ, p = f q ∧ p.den = q.den)) (fsat : (ℝ → ℝ) → Prop := fun f => ∀ q : ℚ, fqsat f q) : ∀ f : (ℝ → ℝ), fsat f ↔ f ∈ putnam_2008_b5_solution := sorry","Find all continuously differentiable functions f : \mathbb{R} \to \mathbb{R} such that for every rational number $q$, the number $f(q)$ is rational and has the same denominator as $q$.","Show that the solution is the set of all functions of the form n + x, n - x where n is any integer.",['analysis'],"Section putnam_2008_b5. Require Import Reals Coquelicot.Coquelicot. From mathcomp Require Import div. Definition putnam_2008_b5_solution := 1. Theorem putnam_2008_b5: forall (f: R -> R), continuity f /\ (forall (x: R), ex_derive f x) -> forall (q: R), exists (n1 n2 d: nat), q = INR (n1 / d) /\ f q = INR (n2 / d) /\ coprime n1 d = true /\ coprime n2 d = true. Proof. Admitted. End putnam_2008_b5.","theory putnam_2008_b5 imports Complex_Main ""HOL-Analysis.Derivative"" begin definition putnam_2008_b5_solution :: ""(real \ real) set"" where ""putnam_2008_b5_solution \ undefined"" (* {f::real\real. (\n::int. f = (\x::real. x + n))} \ {f::real\real. (\n::int. f = (\x::real. -x + n))} *) theorem putnam_2008_b5: fixes fqsat :: ""(real \ real) \ rat \ bool"" and fsat :: ""(real \ real) \ bool"" defines ""fqsat \ (\(f::real\real)(q::rat). f C1_differentiable_on UNIV \ (\p::rat. p = f (real_of_rat q) \ snd (quotient_of p) = snd (quotient_of q)))"" and ""fsat \ (\f::real\real. (\q::rat. fqsat f q))"" shows ""\f::real\real. (fsat f \ f \ putnam_2008_b5_solution)"" sorry end ", putnam_2008_b6,"theorem putnam_2008_b6 (n k : ℕ) (hnk : n > 0 ∧ k > 0) : Odd (Set.ncard {s : Equiv.Perm (Fin n) | klimited k n s}) ↔ (n ≡ 0 [MOD 2*k+1] ∨ n ≡ 1 [MOD 2*k+1]) := sorry","Let $n$ and $k$ be positive integers. Say that a permutation $\sigma$ of $\{1,2,\dots,n\} is $k-limited$ if \|\sigma(i) - i\| \leq k$ for all $i$. Prove that the number of $k-limited$ permutations $\{1,2,\dots,n\}$ is odd if and only if $n \equiv 0$ or $1 (mod 2k+1)$.",,['number_theory'],"Section putnam_2008_b6. Require Import Ensembles Finite_sets Reals. From mathcomp Require Import div fintype seq ssrbool perm. Theorem putnam_2008_b6: forall (n k: nat), n > 0 /\ k > 0 -> let klimited (sigma: {perm 'I_n}) : Prop := forall (i: 'I_n), Rle (Rabs (INR (nat_of_ord (sigma i)) - INR i)) (INR k) in forall (E: Ensemble {perm 'I_n}) (p: {perm 'I_n}), (E p <-> klimited p) -> exists (sz: nat), cardinal {perm 'I_n} E sz /\ Nat.odd sz <-> n mod (2 * k + 1) = 0 \/ n mod (2 * k + 1) = 1. Proof. Admitted. End putnam_2008_b6.","theory putnam_2008_b6 imports Complex_Main ""HOL-Combinatorics.Permutations"" ""HOL-Number_Theory.Cong"" begin (* uses (nat \ nat) instead of (Fin n \ Fin n) *) definition klimited :: ""nat \ nat \ (nat \ nat) \ bool"" where ""klimited \ (\(k::nat)(n::nat)(s::nat\nat). s permutes {0..(n-1)} \ (\i::nat\{0..(n-1)}. \s i - i\ \ k))"" theorem putnam_2008_b6: fixes n k :: nat assumes hnk: ""n > 0 \ k > 0"" shows ""odd (card {s::nat\nat. klimited k n s}) \ ([n = 0] (mod 2*k+1) \ [n = 1] (mod 2*k+1))"" sorry end ", putnam_2021_a1,"abbrev putnam_2021_a1_solution : ℕ := sorry -- 578 theorem putnam_2021_a1 (P : List (ℤ × ℤ) → Prop := fun l : List (ℤ × ℤ) => l.length ≥ 1 ∧ l[0]! = (0, 0) ∧ l[l.length-1]! = (2021, 2021) ∧ ∀ n ∈ Finset.range (l.length-1), Real.sqrt ((l[n]!.1 - l[n + 1]!.1)^2 + (l[n]!.2 - l[n + 1]!.2)^2) = 5) : (∃ l : List (ℤ × ℤ), P l ∧ l.length = putnam_2021_a1_solution) ∧ ∀ l : List (ℤ × ℤ), P l → l.length ≥ putnam_2021_a1_solution := sorry","A grasshopper starts at the origin in the coordinate plane and makes a sequence of hops. Each hop has length $5$, and after each hop the grasshopper is at a point whose coordinates are both integers; thus, there are $12$ possible locations for the grasshopper after the first hop. What is the smallest number of hops needed for the grasshopper to reach the point $(2021, 2021)$?",The answer is $578$.,['geometry'],,"theory putnam_2021_a1 imports Complex_Main begin definition putnam_2021_a1_solution :: nat where ""putnam_2021_a1_solution \ undefined"" (* 578 *) theorem putnam_2021_a1: fixes P :: ""((int \ int) list) \ bool"" assumes ""P \ (\l::(int\int) list. length l \ 1 \ l!0 = (0,0) \ last l = (2021,2021) \ (\n::nat\{0..((length l)-2)}. sqrt ((fst (l!n) - fst (l!(n + 1)))^2 + (snd (l!n) - snd (l!(n + 1)))^2) = 5))"" shows ""(LEAST llen::nat. (\l::(int\int) list. P l \ llen = length l)) = putnam_2021_a1_solution"" sorry end ", putnam_2021_a2,"abbrev putnam_2021_a2_solution : ℝ := sorry -- Real.exp 1 theorem putnam_2021_a2 (g : ℝ → ℝ) (hg : ∀ x > 0, Tendsto (fun r : ℝ => ((x + 1) ^ (r + 1) - x ^ (r + 1)) ^ (1 / r)) (𝓝 0) (𝓝 (g x))) : Tendsto (fun x : ℝ => g x / x) atTop (𝓝 putnam_2021_a2_solution) := sorry","For every positive real number $x$, let $g(x)=\lim_{r \to 0}((x+1)^{r+1}-x^{r+1})^\frac{1}{r}$. Find $\lim_{x \to \infty}\frac{g(x)}{x}$.",Show that the limit is $e$.,['analysis'],"Section putnam_2021_a2. Require Import Reals. From Coquelicot Require Import Continuity Lim_seq Rbar. Local Open Scope R. Definition putnam_2021_a2_solution := exp 1. Theorem putnam_2021_a2: let sequence_r_to_0 (n : nat) : R := 1 / INR n in let f (r x: R) := Rpower (Rpower(x+1)(r+1) - Rpower x (r+1)) 1/r in let g (x : R) : R := Lim_seq (fun n => f (sequence_r_to_0 n) x) in Lim_seq (fun n => (g (INR n))/INR n) = putnam_2021_a2_solution. Proof. Admitted. End putnam_2021_a2.","theory putnam_2021_a2 imports Complex_Main begin definition putnam_2021_a2_solution :: real where ""putnam_2021_a2_solution \ undefined"" (* exp 1 *) theorem putnam_2021_a2: fixes g :: ""real \ real"" assumes hg: ""\x::real>0. filterlim (\r::real. ((x+1) powr (r+1) - x powr (r+1)) powr (1/r)) (nhds (g x)) (nhds 0)"" shows ""filterlim (\x::real. g x / x) (nhds putnam_2021_a2_solution) at_top"" sorry end ", putnam_2021_a4,"abbrev putnam_2021_a4_solution : ℝ := sorry -- ((Real.sqrt 2) / 2) * Real.pi * Real.log 2 theorem putnam_2021_a4 (S : ℝ → Set (Fin 2 → ℝ) := fun R : ℝ => {p : (Fin 2 → ℝ) | (p 0)^2 + (p 1)^2 ≤ R^2}) (I : ℝ → ℝ := fun R : ℝ => ∫ p in S R, (1 + 2*(p 0)^2)/(1 + (p 0)^4 + 6*(p 0)^2*(p 1)^2 + (p 1)^4) - (1 + (p 1)^2)/(2 + (p 0)^4 + (p 1)^4)) : Tendsto I atTop (𝓝 putnam_2021_a4_solution) := sorry","Let \[ I(R) = \iint_{x^2+y^2 \leq R^2} \left( \frac{1+2x^2}{1+x^4+6x^2y^2+y^4} - \frac{1+y^2}{2+x^4+y^4} \right)\,dx\,dy. \] Find \[ \lim_{R \to \infty} I(R), \] or show that this limit does not exist.",The limit exists and equals $\frac{\sqrt{2}}{2} \pi \log 2$.,['analysis'],"Section putnam_2021_a4. Require Import Reals Coquelicot.Coquelicot. Definition putnam_2021_a4_solution := (sqrt 2 / 2) * PI * ln 2 / ln 10. Theorem putnam_2021_a4 (I : nat -> R := fun r => RInt (fun x => RInt (fun y => (1 + 2 * x ^ 2) / (1 + x ^ 4 + 6 * x ^ 2 * y ^ 2 + y ^ 4) - (1 + y ^ 2) / (2 + x ^ 4 + y ^ 4)) 0 (sqrt (INR r ^ 2 - x ^ 2))) 0 1) : ~ ex_lim_seq I \/ Lim_seq I = putnam_2021_a4_solution. Proof. Admitted. End putnam_2021_a4.","theory putnam_2021_a4 imports Complex_Main ""HOL-Analysis.Set_Integral"" ""HOL-Analysis.Lebesgue_Measure"" begin definition putnam_2021_a4_solution :: real where ""putnam_2021_a4_solution \ undefined"" (* ((sqrt 2)/2) * pi * ln 2 *) theorem putnam_2021_a4: fixes S :: ""real \ ((real^2) set)"" and I :: ""real \ real"" assumes ""S \ (\R::real. {p::real^2. (p$1)^2 + (p$2)^2 \ R^2})"" and ""I \ (\R::real. set_lebesgue_integral lebesgue (S R) (\p::real^2. (1 + 2*(p$1)^2)/(1 + (p$1)^4 + 6*(p$1)^2*(p$2)^2 + (p$2)^4) - (1 + (p$2)^2)/(2 + (p$1)^4 + (p$2)^4)))"" shows ""filterlim I (nhds putnam_2021_a4_solution) at_top"" sorry end ", putnam_2021_a5,"abbrev putnam_2021_a5_solution : Set ℕ := sorry -- {j : ℕ | ¬(42 ∣ j) ∧ ¬(46 ∣ j)} theorem putnam_2021_a5 (j : ℕ) (A : Finset ℕ) (S : ℕ → ℕ) (hA : A = {n : ℕ | 1 ≤ n ∧ n ≤ 2021 ∧ Nat.gcd n 2021 = 1}) (hS : ∀ j' : ℕ, S j' = ∑ n in A, n ^ j') : (2021 ∣ S j) ↔ j ∈ putnam_2021_a5_solution := sorry","Let $A$ be the set of all integers $n$ such that $1 \leq n \leq 2021$ and $\gcd(n,2021)=1$. For every nonnegative integer $j$, let $S(j)=\sum_{n \in A}n^j$. Determine all values of $j$ such that $S(j)$ is a multiple of $2021$.",Show that the values of $j$ in question are those not divisible by either $42$ or $46$.,['number_theory'],"Section putnam_2021_a5. Require Import Nat. From mathcomp Require Import bigop div fintype eqtype seq ssrbool ssrnat. Variables (I : finType) (P : pred I). Definition putnam_2021_a5_solution (n: nat) := ~(n%|42 \/ n%|46). Theorem putnam_2021_a5: forall (j: nat), let A : pred 'I_2021 := fun n => let m := nat_of_ord n in ((1 <= m <= 2021) && (gcd m 2021 == 1)) in let B (j: nat) := \sum_(n | A n) (nat_of_ord n)^j in B j mod 2021 = 0 <-> putnam_2021_a5_solution j. Proof. Admitted. End putnam_2021_a5.","theory putnam_2021_a5 imports Complex_Main begin definition putnam_2021_a5_solution :: ""nat set"" where ""putnam_2021_a5_solution \ undefined"" (* {j::nat. \(42 dvd j) \ \(46 dvd j)} *) theorem putnam_2021_a5: fixes j :: nat and A :: ""nat set"" and S :: ""nat \ nat"" assumes hA : ""A = {n::nat. 1 \ n \ n \ 2021 \ gcd n 2021 = 1}"" and hS : ""\j'::nat. S j' = (\n\A. n^j')"" shows ""(2021 dvd (S j)) \ j \ putnam_2021_a5_solution"" sorry end ", putnam_2021_a6,"abbrev putnam_2021_a6_solution : Prop := sorry -- True theorem putnam_2021_a6 (Pcoeff : Polynomial ℤ → Prop) (Pprod : Polynomial ℤ → Prop) (hPcoeff : ∀ P : Polynomial ℤ, Pcoeff P = (∀ n : ℕ, P.coeff n = 0 ∨ P.coeff n = 1)) (hPprod : ∀ P : Polynomial ℤ, Pprod P = (∃ Q R : Polynomial ℤ, Q.degree > 0 ∧ R.degree > 0 ∧ P = Q * R)) : (∀ P : Polynomial ℤ, (Pcoeff P ∧ Pprod P) → (P.eval 2 ≠ 0 ∧ P.eval 2 ≠ 1 ∧ ¬Prime (P.eval 2))) ↔ putnam_2021_a6_solution := sorry",Let $P(x)$ be a polynomial whose coefficients are all either $0$ or $1$. Suppose that $P(x)$ can be written as a product of two nonconstant polynomials with integer coefficients. Does it follow that $P(2)$ is a composite integer?,Show that it does follow that $P(2)$ is a composite integer.,"['number_theory', 'algebra']","Section putnam_2021_a6. From mathcomp Require Import seq ssrnat ssrnum ssralg poly. Local Open Scope ring_scope. Definition putnam_2021_a6_solution := True. Theorem putnam_2021_a6: forall (R: numDomainType) (p: {poly R}) (i: nat), p`_i = 0 /\ p`_i = 1 -> exists (q r: {poly R}), size p <> 0%nat /\ size q <> 0%nat -> p = q * r <-> putnam_2021_a6_solution . Proof. Admitted. End putnam_2021_a6.","theory putnam_2021_a6 imports Complex_Main ""HOL-Computational_Algebra.Polynomial"" begin definition putnam_2021_a6_solution :: bool where ""putnam_2021_a6_solution \ undefined"" (* True *) theorem putnam_2021_a6: fixes Pcoeff :: ""int poly \ bool"" and Pprod :: ""int poly \ bool"" assumes hPcoeff: ""\P::int poly. Pcoeff P = (\n::nat. coeff P n = 0 \ coeff P n = 1)"" and hPprod: ""\p::int poly. Pprod P = (\Q R::int poly. degree Q > 0 \ degree R > 0 \ P = Q * R)"" shows ""(\p::int poly. (Pcoeff P \ Pprod P) \ (poly P 2 \ 0 \ poly P 2 \ 1 \ \prime (poly P 2))) \ putnam_2021_a6_solution"" sorry end ", putnam_2021_b2,"abbrev putnam_2021_b2_solution : ℝ := sorry -- 2 / 3 theorem putnam_2021_b2 (S : (ℕ → ℝ) → ℝ) (asum : (ℕ → ℝ) → Prop) (hS : ∀ a : ℕ → ℝ, S a = ∑' n : ℕ, (n + 1) / 2 ^ (n + 1) * (∏ k : Fin (n + 1), a k.1) ^ ((1 : ℝ) / (n + 1))) (hasum : ∀ a : ℕ → ℝ, asum a = (∀ k : ℕ, a k ≥ 0) ∧ ∑' k : ℕ, a k = 1) : (∃ a : ℕ → ℝ, asum a ∧ S a = putnam_2021_b2_solution) ∧ (∀ a : ℕ → ℝ, asum a → S a ≤ putnam_2021_b2_solution) := sorry","Determine the maximum value of the sum $S = \sum_{n=1}^\infty \frac{n}{2^n}(a_1a_2 \dots a_n)^{1/n}$ over all sequences $a_1,a_2,a_3,\dots$ of nonnegative real numbers satisfying $\sum_{k=1}^\infty a_k=1$.",Show that the answer is $2/3$.,['analysis'],"Section putnam_2021_b2. Require Import List Reals Coquelicot.Hierarchy Coquelicot.Series. Definition putnam_2021_b2_solution := 2/3. Theorem putnam_2021_b2: let A (a : nat -> R) (n : nat) : R := fold_left Rmult (map a (seq 0 n)) 1 in let B (a : nat -> R) := Series (fun n => INR n * (Rpower (A a n) 1/(INR n))) in (forall (a : nat -> R), (forall (i: nat), a i >= 0) /\ Series a = 1 -> putnam_2021_b2_solution >= B a) /\ (exists (a : nat -> R), (forall (i: nat), a i >= 0) /\ Series a = 1 -> putnam_2021_b2_solution = B a). Proof. Admitted. End putnam_2021_b2.","theory putnam_2021_b2 imports Complex_Main begin definition putnam_2021_b2_solution :: real where ""putnam_2021_b2_solution \ undefined"" (* 2/3 *) theorem putnam_2021_b2: fixes S :: ""(nat \ real) \ real"" and asum :: ""(nat \ real) \ bool"" defines ""S \ \a. (\n::nat. ((n+1)/2^(n+1)) * (\k::nat=0..n. a k) powr (1/(n+1)))"" and ""asum \ \a. (\k::nat. a k \ 0) \ (\k::nat. a k) = 1"" shows ""(GREATEST Sa::real. (\a::nat\real. asum a \ S a = Sa)) = putnam_2021_b2_solution"" sorry end ", putnam_2021_b4,"theorem putnam_2021_b4 (F : ℕ → ℕ) (hF : ∀ x, x ≥ 2 → F x = F (x - 1) + F (x - 2)) (F01 : F 0 = 0 ∧ F 1 = 1) : ∀ m, m > 2 → (∃ p, (∏ k : Set.Icc 1 (F m - 1), (k.1 ^ k.1)) % F m = F p) := sorry","Let $F_0, F_1, \ldots$ be the sequence of Fibonacci numbers, with $F_0 = 0$, $F_1 = 1$, and $F_n = F_{n-1} + F_{n-2}$ for $n \geq 2$. For $m > 2$, let $R_m$ be the remainder when the product $\prod_{k=1}^{F_{m-1}} k^k$ is divided by $F_m$. Prove that $R_m$ is also a Fibonacci number.",,['number_theory'],"Section putnam_2021_b4. Require Import PeanoNat. From mathcomp Require Import bigop fintype ssrnat. Theorem putnam_2021_b4: let F := fix f (n: nat) : nat := match n with | O => O | S O => 1 | S ((S n'') as n') => f n' + f n'' end in forall (m: nat), m > 2 = true -> exists (p: nat), (\prod_(k < (F m)) k^k) mod (F m) = F p. Proof. Admitted. End putnam_2021_b4.","theory putnam_2021_b4 imports Complex_Main begin theorem putnam_2021_b4: fixes f :: ""nat\nat"" assumes hf : ""\x\2. f x = f (x-1) + f (x-2)"" and f01 : ""f 0 = 0 \ f 1 = 1"" shows ""\m > 2. \p. (\k=1..(f m - 1). k^k) mod f m = f p"" sorry end ", putnam_1972_a1,"theorem putnam_1972_a1 (n : ℕ) (hn : n > 0) (fourAP : ℤ → ℤ → ℤ → ℤ → Prop := fun n1 n2 n3 n4 => ∃ o1 o2 o3 o4 : ℤ, {n1, n2, n3, n4} = ({o1, o2, o3, o4} : Set ℤ) ∧ o1 ≤ o2 ∧ o2 ≤ o3 ∧ o3 ≤ o4 ∧ o4-o3 = o3-o2 ∧ o3-o2 = o2-o1) : ¬ ∃ r : ℕ, r > 0 ∧ r + 3 ≤ n ∧ fourAP (n.choose r) (n.choose (r+1)) (n.choose (r+2)) (n.choose (r+3)) := sorry","Show that there are no four consecutive binomial coefficients ${n \choose r}, {n \choose (r+1)}, {n \choose (r+2)}, {n \choose (r+3)}$ where $n,r$ are positive integers and $r+3 \leq n$, which are in arithmetic progression.",,['algebra'],,"theory putnam_1972_a1 imports Complex_Main begin theorem putnam_1972_a1: fixes n :: nat and fourAP :: ""nat \ nat \ nat \ nat \ bool"" assumes hn: ""n > 0"" defines ""fourAP \ (\n1 n2 n3 n4::nat. (\o1 o2 o3 o4::nat. {n1,n2,n3,n4} = {o1,o2,o3,o4} \ o1 \ o2 \ o2 \ o3 \ o3 \ o4 \ o4-o3 = o3-o2 \ o3-o2 = o2-o1))"" shows ""\(\r::nat. r > 0 \ r + 3 \ n \ fourAP (n choose r) (n choose (r+1)) (n choose (r+2)) (n choose (r+3)))"" sorry end ", putnam_1972_a2,"theorem putnam_1972_a2 : (∀ (S : Type*) (_ : Mul S), (∀ x y : S, x * (x * y) = y ∧ ((y * x) * x) = y) → (∀ x y : S, x * y = y * x)) ∧ ∃ (S : Type*) (_ : Mul S), (∀ x y : S, x * (x * y) = y ∧ ((y * x) * x) = y) ∧ ¬(∀ x y z : S, x * (y * z) = (x * y) * z) := sorry","Let $S$ be a set and $\cdot$ be a binary operation on $S$ satisfying: (1) for all $x,y$ in $S$, $x \cdot (x \cdot y) = y$ (2) for all $x,y$ in $S$, $(y \cdot x) \cdot x = y$. Show that $\cdot$ is commutative but not necessarily associative.",,['abstract_algebra'],,"theory putnam_1972_a2 imports Complex_Main begin (* The existential magma can have at most the cardinality of the real numbers. *) theorem putnam_1972_a2: assumes pauncount: ""\pamap::'a\real. surj pamap"" shows ""(\(S::'a set)(Smul::'a\'a\'a). (\x\S. \y\S. (Smul x y \ S) \ Smul x (Smul x y) = y \ Smul (Smul y x) x = y) \ (\x\S. \y\S. Smul x y = Smul y x)) \ (\(S::'a set)(Smul::'a\'a\'a). (\x\S. \y\S. (Smul x y \ S) \ Smul x (Smul x y) = y \ Smul (Smul y x) x = y) \ \(\x\S. \y\S. \z\S. Smul x (Smul y z) = Smul (Smul x y) z))"" sorry end ", putnam_1972_a3,"abbrev putnam_1972_a3_solution : Set (ℝ → ℝ) := sorry -- {f | ∃ A B : ℝ, ∀ x ∈ Set.Icc 0 1, f x = A * x + B} theorem putnam_1972_a3 (x : ℕ → ℝ) (climit_exists : (ℕ → ℝ) → Prop := fun x => ∃ C : ℝ, Tendsto (fun n => (∑ i in Finset.range n, (x i))/(n : ℝ)) atTop (𝓝 C)) (supercontinuous : (ℝ → ℝ) → Prop := fun f => ∀ (x : ℕ → ℝ), (∀ i : ℕ, x i ∈ Icc 0 1) → climit_exists x → climit_exists (fun i => f (x i))) : {f | supercontinuous f} = putnam_1972_a3_solution := sorry","We call a function $f$ from $[0,1]$ to the reals to be supercontinuous on $[0,1]$ if the Cesaro-limit exists for the sequence $f(x_1), f(x_2), f(x_3), \dots$ whenever it does for the sequence $x_1, x_2, x_3 \dots$. Find all supercontinuous functions on $[0,1]$.",Show that the solution is the set of affine functions.,['analysis'],,"theory putnam_1972_a3 imports Complex_Main begin (* uses (real \ real) instead of ({0..1} \ real) *) definition putnam_1972_a3_solution :: ""(real \ real) set"" where ""putnam_1972_a3_solution \ undefined"" (* {f::real\real. (\A B::real. \x::real\{0..1}. f x = A*x + B)} *) theorem putnam_1972_a3: fixes x :: ""nat \ real"" and climit_exists :: ""(nat \ real) \ bool"" and supercontinuous :: ""(real \ real) \ bool"" defines ""climit_exists \ (\x::nat\real. (\C::real. filterlim (\n::nat. (\i::nat\{0..(n-1)}. x i)/n) (nhds C) at_top))"" and ""supercontinuous \ (\f::real\real. (\x::nat\real. ((\i::nat. x i \ {0..1}) \ climit_exists x \ climit_exists (\i::nat. f (x i)))))"" shows ""{f::real\real. supercontinuous f} = putnam_1972_a3_solution"" sorry end ", putnam_1972_a5,"theorem putnam_1972_a5 (n : ℕ) (hn : n > 1) : ¬((n : ℤ) ∣ 2^n - 1) := sorry","Show that if $n$ is an integer greater than $1$, then $n$ does not divide $2^n - 1$.",,['number_theory'],,"theory putnam_1972_a5 imports Complex_Main begin theorem putnam_1972_a5: fixes n :: nat assumes hn: ""n > 1"" shows ""\(n dvd (2^n - 1))"" sorry end ", putnam_1972_a6,"theorem putnam_1972_a6 (f : ℝ → ℝ) (n : ℤ) (hn : n ≥ 0) (hfintegrable: IntegrableOn f (Icc 0 1)) (hfint : ∀ i ∈ Icc 0 (n-1), ∫ x in Icc 0 1, x^i*(f x) = 0) (hfintlast : ∫ x in Icc 0 1, x^n*(f x) = 1) : ∃ S, S ⊆ Icc (0 : ℝ) 1 ∧ MeasurableSet S ∧ volume S > 0 ∧ ∀ x ∈ S, |f x| ≥ 2^n * (n + 1) := sorry","Let $f$ be an integrable function in $0 \leq x \leq 1$ and suppose for all $0 \leq i \leq n-1, \int_0^1 x^i f(x) dx = 0$. Further suppose that $\int_0^1 x^n f(x) dx = 1$. Show that $|f(x)| \geq 2^n(n+1)$ on a set of positive measure.",,['analysis'],,"theory putnam_1972_a6 imports Complex_Main ""HOL-Analysis.Interval_Integral"" begin theorem putnam_1972_a6: fixes f :: ""real \ real"" and n :: nat assumes hfintegrable: ""interval_lebesgue_integrable lebesgue 0 1 f"" and hfint: ""\i::nat\{0..(n-1)}. interval_lebesgue_integral lebesgue 0 1 (\x::real. x^i * (f x)) = 0"" and hfintlast: ""interval_lebesgue_integral lebesgue 0 1 (\x::real. x^n * (f x)) = 1"" shows ""\S::real set. S \ {0..1} \ S \ (sets lebesgue) \ emeasure lebesgue S > 0 \ (\x\S. \f x\ \ 2^n*(n + 1))"" sorry end ", putnam_1972_b1,"theorem putnam_1972_b1 (S : ℝ → ℝ := fun x : ℝ => ∑' n : ℕ, x^n * (x - 1)^(2*n) / (Nat.factorial n)) (p : ℕ → ℝ) (hp : ∃ a : ℝ, a > 0 ∧ ∀ x ∈ ball 0 a, ∑' n : ℕ, (p n)*x^n = S x) : ¬∃ n : ℕ, p n = 0 ∧ p (n + 1) = 0 ∧ p (n + 2) = 0 := sorry",Prove that no three consecutive coefficients of the power series of $$\sum_{n = 0}^{\infty} \frac{x^n(x - 1)^{2n}}{n!}$$ all equal $0$.,,['analysis'],,"theory putnam_1972_b1 imports Complex_Main begin theorem putnam_1972_b1: fixes S :: ""real \ real"" and p :: ""nat \ real"" defines ""S \ (\x::real. (\n::nat. x^n * (x - 1)^(2*n) / (fact n)))"" assumes hp: ""\a::real>0. \x::real\(ball 0 a). (\n::nat. (p n)*x^n) = S x"" shows ""\(\n::nat. p n = 0 \ p (n + 1) = 0 \ p (n + 2) = 0)"" sorry end ", putnam_1972_b3,"theorem putnam_1972_b3 (G : Type*) [Group G] (A B : G) (hab : A * B * A = B * A^2 * B ∧ A^3 = 1 ∧ (∃ n : ℤ, n > 0 ∧ B^(2*n - 1) = 1)) : B = 1 := sorry","Let $A$ and $B$ be two elements in a group such that $ABA = BA^2B$, $A^3 = 1$, and $B^{2n-1} = 1$ for some positive integer $n$. Prove that $B = 1$.",,['abstract_algebra'],,"theory putnam_1972_b3 imports Complex_Main ""HOL-Algebra.Group"" begin theorem putnam_1972_b3: fixes G (structure) and A B :: 'a assumes Ggroup: ""group G"" and abinG: ""A \ carrier G \ B \ carrier G"" and hab: ""A\B\A = B\A[^]2\B \ A[^]3 = \ \ (\n::nat. n > 0 \ B[^](2*n-1) = \)"" shows ""B = \"" sorry end ", putnam_1972_b4,"theorem putnam_1972_b4 (n : ℤ) (hn : n > 1) (vars : ℝ → ℝ → ℝ → (Fin 3 → ℝ) := fun a b c ↦ fun i ↦ ite (i = 0) a (ite (i = 1) b c)) : ∃ P : MvPolynomial (Fin 3) ℝ, ∀ x : ℝ, x = MvPolynomial.eval (vars (x^n) (x^(n+1)) (x + x^(n+2))) P := sorry","Let $n \geq 2$ be an integer. Show that there exists a polynomial $P(x,y,z)$ with integral coefficients such that $x \equiv P(x^n, x^{n+1}, x + x^{n+2})$.",,['algebra'],,"theory putnam_1972_b4 imports Complex_Main ""HOL-Computational_Algebra.Polynomial"" begin theorem putnam_1972_b4: fixes n :: nat assumes hn: ""n > 1"" shows ""\P::real poly poly poly. \x::real. x = poly (poly (poly P (monom (monom (x + x^(n+2)) 0) 0)) (monom (x^(n+1)) 0)) (x^n)"" sorry end ", putnam_1972_b6,"theorem putnam_1972_b6 (k : ℕ) (hk : k ≥ 1) (n : Fin k → ℤ) (hn : ∀ i : Fin k, n i > 0) (hn' : ∀ i j : Fin k, i < j → n i < n j) (zpoly : ℂ → ℂ := fun z => 1 + ∑ i : Fin k, z^(n i)) : ∀ z : ℂ, z ∈ ball 0 ((Real.sqrt 5 - 1)/2) → zpoly z ≠ 0 := sorry",Let $n_1 < n_2 < \dots < n_k$ be a set of positive integers. Prove that the polynomail $1 + z^{n_1} + z^{n_2} + \dots + z^{n_k}$ has not roots inside the circle $|z| < (\frac{\sqrt{5}-1}{2}$.,,['analysis'],,"theory putnam_1972_b6 imports Complex_Main begin (* uses (nat \ nat) instead of (Fin k \ nat) *) theorem putnam_1972_b6: fixes k :: nat and n :: ""nat \ nat"" and zpoly :: ""complex \ complex"" assumes hk: ""k \ 1"" and hn: ""\i::nat\{0..(k-1)}. n i > 0"" and hn': ""\i::nat\{0..(k-1)}. \j::nat\{0..(k-1)}. (i < j \ n i < n j)"" defines ""zpoly \ (\z::complex. 1 + (\i::nat=0..(k-1). z^(n i)))"" shows ""\z::complex. (z \ ball 0 ((sqrt 5 - 1)/2) \ zpoly z \ 0)"" sorry end ", putnam_1971_a1,"theorem putnam_1971_a1 (S : Set (ℤ × ℤ × ℤ)) (hS : S.ncard = 9) (L : (ℤ × ℤ × ℤ) × (ℤ × ℤ × ℤ) → Set (ℝ × ℝ × ℝ) := fun ((a, b, c), (d, e, f)) => {(t*a + (1-t)*d, t*b + (1-t)*e, t*c + (1-t)*f) | t ∈ Ioo (0 : ℝ) 1}) : ∃ x y z : ℤ, ∃ P Q : ℤ × ℤ × ℤ, P ∈ S ∧ Q ∈ S ∧ P ≠ Q ∧ ((x : ℝ), (y : ℝ), (z : ℝ)) ∈ L (P, Q) := sorry",Let $S$ be a set of $9$ lattice points (points with integer coordinates) in $3$-dimensional Euclidean space. Prove that there exists a lattice point along the interior of some line segment that joins two distinct points in $S$.,,"['geometry', 'combinatorics']",,"theory putnam_1971_a1 imports Complex_Main begin theorem putnam_1971_a1: fixes S :: ""(int \ int \ int) set"" and L :: ""((int \ int \ int) \ (int \ int \ int)) \ ((real \ real \ real) set)"" assumes hS: ""card S = 9"" defines ""L \ (\((a::int,b::int,c::int),(d::int,e::int,f::int)). {(ad::real,be::real,cf::real). (\t::real\{0<..<1}. ad = t*a + (1-t)*d \ be = t*b + (1-t)*e \ cf = t*c + (1-t)*f)})"" shows ""\x y z::int. \P\S. \Q\S. P \ Q \ (x,y,z) \ L (P,Q)"" sorry end ", putnam_1971_a2,"abbrev putnam_1971_a2_solution : Set (Polynomial ℝ) := sorry -- {Polynomial.X} theorem putnam_1971_a2 : ∀ P : Polynomial ℝ, (P.eval 0 = 0 ∧ (∀ x : ℝ, P.eval (x^2 + 1) = (P.eval x)^2 + 1)) ↔ P ∈ putnam_1971_a2_solution := sorry",Determine all polynomials $P(x)$ such that $P(x^2 + 1) = (P(x))^2 + 1$ and $P(0) = 0$.,Show that the only such polynomial is the identity function.,['algebra'],,"theory putnam_1971_a2 imports Complex_Main ""HOL-Computational_Algebra.Polynomial"" begin definition putnam_1971_a2_solution :: ""(real poly) set"" where ""putnam_1971_a2_solution \ undefined"" (* {monom 1 1} *) theorem putnam_1971_a2: shows ""\P::real poly. ((poly P 0 = 0 \ (\x::real. poly P (x^2 + 1) = (poly P x)^2 + 1)) \ P \ putnam_1971_a2_solution)"" sorry end ", putnam_1971_a3,"theorem putnam_1971_a3 (a b c : ℝ × ℝ) (R : ℝ) (habclattice : a.1 = round a.1 ∧ a.2 = round a.2 ∧ b.1 = round b.1 ∧ b.2 = round b.2 ∧ c.1 = round c.1 ∧ c.2 = round c.2) (habcneq : a ≠ b ∧ a ≠ c ∧ b ≠ c) (oncircle : (ℝ × ℝ) → ℝ → (ℝ × ℝ) → Prop := fun C r p => Euclidean.dist p C = r) (hcircle : ∃ C : ℝ × ℝ, oncircle C R a ∧ oncircle C R b ∧ oncircle C R c) : (Euclidean.dist a b) * (Euclidean.dist a c) * (Euclidean.dist b c) ≥ 2 * R := sorry","The three vertices of a triangle of sides $a,b,c$ are lattice points and lie on a circle of radius $R$. Show that $abc \geq 2R$.",,['geometry'],,"theory putnam_1971_a3 imports Complex_Main ""HOL-Analysis.Finite_Cartesian_Product"" begin theorem putnam_1971_a3: fixes a b c :: ""real^2"" and oncircle :: ""(real^2) \ real \ (real^2) \ bool"" and R :: real assumes habclattice: ""a$1 = round (a$1) \ a$2 = round (a$2) \ b$1 = round (b$1) \ b$2 = round (b$2) \ c$1 = round (c$1) \ c$2 = round (c$2)"" and habcneq: ""a \ b \ a \ c \ b \ c"" defines ""oncircle \ (\(C::real^2)(r::real)(p::real^2). (dist p C = r))"" assumes hcircle: ""\C::real^2. oncircle C R a \ oncircle C R b \ oncircle C R c"" shows ""(dist a b) * (dist a c) * (dist b c) \ 2*R"" sorry end ", putnam_1971_a4,"theorem putnam_1971_a4 (ε : ℝ) (hε : 0 < ε ∧ ε < 1) (P : ℕ → ℝ → MvPolynomial (Fin 2) ℝ := fun n δ => (MvPolynomial.X 0 + MvPolynomial.X 1)^n * ((MvPolynomial.X 0)^2 - (MvPolynomial.C (2 - δ))*(MvPolynomial.X 0)*(MvPolynomial.X 1) + (MvPolynomial.X 1)^2)) : ∃ N : ℕ, ∀ n ≥ N, ∀ i : Fin 2 →₀ ℕ, MvPolynomial.coeff i (P n ε) > 0 := sorry","Show that for $\epsilon \in (0,1)$, the expression $(x + y)^n (x^2 - 2-\epsilon)xy + y^2)$ is a polynomial with positive coefficients for $n$ sufficiently large, where $n$ is an integer. ",,['analysis'],,"theory putnam_1971_a4 imports Complex_Main ""HOL-Computational_Algebra.Polynomial"" begin theorem putnam_1971_a4: fixes \ :: real and P :: ""nat \ real \ (real poly poly)"" assumes h\: ""0 < \ \ \ < 1"" defines ""P \ (\(n::nat)(\::real). (monom (monom 1 1) 0 + monom (monom 1 0) 1)^n * ((monom (monom 1 1) 0)^2 - (monom (monom (2 - \) 0) 0)*(monom (monom 1 1) 1) + (monom (monom 1 0) 1)^2))"" shows ""\N::nat. \n::nat\N. (\i j::nat. coeff (coeff (P n \) j) i > 0)"" sorry end ", putnam_1971_a6,"theorem putnam_1971_a6 (c : ℝ) (hc : ∀ n : ℤ, n > 0 → ∃ m : ℤ, (n : ℝ)^c = m) : ∃ m : ℕ, c = m := sorry",Let $c$ be a real number such that $n^c$ is an integer for every positive integer $n$. Show that $c$ is a non-negative integer.,,['number_theory'],,"theory putnam_1971_a6 imports Complex_Main begin theorem putnam_1971_a6: fixes c :: real assumes hc: ""\n::nat. (n > 0 \ (\m::int. n powr c = m))"" shows ""\m::nat. c = m"" sorry end ", putnam_1971_b1,"theorem putnam_1971_b1 (S : Type*) [Mul S] (hself : ∀ x : S, x * x = x) (h2 : ∀ x y z : S, (x * y) * z = (y * z) * x) : ∀ x y z : S, (x * y) * z = x * (y * z) ∧ x * y = y * x := sorry","Let $S$ be a set and let $\cdot$ be a binary operation on $S$ satisfying the two following laws: (1) for all $x$ in $S$, $x = x \cdot x$, (2) for all $x,y,z$ in $S$, $(x \cdot y) \cdot z) = (y \cdot z) \cdot x$. Show that $\cdot$ is associative and commutative. ",,['abstract_algebra'],,"theory putnam_1971_b1 imports Complex_Main begin theorem putnam_1971_b1: fixes Smul :: ""'S \ 'S \ 'S"" (infixl ""\<^bold>*"" 70) assumes hself: ""\x::'S. x \<^bold>* x = x"" and h2: ""\x y z::'S. (x \<^bold>* y) \<^bold>* z = (y \<^bold>* z) \<^bold>* x"" shows ""\x y z::'S. (x \<^bold>* y) \<^bold>* z = x \<^bold>* (y \<^bold>* z) \ x \<^bold>* y = y \<^bold>* x"" sorry end ", putnam_1971_b2,"abbrev putnam_1971_b2_solution : Set (ℝ → ℝ) := sorry -- {fun x : ℝ => (x^3 - x^2 - 1)/(2 * x * (x - 1))} theorem putnam_1971_b2 (S : Set ℝ := univ \ {0, 1}) (P : (ℝ → ℝ) → Prop := fun (F : ℝ → ℝ) => ∀ x ∈ S, F x + F ((x - 1)/x) = 1 + x) : (∀ F ∈ putnam_1971_b2_solution, P F) ∧ ∀ f : ℝ → ℝ, P f → ∃ F ∈ putnam_1971_b2_solution, (∀ x ∈ S, f x = F x) := sorry","Find all functions $F : \mathbb{R} \setminus \{0, 1\} \to \mathbb{R}$ that satisfy $F(x) + F\left(\frac{x - 1}{x}\right) = 1 + x$ for all $x \in \mathbb{R} \setminus \{0, 1\}$.",The only such function is $F(x) = \frac{x^3 - x^2 - 1}{2x(x - 1)}$.,['algebra'],,"theory putnam_1971_b2 imports Complex_Main begin definition putnam_1971_b2_solution :: ""(real \ real) set"" where ""putnam_1971_b2_solution \ undefined"" (* {(\x::real. (x^3 - x^2 - 1) / (2*x*(x - 1)))} *) theorem putnam_1971_b2: fixes S :: ""real set"" and P :: ""(real \ real) \ bool"" defines ""S \ UNIV - {0,1}"" and ""P \ (\F::real\real. (\x\S. F x + F ((x-1)/x) = 1 + x))"" shows ""(\F\putnam_1971_b2_solution. P F) \ (\f::real\real. (P f \ (\F\putnam_1971_b2_solution. (\x\S. f x = F x))))"" sorry end ", putnam_1971_b6,"theorem putnam_1971_b6 (δ : ℤ → ℤ := fun n => sSup {t | Odd t ∧ t ∣ n}) : ∀ x : ℤ, x > 0 → |∑ i in Finset.Icc 1 x, (δ i)/(i : ℚ) - 2*x/3| < 1 := sorry",Let $\delta(x) be the greatest odd divisor of the positive integer $x$. Show that $|\sum_{n = 1}^x \delta(n)/n - 2x/3| < 1$ for all positive integers $x$.,,['number_theory'],,"theory putnam_1971_b6 imports Complex_Main begin theorem putnam_1971_b6: fixes \ :: ""nat \ nat"" defines ""\ \ (\n::nat. (GREATEST t::nat. odd t \ t dvd n))"" shows ""\x::nat. (x > 0 \ \(\i::nat=1..x. (\ i)/i) - 2*x/3\ < 1)"" sorry end ", putnam_1999_a1,"abbrev putnam_1999_a1_solution : Prop := sorry -- True theorem putnam_1999_a1 : putnam_1999_a1_solution ↔ ∃ f g h : Polynomial ℝ, ∀ x : ℝ, |f.eval x| - |g.eval x| + h.eval x = if x < -1 then -1 else (if (x ≤ 0) then 3 * x + 2 else -2 * x + 2) := sorry","Find polynomials $f(x)$,$g(x)$, and $h(x)$, if they exist, such that for all $x$, \[|f(x)|-|g(x)|+h(x) = \begin{cases} -1 & \mbox{if $x<-1$} \\3x+2 & \mbox{if $-1 \leq x \leq 0$} \\-2x+2 & \mbox{if $x>0$.}\end{cases}\]?",Show that the answer is such functions do exist.,['algebra'],,"theory putnam_1999_a1 imports Complex_Main ""HOL-Computational_Algebra.Polynomial"" begin (* Note: The actual problem asks to ""find"" such polynomials as well - but the solution does not give a set of all possible solutions *) (* So we would need to do the analysis ourselves, the following formalization should work. *) definition putnam_1999_a1_solution :: bool where ""putnam_1999_a1_solution \ undefined"" (* True *) theorem putnam_1999_a1: shows ""putnam_1999_a1_solution \ (\ f g h :: real poly. \ x :: real. \poly f x\ - \poly g x\ + poly h x = (if x < -1 then -1 else (if x \ 0 then 3 * x + 2 else -2 * x + 2)))"" sorry end", putnam_1999_a2,"theorem putnam_1999_a2 (p : Polynomial ℝ) (hp : ∀ x : ℝ, p.eval x ≥ 0) : ∃ k : ℕ, ∃ f : Fin k → Polynomial ℝ, k > 0 ∧ ∀ x : ℝ, p.eval x = ∑ j : Fin k, ((f j).eval x) ^ 2 := sorry","Let $p(x)$ be a polynomial that is nonnegative for all real $x$. Prove that for some $k$, there are polynomials $f_1(x),\dots,f_k(x$) such that \[p(x) = \sum_{j=1}^k (f_j(x))^2.\]",,['algebra'],,"theory putnam_1999_a2 imports Complex_Main ""HOL-Computational_Algebra.Polynomial"" begin theorem putnam_1999_a2: fixes p :: ""real poly"" assumes hpos : ""\x. poly p x \ 0"" shows ""\S :: real poly set . \x. finite S \ poly p x = (\s \ S. (poly s x)^2)"" sorry end ", putnam_1999_a3,"theorem putnam_1999_a3 (f : ℝ → ℝ := fun x => 1/(1 - 2 * x - x^2)) (a : ℕ → ℝ) (hf : ∃ ε > 0, ∀ x ∈ ball 0 ε, Tendsto (λ n => ∑ i in Finset.range n, (a n) * x^n) atTop (𝓝 (f x))) : ∀ n : ℕ, ∃ m : ℕ, (a n)^2 + (a (n + 1))^2 = a m := sorry","Consider the power series expansion \[\frac{1}{1-2x-x^2} = \sum_{n=0}^\infty a_n x^n.\] Prove that, for each integer $n\geq 0$, there is an integer $m$ such that \[a_n^2 + a_{n+1}^2 = a_m .\]",,['algebra'],,"theory putnam_1999_a3 imports Complex_Main ""HOL-Analysis.Elementary_Metric_Spaces"" begin theorem putnam_1999_a3: fixes f :: ""real \ real"" and a :: ""nat \ real"" defines ""f \ \ x. 1 / (1 - 2 * x - x ^ 2)"" assumes hf: ""\ \ > 0. \ x \ ball 0 \. (\ n :: nat. (a n) * x ^ n) = f x"" shows ""\ n :: nat. \ m :: nat. (a n) ^ 2 + (a (n + 1)) ^ 2 = a m"" sorry end ", putnam_1999_a4,"abbrev putnam_1999_a4_solution : ℝ := sorry -- 9/32 theorem putnam_1999_a4 : Tendsto (fun i => ∑ m in Finset.range i, ∑' n : ℕ, (((m + 1)^2*(n+1))/(3^(m + 1) * ((n+1)*3^(m + 1) + (m + 1)*3^(n+1))) : ℝ)) atTop (𝓝 putnam_1999_a4_solution) := sorry",Sum the series \[\sum_{m=1}^\infty \sum_{n=1}^\infty \frac{m^2 n}{3^m(n3^m+m3^n)}.\],Show that the solution is 9/32.,['number_theory'],"Section putnam_1999_a4. Require Import Reals Coquelicot.Coquelicot. Definition putnam_1999_a4_solution := 1. Theorem putnam_1999_a4: let f (m n: nat) := INR ((m + 1) ^ 2 * n) / INR (3 ^ m * (n * 3 ^ m + m * 3 ^ n)) in let fn (n: nat) := Lim_seq (fun mInc => sum_n (fun m => f m n) mInc) in Lim_seq (fun nInc => sum_n (fun n => (real (fn n))) nInc) = putnam_1999_a4_solution. Proof. Admitted. End putnam_1999_a4.","theory putnam_1999_a4 imports Complex_Main begin definition putnam_1999_a4_solution :: real where ""putnam_1999_a4_solution \ undefined"" (* 9 / 32 *) theorem putnam_1999_a4: shows ""(\ m :: nat. \ n :: nat. (m + 1) ^ 2 * (n + 1) / (3 ^ (m + 1) * ((n + 1) * 3 ^ (m + 1) + (m + 1) * 3 ^ (n + 1)))) = putnam_1999_a4_solution"" sorry end", putnam_1999_a5,"theorem putnam_1999_a5 : ∃ C : ℝ, ∀ p : Polynomial ℝ, p.degree = 1999 → ‖p.eval 0‖ ≤ C * ∫ x in (-1)..1, ‖p.eval x‖ := sorry","Prove that there is a constant $C$ such that, if $p(x)$ is a polynomial of degree 1999, then \[|p(0)|\leq C \int_{-1}^1 |p(x)|\,dx.\]",,['analysis'],"Section putnam_1999_a5. Require Import Reals Coquelicot.Coquelicot. Theorem putnam_1999_a5: let p (a: nat -> R) (x: R) := sum_n (fun i => a i * x ^ i) 2000 in forall (a: nat -> R), exists (c: R), Rabs (p a 0) <= c * RInt (fun x => Rabs (p a x)) (-1) 1. Proof. Admitted. End putnam_1999_a5.","theory putnam_1999_a5 imports Complex_Main ""HOL-Computational_Algebra.Polynomial"" ""HOL-Analysis.Interval_Integral"" begin theorem putnam_1999_a5: shows ""\ C :: real. \ p :: real poly. degree p = 1999 \ \poly p 0\ \ C * (interval_lebesgue_integral lebesgue (-1) 1 (\ x. \poly p x\))"" sorry end", putnam_1999_a6,"theorem putnam_1999_a6 (a : ℤ → ℝ) (ha1 : a 1 = 1) (ha2 : a 2 = 2) (ha3 : a 3 = 24) (hange4 : ∀ n : ℕ, n ≥ 4 → a n = (6 * (a (n - 1))^2 * (a (n - 3)) - 8 * (a (n - 1)) * (a (n - 2))^2)/(a (n - 2) * a (n - 3))) : ∀ n, n ≥ 1 → (∃ k : ℤ, a n = k * n) := sorry","The sequence $(a_n)_{n\geq 1}$ is defined by $a_1=1, a_2=2, a_3=24,$ and, for $n\geq 4$, \[a_n = \frac{6a_{n-1}^2a_{n-3} - 8a_{n-1}a_{n-2}^2}{a_{n-2}a_{n-3}}.\] Show that, for all n, $a_n$ is an integer multiple of $n$.",,['algebra'],"Section putnam_1999_a6. Require Import Reals Coquelicot.Coquelicot. Theorem putnam_1999_a6: let fix a (n: nat) := match n with | O => 1 | S O => 2 | S (S O) => 24 | S (S ((S n'') as n') as n) => (6 * a n ^ 2 * a n'' - 8 * a n * a n' ^ 2) / (a n' * a n'') end in forall (n: nat), exists (k: nat), a n = INR (n * k). Proof. Admitted. End putnam_1999_a6.","theory putnam_1999_a6 imports Complex_Main begin theorem putnam_1999_a6: fixes a :: ""nat \ real"" assumes ha1: ""a 1 = 1"" and ha2: ""a 2 = 2"" and ha3: ""a 3 = 24"" and hange4: ""\ n :: nat. n \ 4 \ a n = (6 * (a (n - 1)) ^ 2 * (a (n - 3)) - 8 * (a (n - 1)) * (a (n - 2)) ^ 2) / (a (n - 2) * a (n - 3))"" shows ""\ n. n \ 1 \ (\ k :: int. a n = k * n)"" sorry end", putnam_1999_b2,"theorem putnam_1999_b2 (P Q : Polynomial ℂ) (hQ : Q.natDegree = 2) (hP : ∀ x : ℂ, P.eval x = (Q.eval x) * (Polynomial.derivative^[2] P).eval x) : (∃ x1 x2 : ℂ, x1 ≠ x2 ∧ P.eval x1 = 0 ∧ P.eval x2 = 0) → (∃ f : Fin (P.natDegree) → ℂ, (∀ i j : Fin (P.natDegree), i ≠ j → f i ≠ f j) ∧ (∀ i : Fin (P.natDegree), P.eval (f i) = 0)) := sorry","Let $P(x)$ be a polynomial of degree $n$ such that $P(x)=Q(x)P''(x)$, where $Q(x)$ is a quadratic polynomial and $P''(x)$ is the second derivative of $P(x)$. Show that if $P(x)$ has at least two distinct roots then it must have $n$ distinct roots.",,['analysis'],"Section putnam_1999_b2. Require Import List Reals Coquelicot.Coquelicot. Theorem putnam_1999_b2: forall (a1 a2: nat -> R) (n: nat), let p (x: R) := sum_n (fun i => a1 i * x ^ i) n in let q (x: R) := sum_n (fun i => a2 i * x ^ i) 2 in forall (x: R), p x = q x * (Derive_n (fun x => p x) 2) x /\ exists (r1 r2: R), r1 <> r2 /\ p r1 = 0 /\ p r2 = 0 -> exists (roots: list R), length roots = n /\ NoDup roots /\ forall (r: R), In r roots -> p r = 0. Proof. Admitted. End putnam_1999_b2.","theory putnam_1999_b2 imports Complex_Main ""HOL-Computational_Algebra.Polynomial"" begin theorem putnam_1999_b2: fixes P Q :: ""complex poly"" assumes hQ: ""degree Q = 2"" assumes hP: ""\ x :: complex. poly P x = poly Q x * poly ((pderiv^^2) P) x"" shows ""(\ x1 x2 :: complex. x1 \ x2 \ poly P x1 = 0 \ poly P x2 = 0) \ (\ S :: complex set. card S = degree P \ (\ z \ S. poly P z = 0))"" sorry end", putnam_1999_b3,"abbrev putnam_1999_b3_solution : ℝ := sorry -- 3 theorem putnam_1999_b3 (A : Set (ℝ × ℝ) := {xy : ℝ × ℝ | 0 ≤ xy.1 ∧ xy.1 < 1 ∧ 0 ≤ xy.2 ∧ xy.2 < 1}) (S : ℝ → ℝ → ℝ := fun x y => ∑' m : ℕ, ∑' n : ℕ, if (m > 0 ∧ n > 0 ∧ 1/2 ≤ m/n ∧ m/n ≤ 2) then x^m * y^n else 0) : Tendsto (fun xy : (ℝ × ℝ) => (1 - xy.1 * xy.2^2) * (1 - xy.1^2 * xy.2) * (S xy.1 xy.2)) (𝓝[A] ⟨1,1⟩) (𝓝 putnam_1999_b3_solution) := sorry","Let $A=\{(x,y):0\leq x,y<1\}$. For $(x,y)\in A$, let \[S(x,y) = \sum_{\frac{1}{2}\leq \frac{m}{n}\leq 2} x^m y^n,\] where the sum ranges over all pairs $(m,n)$ of positive integers satisfying the indicated inequalities. Evaluate \[\lim_{(x,y)\rightarrow (1,1), (x,y)\in A} (1-xy^2)(1-x^2y)S(x,y).\]",Show that the answer is 3.,['algebra'],,"theory putnam_1999_b3 imports Complex_Main begin definition putnam_1999_b3_solution :: real where ""putnam_1999_b3_solution \ undefined"" (* 3 *) theorem putnam_1999_b3: fixes A :: ""(real \ real) set"" and S :: ""real \ real \ real"" defines ""A \ {xy :: real \ real. 0 \ (fst xy) \ (fst xy) < 1 \ 0 \ (snd xy) \ (snd xy) < 1}"" and ""S \ \ x y. \ m :: nat. \ n :: nat. (if (m > 0 \ n > 0 \ 1 / 2 \ m / n \ m / n \ 2) then x ^ m * y ^ n else 0)"" shows ""filterlim (\ xy :: real \ real. (1 - (fst xy) * (snd xy) ^ 2) * (1 - (fst xy) ^ 2 * (snd xy)) * (S (fst xy) (snd xy))) (nhds putnam_1999_b3_solution) (at (1, 1) within A)"" sorry end", putnam_1999_b4,"theorem putnam_1999_b4 (f : ℝ → ℝ) (hf : ContDiff ℝ 3 f) (hpos: ∀ n ≤ 3, ∀ x : ℝ, iteratedDeriv n f x > 0) (hle : ∀ x : ℝ, iteratedDeriv 3 f x ≤ f x) : ∀ x : ℝ, deriv f x < 2 * (f x) := sorry","Let $f$ be a real function with a continuous third derivative such that $f(x), f'(x), f''(x), f'''(x)$ are positive for all $x$. Suppose that $f'''(x)\leq f(x)$ for all $x$. Show that $f'(x)<2f(x)$ for all $x$.",,['analysis'],,"theory putnam_1999_b4 imports Complex_Main ""HOL-Analysis.Derivative"" begin theorem putnam_1999_b4: fixes f :: ""real\real"" assumes f_cont : ""continuous_on UNIV ((deriv^^3) f)"" and f_pos : ""\x. f x > 0"" and f'_pos : ""\x. deriv f x > 0"" and f''_pos : ""\x. (deriv^^2) f x > 0"" and f'''_pos : ""\x. (deriv^^3) f x > 0"" and hf : ""\x. (deriv^^3) f x \ f x"" shows ""\x. deriv f x < 2 * f x"" sorry end ", putnam_1999_b5,"abbrev putnam_1999_b5_solution : ℕ → ℝ := sorry -- fun n => 1 - n^2/4 theorem putnam_1999_b5 (n : ℕ) (hn : n ≥ 3) (theta : ℝ := 2 * Real.pi / n) (A : Matrix (Fin n) (Fin n) ℝ := fun j k => Real.cos ((j.1 + 1) * theta + (k.1 + 1) * theta)) : ((1 : Matrix (Fin n) (Fin n) ℝ) + A).det = putnam_1999_b5_solution n := sorry","For an integer $n\geq 3$, let $\theta=2\pi/n$. Evaluate the determinant of the $n\times n$ matrix $I+A$, where $I$ is the $n\times n$ identity matrix and $A=(a_{jk})$ has entries $a_{jk}=\cos(j\theta+k\theta)$ for all $j,k$.",Show that the answer is $(1 - n^2)/4$.,['linear_algebra'],,"theory putnam_1999_b5 imports Complex_Main ""HOL-Analysis.Finite_Cartesian_Product"" ""HOL-Analysis.Determinants"" begin definition putnam_1999_b5_solution :: ""nat \ real"" where ""putnam_1999_b5_solution \ undefined"" (* \ n. 1 - n ^ 2 / 4 *) theorem putnam_1999_b5: fixes n :: nat and theta :: real and A :: ""real^'n^'n"" and idx :: ""'n \ nat"" defines ""theta \ 2 * pi / n"" and ""A \ \ j k. cos (idx j * theta + idx k * theta)"" assumes hn: ""n \ 3"" and hncard: ""CARD('n) = n"" and idxbij: ""\ i \ {1..n}. \! m :: 'n. idx m = i"" shows ""det (mat 1 + A) = putnam_1999_b5_solution n"" sorry end", putnam_1999_b6,"theorem putnam_1999_b6 (S : Finset ℤ) (hSgt : ∀ s : ℤ, s ∈ S → s > 1) (hSgcd : ∀ n : ℤ, ∃ s : S, Int.gcd s n = 1 ∨ Int.gcd s n = (s : ℤ)) : ∃ s t : S, Prime (Int.gcd s t) := sorry","Let $S$ be a finite set of integers, each greater than 1. Suppose that for each integer $n$ there is some $s\in S$ such that $\gcd(s,n)=1$ or $\gcd(s,n)=s$. Show that there exist $s,t\in S$ such that $\gcd(s,t)$ is prime.",,['number_theory'],,"theory putnam_1999_b6 imports Complex_Main ""HOL-Computational_Algebra.Primes"" begin theorem putnam_1999_b6: fixes S::""int set"" assumes S_fin: ""finite S"" and Sge1: ""\s \ S. s > 1"" and hgcd: ""\n::int. \s \ S. (gcd s n) = 1 \ (gcd s n) = s"" shows ""\ s \ S. \ t \ S. prime(gcd s t)"" sorry end ", putnam_1974_a1,"abbrev putnam_1974_a1_solution : ℕ := sorry -- 11 theorem putnam_1974_a1 (conspiratorial : Set ℤ → Prop := fun S => ∀ a ∈ S, ∀ b ∈ S, ∀ c ∈ S, (a > 0 ∧ b > 0 ∧ c > 0) ∧ ((a ≠ b ∧ b ≠ c ∧ a ≠ c) → (Int.gcd a b > 1 ∨ Int.gcd b c > 1 ∨ Int.gcd a c > 1))) : (∀ S : Set ℤ, S ⊆ Icc 1 16 → conspiratorial S → S.encard ≤ putnam_1974_a1_solution) ∧ (∃ S : Set ℤ, S ⊆ Icc 1 16 ∧ conspiratorial S ∧ S.encard = putnam_1974_a1_solution) := sorry",Call a set of positive integers 'conspiratorial' if no three of them are pairwise relatively prime. What is the largest number of elements in any conspiratorial subset of the integers 1 through 16?,Show that the answer is 11.,['number_theory'],"Section putnam_1974_a1. Require Import Nat List Ensembles Finite_sets. From mathcomp Require Import div fintype perm ssrbool. Definition putnam_1974_a1_solution := 11. Theorem putnam_1974_a1 (s : list nat := seq 1 17) : exists (m: nat), ((forall (p : nat -> Prop), let E: Ensemble nat := fun x : nat => List.In x s /\ p x in ~ exists (p q r : nat), p <> q /\ q <> r /\ coprime p q /\ coprime q r /\ coprime p r /\ exists (n: nat), cardinal nat E n /\ n <= m) /\ (exists (p : nat -> Prop), let E: Ensemble nat := fun x => List.In x s /\ p x in ~ exists (p q r : nat), p <> q /\ q <> r /\ coprime p q /\ coprime q r /\ coprime p r /\ exists (n: nat), cardinal nat E m)) <-> m = putnam_1974_a1_solution. Proof. Admitted. End putnam_1974_a1.","theory putnam_1974_a1 imports Complex_Main begin definition putnam_1974_a1_solution :: nat where ""putnam_1974_a1_solution \ undefined"" (* 11 *) theorem putnam_1974_a1: fixes conspiratorial :: ""nat set \ bool"" defines ""conspiratorial \ (\S::nat set. (\a\S. \b\S. \c\S. a \ 0 \ ((a \ b \ b \ c \ a \ c) \ (gcd a b > 1 \ gcd b c > 1 \ gcd a c > 1))))"" shows ""(GREATEST Scard::nat. (\S::nat set. S \ {1..16} \ conspiratorial S \ Scard = card S)) = putnam_1974_a1_solution"" sorry end ", putnam_1974_a3,"abbrev putnam_1974_a3_solution : (Set ℕ) × (Set ℕ) := sorry -- ({p : ℕ | p.Prime ∧ p ≡ 1 [MOD 8]}, {p : ℕ | p.Prime ∧ p ≡ 5 [MOD 8]}) theorem putnam_1974_a3 (assmption : ∀ p : ℕ, p.Prime ∧ p > 2 → ((∃ m n : ℤ, p = m^2 + n^2) ↔ p ≡ 1 [MOD 4])) : ∀ p : ℕ, ((p.Prime ∧ p > 2 ∧ (∃ x y : ℤ, p = x^2 + 16*y^2)) ↔ p ∈ putnam_1974_a3_solution.1) ∧ ((p.Prime ∧ p > 2 ∧ (∃ x y : ℤ, p = 4*x^2 + 4*x*y + 5*y^2)) ↔ p ∈ putnam_1974_a3_solution.2) := sorry","A well-known theorem asserts that a prime $p > 2$ can be written as the sum of two perfect squres if and only if $p \equiv 1 \bmod 4$. Find which primes $p > 2$ can be written in each of the following forms, using (not necessarily positive) integers $x$ and $y$: (a) $x^2 + 16y^2$, (b) $4x^2 + 4xy + 5y^2$.","Show that that the answer to (a) is the set of primes which are $1 \bmod 8$, and the solution to (b) is the set of primes which are $5 \bmod 8$.",['number_theory'],"Section putnam_1974_a3. Require Import Nat ZArith Znumtheory. Definition putnam_1974_a3_solution1 := fun x => x mod 8 = 1. Definition putnam_1974_a3_solution2 := fun x => x mod 8 = 5. Theorem putnam_1974_a3: forall (p: nat), prime (Z.of_nat p) /\ odd p = true -> (exists (m n: Z), (Z.of_nat p) = m*m + 16*n*n <-> putnam_1974_a3_solution1 (Z.of_nat p)) /\ (exists (m n: Z), (Z.of_nat p) = 4*m*m + 4*m*n + 5*n*n <-> putnam_1974_a3_solution2 (Z.of_nat p)). Proof. Admitted. End putnam_1974_a3.","theory putnam_1974_a3 imports Complex_Main ""HOL-Number_Theory.Cong"" begin definition putnam_1974_a3_solution :: ""(nat set) \ (nat set)"" where ""putnam_1974_a3_solution \ undefined"" (* ({p::nat. prime p \ [p = 1] (mod 8)}, {p::nat. prime p \ [p = 5] (mod 8)}) *) theorem putnam_1974_a3: assumes assmption: ""\p::nat. (prime p \ p > 2) \ ((\m n::nat. p = m^2 + n^2) \ [p = 1] (mod 4))"" shows ""\p::nat. ((prime p \ p > 2 \ (\x y::int. p = x^2 + 16*y^2)) \ p \ fst putnam_1974_a3_solution) \ ((prime p \ p > 2 \ (\x y::int. p = 4*x^2 + 4*x*y + 5*y^2)) \ p \ snd putnam_1974_a3_solution)"" sorry end ", putnam_1974_a4,"abbrev putnam_1974_a4_solution : ℕ → ℝ := sorry -- (fun n => (n / 2^(n-1)) * (n-1).choose (floor ((n-1)/2))) theorem putnam_1974_a4 (n : ℕ) (hn : n > 0) : (1 : ℝ)/(2^(n-1)) * ∑ k in Finset.Icc 0 ((ceil (n/2)) - 1), (n - 2*k)*(n.choose k) = putnam_1974_a4_solution n := sorry",Evaluate in closed form: $\frac{1}{2^{n-1}} \sum_{k < n/2} (n-2k)*{n \choose k}$.,Show that the solution is $\frac{n}{2^{n-1}} * {(n-1) \choose \left[ (n-1)/2 \right]}$.,['algebra'],"Section putnam_1974_a4. Require Import Nat Reals Coquelicot.Coquelicot. Open Scope R. Definition putnam_1974_a4_solution (n: nat) := INR n * (Binomial.C (n - 1) (n / 2) - 1) / (2 ^ (n - 1)). Theorem putnam_1974_a4 : forall (n: nat), 1 / (2 ^ (pred n)) * sum_n (fun i => (INR n - 2 * INR (S i)) * Binomial.C n (i + 1)) (n / 2) = putnam_1974_a4_solution n. Proof. Admitted. End putnam_1974_a4.","theory putnam_1974_a4 imports Complex_Main begin definition putnam_1974_a4_solution :: ""nat \ real"" where ""putnam_1974_a4_solution \ undefined"" (* (\n::nat. (n / 2^(n-1)) * ((n-1) choose (nat \(n-1)/2\))) *) theorem putnam_1974_a4: fixes n :: nat assumes hn: ""n > 0"" shows ""1/(2^(n-1)) * (\k::nat=0..((nat \n/2\)-1). (n - 2*k) * (n choose k)) = putnam_1974_a4_solution n"" sorry end ", putnam_1974_a6,"abbrev putnam_1974_a6_solution : ℕ := sorry -- 25 theorem putnam_1974_a6 (n : ℤ := 10^6) (hdivnallx : Polynomial ℤ → Prop := fun f => Monic f ∧ (∀ x : ℤ, (n : ℤ) ∣ f.eval x)) : sInf {d : ℕ | ∃ f : Polynomial ℤ, hdivnallx f ∧ d = f.natDegree} = putnam_1974_a6_solution := sorry","Given $n$, let $k(n)$ be the minimal degree of any monic integral polynomial $f$ such that the value of $f(x)$ is divisible by $n$ for every integer $x$. Find the value of $k(1000000)$.",Show that the answer is 25.,['algebra'],"Section putnam_1974_a6. Require Import Factorial Reals Coquelicot.Coquelicot. Definition putnam_1974_a6_solution1 (n N : nat) := fact N mod n = 0%nat /\ forall (N': nat), fact N' mod n = 0%nat -> ge N' N. Definition putnam_1974_a6_solution2 : nat := 25. Theorem putnam_1974_a6 (f : nat -> nat) (cond : nat -> (nat -> Z) -> Prop := fun n coeff => coeff n = Z.of_nat 1 /\ let p : nat -> R := fun x => sum_n (fun i => IZR (coeff i) * INR x ^ i) (n + 1) in (forall (m: Z), Z.to_nat (floor (p (Z.to_nat m))) mod n = 0%nat)) (hf : forall (n: nat), exists (coeff: nat -> Z), cond (f n) coeff) (hflb : forall (n: nat) (coeff: nat -> Z), cond n coeff -> ge n (f n)) : forall (n: nat), exists N, f n = N /\ putnam_1974_a6_solution1 n N /\ f 1000000%nat = putnam_1974_a6_solution2. Proof. Admitted. End putnam_1974_a6.","theory putnam_1974_a6 imports Complex_Main ""HOL-Computational_Algebra.Polynomial"" begin definition putnam_1974_a6_solution :: nat where ""putnam_1974_a6_solution \ undefined"" (* 25 *) theorem putnam_1974_a6: fixes n :: nat and hdivnallx :: ""(int poly) \ bool"" defines ""n \ 10^6"" and ""hdivnallx \ (\f::int poly. lead_coeff f = 1 \ (\x::int. n dvd (poly f x)))"" shows ""(LEAST d::nat. (\f::int poly. hdivnallx f \ d = degree f)) = putnam_1974_a6_solution"" sorry end ", putnam_1974_b3,"theorem putnam_1974_b3 (α : ℝ) (ha : Real.cos (Real.pi * α) = (1 : ℝ)/3) : Irrational α := sorry","Prove that if $\alpha$ is a real number such that $\cos (\pi \alpha) = 1/3$, the $\alpha$ is irrational.",,['number_theory'],"Section putnam_1974_b3. Require Import Reals Coquelicot.Coquelicot. Definition putnam_1974_b3_solution := 1. Theorem putnam_1974_b3 : ~ exists (p q: Z), acos (1 / 3) / PI = IZR p / IZR q. Proof. Admitted. End putnam_1974_b3.","theory putnam_1974_b3 imports Complex_Main begin theorem putnam_1974_b3: fixes \ :: real assumes ha: ""cos (pi*\) = 1/3"" shows ""\ \ \"" sorry end ", putnam_1974_b4,"theorem putnam_1974_b4 (f : ℝ × ℝ → ℝ) (hfcontx : ∀ y : ℝ, Continuous (fun x => f ⟨x, y⟩)) (hfconty : ∀ x : ℝ, Continuous (fun y => f ⟨x, y⟩)) : ∃ g : ℕ → (ℝ × ℝ → ℝ), (∀ n : ℕ, Continuous (g n)) ∧ (∀ x y : ℝ, Tendsto (fun n => g n ⟨x, y⟩) atTop (𝓝 (f ⟨x, y⟩))) := sorry","Let $f : \mathbb{R} \to \mathbb{R}$ be continuous in each variable seperately. Show that there exists a sequence of continuous functions $g_n : \mathbb{R}^2 \to \mathbb{R}$ such that $f(x,y) = \lim_{n \to \infty} g_n(x,y)$ for all $(x,y) \in \mathbb{R}^2$.",,['analysis'],,"theory putnam_1974_b4 imports Complex_Main begin theorem putnam_1974_b4: fixes f :: ""(real \ real) \ real"" assumes hfcontx: ""\y::real. continuous_on UNIV (\x::real. f (x,y))"" assumes hfconty: ""\x::real. continuous_on UNIV (\y::real. f (x,y))"" shows ""\g::nat\((real\real)\real). (\n::nat. continuous_on UNIV (g n)) \ (\x y::real. filterlim (\n::nat. g n (x,y)) (nhds (f (x,y))) at_top)"" sorry end ", putnam_1974_b5,"theorem putnam_1974_b5 : ∀ n ≥ 0, ∑ i in Finset.Icc (0 : ℕ) n, (n^i : ℝ)/(Nat.factorial i) > (Real.exp n)/2 := sorry",Show that $1 + (n/1!) + (n^2/2!) + \dots + (n^n/n!) > e^n/2$ for every integer $n \geq 0$.,,['analysis'],"Section putnam_1974_b5. Require Import Factorial Reals Coquelicot.Coquelicot. Definition putnam_1974_b5_solution := 1. Theorem putnam_1974_b5 (f : nat -> R -> R := fun n x => sum_n (fun i => x ^ i / INR (fact i)) (n + 1)) : forall (n : nat), f n (INR n) > exp PI / 2. Proof. Admitted. End putnam_1974_b5.","theory putnam_1974_b5 imports Complex_Main begin theorem putnam_1974_b5: shows ""\n::nat\0. (\i::nat=0..n. (n^i)/(fact i)) > (exp n)/2"" sorry end ", putnam_1974_b6,"abbrev putnam_1974_b6_solution : (ℕ × ℕ × ℕ) := sorry -- ((2^1000 - 1)/3, (2^1000 - 1)/3, 1 + (2^1000 - 1)/3) theorem putnam_1974_b6 (n : ℤ := 1000) (count0 : ℕ := {S | S ⊆ Finset.Icc 1 n ∧ S.card ≡ 0 [MOD 3]}.ncard) (count1 : ℕ := {S | S ⊆ Finset.Icc 1 n ∧ S.card ≡ 1 [MOD 3]}.ncard) (count2 : ℕ := {S | S ⊆ Finset.Icc 1 n ∧ S.card ≡ 2 [MOD 3]}.ncard) : (count0, count1, count2) = putnam_1974_b6_solution := sorry","For a set with $1000$ elements, how many subsets are there whose candinality is respectively $\equiv 0 \bmod 3, \equiv 1 \bmod 3, \equiv 2 \bmod 3$?","Show that there answer is that there are $(2^1000-1)/3$ subsets of cardinality $\equiv 0 \bmod 3$ and $\equiv 1 \bmod 3$, and $1 + (2^1000-1)/3$ subsets of cardinality $\equiv 2 \bmod 3$.",['set_theory'],"Section putnam_1974_b6. Require Import Ensembles Finite_sets Reals Coquelicot.Coquelicot. Definition putnam_1974_b6_solution1 : nat := 21000/3. Definition putnam_1974_b6_solution2 : nat := 21000/3. Definition putnam_1974_b6_solution3 : nat := 21000/3 + 1. Definition putnam_1974_b6_solution4 : nat := 21001/3 + 1. Definition putnam_1974_b6_solution5 : nat := 21001/3. Definition putnam_1974_b6_solution6 : nat := 21001/3 + 1. Theorem putnam_1974_b6 (E : Ensemble R) (E' : Ensemble R) (pres : R -> Prop) (hE : cardinal R E 1000) (hE' : cardinal R E 1001) (habc : nat -> Ensemble (Ensemble R) := fun val => fun (subE : Ensemble R) => exists (subEsz: nat), (forall x: R, subE x -> E x /\ pres x) /\ cardinal R subE subEsz /\ subEsz mod 3 = val) (habc' : nat -> Ensemble (Ensemble R) := fun val => fun (subE' : Ensemble R) => exists (subEsz': nat), (forall x: R, subE' x -> E' x /\ pres x) /\ cardinal R subE' subEsz' /\ subEsz' mod 3 = val) : cardinal (Ensemble R) (habc 0%nat) putnam_1974_b6_solution1 /\ cardinal (Ensemble R) (habc 1%nat) putnam_1974_b6_solution2 /\ cardinal (Ensemble R) (habc 2%nat) putnam_1974_b6_solution3 /\ cardinal (Ensemble R) (habc' 0%nat) putnam_1974_b6_solution4 /\ cardinal (Ensemble R) (habc' 1%nat) putnam_1974_b6_solution5 /\ cardinal (Ensemble R) (habc' 2%nat) putnam_1974_b6_solution6. Proof. Admitted. End putnam_1974_b6.","theory putnam_1974_b6 imports Complex_Main ""HOL-Number_Theory.Cong"" begin definition putnam_1974_b6_solution :: ""nat \ nat \ nat"" where ""putnam_1974_b6_solution \ undefined"" (* (nat (round ((2^1000 - 1)/3)), nat (round ((2^1000 - 1)/3)), 1 + nat (round ((2^1000 - 1)/3))) *) theorem putnam_1974_b6: fixes n :: nat and count0 :: nat and count1 :: nat and count2 :: nat defines ""n \ 1000"" and ""count0 \ card {S::nat set. S \ {1..n} \ [card S = 0] (mod 3)}"" and ""count1 \ card {S::nat set. S \ {1..n} \ [card S = 1] (mod 3)}"" and ""count2 \ card {S::nat set. S \ {1..n} \ [card S = 2] (mod 3)}"" shows ""(count0, count1, count2) = putnam_1974_b6_solution"" sorry end ", putnam_1998_a3,"theorem putnam_1998_a3 (f : ℝ → ℝ) (hf : ContDiff ℝ 3 f) : ∃ a : ℝ, (f a) * (deriv f a) * (iteratedDeriv 2 f a) * (iteratedDeriv 3 f a) ≥ 0 := sorry",Let $f$ be a real function on the real line with continuous third derivative. Prove that there exists a point $a$ such that \[f(a)\cdot f'(a) \cdot f''(a) \cdot f'''(a)\geq 0 .\],,['analysis'],,"theory putnam_1998_a3 imports Complex_Main ""HOL-Analysis.Derivative"" begin theorem putnam_1998_a3: fixes f :: ""real \ real"" assumes hf : ""continuous_on UNIV ((deriv^^3) f)"" shows ""\ a :: real. f a * deriv f a * (deriv^^2) f a * (deriv^^3) f a \ 0"" sorry end ", putnam_1998_a4,"abbrev putnam_1998_a4_solution : Set ℕ := sorry -- {n | n ≡ 1 [MOD 6]} theorem putnam_1998_a4 (A : ℕ → ℕ) (hA1 : A 1 = 0) (hA2 : A 2 = 1) (hA : ∀ n : ℕ, n > 2 → A n = Nat.ofDigits 10 (Nat.digits 10 (A (n - 2)) ++ Nat.digits 10 (A (n - 1)))) : putnam_1998_a4_solution = {n | 11 ∣ A n} := sorry","Let $A_1=0$ and $A_2=1$. For $n>2$, the number $A_n$ is defined by concatenating the decimal expansions of $A_{n-1}$ and $A_{n-2}$ from left to right. For example $A_3=A_2 A_1=10$, $A_4=A_3 A_2 = 101$, $A_5=A_4 A_3 = 10110$, and so forth. Determine all $n$ such that $11$ divides $A_n$.",Show that the solution is those n for which n can be written as 6k+1 for some integer k.,['algebra'],"Section putnam_1998_a4. Require Import Nat ZArith Reals Coquelicot.Coquelicot. Open Scope nat_scope. Definition putnam_1998_a4_solution (n: nat) := exists (k: nat), n = 6 * k + 1. Theorem putnam_1998_a4: let concatenate (x y : nat) : nat := Nat.pow 10 (Z.to_nat (floor (Rdiv (ln (INR y)) (ln 10))) + 1) * x + y in let fix A (n: nat) := match n with | O => O | S O => 1 | S ((S n'') as n') => concatenate (A n') (A n'') end in forall (n: nat), A (n+1) mod 11 = 0 <-> putnam_1998_a4_solution n. Proof. Admitted. End putnam_1998_a4.","theory putnam_1998_a4 imports Complex_Main ""HOL-Number_Theory.Cong"" begin definition putnam_1998_a4_solution::""nat set"" where ""putnam_1998_a4_solution \ undefined"" (* {n::nat. [n = 1] (mod 6)} *) fun digits::""nat \ nat list"" where ""digits n = (if n < 10 then [n] else ([n mod 10::nat] @ digits (n div 10::nat)))"" fun from_digits::""nat list \ nat"" where ""from_digits L = foldr (\a. \b. a + 10 * b) L 0"" theorem putnam_1998_a4: fixes A::""nat\nat"" assumes hA1 : ""A 1 = 0"" and hA2 : ""A 2 = 1"" and hA : ""\n::nat > 2. A n = from_digits (digits (A (n-2)) @ digits (A (n-1)))"" shows ""putnam_1998_a4_solution = {n::nat. 11 dvd (A n)}"" sorry end", putnam_1998_a5,"theorem putnam_1998_a5 (k : ℕ) (c : Fin k → (ℝ × ℝ)) (r : Fin k → ℝ) (hr : ∀ i : Fin k, r i > 0) (E : Set (ℝ × ℝ)) (hE : E ⊆ ⋃ i : Fin k, ball (c i) (r i)) : ∃ (n : ℕ) (t : Fin n → Fin k), (∀ i j : Fin n, i ≠ j → (ball (c (t i)) (r (t i)) ∩ ball (c (t j)) (r (t j)) = ∅)) ∧ E ⊆ ⋃ i : Fin n, ball (c (t i)) (3 * (r (t i))) := sorry","Let $\mathcal F$ be a finite collection of open discs in $\mathbb R^2$ whose union contains a set $E\subseteq \mathbb R^2$. Show that there is a pairwise disjoint subcollection $D_1,\ldots, D_n$ in $\mathcal F$ such that \[E\subseteq \cup_{j=1}^n 3D_j.\] Here, if $D$ is the disc of radius $r$ and center $P$, then $3D$ is the disc of radius $3r$ and center $P$.",,['analysis'],,"theory putnam_1998_a5 imports Complex_Main ""HOL-Analysis.Elementary_Metric_Spaces"" begin (* Note: Boosted domain to infinite set *) theorem putnam_1998_a5: fixes k::nat and c::""nat \ (real \ real)"" and r::""nat \ real"" and E::""(real \ real) set"" assumes hr : ""\i \ {0.. 0"" and hE : ""E \ (\ i \ {0..n::nat. \t::nat\nat. (\i \ {0..j \ {0.. j \ ((ball (c (t i)) (r (t i)) \ (ball (c (t j)) (r (t j))) = {}))) \ E \ (\ i \ {0.. (0 : ℝ)} = putnam_1998_b1_solution := sorry",Find the minimum value of \[\frac{(x+1/x)^6-(x^6+1/x^6)-2}{(x+1/x)^3+(x^3+1/x^3)}\] for $x>0$.,Show that the minimum value is 6.,['algebra'],"Section putnam_1998_b1. Require Import Reals Coquelicot.Coquelicot. Open Scope R. Definition putnam_1998_b1_solution := 1. Theorem putnam_1998_b1: let f (x: R) := ((x + 1 / x) ^ 6 - (x ^ 6 + 1 / (x ^ 6)) - 2) / (x + 1 / x) ^ 3 + (x ^ 3 + 1 / (x ^ 3)) in exists (minval: R), (forall (x: R), x > 0 -> f x >= minval) /\ (exists (x: R), x > 0 -> f x = minval) -> minval = putnam_1998_b1_solution. Proof. Admitted. End putnam_1998_b1.","theory putnam_1998_b1 imports Complex_Main begin definition putnam_1998_b1_solution::real where ""putnam_1998_b1_solution \ undefined"" (* 6 *) theorem putnam_1998_b1: shows ""putnam_1998_b1_solution = (LEAST y. (\x::real > 0. y = ((x+1/x)^6 - (x^6 + 1/x^6) - 2) / ((x+1/x)^3 + (x^3 +1/x^3))))"" sorry end", putnam_1998_b2,"abbrev putnam_1998_b2_solution : ℝ → ℝ → ℝ := sorry -- fun a b => if a > b then Real.sqrt (2*a^2 + 2*b^2) else 0 theorem putnam_1998_b2 (a b : ℝ) (hab : 0 < b ∧ b < a) : sInf {d : ℝ | ∃ (c : ℝ) (x : ℝ), d = Euclidean.dist (a, b) (c, 0) + Euclidean.dist (c, 0) (x, x) + Euclidean.dist (a, b) (x, x) ∧ Euclidean.dist (a, b) (c, 0) + Euclidean.dist (c, 0) (x, x) > Euclidean.dist (a, b) (x, x) ∧ Euclidean.dist (a, b) (c, 0) + Euclidean.dist (a, b) (x, x) > Euclidean.dist (c, 0) (x, x) ∧ Euclidean.dist (c, 0) (x, x) + Euclidean.dist (a, b) (x, x) > Euclidean.dist (a, b) (c, 0)} = putnam_1998_b2_solution a b := sorry","Given a point $(a,b)$ with $0real\real"" where ""putnam_1998_b2_solution \ undefined"" (* \a. \b. sqrt (2*a^2 + 2*b^2) *) theorem putnam_1998_b2: fixes a b::real assumes hab : ""0 < b \ b < a"" shows ""putnam_1998_b2_solution a b = (LEAST p. \c x::real. p = dist (a, b) (c, 0) + dist (c, 0) (x, x) + dist (a, b) (x, x) \ dist (a, b) (c, 0) + dist (c, 0) (x, x) > dist (a, b) (x, x) \ dist (a, b) (c, 0) + dist (a, b) (x, x) > dist (c, 0) (x, x) \ dist (c, 0) (x, x) + dist (a, b) (x, x) > dist (a, b) (c, 0))"" sorry end", putnam_1998_b4,"abbrev putnam_1998_b4_solution : Set (ℕ × ℕ) := sorry -- {nm | let ⟨n,m⟩ := nm; multiplicity 2 n ≠ multiplicity 2 m} theorem putnam_1998_b4 (hsum : ℕ → ℕ → ℤ := fun n m => ∑ i in Finset.range (m * n), (-1)^(i/m + i/n)) : ∀ n m : ℕ, n > 0 ∧ m > 0 → ((hsum n m) = 0 ↔ ⟨n, m⟩ ∈ putnam_1998_b4_solution) := sorry",Find necessary and sufficient conditions on positive integers $m$ and $n$ so that \[\sum_{i=0}^{mn-1} (-1)^{\lfloor i/m \rfloor +\lfloor i/n\rfloor}=0.\],Show that the sum is 0 if and only if the largest powers of $2$ dividing $m$ and $n$ are different.,['number_theory'],"Section putnam_1998_b4. Require Import Nat ZArith Reals Coquelicot.Coquelicot. Definition putnam_1998_b4_solution (m n: nat) := exists (m2 n2: nat), m mod (2 ^ m2) = 0%nat /\ m mod (2 ^ (m2 + 1)) <> 0%nat /\ n mod (2 ^ n2) = 0%nat /\ n mod (2 ^ n2 + 1) <> 0%nat. Theorem putnam_1998_b4: forall (m n: nat), sum_n (fun i => Rpower (-1) (IZR (floor (INR i / INR m)) + IZR (floor (INR i / INR n)))) (m * n - 1) = 0 <-> putnam_1998_b4_solution m n. Proof. Admitted. End putnam_1998_b4.","theory putnam_1998_b4 imports Complex_Main ""HOL-Computational_Algebra.Factorial_Ring"" begin definition putnam_1998_b4_solution::""nat\nat\bool"" where ""putnam_1998_b4_solution \ undefined"" (* \n. \m. multiplicity 2 n \ multiplicity 2 m *) theorem putnam_1998_b4: fixes hsum::""nat\nat\int"" defines ""hsum \ \n. \m. (\i=0..n m::nat. n > 0 \ m > 0 \ (hsum n m = 0 \ putnam_1998_b4_solution n m)"" sorry end", putnam_1998_b5,"abbrev putnam_1998_b5_solution : ℕ := sorry -- 1 theorem putnam_1998_b5 (N : ℕ := ∑ i in Finset.range 1998, 10^i) : putnam_1998_b5_solution = (Nat.floor (10^1000 * Real.sqrt N)) % 10 := sorry","Let $N$ be the positive integer with 1998 decimal digits, all of them 1; that is, \[N=1111\cdots 11.\] Find the thousandth digit after the decimal point of $\sqrt N$.",Show that the thousandth digit is 1.,['number_theory'],"Section putnam_1998_b5. Require Import Reals Coquelicot.Coquelicot. Open Scope R. Definition putnam_1998_b5_solution : nat := 1. Theorem putnam_1998_b5: let N := sum_n (fun i => 10^i) 1998 in Z.to_nat (floor (10^1000 * sqrt N)) mod 10 = putnam_1998_b5_solution. Proof. Admitted. End putnam_1998_b5.","theory putnam_1998_b5 imports Complex_Main begin definition putnam_1998_b5_solution::nat where ""putnam_1998_b5_solution \ undefined"" (* 1 *) theorem putnam_1998_b5: fixes N::nat defines ""N \ (\i=0..<1998. 10^i)"" shows ""putnam_1998_b5_solution = (\10^1000 * sqrt N\ mod 10)"" sorry end", putnam_1998_b6,"theorem putnam_1998_b6 : ∀ a b c : ℤ, ∃ n : ℤ, n > 0 ∧ ¬(∃ k : ℤ, k = Real.sqrt (n^3 + a * n^2 + b * n + c)) := sorry","Prove that, for any integers $a, b, c$, there exists a positive integer $n$ such that $\sqrt{n^3+an^2+bn+c}$ is not an integer.",,['number_theory'],,"theory putnam_1998_b6 imports Complex_Main begin theorem putnam_1998_b6: fixes a b c :: int shows ""\ n:: int > 0 . sqrt (n^3 + a * n^2 + b * n + c) \ \"" sorry end ", putnam_2006_a3,"theorem putnam_2006_a3 (x : ℤ → ℤ) (hxlo : ∀ k : ℤ, 0 ≤ k ∧ k ≤ 2006 → x k = k) (hxhi : ∀ k : ℤ, k ≥ 2006 → x (k + 1) = x k + x (k - 2005)) : (∃ i : ℕ, i > 0 ∧ ∀ j : Finset.range 2005, 2006 ∣ x (i + j)) := sorry","Let $1, 2, 3, \dots, 2005, 2006, 2007, 2009, 2012, 2016, \dots$ be a sequence defined by $x_k = k$ for $k=1, 2, \dots, 2006$ and $x_{k+1} = x_k + x_{k-2005}$ for $k \geq 2006$. Show that the sequence has $2005$ consecutive terms each divisible by $2006$.",,['algebra'],,"theory putnam_2006_a3 imports Complex_Main begin theorem putnam_2006_a3: fixes x :: ""nat \ nat"" assumes hxlo: ""\ k \ {1 .. 2006}. x k = k"" and hxhi: ""\ k \ 2006. x (k + 1) = x k + x (k - 2005)"" shows ""\ i :: nat. i > 0 \ (\ j \ {0 ..< 2005}. 2006 dvd x (i + j))"" sorry end", putnam_2006_a4,"abbrev putnam_2006_a4_solution : ℕ → ℝ := sorry -- (fun n : ℕ => (n + 1) / 3) theorem putnam_2006_a4 (n : ℕ) (pnat : Equiv.Perm (Fin n) → (ℕ → ℕ)) (pcount : Equiv.Perm (Fin n) → ℕ) (ngt1 : n > 1) (hpnat : ∀ p : Equiv.Perm (Fin n), ∀ k : Fin n, (pnat p) k = p k) (hpcount : ∀ p : Equiv.Perm (Fin n), pcount p = {k : Fin n | (k.1 = 0 ∨ (pnat p) (k - 1) < (pnat p) k) ∧ (k = n - 1 ∨ (pnat p) k > (pnat p) (k + 1))}.encard) : (∑ p : Equiv.Perm (Fin n), pcount p) / {p : Equiv.Perm (Fin n) | true}.ncard = putnam_2006_a4_solution n := sorry","Let $S=\{1,2,\dots,n\}$ for some integer $n>1$. Say a permutation $\pi$ of $S$ has a \emph{local maximum} at $k \in S$ if \begin{enumerate} \item[(i)] $\pi(k)>\pi(k+1)$ for $k=1$; \item[(ii)] $\pi(k-1)<\pi(k)$ and $\pi(k)>\pi(k+1)$ for $1 nat) instead of (Equiv.Perm (Fin n)) *) definition putnam_2006_a4_solution :: ""nat \ real"" where ""putnam_2006_a4_solution \ undefined"" (* (\n::nat. (n+1) / 3) *) theorem putnam_2006_a4: fixes n :: nat and nperms :: ""(nat \ nat) set"" and pcount :: ""(nat \ nat) \ nat"" assumes ngt1: ""n > 1"" and hnperms: ""nperms \ {p::nat\nat. p permutes {0..(n-1)} \ (\i::nat\n. p i = i)}"" and hpcount: ""\p::nat\nat. pcount p = card {k::nat\{0..(n-1)}. (k = 0 \ p (k-1) < p k) \ (k = n-1 \ p k > p (k+1))}"" shows ""(\p\nperms. pcount p) / card nperms = putnam_2006_a4_solution n"" sorry end ", putnam_2006_a5,"abbrev putnam_2006_a5_solution : ℕ → ℤ := sorry -- (fun n : ℕ => if (n ≡ 1 [MOD 4]) then n else -n) theorem putnam_2006_a5 (n : ℕ) (theta : ℝ) (a : Set.Icc 1 n → ℝ) (nodd : Odd n) (thetairr : Irrational (theta / Real.pi)) (ha : ∀ k : Set.Icc 1 n, a k = Real.tan (theta + (k * Real.pi) / n)) : (∑ k : Set.Icc 1 n, a k) / (∏ k : Set.Icc 1 n, a k) = putnam_2006_a5_solution n := sorry","Let $n$ be a positive odd integer and let $\theta$ be a real number such that $\theta/\pi$ is irrational. Set $a_k=\tan(\theta+k\pi/n)$, $k=1,2,\dots,n$. Prove that $\frac{a_1+a_2+\cdots+a_n}{a_1a_2 \cdots a_n}$ is an integer, and determine its value.",Show that $\frac{a_1+\cdots+a_n}{a_1 \cdots a_n}=\begin{cases} n & n \equiv 1 \pmod{4} \\ -n & n \equiv 3 \pmod{4}. \end{cases}$,['algebra'],"Section putnam_2006_a5. Require Import Nat Reals Coquelicot.Coquelicot. Definition putnam_2006_a5_solution (n: nat) := if eqb (n mod 4) (1%nat) then (INR n) else (-1 * INR n). Theorem putnam_2006_a5: let fix prod_n (m: nat -> R) (n : nat) : R := match n with | O => m 0%nat | S n' => m n' * prod_n m n' end in forall (n: nat) (th: R), odd n = true /\ ~ exists (p q: Z), th / PI = IZR (p / q) /\ let a (k: nat) := tan (th + INR k * PI / INR n) in sum_n a n / prod_n a n = putnam_2006_a5_solution n. Proof. Admitted. End putnam_2006_a5.","theory putnam_2006_a5 imports Complex_Main begin (* uses (nat \ real) instead of ({1..n} \ real) *) definition putnam_2006_a5_solution :: ""nat \ int"" where ""putnam_2006_a5_solution \ undefined"" (* (\n::nat. if ([n = 1] (mod 4)) then n else -n) *) theorem putnam_2006_a5: fixes n :: nat and theta :: real and a :: ""nat \ real"" assumes nodd: ""odd n"" and thetairr: ""theta/pi \ \"" and ha: ""\k::nat\{1..n}. a k = tan (theta + (k*pi)/n)"" shows ""(\k::nat=1..n. a k) / (\k::nat=1..n. a k) = putnam_2006_a5_solution n"" sorry end ", putnam_2006_b2,"theorem putnam_2006_b2 (n : ℕ) (npos : n > 0) (X : Finset ℝ) (hXcard : X.card = n) : (∃ S ⊆ X, S ≠ ∅ ∧ ∃ m : ℤ, |m + ∑ s in S, s| ≤ 1 / (n + 1)) := sorry","Prove that, for every set $X = \{x_1, x_2, \dots, x_n\}$ of $n$ real numbers, there exists a non-empty subset $S$ of $X$ and an integer $m$ such that \[ \left| m + \sum_{s \in S} s \right| \leq \frac{1}{n+1}. \]",,['analysis'],"Section putnam_2006_b2. Require Import List Reals Coquelicot.Coquelicot. Theorem putnam_2006_b2 (n : nat) (npos : gt n 0) (X : list R) (hXcard : length X = n) : exists (presS: R -> Prop) (m: Z) (S: list R), (neq (length S) 0) /\ (forall (x: R), In x S <-> (In x X /\ presS x)) /\ (Rabs (IZR m + (fold_left Rplus S 0)) <= 1 / INR (n + 1)). Proof. Admitted. End putnam_2006_b2.","theory putnam_2006_b2 imports Complex_Main begin theorem putnam_2006_b2: fixes n :: nat and X :: ""real set"" assumes npos: ""n > 0"" and hXcard: ""finite X \ card X = n"" shows ""\ S \ X. (S \ {}) \ (\ m :: int. \m + (\ s \ S. s)\ \ 1 / (n + 1))"" sorry end", putnam_2006_b3,"abbrev putnam_2006_b3_solution : ℕ → ℕ := sorry -- (fun n : ℕ => (Nat.choose n 2) + 1) theorem putnam_2006_b3 (SABpart : Finset (Fin 2 → ℝ) → Finset (Finset (Fin 2 → ℝ)) → Prop) (LS : Finset (Fin 2 → ℝ) → ℕ) (n : ℕ) (hSABpart : ∀ (S : Finset (Fin 2 → ℝ)) (AB : Finset (Finset (Fin 2 → ℝ))), SABpart S AB = (AB.card = 2 ∧ ∃ A ∈ AB, ∃ B ∈ AB, (A ∪ B = S) ∧ (A ∩ B = ∅) ∧ (∃ m b : ℝ, (∀ p ∈ A, p 1 > m * p 0 + b) ∧ (∀ p ∈ B, p 1 < m * p 0 + b)))) (hLS : ∀ S : Finset (Fin 2 → ℝ), LS S = {AB : Finset (Finset (Fin 2 → ℝ)) | SABpart S AB}.encard) (npos : n > 0) : (∃ S : Finset (Fin 2 → ℝ), S.card = n ∧ LS S = putnam_2006_b3_solution n) ∧ (∀ S : Finset (Fin 2 → ℝ), S.card = n → LS S ≤ putnam_2006_b3_solution n) := sorry","Let $S$ be a finite set of points in the plane. A linear partition of $S$ is an unordered pair $\{A,B\}$ of subsets of $S$ such that $A \cup B=S$, $A \cap B=\emptyset$, and $A$ and $B$ lie on opposite sides of some straight line disjoint from $S$ ($A$ or $B$ may be empty). Let $L_S$ be the number of linear partitions of $S$. For each positive integer $n$, find the maximum of $L_S$ over all sets $S$ of $n$ points.",Show that the maximum is $\binom{n}{2}+1$.,['geometry'],,"theory putnam_2006_b3 imports Complex_Main ""HOL-Analysis.Finite_Cartesian_Product"" begin definition putnam_2006_b3_solution :: ""nat \ nat"" where ""putnam_2006_b3_solution \ undefined"" (* (\n::nat. n choose 2 + 1) *) theorem putnam_2006_b3: fixes SABpart :: ""((real^2) set) \ (((real^2) set) set) \ bool"" and LS :: ""((real^2) set) \ nat"" and n :: nat assumes hSABpart: ""\(S::(real^2) set)(AB::((real^2) set) set). SABpart S AB = (card AB = 2 \ (\A\AB. \B\AB. A \ B = S \ A \ B = {} \ (\m b::real. (\p\A. p$2 > m*p$1 + b) \ (\p\B. p$2 < m*p$1 + b))))"" and hLS: ""\S::(real^2) set. LS S = card {AB::((real^2) set) set. SABpart S AB}"" and npos: ""n > 0"" shows ""(GREATEST LSS::nat. (\S::(real^2) set. card S = n \ LS S = LSS)) = putnam_2006_b3_solution n"" sorry end ", putnam_2006_b4,"abbrev putnam_2006_b4_solution : ℕ → ℕ := sorry -- fun k ↦ 2 ^ k theorem putnam_2006_b4 (n : ℕ) (npos : n > 0) (k : ℕ) (hk : k ≤ n) (Z : Set (Fin n → ℝ) := {P : Fin n → ℝ | ∀ j : Fin n, P j = 0 ∨ P j = 1}) (max : ℕ) (hmaxeq : ∃ V : Subspace ℝ (Fin n → ℝ), Module.rank V = k ∧ (Z ∩ V).ncard = max) (hmaxub : ∀ V : Subspace ℝ (Fin n → ℝ), Module.rank V = k → (Z ∩ V).ncard ≤ max) : (max = putnam_2006_b4_solution k) := sorry","Let $Z$ denote the set of points in $\mathbb{R}^n$ whose coordinates are $0$ or $1$. (Thus $Z$ has $2^n$ elements, which are the vertices of a unit hypercube in $\mathbb{R}^n$.) Given a vector subspace $V$ of $\mathbb{R}^n$, let $Z(V)$ denote the number of members of $Z$ that lie in $V$. Let $k$ be given, $0 \leq k \leq n$. Find the maximum, over all vector subspaces $V \subseteq \mathbb{R}^n$ of dimension $k$, of the number of points in $V \cap Z$.",Prove that the maximum is $2^k$.,['linear_algebra'],,"theory putnam_2006_b4 imports Complex_Main ""HOL-Analysis.Finite_Cartesian_Product"" begin definition putnam_2006_b4_solution :: ""nat \ nat"" where ""putnam_2006_b4_solution \ undefined"" (* (\k::nat. 2^k) *) theorem putnam_2006_b4: fixes n :: nat and k :: nat and Z :: ""(real^'n) set"" and max :: nat assumes npos: ""n > 0"" and pncard: ""CARD('n) = n"" and hk: ""k \ n"" defines ""Z \ {P::real^'n. (\j::'n. P$j = 0 \ P$j = 1)}"" and ""max \ GREATEST ZVcard::nat. (\V::(real^'n) set. subspace V \ dim V = k \ ZVcard = card (Z \ V))"" shows ""max = putnam_2006_b4_solution k"" sorry end ", putnam_2006_b5,"abbrev putnam_2006_b5_solution : ℝ := sorry -- 1 / 16 theorem putnam_2006_b5 (I : (ℝ → ℝ) → ℝ := fun f ↦ ∫ x in (0)..1, x ^ 2 * (f x)) (J : (ℝ → ℝ) → ℝ := fun f ↦ ∫ x in (0)..1, x * (f x) ^ 2) (max : ℝ) (heqmax : ∃ f : ℝ → ℝ, ContinuousOn f (Icc 0 1) ∧ I f - J f = max) (hmaxub : ∀ f : ℝ → ℝ, ContinuousOn f (Icc 0 1) → I f - J f ≤ max) : (max = putnam_2006_b5_solution) := sorry","For each continuous function $f: [0,1] \to \mathbb{R}$, let $I(f) = \int_0^1 x^2 f(x)\,dx$ and $J(x) = \int_0^1 x \left(f(x)\right)^2\,dx$. Find the maximum value of $I(f) - J(f)$ over all such functions $f$.",Show that the answer is \frac{1}{16}.,"['analysis', 'algebra']","Section putnam_2006_b5. Require Import Reals Coquelicot.Coquelicot. Open Scope R. Definition putnam_2006_b5_solution := 1 / 16. Theorem putnam_2006_b5: let I (f: R -> R) := RInt (fun x => x ^ 2 * f x) 0 1 in let J (f: R -> R) := RInt (fun x => x * (f x) ^ 2) 0 1 in exists (maxval: R), (forall (f: R -> R) (x: R), 0 <= x <= 1 /\ continuity_pt f x /\ maxval >= I f - J f) /\ (exists (f: R -> R) (x: R), 0 <= x <= 1 /\ continuity_pt f x /\ maxval = I f - J f) -> maxval = putnam_2006_b5_solution. Proof. Admitted. End putnam_2006_b5.","theory putnam_2006_b5 imports Complex_Main ""HOL-Analysis.Set_Integral"" ""HOL-Analysis.Lebesgue_Measure"" begin definition putnam_2006_b5_solution :: real where ""putnam_2006_b5_solution \ undefined"" (* 1 / 16 *) theorem putnam_2006_b5: fixes I :: ""(real \ real) \ real"" and J :: ""(real \ real) \ real"" defines ""I \ \ f. set_lebesgue_integral lebesgue {0..1} (\ x. x ^ 2 * (f x))"" and ""J \ \ f. set_lebesgue_integral lebesgue {0..1} (\ x. x * (f x) ^ 2)"" shows ""(GREATEST y. \ f. continuous_on {0..1} f \ I f - J f = y) = putnam_2006_b5_solution"" sorry end", putnam_2006_b6,"abbrev putnam_2006_b6_solution : ℕ → ℝ := sorry -- fun k => ((k+1)/k)^k theorem putnam_2006_b6 (k : ℕ) (hk : k > 1) (a : ℕ → ℝ) (ha0 : a 0 > 0) (ha : ∀ n : ℕ, a (n + 1) = a n + 1/((a n)^((1 : ℝ)/k))) : Tendsto (fun n => (a n)^(k+1)/(n ^ k)) atTop (𝓝 (putnam_2006_b6_solution k)) := sorry","Let $k$ be an integer greater than 1. Suppose $a_0 > 0$, and define \[ a_{n+1} = a_n + \frac{1}{\sqrt[k]{a_n}} \] for $n > 0$. Evaluate \[\lim_{n \to \infty} \frac{a_n^{k+1}}{n^k}.\]",Show that the solution is $(\frac{k+1}{k})^k$.,['analysis'],"Section putnam_2006_b6. Require Import Reals Coquelicot.Coquelicot. Definition putnam_2006_b6_solution (k: nat) := ((INR k + 1) / INR k) ^ k. Theorem putnam_2006_b6: forall (a0: R) (k: nat), a0 > 0 /\ ge k 1 /\ let fix a (n: nat) : R := match n with | O => a0 | S n' => a n' + 1 / (a n') ^ (1 / k) end in Lim_seq (fun n => (a n) ^ (k + 1) / INR n ^ k) = putnam_2006_b6_solution k. Proof. Admitted. End putnam_2006_b6.","theory putnam_2006_b6 imports Complex_Main begin definition putnam_2006_b6_solution :: ""nat \ real"" where ""putnam_2006_b6_solution \ undefined"" (* (\k::nat. ((k+1)/k) ^ k) *) theorem putnam_2006_b6: fixes k :: nat and a :: ""nat \ real"" assumes hk: ""k > 1"" and ha0: ""a 0 > 0"" and ha: ""\n::nat. a (n+1) = a n + 1 / ((a n) powr (1/k))"" shows ""filterlim (\n::nat. (a n)^(k+1) / (n^k)) (nhds (putnam_2006_b6_solution k)) at_top"" sorry end ", putnam_1991_a2,"abbrev putnam_1991_a2_solution : Prop := sorry -- False theorem putnam_1991_a2 (n : ℕ) (npos : n ≥ 1) : (∃ A B : Matrix (Fin n) (Fin n) ℝ, A ≠ B ∧ A ^ 3 = B ^ 3 ∧ A ^ 2 * B = B ^ 2 * A ∧ Nonempty (Invertible (A ^ 2 + B ^ 2))) ↔ putnam_1991_a2_solution := sorry","Let $\mathbf{A}$ and $\mathbf{B}$ be different $n \times n$ matrices with real entries. If $\mathbf{A}^3=\mathbf{B}^3$ and $\mathbf{A}^2\mathbf{B}=\mathbf{B}^2\mathbf{A}$, can $\mathbf{A}^2+\mathbf{B}^2$ be invertible?",Show that the answer is no.,['linear_algebra'],"Section putnam_1991_a2. From mathcomp Require Import matrix ssralg ssrbool. Open Scope ring_scope. Definition putnam_1991_a2_solution := False. Theorem putnam_1991_a2: forall (R: comUnitRingType) (n: nat) (A B: 'M[R]_n), A <> B -> mulmx (mulmx A A) A = mulmx (mulmx B B) B /\ mulmx (mulmx A A) B = mulmx (mulmx B B) A -> (mulmx A A + mulmx B B) \in unitmx <-> putnam_1991_a2_solution. Proof. Admitted. End putnam_1991_a2.","theory putnam_1991_a2 imports Complex_Main ""HOL-Analysis.Finite_Cartesian_Product"" begin definition putnam_1991_a2_solution :: bool where ""putnam_1991_a2_solution \ undefined"" (* False *) theorem putnam_1991_a2: fixes n :: nat assumes npos: ""n > 0"" and cardn: ""CARD('n) = n"" shows ""(\ A B :: real^'n^'n. A \ B \ A ** A ** A = B ** B ** B \ A ** A ** B = B ** B ** A \ invertible (A ** A + B ** B)) \ putnam_1991_a2_solution"" sorry end", putnam_1991_a3,"abbrev putnam_1991_a3_solution : Set (Polynomial ℝ) := sorry -- {p : Polynomial ℝ | p.degree = 2 ∧ (∃ r1 r2 : ℝ, r1 ≠ r2 ∧ p.eval r1 = 0 ∧ p.eval r2 = 0)} theorem putnam_1991_a3 (p : Polynomial ℝ) (n : ℕ) (pr : Prop) (hn : n = p.degree) (hpr : pr = ∃ r : ℕ → ℝ, (∀ i : Fin (n - 1), r i < r (i + 1)) ∧ (∀ i : Fin n, p.eval (r i) = 0) ∧ (∀ i : Fin (n - 1), (Polynomial.derivative p).eval ((r i + r (i + 1)) / 2) = 0)) : (n ≥ 2 ∧ pr) ↔ p ∈ putnam_1991_a3_solution := sorry","Find all real polynomials $p(x)$ of degree $n \geq 2$ for which there exist real numbers $r_1 R) (n: nat) : Prop := exists (A r1 r2: R), coeff = (fun x => match x with | O => A * r1 * r2 | S O => -A * (r1 + r2) | S (S O) => A | _ => 0 end) /\ n = 2%nat. Theorem putnam_1991_a3 (p: (nat -> R) -> nat -> (R -> R) := fun coeff n => (fun x => sum_n (fun i => coeff i * x ^ i) (n + 1))) : forall (coeff: nat -> R) (n: nat), ge n 2 -> (exists (r: nat -> R), (forall (i j: nat), lt i j -> r i < r j) /\ forall (i: nat), lt i n -> p coeff n (r i) = 0 /\ lt i (n - 1) -> (Derive (p coeff n)) ((r i + r (S i)) / 2) = 0) <-> putnam_1991_a3_solution coeff n. Proof. Admitted. End putnam_1991_a3.","theory putnam_1991_a3 imports Complex_Main ""HOL-Computational_Algebra.Polynomial"" begin definition putnam_1991_a3_solution :: ""real poly set"" where ""putnam_1991_a3_solution \ undefined"" (* {p :: real poly. degree p = 2 \ (\ r1 r2 :: real. r1 \ r2 \ poly p r1 = 0 \ poly p r2 = 0)} *) theorem putnam_1991_a3: fixes p :: ""real poly"" and n :: nat and pr :: bool defines ""n \ degree p"" and ""pr \ \ r :: nat \ real. (\ i \ {1 .. n - 1}. r i < r (i + 1)) \ (\ i \ {1 .. n}. poly p (r i) = 0) \ (\ i \ {1 .. n - 1}. poly (pderiv p) ((r i + r (i + 1)) / 2) = 0)"" shows ""(n \ 2 \ pr) \ p \ putnam_1991_a3_solution"" sorry end", putnam_1991_a4,"abbrev putnam_1991_a4_solution : Prop := sorry -- True theorem putnam_1991_a4 (climit : (ℕ → (Fin 2 → ℝ)) → Prop) (rareas : (ℕ → ℝ) → Prop) (crline : (ℕ → (Fin 2 → ℝ)) → (ℕ → ℝ) → Prop) (hclimit : ∀ c : ℕ → (Fin 2 → ℝ), climit c = ¬∃ (p : Fin 2 → ℝ), ∀ ε : ℝ, ε > 0 → ∃ i : ℕ, c i ∈ Metric.ball p ε) (hrareas : ∀ r : ℕ → ℝ, rareas r = ∃ A : ℝ, Tendsto (fun n : ℕ => ∑ i : Fin n, Real.pi * (r i) ^ 2) atTop (𝓝 A)) (hcrline : ∀ (c : ℕ → (Fin 2 → ℝ)) (r : ℕ → ℝ), crline c r = (∀ v w : Fin 2 → ℝ, w ≠ 0 → ∃ i : ℕ, {p : Fin 2 → ℝ | ∃ t : ℝ, p = v + t • w} ∩ Metric.closedBall (c i) (r i) ≠ ∅)) : (∃ (c : ℕ → (Fin 2 → ℝ)) (r : ℕ → ℝ), (∀ i : ℕ, r i ≥ 0) ∧ climit c ∧ rareas r ∧ crline c r) ↔ putnam_1991_a4_solution := sorry","Does there exist an infinite sequence of closed discs $D_1,D_2,D_3,\dots$ in the plane, with centers $c_1,c_2,c_3,\dots$, respectively, such that \begin{enumerate} \item the $c_i$ have no limit point in the finite plane, \item the sum of the areas of the $D_i$ is finite, and \item every line in the plane intersects at least one of the $D_i$? \end{enumerate}","Show that the answer is yes, such a sequence of closed discs exists.","['geometry', 'analysis']",,"theory putnam_1991_a4 imports Complex_Main ""HOL-Analysis.Finite_Cartesian_Product"" ""HOL-Analysis.Elementary_Metric_Spaces"" begin definition putnam_1991_a4_solution :: bool where ""putnam_1991_a4_solution \ undefined"" (* True *) theorem putnam_1991_a4: fixes climit :: ""(nat \ real^2) \ bool"" and rareas :: ""(nat \ real) \ bool"" and crline :: ""(nat \ real^2) \ (nat \ real) \ bool"" defines ""climit \ \ c. \(\ p :: real^2. \ \ :: real. \ > 0 \ (\ i :: nat. c i \ ball p \))"" and ""rareas \ \ r. convergent (\ N. \ i = 0 .. N. pi * (r i) ^ 2)"" and ""crline \ \ c r. \ v w :: real^2. w \ 0 \ (\ i :: nat. {p :: real^2. \ t :: real. p = v + t *s w} \ cball (c i) (r i) \ {})"" shows ""(\ c :: nat \ real^2. \ r :: nat \ real. (\ i :: nat. r i \ 0) \ climit c \ rareas r \ crline c r) \ putnam_1991_a4_solution"" sorry end", putnam_1991_a5,"abbrev putnam_1991_a5_solution : ℝ := sorry -- 1 / 3 theorem putnam_1991_a5 (f : Set.Icc (0 : ℝ) 1 → ℝ) (hf : ∀ y : Set.Icc 0 1, f y = ∫ x in Set.Ioo 0 y, Real.sqrt (x ^ 4 + (y - y ^ 2) ^ 2)) : (∃ y : Set.Icc 0 1, f y = putnam_1991_a5_solution) ∧ (∀ y : Set.Icc 0 1, f y ≤ putnam_1991_a5_solution) := sorry","Find the maximum value of $\int_0^y \sqrt{x^4+(y-y^2)^2}\,dx$ for $0 \leq y \leq 1$.",Show that the maximum value of the integral is $1/3$.,['analysis'],"Section putnam_1991_a5. Require Import Reals Coquelicot.Coquelicot. Open Scope R. Definition putnam_1991_a5_solution := 1/3. Theorem putnam_1991_a5: exists (m: R), (forall (y: R), 0 <= y <= 1 -> m >= RInt (fun x => sqrt (pow x 4 + pow (y - pow y 2) 2)) 0 y) /\ (exists (y: R), 0 <= y <= 1 -> m >= RInt (fun x => sqrt (pow x 4 + pow (y - pow y 2) 2)) 0 y) -> m = putnam_1991_a5_solution. Proof. Admitted. End putnam_1991_a5.","theory putnam_1991_a5 imports Complex_Main ""HOL-Analysis.Interval_Integral"" begin definition putnam_1991_a5_solution :: real where ""putnam_1991_a5_solution \ undefined"" (* 1 / 3 *) theorem putnam_1991_a5: fixes f :: ""real \ real"" defines ""f \ \ y. interval_lebesgue_integral lebesgue 0 y (\ x. sqrt (x ^ 4 + (y - y ^ 2) ^ 2))"" shows ""(GREATEST I. \ y \ {0..1}. f y = I) = putnam_1991_a5_solution"" sorry end", putnam_1991_a6,"theorem putnam_1991_a6 (nabsum : ℕ → ℕ × (ℕ → ℕ) → Prop) (agt : ℕ × (ℕ → ℕ) → Prop) (A : ℕ → ℕ) (bge : ℕ × (ℕ → ℕ) → Prop) (g : ℕ → ℕ) (bg1 : ℕ × (ℕ → ℕ) → Prop) (bg2 : ℕ × (ℕ → ℕ) → Prop) (B : ℕ → ℕ) (hnabsum : ∀ n ≥ 1, ∀ ab : ℕ × (ℕ → ℕ), nabsum n ab = (ab.1 ≥ 1 ∧ (∀ i < ab.1, ab.2 i > 0) ∧ (∀ i ≥ ab.1, ab.2 i = 0) ∧ (∑ i : Fin ab.1, ab.2 i) = n)) (hagt : ∀ a : ℕ × (ℕ → ℕ), agt a = ∀ i : Fin (a.1 - 1), a.2 i > a.2 (i + 1) + a.2 (i + 2)) (hA : ∀ n ≥ 1, A n = {a : ℕ × (ℕ → ℕ) | nabsum n a ∧ agt a}.encard) (hbge : ∀ b : ℕ × (ℕ → ℕ), bge b = ∀ i : Fin (b.1 - 1), b.2 i ≥ b.2 (i + 1)) (hg : g 0 = 1 ∧ g 1 = 2 ∧ (∀ j ≥ 2, g j = g (j - 1) + g (j - 2) + 1)) (hbg1 : ∀ b : ℕ × (ℕ → ℕ), bg1 b = ∀ i : Fin b.1, ∃ j : ℕ, b.2 i = g j) (hbg2 : ∀ b : ℕ × (ℕ → ℕ), bg2 b = ∃ k : ℕ, b.2 0 = g k ∧ (∀ j ≤ k, ∃ i : Fin b.1, b.2 i = g j)) (hB : ∀ n ≥ 1, B n = {b : ℕ × (ℕ → ℕ) | nabsum n b ∧ bge b ∧ bg1 b ∧ bg2 b}.encard) : ∀ n ≥ 1, A n = B n := sorry","Let $A(n)$ denote the number of sums of positive integers $a_1+a_2+\cdots+a_r$ which add up to $n$ with $a_1>a_2+a_3,a_2>a_3+a_4,\dots,a_{r-2}>a_{r-1}+a_r,a_{r-1}>a_r$. Let $B(n)$ denote the number of $b_1+b_2+\cdots+b_s$ which add up to $n$, with \begin{enumerate} \item $b_1 \geq b_2 \geq \dots \geq b_s$, \item each $b_i$ is in the sequence $1,2,4,\dots,g_j,\dots$ defined by $g_1=1$, $g_2=2$, and $g_j=g_{j-1}+g_{j-2}+1$, and \item if $b_1=g_k$ then every element in $\{1,2,4,\dots,g_k\}$ appears at least once as a $b_i$. \end{enumerate} Prove that $A(n)=B(n)$ for each $n \geq 1$. (For example, $A(7)=5$ because the relevant sums are $7,6+1,5+2,4+3,4+2+1$, and $B(7)=5$ because the relevant sums are $4+2+1,2+2+2+1,2+2+1+1+1,2+1+1+1+1+1,1+1+1+1+1+1+1$.)",,['algebra'],,"theory putnam_1991_a6 imports Complex_Main begin (* uses (nat \ nat) instead of (Fin r \ nat) and (Fin s \ nat) *) theorem putnam_1991_a6: fixes nabsum :: ""nat \ nat \ (nat \ nat) \ bool"" and agt :: ""nat \ (nat \ nat) \ bool"" and A :: ""nat \ nat"" and bge :: ""nat \ (nat \ nat) \ bool"" and g :: ""nat \ nat"" and bg1 :: ""nat \ (nat \ nat) \ bool"" and bg2 :: ""nat \ (nat \ nat) \ bool"" and B :: ""nat \ nat"" defines ""nabsum \ \ (n :: nat) (ab :: nat \ (nat \ nat)). (fst ab) \ 1 \ (\ i < fst ab. (snd ab) i > 0) \ (\ i \ fst ab. (snd ab) i = 0) \ (\ i = 0 .. fst ab - 1. (snd ab) i) = n"" and ""agt \ \ a :: nat \ (nat \ nat). \ i \ {0 .. fst a - 2}. (snd a) i > (snd a) (i + 1) + (snd a) (i + 2)"" and ""A \ \ n :: nat. card {a :: nat \ (nat \ nat). nabsum n a \ agt a}"" and ""bge \ \ b :: nat \ (nat \ nat). \ i \ {0 .. fst b - 2}. (snd b) i \ (snd b) (i + 1)"" and ""bg1 \ \ b :: nat \ (nat \ nat). \ i \ {0 .. fst b - 1}. \ j :: nat. (snd b) i = g j"" and ""bg2 \ \ b :: nat \ (nat \ nat). \ k :: nat. (snd b) 0 = g k \ (\ j \ k. \ i \ {0 .. fst b - 1}. (snd b) i = g j)"" and ""B \ \ n :: nat. card {b :: nat \ (nat \ nat). nabsum n b \ bge b \ bg1 b \ bg2 b}"" assumes hg: ""g 0 = 1 \ g 1 = 2 \ (\ j \ 2. g j = g (j - 1) + g (j - 2) + 1)"" shows ""\ n \ 1. A n = B n"" sorry end", putnam_1991_b1,"abbrev putnam_1991_b1_solution : Set ℤ := sorry -- {A : ℤ | ∃ x > 0, A = x ^ 2} theorem putnam_1991_b1 (m : ℤ → ℤ) (S : ℤ → ℤ) (A : ℤ) (a : ℕ → ℤ) (hm : ∀ n : ℤ, n ≥ 0 → (m n) ^ 2 ≤ n ∧ (∀ m' : ℤ, m' ^ 2 ≤ n → m' ≤ m n)) (hS : ∀ n : ℤ, n ≥ 0 → S n = n - (m n) ^ 2) (ha : a 0 = A ∧ (∀ k : ℕ, a (k + 1) = a k + S (a k))) : (A > 0 ∧ (∃ (K : ℕ) (c : ℕ), ∀ k ≥ K, a k = c)) ↔ A ∈ putnam_1991_b1_solution := sorry","For each integer $n \geq 0$, let $S(n)=n-m^2$, where $m$ is the greatest integer with $m^2 \leq n$. Define a sequence $(a_k)_{k=0}^\infty$ by $a_0=A$ and $a_{k+1}=a_k+S(a_k)$ for $k \geq 0$. For what positive integers $A$ is this sequence eventually constant?",Show that this sequence is eventually constant if and only if $A$ is a perfect square.,['algebra'],"Section putnam_1991_b1. Require Import Nat Coquelicot.Coquelicot. Open Scope nat_scope. Definition putnam_1991_b1_solution (A: nat) := exists (m: nat), A = pow m 2. Theorem putnam_1991_b1: let eS (n: nat) := sub n (pow (sqrt n) 2) in let a_seq := fix a (A k: nat) := match k with | O => A | S k' => a A k' + eS (a A k') end in forall (A: nat), A > 0 -> Lim_seq (fun k => Raxioms.INR (a_seq A k)) = Rdefinitions.R0 <-> putnam_1991_b1_solution A. Proof. Admitted. End putnam_1991_b1.","theory putnam_1991_b1 imports Complex_Main begin definition putnam_1991_b1_solution :: ""nat set"" where ""putnam_1991_b1_solution \ undefined"" (* {A :: nat. \ x > 0. A = x ^ 2} *) theorem putnam_1991_b1: fixes m :: ""nat \ nat"" and S :: ""nat \ nat"" and A :: nat and a :: ""nat \ nat"" defines ""m \ \ n. GREATEST M :: nat. M ^ 2 \ n"" and ""S \ \ n. n - (m n) ^ 2"" assumes ha: ""a 0 = A \ (\ k :: nat. a (k + 1) = a k + S (a k))"" shows ""(A > 0 \ (\ K c :: nat. \ k \ K. a k = c)) \ A \ putnam_1991_b1_solution"" sorry end", putnam_1991_b2,"theorem putnam_1991_b2 (f g : ℝ → ℝ) (fgnconst : ¬∃ c : ℝ, f = Function.const ℝ c ∨ g = Function.const ℝ c) (fgdiff : Differentiable ℝ f ∧ Differentiable ℝ g) (fadd : ∀ x y : ℝ, f (x + y) = f x * f y - g x * g y) (gadd : ∀ x y : ℝ, g (x + y) = f x * g y + g x * f y) : (deriv f 0 = 0) → (∀ x : ℝ, (f x) ^ 2 + (g x) ^ 2 = 1) := sorry","Suppose $f$ and $g$ are non-constant, differentiable, real-valued functions defined on $(-\infty,\infty)$. Furthermore, suppose that for each pair of real numbers $x$ and $y$, \begin{align*} f(x+y)&=f(x)f(y)-g(x)g(y), \\ g(x+y)&=f(x)g(y)+g(x)f(y). \end{align*} If $f'(0)=0$, prove that $(f(x))^2+(g(x))^2=1$ for all $x$.",,['analysis'],"Section putnam_1991_b2. Require Import Reals Coquelicot.Coquelicot. Open Scope R. Theorem putnam_1991_b2: forall (f g: R -> R), (~ exists (c: R), f = (fun _ => c) \/ g = (fun _ => c)) /\ forall x, ex_derive_n f 1 x /\ forall x, ex_derive_n g 1 x -> forall (x y: R), f (x + y) = f x * f y - g x * g y /\ g (x + y) = f x * g y - g x * f y -> Derive f 0 = 0 -> forall (x: R), pow (f x) 2 + pow (g x) 2 = 1. Proof. Admitted. End putnam_1991_b2.","theory putnam_1991_b2 imports Complex_Main ""HOL-Analysis.Derivative"" begin theorem putnam_1991_b2: fixes f g :: ""real \ real"" assumes fgnconst: ""\(\ c :: real. f = (\ x. c) \ g = (\ x. c))"" and fgdiff: ""f differentiable_on UNIV \ g differentiable_on UNIV"" and fadd: ""\ x y :: real. f (x + y) = f x * f y - g x * g y"" and gadd: ""\ x y :: real. g (x + y) = f x * g y + g x * f y"" shows ""(deriv f 0 = 0) \ (\ x :: real. (f x) ^ 2 + (g x) ^ 2 = 1)"" sorry end", putnam_1991_b4,"theorem putnam_1991_b4 (p : ℕ) (podd : Odd p) (pprime : Prime p) : (∑ j : Fin (p + 1), (p.choose j) * ((p + j).choose j)) ≡ (2 ^ p + 1) [MOD (p ^ 2)] := sorry",Suppose $p$ is an odd prime. Prove that $\sum_{j=0}^p \binom{p}{j}\binom{p+j}{j} \equiv 2^p+1 \pmod{p^2}$.,,"['number_theory', 'algebra']","Section putnam_1991_b4. Require Import Nat Reals ZArith Znumtheory Binomial Coquelicot.Coquelicot. Theorem putnam_1991_b4: forall (p: nat), odd p = true /\ prime (Z.of_nat p) -> let expr : R := sum_n (fun j => Binomial.C p j * Binomial.C (p + j) j) p in (floor expr) mod (Z.pow (Z.of_nat p) 2) = Z.add (Z.pow 2 (Z.of_nat p)) 1. Proof. Admitted. End putnam_1991_b4.","theory putnam_1991_b4 imports Complex_Main ""HOL-Computational_Algebra.Primes"" ""HOL-Number_Theory.Cong"" begin theorem putnam_1991_b4: fixes p :: nat assumes podd: ""odd p"" and pprime: ""prime p"" shows ""[(\ j = 0 .. p. (p choose j) * ((p + j) choose j)) = 2 ^ p + 1] (mod p ^ 2)"" sorry end", putnam_1991_b5,"abbrev putnam_1991_b5_solution : ℕ → ℕ := sorry -- (fun p : ℕ => Nat.ceil ((p : ℝ) / 4)) theorem putnam_1991_b5 (p : ℕ) (podd : Odd p) (pprime : Prime p) : ({z : ZMod p | ∃ x : ZMod p, z = x ^ 2} ∩ {z : ZMod p | ∃ y : ZMod p, z = y ^ 2 + 1}).encard = putnam_1991_b5_solution p := sorry",Let $p$ be an odd prime and let $\mathbb{Z}_p$ denote (the field of) integers modulo $p$. How many elements are in the set $\{x^2:x \in \mathbb{Z}_p\} \cap \{y^2+1:y \in \mathbb{Z}_p\}$?,Show that the number of elements in the intersection is $\lceil p/4 \rceil$.,['number_theory'],"Section putnam_1991_b5. Require Import Reals Nat ZArith Znumtheory Ensembles Finite_sets Coquelicot.Coquelicot. From mathcomp Require Import fintype seq ssrbool. Open Scope R. Definition putnam_1991_b5_solution (p: nat) : nat := p / 4 + 1. Variable A: Ensemble Z. Theorem putnam_1991_b5: forall (p: nat), odd p = true /\ prime (Z.of_nat p) -> exists (A B: Ensemble Z), forall (z: Z), (A z <-> exists (m: 'I_p), z = Z.of_nat (pow (nat_of_ord m) 2)) /\ (B z <-> exists (m: 'I_p), z = Z.of_nat (pow (nat_of_ord m) 2 + 1)) -> let C : Ensemble Z := Intersection Z A B in cardinal Z C (putnam_1991_b5_solution p). Proof. Admitted. End putnam_1991_b5.","theory putnam_1991_b5 imports Complex_Main ""HOL-Computational_Algebra.Primes"" ""HOL-Number_Theory.Cong"" begin (* Note: Uses modular congruence instead of the field Zmod p as in Lean *) definition putnam_1991_b5_solution :: ""nat \ nat"" where ""putnam_1991_b5_solution \ undefined"" (* \ p :: nat. nat (ceiling (p / 4)) *) theorem putnam_1991_b5: fixes p :: nat assumes podd: ""odd p"" and pprime: ""prime p"" shows ""card ({z \ {0 .. p - 1}. \ x \ {0 .. p - 1}. [z = x ^ 2] (mod p)} \ {z \ {0 .. p - 1}. \ y \ {0 .. p - 1}. [z = y ^ 2 + 1] (mod p)}) = putnam_1991_b5_solution p"" sorry end", putnam_1991_b6,"abbrev putnam_1991_b6_solution : ℝ → ℝ → ℝ := sorry -- (fun a b : ℝ => |Real.log (a / b)|) theorem putnam_1991_b6 (a b : ℝ) (cle : ℝ → Prop) (abpos : a > 0 ∧ b > 0) (hcle : ∀ c : ℝ, cle c = ∀ u : ℝ, (0 < |u| ∧ |u| ≤ c) → (∀ x ∈ Set.Ioo 0 1, a ^ x * b ^ (1 - x) ≤ a * (Real.sinh (u * x) / Real.sinh u) + b * (Real.sinh (u * (1 - x)) / Real.sinh u))) : cle (putnam_1991_b6_solution a b) ∧ (∀ c : ℝ, cle c → c ≤ putnam_1991_b6_solution a b) := sorry","Let $a$ and $b$ be positive numbers. Find the largest number $c$, in terms of $a$ and $b$, such that $a^xb^{1-x} \leq a\frac{\sinh ux}{\sinh u}+b\frac{\sinh u(1-x)}{\sinh u}$ for all $u$ with $0<|u| \leq c$ and for all $x$, $0 Rpower a x * Rpower b (1 - x) <= a * sinh (u * x) / sinh u + b * sinh (1 - x) / sinh u in exists (mc: R), ineq_holds mc /\ forall (c: R), ineq_holds c -> c <= mc. Proof. Admitted. End putnam_1991_b6.","theory putnam_1991_b6 imports Complex_Main begin definition putnam_1991_b6_solution :: ""real \ real \ real"" where ""putnam_1991_b6_solution \ undefined"" (* \ a b :: real. \ln (a / b)\ *) theorem putnam_1991_b6: fixes a b :: real and cle :: ""real \ bool"" defines ""cle \ \ c :: real. \ u :: real. (0 < \u\ \ \u\ \ c) \ (\ x \ {0 <..< 1}. a powr x * b powr (1 - x) \ a * (sinh (u * x) / sinh u) + b * (sinh (u * (1 - x)) / sinh u))"" assumes abpos: ""a > 0 \ b > 0"" shows ""(GREATEST c. cle c) = putnam_1991_b6_solution a b"" sorry end", putnam_1985_a1,"abbrev putnam_1985_a1_solution : ℕ × ℕ × ℕ × ℕ := sorry -- (10, 10, 0, 0) theorem putnam_1985_a1 : (let (a, b, c, d) := putnam_1985_a1_solution; {(A1, A2, A3) : Set ℤ × Set ℤ × Set ℤ | A1 ∪ A2 ∪ A3 = Icc 1 10 ∧ A1 ∩ A2 ∩ A3 = ∅}.ncard = 2 ^ a * 3 ^ b * 5 ^ c * 7 ^ d) := sorry","Determine, with proof, the number of ordered triples $(A_1, A_2, A_3)$ of sets which have the property that \begin{enumerate} \item[(i)] $A_1 \cup A_2 \cup A_3 = \{1,2,3,4,5,6,7,8,9,10\}$, and \item[(ii)] $A_1 \cap A_2 \cap A_3 = \emptyset$. \end{enumerate} Express your answer in the form $2^a 3^b 5^c 7^d$, where $a,b,c,d$ are nonnegative integers.",Prove that the number of such triples is $2^{10}3^{10}$.,['algebra'],"Section putnam_1985_a1. Require Import Ensembles List Finite_sets Nat Coquelicot.Coquelicot. Import ListNotations. Definition putnam_1985_a1_solution := (10, 10, 0, 0). Theorem putnam_1985_a1 : let E: Ensemble (list (Ensemble nat)) := fun A => match A with | A1 :: A2 :: A3 :: _ => Union nat (Union nat A1 A2) A3 = fun x => 1 <= x <= 11 /\ Intersection nat (Intersection nat A1 A2) A3 = Empty_set nat | _ => True end in exists (a b c d : nat), cardinal (list (Ensemble nat)) E (2 ^ a * 3 ^ b * 5 ^ c * 7 ^ d) <-> (a, b, c, d) = putnam_1985_a1_solution. Proof. Admitted. End putnam_1985_a1.","theory putnam_1985_a1 imports Complex_Main begin definition putnam_1985_a1_solution::""nat \ nat \ nat \ nat"" where ""putnam_1985_a1_solution \ undefined"" (* 10, 10, 0, 0 *) theorem putnam_1985_a1: shows ""let (a, b, c, d) = putnam_1985_a1_solution in (2^a * 3^b * 5^c * 7^d = card {(A1::nat set, A2::nat set, A3::nat set). (A1\A2\A3 = {1..10::nat} \ A1\A2\A3 = {}) })"" sorry end", putnam_1985_a3,"abbrev putnam_1985_a3_solution : ℝ → ℝ := sorry -- fun d ↦ exp d - 1 theorem putnam_1985_a3 (d : ℝ) (a : ℕ → ℕ → ℝ) (ha0 : ∀ m : ℕ, a m 0 = d / 2 ^ m) (ha : ∀ m : ℕ, ∀ j : ℕ, a m (j + 1) = (a m j) ^ 2 + 2 * a m j) : (Tendsto (fun n ↦ a n n) ⊤ (𝓝 (putnam_1985_a3_solution d))) := sorry","Let $d$ be a real number. For each integer $m \geq 0$, define a sequence $\{a_m(j)\}$, $j=0,1,2,\dots$ by the condition \begin{align*} a_m(0) &= d/2^m, \\ a_m(j+1) &= (a_m(j))^2 + 2a_m(j), \qquad j \geq 0. \end{align*} Evaluate $\lim_{n \to \infty} a_n(n)$.",Show that the limit equals $e^d - 1$.,['analysis'],"Section putnam_1985_a3. Require Import Reals Coquelicot.Coquelicot. Open Scope R. Definition putnam_1985_a3_solution (x: R) := exp x - 1. Theorem putnam_1985_a3: forall (x: R), let A := fix a (i j: nat) := match (i,j) with | (i, 0) => x/pow 2 i | (i, S j') => pow (a i j') 2 + 2 * a i j' end in Lim_seq (fun n => A n n) = putnam_1985_a3_solution x. Proof. Admitted. End putnam_1985_a3.","theory putnam_1985_a3 imports Complex_Main begin definition putnam_1985_a3_solution::""real\real"" where ""putnam_1985_a3_solution \ undefined"" (* \x. exp x - 1 *) theorem putnam_1985_a3: fixes d::real and a::""nat\nat\real"" assumes ha0 : ""\m::nat. a m 0 = d / 2^m"" and ha : ""\m::nat. \j::nat. a m (j+1) = (a m j)^2 + 2 * a m j"" shows ""(\n. a n n) \ (putnam_1985_a3_solution d)"" sorry end", putnam_1985_a4,"abbrev putnam_1985_a4_solution : Set (Fin 100) := sorry -- {87} theorem putnam_1985_a4 (a : ℕ → ℕ) (ha1 : a 1 = 3) (ha : ∀ i ≥ 1, a (i + 1) = 3 ^ a i) : ({k : Fin 100 | ∀ N : ℕ, ∃ i ≥ N, a i % 100 = k} = putnam_1985_a4_solution) := sorry",Define a sequence $\{a_i\}$ by $a_1=3$ and $a_{i+1}=3^{a_i}$ for $i \geq 1$. Which integers between $00$ and $99$ inclusive occur as the last two digits in the decimal expansion of infinitely many $a_i$?,Prove that the only number that occurs infinitely often is $87$.,['number_theory'],"Section putnam_1985_a4. Require Import Ensembles Nat Coquelicot.Coquelicot. Definition putnam_1985_a4_solution := fun k => k = 87. Theorem putnam_1985_a4 (a : nat -> nat := fix a (n: nat) := match n with | O => 3 | S n' => 3 ^ (a n') end) : let E: Ensemble nat := fun k => k < 100 /\ forall (n: nat), n < 100 -> exists (i: nat), ge i n /\ a i mod 100 = k in E = putnam_1985_a4_solution. Proof. Admitted. End putnam_1985_a4.","theory putnam_1985_a4 imports Complex_Main begin definition putnam_1985_a4_solution::""nat set"" where ""putnam_1985_a4_solution \ undefined"" (* {87} *) theorem putnam_1985_a4: fixes a::""nat\nat"" assumes ha1 : ""a 1 = 3"" and ha : ""\i \ 1. a (i+1) = 3^ (a i)"" shows ""putnam_1985_a4_solution = {k::nat. k < 100 \ k \ 0 \ (\N::nat. \i::nat \ N. (a i) mod 100 = k)}"" sorry end", putnam_1985_a5,"abbrev putnam_1985_a5_solution : Set ℕ := sorry -- {3, 4, 7, 8} theorem putnam_1985_a5 (I : ℕ → ℝ := fun m ↦ ∫ x in (0)..(2 * Real.pi), ∏ k in Finset.Icc 1 m, cos (k * x)) : ({m ∈ Finset.Icc 1 10 | I m ≠ 0} = putnam_1985_a5_solution) := sorry","Let $I_m = \int_0^{2\pi} \cos(x)\cos(2x)\cdots \cos(mx)\,dx$. For which integers $m$, $1 \leq m \leq 10$ is $I_m \neq 0$?","Prove that the integers $m$ with $1 \leq m \leq 10$ and $I_m \neq 0$ are $m = 3, 4, 7, 8$.",['analysis'],"Section putnam_1985_a5. Require Import Nat Reals List Coquelicot.Coquelicot. Open Scope R. Definition putnam_1985_a5_solution (n: nat) := Nat.eq n 3 \/ Nat.eq n 4 \/ Nat.eq n 7 \/ Nat.eq n 8. Theorem putnam_1985_a5: let F (n: nat) := fun x => let f (i: nat):= cos (INR i * x) in let coeffs := map f (seq 1 n) in fold_right Rmult 1 coeffs in forall (n: nat), and (le 1 n) (le n 10) -> RInt (F n) 0 2*PI <> 0 <-> putnam_1985_a5_solution n. Proof. Admitted. End putnam_1985_a5.","theory putnam_1985_a5 imports Complex_Main ""HOL-Analysis.Interval_Integral"" begin definition putnam_1985_a5_solution::""nat set"" where ""putnam_1985_a5_solution \ undefined"" (* 3, 4, 7, 8 *) theorem putnam_1985_a5: fixes I::""nat\real"" defines ""I \ \m. interval_lebesgue_integral lebesgue 0 (2 * pi) (\x. (\k=1..m. cos (k * x)))"" shows ""putnam_1985_a5_solution = {m. m \ {1..10} \ I m \ 0}"" sorry end", putnam_1985_a6,"abbrev putnam_1985_a6_solution : Polynomial ℝ := sorry -- 6 * X ^ 2 + 5 * X + 1 theorem putnam_1985_a6 (Γ : Polynomial ℝ → ℝ := fun p ↦ ∑ k in Finset.range (p.natDegree + 1), coeff p k ^ 2) (f : Polynomial ℝ := 3 * X ^ 2 + 7 * X + 2) : (let g := putnam_1985_a6_solution; g.eval 0 = 1 ∧ ∀ n : ℕ, n ≥ 1 → Γ (f ^ n) = Γ (g ^ n)) := sorry","If $p(x)= a_0 + a_1 x + \cdots + a_m x^m$ is a polynomial with real coefficients $a_i$, then set \[ \Gamma(p(x)) = a_0^2 + a_1^2 + \cdots + a_m^2. \] Let $F(x) = 3x^2+7x+2$. Find, with proof, a polynomial $g(x)$ with real coefficients such that \begin{enumerate} \item[(i)] $g(0)=1$, and \item[(ii)] $\Gamma(f(x)^n) = \Gamma(g(x)^n)$ \end{enumerate} for every integer $n \geq 1$.",Show that $g(x) = 6x^2 + 5x + 1$ satisfies the conditions.,['algebra'],"Section putnam_1985_a6. From mathcomp Require Import ssralg ssrnum fintype seq poly. Local Open Scope ring_scope. Variable (R: numDomainType). Definition putnam_1985_a6_solution : {poly R} := 6%:R *: 'X^2 + 5%:R *: 'X + 1%:R. Theorem putnam_1985_a6: let g : {poly R} := 3%:R *: 'X^2 + 7%:R *: 'X + 2%:R in let Comp_poly_n := fix comp_poly_n (p : {poly R}) (n : nat) : {poly R} := match n with | O => 1 | S n' => comp_poly (comp_poly_n p n') p end in forall (f: {poly R}), f`_0 = 0 -> forall (n: nat), let F : {poly R} := Comp_poly_n f n in let G : {poly R} := Comp_poly_n g n in (\sum_(i < size F) F`_i) = (\sum_(i < size G) G`_i) <-> f = putnam_1985_a6_solution. Proof. Admitted. End putnam_1985_a6.","theory putnam_1985_a6 imports Complex_Main ""HOL-Computational_Algebra.Polynomial"" begin definition putnam_1985_a6_solution::""real poly"" where ""putnam_1985_a6_solution \ undefined"" (* Poly [1, 5, 6] *) theorem putnam_1985_a6: fixes \::""(real poly) \ real"" and f::""real poly"" defines ""\ \ \P. (\i=0..(degree P). (coeff P i)^2)"" and ""f \ Poly [2, 7, 3]"" shows ""poly putnam_1985_a6_solution 0 = 1 \ (\n::nat \ 1. \ (f^n) = \ (putnam_1985_a6_solution^n))"" sorry end", putnam_1985_b1,"abbrev putnam_1985_b1_solution : Fin 5 → ℤ := sorry -- fun i ↦ i - 2 theorem putnam_1985_b1 (p : (Fin 5 → ℤ) → (Polynomial ℝ) := fun m ↦ ∏ i : Fin 5, ((X : Polynomial ℝ) - m i)) (numnzcoeff : Polynomial ℝ → ℕ := fun p ↦ {j ∈ Finset.range (p.natDegree + 1) | coeff p j ≠ 0}.ncard) : (Injective putnam_1985_b1_solution ∧ ∀ m : Fin 5 → ℤ, Injective m → numnzcoeff (p putnam_1985_b1_solution) ≤ numnzcoeff (p m)) := sorry","Let $k$ be the smallest positive integer for which there exist distinct integers $m_1, m_2, m_3, m_4, m_5$ such that the polynomial \[ p(x) = (x-m_1)(x-m_2)(x-m_3)(x-m_4)(x-m_5) \] has exactly $k$ nonzero coefficients. Find, with proof, a set of integers $m_1, m_2, m_3, m_4, m_5$ for which this minimum $k$ is achieved.","Show that the minimum $k = 3$ is obtained for $\{m_1, m_2, m_3, m_4, m_5\} = \{-2, -1, 0, 1, 2\}$.",['algebra'],,"theory putnam_1985_b1 imports Complex_Main ""HOL-Computational_Algebra.Polynomial"" begin definition putnam_1985_b1_solution::""int \ int \ int \ int \ int"" where ""putnam_1985_b1_solution \ undefined"" (* (-2, -1, 0, 1, 2) *) theorem putnam_1985_b1: fixes p::""int\int\int\int\int\(real poly)"" and numnzcoeff::""(real poly) \ nat"" defines ""p \ \m1. \m2. \m3. \m4. \m5. [: -m1, 1 :] * [: -m2, 1 :] * [: -m3, 1 :] * [: -m4, 1 :] * [: -m5, 1 :]"" and ""numnzcoeff \ \P. card {j::nat. j \ 0 \ j \ degree P \ coeff P j \ 0}"" shows ""let (m1, m2, m3, m4, m5) = putnam_1985_b1_solution in ((card {m1, m2, m3, m4, m5} = 5) \ (\m. let (a, b, c, d, e) = m in (card {a, b, c, d, e} = 5 \ numnzcoeff (p m1 m2 m3 m4 m5) \ numnzcoeff (p a b c d e))))"" sorry end", putnam_1985_b2,"abbrev putnam_1985_b2_solution : ℕ → ℕ := sorry -- fun n ↦ ite (n = 101) 99 0 theorem putnam_1985_b2 (f : ℕ → ℝ → ℝ) (hf0x : ∀ x : ℝ, f 0 x = 1) (hfn0 : ∀ n ≥ 1, f n 0 = 0) (hfderiv : ∀ x : ℝ, ∀ n, deriv (f (n + 1)) x = (n + 1) * f n (x + 1)) : (∃ a : ℕ, a = f 100 1 ∧ Nat.factorization a = putnam_1985_b2_solution) := sorry","Define polynomials $f_n(x)$ for $n \geq 0$ by $f_0(x)=1$, $f_n(0)=0$ for $n \geq 1$, and \[ \frac{d}{dx} f_{n+1}(x) = (n+1)f_n(x+1) \] for $n \geq 0$. Find, with proof, the explicit factorization of $f_{100}(1)$ into powers of distinct primes.",Show that $f_{100}(1) = 101^{99}$.,['algebra'],"Section putnam_1985_b2. Require Import Nat List ZArith Znumtheory. Open Scope nat_scope. Definition putnam_1985_b2_solution := repeat 101 99. Theorem putnam_1985_b2: let P := fix p (n x: nat) : nat := match (n,x) with | (O, x) => 1 | (S n', x) => (n' + 1) * p n' (x + 1) end in let val := P 100 1 in exists (l: list nat), forall (x: nat), (In x l -> prime (Z.of_nat x)) -> fold_left mul l 1 = val <-> l = putnam_1985_b2_solution. Proof. Admitted. End putnam_1985_b2.","theory putnam_1985_b2 imports Complex_Main ""HOL-Computational_Algebra.Polynomial"" ""HOL-Computational_Algebra.Primes"" ""HOL-Analysis.Derivative"" begin definition putnam_1985_b2_solution::""nat multiset"" where ""putnam_1985_b2_solution \ undefined"" (* (replicate_mset 99 101) *) theorem putnam_1985_b2: fixes f::""nat\real\real"" assumes hf0x : ""\x::real. f 0 x = 1"" and hfn0 : ""\n::nat \ 1. f n 0 = 0"" and hfderiv : ""\x::real. \n::nat. (deriv (f (n+1)) x) = (n+1) * f n (x+1)"" shows ""\a::nat. a = f 100 1 \ prime_factorization a = putnam_1985_b2_solution"" sorry end", putnam_1985_b3,"theorem putnam_1985_b3 (a : ℕ → ℕ → ℕ) (apos : ∀ m n : ℕ, a m n > 0) (ha : ∀ k : ℕ, k > 0 → {(m, n) : ℕ × ℕ | m > 0 ∧ n > 0 ∧ a m n = k}.encard = 8) : (∃ m n, m > 0 ∧ n > 0 ∧ a m n > m * n) := sorry","Let \[ \begin{array}{cccc} a_{1,1} & a_{1,2} & a_{1,3} & \dots \\ a_{2,1} & a_{2,2} & a_{2,3} & \dots \\ a_{3,1} & a_{3,2} & a_{3,3} & \dots \\ \vdots & \vdots & \vdots & \ddots \end{array} \] be a doubly infinite array of positive integers, and suppose each positive integer appears exactly eight times in the array. Prove that $a_{m,n} > mn$ for some pair of positive integers $(m,n)$.",,['algebra'],"Section putnam_1985_b3. Require Import Nat List. Theorem putnam_1985_b3: let exactly_equal (a: (nat*nat) -> nat) (ij: (nat*nat)) := (exists (l8: list (nat*nat)), length l8 = 8 /\ NoDup l8 /\ (forall (n: (nat*nat)), In n l8 -> a n = a ij)) /\ (~exists (l9: list (nat*nat)), length l9 = 9 /\ NoDup l9 /\ (forall (n: (nat*nat)), In n l9 -> a n = a ij)) in forall (a: (nat*nat) -> nat), (forall (ij: (nat*nat)), exactly_equal a ij) /\ (exists (ij: (nat*nat)), a ij > fst ij*snd ij). Proof. Admitted. End putnam_1985_b3.","theory putnam_1985_b3 imports Complex_Main begin theorem putnam_1985_b3: fixes a::""nat\nat\nat"" assumes apos : ""\m n::nat. a m n > 0"" and ha : ""\k::nat. k > 0 \ card {(m::nat, n::nat). m > 0 \ n > 0 \ a m n = k} = 8"" shows ""\m n::nat. m > 0 \ n > 0 \ a m n > m * n"" sorry end", putnam_1985_b5,"abbrev putnam_1985_b5_solution : ℝ := sorry -- sqrt (Real.pi / 1985) * exp (-3970) theorem putnam_1985_b5 (fact : ∫ x in univ, exp (- x ^ 2) = sqrt (Real.pi)) : (∫ t in Set.Ioi 0, t ^ (- (1 : ℝ) / 2) * exp (-1985 * (t + t ^ (-(1 : ℝ)))) = putnam_1985_b5_solution) := sorry","Evaluate $\int_0^\infty t^{-1/2}e^{-1985(t+t^{-1})}\,dt$. You may assume that $\int_{-\infty}^\infty e^{-x^2}\,dx = \sqrt{\pi}$.",Show that the integral evaluates to $\sqrt{\frac{\pi}{1985}}e^{-3970}$.,['analysis'],"Section putnam_1985_b5. Require Import Reals Coquelicot.Coquelicot. Open Scope R. Definition putnam_1985_b5_solution := sqrt (PI / 1985) * exp (-3970). Theorem putnam_1985_b5: Lim_seq (fun n => RInt (fun x => Rpower x (-1/2) * exp (-1985 * (x + 1/x))) 0 (INR n)) = putnam_1985_b5_solution. Proof. Admitted. End putnam_1985_b5.","theory putnam_1985_b5 imports Complex_Main ""HOL-Analysis.Interval_Integral"" begin definition putnam_1985_b5_solution::real where ""putnam_1985_b5_solution \ undefined"" (* sqrt (pi / 1985) * exp (-3970) *) theorem putnam_1985_b5: assumes ""interval_lebesgue_integral lebesgue MInfty PInfty (\x. exp (- (x^2))) = sqrt (pi)"" shows ""interval_lebesgue_integral lebesgue 0 PInfty (\t. t powr (-1/2) * exp (-1985 * (t + t powi (-1)))) = putnam_1985_b5_solution"" sorry end", putnam_1985_b6,"theorem putnam_1985_b6 (n : ℕ) (npos : n > 0) (G : Finset (Matrix (Fin n) (Fin n) ℝ)) (groupG : (∀ g ∈ G, ∀ h ∈ G, g * h ∈ G) ∧ 1 ∈ G ∧ (∀ g ∈ G, ∃ h ∈ G, g * h = 1)) (hG : ∑ M in G, Matrix.trace M = 0) : (∑ M in G, M = 0) := sorry","Let $G$ be a finite set of real $n\times n$ matrices $\{M_i\}$, $1 \leq i \leq r$, which form a group under matrix multiplication. Suppose that $\sum_{i=1}^r \mathrm{tr}(M_i)=0$, where $\mathrm{tr}(A)$ denotes the trace of the matrix $A$. Prove that $\sum_{i=1}^r M_i$ is the $n \times n$ zero matrix.",,"['abstract_algebra', 'linear_algebra']",,"theory putnam_1985_b6 imports Complex_Main ""HOL-Analysis.Finite_Cartesian_Product"" ""HOL-Analysis.Determinants"" begin theorem putnam_1985_b6: fixes n::nat and G::""(real^'a^'a) set"" assumes npos : ""n > 0"" and acard : ""CARD('a) = n"" and Gfin : ""finite G"" and groupG : ""(\g \ G. \h \ G. g ** h \ G) \ (1 \ G) \ (\g \ G. \h \ G. g ** h = 1)"" and hG : ""(\M \ G. trace M) = 0"" shows ""(\M \ G. M) = 0"" sorry end", putnam_1994_a1,"theorem putnam_1994_a1 (a : ℕ → ℝ) (ha : ∀ n ≥ 1, 0 < a n ∧ a n ≤ a (2 * n) + a (2 * n + 1)) : ¬(∃ s : ℝ, Tendsto (fun N : ℕ => ∑ n : Set.Icc 1 N, a n) atTop (𝓝 s)) := sorry","Suppose that a sequence $a_1,a_2,a_3,\dots$ satisfies $0 R), forall (n: nat), gt n 0 -> 0 < a n <= a (mul 2 n) + a (add (mul 2 n) 1) -> ~ ex_lim_seq (fun n => sum_n (fun m => a m) n). Proof. Admitted. End putnam_1994_a1.","theory putnam_1994_a1 imports Complex_Main begin theorem putnam_1994_a1: fixes a :: ""nat \ real"" assumes ha: ""\n::nat\1. 0 < a n \ a n \ a (2*n) + a (2*n+1)"" shows ""\(\s::real. filterlim (\N::nat. (\n::nat=1..N. a n)) (nhds s) at_top)"" sorry end ", putnam_1994_a4,"theorem putnam_1994_a4 (A B : Matrix (Fin 2) (Fin 2) ℤ) (ABinv : Nonempty (Invertible A) ∧ Nonempty (Invertible (A + B)) ∧ Nonempty (Invertible (A + 2 * B)) ∧ Nonempty (Invertible (A + 3 * B)) ∧ Nonempty (Invertible (A + 4 * B))) : Invertible (A + 5 * B) := sorry","Let $A$ and $B$ be $2 \times 2$ matrices with integer entries such that $A$, $A+B$, $A+2B$, $A+3B$, and $A+4B$ are all invertible matrices whose inverses have integer entries. Show that $A+5B$ is invertible and that its inverse has integer entries.",,['linear_algebra'],,"theory putnam_1994_a4 imports Complex_Main ""HOL-Analysis.Finite_Cartesian_Product"" begin theorem putnam_1994_a4: fixes A B :: ""int^2^2"" assumes ABinv: ""invertible A \ invertible (A + B) \ invertible (A + 2*B) \ invertible (A + 3*B) \ invertible (A + 4*B)"" shows ""invertible (A + 5*B)"" sorry end ", putnam_1994_a5,"theorem putnam_1994_a5 (r : ℕ → ℝ) (S : Set ℝ) (rpos : r > 0) (rlim : Tendsto r atTop (𝓝 0)) (hS : S = {x : ℝ | ∃ i : Fin 1994 → ℕ, (∀ j k : Fin 1994, j < k → i j < i k) ∧ (x = ∑ j : Fin 1994, r (i j))}) : ∀ a b : ℝ, a < b → (∃ c d : ℝ, a ≤ c ∧ c < d ∧ d ≤ b ∧ (Set.Ioo c d) ∩ S = ∅) := sorry","Let $(r_n)_{n \geq 0}$ be a sequence of positive real numbers such that $\lim_{n \to \infty} r_n=0$. Let $S$ be the set of numbers representable as a sum $r_{i_1}+r_{i_2}+\cdots+r_{i_{1994}}$, with $i_1 nat) instead of (Fin 1994 \ nat) *) theorem putnam_1994_a5: fixes r :: ""nat \ real"" and S :: ""real set"" assumes rpos: ""\i::nat. r i > 0"" and rlim: ""filterlim r (nhds 0) at_top"" and hS: ""S \ {x::real. (\i::nat\nat. (\j::nat\{0..1993}. \k::nat\{0..1993}. (j < k \ i j < i k)) \ (x = (\j::nat=0..1993. r (i j))))}"" shows ""\a b::real. a < b \ (\c d::real. a \ c \ c < d \ d \ b \ {c<.. S = {})"" sorry end ", putnam_1994_a6,"theorem putnam_1994_a6 (f : Fin 10 → Equiv.Perm ℤ) (mijcomp : ℕ → (ℕ → Fin 10) → ℕ → (ℤ → ℤ)) (F : Finset (ℤ → ℤ)) (hf: ∀ n : ℤ, ∃ m : ℕ, ∃ i : ℕ → Fin 10, m ≥ 1 ∧ (mijcomp m i 0) 0 = n) (hmijcomp : ∀ m ≥ 1, ∀ (i : ℕ → Fin 10) (j : Fin m), mijcomp m i j = if (j = m - 1) then (f (i j) : ℤ → ℤ) else (f (i j) ∘ mijcomp m i (j + 1))) (hF : F = {g : ℤ → ℤ | ∃ e : Fin 10 → Fin 2, g = (f 0)^[e 0] ∘ (f 1)^[e 1] ∘ (f 2)^[e 2] ∘ (f 3)^[e 3] ∘ (f 4)^[e 4] ∘ (f 5)^[e 5] ∘ (f 6)^[e 6] ∘ (f 7)^[e 7] ∘ (f 8)^[e 8] ∘ (f 9)^[e 9]}) : ∀ A : Finset ℤ, A.Nonempty → {g ∈ F | g '' A = A}.encard ≤ 512 := sorry","Let $f_1,\dots,f_{10}$ be bijections of the set of integers such that for each integer $n$, there is some composition $f_{i_1} \circ f_{i_2} \circ \cdots \circ f_{i_m}$ of these functions (allowing repetitions) which maps 0 to $n$. Consider the set of $1024$ functions $\mathcal{F}=\{f_1^{e_1} \circ f_2^{e_2} \circ \cdots \circ f_{10}^{e_{10}}\}$, $e_i=0$ or $1$ for $1 \leq i \leq 10$. ($f_i^0$ is the identity function and $f_i^1=f_i$.) Show that if $A$ is any nonempty finite set of integers, then at most $512$ of the functions in $\mathcal{F}$ map $A$ to itself.",,['algebra'],,"theory putnam_1994_a6 imports Complex_Main ""HOL-Combinatorics.Permutations"" begin (* uses (nat \ (int \ int)) instead of (Fin 10 \ (int \ int)) and (nat \ nat) instead of (Fin m \ Fin 10) and (Fin 10 \ Fin 2) *) theorem putnam_1994_a6: fixes f :: ""nat \ (int \ int)"" and mijcomp :: ""nat \ (nat \ nat) \ nat \ (int \ int)"" and F :: ""(int \ int) set"" assumes hfperm: ""\i::nat\{0..9}. (f i) permutes UNIV"" and hfcomp: ""\n::int. \m::nat\1. \i::nat\nat. (\j::nat\{0..(m-1)}. i j \ {0..9}) \ (mijcomp m i 0) 0 = n"" and hmijcomp: ""\m::nat\1. \(i::nat\nat). \j::nat\{0..(m-1)}. mijcomp m i j = (if (j = m-1) then (f (i j)) else (f (i j) \ mijcomp m i (j+1)))"" and hF: ""F \ {g::int\int. (\e::nat\nat. (\i::nat\{0..9}. e i = 0 \ e i = 1) \ (g = (f 0)^^(e 0) \ (f 1)^^(e 1) \ (f 2)^^(e 2) \ (f 3)^^(e 3) \ (f 4)^^(e 4) \ (f 5)^^(e 5) \ (f 6)^^(e 6) \ (f 7)^^(e 7) \ (f 8)^^(e 8) \ (f 9)^^(e 9)))}"" shows ""\A::int set. (finite A \ A \ {}) \ (card {g\F. g ` A = A} \ 512)"" sorry end ", putnam_1994_b1,"abbrev putnam_1994_b1_solution : Set ℤ := sorry -- {n : ℤ | (315 ≤ n ∧ n ≤ 325) ∨ (332 ≤ n ∧ n ≤ 350)} theorem putnam_1994_b1 (n : ℤ) (nwithin : Prop) (hnwithin : nwithin = ({m : ℕ | |n - m ^ 2| ≤ 250}.encard = 15)) : (n > 0 ∧ nwithin) ↔ n ∈ putnam_1994_b1_solution := sorry",Find all positive integers $n$ that are within $250$ of exactly $15$ perfect squares.,Show that an integer $n$ is within $250$ of exactly $15$ perfect squares if and only if either $315 \leq n \leq 325$ or $332 \leq n \leq 350$.,['algebra'],"Section putnam_1994_b1. Require Import Ensembles Finite_sets ZArith. Open Scope Z. Definition putnam_1994_b1_solution (n: Z) := 315 <= n <= 325 \/ 332 <= n <= 350. Theorem putnam_1994_b1: forall (n: Z), exists (E: Ensemble Z), cardinal Z E 15 -> forall (m: Z), E m -> Z.abs (m * m - n) <= 250 -> putnam_1994_b1_solution n. Proof. Admitted. End putnam_1994_b1.","theory putnam_1994_b1 imports Complex_Main begin definition putnam_1994_b1_solution :: ""nat set"" where ""putnam_1994_b1_solution \ undefined"" (* {n::nat. (315 \ n \ n \ 325) \ (332 \ n \ n \ 350)} *) theorem putnam_1994_b1: fixes n :: nat and nwithin :: bool assumes hnwithin: ""nwithin \ (card {m::nat. \n - m^2\ \ 250} = 15)"" shows ""(n > 0 \ nwithin) \ n \ putnam_1994_b1_solution"" sorry end ", putnam_1994_b2,"abbrev putnam_1994_b2_solution : Set ℝ := sorry -- {c : ℝ | c < 243 / 8} theorem putnam_1994_b2 (c : ℝ) (inter : Prop) (hinter : inter = ∃ m b : ℝ, {x : ℝ | m * x + b = x ^ 4 + 9 * x ^ 3 + c * x ^ 2 + 9 * x + 4}.encard = 4) : inter ↔ c ∈ putnam_1994_b2_solution := sorry",For which real numbers $c$ is there a straight line that intersects the curve $x^4+9x^3+cx^2+9x+4$ in four distinct points?,Show that there exists such a line if and only if $c<243/8$.,"['geometry', 'algebra']","Section putnam_1994_b2. Require Import List Reals Coquelicot.Coquelicot. Open Scope R. Definition putnam_1994_b2_solution (c: R) := c < 243 / 8. Theorem putnam_1994_b2: forall (c: R), exists(m b: R), let f (x: R) := pow x 4 + 9 * pow x 3 + c * pow x 2 + 9 * x + 4 in let g (x: R) := m * x + b in exists (l: list R), eq (length l) 4%nat /\ NoDup l /\ forall (r: R), In r l -> f r = g r <-> putnam_1994_b2_solution c. Proof. Admitted. End putnam_1994_b2.","theory putnam_1994_b2 imports Complex_Main begin definition putnam_1994_b2_solution :: ""real set"" where ""putnam_1994_b2_solution \ undefined"" (* {c::real. c < 243/8} *) theorem putnam_1994_b2: fixes c :: real and inter :: bool assumes hinter: ""inter \ (\m b::real. card {x::real. m*x + b = x^4 + 9*x^3 + c*x^2 + 9*x + 4} = 4)"" shows ""inter \ c \ putnam_1994_b2_solution"" sorry end ", putnam_1994_b3,"abbrev putnam_1994_b3_solution : Set ℝ := sorry -- Set.Iio 1 theorem putnam_1994_b3 (k : ℝ) (allfexN : Prop) (hallfexN : allfexN = ∀ f : ℝ → ℝ, (f > 0 ∧ Differentiable ℝ f ∧ ∀ x : ℝ, deriv f x > f x) → (∃ N : ℝ, ∀ x > N, f x > Real.exp (k * x))) : allfexN ↔ k ∈ putnam_1994_b3_solution := sorry","Find the set of all real numbers $k$ with the following property: For any positive, differentiable function $f$ that satisfies $f'(x)>f(x)$ for all $x$, there is some number $N$ such that $f(x)>e^{kx}$ for all $x>N$.","Show that the desired set is $(-\infty,1)$.",['analysis'],"Section putnam_1994_b3. Require Import Reals Coquelicot.Coquelicot. Open Scope R. Definition putnam_1994_b3_solution (k: R) := k <= 1. Theorem putnam_1994_b3: forall (k: R) (f: R -> R) (x: R), f x > 0 /\ ex_derive f x /\ (Derive f) x > f x -> exists (N: R), x > N -> f x > exp (k * x) <-> putnam_1994_b3_solution k. Proof. Admitted. End putnam_1994_b3.","theory putnam_1994_b3 imports Complex_Main ""HOL-Analysis.Derivative"" begin definition putnam_1994_b3_solution :: ""real set"" where ""putnam_1994_b3_solution \ undefined"" (* {..<1} *) theorem putnam_1994_b3: fixes k :: real and allfexN :: bool assumes hallfexN: ""allfexN \ (\f::real\real. (((\x::real. f x > 0) \ f differentiable_on UNIV \ (\x::real. deriv f x > f x)) \ (\N::real. \x::real>N. f x > exp (k*x))))"" shows ""allfexN \ k \ putnam_1994_b3_solution"" sorry end ", putnam_1994_b4,"theorem putnam_1994_b4 (matgcd : Matrix (Fin 2) (Fin 2) ℤ → ℤ) (A : Matrix (Fin 2) (Fin 2) ℤ) (d : ℕ → ℤ) (hmatgcd : ∀ M : Matrix (Fin 2) (Fin 2) ℤ, matgcd M = Int.gcd (Int.gcd (Int.gcd (M 0 0) (M 0 1)) (M 1 0)) (M 1 1)) (hA : A 0 0 = 3 ∧ A 0 1 = 2 ∧ A 1 0 = 4 ∧ A 1 1 = 3) (hd : ∀ n ≥ 1, d n = matgcd (A ^ n - 1)) : Tendsto d atTop atTop := sorry","For $n \geq 1$, let $d_n$ be the greatest common divisor of the entries of $A^n-I$, where $A=\begin{pmatrix} 3 & 2 \\ 4 & 3 \end{pmatrix}$ and $I=\begin{pmatrix} 1 & 0 \\ 0 & 1 \end{pmatrix}$. Show that $\lim_{n \to \infty} d_n=\infty$.",,"['linear_algebra', 'number_theory', 'analysis']","Section putnam_1994_b4. Require Import Nat List Reals Coquelicot.Coquelicot. Import ListNotations. Open Scope R. Theorem putnam_1994_b4: let fix gcd_n (args : list nat) : nat := match args with | nil => 0%nat | h :: args' => gcd h (gcd_n args') end in let fix Mmult_n {T : Ring} {n : nat} (A : matrix n n) (p : nat) := match p with | O => A | S p' => @Mmult T n n n A (Mmult_n A p') end in let A := mk_matrix 2 2 (fun i j => match i, j with | 0, 0 => 3 | 0, 1 => 2 | 1, 0 => 4 | 1, 1 => 3 | _, _ => 0 end) in let I := mk_matrix 2 2 (fun i j => match i, j with | 0, 0 => 1 | 0, 1 => 0 | 1, 0 => 0 | 1, 1 => 1 | _, _ => 0 end) in let dn_mat (n: nat) := Mplus (Mmult_n A n) (opp I) in let dn (n: nat) := gcd_n [Z.to_nat (floor (coeff_mat 0 (dn_mat n) 0 0)); Z.to_nat (floor (coeff_mat 0 (dn_mat n) 0 1)); Z.to_nat (floor (coeff_mat 0 (dn_mat n) 1 0)); Z.to_nat (floor (coeff_mat 0 (dn_mat n) 1 1))] in ~ ex_lim_seq (fun n => INR (dn n)). Proof. Admitted. End putnam_1994_b4.","theory putnam_1994_b4 imports Complex_Main ""HOL-Analysis.Finite_Cartesian_Product"" begin theorem putnam_1994_b4: fixes matgcd :: ""(int^2^2) \ nat"" and A :: ""int^2^2"" and matpow :: ""int^2^2 \ nat \ int^2^2"" and d :: ""nat \ nat"" assumes hmatgcd: ""\M::int^2^2. matgcd M = Gcd {M$1$1, M$1$2, M$2$1, M$2$2}"" and hA: ""A$1$1 = 3 \ A$1$2 = 2 \ A$2$1 = 4 \ A$2$2 = 3"" and hmatpow: ""\M::int^2^2. matpow M 0 = mat 1 \ (\k::nat>0. matpow M k = matpow M (k-1) ** M)"" and hd: ""\n::nat\1. d n = matgcd (matpow A n - mat 1)"" shows ""filterlim d at_top at_top"" sorry end ", putnam_1994_b5,"theorem putnam_1994_b5 (f : ℝ → ℕ → ℤ) (n : ℕ) (hf : ∀ (α : ℝ) (x : ℕ), f α x = Int.floor (α * x)) (npos : n > 0) : ∃ α : ℝ, ∀ k ∈ Set.Icc 1 n, (((f α) ^ k) (n ^ 2) = n ^ 2 - k) ∧ (f (α ^ k) (n ^ 2) = n ^ 2 - k) := sorry","For any real number $\alpha$, define the function $f_\alpha(x)=\lfloor \alpha x \rfloor$. Let $n$ be a positive integer. Show that there exists an $\alpha$ such that for $1 \leq k \leq n$, $f_\alpha^k(n^2)=n^2-k=f_{\alpha^k}(n^2)$.",,['algebra'],"Section putnam_1994_b5. Require Import Basics ZArith Zpower Reals Coquelicot.Coquelicot. Theorem putnam_1994_b5: let fix compose_n {A: Type} (f : A -> A) (n : nat) := match n with | O => fun x => x | S n' => compose f (compose_n f n') end in let fa (a x: R) := IZR (floor (a * x)) in forall (n: Z), Z.gt n 0 -> exists (a: R), forall (k: Z), and (Z.ge 1 k) (Z.ge k n) -> (compose_n (fa a) (Z.to_nat k)) (IZR (Z.pow n 2)) = IZR (Z.pow n 2 - k) /\ IZR (Z.pow n 2 - k) = fa (Rpower a (IZR k)) (IZR (Z.pow n 2)). Proof. Admitted. End putnam_1994_b5.","theory putnam_1994_b5 imports Complex_Main begin theorem putnam_1994_b5: fixes f :: ""real \ nat \ int"" and n :: nat assumes hf: ""\(\::real)(x::nat). f \ x = \\*x\"" and npos: ""n > 0"" shows ""\\::real. \k::nat\{1..n}. ((f \ (n^2))^k = n^2 - k) \ (f (\^k) (n^2) = n^2 - k)"" sorry end ", putnam_1994_b6,"theorem putnam_1994_b6 (n : ℕ → ℤ) (hn : ∀ a : ℕ, n a = 101 * a - 100 * 2 ^ a) : ∀ a b c d : Set.Icc 0 99, (n a + n b ≡ n c + n d [ZMOD 10100]) → (({a, b} : Set (Set.Icc 0 99)) = {c, d}) := sorry","For any integer $a$, set $n_a=101a-100 \cdot 2^a$. Show that for $0 \leq a,b,c,d \leq 99$, $n_a+n_b \equiv n_c+n_d \pmod{10100}$ implies $\{a,b\}=\{c,d\}$.",,['number_theory'],"Section putnam_1994_b6. Require Import Nat. Theorem putnam_1994_b6: let n (a: nat) := 101 * a - 100 * pow 2 a in forall (a b c d: nat), 0 <= a <= 99 /\ 0 <= b <= 99 /\ 0 <= c <= 99 /\ 0 <= d <= 99 /\ n a + n b mod 10100 = n c + n d -> (a,b) = (c,d). Proof. Admitted. End putnam_1994_b6.","theory putnam_1994_b6 imports Complex_Main ""HOL-Number_Theory.Cong"" begin theorem putnam_1994_b6: fixes n :: ""nat \ int"" assumes hn: ""\a::nat. n a = 101*a - 100 * 2^a"" shows ""\a::nat\{0..99}. \b::nat\{0..99}. \c::nat\{0..99}. \d::nat\{0..99}. (([n a + n b = n c + n d] (mod 10100)) \ {a, b} = {c, d})"" sorry end ", putnam_1979_a1,"abbrev putnam_1979_a1_solution : Multiset ℕ := sorry -- Multiset.replicate 659 3 + {2} theorem putnam_1979_a1 (P : Multiset ℕ → Prop := fun a => Multiset.card a > 0 ∧ (∀ i ∈ a, i > 0) ∧ a.sum = 1979) : P putnam_1979_a1_solution ∧ ∀ a : Multiset ℕ, P a → putnam_1979_a1_solution.prod ≥ a.prod := sorry","For which positive integers $n$ and $a_1, a_2, \dots, a_n$ with $\sum_{i = 1}^{n} a_i = 1979$ does $\prod_{i = 1}^{n} a_i$ attain the greatest value?",$n$ equals $660$; all but one of the $a_i$ equal $3$ and the remaining $a_i$ equals $2$.,['algebra'],"Section putnam_1979_a1. Require Import Nat List. Definition putnam_1979_a1_solution := 2 :: repeat 3 659. Theorem putnam_1979_a1: forall (l m: list nat), fold_left add l 0 = 1979 /\ fold_left add m 0 = 1979 /\ fold_left mul l 1 >= fold_left mul m 1 <-> l = putnam_1979_a1_solution. Proof. Admitted. End putnam_1979_a1.","theory putnam_1979_a1 imports Complex_Main ""HOL-Library.Multiset"" begin definition putnam_1979_a1_solution :: ""nat multiset"" where ""putnam_1979_a1_solution \ undefined"" (* add_mset 2 (replicate_mset 659 3) *) theorem putnam_1979_a1: fixes P :: ""nat multiset \ bool"" defines ""P \ \ a :: nat multiset. size a > 0 \ (\ i \# a. i > 0) \ sum_mset a = 1979"" shows ""P putnam_1979_a1_solution \ (\ a :: nat multiset. P a \ prod_mset putnam_1979_a1_solution \ prod_mset a)"" sorry end", putnam_1979_a2,"abbrev putnam_1979_a2_solution : ℝ → Prop := sorry -- fun k : ℝ => k ≥ 0 theorem putnam_1979_a2 : ∀ k : ℝ, (∃ f : ℝ → ℝ, Continuous f ∧ ∀ x : ℝ, f (f x) = k*x^9) ↔ putnam_1979_a2_solution k := sorry",For which real numbers $k$ does there exist a continuous function $f : \mathbb{R} \to \mathbb{R}$ such that $f(f(x)) = kx^9$ for all real $x$?,Such a function exists if and only if $k \ge 0$.,"['analysis', 'algebra']","Section putnam_1979_a2. Require Import Basics Reals Coquelicot.Coquelicot. Theorem putnam_1979_a2: forall (k: R), exists (f: R -> R), continuity f -> forall x, (compose f f) x = k * pow x 9. Proof. Admitted. End putnam_1979_a2.","theory putnam_1979_a2 imports Complex_Main begin definition putnam_1979_a2_solution :: ""real \ bool"" where ""putnam_1979_a2_solution \ undefined"" (* \ k :: real. k \ 0 *) theorem putnam_1979_a2: shows ""\ k :: real. (\ f :: real \ real. continuous_on UNIV f \ (\ x :: real. f (f x) = k * x ^ 9)) \ putnam_1979_a2_solution k"" sorry end", putnam_1979_a3,"abbrev putnam_1979_a3_solution : (ℝ × ℝ) → Prop := sorry -- fun (a, b) => ∃ m : ℤ, a = m ∧ b = m theorem putnam_1979_a3 (x : ℕ → ℝ) (hx : ∀ n : ℕ, x n ≠ 0 ∧ (n ≥ 3 → x n = (x (n - 2))*(x (n - 1))/(2*(x (n - 2)) - (x (n - 1))))) : (∀ m : ℕ, ∃ n : ℕ, n > m ∧ ∃ a : ℤ, a = x n) ↔ putnam_1979_a3_solution (x 1, x 2) := sorry","Let $x_1, x_2, x_3, \dots$ be a sequence of nonzero real numbers such that $$x_n = \frac{x_{n-2}x_{n-1}}{2x_{n-2}-x_{n-1}}$$ for all $n \ge 3$. For which real values of $x_1$ and $x_2$ does $x_n$ attain integer values for infinitely many $n$?",We must have $x_1 = x_2 = m$ for some integer $m$.,['algebra'],"Section putnam_1979_a3. Require Import Reals Coquelicot.Coquelicot. Open Scope R. Definition putnam_1979_a3_solution (x y: R) := x = IZR (floor x) /\ y = IZR (floor y). Theorem putnam_1979_a3: let A := fix a (x y: R) (n: nat) := match n with | O => x | S O => y | S ((S n'') as n') => (a x y n'' * a x y n') / (2 * a x y n'' - a x y n') end in forall (n: nat), exists (x y: R), (A x y n+1 <> 2 * A x y n) /\ (~ exists (r: R), A x y n = IZR (floor (A x y n)) /\ INR n < r) <-> putnam_1979_a3_solution x y. Proof. Admitted. End putnam_1979_a3.","theory putnam_1979_a3 imports Complex_Main begin definition putnam_1979_a3_solution :: ""(real \ real) \ bool"" where ""putnam_1979_a3_solution \ undefined"" (* \ (a :: real, b :: real). \ m :: int. a = m \ b = m *) theorem putnam_1979_a3: fixes x :: ""nat \ real"" assumes hx: ""\ n :: nat. x n \ 0 \ (n \ 3 \ x n = x (n - 2) * x (n - 1) / (2 * x (n - 2) - x (n - 1)))"" shows ""(\ m :: nat. \ n :: nat. n > m \ (\ a :: int. a = x n)) \ putnam_1979_a3_solution (x 1, x 2)"" sorry end", putnam_1979_a4,"abbrev putnam_1979_a4_solution : Prop := sorry -- True theorem putnam_1979_a4 (A : Finset (Fin 2 → ℝ) × Finset (Fin 2 → ℝ) → Prop := fun (R, B) => R.card = B.card ∧ R ∩ B = ∅ ∧ ∀ u : Finset (Fin 2 → ℝ), u ⊆ R ∪ B ∧ u.card = 3 → ¬Collinear ℝ (u : Set (Fin 2 → ℝ))) (w : (Fin 2 → ℝ) × (Fin 2 → ℝ) → ℝ → (Fin 2 → ℝ) := fun (P, Q) => fun x : ℝ => fun i : Fin 2 => x * P i + (1 - x) * Q i) : (∀ R : Finset (Fin 2 → ℝ), ∀ B : Finset (Fin 2 → ℝ), A (R, B) → ∃ v : Finset ((Fin 2 → ℝ) × (Fin 2 → ℝ)), (∀ L ∈ v, ∀ M ∈ v, L ≠ M → ∀ x ∈ Icc 0 1, ∀ y ∈ Icc 0 1, Euclidean.dist (w (L.1, L.2) x) (w (M.1, M.2) y) ≠ 0) ∧ v.card = R.card ∧ ∀ L ∈ v, L.1 ∈ R ∧ L.2 ∈ B) ↔ putnam_1979_a4_solution := sorry","Let $A$ be a set of $2n$ points in the plane, $n$ colored red and $n$ colored blue, such that no three points in $A$ are collinear. Must there exist $n$ closed straight line segments, each connecting one red and one blue point in $A$, such that no two of the $n$ line segments intersect?",Such line segments must exist.,"['geometry', 'combinatorics']",,"theory putnam_1979_a4 imports Complex_Main ""HOL-Analysis.Finite_Cartesian_Product"" begin definition putnam_1979_a4_solution :: bool where ""putnam_1979_a4_solution \ undefined"" (* True *) theorem putnam_1979_a4: fixes A :: ""(real^2) set \ (real^2) set \ bool"" and w :: ""(real^2) \ (real^2) \ real \ real^2"" defines ""A \ \ (R, B). finite R \ finite B \ card R = card B \ R \ B = {} \ \(\ P \ R \ B. \ Q \ R \ B. \ N \ R \ B. Q \ P \ N \ P \ N \ Q \ (\ c :: real. Q - P = c *s (N - P)))"" and ""w \ \ (P, Q) x. x *s P + (1 - x) *s Q"" shows ""(\ R B :: (real^2) set. A (R, B) \ (\ v :: ((real^2) \ (real^2)) set. (card v = card R) \ (\ L \ v. fst L \ R \ snd L \ B \ (\ M \ v. L \ M \ ((fst L \ fst M) \ (snd L \ snd M) \ (\ x \ {0..1}. \ y \ {0..1}. w L x \ w M y)))))) \ putnam_1979_a4_solution"" sorry end ", putnam_1979_a5,"theorem putnam_1979_a5 (S : ℝ → ℕ → ℤ := fun x : ℝ => fun n : ℕ => Int.floor (n*x)) (P : ℝ → Prop := fun x : ℝ => x^3 - 10*x^2 + 29*x - 25 = 0) : ∃ α β : ℝ, α ≠ β ∧ P α ∧ P β ∧ ∀ n : ℕ, ∃ m : ℤ, m > n ∧ ∃ c d : ℕ, S α c = m ∧ S β d = m := sorry","Let $S(x)$ denote the sequence $\lfloor 0 \rfloor, \lfloor x \rfloor, \lfloor 2x \rfloor, \lfloor 3x \rfloor, \dots$, where $\lfloor x \rfloor$ denotes the greatest integer less than or equal to $x$. Prove that there exist distinct real roots $\alpha$ and $\beta$ of $x^3 - 10x^2 + 29x - 25$ such that infinitely many positive integers appear in both $S(\alpha)$ and $S(\beta)$.",,['algebra'],"Section putnam_1979_a5. Require Import Reals Coquelicot.Coquelicot. Open Scope R. Theorem putnam_1979_a5: let f (x: R) := Rpower x 3 - 10 * pow x 2 + 29 * x - 25 in exists (r1 r2: R), r1 <> r2 /\ f r1 = 0 /\ f r2 = 0 /\ ~ exists (r: R), forall (n: nat), exists (p q: Z), n = Z.to_nat (floor (IZR p * r1)) /\ n = Z.to_nat (floor (IZR q * r2)) /\ INR n < r. Proof. Admitted. End putnam_1979_a5.","theory putnam_1979_a5 imports Complex_Main begin theorem putnam_1979_a5: fixes S :: ""real \ nat \ int"" and P :: ""real \ bool"" defines ""S \ \ (x :: real) (n :: nat). floor (n * x)"" and ""P \ \ x :: real. x ^ 3 - 10 * x ^ 2 + 29 * x - 25 = 0"" shows ""\ \ \ :: real. \ \ \ \ P \ \ P \ \ (\ n :: nat. \ m :: int. m > n \ (\ c d :: nat. S \ c = m \ S \ d = m))"" sorry end", putnam_1979_a6,"theorem putnam_1979_a6 (n : ℕ) (p : ℕ → ℝ) (hp : ∀ i ∈ Finset.range n, p i ∈ Icc 0 1) : ∃ x ∈ Icc 0 1, (∀ i ∈ Finset.range n, x ≠ p i) ∧ ∑ i in Finset.range n, 1/|x - p i| ≤ 8*n*∑ i in Finset.range n, (1 : ℝ)/(2*i + 1) := sorry","For all $i \in \{0, 1, \dots, n - 1\}$, let $p_i \in [0, 1]$. Prove that there exists some $x \in [0, 1]$ such that $$\sum_{i = 0}^{n - 1} \frac{1}{|x - p_i|} \le 8n\left(\sum_{i = 0}^{n-1} \frac{1}{2i + 1}\right).$$",,['algebra'],"Section putnam_1979_a6. Require Import Reals Coquelicot.Coquelicot. Open Scope R. Theorem putnam_1979_a6: forall (a: nat -> R) (n: nat), 0 <= a n <= 1 -> exists (b: R), 0 <= b <= 1 -> sum_n (fun n => 1/(b - a n)) n <= 8 * INR n * sum_n (fun i => 1/(2*(INR i+1) - 1)) n. Proof. Admitted. End putnam_1979_a6.","theory putnam_1979_a6 imports Complex_Main begin theorem putnam_1979_a6: fixes n :: nat and p :: ""nat \ real"" assumes hp: ""\ i \ {1..n}. p i \ {0..1}"" shows ""\ x \ {0..1}. (\ i \ {1..n}. x \ p i) \ (\ i = 1..n. 1 / \x - p i\) \ 8 * n * (\ i = 1..n. 1 / (2 * i - 1))"" sorry end", putnam_1979_b2,"abbrev putnam_1979_b2_solution : ℝ × ℝ → ℝ := sorry -- fun (a, b) => (Real.exp (-1))*(b^b/a^a)^(1/(b-a)) theorem putnam_1979_b2 : ∀ a b : ℝ, 0 < a ∧ a < b → Tendsto (fun t : ℝ => (∫ x in Icc 0 1, (b*x + a*(1 - x))^t)^(1/t)) (𝓝[≠] 0) (𝓝 (putnam_1979_b2_solution (a, b))) := sorry","If $0 < a < b$, find $$\lim_{t \to 0} \left( \int_{0}^{1}(bx + a(1-x))^t dx \right)^{\frac{1}{t}}$$ in terms of $a$ and $b$.",The limit equals $$e^{-1}\left(\frac{b^b}{a^a}\right)^{\frac{1}{b-a}}.$$,['analysis'],"Section putnam_1979_b2. Require Import Reals Coquelicot.Coquelicot. Definition putnam_1979_b2_solution (a b: R):= (Rpower b (b/(b-a))) / ((exp 1) * Rpower a (a/(b-a))). Theorem putnam_1979_b2: forall (a b: R), 0 < a < b -> Lim_seq (fun lam => Rpower (RInt (fun x => Rpower (b*x + a*(1-x)) (INR lam)) 0 1) 1/INR lam) = putnam_1979_b2_solution a b. Proof. Admitted. End putnam_1979_b2.","theory putnam_1979_b2 imports Complex_Main ""HOL-Analysis.Interval_Integral"" begin definition putnam_1979_b2_solution :: ""real \ real \ real"" where ""putnam_1979_b2_solution \ undefined"" (* \ a b. exp (-1) * (b powr b / a powr a) powr (1 / (b - a)) *) theorem putnam_1979_b2: shows ""\ a b :: real. 0 < a \ a < b \ ((\ t :: real. (interval_lebesgue_integral lebesgue 0 1 (\ x. (b * x + a * (1 - x)) powr t)) powr (1 / t)) \ putnam_1979_b2_solution a b) (at 0)"" sorry end", putnam_1979_b3,"abbrev putnam_1979_b3_solution : ℕ → ℤ := sorry -- fun n ↦ (n - 1) / 2 theorem putnam_1979_b3 (F : Type*) [Field F] [Fintype F] (n : ℕ := Fintype.card F) (nodd : Odd n) (b c : F) (p : Polynomial F := X ^ 2 + (C b) * X + (C c)) (hp : Irreducible p) : ({d : F | Irreducible (p + (C d))}.ncard = putnam_1979_b3_solution n) := sorry","Let $F$ be a finite field with $n$ elements, and assume $n$ is odd. Suppose $x^2 + bx + c$ is an irreducible polynomial over $F$. For how many elements $d \in F$ is $x^2 + bx + c + d$ irreducible?",Show that there are $\frac{n - 1}{2}$ such elements $d$.,['abstract_algebra'],,"theory putnam_1979_b3 imports Complex_Main ""HOL-Computational_Algebra.Polynomial"" begin definition putnam_1979_b3_solution :: ""nat \ nat"" where ""putnam_1979_b3_solution \ undefined"" (* \ n :: nat. nat \(n - 1) / 2\ *) theorem putnam_1979_b3: fixes F (structure) and n :: ""nat"" and b c :: ""'a :: field"" and p :: ""'a poly"" defines ""p \ [:c, b, 1:]"" assumes hFfin : ""finite (carrier F) \ card (carrier F) = n"" and Ffield : ""field F"" and nodd : ""odd n"" and hp : ""irreducible p"" shows ""card {d :: ('a :: field). irreducible (p + monom d 0)} = putnam_1979_b3_solution n"" sorry end", putnam_1979_b6,"theorem putnam_1979_b6 (n : ℕ) (z : Fin n → ℂ) : (|((∑ i : Fin n, (z i) ^ 2) ^ ((1 : ℂ) / 2)).re| ≤ ∑ i : Fin n, |(z i).re|) := sorry","Let $z_i$ be complex numbers for $i = 1, 2, \dots, n$. Show that \[ \left \lvert \mathrm{Re} \, [(z_1^2 + z_2^2 + \dots + z_n^2)^{1/2} ] \right \rvert \leq \lvert \mathrm{Re} \, z_1 \rvert + \lvert \mathrm{Re} \, z_2 \rvert + \dots + \lvert \mathrm{Re} \, z_n \rvert. \]",,['analysis'],"Section putnam_1979_b6. Require Import Reals List Coquelicot.Coquelicot. Open Scope R. Theorem putnam_1979_b6: forall (n: nat) (l: list C), length l = n -> let sum1 := fold_left (fun acc x => Cplus acc (Cmult x x)) l 0 in let sum2 := fold_left (fun acc x => Re x) l 0 in sqrt (Re sum1) <= sum2. Proof. Admitted. End putnam_1979_b6.","theory putnam_1979_b6 imports Complex_Main begin (* Note: Problem dimension boosted from Fin n *) theorem putnam_1979_b6: fixes n :: ""nat"" and z :: ""nat \ complex"" shows ""\Re (csqrt (\ i \ {1::nat..n}. (z i)^2))\ \ (\ i \ {1..n}. \Re (z i)\)"" sorry end", putnam_1987_a1,"theorem putnam_1987_a1 (A B C D : Set (ℝ × ℝ)) (hA : A = {(x, y) : ℝ × ℝ | x ^ 2 - y ^ 2 = x / (x ^ 2 + y ^ 2)}) (hB : B = {(x, y) : ℝ × ℝ | 2 * x * y + y / (x ^ 2 + y ^ 2) = 3}) (hC : C = {(x, y) : ℝ × ℝ | x ^ 3 - 3 * x * y ^ 2 + 3 * y = 1}) (hD : D = {(x, y) : ℝ × ℝ | 3 * x ^ 2 * y - 3 * x - y ^ 3 = 0}) : A ∩ B = C ∩ D := sorry","Curves $A$, $B$, $C$, and $D$ are defined in the plane as follows: \begin{align*} A&=\left\{ (x,y):x^2-y^2=\frac{x}{x^2+y^2} \right\}, \\ B&=\left\{ (x,y):2xy+\frac{y}{x^2+y^2}=3 \right\}, \\ C&=\left\{ (x,y):x^3-3xy^2+3y=1 \right\}, \\ D&=\left\{ (x,y):3x^2y-3x-y^3=0 \right\}. \end{align*} Prove that $A \cap B=C \cap D$.",,['algebra'],,"theory putnam_1987_a1 imports Complex_Main begin theorem putnam_1987_a1: fixes A B C D :: ""(real \ real) set"" defines ""A \ {(x, y). x ^ 2 - y ^ 2 = x / (x ^ 2 + y ^ 2)}"" defines ""B \ {(x, y). 2 * x * y + y / (x ^ 2 + y ^ 2) = 3}"" defines ""C \ {(x, y). x ^ 3 - 3 * x * y ^ 2 + 3 * y = 1}"" defines ""D \ {(x, y). 3 * x ^ 2 * y - 3 * x - y ^ 3 = 0}"" shows ""A \ B = C \ D"" sorry end", putnam_1987_a2,"abbrev putnam_1987_a2_solution : ℕ := sorry -- 1984 theorem putnam_1987_a2 (seqind : ℕ → ℕ) (seqsize : ℕ → ℕ) (f : ℕ → ℕ) (hseqind : seqind 1 = 1 ∧ ∀ i ≥ 2, seqind i = seqind (i - 1) + (Nat.digits 10 (i - 1)).length) (hseqsize : ∀ i ≥ 1, ∀ j : Fin ((Nat.digits 10 i).length), seqsize (seqind i + j) = (Nat.digits 10 i).length) (hf : ∀ n : ℕ, f n = seqsize (10 ^ n)) : f 1987 = putnam_1987_a2_solution := sorry","The sequence of digits $123456789101112131415161718192021 \dots$ is obtained by writing the positive integers in order. If the $10^n$-th digit in this sequence occurs in the part of the sequence in which the $m$-digit numbers are placed, define $f(n)$ to be $m$. For example, $f(2)=2$ because the $100$th digit enters the sequence in the placement of the two-digit integer $55$. Find, with proof, $f(1987)$.",Show that the value of $f(1987)$ is $1984$.,['algebra'],,"theory putnam_1987_a2 imports Complex_Main begin definition putnam_1987_a2_solution :: nat where ""putnam_1987_a2_solution \ undefined"" (* 1984 *) theorem putnam_1987_a2: fixes seqind :: ""nat \ nat"" and seqsize :: ""nat \ nat"" and f :: ""nat \ nat"" and numdigits :: ""nat \ nat"" assumes hseqind: ""seqind 1 = 1 \ (\ i \ 2. seqind i = seqind (i - 1) + numdigits (i - 1))"" and hseqsize: ""\ i \ 1. \ j \ {0 .. numdigits i - 1}. seqsize (seqind i + j) = numdigits i"" and hf: ""\ n :: nat. f n = seqsize (10 ^ n)"" and hnumdigits: ""\ n \ 1. numdigits n = (GREATEST k :: nat. 10 ^ k \ n) + 1"" shows ""f 1987 = putnam_1987_a2_solution"" sorry end", putnam_1987_a4,"abbrev putnam_1987_a4_solution : ℂ := sorry -- (5 / 3) * sqrt 30 theorem putnam_1987_a4 (P : MvPolynomial (Fin 3) ℂ) (hPreal : ∀ i : Fin 3 →₀ ℕ, (coeff i P).im = 0) (F : ℝ → ℝ → ℝ) (vars : ℂ → ℂ → ℂ → (Fin 3 → ℂ) := fun a b c ↦ fun i ↦ ite (i = 0) a (ite (i = 1) b c)) (h : ∀ x y z u : ℝ, eval (vars (u * x) (u * y) (u * z)) P = u ^ 2 * F (y - x) (z - x)) (hPval : eval (vars 1 0 0) P = 4 ∧ eval (vars 0 1 0) P = 5 ∧ eval (vars 0 0 1) P = 6) (A B C : ℂ) (hPABC : eval (vars A B C) P = 0) (habs : ‖B - A‖ = 10) : (‖C - A‖ = putnam_1987_a4_solution) := sorry","Let $P$ be a polynomial, with real coefficients, in three variables and $F$ be a function of two variables such that \[ P(ux, uy, uz) = u^2 F(y-x,z-x) \quad \mbox{for all real $x,y,z,u$}, \] and such that $P(1,0,0)=4$, $P(0,1,0)=5$, and $P(0,0,1)=6$. Also let $A,B,C$ be complex numbers with $P(A,B,C)=0$ and $|B-A|=10$. Find $|C-A|$.",Prove that $|C - A| = \frac{5}{3}\sqrt{30}$.,['algebra'],,"theory putnam_1987_a4 imports Complex_Main ""HOL-Computational_Algebra.Polynomial"" begin definition putnam_1987_a4_solution::real where ""putnam_1987_a4_solution \ undefined"" (* (5/3) * sqrt 30 *) theorem putnam_1987_a4: fixes P::""complex poly poly poly"" and F::""real\real\real"" and a b c::complex assumes hPreal : ""\i j k::nat. Im (coeff (coeff (coeff P k) j) i) = 0"" and h : ""\x y z u::real. (poly (poly (poly P [:[: u * z :]:]) [: u * y :]) (u * x)) = u^2 * F (y-x) (z-x)"" and hPval1 : ""(poly (poly (poly P [:[: 0 :] :]) [: 0 :]) 1) = 4"" and hPval2 : ""(poly (poly (poly P [:[: 0 :] :]) [: 1 :]) 0) = 5"" and hPval3 : ""(poly (poly (poly P [:[: 1 :] :]) [: 0 :]) 0) = 6"" and hPabc : ""(poly (poly (poly P [:[: c :] :]) [: b :]) a) = 0"" and habs : ""norm (b - a) = 10"" shows ""norm (c - a) = putnam_1987_a4_solution"" sorry end", putnam_1987_a6,"abbrev putnam_1987_a6_solution : Set ℝ := sorry -- {x : ℝ | x > 0 ∧ x < 25} theorem putnam_1987_a6 (a : ℕ → ℕ := fun n ↦ {i | (digits 3 n).get i = 0}.ncard) : ({x : ℝ | x > 0 ∧ Summable (fun n ↦ x ^ (a n) / (n ^ 3))} = putnam_1987_a6_solution) := sorry","For each positive integer $n$, let $a(n)$ be the number of zeroes in the base $3$ representation of $n$. For which positive real numbers $x$ does the series \[ \sum_{n=1}^\infty \frac{x^{a(n)}}{n^3} \] converge?","Show that for positive $x$, the series converges if and only if $x < 25$.","['algebra', 'analysis']",,"theory putnam_1987_a6 imports Complex_Main begin definition putnam_1987_a6_solution::""real set"" where ""putnam_1987_a6_solution \ undefined"" (* { x. x > 0 \ x < 25 } *) fun digits_b3::""nat \ nat list"" where ""digits_b3 n = (if n < 3 then [n] else ([n mod 3::nat] @ digits_b3 (n div 3::nat)))"" theorem putnam_1987_a6: fixes a::""nat\nat"" defines ""a \ \n. card {i::nat. i < length (digits_b3 n) \ (digits_b3 n)!i = 0}"" shows ""putnam_1987_a6_solution = {x::real. x > 0 \ summable (\n. x^(a n) / n^3)}"" sorry end", putnam_1987_b1,"abbrev putnam_1987_b1_solution : ℝ := sorry -- 1 theorem putnam_1987_b1 : (∫ x in (2)..4, sqrt (log (9 - x)) / (sqrt (log (9 - x)) + sqrt (log (x + 3))) = putnam_1987_b1_solution) := sorry","Evaluate \[ \int_2^4 \frac{\sqrt{\ln(9-x)}\,dx}{\sqrt{\ln(9-x)}+\sqrt{\ln(x+3)}}. \]",Prove that the integral evaluates to $1$.,['analysis'],"Section putnam_1987_b1. Require Import Reals Coquelicot.Coquelicot. Definition putnam_1987_b1_solution := 1. Theorem putnam_1987_b1: RInt (fun x => ln (9 - x) ^ (1/2) / ( ln (9 - x) ^ (1/2) + ln (x + 3) ^ (1/2))) 2 4 = putnam_1987_b1_solution. Proof. Admitted. End putnam_1987_b1.","theory putnam_1987_b1 imports Complex_Main ""HOL-Analysis.Interval_Integral"" begin definition putnam_1987_b1_solution::real where ""putnam_1987_b1_solution \ undefined"" (* 1 *) theorem putnam_1987_b1: shows ""putnam_1987_b1_solution = interval_lebesgue_integral lebesgue 2 4 (\x. sqrt (ln (9-x)) / (sqrt (ln (9-x)) + sqrt (ln (x+3))))"" sorry end", putnam_1987_b2,"theorem putnam_1987_b2 (r s t : ℕ) (hsum : r + s ≤ t) : (∑ i : Finset.range (s + 1), (choose s i : ℚ) / (choose t (r + i)) = ((t + 1) : ℚ) / ((t + 1 - s) * choose (t - s) r)) := sorry","Let $r, s$ and $t$ be integers with $0 \leq r$, $0 \leq s$ and $r+s \leq t$. Prove that \[ \frac{\binom s0}{\binom tr} + \frac{\binom s1}{\binom{t}{r+1}} + \cdots + \frac{\binom ss}{\binom{t}{r+s}} = \frac{t+1}{(t+1-s)\binom{t-s}{r}}. \]",,['algebra'],"Section putnam_1987_b2. Require Import Binomial Reals Coquelicot.Coquelicot. Theorem putnam_1987_b2: forall (n r s: nat), ge n (r + s) -> sum_n (fun i => Binomial.C s i / Binomial.C n (r + i)) s = (INR n + 1)/((INR n + 1 - INR s) * Binomial.C (n - s) r). Proof. Admitted. End putnam_1987_b2.","theory putnam_1987_b2 imports Complex_Main begin theorem putnam_1987_b2: fixes r s t::nat assumes hsum : ""r + s \ t"" shows ""(\i=0..s. (s choose i) / (t choose (r+i))) = (t+1) / ((t+1-s) * ((t-s) choose r))"" sorry end", putnam_1987_b4,"abbrev putnam_1987_b4_solution : Prop × ℝ × Prop × ℝ := sorry -- (True, -1, True, 0) theorem putnam_1987_b4 (x y : ℕ → ℝ) (hxy1 : (x 1, y 1) = (0.8, 0.6)) (hx : ∀ n ≥ 1, x (n + 1) = (x n) * cos (y n) - (y n) * sin (y n)) (hy : ∀ n ≥ 1, y (n + 1) = (x n) * sin (y n) + (y n) * cos (y n)) : let (existsx, limx, existsy, limy) := putnam_1987_b4_solution (((∃ c : ℝ, Tendsto x ⊤ (𝓝 c)) → existsx) ∧ (existsx → Tendsto x ⊤ (𝓝 limx)) ∧ ((∃ c : ℝ, Tendsto y ⊤ (𝓝 c)) → existsy) ∧ (existsy → Tendsto y ⊤ (𝓝 limy))) := sorry","Let $(x_1,y_1) = (0.8, 0.6)$ and let $x_{n+1} = x_n \cos y_n - y_n \sin y_n$ and $y_{n+1}= x_n \sin y_n + y_n \cos y_n$ for $n=1,2,3,\dots$. For each of $\lim_{n\to \infty} x_n$ and $\lim_{n \to \infty} y_n$, prove that the limit exists and find it or prove that the limit does not exist.",Show that $\lim_{n \to \infty} x_n = -1$ and $\lim_{n \to \infty} y_n = 0$.,['analysis'],"Section putnam_1987_b4. Require Import Reals Coquelicot.Coquelicot. Open Scope R. Definition putnam_1987_b4_solution1 := -1. Definition putnam_1987_b4_solution2 := PI. Theorem putnam_1987_b4: let A := fix a (i j: nat) : (R * R):= match (i, j) with | (O, O) => (0.8, 0.6) | (S i', S j') => let xn := fst (a i' j') in let yn := snd (a i' j') in (xn * cos yn - yn * sin yn,xn * sin yn + yn * cos yn) | (_, _) => (0, 0) end in Lim_seq (fun n => fst (A n 0%nat)) = putnam_1987_b4_solution1 /\ Lim_seq (fun n => snd (A 0%nat n)) = putnam_1987_b4_solution2. Proof. Admitted. End putnam_1987_b4.","theory putnam_1987_b4 imports Complex_Main begin definition putnam_1987_b4_solution::""(bool \ real \ bool \ real)"" where ""putnam_1987_b4_solution \ undefined"" (* (True, -1, True, 0) *) theorem putnam_1987_b4: fixes x y::""nat\real"" assumes hxy1 : ""(x 1, y 1) = (0.8, 0.6)"" and hx : ""\n \ 1. x (n+1) = (x n) * cos (y n) - (y n) * sin (y n)"" and hy : ""\n \ 1. y (n+1) = (x n) * sin (y n) + (y n) * cos (y n)"" shows ""let (existsx, limx, existsy, limy) = putnam_1987_b4_solution in (((\c::real. (x \ c)) \ existsx) \ (existsx \ (x \ limx)) \ ((\c::real. (y \ c)) \ existsy) \ (existsy \ (y \ limy)))"" sorry end", putnam_1987_b5,"theorem putnam_1987_b5 (n : ℕ) (npos : n > 0) (O : Matrix (Fin 1) (Fin n) ℂ := 0) (M : Matrix (Fin (2 * n)) (Fin n) ℂ) (hM : ∀ z : Matrix (Fin 1) (Fin (2 * n)) ℂ, z * M = O → (¬∀ i : Fin (2 * n), z 0 i = 0) → ∃ i : Fin (2 * n), (z 0 i).im ≠ 0) : (∀ r : Matrix (Fin (2 * n)) (Fin 1) ℝ, ∃ w : Matrix (Fin n) (Fin 1) ℂ, ∀ i : (Fin (2 * n)), ((M * w) i 0).re = r i 0) := sorry","Let $O_n$ be the $n$-dimensional vector $(0,0,\cdots, 0)$. Let $M$ be a $2n \times n$ matrix of complex numbers such that whenever $(z_1, z_2, \dots, z_{2n})M = O_n$, with complex $z_i$, not all zero, then at least one of the $z_i$ is not real. Prove that for arbitrary real numbers $r_1, r_2, \dots, r_{2n}$, there are complex numbers $w_1, w_2, \dots, w_n$ such that \[ \mathrm{re}\left[ M \left( \begin{array}{c} w_1 \\ \vdots \\ w_n \end{array} \right) \right] = \left( \begin{array}{c} r_1 \\ \vdots \\ r_{2n} \end{array} \right). \] (Note: if $C$ is a matrix of complex numbers, $\mathrm{re}(C)$ is the matrix whose entries are the real parts of the entries of $C$.)",,['linear_algebra'],,"theory putnam_1987_b5 imports Complex_Main ""HOL-Analysis.Finite_Cartesian_Product"" begin theorem putnam_1987_b5: fixes n::nat and M::""complex^'a^'b"" assumes matsize : ""CARD('a) = n \ CARD('b) = 2 * n"" and npos : ""n > 0"" and hM : ""\z::(complex^'b^1). (let prod = z ** M in (\i. prod$i = 0)) \ (\(\i. z$1$i = 0)) \ (\i. Im (z$1$i) \ 0)"" shows ""\r::(real^1^'b). \w::(complex^1^'a). \i. Re ((M**w)$i$1) = r$i$1"" sorry end", putnam_1987_b6,"theorem putnam_1987_b6 (p : ℕ) (podd : Odd p ∧ Nat.Prime p) (F : Type*) [Field F] [Fintype F] (Fcard : Fintype.card F = p ^ 2) (S : Set F) (Snz : ∀ x ∈ S, x ≠ 0) (Scard : S.ncard = ((p : ℤ) ^ 2 - 1) / 2) (hS : ∀ a : F, a ≠ 0 → Xor' (a ∈ S) (-a ∈ S)) (N : ℕ := (S ∩ {x | ∃ a ∈ S, x = 2 * a}).ncard) : (Even N) := sorry","Let $F$ be the field of $p^2$ elements, where $p$ is an odd prime. Suppose $S$ is a set of $(p^2-1)/2$ distinct nonzero elements of $F$ with the property that for each $a\neq 0$ in $F$, exactly one of $a$ and $-a$ is in $S$. Let $N$ be the number of elements in the intersection $S \cap \{2a: a \in S\}$. Prove that $N$ is even.",,['abstract_algebra'],,"theory putnam_1987_b6 imports Complex_Main ""HOL-Computational_Algebra.Primes"" ""HOL-Algebra.Ring"" begin theorem putnam_1987_b6: fixes p::nat and F (structure) and S::""'a set"" assumes podd : ""odd p \ prime p"" and Ffield : ""field F"" and Fcard : ""finite (carrier F) \ card (carrier F) = p^2"" and Snz : ""\x \ S. x \ \\<^bsub>F\<^esub>"" and Scard : ""real_of_nat (card S) = (p^2 - 1::real) / 2"" and hS : ""\a::'a. a \ carrier F \ a \ \\<^bsub>F\<^esub> \ \((a \ S) \ ((\\<^bsub>F\<^esub> a) \ S))"" shows ""even (card (S \ {x. (\a \ S. x = a \\<^bsub>F\<^esub> a)}))"" sorry end", putnam_2004_a1,"abbrev putnam_2004_a1_solution : Prop := sorry -- True theorem putnam_2004_a1 (S : (ℕ → Fin 2) → ℕ → ℝ) (hS : ∀ attempts : ℕ → Fin 2, ∀ N ≥ 1, S attempts N = (∑ i : Fin N, (attempts i).1) / N) : (∀ (attempts : ℕ → Fin 2) (a b : ℕ), (1 ≤ a ∧ a < b ∧ S attempts a < 0.8 ∧ S attempts b > 0.8) → (∃ c : ℕ, a < c ∧ c < b ∧ S attempts c = 0.8)) ↔ putnam_2004_a1_solution := sorry","Basketball star Shanille O'Keal's team statistician keeps track of the number, $S(N)$, of successful free throws she has made in her first $N$ attempts of the season. Early in the season, $S(N)$ was less than $80\%$ of $N$, but by the end of the season, $S(N)$ was more than $80\%$ of $N$. Was there necessarily a moment in between when $S(N)$ was exactly $80\%$ of $N$?",Show that the answer is yes.,['probability'],,"theory putnam_2004_a1 imports Complex_Main begin definition putnam_2004_a1_solution :: bool where ""putnam_2004_a1_solution \ undefined"" (* True *) theorem putnam_2004_a1: fixes S :: ""(nat \ bool) \ nat \ real"" assumes hS: ""\attempts::nat\bool. \N::nat\1. S attempts N = (\i::nat=0..(N-1). of_bool (attempts i)) / N"" shows ""(\(attempts::nat\bool)(a::nat)(b::nat). (1 \ a \ a < b \ S attempts a < 0.8 \ S attempts b > 0.8) \ (\c::nat. a < c \ c < b \ S attempts c = 0.8)) \ putnam_2004_a1_solution"" sorry end ", putnam_2004_a3,"theorem putnam_2004_a3 (u : ℕ → ℝ) (hubase : u 0 = 1 ∧ u 1 = 1 ∧ u 2 = 1) (hudet : ∀ n : ℕ, Matrix.det (fun i j : Finset.range 2 => u (n + i * 2 + j)) = (n)!) : ∀ n : ℕ, u n = round (u n) := sorry","Define a sequence $\{u_n\}_{n=0}^\infty$ by $u_0=u_1=u_2=1$, and thereafter by the condition that $\det \begin{pmatrix} u_n & u_{n+1} \\ u_{n+2} & u_{n+3} \end{pmatrix} = n!$ for all $n \geq 0$. Show that $u_n$ is an integer for all $n$. (By convention, $0!=1$.)",,['linear_algebra'],"Section putnam_2004_a3. Require Import Reals Coquelicot.Coquelicot. Theorem putnam_2004_a3: let fix u (n: nat) : R:= match n with | O => 1 | S O => 1 | S (S O) => 1 | S ((S (S n''') as n'') as n') => (INR (fact n) + u n'' * u n') / u n''' end in forall (n: nat), u n = IZR (floor (u n)). Proof. Admitted. End putnam_2004_a3.","theory putnam_2004_a3 imports Complex_Main ""HOL-Analysis.Determinants"" begin theorem putnam_2004_a3: fixes u::""nat\real"" assumes hubase : ""u 0 = 1 \ u 1 = 1 \ u 2 = 1"" and hudet : ""\n::nat. det (vector[vector[u n, u (n+1)], vector[u (n+2), u (n+3)]]) = fact n"" shows ""\n::nat. u n \ \"" sorry end ", putnam_2004_a4,"theorem putnam_2004_a4 (n : ℕ) (x : Fin n → ℝ) (avals : ℕ → (ℕ → Fin n → ℝ) → Prop) (npos : n > 0) (havals : ∀ (N : ℕ) (a : (ℕ → Fin n → ℝ)), avals N a = ∀ (i : Fin N) (j : Fin n), (a i j = -1 ∨ a i j = 0 ∨ a i j = 1)) : ∃ (N : ℕ) (c : Fin N → ℚ) (a : ℕ → Fin n → ℝ), avals N a ∧ ((∏ i : Fin n, x i) = ∑ i : Fin N, c i * (∑ j : Fin n, a i j * x j) ^ n) := sorry","Show that for any positive integer $n$ there is an integer $N$ such that the product $x_1x_2 \cdots x_n$ can be expressed identically in the form $x_1x_2 \cdots x_n=\sum_{i=1}^Nc_i(a_{i1}x_1+a_{i2}x_2+\cdots+a_{in}x_n)^n$ where the $c_i$ are rational numbers and each $a_{ij}$ is one of the numbers $-1,0,1$.",,['algebra'],"Section putnam_2004_a4. Require Import List Reals Coquelicot.Coquelicot. Theorem putnam_2004_a4: forall (n: nat), exists (N: nat) (a: nat -> nat -> R) (c: R), (exists (p q: Z), c = IZR (p / q)) /\ (forall (i j: nat), a i j = -1 \/ a i j = 0 \/ a i j = 1) -> forall (x: list R), length x = n -> fold_left Rmult x 1 = sum_n (fun i => c * (sum_n (fun j => a i j * nth j x 0) n) ^ (1 / n)) N. Proof. Admitted. End putnam_2004_a4.","theory putnam_2004_a4 imports Complex_Main begin (* Note: Boosted domain to infinite set *) theorem putnam_2004_a4: fixes n::nat and x::""nat\real"" and avals::""nat \ (nat \ nat \ real) \ bool"" defines ""avals \ \N. \a. \i \ {0..j \ {0.. a i j = 0 \ a i j = 1)"" assumes npos : ""n > 0"" shows ""\N::nat. \c::nat\rat. \a. avals N a \ ((\i=0..i=0..j=0.. R -> R) (x y: R), 0 <= x <= 1 /\ 0 <= y <= 1 /\ continuity_2d_pt f x y -> RInt (compose (fun y => RInt (fun x => f x y) 0 1) (fun x => RInt (fun y => f x y) 0 1)) 0 1 + RInt (compose (fun x => RInt (fun y => f x y) 0 1) (fun x => RInt (fun y => f x y) 0 1)) 0 1 <= (RInt (fun x => RInt (fun y => f x y) 0 1) 0 1) ^ 2 + RInt (fun x => RInt (fun y => (f x y) ^ 2) 0 1) 0 1. Proof. Admitted. End putnam_2004_a6.","theory putnam_2004_a6 imports Complex_Main ""HOL-Analysis.Interval_Integral"" begin theorem putnam_2004_a6: fixes f::""(real\real)\real"" and usquare::""(real\real) set"" and Fx Fy::""real\real\real"" defines ""usquare \ {(x, y). x \ 0 \ y \ 0 \ x \ 1 \ y \ 1}"" assumes fcont : ""continuous_on usquare f"" and fxderiv : ""\y::real \ {0<..<1}. \x::real \ {0<..<1}. ((Fx y) has_derivative (\x. f (x, y))) (nhds x)"" and fyderiv : ""\x::real \ {0<..<1}. \y::real \ {0<..<1}. ((Fy x) has_derivative (\y. f (x, y))) (nhds y)"" shows ""interval_lebesgue_integral lebesgue 0 1 (\y. (Fx y 1 - Fx y 0)^2) + interval_lebesgue_integral lebesgue 0 1 (\x. (Fy x 1 - Fy x 0)^2) \ (set_lebesgue_integral lebesgue usquare f)^2 + set_lebesgue_integral lebesgue usquare (\(x, y). f (x, y)^2)"" sorry end ", putnam_2004_b1,"theorem putnam_2004_b1 (n : ℕ) (P : Polynomial ℝ) (isint : ℝ → Prop) (r : ℚ) (Pdeg : P.degree = n) (hisint : ∀ x : ℝ, isint x = (x = round x)) (Pcoeff : ∀ i : Fin (n + 1), isint (P.coeff i)) (Preq0 : P.eval (r : ℝ) = 0) : ∀ i : Fin n, isint (∑ j : Fin (i + 1), (P.coeff (n - j) * r ^ ((i.1 + 1) - j))) := sorry","Let $P(x)=c_nx^n+c_{n-1}x^{n-1}+\cdots+c_0$ be a polynomial with integer coefficients. Suppose that $r$ is a rational number such that $P(r)=0$. Show that the $n$ numbers $c_nr,\,c_nr^2+c_{n-1}r,\,c_nr^3+c_{n-1}r^2+c_{n-2}r,\dots,\,c_nr^n+c_{n-1}r^{n-1}+\cdots+c_1r$ are integers.",,['algebra'],"Section putnam_2004_b1. Require Import Nat Reals Coquelicot.Coquelicot. Theorem putnam_2004_b1: forall (c: nat -> Z) (n: nat), let P (x: R) := sum_n (fun i => IZR (c i) * x ^ i) (n + 1) in forall (p q: Z), P (IZR (p / q)) = 0 -> let r := IZR (p / q) in forall (i: nat), and (le 1 i) (le i n) -> sum_n (fun j => IZR (c (sub n j)) * r ^ (i - j)) i = IZR (floor (sum_n (fun j => IZR (c (sub n j)) * r ^ (i - j)) i)). Proof. Admitted. End putnam_2004_b1.","theory putnam_2004_b1 imports Complex_Main ""HOL-Computational_Algebra.Polynomial"" begin (* Note: Boosted domain to infinite set *) theorem putnam_2004_b1: fixes n::nat and P::""real poly"" and r::rat assumes Pdeg : ""degree p = n"" and Pcoeff : ""\i \ {0..n}. (coeff p i) \ \"" and Preq0 : ""poly p r = 0"" shows ""\i \ {0..j=0..i. (coeff p (n-j) * r^(i+1-j))) \ \"" sorry end ", putnam_2004_b2,"theorem putnam_2004_b2 (m n : ℕ) (mnpos : m > 0 ∧ n > 0) : ((m + n)! / ((m + n) ^ (m + n) : ℚ)) < (((m)! / (m ^ m : ℚ)) * ((n)! / (n ^ n : ℚ))) := sorry",Let $m$ and $n$ be positive integers. Show that $\frac{(m+n)!}{(m+n)^{m+n}}<\frac{m!}{m^m}\frac{n!}{n^n}$.,,['algebra'],"Section putnam_2004_b2. Require Import Factorial Reals Coquelicot.Coquelicot. Theorem putnam_2004_b2: forall (m n: nat), ge m 0 /\ ge n 0 -> INR (fact (m + n)) / INR (m + n) ^ (m + n) < INR (fact m) / INR m ^ m * INR (fact n) / INR n ^ n. Proof. Admitted. End putnam_2004_b2.","theory putnam_2004_b2 imports Complex_Main begin theorem putnam_2004_b2: fixes m n::nat assumes mnpos : ""m > 0 \ n > 0"" shows ""fact (m+n) / (m+n)^(m+n) < (fact m / m^m) * (fact n / n^n)"" sorry end ", putnam_2004_b5,"abbrev putnam_2004_b5_solution : ℝ := sorry -- 2 / Real.exp 1 theorem putnam_2004_b5 (xprod : ℝ → ℝ) (hxprod : ∀ x ≥ 0, Tendsto (fun N : ℕ => ∏ n : Fin N, ((1 + x ^ (n.1 + 1)) / (1 + x ^ n.1)) ^ (x ^ n.1)) atTop (𝓝 (xprod x))) : Tendsto xprod (𝓝[<] 1) (𝓝 putnam_2004_b5_solution) := sorry",Evaluate $\lim_{x \to 1^-} \prod_{n=0}^\infty \left(\frac{1+x^{n+1}}{1+x^n}\right)^{x^n}$.,Show that the desired limit is $2/e$.,['analysis'],"Section putnam_2004_b5. Require Import Reals Coquelicot.Coquelicot. Definition putnam_2004_b5_solution := 2 / exp 1. Theorem putnam_2004_b5: let fix prod_n (m: nat -> R) (n : nat) : R := match n with | O => m 0%nat | S n' => m n' * prod_n m n' end in filterlim (fun x => (Lim_seq (fun nInc => prod_n (fun n => Rpower ((1 + x ^ (n + 1)) / (1 + x ^ n)) (x ^ n) ) nInc))) (at_left 1) (locally 0). Proof. Admitted. End putnam_2004_b5.","theory putnam_2004_b5 imports Complex_Main begin definition putnam_2004_b5_solution where ""putnam_2004_b5_solution \ undefined"" (* 2 / exp 1 *) theorem putnam_2004_b5: fixes xprod::""real\real"" defines ""xprod \ \x. lim (\N::nat. (\n=0..N. ((1+x^(n+1)) / (1 + x^n)) powr (x^n)))"" shows ""(xprod \ putnam_2004_b5_solution) (at_left 1)"" sorry end ", putnam_2004_b6,"theorem putnam_2004_b6 (A : Set ℕ) (N : ℝ → ℕ) (B : Set ℕ) (b : ℕ → ℕ) (Anempty : A.Nonempty) (Apos : ∀ a ∈ A, a > 0) (hN : ∀ x : ℝ, N x = Set.encard {a : A | a ≤ x}) (hB : B = {b' > 0 | ∃ a ∈ A, ∃ a' ∈ A, b' = a - a'}) (hbB : Set.range b = B ∧ ∀ i : ℕ, b i < b (i + 1)) : (∀ r : ℕ, ∃ i : ℕ, (b (i + 1) - b i) ≥ r) → Tendsto (fun x => N x / x) atTop (𝓝 0) := sorry","Let $\mathcal{A}$ be a non-empty set of positive integers, and let $N(x)$ denote the number of elements of $\mathcal{A}$ not exceeding $x$. Let $\mathcal{B}$ denote the set of positive integers $b$ that can be written in the form $b=a-a'$ with $a \in \mathcal{A}$ and $a' \in \mathcal{A}$. Let $b_1nat"" and b::""nat\nat"" defines ""N \ \x::real. card {a\A. a \ x}"" and ""B \ {b'. b' > 0 \ (\a \ A. \a' \ A. b' = a - a')}"" assumes Anempty : ""card A > 0"" and Apos : ""\a \ A. a > 0"" and hbB : ""B = image b {1..(card B)}"" and hbasc : ""\i::nat. b i < b (i+1)"" shows ""(\r::nat. \i::nat. (b (i+1) - b i) \ r) \ ((\x::real. N x / x) \ 0) at_top"" sorry end ", putnam_2018_a1,"abbrev putnam_2018_a1_solution : Set (ℤ × ℤ) := sorry -- {⟨673, 1358114⟩, ⟨674, 340033⟩, ⟨1009, 2018⟩, ⟨2018, 1009⟩, ⟨340033, 674⟩, ⟨1358114, 673⟩} theorem putnam_2018_a1 : ∀ a b : ℤ, (a > 0 ∧ b > 0 ∧ ((1: ℚ) / a + (1: ℚ) / b = (3: ℚ) / 2018)) ↔ (⟨a, b⟩ ∈ putnam_2018_a1_solution) := sorry","Find all ordered pairs $(a,b)$ of positive integers for which $\frac{1}{a} + \frac{1}{b} = \frac{3}{2018}$.","Show that all solutions are in the set of ${(673,1358114), (674,340033), (1009,2018), (2018,1009), (340033,674), (1358114,673)}$.",['number_theory'],"Section putnam_2018_a1. Require Import Nat Factorial QArith. Open Scope Q_scope. Definition putnam_2018_a1_solution (a b: nat): Prop := (a = 673%nat /\ b = 1358114%nat) \/ (a = 674%nat /\ b = 340033%nat) \/ (a = 1009%nat /\ b = 2018%nat) \/ (a =2018%nat /\ b = 1009%nat) \/ (a = 340033%nat /\ b = 674%nat) \/ (a = 1358114%nat /\ b = 673%nat). Theorem putnam_2018_a1: forall (a b: nat), gt a 0 /\ gt b 0 -> 1/inject_Z (Z.of_nat a) + 1/inject_Z (Z.of_nat b) = 3/2018 <-> putnam_2018_a1_solution a b. Proof. Admitted. End putnam_2018_a1.","theory putnam_2018_a1 imports Complex_Main begin definition putnam_2018_a1_solution::""(nat \ nat) set"" where ""putnam_2018_a1_solution \ undefined"" (* {(673, 1358114), (674, 340033), (1009, 2018), (2018, 1009), (340033, 674), (1358114, 673)} *) theorem putnam_2018_a1: shows ""\a b::nat. (a > 0 \ b > 0 \ (1 / a + 1 / b = 3 / 2018)) \ (a, b) \ putnam_2018_a1_solution"" sorry end ", putnam_2018_a2,"abbrev putnam_2018_a2_solution : ℕ → ℝ := sorry -- (fun n : ℕ => if n = 1 then 1 else -1) theorem putnam_2018_a2 (n : ℕ) (S : Fin (2 ^ n - 1) → Set ℕ) (M : Matrix (Fin (2 ^ n - 1)) (Fin (2 ^ n - 1)) ℝ) (npos : n ≥ 1) (hS : Set.range S = (Set.Icc 1 n).powerset \ {∅}) (hM : ∀ i j : Fin (2 ^ n - 1), M i j = if (S i ∩ S j = ∅) = True then 0 else 1) : M.det = putnam_2018_a2_solution n := sorry","Let \( S_1, S_2, \ldots, S_{2^n-1} \) be the nonempty subsets of \( \{1, 2, \ldots, n\} \) in some order, and let \( M \) be the \( (2^n - 1) \times (2^n - 1) \) matrix whose \((i, j)\) entry is $m_{ij} = \begin{cases} 0 & \text{if } S_i \\cap S_j = \\emptyset; \\ 1 & \text{otherwise}. \\end{cases} $ Calculate the determinant of \( M \).","Show that the solution is 1 if n = 1, and otherwise -1.","['linear_algebra', 'number_theory']",,"theory putnam_2018_a2 imports Complex_Main ""HOL-Analysis.Determinants"" begin definition putnam_2018_a2_solution :: ""nat \ real"" where ""putnam_2018_a2_solution \ undefined"" (* (\n::nat. if n = 1 then 1 else -1) *) theorem putnam_2018_a2: fixes n :: nat and S :: ""'n::finite \ (nat set)"" and M :: ""real^'n^'n"" assumes npos: ""n \ 1"" and pncard: ""CARD('n) = 2^n - 1"" and hS: ""range S = (Pow {1..n}) - {{}}"" and hM: ""\i j::'n. M$i$j = (if (S i \ S j = {}) then 0 else 1)"" shows ""det M = putnam_2018_a2_solution n"" sorry end ", putnam_2018_a3,"abbrev putnam_2018_a3_solution : ℝ := sorry -- 480/49 theorem putnam_2018_a3 (P : Set (Fin 10 → ℝ)) (f : (Fin 10 → ℝ) → ℝ → ℝ := fun x => fun k => ∑ i : Fin 10, Real.cos (k * (x i))) (hP : ∀ x ∈ P, f x 1 = 0) : ∀ y ∈ P, f y 3 ≤ putnam_2018_a3_solution ∧ ∃ x ∈ P, f x 3 = putnam_2018_a3_solution := sorry","Determine the greatest possible value of $\sum_{i=1}^{10} \cos(3x_i)$ for real numbers $x_1, x_2, \ldots, x_{10}$ satisfying $\sum_{i=1}^{10} \cos(x_i) = 0$.",Show that the solution is $\frac{480}{49}$,['number_theory'],"Section putnam_2018_a3. Require Import Reals List Rtrigo_def Coquelicot.Derive. Open Scope R. Definition putnam_2018_a3_solution : R := 480/49. Theorem putnam_2018_a3 : forall (X: list R), length X = 10%nat -> let f x := cos (INR 3 * x) in let coeffs := map f X in let val := fold_right Rmult 1 coeffs in putnam_2018_a3_solution >= val /\ exists (X: list R), length X = 10%nat -> let f x := cos (INR 3 * x) in let coeffs := map f X in let val := fold_right Rmult 1 coeffs in putnam_2018_a3_solution = val. Proof. Admitted. End putnam_2018_a3.","theory putnam_2018_a3 imports Complex_Main begin (* Note: Boosted domain to infinite set *) definition putnam_2018_a3_solution::real where ""putnam_2018_a3_solution \ undefined"" (* 480/49 *) theorem putnam_2018_a3: fixes f :: ""(nat\real) \ nat \ real"" defines ""f \ \x. \k. \i=0..<10. cos (k * (x i))"" shows ""putnam_2018_a3_solution = (GREATEST r. \x. f x 1 = 0 \ r = f x 3)"" sorry end ", putnam_2018_a4,"theorem putnam_2018_a4 (m n : ℕ) (a : ℕ → ℤ) (G : Type*) [Group G] (g h : G) (mnpos : m > 0 ∧ n > 0) (mngcd : Nat.gcd m n = 1) (ha : ∀ k : Set.Icc 1 n, a k = Int.floor (m * k / (n : ℝ)) - Int.floor (m * ((k : ℤ) - 1) / (n : ℝ))) (ghprod : ((List.Ico 1 (n + 1)).map (fun k : ℕ => g * h ^ (a k))).prod = 1) : g * h = h * g := sorry","Let $m$ and $n$ be positive integers with $\gcd(m,n)=1$, and let $a_k=\left\lfloor \frac{mk}{n} \right\rfloor - \left\lfloor \frac{m(k-1)}{n} \right\rfloor$ for $k=1,2,\dots,n$. Suppose that $g$ and $h$ are elements in a group $G$ and that $gh^{a_1}gh^{a_2} \cdots gh^{a_n}=e$, where $e$ is the identity element. Show that $gh=hg$. (As usual, $\lfloor x \rfloor$ denotes the greatest integer less than or equal to $x$.)",,"['abstract_algebra', 'number_theory']","Section putnam_2018_a4. Theorem putnam_2018_a4: True. Proof. Admitted. End putnam_2018_a4.","theory putnam_2018_a4 imports Complex_Main begin (* uses (nat \ nat) instead of ({1..n} \ nat) *) theorem putnam_2018_a4: fixes m n :: nat and a :: ""nat \ nat"" and Gmul :: ""'G \ 'G \ 'G"" (infixl ""\<^bold>*"" 70) and Gunit :: 'G (""\<^bold>1"") and Ginv :: ""'G \ 'G"" and g h :: 'G and Gpow :: ""'G \ nat \ 'G"" and ghprodrec :: ""nat \ 'G"" assumes mnpos: ""m > 0 \ n > 0"" and mngcd: ""gcd m n = 1"" and ha: ""\k::nat\{1..n}. (int (a k)) = \(real (m*k)) / n\ - \(real (m*(k-1))) / n\"" and Ggroup: ""group Gmul Gunit Ginv"" and hGpow: ""\x::'G. Gpow x 0 = \<^bold>1 \ (\k::nat>0. Gpow x k = (Gpow x (k-1) \<^bold>* x))"" and hghprodrec: ""ghprodrec 0 = \<^bold>1 \ (\k::nat\{1..n}. ghprodrec k = ghprodrec (k-1) \<^bold>* g \<^bold>* Gpow h (a k))"" and ghprod: ""ghprodrec n = \<^bold>1"" shows ""g \<^bold>* h = h \<^bold>* g"" sorry end ", putnam_2018_a5,"theorem putnam_2018_a5 (f : ℝ → ℝ) (h0 : f 0 = 0) (h1 : f 1 = 1) (hpos : ∀ x : ℝ, f x ≥ 0) (hf : ContDiff ℝ ⊤ f) : ∃ n > 0, ∃ x : ℝ, iteratedDeriv n f x < 0 := sorry","Let $f: \mathbb{R} \to \mathbb{R}$ be an infinitely differentiable function satisfying $f(0) = 0$, $f(1)= 1$, and $f(x) \geq 0$ for all $x \in \mathbb{R}$. Show that there exist a positive integer $n$ and a real number $x$ such that $f^{(n)}(x) < 0$.",,['analysis'],,"theory putnam_2018_a5 imports Complex_Main ""HOL-Analysis.Derivative"" begin theorem putnam_2018_a5: fixes f :: ""real\real"" assumes f_diff : ""\n. (deriv^^n) f differentiable_on UNIV"" and f0 : ""f 0 = 0"" and f1 : ""f 1 = 1"" and fpos : ""\x. f x \ 0"" shows ""\n > 0. \x::real. (deriv^^n) f x < 0"" sorry end ", putnam_2018_b1,"abbrev putnam_2018_b1_solution : Set (Vector ℤ 2) := sorry -- {v : Vector ℤ 2 | ∃ b : ℤ, 0 ≤ b ∧ b ≤ 100 ∧ Even b ∧ v.toList = [1, b]} theorem putnam_2018_b1 (P : Finset (Vector ℤ 2)) (v : Vector ℤ 2) (vinP : Prop) (Pvdiff : Finset (Vector ℤ 2)) (Pvpart : Prop) (hP : P = {v' : Vector ℤ 2 | 0 ≤ v'[0] ∧ v'[0] ≤ 2 ∧ 0 ≤ v'[1] ∧ v'[1] ≤ 100}) (hvinP : vinP = (v ∈ P)) (hPvdiff : Pvdiff = P \ ({v} : Finset (Vector ℤ 2))) (hPvpart : Pvpart = (∃ Q R : Finset (Vector ℤ 2), (Q ∪ R = Pvdiff) ∧ (Q ∩ R = ∅) ∧ (Q.card = R.card) ∧ (∑ q in Q, q[0] = ∑ r in R, r[0]) ∧ (∑ q in Q, q[1] = ∑ r in R, r[1]))) : (vinP ∧ Pvpart) ↔ v ∈ putnam_2018_b1_solution := sorry","Let $\mathcal{P}$ be the set of vectors defined by $\mathcal{P}=\left\{\left.\begin{pmatrix} a \\ b \end{pmatrix}\right| 0 \leq a \leq 2, 0 \leq b \leq 100,\text{ and }a,b \in \mathbb{Z}\right\}$. Find all $\mathbf{v} \in \mathcal{P}$ such that the set $\mathcal{P} \setminus \{\mathbf{v}\}$ obtained by omitting vector $\mathbf{v}$ from $\mathcal{P}$ can be partitioned into two sets of equal size and equal sum.",Show that the answer is the collection of vectors $\begin{pmatrix} 1 \\ b \end{pmatrix}$ where $0 \leq b \leq 100$ and $b$ is even.,['algebra'],"Section putnam_2018_b1. Require Import Logic Ensembles Finite_sets Nat List. Open Scope nat_scope. Definition putnam_2018_b1_solution : Ensemble (nat * nat) := fun v : nat * nat => exists (b : nat), 0 <= b <= 100 /\ even b = true /\ fst v = 1 /\ snd v = b. Definition is_in_ensemble_fst (E : Ensemble (nat * nat)) (x : nat) : bool := match E (x, _) with | True => true end. Definition is_in_ensemble_snd (E : Ensemble (nat * nat)) (y : nat) : bool := match E (_, y) with | True => true end. Theorem putnam_2018_b1 (P : Ensemble (nat * nat)) (v : nat * nat) (vinP : Prop) (Pvdiff : Ensemble (nat * nat)) (Pvpart : Prop) (hP : P = fun v': nat * nat => 0 <= fst v' <= 2 /\ 0 <= snd v' <= 100) (hvinP : vinP = P v) (hPvdiff : Pvdiff = fun v' => P v' /\ v' <> v) (hPvpart : Pvpart = (exists Q R : Ensemble (nat * nat), (Union (nat * nat) Q R = Pvdiff) /\ (Intersection (nat * nat) Q R = Empty_set (nat * nat)) /\ (exists (n: nat), cardinal (nat * nat) Q n = cardinal (nat * nat) R n /\ (fold_right plus 0%nat (filter (fun x: nat => is_in_ensemble_fst Q x) (seq 0 3)) = fold_right plus 0%nat (filter (fun x: nat => is_in_ensemble_fst R x) (seq 0 3))) /\ (fold_right plus 0%nat (filter (fun y: nat => is_in_ensemble_snd Q y) (seq 0 101)) = fold_right plus 0%nat (filter (fun y: nat => is_in_ensemble_snd R y) (seq 0 101)))))) : (vinP /\ Pvpart) <-> putnam_2018_b1_solution v. Proof. Admitted. End putnam_2018_b1.","theory putnam_2018_b1 imports Complex_Main ""HOL-Analysis.Finite_Cartesian_Product"" ""HOL-Library.Disjoint_Sets"" begin definition putnam_2018_b1_solution :: ""(int^2) set"" where ""putnam_2018_b1_solution \ undefined"" (* {v::int^2. (\b::int. b \ {0..100} \ even b \ v = vector [1, b])} *) theorem putnam_2018_b1: fixes P :: ""(int^2) set"" and v :: ""int^2"" and vinP :: bool and Pvpart :: bool assumes hP: ""P \ {v'::int^2. v'$1 \ {0..2} \ v'$2 \ {0..100}}"" and hvinP: ""vinP \ (v \ P)"" and hPvpart: ""Pvpart = (\Q R::(int^2) set. (partition_on (P - {v}) {Q, R}) \ card Q = card R \ (\q\Q. q) = (\r\R. r))"" shows ""(vinP \ Pvpart) \ v \ putnam_2018_b1_solution"" sorry end ", putnam_2018_b2,"theorem putnam_2018_b2 (n : ℕ) (hn : n > 0) (f : ℕ → ℂ → ℂ) (hf : ∀ z : ℂ, f n z = ∑ i in Finset.range n, (n - i) * z^i) : ∀ z : ℂ, ‖z‖ ≤ 1 → f n z ≠ 0 := sorry","Let $n$ be a positive integer, and let $f_n(z) = n + (n-1)z + (n-2)z^2 + \cdots + z^{n-1}$. Prove that $f_n$ has no roots in the closed unit disk $\{z \in \mathbb{C}: |z| \leq 1\}$.",,['analysis'],,"theory putnam_2018_b2 imports Complex_Main begin theorem putnam_2018_b2: fixes n :: nat and f_n :: ""complex \ complex"" and z :: complex defines ""f_n \ \x::complex. \i=0..(n-1). (n - i) * x^i"" assumes npos: ""n > 0"" and zunit: ""norm(z) \ 1"" shows ""f_n(z) \ 0"" sorry end ", putnam_2018_b3,"abbrev putnam_2018_b3_solution : Set ℕ := sorry -- {2^2, 2^4, 2^8, 2^16} theorem putnam_2018_b3 (n : ℕ) (hn : n > 0) : ((n < 10^100 ∧ ((n : ℤ) ∣ (2^n : ℤ) ∧ (n - 1 : ℤ) ∣ (2^n - 1 : ℤ) ∧ (n - 2 : ℤ) ∣ (2^n - 2 : ℤ))) ↔ n ∈ putnam_2018_b3_solution) := sorry","Find all positive integers $n < 10^{100}$ for which simultaneously $n$ divides $2^n$, $n-1$ divides $2^n-1$, and $n-2$ divides $2^n - 2$.","Show that the solution is the set $\{2^2, 2^4, 2^8, 2^16\}$.",['number_theory'],,"theory putnam_2018_b3 imports Complex_Main begin definition putnam_2018_b3_solution::""nat set"" where ""putnam_2018_b3_solution \ undefined"" (* {2^2, 2^4, 2^8, 2^16} *) theorem putnam_2018_b3: shows ""putnam_2018_b3_solution \ {n::nat. n > 3 \ n < 10^100 \ n dvd 2^n \ (n-1) dvd (2^n - 1) \ (n-2) dvd (2^n - 2)}"" sorry end ", putnam_2018_b4,"theorem putnam_2018_b4 (a : ℝ) (x : ℕ → ℝ) (hx0 : x 0 = 1) (hx12 : x 1 = a ∧ x 2 = a) (hxn : ∀ n ≥ 2, x (n + 1) = 2 * (x n) * (x (n - 1)) - x (n - 2)) : (∃ n, x n = 0) → (∃ c, c > 0 ∧ Function.Periodic x c) := sorry","Given a real number $a$, we define a sequence by $x_0 = 1$, $x_1 = x_2 = a$, and $x_{n+1} = 2x_n x_{n-1} - x_{n-2}$ for $n \geq 2$. Prove that if $x_n = 0$ for some $n$, then the sequence is periodic.",,['algebra'],,"theory putnam_2018_b4 imports Complex_Main begin theorem putnam_2018_b4: fixes a::real and f::""nat \ real"" assumes f0 : ""f 0 = 1"" and f1 : ""f 1 = a"" and f2 : ""f 2 = a"" and fn : ""\n \ 2. f (n+1) = 2 * f n * f (n-1) - f (n-2)"" and fex0 : ""\n. f n = 0"" shows ""\T>0. \n. f (n + T) = f n"" sorry end ", putnam_2018_b6,"theorem putnam_2018_b6 (S : Finset (Fin 2018 → ℤ)) (hS : S = {s : Fin 2018 → ℤ | (∀ i : Fin 2018, s i ∈ ({1, 2, 3, 4, 5, 6, 10} : Set ℤ)) ∧ (∑ i : Fin 2018, s i) = 3860}) : S.card ≤ 2 ^ 3860 * ((2018 : ℝ) / 2048) ^ 2018 := sorry","Let $S$ be the set of sequences of length $2018$ whose terms are in the set $\{1,2,3,4,5,6,10\}$ and sum to $3860$. Prove that the cardinality of $S$ is at most $2^{3860} \cdot \left(\frac{2018}{2048}\right)^{2018}$.",,['algebra'],"Section putnam_2018_b6. Require Import Nat List Ensembles Finite_sets Reals. Theorem putnam_2018_b6: forall (E: Ensemble (list nat)), forall (l: list nat), ( E l -> length l = 2018 /\ forall (n: nat), (List.In n l) -> (n = 1 \/ n = 2 \/ n = 3 \/ n = 4 \/ n = 5 \/ n = 6 \/ n = 10) /\ fold_left Nat.add l 0 = 3860 ) -> exists (n: nat), cardinal (list nat) E n /\ Rle (INR n) (Rmult (Rpower 2 3860) (Rpower (Rdiv (INR 2018) (INR 2048)) 2018)). Proof. Admitted. End putnam_2018_b6.","theory putnam_2018_b6 imports Complex_Main begin (* uses (nat \ nat) instead of (Fin 2018 \ nat) *) theorem putnam_2018_b6: fixes S :: ""(nat \ nat) set"" assumes hS: ""S \ {s::nat\nat. (\i::nat\{0..2017}. s i \ {1,2,3,4,5,6,10}) \ (\i::nat=0..2017. s i) = 3860}"" shows ""card S \ 2^3860 * (2018/2048)^2018"" sorry end ", putnam_1993_a1,"abbrev putnam_1993_a1_solution : ℝ := sorry -- 4 / 9 theorem putnam_1993_a1 : 0 < putnam_1993_a1_solution ∧ putnam_1993_a1_solution < (4 * Real.sqrt 2) / 9 ∧ (∫ x in Set.Ioo 0 ((Real.sqrt 2) / 3), max (putnam_1993_a1_solution - (2 * x - 3 * x ^ 3)) 0) = (∫ x in Set.Ioo 0 ((Real.sqrt 6) / 3), max ((2 * x - 3 * x ^ 3) - putnam_1993_a1_solution) 0) := sorry","The horizontal line $y=c$ intersects the curve $y=2x-3x^3$ in the first quadrant as in the figure. Find $c$ so that the areas of the two shaded regions are equal. [Figure not included. The first region is bounded by the $y$-axis, the line $y=c$ and the curve; the other lies under the curve and above the line $y=c$ between their two points of intersection.]",Show that the area of the two regions are equal when $c=4/9$.,"['analysis', 'algebra']",,"theory putnam_1993_a1 imports Complex_Main ""HOL-Analysis.Interval_Integral"" begin definition putnam_1993_a1_solution::real where ""putnam_1993_a1_solution \ undefined"" (* 4/9 *) theorem putnam_1993_a1: shows ""putnam_1993_a1_solution > 0 \ putnam_1993_a1_solution < (4 * (sqrt 2) / 9) \ interval_lebesgue_integral lebesgue 0 ((sqrt 2) / 3) (\x. max 0 (putnam_1993_a1_solution - (2 * x - 3 * x^3))) = interval_lebesgue_integral lebesgue 0 ((sqrt 6) / 3) (\x. max 0 ((2 * x - 3 * x^3) - putnam_1993_a1_solution))"" sorry end", putnam_1993_a2,"theorem putnam_1993_a2 (x : ℕ → ℝ) (xnonzero : ∀ n : ℕ, x n ≠ 0) (hx : ∀ n ≥ 1, (x n) ^ 2 - x (n - 1) * x (n + 1) = 1) : ∃ a : ℝ, ∀ n ≥ 1, x (n + 1) = a * x n - x (n - 1) := sorry","Let $(x_n)_{n \geq 0}$ be a sequence of nonzero real numbers such that $x_n^2-x_{n-1}x_{n+1}=1$ for $n=1,2,3,\dots$. Prove there exists a real number $a$ such that $x_{n+1}=ax_n-x_{n-1}$ for all $n \geq 1$.",,['algebra'],"Section putnam_1993_a2. Require Import Reals Coquelicot.Coquelicot. Open Scope R. Theorem putnam_1993_a2: forall (x: nat -> R) (n: nat), gt n 0 -> pow (x n) 2 - x (pred n) * x (S n) = 1 -> exists (a: R), ge n 1 -> x (S n) = a * x n - x (pred n). Proof. Admitted. End putnam_1993_a2.","theory putnam_1993_a2 imports Complex_Main begin theorem putnam_1993_a2: fixes x::""nat\real"" assumes xn0 : ""\n::nat. x n \ 0"" and hx : ""\n \ 1. (x n)^2 - x (n-1) * x (n+1) = 1"" shows ""\a::real. \n \ 1. x (n+1) = a * x n - x (n-1)"" sorry end", putnam_1993_a3,"theorem putnam_1993_a3 (c : ℕ → ℕ → ℕ) (hc : ∀ n ≥ 1, ∀ m ≥ 1, c n m = {f : Finset (Fin n) → Fin m | ∀ A B : Finset (Fin n), f (A ∩ B) = min (f A) (f B)}.encard) : ∀ n ≥ 1, ∀ m ≥ 1, c n m = ∑' j : Set.Icc 1 m, (j : ℤ) ^ n := sorry","Let $\mathcal{P}_n$ be the set of subsets of $\{1,2,\dots,n\}$. Let $c(n,m)$ be the number of functions $f:\mathcal{P}_n \to \{1,2,\dots,m\}$ such that $f(A \cap B)=\min\{f(A),f(B)\}$. Prove that $c(n,m)=\sum_{j=1}^m j^n$.",,['algebra'],,"theory putnam_1993_a3 imports Complex_Main begin (* Note: Boosted domain to infinite set *) theorem putnam_1993_a3: fixes pown::""nat \ ((nat set) set)"" and c::""nat\nat\nat"" defines ""pown \ \n. Pow {1..n}"" and ""c \ \n. \m. card {f::(nat set) \ nat. (\s \ pown n. f s \ {1..m}) \ (\s \ - pown n. f s = 0) \ (\A B. (A \ pown n \ B \ pown n) \ f (A \ B) = min (f A) (f B))}"" shows ""\n \ 1. \m \ 1. c n m = (\j=1..m. j^n)"" sorry end", putnam_1993_a4,"theorem putnam_1993_a4 (x : Fin 19 → ℤ) (y : Fin 93 → ℤ) (hx : ∀ i : Fin 19, x i > 0 ∧ x i ≤ 93) (hy : ∀ j : Fin 93, y j > 0 ∧ y j ≤ 19) : ∃ (is : Finset (Fin 19)) (js : Finset (Fin 93)), is ≠ ∅ ∧ (∑ i : is, x i) = (∑ j : js, y j) := sorry","Let $x_1,x_2,\dots,x_{19}$ be positive integers each of which is less than or equal to $93$. Let $y_1,y_2,\dots,y_{93}$ be positive integers each of which is less than or equal to $19$. Prove that there exists a (nonempty) sum of some $x_i$'s equal to a sum of some $y_j$'s.",,['algebra'],"Section putnam_1993_a4. Require Import List Bool Reals Peano_dec Coquelicot.Coquelicot. Open Scope nat_scope. Theorem putnam_1993_a4: forall (x y: list nat), length x = 19 /\ length y = 93 /\ forall (n: nat), In n x -> 1 < n <= 93 /\ In n y -> 1 < n <= 19 -> exists (presentx presenty : nat -> bool), sum_n (fun n => if ((existsb (fun i => if eq_nat_dec n i then true else false) x) && presentx n) then (INR n) else R0) 94 = sum_n (fun n => if ((existsb (fun i => if eq_nat_dec n i then true else false) y) && presenty n) then (INR n) else R0) 20. Proof. Admitted. End putnam_1993_a4.","theory putnam_1993_a4 imports Complex_Main begin (* Note: Boosted domain to infinite set *) theorem putnam_1993_a4: fixes x y::""nat\nat"" assumes hx : ""\i \ {0..<19}. x i > 0 \ x i \ 93"" and hy : ""\j \ {0..<93}. y j > 0 \ y j \ 19"" shows ""\is js. is \ (Pow {0..<19}) \ js \ (Pow {0..<93}) \ is \ {} \ (\i \ is. x i) = (\j \ js. y j)"" sorry end", putnam_1993_a5,"theorem putnam_1993_a5 : ¬Irrational ((∫ x in Set.Ioo (-100) (-10), (((x ^ 2 - x) / (x ^ 3 - 3 * x + 1)) ^ 2)) + (∫ x in Set.Ioo (1 / 101) (1 / 11), (((x ^ 2 - x) / (x ^ 3 - 3 * x + 1)) ^ 2)) + (∫ x in Set.Ioo (101 / 100) (11 / 10), (((x ^ 2 - x) / (x ^ 3 - 3 * x + 1)) ^ 2))) := sorry","Show that $\int_{-100}^{-10} (\frac{x^2-x}{x^3-3x+1})^2\,dx+\int_{\frac{1}{101}}^{\frac{1}{11}} (\frac{x^2-x}{x^3-3x+1})^2\,dx+\int_{\frac{101}{100}}^{\frac{11}{10}} (\frac{x^2-x}{x^3-3x+1})^2\,dx$ is a rational number.",,['analysis'],"Section putnam_1993_a5. Require Import Reals Coquelicot.Coquelicot. Open Scope R. Theorem putnam_1993_a5: let f (x: R) := (pow x 2 - x) / (pow x 3 - 3 * x + 1) in exists (p q: Z), RInt (fun x => pow (f x) 2) (-100) (-10) + RInt (fun x => pow (f x) 2) (1/101) (1/11) + RInt (fun x => pow (f x) 2) (101/100) (11/10) = IZR p /IZR q. Proof. Admitted. End putnam_1993_a5.","theory putnam_1993_a5 imports Complex_Main ""HOL-Analysis.Interval_Integral"" begin theorem putnam_1993_a5: fixes f::""real\real"" defines ""f \ \x. ((x^2 - x) / (x^3 - 3 * x + 1))^2"" shows ""(interval_lebesgue_integral lebesgue (-100) (-10) f + interval_lebesgue_integral lebesgue (1/101) (1/11) f + interval_lebesgue_integral lebesgue (101/100) (11/10) f ) \ \"" sorry end", putnam_1993_a6,"theorem putnam_1993_a6 (seq : ℕ → ℤ) (hseq23 : ∀ n : ℕ, seq n = 2 ∨ seq n = 3) (hseq2inds : ∀ n : ℕ, seq n = 2 ↔ (∃ N : ℕ, n = ∑ i : Fin N, (seq i + 1))) : ∃ r : ℝ, ∀ n : ℕ, seq n = 2 ↔ (∃ m : ℤ, n + 1 = 1 + Int.floor (r * m)) := sorry","The infinite sequence of $2$'s and $3$'s $2,3,3,2,3,3,3,2,3,3,3,2,3,3,2,3,3,3,2,3,3,3,2,3,3,3,2,3,3,2,3,3,3,2,\dots$ has the property that, if one forms a second sequence that records the number of $3$'s between successive $2$'s, the result is identical to the given sequence. Show that there exists a real number $r$ such that, for any $n$, the $n$th term of the sequence is $2$ if and only if $n=1+\lfloor rm \rfloor$ for some nonnegative integer $m$. (Note: $\lfloor x \rfloor$ denotes the largest integer less than or equal to $x$.)",,['algebra'],,"theory putnam_1993_a6 imports Complex_Main begin theorem putnam_1993_a6: fixes seq::""nat\nat"" assumes hseq23 : ""\n::nat. seq n = 2 \ seq n = 3"" and hseq2inds : ""\n::nat. (seq n = 2 \ (\N::nat. n = (\i=0..r::real. \n::nat. (seq n = 2 \ (\m::nat. n+1 = 1+\r * m\))"" sorry end", putnam_1993_b1,"abbrev putnam_1993_b1_solution : ℕ := sorry -- 3987 theorem putnam_1993_b1 (nallmexk : ℕ → Prop) (hnallmexk : ∀ n : ℕ, nallmexk n = (n > 0 ∧ ∀ m ∈ Set.Ioo 0 1993, ∃ k : ℤ, (m / 1993 < (k : ℝ) / n) ∧ ((k : ℝ) / n < (m + 1) / 1994))) : nallmexk putnam_1993_b1_solution ∧ (∀ n : ℕ, nallmexk n → n ≥ putnam_1993_b1_solution) := sorry","Find the smallest positive integer $n$ such that for every integer $m$ with $0 exists (k: nat), INR m / 1993 < INR k / INR n < INR (m + 1) / 1994 in exists (mn: nat), cond mn /\ forall (n: nat), cond n -> ge n mn <-> mn = putnam_1993_b1_solution. Proof. Admitted. End putnam_1993_b1.","theory putnam_1993_b1 imports Complex_Main begin definition putnam_1993_b1_solution::nat where ""putnam_1993_b1_solution \ undefined"" (* 3987 *) theorem putnam_1993_b1: fixes nallmexk::""nat\bool"" defines ""nallmexk \ \n::nat. (n > 0 \ (\m \ {0<..<1993}. (\k::int. (m / 1993 < k / n) \ (k / n < (m+1) / 1994))))"" shows ""putnam_1993_b1_solution = (LEAST n. nallmexk n)"" sorry end", putnam_1993_b4,"theorem putnam_1993_b4 (K : ℝ × ℝ → ℝ) (f g : ℝ → ℝ) (Kpos : ∀ x y : Set.Icc (0 : ℝ) 1, K (x, y) > 0) (Kcont : ContinuousOn K {(x, y) : ℝ × ℝ | x ∈ Set.Icc 0 1 ∧ y ∈ Set.Icc 0 1}) (fgpos : ∀ x : Set.Icc (0 : ℝ) 1, f x > 0 ∧ g x > 0) (fgcont : ContinuousOn f (Set.Icc 0 1) ∧ ContinuousOn g (Set.Icc 0 1)) (fgint : ∀ x : Set.Icc (0 : ℝ) 1, (∫ y in Set.Ioo 0 1, f y * K (x, y)) = g x ∧ (∫ y in Set.Ioo 0 1, g y * K (x, y)) = f x) : ∀ x : Set.Icc (0 : ℝ) 1, f x = g x := sorry","The function $K(x,y)$ is positive and continuous for $0 \leq x \leq 1,0 \leq y \leq 1$, and the functions $f(x)$ and $g(x)$ are positive and continuous for $0 \leq x \leq 1$. Suppose that for all $x$, $0 \leq x \leq 1$, $\int_0^1 f(y)K(x,y)\,dy=g(x)$ and $\int_0^1 g(y)K(x,y)\,dy=f(x)$. Show that $f(x)=g(x)$ for $0 \leq x \leq 1$.",,['analysis'],"Section putnam_1993_b4. Require Import Reals Coquelicot.Coquelicot. Open Scope R. Theorem putnam_1993_b4: forall (K: (R * R) -> R) (f g: R -> R), (forall (xy : R * R), let (x, y) := xy in 0 <= x <= 1 /\ 0 <= y <= 1 /\ K xy > 0 /\ continuous K xy) /\ (forall (x: R), 0 <= x <= 1 /\ f x > 0 /\ g x > 0 /\ continuity f /\ continuity g) -> forall (x: R), 0 <= x <= 1 -> (RInt (fun y => f y * K (x, y)) 0 1) = g x /\ RInt (fun y => g y * K (x, y)) 0 1 = f x -> f = g. Proof. Admitted. End putnam_1993_b4.","theory putnam_1993_b4 imports Complex_Main ""HOL-Analysis.Interval_Integral"" begin theorem putnam_1993_b4: fixes K::""(real\real) \ real"" and f g::""real\real"" assumes Kpos : ""\x::real \ {0..1}. \y::real \ {0..1}. K (x, y) > 0"" and Kcont : ""continuous_on {(x::real, y::real). x \ {0..1} \ y \ {0..1}} K"" and fgpos : ""\x::real \ {0..1}. f x > 0 \ g x > 0"" and fgcont : ""continuous_on {0..1::real} f \ continuous_on {0..1::real} g"" and fgint : ""\x::real \ {0..1}. interval_lebesgue_integral lebesgue 0 1 (\y. f y * K (x, y)) = g x \ interval_lebesgue_integral lebesgue 0 1 (\y. g y * K (x, y)) = f x"" shows ""\x::real \ {0..1}. f x = g x"" sorry end", putnam_1993_b5,"theorem putnam_1993_b5 (pdists : (Fin 4 → (Fin 2 → ℝ)) → Prop) (hpdists: ∀ p : Fin 4 → (Fin 2 → ℝ), pdists p = ∀ i j : Fin 4, i ≠ j → (Euclidean.dist (p i) (p j) = round (Euclidean.dist (p i) (p j)) ∧ Odd (round (Euclidean.dist (p i) (p j))))) : ¬∃ p : Fin 4 → (Fin 2 → ℝ), pdists p := sorry",Show there do not exist four points in the Euclidean plane such that the pairwise distances between the points are all odd integers.,,"['geometry', 'number_theory', 'linear_algebra']",,"theory putnam_1993_b5 imports Complex_Main ""HOL-Analysis.Linear_Algebra"" begin theorem putnam_1993_b5: fixes pdist::""(real \ real) \ (real \ real) \ (real \ real) \ (real \ real) \ bool"" defines ""pdist \ \A. \B. \C. \D. (dist A B) \ \ \ (dist A C) \ \ \ (dist A D) \ \ \ (dist B C) \ \ \ (dist B D) \ \ \ (dist C D) \ \ \ odd (round (dist A B)) \ odd (round (dist A C)) \ odd (round (dist A D)) \ odd (round (dist B C)) \ odd (round (dist B D)) \ odd (round (dist C D))"" shows ""\(\A B C D. pdist A B C D)"" sorry end", putnam_1993_b6,"theorem putnam_1993_b6 (S : Fin 3 → ℕ) (f : Fin 3 → Fin 3 → (Fin 3 → ℕ) → (Fin 3 → ℕ)) (Spos : ∀ i : Fin 3, S i > 0) (hf : ∀ i j k : Fin 3, (i ≠ j ∧ i ≠ k ∧ j ≠ k) → ∀ S' : Fin 3 → ℕ, if S' i ≤ S' j then ((f i j S') i = 2 * S' i ∧ (f i j S') j = S' j - S' i ∧ (f i j S') k = S' k) else (f i j S' = S')) : ∃ (Ss : ℕ → (Fin 3 → ℕ)) (N : ℕ), Ss 0 = S ∧ (∃ i : Fin 3, Ss N i = 0) ∧ (∀ n : Fin N, ∃ i j : Fin 3, i ≠ j ∧ f i j (Ss n) = Ss ((n : ℕ) + 1)) := sorry","Let $S$ be a set of three, not necessarily distinct, positive integers. Show that one can transform $S$ into a set containing $0$ by a finite number of applications of the following rule: Select two of the three integers, say $x$ and $y$, where $x \leq y$ and replace them with $2x$ and $y-x$.",,['algebra'],,"theory putnam_1993_b6 imports Complex_Main begin (* Note: Boosted domain to infinite set *) theorem putnam_1993_b6: fixes S::""nat\nat"" and f::""nat \ nat \ (nat\nat) \ (nat\nat)"" assumes Spos : ""\i \ {0..<3}. S i > 0"" and hf : ""\i \ {0..<3}. \j \ {0..<3}. \k \ {0..<3}. (i \ j \ i \ k \ j \ k) \ (\S'::nat\nat. if (S' i \ S' j) then ( (f i j S') i = 2 * S' i \ (f i j S') j = S' j - S' i \ (f i j S') k = S' k) else (f i j S' = S'))"" shows ""\N::nat. \Ss::nat\(nat\nat). Ss 0 = S \ (\i \ {0..<3}. Ss N i = 0) \ (\n \ {0..i \ {0..<3}. \j \ {0..<3}. (i \ j \ f i j (Ss n) = Ss (n+1)))"" sorry end", putnam_2015_a2,"abbrev putnam_2015_a2_solution : ℕ := sorry -- 181 theorem putnam_2015_a2 (a : ℕ → ℤ) (abase : a 0 = 1 ∧ a 1 = 2) (arec : ∀ n ≥ 2, a n = 4 * a (n - 1) - a (n - 2)) : Odd putnam_2015_a2_solution ∧ putnam_2015_a2_solution.Prime ∧ ((putnam_2015_a2_solution : ℤ) ∣ a 2015) := sorry","Let $a_0=1$, $a_1=2$, and $a_n=4a_{n-1}-a_{n-2}$ for $n \geq 2$. Find an odd prime factor of $a_{2015}$.",Show that one possible answer is $181$.,['number_theory'],"Section putnam_2015_a2. Require Import Nat Reals Znumtheory. From mathcomp Require Import div. Definition putnam_2015_a2_solution : nat := 181. Theorem putnam_2015_a2: let A := fix a (n: nat) : nat := match n with | O => 1%nat | S O => 2%nat | S ((S n'') as n') => sub (4*(a n')) (a n'') end in odd putnam_2015_a2_solution = true /\ prime (Z.of_nat putnam_2015_a2_solution) /\ (putnam_2015_a2_solution %| A 2015%nat) = true. Proof. Admitted. End putnam_2015_a2.","theory putnam_2015_a2 imports Complex_Main ""HOL-Computational_Algebra.Primes"" begin (* there are several possible correct solutions; this is the one shown on the solutions document *) definition putnam_2015_a2_solution :: nat where ""putnam_2015_a2_solution \ undefined"" (* 181 *) theorem putnam_2015_a2: fixes a :: ""nat \ nat"" assumes abase: ""a 0 = 1 \ a 1 = 2"" assumes arec: ""\n::nat\2. a n = 4 * a (n-1) - a (n-2)"" shows ""odd putnam_2015_a2_solution \ prime putnam_2015_a2_solution \ putnam_2015_a2_solution dvd (a 2015)"" sorry end ", putnam_2015_a3,"abbrev putnam_2015_a3_solution : ℂ := sorry -- 13725 theorem putnam_2015_a3 : Complex.log (∏ a : Fin 2015, ∏ b : Fin 2015, (1 + Complex.exp (2 * Real.pi * Complex.I * (a.1 + 1) * (b.1 + 1) / 2015))) / Complex.log 2 = putnam_2015_a3_solution := sorry","Compute $\log_2 \left( \prod_{a=1}^{2015}\prod_{b=1}^{2015}(1+e^{2\pi iab/2015}) \right)$. Here $i$ is the imaginary unit (that is, $i^2=-1$).",Show that the answer is $13725$.,"['number_theory', 'algebra']","Section putnam_2015_a3. Require Import Reals ROrderedType Coquelicot.Coquelicot. Local Open Scope C. Definition putnam_2015_a3_solution : C := RtoC 13725. Theorem putnam_2015_a3: let Carg (z : C) : R := if Reqb (Im z) 0 then (if Rlt_dec (Re z) 0 then PI else R0) else atan ((Im z)/(Re z)) in let Clog (n: nat) (z : C) : C := (Re (ln (Cmod z) / ln (INR n)), Carg z) in let HCprod2_aux := fix Cprod2_aux (f : nat -> nat -> C) (n m : nat) {struct m} : C := match m with | O => f n O | S m' => Cmult (f n m') (Cprod2_aux f n m') end in let HCprod2 := fix Cprod2 (f : nat -> nat -> C) (n m : nat) {struct n}: C := match n with | O => 1%R | S n' => Cmult (HCprod2_aux f n m) (Cprod2 f n' m) end in let f (a b: nat) : C := Clog 2%nat (Re (1 + cos (2*PI*INR(a+1)*INR(b+1)/2015)), sin (2*PI*INR(a+1)*INR(b+1)/2015)) in HCprod2 f 2015%nat 2015%nat = putnam_2015_a3_solution. Proof. Admitted. End putnam_2015_a3.","theory putnam_2015_a3 imports Complex_Main begin definition putnam_2015_a3_solution :: complex where ""putnam_2015_a3_solution \ undefined"" (* 13725 *) theorem putnam_2015_a3: shows ""log 2 (Re (\a::nat=1..2015. \b::nat=1..2015. (1 + exp (2*pi*\*a*b/2015)))) = putnam_2015_a3_solution"" sorry end ", putnam_2015_a4,"abbrev putnam_2015_a4_solution : ℝ := sorry -- 4 / 7 theorem putnam_2015_a4 (S : ℝ → Set ℕ := fun x ↦ {n : ℕ | n > 0 ∧ Even ⌊n * x⌋}) (f : ℝ → ℝ := fun x ↦ ∑' n : S x, 1 / 2 ^ (n : ℕ)) (p : ℝ → Prop := fun l ↦ ∀ x ∈ Set.Ico 0 1, f x ≥ l) (L : ℝ) (hpL : p L) (hLub : ∀ l : ℝ, p l → l ≤ L) : (L = putnam_2015_a4_solution) := sorry","For each real number $x$, let \[ f(x) = \sum_{n\in S_x} \frac{1}{2^n}, \] where $S_x$ is the set of positive integers $n$ for which $\lfloor nx \rfloor$ is even. What is the largest real number $L$ such that $f(x) \geq L$ for all $x \in [0,1)$? (As usual, $\lfloor z \rfloor$ denotes the greatest integer less than or equal to $z$.)",Prove that $L = \frac{4}{7}$.,['analysis'],"Section putnam_2015_a4. Require Import Nat List Reals. From Coquelicot Require Import Coquelicot Hierarchy Rcomplements. Definition putnam_2015_a4_solution : R := 4/7. Theorem putnam_2015_a4: let f (x: R) := Series (fun n => if even (Z.to_nat (floor ((INR n)*x))) then 1/(2^n) else R0) in exists (L: R), forall (x: R), 0 <= x < 1 -> ((f x >= L) /\ forall (M: R), f x >= M -> L >= M) <-> L = putnam_2015_a4_solution. Proof. Admitted. End putnam_2015_a4.","theory putnam_2015_a4 imports Complex_Main ""HOL-Analysis.Infinite_Sum"" begin definition putnam_2015_a4_solution::real where ""putnam_2015_a4_solution \ undefined"" (* 4/7 *) theorem putnam_2015_a4: fixes S::""real\(nat set)"" and f::""real\real"" and p::""real\bool"" defines ""S \ \x::real. {n::nat. n > 0 \ even (\n * x\)}"" and ""f \ \x::real. \\<^sub>\n \ S x. 1 / (2 ^ n)"" shows ""putnam_2015_a4_solution = (GREATEST l::real. \x \ {0..<1}. f x \ l)"" sorry end ", putnam_2015_a5,"theorem putnam_2015_a5 (q : ℕ) (Nq : ℕ) (qodd : Odd q) (qpos : q > 0) (hNq : Nq = {a : ℕ | 0 < a ∧ a < (q : ℝ) / 4 ∧ Nat.gcd a q = 1}.encard) : Odd Nq ↔ ∃ p k : ℕ, q = p ^ k ∧ k > 0 ∧ p.Prime ∧ (p % 8 = 5 ∨ p % 8 = 7) := sorry","Let $q$ be an odd positive integer, and let $N_q$ denote the number of integers $a$ such that $0 forall (Nq: Ensemble nat), forall (a: nat), ( and (Rle R0 (INR a)) (Rle (INR a) (Rdiv (INR q) (INR 4))) /\ gcd a q = 1 <-> Nq a ) -> exists (Nq_size: nat), cardinal nat Nq Nq_size /\ odd Nq_size = true <-> exists (p k: nat), prime (Z.of_nat p) /\ (p mod 8 = 5 \/ p mod 8 = 7) /\ q = p^k. Proof. Admitted. End putnam_2015_a5.","theory putnam_2015_a5 imports Complex_Main ""HOL-Computational_Algebra.Primes"" begin theorem putnam_2015_a5: fixes q :: nat and Nq :: nat assumes qodd: ""odd q"" and qpos: ""q > 0"" and hNq: ""Nq = card {a::nat. 0 < a \ a < (real q)/4 \ gcd a q = 1}"" shows ""odd Nq \ (\p k::nat. q = p^k \ k > 0 \ prime p \ (p mod 8 = 5 \ p mod 8 = 7))"" sorry end ", putnam_2015_a6,"theorem putnam_2015_a6 (n : ℕ) (A B M : Matrix (Fin n) (Fin n) ℝ) (npos : n > 0) (hmul : A * M = M * B) (hpoly : Matrix.charpoly A = Matrix.charpoly B) : ∀ X : Matrix (Fin n) (Fin n) ℝ, (A - M * X).det = (B - X * M).det := sorry","Let $n$ be a positive integer. Suppose that $A$, $B$, and $M$ are $n \times n$ matrices with real entries such that $AM = MB$, and such that $A$ and $B$ have the same characteristic polynomial. Prove that $\det(A-MX)=\det(B-XM)$ for every $n \times n$ matrix $X$ with real entries.",,['linear_algebra'],"Section putnam_2015_a6. Theorem putnam_2015_a6: True. Proof. Admitted. End putnam_2015_a6.","theory putnam_2015_a6 imports Complex_Main ""HOL-Analysis.Determinants"" ""HOL-Computational_Algebra.Polynomial"" begin theorem putnam_2015_a6: fixes n :: nat and A B M :: ""real^'n^'n"" and charpoly :: ""real^'n^'n \ (real poly)"" assumes npos: ""n > 0"" and pncard: ""CARD('n) = n"" and hmul: ""A ** M = M ** B"" and hcharpoly: ""\A'::real^'n^'n. charpoly A' = det (mat (monom 1 1) - map_matrix (\a::real. monom a 0) A')"" and hpoly: ""charpoly A = charpoly B"" shows ""\X::real^'n^'n. det (A - M**X) = det (B - X**M)"" sorry end ", putnam_2015_b1,"theorem putnam_2015_b1 (f : ℝ → ℝ) (nzeros : (ℝ → ℝ) → ℕ → Prop) (fdiff : ContDiff ℝ 2 f ∧ Differentiable ℝ (iteratedDeriv 2 f)) (hnzeros : ∀ f' : ℝ → ℝ, ∀ n : ℕ, nzeros f' n = ({x : ℝ | f' x = 0}.encard ≥ n)) (fzeros : nzeros f 5) : nzeros (f + 6 * deriv f + 12 * iteratedDeriv 2 f + 8 * iteratedDeriv 3 f) 2 := sorry",Let $f$ be a three times differentiable function (defined on $\mathbb{R}$ and real-valued) such that $f$ has at least five distinct real zeros. Prove that $f+6f'+12f''+8f'''$ has at least two distinct real zeros.,,['analysis'],"Section putnam_2015_b1. Require Import Reals List Coquelicot.Derive. Local Open Scope R_scope. Theorem putnam_2015_b1 : forall (f: R -> R), continuity (Derive_n f 3) -> exists (l: list R), length l = 5%nat /\ NoDup l /\ forall x, In x l -> f x = 0 -> let g (x: R):= f x + 6 * (Derive_n f 1) x + 12 * (Derive_n f 2) x + 8 * (Derive_n f 3) x in exists (l': list R), length l = 2%nat /\ NoDup l' /\ forall x, In x l' -> g x = 0. Proof. Admitted. End putnam_2015_b1.","theory putnam_2015_b1 imports Complex_Main ""HOL-Analysis.Derivative"" begin theorem putnam_2015_b1: fixes f :: ""real \ real"" and nzeros :: ""(real \ real) \ nat \ bool"" assumes fdiff: ""f C1_differentiable_on UNIV \ (deriv f) C1_differentiable_on UNIV \ ((deriv^^2) f) differentiable_on UNIV"" and hnzeros: ""\(f'::real\real)(n::nat). nzeros f' n = (card {x::real. f' x = 0} \ n)"" and fzeros: ""nzeros f 5"" shows ""nzeros (\x::real. f x + (6*deriv f x) + (12*(deriv^^2) f x) + (8*(deriv^^3) f x)) 2"" sorry end ", putnam_2015_b3,"abbrev putnam_2015_b3_solution : Set (Matrix (Fin 2) (Fin 2) ℝ) := sorry -- {A : Matrix (Fin 2) (Fin 2) ℝ | (∃ α : ℝ, ∀ i j : Fin 2, A i j = α * 1) ∨ (∃ β : ℝ, A 0 0 = β * -3 ∧ A 0 1 = β * -1 ∧ A 1 0 = β * 1 ∧ A 1 1 = β * 3)} theorem putnam_2015_b3 (S : Set (Matrix (Fin 2) (Fin 2) ℝ)) (M : Matrix (Fin 2) (Fin 2) ℝ) (MinS : Prop) (hS : S = {M' : Matrix (Fin 2) (Fin 2) ℝ | (M' 0 1 - M' 0 0 = M' 1 0 - M' 0 1) ∧ (M' 0 1 - M' 0 0 = M' 1 1 - M' 1 0)}) (hMinS : MinS = (M ∈ S ∧ (∃ k > 1, M ^ k ∈ S))) : MinS ↔ M ∈ putnam_2015_b3_solution := sorry","Let $S$ be the set of all $2 \times 2$ real matrices $M=\begin{pmatrix} a & b \\ c & d \end{pmatrix}$ whose entries $a,b,c,d$ (in that order) form an arithmetic progression. Find all matrices $M$ in $S$ for which there is some integer $k>1$ such that $M^k$ is also in $S$.","Show that matrices of the form $\alpha A$ or $\beta B$, where $A=\left(\begin{smallmatrix} 1 & 1 \\ 1 & 1 \end{smallmatrix}\right)$, $B=\left(\begin{smallmatrix} -3 & -1 \\ 1 & 3 \end{smallmatrix}\right)$, and $\alpha,\beta \in \mathbb{R}$, are the only matrices in $S$ that satisfy the given condition.",['linear_algebra'],,"theory putnam_2015_b3 imports Complex_Main ""HOL-Analysis.Finite_Cartesian_Product"" begin definition putnam_2015_b3_solution :: ""(real^2^2) set"" where ""putnam_2015_b3_solution \ undefined"" (* {M::real^2^2. (\\ \::real. M$1$1 = \*1 + \*-3 \ M$1$2 = \*1 + \*-1 \ M$2$1 = \*1 + \*1 \ M$2$2 = \*1 + \*3)} *) theorem putnam_2015_b3: fixes S :: ""(real^2^2) set"" and M :: ""real^2^2"" and Mpow :: ""real^2^2 \ nat \ real^2^2"" and MinS :: bool assumes hS: ""S \ {M'::real^2^2. (M'$1$2 - M'$1$1 = M'$2$1 - M'$1$2) \ (M'$1$2 - M'$1$1 = M'$2$2 - M'$2$1)}"" and hMpow: ""\A::real^2^2. Mpow A 0 = mat 1 \ (\k::nat>0. Mpow A k = Mpow A (k-1) ** A)"" and hMinS: ""MinS \ (M \ S \ (\k::nat>1. Mpow M k \ S))"" shows ""MinS \ M \ putnam_2015_b3_solution"" sorry end ", putnam_2015_b4,"abbrev putnam_2015_b4_solution : ℤ × ℕ := sorry -- (17, 21) theorem putnam_2015_b4 (quotientof : ℚ → (ℤ × ℕ)) (hquotientof : ∀ q : ℚ, quotientof q = (q.num, q.den)) : quotientof (∑' t : (Fin 3 → ℤ), if (∀ n : Fin 3, t n > 0) ∧ t 0 < t 1 + t 2 ∧ t 1 < t 2 + t 0 ∧ t 2 < t 0 + t 1 then 2^(t 0)/(3^(t 1)*5^(t 2)) else 0) = putnam_2015_b4_solution := sorry","Let $T$ be the set of all triples $(a,b,c)$ of positive integers for which there exist triangles with side lengths $a,b,c$. Express \[ \sum_{(a,b,c) \in T} \frac{2^a}{3^b 5^c} \] as a rational number in lowest terms.",The answer is $17/21$.,['algebra'],"Section putnam_2015_b4. Require Import Nat List Reals Coquelicot.Coquelicot. From mathcomp Require Import div. Open Scope nat_scope. Definition putnam_2015_b4_solution := (17, 21). Theorem putnam_2015_b4: let fix exprl2 (l : list nat) : R := match l with | a :: b :: c :: _ => Rdiv (2 ^ a) (3 ^ b * 5 ^ c) | _ => R0 end in let fix exprl (l : list (list nat)) : list R := match l with | nil => nil | h :: t => exprl2 h :: exprl t end in forall (E: list (list nat)) (l: list nat), (In l E <-> (length l = 3 /\ let a := nth 0 l 0 in let b := nth 1 l 0 in let c := nth 2 l 0 in a > 0 /\ b > 0 /\ c > 0 /\ a < c + b /\ b < a + c /\ c < a + b)) -> exists (p q: nat), coprime p q = true /\ fold_left Rplus (exprl E) R0 = Rdiv (INR p) (INR q) /\ (p, q) = putnam_2015_b4_solution. Proof. Admitted. End putnam_2015_b4.","theory putnam_2015_b4 imports Complex_Main ""HOL-Analysis.Infinite_Sum"" ""HOL-Analysis.Finite_Cartesian_Product"" begin definition putnam_2015_b4_solution :: ""int \ int"" where ""putnam_2015_b4_solution \ undefined"" (* (17,21) *) theorem putnam_2015_b4: shows ""\q::rat. (\\<^sub>\t::nat^3. if ((t$1 > 0 \ t$2 > 0 \ t$3 > 0) \ t$1 < t$2 + t$3 \ t$2 < t$3 + t$1 \ t$3 < t$1 + t$2) then (2^(t$1) / (3^(t$2)*5^(t$3))) else 0) = q \ quotient_of q = putnam_2015_b4_solution"" sorry end ", putnam_2015_b5,"abbrev putnam_2015_b5_solution : ℕ := sorry -- 4 theorem putnam_2015_b5 (P : ℕ → ℕ := fun n ↦ {pi : Finset.Icc 1 n → Finset.Icc 1 n | Bijective pi ∧ ∀ i j : Finset.Icc 1 n, Nat.dist i j = 1 → Nat.dist (pi i) (pi j) ≤ 2}.ncard) : (∀ n : ℕ, n ≥ 2 → (P (n + 5) : ℤ) - (P (n + 4) : ℤ) - (P (n + 3) : ℤ) + (P n : ℤ) = putnam_2015_b5_solution) := sorry","Let $P_n$ be the number of permutations $\pi$ of $\{1,2,\dots,n\}$ such that \[ |i-j| = 1 \mbox{ implies } |\pi(i) -\pi(j)| \leq 2 \] for all $i,j$ in $\{1,2,\dots,n\}$. Show that for $n \geq 2$, the quantity \[ P_{n+5} - P_{n+4} - P_{n+3} + P_n \] does not depend on $n$, and find its value.",Prove that answer is $4$.,['algebra'],"Section putnam_2015_b5. Require Import Reals. From mathcomp Require Import fintype perm ssrbool. Open Scope nat_scope. Definition putnam_2015_b5_solution := 4. Theorem putnam_2015_b5: let cond (n: nat) (π: {perm 'I_n}) : bool := forallb (fun i => forallb (fun j => if Z.to_nat (Z.abs (Z.of_nat (nat_of_ord i) - Z.of_nat (nat_of_ord j))) =? 1 then Z.to_nat (Z.abs (Z.of_nat (nat_of_ord (π i)) - Z.of_nat (nat_of_ord (π j)))) <=? 2 else true ) (ord_enum n) ) (ord_enum n) in let P (n : nat) : nat := let perms := enum 'S_n in let valid_perms := filter (fun π => cond n π) perms in length valid_perms in forall (n: nat), n >= 2 -> P (n+5) - P (n+4) - P (n+3) + P n = putnam_2015_b5_solution. Proof. Admitted. End putnam_2015_b5.","theory putnam_2015_b5 imports Complex_Main ""HOL-Combinatorics.Permutations"" begin definition putnam_2015_b5_solution::nat where ""putnam_2015_b5_solution \ undefined"" (* 4 *) theorem putnam_2015_b5: fixes P::""nat\nat"" defines ""P \ \n. card ({pi::nat\nat. pi permutes {1..n} \ (\i\{1..n}. \j\{1..n}. abs(i - j) = 1 \ abs(pi i - pi j) \ 2)})"" shows ""\n::nat \ 2. P (n+5) - P (n+4) - P(n+3) + P n = putnam_2015_b5_solution"" sorry end ", putnam_2015_b6,"abbrev putnam_2015_b6_solution : ℝ := sorry -- Real.pi ^ 2 / 16 theorem putnam_2015_b6 (A : ℕ → ℕ) (hA : ∀ k > 0, A k = {j : ℕ | Odd j ∧ j ∣ k ∧ j < Real.sqrt (2 * k)}.encard) : ∑' k : Set.Ici 1, (-1 : ℝ) ^ ((k : ℝ) - 1) * (A k / (k : ℝ)) = putnam_2015_b6_solution := sorry","For each positive integer $k$, let $A(k)$ be the number of odd divisors of $k$ in the interval $[1,\sqrt{2k})$. Evaluate $\sum_{k=1}^\infty (-1)^{k-1}\frac{A(k)}{k}$.",Show that the sum converges to $\pi^2/16$.,"['analysis', 'number_theory']",,"theory putnam_2015_b6 imports Complex_Main ""HOL-Analysis.Infinite_Sum"" begin definition putnam_2015_b6_solution :: real where ""putnam_2015_b6_solution \ undefined"" (* pi^2 / 16 *) theorem putnam_2015_b6: fixes A :: ""nat \ nat"" assumes hA: ""\k::nat>0. A k = card {j::nat. odd j \ j dvd k \ j < sqrt (2*k)}"" shows ""(\\<^sub>\k::nat\{1..}. (-1)^(k-1) * (A k / k)) = putnam_2015_b6_solution"" sorry end ", putnam_1996_a1,,,,[],"Section putnam_1996_a1. Require Import Reals Coquelicot.Coquelicot. Open Scope R. Theorem putnam_1996_a1: exists (minA: R), forall (A: R), let packable (n1 n2 a1 a2: R) := (n1 + n2) <= Rmax a1 a2 /\ Rmax n1 n2 <= Rmin a1 a2 in forall (n1 n2: R), pow n1 2 + pow n2 2 = 1 -> exists (a1 a2: R), a1 * a2 = minA /\ packable n1 n2 a1 a2 /\ exists (a1 a2: R), a1 * a2 = A /\ packable n1 n2 a1 a2 -> minA <= A. Proof. Admitted. End putnam_1996_a1.",, putnam_2009_a2,,,,[],"Section putnam_2009_a2. Require Import Reals Coquelicot.Coquelicot. Definition putnam_2009_a2_solution : (R -> R) := fun x => Rpower 2 (-1 / 12) * (sin (6 * x + PI / 4) / (cos (6 * x + PI / 4)) ^ 2) ^ (1 / 6). Theorem putnam_2009_a2: forall (f g h: R -> R), exists (a b: R), a < b /\ forall (x: R), a < x < b -> (ex_derive f x /\ ex_derive g x /\ ex_derive h x /\ Derive f x = 2 * f (f (g (h x))) + 1 / g (h x) /\ f 0 = 1 /\ Derive g x = 2 * f (g (g (h x))) + 4 / f (h x) /\ g 0 = 1 /\ Derive h x = 3 * f (g (h (h x))) + 1 / f (g x) /\ h 0 = 1) -> f = putnam_2009_a2_solution. Proof. Admitted. End putnam_2009_a2.",, putnam_1975_a5,,,,[],"Section putnam_1975_a5. Require Import Basics Factorial Reals Coquelicot.Series. Open Scope R. Theorem putnam_1975_a5: let f0 (x: R) := Rpower (exp 1) x in let fix compose_n {A: Type} (f : A -> A) (n : nat) := match n with | O => fun x => x | S n' => compose f (compose_n f n') end in Series (fun n => ((compose_n f0 n) 1)/(INR (fact n))) = Rpower (exp 1) (exp 1). Proof. Admitted. End putnam_1975_a5.",, putnam_1975_b6,,,,[],"Section putnam_1975_b6. Require Import Reals Coquelicot.Coquelicot. Open Scope R. Theorem putnam_1975_b6 (h : nat -> R := fun n => sum_n (fun r => 1 / (INR r + 1)) n) : forall (n: nat), gt n 2 -> INR n * INR (n + 1) ^ (1 / n) < h n < INR n - INR (n - 1) * Rpower (INR n) (-R1 / INR (n - 1)) . Proof. Admitted. End putnam_1975_b6.",, putnam_1997_a1,,,,[],"Section putnam_1997_a1. Require Import Reals Rgeom ZArith GeoCoq.Main.Tarski_dev.Ch16_coordinates_with_functions GeoCoq.Main.Annexes.midpoint_theorems GeoCoq.Main.Highschool.circumcenter. Context `{T2D:Tarski_2D} `{TE:@Tarski_euclidean Tn TnEQD}. Open Scope R. Definition putnam_1997_a1_solution := 28. Theorem putnam_1997_a1 (pt_to_R : Tpoint -> (R * R)) (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) (A B C : Tpoint) (Hp Op Mp Fp : Tpoint) (l1 : dist Hp Op = 11) (l2 : dist Op Mp = 5) (s : Rectangle Hp Op Mp Fp) (hHp : Bet A Fp Hp) (* H as the intersection of the altitudes *) (hOp : is_circumcenter Op A B C) (* O the center of the circumscribed circle *) (hMp : Midpoint B C Mp) (* M the midpoint of BC *) (hFp : Perp A C B Fp /\ Col A C Fp) (* foot of the altitude *) : dist B C = putnam_1997_a1_solution. Proof. Admitted. End putnam_1997_a1.",, putnam_2003_b5,,,,[],"Section putnam_2003_b5. Require Import Reals GeoCoq.Main.Tarski_dev.Ch16_coordinates_with_functions GeoCoq.Axioms.Definitions GeoCoq.Main.Highschool.triangles. Context `{T2D:Tarski_2D} `{TE:@Tarski_euclidean Tn TnEQD}. Open Scope R. Definition putnam_2003_b5_solution (pt_to_R : Tpoint -> (R * R)) (dist : Tpoint -> Tpoint -> R) (P Op : Tpoint) := sqrt 3 * (1 - (dist P Op) ^ 2 - 1). Theorem putnam_2003_b5 (pt_to_R : Tpoint -> (R * R)) (F_to_R : F -> R) (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) (Triangle : Tpoint -> Tpoint -> Tpoint -> Prop := fun x y z => ~ Col x y z) (* copied from GeoCoq.Axioms.euclidean_axioms *) (A B C Op Op' P: Tpoint) (fixpoint : dist Op Op' = R1) (hABC : OnCircle A Op Op' /\ OnCircle B Op Op' /\ OnCircle C Op Op') (hABC' : Main.Highschool.triangles.equilateral A B C) (hp : InCircle P Op Op') (a : R := dist P A) (b : R := dist P B) (c : R := dist P C) : exists (A' B' C' : Tpoint) (D: Cs O E A' B' C'), Triangle A' B' C' /\ dist A' B' = a /\ dist B' C' = b /\ dist C' A' = c /\ F_to_R (signed_area A' B' C' D A' B' C') = (putnam_2003_b5_solution pt_to_R dist P Op). Proof. Admitted. End putnam_2003_b5.",, putnam_2014_a4,,,,[],"Section putnam_2014_a4. From mathcomp.analysis Require Import probability. From mathcomp Require Import all_ssreflect. From mathcomp Require Import ssralg poly ssrnum ssrint interval finmap. From mathcomp Require Import mathcomp_extra boolp classical_sets functions. From mathcomp Require Import cardinality fsbigop. From HB Require Import structures. From mathcomp.analysis Require Import exp numfun lebesgue_measure lebesgue_integral. From mathcomp.analysis Require Import reals ereal signed topology normedtype sequences esum measure. From mathcomp.analysis Require Import exp numfun lebesgue_measure lebesgue_integral kernel. Context d (T : measurableType d) (R : realType) (P : probability T R). Definition putnam_2014_a4_solution : R := 1 / 3. Local Open Scope ring_scope. Theorem putnam_2014_a4 (X : {RV P >-> R}) (ed := @expectation _ _ _ P X = 1%:E) (ed2 := @expectation _ _ _ P (X * X) = 2%:E) (ed3 := @expectation _ _ _ P (X * X * X) = 5%:E) (minval : R) (de := distribution P X) : forall (P : probability T R), (minval <= (pmf X 0) /\ exists (P : probability T R), minval = (pmf X 0)) <-> minval = putnam_2014_a4_solution. Proof. Admitted. End putnam_2014_a4.",, putnam_1987_a3,,,,[],"Section putnam_1987_a3. Require Import Reals Coquelicot.Coquelicot. Open Scope R. Definition putnam_1987_a3_solution1 := False. Definition putnam_1987_a3_solution2 := True. Theorem putnam_1987_a3: exists (f g: R -> R) (x: R), ((Derive_n f 2) x - 2 * (Derive_n f 1) x + f x = 2 * exp x /\ forall (x: R), f x > 0) -> forall (x: R), Derive_n f 1 x > 0 <-> putnam_1987_a3_solution1 /\ ((Derive_n g 2) x - 2 * (Derive_n g 1) x + g x = 2 * exp x /\ forall (x: R), Derive_n g 1 x > 0) -> forall (x: R), g x > 0 <-> putnam_1987_a3_solution2. Proof. Admitted. End putnam_1987_a3.",,