Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 10 additions & 2 deletions lean4/check_docstrings.lean
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,18 @@ def getSource (n : Name) : CoreM <| Option (Name × DeclarationRange) := do
let .some mod ← Lean.findModuleOf? n | return none
return some (mod, ranges.range)

def escapeDocstring (s : String) : String := Id.run do
-- Add a space after `<` to ensure it isn't treated as HTML by VSCode's syntax highlighting.
match s.splitOn "<" with
| [] => s
| x :: parts =>
return x ++ (String.join <| parts.map fun p =>
if (p.get? 0 |>.map Char.isAlpha).getD false then s!"< {p}" else s!"<{p}")

/-- Return true if the entry is ok -/
def checkEntry (entry : InformalJsonEntry) : CoreM EntryResult := do
let doc? := (← Lean.findDocString? (← getEnv) entry.problem_name).map String.trim
if doc? = some entry.informal_statement.trim then
if doc? = some (escapeDocstring entry.informal_statement.trim) then
return .docMatching
else if let .some doc := doc? then
let srcInfo ← getSource entry.problem_name
Expand All @@ -62,7 +70,7 @@ def checkEntry (entry : InformalJsonEntry) : CoreM EntryResult := do
\nPlease either change this docstring or modify the JSON file. Be careful to escape LaTeX when writing JSON.\
\nThe JSON file currently contains:\
\n\
\n{entry.informal_statement.trim}\
\n{escapeDocstring entry.informal_statement.trim}\
\n\
\nWhile the docstring contains:
\n\
Expand Down
32 changes: 16 additions & 16 deletions lean4/lake-manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,27 +5,27 @@
"type": "git",
"subDir": null,
"scope": "",
"rev": "5269898d6a51d047931107c8d72d934d8d5d3753",
"rev": "79e94a093aff4a60fb1b1f92d9681e407124c2ca",
"name": "mathlib",
"manifestFile": "lake-manifest.json",
"inputRev": "v4.17.0",
"inputRev": "v4.22.0",
"inherited": false,
"configFile": "lakefile.lean"},
{"url": "https://github.com/leanprover-community/plausible",
"type": "git",
"subDir": null,
"scope": "leanprover-community",
"rev": "c708be04267e3e995a14ac0d08b1530579c1525a",
"rev": "b100ad4c5d74a464f497aaa8e7c74d86bf39a56f",
"name": "plausible",
"manifestFile": "lake-manifest.json",
"inputRev": "main",
"inputRev": "v4.22.0",
"inherited": true,
"configFile": "lakefile.toml"},
{"url": "https://github.com/leanprover-community/LeanSearchClient",
"type": "git",
"subDir": null,
"scope": "leanprover-community",
"rev": "0c169a0d55fef3763cfb3099eafd7b884ec7e41d",
"rev": "99657ad92e23804e279f77ea6dbdeebaa1317b98",
"name": "LeanSearchClient",
"manifestFile": "lake-manifest.json",
"inputRev": "main",
Expand All @@ -35,57 +35,57 @@
"type": "git",
"subDir": null,
"scope": "leanprover-community",
"rev": "0447b0a7b7f41f0a1749010db3f222e4a96f9d30",
"rev": "eb164a46de87078f27640ee71e6c3841defc2484",
"name": "importGraph",
"manifestFile": "lake-manifest.json",
"inputRev": "main",
"inputRev": "v4.22.0",
"inherited": true,
"configFile": "lakefile.toml"},
{"url": "https://github.com/leanprover-community/ProofWidgets4",
"type": "git",
"subDir": null,
"scope": "leanprover-community",
"rev": "799f6986de9f61b784ff7be8f6a8b101045b8ffd",
"rev": "1253a071e6939b0faf5c09d2b30b0bfc79dae407",
"name": "proofwidgets",
"manifestFile": "lake-manifest.json",
"inputRev": "v0.0.52",
"inputRev": "v0.0.68",
"inherited": true,
"configFile": "lakefile.lean"},
{"url": "https://github.com/leanprover-community/aesop",
"type": "git",
"subDir": null,
"scope": "leanprover-community",
"rev": "56a2c80b209c253e0281ac4562a92122b457dcc0",
"rev": "1256a18522728c2eeed6109b02dd2b8f207a2a3c",
"name": "aesop",
"manifestFile": "lake-manifest.json",
"inputRev": "master",
"inputRev": "v4.22.0",
"inherited": true,
"configFile": "lakefile.toml"},
{"url": "https://github.com/leanprover-community/quote4",
"type": "git",
"subDir": null,
"scope": "leanprover-community",
"rev": "95561f7a5811fae6a309e4a1bbe22a0a4a98bf03",
"rev": "917bfa5064b812b7fbd7112d018ea0b4def25ab3",
"name": "Qq",
"manifestFile": "lake-manifest.json",
"inputRev": "master",
"inputRev": "v4.22.0",
"inherited": true,
"configFile": "lakefile.toml"},
{"url": "https://github.com/leanprover-community/batteries",
"type": "git",
"subDir": null,
"scope": "leanprover-community",
"rev": "efcc7d9bd9936ecdc625baf0d033b60866565cd5",
"rev": "240676e9568c254a69be94801889d4b13f3b249f",
"name": "batteries",
"manifestFile": "lake-manifest.json",
"inputRev": "main",
"inputRev": "v4.22.0",
"inherited": true,
"configFile": "lakefile.toml"},
{"url": "https://github.com/leanprover/lean4-cli",
"type": "git",
"subDir": null,
"scope": "leanprover",
"rev": "e7fd1a415c80985ade02a021172834ca2139b0ca",
"rev": "c682c91d2d4dd59a7187e2ab977ac25bd1f87329",
"name": "Cli",
"manifestFile": "lake-manifest.json",
"inputRev": "main",
Expand Down
2 changes: 1 addition & 1 deletion lean4/lakefile.lean
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ package «putnam» where
leanOptions := #[
⟨`autoImplicit, false⟩
]
require mathlib from git "https://github.com/leanprover-community/mathlib4" @ "v4.17.0"
require mathlib from git "https://github.com/leanprover-community/mathlib4" @ "v4.22.0"

@[default_target]
lean_lib «putnam» where
Expand Down
2 changes: 1 addition & 1 deletion lean4/lean-toolchain
Original file line number Diff line number Diff line change
@@ -1 +1 @@
leanprover/lean4:v4.17.0
leanprover/lean4:v4.22.0
2 changes: 1 addition & 1 deletion lean4/src/putnam_1967_a3.lean
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ open Polynomial
abbrev putnam_1967_a3_solution : ℕ := sorry
-- 5
/--
Consider polynomial forms $ax^2-bx+c$ with integer coefficients which have two distinct zeros in the open interval $0<x<1$. Exhibit with a proof the least positive integer value of $a$ for which such a polynomial exists.
Consider polynomial forms $ax^2-bx+c$ with integer coefficients which have two distinct zeros in the open interval $0< x<1$. Exhibit with a proof the least positive integer value of $a$ for which such a polynomial exists.
-/
theorem putnam_1967_a3 :
IsLeast
Expand Down
2 changes: 1 addition & 1 deletion lean4/src/putnam_1969_b4.lean
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ theorem putnam_1969_b4
--Note: the problem doesn't say what regularity conditions we should impose on `Γ` - hopefully continuity is enough.
(Γ_cts : ContinuousOn Γ (Set.Icc 0 1))
(hΓ : eVariationOn Γ (Set.Icc 0 1) = 1) :
letI : Module.Oriented ℝ (EuclideanSpace ℝ (Fin 2)) (Fin 2) := ⟨Basis.orientation <| Pi.basisFun _ _⟩
letI : Module.Oriented ℝ (EuclideanSpace ℝ (Fin 2)) (Fin 2) := ⟨Module.Basis.orientation <| Pi.basisFun _ _⟩
letI : Fact (Module.finrank ℝ (EuclideanSpace ℝ (Fin 2)) = 2) := ⟨finrank_euclideanSpace_fin⟩
∃ (a b c d : EuclideanSpace ℝ (Fin 2)), Γ '' (Set.Icc 0 1) ⊆
convexHull ℝ {a, b, c, d} ∧ dist a b * dist b c = 1/4 ∧
Expand Down
2 changes: 1 addition & 1 deletion lean4/src/putnam_1984_b2.lean
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ open Topology Filter Nat
abbrev putnam_1984_b2_solution : ℝ := sorry
-- 8
/--
Find the minimum value of $(u-v)^2+(\sqrt{2-u^2}-\frac{9}{v})^2$ for $0<u<\sqrt{2}$ and $v>0$.
Find the minimum value of $(u-v)^2+(\sqrt{2-u^2}-\frac{9}{v})^2$ for $0< u<\sqrt{2}$ and $v>0$.
-/
theorem putnam_1984_b2
(f : ℝ → ℝ → ℝ)
Expand Down
2 changes: 1 addition & 1 deletion lean4/src/putnam_1989_b6.lean
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ open Nat Filter Topology Set ProbabilityTheory

-- Note: uses (ℝ → ℝ) instead of (Set.Icc 0 1 → ℝ)
/--
Let $(x_1,x_2,\dots,x_n)$ be a point chosen at random from the $n$-dimensional region defined by $0<x_1<x_2<\dots<x_n<1$. Let $f$ be a continuous function on $[0,1]$ with $f(1)=0$. Set $x_0=0$ and $x_{n+1}=1$. Show that the expected value of the Riemann sum $\sum_{i=0}^n (x_{i+1}-x_i)f(x_{i+1})$ is $\int_0^1 f(t)P(t)\,dt$, where $P$ is a polynomial of degree $n$, independent of $f$, with $0 \leq P(t) \leq 1$ for $0 \leq t \leq 1$.
Let $(x_1,x_2,\dots,x_n)$ be a point chosen at random from the $n$-dimensional region defined by $0< x_1< x_2<\dots< x_n<1$. Let $f$ be a continuous function on $[0,1]$ with $f(1)=0$. Set $x_0=0$ and $x_{n+1}=1$. Show that the expected value of the Riemann sum $\sum_{i=0}^n (x_{i+1}-x_i)f(x_{i+1})$ is $\int_0^1 f(t)P(t)\,dt$, where $P$ is a polynomial of degree $n$, independent of $f$, with $0 \leq P(t) \leq 1$ for $0 \leq t \leq 1$.
-/
theorem putnam_1989_b6
(n : ℕ) [NeZero n]
Expand Down
2 changes: 1 addition & 1 deletion lean4/src/putnam_1991_a3.lean
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ open Filter Topology
abbrev putnam_1991_a3_solution : Set (Polynomial ℝ) := sorry
-- {p : Polynomial ℝ | p.degree = 2 ∧ (∃ r1 r2 : ℝ, r1 ≠ r2 ∧ p.eval r1 = 0 ∧ p.eval r2 = 0)}
/--
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
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$,
Expand Down
2 changes: 1 addition & 1 deletion lean4/src/putnam_1991_b6.lean
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ open Filter Topology
noncomputable abbrev putnam_1991_b6_solution : ℝ → ℝ → ℝ := sorry
-- (fun a b : ℝ => |Real.log (a / b)|)
/--
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$.)
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$.)
-/
theorem putnam_1991_b6
(a b : ℝ)
Expand Down
2 changes: 1 addition & 1 deletion lean4/src/putnam_1993_b1.lean
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import Mathlib
abbrev putnam_1993_b1_solution : ℕ := sorry
-- 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}$.
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
Expand Down
2 changes: 1 addition & 1 deletion lean4/src/putnam_1994_a1.lean
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ 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.
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 : ℕ → ℝ)
Expand Down
2 changes: 1 addition & 1 deletion lean4/src/putnam_1994_a5.lean
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import Mathlib
open Filter Topology

/--
Let $(r_n)_{n \geq 0}$ be a sequence of positive real numbers such that $\lim_{n \to \infty} r_n=0$. Let $S$ be the set of numbers representable as a sum $r_{i_1}+r_{i_2}+\cdots+r_{i_{1994}}$, with $i_1<i_2<\cdots<i_{1994}$. Show that every nonempty interval $(a,b)$ contains a nonempty subinterval $(c,d)$ that does not intersect $S$.
Let $(r_n)_{n \geq 0}$ be a sequence of positive real numbers such that $\lim_{n \to \infty} r_n=0$. Let $S$ be the set of numbers representable as a sum $r_{i_1}+r_{i_2}+\cdots+r_{i_{1994}}$, with $i_1< i_2<\cdots< i_{1994}$. Show that every nonempty interval $(a,b)$ contains a nonempty subinterval $(c,d)$ that does not intersect $S$.
-/
theorem putnam_1994_a5
(r : ℕ → ℝ)
Expand Down
2 changes: 1 addition & 1 deletion lean4/src/putnam_1998_b2.lean
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ open Set Function Metric
noncomputable abbrev putnam_1998_b2_solution : ℝ → ℝ → ℝ := sorry
-- fun a b => if a > b then Real.sqrt (2*a^2 + 2*b^2) else 0
/--
Given a point $(a,b)$ with $0<b<a$, determine the minimum perimeter of a triangle with one vertex at $(a,b)$, one on the $x$-axis, and one on the line $y=x$. You may assume that a triangle of minimum perimeter exists.
Given a point $(a,b)$ with $0< b< a$, determine the minimum perimeter of a triangle with one vertex at $(a,b)$, one on the $x$-axis, and one on the line $y=x$. You may assume that a triangle of minimum perimeter exists.
-/
theorem putnam_1998_b2
(a b : ℝ)
Expand Down
2 changes: 1 addition & 1 deletion lean4/src/putnam_2004_b6.lean
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import Mathlib
open Nat Topology Filter

/--
Let $\mathcal{A}$ be a non-empty set of positive integers, and let $N(x)$ denote the number of elements of $\mathcal{A}$ not exceeding $x$. Let $\mathcal{B}$ denote the set of positive integers $b$ that can be written in the form $b=a-a'$ with $a \in \mathcal{A}$ and $a' \in \mathcal{A}$. Let $b_1<b_2<\cdots$ be the members of $\mathcal{B}$, listed in increasing order. Show that if the sequence $b_{i+1}-b_i$ is unbounded, then $\lim_{x \to\infty} N(x)/x=0$.
Let $\mathcal{A}$ be a non-empty set of positive integers, and let $N(x)$ denote the number of elements of $\mathcal{A}$ not exceeding $x$. Let $\mathcal{B}$ denote the set of positive integers $b$ that can be written in the form $b=a-a'$ with $a \in \mathcal{A}$ and $a' \in \mathcal{A}$. Let $b_1< b_2<\cdots$ be the members of $\mathcal{B}$, listed in increasing order. Show that if the sequence $b_{i+1}-b_i$ is unbounded, then $\lim_{x \to\infty} N(x)/x=0$.
-/
theorem putnam_2004_b6
(A B : Set ℕ)
Expand Down
2 changes: 1 addition & 1 deletion lean4/src/putnam_2006_a4.lean
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ noncomputable abbrev putnam_2006_a4_solution : ℕ → ℝ := sorry
Let $S=\{1,2,\dots,n\}$ for some integer $n>1$. Say a permutation $\pi$ of $S$ has a \emph{local maximum} at $k \in S$ if
\begin{enumerate}
\item[(i)] $\pi(k)>\pi(k+1)$ for $k=1$;
\item[(ii)] $\pi(k-1)<\pi(k)$ and $\pi(k)>\pi(k+1)$ for $1<k<n$;
\item[(ii)] $\pi(k-1)<\pi(k)$ and $\pi(k)>\pi(k+1)$ for $1< k< n$;
\item[(iii)] $\pi(k-1)<\pi(k)$ for $k=n$.
\end{enumerate}
(For example, if $n=5$ and $\pi$ takes values at $1,2,3,4,5$ of $2,1,4,5,3$, then $\pi$ has a local maximum of 2 at $k=1$, and a local maximum of 5 at $k=4$.) What is the average number of local maxima of a permutation of $S$, averaging over all permutations of $S$?
Expand Down
2 changes: 1 addition & 1 deletion lean4/src/putnam_2013_a5.lean
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ open Function Set MeasureTheory

-- Note: uses (Fin m → Fin m → Fin m → ℝ) instead of ensuring inputs are strictly increasing
/--
For $m \geq 3$, a list of $\binom{m}{3}$ real numbers $a_{ijk}$ ($1 \leq i<j<k \leq m$) is said to be \emph{area definite} for $\mathbb{R}^n$ if the inequality $\sum_{1 \leq i<j<k \leq m} a_{ijk} \cdot \text{Area}(\Delta A_iA_jA_k) \geq 0$ holds for every choice of $m$ points $A_1,\dots,A_m$ in $\mathbb{R}^n$. For example, the list of four numbers $a_{123}=a_{124}=a_{134}=1$, $a_{234}=-1$ is area definite for $\mathbb{R}^2$. Prove that if a list of $\binom{m}{3}$ numbers is area definite for $\mathbb{R}^2$, then it is area definite for $\mathbb{R}^3$.
For $m \geq 3$, a list of $\binom{m}{3}$ real numbers $a_{ijk}$ ($1 \leq i< j< k \leq m$) is said to be \emph{area definite} for $\mathbb{R}^n$ if the inequality $\sum_{1 \leq i< j< k \leq m} a_{ijk} \cdot \text{Area}(\Delta A_iA_jA_k) \geq 0$ holds for every choice of $m$ points $A_1,\dots,A_m$ in $\mathbb{R}^n$. For example, the list of four numbers $a_{123}=a_{124}=a_{134}=1$, $a_{234}=-1$ is area definite for $\mathbb{R}^2$. Prove that if a list of $\binom{m}{3}$ numbers is area definite for $\mathbb{R}^2$, then it is area definite for $\mathbb{R}^3$.
-/
theorem putnam_2013_a5
(m : ℕ)
Expand Down
2 changes: 1 addition & 1 deletion lean4/src/putnam_2015_a5.lean
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import Mathlib

/--
Let $q$ be an odd positive integer, and let $N_q$ denote the number of integers $a$ such that $0<a<q/4$ and $\gcd(a,q)=1$. Show that $N_q$ is odd if and only if $q$ is of the form $p^k$ with $k$ a positive integer and $p$ a prime congruent to $5$ or $7$ modulo $8$.
Let $q$ be an odd positive integer, and let $N_q$ denote the number of integers $a$ such that $0< a< q/4$ and $\gcd(a,q)=1$. Show that $N_q$ is odd if and only if $q$ is of the form $p^k$ with $k$ a positive integer and $p$ a prime congruent to $5$ or $7$ modulo $8$.
-/
theorem putnam_2015_a5
(q : ℕ)
Expand Down
2 changes: 1 addition & 1 deletion lean4/src/putnam_2017_a3.lean
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ open Topology Filter

-- Note: uses (ℝ → ℝ) instead of (Set.Icc a b → Set.Ioi (0 : ℝ))
/--
Let $a$ and $b$ be real numbers with $a<b$, and let $f$ and $g$ be continuous functions from $[a,b]$ to $(0,\infty)$ such that $\int_a^b f(x)\,dx=\int_a^b g(x)\,dx$ but $f \neq g$. For every positive integer $n$, define $I_n=\int_a^b \frac{(f(x))^{n+1}}{(g(x))^n}\,dx$. Show that $I_1,I_2,I_3,\dots$ is an increasing sequence with $\lim_{n \to \infty} I_n=\infty$.
Let $a$ and $b$ be real numbers with $a< b$, and let $f$ and $g$ be continuous functions from $[a,b]$ to $(0,\infty)$ such that $\int_a^b f(x)\,dx=\int_a^b g(x)\,dx$ but $f \neq g$. For every positive integer $n$, define $I_n=\int_a^b \frac{(f(x))^{n+1}}{(g(x))^n}\,dx$. Show that $I_1,I_2,I_3,\dots$ is an increasing sequence with $\lim_{n \to \infty} I_n=\infty$.
-/
theorem putnam_2017_a3
(a b : ℝ)
Expand Down
2 changes: 1 addition & 1 deletion lean4/src/putnam_2022_a4.lean
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ theorem putnam_2022_a4
(X : ℕ → Ω → ℝ)
(hX : ∀ i, Measurable (X i))
(hX' : ∀ i, MeasureTheory.pdf.IsUniform (X i) (Set.Icc 0 1) ℙ)
(hX'' : iIndepFun (fun i => inferInstance) X)
(hX'' : iIndepFun X)
(k : Ω → Set ℕ)
/-
If there is an `l` such that `X_l < X_{l+1}` then this is `Set.Iic l` for the smallest such `l`
Expand Down
2 changes: 1 addition & 1 deletion lean4/src/putnam_2022_a6.lean
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ open Set
abbrev putnam_2022_a6_solution : ℕ → ℕ := sorry
-- (fun n : ℕ => n)
/--
Let $n$ be a positive integer. Determine, in terms of $n$, the largest integer $m$ with the following property: There exist real numbers $x_1,\dots,x_{2n}$ with $-1<x_1<x_2<\cdots<x_{2n}<1$ such that the sum of the lengths of the $n$ intervals $[x_1^{2k-1},x_2^{2k-1}],[x_3^{2k-1},x_4^{2k-1}],\dots,[x_{2n-1}^{2k-1},x_{2n}^{2k-1}]$ is equal to $1$ for all integers $k$ with $1 \leq k \leq m$.
Let $n$ be a positive integer. Determine, in terms of $n$, the largest integer $m$ with the following property: There exist real numbers $x_1,\dots,x_{2n}$ with $-1< x_1< x_2<\cdots< x_{2n}<1$ such that the sum of the lengths of the $n$ intervals $[x_1^{2k-1},x_2^{2k-1}],[x_3^{2k-1},x_4^{2k-1}],\dots,[x_{2n-1}^{2k-1},x_{2n}^{2k-1}]$ is equal to $1$ for all integers $k$ with $1 \leq k \leq m$.
-/
theorem putnam_2022_a6
(n : ℕ) (hn : 0 < n) :
Expand Down
2 changes: 1 addition & 1 deletion lean4/src/putnam_2023_b4.lean
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ For a nonnegative integer $n$ and a strictly increasing sequence of real numbers
\item[(a)] $f(t)$ is continuous for $t \geq t_0$, and is twice differentiable for all $t>t_0$ other than $t_1,\dots,t_n$;
\item[(b)] $f(t_0)=1/2$;
\item[(c)] $\lim_{t \to t_k^+} f'(t)=0$ for $0 \leq k \leq n$;
\item[(d)] For $0 \leq k \leq n-1$, we have $f''(t)=k+1$ when $t_k<t<t_{k+1}$, and $f''(t)=n+1$ when $t>t_n$.
\item[(d)] For $0 \leq k \leq n-1$, we have $f''(t)=k+1$ when $t_k< t< t_{k+1}$, and $f''(t)=n+1$ when $t>t_n$.
\end{enumerate}
Considering all choices of $n$ and $t_0,t_1,\dots,t_n$ such that $t_k \geq t_{k-1}+1$ for $1 \leq k \leq n$, what is the least possible value of $T$ for which $f(t_0+T)=2023$?
-/
Expand Down
2 changes: 1 addition & 1 deletion lean4/src/putnam_2024_b4.lean
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,6 @@ theorem putnam_2024_b4
a n k ω
else
a n k ω - 1)
(h₃ : ProbabilityTheory.iIndepFun inferInstance m.uncurry ℙ) :
(h₃ : ProbabilityTheory.iIndepFun m.uncurry ℙ) :
Filter.Tendsto (fun n => (∫ ω, a n n ω : ℝ) / n) Filter.atTop (𝓝 putnam_2024_b4_solution) :=
sorry