birgermoell's picture
Add files using upload-large-folder tool
7931c0c verified
Raw History Blame Contribute Delete
123 kB
{"id": "combinatorial-identities-binomial_sums-d1-t0000", "env": "combinatorial-identities", "msc": "05", "family": "binomial_sums", "difficulty": 1, "seed": 0, "kind": "prove", "instruction": "# Prove an identity for binomial coefficients\n\nProve the following.\n\nFor every natural number \\(n\\), \\[\\sum_{i=0}^{n} \\binom{n}{i}\\, 2^{i} = 3^{n}.\\]\n\n## What to do\n\n`Solution.lean` in the working directory states the theorem in Lean 4 with Mathlib, with `sorry` in place of the proof. Replace every `sorry` with a proof.\n\n- Do not change the statement of any theorem or any definition the file gives you. You may add your own lemmas and definitions.\n- Check your work with `lake env lean Solution.lean` (run it inside `/opt/arena/lean`, giving the full path to the file). It must compile without errors.\n- A theorem counts only if its proof is complete: no `sorry`, no new axioms, no `native_decide`.\n- The reward is 1 if the theorem is proved and 0 otherwise.\n", "start_file": "import Mathlib\n\n/-- A weighted sum of binomial coefficients. -/\ntheorem binomial_sum (n : ℕ) :\n ∑ i ∈ Finset.range (n + 1), n.choose i * 2 ^ i = 3 ^ n := by\n sorry\n", "path": "tasks/combinatorial-identities/combinatorial-identities-binomial_sums-d1-t0000"}
{"id": "combinatorial-identities-counting-d1-t0001", "env": "combinatorial-identities", "msc": "05", "family": "counting", "difficulty": 1, "seed": 1, "kind": "prove", "instruction": "# Prove a counting statement\n\nProve the following.\n\nLet \\(s\\) be a finite set of integers with more than 3 elements. Prove that \\(s\\) contains two different integers \\(x \\ne y\\) that leave the same remainder on division by 3.\n\n## What to do\n\n`Solution.lean` in the working directory states the theorem in Lean 4 with Mathlib, with `sorry` in place of the proof. Replace every `sorry` with a proof.\n\n- Do not change the statement of any theorem or any definition the file gives you. You may add your own lemmas and definitions.\n- Check your work with `lake env lean Solution.lean` (run it inside `/opt/arena/lean`, giving the full path to the file). It must compile without errors.\n- A theorem counts only if its proof is complete: no `sorry`, no new axioms, no `native_decide`.\n- The reward is 1 if the theorem is proved and 0 otherwise.\n", "start_file": "import Mathlib\n\n/-- Pigeonhole principle for remainders. -/\ntheorem pigeonhole_mod (s : Finset ℤ) (h : 3 < s.card) :\n ∃ x ∈ s, ∃ y ∈ s, x ≠ y ∧ x % 3 = y % 3 := by\n sorry\n", "path": "tasks/combinatorial-identities/combinatorial-identities-counting-d1-t0001"}
{"id": "combinatorial-identities-fibonacci-d1-t0002", "env": "combinatorial-identities", "msc": "05", "family": "fibonacci", "difficulty": 1, "seed": 2, "kind": "prove", "instruction": "# Prove an identity for Fibonacci numbers\n\nProve the following.\n\nFor every natural number \\(n\\), with \\(F\\) the Fibonacci sequence (\\(F_0 = 0\\), \\(F_1 = 1\\), \\(F_{k+2} = F_k + F_{k+1}\\)), \\[\\sum_{i=0}^{n-1} F_{i+13} + F_{14} = F_{n+14}.\\]\n\n## What to do\n\n`Solution.lean` in the working directory states the theorem in Lean 4 with Mathlib, with `sorry` in place of the proof. Replace every `sorry` with a proof.\n\n- Do not change the statement of any theorem or any definition the file gives you. You may add your own lemmas and definitions.\n- Check your work with `lake env lean Solution.lean` (run it inside `/opt/arena/lean`, giving the full path to the file). It must compile without errors.\n- A theorem counts only if its proof is complete: no `sorry`, no new axioms, no `native_decide`.\n- The reward is 1 if the theorem is proved and 0 otherwise.\n", "start_file": "import Mathlib\n\n/-- A telescoping sum of Fibonacci numbers. -/\ntheorem fib_shifted_sum (n : ℕ) :\n ∑ i ∈ Finset.range n, Nat.fib (i + 13) + Nat.fib 14 = Nat.fib (n + 14) := by\n sorry\n", "path": "tasks/combinatorial-identities/combinatorial-identities-fibonacci-d1-t0002"}
{"id": "combinatorial-identities-linear_recurrence-d1-t0003", "env": "combinatorial-identities", "msc": "05", "family": "linear_recurrence", "difficulty": 1, "seed": 3, "kind": "prove", "instruction": "# Find the closed form of a recurrence\n\nProve the following.\n\nDefine a sequence of integers by \\(u_0 = 6\\), \\(u_1 = 26\\) and \\(u_{n+2} = 9\\,u_{n+1} - 20\\,u_{n}\\). Prove that for every natural number \\(n\\), \\[u_n = 4 \\cdot 4^{n} + 2 \\cdot 5^{n}.\\]\n\n## What to do\n\n`Solution.lean` in the working directory states the theorem in Lean 4 with Mathlib, with `sorry` in place of the proof. Replace every `sorry` with a proof.\n\n- Do not change the statement of any theorem or any definition the file gives you. You may add your own lemmas and definitions.\n- Check your work with `lake env lean Solution.lean` (run it inside `/opt/arena/lean`, giving the full path to the file). It must compile without errors.\n- A theorem counts only if its proof is complete: no `sorry`, no new axioms, no `native_decide`.\n- The reward is 1 if the theorem is proved and 0 otherwise.\n", "start_file": "import Mathlib\n\ndef u : ℕ → ℤ\n | 0 => 6\n | 1 => 26\n | (n + 2) => 9 * u (n + 1) - 20 * u n\n\n/-- A closed form for the sequence defined by the recurrence. -/\ntheorem seq_closed_form (n : ℕ) :\n u n = 4 * 4 ^ n + 2 * 5 ^ n := by\n sorry\n", "path": "tasks/combinatorial-identities/combinatorial-identities-linear_recurrence-d1-t0003"}
{"id": "combinatorial-identities-binomial_sums-d2-t0004", "env": "combinatorial-identities", "msc": "05", "family": "binomial_sums", "difficulty": 2, "seed": 4, "kind": "prove", "instruction": "# Prove an identity for binomial coefficients\n\nProve the following.\n\nFor every natural number \\(n\\), \\[\\sum_{i=0}^{n} \\binom{i+7}{7} = \\binom{n+8}{8}.\\] (This is the hockey stick identity.)\n\n## What to do\n\n`Solution.lean` in the working directory states the theorem in Lean 4 with Mathlib, with `sorry` in place of the proof. Replace every `sorry` with a proof.\n\n- Do not change the statement of any theorem or any definition the file gives you. You may add your own lemmas and definitions.\n- Check your work with `lake env lean Solution.lean` (run it inside `/opt/arena/lean`, giving the full path to the file). It must compile without errors.\n- A theorem counts only if its proof is complete: no `sorry`, no new axioms, no `native_decide`.\n- The reward is 1 if the theorem is proved and 0 otherwise.\n", "start_file": "import Mathlib\n\n/-- A hockey stick identity for binomial coefficients. -/\ntheorem hockey_stick (n : ℕ) :\n ∑ i ∈ Finset.range (n + 1), (i + 7).choose 7 = (n + 8).choose 8 := by\n sorry\n", "path": "tasks/combinatorial-identities/combinatorial-identities-binomial_sums-d2-t0004"}
{"id": "combinatorial-identities-counting-d2-t0005", "env": "combinatorial-identities", "msc": "05", "family": "counting", "difficulty": 2, "seed": 5, "kind": "prove", "instruction": "# Prove a counting statement\n\nProve the following.\n\nLet \\(n\\) be a natural number. Prove that the set \\(\\{0, 1, \\dots, n-1\\}\\) has at most as many elements as the set of integers \\(y\\) with \\(0 \\le y < 4 n\\) and \\(y \\equiv 1 \\pmod{4}\\). (Construct an injection.)\n\n## What to do\n\n`Solution.lean` in the working directory states the theorem in Lean 4 with Mathlib, with `sorry` in place of the proof. Replace every `sorry` with a proof.\n\n- Do not change the statement of any theorem or any definition the file gives you. You may add your own lemmas and definitions.\n- Check your work with `lake env lean Solution.lean` (run it inside `/opt/arena/lean`, giving the full path to the file). It must compile without errors.\n- A theorem counts only if its proof is complete: no `sorry`, no new axioms, no `native_decide`.\n- The reward is 1 if the theorem is proved and 0 otherwise.\n", "start_file": "import Mathlib\n\n/-- An injection into a residue class gives a cardinality bound. -/\ntheorem card_le_residue_class (n : ℕ) :\n (Finset.range n).card ≤ ((Finset.range (4 * n)).filter (fun y => y % 4 = 1)).card := by\n sorry\n", "path": "tasks/combinatorial-identities/combinatorial-identities-counting-d2-t0005"}
{"id": "combinatorial-identities-fibonacci-d2-t0006", "env": "combinatorial-identities", "msc": "05", "family": "fibonacci", "difficulty": 2, "seed": 6, "kind": "prove", "instruction": "# Prove an identity for Fibonacci numbers\n\nProve the following.\n\nFor every natural number \\(n\\), with \\(F\\) the Fibonacci sequence, \\[\\sum_{i=0}^{n-1} F_{2i+2} + F_{1} = F_{2n+1}.\\]\n\n## What to do\n\n`Solution.lean` in the working directory states the theorem in Lean 4 with Mathlib, with `sorry` in place of the proof. Replace every `sorry` with a proof.\n\n- Do not change the statement of any theorem or any definition the file gives you. You may add your own lemmas and definitions.\n- Check your work with `lake env lean Solution.lean` (run it inside `/opt/arena/lean`, giving the full path to the file). It must compile without errors.\n- A theorem counts only if its proof is complete: no `sorry`, no new axioms, no `native_decide`.\n- The reward is 1 if the theorem is proved and 0 otherwise.\n", "start_file": "import Mathlib\n\n/-- A sum of every second Fibonacci number. -/\ntheorem fib_odd_sum (n : ℕ) :\n ∑ i ∈ Finset.range n, Nat.fib (2 * i + 2) + Nat.fib 1 = Nat.fib (2 * n + 1) := by\n sorry\n", "path": "tasks/combinatorial-identities/combinatorial-identities-fibonacci-d2-t0006"}
{"id": "combinatorial-identities-linear_recurrence-d2-t0007", "env": "combinatorial-identities", "msc": "05", "family": "linear_recurrence", "difficulty": 2, "seed": 7, "kind": "prove", "instruction": "# Find the closed form of a recurrence\n\nProve the following.\n\nDefine a sequence of integers by \\(u_0 = 4\\), \\(u_1 = -2\\) and \\(u_{n+2} = -1\\,u_{n+1} - -6\\,u_{n}\\). Prove that for every natural number \\(n\\), \\[u_n = 2 \\cdot 2^{n} + 2 \\cdot (-3)^{n}.\\]\n\n## What to do\n\n`Solution.lean` in the working directory states the theorem in Lean 4 with Mathlib, with `sorry` in place of the proof. Replace every `sorry` with a proof.\n\n- Do not change the statement of any theorem or any definition the file gives you. You may add your own lemmas and definitions.\n- Check your work with `lake env lean Solution.lean` (run it inside `/opt/arena/lean`, giving the full path to the file). It must compile without errors.\n- A theorem counts only if its proof is complete: no `sorry`, no new axioms, no `native_decide`.\n- The reward is 1 if the theorem is proved and 0 otherwise.\n", "start_file": "import Mathlib\n\ndef u : ℕ → ℤ\n | 0 => 4\n | 1 => (-2)\n | (n + 2) => (-1) * u (n + 1) - (-6) * u n\n\n/-- A closed form for the sequence defined by the recurrence. -/\ntheorem seq_closed_form (n : ℕ) :\n u n = 2 * 2 ^ n + 2 * (-3) ^ n := by\n sorry\n", "path": "tasks/combinatorial-identities/combinatorial-identities-linear_recurrence-d2-t0007"}
{"id": "combinatorial-identities-binomial_sums-d3-t0008", "env": "combinatorial-identities", "msc": "05", "family": "binomial_sums", "difficulty": 3, "seed": 8, "kind": "prove", "instruction": "# Prove an identity for binomial coefficients\n\nProve the following.\n\nFirst prove \\[\\sum_{i=0}^{n} i \\binom{n}{i} = n \\cdot 2^{n-1},\\] where \\(n - 1\\) is truncated subtraction on the natural numbers. Then use it, and the value of \\(\\sum_{i=0}^{n} \\binom{n}{i}\\), to prove \\[\\sum_{i=0}^{n} (4i + 5) \\binom{n}{i} = 4 \\cdot n \\cdot 2^{n-1} + 5 \\cdot 2^{n}.\\]\n\n## What to do\n\n`Solution.lean` in the working directory states 2 theorems in Lean 4 with Mathlib, with `sorry` in place of each proof. Replace every `sorry` with a proof.\n\n- Do not change the statement of any theorem or any definition the file gives you. You may add your own lemmas and definitions.\n- Check your work with `lake env lean Solution.lean` (run it inside `/opt/arena/lean`, giving the full path to the file). It must compile without errors.\n- A theorem counts only if its proof is complete: no `sorry`, no new axioms, no `native_decide`.\n- The reward is the share of the 2 theorems that are proved. If the file does not compile the reward is 0, so leave `sorry` on a theorem you cannot finish rather than a broken proof.\n", "start_file": "import Mathlib\n\n/-- The sum of i times n choose i. -/\ntheorem sum_i_choose (n : ℕ) :\n ∑ i ∈ Finset.range (n + 1), i * n.choose i = n * 2 ^ (n - 1) := by\n sorry\n\n/-- A weighted binomial sum. -/\ntheorem weighted_sum (n : ℕ) :\n ∑ i ∈ Finset.range (n + 1), (4 * i + 5) * n.choose i = 4 * (n * 2 ^ (n - 1)) + 5 * 2 ^ n := by\n sorry\n", "path": "tasks/combinatorial-identities/combinatorial-identities-binomial_sums-d3-t0008"}
{"id": "combinatorial-identities-counting-d3-t0009", "env": "combinatorial-identities", "msc": "05", "family": "counting", "difficulty": 3, "seed": 9, "kind": "prove", "instruction": "# Prove a counting statement\n\nProve the following.\n\nLet \\(s\\) be a set of natural numbers that are all less than \\(6 \\cdot 5 = 30\\), and suppose \\(s\\) has more than 5 elements. Prove that \\(s\\) contains two elements \\(x < y\\) with \\(y - x < 6\\).\n\n## What to do\n\n`Solution.lean` in the working directory states the theorem in Lean 4 with Mathlib, with `sorry` in place of the proof. Replace every `sorry` with a proof.\n\n- Do not change the statement of any theorem or any definition the file gives you. You may add your own lemmas and definitions.\n- Check your work with `lake env lean Solution.lean` (run it inside `/opt/arena/lean`, giving the full path to the file). It must compile without errors.\n- A theorem counts only if its proof is complete: no `sorry`, no new axioms, no `native_decide`.\n- The reward is 1 if the theorem is proved and 0 otherwise.\n", "start_file": "import Mathlib\n\n/-- Pigeonhole principle for blocks of consecutive numbers. -/\ntheorem close_pair (s : Finset ℕ) (hs : s ⊆ Finset.range (6 * 5)) (h : 5 < s.card) :\n ∃ x ∈ s, ∃ y ∈ s, x < y ∧ y < x + 6 := by\n sorry\n", "path": "tasks/combinatorial-identities/combinatorial-identities-counting-d3-t0009"}
{"id": "combinatorial-identities-fibonacci-d3-t0010", "env": "combinatorial-identities", "msc": "05", "family": "fibonacci", "difficulty": 3, "seed": 10, "kind": "prove", "instruction": "# Prove an identity for Fibonacci numbers\n\nProve the following.\n\nFirst prove Cassini's identity: for every natural number \\(n\\), \\[F_{n+1}^2 - F_n F_{n+2} = (-1)^n,\\] computed in the integers, where \\(F\\) is the Fibonacci sequence. Then conclude that \\(F_{m+1}^2 - F_m F_{m+2}\\) is either \\(1\\) or \\(-1\\) when \\(m = 6n + 3\\).\n\n## What to do\n\n`Solution.lean` in the working directory states 2 theorems in Lean 4 with Mathlib, with `sorry` in place of each proof. Replace every `sorry` with a proof.\n\n- Do not change the statement of any theorem or any definition the file gives you. You may add your own lemmas and definitions.\n- Check your work with `lake env lean Solution.lean` (run it inside `/opt/arena/lean`, giving the full path to the file). It must compile without errors.\n- A theorem counts only if its proof is complete: no `sorry`, no new axioms, no `native_decide`.\n- The reward is the share of the 2 theorems that are proved. If the file does not compile the reward is 0, so leave `sorry` on a theorem you cannot finish rather than a broken proof.\n", "start_file": "import Mathlib\n\n/-- Cassini's identity for Fibonacci numbers. -/\ntheorem cassini (n : ℕ) :\n (Nat.fib (n + 1) : ℤ) ^ 2 - Nat.fib n * Nat.fib (n + 2) = (-1) ^ n := by\n sorry\n\n/-- Cassini's determinant is plus or minus one at the index given. -/\ntheorem cassini_pm_one (n : ℕ) :\n (Nat.fib (6 * n + 3 + 1) : ℤ) ^ 2 - Nat.fib (6 * n + 3) * Nat.fib (6 * n + 3 + 2) = 1 ∨ (Nat.fib (6 * n + 3 + 1) : ℤ) ^ 2 - Nat.fib (6 * n + 3) * Nat.fib (6 * n + 3 + 2) = -1 := by\n sorry\n", "path": "tasks/combinatorial-identities/combinatorial-identities-fibonacci-d3-t0010"}
{"id": "combinatorial-identities-linear_recurrence-d3-t0011", "env": "combinatorial-identities", "msc": "05", "family": "linear_recurrence", "difficulty": 3, "seed": 11, "kind": "prove", "instruction": "# Find the closed form of a recurrence\n\nProve the following.\n\nDefine a sequence of integers by \\(u_0 = 3\\), \\(u_1 = 12\\) and \\(u_{n+2} = 4\\,u_{n+1} - 4\\,u_{n}\\). Prove that for every natural number \\(n\\), \\[u_n = (3 + 3 n) \\cdot 2^{n}.\\]\n\n## What to do\n\n`Solution.lean` in the working directory states the theorem in Lean 4 with Mathlib, with `sorry` in place of the proof. Replace every `sorry` with a proof.\n\n- Do not change the statement of any theorem or any definition the file gives you. You may add your own lemmas and definitions.\n- Check your work with `lake env lean Solution.lean` (run it inside `/opt/arena/lean`, giving the full path to the file). It must compile without errors.\n- A theorem counts only if its proof is complete: no `sorry`, no new axioms, no `native_decide`.\n- The reward is 1 if the theorem is proved and 0 otherwise.\n", "start_file": "import Mathlib\n\ndef u : ℕ → ℤ\n | 0 => 3\n | 1 => 12\n | (n + 2) => 4 * u (n + 1) - 4 * u n\n\n/-- A closed form for the sequence defined by the recurrence. -/\ntheorem seq_closed_form (n : ℕ) :\n u n = (3 + 3 * (n : ℤ)) * 2 ^ n := by\n sorry\n", "path": "tasks/combinatorial-identities/combinatorial-identities-linear_recurrence-d3-t0011"}
{"id": "combinatorial-identities-binomial_sums-d1-t0012", "env": "combinatorial-identities", "msc": "05", "family": "binomial_sums", "difficulty": 1, "seed": 12, "kind": "prove", "instruction": "# Prove an identity for binomial coefficients\n\nProve the following.\n\nFor every natural number \\(n\\), \\[\\sum_{i=0}^{n} \\binom{n}{i}\\, 6^{i} = 7^{n}.\\]\n\n## What to do\n\n`Solution.lean` in the working directory states the theorem in Lean 4 with Mathlib, with `sorry` in place of the proof. Replace every `sorry` with a proof.\n\n- Do not change the statement of any theorem or any definition the file gives you. You may add your own lemmas and definitions.\n- Check your work with `lake env lean Solution.lean` (run it inside `/opt/arena/lean`, giving the full path to the file). It must compile without errors.\n- A theorem counts only if its proof is complete: no `sorry`, no new axioms, no `native_decide`.\n- The reward is 1 if the theorem is proved and 0 otherwise.\n", "start_file": "import Mathlib\n\n/-- A weighted sum of binomial coefficients. -/\ntheorem binomial_sum (n : ℕ) :\n ∑ i ∈ Finset.range (n + 1), n.choose i * 6 ^ i = 7 ^ n := by\n sorry\n", "path": "tasks/combinatorial-identities/combinatorial-identities-binomial_sums-d1-t0012"}
{"id": "combinatorial-identities-counting-d1-t0013", "env": "combinatorial-identities", "msc": "05", "family": "counting", "difficulty": 1, "seed": 13, "kind": "prove", "instruction": "# Prove a counting statement\n\nProve the following.\n\nLet \\(s\\) be a finite set of integers with more than 5 elements. Prove that \\(s\\) contains two different integers \\(x \\ne y\\) that leave the same remainder on division by 5.\n\n## What to do\n\n`Solution.lean` in the working directory states the theorem in Lean 4 with Mathlib, with `sorry` in place of the proof. Replace every `sorry` with a proof.\n\n- Do not change the statement of any theorem or any definition the file gives you. You may add your own lemmas and definitions.\n- Check your work with `lake env lean Solution.lean` (run it inside `/opt/arena/lean`, giving the full path to the file). It must compile without errors.\n- A theorem counts only if its proof is complete: no `sorry`, no new axioms, no `native_decide`.\n- The reward is 1 if the theorem is proved and 0 otherwise.\n", "start_file": "import Mathlib\n\n/-- Pigeonhole principle for remainders. -/\ntheorem pigeonhole_mod (s : Finset ℤ) (h : 5 < s.card) :\n ∃ x ∈ s, ∃ y ∈ s, x ≠ y ∧ x % 5 = y % 5 := by\n sorry\n", "path": "tasks/combinatorial-identities/combinatorial-identities-counting-d1-t0013"}
{"id": "combinatorial-identities-fibonacci-d1-t0014", "env": "combinatorial-identities", "msc": "05", "family": "fibonacci", "difficulty": 1, "seed": 14, "kind": "prove", "instruction": "# Prove an identity for Fibonacci numbers\n\nProve the following.\n\nFor every natural number \\(n\\), with \\(F\\) the Fibonacci sequence (\\(F_0 = 0\\), \\(F_1 = 1\\), \\(F_{k+2} = F_k + F_{k+1}\\)), \\[\\sum_{i=0}^{n-1} F_{i+6} + F_{7} = F_{n+7}.\\]\n\n## What to do\n\n`Solution.lean` in the working directory states the theorem in Lean 4 with Mathlib, with `sorry` in place of the proof. Replace every `sorry` with a proof.\n\n- Do not change the statement of any theorem or any definition the file gives you. You may add your own lemmas and definitions.\n- Check your work with `lake env lean Solution.lean` (run it inside `/opt/arena/lean`, giving the full path to the file). It must compile without errors.\n- A theorem counts only if its proof is complete: no `sorry`, no new axioms, no `native_decide`.\n- The reward is 1 if the theorem is proved and 0 otherwise.\n", "start_file": "import Mathlib\n\n/-- A telescoping sum of Fibonacci numbers. -/\ntheorem fib_shifted_sum (n : ℕ) :\n ∑ i ∈ Finset.range n, Nat.fib (i + 6) + Nat.fib 7 = Nat.fib (n + 7) := by\n sorry\n", "path": "tasks/combinatorial-identities/combinatorial-identities-fibonacci-d1-t0014"}
{"id": "combinatorial-identities-linear_recurrence-d1-t0015", "env": "combinatorial-identities", "msc": "05", "family": "linear_recurrence", "difficulty": 1, "seed": 15, "kind": "prove", "instruction": "# Find the closed form of a recurrence\n\nProve the following.\n\nDefine a sequence of integers by \\(u_0 = 4\\), \\(u_1 = 18\\) and \\(u_{n+2} = 8\\,u_{n+1} - 15\\,u_{n}\\). Prove that for every natural number \\(n\\), \\[u_n = 1 \\cdot 3^{n} + 3 \\cdot 5^{n}.\\]\n\n## What to do\n\n`Solution.lean` in the working directory states the theorem in Lean 4 with Mathlib, with `sorry` in place of the proof. Replace every `sorry` with a proof.\n\n- Do not change the statement of any theorem or any definition the file gives you. You may add your own lemmas and definitions.\n- Check your work with `lake env lean Solution.lean` (run it inside `/opt/arena/lean`, giving the full path to the file). It must compile without errors.\n- A theorem counts only if its proof is complete: no `sorry`, no new axioms, no `native_decide`.\n- The reward is 1 if the theorem is proved and 0 otherwise.\n", "start_file": "import Mathlib\n\ndef u : ℕ → ℤ\n | 0 => 4\n | 1 => 18\n | (n + 2) => 8 * u (n + 1) - 15 * u n\n\n/-- A closed form for the sequence defined by the recurrence. -/\ntheorem seq_closed_form (n : ℕ) :\n u n = 1 * 3 ^ n + 3 * 5 ^ n := by\n sorry\n", "path": "tasks/combinatorial-identities/combinatorial-identities-linear_recurrence-d1-t0015"}
{"id": "combinatorial-identities-binomial_sums-d2-t0016", "env": "combinatorial-identities", "msc": "05", "family": "binomial_sums", "difficulty": 2, "seed": 16, "kind": "prove", "instruction": "# Prove an identity for binomial coefficients\n\nProve the following.\n\nFor every natural number \\(n\\), \\[\\sum_{i=0}^{n} \\binom{i+6}{6} = \\binom{n+7}{7}.\\] (This is the hockey stick identity.)\n\n## What to do\n\n`Solution.lean` in the working directory states the theorem in Lean 4 with Mathlib, with `sorry` in place of the proof. Replace every `sorry` with a proof.\n\n- Do not change the statement of any theorem or any definition the file gives you. You may add your own lemmas and definitions.\n- Check your work with `lake env lean Solution.lean` (run it inside `/opt/arena/lean`, giving the full path to the file). It must compile without errors.\n- A theorem counts only if its proof is complete: no `sorry`, no new axioms, no `native_decide`.\n- The reward is 1 if the theorem is proved and 0 otherwise.\n", "start_file": "import Mathlib\n\n/-- A hockey stick identity for binomial coefficients. -/\ntheorem hockey_stick (n : ℕ) :\n ∑ i ∈ Finset.range (n + 1), (i + 6).choose 6 = (n + 7).choose 7 := by\n sorry\n", "path": "tasks/combinatorial-identities/combinatorial-identities-binomial_sums-d2-t0016"}
{"id": "combinatorial-identities-counting-d2-t0017", "env": "combinatorial-identities", "msc": "05", "family": "counting", "difficulty": 2, "seed": 17, "kind": "prove", "instruction": "# Prove a counting statement\n\nProve the following.\n\nLet \\(n\\) be a natural number. Prove that the set \\(\\{0, 1, \\dots, n-1\\}\\) has at most as many elements as the set of integers \\(y\\) with \\(0 \\le y < 3 n\\) and \\(y \\equiv 1 \\pmod{3}\\). (Construct an injection.)\n\n## What to do\n\n`Solution.lean` in the working directory states the theorem in Lean 4 with Mathlib, with `sorry` in place of the proof. Replace every `sorry` with a proof.\n\n- Do not change the statement of any theorem or any definition the file gives you. You may add your own lemmas and definitions.\n- Check your work with `lake env lean Solution.lean` (run it inside `/opt/arena/lean`, giving the full path to the file). It must compile without errors.\n- A theorem counts only if its proof is complete: no `sorry`, no new axioms, no `native_decide`.\n- The reward is 1 if the theorem is proved and 0 otherwise.\n", "start_file": "import Mathlib\n\n/-- An injection into a residue class gives a cardinality bound. -/\ntheorem card_le_residue_class (n : ℕ) :\n (Finset.range n).card ≤ ((Finset.range (3 * n)).filter (fun y => y % 3 = 1)).card := by\n sorry\n", "path": "tasks/combinatorial-identities/combinatorial-identities-counting-d2-t0017"}
{"id": "combinatorial-identities-fibonacci-d2-t0018", "env": "combinatorial-identities", "msc": "05", "family": "fibonacci", "difficulty": 2, "seed": 18, "kind": "prove", "instruction": "# Prove an identity for Fibonacci numbers\n\nProve the following.\n\nFor every natural number \\(n\\), with \\(F\\) the Fibonacci sequence, \\[\\sum_{i=0}^{n-1} F_{2i+6} + F_{5} = F_{2n+5}.\\]\n\n## What to do\n\n`Solution.lean` in the working directory states the theorem in Lean 4 with Mathlib, with `sorry` in place of the proof. Replace every `sorry` with a proof.\n\n- Do not change the statement of any theorem or any definition the file gives you. You may add your own lemmas and definitions.\n- Check your work with `lake env lean Solution.lean` (run it inside `/opt/arena/lean`, giving the full path to the file). It must compile without errors.\n- A theorem counts only if its proof is complete: no `sorry`, no new axioms, no `native_decide`.\n- The reward is 1 if the theorem is proved and 0 otherwise.\n", "start_file": "import Mathlib\n\n/-- A sum of every second Fibonacci number. -/\ntheorem fib_odd_sum (n : ℕ) :\n ∑ i ∈ Finset.range n, Nat.fib (2 * i + 6) + Nat.fib 5 = Nat.fib (2 * n + 5) := by\n sorry\n", "path": "tasks/combinatorial-identities/combinatorial-identities-fibonacci-d2-t0018"}
{"id": "combinatorial-identities-linear_recurrence-d2-t0019", "env": "combinatorial-identities", "msc": "05", "family": "linear_recurrence", "difficulty": 2, "seed": 19, "kind": "prove", "instruction": "# Find the closed form of a recurrence\n\nProve the following.\n\nDefine a sequence of integers by \\(u_0 = 5\\), \\(u_1 = 22\\) and \\(u_{n+2} = 9\\,u_{n+1} - 20\\,u_{n}\\). Prove that for every natural number \\(n\\), \\[u_n = 3 \\cdot 4^{n} + 2 \\cdot 5^{n}.\\]\n\n## What to do\n\n`Solution.lean` in the working directory states the theorem in Lean 4 with Mathlib, with `sorry` in place of the proof. Replace every `sorry` with a proof.\n\n- Do not change the statement of any theorem or any definition the file gives you. You may add your own lemmas and definitions.\n- Check your work with `lake env lean Solution.lean` (run it inside `/opt/arena/lean`, giving the full path to the file). It must compile without errors.\n- A theorem counts only if its proof is complete: no `sorry`, no new axioms, no `native_decide`.\n- The reward is 1 if the theorem is proved and 0 otherwise.\n", "start_file": "import Mathlib\n\ndef u : ℕ → ℤ\n | 0 => 5\n | 1 => 22\n | (n + 2) => 9 * u (n + 1) - 20 * u n\n\n/-- A closed form for the sequence defined by the recurrence. -/\ntheorem seq_closed_form (n : ℕ) :\n u n = 3 * 4 ^ n + 2 * 5 ^ n := by\n sorry\n", "path": "tasks/combinatorial-identities/combinatorial-identities-linear_recurrence-d2-t0019"}
{"id": "combinatorial-identities-binomial_sums-d3-t0020", "env": "combinatorial-identities", "msc": "05", "family": "binomial_sums", "difficulty": 3, "seed": 20, "kind": "prove", "instruction": "# Prove an identity for binomial coefficients\n\nProve the following.\n\nFirst prove \\[\\sum_{i=0}^{n} i \\binom{n}{i} = n \\cdot 2^{n-1},\\] where \\(n - 1\\) is truncated subtraction on the natural numbers. Then use it, and the value of \\(\\sum_{i=0}^{n} \\binom{n}{i}\\), to prove \\[\\sum_{i=0}^{n} (5i + 3) \\binom{n}{i} = 5 \\cdot n \\cdot 2^{n-1} + 3 \\cdot 2^{n}.\\]\n\n## What to do\n\n`Solution.lean` in the working directory states 2 theorems in Lean 4 with Mathlib, with `sorry` in place of each proof. Replace every `sorry` with a proof.\n\n- Do not change the statement of any theorem or any definition the file gives you. You may add your own lemmas and definitions.\n- Check your work with `lake env lean Solution.lean` (run it inside `/opt/arena/lean`, giving the full path to the file). It must compile without errors.\n- A theorem counts only if its proof is complete: no `sorry`, no new axioms, no `native_decide`.\n- The reward is the share of the 2 theorems that are proved. If the file does not compile the reward is 0, so leave `sorry` on a theorem you cannot finish rather than a broken proof.\n", "start_file": "import Mathlib\n\n/-- The sum of i times n choose i. -/\ntheorem sum_i_choose (n : ℕ) :\n ∑ i ∈ Finset.range (n + 1), i * n.choose i = n * 2 ^ (n - 1) := by\n sorry\n\n/-- A weighted binomial sum. -/\ntheorem weighted_sum (n : ℕ) :\n ∑ i ∈ Finset.range (n + 1), (5 * i + 3) * n.choose i = 5 * (n * 2 ^ (n - 1)) + 3 * 2 ^ n := by\n sorry\n", "path": "tasks/combinatorial-identities/combinatorial-identities-binomial_sums-d3-t0020"}
{"id": "combinatorial-identities-counting-d3-t0021", "env": "combinatorial-identities", "msc": "05", "family": "counting", "difficulty": 3, "seed": 21, "kind": "prove", "instruction": "# Prove a counting statement\n\nProve the following.\n\nLet \\(s\\) be a set of natural numbers that are all less than \\(2 \\cdot 3 = 6\\), and suppose \\(s\\) has more than 3 elements. Prove that \\(s\\) contains two elements \\(x < y\\) with \\(y - x < 2\\).\n\n## What to do\n\n`Solution.lean` in the working directory states the theorem in Lean 4 with Mathlib, with `sorry` in place of the proof. Replace every `sorry` with a proof.\n\n- Do not change the statement of any theorem or any definition the file gives you. You may add your own lemmas and definitions.\n- Check your work with `lake env lean Solution.lean` (run it inside `/opt/arena/lean`, giving the full path to the file). It must compile without errors.\n- A theorem counts only if its proof is complete: no `sorry`, no new axioms, no `native_decide`.\n- The reward is 1 if the theorem is proved and 0 otherwise.\n", "start_file": "import Mathlib\n\n/-- Pigeonhole principle for blocks of consecutive numbers. -/\ntheorem close_pair (s : Finset ℕ) (hs : s ⊆ Finset.range (2 * 3)) (h : 3 < s.card) :\n ∃ x ∈ s, ∃ y ∈ s, x < y ∧ y < x + 2 := by\n sorry\n", "path": "tasks/combinatorial-identities/combinatorial-identities-counting-d3-t0021"}
{"id": "combinatorial-identities-fibonacci-d3-t0022", "env": "combinatorial-identities", "msc": "05", "family": "fibonacci", "difficulty": 3, "seed": 22, "kind": "prove", "instruction": "# Prove an identity for Fibonacci numbers\n\nProve the following.\n\nFirst prove Cassini's identity: for every natural number \\(n\\), \\[F_{n+1}^2 - F_n F_{n+2} = (-1)^n,\\] computed in the integers, where \\(F\\) is the Fibonacci sequence. Then conclude that \\(F_{m+1}^2 - F_m F_{m+2}\\) is either \\(1\\) or \\(-1\\) when \\(m = 3n + 3\\).\n\n## What to do\n\n`Solution.lean` in the working directory states 2 theorems in Lean 4 with Mathlib, with `sorry` in place of each proof. Replace every `sorry` with a proof.\n\n- Do not change the statement of any theorem or any definition the file gives you. You may add your own lemmas and definitions.\n- Check your work with `lake env lean Solution.lean` (run it inside `/opt/arena/lean`, giving the full path to the file). It must compile without errors.\n- A theorem counts only if its proof is complete: no `sorry`, no new axioms, no `native_decide`.\n- The reward is the share of the 2 theorems that are proved. If the file does not compile the reward is 0, so leave `sorry` on a theorem you cannot finish rather than a broken proof.\n", "start_file": "import Mathlib\n\n/-- Cassini's identity for Fibonacci numbers. -/\ntheorem cassini (n : ℕ) :\n (Nat.fib (n + 1) : ℤ) ^ 2 - Nat.fib n * Nat.fib (n + 2) = (-1) ^ n := by\n sorry\n\n/-- Cassini's determinant is plus or minus one at the index given. -/\ntheorem cassini_pm_one (n : ℕ) :\n (Nat.fib (3 * n + 3 + 1) : ℤ) ^ 2 - Nat.fib (3 * n + 3) * Nat.fib (3 * n + 3 + 2) = 1 ∨ (Nat.fib (3 * n + 3 + 1) : ℤ) ^ 2 - Nat.fib (3 * n + 3) * Nat.fib (3 * n + 3 + 2) = -1 := by\n sorry\n", "path": "tasks/combinatorial-identities/combinatorial-identities-fibonacci-d3-t0022"}
{"id": "combinatorial-identities-linear_recurrence-d3-t0023", "env": "combinatorial-identities", "msc": "05", "family": "linear_recurrence", "difficulty": 3, "seed": 23, "kind": "prove", "instruction": "# Find the closed form of a recurrence\n\nProve the following.\n\nDefine a sequence of integers by \\(u_0 = -1\\), \\(u_1 = 0\\) and \\(u_{n+2} = -6\\,u_{n+1} - 9\\,u_{n}\\). Prove that for every natural number \\(n\\), \\[u_n = (-1 + 1 n) \\cdot (-3)^{n}.\\]\n\n## What to do\n\n`Solution.lean` in the working directory states the theorem in Lean 4 with Mathlib, with `sorry` in place of the proof. Replace every `sorry` with a proof.\n\n- Do not change the statement of any theorem or any definition the file gives you. You may add your own lemmas and definitions.\n- Check your work with `lake env lean Solution.lean` (run it inside `/opt/arena/lean`, giving the full path to the file). It must compile without errors.\n- A theorem counts only if its proof is complete: no `sorry`, no new axioms, no `native_decide`.\n- The reward is 1 if the theorem is proved and 0 otherwise.\n", "start_file": "import Mathlib\n\ndef u : ℕ → ℤ\n | 0 => (-1)\n | 1 => 0\n | (n + 2) => (-6) * u (n + 1) - 9 * u n\n\n/-- A closed form for the sequence defined by the recurrence. -/\ntheorem seq_closed_form (n : ℕ) :\n u n = ((-1) + 1 * (n : ℤ)) * (-3) ^ n := by\n sorry\n", "path": "tasks/combinatorial-identities/combinatorial-identities-linear_recurrence-d3-t0023"}
{"id": "combinatorial-identities-binomial_sums-d1-t0024", "env": "combinatorial-identities", "msc": "05", "family": "binomial_sums", "difficulty": 1, "seed": 24, "kind": "prove", "instruction": "# Prove an identity for binomial coefficients\n\nProve the following.\n\nFor every natural number \\(n\\), \\[\\sum_{i=0}^{n} \\binom{n}{i}\\, 9^{i} = 10^{n}.\\]\n\n## What to do\n\n`Solution.lean` in the working directory states the theorem in Lean 4 with Mathlib, with `sorry` in place of the proof. Replace every `sorry` with a proof.\n\n- Do not change the statement of any theorem or any definition the file gives you. You may add your own lemmas and definitions.\n- Check your work with `lake env lean Solution.lean` (run it inside `/opt/arena/lean`, giving the full path to the file). It must compile without errors.\n- A theorem counts only if its proof is complete: no `sorry`, no new axioms, no `native_decide`.\n- The reward is 1 if the theorem is proved and 0 otherwise.\n", "start_file": "import Mathlib\n\n/-- A weighted sum of binomial coefficients. -/\ntheorem binomial_sum (n : ℕ) :\n ∑ i ∈ Finset.range (n + 1), n.choose i * 9 ^ i = 10 ^ n := by\n sorry\n", "path": "tasks/combinatorial-identities/combinatorial-identities-binomial_sums-d1-t0024"}
{"id": "combinatorial-identities-counting-d1-t0025", "env": "combinatorial-identities", "msc": "05", "family": "counting", "difficulty": 1, "seed": 25, "kind": "prove", "instruction": "# Prove a counting statement\n\nProve the following.\n\nLet \\(s\\) be a finite set of integers with more than 5 elements. Prove that \\(s\\) contains two different integers \\(x \\ne y\\) that leave the same remainder on division by 5.\n\n## What to do\n\n`Solution.lean` in the working directory states the theorem in Lean 4 with Mathlib, with `sorry` in place of the proof. Replace every `sorry` with a proof.\n\n- Do not change the statement of any theorem or any definition the file gives you. You may add your own lemmas and definitions.\n- Check your work with `lake env lean Solution.lean` (run it inside `/opt/arena/lean`, giving the full path to the file). It must compile without errors.\n- A theorem counts only if its proof is complete: no `sorry`, no new axioms, no `native_decide`.\n- The reward is 1 if the theorem is proved and 0 otherwise.\n", "start_file": "import Mathlib\n\n/-- Pigeonhole principle for remainders. -/\ntheorem pigeonhole_mod (s : Finset ℤ) (h : 5 < s.card) :\n ∃ x ∈ s, ∃ y ∈ s, x ≠ y ∧ x % 5 = y % 5 := by\n sorry\n", "path": "tasks/combinatorial-identities/combinatorial-identities-counting-d1-t0025"}
{"id": "combinatorial-identities-fibonacci-d1-t0026", "env": "combinatorial-identities", "msc": "05", "family": "fibonacci", "difficulty": 1, "seed": 26, "kind": "prove", "instruction": "# Prove an identity for Fibonacci numbers\n\nProve the following.\n\nFor every natural number \\(n\\), with \\(F\\) the Fibonacci sequence (\\(F_0 = 0\\), \\(F_1 = 1\\), \\(F_{k+2} = F_k + F_{k+1}\\)), \\[\\sum_{i=0}^{n-1} F_{i+8} + F_{9} = F_{n+9}.\\]\n\n## What to do\n\n`Solution.lean` in the working directory states the theorem in Lean 4 with Mathlib, with `sorry` in place of the proof. Replace every `sorry` with a proof.\n\n- Do not change the statement of any theorem or any definition the file gives you. You may add your own lemmas and definitions.\n- Check your work with `lake env lean Solution.lean` (run it inside `/opt/arena/lean`, giving the full path to the file). It must compile without errors.\n- A theorem counts only if its proof is complete: no `sorry`, no new axioms, no `native_decide`.\n- The reward is 1 if the theorem is proved and 0 otherwise.\n", "start_file": "import Mathlib\n\n/-- A telescoping sum of Fibonacci numbers. -/\ntheorem fib_shifted_sum (n : ℕ) :\n ∑ i ∈ Finset.range n, Nat.fib (i + 8) + Nat.fib 9 = Nat.fib (n + 9) := by\n sorry\n", "path": "tasks/combinatorial-identities/combinatorial-identities-fibonacci-d1-t0026"}
{"id": "combinatorial-identities-linear_recurrence-d1-t0027", "env": "combinatorial-identities", "msc": "05", "family": "linear_recurrence", "difficulty": 1, "seed": 27, "kind": "prove", "instruction": "# Find the closed form of a recurrence\n\nProve the following.\n\nDefine a sequence of integers by \\(u_0 = 5\\), \\(u_1 = 22\\) and \\(u_{n+2} = 7\\,u_{n+1} - 10\\,u_{n}\\). Prove that for every natural number \\(n\\), \\[u_n = 4 \\cdot 5^{n} + 1 \\cdot 2^{n}.\\]\n\n## What to do\n\n`Solution.lean` in the working directory states the theorem in Lean 4 with Mathlib, with `sorry` in place of the proof. Replace every `sorry` with a proof.\n\n- Do not change the statement of any theorem or any definition the file gives you. You may add your own lemmas and definitions.\n- Check your work with `lake env lean Solution.lean` (run it inside `/opt/arena/lean`, giving the full path to the file). It must compile without errors.\n- A theorem counts only if its proof is complete: no `sorry`, no new axioms, no `native_decide`.\n- The reward is 1 if the theorem is proved and 0 otherwise.\n", "start_file": "import Mathlib\n\ndef u : ℕ → ℤ\n | 0 => 5\n | 1 => 22\n | (n + 2) => 7 * u (n + 1) - 10 * u n\n\n/-- A closed form for the sequence defined by the recurrence. -/\ntheorem seq_closed_form (n : ℕ) :\n u n = 4 * 5 ^ n + 1 * 2 ^ n := by\n sorry\n", "path": "tasks/combinatorial-identities/combinatorial-identities-linear_recurrence-d1-t0027"}
{"id": "combinatorial-identities-binomial_sums-d2-t0028", "env": "combinatorial-identities", "msc": "05", "family": "binomial_sums", "difficulty": 2, "seed": 28, "kind": "prove", "instruction": "# Prove an identity for binomial coefficients\n\nProve the following.\n\nFor every natural number \\(n\\), \\[2 \\cdot \\sum_{i=0}^{n} \\binom{i+7}{7} = 2 \\cdot \\binom{n+8}{8}.\\] (This is the hockey stick identity.)\n\n## What to do\n\n`Solution.lean` in the working directory states the theorem in Lean 4 with Mathlib, with `sorry` in place of the proof. Replace every `sorry` with a proof.\n\n- Do not change the statement of any theorem or any definition the file gives you. You may add your own lemmas and definitions.\n- Check your work with `lake env lean Solution.lean` (run it inside `/opt/arena/lean`, giving the full path to the file). It must compile without errors.\n- A theorem counts only if its proof is complete: no `sorry`, no new axioms, no `native_decide`.\n- The reward is 1 if the theorem is proved and 0 otherwise.\n", "start_file": "import Mathlib\n\n/-- A hockey stick identity for binomial coefficients. -/\ntheorem hockey_stick (n : ℕ) :\n ∑ i ∈ Finset.range (n + 1), 2 * (i + 7).choose 7 = 2 * (n + 8).choose 8 := by\n sorry\n", "path": "tasks/combinatorial-identities/combinatorial-identities-binomial_sums-d2-t0028"}
{"id": "combinatorial-identities-counting-d2-t0029", "env": "combinatorial-identities", "msc": "05", "family": "counting", "difficulty": 2, "seed": 29, "kind": "prove", "instruction": "# Prove a counting statement\n\nProve the following.\n\nLet \\(n\\) be a natural number. Prove that the set \\(\\{0, 1, \\dots, n-1\\}\\) has at most as many elements as the set of integers \\(y\\) with \\(0 \\le y < 3 n\\) and \\(y \\equiv 2 \\pmod{3}\\). (Construct an injection.)\n\n## What to do\n\n`Solution.lean` in the working directory states the theorem in Lean 4 with Mathlib, with `sorry` in place of the proof. Replace every `sorry` with a proof.\n\n- Do not change the statement of any theorem or any definition the file gives you. You may add your own lemmas and definitions.\n- Check your work with `lake env lean Solution.lean` (run it inside `/opt/arena/lean`, giving the full path to the file). It must compile without errors.\n- A theorem counts only if its proof is complete: no `sorry`, no new axioms, no `native_decide`.\n- The reward is 1 if the theorem is proved and 0 otherwise.\n", "start_file": "import Mathlib\n\n/-- An injection into a residue class gives a cardinality bound. -/\ntheorem card_le_residue_class (n : ℕ) :\n (Finset.range n).card ≤ ((Finset.range (3 * n)).filter (fun y => y % 3 = 2)).card := by\n sorry\n", "path": "tasks/combinatorial-identities/combinatorial-identities-counting-d2-t0029"}
{"id": "combinatorial-identities-fibonacci-d2-t0030", "env": "combinatorial-identities", "msc": "05", "family": "fibonacci", "difficulty": 2, "seed": 30, "kind": "prove", "instruction": "# Prove an identity for Fibonacci numbers\n\nProve the following.\n\nFor every natural number \\(n\\), with \\(F\\) the Fibonacci sequence, \\[\\sum_{i=0}^{n-1} F_{2i+1} + F_{0} = F_{2n+0}.\\]\n\n## What to do\n\n`Solution.lean` in the working directory states the theorem in Lean 4 with Mathlib, with `sorry` in place of the proof. Replace every `sorry` with a proof.\n\n- Do not change the statement of any theorem or any definition the file gives you. You may add your own lemmas and definitions.\n- Check your work with `lake env lean Solution.lean` (run it inside `/opt/arena/lean`, giving the full path to the file). It must compile without errors.\n- A theorem counts only if its proof is complete: no `sorry`, no new axioms, no `native_decide`.\n- The reward is 1 if the theorem is proved and 0 otherwise.\n", "start_file": "import Mathlib\n\n/-- A sum of every second Fibonacci number. -/\ntheorem fib_odd_sum (n : ℕ) :\n ∑ i ∈ Finset.range n, Nat.fib (2 * i + 1) + Nat.fib 0 = Nat.fib (2 * n + 0) := by\n sorry\n", "path": "tasks/combinatorial-identities/combinatorial-identities-fibonacci-d2-t0030"}
{"id": "combinatorial-identities-linear_recurrence-d2-t0031", "env": "combinatorial-identities", "msc": "05", "family": "linear_recurrence", "difficulty": 2, "seed": 31, "kind": "prove", "instruction": "# Find the closed form of a recurrence\n\nProve the following.\n\nDefine a sequence of integers by \\(u_0 = -4\\), \\(u_1 = -16\\) and \\(u_{n+2} = 8\\,u_{n+1} - 15\\,u_{n}\\). Prove that for every natural number \\(n\\), \\[u_n = -2 \\cdot 5^{n} + -2 \\cdot 3^{n}.\\]\n\n## What to do\n\n`Solution.lean` in the working directory states the theorem in Lean 4 with Mathlib, with `sorry` in place of the proof. Replace every `sorry` with a proof.\n\n- Do not change the statement of any theorem or any definition the file gives you. You may add your own lemmas and definitions.\n- Check your work with `lake env lean Solution.lean` (run it inside `/opt/arena/lean`, giving the full path to the file). It must compile without errors.\n- A theorem counts only if its proof is complete: no `sorry`, no new axioms, no `native_decide`.\n- The reward is 1 if the theorem is proved and 0 otherwise.\n", "start_file": "import Mathlib\n\ndef u : ℕ → ℤ\n | 0 => (-4)\n | 1 => (-16)\n | (n + 2) => 8 * u (n + 1) - 15 * u n\n\n/-- A closed form for the sequence defined by the recurrence. -/\ntheorem seq_closed_form (n : ℕ) :\n u n = (-2) * 5 ^ n + (-2) * 3 ^ n := by\n sorry\n", "path": "tasks/combinatorial-identities/combinatorial-identities-linear_recurrence-d2-t0031"}
{"id": "combinatorial-identities-binomial_sums-d3-t0032", "env": "combinatorial-identities", "msc": "05", "family": "binomial_sums", "difficulty": 3, "seed": 32, "kind": "prove", "instruction": "# Prove an identity for binomial coefficients\n\nProve the following.\n\nFirst prove \\[\\sum_{i=0}^{n} i \\binom{n}{i} = n \\cdot 2^{n-1},\\] where \\(n - 1\\) is truncated subtraction on the natural numbers. Then use it, and the value of \\(\\sum_{i=0}^{n} \\binom{n}{i}\\), to prove \\[\\sum_{i=0}^{n} (5i + 7) \\binom{n}{i} = 5 \\cdot n \\cdot 2^{n-1} + 7 \\cdot 2^{n}.\\]\n\n## What to do\n\n`Solution.lean` in the working directory states 2 theorems in Lean 4 with Mathlib, with `sorry` in place of each proof. Replace every `sorry` with a proof.\n\n- Do not change the statement of any theorem or any definition the file gives you. You may add your own lemmas and definitions.\n- Check your work with `lake env lean Solution.lean` (run it inside `/opt/arena/lean`, giving the full path to the file). It must compile without errors.\n- A theorem counts only if its proof is complete: no `sorry`, no new axioms, no `native_decide`.\n- The reward is the share of the 2 theorems that are proved. If the file does not compile the reward is 0, so leave `sorry` on a theorem you cannot finish rather than a broken proof.\n", "start_file": "import Mathlib\n\n/-- The sum of i times n choose i. -/\ntheorem sum_i_choose (n : ℕ) :\n ∑ i ∈ Finset.range (n + 1), i * n.choose i = n * 2 ^ (n - 1) := by\n sorry\n\n/-- A weighted binomial sum. -/\ntheorem weighted_sum (n : ℕ) :\n ∑ i ∈ Finset.range (n + 1), (5 * i + 7) * n.choose i = 5 * (n * 2 ^ (n - 1)) + 7 * 2 ^ n := by\n sorry\n", "path": "tasks/combinatorial-identities/combinatorial-identities-binomial_sums-d3-t0032"}
{"id": "combinatorial-identities-counting-d3-t0033", "env": "combinatorial-identities", "msc": "05", "family": "counting", "difficulty": 3, "seed": 33, "kind": "prove", "instruction": "# Prove a counting statement\n\nProve the following.\n\nLet \\(s\\) be a set of natural numbers that are all less than \\(7 \\cdot 7 = 49\\), and suppose \\(s\\) has more than 7 elements. Prove that \\(s\\) contains two elements \\(x < y\\) with \\(y - x < 7\\).\n\n## What to do\n\n`Solution.lean` in the working directory states the theorem in Lean 4 with Mathlib, with `sorry` in place of the proof. Replace every `sorry` with a proof.\n\n- Do not change the statement of any theorem or any definition the file gives you. You may add your own lemmas and definitions.\n- Check your work with `lake env lean Solution.lean` (run it inside `/opt/arena/lean`, giving the full path to the file). It must compile without errors.\n- A theorem counts only if its proof is complete: no `sorry`, no new axioms, no `native_decide`.\n- The reward is 1 if the theorem is proved and 0 otherwise.\n", "start_file": "import Mathlib\n\n/-- Pigeonhole principle for blocks of consecutive numbers. -/\ntheorem close_pair (s : Finset ℕ) (hs : s ⊆ Finset.range (7 * 7)) (h : 7 < s.card) :\n ∃ x ∈ s, ∃ y ∈ s, x < y ∧ y < x + 7 := by\n sorry\n", "path": "tasks/combinatorial-identities/combinatorial-identities-counting-d3-t0033"}
{"id": "combinatorial-identities-fibonacci-d3-t0034", "env": "combinatorial-identities", "msc": "05", "family": "fibonacci", "difficulty": 3, "seed": 34, "kind": "prove", "instruction": "# Prove an identity for Fibonacci numbers\n\nProve the following.\n\nFirst prove Cassini's identity: for every natural number \\(n\\), \\[F_{n+1}^2 - F_n F_{n+2} = (-1)^n,\\] computed in the integers, where \\(F\\) is the Fibonacci sequence. Then conclude that \\(F_{m+1}^2 - F_m F_{m+2}\\) is either \\(1\\) or \\(-1\\) when \\(m = 5n + 7\\).\n\n## What to do\n\n`Solution.lean` in the working directory states 2 theorems in Lean 4 with Mathlib, with `sorry` in place of each proof. Replace every `sorry` with a proof.\n\n- Do not change the statement of any theorem or any definition the file gives you. You may add your own lemmas and definitions.\n- Check your work with `lake env lean Solution.lean` (run it inside `/opt/arena/lean`, giving the full path to the file). It must compile without errors.\n- A theorem counts only if its proof is complete: no `sorry`, no new axioms, no `native_decide`.\n- The reward is the share of the 2 theorems that are proved. If the file does not compile the reward is 0, so leave `sorry` on a theorem you cannot finish rather than a broken proof.\n", "start_file": "import Mathlib\n\n/-- Cassini's identity for Fibonacci numbers. -/\ntheorem cassini (n : ℕ) :\n (Nat.fib (n + 1) : ℤ) ^ 2 - Nat.fib n * Nat.fib (n + 2) = (-1) ^ n := by\n sorry\n\n/-- Cassini's determinant is plus or minus one at the index given. -/\ntheorem cassini_pm_one (n : ℕ) :\n (Nat.fib (5 * n + 7 + 1) : ℤ) ^ 2 - Nat.fib (5 * n + 7) * Nat.fib (5 * n + 7 + 2) = 1 ∨ (Nat.fib (5 * n + 7 + 1) : ℤ) ^ 2 - Nat.fib (5 * n + 7) * Nat.fib (5 * n + 7 + 2) = -1 := by\n sorry\n", "path": "tasks/combinatorial-identities/combinatorial-identities-fibonacci-d3-t0034"}
{"id": "combinatorial-identities-linear_recurrence-d3-t0035", "env": "combinatorial-identities", "msc": "05", "family": "linear_recurrence", "difficulty": 3, "seed": 35, "kind": "prove", "instruction": "# Find the closed form of a recurrence\n\nProve the following.\n\nDefine a sequence of integers by \\(u_0 = -3\\), \\(u_1 = 18\\) and \\(u_{n+2} = -6\\,u_{n+1} - 9\\,u_{n}\\). Prove that for every natural number \\(n\\), \\[u_n = (-3 + -3 n) \\cdot (-3)^{n}.\\]\n\n## What to do\n\n`Solution.lean` in the working directory states the theorem in Lean 4 with Mathlib, with `sorry` in place of the proof. Replace every `sorry` with a proof.\n\n- Do not change the statement of any theorem or any definition the file gives you. You may add your own lemmas and definitions.\n- Check your work with `lake env lean Solution.lean` (run it inside `/opt/arena/lean`, giving the full path to the file). It must compile without errors.\n- A theorem counts only if its proof is complete: no `sorry`, no new axioms, no `native_decide`.\n- The reward is 1 if the theorem is proved and 0 otherwise.\n", "start_file": "import Mathlib\n\ndef u : ℕ → ℤ\n | 0 => (-3)\n | 1 => 18\n | (n + 2) => (-6) * u (n + 1) - 9 * u n\n\n/-- A closed form for the sequence defined by the recurrence. -/\ntheorem seq_closed_form (n : ℕ) :\n u n = ((-3) + (-3) * (n : ℤ)) * (-3) ^ n := by\n sorry\n", "path": "tasks/combinatorial-identities/combinatorial-identities-linear_recurrence-d3-t0035"}
{"id": "combinatorial-identities-binomial_sums-d1-t0036", "env": "combinatorial-identities", "msc": "05", "family": "binomial_sums", "difficulty": 1, "seed": 36, "kind": "prove", "instruction": "# Prove an identity for binomial coefficients\n\nProve the following.\n\nFor every natural number \\(n\\), \\[\\sum_{i=0}^{n} \\binom{n}{i}\\, 2^{i} = 3^{n}.\\]\n\n## What to do\n\n`Solution.lean` in the working directory states the theorem in Lean 4 with Mathlib, with `sorry` in place of the proof. Replace every `sorry` with a proof.\n\n- Do not change the statement of any theorem or any definition the file gives you. You may add your own lemmas and definitions.\n- Check your work with `lake env lean Solution.lean` (run it inside `/opt/arena/lean`, giving the full path to the file). It must compile without errors.\n- A theorem counts only if its proof is complete: no `sorry`, no new axioms, no `native_decide`.\n- The reward is 1 if the theorem is proved and 0 otherwise.\n", "start_file": "import Mathlib\n\n/-- A weighted sum of binomial coefficients. -/\ntheorem binomial_sum (n : ℕ) :\n ∑ i ∈ Finset.range (n + 1), n.choose i * 2 ^ i = 3 ^ n := by\n sorry\n", "path": "tasks/combinatorial-identities/combinatorial-identities-binomial_sums-d1-t0036"}
{"id": "combinatorial-identities-counting-d1-t0037", "env": "combinatorial-identities", "msc": "05", "family": "counting", "difficulty": 1, "seed": 37, "kind": "prove", "instruction": "# Prove a counting statement\n\nProve the following.\n\nLet \\(s\\) be a finite set of integers with more than 3 elements. Prove that \\(s\\) contains two different integers \\(x \\ne y\\) that leave the same remainder on division by 3.\n\n## What to do\n\n`Solution.lean` in the working directory states the theorem in Lean 4 with Mathlib, with `sorry` in place of the proof. Replace every `sorry` with a proof.\n\n- Do not change the statement of any theorem or any definition the file gives you. You may add your own lemmas and definitions.\n- Check your work with `lake env lean Solution.lean` (run it inside `/opt/arena/lean`, giving the full path to the file). It must compile without errors.\n- A theorem counts only if its proof is complete: no `sorry`, no new axioms, no `native_decide`.\n- The reward is 1 if the theorem is proved and 0 otherwise.\n", "start_file": "import Mathlib\n\n/-- Pigeonhole principle for remainders. -/\ntheorem pigeonhole_mod (s : Finset ℤ) (h : 3 < s.card) :\n ∃ x ∈ s, ∃ y ∈ s, x ≠ y ∧ x % 3 = y % 3 := by\n sorry\n", "path": "tasks/combinatorial-identities/combinatorial-identities-counting-d1-t0037"}
{"id": "combinatorial-identities-fibonacci-d1-t0038", "env": "combinatorial-identities", "msc": "05", "family": "fibonacci", "difficulty": 1, "seed": 38, "kind": "prove", "instruction": "# Prove an identity for Fibonacci numbers\n\nProve the following.\n\nFor every natural number \\(n\\), with \\(F\\) the Fibonacci sequence (\\(F_0 = 0\\), \\(F_1 = 1\\), \\(F_{k+2} = F_k + F_{k+1}\\)), \\[\\sum_{i=0}^{n-1} F_{i+9} + F_{10} = F_{n+10}.\\]\n\n## What to do\n\n`Solution.lean` in the working directory states the theorem in Lean 4 with Mathlib, with `sorry` in place of the proof. Replace every `sorry` with a proof.\n\n- Do not change the statement of any theorem or any definition the file gives you. You may add your own lemmas and definitions.\n- Check your work with `lake env lean Solution.lean` (run it inside `/opt/arena/lean`, giving the full path to the file). It must compile without errors.\n- A theorem counts only if its proof is complete: no `sorry`, no new axioms, no `native_decide`.\n- The reward is 1 if the theorem is proved and 0 otherwise.\n", "start_file": "import Mathlib\n\n/-- A telescoping sum of Fibonacci numbers. -/\ntheorem fib_shifted_sum (n : ℕ) :\n ∑ i ∈ Finset.range n, Nat.fib (i + 9) + Nat.fib 10 = Nat.fib (n + 10) := by\n sorry\n", "path": "tasks/combinatorial-identities/combinatorial-identities-fibonacci-d1-t0038"}
{"id": "combinatorial-identities-linear_recurrence-d1-t0039", "env": "combinatorial-identities", "msc": "05", "family": "linear_recurrence", "difficulty": 1, "seed": 39, "kind": "prove", "instruction": "# Find the closed form of a recurrence\n\nProve the following.\n\nDefine a sequence of integers by \\(u_0 = 2\\), \\(u_1 = 13\\) and \\(u_{n+2} = 7\\,u_{n+1} - 10\\,u_{n}\\). Prove that for every natural number \\(n\\), \\[u_n = 3 \\cdot 5^{n} + -1 \\cdot 2^{n}.\\]\n\n## What to do\n\n`Solution.lean` in the working directory states the theorem in Lean 4 with Mathlib, with `sorry` in place of the proof. Replace every `sorry` with a proof.\n\n- Do not change the statement of any theorem or any definition the file gives you. You may add your own lemmas and definitions.\n- Check your work with `lake env lean Solution.lean` (run it inside `/opt/arena/lean`, giving the full path to the file). It must compile without errors.\n- A theorem counts only if its proof is complete: no `sorry`, no new axioms, no `native_decide`.\n- The reward is 1 if the theorem is proved and 0 otherwise.\n", "start_file": "import Mathlib\n\ndef u : ℕ → ℤ\n | 0 => 2\n | 1 => 13\n | (n + 2) => 7 * u (n + 1) - 10 * u n\n\n/-- A closed form for the sequence defined by the recurrence. -/\ntheorem seq_closed_form (n : ℕ) :\n u n = 3 * 5 ^ n + (-1) * 2 ^ n := by\n sorry\n", "path": "tasks/combinatorial-identities/combinatorial-identities-linear_recurrence-d1-t0039"}
{"id": "combinatorial-identities-binomial_sums-d2-t0040", "env": "combinatorial-identities", "msc": "05", "family": "binomial_sums", "difficulty": 2, "seed": 40, "kind": "prove", "instruction": "# Prove an identity for binomial coefficients\n\nProve the following.\n\nFor every natural number \\(n\\), \\[3 \\cdot \\sum_{i=0}^{n} \\binom{i+7}{7} = 3 \\cdot \\binom{n+8}{8}.\\] (This is the hockey stick identity.)\n\n## What to do\n\n`Solution.lean` in the working directory states the theorem in Lean 4 with Mathlib, with `sorry` in place of the proof. Replace every `sorry` with a proof.\n\n- Do not change the statement of any theorem or any definition the file gives you. You may add your own lemmas and definitions.\n- Check your work with `lake env lean Solution.lean` (run it inside `/opt/arena/lean`, giving the full path to the file). It must compile without errors.\n- A theorem counts only if its proof is complete: no `sorry`, no new axioms, no `native_decide`.\n- The reward is 1 if the theorem is proved and 0 otherwise.\n", "start_file": "import Mathlib\n\n/-- A hockey stick identity for binomial coefficients. -/\ntheorem hockey_stick (n : ℕ) :\n ∑ i ∈ Finset.range (n + 1), 3 * (i + 7).choose 7 = 3 * (n + 8).choose 8 := by\n sorry\n", "path": "tasks/combinatorial-identities/combinatorial-identities-binomial_sums-d2-t0040"}
{"id": "combinatorial-identities-counting-d2-t0041", "env": "combinatorial-identities", "msc": "05", "family": "counting", "difficulty": 2, "seed": 41, "kind": "prove", "instruction": "# Prove a counting statement\n\nProve the following.\n\nLet \\(n\\) be a natural number. Prove that the set \\(\\{0, 1, \\dots, n-1\\}\\) has at most as many elements as the set of integers \\(y\\) with \\(0 \\le y < 4 n\\) and \\(y \\equiv 3 \\pmod{4}\\). (Construct an injection.)\n\n## What to do\n\n`Solution.lean` in the working directory states the theorem in Lean 4 with Mathlib, with `sorry` in place of the proof. Replace every `sorry` with a proof.\n\n- Do not change the statement of any theorem or any definition the file gives you. You may add your own lemmas and definitions.\n- Check your work with `lake env lean Solution.lean` (run it inside `/opt/arena/lean`, giving the full path to the file). It must compile without errors.\n- A theorem counts only if its proof is complete: no `sorry`, no new axioms, no `native_decide`.\n- The reward is 1 if the theorem is proved and 0 otherwise.\n", "start_file": "import Mathlib\n\n/-- An injection into a residue class gives a cardinality bound. -/\ntheorem card_le_residue_class (n : ℕ) :\n (Finset.range n).card ≤ ((Finset.range (4 * n)).filter (fun y => y % 4 = 3)).card := by\n sorry\n", "path": "tasks/combinatorial-identities/combinatorial-identities-counting-d2-t0041"}
{"id": "combinatorial-identities-fibonacci-d2-t0042", "env": "combinatorial-identities", "msc": "05", "family": "fibonacci", "difficulty": 2, "seed": 42, "kind": "prove", "instruction": "# Prove an identity for Fibonacci numbers\n\nProve the following.\n\nFor every natural number \\(n\\), with \\(F\\) the Fibonacci sequence, \\[\\sum_{i=0}^{n} 7\\,F_i^2 = 7\\,F_n F_{n+1}.\\]\n\n## What to do\n\n`Solution.lean` in the working directory states the theorem in Lean 4 with Mathlib, with `sorry` in place of the proof. Replace every `sorry` with a proof.\n\n- Do not change the statement of any theorem or any definition the file gives you. You may add your own lemmas and definitions.\n- Check your work with `lake env lean Solution.lean` (run it inside `/opt/arena/lean`, giving the full path to the file). It must compile without errors.\n- A theorem counts only if its proof is complete: no `sorry`, no new axioms, no `native_decide`.\n- The reward is 1 if the theorem is proved and 0 otherwise.\n", "start_file": "import Mathlib\n\n/-- A sum of squares of Fibonacci numbers. -/\ntheorem fib_square_sum (n : ℕ) :\n ∑ i ∈ Finset.range (n + 1), 7 * Nat.fib i ^ 2 = 7 * (Nat.fib n * Nat.fib (n + 1)) := by\n sorry\n", "path": "tasks/combinatorial-identities/combinatorial-identities-fibonacci-d2-t0042"}
{"id": "combinatorial-identities-linear_recurrence-d2-t0043", "env": "combinatorial-identities", "msc": "05", "family": "linear_recurrence", "difficulty": 2, "seed": 43, "kind": "prove", "instruction": "# Find the closed form of a recurrence\n\nProve the following.\n\nDefine a sequence of integers by \\(u_0 = 4\\), \\(u_1 = -2\\) and \\(u_{n+2} = 2\\,u_{n+1} - -8\\,u_{n}\\). Prove that for every natural number \\(n\\), \\[u_n = 1 \\cdot 4^{n} + 3 \\cdot (-2)^{n}.\\]\n\n## What to do\n\n`Solution.lean` in the working directory states the theorem in Lean 4 with Mathlib, with `sorry` in place of the proof. Replace every `sorry` with a proof.\n\n- Do not change the statement of any theorem or any definition the file gives you. You may add your own lemmas and definitions.\n- Check your work with `lake env lean Solution.lean` (run it inside `/opt/arena/lean`, giving the full path to the file). It must compile without errors.\n- A theorem counts only if its proof is complete: no `sorry`, no new axioms, no `native_decide`.\n- The reward is 1 if the theorem is proved and 0 otherwise.\n", "start_file": "import Mathlib\n\ndef u : ℕ → ℤ\n | 0 => 4\n | 1 => (-2)\n | (n + 2) => 2 * u (n + 1) - (-8) * u n\n\n/-- A closed form for the sequence defined by the recurrence. -/\ntheorem seq_closed_form (n : ℕ) :\n u n = 1 * 4 ^ n + 3 * (-2) ^ n := by\n sorry\n", "path": "tasks/combinatorial-identities/combinatorial-identities-linear_recurrence-d2-t0043"}
{"id": "combinatorial-identities-binomial_sums-d3-t0044", "env": "combinatorial-identities", "msc": "05", "family": "binomial_sums", "difficulty": 3, "seed": 44, "kind": "prove", "instruction": "# Prove an identity for binomial coefficients\n\nProve the following.\n\nFirst prove \\[\\sum_{i=0}^{n} i \\binom{n}{i} = n \\cdot 2^{n-1},\\] where \\(n - 1\\) is truncated subtraction on the natural numbers. Then use it, and the value of \\(\\sum_{i=0}^{n} \\binom{n}{i}\\), to prove \\[\\sum_{i=0}^{n} (2i + 7) \\binom{n}{i} = 2 \\cdot n \\cdot 2^{n-1} + 7 \\cdot 2^{n}.\\]\n\n## What to do\n\n`Solution.lean` in the working directory states 2 theorems in Lean 4 with Mathlib, with `sorry` in place of each proof. Replace every `sorry` with a proof.\n\n- Do not change the statement of any theorem or any definition the file gives you. You may add your own lemmas and definitions.\n- Check your work with `lake env lean Solution.lean` (run it inside `/opt/arena/lean`, giving the full path to the file). It must compile without errors.\n- A theorem counts only if its proof is complete: no `sorry`, no new axioms, no `native_decide`.\n- The reward is the share of the 2 theorems that are proved. If the file does not compile the reward is 0, so leave `sorry` on a theorem you cannot finish rather than a broken proof.\n", "start_file": "import Mathlib\n\n/-- The sum of i times n choose i. -/\ntheorem sum_i_choose (n : ℕ) :\n ∑ i ∈ Finset.range (n + 1), i * n.choose i = n * 2 ^ (n - 1) := by\n sorry\n\n/-- A weighted binomial sum. -/\ntheorem weighted_sum (n : ℕ) :\n ∑ i ∈ Finset.range (n + 1), (2 * i + 7) * n.choose i = 2 * (n * 2 ^ (n - 1)) + 7 * 2 ^ n := by\n sorry\n", "path": "tasks/combinatorial-identities/combinatorial-identities-binomial_sums-d3-t0044"}
{"id": "combinatorial-identities-counting-d3-t0045", "env": "combinatorial-identities", "msc": "05", "family": "counting", "difficulty": 3, "seed": 45, "kind": "prove", "instruction": "# Prove a counting statement\n\nProve the following.\n\nLet \\(s\\) be a set of natural numbers that are all less than \\(2 \\cdot 5 = 10\\), and suppose \\(s\\) has more than 5 elements. Prove that \\(s\\) contains two elements \\(x < y\\) with \\(y - x < 2\\).\n\n## What to do\n\n`Solution.lean` in the working directory states the theorem in Lean 4 with Mathlib, with `sorry` in place of the proof. Replace every `sorry` with a proof.\n\n- Do not change the statement of any theorem or any definition the file gives you. You may add your own lemmas and definitions.\n- Check your work with `lake env lean Solution.lean` (run it inside `/opt/arena/lean`, giving the full path to the file). It must compile without errors.\n- A theorem counts only if its proof is complete: no `sorry`, no new axioms, no `native_decide`.\n- The reward is 1 if the theorem is proved and 0 otherwise.\n", "start_file": "import Mathlib\n\n/-- Pigeonhole principle for blocks of consecutive numbers. -/\ntheorem close_pair (s : Finset ℕ) (hs : s ⊆ Finset.range (2 * 5)) (h : 5 < s.card) :\n ∃ x ∈ s, ∃ y ∈ s, x < y ∧ y < x + 2 := by\n sorry\n", "path": "tasks/combinatorial-identities/combinatorial-identities-counting-d3-t0045"}
{"id": "combinatorial-identities-fibonacci-d3-t0046", "env": "combinatorial-identities", "msc": "05", "family": "fibonacci", "difficulty": 3, "seed": 46, "kind": "prove", "instruction": "# Prove an identity for Fibonacci numbers\n\nProve the following.\n\nFirst prove Cassini's identity: for every natural number \\(n\\), \\[F_{n+1}^2 - F_n F_{n+2} = (-1)^n,\\] computed in the integers, where \\(F\\) is the Fibonacci sequence. Then conclude that \\(F_{m+1}^2 - F_m F_{m+2}\\) is either \\(1\\) or \\(-1\\) when \\(m = 7n + 6\\).\n\n## What to do\n\n`Solution.lean` in the working directory states 2 theorems in Lean 4 with Mathlib, with `sorry` in place of each proof. Replace every `sorry` with a proof.\n\n- Do not change the statement of any theorem or any definition the file gives you. You may add your own lemmas and definitions.\n- Check your work with `lake env lean Solution.lean` (run it inside `/opt/arena/lean`, giving the full path to the file). It must compile without errors.\n- A theorem counts only if its proof is complete: no `sorry`, no new axioms, no `native_decide`.\n- The reward is the share of the 2 theorems that are proved. If the file does not compile the reward is 0, so leave `sorry` on a theorem you cannot finish rather than a broken proof.\n", "start_file": "import Mathlib\n\n/-- Cassini's identity for Fibonacci numbers. -/\ntheorem cassini (n : ℕ) :\n (Nat.fib (n + 1) : ℤ) ^ 2 - Nat.fib n * Nat.fib (n + 2) = (-1) ^ n := by\n sorry\n\n/-- Cassini's determinant is plus or minus one at the index given. -/\ntheorem cassini_pm_one (n : ℕ) :\n (Nat.fib (7 * n + 6 + 1) : ℤ) ^ 2 - Nat.fib (7 * n + 6) * Nat.fib (7 * n + 6 + 2) = 1 ∨ (Nat.fib (7 * n + 6 + 1) : ℤ) ^ 2 - Nat.fib (7 * n + 6) * Nat.fib (7 * n + 6 + 2) = -1 := by\n sorry\n", "path": "tasks/combinatorial-identities/combinatorial-identities-fibonacci-d3-t0046"}
{"id": "combinatorial-identities-linear_recurrence-d3-t0047", "env": "combinatorial-identities", "msc": "05", "family": "linear_recurrence", "difficulty": 3, "seed": 47, "kind": "prove", "instruction": "# Find the closed form of a recurrence\n\nProve the following.\n\nDefine a sequence of integers by \\(u_0 = -3\\), \\(u_1 = 0\\) and \\(u_{n+2} = -4\\,u_{n+1} - 4\\,u_{n}\\). Prove that for every natural number \\(n\\), \\[u_n = (-3 + 3 n) \\cdot (-2)^{n}.\\]\n\n## What to do\n\n`Solution.lean` in the working directory states the theorem in Lean 4 with Mathlib, with `sorry` in place of the proof. Replace every `sorry` with a proof.\n\n- Do not change the statement of any theorem or any definition the file gives you. You may add your own lemmas and definitions.\n- Check your work with `lake env lean Solution.lean` (run it inside `/opt/arena/lean`, giving the full path to the file). It must compile without errors.\n- A theorem counts only if its proof is complete: no `sorry`, no new axioms, no `native_decide`.\n- The reward is 1 if the theorem is proved and 0 otherwise.\n", "start_file": "import Mathlib\n\ndef u : ℕ → ℤ\n | 0 => (-3)\n | 1 => 0\n | (n + 2) => (-4) * u (n + 1) - 4 * u n\n\n/-- A closed form for the sequence defined by the recurrence. -/\ntheorem seq_closed_form (n : ℕ) :\n u n = ((-3) + 3 * (n : ℤ)) * (-2) ^ n := by\n sorry\n", "path": "tasks/combinatorial-identities/combinatorial-identities-linear_recurrence-d3-t0047"}
{"id": "combinatorial-identities-binomial_sums-d1-t0048", "env": "combinatorial-identities", "msc": "05", "family": "binomial_sums", "difficulty": 1, "seed": 48, "kind": "prove", "instruction": "# Prove an identity for binomial coefficients\n\nProve the following.\n\nFor every natural number \\(n\\), \\[\\sum_{i=0}^{n} \\binom{n}{i}\\, 4^{i} = 5^{n}.\\]\n\n## What to do\n\n`Solution.lean` in the working directory states the theorem in Lean 4 with Mathlib, with `sorry` in place of the proof. Replace every `sorry` with a proof.\n\n- Do not change the statement of any theorem or any definition the file gives you. You may add your own lemmas and definitions.\n- Check your work with `lake env lean Solution.lean` (run it inside `/opt/arena/lean`, giving the full path to the file). It must compile without errors.\n- A theorem counts only if its proof is complete: no `sorry`, no new axioms, no `native_decide`.\n- The reward is 1 if the theorem is proved and 0 otherwise.\n", "start_file": "import Mathlib\n\n/-- A weighted sum of binomial coefficients. -/\ntheorem binomial_sum (n : ℕ) :\n ∑ i ∈ Finset.range (n + 1), n.choose i * 4 ^ i = 5 ^ n := by\n sorry\n", "path": "tasks/combinatorial-identities/combinatorial-identities-binomial_sums-d1-t0048"}
{"id": "combinatorial-identities-counting-d1-t0049", "env": "combinatorial-identities", "msc": "05", "family": "counting", "difficulty": 1, "seed": 49, "kind": "prove", "instruction": "# Prove a counting statement\n\nProve the following.\n\nLet \\(s\\) be a finite set of integers with more than 5 elements. Prove that \\(s\\) contains two different integers \\(x \\ne y\\) that leave the same remainder on division by 5.\n\n## What to do\n\n`Solution.lean` in the working directory states the theorem in Lean 4 with Mathlib, with `sorry` in place of the proof. Replace every `sorry` with a proof.\n\n- Do not change the statement of any theorem or any definition the file gives you. You may add your own lemmas and definitions.\n- Check your work with `lake env lean Solution.lean` (run it inside `/opt/arena/lean`, giving the full path to the file). It must compile without errors.\n- A theorem counts only if its proof is complete: no `sorry`, no new axioms, no `native_decide`.\n- The reward is 1 if the theorem is proved and 0 otherwise.\n", "start_file": "import Mathlib\n\n/-- Pigeonhole principle for remainders. -/\ntheorem pigeonhole_mod (s : Finset ℤ) (h : 5 < s.card) :\n ∃ x ∈ s, ∃ y ∈ s, x ≠ y ∧ x % 5 = y % 5 := by\n sorry\n", "path": "tasks/combinatorial-identities/combinatorial-identities-counting-d1-t0049"}
{"id": "combinatorial-identities-fibonacci-d1-t0050", "env": "combinatorial-identities", "msc": "05", "family": "fibonacci", "difficulty": 1, "seed": 50, "kind": "prove", "instruction": "# Prove an identity for Fibonacci numbers\n\nProve the following.\n\nFor every natural number \\(n\\), with \\(F\\) the Fibonacci sequence (\\(F_0 = 0\\), \\(F_1 = 1\\), \\(F_{k+2} = F_k + F_{k+1}\\)), \\[\\sum_{i=0}^{n-1} F_{i+0} + F_{1} = F_{n+1}.\\]\n\n## What to do\n\n`Solution.lean` in the working directory states the theorem in Lean 4 with Mathlib, with `sorry` in place of the proof. Replace every `sorry` with a proof.\n\n- Do not change the statement of any theorem or any definition the file gives you. You may add your own lemmas and definitions.\n- Check your work with `lake env lean Solution.lean` (run it inside `/opt/arena/lean`, giving the full path to the file). It must compile without errors.\n- A theorem counts only if its proof is complete: no `sorry`, no new axioms, no `native_decide`.\n- The reward is 1 if the theorem is proved and 0 otherwise.\n", "start_file": "import Mathlib\n\n/-- A telescoping sum of Fibonacci numbers. -/\ntheorem fib_shifted_sum (n : ℕ) :\n ∑ i ∈ Finset.range n, Nat.fib (i + 0) + Nat.fib 1 = Nat.fib (n + 1) := by\n sorry\n", "path": "tasks/combinatorial-identities/combinatorial-identities-fibonacci-d1-t0050"}
{"id": "combinatorial-identities-linear_recurrence-d1-t0051", "env": "combinatorial-identities", "msc": "05", "family": "linear_recurrence", "difficulty": 1, "seed": 51, "kind": "prove", "instruction": "# Find the closed form of a recurrence\n\nProve the following.\n\nDefine a sequence of integers by \\(u_0 = -4\\), \\(u_1 = -18\\) and \\(u_{n+2} = 8\\,u_{n+1} - 15\\,u_{n}\\). Prove that for every natural number \\(n\\), \\[u_n = -1 \\cdot 3^{n} + -3 \\cdot 5^{n}.\\]\n\n## What to do\n\n`Solution.lean` in the working directory states the theorem in Lean 4 with Mathlib, with `sorry` in place of the proof. Replace every `sorry` with a proof.\n\n- Do not change the statement of any theorem or any definition the file gives you. You may add your own lemmas and definitions.\n- Check your work with `lake env lean Solution.lean` (run it inside `/opt/arena/lean`, giving the full path to the file). It must compile without errors.\n- A theorem counts only if its proof is complete: no `sorry`, no new axioms, no `native_decide`.\n- The reward is 1 if the theorem is proved and 0 otherwise.\n", "start_file": "import Mathlib\n\ndef u : ℕ → ℤ\n | 0 => (-4)\n | 1 => (-18)\n | (n + 2) => 8 * u (n + 1) - 15 * u n\n\n/-- A closed form for the sequence defined by the recurrence. -/\ntheorem seq_closed_form (n : ℕ) :\n u n = (-1) * 3 ^ n + (-3) * 5 ^ n := by\n sorry\n", "path": "tasks/combinatorial-identities/combinatorial-identities-linear_recurrence-d1-t0051"}
{"id": "combinatorial-identities-binomial_sums-d2-t0052", "env": "combinatorial-identities", "msc": "05", "family": "binomial_sums", "difficulty": 2, "seed": 52, "kind": "prove", "instruction": "# Prove an identity for binomial coefficients\n\nProve the following.\n\nFor every natural number \\(n\\), \\[3 \\cdot \\sum_{i=0}^{n} \\binom{i+3}{3} = 3 \\cdot \\binom{n+4}{4}.\\] (This is the hockey stick identity.)\n\n## What to do\n\n`Solution.lean` in the working directory states the theorem in Lean 4 with Mathlib, with `sorry` in place of the proof. Replace every `sorry` with a proof.\n\n- Do not change the statement of any theorem or any definition the file gives you. You may add your own lemmas and definitions.\n- Check your work with `lake env lean Solution.lean` (run it inside `/opt/arena/lean`, giving the full path to the file). It must compile without errors.\n- A theorem counts only if its proof is complete: no `sorry`, no new axioms, no `native_decide`.\n- The reward is 1 if the theorem is proved and 0 otherwise.\n", "start_file": "import Mathlib\n\n/-- A hockey stick identity for binomial coefficients. -/\ntheorem hockey_stick (n : ℕ) :\n ∑ i ∈ Finset.range (n + 1), 3 * (i + 3).choose 3 = 3 * (n + 4).choose 4 := by\n sorry\n", "path": "tasks/combinatorial-identities/combinatorial-identities-binomial_sums-d2-t0052"}
{"id": "combinatorial-identities-counting-d2-t0053", "env": "combinatorial-identities", "msc": "05", "family": "counting", "difficulty": 2, "seed": 53, "kind": "prove", "instruction": "# Prove a counting statement\n\nProve the following.\n\nLet \\(n\\) be a natural number. Prove that the set \\(\\{0, 1, \\dots, n-1\\}\\) has at most as many elements as the set of integers \\(y\\) with \\(0 \\le y < 3 n\\) and \\(y \\equiv 2 \\pmod{3}\\). (Construct an injection.)\n\n## What to do\n\n`Solution.lean` in the working directory states the theorem in Lean 4 with Mathlib, with `sorry` in place of the proof. Replace every `sorry` with a proof.\n\n- Do not change the statement of any theorem or any definition the file gives you. You may add your own lemmas and definitions.\n- Check your work with `lake env lean Solution.lean` (run it inside `/opt/arena/lean`, giving the full path to the file). It must compile without errors.\n- A theorem counts only if its proof is complete: no `sorry`, no new axioms, no `native_decide`.\n- The reward is 1 if the theorem is proved and 0 otherwise.\n", "start_file": "import Mathlib\n\n/-- An injection into a residue class gives a cardinality bound. -/\ntheorem card_le_residue_class (n : ℕ) :\n (Finset.range n).card ≤ ((Finset.range (3 * n)).filter (fun y => y % 3 = 2)).card := by\n sorry\n", "path": "tasks/combinatorial-identities/combinatorial-identities-counting-d2-t0053"}
{"id": "combinatorial-identities-fibonacci-d2-t0054", "env": "combinatorial-identities", "msc": "05", "family": "fibonacci", "difficulty": 2, "seed": 54, "kind": "prove", "instruction": "# Prove an identity for Fibonacci numbers\n\nProve the following.\n\nFor every natural number \\(n\\), with \\(F\\) the Fibonacci sequence, \\[\\sum_{i=0}^{n} 2\\,F_i^2 = 2\\,F_n F_{n+1}.\\]\n\n## What to do\n\n`Solution.lean` in the working directory states the theorem in Lean 4 with Mathlib, with `sorry` in place of the proof. Replace every `sorry` with a proof.\n\n- Do not change the statement of any theorem or any definition the file gives you. You may add your own lemmas and definitions.\n- Check your work with `lake env lean Solution.lean` (run it inside `/opt/arena/lean`, giving the full path to the file). It must compile without errors.\n- A theorem counts only if its proof is complete: no `sorry`, no new axioms, no `native_decide`.\n- The reward is 1 if the theorem is proved and 0 otherwise.\n", "start_file": "import Mathlib\n\n/-- A sum of squares of Fibonacci numbers. -/\ntheorem fib_square_sum (n : ℕ) :\n ∑ i ∈ Finset.range (n + 1), 2 * Nat.fib i ^ 2 = 2 * (Nat.fib n * Nat.fib (n + 1)) := by\n sorry\n", "path": "tasks/combinatorial-identities/combinatorial-identities-fibonacci-d2-t0054"}
{"id": "combinatorial-identities-linear_recurrence-d2-t0055", "env": "combinatorial-identities", "msc": "05", "family": "linear_recurrence", "difficulty": 2, "seed": 55, "kind": "prove", "instruction": "# Find the closed form of a recurrence\n\nProve the following.\n\nDefine a sequence of integers by \\(u_0 = 6\\), \\(u_1 = 6\\) and \\(u_{n+2} = 0\\,u_{n+1} - -9\\,u_{n}\\). Prove that for every natural number \\(n\\), \\[u_n = 4 \\cdot 3^{n} + 2 \\cdot (-3)^{n}.\\]\n\n## What to do\n\n`Solution.lean` in the working directory states the theorem in Lean 4 with Mathlib, with `sorry` in place of the proof. Replace every `sorry` with a proof.\n\n- Do not change the statement of any theorem or any definition the file gives you. You may add your own lemmas and definitions.\n- Check your work with `lake env lean Solution.lean` (run it inside `/opt/arena/lean`, giving the full path to the file). It must compile without errors.\n- A theorem counts only if its proof is complete: no `sorry`, no new axioms, no `native_decide`.\n- The reward is 1 if the theorem is proved and 0 otherwise.\n", "start_file": "import Mathlib\n\ndef u : ℕ → ℤ\n | 0 => 6\n | 1 => 6\n | (n + 2) => 0 * u (n + 1) - (-9) * u n\n\n/-- A closed form for the sequence defined by the recurrence. -/\ntheorem seq_closed_form (n : ℕ) :\n u n = 4 * 3 ^ n + 2 * (-3) ^ n := by\n sorry\n", "path": "tasks/combinatorial-identities/combinatorial-identities-linear_recurrence-d2-t0055"}
{"id": "combinatorial-identities-binomial_sums-d3-t0056", "env": "combinatorial-identities", "msc": "05", "family": "binomial_sums", "difficulty": 3, "seed": 56, "kind": "prove", "instruction": "# Prove an identity for binomial coefficients\n\nProve the following.\n\nFirst prove \\[\\sum_{i=0}^{n} i \\binom{n}{i} = n \\cdot 2^{n-1},\\] where \\(n - 1\\) is truncated subtraction on the natural numbers. Then use it, and the value of \\(\\sum_{i=0}^{n} \\binom{n}{i}\\), to prove \\[\\sum_{i=0}^{n} (1i + 7) \\binom{n}{i} = 1 \\cdot n \\cdot 2^{n-1} + 7 \\cdot 2^{n}.\\]\n\n## What to do\n\n`Solution.lean` in the working directory states 2 theorems in Lean 4 with Mathlib, with `sorry` in place of each proof. Replace every `sorry` with a proof.\n\n- Do not change the statement of any theorem or any definition the file gives you. You may add your own lemmas and definitions.\n- Check your work with `lake env lean Solution.lean` (run it inside `/opt/arena/lean`, giving the full path to the file). It must compile without errors.\n- A theorem counts only if its proof is complete: no `sorry`, no new axioms, no `native_decide`.\n- The reward is the share of the 2 theorems that are proved. If the file does not compile the reward is 0, so leave `sorry` on a theorem you cannot finish rather than a broken proof.\n", "start_file": "import Mathlib\n\n/-- The sum of i times n choose i. -/\ntheorem sum_i_choose (n : ℕ) :\n ∑ i ∈ Finset.range (n + 1), i * n.choose i = n * 2 ^ (n - 1) := by\n sorry\n\n/-- A weighted binomial sum. -/\ntheorem weighted_sum (n : ℕ) :\n ∑ i ∈ Finset.range (n + 1), (1 * i + 7) * n.choose i = 1 * (n * 2 ^ (n - 1)) + 7 * 2 ^ n := by\n sorry\n", "path": "tasks/combinatorial-identities/combinatorial-identities-binomial_sums-d3-t0056"}
{"id": "combinatorial-identities-counting-d3-t0057", "env": "combinatorial-identities", "msc": "05", "family": "counting", "difficulty": 3, "seed": 57, "kind": "prove", "instruction": "# Prove a counting statement\n\nProve the following.\n\nLet \\(s\\) be a set of natural numbers that are all less than \\(7 \\cdot 5 = 35\\), and suppose \\(s\\) has more than 5 elements. Prove that \\(s\\) contains two elements \\(x < y\\) with \\(y - x < 7\\).\n\n## What to do\n\n`Solution.lean` in the working directory states the theorem in Lean 4 with Mathlib, with `sorry` in place of the proof. Replace every `sorry` with a proof.\n\n- Do not change the statement of any theorem or any definition the file gives you. You may add your own lemmas and definitions.\n- Check your work with `lake env lean Solution.lean` (run it inside `/opt/arena/lean`, giving the full path to the file). It must compile without errors.\n- A theorem counts only if its proof is complete: no `sorry`, no new axioms, no `native_decide`.\n- The reward is 1 if the theorem is proved and 0 otherwise.\n", "start_file": "import Mathlib\n\n/-- Pigeonhole principle for blocks of consecutive numbers. -/\ntheorem close_pair (s : Finset ℕ) (hs : s ⊆ Finset.range (7 * 5)) (h : 5 < s.card) :\n ∃ x ∈ s, ∃ y ∈ s, x < y ∧ y < x + 7 := by\n sorry\n", "path": "tasks/combinatorial-identities/combinatorial-identities-counting-d3-t0057"}
{"id": "combinatorial-identities-fibonacci-d3-t0058", "env": "combinatorial-identities", "msc": "05", "family": "fibonacci", "difficulty": 3, "seed": 58, "kind": "prove", "instruction": "# Prove an identity for Fibonacci numbers\n\nProve the following.\n\nFirst prove Cassini's identity: for every natural number \\(n\\), \\[F_{n+1}^2 - F_n F_{n+2} = (-1)^n,\\] computed in the integers, where \\(F\\) is the Fibonacci sequence. Then conclude that \\(F_{m+1}^2 - F_m F_{m+2}\\) is either \\(1\\) or \\(-1\\) when \\(m = 2n + 1\\).\n\n## What to do\n\n`Solution.lean` in the working directory states 2 theorems in Lean 4 with Mathlib, with `sorry` in place of each proof. Replace every `sorry` with a proof.\n\n- Do not change the statement of any theorem or any definition the file gives you. You may add your own lemmas and definitions.\n- Check your work with `lake env lean Solution.lean` (run it inside `/opt/arena/lean`, giving the full path to the file). It must compile without errors.\n- A theorem counts only if its proof is complete: no `sorry`, no new axioms, no `native_decide`.\n- The reward is the share of the 2 theorems that are proved. If the file does not compile the reward is 0, so leave `sorry` on a theorem you cannot finish rather than a broken proof.\n", "start_file": "import Mathlib\n\n/-- Cassini's identity for Fibonacci numbers. -/\ntheorem cassini (n : ℕ) :\n (Nat.fib (n + 1) : ℤ) ^ 2 - Nat.fib n * Nat.fib (n + 2) = (-1) ^ n := by\n sorry\n\n/-- Cassini's determinant is plus or minus one at the index given. -/\ntheorem cassini_pm_one (n : ℕ) :\n (Nat.fib (2 * n + 1 + 1) : ℤ) ^ 2 - Nat.fib (2 * n + 1) * Nat.fib (2 * n + 1 + 2) = 1 ∨ (Nat.fib (2 * n + 1 + 1) : ℤ) ^ 2 - Nat.fib (2 * n + 1) * Nat.fib (2 * n + 1 + 2) = -1 := by\n sorry\n", "path": "tasks/combinatorial-identities/combinatorial-identities-fibonacci-d3-t0058"}
{"id": "combinatorial-identities-linear_recurrence-d3-t0059", "env": "combinatorial-identities", "msc": "05", "family": "linear_recurrence", "difficulty": 3, "seed": 59, "kind": "prove", "instruction": "# Find the closed form of a recurrence\n\nProve the following.\n\nDefine a sequence of integers by \\(u_0 = 1\\), \\(u_1 = 6\\) and \\(u_{n+2} = 4\\,u_{n+1} - 4\\,u_{n}\\). Prove that for every natural number \\(n\\), \\[u_n = (1 + 2 n) \\cdot 2^{n}.\\]\n\n## What to do\n\n`Solution.lean` in the working directory states the theorem in Lean 4 with Mathlib, with `sorry` in place of the proof. Replace every `sorry` with a proof.\n\n- Do not change the statement of any theorem or any definition the file gives you. You may add your own lemmas and definitions.\n- Check your work with `lake env lean Solution.lean` (run it inside `/opt/arena/lean`, giving the full path to the file). It must compile without errors.\n- A theorem counts only if its proof is complete: no `sorry`, no new axioms, no `native_decide`.\n- The reward is 1 if the theorem is proved and 0 otherwise.\n", "start_file": "import Mathlib\n\ndef u : ℕ → ℤ\n | 0 => 1\n | 1 => 6\n | (n + 2) => 4 * u (n + 1) - 4 * u n\n\n/-- A closed form for the sequence defined by the recurrence. -/\ntheorem seq_closed_form (n : ℕ) :\n u n = (1 + 2 * (n : ℤ)) * 2 ^ n := by\n sorry\n", "path": "tasks/combinatorial-identities/combinatorial-identities-linear_recurrence-d3-t0059"}
{"id": "combinatorial-identities-binomial_sums-d1-t0060", "env": "combinatorial-identities", "msc": "05", "family": "binomial_sums", "difficulty": 1, "seed": 60, "kind": "prove", "instruction": "# Prove an identity for binomial coefficients\n\nProve the following.\n\nFor every natural number \\(n\\), \\[\\sum_{i=0}^{n} \\binom{n}{i}\\, 7^{i} = 8^{n}.\\]\n\n## What to do\n\n`Solution.lean` in the working directory states the theorem in Lean 4 with Mathlib, with `sorry` in place of the proof. Replace every `sorry` with a proof.\n\n- Do not change the statement of any theorem or any definition the file gives you. You may add your own lemmas and definitions.\n- Check your work with `lake env lean Solution.lean` (run it inside `/opt/arena/lean`, giving the full path to the file). It must compile without errors.\n- A theorem counts only if its proof is complete: no `sorry`, no new axioms, no `native_decide`.\n- The reward is 1 if the theorem is proved and 0 otherwise.\n", "start_file": "import Mathlib\n\n/-- A weighted sum of binomial coefficients. -/\ntheorem binomial_sum (n : ℕ) :\n ∑ i ∈ Finset.range (n + 1), n.choose i * 7 ^ i = 8 ^ n := by\n sorry\n", "path": "tasks/combinatorial-identities/combinatorial-identities-binomial_sums-d1-t0060"}
{"id": "combinatorial-identities-counting-d1-t0061", "env": "combinatorial-identities", "msc": "05", "family": "counting", "difficulty": 1, "seed": 61, "kind": "prove", "instruction": "# Prove a counting statement\n\nProve the following.\n\nLet \\(s\\) be a finite set of integers with more than 4 elements. Prove that \\(s\\) contains two different integers \\(x \\ne y\\) that leave the same remainder on division by 4.\n\n## What to do\n\n`Solution.lean` in the working directory states the theorem in Lean 4 with Mathlib, with `sorry` in place of the proof. Replace every `sorry` with a proof.\n\n- Do not change the statement of any theorem or any definition the file gives you. You may add your own lemmas and definitions.\n- Check your work with `lake env lean Solution.lean` (run it inside `/opt/arena/lean`, giving the full path to the file). It must compile without errors.\n- A theorem counts only if its proof is complete: no `sorry`, no new axioms, no `native_decide`.\n- The reward is 1 if the theorem is proved and 0 otherwise.\n", "start_file": "import Mathlib\n\n/-- Pigeonhole principle for remainders. -/\ntheorem pigeonhole_mod (s : Finset ℤ) (h : 4 < s.card) :\n ∃ x ∈ s, ∃ y ∈ s, x ≠ y ∧ x % 4 = y % 4 := by\n sorry\n", "path": "tasks/combinatorial-identities/combinatorial-identities-counting-d1-t0061"}
{"id": "combinatorial-identities-fibonacci-d1-t0062", "env": "combinatorial-identities", "msc": "05", "family": "fibonacci", "difficulty": 1, "seed": 62, "kind": "prove", "instruction": "# Prove an identity for Fibonacci numbers\n\nProve the following.\n\nFor every natural number \\(n\\), with \\(F\\) the Fibonacci sequence (\\(F_0 = 0\\), \\(F_1 = 1\\), \\(F_{k+2} = F_k + F_{k+1}\\)), \\[\\sum_{i=0}^{n-1} F_{i+11} + F_{12} = F_{n+12}.\\]\n\n## What to do\n\n`Solution.lean` in the working directory states the theorem in Lean 4 with Mathlib, with `sorry` in place of the proof. Replace every `sorry` with a proof.\n\n- Do not change the statement of any theorem or any definition the file gives you. You may add your own lemmas and definitions.\n- Check your work with `lake env lean Solution.lean` (run it inside `/opt/arena/lean`, giving the full path to the file). It must compile without errors.\n- A theorem counts only if its proof is complete: no `sorry`, no new axioms, no `native_decide`.\n- The reward is 1 if the theorem is proved and 0 otherwise.\n", "start_file": "import Mathlib\n\n/-- A telescoping sum of Fibonacci numbers. -/\ntheorem fib_shifted_sum (n : ℕ) :\n ∑ i ∈ Finset.range n, Nat.fib (i + 11) + Nat.fib 12 = Nat.fib (n + 12) := by\n sorry\n", "path": "tasks/combinatorial-identities/combinatorial-identities-fibonacci-d1-t0062"}
{"id": "combinatorial-identities-linear_recurrence-d1-t0063", "env": "combinatorial-identities", "msc": "05", "family": "linear_recurrence", "difficulty": 1, "seed": 63, "kind": "prove", "instruction": "# Find the closed form of a recurrence\n\nProve the following.\n\nDefine a sequence of integers by \\(u_0 = -2\\), \\(u_1 = -4\\) and \\(u_{n+2} = 8\\,u_{n+1} - 15\\,u_{n}\\). Prove that for every natural number \\(n\\), \\[u_n = 1 \\cdot 5^{n} + -3 \\cdot 3^{n}.\\]\n\n## What to do\n\n`Solution.lean` in the working directory states the theorem in Lean 4 with Mathlib, with `sorry` in place of the proof. Replace every `sorry` with a proof.\n\n- Do not change the statement of any theorem or any definition the file gives you. You may add your own lemmas and definitions.\n- Check your work with `lake env lean Solution.lean` (run it inside `/opt/arena/lean`, giving the full path to the file). It must compile without errors.\n- A theorem counts only if its proof is complete: no `sorry`, no new axioms, no `native_decide`.\n- The reward is 1 if the theorem is proved and 0 otherwise.\n", "start_file": "import Mathlib\n\ndef u : ℕ → ℤ\n | 0 => (-2)\n | 1 => (-4)\n | (n + 2) => 8 * u (n + 1) - 15 * u n\n\n/-- A closed form for the sequence defined by the recurrence. -/\ntheorem seq_closed_form (n : ℕ) :\n u n = 1 * 5 ^ n + (-3) * 3 ^ n := by\n sorry\n", "path": "tasks/combinatorial-identities/combinatorial-identities-linear_recurrence-d1-t0063"}
{"id": "combinatorial-identities-binomial_sums-d2-t0064", "env": "combinatorial-identities", "msc": "05", "family": "binomial_sums", "difficulty": 2, "seed": 64, "kind": "prove", "instruction": "# Prove an identity for binomial coefficients\n\nProve the following.\n\nFor every natural number \\(n\\), \\[5 \\cdot \\sum_{i=0}^{n} \\binom{i+3}{3} = 5 \\cdot \\binom{n+4}{4}.\\] (This is the hockey stick identity.)\n\n## What to do\n\n`Solution.lean` in the working directory states the theorem in Lean 4 with Mathlib, with `sorry` in place of the proof. Replace every `sorry` with a proof.\n\n- Do not change the statement of any theorem or any definition the file gives you. You may add your own lemmas and definitions.\n- Check your work with `lake env lean Solution.lean` (run it inside `/opt/arena/lean`, giving the full path to the file). It must compile without errors.\n- A theorem counts only if its proof is complete: no `sorry`, no new axioms, no `native_decide`.\n- The reward is 1 if the theorem is proved and 0 otherwise.\n", "start_file": "import Mathlib\n\n/-- A hockey stick identity for binomial coefficients. -/\ntheorem hockey_stick (n : ℕ) :\n ∑ i ∈ Finset.range (n + 1), 5 * (i + 3).choose 3 = 5 * (n + 4).choose 4 := by\n sorry\n", "path": "tasks/combinatorial-identities/combinatorial-identities-binomial_sums-d2-t0064"}
{"id": "combinatorial-identities-counting-d2-t0065", "env": "combinatorial-identities", "msc": "05", "family": "counting", "difficulty": 2, "seed": 65, "kind": "prove", "instruction": "# Prove a counting statement\n\nProve the following.\n\nLet \\(n\\) be a natural number. Prove that the set \\(\\{0, 1, \\dots, n-1\\}\\) has at most as many elements as the set of integers \\(y\\) with \\(0 \\le y < 6 n\\) and \\(y \\equiv 0 \\pmod{6}\\). (Construct an injection.)\n\n## What to do\n\n`Solution.lean` in the working directory states the theorem in Lean 4 with Mathlib, with `sorry` in place of the proof. Replace every `sorry` with a proof.\n\n- Do not change the statement of any theorem or any definition the file gives you. You may add your own lemmas and definitions.\n- Check your work with `lake env lean Solution.lean` (run it inside `/opt/arena/lean`, giving the full path to the file). It must compile without errors.\n- A theorem counts only if its proof is complete: no `sorry`, no new axioms, no `native_decide`.\n- The reward is 1 if the theorem is proved and 0 otherwise.\n", "start_file": "import Mathlib\n\n/-- An injection into a residue class gives a cardinality bound. -/\ntheorem card_le_residue_class (n : ℕ) :\n (Finset.range n).card ≤ ((Finset.range (6 * n)).filter (fun y => y % 6 = 0)).card := by\n sorry\n", "path": "tasks/combinatorial-identities/combinatorial-identities-counting-d2-t0065"}
{"id": "combinatorial-identities-fibonacci-d2-t0066", "env": "combinatorial-identities", "msc": "05", "family": "fibonacci", "difficulty": 2, "seed": 66, "kind": "prove", "instruction": "# Prove an identity for Fibonacci numbers\n\nProve the following.\n\nFor every natural number \\(n\\), with \\(F\\) the Fibonacci sequence, \\[\\sum_{i=0}^{n} 1\\,F_i^2 = 1\\,F_n F_{n+1}.\\]\n\n## What to do\n\n`Solution.lean` in the working directory states the theorem in Lean 4 with Mathlib, with `sorry` in place of the proof. Replace every `sorry` with a proof.\n\n- Do not change the statement of any theorem or any definition the file gives you. You may add your own lemmas and definitions.\n- Check your work with `lake env lean Solution.lean` (run it inside `/opt/arena/lean`, giving the full path to the file). It must compile without errors.\n- A theorem counts only if its proof is complete: no `sorry`, no new axioms, no `native_decide`.\n- The reward is 1 if the theorem is proved and 0 otherwise.\n", "start_file": "import Mathlib\n\n/-- A sum of squares of Fibonacci numbers. -/\ntheorem fib_square_sum (n : ℕ) :\n ∑ i ∈ Finset.range (n + 1), 1 * Nat.fib i ^ 2 = 1 * (Nat.fib n * Nat.fib (n + 1)) := by\n sorry\n", "path": "tasks/combinatorial-identities/combinatorial-identities-fibonacci-d2-t0066"}
{"id": "combinatorial-identities-linear_recurrence-d2-t0067", "env": "combinatorial-identities", "msc": "05", "family": "linear_recurrence", "difficulty": 2, "seed": 67, "kind": "prove", "instruction": "# Find the closed form of a recurrence\n\nProve the following.\n\nDefine a sequence of integers by \\(u_0 = 1\\), \\(u_1 = -2\\) and \\(u_{n+2} = 5\\,u_{n+1} - 4\\,u_{n}\\). Prove that for every natural number \\(n\\), \\[u_n = -1 \\cdot 4^{n} + 2 \\cdot 1^{n}.\\]\n\n## What to do\n\n`Solution.lean` in the working directory states the theorem in Lean 4 with Mathlib, with `sorry` in place of the proof. Replace every `sorry` with a proof.\n\n- Do not change the statement of any theorem or any definition the file gives you. You may add your own lemmas and definitions.\n- Check your work with `lake env lean Solution.lean` (run it inside `/opt/arena/lean`, giving the full path to the file). It must compile without errors.\n- A theorem counts only if its proof is complete: no `sorry`, no new axioms, no `native_decide`.\n- The reward is 1 if the theorem is proved and 0 otherwise.\n", "start_file": "import Mathlib\n\ndef u : ℕ → ℤ\n | 0 => 1\n | 1 => (-2)\n | (n + 2) => 5 * u (n + 1) - 4 * u n\n\n/-- A closed form for the sequence defined by the recurrence. -/\ntheorem seq_closed_form (n : ℕ) :\n u n = (-1) * 4 ^ n + 2 * 1 ^ n := by\n sorry\n", "path": "tasks/combinatorial-identities/combinatorial-identities-linear_recurrence-d2-t0067"}
{"id": "combinatorial-identities-binomial_sums-d3-t0068", "env": "combinatorial-identities", "msc": "05", "family": "binomial_sums", "difficulty": 3, "seed": 68, "kind": "prove", "instruction": "# Prove an identity for binomial coefficients\n\nProve the following.\n\nFirst prove \\[\\sum_{i=0}^{n} i \\binom{n}{i} = n \\cdot 2^{n-1},\\] where \\(n - 1\\) is truncated subtraction on the natural numbers. Then use it, and the value of \\(\\sum_{i=0}^{n} \\binom{n}{i}\\), to prove \\[\\sum_{i=0}^{n} (1i + 1) \\binom{n}{i} = 1 \\cdot n \\cdot 2^{n-1} + 1 \\cdot 2^{n}.\\]\n\n## What to do\n\n`Solution.lean` in the working directory states 2 theorems in Lean 4 with Mathlib, with `sorry` in place of each proof. Replace every `sorry` with a proof.\n\n- Do not change the statement of any theorem or any definition the file gives you. You may add your own lemmas and definitions.\n- Check your work with `lake env lean Solution.lean` (run it inside `/opt/arena/lean`, giving the full path to the file). It must compile without errors.\n- A theorem counts only if its proof is complete: no `sorry`, no new axioms, no `native_decide`.\n- The reward is the share of the 2 theorems that are proved. If the file does not compile the reward is 0, so leave `sorry` on a theorem you cannot finish rather than a broken proof.\n", "start_file": "import Mathlib\n\n/-- The sum of i times n choose i. -/\ntheorem sum_i_choose (n : ℕ) :\n ∑ i ∈ Finset.range (n + 1), i * n.choose i = n * 2 ^ (n - 1) := by\n sorry\n\n/-- A weighted binomial sum. -/\ntheorem weighted_sum (n : ℕ) :\n ∑ i ∈ Finset.range (n + 1), (1 * i + 1) * n.choose i = 1 * (n * 2 ^ (n - 1)) + 1 * 2 ^ n := by\n sorry\n", "path": "tasks/combinatorial-identities/combinatorial-identities-binomial_sums-d3-t0068"}
{"id": "combinatorial-identities-counting-d3-t0069", "env": "combinatorial-identities", "msc": "05", "family": "counting", "difficulty": 3, "seed": 69, "kind": "prove", "instruction": "# Prove a counting statement\n\nProve the following.\n\nLet \\(s\\) be a set of natural numbers that are all less than \\(6 \\cdot 2 = 12\\), and suppose \\(s\\) has more than 2 elements. Prove that \\(s\\) contains two elements \\(x < y\\) with \\(y - x < 6\\).\n\n## What to do\n\n`Solution.lean` in the working directory states the theorem in Lean 4 with Mathlib, with `sorry` in place of the proof. Replace every `sorry` with a proof.\n\n- Do not change the statement of any theorem or any definition the file gives you. You may add your own lemmas and definitions.\n- Check your work with `lake env lean Solution.lean` (run it inside `/opt/arena/lean`, giving the full path to the file). It must compile without errors.\n- A theorem counts only if its proof is complete: no `sorry`, no new axioms, no `native_decide`.\n- The reward is 1 if the theorem is proved and 0 otherwise.\n", "start_file": "import Mathlib\n\n/-- Pigeonhole principle for blocks of consecutive numbers. -/\ntheorem close_pair (s : Finset ℕ) (hs : s ⊆ Finset.range (6 * 2)) (h : 2 < s.card) :\n ∃ x ∈ s, ∃ y ∈ s, x < y ∧ y < x + 6 := by\n sorry\n", "path": "tasks/combinatorial-identities/combinatorial-identities-counting-d3-t0069"}
{"id": "combinatorial-identities-fibonacci-d3-t0070", "env": "combinatorial-identities", "msc": "05", "family": "fibonacci", "difficulty": 3, "seed": 70, "kind": "prove", "instruction": "# Prove an identity for Fibonacci numbers\n\nProve the following.\n\nFirst prove Cassini's identity: for every natural number \\(n\\), \\[F_{n+1}^2 - F_n F_{n+2} = (-1)^n,\\] computed in the integers, where \\(F\\) is the Fibonacci sequence. Then conclude that \\(F_{m+1}^2 - F_m F_{m+2}\\) is either \\(1\\) or \\(-1\\) when \\(m = 5n + 5\\).\n\n## What to do\n\n`Solution.lean` in the working directory states 2 theorems in Lean 4 with Mathlib, with `sorry` in place of each proof. Replace every `sorry` with a proof.\n\n- Do not change the statement of any theorem or any definition the file gives you. You may add your own lemmas and definitions.\n- Check your work with `lake env lean Solution.lean` (run it inside `/opt/arena/lean`, giving the full path to the file). It must compile without errors.\n- A theorem counts only if its proof is complete: no `sorry`, no new axioms, no `native_decide`.\n- The reward is the share of the 2 theorems that are proved. If the file does not compile the reward is 0, so leave `sorry` on a theorem you cannot finish rather than a broken proof.\n", "start_file": "import Mathlib\n\n/-- Cassini's identity for Fibonacci numbers. -/\ntheorem cassini (n : ℕ) :\n (Nat.fib (n + 1) : ℤ) ^ 2 - Nat.fib n * Nat.fib (n + 2) = (-1) ^ n := by\n sorry\n\n/-- Cassini's determinant is plus or minus one at the index given. -/\ntheorem cassini_pm_one (n : ℕ) :\n (Nat.fib (5 * n + 5 + 1) : ℤ) ^ 2 - Nat.fib (5 * n + 5) * Nat.fib (5 * n + 5 + 2) = 1 ∨ (Nat.fib (5 * n + 5 + 1) : ℤ) ^ 2 - Nat.fib (5 * n + 5) * Nat.fib (5 * n + 5 + 2) = -1 := by\n sorry\n", "path": "tasks/combinatorial-identities/combinatorial-identities-fibonacci-d3-t0070"}
{"id": "combinatorial-identities-linear_recurrence-d3-t0071", "env": "combinatorial-identities", "msc": "05", "family": "linear_recurrence", "difficulty": 3, "seed": 71, "kind": "prove", "instruction": "# Find the closed form of a recurrence\n\nProve the following.\n\nDefine a sequence of integers by \\(u_0 = 1\\), \\(u_1 = 16\\) and \\(u_{n+2} = 8\\,u_{n+1} - 16\\,u_{n}\\). Prove that for every natural number \\(n\\), \\[u_n = (1 + 3 n) \\cdot 4^{n}.\\]\n\n## What to do\n\n`Solution.lean` in the working directory states the theorem in Lean 4 with Mathlib, with `sorry` in place of the proof. Replace every `sorry` with a proof.\n\n- Do not change the statement of any theorem or any definition the file gives you. You may add your own lemmas and definitions.\n- Check your work with `lake env lean Solution.lean` (run it inside `/opt/arena/lean`, giving the full path to the file). It must compile without errors.\n- A theorem counts only if its proof is complete: no `sorry`, no new axioms, no `native_decide`.\n- The reward is 1 if the theorem is proved and 0 otherwise.\n", "start_file": "import Mathlib\n\ndef u : ℕ → ℤ\n | 0 => 1\n | 1 => 16\n | (n + 2) => 8 * u (n + 1) - 16 * u n\n\n/-- A closed form for the sequence defined by the recurrence. -/\ntheorem seq_closed_form (n : ℕ) :\n u n = (1 + 3 * (n : ℤ)) * 4 ^ n := by\n sorry\n", "path": "tasks/combinatorial-identities/combinatorial-identities-linear_recurrence-d3-t0071"}
{"id": "combinatorial-identities-binomial_sums-d1-t0072", "env": "combinatorial-identities", "msc": "05", "family": "binomial_sums", "difficulty": 1, "seed": 72, "kind": "prove", "instruction": "# Prove an identity for binomial coefficients\n\nProve the following.\n\nFor every natural number \\(n\\), \\[\\sum_{i=0}^{n} \\binom{n}{i}\\, 2^{i} = 3^{n}.\\]\n\n## What to do\n\n`Solution.lean` in the working directory states the theorem in Lean 4 with Mathlib, with `sorry` in place of the proof. Replace every `sorry` with a proof.\n\n- Do not change the statement of any theorem or any definition the file gives you. You may add your own lemmas and definitions.\n- Check your work with `lake env lean Solution.lean` (run it inside `/opt/arena/lean`, giving the full path to the file). It must compile without errors.\n- A theorem counts only if its proof is complete: no `sorry`, no new axioms, no `native_decide`.\n- The reward is 1 if the theorem is proved and 0 otherwise.\n", "start_file": "import Mathlib\n\n/-- A weighted sum of binomial coefficients. -/\ntheorem binomial_sum (n : ℕ) :\n ∑ i ∈ Finset.range (n + 1), n.choose i * 2 ^ i = 3 ^ n := by\n sorry\n", "path": "tasks/combinatorial-identities/combinatorial-identities-binomial_sums-d1-t0072"}
{"id": "combinatorial-identities-counting-d1-t0073", "env": "combinatorial-identities", "msc": "05", "family": "counting", "difficulty": 1, "seed": 73, "kind": "prove", "instruction": "# Prove a counting statement\n\nProve the following.\n\nLet \\(s\\) be a finite set of integers with more than 5 elements. Prove that \\(s\\) contains two different integers \\(x \\ne y\\) that leave the same remainder on division by 5.\n\n## What to do\n\n`Solution.lean` in the working directory states the theorem in Lean 4 with Mathlib, with `sorry` in place of the proof. Replace every `sorry` with a proof.\n\n- Do not change the statement of any theorem or any definition the file gives you. You may add your own lemmas and definitions.\n- Check your work with `lake env lean Solution.lean` (run it inside `/opt/arena/lean`, giving the full path to the file). It must compile without errors.\n- A theorem counts only if its proof is complete: no `sorry`, no new axioms, no `native_decide`.\n- The reward is 1 if the theorem is proved and 0 otherwise.\n", "start_file": "import Mathlib\n\n/-- Pigeonhole principle for remainders. -/\ntheorem pigeonhole_mod (s : Finset ℤ) (h : 5 < s.card) :\n ∃ x ∈ s, ∃ y ∈ s, x ≠ y ∧ x % 5 = y % 5 := by\n sorry\n", "path": "tasks/combinatorial-identities/combinatorial-identities-counting-d1-t0073"}
{"id": "combinatorial-identities-fibonacci-d1-t0074", "env": "combinatorial-identities", "msc": "05", "family": "fibonacci", "difficulty": 1, "seed": 74, "kind": "prove", "instruction": "# Prove an identity for Fibonacci numbers\n\nProve the following.\n\nFor every natural number \\(n\\), with \\(F\\) the Fibonacci sequence (\\(F_0 = 0\\), \\(F_1 = 1\\), \\(F_{k+2} = F_k + F_{k+1}\\)), \\[\\sum_{i=0}^{n-1} F_{i+13} + F_{14} = F_{n+14}.\\]\n\n## What to do\n\n`Solution.lean` in the working directory states the theorem in Lean 4 with Mathlib, with `sorry` in place of the proof. Replace every `sorry` with a proof.\n\n- Do not change the statement of any theorem or any definition the file gives you. You may add your own lemmas and definitions.\n- Check your work with `lake env lean Solution.lean` (run it inside `/opt/arena/lean`, giving the full path to the file). It must compile without errors.\n- A theorem counts only if its proof is complete: no `sorry`, no new axioms, no `native_decide`.\n- The reward is 1 if the theorem is proved and 0 otherwise.\n", "start_file": "import Mathlib\n\n/-- A telescoping sum of Fibonacci numbers. -/\ntheorem fib_shifted_sum (n : ℕ) :\n ∑ i ∈ Finset.range n, Nat.fib (i + 13) + Nat.fib 14 = Nat.fib (n + 14) := by\n sorry\n", "path": "tasks/combinatorial-identities/combinatorial-identities-fibonacci-d1-t0074"}
{"id": "combinatorial-identities-linear_recurrence-d1-t0075", "env": "combinatorial-identities", "msc": "05", "family": "linear_recurrence", "difficulty": 1, "seed": 75, "kind": "prove", "instruction": "# Find the closed form of a recurrence\n\nProve the following.\n\nDefine a sequence of integers by \\(u_0 = 5\\), \\(u_1 = 17\\) and \\(u_{n+2} = 6\\,u_{n+1} - 5\\,u_{n}\\). Prove that for every natural number \\(n\\), \\[u_n = 3 \\cdot 5^{n} + 2 \\cdot 1^{n}.\\]\n\n## What to do\n\n`Solution.lean` in the working directory states the theorem in Lean 4 with Mathlib, with `sorry` in place of the proof. Replace every `sorry` with a proof.\n\n- Do not change the statement of any theorem or any definition the file gives you. You may add your own lemmas and definitions.\n- Check your work with `lake env lean Solution.lean` (run it inside `/opt/arena/lean`, giving the full path to the file). It must compile without errors.\n- A theorem counts only if its proof is complete: no `sorry`, no new axioms, no `native_decide`.\n- The reward is 1 if the theorem is proved and 0 otherwise.\n", "start_file": "import Mathlib\n\ndef u : ℕ → ℤ\n | 0 => 5\n | 1 => 17\n | (n + 2) => 6 * u (n + 1) - 5 * u n\n\n/-- A closed form for the sequence defined by the recurrence. -/\ntheorem seq_closed_form (n : ℕ) :\n u n = 3 * 5 ^ n + 2 * 1 ^ n := by\n sorry\n", "path": "tasks/combinatorial-identities/combinatorial-identities-linear_recurrence-d1-t0075"}
{"id": "combinatorial-identities-binomial_sums-d2-t0076", "env": "combinatorial-identities", "msc": "05", "family": "binomial_sums", "difficulty": 2, "seed": 76, "kind": "prove", "instruction": "# Prove an identity for binomial coefficients\n\nProve the following.\n\nFor every natural number \\(n\\), \\[\\sum_{i=0}^{n} \\binom{i+5}{5} = \\binom{n+6}{6}.\\] (This is the hockey stick identity.)\n\n## What to do\n\n`Solution.lean` in the working directory states the theorem in Lean 4 with Mathlib, with `sorry` in place of the proof. Replace every `sorry` with a proof.\n\n- Do not change the statement of any theorem or any definition the file gives you. You may add your own lemmas and definitions.\n- Check your work with `lake env lean Solution.lean` (run it inside `/opt/arena/lean`, giving the full path to the file). It must compile without errors.\n- A theorem counts only if its proof is complete: no `sorry`, no new axioms, no `native_decide`.\n- The reward is 1 if the theorem is proved and 0 otherwise.\n", "start_file": "import Mathlib\n\n/-- A hockey stick identity for binomial coefficients. -/\ntheorem hockey_stick (n : ℕ) :\n ∑ i ∈ Finset.range (n + 1), (i + 5).choose 5 = (n + 6).choose 6 := by\n sorry\n", "path": "tasks/combinatorial-identities/combinatorial-identities-binomial_sums-d2-t0076"}
{"id": "combinatorial-identities-counting-d2-t0077", "env": "combinatorial-identities", "msc": "05", "family": "counting", "difficulty": 2, "seed": 77, "kind": "prove", "instruction": "# Prove a counting statement\n\nProve the following.\n\nLet \\(n\\) be a natural number. Prove that the set \\(\\{0, 1, \\dots, n-1\\}\\) has at most as many elements as the set of integers \\(y\\) with \\(0 \\le y < 5 n\\) and \\(y \\equiv 0 \\pmod{5}\\). (Construct an injection.)\n\n## What to do\n\n`Solution.lean` in the working directory states the theorem in Lean 4 with Mathlib, with `sorry` in place of the proof. Replace every `sorry` with a proof.\n\n- Do not change the statement of any theorem or any definition the file gives you. You may add your own lemmas and definitions.\n- Check your work with `lake env lean Solution.lean` (run it inside `/opt/arena/lean`, giving the full path to the file). It must compile without errors.\n- A theorem counts only if its proof is complete: no `sorry`, no new axioms, no `native_decide`.\n- The reward is 1 if the theorem is proved and 0 otherwise.\n", "start_file": "import Mathlib\n\n/-- An injection into a residue class gives a cardinality bound. -/\ntheorem card_le_residue_class (n : ℕ) :\n (Finset.range n).card ≤ ((Finset.range (5 * n)).filter (fun y => y % 5 = 0)).card := by\n sorry\n", "path": "tasks/combinatorial-identities/combinatorial-identities-counting-d2-t0077"}
{"id": "combinatorial-identities-fibonacci-d2-t0078", "env": "combinatorial-identities", "msc": "05", "family": "fibonacci", "difficulty": 2, "seed": 78, "kind": "prove", "instruction": "# Prove an identity for Fibonacci numbers\n\nProve the following.\n\nFor every natural number \\(n\\), with \\(F\\) the Fibonacci sequence, \\[\\sum_{i=0}^{n} 1\\,F_i^2 = 1\\,F_n F_{n+1}.\\]\n\n## What to do\n\n`Solution.lean` in the working directory states the theorem in Lean 4 with Mathlib, with `sorry` in place of the proof. Replace every `sorry` with a proof.\n\n- Do not change the statement of any theorem or any definition the file gives you. You may add your own lemmas and definitions.\n- Check your work with `lake env lean Solution.lean` (run it inside `/opt/arena/lean`, giving the full path to the file). It must compile without errors.\n- A theorem counts only if its proof is complete: no `sorry`, no new axioms, no `native_decide`.\n- The reward is 1 if the theorem is proved and 0 otherwise.\n", "start_file": "import Mathlib\n\n/-- A sum of squares of Fibonacci numbers. -/\ntheorem fib_square_sum (n : ℕ) :\n ∑ i ∈ Finset.range (n + 1), 1 * Nat.fib i ^ 2 = 1 * (Nat.fib n * Nat.fib (n + 1)) := by\n sorry\n", "path": "tasks/combinatorial-identities/combinatorial-identities-fibonacci-d2-t0078"}
{"id": "combinatorial-identities-linear_recurrence-d2-t0079", "env": "combinatorial-identities", "msc": "05", "family": "linear_recurrence", "difficulty": 2, "seed": 79, "kind": "prove", "instruction": "# Find the closed form of a recurrence\n\nProve the following.\n\nDefine a sequence of integers by \\(u_0 = 6\\), \\(u_1 = 0\\) and \\(u_{n+2} = 0\\,u_{n+1} - -9\\,u_{n}\\). Prove that for every natural number \\(n\\), \\[u_n = 3 \\cdot (-3)^{n} + 3 \\cdot 3^{n}.\\]\n\n## What to do\n\n`Solution.lean` in the working directory states the theorem in Lean 4 with Mathlib, with `sorry` in place of the proof. Replace every `sorry` with a proof.\n\n- Do not change the statement of any theorem or any definition the file gives you. You may add your own lemmas and definitions.\n- Check your work with `lake env lean Solution.lean` (run it inside `/opt/arena/lean`, giving the full path to the file). It must compile without errors.\n- A theorem counts only if its proof is complete: no `sorry`, no new axioms, no `native_decide`.\n- The reward is 1 if the theorem is proved and 0 otherwise.\n", "start_file": "import Mathlib\n\ndef u : ℕ → ℤ\n | 0 => 6\n | 1 => 0\n | (n + 2) => 0 * u (n + 1) - (-9) * u n\n\n/-- A closed form for the sequence defined by the recurrence. -/\ntheorem seq_closed_form (n : ℕ) :\n u n = 3 * (-3) ^ n + 3 * 3 ^ n := by\n sorry\n", "path": "tasks/combinatorial-identities/combinatorial-identities-linear_recurrence-d2-t0079"}
{"id": "combinatorial-identities-binomial_sums-d3-t0080", "env": "combinatorial-identities", "msc": "05", "family": "binomial_sums", "difficulty": 3, "seed": 80, "kind": "prove", "instruction": "# Prove an identity for binomial coefficients\n\nProve the following.\n\nFirst prove \\[\\sum_{i=0}^{n} i \\binom{n}{i} = n \\cdot 2^{n-1},\\] where \\(n - 1\\) is truncated subtraction on the natural numbers. Then use it, and the value of \\(\\sum_{i=0}^{n} \\binom{n}{i}\\), to prove \\[\\sum_{i=0}^{n} (1i + 6) \\binom{n}{i} = 1 \\cdot n \\cdot 2^{n-1} + 6 \\cdot 2^{n}.\\]\n\n## What to do\n\n`Solution.lean` in the working directory states 2 theorems in Lean 4 with Mathlib, with `sorry` in place of each proof. Replace every `sorry` with a proof.\n\n- Do not change the statement of any theorem or any definition the file gives you. You may add your own lemmas and definitions.\n- Check your work with `lake env lean Solution.lean` (run it inside `/opt/arena/lean`, giving the full path to the file). It must compile without errors.\n- A theorem counts only if its proof is complete: no `sorry`, no new axioms, no `native_decide`.\n- The reward is the share of the 2 theorems that are proved. If the file does not compile the reward is 0, so leave `sorry` on a theorem you cannot finish rather than a broken proof.\n", "start_file": "import Mathlib\n\n/-- The sum of i times n choose i. -/\ntheorem sum_i_choose (n : ℕ) :\n ∑ i ∈ Finset.range (n + 1), i * n.choose i = n * 2 ^ (n - 1) := by\n sorry\n\n/-- A weighted binomial sum. -/\ntheorem weighted_sum (n : ℕ) :\n ∑ i ∈ Finset.range (n + 1), (1 * i + 6) * n.choose i = 1 * (n * 2 ^ (n - 1)) + 6 * 2 ^ n := by\n sorry\n", "path": "tasks/combinatorial-identities/combinatorial-identities-binomial_sums-d3-t0080"}
{"id": "combinatorial-identities-counting-d3-t0081", "env": "combinatorial-identities", "msc": "05", "family": "counting", "difficulty": 3, "seed": 81, "kind": "prove", "instruction": "# Prove a counting statement\n\nProve the following.\n\nLet \\(s\\) be a set of natural numbers that are all less than \\(5 \\cdot 7 = 35\\), and suppose \\(s\\) has more than 7 elements. Prove that \\(s\\) contains two elements \\(x < y\\) with \\(y - x < 5\\).\n\n## What to do\n\n`Solution.lean` in the working directory states the theorem in Lean 4 with Mathlib, with `sorry` in place of the proof. Replace every `sorry` with a proof.\n\n- Do not change the statement of any theorem or any definition the file gives you. You may add your own lemmas and definitions.\n- Check your work with `lake env lean Solution.lean` (run it inside `/opt/arena/lean`, giving the full path to the file). It must compile without errors.\n- A theorem counts only if its proof is complete: no `sorry`, no new axioms, no `native_decide`.\n- The reward is 1 if the theorem is proved and 0 otherwise.\n", "start_file": "import Mathlib\n\n/-- Pigeonhole principle for blocks of consecutive numbers. -/\ntheorem close_pair (s : Finset ℕ) (hs : s ⊆ Finset.range (5 * 7)) (h : 7 < s.card) :\n ∃ x ∈ s, ∃ y ∈ s, x < y ∧ y < x + 5 := by\n sorry\n", "path": "tasks/combinatorial-identities/combinatorial-identities-counting-d3-t0081"}
{"id": "combinatorial-identities-fibonacci-d3-t0082", "env": "combinatorial-identities", "msc": "05", "family": "fibonacci", "difficulty": 3, "seed": 82, "kind": "prove", "instruction": "# Prove an identity for Fibonacci numbers\n\nProve the following.\n\nFirst prove Cassini's identity: for every natural number \\(n\\), \\[F_{n+1}^2 - F_n F_{n+2} = (-1)^n,\\] computed in the integers, where \\(F\\) is the Fibonacci sequence. Then conclude that \\(F_{m+1}^2 - F_m F_{m+2}\\) is either \\(1\\) or \\(-1\\) when \\(m = n + 3\\).\n\n## What to do\n\n`Solution.lean` in the working directory states 2 theorems in Lean 4 with Mathlib, with `sorry` in place of each proof. Replace every `sorry` with a proof.\n\n- Do not change the statement of any theorem or any definition the file gives you. You may add your own lemmas and definitions.\n- Check your work with `lake env lean Solution.lean` (run it inside `/opt/arena/lean`, giving the full path to the file). It must compile without errors.\n- A theorem counts only if its proof is complete: no `sorry`, no new axioms, no `native_decide`.\n- The reward is the share of the 2 theorems that are proved. If the file does not compile the reward is 0, so leave `sorry` on a theorem you cannot finish rather than a broken proof.\n", "start_file": "import Mathlib\n\n/-- Cassini's identity for Fibonacci numbers. -/\ntheorem cassini (n : ℕ) :\n (Nat.fib (n + 1) : ℤ) ^ 2 - Nat.fib n * Nat.fib (n + 2) = (-1) ^ n := by\n sorry\n\n/-- Cassini's determinant is plus or minus one at the index given. -/\ntheorem cassini_pm_one (n : ℕ) :\n (Nat.fib (n + 3 + 1) : ℤ) ^ 2 - Nat.fib (n + 3) * Nat.fib (n + 3 + 2) = 1 ∨ (Nat.fib (n + 3 + 1) : ℤ) ^ 2 - Nat.fib (n + 3) * Nat.fib (n + 3 + 2) = -1 := by\n sorry\n", "path": "tasks/combinatorial-identities/combinatorial-identities-fibonacci-d3-t0082"}
{"id": "combinatorial-identities-linear_recurrence-d3-t0083", "env": "combinatorial-identities", "msc": "05", "family": "linear_recurrence", "difficulty": 3, "seed": 83, "kind": "prove", "instruction": "# Find the closed form of a recurrence\n\nProve the following.\n\nDefine a sequence of integers by \\(u_0 = 1\\), \\(u_1 = 8\\) and \\(u_{n+2} = 4\\,u_{n+1} - 4\\,u_{n}\\). Prove that for every natural number \\(n\\), \\[u_n = (1 + 3 n) \\cdot 2^{n}.\\]\n\n## What to do\n\n`Solution.lean` in the working directory states the theorem in Lean 4 with Mathlib, with `sorry` in place of the proof. Replace every `sorry` with a proof.\n\n- Do not change the statement of any theorem or any definition the file gives you. You may add your own lemmas and definitions.\n- Check your work with `lake env lean Solution.lean` (run it inside `/opt/arena/lean`, giving the full path to the file). It must compile without errors.\n- A theorem counts only if its proof is complete: no `sorry`, no new axioms, no `native_decide`.\n- The reward is 1 if the theorem is proved and 0 otherwise.\n", "start_file": "import Mathlib\n\ndef u : ℕ → ℤ\n | 0 => 1\n | 1 => 8\n | (n + 2) => 4 * u (n + 1) - 4 * u n\n\n/-- A closed form for the sequence defined by the recurrence. -/\ntheorem seq_closed_form (n : ℕ) :\n u n = (1 + 3 * (n : ℤ)) * 2 ^ n := by\n sorry\n", "path": "tasks/combinatorial-identities/combinatorial-identities-linear_recurrence-d3-t0083"}