purewhite42/putnambench_solving huggingface dataset:
Problem: 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.

Answer: fun i : Fin 5 ↦ ↑i - (2 : ℤ)

Lean 4 formalization:
open Set Filter Topology Real Polynomial Function
Independent variables:
Hypotheses:
t: (Fin 5 → ℤ) → (Polynomial ℝ)
name: p
t: p = fun m ↦ ∏ i : Fin 5, ((X : Polynomial ℝ) - m i)
name: hp
t: Polynomial ℝ → ℕ
name: numnzcoeff
t: numnzcoeff = fun p ↦ {j ∈ Finset.range (p.natDegree + 1) | coeff p j ≠ 0}.card
name: hnumnzcoeff
Conclusion:
((Injective answer ∧ ∀ m : Fin 5 → ℤ, Injective m → numnzcoeff (p answer) ≤ numnzcoeff (p m)))
Formal answer (type: Fin 5 → ℤ):
answer = fun (i : Fin (5 : ℕ)) => ((↑(↑i : ℕ) : ℤ) - (2 : ℤ) : ℤ)
Problem: 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.

Answer: 99 if $n = 101$, otherwise 0

Lean 4 formalization:
open Set Filter Topology Real Polynomial Function
Independent variables:
Hypotheses:
t: ℕ -> Polynomial ℕ
name: f
t: f 0 = 1
name: hf0x
t: ∀ n ≥ 1, (f n).eval 0 = 0
name: hfn0
t: ∀ n : ℕ, derivative (f (n + 1)) = (n + 1) * (Polynomial.comp (f n) (X + 1))
name: hfderiv
Conclusion:
(Nat.factorization ((f 100).eval 1) = answer)
Formal answer (type: ℕ → ℕ):
answer = fun (n : ℕ) => (if n = (101 : ℕ) then (99 : ℕ) else (0 : ℕ) : ℕ)
Problem: 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}$.

Answer: $\sqrt{\pi / 1985} \cdot e^{-3970}$

Lean 4 formalization:
open Set Filter Topology Real Polynomial Function
Independent variables:
Hypotheses:
t: ∫ x in Set.univ, Real.exp (- x ^ 2) = Real.sqrt Real.pi
name: fact
Conclusion:
(∫ t in Set.Ioi 0, t ^ (- (1 : ℝ) / 2) * Real.exp (-1985 * (t + t ^ (-(1 : ℝ)))) = answer)
Formal answer (type: ℝ):
answer = ((√((π : ℝ) / (1985 : ℝ) : ℝ) : ℝ) * (rexp (-3970 : ℝ) : ℝ) : ℝ)
Problem: 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$.

Answer: 18

Lean 4 formalization:
Independent variables:
Hypotheses:
t: Set ℝ
name: S
t: ℝ → ℝ
name: f
t: S = {x : ℝ | x ^ 4 + 36 ≤ 13 * x ^ 2}
name: hS
t: f = fun x ↦ x ^ 3 - 3 * x
name: hf
Conclusion:
(IsGreatest {f x | x ∈ S} answer)
Formal answer (type: ℝ):
answer = (18 : ℝ)
Problem: What is the units (i.e., rightmost) digit of
\[
\left\lfloor \frac{10^{20000}}{10^{100}+3}\right\rfloor ?
\]

Answer: 3

Lean 4 formalization:
Independent variables:
Hypotheses:
Conclusion:
(Nat.floor ((10 ^ 20000 : ℝ) / (10 ^ 100 + 3)) % 10 = answer)
Formal answer (type: ℕ):
answer = (3 : ℕ)
Problem: 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$.

Answer: π / 2

