Files
lean-bench/textbook/goodman-1.6.raw.jsonl
T
claude-bot f98cb41f72 Run textbook pipeline pilot on section 1.6 (Divisibility in the Integers)
Generated with formalize.py against Qwen (qwen-max via DashScope), then hand-fixed
before pushing, since these classes of bug pass elaboration but are still wrong and
check_statements.py can't catch them without running Lean:

- goodman-1-6-2 split into 4 separate theorems (1-6-2-a..d): the model's single
  merged statement had an operator-precedence bug (missing parens around an
  implicit right-associated AND after OR) that silently scoped 3 of the book's 4
  independent claims inside the wrong disjunct.
- goodman-1-6-1: dropped two vacuous "x + y : Nat is a Nat" clauses that confused
  Lean's type membership with set membership (element-of Nat on already-Nat-typed
  variables) and are automatically true by typing anyway.
- goodman-1-6-9: swapped Mathlib's pointwise Set multiplication (x * I, which needs
  'open scoped Pointwise' and is easy to get subtly wrong) for the equivalent
  elementwise statement.
- goodman-1-6-13: replaced a misuse of min (a 2-argument function) applied to a Set
  with Mathlib's IsLeast predicate, matching what "least element" means in
  Int.gcd's characterization.
- goodman-1-6-23: fixed Matrix index types (Fin n, not a bare Nat) and replaced an
  illegal literal '...' row with Matrix.vecMul; verified against the book's raw
  text that the n-by-n unimodular-matrix formulation is faithful, not a model
  invention.

textbook/goodman-1.6.raw.jsonl keeps the unedited model output for reference. The
remaining 13 statements are unedited and still need a real Lean elaboration pass
(check_statements.py) plus a provability run (lean-bench) on a Mathlib-backed
project -- neither ran here since this sandbox has no Lean.
2026-09-17 17:11:40 +00:00

