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

instrument implementation / implementation-contract

Primality Tester implementation

A source-bound implementation contract for Primality Tester; deployment and executable qualification remain separate.

Status: VERIFIED_CLEANLifecycle: 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-clean
Evidence ID
t4-124
Effect
Computation or source lookup only

Input and validation requirements

The mathematical checks have clear expected behavior, but the specification leaves the Miller-Rabin/trial-division cutover and negative-integer convention unspecified. An implementation could route boundary-sized values inconsistently, return an undefined result for negative inputs, or silently test the absolute value of a negative input.

Required corrections

No binding erratum is attached to this unique-name record. Implementers must still preserve the declared units, domain, and failure behavior.

Inspectable interface fixture

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

{
  "inputs": {
    "n": "29",
    "method": "trial_division"
  },
  "expected_outputs": {
    "verdict": "prime",
    "confidence": "exact (100%)",
    "small_factors": []
  },
  "working": "floor(sqrt(29)) = 5 because 5^2 = 25 and 6^2 = 36. Test divisors 2, 3, and 5: 29 mod 2 = 1, 29 mod 3 = 2, and 29 mod 5 = 4. No divisor is found through 5, so 29 is prime. Factor list = []."
}

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