Lean 4 formalization:
open Real
Independent variables:
Hypotheses:
t: ℝ → ℝ
name: cot
t: cot = fun θ ↦ Real.cos θ / Real.sin θ
name: fcot
t: ℝ → ℝ
name: arccot
t: ∀ t : ℝ, t ≥ 0 → arccot t ∈ Set.Ioc 0 (Real.pi / 2) ∧ cot (arccot t) = t
name: harccot
Conclusion:
((∑' n : ℕ, arccot (n ^ 2 + n + 1)) = answer)
Formal answer (type: ℝ):
answer = ((π : ℝ) / (2 : ℝ) : ℝ)
Problem: 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.

Answer: (1, 4, 2, 3, -4, 2, 1)

Lean 4 formalization:
open Real Equiv
Independent variables:
Hypotheses:
t: ℕ → ℕ
name: f
t: f = fun n ↦
  Set.ncard {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}
name: hf
Conclusion:
(let (a1, b1, a2, b2, a3, b3, a4) := answer;
  (∀ n > 0, f n = a1 * b1 ^ n + a2 * b2 ^ n + a3 * b3 ^ n + a4))
Formal answer (type: ℚ × ℚ × ℚ × ℚ × ℚ × ℚ × ℚ):
answer =
  (((1 : ℚ),
      (((4 : ℚ),
          (((2 : ℚ), (((3 : ℚ), (((-4 : ℚ), (((2 : ℚ), (1 : ℚ)) : ℚ × ℚ)) : ℚ × ℚ × ℚ)) : ℚ × ℚ × ℚ × ℚ)) :
            ℚ × ℚ × ℚ × ℚ × ℚ)) :
        ℚ × ℚ × ℚ × ℚ × ℚ × ℚ)) :
    ℚ × ℚ × ℚ × ℚ × ℚ × ℚ × ℚ)
Problem: 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$).

Answer: fun b n ↦ (∏ i : Finset.Icc 1 n, b i) / Nat.factorial n

Lean 4 formalization:
open Real Equiv
Independent variables:
t: ℕ
name: n
t: ℕ → ℕ
name: b
Hypotheses:
t: n > 0
name: npos
t: ℕ → ℝ
name: a
t: ∀ i ∈ Finset.Icc 1 n, b i > 0
name: bpos
t: ∀ i ∈ Finset.Icc 1 n, ∀ j ∈ Finset.Icc 1 n, b i = b j → i = j
name: binj
t: Polynomial ℝ
name: f
t: ∀ x : ℝ, (1 - x) ^ n * f.eval x = 1 + ∑ i : Finset.Icc 1 n, (a i) * x ^ (b i)
name: hf
Conclusion:
(f.eval 1 = answer b n)
Formal answer (type: (ℕ → ℕ) → ℕ → ℝ):
answer = fun (b : ℕ → ℕ) (n : ℕ) =>
  ((↑(∏ i : { x : ℕ // x ∈ (Finset.Icc (1 : ℕ) n : Finset ℕ) }, (b (↑i : ℕ) : ℕ)) : ℝ) / (↑(n.factorial : ℕ) : ℝ) : ℝ)
Problem: Inscribe a rectangle of base $b$ and height $h$ and an isosceles triangle of base $b$ (against a corresponding side of the rectangle and pointed in the other direction) in a circle of radius one. For what value of $h$ do the rectangle and triangle have the same area?

Answer: $2/5$

Lean 4 formalization:
open Real Equiv
Independent variables:
Hypotheses:
t: ℝ
name: b
t: ℝ
name: h
t: b > 0 ∧ h > 0 ∧ b ^ 2 + h ^ 2 = 2 ^ 2
name: hbh
t: b * h = 0.5 * b * (1 - h / 2)
name: areaeq
Conclusion:
(h = answer)
Formal answer (type: ℝ):
answer = (2 / 5 : ℝ)
Problem: 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$.

Answer: {(0, 0, 0), (0, -1, 1), (1, 0, -1), (-1, 1, 0)}

Lean 4 formalization:
open Real Equiv
Independent variables:
Hypotheses:
Conclusion:
({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} = answer)
Formal answer (type: Finset (ℂ × ℂ × ℂ)):
answer =
  (Insert.insert (((0 : ℂ), (((0 : ℂ), (0 : ℂ)) : ℂ × ℂ)) : ℂ × ℂ × ℂ)
      (Insert.insert (((0 : ℂ), (((-1 : ℂ), (1 : ℂ)) : ℂ × ℂ)) : ℂ × ℂ × ℂ)
          (Insert.insert (((1 : ℂ), (((0 : ℂ), (-1 : ℂ)) : ℂ × ℂ)) : ℂ × ℂ × ℂ)
              ({(((-1 : ℂ), (((1 : ℂ), (0 : ℂ)) : ℂ × ℂ)) : ℂ × ℂ × ℂ)} : Finset (ℂ × ℂ × ℂ)) :
            Finset (ℂ × ℂ × ℂ)) :
        Finset (ℂ × ℂ × ℂ)) :
    Finset (ℂ × ℂ × ℂ))
Problem: 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$.

Answer: True

Lean 4 formalization:
open Real Equiv Polynomial Filter Topology
Independent variables:
Hypotheses:
t: ℝ → ℝ
name: G
t: ∀ r : ℝ, ∃ m n : ℤ, G r = |r - Real.sqrt (m ^ 2 + 2 * n ^ 2)|
name: hGeq
t: ∀ r : ℝ, ∀ m n : ℤ, G r ≤ |r - Real.sqrt (m ^ 2 + 2 * n ^ 2)|
name: hGlb
Conclusion:
(answer ↔ Tendsto G atTop (𝓝 0))
Formal answer (type: Prop):
answer = True
Problem: 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$.

Answer: False

Lean 4 formalization:
open Real Equiv Polynomial Filter Topology MvPolynomial
Independent variables:
Hypotheses:
t: MvPolynomial (Fin 3) ℝ
name: f
t: Set (Set (MvPolynomial (Fin 3) ℝ))
name: perms
t: f = (X 0) ^ 2 + (X 1) ^ 2 + (X 2) ^ 2 + (X 0) * (X 1) * (X 2)
name: hf
t: perms = {{X 0, X 1, X 2}, {X 0, -X 1, -X 2}, {-X 0, X 1, -X 2}, {-X 0, -X 1, X 2}}
name: hperms
Conclusion:
(answer ↔ (∀ 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)))
Formal answer (type: Prop):
answer = False
Problem: 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)$.

Answer: 1984

Lean 4 formalization:
Independent variables:
Hypotheses:
t: ℕ → ℕ
name: seqind
t: ℕ → ℕ
name: seqsize
t: ℕ → ℕ
name: f
t: seqind 1 = 1 ∧ ∀ i ≥ 2, seqind i = seqind (i - 1) + (Nat.digits 10 (i - 1)).length
name: hseqind
t: ∀ i ≥ 1, ∀ j : Fin ((Nat.digits 10 i).length), seqsize (seqind i + j) = (Nat.digits 10 i).length
name: hseqsize
t: ∀ n : ℕ, f n = seqsize (10 ^ n)
name: hf
Conclusion:
(f 1987 = answer)
Formal answer (type: ℕ):
answer = (1984 : ℕ)
Problem: 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|$.

Answer: $\frac{5}{3}\sqrt{30}$

Lean 4 formalization:
open MvPolynomial Real
Independent variables:
Hypotheses:
t: MvPolynomial (Fin 3) ℂ
name: P
t: ∀ i : Fin 3 →₀ ℕ, (coeff i P).im = 0
name: hPreal
t: ℝ → ℝ → ℝ
name: F
t: ℂ → ℂ → ℂ → (Fin 3 → ℂ)
name: vars
t: vars = fun a b c ↦ fun i ↦ ite (i = 0) a (ite (i = 1) b c)
name: hvars
t: ∀ x y z u : ℝ, eval (vars (u * x) (u * y) (u * z)) P = u ^ 2 * F (y - x) (z - x)
name: h
t: eval (vars 1 0 0) P = 4 ∧ eval (vars 0 1 0) P = 5 ∧ eval (vars 0 0 1) P = 6
name: hPval
t: ℂ
name: A
t: ℂ
name: B
t: ℂ
name: C
t: eval (vars A B C) P = 0
name: hPABC
t: ‖B - A‖ = 10
name: habs
Conclusion:
(‖C - A‖ = answer)
Formal answer (type: ℂ):
answer = ((5 / 3 : ℂ) * (↑(√(30 : ℝ) : ℝ) : ℂ) : ℂ)
Problem: Let $\vec{G}(x,y)=\left(\frac{-y}{x^2+4y^2},\frac{x}{x^2+4y^2},0\right)$. Prove or disprove that there is a vector-valued function $\vec{F}(x,y,z)=(M(x,y,z),N(x,y,z),P(x,y,z))$ with the following properties:
\begin{enumerate}
\item[(i)] $M$, $N$, $P$ have continuous partial derivatives for all $(x,y,z) \neq (0,0,0)$;
\item[(ii)] $\text{Curl}\,\vec{F}=\vec{0}$ for all $(x,y,z) \neq (0,0,0)$;
\item[(iii)] $\vec{F}(x,y,0)=\vec{G}(x,y)$.
\end{enumerate}

Answer: False

Lean 4 formalization:
Independent variables:
Hypotheses:
t: ℝ → ℝ → (Fin 2 → ℝ)
name: vec2
t: ℝ → ℝ → ℝ → (Fin 3 → ℝ)
name: vec3
t: (Fin 2 → ℝ) → (Fin 3 → ℝ)
name: G
t: G = (fun v : Fin 2 → ℝ => vec3 (-v 1 / ((v 0) ^ 2 + 4 * (v 1) ^ 2)) (v 0 / ((v 0) ^ 2 + 4 * (v 1) ^ 2)) 0)
name: hG
t: (Fin 3 → ℝ) → Fin 3 → ℝ → (Fin 3 → ℝ)
name: vrepl
t: vrepl = (fun (v : Fin 3 → ℝ) (i : Fin 3) (vi : ℝ) => (fun j : Fin 3 => if j = i then vi else v j))
name: hvrepl
t: ((Fin 3 → ℝ) → ℝ) → Fin 3 → (Fin 3 → ℝ) → Prop
name: contdiffv
t: contdiffv = (fun (Fi : (Fin 3 → ℝ) → ℝ) (j : Fin 3) (v : Fin 3 → ℝ) => ContDiffAt ℝ 1 (fun vj : ℝ => Fi (vrepl v j vj)) (v j))
name: hcontdiffv
t: ((Fin 3 → ℝ) → ℝ) → Fin 3 → ((Fin 3 → ℝ) → ℝ)
name: partderiv
t: partderiv = (fun (Fi : (Fin 3 → ℝ) → ℝ) (j : Fin 3) => (fun v : Fin 3 → ℝ => deriv (fun vj : ℝ => Fi (vrepl v j vj)) (v j)))
name: hpartderiv
t: (Fin 3 → ((Fin 3 → ℝ) → ℝ)) → Prop
name: Fprop1
t: (Fin 3 → ((Fin 3 → ℝ) → ℝ)) → Prop
name: Fprop2
t: (Fin 3 → ((Fin 3 → ℝ) → ℝ)) → Prop
name: Fprop3
t: Fprop1 = (fun F : Fin 3 → ((Fin 3 → ℝ) → ℝ) => ∀ i : Fin 3, ∀ j : Fin 3, ∀ v ≠ 0, contdiffv (F i) j v)
name: hFprop1
t: Fprop2 = (fun F : Fin 3 → ((Fin 3 → ℝ) → ℝ) => ∀ v ≠ 0, vec3 ((partderiv (F 2) 1 - partderiv (F 1) 2) v) ((partderiv (F 0) 2 - partderiv (F 2) 0) v) ((partderiv (F 1) 0 - partderiv (F 0) 1) v) = 0)
name: hFprop2
t: Fprop3 = (fun F : Fin 3 → ((Fin 3 → ℝ) → ℝ) => ∀ x y : ℝ, (fun i : Fin 3 => (F i) (vec3 x y 0)) = G (vec2 x y))
name: hFprop3
t: ∀ x y : ℝ, (vec2 x y) 0 = x ∧ (vec2 x y) 1 = y
name: hvec2
t: ∀ x y z : ℝ, (vec3 x y z) 0 = x ∧ (vec3 x y z) 1 = y ∧ (vec3 x y z) 2 = z
name: hvec3
Conclusion:
((∃ F : Fin 3 → ((Fin 3 → ℝ) → ℝ), Fprop1 F ∧ Fprop2 F ∧ Fprop3 F) ↔ answer)
Formal answer (type: Prop):
answer = False
Problem: 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?

Answer: the set of positive real numbers $x$ such that $0 < x < 25$

Lean 4 formalization:
open MvPolynomial Real Nat
Independent variables:
Hypotheses:
t: ℕ → ℕ
name: a
t: a = fun n ↦ {i | (digits 3 n).get i = 0}.ncard
name: ha
Conclusion:
({x : ℝ | x > 0 ∧ Summable (fun n ↦ x ^ (a n) / (n ^ 3))} = answer)
Formal answer (type: Set ℝ):
answer = ({x : ℝ | x > (0 : ℝ) ∧ x < (25 : ℝ)} : Set ℝ)
Problem: Evaluate
\[
\int_2^4 \frac{\sqrt{\ln(9-x)}\,dx}{\sqrt{\ln(9-x)}+\sqrt{\ln(x+3)}}.
\]

Answer: 1

Lean 4 formalization:
open MvPolynomial Real Nat
Independent variables:
Hypotheses:
Conclusion:
(answer = ∫ x in (2)..4, sqrt (log (9 - x)) / (sqrt (log (9 - x)) + sqrt (log (x + 3))))
Formal answer (type: ℝ):
answer = (1 : ℝ)
Problem: 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.

Answer: (True, -1, True, 0)

Lean 4 formalization:
open MvPolynomial Real Nat Filter Topology
Independent variables:
Hypotheses:
t: ℕ → ℝ
name: x
t: ℕ → ℝ
name: y
t: (x 1, y 1) = (0.8, 0.6)
name: hxy1
t: ∀ n ≥ 1, x (n + 1) = (x n) * cos (y n) - (y n) * sin (y n)
name: hx
t: ∀ n ≥ 1, y (n + 1) = (x n) * sin (y n) + (y n) * cos (y n)
name: hy
Conclusion:
(let (existsx, limx, existsy, limy) := answer
((∃ c : ℝ, Tendsto x atTop (𝓝 c)) → existsx) ∧
(existsx → Tendsto x atTop (𝓝 limx)) ∧
((∃ c : ℝ, Tendsto y atTop (𝓝 c)) → existsy) ∧
(existsy → Tendsto y atTop (𝓝 limy)))
Formal answer (type: Prop × ℝ × Prop × ℝ):
answer = ((True, (((-1 : ℝ), ((True, (0 : ℝ)) : Prop × ℝ)) : ℝ × Prop × ℝ)) : Prop × ℝ × Prop × ℝ)
Problem: Let $R$ be the region consisting of the points $(x,y)$ of the cartesian plane satisfying both $|x|-|y| \leq 1$ and $|y| \leq 1$. Find the area of $R$.

Answer: 6

Lean 4 formalization:
open MeasureTheory
Independent variables:
Hypotheses:
t: Set (Fin 2 → ℝ)
name: R
t: R = {p | |p 0| - |p 1| ≤ 1 ∧ |p 1| ≤ 1}
name: hR
Conclusion:
((volume R).toReal = answer)
Formal answer (type: ℝ):
answer = (6 : ℝ)
Problem: 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)$.

Answer: True

Lean 4 formalization:
open Set
Independent variables:
Hypotheses:
t: ℝ → ℝ
name: f
t: f = fun x ↦ Real.exp (x ^ 2)
name: hf
Conclusion:
(answer ↔
      (∃ 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)))
Formal answer (type: Prop):
answer = True
Problem: 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.

Answer: {x | x > 1 / 2}

Lean 4 formalization:
open Set Filter Topology
Independent variables:
Hypotheses:
Conclusion:
(answer = {x : ℝ | ∃ L : ℝ, Tendsto (fun t ↦ ∑ n in Finset.Icc (1 : ℕ) t, (((1 / n) / Real.sin (1 / n) - 1) ^ x)) atTop (𝓝 L)})
Formal answer (type: Set ℝ):
answer = ({x : ℝ | x > (1 / 2 : ℝ)} : Set ℝ)
Problem: \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}

