{"id": "logic-and-sets-finset_card-d1-e0000", "env": "logic-and-sets", "msc": "03", "family": "finset_card", "difficulty": 1, "seed": 10000, "kind": "prove", "instruction": "# Prove a cardinality fact about finite sets\n\nProve the following.\n\nLet \\(f(x) = 3x + 2\\) on the natural numbers and let \\(s, t\\) be finite sets of natural numbers. Prove that the product \\(f(s) \\times t\\) has \\(|s| \\cdot |t|\\) elements.\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 cardinality fact about finite sets. -/\ntheorem card_fact (s t : Finset ℕ) :\n ((s.image (fun x : ℕ => 3 * x + 2)) ×ˢ t).card = s.card * t.card := by\n sorry\n", "path": "tasks/logic-and-sets/logic-and-sets-finset_card-d1-e0000"} {"id": "logic-and-sets-relations-d1-e0001", "env": "logic-and-sets", "msc": "03", "family": "relations", "difficulty": 1, "seed": 10001, "kind": "prove", "instruction": "# Prove properties of a relation\n\nProve the following.\n\nOn the integers define \\(x \\sim y \\iff 2 \\mid x - y\\). Prove that \\(\\sim\\) is an equivalence relation.\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/-- The relation is reflexive, symmetric and transitive. -/\ntheorem rel_equiv :\n Equivalence (fun x y : ℤ => 2 ∣ x - y) := by\n sorry\n", "path": "tasks/logic-and-sets/logic-and-sets-relations-d1-e0001"} {"id": "logic-and-sets-set_identities-d1-e0002", "env": "logic-and-sets", "msc": "03", "family": "set_identities", "difficulty": 1, "seed": 10002, "kind": "prove", "instruction": "# Prove an identity between sets\n\nProve the following.\n\nLet \\(S, T, U\\) be subsets of a type \\(\\alpha\\). Prove the set identity \\[U \\setminus (S \\cup T) = (U \\setminus S) \\cap (U \\setminus T).\\]\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/-- The stated identity between sets. -/\ntheorem set_identity {α : Type*} (S T U : Set α) :\n U \\ (S ∪ T) = (U \\ S) ∩ (U \\ T) := by\n sorry\n", "path": "tasks/logic-and-sets/logic-and-sets-set_identities-d1-e0002"} {"id": "logic-and-sets-finset_card-d2-e0003", "env": "logic-and-sets", "msc": "03", "family": "finset_card", "difficulty": 2, "seed": 10003, "kind": "prove", "instruction": "# Prove a cardinality fact about finite sets\n\nProve the following.\n\nLet \\(f(x) = 5x + 3\\) on the natural numbers and let \\(s, t\\) be finite sets of natural numbers. Prove that \\[|f(s \\setminus t)| + |s \\cap t| = |s|.\\]\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 cardinality fact about finite sets. -/\ntheorem card_fact (s t : Finset ℕ) :\n ((s \\ t).image (fun x : ℕ => 5 * x + 3)).card + (s ∩ t).card = s.card := by\n sorry\n", "path": "tasks/logic-and-sets/logic-and-sets-finset_card-d2-e0003"} {"id": "logic-and-sets-relations-d2-e0004", "env": "logic-and-sets", "msc": "03", "family": "relations", "difficulty": 2, "seed": 10004, "kind": "prove", "instruction": "# Prove properties of a relation\n\nProve the following.\n\nOn pairs of natural numbers define \\((x_1, y_1) \\sim (x_2, y_2) \\iff x_1 + 7 y_2 = x_2 + 7 y_1\\). Prove that \\(\\sim\\) is an equivalence relation.\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/-- The relation is reflexive, symmetric and transitive. -/\ntheorem rel_equiv :\n Equivalence (fun p q : ℕ × ℕ => p.1 + 7 * q.2 = q.1 + 7 * p.2) := by\n sorry\n", "path": "tasks/logic-and-sets/logic-and-sets-relations-d2-e0004"} {"id": "logic-and-sets-set_identities-d2-e0005", "env": "logic-and-sets", "msc": "03", "family": "set_identities", "difficulty": 2, "seed": 10005, "kind": "prove", "instruction": "# Prove an identity between sets\n\nProve the following.\n\nLet \\(g : \\alpha \\to \\beta\\) be a function that is injective and let \\(C\\) be subsets of \\(\\alpha\\). Write \\(g(X)\\) for the image and \\(g^{-1}(X)\\) for the preimage of a set \\(X\\). Prove \\[g^{-1}(g(C)) = C.\\]\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/-- The stated statement about images and preimages. -/\ntheorem image_identity {α β : Type*} (g : α → β) (C : Set α) (hf : Function.Injective g) :\n g ⁻¹' (g '' C) = C := by\n sorry\n", "path": "tasks/logic-and-sets/logic-and-sets-set_identities-d2-e0005"} {"id": "logic-and-sets-finset_card-d3-e0006", "env": "logic-and-sets", "msc": "03", "family": "finset_card", "difficulty": 3, "seed": 10006, "kind": "prove", "instruction": "# Prove a cardinality fact about finite sets\n\nProve the following.\n\nLet \\(s, t, u\\) be finite sets of natural numbers. First prove the identity \\[|s \\cup t \\cup u| + |s \\cap t| + |s \\cap u| + |t \\cap u| = |s| + |t| + |u| + |s \\cap t \\cap u|.\\] Then use it to prove the following, where subtraction is truncated subtraction on the natural numbers: \\[|s \\cup t \\cup u| = |s| + |t| + |u| - |s \\cap t| - |s \\cap u| - |t \\cap u| + |s \\cap t \\cap u|.\\]\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/-- Inclusion and exclusion for three finite sets. -/\ntheorem incl_excl (s t u : Finset ℕ) :\n (s ∪ t ∪ u).card + (s ∩ t).card + (s ∩ u).card + (t ∩ u).card = s.card + t.card + u.card + (s ∩ t ∩ u).card := by\n sorry\n\n/-- The size of a union of three finite sets, in terms of the sizes of the intersections. -/\ntheorem card_union_three (s t u : Finset ℕ) :\n (s ∪ t ∪ u).card = s.card + t.card + u.card - (s ∩ t).card - (s ∩ u).card - (t ∩ u).card + (s ∩ t ∩ u).card := by\n sorry\n", "path": "tasks/logic-and-sets/logic-and-sets-finset_card-d3-e0006"} {"id": "logic-and-sets-relations-d3-e0007", "env": "logic-and-sets", "msc": "03", "family": "relations", "difficulty": 3, "seed": 10007, "kind": "prove", "instruction": "# Prove properties of a relation\n\nProve the following.\n\nFor an integer \\(q\\), define a relation on the integers by \\(x \\sim y \\iff x \\equiv y \\pmod{q}\\). Prove three things: (1) \\(\\sim\\) is an equivalence relation; (2) \\(\\sim\\) is compatible with addition: if \\(a \\equiv b \\pmod{q}\\) and \\(c \\equiv d \\pmod{q}\\) then \\(a+c \\equiv b+d \\pmod{q}\\); (3) \\(\\sim\\) is compatible with powers: if \\(a \\equiv b \\pmod{q}\\) then \\(a^k \\equiv b^k \\pmod{q}\\) for every natural number \\(k\\).\n\n## What to do\n\n`Solution.lean` in the working directory states 3 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 3 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 relation is reflexive, symmetric and transitive. -/\ntheorem rel_equiv (q : ℤ) :\n Equivalence (fun x y : ℤ => x ≡ y [ZMOD q]) := by\n sorry\n\n/-- The relation is compatible with addition. -/\ntheorem rel_add (q a b c d : ℤ) (h1 : a ≡ b [ZMOD q]) (h2 : c ≡ d [ZMOD q]) :\n a + c ≡ b + d [ZMOD q] := by\n sorry\n\n/-- The relation is compatible with taking powers. -/\ntheorem rel_pow (q a b : ℤ) (k : ℕ) (h : a ≡ b [ZMOD q]) :\n a ^ k ≡ b ^ k [ZMOD q] := by\n sorry\n", "path": "tasks/logic-and-sets/logic-and-sets-relations-d3-e0007"} {"id": "logic-and-sets-set_identities-d3-e0008", "env": "logic-and-sets", "msc": "03", "family": "set_identities", "difficulty": 3, "seed": 10008, "kind": "prove", "instruction": "# Prove an identity between sets\n\nProve the following.\n\nLet \\(h : \\alpha \\to \\beta\\) be a function that is injective and let \\(T, S\\) be subsets of \\(\\alpha\\). Write \\(h(X)\\) for the image and \\(h^{-1}(X)\\) for the preimage of a set \\(X\\). Prove \\[h^{-1}(h(T)) \\cap S = T \\cap S.\\]\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/-- The stated statement about images and preimages. -/\ntheorem image_identity {α β : Type*} (h : α → β) (T S : Set α) (hf : Function.Injective h) :\n h ⁻¹' (h '' T) ∩ S = T ∩ S := by\n sorry\n", "path": "tasks/logic-and-sets/logic-and-sets-set_identities-d3-e0008"} {"id": "logic-and-sets-finset_card-d1-e0009", "env": "logic-and-sets", "msc": "03", "family": "finset_card", "difficulty": 1, "seed": 10009, "kind": "prove", "instruction": "# Prove a cardinality fact about finite sets\n\nProve the following.\n\nLet \\(f(x) = 5x + 3\\) on the natural numbers and let \\(s, t\\) be finite sets of natural numbers. Prove that the product \\(f(s) \\times t\\) has \\(|s| \\cdot |t|\\) elements.\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 cardinality fact about finite sets. -/\ntheorem card_fact (s t : Finset ℕ) :\n ((s.image (fun x : ℕ => 5 * x + 3)) ×ˢ t).card = s.card * t.card := by\n sorry\n", "path": "tasks/logic-and-sets/logic-and-sets-finset_card-d1-e0009"} {"id": "logic-and-sets-relations-d1-e0010", "env": "logic-and-sets", "msc": "03", "family": "relations", "difficulty": 1, "seed": 10010, "kind": "prove", "instruction": "# Prove properties of a relation\n\nProve the following.\n\nOn the integers define \\(x \\sim y \\iff 7 \\mid x - y\\). Prove that \\(\\sim\\) is an equivalence relation.\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/-- The relation is reflexive, symmetric and transitive. -/\ntheorem rel_equiv :\n Equivalence (fun x y : ℤ => 7 ∣ x - y) := by\n sorry\n", "path": "tasks/logic-and-sets/logic-and-sets-relations-d1-e0010"} {"id": "logic-and-sets-set_identities-d1-e0011", "env": "logic-and-sets", "msc": "03", "family": "set_identities", "difficulty": 1, "seed": 10011, "kind": "prove", "instruction": "# Prove an identity between sets\n\nProve the following.\n\nLet \\(B, A, C\\) be subsets of a type \\(\\alpha\\). Prove the set identity \\[(A \\setminus B)^{c} = A^{c} \\cup B.\\]\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/-- The stated identity between sets. -/\ntheorem set_identity {α : Type*} (B A C : Set α) :\n (A \\ B)ᶜ = Aᶜ ∪ B := by\n sorry\n", "path": "tasks/logic-and-sets/logic-and-sets-set_identities-d1-e0011"} {"id": "logic-and-sets-finset_card-d2-e0012", "env": "logic-and-sets", "msc": "03", "family": "finset_card", "difficulty": 2, "seed": 10012, "kind": "prove", "instruction": "# Prove a cardinality fact about finite sets\n\nProve the following.\n\nLet \\(f(x) = 5x + 8\\) on the natural numbers and let \\(s, t\\) be finite sets of natural numbers. Prove that \\[|f(s \\cup t)| + |f(s \\cap t)| = |s| + |t|.\\]\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 cardinality fact about finite sets. -/\ntheorem card_fact (s t : Finset ℕ) :\n ((s ∪ t).image (fun x : ℕ => 5 * x + 8)).card + ((s ∩ t).image (fun x : ℕ => 5 * x + 8)).card = s.card + t.card := by\n sorry\n", "path": "tasks/logic-and-sets/logic-and-sets-finset_card-d2-e0012"} {"id": "logic-and-sets-relations-d2-e0013", "env": "logic-and-sets", "msc": "03", "family": "relations", "difficulty": 2, "seed": 10013, "kind": "prove", "instruction": "# Prove properties of a relation\n\nProve the following.\n\nOn the integers define \\(x \\sim y \\iff 12 \\mid x^{4} - y^{4}\\). Prove that \\(\\sim\\) is an equivalence relation.\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/-- The relation is reflexive, symmetric and transitive. -/\ntheorem rel_equiv :\n Equivalence (fun x y : ℤ => 12 ∣ x ^ 4 - y ^ 4) := by\n sorry\n", "path": "tasks/logic-and-sets/logic-and-sets-relations-d2-e0013"} {"id": "logic-and-sets-set_identities-d2-e0014", "env": "logic-and-sets", "msc": "03", "family": "set_identities", "difficulty": 2, "seed": 10014, "kind": "prove", "instruction": "# Prove an identity between sets\n\nProve the following.\n\nLet \\(f : \\alpha \\to \\beta\\) be a function and let \\(T\\) be subsets of \\(\\beta\\). Write \\(f(X)\\) for the image and \\(f^{-1}(X)\\) for the preimage of a set \\(X\\). Prove \\[f(f^{-1}(T)) = T \\cap \\operatorname{range} f.\\]\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/-- The stated statement about images and preimages. -/\ntheorem image_identity {α β : Type*} (f : α → β) (T : Set β) :\n f '' (f ⁻¹' T) = T ∩ Set.range f := by\n sorry\n", "path": "tasks/logic-and-sets/logic-and-sets-set_identities-d2-e0014"} {"id": "logic-and-sets-finset_card-d3-e0015", "env": "logic-and-sets", "msc": "03", "family": "finset_card", "difficulty": 3, "seed": 10015, "kind": "prove", "instruction": "# Prove a cardinality fact about finite sets\n\nProve the following.\n\nLet \\(f(x) = 4x + 2\\) on the natural numbers and let \\(s, t\\) be disjoint finite sets of natural numbers. Prove that \\(|f(s \\cup t)| = |s| + |t|\\).\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 cardinality fact about finite sets. -/\ntheorem card_fact (s t : Finset ℕ) (h : Disjoint s t) :\n ((s ∪ t).image (fun x : ℕ => 4 * x + 2)).card = s.card + t.card := by\n sorry\n", "path": "tasks/logic-and-sets/logic-and-sets-finset_card-d3-e0015"} {"id": "logic-and-sets-relations-d3-e0016", "env": "logic-and-sets", "msc": "03", "family": "relations", "difficulty": 3, "seed": 10016, "kind": "prove", "instruction": "# Prove properties of a relation\n\nProve the following.\n\nFor an integer \\(m\\), define a relation on the integers by \\(x \\sim y \\iff m \\mid x - y\\). Prove three things: (1) \\(\\sim\\) is an equivalence relation; (2) \\(\\sim\\) is compatible with addition: if \\(m \\mid a - b\\) and \\(m \\mid c - d\\) then \\(m \\mid (a+c) - (b+d)\\); (3) \\(\\sim\\) is compatible with multiplication: if \\(m \\mid a - b\\) and \\(m \\mid c - d\\) then \\(m \\mid ac - bd\\).\n\n## What to do\n\n`Solution.lean` in the working directory states 3 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 3 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 relation is reflexive, symmetric and transitive. -/\ntheorem rel_equiv (m : ℤ) :\n Equivalence (fun x y : ℤ => m ∣ x - y) := by\n sorry\n\n/-- The relation is compatible with addition. -/\ntheorem rel_add (m a b c d : ℤ) (h1 : m ∣ a - b) (h2 : m ∣ c - d) :\n m ∣ (a + c) - (b + d) := by\n sorry\n\n/-- The relation is compatible with multiplication. -/\ntheorem rel_mul (m a b c d : ℤ) (h1 : m ∣ a - b) (h2 : m ∣ c - d) :\n m ∣ a * c - b * d := by\n sorry\n", "path": "tasks/logic-and-sets/logic-and-sets-relations-d3-e0016"} {"id": "logic-and-sets-set_identities-d3-e0017", "env": "logic-and-sets", "msc": "03", "family": "set_identities", "difficulty": 3, "seed": 10017, "kind": "prove", "instruction": "# Prove an identity between sets\n\nProve the following.\n\nLet \\(Y, A, C\\) be subsets of a type \\(\\alpha\\). Assume that \\(C \\subseteq Y\\). Prove the set identity \\[(A \\setminus (Y \\cup A)) \\cup C = (Y^{c} \\cup (Y \\setminus C))^{c}.\\]\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/-- The stated identity between sets. -/\ntheorem set_identity {α : Type*} (Y A C : Set α) (h : C ⊆ Y) :\n (A \\ (Y ∪ A)) ∪ C = (Yᶜ ∪ (Y \\ C))ᶜ := by\n sorry\n", "path": "tasks/logic-and-sets/logic-and-sets-set_identities-d3-e0017"} {"id": "logic-and-sets-finset_card-d1-e0018", "env": "logic-and-sets", "msc": "03", "family": "finset_card", "difficulty": 1, "seed": 10018, "kind": "prove", "instruction": "# Prove a cardinality fact about finite sets\n\nProve the following.\n\nLet \\(f(x) = 2x + 6\\) on the natural numbers and let \\(s, t\\) be finite sets of natural numbers. Prove that the product \\(f(s) \\times t\\) has \\(|s| \\cdot |t|\\) elements.\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 cardinality fact about finite sets. -/\ntheorem card_fact (s t : Finset ℕ) :\n ((s.image (fun x : ℕ => 2 * x + 6)) ×ˢ t).card = s.card * t.card := by\n sorry\n", "path": "tasks/logic-and-sets/logic-and-sets-finset_card-d1-e0018"} {"id": "logic-and-sets-relations-d1-e0019", "env": "logic-and-sets", "msc": "03", "family": "relations", "difficulty": 1, "seed": 10019, "kind": "prove", "instruction": "# Prove properties of a relation\n\nProve the following.\n\nOn the integers define \\(x \\sim y \\iff x \\bmod 9 = y \\bmod 9\\). Prove that \\(\\sim\\) is an equivalence relation.\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/-- The relation is reflexive, symmetric and transitive. -/\ntheorem rel_equiv :\n Equivalence (fun x y : ℤ => x % 9 = y % 9) := by\n sorry\n", "path": "tasks/logic-and-sets/logic-and-sets-relations-d1-e0019"} {"id": "logic-and-sets-set_identities-d1-e0020", "env": "logic-and-sets", "msc": "03", "family": "set_identities", "difficulty": 1, "seed": 10020, "kind": "prove", "instruction": "# Prove an identity between sets\n\nProve the following.\n\nLet \\(C, T, B\\) be subsets of a type \\(\\alpha\\). Prove the set identity \\[T \\cup (B \\cap C) = (T \\cup B) \\cap (T \\cup C).\\]\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/-- The stated identity between sets. -/\ntheorem set_identity {α : Type*} (C T B : Set α) :\n T ∪ (B ∩ C) = (T ∪ B) ∩ (T ∪ C) := by\n sorry\n", "path": "tasks/logic-and-sets/logic-and-sets-set_identities-d1-e0020"} {"id": "logic-and-sets-finset_card-d2-e0021", "env": "logic-and-sets", "msc": "03", "family": "finset_card", "difficulty": 2, "seed": 10021, "kind": "prove", "instruction": "# Prove a cardinality fact about finite sets\n\nProve the following.\n\nLet \\(f(x) = 2x + 6\\) on the natural numbers and let \\(s, t\\) be finite sets of natural numbers. Prove that \\[|f(s \\setminus t)| + |s \\cap t| = |s|.\\]\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 cardinality fact about finite sets. -/\ntheorem card_fact (s t : Finset ℕ) :\n ((s \\ t).image (fun x : ℕ => 2 * x + 6)).card + (s ∩ t).card = s.card := by\n sorry\n", "path": "tasks/logic-and-sets/logic-and-sets-finset_card-d2-e0021"} {"id": "logic-and-sets-relations-d2-e0022", "env": "logic-and-sets", "msc": "03", "family": "relations", "difficulty": 2, "seed": 10022, "kind": "prove", "instruction": "# Prove properties of a relation\n\nProve the following.\n\nOn pairs of natural numbers define \\((x_1, y_1) \\sim (x_2, y_2) \\iff x_1 + 6 y_2 = x_2 + 6 y_1\\). Prove that \\(\\sim\\) is an equivalence relation.\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/-- The relation is reflexive, symmetric and transitive. -/\ntheorem rel_equiv :\n Equivalence (fun p q : ℕ × ℕ => p.1 + 6 * q.2 = q.1 + 6 * p.2) := by\n sorry\n", "path": "tasks/logic-and-sets/logic-and-sets-relations-d2-e0022"} {"id": "logic-and-sets-set_identities-d2-e0023", "env": "logic-and-sets", "msc": "03", "family": "set_identities", "difficulty": 2, "seed": 10023, "kind": "prove", "instruction": "# Prove an identity between sets\n\nProve the following.\n\nLet \\(h : \\alpha \\to \\beta\\) be a function that is injective and let \\(B\\) be subsets of \\(\\alpha\\). Write \\(h(X)\\) for the image and \\(h^{-1}(X)\\) for the preimage of a set \\(X\\). Prove \\[h^{-1}(h(B)) = B.\\]\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/-- The stated statement about images and preimages. -/\ntheorem image_identity {α β : Type*} (h : α → β) (B : Set α) (hf : Function.Injective h) :\n h ⁻¹' (h '' B) = B := by\n sorry\n", "path": "tasks/logic-and-sets/logic-and-sets-set_identities-d2-e0023"}