ChristianZ97/PutnamBench-lean4 huggingface dataset:
Problem: putnam_2000_b5
Tags: algebra

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\}$.

Solution: None.

Lean 4 formal statement:
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
Problem: putnam_2001_a1
Tags: abstract_algebra

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$.

Solution: None.

Lean 4 formal statement:
theorem putnam_2001_a1
(S : Type*)
[Mul S]
(hS : ∀ a b : S, (a * b) * a = b)
: ∀ a b : S, a * (b * a) = b :=
sorry
Problem: putnam_2001_a3
Tags: algebra

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?

Solution: $P_m(x)$ factors into two nonconstant polynomials over
the integers if and only if $m$ is either a square or twice a square.

Lean 4 formal statement:
abbrev putnam_2001_a3_solution : Set ℤ := sorry
theorem putnam_2001_a3
(P : ℤ → Polynomial ℤ)
(hP : P = fun m : ℤ => (Polynomial.X)^4 - (Polynomial.C (2*m + 4))*(Polynomial.X)^2 + Polynomial.C ((m - 2)^2))
: {m : ℤ | ∃ a b, P m = a * b ∧
(∃ n ∈ Ici 1, a.coeff n ≠ 0) ∧ (∃ n ∈ Ici 1, b.coeff n ≠ 0)} = putnam_2001_a3_solution :=
sorry
Problem: putnam_2001_a5
Tags: number_theory

Prove that there are unique positive integers $a$, $n$ such that $a^{n+1}-(a+1)^n=2001$.

Solution: None.

Lean 4 formal statement:
theorem putnam_2001_a5
: ∃! an : ℤ × ℕ, let (a, n) := an; a > 0 ∧ n > 0 ∧ a^(n+1) - (a+1)^n = 2001 :=
sorry
Problem: putnam_2001_b1
Tags: algebra

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.

Solution: None.

Lean 4 formal statement:
theorem putnam_2001_b1
  (n : ℕ)
  (hn : n > 0) (hn' : Even n)
  (nums : Fin n → Fin n → ℤ)
  (colors : Fin n → Fin n → Fin 2)
  (hnums : ∀ k l, nums k l = k * n + l + 1)
  (hcolorsrows : ∀ k, (∑ l, (if (colors k l = 0) then 1 else 0)) = n / 2)
  (hcolorscols : ∀ l, (∑ k, (if (colors k l = 0) then 1 else 0)) = n / 2) :
  (∑ k, ∑ l, (if (colors k l = 0) then (nums k l) else 0)) = (∑ k, ∑ l, (if (colors k l = 1) then (nums k l) else 0)) :=
sorry
Problem: putnam_2001_b2
Tags: algebra

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*}

Solution: Show that $x=(3^{1/5}+1)/2$ and $y=(3^{1/5}-1)/2$ is the unique solution satisfying the given equations.

Lean 4 formal statement:
abbrev putnam_2001_b2_solution : Set (ℝ × ℝ) := sorry
theorem putnam_2001_b2
    (x y : ℝ)
    (hx : x ≠ 0)
    (hy : y ≠ 0)
    (eq1 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
Problem: putnam_2001_b3
Tags: analysis

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}$.

Solution: Show that the sum is $3$.

Lean 4 formal statement:
abbrev putnam_2001_b3_solution : ℝ := sorry
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
Problem: putnam_2001_b4
Tags: algebra

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.

Solution: None.

Lean 4 formal statement:
abbrev putnam_2001_b4_solution : Prop := sorry
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
Problem: putnam_2001_b5
Tags: analysis

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$.

Solution: None.

Lean 4 formal statement:
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
Problem: putnam_2001_b6
Tags: analysis

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$?

Solution: Show that the answer is yes, there must exist infinitely many such $n$.

Lean 4 formal statement:
abbrev putnam_2001_b6_solution : Prop := sorry
theorem putnam_2001_b6 :
  (∀ a : ℤ → ℝ,
    (∀ n ≥ 1, a n > 0 ∧ a n < a (n + 1)) →
    (Tendsto (fun n : ℤ => a (n + 1) / (n + 1)) atTop (𝓝 0)) →
    {n : ℤ | n > 0 ∧ (∀ i ∈ Set.Icc 1 (n - 1), a (n - i) + a (n + i) < 2 * a n)}.Infinite)
  ↔ putnam_2001_b6_solution :=
sorry
Problem: putnam_2002_a1
Tags: analysis, algebra

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)$.

Solution: Show that $P_n(1)=(-k)^nn!$ for all $n \geq 0$.

