purewhite42/formal_problem_solving_main huggingface dataset:
Problem: Consider a paper punch that can be centered at any point of the plane and that, when operated, removes from the plane precisely those points whose distance from the center is irrational. How many punches are needed to remove every point?

Answer: 3

Lean 4 formalization:
open Filter Topology Nat
Conclusions: (sInf {n : ℕ | ∃ S : Set (EuclideanSpace ℝ (Fin 2)), S.encard = n ∧ ∀ Q : EuclideanSpace ℝ (Fin 2), ∃ P ∈ S, Irrational (dist P Q)} = answer)
Answer type: ℕ
Formal answer: answer = (3 : ℕ)
Problem: 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}$?

Answer: False

Lean 4 formalization:
open Filter Topology Nat
Conclusions: (answer ↔
    (∀ n ≥ 1, ∀ A B : Matrix (Fin n) (Fin n) ℝ,
      A * B * A * B = 0 → B * A * B * A = 0))
Answer type: Prop
Formal answer: answer = False
Problem: 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.

Answer: 17711

Lean 4 formalization:
open Filter Topology Nat
Conclusions: (((Finset.univ : Finset <| Finset (Set.Icc 1 10) × Finset (Set.Icc 1 10)).filter
      fun ⟨S, T⟩ ↦ (∀ s ∈ S, T.card < s) ∧ (∀ t ∈ T, S.card < t)).card =
    answer)
Answer type: ℕ
Formal answer: answer = (17711 : ℕ)
Problem: 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$.

Answer: $\{\sqrt{1990} e^x, -\sqrt{1990} e^x\}$

Lean 4 formalization:
open Filter Topology Nat
Hypotheses: t: (ℝ → ℝ) → Prop
name: P
t: ∀ f, P f ↔ ∀ x,
      (f x) ^ 2 = (∫ t in (0 : ℝ)..x, (f t) ^ 2 + (deriv f t) ^ 2) + 1990
name: P_def
t: ℝ → ℝ
name: f
Conclusions: (f ∈ answer ↔ (ContDiff ℝ 1 f ∧ P f))
Answer type: Set (ℝ → ℝ)
Formal answer: answer =
  (Insert.insert (fun (x : ℝ) => ((√(1990 : ℝ) : ℝ) * (Real.exp x : ℝ) : ℝ))
      ({fun (x : ℝ) => ((-(√(1990 : ℝ) : ℝ) : ℝ) * (Real.exp x : ℝ) : ℝ)} : Set (ℝ → ℝ)) :
    Set (ℝ → ℝ))
Problem: 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}

Answer: True

Lean 4 formalization:
open Filter Topology Nat
Conclusions: (∀ (G : Type*) (_ : Fintype G) (_ : Group G) (n : ℕ) (a b : G), (n = Fintype.card G ∧ G = Subgroup.closure {a, b} ∧ G ≠ Subgroup.closure {a} ∧ G ≠ Subgroup.closure {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))) ↔ answer)
Answer type: Prop
Formal answer: answer = True
Problem: 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?

Answer: True

Lean 4 formalization:
open Filter Polynomial Topology Nat
Conclusions: ((∃ a : ℕ → ℝ, (∀ i, a i ≠ 0) ∧
      (∀ n ≥ 1, (∑ i in Finset.Iic n, a i • X ^ i : Polynomial ℝ).roots.toFinset.card = n)) ↔
    answer)
Answer type: Prop
Formal answer: answer = True
Problem: 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?

Answer: False

Lean 4 formalization:
open Filter Topology
Hypotheses: t: ℕ
name: n
t: 1 ≤ n
name: hn
Conclusions: (answer ↔ (∃ 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))))
Answer type: Prop
Formal answer: answer = False
Problem: Find all real polynomials $p(x)$ of degree $n \geq 2$ for which there exist real numbers $r_1<r_2<\cdots<r_n$ such that
\begin{enumerate}
\item $p(r_i)=0, \qquad i=1,2,\dots,n$, and
\item $p'(\frac{r_i+r_{i+1}}{2})=0 \qquad i=1,2,\dots,n-1$,
\end{enumerate}
where $p'(x)$ denotes the derivative of $p(x)$.

