File size: 35,205 Bytes
7931c0c
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
{"id": "combinatorial-identities-binomial_sums-d1-e0000", "env": "combinatorial-identities", "msc": "05", "family": "binomial_sums", "difficulty": 1, "seed": 10000, "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}\\, 8^{i} = 9^{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 * 8 ^ i = 9 ^ n := by\n  sorry\n", "path": "tasks/combinatorial-identities/combinatorial-identities-binomial_sums-d1-e0000"}
{"id": "combinatorial-identities-counting-d1-e0001", "env": "combinatorial-identities", "msc": "05", "family": "counting", "difficulty": 1, "seed": 10001, "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-e0001"}
{"id": "combinatorial-identities-fibonacci-d1-e0002", "env": "combinatorial-identities", "msc": "05", "family": "fibonacci", "difficulty": 1, "seed": 10002, "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+3} + F_{4} = F_{n+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/-- A telescoping sum of Fibonacci numbers. -/\ntheorem fib_shifted_sum (n : ℕ) :\n    ∑ i ∈ Finset.range n, Nat.fib (i + 3) + Nat.fib 4 = Nat.fib (n + 4) := by\n  sorry\n", "path": "tasks/combinatorial-identities/combinatorial-identities-fibonacci-d1-e0002"}
{"id": "combinatorial-identities-linear_recurrence-d1-e0003", "env": "combinatorial-identities", "msc": "05", "family": "linear_recurrence", "difficulty": 1, "seed": 10003, "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 = -7\\) and \\(u_{n+2} = 4\\,u_{n+1} - 3\\,u_{n}\\). Prove that for every natural number \\(n\\), \\[u_n = -2 \\cdot 3^{n} + -1 \\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 => (-3)\n  | 1 => (-7)\n  | (n + 2) => 4 * u (n + 1) - 3 * u n\n\n/-- A closed form for the sequence defined by the recurrence. -/\ntheorem seq_closed_form (n : ℕ) :\n    u n = (-2) * 3 ^ n + (-1) * 1 ^ n := by\n  sorry\n", "path": "tasks/combinatorial-identities/combinatorial-identities-linear_recurrence-d1-e0003"}
{"id": "combinatorial-identities-binomial_sums-d2-e0004", "env": "combinatorial-identities", "msc": "05", "family": "binomial_sums", "difficulty": 2, "seed": 10004, "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+1}{1} = 2 \\cdot \\binom{n+2}{2}.\\] (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 + 1).choose 1 = 2 * (n + 2).choose 2 := by\n  sorry\n", "path": "tasks/combinatorial-identities/combinatorial-identities-binomial_sums-d2-e0004"}
{"id": "combinatorial-identities-counting-d2-e0005", "env": "combinatorial-identities", "msc": "05", "family": "counting", "difficulty": 2, "seed": 10005, "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 2 \\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 = 2)).card := by\n  sorry\n", "path": "tasks/combinatorial-identities/combinatorial-identities-counting-d2-e0005"}
{"id": "combinatorial-identities-fibonacci-d2-e0006", "env": "combinatorial-identities", "msc": "05", "family": "fibonacci", "difficulty": 2, "seed": 10006, "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} 3\\,F_i^2 = 3\\,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), 3 * Nat.fib i ^ 2 = 3 * (Nat.fib n * Nat.fib (n + 1)) := by\n  sorry\n", "path": "tasks/combinatorial-identities/combinatorial-identities-fibonacci-d2-e0006"}
{"id": "combinatorial-identities-linear_recurrence-d2-e0007", "env": "combinatorial-identities", "msc": "05", "family": "linear_recurrence", "difficulty": 2, "seed": 10007, "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 = 11\\) and \\(u_{n+2} = -3\\,u_{n+1} - -4\\,u_{n}\\). Prove that for every natural number \\(n\\), \\[u_n = -3 \\cdot (-4)^{n} + -1 \\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 => (-4)\n  | 1 => 11\n  | (n + 2) => (-3) * 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) * (-4) ^ n + (-1) * 1 ^ n := by\n  sorry\n", "path": "tasks/combinatorial-identities/combinatorial-identities-linear_recurrence-d2-e0007"}
{"id": "combinatorial-identities-binomial_sums-d3-e0008", "env": "combinatorial-identities", "msc": "05", "family": "binomial_sums", "difficulty": 3, "seed": 10008, "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-e0008"}
{"id": "combinatorial-identities-counting-d3-e0009", "env": "combinatorial-identities", "msc": "05", "family": "counting", "difficulty": 3, "seed": 10009, "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 \\(4 \\cdot 2 = 8\\), and suppose \\(s\\) has more than 2 elements. Prove that \\(s\\) contains two elements \\(x < y\\) with \\(y - x < 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 blocks of consecutive numbers. -/\ntheorem close_pair (s : Finset ℕ) (hs : s ⊆ Finset.range (4 * 2)) (h : 2 < s.card) :\n    ∃ x ∈ s, ∃ y ∈ s, x < y ∧ y < x + 4 := by\n  sorry\n", "path": "tasks/combinatorial-identities/combinatorial-identities-counting-d3-e0009"}
{"id": "combinatorial-identities-fibonacci-d3-e0010", "env": "combinatorial-identities", "msc": "05", "family": "fibonacci", "difficulty": 3, "seed": 10010, "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 + 2\\).\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 + 2 + 1) : ℤ) ^ 2 - Nat.fib (7 * n + 2) * Nat.fib (7 * n + 2 + 2) = 1 ∨ (Nat.fib (7 * n + 2 + 1) : ℤ) ^ 2 - Nat.fib (7 * n + 2) * Nat.fib (7 * n + 2 + 2) = -1 := by\n  sorry\n", "path": "tasks/combinatorial-identities/combinatorial-identities-fibonacci-d3-e0010"}
{"id": "combinatorial-identities-linear_recurrence-d3-e0011", "env": "combinatorial-identities", "msc": "05", "family": "linear_recurrence", "difficulty": 3, "seed": 10011, "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 = 14\\) and \\(u_{n+2} = 4\\,u_{n+1} - 4\\,u_{n}\\). Prove that for every natural number \\(n\\), \\[u_n = (3 + 4 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 => 14\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 + 4 * (n : ℤ)) * 2 ^ n := by\n  sorry\n", "path": "tasks/combinatorial-identities/combinatorial-identities-linear_recurrence-d3-e0011"}
{"id": "combinatorial-identities-binomial_sums-d1-e0012", "env": "combinatorial-identities", "msc": "05", "family": "binomial_sums", "difficulty": 1, "seed": 10012, "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-e0012"}
{"id": "combinatorial-identities-counting-d1-e0013", "env": "combinatorial-identities", "msc": "05", "family": "counting", "difficulty": 1, "seed": 10013, "kind": "prove", "instruction": "# Prove a counting statement\n\nProve the following.\n\nLet \\(s\\) be a finite set of integers with more than 2 elements. Prove that \\(s\\) contains two different integers \\(x \\ne y\\) that leave the same remainder on division by 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 remainders. -/\ntheorem pigeonhole_mod (s : Finset ℤ) (h : 2 < s.card) :\n    ∃ x ∈ s, ∃ y ∈ s, x ≠ y ∧ x % 2 = y % 2 := by\n  sorry\n", "path": "tasks/combinatorial-identities/combinatorial-identities-counting-d1-e0013"}
{"id": "combinatorial-identities-fibonacci-d1-e0014", "env": "combinatorial-identities", "msc": "05", "family": "fibonacci", "difficulty": 1, "seed": 10014, "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+12} + F_{13} = F_{n+13}.\\]\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 + 12) + Nat.fib 13 = Nat.fib (n + 13) := by\n  sorry\n", "path": "tasks/combinatorial-identities/combinatorial-identities-fibonacci-d1-e0014"}
{"id": "combinatorial-identities-linear_recurrence-d1-e0015", "env": "combinatorial-identities", "msc": "05", "family": "linear_recurrence", "difficulty": 1, "seed": 10015, "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 = 17\\) and \\(u_{n+2} = 7\\,u_{n+1} - 10\\,u_{n}\\). Prove that for every natural number \\(n\\), \\[u_n = 1 \\cdot 2^{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 => 17\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 = 1 * 2 ^ n + 3 * 5 ^ n := by\n  sorry\n", "path": "tasks/combinatorial-identities/combinatorial-identities-linear_recurrence-d1-e0015"}
{"id": "combinatorial-identities-binomial_sums-d2-e0016", "env": "combinatorial-identities", "msc": "05", "family": "binomial_sums", "difficulty": 2, "seed": 10016, "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+1}{1} = 5 \\cdot \\binom{n+2}{2}.\\] (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 + 1).choose 1 = 5 * (n + 2).choose 2 := by\n  sorry\n", "path": "tasks/combinatorial-identities/combinatorial-identities-binomial_sums-d2-e0016"}
{"id": "combinatorial-identities-counting-d2-e0017", "env": "combinatorial-identities", "msc": "05", "family": "counting", "difficulty": 2, "seed": 10017, "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 4 \\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 = 4)).card := by\n  sorry\n", "path": "tasks/combinatorial-identities/combinatorial-identities-counting-d2-e0017"}
{"id": "combinatorial-identities-fibonacci-d2-e0018", "env": "combinatorial-identities", "msc": "05", "family": "fibonacci", "difficulty": 2, "seed": 10018, "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+11} + F_{10} = F_{2n+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 sum of every second Fibonacci number. -/\ntheorem fib_odd_sum (n : ℕ) :\n    ∑ i ∈ Finset.range n, Nat.fib (2 * i + 11) + Nat.fib 10 = Nat.fib (2 * n + 10) := by\n  sorry\n", "path": "tasks/combinatorial-identities/combinatorial-identities-fibonacci-d2-e0018"}
{"id": "combinatorial-identities-linear_recurrence-d2-e0019", "env": "combinatorial-identities", "msc": "05", "family": "linear_recurrence", "difficulty": 2, "seed": 10019, "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 = 5\\) and \\(u_{n+2} = 3\\,u_{n+1} - -4\\,u_{n}\\). Prove that for every natural number \\(n\\), \\[u_n = 3 \\cdot (-1)^{n} + 2 \\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 => 5\n  | 1 => 5\n  | (n + 2) => 3 * 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 * (-1) ^ n + 2 * 4 ^ n := by\n  sorry\n", "path": "tasks/combinatorial-identities/combinatorial-identities-linear_recurrence-d2-e0019"}
{"id": "combinatorial-identities-binomial_sums-d3-e0020", "env": "combinatorial-identities", "msc": "05", "family": "binomial_sums", "difficulty": 3, "seed": 10020, "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 + 6) \\binom{n}{i} = 5 \\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), (5 * i + 6) * n.choose i = 5 * (n * 2 ^ (n - 1)) + 6 * 2 ^ n := by\n  sorry\n", "path": "tasks/combinatorial-identities/combinatorial-identities-binomial_sums-d3-e0020"}
{"id": "combinatorial-identities-counting-d3-e0021", "env": "combinatorial-identities", "msc": "05", "family": "counting", "difficulty": 3, "seed": 10021, "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 7 = 42\\), and suppose \\(s\\) has more than 7 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 * 7)) (h : 7 < s.card) :\n    ∃ x ∈ s, ∃ y ∈ s, x < y ∧ y < x + 6 := by\n  sorry\n", "path": "tasks/combinatorial-identities/combinatorial-identities-counting-d3-e0021"}
{"id": "combinatorial-identities-fibonacci-d3-e0022", "env": "combinatorial-identities", "msc": "05", "family": "fibonacci", "difficulty": 3, "seed": 10022, "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 + 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 (3 * n + 6 + 1) : ℤ) ^ 2 - Nat.fib (3 * n + 6) * Nat.fib (3 * n + 6 + 2) = 1 ∨ (Nat.fib (3 * n + 6 + 1) : ℤ) ^ 2 - Nat.fib (3 * n + 6) * Nat.fib (3 * n + 6 + 2) = -1 := by\n  sorry\n", "path": "tasks/combinatorial-identities/combinatorial-identities-fibonacci-d3-e0022"}
{"id": "combinatorial-identities-linear_recurrence-d3-e0023", "env": "combinatorial-identities", "msc": "05", "family": "linear_recurrence", "difficulty": 3, "seed": 10023, "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 = 4\\) and \\(u_{n+2} = 8\\,u_{n+1} - 16\\,u_{n}\\). Prove that for every natural number \\(n\\), \\[u_n = (-3 + 4 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 => (-3)\n  | 1 => 4\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 = ((-3) + 4 * (n : ℤ)) * 4 ^ n := by\n  sorry\n", "path": "tasks/combinatorial-identities/combinatorial-identities-linear_recurrence-d3-e0023"}