Lean 4 formal statement:
abbrev putnam_2002_a1_solution : ℕ → ℕ → ℝ := sorry
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
Problem: putnam_2002_a2
Tags: geometry

Given any five points on a sphere, show that some four of them must lie on a closed hemisphere.

Solution: None.

Lean 4 formal statement:
theorem putnam_2002_a2
(unit_sphere : Set (EuclideanSpace ℝ (Fin 3)))
(hsphere : unit_sphere = sphere 0 1)
(hemi : EuclideanSpace ℝ (Fin 3) → Set (EuclideanSpace ℝ (Fin 3)))
(hhemi : hemi = fun V ↦ {P : EuclideanSpace ℝ (Fin 3) | ⟪P, V⟫_ℝ ≥ 0})
: (∀ (S : Set (EuclideanSpace ℝ (Fin 3))), S ⊆ unit_sphere ∧ S.encard = 5 → ∃ V : EuclideanSpace ℝ (Fin 3), V ≠ 0 ∧ (S ∩ hemi V).encard ≥ 4) :=
sorry
Problem: putnam_2002_a3
Tags: algebra

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.

Solution: None.

Lean 4 formal statement:
theorem putnam_2002_a3
(n Tn : ℤ)
(hn : n ≥ 2)
(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
Problem: putnam_2002_a5
Tags: number_theory, algebra

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\}.
\]

Solution: None.

Lean 4 formal statement:
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
Problem: putnam_2002_a6
Tags: analysis, number_theory

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?

Solution: The sum converges for $b=2$ and diverges for $b \geq 3$.

Lean 4 formal statement:
abbrev putnam_2002_a6_solution : Set ℕ := sorry
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 ∈ Finset.Icc 1 m, 1/(f b n)) atTop (𝓝 L)} = putnam_2002_a6_solution :=
sorry
Problem: putnam_2002_b3
Tags: algebra

Show that, for all integers $n > 1$,
\[
\frac{1}{2ne} < \frac{1}{e} - \left( 1 - \frac{1}{n} \right)^n
< \frac{1}{ne}.
\]

Solution: None.

Lean 4 formal statement:
theorem putnam_2002_b3
(e : ℝ)
(he : e = Real.exp 1)
(f : ℤ → ℝ)
(hf : f = fun n : ℤ => 1/e - (1 - 1/n)^n)
: ∀ n : ℤ, n > 1 → 1/(2*n*e) < f n ∧ f n < 1/(n*e) :=
sorry
Problem: putnam_2002_b5
Tags: number_theory

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$.

Solution: None.

Lean 4 formal statement:
theorem putnam_2002_b5
: ∃ n : ℕ, {b : ℕ | b ≥ 1 ∧ (Nat.digits b n).length = 3 ∧ List.Palindrome (Nat.digits b n)}.ncard ≥ 2002 :=
sorry
Problem: putnam_2002_b6
Tags: linear_algebra, number_theory, algebra

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$.)

Solution: None.

Lean 4 formal statement:
theorem putnam_2002_b6
(p : ℕ)
(hp : Nat.Prime p)
(M : Matrix (Fin 3) (Fin 3) (MvPolynomial (Fin 3) ℤ))
(hM : M = fun (r c : Fin 3) => ((X c)^(p^(r : ℕ)) : MvPolynomial (Fin 3) ℤ))
(cong : ℕ → MvPolynomial (Fin 3) ℤ × MvPolynomial (Fin 3) ℤ → Prop)
(hcong : cong = 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 ∈ S, s)) ∧ ∀ s ∈ S, (∃ a b c : ℤ, s = (C a)*(X 0) + (C b)*(X 1) + (C c)*(X 2)) :=
sorry
Problem: putnam_2003_a1
Tags: algebra

Let $n$ be a fixed positive integer. How many ways are there to write $n$ as a sum of positive integers, \[ n = a_1 + a_2 + \dots + a_k, \] with $k$ an arbitrary positive integer and $a_1 \leq a_2 \leq \dots \leq a_k \leq a_1 + 1$? For example, with $n = 4$, there are four ways: $4, 2 + 2, 1 + 1 + 2, 1 + 1 + 1 + 1$

Solution: Show that there are $n$ such sums.

Lean 4 formal statement:
abbrev putnam_2003_a1_solution : ℕ → ℕ := sorry
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
Problem: putnam_2003_a2
Tags: algebra

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}$.

Solution: None.

Lean 4 formal statement:
theorem putnam_2003_a2
    (n : ℕ)
    (hn : 0 < n)
    (a b : Fin n → ℝ)
    (abnneg : ∀ i, a i ≥ 0 ∧ b i ≥ 0) :
    (∏ i, a i) ^ ((1 : ℝ) / n) +
    (∏ i, b i) ^ ((1 : ℝ) / n) ≤
    (∏ i, (a i + b i)) ^ ((1 : ℝ) / n) :=
  sorry