Answer: the set of all real polynomials of degree 2 with two distinct real roots

Lean 4 formalization:
open Filter Topology
Independent variables: t: Polynomial ℝ
name: p
Hypotheses: t: ℕ
name: n
t: n = p.degree
name: hn
t: n ≥ 2
name: hge
Conclusions: (p ∈ answer ↔
    (∃ 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)))
Answer type: Set (Polynomial ℝ)
Formal answer: answer =
  ({p : Polynomial ℝ |
      (p.degree : WithBot ℕ) = (2 : WithBot ℕ) ∧
        ∃ (r1 : ℝ) (r2 : ℝ), r1 ≠ r2 ∧ (Polynomial.eval r1 p : ℝ) = (0 : ℝ) ∧ (Polynomial.eval r2 p : ℝ) = (0 : ℝ)} :
    Set (Polynomial ℝ))
Problem: 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}

Answer: True

Lean 4 formalization:
open Filter Metric Topology
Conclusions: ((∃ (c : ℕ → EuclideanSpace ℝ (Fin 2)) (r : ℕ → ℝ),
      (¬ ∃ p, MapClusterPt p atTop c) ∧
      (Summable <| fun i ↦ r i ^ 2) ∧
      (∀ L : AffineSubspace ℝ (EuclideanSpace ℝ (Fin 2)),
        Module.finrank ℝ L.direction = 1 → ∃ i, (↑L ∩ closedBall (c i) (r i)).Nonempty)) ↔
    answer)
Answer type: Prop
Formal answer: answer = True
Problem: Find the maximum value of $\int_0^y \sqrt{x^4+(y-y^2)^2}\,dx$ for $0 \leq y \leq 1$.

Answer: $\frac{1}{3}$

Lean 4 formalization:
open Filter Topology
Hypotheses: t: Set.Icc (0 : ℝ) 1 → ℝ
name: f
t: ∀ y : Set.Icc 0 1, f y = ∫ x in Set.Ioo 0 y, Real.sqrt (x ^ 4 + (y - y ^ 2) ^ 2)
name: hf
Conclusions: (IsGreatest (f '' (Set.Icc 0 1)) answer)
Answer type: ℝ
Formal answer: answer = (1 / 3 : ℝ)
Problem: 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?

Answer: the set of positive integers $A$ such that $A$ is a perfect square

Lean 4 formalization:
open Filter Topology
Independent variables: t: ℤ
name: A
Hypotheses: t: ℤ → ℤ
name: m
t: ℤ → ℤ
name: S
t: ℕ → ℤ
name: a
t: ∀ n, 0 ≤ n → (m n) ^ 2 ≤ n ∧ (∀ m' : ℤ, m' ^ 2 ≤ n → m' ≤ m n)
name: hm
t: ∀ n, 0 ≤ n → S n = n - (m n) ^ 2
name: hS
t: a 0 = A ∧ (∀ k, a (k + 1) = a k + S (a k))
name: ha
t: A > 0
name: hA
Conclusions: ((∃ (K : ℕ) (c : ℤ), ∀ k ≥ K, a k = c) ↔ A ∈ answer)
Answer type: Set ℤ
Formal answer: answer = ({A : ℤ | ∃ x > (0 : ℤ), A = (x ^ (2 : ℕ) : ℤ)} : Set ℤ)
Problem: 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\}$?

Answer: $\lceil p / 4 \rceil$

Lean 4 formalization:
open Filter Topology
Independent variables: t: ℕ
name: p
Hypotheses: t: Odd p
name: podd
t: Prime p
name: pprime
Conclusions: (({z : ZMod p | ∃ x : ZMod p, z = x ^ 2} ∩ {z : ZMod p | ∃ y : ZMod p, z = y ^ 2 + 1}).encard = answer p)
Answer type: ℕ → ℕ
Formal answer: answer = fun (p : ℕ) => (⌈((↑p : ℝ) / (4 : ℝ) : ℝ)⌉₊ : ℕ)
Problem: 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<x<1$. (Note: $\sinh u=(e^u-e^{-u})/2$.)

