Source: https://guthlabs.ai/docs/instruments/diophantine-equation-solver-linear/implementation/

instrument implementation / implementation-contract

# Diophantine Equation Solver (linear) implementation

A source-bound implementation contract for Diophantine Equation Solver (linear); deployment and executable qualification remain separate.

Status: **VERIFIED_WITH_ERRATA**Lifecycle: **implementation-contract**

## Binding contract

This record describes what an executable surface must bind and validate. It does not claim that a public calculator, package, or production route is deployed.

**Record owner**: Guth Instruments

**Lifecycle**: verified-with-binding-errata

**Evidence ID**: t4-081

**Effect**: Computation or source lookup only

## Input and validation requirements

The zero-coefficient boundary is solvable and must preserve a free variable, while the (0,0,1) input makes gcd(0,0) undefined and requires explicit rejection. A naive implementation that divides by gcd without guarding this case can fail or return invalid output.

## Required corrections

````
[
  {
    "vector": 4,
    "field": "general_solution",
    "wrong": "x=9t, y=2, t in Z",
    "correct": "x=t (x free), y=2",
    "cause": "b/d=9/9=1; x=9t wrongly excludes valid solutions like x=1"
  }
]
````

## Inspectable interface fixture

The sample below is evidence for interface and validation tests, not a production implementation.

````
{
  "inputs": {
    "a": 15,
    "b": 21,
    "c": 6
  },
  "expected_outputs": {
    "gcd": 3,
    "exists": true,
    "particular": {
      "x0": -1,
      "y0": 1
    },
    "general_solution": "x=-1+7t, y=1-5t, t in Z"
  },
  "working": "gcd calculation: 21=1*15+6; 15=2*6+3; 6=2*3+0, so d=3. A particular solution is x0=-1, y0=1: 15*(-1)+21*(1)=-15+21=6. General solution: x=x0+(b/d)t=-1+(21/3)t=-1+7t; y=y0-(a/d)t=1-(15/3)t=1-5t, with t an integer."
}
````

## Other records

[01**Overview**](<https://guthlabs.ai/docs/instruments/diophantine-equation-solver-linear/>)[02**Mechanism**](<https://guthlabs.ai/docs/instruments/diophantine-equation-solver-linear/mechanism/>)[04**Qualification**](<https://guthlabs.ai/docs/instruments/diophantine-equation-solver-linear/qualification/>)

## 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`

- `tranche errata record`