19 lines
9.7 KiB
JSON
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
{"id": "goodman-1-6-1", "source_label": "Proposition 1.6.1", "kind": "proposition", "statement": "∀ (a b c : ℤ), (a + b = b + a) ∧ (a + (b + c) = (a + b) + c) ∧ (0 + a = a) ∧ (a + (-a) = 0) ∧ (a * b = b * a) ∧ (a * (b * c) = (a * b) * c) ∧ (1 * a = a) ∧ (a * (b + c) = a * b + a * c) ∧ (∀ (x y : ℕ), x + y ∈ ℕ) ∧ (∀ (x y : ℕ), x * y ∈ ℕ) ∧ (∀ (x y : ℤ), x * y ≠ 0 → x ≠ 0 ∧ y ≠ 0)", "prelude": "import Mathlib", "natural_language": "Addition and multiplication on the integers are commutative and associative, 0 and 1 are identity elements for addition and multiplication respectively, the distributive law holds, the sum and product of positive integers are positive, and the product of non-zero integers is non-zero.", "requires": ["Int.add_comm", "Int.add_assoc", "Int.zero_add", "Int.add_left_neg", "Int.mul_comm", "Int.mul_assoc", "Int.one_mul", "Int.mul_add", "Nat.add_pos", "Nat.mul_pos", "Int.mul_ne_zero"], "include_in_bench": true, "exclude_reason": null}
{"id": "goodman-1-6-2", "source_label": "Proposition 1.6.2", "kind": "proposition", "statement": "∀ (u v : ℤ), u * v = 1 → (u = 1 ∧ v = 1) ∨ (u = -1 ∧ v = -1) ∧ ∀ (a b : ℤ), a ∣ b ∧ b ∣ a → a = b ∨ a = -b ∧ ∀ (a b c : ℤ), a ∣ b ∧ b ∣ c → a ∣ c ∧ ∀ (a b c s t : ℤ), a ∣ b ∧ a ∣ c → a ∣ (s * b + t * c)", "prelude": "import Mathlib", "natural_language": "If the product of two integers is 1, then both integers are either 1 or -1. If an integer divides another and vice versa, then they are equal or negatives of each other. Divisibility is transitive. If an integer divides two other integers, it divides any linear combination of them.", "requires": ["Int.mul_eq_one_iff", "Int.dvd_antisymm", "Int.dvd_trans", "Int.dvd_linear_combination"], "include_in_bench": true, "exclude_reason": null}
{"id": "goodman-1-6-4", "source_label": "Proposition 1.6.4", "kind": "proposition", "statement": "∀ (n : ℕ), n > 1 → ∃ (p : ℕ) (h : Nat.Prime p), p ∣ n", "prelude": "import Mathlib", "natural_language": "Any natural number greater than 1 can be written as a product of prime numbers.", "requires": ["Nat.exists_prime_factor"], "include_in_bench": true, "exclude_reason": null}
{"id": "goodman-1-6-6", "source_label": "Theorem 1.6.6", "kind": "theorem", "statement": "∃ (p : ℕ → ℕ), ∀ (n : ℕ), Nat.Prime (p n) ∧ ∀ (i j : ℕ), i ≠ j → p i ≠ p j", "prelude": "import Mathlib", "natural_language": "There are infinitely many prime numbers.", "requires": ["Nat.infinite_primes"], "include_in_bench": true, "exclude_reason": null}
{"id": "goodman-1-6-7", "source_label": "Proposition 1.6.7", "kind": "proposition", "statement": "∀ (a d : ℤ), d ≥ 1 → ∃! (q r : ℤ), a = q * d + r ∧ 0 ≤ r < d", "prelude": "import Mathlib", "natural_language": "Given integers a and d with d ≥ 1, there exist unique integers q and r such that a = qd + r and 0 ≤ r < d.", "requires": ["Int.division_theorem"], "include_in_bench": true, "exclude_reason": null}
{"id": "goodman-1-6-9", "source_label": "Proposition 1.6.9", "kind": "proposition", "statement": "∀ (m n : ℤ), let I := {a * m + b * n | a b : ℤ} in (∀ (x y : I), x + y ∈ I) ∧ (∀ (x : I), -x ∈ I) ∧ (∀ (x : ℤ), x * I ⊆ I) ∧ (∀ (b : ℤ), b ∣ m ∧ b ∣ n → ∀ (z : I), b ∣ z)", "prelude": "import Mathlib", "natural_language": "For integers m and n, the set I(m, n) = {am + bn | a, b ∈ ℤ} is closed under addition, negation, and multiplication by any integer. If an integer b divides both m and n, then b divides every element of I(m, n).", "requires": ["Int.linear_combination_closure", "Int.linear_combination_div"], "include_in_bench": true, "exclude_reason": null}
{"id": "goodman-1-6-10", "source_label": "Lemma 1.6.10", "kind": "lemma", "statement": "∀ (m n d : ℤ), d ∣ m ∧ d ∣ n ∧ d ∈ {a * m + b * n | a b : ℤ} → ∀ (x : ℤ), x ∣ m ∧ x ∣ n → x ∣ d", "prelude": "import Mathlib", "natural_language": "If a natural number d is a common divisor of m and n and an element of I(m, n), then d is the greatest common divisor of m and n.", "requires": ["Int.gcd_is_greatest_common_divisor"], "include_in_bench": true, "exclude_reason": null}
{"id": "goodman-1-6-11", "source_label": "Proposition 1.6.11", "kind": "proposition", "statement": "∀ (m n : ℤ), m ≠ 0 ∧ n ≠ 0 → let d := Nat.gcd (Int.natAbs m) (Int.natAbs n) in d = Int.gcd m n ∧ d ∈ {a * m + b * n | a b : ℤ}", "prelude": "import Mathlib", "natural_language": "The natural number d, which is the greatest common divisor of the absolute values of m and n, is also the greatest common divisor of m and n, and d is an element of I(m, n).", "requires": ["Int.gcd_nat_abs", "Int.gcd_linear_combination"], "include_in_bench": true, "exclude_reason": null}
{"id": "goodman-1-6-13", "source_label": "Corollary 1.6.13", "kind": "corollary", "statement": "∀ (m n : ℤ), m ≠ 0 ∧ n ≠ 0 → let d := Int.gcd m n in d = min {x ∈ ℕ | x ∈ {a * m + b * n | a b : ℤ}} ∧ {a * m + b * n | a b : ℤ} = {k * d | k : ℤ}", "prelude": "import Mathlib", "natural_language": "The greatest common divisor d of m and n is the least element of N ∩ I(m, n), and I(m, n) is the set of all integer multiples of d.", "requires": ["Int.gcd_minimal", "Int.linear_combination_set"], "include_in_bench": true, "exclude_reason": null}
{"id": "goodman-1-6-15", "source_label": "Corollary 1.6.15", "kind": "corollary", "statement": "∀ (m n : ℤ), m ≠ 0 ∧ n ≠ 0 → Int.gcd m n = 1 ↔ ∃ (s t : ℤ), s * m + t * n = 1", "prelude": "import Mathlib", "natural_language": "Two nonzero integers m and n are relatively prime if and only if there exist integers s and t such that sm + tn = 1.", "requires": ["Int.coprime_iff_gcd_eq_one"], "include_in_bench": true, "exclude_reason": null}
{"id": "goodman-1-6-17", "source_label": "Corollary 1.6.17", "kind": "corollary", "statement": "∀ (a b : ℕ) (x : ℤ), Nat.Coprime a b ∧ a ∣ x ∧ b ∣ x → a * b ∣ x", "prelude": "import Mathlib", "natural_language": "If a and b are relatively prime natural numbers and both divide an integer x, then their product ab also divides x.", "requires": ["Nat.coprime_mul_dvd"], "include_in_bench": true, "exclude_reason": null}
{"id": "goodman-1-6-18", "source_label": "Proposition 1.6.18", "kind": "proposition", "statement": "∀ (p a : ℤ), Nat.Prime p ∧ a ≠ 0 → p ∣ a ∨ Int.Coprime p a", "prelude": "import Mathlib", "natural_language": "If p is a prime number and a is any nonzero integer, then either p divides a or p and a are relatively prime.", "requires": ["Int.prime_or_coprime"], "include_in_bench": true, "exclude_reason": null}
{"id": "goodman-1-6-19", "source_label": "Proposition 1.6.19", "kind": "proposition", "statement": "∀ (p a b : ℤ), Nat.Prime p ∧ a ≠ 0 ∧ b ≠ 0 → p ∣ a * b → p ∣ a ∨ p ∣ b", "prelude": "import Mathlib", "natural_language": "If p is a prime number and a and b are nonzero integers, and p divides the product ab, then p divides a or p divides b.", "requires": ["Int.prime_dvd_mul"], "include_in_bench": true, "exclude_reason": null}
{"id": "goodman-1-6-20", "source_label": "Corollary 1.6.20", "kind": "corollary", "statement": "∀ (p : ℤ) (as : List ℤ), Nat.Prime p ∧ ∀ (a : ℤ), a ∈ as → a ≠ 0 → p ∣ List.prod as → ∃ (a : ℤ), a ∈ as ∧ p ∣ a", "prelude": "import Mathlib", "natural_language": "If a prime number p divides a product of nonzero integers, then p divides one of the factors.", "requires": ["Int.prime_dvd_prod"], "include_in_bench": true, "exclude_reason": null}
{"id": "goodman-1-6-21", "source_label": "Theorem 1.6.21", "kind": "theorem", "statement": "∀ (n : ℕ), n > 1 → ∃! (ps : List ℕ), (∀ (p : ℕ), p ∈ ps → Nat.Prime p) ∧ n = List.prod ps", "prelude": "import Mathlib", "natural_language": "The prime factorization of a natural number is unique.", "requires": ["Nat.unique_prime_factorization"], "include_in_bench": true, "exclude_reason": null}
{"id": "goodman-1-6-23", "source_label": "Lemma 1.6.23", "kind": "lemma", "statement": "∀ (as : List ℤ), as.length ≥ 2 → (∀ (a : ℤ), a ∈ as → a ≠ 0) → ∃ (d : ℕ) (Q : Matrix ℤ as.length as.length), Q.det ≠ 0 ∧ Q.inverse.det ≠ 0 ∧ (d, 0, ..., 0) = (as[0], as[1], ..., as[as.length - 1]) * Q", "prelude": "import Mathlib", "natural_language": "Given a list of at least two nonzero integers, there exists a natural number d and an invertible integer matrix Q such that (d, 0, ..., 0) = (a1, a2, ..., an) * Q.", "requires": ["Matrix.int_matrix_gcd"], "include_in_bench": true, "exclude_reason": null}
{"id": "goodman-1-6-24", "source_label": "Proposition 1.6.24", "kind": "proposition", "statement": "∀ (as : List ℤ), as.length ≥ 2 → (∀ (a : ℤ), a ∈ as → a ≠ 0) → ∃ (d : ℕ) (cs : List ℤ), d = GCD.gcd as ∧ d = List.sum (List.zipWith (*) cs as)", "prelude": "import Mathlib", "natural_language": "The greatest common divisor of a list of at least two nonzero integers exists and is an integer linear combination of the integers in the list.", "requires": ["GCD.gcd_exists", "GCD.gcd_linear_combination"], "include_in_bench": true, "exclude_reason": null}
{"id": "goodman-1-6-26", "source_label": "Lemma 1.6.26", "kind": "lemma", "statement": "∀ (as : List ℤ) (z : ℤ), as.length ≥ 2 → (∀ (i j : ℕ), i ≠ j → i < as.length → j < as.length → Int.Coprime (as[i]) (as[j])) → (∀ (a : ℤ), a ∈ as → a ≠ 0) → (∀ (a : ℤ), a ∈ as → a ∣ z) → List.prod as ∣ z", "prelude": "import Mathlib", "natural_language": "If a list of integers is pairwise relatively prime and each integer in the list divides an integer z, then the product of the integers in the list also divides z.", "requires": ["Int.pairwise_coprime_mul_dvd"], "include_in_bench": true, "exclude_reason": null}