Answer: (fun a b : ℝ => |Real.log (a / b)|)

Lean 4 formalization:
open Filter Topology
Independent variables: t: ℝ
name: a
t: ℝ
name: b
Hypotheses: t: a > 0 ∧ b > 0
name: abpos
Conclusions: (IsGreatest {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))} (answer a b))
Answer type: ℝ → ℝ → ℝ
Formal answer: answer = fun (a b : ℝ) => (|(Real.log (a / b : ℝ) : ℝ)| : ℝ)
Problem: 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.
\]

Answer: 1992

Lean 4 formalization:
open Topology Filter
Hypotheses: t: ℝ → ℝ
name: C
t: C = fun α ↦ taylorCoeffWithin (fun x ↦ (1 + x) ^ α) 1992 Set.univ 0
name: hC
Conclusions: (∫ y in (0)..1, C (-y - 1) * ∑ k in Finset.Icc (1 : ℕ) 1992, 1 / (y + k) = answer)
Answer type: ℝ
Formal answer: answer = (1992 : ℝ)
Problem: 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.
\]

Answer: $\emptyset$ if $m$ is odd, otherwise $\{(m + 1, 2^{m/2}, 2^{m/2})\}$

Lean 4 formalization:
open Topology Filter Nat
Independent variables: t: ℕ
name: m
Hypotheses: t: m > 0
name: mpos
t: Set (ℕ × ℕ × ℕ)
name: S
t: ∀ n x y : ℕ, (n, x, y) ∈ S ↔ n > 0 ∧ x > 0 ∧ y > 0 ∧ Coprime n m ∧ (x ^ 2 + y ^ 2) ^ m = (x * y) ^ n
name: hS
Conclusions: (S = answer m)
Answer type: ℕ → Set (ℕ × ℕ × ℕ)
Formal answer: answer = fun (m : ℕ) =>
  (if Odd m then (∅ : Set (ℕ × ℕ × ℕ))
    else
      ({(((m + (1 : ℕ) : ℕ), ((((2 : ℕ) ^ (m / (2 : ℕ) : ℕ) : ℕ), ((2 : ℕ) ^ (m / (2 : ℕ) : ℕ) : ℕ)) : ℕ × ℕ)) :
            ℕ × ℕ × ℕ)} :
        Set (ℕ × ℕ × ℕ)) :
    Set (ℕ × ℕ × ℕ))
Problem: 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$.

Answer: fun k ↦ ite (Even k) ((-1) ^ (k / 2) * factorial k) 0

Lean 4 formalization:
open Topology Filter Nat Function
Hypotheses: t: ℝ → ℝ
name: f
t: ContDiff ℝ ⊤ f
name: hfdiff
t: ∀ n : ℕ, n > 0 → f (1 / n) = n ^ 2 / (n ^ 2 + 1)
name: hf
Conclusions: (∀ k : ℕ, k > 0 → iteratedDeriv k f 0 = answer k)
Answer type: ℕ → ℝ
Formal answer: answer = fun (k : ℕ) => (if Even k then (((-1 : ℝ) ^ (k / (2 : ℕ) : ℕ) : ℝ) * (↑(k ! : ℕ) : ℝ) : ℝ) else (0 : ℝ) : ℝ)
Problem: 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$?

Answer: fun n ↦ 2 * n - 3

