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

instrument / verified-with-binding-errata

Prime Checker & Generator (Sieve)

The current ledger marks this instrument verified with errata that must be applied at binding time.

Status: VERIFIED_WITH_ERRATALifecycle: verified-with-binding-errata

Inspectable records

Ledger state

The current ledger marks this instrument verified with errata that must be applied at binding time.

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-045
Ledger rows
1

No ledger note is attached.

Review findings

The named algorithms are standard, but the specification is incomplete for a deterministic, testable instrument contract. Exact Miller-Rabin bases/rounds, range endpoint semantics, nth-prime indexing, twin-prime output semantics, integer-size limits, and invalid-input behavior must be defined before approval.

Formula and scope findings

  • Miller-Rabin is a valid probabilistic primality algorithm, but the spec does not define the witness-base selection, number of rounds, failure probability, or behavior for small n.
  • The sieve formula is named but not fully specified: the implementation must mark composites using prime factors up to floor(sqrt(maximum range endpoint)) and define whether endpoints are included.
  • No formula or algorithm is specified for nth-prime generation; indexing is ambiguous because nth prime could be 0-based or 1-based.
  • No formula or algorithm is specified for twin-prime finding, including whether the output is pairs, individual primes, or only a boolean and how range boundaries are handled.
  • The honest label correctly states that Miller-Rabin is probabilistic for sufficiently large numbers, but it should also identify any deterministic numeric range or the selected bases and error bound.

Unit assumptions

  • Inputs are mathematical integers, dimensionless; non-integers and non-finite values must be rejected.
  • For these vectors, a range [a,b] is assumed to be inclusive at both endpoints; the spec does not state whether ranges are inclusive or exclusive.
  • For these vectors, nth-prime indexing is assumed to be 1-based, so the 1st prime is 2; the spec does not state the indexing convention.
  • For JavaScript numeric inputs, exact integer representation is assumed only through 2^53-1 unless arbitrary-precision integers are used; this constraint is not stated.

Boundary hardening

BREAK_CLAIMED · SELF_FLAGGED

The extreme integer 9007199254740993 cannot be represented exactly by ordinary JavaScript Number arithmetic and silently rounds to 9007199254740992. Accepting it without rejection or exact-integer handling can invalidate primality and range results. The range endpoint convention is also ambiguous unless explicitly defined.

Errata and corrections

Tranche errata

classification · vector 1

composite

neither prime nor composite

1 is a unit — neither prime nor composite

Inspectable example

4 review vectors are recorded. One source-bound sample is shown below.

{
  "inputs": {
    "operation": "primality_test",
    "n": 1
  },
  "expected_outputs": {
    "prime": false,
    "classification": "composite"
  },
  "working": "1 is less than 2. By definition, primes are integers greater than 1. Therefore 1 is not prime and the result is composite/non-prime."
}

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_WITH_ERRATA
  • evidence-tranche4/tranche4-results.json
  • BOUNDARY_HAZARD_CATALOG.json