Answer: (True, False)

Lean 4 formalization:
open Set Filter Topology
Independent variables:
Hypotheses:
t: ℕ → Prop
name: p
t: ∀ n, p n ↔
      ∀ color : (EuclideanSpace ℝ (Fin 2)) → Fin n,
        ∃ p q : EuclideanSpace ℝ (Fin 2),
          color p = color q ∧ dist p q = 1
name: hp
Conclusion:
(let (a, b) := answer; (p 3 ↔ a) ∧ (p 9 ↔ b))
Formal answer (type: Prop × Prop):
answer = ((True, False) : Prop × Prop)
Problem: 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.

Answer: True

Lean 4 formalization:
open Set Filter Topology
Independent variables:
Hypotheses:
Conclusion:
((∀ (F V : Type*) (_ : Field F) (_ : AddCommGroup V) (_ : Module F V) (_ : FiniteDimensional F V) (n : ℕ) (A : Module.End F V) (evecs : Set V), (n = Module.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)) ↔ answer)
Formal answer (type: Prop):
answer = True
Problem: 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$.

Answer: True

Lean 4 formalization:
open Set Filter Topology
Independent variables:
Hypotheses:
Conclusion:
((∀ x y : ℝ, (y ≥ 0 ∧ y * (y + 1) ≤ (x + 1) ^ 2) → (y * (y - 1) ≤ x ^ 2)) ↔ answer)
Formal answer (type: Prop):
answer = True
Problem: 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$.