Lean 4 formalization:
open Topology Filter Nat Function
Independent variables: t: ℕ
name: n
Hypotheses: t: n ≥ 2
name: hn
t: Finset ℝ → Set ℝ
name: A
t: A = fun S ↦ {x | ∃ a ∈ S, ∃ b ∈ S, a ≠ b ∧ (a + b) / 2 = x}
name: hA
Conclusions: (IsLeast {k : ℤ | ∃ S : Finset ℝ, S.card = n ∧ k = (A S).ncard} (answer n))
Answer type: ℕ → ℤ
Formal answer: answer = fun (n : ℕ) => (((2 : ℤ) * (↑n : ℤ) : ℤ) - (3 : ℤ) : ℤ)
Problem: For any pair $(x,y)$ of real numbers, a sequence $(a_n(x,y))_{n \geq 0}$ is defined as follows:
\begin{align*}
a_0(x,y)&=x, \\
a_{n+1}(x,y)&=\frac{(a_n(x,y))^2+y^2}{2},\text{ for $n \geq 0$.}
\end{align*}
Find the area of the region $\{(x,y) \mid (a_n(x,y))_{n \geq 0}\text{ converges}\}$.

Answer: 4 + π

Lean 4 formalization:
open Topology Filter Nat Function Polynomial
Hypotheses: t: (Fin 2 → ℝ) → (ℕ → ℝ)
name: a
t: ∀ p, (a p) 0 = p 0 ∧ (∀ n, (a p) (n + 1) = (((a p) n) ^ 2 + (p 1) ^ 2) / 2)
name: ha
Conclusions: (answer = (MeasureTheory.volume {p | ∃ L, Tendsto (a p) atTop (𝓝 L)}).toReal)
Answer type: ℝ
Formal answer: answer = ((4 : ℝ) + (Real.pi : ℝ) : ℝ)
Problem: 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)$.

Answer: 3984

Lean 4 formalization:
open Topology Filter Nat Function Polynomial
Hypotheses: t: Polynomial ℝ → Prop
name: IsValid
t: Polynomial ℝ → Polynomial ℝ → Prop
name: pair
t: ∀ p, IsValid p ↔ p ≠ 0 ∧ p.degree < 1992 ∧ IsCoprime p (X ^ 3 - X)
name: IsValid_def
t: ∀ p f, pair p f ↔ ∃ g : Polynomial ℝ, iteratedDeriv 1992 (fun x ↦ p.eval x / (x ^ 3 - x)) = fun x ↦ f.eval x / g.eval x
name: hpair
Conclusions: (IsLeast {k : ℕ | ∃ p f, IsValid p ∧ pair p f ∧ k = f.degree} answer)
Answer type: ℕ
Formal answer: answer = (3984 : ℕ)
Problem: 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?

Answer: False

Lean 4 formalization:
open Topology Filter Nat Function Polynomial
Hypotheses: t: ℕ → ℚ
name: D
t: ∀ n, D n = Matrix.det (fun i j : Fin (n - 1) ↦ ite (i = j) ((i : ℕ) + 3 : ℚ) 1)
name: hD
Conclusions: (answer ↔ (Bornology.IsBounded {x | ∃ n ≥ 2, D n / factorial n = x}))
Answer type: Prop
Formal answer: answer = False
Problem: 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.]

Answer: 4/9

Lean 4 formalization:
Conclusions: (0 < answer ∧ answer < (4 * Real.sqrt 2) / 9 ∧
    (∫ x in Set.Ioo 0 ((Real.sqrt 2) / 3), max (answer - (2 * x - 3 * x ^ 3)) 0) =
    (∫ x in Set.Ioo 0 ((Real.sqrt 6) / 3), max ((2 * x - 3 * x ^ 3) - answer) 0))
Answer type: ℝ
Formal answer: answer = (4 / 9 : ℝ)
Problem: Find the smallest positive integer $n$ such that for every integer $m$ with $0<m<1993$, there exists an integer $k$ for which $\frac{m}{1993}<\frac{k}{n}<\frac{m+1}{1994}$.

Answer: 3987

Lean 4 formalization:
Conclusions: (IsLeast
    {n : ℕ | 0 < n ∧
      ∀ m ∈ Set.Ioo (0 : ℤ) (1993), ∃ k : ℤ,
      ((m : ℝ) / 1993 < (k : ℝ) / n) ∧ ((k : ℝ) / n < ((m : ℝ) + 1) / 1994) }
    answer)
