Page actions
instrument / verified-clean
GCD/LCM Calculator
The current ledger marks this instrument verified clean within the source-bound verification corpus.
Inspectable records
Ledger state
The current ledger marks this instrument verified clean within the source-bound verification corpus.
- Area
- Mathematics — arithmetic through advanced (algebra, matrices, calculus, sequences/series, number theory, combinatorics, graphing, complex numbers, geometry, logic, sets)
- Tranche
- tranche-4
- Evidence ID
- t4-057
- Ledger rows
- 1
No ledger note is attached.
Review findings
Core Euclidean and extended-Euclidean methods are mathematically correct, but the specification is not complete enough for an unambiguous production instrument. The honest label should state accepted cardinality, integer-only validation, sign conventions, zero conventions, and how coefficients are returned for 2+ inputs.
Formula and scope findings
- The stated Euclidean algorithm correctly supports GCD computation, and the extended Euclidean algorithm correctly supports Bezout coefficients.
- The LCM formula is not explicitly specified. For two integers, use lcm(a,b)=|ab|/gcd(a,b), with a zero-result convention; for multiple integers, apply lcm iteratively or define an equivalent general rule.
- For 2+ integers, the meaning and ordering of multiple Bezout coefficients is not explicitly defined; they should satisfy a1*c1+...+an*cn=GCD(a1,...,an).
Unit assumptions
- All inputs are mathematical integers with no physical units.
- GCD is assumed to be the nonnegative greatest common divisor, including gcd(0,n)=|n|.
- LCM is assumed to be nonnegative, including lcm(0,n)=0 and lcm(0,0)=0 if all inputs are zero.
- For multiple inputs, Bezout coefficients correspond positionally to the input list and satisfy the linear combination equal to the positive GCD.
Boundary hardening
Recorded hazards
- Division by zero must be prevented when implementing lcm(a,b)=|ab|/gcd(a,b); the all-zero case requires an explicit convention.
- An empty input list is invalid and must be rejected because GCD, LCM, and Bezout coefficients are undefined without an agreed empty-list convention.
- A single integer conflicts with the stated 2+ input requirement and should be rejected or explicitly supported.
- Inputs must be validated as integers; fractional, NaN, infinity, and nonnumeric values are invalid.
- For multiple integers, naive multiplication can overflow fixed-width numeric types; arbitrary-precision integers or overflow-safe arithmetic may be required.
- Negative-input behavior must be specified, especially the sign of GCD and LCM and the nonuniqueness of Bezout coefficients.
- The all-zero input list needs an explicit policy: gcd(0,...,0) is commonly defined as 0, while Bezout coefficients are nonunique and the LCM convention varies.
Errata and corrections
No applied erratum is attached to this unique-name record.
Inspectable example
4 review vectors are recorded. One source-bound sample is shown below.
{
"inputs": {
"integers": [
84,
30
]
},
"expected_outputs": {
"gcd": 6,
"lcm": 420,
"bezout_coefficients": [
-1,
3
]
},
"working": "84 = 2*30 + 24; 30 = 1*24 + 6; therefore gcd = 6. Back-substitute: 6 = 30 - 24 = 30 - (84 - 2*30) = -1*84 + 3*30, so coefficients are [-1,3]. lcm = |84*30|/6 = 2520/6 = 420."
}Related workflows
Sources and evidence
These pointers bind the page to evidence. They do not grant authority or collapse verification into deployment.
VERIFIED_LEDGER.json · VERIFIED_CLEANevidence-tranche4/tranche4-results.json