Problem: putnam_2003_a3
Tags: analysis

Find the minimum value of $|\sin x+\cos x+\tan x+\cot x+\sec x+\csc x|$ for real numbers $x$.

Solution: Show that the minimum is $2\sqrt{2}-1$.

Lean 4 formal statement:
noncomputable abbrev putnam_2003_a3_solution : ℝ := sorry
theorem putnam_2003_a3
    (f : ℝ → ℝ)
    (hf : ∀ x : ℝ, f x = |Real.sin x + Real.cos x + Real.tan x + 1 / Real.tan x + 1 / Real.cos x + 1 / Real.sin x|) :
    IsLeast (Set.range f) putnam_2003_a3_solution :=
  sorry
Problem: putnam_2003_a4
Tags: algebra

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|$.

Solution: None.

Lean 4 formal statement:
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
Problem: putnam_2003_a5
Tags: combinatorics

A Dyck $n$-path is a lattice path of $n$ upsteps $(1,1)$ and $n$ downsteps $(1,-1)$ that starts at the origin $O$ and never dips below the $x$-axis. A return is a maximal sequence of contiguous downsteps that terminates on the $x$-axis. Show that there is a one-to-one correspondence between the Dyck $n$-paths with no return of even length and the Dyck $(n-1)$-paths.

Solution: None.

Lean 4 formal statement:
theorem putnam_2003_a5
(n : ℕ) (npos : n > 0)
(dyckpath : (m : ℕ) → Set ((Fin (2 * m)) → ℤ))
(hdyckpath : dyckpath = fun m ↦ {p |
      range p ⊆ {-1, 1} ∧ ∑ k, p k = 0 ∧ ∀ j, ∑ k, ite (k ≤ j) (p k) 0 ≥ 0})
(noevenreturn : (m : ℕ) → Set ((Fin (2 * m)) → ℤ))
(hnoevenreturn : noevenreturn = fun m ↦ {p |
      ¬∃ i j, i < j ∧ p i = 1 ∧ (∀ k ∈ Ioc i j, p k = -1) ∧
            Even (j.1 - i.1) ∧ ∑ k, ite (k ≤ j) (p k) 0 = 0})
      : ∃ f : ((Fin (2 * n)) → ℤ) → (Fin (2 * (n - 1)) → ℤ),
            ∀ y ∈ dyckpath (n - 1), ∃! x, x ∈ dyckpath n ∩ noevenreturn n ∧ f x = y :=
sorry
Problem: putnam_2003_a6
Tags: algebra

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$?

Solution: Show that such a partition is possible.

Lean 4 formal statement:
abbrev putnam_2003_a6_solution : Prop := sorry
theorem putnam_2003_a6
(r : Set ℕ → ℕ → ℕ)
(hr : ∀ S n, r S n = ∑' s1 : S, ∑' s2 : S, if (s1 ≠ s2 ∧ s1 + s2 = n) then 1 else 0)
: (∃ A B : Set ℕ, A ∪ B = (Set.univ : Set ℕ) ∧ A ∩ B = ∅ ∧ (∀ n : ℕ, r A n = r B n)) ↔ putnam_2003_a6_solution :=
sorry
Problem: putnam_2003_b1
Tags: linear_algebra, algebra

Do there exist polynomials $a(x), b(x), c(y), d(y)$ such that \[ 1 + xy + x^2y^2 = a(x)c(y) + b(x)d(y)\] holds identically?

Solution: Show that no such polynomials exist.

Lean 4 formal statement:
abbrev putnam_2003_b1_solution : Prop := sorry
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
Problem: putnam_2003_b2
Tags: algebra

Let $n$ be a positive integer. Starting with the sequence $$1, \frac{1}{2}, \frac{1}{3}, \dots, \frac{1}{n},$$ form a new sequence of $n-1$ entries $$\frac{3}{4}, \frac{5}{12}, \dots, \frac{2n-1}{2n(n-1)}$$ by taking the averages of two consecutive entries in the first sequence. Repeat the averaging of neighbors on the second sequence to obtain a third sequence of $n-2$ entries, and continue until the final sequence produced consists of a single number $x_n$. Show that $x_n < 2/n$.

Solution: None.

