Dataset Viewer
Auto-converted to Parquet Duplicate
header
stringlengths
16
289
formal_statement
stringlengths
164
1.6k
file_name
stringlengths
23
23
import Mathlib
/-- Let $A$ and $B$ be points on the same branch of the hyperbola $xy=1$. Suppose that $P$ is a point lying between $A$ and $B$ on this hyperbola, such that the area of the triangle $APB$ is as large as possible. Show that the region bounded by the hyperbola and the chord $AP$ has the same area as the region bounded by...
putnam_2015_a1_sol.lean
import Mathlib open Polynomial Filter Topology Real Set Nat List
/-- Suppose that $S$ is a finite set of points in the plane such that the area of triangle $\triangle ABC$ is at most $1$ whenever $A$, $B$, and $C$ are in $S$. Show that there exists a triangle of area $4$ that (together with its interior) covers the set $S$. -/ theorem putnam_2016_b3 (S : Finset (Fin 2 β†’ ℝ)) (hS : βˆ€ ...
putnam_2016_b3_sol.lean
import Mathlib open Classical Polynomial Filter Topology Real Set Nat List -- (3 / 4, 4 / 3)
/-- 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 p...
putnam_2016_b2_sol.lean
import Mathlib
/-- 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. -/ theorem putnam_1993_a5 : ¬Irrational ((∫ x in Set.Ioo (-100) (-10), (((x ^ 2 - x) / (x ^ 3 - ...
putnam_1993_a5_sol.lean
import Mathlib
/-- 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. -/ theorem putnam_1993_a4 (x : Fin 19 β†’...
putnam_1993_a4_sol.lean
import Mathlib open Set Filter Topology Real -- fun d ↦ exp d - 1
/-- 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)$. -/ theorem putnam_1985_a3 (d : ℝ) (a : β„• β†’ β„• β†’ ℝ) (ha0 : βˆ€...
putnam_1985_a3_sol.lean
import Mathlib open Topology Filter Nat Set Function
/-- 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\}$. -/ theorem putn...
putnam_2000_b5_sol.lean
import Mathlib open Topology Filter Nat Set Function
/-- 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$. -/ 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 := by
putnam_2000_b4_sol.lean
import Mathlib open Real Equiv -- Note: This strays from the problem statement due to the area formulas. -- 2 / 5
/-- 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? -/ theorem putnam_1986_b1 (b h : ℝ) (hbh : b > 0...
putnam_1986_b1_sol.lean
import Mathlib
/-- 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)$. -/ theorem putnam_1978_a2 (n : β„•) (npos : n > 0) (a b : ℝ) (hab : a β‰  b) (c : Fin n β†’ ℝ) ...
putnam_1978_a2_sol.lean
import Mathlib open MvPolynomial Set -- True
/-- 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$? -/ theorem putnam_2003...
putnam_2003_a6_sol.lean
import Mathlib open Set Polynomial -- 2
/-- 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? -/ theorem putnam_1978_a3 (p : Polynomial ℝ) (hp : p = 2 * (X ^ 6 + 1) + 4 * (X ^ 5 + X) + 3 * (X ^ 4 + X ^ 2) + 5 * X ^ 3) (I : ...
putnam_1978_a3_sol.lean
import Mathlib open Metric Set EuclideanGeometry Filter Topology
/-- 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$. -/ theorem putnam_1970_b5 (ramp : β„€ β†’ (ℝ β†’ ℝ)) (ramp_def : ramp = fun (n : β„€)...
putnam_1970_b5_sol.lean
import Mathlib open Metric Set EuclideanGeometry Filter Topology
/-- Let $x : \mathbb{R} \to \mathbb{R}$ be a twice differentiable function satisfying $x(1) - x(0) = 1$, $x'(0) = x'(1) = 0$, and $|x'(t)| \le \frac{3}{2}$ for all $t \in (0, 1)$. Prove that there exists some $t \in [0, 1]$ such that $|x''(t)| \ge \frac{9}{2}$. -/ theorem putnam_1970_b4 (x : ℝ β†’ ℝ) (hdiff : Differentia...
putnam_1970_b4_sol.lean
import Mathlib open Nat Set MeasureTheory Topology Filter -- Note: Uses the slope/intercept formulation of line in the plane
/-- 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. -/ theorem putnam_1973_a6 (nint : β„• β†’ (Fin 7 β†’ (ℝ Γ— ℝ)) β†’ β„•) (h_nint ...
putnam_1973_a6_sol.lean
import Mathlib
/-- Start with a finite sequence $a_1, a_2, \dots, a_n$ of positive integers. If possible, choose two indices $j < k$ such that $a_j$ does not divide $a_k$, and replace $a_j$ and $a_k$ by $\mathrm{gcd}(a_j, a_k)$ and $\mathrm{lcm}(a_j, a_k)$, respectively. Prove that if this process is repeated, it must eventually stop...
putnam_2008_a3_sol.lean
import Mathlib open EuclideanGeometry Real -- Real.pi / 15
/-- Let $\triangle ABC$ satisfy $\angle CAB < \angle BCA < \frac{\pi}{2} < \angle ABC$. If the bisector of the external angle at $A$ meets line $BC$ at $P$, the bisector of the external angle at $B$ meets line $CA$ at $Q$, and $AP = BQ = AB$, find $\angle CAB$. -/ theorem putnam_1965_a1 (A B C X Y : EuclideanSpace ℝ (F...
putnam_1965_a1_sol.lean
import Mathlib open Topology Filter
/-- Let $p_1, p_2, \dots$ be a sequence of positive real numbers. Prove that if $\sum_{n=1}^{\infty} \frac{1}{p_n}$ converges, then $$\sum_{n=1}^{\infty} \frac {n^2 p_n}{(\sum_{i=1}^{n} p_i)^2}$$ also converges. -/ theorem putnam_1966_b3 (p : β„• β†’ ℝ) (hpos : βˆ€ n : β„•, p n > 0) (hconv : βˆƒ r : ℝ, Tendsto (fun m : β„• => βˆ‘ n ...
putnam_1966_b3_sol.lean
import Mathlib
/-- Prove that, for any ten consecutive integers, at least one is relatively prime to all of the others. -/ theorem putnam_1966_b2 (S : β„€ β†’ Set β„€) (hS : S = fun n : β„€ => {n, n + 1, n + 2, n + 3, n + 4, n + 5, n + 6, n + 7, n + 8, n + 9}) : βˆ€ n : β„€, n > 0 β†’ (βˆƒ k ∈ S n, βˆ€ m ∈ S n, k β‰  m β†’ IsCoprime m k) := by
putnam_1966_b2_sol.lean
import Mathlib open Topology Filter Polynomial Set -- Note: uses (β„€ β†’ ℝ) instead of (Set.Ici 1 β†’ ℝ) -- True
/-- 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$? -/ theorem putnam_2001_b6 : (βˆ€ a : β„€ β†’ ℝ, (βˆ€ n β‰₯ 1, a n > 0 ∧ a n < a (n + 1)) β†’ (Tend...
putnam_2001_b6_sol.lean
import Mathlib open Nat Set
/-- 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},...
putnam_2002_a5_sol.lean
import Mathlib -- Multiset.replicate 659 3 + {2}
/-- 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? -/ theorem putnam_1979_a1 (P : Multiset β„• β†’ Prop) (hP : βˆ€ a, P a ↔ Multiset.card a > 0 ∧ (βˆ€ i ∈ a, i > 0) ∧ a.sum = 1979) : P ((Multiset.replicate 659 3 +...
putnam_1979_a1_sol.lean
import Mathlib open MvPolynomial Real Nat
/-- 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}}. \] -/ theorem putnam_1987_b2 (r s t : β„•) (hsum : r + s ≀ t) : (βˆ‘ i : Finset.range...
putnam_1987_b2_sol.lean
import Mathlib open MvPolynomial Real Nat
/-- Let $F$ be a field in which $1+1 \neq 0$. Show that the set of solutions to the equation $x^2+y^2=1$ with $x$ and $y$ in $F$ is given by $(x,y)=(1,0)$ and $(x,y)=\left(\frac{r^2-1}{r^2+1},\frac{2r}{r^2+1}\right)$, where $r$ runs through the elements of $F$ such that $r^2 \neq -1$. -/ theorem putnam_1987_b3 (F : Typ...
putnam_1987_b3_sol.lean
import Mathlib open Filter Topology
/-- 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}$. -/ 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)] := by
putnam_1991_b4_sol.lean
import Mathlib open Filter Topology -- (fun p : β„• => Nat.ceil ((p : ℝ) / 4))
/-- 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\}$? -/ theorem putnam_1991_b5 (p : β„•) (podd : Odd p) (pprime : Prime p) : ({z : ZMod p | βˆƒ x : ZMod p, z = x ^ 2} ∩ {z : ZMod p | βˆƒ y...
putnam_1991_b5_sol.lean
import Mathlib open Topology Filter Nat -- (fun n : β„• => (-1) ^ (n - 1) / ((n - 1)! * (n)!))
/-- 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)$. -/ 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 = ((fun n : β„• ...
putnam_2014_a2_sol.lean
import Mathlib open Topology Filter Nat -- 3 / 7
/-- 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 - \frac{1}{a_k}\right) \) in closed form. -/ theorem putnam_2014_a3 (a : β„• β†’ ℝ) (a0 : a 0 = 5 / 2) (ak : βˆ€ k β‰₯ 1, a k = (a (k - 1)) ^ 2 - 2) : Tendsto (fun n : β„• => ∏ k ∈ Finset.range n, (1 - 1 / a ...
putnam_2014_a3_sol.lean
import Mathlib
/-- Let $r_n$ be the $n$th smallest positive solution to $\tan x = x$ where the argument of tangent is in radians. Prove that $$0 < r_{n+1} - r_n - \pi < \frac{1}{(n^2+n)\pi}$$ for $n \geq 1$. -/ theorem putnam_2024_b3 (r : β„•+ β†’ ℝ) (r_def : StrictMono r ∧ (βˆ€ x ∈ Set.Ioo 0 (r 1), Real.tan x β‰  x) ∧ βˆ€ n, ...
putnam_2024_b3_sol.lean
import Mathlib open Topology Filter
/-- 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}$. -/ theorem ...
putnam_2017_b1_sol.lean
import Mathlib open Set -- Note: uses (ℝ β†’ ℝ) instead of (Icc 0 1 β†’ ℝ) -- fun _ ↦ βˆ…
/-- Let $\alpha$ be a real number. Find all continuous real-valued functions $f : [0, 1] \to (0, \infty)$ such that \begin{align*} \int_0^1 f(x) dx &= 1, \\ \int_0^1 x f(x) dx &= \alpha, \\ \int_0^1 x^2 f(x) dx &= \alpha^2. \\ \end{align*} -/ theorem putnam_1964_a2 (Ξ± : ℝ) : (((fun _ ↦ βˆ…) : ℝ β†’ Set (ℝ β†’ ℝ) ) Ξ± = {f : ℝ...
putnam_1964_a2_sol.lean
import Mathlib open Set Function
/-- The distinct points $x_n$ are dense in the interval $(0, 1)$. For all $n \geq 1$, $x_1, x_2, \dots , x_{n-1}$ divide $(0, 1)$ into $n$ sub-intervals, one of which must contain $x_n$. This part is divided by $x_n$ into two sub-intervals, lengths $a_n$ and $b_n$. Prove that $\sum_{n=1}^{\infty} a_nb_n(a_n + b_n) = \f...
putnam_1964_a3_sol.lean
import Mathlib open Nat Topology Filter
/-- Let $\hexagon ABCDEF$ be a hexagon inscribed in a circle of radius $r$. If $AB = CD = EF = r$, prove that the midpoints of $\overline{BC}$, $\overline{DE}$, and $\overline{FA}$ form the vertices of an equilateral triangle. -/ theorem putnam_1967_b1 (r : ℝ) (L : ZMod 6 β†’ (EuclideanSpace ℝ (Fin 2))) (P Q R: Euclidean...
putnam_1967_b1_sol.lean
import Mathlib open Filter Topology Metric
/-- 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 .\] -/ theorem putnam_1999_a3 (f : ℝ β†’ ℝ) (hf : f = fun x ↦ 1 / (1 - 2 * x - x ^ 2)) (a : β„• β†’ ℝ) (hf' : βˆ€αΆ  x in ...
putnam_1999_a3_sol.lean
import Mathlib
/-- 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.\] -/ theorem putnam_1999_a2 (p : Polynomial ℝ) (hp : βˆ€ x, p.eval x β‰₯ 0) : βˆƒα΅‰ (k) (f : Fin k β†’ Polynomial ℝ), k > 0 ∧ βˆ€ x : ℝ, p....
putnam_1999_a2_sol.lean
import Mathlib open Set MvPolynomial
/-- 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$. -/ theorem putnam_1971_b6 (Ξ΄ : β„€ β†’ β„€) (hΞ΄ : Ξ΄ = fun n => sSup {t | Odd t ∧ t ∣ n}) : βˆ€ x : β„€, x > 0 β†’ |βˆ‘ i ∈ Finset.Icc 1 x, (Ξ΄ i)/(i : β„š) - 2*x/3| < 1 := by
putnam_1971_b6_sol.lean
import Mathlib open EuclideanGeometry Filter Topology Set
/-- Show that if $n$ is an integer greater than $1$, then $n$ does not divide $2^n - 1$. -/ theorem putnam_1972_a5 (n : β„•) (hn : n > 1) : Β¬((n : β„€) ∣ 2^n - 1) := by
putnam_1972_a5_sol.lean
import Mathlib open Topology MvPolynomial Filter -- True
/-- 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? -/ 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 -...
putnam_2009_a1_sol.lean
import Mathlib open Set
/-- 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$. -/ 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) ...
putnam_1971_a3_sol.lean
import Mathlib open Set -- {Polynomial.X}
/-- Determine all polynomials $P(x)$ such that $P(x^2 + 1) = (P(x))^2 + 1$ and $P(0) = 0$. -/ theorem putnam_1971_a2 (P : Polynomial ℝ) : (P.eval 0 = 0 ∧ (βˆ€ x : ℝ, P.eval (x^2 + 1) = (P.eval x)^2 + 1)) ↔ P ∈ (({Polynomial.X}) : Set (Polynomial ℝ) ) := by
putnam_1971_a2_sol.lean
import Mathlib open intervalIntegral MvPolynomial Real -- 2020050
/-- 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$. -/ theorem putnam_2009...
putnam_2009_b4_sol.lean
import Mathlib open EuclideanGeometry Filter Topology Set MeasureTheory Metric
/-- 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$. -/ theorem putnam_1972_b1 (S : ℝ β†’ ℝ) (hS : 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)...
putnam_1972_b1_sol.lean
import Mathlib open Topology MvPolynomial Filter Set Metric
/-- 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$. -/ theorem putnam_2009_b5 (f : ℝ β†’ ℝ) (hfdiff : DifferentiableOn ℝ f (Ioi 1)) (hf : βˆ€ x > 1, deriv f x = (x ^ 2...
putnam_2009_b5_sol.lean
import Mathlib open Set Function Filter Topology
/-- Let $D$ be the unit disk in the plane. Show that we cannot find congruent sets $A, B$ with $A \cap B = \emptyset$ and $A \cup B = D$. -/ theorem putnam_1964_b6 (D : Set (EuclideanSpace ℝ (Fin 2))) (hD : D = {v : EuclideanSpace ℝ (Fin 2) | dist 0 v ≀ 1}) (cong : Set (EuclideanSpace ℝ (Fin 2)) β†’ Set (Eucl...
putnam_1964_b6_sol.lean
import Mathlib open Filter Topology Metric
/-- 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. -/ theorem putnam_1999_b6 (S : Finset β„€) (hSgt : βˆ€ s, s ∈ S β†’ s > 1) (hSgcd : βˆ€ n, βˆƒ s...
putnam_1999_b6_sol.lean
import Mathlib open Nat Topology Filter
/-- Prove that any convex region in the Euclidean plane with area greater than $\pi/4$ contains a pair of points exactly $1$ unit apart. -/ theorem putnam_1967_a5 (R : Set (EuclideanSpace ℝ (Fin 2))) (hR : Convex ℝ R ∧ (MeasureTheory.volume R).toReal > Real.pi / 4) : βˆƒ P ∈ R, βˆƒ Q ∈ R, dist P Q = 1 := by
putnam_1967_a5_sol.lean
import Mathlib open Nat Topology Filter
/-- 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$. -/ theorem putnam_1967_a4 (lambda : ℝ) (hlambda : lambda > 1 / 2) : Β¬βˆƒ u : ℝ β†’ ℝ, βˆ€ x ∈ Set.Icc 0 1, u x = 1 + lambda * (∫ y i...
putnam_1967_a4_sol.lean
import Mathlib open Topology Filter Nat Set Interval
/-- 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...
putnam_2014_b6_sol.lean
import Mathlib open Topology Filter
/-- 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$. -/...
putnam_2017_a4_sol.lean
import Mathlib open Topology Filter Nat Function Polynomial -- 4 + Real.pi
/-- 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}\}$. -/ theorem putnam_1992_b3 ...
putnam_1992_b3_sol.lean
import Mathlib open scoped Real open scoped Topology --fun n => 10^(n*(n-1)/2 : β„•)
/-- Let $c_0, c_1, c_2, ...$ be a sequence defined so that $$\frac{1 - 3x - \sqrt{1 - 14x + 9x^2}}{4} = \sum_{k=0}^\infty c_k x^k$$ for sufficiently small $x$. For a positive integer $n$, let $A$ be the $n$-by-$n$ matrix whose $(i, j)$-entry is $c_{i+j-1}$ for $i$ and $j$ in $\{1, 2, ..., n\}$. Find the determinant of ...
putnam_2024_a6_sol.lean
import Mathlib open Topology Filter Nat Function Polynomial
/-- 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$, $\b...
putnam_1992_b2_sol.lean
import Mathlib open Topology Filter Nat -- (2, (Polynomial.X * (Polynomial.X - 1)) / 2, Polynomial.X)
/-- 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. -/ the...
putnam_1984_b5_sol.lean
import Mathlib open Topology Filter Polynomial Set -- {m : β„€ | βˆƒ k : β„€, k^2 = m ∨ 2*k^2 = m}
/-- 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? -/ theorem putnam_2001_a3 (P : β„€ β†’ Polynomial β„€) (hP : P = fun m : β„€ => (Polynomial.X)^4 - (Polynomial.C (2*m + 4))*(Polynomial.X)...
putnam_2001_a3_sol.lean
import Mathlib open MvPolynomial Real Nat -- {x : ℝ | x > 0 ∧ x < 25}
/-- 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? -/ theorem putnam_1987_a6 (a : β„• β†’ β„•) (ha : a = fun n ↦ {i | (digits 3 n).get i = 0}.ncard) : ({x : ℝ | ...
putnam_1987_a6_sol.lean
import Mathlib open Set Topology Filter Polynomial MeasureTheory
/-- In the plane, let $C$ be a closed convex set that contains $(0,0) but no other point with integer coordinations. Suppose that $A(C)$, the area of $C$, is equally distributed among the four quadrants. Prove that $A(C) \leq 4$. -/ theorem putnam_1979_b5 (C : Set (ℝ Γ— ℝ)) (hC : IsClosed C ∧ Convex ℝ C ∧ (0,0) ∈ C) (hC...
putnam_1979_b5_sol.lean
import Mathlib open EuclideanGeometry Topology Filter Complex -- ((fun h : ℝ β†’ ℝ => h + (fun x : ℝ => x), fun h : ℝ β†’ ℝ => h + (fun _ : ℝ => 1)), ({x : ℝ | x β‰₯ 0}, Real.sqrt))
/-- Let $$f(x, n) = \frac{{n \choose 0} + {n \choose 2}x + {n \choose 4}x^2 + \cdots}{{n \choose 1} + {n \choose 3}x + {n \choose 5}x^2 + \cdots}$$ for all real numbers $x$ and positive integers $n$. Express $f(x, n+1)$ as a rational function involving $f(x, n)$ and $x$, and find $\lim_{n \to \infty} f(x, n)$ for all $...
putnam_1965_b4_sol.lean
import Mathlib open EuclideanGeometry Topology Filter Complex SimpleGraph.Walk
/-- Prove that, if $4E \le V^2$, there exists a graph with $E$ edges and $V$ vertices with no triangles (cycles of length $3$). -/ theorem putnam_1965_b5 {K : Type*} [Fintype K] (V E : β„•) (hV : V = Nat.card K) (hE: 4*E ≀ V^2) : βˆƒ G : SimpleGraph K, G.edgeSet.ncard = E ∧ βˆ€ a : K, βˆ€ w : G.Walk a a, w.length β‰  3 := by
putnam_1965_b5_sol.lean
import Mathlib open Topology Filter
/-- Prove that $$\sqrt {1 + 2 \sqrt {1 + 3 \sqrt {1 + 4 \sqrt {1 + 5 \sqrt {\dots}}}}} = 3.$$ -/ 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) atTop (𝓝 3) := by
putnam_1966_a6_sol.lean
import Mathlib open Set Function Metric -- 1
/-- 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$. -/ theorem putnam_1998_b5 (N : β„•) (hN : N = βˆ‘ i ∈ Finset.range 1998, 10^i) : ((1) : β„• ) = (Nat.floor (10^1000 * Real.sqrt N)) % 10 := by
putnam_1998_b5_sol.lean
import Mathlib open Set Function Metric -- {nm | let ⟨n,m⟩ := nm; multiplicity 2 n β‰  multiplicity 2 m}
/-- 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.\] -/ theorem putnam_1998_b4 (quantity : β„• β†’ β„• β†’ β„€) (hquantity : quantity = fun n m => βˆ‘ i ∈ Finset.range (m * n), (-1)^(i/m + i/n)) (n m : β„•) (hnm : n > 0 ∧...
putnam_1998_b4_sol.lean
import Mathlib open Metric Set EuclideanGeometry
/-- 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. -/ theorem putnam_1970_a1 (a b : ℝ) (ha : a > 0) (hb : b > 0) (f : ℝ β†’ ℝ) (f_def : f = fun x : ℝ => Real.exp (a*x) * Real.cos (b*x)) (p : β„• β†’ ℝ) (hp : βˆƒ c : ℝ, c ...
putnam_1970_a1_sol.lean
import Mathlib open Filter Topology Set Nat def klimited (k n : β„•) (s : Equiv.Perm (Fin n)) := βˆ€ i, |((s i) : β„€) - i| ≀ k
/-- 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)$. -/ theorem putnam_2008_b6 (n k : β„•) (hnk : n > ...
putnam_2008_b6_sol.lean
import Mathlib open Nat Set MeasureTheory Topology Filter
/-- 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$. -/ theorem putnam_1973_b2 (z : β„‚) (hzrat : βˆƒ q1 q2 : β„š, z.re = q1 ∧ z.im = q2) (hznorm : β€–zβ€– = 1) : βˆ€ n : β„€, βˆƒ q : β„š, β€–z^(2*n) - 1β€– = q := by
putnam_1973_b2_sol.lean
import Mathlib open Nat Set MeasureTheory Topology Filter
/-- 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$. -/ theorem putnam_1973_b3 (p : β„•) (pgt1 : p > 1) (hprime : βˆ€ x ∈ Set.Ico 0 p, N...
putnam_1973_b3_sol.lean
import Mathlib open Topology Filter -- (fun A : ℝ => Set.Ioo 0 (A ^ 2))
/-- 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$? -/ theorem putnam_2000_a1 (A : ℝ) (Apos : A > 0) : {S : ℝ | βˆƒ x : β„• β†’ ℝ, (βˆ€ j : β„•, x j > 0) ∧ (βˆ‘' j : β„•, x j) = A ∧ ...
putnam_2000_a1_sol.lean
import Mathlib open Set Filter Topology Real Polynomial Function
/-- 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. -/ theorem put...
putnam_1985_b6_sol.lean
import Mathlib open Set Real Filter Topology Polynomial
/-- 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}. \] -/ theorem putnam_1978_b6 (a : β„• β†’ β„• β†’ ℝ) (ha : βˆ€ i j, a i j ∈ Icc 0 1) (m n : β„•) (mnpos : m > 0 ∧ n > 0) : ((βˆ‘ i ∈ Finset.Icc 1 n, βˆ‘ j ∈ Finset.Icc...
putnam_1978_b6_sol.lean
import Mathlib open MvPolynomial Set -- uses (β„• β†’ β„• β†’ β„š) instead of (Fin n β†’ Icc 1 n β†’ β„š)
/-- 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...
putnam_2003_b2_sol.lean
import Mathlib open MvPolynomial Set Nat
/-- 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$.) -/ theorem putnam_2003_b3 (n : β„•) : n ! = ∏ i ∈ Finset.Icc 1 n, ((List.range ⌊n / iβŒ‹β‚Š).map succ).f...
putnam_2003_b3_sol.lean
import Mathlib open Real Equiv -- (1, 4, 2, 3, -4, 2, 1)
/-- 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 ...
putnam_1986_a4_sol.lean
import Mathlib
/-- Suppose $f_1(x),f_2(x),\dots,f_n(x)$ are functions of $n$ real variables $x=(x_1,\dots,x_n)$ with continuous second-order partial derivatives everywhere on $\mathbb{R}^n$. Suppose further that there are constants $c_{ij}$ such that $\frac{\partial f_i}{\partial x_j}-\frac{\partial f_j}{\partial x_i}=c_{ij}$ for all...
putnam_1986_a5_sol.lean
import Mathlib open Filter Topology Nat -- True
/-- 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$)? -/ theorem putnam_1990_a2 (numform : ℝ β†’ Prop) (hnumform : βˆ€ x : ℝ, numform x ↔ βˆƒ n m : β„•, x = n ^ ((1 : ℝ) / 3) - m ^ ((1 : ℝ) / 3)) : ((True) : Prop ) ↔ (βˆƒ s : β„• β†’ ℝ, (βˆ€ i : β„•, numform (s i)) ∧ ...
putnam_1990_a2_sol.lean
import Mathlib -- (17, 21)
/-- 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. -/ theorem putnam_2015_b4 (quotientof : β„š β†’ (β„€ Γ— β„•)) (hquotientof : βˆ€ q : β„š, quotientof q = (q.num,...
putnam_2015_b4_sol.lean
import Mathlib open Function -- 4
/-- 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. -/ theorem putnam_2015_...
putnam_2015_b5_sol.lean
import Mathlib -- 3987
/-- 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}$. -/ theorem putnam_1993_b1 : IsLeast {n : β„• | 0 < n ∧ βˆ€ m ∈ Set.Ioo (0 : β„€) (1993), βˆƒ k : β„€, (m / 1993 < (k : ℝ) / n) ∧ ((k ...
putnam_1993_b1_sol.lean
import Mathlib open Polynomial Filter Topology Real Set Nat List -- 5 / 6
/-- 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|. \] -/ theorem putnam_2016_a6 (p : ℝ β†’ Prop) (hp : βˆ€ c, p c ↔ βˆ€ P : Polynomial ℝ, P.degree ...
putnam_2016_a6_sol.lean
import Mathlib open Set Function Filter Topology Polynomial Real -- False
/-- 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$...
putnam_1982_a6_sol.lean
import Mathlib open Set Nat
/-- 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$ -/ 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.ev...
putnam_2007_b1_sol.lean
import Mathlib open Topology Filter Set Polynomial Function -- True
/-- 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$. -/ theorem putnam_1981_b5 (sumbits ...
putnam_1981_b5_sol.lean
import Mathlib open Topology Filter Set Polynomial Function -- False
/-- 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 o...
putnam_1981_b4_sol.lean
import Mathlib open Nat Topology Filter
/-- 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$.) -/ theorem putnam_2004_a3 (u : β„• β†’ ℝ) (hubase : u 0 =...
putnam_2004_a3_sol.lean
import Mathlib open Matrix Filter Topology Set Nat -- {{x} | x : ℝ} βˆͺ {Set.Ici x | x : ℝ} βˆͺ {Set.Iic x | x : ℝ} βˆͺ {Set.Iio x | x : ℝ} βˆͺ {Set.Ioi x | x : ℝ} βˆͺ {Set.univ}
/-- What are the possible ranges (across all real inputs $x$ and $y$) of a polynomial $f(x, y)$ with real coefficients? -/ theorem putnam_1969_a1 : {{z : ℝ | βˆƒ x : Fin 2 β†’ ℝ, MvPolynomial.eval x f = z} | f : MvPolynomial (Fin 2) ℝ} = (({{x} | x : ℝ} βˆͺ {Set.Ici x | x : ℝ} βˆͺ {Set.Iic x | x : ℝ} βˆͺ {Set.Iio x | x : ℝ} βˆͺ {S...
putnam_1969_a1_sol.lean
import Mathlib open Matrix Function -- {q | let ⟨n, _⟩ := q; n = 1} βˆͺ {(2,2)}
/-- 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,...
putnam_2012_a5_sol.lean
import Mathlib open Matrix Function
/-- 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 ...
putnam_2012_a4_sol.lean
import Mathlib open Filter Topology Bornology Set -- {n | (1 ≀ n ∧ n ≀ 4) ∨ (20 ≀ n ∧ n ≀ 24) ∨ (100 ≀ n ∧ n ≀ 104) ∨ (120 ≀ n ∧ n ≀ 124)}
/-- 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$. -/ theorem putnam_1997_b3 (n : β„•) (hn : n > 0) : n ∈ (({n | (1 ≀ n ∧ n ≀ 4) ∨ (20 ≀ n ∧ n ≀ 24) ∨ (100 ≀ n ∧ n ≀ ...
putnam_1997_b3_sol.lean
import Mathlib open Filter Topology Bornology Set
/-- 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. -/ theorem putnam_1997_b2 (f g : ℝ β†’ ℝ) (hg : βˆ€ x : ℝ, g x β‰₯ 0) (hfderiv1 : ContDiff ℝ 1 f) (hfderiv2 : Differentiable ℝ (deriv f)) (hfg : βˆ€ x : ℝ, f x...
putnam_1997_b2_sol.lean
import Mathlib open Filter Topology -- True
/-- 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? -/ theorem putnam_2021_a6 : (βˆ€ P, (βˆ€ n : β„•, P.coeff n = 0 ∨ P.coeff n = 1) β†’ (βˆƒ ...
putnam_2021_a6_sol.lean
import Mathlib open Topology Filter Matrix Set
/-- 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$.} \] -/ 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 : β„•)}.card β‰₯ ...
putnam_2011_b6_sol.lean
import Mathlib open Polynomial -- Note: uses (β„• β†’ ℝ) instead of (Fin n β†’ ℝ) -- {n : β„• | 3 ∣ n ∧ n β‰₯ 9}
/-- 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 o...
putnam_2022_b4_sol.lean
import Mathlib open Polynomial -- Set.Icc 0 (1 / 4)
/-- For $0 \leq p \leq 1/2$, let $X_1,X_2,\dots$ be independent random variables such that $X_i=\begin{cases} 1 & \text{with probability $p$,} \\ -1 & \text{with probability $p$,} \\ 0 & \text{with probability $1-2p$,} \end{cases}$ for all $i \geq 1$. Given a positive integer $n$ and integers $b,a_1,\dots,a_n$, let $P(...
putnam_2022_b5_sol.lean
import Mathlib open Filter Topology
/-- Suppose that a sequence $a_1,a_2,a_3,\dots$ satisfies $0<a_n \leq a_{2n}+a_{2n+1}$ for all $n \geq 1$. Prove that the series $\sum_{n=1}^\infty a_n$ diverges. -/ theorem putnam_1994_a1 (a : β„• β†’ ℝ) (ha : βˆ€ n β‰₯ 1, 0 < a n ∧ a n ≀ a (2 * n) + a (2 * n + 1)) : Tendsto (fun N : β„• => βˆ‘ n : Set.Icc 1 N, a n) a...
putnam_1994_a1_sol.lean
import Mathlib open Topology Filter -- {n : β„€ | n β‰₯ 0 ∧ Β¬Int.ModEq 9 n 3 ∧ Β¬Int.ModEq 9 n 6}
/-- Determine all possible values of the expression \[ A^3+B^3+C^3-3ABC \] where $A, B$, and $C$ are nonnegative integers. -/ 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} = (({n : β„€ | n β‰₯ 0 ∧ Β¬Int.ModEq 9 n 3 ∧ Β¬Int.ModEq 9 n 6}) : Set β„€ ) := by
putnam_2019_a1_sol.lean
import Mathlib -- fun n : β„• => n * (n + 1) * 2^(n - 2)
/-- Evaluate in closed form \[ \sum_{k=1}^n {n \choose k} k^2. \] -/ theorem putnam_1962_a5 : βˆ€ n β‰₯ 2, ((fun n : β„• => n * (n + 1) * 2^(n - 2)) : β„• β†’ β„• ) n = βˆ‘ k ∈ Finset.Icc 1 n, Nat.choose n k * k^2 := by
putnam_1962_a5_sol.lean
import Mathlib
/-- Assume that $\lvert f(x) \rvert \le 1$ and $\lvert f''(x) \rvert \le 1$ for all $x$ on an interval of length at least 2. Show that $\lvert f'(x) \rvert \le 2$ on the interval. -/ theorem putnam_1962_a4 (f : ℝ β†’ ℝ) (a b : ℝ) (hdiff : Differentiable ℝ f ∧ (Differentiable ℝ (deriv f))) (hfabs : βˆ€ x ∈ Set.Icc a b, |f x...
putnam_1962_a4_sol.lean
import Mathlib open RingHom Set Nat Filter Topology -- 2 / 3
/-- Find $\prod_{n=2}^{\infty} \frac{(n^3 - 1)}{(n^3 + 1)}$. -/ theorem putnam_1977_b1 : Tendsto (fun N ↦ ∏ n ∈ Finset.Icc (2 : β„€) N, ((n : ℝ) ^ 3 - 1) / (n ^ 3 + 1)) atTop (𝓝 ((2 / 3) : ℝ )) := by
putnam_1977_b1_sol.lean
import Mathlib -- (fun a b : ℝ => (Real.exp (a ^ 2 * b ^ 2) - 1) / (a * b))
/-- Evaluate $\int_0^a \int_0^b e^{\max\{b^2x^2,a^2y^2\}}\,dy\,dx$ where $a$ and $b$ are positive. -/ 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)) = ((fun a b : ℝ => (Real.exp (a ^ 2 * b ^ 2) - 1) / (a * b)) : ℝ β†’ ℝ β†’ ℝ...
putnam_1989_a2_sol.lean
import Mathlib open Complex
/-- Prove that if \[ 11z^{10}+10iz^9+10iz-11=0, \] then $|z|=1.$ (Here $z$ is a complex number and $i^2=-1$.) -/ theorem putnam_1989_a3 (z : β„‚) (hz : 11 * z ^ 10 + 10 * I * z ^ 9 + 10 * I * z - 11 = 0) : (β€–zβ€– = 1) := by
putnam_1989_a3_sol.lean
import Mathlib open Set -- ({p : β„• | p.Prime ∧ p ≑ 1 [MOD 8]}, {p : β„• | p.Prime ∧ p ≑ 5 [MOD 8]})
/-- 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$. -/ theore...
putnam_1974_a3_sol.lean
import Mathlib open Filter Topology Set -- (Nat.fib 4040) - 1
/-- 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$. -/ theorem putnam_2020_a5 (a : ...
putnam_2020_a5_sol.lean
End of preview. Expand in Data Studio
README.md exists but content is empty.
Downloads last month
11