Fix 10 failing goodman-1.6 statements based on Lean compiler diagnostics

All 21 statements in datasets/goodman-1.6.jsonl now elaborate cleanly
(verified locally via check_statements.py, 11/21 passing before this
change). Fixes applied, one per failing id:

- goodman-1-6-7: single-binder existential-unique over a pair (qr : ZxZ)
  instead of the invalid two-binder 'exists unique' form.
- goodman-1-6-10: rewrote set-builder notation to the explicit
  {v | exists a b, v = ...} form.
- goodman-1-6-11: replaced 'let d := ... in ...' with the required
  semicolon form 'let d := ...; ...', and added the missing Nat-to-Int
  casts on d.
- goodman-1-6-17: added explicit Nat-to-Int coercions on the three
  divisibility relations.
- goodman-1-6-18: changed p from Z to N (Nat.Prime requires N), added
  casts, and replaced the nonexistent Int.Coprime with IsCoprime.
- goodman-1-6-19: changed p from Z to N and added the matching casts.
- goodman-1-6-20: changed p from Z to N, added casts, and fixed the
  quantifier structure so the prime-divides-product hypothesis is not
  nested inside the per-element forall.
- goodman-1-6-23: replaced the Fin n literal comparison 'j = 0' (which
  needs a NeZero instance) with 'j.val = 0'.
- goodman-1-6-24: replaced the invalid bare '(*)' operator section with
  '(fun x y => x * y)'-equivalent '(. * .)', and replaced the
  nonexistent GCD.gcd with an explicit existential statement of the gcd
  property (divides every element; every common divisor divides it).
- goodman-1-6-26: replaced the nonexistent Int.Coprime with IsCoprime.

Also corrected the three parallel hallucinated Mathlib refs in
textbook/goodman-1.6.definitions.json (Int.Coprime, GCD.gcd,
Int.PairwiseCoprime -> IsCoprime, null with notes, and
List.Pairwise IsCoprime respectively), since the Lean compiler confirms
none of the original names exist.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017vbLFFJiHSZqGZHEkjvG5x
This commit is contained in:
2026-09-18 16:50:34 +00:00
parent f98cb41f72
commit 79c728567a
2 changed files with 16 additions and 16 deletions
+6 -6
View File
@@ -16,22 +16,22 @@
{
"label": "Definition 1.6.14",
"concept": "relatively prime integers",
"mathlib_ref": "Int.Coprime",
"mathlib_ref": "IsCoprime",
"lean_code": null,
"notes": "The definition in the book is consistent with Mathlib's definition of coprime integers."
"notes": "Corrected from an earlier hallucinated `Int.Coprime` (no such constant exists). Mathlib's `IsCoprime a b` (in a commutative semiring, so usable for ℤ) captures relative primality via Bezout-style coefficients and is definitionally the right notion here."
},
{
"label": "Definition 1.6.22",
"concept": "greatest common divisor (gcd) of several integers",
"mathlib_ref": "GCD.gcd",
"mathlib_ref": null,
"lean_code": null,
"notes": "The definition in the book is consistent with Mathlib's generalization of gcd to multiple integers."
"notes": "Corrected from an earlier hallucinated `GCD.gcd` (no such constant exists). Mathlib has no single ready-made 'gcd of a `List ℤ`' constant matching the book's definition verbatim; the pipeline instead states the gcd's defining property directly as an explicit existential (d divides every element, and every common divisor divides d) in the corresponding bench statement (goodman-1-6-24) rather than invoking a nonexistent name."
},
{
"label": "Definition 1.6.25",
"concept": "pairwise relatively prime integers",
"mathlib_ref": "Int.PairwiseCoprime",
"mathlib_ref": "List.Pairwise IsCoprime",
"lean_code": null,
"notes": "The definition in the book is consistent with Mathlib's definition of pairwise coprime integers."
"notes": "Corrected from an earlier hallucinated `Int.PairwiseCoprime` (no such constant exists). Pairwise relative primality of a list is expressed as `List.Pairwise IsCoprime as` (or `List.Pairwise (IsCoprime ·) as`), combining the general `List.Pairwise` relation with `IsCoprime`, rather than via a single dedicated name."
}
]