Answer: (1 + √3) / 2

Lean 4 formalization:
open Set Filter Topology
Independent variables:
Hypotheses:
t: ℤ → ℝ
name: r
t: ∀ 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)
name: hr
Conclusion:
(IsLeast {g : ℝ | g > 0 ∧ (∀ n : ℤ, n ≥ 1 → r n ≤ g)} answer)
Formal answer (type: ℝ):
answer = (((1 : ℝ) + (√(3 : ℝ) : ℝ) : ℝ) / (2 : ℝ) : ℝ)
Problem: 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*}

Answer: 2n

Lean 4 formalization:
open Set Filter Topology
Independent variables:
t: ℕ
name: n
Hypotheses:
t: n > 0
name: hn
t: Matrix (Fin (2 * n + 1)) (Fin (2 * n + 1)) ℝ
name: Mn
t: ∀ i j, Mn i j = -(Mn j i)
name: Mnskewsymm
t: ∀ i j, (1 ≤ (i.1 : ℤ) - j.1 ∧ (i.1 : ℤ) - j.1 ≤ n) → Mn i j = 1
name: hMn1
t: ∀ i j, (i.1 : ℤ) - j.1 > n → Mn i j = -1
name: hMnn1
Conclusion:
(Mn.rank = answer n)
Formal answer (type: ℕ → ℕ):
answer = fun (n : ℕ) => ((2 : ℕ) * n : ℕ)
Problem: 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$?

