Guth
NewsDocs
Page actions
View as Markdown ↗
Explore MCP tools ↗

instrument mechanism / verified-clean

GCD/LCM Calculator mechanism

The inspectable method record for GCD/LCM Calculator, kept separate from implementation and qualification.

Status: VERIFIED_CLEANLifecycle: verified-clean

Model scope

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.

  • 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).

Units and conventions

  • 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.

Inspectable vector

One of 4 source-bound review vectors:

{
  "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."
}

Failure boundary

  • 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.

Other records

Sources and evidence

These pointers bind the page to evidence. They do not grant authority or collapse verification into deployment.

  • VERIFIED_LEDGER.json
  • evidence-tranche4/tranche4-results.json