Lean 4 formal statement:
theorem putnam_2003_b2
  (n : ℕ)
  (hn : n > 0)
  (seq : ℕ → ℕ → ℚ)
  (hinit : ∀ j ∈ Icc 1 n, seq 0 j = 1 / j)
  (havg : ∀ᵉ (k ∈ Icc 1 (n - 1)) (j ∈ Icc 1 (n - k)),
    seq k j = (seq (k - 1) j + seq (k - 1) (j + 1)) / 2) :
  (seq (n - 1) 1 < 2 / n) :=
sorry
Problem: putnam_2003_b3
Tags: number_theory

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$.)

Solution: None.

Lean 4 formal statement:
theorem putnam_2003_b3 (n : ℕ) :
    n ! = ∏ i ∈ Finset.Icc 1 n, ((List.range ⌊n / i⌋₊).map succ).foldl Nat.lcm 1 :=
  sorry
Problem: putnam_2003_b4
Tags: number_theory, algebra

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.

Solution: None.

Lean 4 formal statement:
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
Problem: putnam_2003_b5
Tags: geometry

Let $A,B$, and $C$ be equidistant points on the circumference of a circle of unit radius centered at $O$, and let $P$ be any point in the circle's interior. Let $a, b, c$ be the distance from $P$ to $A, B, C$, respectively. Show that there is a triangle with side lengths $a, b, c$, and that the area of this triangle depends only on the distance from $P$ to $O$.

Solution: None.

Lean 4 formal statement:
theorem putnam_2003_b5
(A B C : EuclideanSpace ℝ (Fin 2))
(hABC : dist 0 A = 1 ∧ dist 0 B = 1 ∧ dist 0 C = 1 ∧ dist A B = dist A C ∧ dist A B = dist B C ∧ dist A B ≠ 0)
: (∃ f : ℝ → ℝ, ∀ P : EuclideanSpace ℝ (Fin 2), dist 0 P < 1 → ∃ X Y Z : EuclideanSpace ℝ (Fin 2),
      dist X Y = dist P A ∧ dist Y Z = dist P B ∧ dist X Z = dist P C ∧
      (MeasureTheory.volume (convexHull ℝ {X, Y, Z})).toReal = f (dist 0 P)) :=
sorry
Problem: putnam_2003_b6
Tags: analysis

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. \]

Solution: None.

Lean 4 formal statement:
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
Problem: putnam_2004_a1
Tags: probability

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$?

Solution: Show that the answer is yes.

Lean 4 formal statement:
abbrev putnam_2004_a1_solution : Prop := sorry
theorem putnam_2004_a1
  (S : (ℕ → Fin 2) → ℕ → ℝ)
  (hS : ∀ attempts, ∀ N ≥ 1, S attempts N = (∑ i : Fin N, (attempts i).1) / N) :
  (∀ attempts 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
Problem: putnam_2004_a3
Tags: linear_algebra

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$.)

Solution: None.

Lean 4 formal statement:
theorem putnam_2004_a3
(u : ℕ → ℝ)
(hubase : u 0 = 1 ∧ u 1 = 1 ∧ u 2 = 1)
(hudet : ∀ n : ℕ, Matrix.det (fun i j : Fin 2 => u (n + i * 2 + j)) = (n)!)
: ∀ n : ℕ, ∃ m : ℤ, u n = m :=
sorry
Problem: putnam_2004_a4
Tags: algebra

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$.

Solution: None.