Answer: 1

Lean 4 formalization:
Independent variables:
Hypotheses:
t: List ℕ → Prop
name: pdigalt
t: ∀ l, pdigalt l ↔ Odd l.length ∧ (∀ i, l.get i = if Even (i : ℕ) then 1 else 0)
name: hpdigalt
Conclusion:
({p : ℕ | p.Prime ∧ pdigalt (Nat.digits 10 p)}.encard = answer)
Formal answer (type: ℕ∞):
answer = (1 : ℕ∞)
Problem: Evaluate $\int_0^a \int_0^b e^{\max\{b^2x^2,a^2y^2\}}\,dy\,dx$ where $a$ and $b$ are positive.

Answer: $\frac{e^{a^2 b^2} - 1}{a b}$

Lean 4 formalization:
open Real
Independent variables:
t: ℝ
name: a
t: ℝ
name: b
Hypotheses:
t: a > 0 ∧ b > 0
name: abpos
Conclusion:
(∫ x in Set.Ioo 0 a, ∫ y in Set.Ioo 0 b, Real.exp (max (b ^ 2 * x ^ 2) (a ^ 2 * y ^ 2)) = answer a b)
Formal answer (type: ℝ → ℝ → ℝ):
answer = fun (a b : ℝ) => (((rexp ((a ^ (2 : ℕ) : ℝ) * (b ^ (2 : ℕ) : ℝ) : ℝ) : ℝ) - (1 : ℝ) : ℝ) / (a * b : ℝ) : ℝ)
Problem: A dart, thrown at random, hits a square target. Assuming that any two parts of the target of equal area are equally likely to be hit, find the probability that the point hit is nearer to the center than to any edge. Express your answer in the form $(a\sqrt{b}+c)/d$, where $a$, $b$, $c$, $d$ are integers and $b$, $d$ are positive.