Answer type: ℕ
Formal answer: answer = (3987 : ℕ)
Problem: Two real numbers $x$ and $y$ are chosen at random in the interval $(0,1)$ with respect to the uniform distribution. What is the probability that the closest integer to $x/y$ is even? Express the answer in the form $r+s\pi$, where $r$ and $s$ are rational numbers.

Answer: (5/4, -1/4)

Lean 4 formalization:
Conclusions: ((MeasureTheory.volume
    {p : Fin 2 → ℝ | 0 < p 0 ∧ p 0 < 1 ∧ 0 < p 1 ∧ p 1 < 1 ∧ Even (round (p 0 / p 1))}
  ).toReal = answer.1 + answer.2 * Real.pi)
Answer type: ℚ × ℚ
Formal answer: answer = (((5 / 4 : ℚ), (-1 / 4 : ℚ)) : ℚ × ℚ)
Problem: Find all positive integers $n$ that are within $250$ of exactly $15$ perfect squares.

Answer: the set of integers $n$ such that $315 \leq n \leq 325$ or $332 \leq n \leq 350$

Lean 4 formalization:
open Filter Topology
Independent variables: t: ℤ
name: n
Conclusions: (n ∈ answer ↔ (0 < n ∧ {m : ℕ | |n - m ^ 2| ≤ 250}.encard = 15))
Answer type: Set ℤ
Formal answer: answer = ({n : ℤ | (315 : ℤ) ≤ n ∧ n ≤ (325 : ℤ) ∨ (332 : ℤ) ≤ n ∧ n ≤ (350 : ℤ)} : Set ℤ)
Problem: 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?

Answer: {c : ℝ | c < 243 / 8}

Lean 4 formalization:
open Filter Topology
Independent variables: t: ℝ
name: c
Conclusions: (answer = {c : ℝ | (∃ m b : ℝ,
    {x : ℝ | m * x + b = x ^ 4 + 9 * x ^ 3 + c * x ^ 2 + 9 * x + 4}.encard = 4)})
Answer type: Set ℝ
Formal answer: answer = ({c : ℝ | c < (243 / 8 : ℝ)} : Set ℝ)
Problem: 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$.

Answer: the set of all real numbers less than 1

Lean 4 formalization:
open Filter Topology
Conclusions: ({k | ∀ f (hf : (∀ x, 0 < f x ∧ f x < deriv f x) ∧ Differentiable ℝ f),
      ∃ N, ∀ x > N, Real.exp (k * x) < f x} = answer)
Answer type: Set ℝ
Formal answer: answer = (Set.Iio (1 : ℝ) : Set ℝ)
Problem: 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?

Answer: {x | let ⟨a,b⟩ := x; a = b}

Lean 4 formalization:
open Filter Topology Real
Hypotheses: t: (ℝ × ℝ) → Prop
name: habconv
t: habconv = 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)
name: habconv_def
Conclusions: (∀ ab : ℝ × ℝ, ab.1 > 0 ∧ ab.2 > 0 → (habconv ab ↔ ab ∈ answer))
Answer type: Set (ℝ × ℝ)
Formal answer: answer = ({((a, b) : ℝ × ℝ) : ℝ × ℝ | a = b} : Set (ℝ × ℝ))
Problem: 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?

Answer: True

Lean 4 formalization:
open Filter Topology Real
Hypotheses: t: ℕ
name: n
t: Fin n → (ℝ → ℝ)
name: x
t: Fin n → Fin n → ℝ
name: a
t: 0 < n
name: npos
t: ∀ i, Differentiable ℝ (x i)
name: hdiff
t: ∀ i j, a i j > 0
name: hpos
t: ∀ t i, (deriv (x i)) t = ∑ j : Fin n, (a i j) * ((x j) t)
name: hsys
t: ∀ i, Tendsto (x i) atTop (𝓝 0)
name: htendsto
Conclusions: (answer ↔ ¬(∀ b : Fin n → ℝ, (∀ t : ℝ, ∑ i : Fin n, (b i) * ((x i) t) = 0) → (∀ i, b i = 0)))
Answer type: Prop
Formal answer: answer = True
Problem: 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.)