Lean 4 formal statement:
theorem putnam_2004_a4
  (n : ℕ) (npos : n > 0)
  (x : Fin n → ℝ)
  (avals : ℕ → (ℕ → Fin n → ℝ) → Prop)
  (havals : ∀ N a, 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
Problem: putnam_2004_a5
Tags: combinatorics

An $m \times n$ checkerboard is colored randomly: each square is independently assigned red or black with probability $1/2$. We say that two squares, $p$ and $q$, are in the same connected monochromatic region if there is a sequence of squares, all of the same color, starting at $p$ and ending at $q$, in which successive squares in the sequence share a common side. Show that the expected number of connected monochromatic regions is greater than $m n / 8$.

Solution: None.

Lean 4 formal statement:
theorem putnam_2004_a5
(m n : ℕ)
(mnpos : Inhabited (Fin m × Fin n))
(adj : (Fin m × Fin n) → (Fin m × Fin n) → Prop)
(connected : (Fin m × Fin n → Prop) → (Fin m × Fin n) → (Fin m × Fin n) → Prop)
(cmr : (Fin m × Fin n → Prop) → ℕ)
(hadj : adj = fun (⟨a, _⟩, ⟨b, _⟩) (⟨c, _⟩, ⟨d, _⟩) ↦ a = c ∧ Nat.dist b d = 1 ∨ b = d ∧ Nat.dist a c = 1)
(hconnected : connected = fun C P Q ↦ ∃ (S : List (Fin m × Fin n)) (hS : S ≠ []),
      S.head hS = P ∧ S.getLast hS = Q ∧ (∃ p : Prop, ∀ i ∈ Finset.range S.length, C S[i]! = p) ∧ (∀ i ∈ Finset.range (S.length - 1), adj S[i]! S[i+1]!))
(hcmr : cmr = fun C ↦ {R : Set (Fin m × Fin n) | ∃ P ∈ R, ∀ Q, Q ∈ R ↔ connected C P Q}.ncard)
: (∑ C : Fin m × Fin n → Prop, cmr C > 2 ^ (m * n) * (m * n / (8 : ℚ))) :=
sorry
Problem: putnam_2004_a6
Tags: analysis

Suppose that $f(x,y)$ is a continuous real-valued function on the unit square $0 \leq x \leq 1,0 \leq y \leq 1$. Show that $\int_0^1 \left(\int_0^1 f(x,y)dx\right)^2dy+\int_0^1 \left(\int_0^1 f(x,y)dy\right)^2dx \leq \left(\int_0^1 \int_0^1 f(x,y)dx\,dy\right)^2+\int_0^1 \int_0^1 [f(x,y)]^2dx\,dy$.

Solution: None.

Lean 4 formal statement:
theorem putnam_2004_a6
(f : (Set.Icc (0 : ℝ) 1 × Set.Icc (0 : ℝ) 1) → ℝ)
(fcont : Continuous f)
: (∫ y : Set.Icc (0 : ℝ) 1, (∫ x : Set.Icc (0 : ℝ) 1, f (x, y)) ^ 2) + (∫ x : Set.Icc (0 : ℝ) 1, (∫ y : Set.Icc (0 : ℝ) 1, f (x, y)) ^ 2) ≤ (∫ y : Set.Icc (0 : ℝ) 1, (∫ x : Set.Icc (0 : ℝ) 1, f (x, y))) ^ 2 + (∫ y : Set.Icc (0 : ℝ) 1, (∫ x : Set.Icc (0 : ℝ) 1, (f (x, y)) ^ 2)) :=
sorry
Problem: putnam_2004_b1
Tags: algebra

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.

Solution: None.

Lean 4 formal statement:
theorem putnam_2004_b1
(n : ℕ)
(P : Polynomial ℤ)
(r : ℚ)
(Pdeg : P.degree = n)
(Preq0 : Polynomial.aeval r P = 0)
: ∀ i ∈ Finset.range n, ∃ m : ℤ, m = ∑ j ∈ Finset.range (i + 1), (P.coeff (n - j) * r ^ (i + 1 - j)) :=
sorry
Problem: putnam_2004_b2
Tags: algebra

Let $m$ and $n$ be positive integers. Show that $\frac{(m+n)!}{(m+n)^{m+n}}<\frac{m!}{m^m}\frac{n!}{n^n}$.

Solution: None.

Lean 4 formal statement:
theorem putnam_2004_b2
(m n : ℕ)
(mnpos : m > 0 ∧ n > 0)
: ((m + n)! / ((m + n) ^ (m + n) : ℚ)) < (((m)! / (m ^ m : ℚ)) * ((n)! / (n ^ n : ℚ))) :=
sorry
Problem: putnam_2004_b4
Tags: geometry

Let $n$ be a positive integer, $n \ge 2$, and put $\theta = 2 \pi / n$. Define points $P_k = (k,0)$ in the $xy$-plane, for $k = 1, 2, \dots, n$. Let $R_k$ be the map that rotates the plane counterclockwise by the angle $\theta$ about the point $P_k$. Let $R$ denote the map obtained by applying, in order, $R_1$, then $R_2, \dots$, then $R_n$. For an arbitrary point $(x,y)$, find, and simplify, the coordinates of $R(x,y)$.

Solution: Show that $R(x, y) = (x + n, y)$.

Lean 4 formal statement:
abbrev putnam_2004_b4_solution : ℕ → ℂ → ℂ := sorry
theorem putnam_2004_b4
(n : ℕ)
(nge2 : n ≥ 2)
(R Rk : ℕ → ℂ → ℂ)
(hR : R 0 = id ∧ ∀ k : ℕ, R (k + 1) = Rk (k + 1) ∘ R k)
(hRk : Rk = fun (k : ℕ) (Q : ℂ) ↦ k + Complex.exp (Complex.I * 2 * Real.pi / n) * (Q - k))
: (R n = putnam_2004_b4_solution n) :=
sorry