Answer: (4, 2, -5, 3)

Lean 4 formalization:
open Nat MeasureTheory
Independent variables:
Hypotheses:
t: Set (EuclideanSpace ℝ (Fin 2))
name: square
t: Set (EuclideanSpace ℝ (Fin 2))
name: Scloser
t: Set (EuclideanSpace ℝ (Fin 2))
name: perimeter
t: EuclideanSpace ℝ (Fin 2)
name: center
t: square = {p | ∀ i : Fin 2, p i ∈ Set.Icc 0 1}
name: square_def
t: perimeter = {p ∈ square | p 0 = 0 ∨ p 0 = 1 ∨ p 1 = 0 ∨ p 1 = 1}
name: perimeter_def
t: center = (fun i : Fin 2 => 1 / 2)
name: center_def
t: Scloser = {p ∈ square | ∀ q ∈ perimeter, dist p center < dist p q}
name: hScloser
Conclusion:
(let (a, b, c, d) := answer;
    b > 0 ∧ d > 0 ∧ (¬∃ n : ℤ, n^2 = b) ∧
    (volume Scloser).toReal / (volume square).toReal = (a * Real.sqrt b + c) / d)
Formal answer (type: ℤ × ℤ × ℤ × ℤ):
answer = (((4 : ℤ), (((2 : ℤ), (((-5 : ℤ), (3 : ℤ)) : ℤ × ℤ)) : ℤ × ℤ × ℤ)) : ℤ × ℤ × ℤ × ℤ)
Problem: 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?

Answer: True

Lean 4 formalization:
open Nat
Independent variables:
Hypotheses:
t: (S : Type) → ℕ → S → S
name: pow
t: ∀ (S : Type) (_ : Semigroup S), ∀ s : S, pow S 1 s = s
name: hpow1
t: ∀ (S : Type) (_ : Semigroup S), ∀ s : S, ∀ n > 0, pow S (n + 1) s = s * (pow S n s)
name: hpown
Conclusion:
(((∀ (S : Type) (_ : Nonempty S) (_ : Semigroup S) (_ : IsCancelMul S), (∀ a : S, Finite {x | ∃ n : ℕ, n > 0 ∧ pow S n a = x}) → ∃ (_ : Group S), True) ↔ answer))
Formal answer (type: Prop):
answer = True