Answer: 45 if n = 1, 10 * 45² if n = 2, and 0 otherwise

Lean 4 formalization:
open Filter Topology Real Nat
Independent variables: t: ℕ
name: n
Hypotheses: t: n > 0
name: hn
t: Set (ℕ → ℕ)
name: digits_set
t: digits_set = {f | f 0 ≠ 0 ∧ (∀ i : Fin (n ^ 2), f i ≤ 9) ∧ (∀ i ≥ n ^ 2, f i = 0)}
name: hdigits_set
t: (ℕ → ℕ) → Matrix (Fin n) (Fin n) ℤ
name: digits_to_matrix
t: digits_to_matrix = fun f => (fun i j => f (i.1 * n + j.1))
name: hdigits_to_matrix
Conclusions: (∑' f : digits_set, (digits_to_matrix f).det = answer n)
Answer type: ℕ → ℤ
Formal answer: answer = fun (n : ℕ) =>
  (if n = (1 : ℕ) then (45 : ℤ) else (if n = (2 : ℕ) then ((10 : ℤ) * ((45 : ℤ) ^ (2 : ℕ) : ℤ) : ℤ) else (0 : ℤ) : ℤ) :
    ℤ)
Problem: 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.

Answer: ⟨3,1,5,2⟩

Lean 4 formalization:
open Filter Topology Real Nat
Hypotheses: t: ℝ
name: contfrac
t: contfrac = 2207 - 1 / contfrac
name: hcontfrac
t: 1 < contfrac
name: hcontfrac'
Conclusions: (let ⟨a, b, c, d⟩ := answer;
    contfrac ^ ((1 : ℝ) / 8) = (a + b * sqrt c) / d)
Answer type: ℤ × ℤ × ℤ × ℤ
Formal answer: answer = (((3 : ℤ), (((1 : ℤ), (((5 : ℤ), (2 : ℤ)) : ℤ × ℤ)) : ℤ × ℤ × ℤ)) : ℤ × ℤ × ℤ × ℤ)
Problem: Let $C_1$ and $C_2$ be circles whose centers are $10$ units apart, and whose radii are $1$ and $3$. Find, with proof, the locus of all points $M$ for which there exist points $X$ on $C_1$ and $Y$ on $C_2$ such that $M$ is the midpoint of the line segment $XY$.

Answer: the set of points $p$ such that the distance from $p$ to the midpoint of $O_1$ and $O_2$ is between 1 and 2

Lean 4 formalization:
open Metric
Independent variables: t: EuclideanSpace ℝ (Fin 2)
name: O1
t: EuclideanSpace ℝ (Fin 2)
name: O2
Hypotheses: t: Set (EuclideanSpace ℝ (Fin 2))
name: C1
t: Set (EuclideanSpace ℝ (Fin 2))
name: C2
t: C1 = Metric.sphere O1 1
name: hC1
t: C2 = Metric.sphere O2 3
name: hC2
t: dist O1 O2 = 10
name: hO1O2
Conclusions: ({M : EuclideanSpace ℝ (Fin 2) | ∃ X Y, X ∈ C1 ∧ Y ∈ C2 ∧ M = midpoint ℝ X Y} = answer O1 O2)
Answer type: (EuclideanSpace ℝ (Fin 2)) → (EuclideanSpace ℝ (Fin 2)) → Set (EuclideanSpace ℝ (Fin 2))
Formal answer: answer = fun (O1 O2 : EuclideanSpace ℝ (Fin (2 : ℕ))) =>
  ({p : EuclideanSpace ℝ (Fin (2 : ℕ)) |
      (Dist.dist p (midpoint ℝ O1 O2 : EuclideanSpace ℝ (Fin (2 : ℕ))) : ℝ) ≥ (1 : ℝ) ∧
        (Dist.dist p (midpoint ℝ O1 O2 : EuclideanSpace ℝ (Fin (2 : ℕ))) : ℝ) ≤ (2 : ℝ)} :
    Set (EuclideanSpace ℝ (Fin (2 : ℕ))))
Problem: 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.

Answer: False

Lean 4 formalization:
Hypotheses: t: Fin 20 → Set (Fin 6)
name: choices
Conclusions: (answer ↔ (∃ (students : Finset (Fin 20)) (courses : Finset (Fin 6)),
                        students.card = 5 ∧
                        courses.card = 2 ∧
                        (↑courses ⊆ ⋂ s ∈ students, choices s ∨ ↑courses ⊆ ⋂ s ∈ students, (choices s)ᶜ)))
Answer type: Prop
Formal answer: answer = False
Problem: 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}$.

