Datasets:

Modalities:
Text
Formats:
json
Size:
< 1K
Libraries:
Datasets
pandas
License:
Dataset Viewer
Auto-converted to Parquet
name
stringlengths
9
20
solved
bool
2 classes
tags
listlengths
0
2
problem_id
stringlengths
7
20
header
stringclasses
1 value
informal_prefix
stringlengths
89
1.15k
formal_statement
stringlengths
58
2.76k
split
stringclasses
1 value
lean4_code
stringlengths
268
3.5k
category
stringclasses
4 values
Usa2005P2
true
[ "number theory" ]
Usa2005P2
import Mathlib import Aesop set_option maxHeartbeats 0 open BigOperators Real Nat Topology Rat
/-! # USA Mathematical Olympiad 2005, Problem 2 Prove that there do not exist integers x,y,z such that x⁢ + x³ + x³y + y = 147¹⁡⁷ x³ + x³y + y² + y + z⁹ = 157¹⁴⁷. -/
theorem usa2005_p2 : Β¬βˆƒ (x y z : β„€), x^6 + x^3 + x^3 * y + y = 147^157 ∧ x^3 + x^3 * y + y^2 + y + z^9 = 157^147 := by sorry
test
import Mathlib import Aesop set_option maxHeartbeats 0 open BigOperators Real Nat Topology Rat /-! # USA Mathematical Olympiad 2005, Problem 2 Prove that there do not exist integers x,y,z such that x⁢ + xΒ³ + xΒ³y + y = 147¹⁡⁷ xΒ³ + xΒ³y + yΒ² + y + z⁹ = 157¹⁴⁷. -/ theorem usa2005_p2 : Β¬βˆƒ (x y z : β„€), x^6 + x^3 + x^3 * y + y = 147^157 ∧ x^3 + x^3 * y + y^2 + y + z^9 = 157^147 := by sorry
number theory
Imo2006P3
true
[ "algebra" ]
Imo2006P3
import Mathlib import Aesop set_option maxHeartbeats 0 open BigOperators Real Nat Topology Rat
/-! # International Mathematical Olympiad 2006, Problem 3 Determine the least real number $M$ such that $$ \left| ab(a^2 - b^2) + bc(b^2 - c^2) + ca(c^2 - a^2) \right| ≀ M (a^2 + b^2 + c^2)^2 $$ for all real numbers $a$, $b$, $c$. -/
noncomputable abbrev solution : ℝ := 9 * Real.sqrt 2 / 32 theorem imo2006_p3 : IsLeast { M | (βˆ€ a b c : ℝ, |a * b * (a ^ 2 - b ^ 2) + b * c * (b ^ 2 - c ^ 2) + c * a * (c ^ 2 - a ^ 2)| ≀ M * (a ^ 2 + b ^ 2 + c ^ 2) ^ 2) } solution := by sorry
test
import Mathlib import Aesop set_option maxHeartbeats 0 open BigOperators Real Nat Topology Rat /-! # International Mathematical Olympiad 2006, Problem 3 Determine the least real number $M$ such that $$ \left| ab(a^2 - b^2) + bc(b^2 - c^2) + ca(c^2 - a^2) \right| ≀ M (a^2 + b^2 + c^2)^2 $$ for all real numbers $a$, $b$, $c$. -/ noncomputable abbrev solution : ℝ := 9 * Real.sqrt 2 / 32 theorem imo2006_p3 : IsLeast { M | (βˆ€ a b c : ℝ, |a * b * (a ^ 2 - b ^ 2) + b * c * (b ^ 2 - c ^ 2) + c * a * (c ^ 2 - a ^ 2)| ≀ M * (a ^ 2 + b ^ 2 + c ^ 2) ^ 2) } solution := by sorry
algebra
Imo2020P2
true
[ "algebra", "inequality" ]
Imo2020P2
import Mathlib import Aesop set_option maxHeartbeats 0 open BigOperators Real Nat Topology Rat
/-! # International Mathematical Olympiad 2020, Problem 2 The real numbers `a`, `b`, `c`, `d` are such that `a β‰₯ b β‰₯ c β‰₯ d > 0` and `a + b + c + d = 1`. Prove that `(a + 2b + 3c + 4d) a^a b^b c^c d^d < 1`. -/
theorem imo2020_q2 (a b c d : ℝ) (hd0 : 0 < d) (hdc : d ≀ c) (hcb : c ≀ b) (hba : b ≀ a) (h1 : a + b + c + d = 1) : (a + 2 * b + 3 * c + 4 * d) * a ^ a * b ^ b * c ^ c * d ^ d < 1 := by sorry
test
import Mathlib import Aesop set_option maxHeartbeats 0 open BigOperators Real Nat Topology Rat /-! # International Mathematical Olympiad 2020, Problem 2 The real numbers `a`, `b`, `c`, `d` are such that `a β‰₯ b β‰₯ c β‰₯ d > 0` and `a + b + c + d = 1`. Prove that `(a + 2b + 3c + 4d) a^a b^b c^c d^d < 1`. -/ theorem imo2020_q2 (a b c d : ℝ) (hd0 : 0 < d) (hdc : d ≀ c) (hcb : c ≀ b) (hba : b ≀ a) (h1 : a + b + c + d = 1) : (a + 2 * b + 3 * c + 4 * d) * a ^ a * b ^ b * c ^ c * d ^ d < 1 := by sorry
algebra
Usa1979P1
true
[ "algebra", "inequality" ]
Usa1979P1
import Mathlib import Aesop set_option maxHeartbeats 0 open BigOperators Real Nat Topology Rat
/-! # USA Mathematical Olympiad 1979, Problem 1 Determine all non-negative integral solutions $(n_1,n_2,\dots , n_{14})$ if any, apart from permutations, of the Diophantine Equation $n_1^4+n_2^4+\cdots +n_{14}^4=1599$. -/
/-- A type representing assignments to the variables $n_1$, $n_2$, ..., $n_{14}$, quotiented by permutations of indices. -/ structure MultisetNatOfLen14 where s : Multiset β„• p : Multiset.card s = 14 abbrev SolutionSet : Set MultisetNatOfLen14 := βˆ… theorem usa1979_p1 : βˆ€ e, e ∈ SolutionSet ↔ (e.s.map (fun x ↦ x ^ 4)).sum = 1599 := by sorry
test
import Mathlib import Aesop set_option maxHeartbeats 0 open BigOperators Real Nat Topology Rat /-! # USA Mathematical Olympiad 1979, Problem 1 Determine all non-negative integral solutions $(n_1,n_2,\dots , n_{14})$ if any, apart from permutations, of the Diophantine Equation $n_1^4+n_2^4+\cdots +n_{14}^4=1599$. -/ /-- A type representing assignments to the variables $n_1$, $n_2$, ..., $n_{14}$, quotiented by permutations of indices. -/ structure MultisetNatOfLen14 where s : Multiset β„• p : Multiset.card s = 14 abbrev SolutionSet : Set MultisetNatOfLen14 := βˆ… theorem usa1979_p1 : βˆ€ e, e ∈ SolutionSet ↔ (e.s.map (fun x ↦ x ^ 4)).sum = 1599 := by sorry
algebra
Imo2018P3
false
[ "combinatorics" ]
Imo2018P3
import Mathlib import Aesop set_option maxHeartbeats 0 open BigOperators Real Nat Topology Rat
/-! # International Mathematical Olympiad 2018, Problem 3 An anti-Pascal triangle is an equilateral triangular array of numbers such that, except for the numbers in the bottom row, each number is the absolute value of the difference of the two numbers immediately below it. For example, the following array is an anti-Pascal triangle with four rows which contains every integer from 1 to 10: 4 2 6 5 7 1 8 3 10 9 Does there exist an anti-Pascal triangle with 2018 rows which contains every integer from 1 to 1 + 2 + ... + 2018? -/
structure Coords where (row : β„•) (col : β„•) def left_child (c : Coords) : Coords := ⟨c.row.succ, c.col⟩ def right_child (c : Coords) : Coords := ⟨c.row.succ, c.col.succ⟩ /-- antipascal triangle with n rows -/ structure antipascal_triangle (n : β„•) where (f : Coords β†’ β„•) (antipascal : βˆ€ x : Coords, x.row + 1 < n ∧ x.col ≀ x.row β†’ f x + f (left_child x) = f (right_child x) ∨ f x + f (right_child x) = f (left_child x)) def exists_desired_triangle : Prop := βˆƒ t : antipascal_triangle 2018, βˆ€ n, 1 ≀ n β†’ n ≀ βˆ‘ i ∈ Finset.range 2018, (i + 1) β†’ βˆƒ r, r ≀ 2018 ∧ βˆƒ c, c < r ∧ t.f ⟨r,c⟩ = n abbrev does_exist : Bool := false theorem imo2018_p3 : if does_exist then exists_desired_triangle else Β¬ exists_desired_triangle := by sorry
test
import Mathlib import Aesop set_option maxHeartbeats 0 open BigOperators Real Nat Topology Rat /-! # International Mathematical Olympiad 2018, Problem 3 An anti-Pascal triangle is an equilateral triangular array of numbers such that, except for the numbers in the bottom row, each number is the absolute value of the difference of the two numbers immediately below it. For example, the following array is an anti-Pascal triangle with four rows which contains every integer from 1 to 10: 4 2 6 5 7 1 8 3 10 9 Does there exist an anti-Pascal triangle with 2018 rows which contains every integer from 1 to 1 + 2 + ... + 2018? -/ structure Coords where (row : β„•) (col : β„•) def left_child (c : Coords) : Coords := ⟨c.row.succ, c.col⟩ def right_child (c : Coords) : Coords := ⟨c.row.succ, c.col.succ⟩ /-- antipascal triangle with n rows -/ structure antipascal_triangle (n : β„•) where (f : Coords β†’ β„•) (antipascal : βˆ€ x : Coords, x.row + 1 < n ∧ x.col ≀ x.row β†’ f x + f (left_child x) = f (right_child x) ∨ f x + f (right_child x) = f (left_child x)) def exists_desired_triangle : Prop := βˆƒ t : antipascal_triangle 2018, βˆ€ n, 1 ≀ n β†’ n ≀ βˆ‘ i ∈ Finset.range 2018, (i + 1) β†’ βˆƒ r, r ≀ 2018 ∧ βˆƒ c, c < r ∧ t.f ⟨r,c⟩ = n abbrev does_exist : Bool := false theorem imo2018_p3 : if does_exist then exists_desired_triangle else Β¬ exists_desired_triangle := by sorry
combinatorics
Imo2024P5
true
[ "combinatorics" ]
Imo2024P5
import Mathlib import Aesop set_option maxHeartbeats 0 open BigOperators Real Nat Topology Rat
/-! # International Mathematical Olympiad 2024, Problem 5 Turbo the snail plays a game on a board with $2024$ rows and $2023$ columns. There are hidden monsters in $2022$ of the cells. Initially, Turbo does not know where any of the monsters are, but he knows that there is exactly one monster in each row except the first row and the last row, and that each column contains at most one monster. Turbo makes a series of attempts to go from the first row to the last row. On each attempt, he chooses to start on any cell in the first row, then repeatedly moves to an adjacent cell sharing a common side. (He is allowed to return to a previously visited cell.) If he reaches a cell with a monster, his attempt ends and he is transported back to the first row to start a new attempt. The monsters do not move, and Turbo remembers whether or not each cell he has visited contains a monster. If he reaches any cell in the last row, his attempt ends and the game is over. Determine the minimum value of $n$ for which Turbo has a strategy that guarantees reaching the last row on the $n$th attempt or earlier, regardless of the locations of the monsters. -/
/-! ### Definitions for setting up the problem -/ -- There are N monsters, N+1 columns and N+2 rows. variable {N : β„•} /-- A cell on the board for the game. -/ abbrev Cell (N : β„•) : Type := Fin (N + 2) Γ— Fin (N + 1) /-- A row that is neither the first nor the last (and thus contains a monster). -/ abbrev InteriorRow (N : β„•) : Type := (Set.Icc 1 ⟨N, by omega⟩ : Set (Fin (N + 2))) /-- Data for valid positions of the monsters. -/ abbrev MonsterData (N : β„•) : Type := InteriorRow N β†ͺ Fin (N + 1) /-- The cells with monsters as a Set, given an injection from rows to columns. -/ def MonsterData.monsterCells (m : MonsterData N) : Set (Cell N) := Set.range (fun x : InteriorRow N ↦ ((x : Fin (N + 2)), m x)) /-- Whether two cells are adjacent. -/ def Adjacent (x y : Cell N) : Prop := Nat.dist x.1 y.1 + Nat.dist x.2 y.2 = 1 /-- A valid path from the first to the last row. -/ structure _Path (N : β„•) where /-- The cells on the path. -/ cells : List (Cell N) nonempty : cells β‰  [] head_first_row : (cells.head nonempty).1 = 0 last_last_row : (cells.getLast nonempty).1 = Fin.last (N + 1) valid_move_seq : cells.Chain' Adjacent /-- The first monster on a path, or `none`. -/ noncomputable def _Path.firstMonster (p : _Path N) (m : MonsterData N) : Option (Cell N) := letI := Classical.propDecidable p.cells.find? (fun x ↦ (x ∈ m.monsterCells : Bool)) /-- A strategy, given the results of initial attempts, returns a path for the next attempt. -/ abbrev Strategy (N : β„•) : Type := ⦃k : ℕ⦄ β†’ (Fin k β†’ Option (Cell N)) β†’ _Path N /-- Playing a strategy, k attempts. -/ noncomputable def Strategy.play (s : Strategy N) (m : MonsterData N) : (k : β„•) β†’ Fin k β†’ Option (Cell N) | 0 => Fin.elim0 | k + 1 => Fin.snoc (s.play m k) ((s (s.play m k)).firstMonster m) /-- The predicate for a strategy winning within the given number of attempts. -/ def Strategy.WinsIn (s : Strategy N) (m : MonsterData N) (k : β„•) : Prop := none ∈ Set.range (s.play m k) /-- Whether a strategy forces a win within the given number of attempts. -/ def Strategy.ForcesWinIn (s : Strategy N) (k : β„•) : Prop := βˆ€ m, s.WinsIn m k abbrev answer : β„• := 3 theorem imo2024_p5 : IsLeast {k | βˆƒ s : Strategy 2022, s.ForcesWinIn k} answer := by sorry
test
import Mathlib import Aesop set_option maxHeartbeats 0 open BigOperators Real Nat Topology Rat /-! # International Mathematical Olympiad 2024, Problem 5 Turbo the snail plays a game on a board with $2024$ rows and $2023$ columns. There are hidden monsters in $2022$ of the cells. Initially, Turbo does not know where any of the monsters are, but he knows that there is exactly one monster in each row except the first row and the last row, and that each column contains at most one monster. Turbo makes a series of attempts to go from the first row to the last row. On each attempt, he chooses to start on any cell in the first row, then repeatedly moves to an adjacent cell sharing a common side. (He is allowed to return to a previously visited cell.) If he reaches a cell with a monster, his attempt ends and he is transported back to the first row to start a new attempt. The monsters do not move, and Turbo remembers whether or not each cell he has visited contains a monster. If he reaches any cell in the last row, his attempt ends and the game is over. Determine the minimum value of $n$ for which Turbo has a strategy that guarantees reaching the last row on the $n$th attempt or earlier, regardless of the locations of the monsters. -/ /-! ### Definitions for setting up the problem -/ -- There are N monsters, N+1 columns and N+2 rows. variable {N : β„•} /-- A cell on the board for the game. -/ abbrev Cell (N : β„•) : Type := Fin (N + 2) Γ— Fin (N + 1) /-- A row that is neither the first nor the last (and thus contains a monster). -/ abbrev InteriorRow (N : β„•) : Type := (Set.Icc 1 ⟨N, by omega⟩ : Set (Fin (N + 2))) /-- Data for valid positions of the monsters. -/ abbrev MonsterData (N : β„•) : Type := InteriorRow N β†ͺ Fin (N + 1) /-- The cells with monsters as a Set, given an injection from rows to columns. -/ def MonsterData.monsterCells (m : MonsterData N) : Set (Cell N) := Set.range (fun x : InteriorRow N ↦ ((x : Fin (N + 2)), m x)) /-- Whether two cells are adjacent. -/ def Adjacent (x y : Cell N) : Prop := Nat.dist x.1 y.1 + Nat.dist x.2 y.2 = 1 /-- A valid path from the first to the last row. -/ structure _Path (N : β„•) where /-- The cells on the path. -/ cells : List (Cell N) nonempty : cells β‰  [] head_first_row : (cells.head nonempty).1 = 0 last_last_row : (cells.getLast nonempty).1 = Fin.last (N + 1) valid_move_seq : cells.Chain' Adjacent /-- The first monster on a path, or `none`. -/ noncomputable def _Path.firstMonster (p : _Path N) (m : MonsterData N) : Option (Cell N) := letI := Classical.propDecidable p.cells.find? (fun x ↦ (x ∈ m.monsterCells : Bool)) /-- A strategy, given the results of initial attempts, returns a path for the next attempt. -/ abbrev Strategy (N : β„•) : Type := ⦃k : ℕ⦄ β†’ (Fin k β†’ Option (Cell N)) β†’ _Path N /-- Playing a strategy, k attempts. -/ noncomputable def Strategy.play (s : Strategy N) (m : MonsterData N) : (k : β„•) β†’ Fin k β†’ Option (Cell N) | 0 => Fin.elim0 | k + 1 => Fin.snoc (s.play m k) ((s (s.play m k)).firstMonster m) /-- The predicate for a strategy winning within the given number of attempts. -/ def Strategy.WinsIn (s : Strategy N) (m : MonsterData N) (k : β„•) : Prop := none ∈ Set.range (s.play m k) /-- Whether a strategy forces a win within the given number of attempts. -/ def Strategy.ForcesWinIn (s : Strategy N) (k : β„•) : Prop := βˆ€ m, s.WinsIn m k abbrev answer : β„• := 3 theorem imo2024_p5 : IsLeast {k | βˆƒ s : Strategy 2022, s.ForcesWinIn k} answer := by sorry
combinatorics
Imo1977P4
false
[ "algebra" ]
Imo1977P4
import Mathlib import Aesop set_option maxHeartbeats 0 open BigOperators Real Nat Topology Rat
/-! # International Mathematical Olympiad 1977, Problem 4 Define f(x) = 1 - a cos x - b sin x - A cos 2x - B sin 2x, where a, b, A, B are real constants. Suppose that f(x) β‰₯ 0 for all real x. Prove that a^2 + b^2 ≀ 2 and A^2 + B^2 ≀ 1. -/
theorem imo1977_p4 (f : ℝ β†’ ℝ) (a b A B : ℝ) (hβ‚€ : βˆ€ x, f x = 1 - a * Real.cos x - b * Real.sin x - A * Real.cos (2 * x) - B * Real.sin (2 * x)) (h₁ : βˆ€ x, f x β‰₯ 0) : a ^ 2 + b ^ 2 ≀ 2 ∧ A ^ 2 + B ^ 2 ≀ 1 := by sorry
test
import Mathlib import Aesop set_option maxHeartbeats 0 open BigOperators Real Nat Topology Rat /-! # International Mathematical Olympiad 1977, Problem 4 Define f(x) = 1 - a cos x - b sin x - A cos 2x - B sin 2x, where a, b, A, B are real constants. Suppose that f(x) β‰₯ 0 for all real x. Prove that a^2 + b^2 ≀ 2 and A^2 + B^2 ≀ 1. -/ theorem imo1977_p4 (f : ℝ β†’ ℝ) (a b A B : ℝ) (hβ‚€ : βˆ€ x, f x = 1 - a * Real.cos x - b * Real.sin x - A * Real.cos (2 * x) - B * Real.sin (2 * x)) (h₁ : βˆ€ x, f x β‰₯ 0) : a ^ 2 + b ^ 2 ≀ 2 ∧ A ^ 2 + B ^ 2 ≀ 1 := by sorry
algebra
Imo2021P6
false
[ "algebra" ]
Imo2021P6
import Mathlib import Aesop set_option maxHeartbeats 0 open BigOperators Real Nat Topology Rat
/-! # International Mathematical Olympiad 2021, Problem 6 Let m β‰₯ 2 be an integer, A a finite set of integers (not necessarily positive) and B₁, Bβ‚‚, ... Bβ‚˜ subsets of A. Suppose that for every k = 1, 2, ..., m, the sum of the elements of Bβ‚– is m^k. Prove that A contains at least m/2 elements. -/
theorem imo2021_p6 (m : β„•) (hm : 2 ≀ m) (A : Finset β„€) (B : Fin m β†’ Finset β„€) (hB : βˆ€ k, B k βŠ† A) (hs : βˆ€ k, βˆ‘ b ∈ B k, b = (m : β„€) ^ (k.val + 1)) : m ≀ 2 * A.card := by sorry
test
import Mathlib import Aesop set_option maxHeartbeats 0 open BigOperators Real Nat Topology Rat /-! # International Mathematical Olympiad 2021, Problem 6 Let m β‰₯ 2 be an integer, A a finite set of integers (not necessarily positive) and B₁, Bβ‚‚, ... Bβ‚˜ subsets of A. Suppose that for every k = 1, 2, ..., m, the sum of the elements of Bβ‚– is m^k. Prove that A contains at least m/2 elements. -/ theorem imo2021_p6 (m : β„•) (hm : 2 ≀ m) (A : Finset β„€) (B : Fin m β†’ Finset β„€) (hB : βˆ€ k, B k βŠ† A) (hs : βˆ€ k, βˆ‘ b ∈ B k, b = (m : β„€) ^ (k.val + 1)) : m ≀ 2 * A.card := by sorry
algebra
Imo1961P3
true
[ "algebra" ]
Imo1961P3
import Mathlib import Aesop set_option maxHeartbeats 0 open BigOperators Real Nat Topology Rat
/-! # International Mathematical Olympiad 1961, Problem 3 Solve the equation cosⁿ x - sinⁿ x = 1, where n is a given positive integer. -/
abbrev solutionSet (n : β„•+) : Set ℝ := { x | (βˆƒ k : β„€, k * Real.pi = x) ∧ Even n.val ∨ (βˆƒ k : β„€, k * (2 * Real.pi) = x) ∧ Odd n.val ∨ (βˆƒ k : β„€, -(Real.pi / 2) + k * (2 * Real.pi) = x) ∧ Odd n.val } theorem imo1961_p3 {n : β„•} {x : ℝ} (npos : 0 < n) : x ∈ solutionSet ⟨n, npos⟩ ↔ (cos x) ^ n - (sin x) ^ n = 1 := by sorry
test
import Mathlib import Aesop set_option maxHeartbeats 0 open BigOperators Real Nat Topology Rat /-! # International Mathematical Olympiad 1961, Problem 3 Solve the equation cosⁿ x - sinⁿ x = 1, where n is a given positive integer. -/ abbrev solutionSet (n : β„•+) : Set ℝ := { x | (βˆƒ k : β„€, k * Real.pi = x) ∧ Even n.val ∨ (βˆƒ k : β„€, k * (2 * Real.pi) = x) ∧ Odd n.val ∨ (βˆƒ k : β„€, -(Real.pi / 2) + k * (2 * Real.pi) = x) ∧ Odd n.val } theorem imo1961_p3 {n : β„•} {x : ℝ} (npos : 0 < n) : x ∈ solutionSet ⟨n, npos⟩ ↔ (cos x) ^ n - (sin x) ^ n = 1 := by sorry
algebra
Usa2000P1
true
[ "algebra" ]
Usa2000P1
import Mathlib import Aesop set_option maxHeartbeats 0 open BigOperators Real Nat Topology Rat
/-! USA Mathematical Olympiad 2000, Problem 1 A function f : ℝ β†’ ℝ is called "very convex" if it satisfies βˆ€ x y : ℝ, (f(x) + f(y))/2 β‰₯ f((x + y)/2) + |x - y|. Show that there exist no very convex functions. -/
theorem usa2000_p1 : Β¬βˆƒ f : ℝ β†’ ℝ, βˆ€ x y : ℝ, f ((x + y) / 2) + |x - y| ≀ (f x + f y) / 2 := by sorry
test
import Mathlib import Aesop set_option maxHeartbeats 0 open BigOperators Real Nat Topology Rat /-! USA Mathematical Olympiad 2000, Problem 1 A function f : ℝ β†’ ℝ is called "very convex" if it satisfies βˆ€ x y : ℝ, (f(x) + f(y))/2 β‰₯ f((x + y)/2) + |x - y|. Show that there exist no very convex functions. -/ theorem usa2000_p1 : Β¬βˆƒ f : ℝ β†’ ℝ, βˆ€ x y : ℝ, f ((x + y) / 2) + |x - y| ≀ (f x + f y) / 2 := by sorry
algebra
Imo2022P3
false
[ "number theory" ]
Imo2022P3
import Mathlib import Aesop set_option maxHeartbeats 0 open BigOperators Real Nat Topology Rat
/-! # International Mathematical Olympiad 2022, Problem 3 Let k be a positive integer and let S be a finite set of odd prime integers. Prove that there is at most one way (up to rotation and reflection) to place the elements of S around a circle such that the product of any two neighbors is of the form xΒ² + x + k for some positive integer x. -/
/- special open -/ open Finset /-- The condition of the problem on a placement of numbers round a circle. -/ def Condition (k : β„•) (S : Finset β„•) (p : Fin (Finset.card S) β†’ S) : Prop := βˆ€ i, have : NeZero (Finset.card S) := ⟨i.pos.ne'⟩ βˆƒ x : β„•, 0 < x ∧ ((p i : β„•) * (p (i + 1) : β„•)) = x ^ 2 + x + k theorem imo2023_p3 {k : β„•} (hk : 0 < k) (S : Finset β„•) (hS : βˆ€ p ∈ S, Odd p ∧ Nat.Prime p) {p₁ pβ‚‚ : Fin (Finset.card S) β†’ S} (hp₁ : Condition k S p₁) (hpβ‚‚ : Condition k S pβ‚‚) : (βˆƒ i, βˆ€ j, pβ‚‚ j = p₁ (j + i)) ∨ βˆƒ i, βˆ€ j, pβ‚‚ j = p₁ (Fin.rev j + i) := by sorry
test
import Mathlib import Aesop set_option maxHeartbeats 0 open BigOperators Real Nat Topology Rat /-! # International Mathematical Olympiad 2022, Problem 3 Let k be a positive integer and let S be a finite set of odd prime integers. Prove that there is at most one way (up to rotation and reflection) to place the elements of S around a circle such that the product of any two neighbors is of the form xΒ² + x + k for some positive integer x. -/ /- special open -/ open Finset /-- The condition of the problem on a placement of numbers round a circle. -/ def Condition (k : β„•) (S : Finset β„•) (p : Fin (Finset.card S) β†’ S) : Prop := βˆ€ i, have : NeZero (Finset.card S) := ⟨i.pos.ne'⟩ βˆƒ x : β„•, 0 < x ∧ ((p i : β„•) * (p (i + 1) : β„•)) = x ^ 2 + x + k theorem imo2023_p3 {k : β„•} (hk : 0 < k) (S : Finset β„•) (hS : βˆ€ p ∈ S, Odd p ∧ Nat.Prime p) {p₁ pβ‚‚ : Fin (Finset.card S) β†’ S} (hp₁ : Condition k S p₁) (hpβ‚‚ : Condition k S pβ‚‚) : (βˆƒ i, βˆ€ j, pβ‚‚ j = p₁ (j + i)) ∨ βˆƒ i, βˆ€ j, pβ‚‚ j = p₁ (Fin.rev j + i) := by sorry
number theory
Imo1978P1
true
[ "number theory" ]
Imo1978P1
import Mathlib import Aesop set_option maxHeartbeats 0 open BigOperators Real Nat Topology Rat
/-! # International Mathematical Olympiad 1978, Problem 1 m and n are positive integers with m < n. The last three decimal digits of 1978ᡐ are the same as the last three decimal digits of 1978ⁿ. Find m and n such that m + n has the least possible value. -/
abbrev solution : β„• Γ— β„• := (3, 103) abbrev ValidPair : β„• Γ— β„• β†’ Prop | (m, n) => 1 ≀ m ∧ m < n ∧ (1978^m) % 1000 = (1978^n) % 1000 theorem imo1978_p1 (m n : β„•) (hmn : (m, n) = solution) : ValidPair (m, n) ∧ (βˆ€ m' n' : β„•, ValidPair (m', n') β†’ m + n ≀ m' + n') := by sorry
test
import Mathlib import Aesop set_option maxHeartbeats 0 open BigOperators Real Nat Topology Rat /-! # International Mathematical Olympiad 1978, Problem 1 m and n are positive integers with m < n. The last three decimal digits of 1978ᡐ are the same as the last three decimal digits of 1978ⁿ. Find m and n such that m + n has the least possible value. -/ abbrev solution : β„• Γ— β„• := (3, 103) abbrev ValidPair : β„• Γ— β„• β†’ Prop | (m, n) => 1 ≀ m ∧ m < n ∧ (1978^m) % 1000 = (1978^n) % 1000 theorem imo1978_p1 (m n : β„•) (hmn : (m, n) = solution) : ValidPair (m, n) ∧ (βˆ€ m' n' : β„•, ValidPair (m', n') β†’ m + n ≀ m' + n') := by sorry
number theory
Imo2004P2
false
[ "algebra" ]
Imo2004P2
import Mathlib import Aesop set_option maxHeartbeats 0 open BigOperators Real Nat Topology Rat
/-! # International Mathematical Olympiad 2004, Problem 2 Find all polynomials P with real coefficients such that for all reals a,b,c such that ab + bc + ca = 0 we have P(a - b) + P(b - c) + P(c - a) = 2P(a + b + c). -/
abbrev SolutionSet : Set (Polynomial ℝ) := {P | βˆƒ (aβ‚‚ aβ‚„ : ℝ), P = Polynomial.monomial 2 aβ‚‚ + Polynomial.monomial 4 aβ‚„} theorem imo2004_p2 (P : Polynomial ℝ) : P ∈ SolutionSet ↔ βˆ€ a b c, a * b + b * c + c * a = 0 β†’ P.eval (a - b) + P.eval (b - c) + P.eval (c - a) = 2 * P.eval (a + b + c) := by sorry
test
import Mathlib import Aesop set_option maxHeartbeats 0 open BigOperators Real Nat Topology Rat /-! # International Mathematical Olympiad 2004, Problem 2 Find all polynomials P with real coefficients such that for all reals a,b,c such that ab + bc + ca = 0 we have P(a - b) + P(b - c) + P(c - a) = 2P(a + b + c). -/ abbrev SolutionSet : Set (Polynomial ℝ) := {P | βˆƒ (aβ‚‚ aβ‚„ : ℝ), P = Polynomial.monomial 2 aβ‚‚ + Polynomial.monomial 4 aβ‚„} theorem imo2004_p2 (P : Polynomial ℝ) : P ∈ SolutionSet ↔ βˆ€ a b c, a * b + b * c + c * a = 0 β†’ P.eval (a - b) + P.eval (b - c) + P.eval (c - a) = 2 * P.eval (a + b + c) := by sorry
algebra
Bulgaria1998P2
false
[ "geometry" ]
Bulgaria1998P2
import Mathlib import Aesop set_option maxHeartbeats 0 open BigOperators Real Nat Topology Rat
/-! # Bulgarian Mathematical Olympiad 1998, Problem 2 A convex quadrilateral ABCD has AD = CD and ∠DAB = ∠ABC < 90°. The line through D and the midpoint of BC intersects line AB in point E. Prove that ∠BEC = ∠DAC. (Note: The problem is valid without the assumption ∠ABC < 90°.) -/
/- special open -/ open EuclideanGeometry theorem bulgaria1998_p2 (A B C D E M : EuclideanSpace ℝ (Fin 2)) (H1 : dist D A = dist D C) (H2 : ∠ D A B = ∠ A B C) (H3 : M = midpoint ℝ B C) : ∠ B E C = ∠ D A C := by sorry
test
import Mathlib import Aesop set_option maxHeartbeats 0 open BigOperators Real Nat Topology Rat /-! # Bulgarian Mathematical Olympiad 1998, Problem 2 A convex quadrilateral ABCD has AD = CD and ∠DAB = ∠ABC < 90Β°. The line through D and the midpoint of BC intersects line AB in point E. Prove that ∠BEC = ∠DAC. (Note: The problem is valid without the assumption ∠ABC < 90Β°.) -/ /- special open -/ open EuclideanGeometry theorem bulgaria1998_p2 (A B C D E M : EuclideanSpace ℝ (Fin 2)) (H1 : dist D A = dist D C) (H2 : ∠ D A B = ∠ A B C) (H3 : M = midpoint ℝ B C) : ∠ B E C = ∠ D A C := by sorry
geometry
Imo2017P6
false
[ "number theory" ]
Imo2017P6
import Mathlib import Aesop set_option maxHeartbeats 0 open BigOperators Real Nat Topology Rat
/-! # International Mathematical Olympiad 2017, Problem 6 A point (x,y) ∈ β„€ Γ— β„€ is called primitive if gcd(x,y) = 1. Let S be a finite set of primitive points. Prove that there exists n > 0 and integers aβ‚€,a₁,...,aβ‚™ such that aβ‚€xⁿ + a₁xⁿ⁻¹y + aβ‚‚xⁿ⁻²yΒ² + ... + aₙ₋₁xyⁿ⁻¹ + aβ‚™yⁿ = 1 for each (x,y) ∈ S. -/
theorem imo2017_p6 (S : Finset (β„€ Γ— β„€)) (hS : βˆ€ s ∈ S, gcd s.1 s.2 = 1) : βˆƒ n : β„•, 0 < n ∧ βˆƒ a : β„• β†’ β„€, βˆ€ s ∈ S, βˆ‘ i ∈ Finset.range n, a i * s.1 ^ i * s.2 ^ (n - i) = 1 := by sorry
test
import Mathlib import Aesop set_option maxHeartbeats 0 open BigOperators Real Nat Topology Rat /-! # International Mathematical Olympiad 2017, Problem 6 A point (x,y) ∈ β„€ Γ— β„€ is called primitive if gcd(x,y) = 1. Let S be a finite set of primitive points. Prove that there exists n > 0 and integers aβ‚€,a₁,...,aβ‚™ such that aβ‚€xⁿ + a₁xⁿ⁻¹y + aβ‚‚xⁿ⁻²yΒ² + ... + aₙ₋₁xyⁿ⁻¹ + aβ‚™yⁿ = 1 for each (x,y) ∈ S. -/ theorem imo2017_p6 (S : Finset (β„€ Γ— β„€)) (hS : βˆ€ s ∈ S, gcd s.1 s.2 = 1) : βˆƒ n : β„•, 0 < n ∧ βˆƒ a : β„• β†’ β„€, βˆ€ s ∈ S, βˆ‘ i ∈ Finset.range n, a i * s.1 ^ i * s.2 ^ (n - i) = 1 := by sorry
number theory
Imo2009P6
false
[ "combinatorics" ]
Imo2009P6
import Mathlib import Aesop set_option maxHeartbeats 0 open BigOperators Real Nat Topology Rat
/-! # International Mathematical Olympiad 2009, Problem 6 Let a₁, aβ‚‚, ..., aβ‚™ be distinct positive integers and let M be a set of n - 1 positive integers not containing s = a₁ + aβ‚‚ + ... + aβ‚™. A grasshopper is to jump along the real axis, starting at the point 0 and making n jumps to the right with lengths a₁, aβ‚‚, ..., aβ‚™ in some order. Prove that the order can be chosen in such a way that the grasshopper never lands on any point in M. -/
theorem imo2009_p6 (n : β„•) (hn : 0 < n) (a : Fin n β†’ β„€) (ainj : a.Injective) (apos : βˆ€ i, 0 < a i) (M : Finset β„€) (Mpos : βˆ€ m ∈ M, 0 < m) (Mcard : M.card = n - 1) (hM : βˆ‘ i, a i βˆ‰ M) : βˆƒ p : Equiv.Perm (Fin n), βˆ€ i : Fin n, βˆ‘ j ∈ Finset.univ.filter (Β· ≀ i), a (p j) βˆ‰ M := by sorry
test
import Mathlib import Aesop set_option maxHeartbeats 0 open BigOperators Real Nat Topology Rat /-! # International Mathematical Olympiad 2009, Problem 6 Let a₁, aβ‚‚, ..., aβ‚™ be distinct positive integers and let M be a set of n - 1 positive integers not containing s = a₁ + aβ‚‚ + ... + aβ‚™. A grasshopper is to jump along the real axis, starting at the point 0 and making n jumps to the right with lengths a₁, aβ‚‚, ..., aβ‚™ in some order. Prove that the order can be chosen in such a way that the grasshopper never lands on any point in M. -/ theorem imo2009_p6 (n : β„•) (hn : 0 < n) (a : Fin n β†’ β„€) (ainj : a.Injective) (apos : βˆ€ i, 0 < a i) (M : Finset β„€) (Mpos : βˆ€ m ∈ M, 0 < m) (Mcard : M.card = n - 1) (hM : βˆ‘ i, a i βˆ‰ M) : βˆƒ p : Equiv.Perm (Fin n), βˆ€ i : Fin n, βˆ‘ j ∈ Finset.univ.filter (Β· ≀ i), a (p j) βˆ‰ M := by sorry
combinatorics
Imo2013P1
true
[ "number theory" ]
Imo2013P1
import Mathlib import Aesop set_option maxHeartbeats 0 open BigOperators Real Nat Topology Rat
/-! # International Mathematical Olympiad 2013, Problem 1 Prove that for any pair of positive integers k and n, there exist k positive integers m₁, mβ‚‚, ..., mβ‚– (not necessarily different) such that 1 + (2ᡏ - 1)/ n = (1 + 1/m₁) * (1 + 1/mβ‚‚) * ... * (1 + 1/mβ‚–). -/
theorem imo2013_p1 (n : β„•+) (k : β„•) : βˆƒ m : β„• β†’ β„•+, (1 : β„š) + (2 ^ k - 1) / n = ∏ i ∈ Finset.range k, (1 + 1 / (m i : β„š)) := by sorry
test
import Mathlib import Aesop set_option maxHeartbeats 0 open BigOperators Real Nat Topology Rat /-! # International Mathematical Olympiad 2013, Problem 1 Prove that for any pair of positive integers k and n, there exist k positive integers m₁, mβ‚‚, ..., mβ‚– (not necessarily different) such that 1 + (2ᡏ - 1)/ n = (1 + 1/m₁) * (1 + 1/mβ‚‚) * ... * (1 + 1/mβ‚–). -/ theorem imo2013_p1 (n : β„•+) (k : β„•) : βˆƒ m : β„• β†’ β„•+, (1 : β„š) + (2 ^ k - 1) / n = ∏ i ∈ Finset.range k, (1 + 1 / (m i : β„š)) := by sorry
number theory
Imo1979P5
false
[ "algebra" ]
Imo1979P5
import Mathlib import Aesop set_option maxHeartbeats 0 open BigOperators Real Nat Topology Rat
/-! # International Mathematical Olympiad 1979, Problem 5 Find all real numbers a for which there exist non-negative real numbers x1, x2, x3, x4, x5 satisfying: x1 + 2x_2 + 3x_3 + 4x_4 + 5x_5 = a, x1 + 2^3x_2 + 3^3x_3 + 4^3x_4 + 5^3x_5 = a^2, x1 + 2^5x_2 + 3^5x_3 + 4^5x_4 + 5^5x_5 = a^3. -/
abbrev solution_set : Set ℝ := {0, 1, 4, 9, 16, 25} theorem imo1979_p5 (a : ℝ) : (βˆƒ x1 x2 x3 x4 x5 : ℝ, x1 β‰₯ 0 ∧ x2 β‰₯ 0 ∧ x3 β‰₯ 0 ∧ x4 β‰₯ 0 ∧ x5 β‰₯ 0 ∧ x1 + 2*x2 + 3*x3 + 4*x4 + 5*x5 = a ∧ x1 + 2^3*x2 + 3^3*x3 + 4^3*x4 + 5^3*x5 = a^2 ∧ x1 + 2^5*x2 + 3^5*x3 + 4^5*x4 + 5^5*x5 = a^3 ) ↔ a ∈ solution_set := by sorry
test
import Mathlib import Aesop set_option maxHeartbeats 0 open BigOperators Real Nat Topology Rat /-! # International Mathematical Olympiad 1979, Problem 5 Find all real numbers a for which there exist non-negative real numbers x1, x2, x3, x4, x5 satisfying: x1 + 2x_2 + 3x_3 + 4x_4 + 5x_5 = a, x1 + 2^3x_2 + 3^3x_3 + 4^3x_4 + 5^3x_5 = a^2, x1 + 2^5x_2 + 3^5x_3 + 4^5x_4 + 5^5x_5 = a^3. -/ abbrev solution_set : Set ℝ := {0, 1, 4, 9, 16, 25} theorem imo1979_p5 (a : ℝ) : (βˆƒ x1 x2 x3 x4 x5 : ℝ, x1 β‰₯ 0 ∧ x2 β‰₯ 0 ∧ x3 β‰₯ 0 ∧ x4 β‰₯ 0 ∧ x5 β‰₯ 0 ∧ x1 + 2*x2 + 3*x3 + 4*x4 + 5*x5 = a ∧ x1 + 2^3*x2 + 3^3*x3 + 4^3*x4 + 5^3*x5 = a^2 ∧ x1 + 2^5*x2 + 3^5*x3 + 4^5*x4 + 5^5*x5 = a^3 ) ↔ a ∈ solution_set := by sorry
algebra
Imo1970P6
false
[ "combinatorics" ]
Imo1970P6
import Mathlib import Aesop set_option maxHeartbeats 0 open BigOperators Real Nat Topology Rat
/-! # International Mathematical Olympiad 1970, Problem 6 In a plane there are 100 points, no three of which are collinear. Consider all possible triangles having these points as vertices. Prove that no more that 70% of these triangles are acute. -/
/- special open -/ open EuclideanGeometry abbrev Pt := EuclideanSpace ℝ (Fin 2) def AcuteTriangle (T : Affine.Triangle ℝ Pt) : Prop := ∠ (T.points 1) (T.points 2) (T.points 3) < Real.pi / 2 ∧ ∠ (T.points 2) (T.points 3) (T.points 1) < Real.pi / 2 ∧ ∠ (T.points 3) (T.points 1) (T.points 2) < Real.pi / 2 theorem imo1970_p6 (P : Fin 100 β†’ Pt) (hP : βˆ€ a b c : Fin 100, List.Nodup [a, b, c] β†’ Β¬ Collinear ℝ {P c, P b, P c}) : let cardAll := Nat.card { t : Affine.Triangle ℝ Pt | βˆƒ a b c : Fin 100, ![P a, P b, P c] = t.points } let cardAcute := Nat.card { t : Affine.Triangle ℝ Pt | βˆƒ a b c : Fin 100, ![P a, P b, P c] = t.points ∧ AcuteTriangle t } (cardAcute : β„š) / cardAll ≀ 7 / 10 := by sorry
test
import Mathlib import Aesop set_option maxHeartbeats 0 open BigOperators Real Nat Topology Rat /-! # International Mathematical Olympiad 1970, Problem 6 In a plane there are 100 points, no three of which are collinear. Consider all possible triangles having these points as vertices. Prove that no more that 70% of these triangles are acute. -/ /- special open -/ open EuclideanGeometry abbrev Pt := EuclideanSpace ℝ (Fin 2) def AcuteTriangle (T : Affine.Triangle ℝ Pt) : Prop := ∠ (T.points 1) (T.points 2) (T.points 3) < Real.pi / 2 ∧ ∠ (T.points 2) (T.points 3) (T.points 1) < Real.pi / 2 ∧ ∠ (T.points 3) (T.points 1) (T.points 2) < Real.pi / 2 theorem imo1970_p6 (P : Fin 100 β†’ Pt) (hP : βˆ€ a b c : Fin 100, List.Nodup [a, b, c] β†’ Β¬ Collinear ℝ {P c, P b, P c}) : let cardAll := Nat.card { t : Affine.Triangle ℝ Pt | βˆƒ a b c : Fin 100, ![P a, P b, P c] = t.points } let cardAcute := Nat.card { t : Affine.Triangle ℝ Pt | βˆƒ a b c : Fin 100, ![P a, P b, P c] = t.points ∧ AcuteTriangle t } (cardAcute : β„š) / cardAll ≀ 7 / 10 := by sorry
combinatorics
Imo2008P2a
true
[ "algebra" ]
Imo2008P2a
import Mathlib import Aesop set_option maxHeartbeats 0 open BigOperators Real Nat Topology Rat
/-! # International Mathematical Olympiad 2008, Problem 2 (a) Prove that ``` x^2 / (x-1)^2 + y^2 / (y-1)^2 + z^2 / (z-1)^2 β‰₯ 1 ``` for all real numbers `x`,`y`, `z`, each different from 1, and satisfying `xyz = 1`. -/
theorem imo2008_p2a (x y z : ℝ) (h : x * y * z = 1) (hx : x β‰  1) (hy : y β‰  1) (hz : z β‰  1) : x ^ 2 / (x - 1) ^ 2 + y ^ 2 / (y - 1) ^ 2 + z ^ 2 / (z - 1) ^ 2 β‰₯ 1 := by sorry
test
import Mathlib import Aesop set_option maxHeartbeats 0 open BigOperators Real Nat Topology Rat /-! # International Mathematical Olympiad 2008, Problem 2 (a) Prove that ``` x^2 / (x-1)^2 + y^2 / (y-1)^2 + z^2 / (z-1)^2 β‰₯ 1 ``` for all real numbers `x`,`y`, `z`, each different from 1, and satisfying `xyz = 1`. -/ theorem imo2008_p2a (x y z : ℝ) (h : x * y * z = 1) (hx : x β‰  1) (hy : y β‰  1) (hz : z β‰  1) : x ^ 2 / (x - 1) ^ 2 + y ^ 2 / (y - 1) ^ 2 + z ^ 2 / (z - 1) ^ 2 β‰₯ 1 := by sorry
algebra
Usa2011P4
true
[ "number theory" ]
Usa2011P4
import Mathlib import Aesop set_option maxHeartbeats 0 open BigOperators Real Nat Topology Rat
/-! # USA Mathematical Olympiad 2011, Problem 4 For any integer n β‰₯ 2, define P(n) to be the proposition: P(n) ≑ 2^(2^n) % (2^n - 1) is a power of 4 Either prove that P(n) is always true, or find a counterexample. -/
abbrev P (n : β„•) : Prop := βˆƒ k, 4^k = 2^(2^n) % (2^n - 1) inductive SolutionData where | AlwaysTrue : SolutionData | Counterexample : β„• β†’ SolutionData abbrev solution_data : SolutionData := SolutionData.Counterexample 25 theorem usa2011_p4 : match solution_data with | .AlwaysTrue => βˆ€ n, 2 ≀ n β†’ P n | .Counterexample m => 2 ≀ m ∧ Β¬ P m := by sorry
test
import Mathlib import Aesop set_option maxHeartbeats 0 open BigOperators Real Nat Topology Rat /-! # USA Mathematical Olympiad 2011, Problem 4 For any integer n β‰₯ 2, define P(n) to be the proposition: P(n) ≑ 2^(2^n) % (2^n - 1) is a power of 4 Either prove that P(n) is always true, or find a counterexample. -/ abbrev P (n : β„•) : Prop := βˆƒ k, 4^k = 2^(2^n) % (2^n - 1) inductive SolutionData where | AlwaysTrue : SolutionData | Counterexample : β„• β†’ SolutionData abbrev solution_data : SolutionData := SolutionData.Counterexample 25 theorem usa2011_p4 : match solution_data with | .AlwaysTrue => βˆ€ n, 2 ≀ n β†’ P n | .Counterexample m => 2 ≀ m ∧ Β¬ P m := by sorry
number theory
Imo2007P1b
false
[ "algebra" ]
Imo2007P1b
import Mathlib import Aesop set_option maxHeartbeats 0 open BigOperators Real Nat Topology Rat
/-! # International Mathematical Olympiad 2007, Problem 1 Real numbers a₁, aβ‚‚, ..., aβ‚™ are fixed. For each 1 ≀ i ≀ n, we let dα΅’ = max {aβ±Ό : 1 ≀ j ≀ i} - min {aβ±Ό : i ≀ j ≀ n}, and let d = max {dα΅’ : 1 ≀ i ≀ n}. (b) Show that there exists some choice of x₁ ≀ ... ≀ xβ‚™ which achieves equality. -/
noncomputable abbrev d {n : β„•} (a : Fin n β†’ ℝ) (i : Fin n) := (⨆ j : {j // j ≀ i}, a j - β¨… j : {j // i ≀ j}, a j) theorem imo2007_p1b {n : β„•} (hn : 0 < n) {a : Fin n β†’ ℝ} : βˆƒ x : Fin n β†’ ℝ, Monotone x ∧ (⨆ i, d a i) / 2 = ⨆ i, |x i - a i| := by sorry
test
import Mathlib import Aesop set_option maxHeartbeats 0 open BigOperators Real Nat Topology Rat /-! # International Mathematical Olympiad 2007, Problem 1 Real numbers a₁, aβ‚‚, ..., aβ‚™ are fixed. For each 1 ≀ i ≀ n, we let dα΅’ = max {aβ±Ό : 1 ≀ j ≀ i} - min {aβ±Ό : i ≀ j ≀ n}, and let d = max {dα΅’ : 1 ≀ i ≀ n}. (b) Show that there exists some choice of x₁ ≀ ... ≀ xβ‚™ which achieves equality. -/ noncomputable abbrev d {n : β„•} (a : Fin n β†’ ℝ) (i : Fin n) := (⨆ j : {j // j ≀ i}, a j - β¨… j : {j // i ≀ j}, a j) theorem imo2007_p1b {n : β„•} (hn : 0 < n) {a : Fin n β†’ ℝ} : βˆƒ x : Fin n β†’ ℝ, Monotone x ∧ (⨆ i, d a i) / 2 = ⨆ i, |x i - a i| := by sorry
algebra
Imo2001P1
false
[ "geometry" ]
Imo2001P1
import Mathlib import Aesop set_option maxHeartbeats 0 open BigOperators Real Nat Topology Rat
/-! # International Mathematical Olympiad 2001, Problem 1 Let ABC be an acute-angled triangle with O as its circumcenter. Let P on line BC be the foot of the altitude from A. Assume that ∠BCA β‰₯ ∠ABC + 30Β°. Prove that ∠CAB + ∠COP < 90Β°. -/
/- special open -/ open EuclideanGeometry theorem imo2001_p1 (A B C : EuclideanSpace ℝ (Fin 2)) (hABC : AffineIndependent ℝ ![A, B, C]) (hAcuteA : ∠ C A B < Real.pi / 2) (hAcuteB : ∠ A B C < Real.pi / 2) (hAcuteC : ∠ B C A < Real.pi / 2) (hAB : ∠ A B C + Real.pi / 6 ≀ ∠ B C A) : let ABC : Affine.Triangle _ _ := ⟨![A, B, C], hABC⟩ let P := EuclideanGeometry.orthogonalProjection line[ℝ, B, C] A ∠ C A B + ∠ C ABC.circumcenter P < Real.pi / 2 := by sorry
test
import Mathlib import Aesop set_option maxHeartbeats 0 open BigOperators Real Nat Topology Rat /-! # International Mathematical Olympiad 2001, Problem 1 Let ABC be an acute-angled triangle with O as its circumcenter. Let P on line BC be the foot of the altitude from A. Assume that ∠BCA β‰₯ ∠ABC + 30Β°. Prove that ∠CAB + ∠COP < 90Β°. -/ /- special open -/ open EuclideanGeometry theorem imo2001_p1 (A B C : EuclideanSpace ℝ (Fin 2)) (hABC : AffineIndependent ℝ ![A, B, C]) (hAcuteA : ∠ C A B < Real.pi / 2) (hAcuteB : ∠ A B C < Real.pi / 2) (hAcuteC : ∠ B C A < Real.pi / 2) (hAB : ∠ A B C + Real.pi / 6 ≀ ∠ B C A) : let ABC : Affine.Triangle _ _ := ⟨![A, B, C], hABC⟩ let P := EuclideanGeometry.orthogonalProjection line[ℝ, B, C] A ∠ C A B + ∠ C ABC.circumcenter P < Real.pi / 2 := by sorry
geometry
Usa1998P1
true
[ "number theory" ]
Usa1998P1
import Mathlib import Aesop set_option maxHeartbeats 0 open BigOperators Real Nat Topology Rat
/-! # USA Mathematical Olympiad 1998, Problem 1 Suppose that the set { 1, 2, ..., 1998 } has been partitioned into disjoint pairs {aα΅’, bα΅’}, where 1 ≀ i ≀ 999, so that for all i, |aα΅’ - bα΅’| = 1 or 6. Prove that the sum |a₁ - b₁| + |aβ‚‚ - bβ‚‚| + ... + |a₉₉₉ - b₉₉₉| -/
/-- `ab 0 i` is aα΅’ and `ab 1 i` is `bα΅’` -/ theorem usa1998_p1 (ab : Fin 2 β†’ Fin 999 β†’ Finset.Icc 1 1998) (hab : (ab.uncurry).Bijective) (habd : βˆ€ i : Fin 999, |(ab 0 i : β„€) - (ab 1 i : β„€)| = 1 ∨ |(ab 0 i : β„€) - (ab 1 i : β„€)| = 6) : (βˆ‘ i : Fin 999, |(ab 0 i : β„€) - (ab 1 i : β„€)|) % 10 = 9 := by sorry
test
import Mathlib import Aesop set_option maxHeartbeats 0 open BigOperators Real Nat Topology Rat /-! # USA Mathematical Olympiad 1998, Problem 1 Suppose that the set { 1, 2, ..., 1998 } has been partitioned into disjoint pairs {aα΅’, bα΅’}, where 1 ≀ i ≀ 999, so that for all i, |aα΅’ - bα΅’| = 1 or 6. Prove that the sum |a₁ - b₁| + |aβ‚‚ - bβ‚‚| + ... + |a₉₉₉ - b₉₉₉| -/ /-- `ab 0 i` is aα΅’ and `ab 1 i` is `bα΅’` -/ theorem usa1998_p1 (ab : Fin 2 β†’ Fin 999 β†’ Finset.Icc 1 1998) (hab : (ab.uncurry).Bijective) (habd : βˆ€ i : Fin 999, |(ab 0 i : β„€) - (ab 1 i : β„€)| = 1 ∨ |(ab 0 i : β„€) - (ab 1 i : β„€)| = 6) : (βˆ‘ i : Fin 999, |(ab 0 i : β„€) - (ab 1 i : β„€)|) % 10 = 9 := by sorry
number theory
Imo1982P3b
true
[ "algebra" ]
Imo1982P3b
import Mathlib import Aesop set_option maxHeartbeats 0 open BigOperators Real Nat Topology Rat
/-! # International Mathematical Olympiad 1982, Problem 3 Consider infinite sequences $\{x_n \}$ of positive reals such that $x_0 = 0$ and $x_0 \geq x_1 \geq x_2 \geq ...$ b) Find such a sequence such that for all n: $\frac{x_0^2}{x_1} + \ldots + \frac{x_{n-1}^2}{x_n} < 4$ -/
noncomputable abbrev sol : β„• β†’ ℝ := fun k ↦ 2⁻¹ ^ k theorem imo1982_q3b : Antitone sol ∧ sol 0 = 1 ∧ (βˆ€ k, 0 < sol k) ∧ βˆ€ n, βˆ‘ k ∈ Finset.range n, sol k ^ 2 / sol (k + 1) < 4 := by sorry
test
import Mathlib import Aesop set_option maxHeartbeats 0 open BigOperators Real Nat Topology Rat /-! # International Mathematical Olympiad 1982, Problem 3 Consider infinite sequences $\{x_n \}$ of positive reals such that $x_0 = 0$ and $x_0 \geq x_1 \geq x_2 \geq ...$ b) Find such a sequence such that for all n: $\frac{x_0^2}{x_1} + \ldots + \frac{x_{n-1}^2}{x_n} < 4$ -/ noncomputable abbrev sol : β„• β†’ ℝ := fun k ↦ 2⁻¹ ^ k theorem imo1982_q3b : Antitone sol ∧ sol 0 = 1 ∧ (βˆ€ k, 0 < sol k) ∧ βˆ€ n, βˆ‘ k ∈ Finset.range n, sol k ^ 2 / sol (k + 1) < 4 := by sorry
algebra
Romania1998P12
true
[ "algebra" ]
Romania1998P12
import Mathlib import Aesop set_option maxHeartbeats 0 open BigOperators Real Nat Topology Rat
/-! # Romanian Mathematical Olympiad 1998, Problem 12 Find all functions u : ℝ β†’ ℝ for which there exists a strictly monotonic function f : ℝ β†’ ℝ such that βˆ€ x,y ∈ ℝ, f(x + y) = f(x)u(y) + f(y) -/
abbrev solution_set : Set (ℝ β†’ ℝ) := { u | βˆƒ k : ℝ, βˆ€ x : ℝ, u x = Real.exp (k * x) } theorem romania1998_p12 (u : ℝ β†’ ℝ) : (βˆƒ f : ℝ β†’ ℝ, (StrictMono f ∨ StrictAnti f) ∧ βˆ€ x y : ℝ, f (x + y) = f x * u y + f y) ↔ u ∈ solution_set := by sorry
test
import Mathlib import Aesop set_option maxHeartbeats 0 open BigOperators Real Nat Topology Rat /-! # Romanian Mathematical Olympiad 1998, Problem 12 Find all functions u : ℝ β†’ ℝ for which there exists a strictly monotonic function f : ℝ β†’ ℝ such that βˆ€ x,y ∈ ℝ, f(x + y) = f(x)u(y) + f(y) -/ abbrev solution_set : Set (ℝ β†’ ℝ) := { u | βˆƒ k : ℝ, βˆ€ x : ℝ, u x = Real.exp (k * x) } theorem romania1998_p12 (u : ℝ β†’ ℝ) : (βˆƒ f : ℝ β†’ ℝ, (StrictMono f ∨ StrictAnti f) ∧ βˆ€ x y : ℝ, f (x + y) = f x * u y + f y) ↔ u ∈ solution_set := by sorry
algebra
Imo1987P1
true
[ "combinatorics" ]
Imo1987P1
import Mathlib import Aesop set_option maxHeartbeats 0 open BigOperators Real Nat Topology Rat
/-! # International Mathematical Olympiad 1987, Problem 1 Let $p_{n, k}$ be the number of permutations of a set of cardinality `n β‰₯ 1` that fix exactly `k` elements. Prove that $βˆ‘_{k=0}^n k p_{n,k}=n!$. -/
/-- Given `Ξ± : Type*` and `k : β„•`, `fiber Ξ± k` is the set of permutations of `Ξ±` with exactly `k` fixed points. -/ def fiber (Ξ± : Type*) [Fintype Ξ±] [DecidableEq Ξ±] (k : β„•) : Set (Equiv.Perm Ξ±) := {Οƒ : Equiv.Perm Ξ± | Fintype.card (Function.fixedPoints Οƒ) = k} instance {k : β„•} (Ξ± : Type*) [Fintype Ξ±] [DecidableEq Ξ±] : Fintype (fiber Ξ± k) := by unfold fiber; infer_instance /-- `p Ξ± k` is the number of permutations of `Ξ±` with exactly `k` fixed points. -/ def p (Ξ± : Type*) [Fintype Ξ±] [DecidableEq Ξ±] (k : β„•) : β„• := Fintype.card (fiber Ξ± k) theorem imo1987_p1 {n : β„•} (hn : 1 ≀ n) : βˆ‘ k ∈ Finset.range (n + 1), k * p (Fin n) k = n ! := by sorry
test
import Mathlib import Aesop set_option maxHeartbeats 0 open BigOperators Real Nat Topology Rat /-! # International Mathematical Olympiad 1987, Problem 1 Let $p_{n, k}$ be the number of permutations of a set of cardinality `n β‰₯ 1` that fix exactly `k` elements. Prove that $βˆ‘_{k=0}^n k p_{n,k}=n!$. -/ /-- Given `Ξ± : Type*` and `k : β„•`, `fiber Ξ± k` is the set of permutations of `Ξ±` with exactly `k` fixed points. -/ def fiber (Ξ± : Type*) [Fintype Ξ±] [DecidableEq Ξ±] (k : β„•) : Set (Equiv.Perm Ξ±) := {Οƒ : Equiv.Perm Ξ± | Fintype.card (Function.fixedPoints Οƒ) = k} instance {k : β„•} (Ξ± : Type*) [Fintype Ξ±] [DecidableEq Ξ±] : Fintype (fiber Ξ± k) := by unfold fiber; infer_instance /-- `p Ξ± k` is the number of permutations of `Ξ±` with exactly `k` fixed points. -/ def p (Ξ± : Type*) [Fintype Ξ±] [DecidableEq Ξ±] (k : β„•) : β„• := Fintype.card (fiber Ξ± k) theorem imo1987_p1 {n : β„•} (hn : 1 ≀ n) : βˆ‘ k ∈ Finset.range (n + 1), k * p (Fin n) k = n ! := by sorry
combinatorics
Imo1994P5
true
[ "algebra" ]
Imo1994P5
import Mathlib import Aesop set_option maxHeartbeats 0 open BigOperators Real Nat Topology Rat
/-! # International Mathematical Olympiad 1994, Problem 5 Let S be the set of all real numbers greater than -1. Find all functions f : S→S such that f(x + f(y) + xf(y)) = y + f(x) + yf(x) for all x and y, and f(x)/x is strictly increasing on each of the intervals -1 < x < 0 and 0 < x. -/
def S := { x : ℝ // -1 < x } abbrev op (f : S β†’ S) (a b : S) : S := ⟨a.val + (f b).val + a.val * (f b).val, by nlinarith [a.property, (f b).property]⟩ axiom sol_prop {a : ℝ} (ha : -1 < a) : -1 < -a / (1 + a) abbrev solution_set : Set (S β†’ S) := { fun x ↦ ⟨-x.val / (1 + x.val), sol_prop x.property⟩ } theorem imo1994_p5 (f : S β†’ S) : f ∈ solution_set ↔ ((βˆ€ x y : S, f (op f x y) = op f y x) ∧ (βˆ€ x y : S, x.val ∈ Set.Ioo (-1) 0 β†’ y.val ∈ Set.Ioo (-1) 0 β†’ x.val < y.val β†’ (f x).val / x.val < (f y).val / y.val) ∧ (βˆ€ x y : S, 0 < x.val β†’ 0 < y.val β†’ x.val < y.val β†’ (f x).val / x.val < (f y).val / y.val)) := by sorry
test
import Mathlib import Aesop set_option maxHeartbeats 0 open BigOperators Real Nat Topology Rat /-! # International Mathematical Olympiad 1994, Problem 5 Let S be the set of all real numbers greater than -1. Find all functions f : Sβ†’S such that f(x + f(y) + xf(y)) = y + f(x) + yf(x) for all x and y, and f(x)/x is strictly increasing on each of the intervals -1 < x < 0 and 0 < x. -/ def S := { x : ℝ // -1 < x } abbrev op (f : S β†’ S) (a b : S) : S := ⟨a.val + (f b).val + a.val * (f b).val, by nlinarith [a.property, (f b).property]⟩ axiom sol_prop {a : ℝ} (ha : -1 < a) : -1 < -a / (1 + a) abbrev solution_set : Set (S β†’ S) := { fun x ↦ ⟨-x.val / (1 + x.val), sol_prop x.property⟩ } theorem imo1994_p5 (f : S β†’ S) : f ∈ solution_set ↔ ((βˆ€ x y : S, f (op f x y) = op f y x) ∧ (βˆ€ x y : S, x.val ∈ Set.Ioo (-1) 0 β†’ y.val ∈ Set.Ioo (-1) 0 β†’ x.val < y.val β†’ (f x).val / x.val < (f y).val / y.val) ∧ (βˆ€ x y : S, 0 < x.val β†’ 0 < y.val β†’ x.val < y.val β†’ (f x).val / x.val < (f y).val / y.val)) := by sorry
algebra
Imo1983P6
true
[ "algebra", "inequality" ]
Imo1983P6
import Mathlib import Aesop set_option maxHeartbeats 0 open BigOperators Real Nat Topology Rat
/-! # International Mathematical Olympiad 1983, Problem 6 Suppose that a,b,c are the side lengths of a triangle. Prove that aΒ²b(a - b) + bΒ²c(b - c) + cΒ²a(c - a) β‰₯ 0. Determine when equality occurs. -/
abbrev EqualityCondition (a b c : ℝ) : Prop := a = b ∧ a = c theorem imo1983_p6 (T : Affine.Triangle ℝ (EuclideanSpace ℝ (Fin 2))) : let a := dist (T.points 1) (T.points 2) let b := dist (T.points 0) (T.points 2) let c := dist (T.points 0) (T.points 1) 0 ≀ a^2 * b * (a - b) + b^2 * c * (b - c) + c^2 * a * (c - a) ∧ (0 = a^2 * b * (a - b) + b^2 * c * (b - c) + c^2 * a * (c - a) ↔ EqualityCondition a b c) := by sorry
test
import Mathlib import Aesop set_option maxHeartbeats 0 open BigOperators Real Nat Topology Rat /-! # International Mathematical Olympiad 1983, Problem 6 Suppose that a,b,c are the side lengths of a triangle. Prove that aΒ²b(a - b) + bΒ²c(b - c) + cΒ²a(c - a) β‰₯ 0. Determine when equality occurs. -/ abbrev EqualityCondition (a b c : ℝ) : Prop := a = b ∧ a = c theorem imo1983_p6 (T : Affine.Triangle ℝ (EuclideanSpace ℝ (Fin 2))) : let a := dist (T.points 1) (T.points 2) let b := dist (T.points 0) (T.points 2) let c := dist (T.points 0) (T.points 1) 0 ≀ a^2 * b * (a - b) + b^2 * c * (b - c) + c^2 * a * (c - a) ∧ (0 = a^2 * b * (a - b) + b^2 * c * (b - c) + c^2 * a * (c - a) ↔ EqualityCondition a b c) := by sorry
algebra
Usa1993P3
false
[ "algebra" ]
Usa1993P3
import Mathlib import Aesop set_option maxHeartbeats 0 open BigOperators Real Nat Topology Rat
/-! # USA Mathematical Olympiad 1993, Problem 3 Consider functions f : [0,1] β†’ ℝ which satisfy (i) f(x) β‰₯ 0 for all x ∈ [0,1] (ii) f(1) = 1 (iii) f(x) + f(y) ≀ f (x + y) whenever x, y and x + y are all in [0,1]. Determine the smallest constant c such that f(x) ≀ cx for every function satisfying (i) - (iii) and every x ∈ [0,1]. -/
def valid (f : Set.Icc 0 1 β†’ ℝ) : Prop := (βˆ€ x, 0 ≀ f x) ∧ f 1 = 1 ∧ βˆ€ x y, (h : x.val + y.val ∈ Set.Icc 0 1) β†’ f x + f y ≀ f ⟨x.val + y.val, h⟩ abbrev min_c : ℝ := 2 theorem usa1993_p5 : IsLeast {c | βˆ€ f, valid f ∧ βˆ€ x, f x ≀ c * x } min_c := by sorry
test
import Mathlib import Aesop set_option maxHeartbeats 0 open BigOperators Real Nat Topology Rat /-! # USA Mathematical Olympiad 1993, Problem 3 Consider functions f : [0,1] β†’ ℝ which satisfy (i) f(x) β‰₯ 0 for all x ∈ [0,1] (ii) f(1) = 1 (iii) f(x) + f(y) ≀ f (x + y) whenever x, y and x + y are all in [0,1]. Determine the smallest constant c such that f(x) ≀ cx for every function satisfying (i) - (iii) and every x ∈ [0,1]. -/ def valid (f : Set.Icc 0 1 β†’ ℝ) : Prop := (βˆ€ x, 0 ≀ f x) ∧ f 1 = 1 ∧ βˆ€ x y, (h : x.val + y.val ∈ Set.Icc 0 1) β†’ f x + f y ≀ f ⟨x.val + y.val, h⟩ abbrev min_c : ℝ := 2 theorem usa1993_p5 : IsLeast {c | βˆ€ f, valid f ∧ βˆ€ x, f x ≀ c * x } min_c := by sorry
algebra
Imo1986P5
true
[ "algebra" ]
Imo1986P5
import Mathlib import Aesop set_option maxHeartbeats 0 open BigOperators Real Nat Topology Rat
/-! # International Mathematical Olympiad 1986, Problem 5 Find all functions `f`, defined on the non-negative real numbers and taking nonnegative real values, such that: - $f(xf(y))f(y) = f(x + y)$ for all $x, y \ge 0$, - $f(2) = 0$, - $f(x) \ne 0$ for $0 \le x < 2$. -/
/- special open -/ open NNReal structure IsGood (f : ℝβ‰₯0 β†’ ℝβ‰₯0) : Prop where map_add_rev x y : f (x * f y) * f y = f (x + y) map_two : f 2 = 0 map_ne_zero : βˆ€ x < 2, f x β‰  0 abbrev SolutionSet : Set (ℝβ‰₯0 β†’ ℝβ‰₯0) := { fun x ↦ 2 / (2 - x) } theorem imo1986_p5 {f : ℝβ‰₯0 β†’ ℝβ‰₯0} : IsGood f ↔ f ∈ SolutionSet := by sorry
test
import Mathlib import Aesop set_option maxHeartbeats 0 open BigOperators Real Nat Topology Rat /-! # International Mathematical Olympiad 1986, Problem 5 Find all functions `f`, defined on the non-negative real numbers and taking nonnegative real values, such that: - $f(xf(y))f(y) = f(x + y)$ for all $x, y \ge 0$, - $f(2) = 0$, - $f(x) \ne 0$ for $0 \le x < 2$. -/ /- special open -/ open NNReal structure IsGood (f : ℝβ‰₯0 β†’ ℝβ‰₯0) : Prop where map_add_rev x y : f (x * f y) * f y = f (x + y) map_two : f 2 = 0 map_ne_zero : βˆ€ x < 2, f x β‰  0 abbrev SolutionSet : Set (ℝβ‰₯0 β†’ ℝβ‰₯0) := { fun x ↦ 2 / (2 - x) } theorem imo1986_p5 {f : ℝβ‰₯0 β†’ ℝβ‰₯0} : IsGood f ↔ f ∈ SolutionSet := by sorry
algebra
Imo1991P6
false
[ "algebra" ]
Imo1991P6
import Mathlib import Aesop set_option maxHeartbeats 0 open BigOperators Real Nat Topology Rat
/-! # International Mathematical Olympiad 1991, Problem 6 An infinite sequence xβ‚€,x₁,xβ‚‚,... of real numbers is said to be *bounded* if there is a constant C such that |xα΅’| ≀ C for every i β‰₯ 0. Given any real number a > 1, construct a bounded infinite sequence xβ‚€,x₁,xβ‚‚,... such that |xα΅’ - xβ±Ό|⬝|i - j| β‰₯ 1 for every pair of distinct nonnegative integers i, j. -/
abbrev Bounded (x : β„• β†’ ℝ) : Prop := βˆƒ C, βˆ€ i, |x i| ≀ C noncomputable abbrev solution (a : ℝ) (ha : 1 < a) : β„• β†’ ℝ := let t := 1/(2^a) let c := 1 - t/(1 - t) Ξ» n => if n = 0 then 0 else (1/c) * (βˆ‘ i ∈ Finset.filter (Ξ» i => (n / 2^i) % 2 = 1) (Finset.range (Nat.log2 n + 1)), t^i) theorem imo1991_p6 (a : ℝ) (ha : 1 < a) : Bounded (solution a ha) ∧ βˆ€ i j, i β‰  j β†’ 1 ≀ |solution a ha i - solution a ha j| * |(i:ℝ) - j| := by sorry
test
import Mathlib import Aesop set_option maxHeartbeats 0 open BigOperators Real Nat Topology Rat /-! # International Mathematical Olympiad 1991, Problem 6 An infinite sequence xβ‚€,x₁,xβ‚‚,... of real numbers is said to be *bounded* if there is a constant C such that |xα΅’| ≀ C for every i β‰₯ 0. Given any real number a > 1, construct a bounded infinite sequence xβ‚€,x₁,xβ‚‚,... such that |xα΅’ - xβ±Ό|⬝|i - j| β‰₯ 1 for every pair of distinct nonnegative integers i, j. -/ abbrev Bounded (x : β„• β†’ ℝ) : Prop := βˆƒ C, βˆ€ i, |x i| ≀ C noncomputable abbrev solution (a : ℝ) (ha : 1 < a) : β„• β†’ ℝ := let t := 1/(2^a) let c := 1 - t/(1 - t) Ξ» n => if n = 0 then 0 else (1/c) * (βˆ‘ i ∈ Finset.filter (Ξ» i => (n / 2^i) % 2 = 1) (Finset.range (Nat.log2 n + 1)), t^i) theorem imo1991_p6 (a : ℝ) (ha : 1 < a) : Bounded (solution a ha) ∧ βˆ€ i j, i β‰  j β†’ 1 ≀ |solution a ha i - solution a ha j| * |(i:ℝ) - j| := by sorry
algebra
Imo1998P4
false
[ "number theory" ]
Imo1998P4
import Mathlib import Aesop set_option maxHeartbeats 0 open BigOperators Real Nat Topology Rat
/-! # International Mathematical Olympiad 1998, Problem 4 Determine all pairs (a, b) of positive integers such that ab^2 + b + 7 divides a^2b + a + b. -/
abbrev solution_set : Set (β„• Γ— β„•) := {(11, 1), (49, 1)} βˆͺ {(x,y) | βˆƒ k : β„• , (x = 7 * k^2 ∧ y = 7 * k)} theorem imo1998_p4 (a b : β„•) : (0 < a ∧ 0 < b ∧ a * b^2 + b + 7 ∣ a^2 * b + a + b) ↔ (a, b) ∈ solution_set := by sorry
test
import Mathlib import Aesop set_option maxHeartbeats 0 open BigOperators Real Nat Topology Rat /-! # International Mathematical Olympiad 1998, Problem 4 Determine all pairs (a, b) of positive integers such that ab^2 + b + 7 divides a^2b + a + b. -/ abbrev solution_set : Set (β„• Γ— β„•) := {(11, 1), (49, 1)} βˆͺ {(x,y) | βˆƒ k : β„• , (x = 7 * k^2 ∧ y = 7 * k)} theorem imo1998_p4 (a b : β„•) : (0 < a ∧ 0 < b ∧ a * b^2 + b + 7 ∣ a^2 * b + a + b) ↔ (a, b) ∈ solution_set := by sorry
number theory
Usa1996P1
true
[ "algebra" ]
Usa1996P1
import Mathlib import Aesop set_option maxHeartbeats 0 open BigOperators Real Nat Topology Rat
/-! # USA Mathematical Olympiad 1996, Problem 1 Prove that the average of the numbers n⬝sin(n Ο€ / 180) for n ∈ {2,4,6,…,180} is 1/tan(Ο€/180). -/
theorem usa1996_p1 : (1 / (90:ℝ)) * βˆ‘ n ∈ Finset.range 90, (2 * (n+1)) * Real.sin ((2 * (n+1)) * Real.pi / 180) = 1 / Real.tan (Real.pi / 180) := by sorry
test
import Mathlib import Aesop set_option maxHeartbeats 0 open BigOperators Real Nat Topology Rat /-! # USA Mathematical Olympiad 1996, Problem 1 Prove that the average of the numbers n⬝sin(n Ο€ / 180) for n ∈ {2,4,6,…,180} is 1/tan(Ο€/180). -/ theorem usa1996_p1 : (1 / (90:ℝ)) * βˆ‘ n ∈ Finset.range 90, (2 * (n+1)) * Real.sin ((2 * (n+1)) * Real.pi / 180) = 1 / Real.tan (Real.pi / 180) := by sorry
algebra
Usa1989P5
true
[ "algebra" ]
Usa1989P5
import Mathlib import Aesop set_option maxHeartbeats 0 open BigOperators Real Nat Topology Rat
/-! # USA Mathematical Olympiad 1989, Problem 5 Let u and v be real numbers such that (u + uΒ² + uΒ³ + β‹― + u⁸) + 10u⁹ = (v + vΒ² + vΒ³ + β‹― + v¹⁰) + 10vΒΉΒΉ = 8. Determine, with proof, which of the two numbers, u or v, is larger. -/
abbrev u_is_larger : Bool := false theorem usa1989_p5 (u v : ℝ) (hu : (βˆ‘ i ∈ Finset.range 8, u^(i + 1)) + 10 * u^9 = 8) (hv : (βˆ‘ i ∈ Finset.range 10, v^(i + 1)) + 10 * v^11 = 8) : if u_is_larger then v < u else u < v := by sorry
test
import Mathlib import Aesop set_option maxHeartbeats 0 open BigOperators Real Nat Topology Rat /-! # USA Mathematical Olympiad 1989, Problem 5 Let u and v be real numbers such that (u + uΒ² + uΒ³ + β‹― + u⁸) + 10u⁹ = (v + vΒ² + vΒ³ + β‹― + v¹⁰) + 10vΒΉΒΉ = 8. Determine, with proof, which of the two numbers, u or v, is larger. -/ abbrev u_is_larger : Bool := false theorem usa1989_p5 (u v : ℝ) (hu : (βˆ‘ i ∈ Finset.range 8, u^(i + 1)) + 10 * u^9 = 8) (hv : (βˆ‘ i ∈ Finset.range 10, v^(i + 1)) + 10 * v^11 = 8) : if u_is_larger then v < u else u < v := by sorry
algebra
Imo1990P3
true
[ "number theory" ]
Imo1990P3
import Mathlib import Aesop set_option maxHeartbeats 0 open BigOperators Real Nat Topology Rat
/-! # International Mathematical Olympiad 1990, Problem 3 Find all integers n > 1 such that n² divides 2ⁿ + 1. -/
abbrev solution_set : Set β„• := { 3 } theorem imo1990_p3 (n : β„•) (hn : 1 < n) : n ∈ solution_set ↔ n^2 ∣ 2^n + 1 := by sorry
test
import Mathlib import Aesop set_option maxHeartbeats 0 open BigOperators Real Nat Topology Rat /-! # International Mathematical Olympiad 1990, Problem 3 Find all integers n > 1 such that nΒ² divides 2ⁿ + 1. -/ abbrev solution_set : Set β„• := { 3 } theorem imo1990_p3 (n : β„•) (hn : 1 < n) : n ∈ solution_set ↔ n^2 ∣ 2^n + 1 := by sorry
number theory
Imo1994P4
false
[ "number theory" ]
Imo1994P4
import Mathlib import Aesop set_option maxHeartbeats 0 open BigOperators Real Nat Topology Rat
/-! # International Mathematical Olympiad 1994, Problem 4 Determine all ordered pairs of positive integers (m, n) such that (nΒ³ + 1) / (mn - 1) is an integer. -/
abbrev SolutionSet : Set (β„€ Γ— β„€) := {(1, 2), (1, 3), (2, 1), (2, 2), (2, 5), (3, 1), (3, 5), (5, 2), (5, 3)} theorem imo1994_p4 (m n : β„€) : (m, n) ∈ SolutionSet ↔ 0 < m ∧ 0 < n ∧ (m * n - 1) ∣ (n^3 + 1) := by sorry
test
import Mathlib import Aesop set_option maxHeartbeats 0 open BigOperators Real Nat Topology Rat /-! # International Mathematical Olympiad 1994, Problem 4 Determine all ordered pairs of positive integers (m, n) such that (nΒ³ + 1) / (mn - 1) is an integer. -/ abbrev SolutionSet : Set (β„€ Γ— β„€) := {(1, 2), (1, 3), (2, 1), (2, 2), (2, 5), (3, 1), (3, 5), (5, 2), (5, 3)} theorem imo1994_p4 (m n : β„€) : (m, n) ∈ SolutionSet ↔ 0 < m ∧ 0 < n ∧ (m * n - 1) ∣ (n^3 + 1) := by sorry
number theory
Imo1992P2
true
[ "algebra" ]
Imo1992P2
import Mathlib import Aesop set_option maxHeartbeats 0 open BigOperators Real Nat Topology Rat
/-! # International Mathematical Olympiad 1992, Problem 2 Determine all functions f : ℝ β†’ ℝ such that for all x,y ∈ ℝ, f(xΒ² + f(y)) = y + (f(x))Β². -/
abbrev solution_set : Set (ℝ β†’ ℝ) := { fun x ↦ x } theorem imo1992_p2 (f : ℝ β†’ ℝ) : f ∈ solution_set ↔ βˆ€ x y, f (x^2 + f y) = y + f x ^ 2 := by sorry
test
import Mathlib import Aesop set_option maxHeartbeats 0 open BigOperators Real Nat Topology Rat /-! # International Mathematical Olympiad 1992, Problem 2 Determine all functions f : ℝ β†’ ℝ such that for all x,y ∈ ℝ, f(xΒ² + f(y)) = y + (f(x))Β². -/ abbrev solution_set : Set (ℝ β†’ ℝ) := { fun x ↦ x } theorem imo1992_p2 (f : ℝ β†’ ℝ) : f ∈ solution_set ↔ βˆ€ x y, f (x^2 + f y) = y + f x ^ 2 := by sorry
algebra
Imo1981P6
true
[ "algebra" ]
Imo1981P6
import Mathlib import Aesop set_option maxHeartbeats 0 open BigOperators Real Nat Topology Rat
/-! # International Mathematical Olympiad 1981, Problem 6 Suppose that f : β„• Γ— β„• β†’ β„• satisfies 1) f (0, y) = y + 1 2) f (x + 1, 0) = f (x, 1), 3) f (x + 1, y + 1) = f (x, f (x + 1, y)) for all x y ∈ β„•. Determine f (4, 1981). -/
def no_eval (x : β„•) : β„• := x abbrev solution_value : β„• := no_eval ((2^Β·)^[1984] 1 - 3) theorem imo1981_p6 (f : β„• β†’ β„• β†’ β„•) (h1 : βˆ€ y, f 0 y = y + 1) (h2 : βˆ€ x, f (x + 1) 0 = f x 1) (h3 : βˆ€ x y, f (x + 1) (y + 1) = f x (f (x + 1) y)) : f 4 1981 = solution_value := by sorry
test
import Mathlib import Aesop set_option maxHeartbeats 0 open BigOperators Real Nat Topology Rat /-! # International Mathematical Olympiad 1981, Problem 6 Suppose that f : β„• Γ— β„• β†’ β„• satisfies 1) f (0, y) = y + 1 2) f (x + 1, 0) = f (x, 1), 3) f (x + 1, y + 1) = f (x, f (x + 1, y)) for all x y ∈ β„•. Determine f (4, 1981). -/ def no_eval (x : β„•) : β„• := x abbrev solution_value : β„• := no_eval ((2^Β·)^[1984] 1 - 3) theorem imo1981_p6 (f : β„• β†’ β„• β†’ β„•) (h1 : βˆ€ y, f 0 y = y + 1) (h2 : βˆ€ x, f (x + 1) 0 = f x 1) (h3 : βˆ€ x y, f (x + 1) (y + 1) = f x (f (x + 1) y)) : f 4 1981 = solution_value := by sorry
algebra
Singapore2019P2
true
[ "algebra" ]
Singapore2019P2
import Mathlib import Aesop set_option maxHeartbeats 0 open BigOperators Real Nat Topology Rat
/-! # Singapore Math Olympiad (Senior) 2019 (Round 1), Problem 2 http://www.realsutra.com/limjeck/SMO_Senior_2019.pdf Simplify $(sqrt{10} - sqrt{2})^{1/3} * (sqrt{10} + sqrt{2})^{7/3}$. -/
noncomputable abbrev solution : ℝ := 24 + 8 * √5 theorem singapore2019_r1_p2 : (√10 - √2)^(1 / 3 : ℝ) * (√10 + √2)^(7 / 3 : ℝ) = solution := by sorry
test
import Mathlib import Aesop set_option maxHeartbeats 0 open BigOperators Real Nat Topology Rat /-! # Singapore Math Olympiad (Senior) 2019 (Round 1), Problem 2 http://www.realsutra.com/limjeck/SMO_Senior_2019.pdf Simplify $(sqrt{10} - sqrt{2})^{1/3} * (sqrt{10} + sqrt{2})^{7/3}$. -/ noncomputable abbrev solution : ℝ := 24 + 8 * √5 theorem singapore2019_r1_p2 : (√10 - √2)^(1 / 3 : ℝ) * (√10 + √2)^(7 / 3 : ℝ) = solution := by sorry
algebra
Imo2012P4
true
[ "algebra" ]
Imo2012P4
import Mathlib import Aesop set_option maxHeartbeats 0 open BigOperators Real Nat Topology Rat
/-! # International Mathematical Olympiad 2012, Problem 4 Determine all functions f : β„€ β†’ β„€ such that for all integers a,b,c with a + b + c = 0, the following equality holds: f(a)Β² + f(b)Β² + f(c)Β² = 2f(a)f(b) + 2f(b)f(c) + 2f(c)f(a). -/
def odd_const : Set (β„€ β†’ β„€) := fun f => βˆƒ c : β„€, βˆ€ x : β„€, (Odd x β†’ f x = c) ∧ (Even x β†’ f x = 0) def mod4_cycle : Set (β„€ β†’ β„€) := fun f => βˆƒ c : β„€, βˆ€ x : β„€, f x = match x % 4 with | 0 => 0 | 2 => 4 * c | _ => c def square_set : Set (β„€ β†’ β„€) := fun f => βˆƒ c : β„€, βˆ€ x : β„€, f x = x ^ 2 * c abbrev solution_set : Set (β„€ β†’ β„€) := odd_const βˆͺ mod4_cycle βˆͺ square_set theorem imo2012_p4 (f : β„€ β†’ β„€) : f ∈ solution_set ↔ βˆ€ a b c : β„€, a + b + c = 0 β†’ (f a)^2 + (f b)^2 + (f c)^2 = 2 * f a * f b + 2 * f b * f c + 2 * f c * f a := by sorry
test
import Mathlib import Aesop set_option maxHeartbeats 0 open BigOperators Real Nat Topology Rat /-! # International Mathematical Olympiad 2012, Problem 4 Determine all functions f : β„€ β†’ β„€ such that for all integers a,b,c with a + b + c = 0, the following equality holds: f(a)Β² + f(b)Β² + f(c)Β² = 2f(a)f(b) + 2f(b)f(c) + 2f(c)f(a). -/ def odd_const : Set (β„€ β†’ β„€) := fun f => βˆƒ c : β„€, βˆ€ x : β„€, (Odd x β†’ f x = c) ∧ (Even x β†’ f x = 0) def mod4_cycle : Set (β„€ β†’ β„€) := fun f => βˆƒ c : β„€, βˆ€ x : β„€, f x = match x % 4 with | 0 => 0 | 2 => 4 * c | _ => c def square_set : Set (β„€ β†’ β„€) := fun f => βˆƒ c : β„€, βˆ€ x : β„€, f x = x ^ 2 * c abbrev solution_set : Set (β„€ β†’ β„€) := odd_const βˆͺ mod4_cycle βˆͺ square_set theorem imo2012_p4 (f : β„€ β†’ β„€) : f ∈ solution_set ↔ βˆ€ a b c : β„€, a + b + c = 0 β†’ (f a)^2 + (f b)^2 + (f c)^2 = 2 * f a * f b + 2 * f b * f c + 2 * f c * f a := by sorry
algebra
Imo2008P3
true
[ "number theory" ]
Imo2008P3
import Mathlib import Aesop set_option maxHeartbeats 0 open BigOperators Real Nat Topology Rat
/-! # International Mathematical Olympiad 2008, Problem 3 Prove that there exist infinitely many positive integers `n` such that `n^2 + 1` has a prime divisor which is greater than `2n + √(2n)`. -/
theorem imo2008_p3 : βˆ€ N : β„•, βˆƒ n : β„•, n β‰₯ N ∧ βˆƒ p : β„•, Nat.Prime p ∧ p ∣ n ^ 2 + 1 ∧ (p : ℝ) > 2 * (n : ℝ) + Real.sqrt (2 * (n : ℝ)) := by sorry
test
import Mathlib import Aesop set_option maxHeartbeats 0 open BigOperators Real Nat Topology Rat /-! # International Mathematical Olympiad 2008, Problem 3 Prove that there exist infinitely many positive integers `n` such that `n^2 + 1` has a prime divisor which is greater than `2n + √(2n)`. -/ theorem imo2008_p3 : βˆ€ N : β„•, βˆƒ n : β„•, n β‰₯ N ∧ βˆƒ p : β„•, Nat.Prime p ∧ p ∣ n ^ 2 + 1 ∧ (p : ℝ) > 2 * (n : ℝ) + Real.sqrt (2 * (n : ℝ)) := by sorry
number theory
Usa2002P1
true
[ "combinatorics" ]
Usa2002P1
import Mathlib import Aesop set_option maxHeartbeats 0 open BigOperators Real Nat Topology Rat
/-! # USA Mathematical Olympiad 2002, Problem 1 Let S be a set with 2002 elements, and let N be an integer with 0 ≀ N ≀ 2^2002. Prove that it is possible to color every subset of S either blue or red so that the following conditions hold: a) the union of any two red subsets is red; b) the union of any two blue subsets is blue; c) there are exactly N red subsets. -/
inductive Color : Type where | red : Color | blue : Color deriving DecidableEq, Fintype theorem usa2002_p1 {Ξ± : Type} [DecidableEq Ξ±] [Fintype Ξ±] (hs : Fintype.card Ξ± = 2002) (N : β„•) (hN : N ≀ 2 ^ 2002) : βˆƒ f : Finset Ξ± β†’ Color, ((βˆ€ s1 s2 : Finset Ξ±, f s1 = f s2 β†’ f (s1 βˆͺ s2) = f s1) ∧ (Fintype.card { a : Finset Ξ± // f a = Color.red } = N)) := by sorry
test
import Mathlib import Aesop set_option maxHeartbeats 0 open BigOperators Real Nat Topology Rat /-! # USA Mathematical Olympiad 2002, Problem 1 Let S be a set with 2002 elements, and let N be an integer with 0 ≀ N ≀ 2^2002. Prove that it is possible to color every subset of S either blue or red so that the following conditions hold: a) the union of any two red subsets is red; b) the union of any two blue subsets is blue; c) there are exactly N red subsets. -/ inductive Color : Type where | red : Color | blue : Color deriving DecidableEq, Fintype theorem usa2002_p1 {Ξ± : Type} [DecidableEq Ξ±] [Fintype Ξ±] (hs : Fintype.card Ξ± = 2002) (N : β„•) (hN : N ≀ 2 ^ 2002) : βˆƒ f : Finset Ξ± β†’ Color, ((βˆ€ s1 s2 : Finset Ξ±, f s1 = f s2 β†’ f (s1 βˆͺ s2) = f s1) ∧ (Fintype.card { a : Finset Ξ± // f a = Color.red } = N)) := by sorry
combinatorics
Bulgaria1998P3
true
[ "algebra" ]
Bulgaria1998P3
import Mathlib import Aesop set_option maxHeartbeats 0 open BigOperators Real Nat Topology Rat
/-! # Bulgarian Mathematical Olympiad 1998, Problem 3 Let ℝ⁺ be the set of positive real numbers. Prove that there does not exist a function f: ℝ⁺ β†’ ℝ⁺ such that (f(x))Β² β‰₯ f(x + y) * (f(x) + y) for every x,y ∈ ℝ⁺. -/
theorem bulgaria1998_p3 (f : ℝ β†’ ℝ) (hpos : βˆ€ x : ℝ, 0 < x β†’ 0 < f x) (hf : (βˆ€ x y : ℝ, 0 < x β†’ 0 < y β†’ (f (x + y)) * (f x + y) ≀ (f x)^2)) : False := by sorry
test
import Mathlib import Aesop set_option maxHeartbeats 0 open BigOperators Real Nat Topology Rat /-! # Bulgarian Mathematical Olympiad 1998, Problem 3 Let ℝ⁺ be the set of positive real numbers. Prove that there does not exist a function f: ℝ⁺ β†’ ℝ⁺ such that (f(x))Β² β‰₯ f(x + y) * (f(x) + y) for every x,y ∈ ℝ⁺. -/ theorem bulgaria1998_p3 (f : ℝ β†’ ℝ) (hpos : βˆ€ x : ℝ, 0 < x β†’ 0 < f x) (hf : (βˆ€ x y : ℝ, 0 < x β†’ 0 < y β†’ (f (x + y)) * (f x + y) ≀ (f x)^2)) : False := by sorry
algebra
Imo2022P2
true
[ "algebra" ]
Imo2022P2
import Mathlib import Aesop set_option maxHeartbeats 0 open BigOperators Real Nat Topology Rat
/-! # International Mathematical Olympiad 2022, Problem 2 Let ℝ+ be the set of positive real numbers. Determine all functions f: ℝ+ β†’ ℝ+ such that for each x ∈ ℝ+, there is exactly one y ∈ ℝ+ satisfying xΒ·f(y) + yΒ·f(x) ≀ 2 -/
abbrev PosReal : Type := { x : ℝ // 0 < x } notation "ℝ+" => PosReal abbrev solution_set : Set (ℝ+ β†’ ℝ+) := { fun x ↦ 1 / x } theorem imo2022_p2 (f : ℝ+ β†’ ℝ+) : f ∈ solution_set ↔ βˆ€ x, βˆƒ! y, x * f y + y * f x ≀ ⟨2, two_pos⟩ := by sorry
test
import Mathlib import Aesop set_option maxHeartbeats 0 open BigOperators Real Nat Topology Rat /-! # International Mathematical Olympiad 2022, Problem 2 Let ℝ+ be the set of positive real numbers. Determine all functions f: ℝ+ β†’ ℝ+ such that for each x ∈ ℝ+, there is exactly one y ∈ ℝ+ satisfying xΒ·f(y) + yΒ·f(x) ≀ 2 -/ abbrev PosReal : Type := { x : ℝ // 0 < x } notation "ℝ+" => PosReal abbrev solution_set : Set (ℝ+ β†’ ℝ+) := { fun x ↦ 1 / x } theorem imo2022_p2 (f : ℝ+ β†’ ℝ+) : f ∈ solution_set ↔ βˆ€ x, βˆƒ! y, x * f y + y * f x ≀ ⟨2, two_pos⟩ := by sorry
algebra
Imo1971P3
false
[ "number theory" ]
Imo1971P3
import Mathlib import Aesop set_option maxHeartbeats 0 open BigOperators Real Nat Topology Rat
/-! # International Mathematical Olympiad 1971, Problem 3 Prove that we can find an infinite set of positive integers of the form 2^n - 3 (where n is a positive integer) every pair of which are relatively prime. -/
theorem imo1971_p3 : Set.Infinite {(n, m) : β„• Γ— β„• | Nat.Coprime (2 ^ n - 3) (2 ^ m - 3)} := by sorry
test
import Mathlib import Aesop set_option maxHeartbeats 0 open BigOperators Real Nat Topology Rat /-! # International Mathematical Olympiad 1971, Problem 3 Prove that we can find an infinite set of positive integers of the form 2^n - 3 (where n is a positive integer) every pair of which are relatively prime. -/ theorem imo1971_p3 : Set.Infinite {(n, m) : β„• Γ— β„• | Nat.Coprime (2 ^ n - 3) (2 ^ m - 3)} := by sorry
number theory
Imo2003P1
false
[ "combinatorics" ]
Imo2003P1
import Mathlib import Aesop set_option maxHeartbeats 0 open BigOperators Real Nat Topology Rat
/-! # International Mathematical Olympiad 2003, Problem 1 Let A be a 101-element subset of S = {1,2,...10⁢}. Prove that there exist numbers t₁, tβ‚‚, ..., t₁₀₀ in S such that the sets Aβ±Ό = {x + tβ±Ό | x ∈ A}, j = 1,2, ..., 100 are pairwise disjoint. -/
abbrev S : Finset β„• := Finset.Icc 1 (10^6) theorem imo2003_p1 (A : Finset β„•) (hA : A βŠ† S) : βˆƒ t : Fin 100 β†’ S, βˆ€ i j, i β‰  j β†’ Disjoint {x + t i | x ∈ A} {x + t j | x ∈ A} := by sorry
test
import Mathlib import Aesop set_option maxHeartbeats 0 open BigOperators Real Nat Topology Rat /-! # International Mathematical Olympiad 2003, Problem 1 Let A be a 101-element subset of S = {1,2,...10⁢}. Prove that there exist numbers t₁, tβ‚‚, ..., t₁₀₀ in S such that the sets Aβ±Ό = {x + tβ±Ό | x ∈ A}, j = 1,2, ..., 100 are pairwise disjoint. -/ abbrev S : Finset β„• := Finset.Icc 1 (10^6) theorem imo2003_p1 (A : Finset β„•) (hA : A βŠ† S) : βˆƒ t : Fin 100 β†’ S, βˆ€ i j, i β‰  j β†’ Disjoint {x + t i | x ∈ A} {x + t j | x ∈ A} := by sorry
combinatorics
Canada1998P5
false
[ "algebra" ]
Canada1998P5
import Mathlib import Aesop set_option maxHeartbeats 0 open BigOperators Real Nat Topology Rat
/-! Canadian Mathematical Olympiad 1998, Problem 5 Let m be a positive integer. Define the sequence {aβ‚™} by aβ‚€ = 0, a₁ = m, and aβ‚™β‚Šβ‚ = mΒ²aβ‚™ - aₙ₋₁ for n β‰₯ 1. Prove that an ordered pair (a,b) of nonegative integers, with a ≀ b, is a solution of the equation (aΒ² + bΒ²) / (ab + 1) = mΒ² if an only if (a,b) = (aβ‚™,aβ‚™β‚Šβ‚) for some n β‰₯ 0. -/
def A (m : β„•) (hm : 0 < m) : β„• β†’ β„€ | 0 => 0 | 1 => (↑m) | n + 2 => (m : β„€)^2 * A m hm (n + 1) - A m hm n theorem canada1998_p5 (m : β„•) (hm : 0 < m) (a b : β„•) (hab : a ≀ b) : a^2 + b^2 = m^2 * (a * b + 1) ↔ βˆƒ n : β„•, (a:β„€) = A m hm n ∧ (b:β„€) = A m hm (n + 1) := by sorry
test
import Mathlib import Aesop set_option maxHeartbeats 0 open BigOperators Real Nat Topology Rat /-! Canadian Mathematical Olympiad 1998, Problem 5 Let m be a positive integer. Define the sequence {aβ‚™} by aβ‚€ = 0, a₁ = m, and aβ‚™β‚Šβ‚ = mΒ²aβ‚™ - aₙ₋₁ for n β‰₯ 1. Prove that an ordered pair (a,b) of nonegative integers, with a ≀ b, is a solution of the equation (aΒ² + bΒ²) / (ab + 1) = mΒ² if an only if (a,b) = (aβ‚™,aβ‚™β‚Šβ‚) for some n β‰₯ 0. -/ def A (m : β„•) (hm : 0 < m) : β„• β†’ β„€ | 0 => 0 | 1 => (↑m) | n + 2 => (m : β„€)^2 * A m hm (n + 1) - A m hm n theorem canada1998_p5 (m : β„•) (hm : 0 < m) (a b : β„•) (hab : a ≀ b) : a^2 + b^2 = m^2 * (a * b + 1) ↔ βˆƒ n : β„•, (a:β„€) = A m hm n ∧ (b:β„€) = A m hm (n + 1) := by sorry
algebra
Imo2018P2
true
[ "algebra" ]
Imo2018P2
import Mathlib import Aesop set_option maxHeartbeats 0 open BigOperators Real Nat Topology Rat
/-! # International Mathematical Olympiad 2018, Problem 2 Determine all integers n β‰₯ 3 such that there exist real numbers a₁, aβ‚‚, ..., aβ‚™ satisfying aα΅’aα΅’β‚Šβ‚ + 1 = aα΅’β‚Šβ‚‚, where the indices are taken mod n. -/
abbrev P {n : β„•} (a : ZMod n β†’ ℝ) := βˆ€ (i : ZMod n), a i * a (i + 1) + 1 = a (i + 2) abbrev solution_set : Set β„• := { n | 3 ≀ n ∧ 3 ∣ n } theorem imo2018_p2 (n : β„•) : n ∈ solution_set ↔ 3 ≀ n ∧ βˆƒ a : ZMod n β†’ ℝ, P a := by sorry
test
import Mathlib import Aesop set_option maxHeartbeats 0 open BigOperators Real Nat Topology Rat /-! # International Mathematical Olympiad 2018, Problem 2 Determine all integers n β‰₯ 3 such that there exist real numbers a₁, aβ‚‚, ..., aβ‚™ satisfying aα΅’aα΅’β‚Šβ‚ + 1 = aα΅’β‚Šβ‚‚, where the indices are taken mod n. -/ abbrev P {n : β„•} (a : ZMod n β†’ ℝ) := βˆ€ (i : ZMod n), a i * a (i + 1) + 1 = a (i + 2) abbrev solution_set : Set β„• := { n | 3 ≀ n ∧ 3 ∣ n } theorem imo2018_p2 (n : β„•) : n ∈ solution_set ↔ 3 ≀ n ∧ βˆƒ a : ZMod n β†’ ℝ, P a := by sorry
algebra
Imo2002P5
true
[ "algebra" ]
Imo2002P5
import Mathlib import Aesop set_option maxHeartbeats 0 open BigOperators Real Nat Topology Rat
/-! # International Mathematical Olympiad 2002, Problem 5 Determine all functions f : ℝ β†’ ℝ such that (f(x) + f(z))(f(y) + f(t)) = f(xy - zt) + f(xt + yz) for all real numbers x,y,z,t. -/
abbrev SolutionSet : Set (ℝ β†’ ℝ) := { fun x ↦ 0, fun x ↦ 1/2, fun x ↦ x^2 } theorem imo2002_p5 (f : ℝ β†’ ℝ) : f ∈ SolutionSet ↔ βˆ€ x y z t, (f x + f z) * (f y + f t) = f (x * y - z * t) + f (x * t + y * z) := by sorry
test
import Mathlib import Aesop set_option maxHeartbeats 0 open BigOperators Real Nat Topology Rat /-! # International Mathematical Olympiad 2002, Problem 5 Determine all functions f : ℝ β†’ ℝ such that (f(x) + f(z))(f(y) + f(t)) = f(xy - zt) + f(xt + yz) for all real numbers x,y,z,t. -/ abbrev SolutionSet : Set (ℝ β†’ ℝ) := { fun x ↦ 0, fun x ↦ 1/2, fun x ↦ x^2 } theorem imo2002_p5 (f : ℝ β†’ ℝ) : f ∈ SolutionSet ↔ βˆ€ x y z t, (f x + f z) * (f y + f t) = f (x * y - z * t) + f (x * t + y * z) := by sorry
algebra
Usa2001P4
true
[ "geometry" ]
Usa2001P4
import Mathlib import Aesop set_option maxHeartbeats 0 open BigOperators Real Nat Topology Rat
/-! # USA Mathematical Olympiad 2001, Problem 4 Let ABC be a triangle and P be any point such that PA, PB, PC are the sides of an obtuse triangle, with PA the longest side. Prove that ∠BAC is acute. -/
/- special open -/ open EuclideanGeometry theorem usa2001_p4 (A B C P X Y Z : EuclideanSpace ℝ (Fin 2)) (hABC : AffineIndependent ℝ ![A, B, C]) (hXYZ : AffineIndependent ℝ ![X, Y, Z]) (hPA : dist X Y = dist P A) (hPB : dist Y Z = dist P B) (hPC : dist Z X = dist P C) (hObtuse : Real.pi / 2 < ∠ X Z Y) : ∠ B A C < Real.pi / 2 := by sorry
test
import Mathlib import Aesop set_option maxHeartbeats 0 open BigOperators Real Nat Topology Rat /-! # USA Mathematical Olympiad 2001, Problem 4 Let ABC be a triangle and P be any point such that PA, PB, PC are the sides of an obtuse triangle, with PA the longest side. Prove that ∠BAC is acute. -/ /- special open -/ open EuclideanGeometry theorem usa2001_p4 (A B C P X Y Z : EuclideanSpace ℝ (Fin 2)) (hABC : AffineIndependent ℝ ![A, B, C]) (hXYZ : AffineIndependent ℝ ![X, Y, Z]) (hPA : dist X Y = dist P A) (hPB : dist Y Z = dist P B) (hPC : dist Z X = dist P C) (hObtuse : Real.pi / 2 < ∠ X Z Y) : ∠ B A C < Real.pi / 2 := by sorry
geometry
Imo2020P3
false
[ "combinatorics" ]
Imo2020P3
import Mathlib import Aesop set_option maxHeartbeats 0 open BigOperators Real Nat Topology Rat
/-! # International Mathematical Olympiad 2020, Problem 3 There are 4n pebbles of weights 1,2,3,...,4n. Each pebble is colored in one of n colors and there are four pebbles of each color. Show that we can arrange the pebbles into two piles such that the total weights of both piles are the same, and each pile contains two pebbles of each color. -/
/- special open -/ open Finset theorem imo2020_p3 {n : β„•} {c : Fin (4 * n) β†’ Fin n} (h : βˆ€ i, Finset.card (filter (Ξ» j => c j = i) univ) = 4) : βˆƒ S : Finset (Fin (4 * n)), βˆ‘ i ∈ S, ((i : β„•) + 1) = βˆ‘ i ∈ Sᢜ, ((i : β„•) + 1) ∧ βˆ€ i, Finset.card (filter (Ξ» j => c j = i) S) = 2 := by sorry
test
import Mathlib import Aesop set_option maxHeartbeats 0 open BigOperators Real Nat Topology Rat /-! # International Mathematical Olympiad 2020, Problem 3 There are 4n pebbles of weights 1,2,3,...,4n. Each pebble is colored in one of n colors and there are four pebbles of each color. Show that we can arrange the pebbles into two piles such that the total weights of both piles are the same, and each pile contains two pebbles of each color. -/ /- special open -/ open Finset theorem imo2020_p3 {n : β„•} {c : Fin (4 * n) β†’ Fin n} (h : βˆ€ i, Finset.card (filter (Ξ» j => c j = i) univ) = 4) : βˆƒ S : Finset (Fin (4 * n)), βˆ‘ i ∈ S, ((i : β„•) + 1) = βˆ‘ i ∈ Sᢜ, ((i : β„•) + 1) ∧ βˆ€ i, Finset.card (filter (Ξ» j => c j = i) S) = 2 := by sorry
combinatorics
Usa2023P2
true
[ "algebra" ]
Usa2023P2
import Mathlib import Aesop set_option maxHeartbeats 0 open BigOperators Real Nat Topology Rat
/-! # USA Mathematical Olympiad 2023, Problem 2 Let ℝ+ be the set of positive real numbers. Find all functions f: ℝ+ β†’ ℝ+ that satisfy the equation f(x⬝y + f(x)) = x⬝f(y) + 2 for all x,y ∈ ℝ+. -/
abbrev PosReal : Type := { x : ℝ // 0 < x } notation "ℝ+" => PosReal abbrev solution_set : Set (ℝ+ β†’ ℝ+) := { fun x ↦ x + 1 } theorem usa2023_p2 (f : ℝ+ β†’ ℝ+) : f ∈ solution_set ↔ βˆ€ x y, f (x * y + (f x)) = x * (f y) + ⟨2, two_pos⟩ := by sorry
test
import Mathlib import Aesop set_option maxHeartbeats 0 open BigOperators Real Nat Topology Rat /-! # USA Mathematical Olympiad 2023, Problem 2 Let ℝ+ be the set of positive real numbers. Find all functions f: ℝ+ β†’ ℝ+ that satisfy the equation f(x⬝y + f(x)) = x⬝f(y) + 2 for all x,y ∈ ℝ+. -/ abbrev PosReal : Type := { x : ℝ // 0 < x } notation "ℝ+" => PosReal abbrev solution_set : Set (ℝ+ β†’ ℝ+) := { fun x ↦ x + 1 } theorem usa2023_p2 (f : ℝ+ β†’ ℝ+) : f ∈ solution_set ↔ βˆ€ x y, f (x * y + (f x)) = x * (f y) + ⟨2, two_pos⟩ := by sorry
algebra
Imo2015P6
true
[ "algebra" ]
Imo2015P6
import Mathlib import Aesop set_option maxHeartbeats 0 open BigOperators Real Nat Topology Rat
/-! # International Mathematical Olympiad 2015, Problem 6 The sequence $a_1, a_2, \dots$ of integers satisfies the conditions 1. $1 ≀ a_j ≀ 2015$ for all $j β‰₯ 1$, 2. $k + a_k β‰  l + a_l$ for all $1 ≀ k < l$. Prove that there exist two positive integers $b$ and $N$ for which $$\left|\sum_{j=m+1}^n (a_j-b)\right| ≀ 1007^2$$ for all integers $m,n$ such that $N ≀ m < n$. -/
/-- The conditions on `a` in the problem. We reindex `a` to start from 0 rather than 1; `N` then only has to be nonnegative rather than positive, and the sum in the problem statement is over `Ico m n` rather than `Ioc m n`. -/ def Condition (a : β„• β†’ β„€) : Prop := (βˆ€ i, a i ∈ Finset.Icc 1 2015) ∧ Function.Injective fun i ↦ i + a i theorem imo2015_p6 (ha : Condition a) : βˆƒ b > 0, βˆƒ N, βˆ€ m β‰₯ N, βˆ€ n > m, |βˆ‘ j ∈ Finset.Ico m n, (a j - b)| ≀ 1007 ^ 2 := by sorry
test
import Mathlib import Aesop set_option maxHeartbeats 0 open BigOperators Real Nat Topology Rat /-! # International Mathematical Olympiad 2015, Problem 6 The sequence $a_1, a_2, \dots$ of integers satisfies the conditions 1. $1 ≀ a_j ≀ 2015$ for all $j β‰₯ 1$, 2. $k + a_k β‰  l + a_l$ for all $1 ≀ k < l$. Prove that there exist two positive integers $b$ and $N$ for which $$\left|\sum_{j=m+1}^n (a_j-b)\right| ≀ 1007^2$$ for all integers $m,n$ such that $N ≀ m < n$. -/ /-- The conditions on `a` in the problem. We reindex `a` to start from 0 rather than 1; `N` then only has to be nonnegative rather than positive, and the sum in the problem statement is over `Ico m n` rather than `Ioc m n`. -/ def Condition (a : β„• β†’ β„€) : Prop := (βˆ€ i, a i ∈ Finset.Icc 1 2015) ∧ Function.Injective fun i ↦ i + a i theorem imo2015_p6 (ha : Condition a) : βˆƒ b > 0, βˆƒ N, βˆ€ m β‰₯ N, βˆ€ n > m, |βˆ‘ j ∈ Finset.Ico m n, (a j - b)| ≀ 1007 ^ 2 := by sorry
algebra
Imo1985P6
true
[ "algebra" ]
Imo1985P6
import Mathlib import Aesop set_option maxHeartbeats 0 open BigOperators Real Nat Topology Rat
/-! # International Mathematical Olympiad 1985, Problem 6 For every real number x_1, construct the sequence {x_1,x_2, ...} by setting x_{n+1} = x_n * (x_n + 1 / n) for each n >= 1. Prove that there exists exactly one value of x_1 for which 0 < x_n , x_n < x_{n+1}, and x_{n+1} < 1 for every n. -/
theorem imo_1985_p6 (f : β„• β†’ ℝ β†’ ℝ) (hβ‚€ : βˆ€ x, f 1 x = x) (h₁ : βˆ€ n x, 0 < n β†’ f (n + 1) x = f n x * (f n x + 1 / n)) : βˆƒ! a, βˆ€ n, 0 < n β†’ 0 < f n a ∧ f n a < f (n + 1) a ∧ f (n + 1) a < 1 := by sorry
test
import Mathlib import Aesop set_option maxHeartbeats 0 open BigOperators Real Nat Topology Rat /-! # International Mathematical Olympiad 1985, Problem 6 For every real number x_1, construct the sequence {x_1,x_2, ...} by setting x_{n+1} = x_n * (x_n + 1 / n) for each n >= 1. Prove that there exists exactly one value of x_1 for which 0 < x_n , x_n < x_{n+1}, and x_{n+1} < 1 for every n. -/ theorem imo_1985_p6 (f : β„• β†’ ℝ β†’ ℝ) (hβ‚€ : βˆ€ x, f 1 x = x) (h₁ : βˆ€ n x, 0 < n β†’ f (n + 1) x = f n x * (f n x + 1 / n)) : βˆƒ! a, βˆ€ n, 0 < n β†’ 0 < f n a ∧ f n a < f (n + 1) a ∧ f (n + 1) a < 1 := by sorry
algebra
Imo1959P2b
true
[ "algebra" ]
Imo1959P2b
import Mathlib import Aesop set_option maxHeartbeats 0 open BigOperators Real Nat Topology Rat
/-! # International Mathematical Olympiad 1959, Problem 2 For what real values of x is √(x+√(2x-1)) + √(x-√(2x-1)) = A, given: (a) A = √2 (b) A = 1 (c) A = 2, where only non-negative real numbers are admitted for square roots? -/
/- special open -/ open Set def IsGood (x A : ℝ) : Prop := sqrt (x + sqrt (2 * x - 1)) + sqrt (x - sqrt (2 * x - 1)) = A ∧ 0 ≀ 2 * x - 1 ∧ 0 ≀ x + sqrt (2 * x - 1) ∧ 0 ≀ x - sqrt (2 * x - 1) variable {x A : ℝ} abbrev solution_set_one : Set ℝ := βˆ… theorem imo1959_p2b : IsGood x 1 ↔ x ∈ solution_set_one := by sorry
test
import Mathlib import Aesop set_option maxHeartbeats 0 open BigOperators Real Nat Topology Rat /-! # International Mathematical Olympiad 1959, Problem 2 For what real values of x is √(x+√(2x-1)) + √(x-√(2x-1)) = A, given: (a) A = √2 (b) A = 1 (c) A = 2, where only non-negative real numbers are admitted for square roots? -/ /- special open -/ open Set def IsGood (x A : ℝ) : Prop := sqrt (x + sqrt (2 * x - 1)) + sqrt (x - sqrt (2 * x - 1)) = A ∧ 0 ≀ 2 * x - 1 ∧ 0 ≀ x + sqrt (2 * x - 1) ∧ 0 ≀ x - sqrt (2 * x - 1) variable {x A : ℝ} abbrev solution_set_one : Set ℝ := βˆ… theorem imo1959_p2b : IsGood x 1 ↔ x ∈ solution_set_one := by sorry
algebra
Imo1968P5a
true
[ "algebra" ]
Imo1968P5a
import Mathlib import Aesop set_option maxHeartbeats 0 open BigOperators Real Nat Topology Rat
/-! # International Mathematical Olympiad 1968, Problem 5 Let f be a real-valued function defined for all real numbers x such that, for some positive constant a, the equation f(x + a) = a/2 + √(f(x) - (f(x))²) holds for all x. (a) Prove that the function f is periodic. -/
abbrev P (a : ℝ) (f : ℝ β†’ ℝ) : Prop := 0 < a ∧ βˆ€ x, (f x)^2 ≀ f x ∧ f (x + a) = 1/2 + √(f x - (f x)^2) theorem imo1968_p5a (f : ℝ β†’ ℝ) (a : ℝ) (hf : P a f) : βˆƒ b, 0 < b ∧ f.Periodic b := by sorry
test
import Mathlib import Aesop set_option maxHeartbeats 0 open BigOperators Real Nat Topology Rat /-! # International Mathematical Olympiad 1968, Problem 5 Let f be a real-valued function defined for all real numbers x such that, for some positive constant a, the equation f(x + a) = a/2 + √(f(x) - (f(x))Β²) holds for all x. (a) Prove that the function f is periodic. -/ abbrev P (a : ℝ) (f : ℝ β†’ ℝ) : Prop := 0 < a ∧ βˆ€ x, (f x)^2 ≀ f x ∧ f (x + a) = 1/2 + √(f x - (f x)^2) theorem imo1968_p5a (f : ℝ β†’ ℝ) (a : ℝ) (hf : P a f) : βˆƒ b, 0 < b ∧ f.Periodic b := by sorry
algebra
Imo1984P2
true
[ "number theory" ]
Imo1984P2
import Mathlib import Aesop set_option maxHeartbeats 0 open BigOperators Real Nat Topology Rat
/-! # International Mathematical Olympiad 1984, Problem 2 Find a pair of positive integers a and b such that (i) ab(a + b) is not divisible by 7. (ii) (a + b)⁷ - a⁷ - b⁷ is divisible by 7⁷. -/
abbrev a : β„€ := 18 abbrev b : β„€ := 1 theorem imo1984_p2 : (0 < a) ∧ (0 < b) ∧ (Β¬ 7 ∣ a * b * (a + b)) ∧ 7^7 ∣ (a + b)^7 - a^7 - b^7 := by sorry
test
import Mathlib import Aesop set_option maxHeartbeats 0 open BigOperators Real Nat Topology Rat /-! # International Mathematical Olympiad 1984, Problem 2 Find a pair of positive integers a and b such that (i) ab(a + b) is not divisible by 7. (ii) (a + b)⁷ - a⁷ - b⁷ is divisible by 7⁷. -/ abbrev a : β„€ := 18 abbrev b : β„€ := 1 theorem imo1984_p2 : (0 < a) ∧ (0 < b) ∧ (Β¬ 7 ∣ a * b * (a + b)) ∧ 7^7 ∣ (a + b)^7 - a^7 - b^7 := by sorry
number theory
Bulgaria1998P8
true
[ "algebra" ]
Bulgaria1998P8
import Mathlib import Aesop set_option maxHeartbeats 0 open BigOperators Real Nat Topology Rat
/-! # Bulgarian Mathematical Olympiad 1998, Problem 8 The polynomials Pβ‚™(x,y) for n = 1, 2, ... are defined by P₁(x,y) = 1 and Pβ‚™β‚Šβ‚(x,y) = (x + y - 1)(y + 1)Pβ‚™(x,y+2) + (y - yΒ²)Pβ‚™(x,y) Prove that Pβ‚™(x,y) = Pβ‚™(y,x) for all x,y,n. -/
variable {R : Type} [CommRing R] def P : β„• β†’ R β†’ R β†’ R | 0, _, _ => 1 | n+1, x, y => (x + y - 1) * (y + 1) * P n x (y + 2) + (y - y^2) * P n x y theorem bulgaria1998_p8 (n : β„•) (x y : R) : P n x y = P n y x := by sorry
test
import Mathlib import Aesop set_option maxHeartbeats 0 open BigOperators Real Nat Topology Rat /-! # Bulgarian Mathematical Olympiad 1998, Problem 8 The polynomials Pβ‚™(x,y) for n = 1, 2, ... are defined by P₁(x,y) = 1 and Pβ‚™β‚Šβ‚(x,y) = (x + y - 1)(y + 1)Pβ‚™(x,y+2) + (y - yΒ²)Pβ‚™(x,y) Prove that Pβ‚™(x,y) = Pβ‚™(y,x) for all x,y,n. -/ variable {R : Type} [CommRing R] def P : β„• β†’ R β†’ R β†’ R | 0, _, _ => 1 | n+1, x, y => (x + y - 1) * (y + 1) * P n x (y + 2) + (y - y^2) * P n x y theorem bulgaria1998_p8 (n : β„•) (x y : R) : P n x y = P n y x := by sorry
algebra
Imo1998P3
false
[ "number theory" ]
Imo1998P3
import Mathlib import Aesop set_option maxHeartbeats 0 open BigOperators Real Nat Topology Rat
/-! # International Mathematical Olympiad 1998, Problem 3 For any positive integer $n$, let $d(n)$ denote the number of positive divisors of $n$ (including 1 and $n$ itself). Determine all positive integers $k$ such that $d(n^2)/d(n) = k$ for some $n$. -/
abbrev solution_set : Set β„• := {x | βˆƒ k : β„• , x = 2 * k + 1} theorem imo1998_p3 (k : β„•) : k ∈ solution_set ↔ βˆƒ n : β„•, (Finset.card (Nat.divisors (n ^ 2))) = k * Finset.card (Nat.divisors n) := by sorry
test
import Mathlib import Aesop set_option maxHeartbeats 0 open BigOperators Real Nat Topology Rat /-! # International Mathematical Olympiad 1998, Problem 3 For any positive integer $n$, let $d(n)$ denote the number of positive divisors of $n$ (including 1 and $n$ itself). Determine all positive integers $k$ such that $d(n^2)/d(n) = k$ for some $n$. -/ abbrev solution_set : Set β„• := {x | βˆƒ k : β„• , x = 2 * k + 1} theorem imo1998_p3 (k : β„•) : k ∈ solution_set ↔ βˆƒ n : β„•, (Finset.card (Nat.divisors (n ^ 2))) = k * Finset.card (Nat.divisors n) := by sorry
number theory
Usa1992P1
true
[ "algebra" ]
Usa1992P1
import Mathlib import Aesop set_option maxHeartbeats 0 open BigOperators Real Nat Topology Rat
/-! # USA Mathematical Olympiad 1992, Problem 1 Find, as a function of n, the sum of the digits of 9 Γ— 99 Γ— 9999 Γ— ... Γ— (10^2ⁿ - 1), where each factor has twice as many digits as the last one. -/
abbrev solution : β„• β†’ β„• := fun n ↦ 9 * 2 ^ n theorem usa1992_p1 (n : β„•) : (Nat.digits 10 (∏ i ∈ Finset.range (n + 1), (10^(2^i) - 1))).sum = solution n := by sorry
test
import Mathlib import Aesop set_option maxHeartbeats 0 open BigOperators Real Nat Topology Rat /-! # USA Mathematical Olympiad 1992, Problem 1 Find, as a function of n, the sum of the digits of 9 Γ— 99 Γ— 9999 Γ— ... Γ— (10^2ⁿ - 1), where each factor has twice as many digits as the last one. -/ abbrev solution : β„• β†’ β„• := fun n ↦ 9 * 2 ^ n theorem usa1992_p1 (n : β„•) : (Nat.digits 10 (∏ i ∈ Finset.range (n + 1), (10^(2^i) - 1))).sum = solution n := by sorry
algebra
Imo1982P4
false
[ "number theory" ]
Imo1982P4
import Mathlib import Aesop set_option maxHeartbeats 0 open BigOperators Real Nat Topology Rat
/-! # International Mathematical Olympiad 1982, Problem 4 Prove that if n is a positive integer such that the equation x3 - 3xy^2 + y^3 = n has a solution in integers x, y, then it has at least three such solutions. Show that the equation has no solutions in integers for n = 2891. -/
theorem imo1982_p4 (n : β„•) (hn : 0 < n) (hxy : βˆƒ x y : β„€, x^3 - 3 * x * y^2 + y^3 = n) : (n β‰  2891) ∧ βˆƒ x1 x2 x3 y1 y2 y3 : β„€, (x1^3 - 3 * x1 * y1^2 + y1^3 = n ∧ x2^3 - 3 * x2 * y2^2 + y2^3 = n ∧ x3^3 - 3 * x3 * y3^2 + y3^3 = n ∧ (x1 β‰  x2 ∨ y1 β‰  y2) ∧ (x1 β‰  x3 ∨ y1 β‰  y3) ∧ (x2 β‰  x3 ∨ y2 β‰  y3)) := by sorry
test
import Mathlib import Aesop set_option maxHeartbeats 0 open BigOperators Real Nat Topology Rat /-! # International Mathematical Olympiad 1982, Problem 4 Prove that if n is a positive integer such that the equation x3 - 3xy^2 + y^3 = n has a solution in integers x, y, then it has at least three such solutions. Show that the equation has no solutions in integers for n = 2891. -/ theorem imo1982_p4 (n : β„•) (hn : 0 < n) (hxy : βˆƒ x y : β„€, x^3 - 3 * x * y^2 + y^3 = n) : (n β‰  2891) ∧ βˆƒ x1 x2 x3 y1 y2 y3 : β„€, (x1^3 - 3 * x1 * y1^2 + y1^3 = n ∧ x2^3 - 3 * x2 * y2^2 + y2^3 = n ∧ x3^3 - 3 * x3 * y3^2 + y3^3 = n ∧ (x1 β‰  x2 ∨ y1 β‰  y2) ∧ (x1 β‰  x3 ∨ y1 β‰  y3) ∧ (x2 β‰  x3 ∨ y2 β‰  y3)) := by sorry
number theory
Usa1981P5
true
[ "algebra" ]
Usa1981P5
import Mathlib import Aesop set_option maxHeartbeats 0 open BigOperators Real Nat Topology Rat
/-! # USA Mathematical Olympiad 1981, Problem 5 Show that for any positive real number x and any nonnegative integer n, βˆ‘β‚– (⌊kxβŒ‹/k) ≀ ⌊nxβŒ‹ where the sum goes from k = 1 to k = n, inclusive. -/
theorem usa1981_p5 (x : ℝ) (n : β„•) : βˆ‘ k ∈ Finset.Icc 1 n, ((⌊k * xβŒ‹:ℝ)/k) ≀ ⌊n * xβŒ‹ := by sorry
test
import Mathlib import Aesop set_option maxHeartbeats 0 open BigOperators Real Nat Topology Rat /-! # USA Mathematical Olympiad 1981, Problem 5 Show that for any positive real number x and any nonnegative integer n, βˆ‘β‚– (⌊kxβŒ‹/k) ≀ ⌊nxβŒ‹ where the sum goes from k = 1 to k = n, inclusive. -/ theorem usa1981_p5 (x : ℝ) (n : β„•) : βˆ‘ k ∈ Finset.Icc 1 n, ((⌊k * xβŒ‹:ℝ)/k) ≀ ⌊n * xβŒ‹ := by sorry
algebra
Imo2006P5
true
[ "number theory" ]
Imo2006P5
import Mathlib import Aesop set_option maxHeartbeats 0 open BigOperators Real Nat Topology Rat
/-! # International Mathematical Olympiad 2006, Problem 5 Let $P(x)$ be a polynomial of degree $n>1$ with integer coefficients, and let $k$ be a positive integer. Consider the polynomial $Q(x) = P(P(\ldots P(P(x))\ldots))$, where $P$ occurs $k$ times. Prove that there are at most $n$ integers $t$ such that $Q(t)=t$. -/
/- special open -/ open Function Polynomial theorem imo2006_p5 {P : Polynomial β„€} (hP : 1 < P.natDegree) {k : β„•} (hk : 0 < k) : (P.comp^[k] X - X).roots.toFinset.card ≀ P.natDegree := by sorry
test
import Mathlib import Aesop set_option maxHeartbeats 0 open BigOperators Real Nat Topology Rat /-! # International Mathematical Olympiad 2006, Problem 5 Let $P(x)$ be a polynomial of degree $n>1$ with integer coefficients, and let $k$ be a positive integer. Consider the polynomial $Q(x) = P(P(\ldots P(P(x))\ldots))$, where $P$ occurs $k$ times. Prove that there are at most $n$ integers $t$ such that $Q(t)=t$. -/ /- special open -/ open Function Polynomial theorem imo2006_p5 {P : Polynomial β„€} (hP : 1 < P.natDegree) {k : β„•} (hk : 0 < k) : (P.comp^[k] X - X).roots.toFinset.card ≀ P.natDegree := by sorry
number theory
Imo1969P2
true
[ "algebra" ]
Imo1969P2
import Mathlib import Aesop set_option maxHeartbeats 0 open BigOperators Real Nat Topology Rat
/-! # International Mathematical Olympiad 1969, Problem 2 Let a₁, aβ‚‚, ..., aβ‚™ be real constants, x be a real variable, and f(x) = cos(a₁ + x) + (1/2)cos(aβ‚‚ + x) + (1/4)cos(a₃ + x) + ... + (1/2ⁿ⁻¹)cos(aβ‚™ + x). Given that f(x₁) = f(xβ‚‚) = 0 for some x₁, xβ‚‚, prove that xβ‚‚ - x₁ = mΟ€ for some integer m. -/
theorem imo1969_p2 (x₁ xβ‚‚ : ℝ) (n : β„•) (a : β„• β†’ ℝ) (f : ℝ β†’ ℝ) (h₁ : βˆ€ x, f x = βˆ‘ i ∈ Finset.range n, (Real.cos (a i + x)) / (2^i)) (hβ‚‚ : f xβ‚‚ = 0) (h₃ : f x₁ = 0) (hβ‚„: βˆ‘ i ∈ Finset.range n, (Real.cos (a i) / (2 ^ i)) β‰  0) : βˆƒ m : β„€, xβ‚‚ - x₁ = m * Real.pi := by sorry
test
import Mathlib import Aesop set_option maxHeartbeats 0 open BigOperators Real Nat Topology Rat /-! # International Mathematical Olympiad 1969, Problem 2 Let a₁, aβ‚‚, ..., aβ‚™ be real constants, x be a real variable, and f(x) = cos(a₁ + x) + (1/2)cos(aβ‚‚ + x) + (1/4)cos(a₃ + x) + ... + (1/2ⁿ⁻¹)cos(aβ‚™ + x). Given that f(x₁) = f(xβ‚‚) = 0 for some x₁, xβ‚‚, prove that xβ‚‚ - x₁ = mΟ€ for some integer m. -/ theorem imo1969_p2 (x₁ xβ‚‚ : ℝ) (n : β„•) (a : β„• β†’ ℝ) (f : ℝ β†’ ℝ) (h₁ : βˆ€ x, f x = βˆ‘ i ∈ Finset.range n, (Real.cos (a i + x)) / (2^i)) (hβ‚‚ : f xβ‚‚ = 0) (h₃ : f x₁ = 0) (hβ‚„: βˆ‘ i ∈ Finset.range n, (Real.cos (a i) / (2 ^ i)) β‰  0) : βˆƒ m : β„€, xβ‚‚ - x₁ = m * Real.pi := by sorry
algebra
Imo1960P1
true
[ "number theory" ]
Imo1960P1
import Mathlib import Aesop set_option maxHeartbeats 0 open BigOperators Real Nat Topology Rat
/-! # International Mathematical Olympiad 1960, Problem 1 Determine all three-digit numbers N having the property that N is divisible by 11, and N/11 is equal to the sum of the squares of the digits of N. -/
def sumOfSquares (L : List β„•) : β„• := (L.map fun x => x * x).sum def ProblemPredicate (n : β„•) : Prop := (Nat.digits 10 n).length = 3 ∧ 11 ∣ n ∧ n / 11 = sumOfSquares (Nat.digits 10 n) abbrev SolutionPredicate (n : β„•) : Prop := n = 550 ∨ n = 803 theorem imo1960_p1 (n : β„•) : ProblemPredicate n ↔ SolutionPredicate n := by sorry
test
import Mathlib import Aesop set_option maxHeartbeats 0 open BigOperators Real Nat Topology Rat /-! # International Mathematical Olympiad 1960, Problem 1 Determine all three-digit numbers N having the property that N is divisible by 11, and N/11 is equal to the sum of the squares of the digits of N. -/ def sumOfSquares (L : List β„•) : β„• := (L.map fun x => x * x).sum def ProblemPredicate (n : β„•) : Prop := (Nat.digits 10 n).length = 3 ∧ 11 ∣ n ∧ n / 11 = sumOfSquares (Nat.digits 10 n) abbrev SolutionPredicate (n : β„•) : Prop := n = 550 ∨ n = 803 theorem imo1960_p1 (n : β„•) : ProblemPredicate n ↔ SolutionPredicate n := by sorry
number theory
Usa2023P5
false
[ "combinatorics" ]
Usa2023P5
import Mathlib import Aesop set_option maxHeartbeats 0 open BigOperators Real Nat Topology Rat
/-! # USA Mathematical Olympiad 2023, Problem 5 Let n be an integer greater than 2. We will be arranging the numbers 1, 2, ... nΒ² into an n Γ— n grid. Such an arrangement is called *row-valid* if the numbers in each row can be permuted to make an arithmetic progression. Similarly, such an arrangement is called *column-valid* if the numbers in each column can be permuted to make an arithmetic progression. Determine the values of n for which it possible to transform any row-valid arrangement into a column-valid arrangement by permuting the numbers in each row. -/
def PermutedArithSeq {n : β„•} (hn : 0 < n) (a : Fin n β†ͺ Fin (n^2)) : Prop := βˆƒ p : Fin n β†’ Fin n, p.Bijective ∧ βˆƒ k : β„•, βˆ€ m : Fin n, (a (p m)).val = a (p ⟨0, hn⟩) + m.val * k def row_valid {n : β„•} (hn : 0 < n) (a : Fin n β†’ Fin n β†’ Fin (n^2)) (ha : a.Injective2) : Prop := βˆ€ r : Fin n, PermutedArithSeq hn ⟨(a r Β·), Function.Injective2.right ha r⟩ def col_valid {n : β„•} (hn : 0 < n) (a : Fin n β†’ Fin n β†’ Fin (n^2)) (ha : a.Injective2) : Prop := βˆ€ c : Fin n, PermutedArithSeq hn ⟨(a Β· c), Function.Injective2.left ha c⟩ lemma injective_of_permuted_rows {Ξ± Ξ² Ξ³ : Type} {f : Ξ± β†’ Ξ² β†’ Ξ³} (hf : f.Injective2) {p : Ξ± β†’ Ξ² β†’ Ξ²} (hp : βˆ€ a, (p a).Injective) : Function.Injective2 (fun r c ↦ f r (p r c)) := by intro a1 a2 b1 b2 hab obtain ⟨ha1, hp1⟩ := hf hab rw [ha1] at * rw [hp a2 hp1] simp only [and_self] abbrev solution_set : Set β„• := { n | n.Prime } theorem usa2023_p5 (n : β„•) (hn : 2 < n) : n ∈ solution_set ↔ (βˆ€ a : (Fin n β†’ Fin n β†’ Fin (n^2)), (ha : a.Injective2) β†’ row_valid (Nat.zero_lt_of_lt hn) a ha β†’ βˆƒ p : Fin n β†’ Fin n β†’ Fin n, βˆƒ hp : (βˆ€ r, (p r).Injective), col_valid (Nat.zero_lt_of_lt hn) (fun r c ↦ a r (p r c)) (injective_of_permuted_rows ha hp)) := by sorry
test
import Mathlib import Aesop set_option maxHeartbeats 0 open BigOperators Real Nat Topology Rat /-! # USA Mathematical Olympiad 2023, Problem 5 Let n be an integer greater than 2. We will be arranging the numbers 1, 2, ... nΒ² into an n Γ— n grid. Such an arrangement is called *row-valid* if the numbers in each row can be permuted to make an arithmetic progression. Similarly, such an arrangement is called *column-valid* if the numbers in each column can be permuted to make an arithmetic progression. Determine the values of n for which it possible to transform any row-valid arrangement into a column-valid arrangement by permuting the numbers in each row. -/ def PermutedArithSeq {n : β„•} (hn : 0 < n) (a : Fin n β†ͺ Fin (n^2)) : Prop := βˆƒ p : Fin n β†’ Fin n, p.Bijective ∧ βˆƒ k : β„•, βˆ€ m : Fin n, (a (p m)).val = a (p ⟨0, hn⟩) + m.val * k def row_valid {n : β„•} (hn : 0 < n) (a : Fin n β†’ Fin n β†’ Fin (n^2)) (ha : a.Injective2) : Prop := βˆ€ r : Fin n, PermutedArithSeq hn ⟨(a r Β·), Function.Injective2.right ha r⟩ def col_valid {n : β„•} (hn : 0 < n) (a : Fin n β†’ Fin n β†’ Fin (n^2)) (ha : a.Injective2) : Prop := βˆ€ c : Fin n, PermutedArithSeq hn ⟨(a Β· c), Function.Injective2.left ha c⟩ lemma injective_of_permuted_rows {Ξ± Ξ² Ξ³ : Type} {f : Ξ± β†’ Ξ² β†’ Ξ³} (hf : f.Injective2) {p : Ξ± β†’ Ξ² β†’ Ξ²} (hp : βˆ€ a, (p a).Injective) : Function.Injective2 (fun r c ↦ f r (p r c)) := by intro a1 a2 b1 b2 hab obtain ⟨ha1, hp1⟩ := hf hab rw [ha1] at * rw [hp a2 hp1] simp only [and_self] abbrev solution_set : Set β„• := { n | n.Prime } theorem usa2023_p5 (n : β„•) (hn : 2 < n) : n ∈ solution_set ↔ (βˆ€ a : (Fin n β†’ Fin n β†’ Fin (n^2)), (ha : a.Injective2) β†’ row_valid (Nat.zero_lt_of_lt hn) a ha β†’ βˆƒ p : Fin n β†’ Fin n β†’ Fin n, βˆƒ hp : (βˆ€ r, (p r).Injective), col_valid (Nat.zero_lt_of_lt hn) (fun r c ↦ a r (p r c)) (injective_of_permuted_rows ha hp)) := by sorry
combinatorics
Imo1973P5
false
[ "algebra" ]
Imo1973P5
import Mathlib import Aesop set_option maxHeartbeats 0 open BigOperators Real Nat Topology Rat
/-! # International Mathematical Olympiad 1973, Problem 5 $G$ is a set of non-constant functions of the real variable $x$ of the form \[f(x) = ax + b, a \text{ and } b \text{ are real numbers,}\] and $G$ has the following properties: (a) If $f$ and $g$ are in $G$, then $g \circ f$ is in $G$; here $(g \circ f)(x) = g[f(x)]$. (b) If $f$ is in $G$, then its inverse $f^{-1}$ is in $G$; here the inverse of $f(x) = ax + b$ is $f^{-1}(x) = (x - b) / a$. (c) For every $f$ in $G$, there exists a real number $x_f$ such that $f(x_f) = x_f$. Prove that there exists a real number $k$ such that $f(k) = k$ for all $f$ in $G$. -/
theorem imo1973_p5 {G : Set (ℝ β†’ ℝ)} (hf: βˆ€ f ∈ G, βˆƒ a b : ℝ, a β‰  0 ∧ βˆ€ x : ℝ, f x = a * x + b) (hG : βˆ€ f ∈ G, βˆ€ g ∈ G, g ∘ f ∈ G) (hinv : βˆ€ f ∈ G, (βˆ€ x, f x β‰  0) β†’ f⁻¹ ∈ G) (hfix : βˆ€ f ∈ G, βˆƒ x, f x = x) : βˆƒ k : ℝ, βˆ€ f ∈ G, f k = k := by sorry
test
import Mathlib import Aesop set_option maxHeartbeats 0 open BigOperators Real Nat Topology Rat /-! # International Mathematical Olympiad 1973, Problem 5 $G$ is a set of non-constant functions of the real variable $x$ of the form \[f(x) = ax + b, a \text{ and } b \text{ are real numbers,}\] and $G$ has the following properties: (a) If $f$ and $g$ are in $G$, then $g \circ f$ is in $G$; here $(g \circ f)(x) = g[f(x)]$. (b) If $f$ is in $G$, then its inverse $f^{-1}$ is in $G$; here the inverse of $f(x) = ax + b$ is $f^{-1}(x) = (x - b) / a$. (c) For every $f$ in $G$, there exists a real number $x_f$ such that $f(x_f) = x_f$. Prove that there exists a real number $k$ such that $f(k) = k$ for all $f$ in $G$. -/ theorem imo1973_p5 {G : Set (ℝ β†’ ℝ)} (hf: βˆ€ f ∈ G, βˆƒ a b : ℝ, a β‰  0 ∧ βˆ€ x : ℝ, f x = a * x + b) (hG : βˆ€ f ∈ G, βˆ€ g ∈ G, g ∘ f ∈ G) (hinv : βˆ€ f ∈ G, (βˆ€ x, f x β‰  0) β†’ f⁻¹ ∈ G) (hfix : βˆ€ f ∈ G, βˆƒ x, f x = x) : βˆƒ k : ℝ, βˆ€ f ∈ G, f k = k := by sorry
algebra
Imo2018P5
false
[ "number theory" ]
Imo2018P5
import Mathlib import Aesop set_option maxHeartbeats 0 open BigOperators Real Nat Topology Rat
/-! # International Mathematical Olympiad 2018, Problem 5 Let a₁, aβ‚‚, ... be an infinite sequence of positive integers. Suppose that there is an integer N > 1 such that for each n β‰₯ N the number a₁/aβ‚‚ + aβ‚‚/a₃ ... + aₙ₋₁/aβ‚™ + aβ‚™/a₁ is an integer. Prove that there is a positive integer M such that aβ‚˜ = aβ‚˜β‚Šβ‚ for all m β‰₯ M. -/
theorem imo2018_p5 (a : β„• β†’ β„€) (apos : βˆ€ n, 0 < a n) (N : β„•) (hN : 0 < N) (h : βˆ€ n, N ≀ n β†’ βˆƒ z : β„€, z = βˆ‘ i ∈ Finset.range n, (a i : β„š) / a ((i + 1) % n)) : βˆƒ M, βˆ€ m, M ≀ m β†’ a m = a (m + 1) := by sorry
test
import Mathlib import Aesop set_option maxHeartbeats 0 open BigOperators Real Nat Topology Rat /-! # International Mathematical Olympiad 2018, Problem 5 Let a₁, aβ‚‚, ... be an infinite sequence of positive integers. Suppose that there is an integer N > 1 such that for each n β‰₯ N the number a₁/aβ‚‚ + aβ‚‚/a₃ ... + aₙ₋₁/aβ‚™ + aβ‚™/a₁ is an integer. Prove that there is a positive integer M such that aβ‚˜ = aβ‚˜β‚Šβ‚ for all m β‰₯ M. -/ theorem imo2018_p5 (a : β„• β†’ β„€) (apos : βˆ€ n, 0 < a n) (N : β„•) (hN : 0 < N) (h : βˆ€ n, N ≀ n β†’ βˆƒ z : β„€, z = βˆ‘ i ∈ Finset.range n, (a i : β„š) / a ((i + 1) % n)) : βˆƒ M, βˆ€ m, M ≀ m β†’ a m = a (m + 1) := by sorry
number theory
Usa2001P3
true
[ "algebra" ]
Usa2001P3
import Mathlib import Aesop set_option maxHeartbeats 0 open BigOperators Real Nat Topology Rat
/-! # USA Mathematical Olympiad 2001, Problem 3 Let a,b,c β‰₯ 0 be real numbers satsifying aΒ² + bΒ² + cΒ² + abc = 4. Show that 0 ≀ ab + bc + ca - abc ≀ 2. -/
theorem usa2001_p3 (a b c : ℝ) (ha : 0 ≀ a) (hb : 0 ≀ b) (hc : 0 ≀ c) (h : a^2 + b^2 + c^2 + a * b * c = 4) : 0 ≀ a * b + b * c + c * a - a * b * c ∧ a * b + b * c + c * a - a * b * c ≀ 2 := by sorry
test
import Mathlib import Aesop set_option maxHeartbeats 0 open BigOperators Real Nat Topology Rat /-! # USA Mathematical Olympiad 2001, Problem 3 Let a,b,c β‰₯ 0 be real numbers satsifying aΒ² + bΒ² + cΒ² + abc = 4. Show that 0 ≀ ab + bc + ca - abc ≀ 2. -/ theorem usa2001_p3 (a b c : ℝ) (ha : 0 ≀ a) (hb : 0 ≀ b) (hc : 0 ≀ c) (h : a^2 + b^2 + c^2 + a * b * c = 4) : 0 ≀ a * b + b * c + c * a - a * b * c ∧ a * b + b * c + c * a - a * b * c ≀ 2 := by sorry
algebra
Imo2024P3
true
[ "combinatorics" ]
Imo2024P3
import Mathlib import Aesop set_option maxHeartbeats 0 open BigOperators Real Nat Topology Rat
/-! # International Mathematical Olympiad 2024, Problem 3 Let a₁, aβ‚‚, a₃, ... be an infinite sequence of positive integers, and let N be a positive integer. Suppose that, for each n > N, aβ‚™ is equal to the number of times aₙ₋₁ appears in the list a₁, aβ‚‚, ..., aₙ₋₁. Prove that at least one of the sequences a₁, a₃, aβ‚…, ... and aβ‚‚, aβ‚„, a₆, ... is eventually periodic. -/
/- special open -/ open Finset def Condition (a : β„• β†’ β„•) (N : β„•) : Prop := (βˆ€ i, 0 < a i) ∧ βˆ€ n, N < n β†’ a n = Finset.card (filter (Ξ» i => a i = a (n - 1)) (Finset.range n)) def EventuallyPeriodic (b : β„• β†’ β„•) : Prop := βˆƒ p M, 0 < p ∧ βˆ€ m, M ≀ m β†’ b (m + p) = b m theorem imo2024_p3 {a : β„• β†’ β„•} {N : β„•} (h : Condition a N) : EventuallyPeriodic (fun i ↦ a (2 * i)) ∨ EventuallyPeriodic (fun i ↦ a (2 * i + 1)) := by sorry
test
import Mathlib import Aesop set_option maxHeartbeats 0 open BigOperators Real Nat Topology Rat /-! # International Mathematical Olympiad 2024, Problem 3 Let a₁, aβ‚‚, a₃, ... be an infinite sequence of positive integers, and let N be a positive integer. Suppose that, for each n > N, aβ‚™ is equal to the number of times aₙ₋₁ appears in the list a₁, aβ‚‚, ..., aₙ₋₁. Prove that at least one of the sequences a₁, a₃, aβ‚…, ... and aβ‚‚, aβ‚„, a₆, ... is eventually periodic. -/ /- special open -/ open Finset def Condition (a : β„• β†’ β„•) (N : β„•) : Prop := (βˆ€ i, 0 < a i) ∧ βˆ€ n, N < n β†’ a n = Finset.card (filter (Ξ» i => a i = a (n - 1)) (Finset.range n)) def EventuallyPeriodic (b : β„• β†’ β„•) : Prop := βˆƒ p M, 0 < p ∧ βˆ€ m, M ≀ m β†’ b (m + p) = b m theorem imo2024_p3 {a : β„• β†’ β„•} {N : β„•} (h : Condition a N) : EventuallyPeriodic (fun i ↦ a (2 * i)) ∨ EventuallyPeriodic (fun i ↦ a (2 * i + 1)) := by sorry
combinatorics
Imo1972P1
true
[ "combinatorics" ]
Imo1972P1
import Mathlib import Aesop set_option maxHeartbeats 0 open BigOperators Real Nat Topology Rat
/-! # International Mathematical Olympiad 1972, Problem 1 Prove that from a set of ten distinct two-digit numbers (in decimal), it is possible to select two disjoint subsets whose members have the same sum. -/
theorem imo1972_p1 (S : Finset β„•) (Scard : S.card = 10) (Sdigits : βˆ€ n ∈ S, (Nat.digits 10 n).length = 2) : βˆƒ S1 S2 : Finset β„•, S1 βŠ† S ∧ S2 βŠ† S ∧ Disjoint S1 S2 ∧ βˆ‘ n ∈ S1, n = βˆ‘ n ∈ S2, n := by sorry
test
import Mathlib import Aesop set_option maxHeartbeats 0 open BigOperators Real Nat Topology Rat /-! # International Mathematical Olympiad 1972, Problem 1 Prove that from a set of ten distinct two-digit numbers (in decimal), it is possible to select two disjoint subsets whose members have the same sum. -/ theorem imo1972_p1 (S : Finset β„•) (Scard : S.card = 10) (Sdigits : βˆ€ n ∈ S, (Nat.digits 10 n).length = 2) : βˆƒ S1 S2 : Finset β„•, S1 βŠ† S ∧ S2 βŠ† S ∧ Disjoint S1 S2 ∧ βˆ‘ n ∈ S1, n = βˆ‘ n ∈ S2, n := by sorry
combinatorics
Usa2022P1
false
[ "combinatorics" ]
Usa2022P1
import Mathlib import Aesop set_option maxHeartbeats 0 open BigOperators Real Nat Topology Rat
/-! # USA Mathematical Olympiad 2022, Problem 1 Let a and b be positive integers. The cells of an (a+b+1) Γ— (a+b+1) grid are colored amber and bronze such that there are at least aΒ² + ab - b amber cells and at least bΒ² + ab - a bronze cells. Prove that it is possible to choose a amber cells and b bronze cells such that no two of the a + b chosen cells lie in the same row or column. -/
theorem usa2022_p1 (a b : β„•) (ha : 0 < a) (hb : 0 < b) (color : Fin (a + b + 1) Γ— Fin (a + b + 1) β†’ Fin 2) (c0 : a^2 + a * b - b ≀ Fintype.card {s // color s = 0}) (c1 : b^2 + a * b - a ≀ Fintype.card {s // color s = 1}) : βˆƒ A B : Finset (Fin (a + b + 1) Γ— Fin (a + b + 1)), A.card = a ∧ B.card = b ∧ (βˆ€ x ∈ A, color x = 0) ∧ (βˆ€ y ∈ B, color y = 1) ∧ βˆ€ x ∈ A βˆͺ B, βˆ€ y ∈ A βˆͺ B, x β‰  y β†’ x.fst β‰  y.fst ∧ x.snd β‰  y.snd := by sorry
test
import Mathlib import Aesop set_option maxHeartbeats 0 open BigOperators Real Nat Topology Rat /-! # USA Mathematical Olympiad 2022, Problem 1 Let a and b be positive integers. The cells of an (a+b+1) Γ— (a+b+1) grid are colored amber and bronze such that there are at least aΒ² + ab - b amber cells and at least bΒ² + ab - a bronze cells. Prove that it is possible to choose a amber cells and b bronze cells such that no two of the a + b chosen cells lie in the same row or column. -/ theorem usa2022_p1 (a b : β„•) (ha : 0 < a) (hb : 0 < b) (color : Fin (a + b + 1) Γ— Fin (a + b + 1) β†’ Fin 2) (c0 : a^2 + a * b - b ≀ Fintype.card {s // color s = 0}) (c1 : b^2 + a * b - a ≀ Fintype.card {s // color s = 1}) : βˆƒ A B : Finset (Fin (a + b + 1) Γ— Fin (a + b + 1)), A.card = a ∧ B.card = b ∧ (βˆ€ x ∈ A, color x = 0) ∧ (βˆ€ y ∈ B, color y = 1) ∧ βˆ€ x ∈ A βˆͺ B, βˆ€ y ∈ A βˆͺ B, x β‰  y β†’ x.fst β‰  y.fst ∧ x.snd β‰  y.snd := by sorry
combinatorics
Imo2003P6
true
[ "number theory" ]
Imo2003P6
import Mathlib import Aesop set_option maxHeartbeats 0 open BigOperators Real Nat Topology Rat
/-! # International Mathematical Olympiad 2003, Problem 6 Let p be a prime number. Prove that there exists a prime number q such that for every integer n, the number nα΅– - p is not divisible by q. -/
theorem imo2003_p6 (p : β„•) (hp : p.Prime) : βˆƒ q : β„•, q.Prime ∧ βˆ€ n, Β¬((q : β„€) ∣ (n : β„€)^p - (p : β„€)) := by sorry
test
import Mathlib import Aesop set_option maxHeartbeats 0 open BigOperators Real Nat Topology Rat /-! # International Mathematical Olympiad 2003, Problem 6 Let p be a prime number. Prove that there exists a prime number q such that for every integer n, the number nα΅– - p is not divisible by q. -/ theorem imo2003_p6 (p : β„•) (hp : p.Prime) : βˆƒ q : β„•, q.Prime ∧ βˆ€ n, Β¬((q : β„€) ∣ (n : β„€)^p - (p : β„€)) := by sorry
number theory
Imo2019P1
true
[ "algebra" ]
Imo2019P1
import Mathlib import Aesop set_option maxHeartbeats 0 open BigOperators Real Nat Topology Rat
/-! # International Mathematical Olympiad 2019, Problem 1 Let β„€ be the set of integers. Determine all functions f : β„€ β†’ β„€ such that, for all integers a and b,οΏΌ f(2 * a) + 2 * f(b) = f(f(a + b)). -/
abbrev solution_set : Set (β„€ β†’ β„€) := { f | (βˆ€ z, f z = 0) ∨ βˆƒ c, βˆ€ z, f z = 2 * z + c } theorem imo2019_p1 (f : β„€ β†’ β„€) : (βˆ€ a b, f (2 * a) + 2 * (f b) = f (f (a + b))) ↔ f ∈ solution_set := by sorry
test
import Mathlib import Aesop set_option maxHeartbeats 0 open BigOperators Real Nat Topology Rat /-! # International Mathematical Olympiad 2019, Problem 1 Let β„€ be the set of integers. Determine all functions f : β„€ β†’ β„€ such that, for all integers a and b,οΏΌ f(2 * a) + 2 * f(b) = f(f(a + b)). -/ abbrev solution_set : Set (β„€ β†’ β„€) := { f | (βˆ€ z, f z = 0) ∨ βˆƒ c, βˆ€ z, f z = 2 * z + c } theorem imo2019_p1 (f : β„€ β†’ β„€) : (βˆ€ a b, f (2 * a) + 2 * (f b) = f (f (a + b))) ↔ f ∈ solution_set := by sorry
algebra
Imo1976P6
false
[ "algebra" ]
Imo1976P6
import Mathlib import Aesop set_option maxHeartbeats 0 open BigOperators Real Nat Topology Rat
/-! # International Mathematical Olympiad 1976, Problem 6 The sequence u_0, u_1, u_2, ... is defined by: u_0 = 2, u1 = 5/2, u_{n+1} = un(u_{n-1}^2 - 2) - u_1 for n = 1, 2, ... . Prove that \[un\] = 2^(2^n - (-1)^n)/3, where \[x\] denotes the greatest integer less than or equal to x. -/
theorem imo1976_p6 (u : β„• β†’ ℝ) (hβ‚€ : u 0 = 2) (h₁ : u 1 = 5 / 2) (hβ‚‚ : βˆ€ n, u (n + 2) = u (n + 1) * ((u n)^2 - 2) - u 1) : βˆ€ n, ⌊u nβŒ‹ = (2:ℝ) ^((2^n - (-1 : ℝ)^n) / 3):= by sorry
test
import Mathlib import Aesop set_option maxHeartbeats 0 open BigOperators Real Nat Topology Rat /-! # International Mathematical Olympiad 1976, Problem 6 The sequence u_0, u_1, u_2, ... is defined by: u_0 = 2, u1 = 5/2, u_{n+1} = un(u_{n-1}^2 - 2) - u_1 for n = 1, 2, ... . Prove that \[un\] = 2^(2^n - (-1)^n)/3, where \[x\] denotes the greatest integer less than or equal to x. -/ theorem imo1976_p6 (u : β„• β†’ ℝ) (hβ‚€ : u 0 = 2) (h₁ : u 1 = 5 / 2) (hβ‚‚ : βˆ€ n, u (n + 2) = u (n + 1) * ((u n)^2 - 2) - u 1) : βˆ€ n, ⌊u nβŒ‹ = (2:ℝ) ^((2^n - (-1 : ℝ)^n) / 3):= by sorry
algebra
Imo1965P2
true
[ "algebra" ]
Imo1965P2
import Mathlib import Aesop set_option maxHeartbeats 0 open BigOperators Real Nat Topology Rat
/-! # International Mathematical Olympiad 1965, Problem 2 Suppose that a₁₁x₁ + a₁₂xβ‚‚ + a₁₃x₃ = 0 a₂₁x₁ + aβ‚‚β‚‚xβ‚‚ + a₂₃x₃ = 0 a₃₁x₁ + a₃₂xβ‚‚ + a₃₃x₃ = 0 where (A) a₁₁, aβ‚‚β‚‚, a₃₃ are positive (B) the remaining aα΅’β±Ό are negative (C) in each row i, the sum of the coefficients aα΅’β±Ό is positive. Prove that x₁ = xβ‚‚ = x₃ = 0. -/
theorem imo1965_p2 (x : Fin 3 β†’ ℝ) (a : Fin 3 β†’ Fin 3 β†’ ℝ) (heqs : βˆ€ i, βˆ‘ j : Fin 3, (a i j * x j) = 0) (hab : βˆ€ i j, if i = j then 0 < a i j else a i j < 0) (hc : βˆ€ i, 0 < βˆ‘ j : Fin 3, a i j) : βˆ€ i, x i = 0 := by sorry
test
import Mathlib import Aesop set_option maxHeartbeats 0 open BigOperators Real Nat Topology Rat /-! # International Mathematical Olympiad 1965, Problem 2 Suppose that a₁₁x₁ + a₁₂xβ‚‚ + a₁₃x₃ = 0 a₂₁x₁ + aβ‚‚β‚‚xβ‚‚ + a₂₃x₃ = 0 a₃₁x₁ + a₃₂xβ‚‚ + a₃₃x₃ = 0 where (A) a₁₁, aβ‚‚β‚‚, a₃₃ are positive (B) the remaining aα΅’β±Ό are negative (C) in each row i, the sum of the coefficients aα΅’β±Ό is positive. Prove that x₁ = xβ‚‚ = x₃ = 0. -/ theorem imo1965_p2 (x : Fin 3 β†’ ℝ) (a : Fin 3 β†’ Fin 3 β†’ ℝ) (heqs : βˆ€ i, βˆ‘ j : Fin 3, (a i j * x j) = 0) (hab : βˆ€ i j, if i = j then 0 < a i j else a i j < 0) (hc : βˆ€ i, 0 < βˆ‘ j : Fin 3, a i j) : βˆ€ i, x i = 0 := by sorry
algebra
Imo2022P5
true
[ "number theory" ]
Imo2022P5
import Mathlib import Aesop set_option maxHeartbeats 0 open BigOperators Real Nat Topology Rat
/-! # International Mathematical Olympiad 2022, Problem 5 Determine all possible triples of positive integers a,b,p that satisfy aα΅– = b! + p where p is prime. -/
abbrev solution_set : Set (β„• Γ— β„• Γ— β„•) := { ⟨2,2,2⟩, ⟨3,4,3⟩ } theorem imo2022_p5 (a b p : β„•) (ha : 0 < a) (hb : 0 < b) (hp : p.Prime) : ⟨a,b,p⟩ ∈ solution_set ↔ a^p = Nat.factorial b + p := by sorry
test
import Mathlib import Aesop set_option maxHeartbeats 0 open BigOperators Real Nat Topology Rat /-! # International Mathematical Olympiad 2022, Problem 5 Determine all possible triples of positive integers a,b,p that satisfy aα΅– = b! + p where p is prime. -/ abbrev solution_set : Set (β„• Γ— β„• Γ— β„•) := { ⟨2,2,2⟩, ⟨3,4,3⟩ } theorem imo2022_p5 (a b p : β„•) (ha : 0 < a) (hb : 0 < b) (hp : p.Prime) : ⟨a,b,p⟩ ∈ solution_set ↔ a^p = Nat.factorial b + p := by sorry
number theory
Imo1963P4
false
[ "algebra" ]
Imo1963P4
import Mathlib import Aesop set_option maxHeartbeats 0 open BigOperators Real Nat Topology Rat
/-! # International Mathematical Olympiad 1963, Problem 4 Find all solutions x₁,xβ‚‚,x₃,xβ‚„,xβ‚… of the system xβ‚… + xβ‚‚ = yx₁ x₁ + x₃ = yxβ‚‚ xβ‚‚ + xβ‚„ = yx₃ x₃ + xβ‚… = yxβ‚„ xβ‚„ + x₁ = yxβ‚… where y is a parameter. -/
abbrev SolutionSet (y : ℝ) : Set (ℝ Γ— ℝ Γ— ℝ Γ— ℝ Γ— ℝ) := if y = 2 then -- When y = 2, all variables are equal: xα΅’ = s for any s {p | βˆƒ s : ℝ, p = (s, s, s, s, s)} else if y * y + y - 1 = 0 then -- When yΒ² + y - 1 = 0, we can have two free parameters {p | βˆƒ (s t : ℝ), p = (s, t, -s + y*t, -y*s - y*t, y*s - t)} else -- Otherwise, either all xα΅’ = 0 or the system has no solution {(0, 0, 0, 0, 0)} theorem imo1963_p4 (x₁ xβ‚‚ x₃ xβ‚„ xβ‚… y : ℝ) : (x₁, xβ‚‚, x₃, xβ‚„, xβ‚…) ∈ SolutionSet y ↔ (xβ‚… + xβ‚‚ = y * x₁ ∧ x₁ + x₃ = y * xβ‚‚ ∧ xβ‚‚ + xβ‚„ = y * x₃ ∧ x₃ + xβ‚… = y * xβ‚„ ∧ xβ‚„ + x₁ = y * xβ‚…) := by sorry
test
import Mathlib import Aesop set_option maxHeartbeats 0 open BigOperators Real Nat Topology Rat /-! # International Mathematical Olympiad 1963, Problem 4 Find all solutions x₁,xβ‚‚,x₃,xβ‚„,xβ‚… of the system xβ‚… + xβ‚‚ = yx₁ x₁ + x₃ = yxβ‚‚ xβ‚‚ + xβ‚„ = yx₃ x₃ + xβ‚… = yxβ‚„ xβ‚„ + x₁ = yxβ‚… where y is a parameter. -/ abbrev SolutionSet (y : ℝ) : Set (ℝ Γ— ℝ Γ— ℝ Γ— ℝ Γ— ℝ) := if y = 2 then -- When y = 2, all variables are equal: xα΅’ = s for any s {p | βˆƒ s : ℝ, p = (s, s, s, s, s)} else if y * y + y - 1 = 0 then -- When yΒ² + y - 1 = 0, we can have two free parameters {p | βˆƒ (s t : ℝ), p = (s, t, -s + y*t, -y*s - y*t, y*s - t)} else -- Otherwise, either all xα΅’ = 0 or the system has no solution {(0, 0, 0, 0, 0)} theorem imo1963_p4 (x₁ xβ‚‚ x₃ xβ‚„ xβ‚… y : ℝ) : (x₁, xβ‚‚, x₃, xβ‚„, xβ‚…) ∈ SolutionSet y ↔ (xβ‚… + xβ‚‚ = y * x₁ ∧ x₁ + x₃ = y * xβ‚‚ ∧ xβ‚‚ + xβ‚„ = y * x₃ ∧ x₃ + xβ‚… = y * xβ‚„ ∧ xβ‚„ + x₁ = y * xβ‚…) := by sorry
algebra
Imo2023P1
true
[ "number theory" ]
Imo2023P1
import Mathlib import Aesop set_option maxHeartbeats 0 open BigOperators Real Nat Topology Rat
/-! # International Mathematical Olympiad 2023, Problem 1 Determine all composite integers n>1 that satisfy the following property: if d₁,dβ‚‚,...,dβ‚– are all the positive divisors of n with 1 = d₁ < dβ‚‚ < ... < dβ‚– = n, then dα΅’ divides dα΅’β‚Šβ‚ + dα΅’β‚Šβ‚‚ for every 1 ≀ i ≀ k - 2. -/
abbrev ConsecutiveFactors (n a b : β„•) := a ∣ n ∧ b ∣ n ∧ a < b ∧ Β¬βˆƒ c, (c ∣ n ∧ a < c ∧ c < b) abbrev Dividable (n : β„•) := βˆ€ {a b c : β„•}, ConsecutiveFactors n a b ∧ ConsecutiveFactors n b c β†’ a ∣ b + c abbrev solution_set : Set β„• := { n | Β¬n.Prime ∧ IsPrimePow n } theorem imo2023_p1 : solution_set = { n | 1 < n ∧ Β¬n.Prime ∧ Dividable n } := by sorry
test
import Mathlib import Aesop set_option maxHeartbeats 0 open BigOperators Real Nat Topology Rat /-! # International Mathematical Olympiad 2023, Problem 1 Determine all composite integers n>1 that satisfy the following property: if d₁,dβ‚‚,...,dβ‚– are all the positive divisors of n with 1 = d₁ < dβ‚‚ < ... < dβ‚– = n, then dα΅’ divides dα΅’β‚Šβ‚ + dα΅’β‚Šβ‚‚ for every 1 ≀ i ≀ k - 2. -/ abbrev ConsecutiveFactors (n a b : β„•) := a ∣ n ∧ b ∣ n ∧ a < b ∧ Β¬βˆƒ c, (c ∣ n ∧ a < c ∧ c < b) abbrev Dividable (n : β„•) := βˆ€ {a b c : β„•}, ConsecutiveFactors n a b ∧ ConsecutiveFactors n b c β†’ a ∣ b + c abbrev solution_set : Set β„• := { n | Β¬n.Prime ∧ IsPrimePow n } theorem imo2023_p1 : solution_set = { n | 1 < n ∧ Β¬n.Prime ∧ Dividable n } := by sorry
number theory
Imo2016P4
false
[ "number theory" ]
Imo2016P4
import Mathlib import Aesop set_option maxHeartbeats 0 open BigOperators Real Nat Topology Rat
/-! # International Mathematical Olympiad 2016, Problem 4 A set of positive integers is called *fragrant* if it contains at least two elements and each of its elements has a prime factor in common with at least one of the other elements. Let P(n) = nΒ² + n + 1. What is the least possible value of positive integer b such that there exists a non-negative integer a for which the set { P(a + 1), P(a + 2), ..., P(a + b) } is fragrant? -/
abbrev Fragrant (s : Set β„•+) : Prop := 2 ≀ s.ncard ∧ βˆ€ m ∈ s, βˆƒ n ∈ s, Β¬Nat.Coprime m n abbrev P (n : β„•) : β„• := n^2 + n + 1 abbrev Solution : β„•+ := 6 theorem imo2016_p4 : IsLeast {b : β„•+ | βˆƒ a : β„•, Fragrant {p | βˆƒ i < b, p = P (a + 1 + i)}} Solution := by sorry
test
import Mathlib import Aesop set_option maxHeartbeats 0 open BigOperators Real Nat Topology Rat /-! # International Mathematical Olympiad 2016, Problem 4 A set of positive integers is called *fragrant* if it contains at least two elements and each of its elements has a prime factor in common with at least one of the other elements. Let P(n) = nΒ² + n + 1. What is the least possible value of positive integer b such that there exists a non-negative integer a for which the set { P(a + 1), P(a + 2), ..., P(a + b) } is fragrant? -/ abbrev Fragrant (s : Set β„•+) : Prop := 2 ≀ s.ncard ∧ βˆ€ m ∈ s, βˆƒ n ∈ s, Β¬Nat.Coprime m n abbrev P (n : β„•) : β„• := n^2 + n + 1 abbrev Solution : β„•+ := 6 theorem imo2016_p4 : IsLeast {b : β„•+ | βˆƒ a : β„•, Fragrant {p | βˆƒ i < b, p = P (a + 1 + i)}} Solution := by sorry
number theory
Usa2018P1
true
[ "algebra", "inequality" ]
Usa2018P1
import Mathlib import Aesop set_option maxHeartbeats 0 open BigOperators Real Nat Topology Rat
/-! # USA Mathematical Olympiad 2018, Problem 1 Given that a,b,c are positive real numbers such that a + b + c = 4 βˆ›(abc) prove that 2(ab + bc + ca) + 4min(aΒ²,bΒ²,cΒ²) β‰₯ aΒ² + bΒ² + cΒ² -/
theorem usa2018_p1 (a b c : ℝ) : a > 0 β†’ b > 0 β†’ c > 0 β†’ a + b + c = 4 * (a * b * c) ^ ((1 : ℝ) / 3) β†’ 2 * (a * b + b * c + c * a) + 4 * (min (min (a * a) (b * b)) (c * c)) β‰₯ a^2 + b^2 + c^2 := by sorry
test
import Mathlib import Aesop set_option maxHeartbeats 0 open BigOperators Real Nat Topology Rat /-! # USA Mathematical Olympiad 2018, Problem 1 Given that a,b,c are positive real numbers such that a + b + c = 4 βˆ›(abc) prove that 2(ab + bc + ca) + 4min(aΒ²,bΒ²,cΒ²) β‰₯ aΒ² + bΒ² + cΒ² -/ theorem usa2018_p1 (a b c : ℝ) : a > 0 β†’ b > 0 β†’ c > 0 β†’ a + b + c = 4 * (a * b * c) ^ ((1 : ℝ) / 3) β†’ 2 * (a * b + b * c + c * a) + 4 * (min (min (a * a) (b * b)) (c * c)) β‰₯ a^2 + b^2 + c^2 := by sorry
algebra
ZeroesOnesAndTwos1
false
[]
ZeroesOnesAndTwos1
import Mathlib import Aesop set_option maxHeartbeats 0 open BigOperators Real Nat Topology Rat
/-! (From Mathematical Puzzles: A Connoisseur's Collection by Peter Winkler.) Let n be a natural number. Prove that (a) n has a (nonzero) multiple whose representation in base 10 contains only zeroes and ones; and -/
theorem zeroes_and_ones (n : β„•) : βˆƒ k : β„•+, βˆ€ e ∈ Nat.digits 10 (n * k), e = 0 ∨ e = 1 := by sorry
test
import Mathlib import Aesop set_option maxHeartbeats 0 open BigOperators Real Nat Topology Rat /-! (From Mathematical Puzzles: A Connoisseur's Collection by Peter Winkler.) Let n be a natural number. Prove that (a) n has a (nonzero) multiple whose representation in base 10 contains only zeroes and ones; and -/ theorem zeroes_and_ones (n : β„•) : βˆƒ k : β„•+, βˆ€ e ∈ Nat.digits 10 (n * k), e = 0 ∨ e = 1 := by sorry
number theory
Imo2008P4
true
[ "algebra" ]
Imo2008P4
import Mathlib import Aesop set_option maxHeartbeats 0 open BigOperators Real Nat Topology Rat
/-! # International Mathematical Olympiad 2008, Problem 4 Determine all functions f from the positive reals to the positive reals such that (f(w)Β² + f(x)Β²) / (f(y)Β² + f(z)Β²) = (wΒ² + xΒ²) / (yΒ² + zΒ²) for all positive real numbers w,x,y,z satisfying xw = yz. -/
abbrev PosReal : Type := { x : ℝ // 0 < x } abbrev solution_set : Set (PosReal β†’ PosReal) := { f | f = id ∨ f = fun x ↦ 1 / x } theorem imo2008_p4 (f : PosReal β†’ PosReal) : f ∈ solution_set ↔ βˆ€ w x y z, w * x = y * z β†’ ((f w)^2 + (f x)^2) * (y^2 + z^2) = (w^2 + x^2) * (f (y^2) + f (z^2)) := by sorry
test
import Mathlib import Aesop set_option maxHeartbeats 0 open BigOperators Real Nat Topology Rat /-! # International Mathematical Olympiad 2008, Problem 4 Determine all functions f from the positive reals to the positive reals such that (f(w)Β² + f(x)Β²) / (f(y)Β² + f(z)Β²) = (wΒ² + xΒ²) / (yΒ² + zΒ²) for all positive real numbers w,x,y,z satisfying xw = yz. -/ abbrev PosReal : Type := { x : ℝ // 0 < x } abbrev solution_set : Set (PosReal β†’ PosReal) := { f | f = id ∨ f = fun x ↦ 1 / x } theorem imo2008_p4 (f : PosReal β†’ PosReal) : f ∈ solution_set ↔ βˆ€ w x y z, w * x = y * z β†’ ((f w)^2 + (f x)^2) * (y^2 + z^2) = (w^2 + x^2) * (f (y^2) + f (z^2)) := by sorry
algebra
Imo2012P2
false
[ "algebra" ]
Imo2012P2
import Mathlib import Aesop set_option maxHeartbeats 0 open BigOperators Real Nat Topology Rat
/-! # International Mathematical Olympiad 2012, Problem 2 Let aβ‚‚, a₃, ..., aβ‚™ be positive reals with product 1, where n β‰₯ 3. Show that (1 + aβ‚‚)Β²(1 + a₃)Β³...(1 + aβ‚™)ⁿ > nⁿ. -/
theorem imo2012_p2 (n : β„•) (hn : 3 ≀ n) (a : Finset.Icc 2 n β†’ ℝ) (apos : βˆ€ i, 0 < a i) (aprod : ∏ i, a i = 1) : (n:ℝ)^n < ∏ i, (1 + a i)^i.val := by sorry
test
import Mathlib import Aesop set_option maxHeartbeats 0 open BigOperators Real Nat Topology Rat /-! # International Mathematical Olympiad 2012, Problem 2 Let aβ‚‚, a₃, ..., aβ‚™ be positive reals with product 1, where n β‰₯ 3. Show that (1 + aβ‚‚)Β²(1 + a₃)Β³...(1 + aβ‚™)ⁿ > nⁿ. -/ theorem imo2012_p2 (n : β„•) (hn : 3 ≀ n) (a : Finset.Icc 2 n β†’ ℝ) (apos : βˆ€ i, 0 < a i) (aprod : ∏ i, a i = 1) : (n:ℝ)^n < ∏ i, (1 + a i)^i.val := by sorry
algebra
Singapore2019P4
true
[ "algebra" ]
Singapore2019P4
import Mathlib import Aesop set_option maxHeartbeats 0 open BigOperators Real Nat Topology Rat
/-! # Singapore Math Olympiad (Senior) 2019 (Round 1), Problem 4 http://www.realsutra.com/limjeck/SMO_Senior_2019.pdf If $\log_{21} 3 = x$, express $\log_7 9$ in terms of $x$. -/
noncomputable abbrev solution (x : ℝ) : ℝ := 2*x / (1-x) theorem singapore2019_r1_p4 (x : ℝ) (hx : Real.logb 21 3 = x) : Real.logb 7 9 = solution x := by sorry
test
import Mathlib import Aesop set_option maxHeartbeats 0 open BigOperators Real Nat Topology Rat /-! # Singapore Math Olympiad (Senior) 2019 (Round 1), Problem 4 http://www.realsutra.com/limjeck/SMO_Senior_2019.pdf If $\log_{21} 3 = x$, express $\log_7 9$ in terms of $x$. -/ noncomputable abbrev solution (x : ℝ) : ℝ := 2*x / (1-x) theorem singapore2019_r1_p4 (x : ℝ) (hx : Real.logb 21 3 = x) : Real.logb 7 9 = solution x := by sorry
algebra
Imo2001P6
true
[ "number theory" ]
Imo2001P6
import Mathlib import Aesop set_option maxHeartbeats 0 open BigOperators Real Nat Topology Rat
/-! # International Mathematical Olympiad 2001, Problem 6 Let a, b, c, d be integers with a > b > c > d > 0. Suppose that ac + bd = (a + b - c + d) * (-a + b + c + d). Prove that ab + cd is not prime. -/
theorem imo2001_p6 {a b c d : β„€} (hd : 0 < d) (hdc : d < c) (hcb : c < b) (hba : b < a) (h : a * c + b * d = (a + b - c + d) * (-a + b + c + d)) : Β¬Prime (a * b + c * d) := by sorry
test
import Mathlib import Aesop set_option maxHeartbeats 0 open BigOperators Real Nat Topology Rat /-! # International Mathematical Olympiad 2001, Problem 6 Let a, b, c, d be integers with a > b > c > d > 0. Suppose that ac + bd = (a + b - c + d) * (-a + b + c + d). Prove that ab + cd is not prime. -/ theorem imo2001_p6 {a b c d : β„€} (hd : 0 < d) (hdc : d < c) (hcb : c < b) (hba : b < a) (h : a * c + b * d = (a + b - c + d) * (-a + b + c + d)) : Β¬Prime (a * b + c * d) := by sorry
number theory
Imo2008P5
false
[ "combinatorics" ]
Imo2008P5
import Mathlib import Aesop set_option maxHeartbeats 0 open BigOperators Real Nat Topology Rat
/-! # International Mathematical Olympiad 2008, Problem 5 Let n and k be positive integers with k β‰₯ n and k - n an even number. There are 2n lamps labelled 1, 2, ..., 2n each of which can be either on or off. Initially all the lamps are off. We consider sequences of steps: at each step one of the lamps is switched (from on to off or from off to on). Let N be the number of such sequences consisting of k steps and resulting in the state where lamps 1 through n are all on, and lamps n + 1 through 2n are all off. Let M be the number of such sequences consisting of k steps, resulting in the state where lamps 1 through n are all on, and lamps n + 1 through 2n are all off, but where none of the lamps n + 1 through 2n is ever switched on. Determine N/M. -/
abbrev Sequence (n k : β„•) := Fin k β†’ Fin (2 * n) abbrev NSequence (n k : β„•) (f : Sequence n k) : Prop := (βˆ€ i < n, Odd (Nat.card { j | f j = i })) ∧ (βˆ€ i, n ≀ i β†’ i < 2 * n β†’ Even (Nat.card { j | f j = i })) abbrev MSequence (n k : β„•) (f : Sequence n k) : Prop := NSequence n k f ∧ (βˆ€ i : Fin (2 * n), n ≀ i β†’ βˆ€ j : Fin k, f j β‰  i) abbrev solution (n k : β„•) : β„š := 2 ^ (k - n) theorem imo2008_p5 (n k : β„•) (hn : 0 < n) (hnk : n ≀ k) (he : Even (k - n)) : Set.ncard (MSequence n k) * solution n k = Set.ncard (NSequence n k) := by sorry
test
import Mathlib import Aesop set_option maxHeartbeats 0 open BigOperators Real Nat Topology Rat /-! # International Mathematical Olympiad 2008, Problem 5 Let n and k be positive integers with k β‰₯ n and k - n an even number. There are 2n lamps labelled 1, 2, ..., 2n each of which can be either on or off. Initially all the lamps are off. We consider sequences of steps: at each step one of the lamps is switched (from on to off or from off to on). Let N be the number of such sequences consisting of k steps and resulting in the state where lamps 1 through n are all on, and lamps n + 1 through 2n are all off. Let M be the number of such sequences consisting of k steps, resulting in the state where lamps 1 through n are all on, and lamps n + 1 through 2n are all off, but where none of the lamps n + 1 through 2n is ever switched on. Determine N/M. -/ abbrev Sequence (n k : β„•) := Fin k β†’ Fin (2 * n) abbrev NSequence (n k : β„•) (f : Sequence n k) : Prop := (βˆ€ i < n, Odd (Nat.card { j | f j = i })) ∧ (βˆ€ i, n ≀ i β†’ i < 2 * n β†’ Even (Nat.card { j | f j = i })) abbrev MSequence (n k : β„•) (f : Sequence n k) : Prop := NSequence n k f ∧ (βˆ€ i : Fin (2 * n), n ≀ i β†’ βˆ€ j : Fin k, f j β‰  i) abbrev solution (n k : β„•) : β„š := 2 ^ (k - n) theorem imo2008_p5 (n k : β„•) (hn : 0 < n) (hnk : n ≀ k) (he : Even (k - n)) : Set.ncard (MSequence n k) * solution n k = Set.ncard (NSequence n k) := by sorry
combinatorics
Imo2016P5
false
[ "algebra" ]
Imo2016P5
import Mathlib import Aesop set_option maxHeartbeats 0 open BigOperators Real Nat Topology Rat
/-! # International Mathematical Olympiad 2016, Problem 5 The equation (x - 1)(x - 2) ... (x - 2016) = (x - 1)(x - 2) ... (x - 2016) is written on the board. What is the least possible value of k for which it is possible to erase exactly k of these 4032 factors such that at least one factor remains on each side and the resulting equation has no real solutions? -/
abbrev solution_value : β„• := 2016 theorem imo2015_p5 : IsLeast { k | βˆƒ L R : Finset β„•, L βŠ‚ Finset.Icc 1 2016 ∧ R βŠ‚ Finset.Icc 1 2016 ∧ L.card + R.card = k ∧ Β¬βˆƒ x : ℝ, ∏ i ∈ Finset.Icc 1 2016 \ L, (x - (i : ℝ)) = ∏ i ∈ Finset.Icc 1 2016 \ R, (x - (i : ℝ)) } solution_value := by sorry
test
import Mathlib import Aesop set_option maxHeartbeats 0 open BigOperators Real Nat Topology Rat /-! # International Mathematical Olympiad 2016, Problem 5 The equation (x - 1)(x - 2) ... (x - 2016) = (x - 1)(x - 2) ... (x - 2016) is written on the board. What is the least possible value of k for which it is possible to erase exactly k of these 4032 factors such that at least one factor remains on each side and the resulting equation has no real solutions? -/ abbrev solution_value : β„• := 2016 theorem imo2015_p5 : IsLeast { k | βˆƒ L R : Finset β„•, L βŠ‚ Finset.Icc 1 2016 ∧ R βŠ‚ Finset.Icc 1 2016 ∧ L.card + R.card = k ∧ Β¬βˆƒ x : ℝ, ∏ i ∈ Finset.Icc 1 2016 \ L, (x - (i : ℝ)) = ∏ i ∈ Finset.Icc 1 2016 \ R, (x - (i : ℝ)) } solution_value := by sorry
algebra
Imo1963P5
true
[ "algebra" ]
Imo1963P5
import Mathlib import Aesop set_option maxHeartbeats 0 open BigOperators Real Nat Topology Rat
/-! # International Mathematical Olympiad 1963, Problem 5 Prove that cos(Ο€/7) - cos(2Ο€/7) + cos(3Ο€/7) = 1/2. -/
theorem imo1963_p5 : Real.cos (Real.pi/7) - Real.cos (2*Real.pi/7) + Real.cos (3*Real.pi/7) = 1/2 := by sorry
test
import Mathlib import Aesop set_option maxHeartbeats 0 open BigOperators Real Nat Topology Rat /-! # International Mathematical Olympiad 1963, Problem 5 Prove that cos(Ο€/7) - cos(2Ο€/7) + cos(3Ο€/7) = 1/2. -/ theorem imo1963_p5 : Real.cos (Real.pi/7) - Real.cos (2*Real.pi/7) + Real.cos (3*Real.pi/7) = 1/2 := by sorry
algebra
Imo1964P1b
true
[ "number theory" ]
Imo1964P1b
import Mathlib import Aesop set_option maxHeartbeats 0 open BigOperators Real Nat Topology Rat
/-! # International Mathematical Olympiad 1964, Problem 1 (b) Prove that there is no positive integer n for which 2ⁿ + 1 is divisible by 7. -/
theorem imo_1964_p1b (n : β„•) : Β¬ 7 ∣ (2^n + 1) := by sorry
test
import Mathlib import Aesop set_option maxHeartbeats 0 open BigOperators Real Nat Topology Rat /-! # International Mathematical Olympiad 1964, Problem 1 (b) Prove that there is no positive integer n for which 2ⁿ + 1 is divisible by 7. -/ theorem imo_1964_p1b (n : β„•) : Β¬ 7 ∣ (2^n + 1) := by sorry
number theory
Imo2000P2
true
[ "algebra", "inequality" ]
Imo2000P2
import Mathlib import Aesop set_option maxHeartbeats 0 open BigOperators Real Nat Topology Rat
/-! # International Mathematical Olympiad 2000, Problem 2 Let a, b, c be positive real numbers such that abc = 1. Show that (a - 1 + 1/b)(b - 1 + 1/c)(c - 1 + 1/a) ≀ 1. -/
theorem imo2000_p2 (a b c : ℝ) (ha : 0 < a) (hb : 0 < b) (hc : 0 < c) (habc : a * b * c = 1) : (a - 1 + 1 / b) * (b - 1 + 1 / c) * (c - 1 + 1 / a) ≀ 1 := by sorry
test
import Mathlib import Aesop set_option maxHeartbeats 0 open BigOperators Real Nat Topology Rat /-! # International Mathematical Olympiad 2000, Problem 2 Let a, b, c be positive real numbers such that abc = 1. Show that (a - 1 + 1/b)(b - 1 + 1/c)(c - 1 + 1/a) ≀ 1. -/ theorem imo2000_p2 (a b c : ℝ) (ha : 0 < a) (hb : 0 < b) (hc : 0 < c) (habc : a * b * c = 1) : (a - 1 + 1 / b) * (b - 1 + 1 / c) * (c - 1 + 1 / a) ≀ 1 := by sorry
algebra
Imo1975P2
false
[ "algebra" ]
Imo1975P2
import Mathlib import Aesop set_option maxHeartbeats 0 open BigOperators Real Nat Topology Rat
/-! # International Mathematical Olympiad 1975, Problem 2 Let a1 < a2 < a3 < ... be positive integers. Prove that for every i >= 1, there are infinitely many a_n that can be written in the form a_n = ra_i + sa_j, with r, s positive integers and j > i. -/
theorem imo1975_p2 (a : β„• β†’ β„€) (apos : βˆ€ i : β„•, 0 < a i) (ha : βˆ€ i : β„•, a i < a (i + 1)) : ( βˆ€ i n0 : β„• , βˆƒ n, n0 ≀ n ∧ βˆƒ r s : β„•, βˆƒ j : β„•, a n = r * a i + s * a j ∧ i < j ∧ 0 < r ∧ 0 < s ):= by sorry
test
import Mathlib import Aesop set_option maxHeartbeats 0 open BigOperators Real Nat Topology Rat /-! # International Mathematical Olympiad 1975, Problem 2 Let a1 < a2 < a3 < ... be positive integers. Prove that for every i >= 1, there are infinitely many a_n that can be written in the form a_n = ra_i + sa_j, with r, s positive integers and j > i. -/ theorem imo1975_p2 (a : β„• β†’ β„€) (apos : βˆ€ i : β„•, 0 < a i) (ha : βˆ€ i : β„•, a i < a (i + 1)) : ( βˆ€ i n0 : β„• , βˆƒ n, n0 ≀ n ∧ βˆƒ r s : β„•, βˆƒ j : β„•, a n = r * a i + s * a j ∧ i < j ∧ 0 < r ∧ 0 < s ):= by sorry
algebra
UpperLowerContinuous
true
[]
UpperLowerContinuous
import Mathlib import Aesop set_option maxHeartbeats 0 open BigOperators Real Nat Topology Rat
/-! Suppose f : ℝ -> ℝ is continuous in both the upper topology (where the basic open sets are half-open intervals (a, b]) and lower topology (where the basic open sets are half-open intervals [a,b)). Then f is continuous in the usual topology (where the basic open sets are -/
def upper_intervals : Set (Set ℝ) := {s : Set ℝ | βˆƒ a b : ℝ, Set.Ioc a b = s} def lower_intervals : Set (Set ℝ) := {s : Set ℝ | βˆƒ a b : ℝ, Set.Ico a b = s} def open_intervals : Set (Set ℝ) := {s : Set ℝ | βˆƒ a b : ℝ, Set.Ioo a b = s} /-- Generate the toplogy on ℝ by intervals of the form (a, b]. -/ def tα΅€ : TopologicalSpace ℝ := TopologicalSpace.generateFrom upper_intervals /-- Generate the toplogy on ℝ by intervals of the form [a, b). -/ def tβ‚— : TopologicalSpace ℝ := TopologicalSpace.generateFrom lower_intervals /-- This should be equivalent to the default instance for `TopologicalSpace ℝ`, which goes through `UniformSpace`, but for now I don't want to bother with proving that equivalence. -/ def tβ‚› : TopologicalSpace ℝ := TopologicalSpace.generateFrom open_intervals -- activate the Continuous[t1, t2] notation theorem properties_of_upper_lower_continuous (f : ℝ β†’ ℝ) (huc : Continuous[tα΅€, tα΅€] f) (hlc : Continuous[tβ‚—, tβ‚—] f) : Continuous[tβ‚›, tβ‚›] f ∧ Monotone f := by sorry
test
import Mathlib import Aesop set_option maxHeartbeats 0 open BigOperators Real Nat Topology Rat /-! Suppose f : ℝ -> ℝ is continuous in both the upper topology (where the basic open sets are half-open intervals (a, b]) and lower topology (where the basic open sets are half-open intervals [a,b)). Then f is continuous in the usual topology (where the basic open sets are -/ def upper_intervals : Set (Set ℝ) := {s : Set ℝ | βˆƒ a b : ℝ, Set.Ioc a b = s} def lower_intervals : Set (Set ℝ) := {s : Set ℝ | βˆƒ a b : ℝ, Set.Ico a b = s} def open_intervals : Set (Set ℝ) := {s : Set ℝ | βˆƒ a b : ℝ, Set.Ioo a b = s} /-- Generate the toplogy on ℝ by intervals of the form (a, b]. -/ def tα΅€ : TopologicalSpace ℝ := TopologicalSpace.generateFrom upper_intervals /-- Generate the toplogy on ℝ by intervals of the form [a, b). -/ def tβ‚— : TopologicalSpace ℝ := TopologicalSpace.generateFrom lower_intervals /-- This should be equivalent to the default instance for `TopologicalSpace ℝ`, which goes through `UniformSpace`, but for now I don't want to bother with proving that equivalence. -/ def tβ‚› : TopologicalSpace ℝ := TopologicalSpace.generateFrom open_intervals -- activate the Continuous[t1, t2] notation theorem properties_of_upper_lower_continuous (f : ℝ β†’ ℝ) (huc : Continuous[tα΅€, tα΅€] f) (hlc : Continuous[tβ‚—, tβ‚—] f) : Continuous[tβ‚›, tβ‚›] f ∧ Monotone f := by sorry
number theory
UK2024R1P1
true
[ "combinatorics" ]
UK2024R1P1
import Mathlib import Aesop set_option maxHeartbeats 0 open BigOperators Real Nat Topology Rat
/-! # British Mathematical Olympiad 2024, Round 1, Problem 1 An unreliable typist can guarantee that when they try to type a word with different letters, every letter of the word will appear exactly once in what they type, and each letter will occur at most one letter late (though it may occur more than one letter early). Thus, when trying to type MATHS, the typist may type MATHS, MTAHS or TMASH, but not ATMSH. Determine, with proof, the number of possible spellings of OLYMPIADS that might be typed. -/
abbrev solution_value : β„• := 256 /- Since OLYMPIADS has no duplicate letters, then the set of spellings is just a subset of the permutations of 9 elements. -/ theorem uk2024_r1_p1 : {f : Equiv.Perm (Fin 9) | βˆ€ k, (f k : β„•) ≀ k + 1}.ncard = solution_value := by sorry
test
import Mathlib import Aesop set_option maxHeartbeats 0 open BigOperators Real Nat Topology Rat /-! # British Mathematical Olympiad 2024, Round 1, Problem 1 An unreliable typist can guarantee that when they try to type a word with different letters, every letter of the word will appear exactly once in what they type, and each letter will occur at most one letter late (though it may occur more than one letter early). Thus, when trying to type MATHS, the typist may type MATHS, MTAHS or TMASH, but not ATMSH. Determine, with proof, the number of possible spellings of OLYMPIADS that might be typed. -/ abbrev solution_value : β„• := 256 /- Since OLYMPIADS has no duplicate letters, then the set of spellings is just a subset of the permutations of 9 elements. -/ theorem uk2024_r1_p1 : {f : Equiv.Perm (Fin 9) | βˆ€ k, (f k : β„•) ≀ k + 1}.ncard = solution_value := by sorry
combinatorics
Imo2017P1
false
[ "number theory" ]
Imo2017P1
import Mathlib import Aesop set_option maxHeartbeats 0 open BigOperators Real Nat Topology Rat
/-! # International Mathematical Olympiad 2017, Problem 1 For any integer aβ‚€ > 1, define the sequence aβ‚™β‚Šβ‚ = √aβ‚™, if aβ‚™ is a perfect square or aβ‚™ + 3 otherwise. Find all values of aβ‚€ for which there exists A such that aβ‚™ = A for infinitely many values of n. -/
noncomputable def a (a0 : β„•) : β„• β†’ β„• | 0 => a0 | n + 1 => if (Nat.sqrt (a a0 n))^2 = a a0 n then Nat.sqrt (a a0 n) else a a0 n + 3 abbrev solution_set : Set β„• := {n : β„• | n > 1 ∧ n % 3 = 0} theorem imo2017_p1 (a0 : β„•) : a0 ∈ solution_set ↔ βˆƒ A, { n | a a0 n = A }.Infinite := by sorry
test
import Mathlib import Aesop set_option maxHeartbeats 0 open BigOperators Real Nat Topology Rat /-! # International Mathematical Olympiad 2017, Problem 1 For any integer aβ‚€ > 1, define the sequence aβ‚™β‚Šβ‚ = √aβ‚™, if aβ‚™ is a perfect square or aβ‚™ + 3 otherwise. Find all values of aβ‚€ for which there exists A such that aβ‚™ = A for infinitely many values of n. -/ noncomputable def a (a0 : β„•) : β„• β†’ β„• | 0 => a0 | n + 1 => if (Nat.sqrt (a a0 n))^2 = a a0 n then Nat.sqrt (a a0 n) else a a0 n + 3 abbrev solution_set : Set β„• := {n : β„• | n > 1 ∧ n % 3 = 0} theorem imo2017_p1 (a0 : β„•) : a0 ∈ solution_set ↔ βˆƒ A, { n | a a0 n = A }.Infinite := by sorry
number theory
Imo1978P6
false
[ "combinatorics" ]
Imo1978P6
import Mathlib import Aesop set_option maxHeartbeats 0 open BigOperators Real Nat Topology Rat
/-! # International Mathematical Olympiad 1978, Problem 6 An international society has its members from six different countries. The list of members has 1978 names, numbered $1, 2, \ldots, 1978$. Prove that there is at least one member whose number is the sum of the numbers of two (not necessarily distinct) members from his own country. -/
theorem imo1978_p6 (n : β„•) (hn : n = 1978) (C : Fin n β†’ Fin 6) : βˆƒ j : Fin n, βˆƒ i : Fin n, βˆƒ k : Fin n, C i = C j ∧ C j = C k ∧ (i:β„•) + 1 + (k:β„•) + 1 = (j:β„•) + 1 := by sorry
test
import Mathlib import Aesop set_option maxHeartbeats 0 open BigOperators Real Nat Topology Rat /-! # International Mathematical Olympiad 1978, Problem 6 An international society has its members from six different countries. The list of members has 1978 names, numbered $1, 2, \ldots, 1978$. Prove that there is at least one member whose number is the sum of the numbers of two (not necessarily distinct) members from his own country. -/ theorem imo1978_p6 (n : β„•) (hn : n = 1978) (C : Fin n β†’ Fin 6) : βˆƒ j : Fin n, βˆƒ i : Fin n, βˆƒ k : Fin n, C i = C j ∧ C j = C k ∧ (i:β„•) + 1 + (k:β„•) + 1 = (j:β„•) + 1 := by sorry
combinatorics
Imo1971P5
false
[ "combinatorics" ]
Imo1971P5
import Mathlib import Aesop set_option maxHeartbeats 0 open BigOperators Real Nat Topology Rat
/-! # International Mathematical Olympiad 1971, Problem 5 Prove that for every natural number m there exists a finite set S of points in the plane with the following property: For every point s in S, there are exactly m points which are at a unit distance from s. -/
/- special open -/ open EuclideanGeometry abbrev Pt := EuclideanSpace ℝ (Fin 2) theorem imo1971_p5 (m : β„•) : βˆƒ S : Set Pt, S.Finite ∧ βˆ€ s ∈ S, Nat.card {t | dist s t = 1} = m := by sorry
test
import Mathlib import Aesop set_option maxHeartbeats 0 open BigOperators Real Nat Topology Rat /-! # International Mathematical Olympiad 1971, Problem 5 Prove that for every natural number m there exists a finite set S of points in the plane with the following property: For every point s in S, there are exactly m points which are at a unit distance from s. -/ /- special open -/ open EuclideanGeometry abbrev Pt := EuclideanSpace ℝ (Fin 2) theorem imo1971_p5 (m : β„•) : βˆƒ S : Set Pt, S.Finite ∧ βˆ€ s ∈ S, Nat.card {t | dist s t = 1} = m := by sorry
combinatorics
Imo1962P1
true
[ "number theory" ]
Imo1962P1
import Mathlib import Aesop set_option maxHeartbeats 0 open BigOperators Real Nat Topology Rat
/-! # International Mathematical Olympiad 1962, Problem 1 Find the smallest natural number $n$ which has the following properties: (a) Its decimal representation has 6 as the last digit. (b) If the last digit 6 is erased and placed in front of the remaining digits, the resulting number is four times as large as the original number $n$. -/
def ProblemPredicate (n : β„•) : Prop := (digits 10 n).headI = 6 ∧ ofDigits 10 ((digits 10 n).tail.concat 6) = 4 * n abbrev solution : β„• := 153846 theorem imo1962_p1 : IsLeast {n | ProblemPredicate n} solution := by sorry
test
import Mathlib import Aesop set_option maxHeartbeats 0 open BigOperators Real Nat Topology Rat /-! # International Mathematical Olympiad 1962, Problem 1 Find the smallest natural number $n$ which has the following properties: (a) Its decimal representation has 6 as the last digit. (b) If the last digit 6 is erased and placed in front of the remaining digits, the resulting number is four times as large as the original number $n$. -/ def ProblemPredicate (n : β„•) : Prop := (digits 10 n).headI = 6 ∧ ofDigits 10 ((digits 10 n).tail.concat 6) = 4 * n abbrev solution : β„• := 153846 theorem imo1962_p1 : IsLeast {n | ProblemPredicate n} solution := by sorry
number theory
Canada1998P3
true
[ "algebra", "inequality" ]
Canada1998P3
import Mathlib import Aesop set_option maxHeartbeats 0 open BigOperators Real Nat Topology Rat
/-! Canadian Mathematical Olympiad 1998, Problem 3 Let n be a natural number such that n β‰₯ 2. Show that (1/(n + 1))(1 + 1/3 + ... + 1/(2n - 1)) > (1/n)(1/2 + 1/4 + ... + 1/2n). -/
theorem canada1998_p3 (n : β„•) (hn : 2 ≀ n) : (1/(n:ℝ)) * βˆ‘ i ∈ Finset.range n, (1/(2 * (i:ℝ) + 2)) < (1/((n:ℝ) + 1)) * βˆ‘ i ∈ Finset.range n, (1/(2 * (i:ℝ) + 1)) := by sorry
test
import Mathlib import Aesop set_option maxHeartbeats 0 open BigOperators Real Nat Topology Rat /-! Canadian Mathematical Olympiad 1998, Problem 3 Let n be a natural number such that n β‰₯ 2. Show that (1/(n + 1))(1 + 1/3 + ... + 1/(2n - 1)) > (1/n)(1/2 + 1/4 + ... + 1/2n). -/ theorem canada1998_p3 (n : β„•) (hn : 2 ≀ n) : (1/(n:ℝ)) * βˆ‘ i ∈ Finset.range n, (1/(2 * (i:ℝ) + 2)) < (1/((n:ℝ) + 1)) * βˆ‘ i ∈ Finset.range n, (1/(2 * (i:ℝ) + 1)) := by sorry
algebra
End of preview. Expand in Data Studio

MathOlympiadBench (Math Olympiad) comprises human-verified formalizations of Olympiad-level mathematical competition problems, sourced from Compfiles and IMOSLLean4 repository. MathOlympiadBench contains 360 problems, including 158 IMO problems from 1959 to 2024, 131 IMO shortlist problems covering 2006 to 2023, 68 national mathematical Olympiad problems, and 3 additional mathematical puzzles.

MathOlympiadBench is human-processed to eliminate several issues presented in the source problems: 1. incomplete problem statements, 2. distribution across multiple files, 3. multiple theorems per problem, and 4. incompatibility with the commonly used Mathlib. The verification process ensures that each problem contains exactly one formal theorem with its corresponding informal statement, and confirms that all formal statements can pass the compilation with the sorry tactic.

We compared the IMO problems shared between MathOlympiadBench and MiniF2F, and identified at least 3 cases in MiniF2F exhibiting issues such as: 1. the formal statement to be proved is strictly weaker than the informal statement, and 2. the formal statement does not match the informal statement. Notably, similar issues are not observed for these problems in MathOlympiadBench.

Downloads last month
292