Answer: the set of functions described by the condition

Lean 4 formalization:
open Function
Independent variables: t: ℝ
name: c
t: ℝ → ℝ
name: f
Hypotheses: t: c > 0
name: cgt0
Conclusions: ((Continuous f ∧ ∀ x : ℝ, f x = f (x ^ 2 + c)) ↔ f ∈ answer c)
Answer type: ℝ → Set (ℝ → ℝ)
Formal answer: answer = fun (c : ℝ) =>
  (if c ≤ (1 / 4 : ℝ) then ({f : ℝ → ℝ | ∃ (d : ℝ), ∀ (x : ℝ), (f x : ℝ) = d} : Set (ℝ → ℝ))
    else
      ({f : ℝ → ℝ |
          ContinuousOn f (Set.Icc (0 : ℝ) c : Set ℝ) ∧
            (f (0 : ℝ) : ℝ) = (f c : ℝ) ∧
              (∀ (x : ℝ), x > (0 : ℝ) → (f x : ℝ) = (f ((x ^ (2 : ℕ) : ℝ) + c : ℝ) : ℝ)) ∧
                ∀ (x : ℝ), x < (0 : ℝ) → (f x : ℝ) = (f (-x : ℝ) : ℝ)} :
        Set (ℝ → ℝ)) :
    Set (ℝ → ℝ))
Problem: 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.

Answer: the nth Fibonacci number

Lean 4 formalization:
open Function
Hypotheses: t: Finset ℕ → Prop
name: selfish
t: ℕ
name: n
t: ∀ s : Finset ℕ, selfish s = (s.card ∈ s)
name: hselfish
t: n ≥ 1
name: npos
Conclusions: ({s : Finset ℕ | (s : Set ℕ) ⊆ Set.Icc 1 n ∧ selfish s ∧ (∀ ss : Finset ℕ, ss ⊂ s → ¬selfish ss)}.encard = answer n)
Answer type: ℕ → ℕ
Formal answer: answer = (Nat.fib : ℕ → ℕ)
Problem: 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$.

Answer: $(2n^3 + 3n^2 - 11n + 18) / 6$

Lean 4 formalization:
open Function
Independent variables: t: ℕ
name: n
Hypotheses: t: n ≥ 2
name: hn
Conclusions: (IsGreatest
  {k | ∃ x : ℕ → ℤ,
    (x '' (Finset.range n) = Set.Icc (1 : ℤ) n) ∧
    ∑ i : Fin n, x i * x ((i + 1) % n) = k}
  (answer n))
Answer type: ℕ → ℕ
Formal answer: answer = fun (n : ℕ) =>
  ((((((2 : ℕ) * (n ^ (3 : ℕ) : ℕ) : ℕ) + ((3 : ℕ) * (n ^ (2 : ℕ) : ℕ) : ℕ) : ℕ) - ((11 : ℕ) * n : ℕ) : ℕ) + (18 : ℕ) :
        ℕ) /
      (6 : ℕ) :
    ℕ)