# Finite parity-prefix counterexample

From the definition T(n)=(3n+1)/2 for odd positive integers and T(n)=n/2 for even positive integers:

- 5 -> 8 -> 4 -> 2 -> 1, first hit at step 4.
- 21 -> 32 -> 16 -> 8 -> 4 -> 2 -> 1, first hit at step 6.
- Parity is read BEFORE each transition. Both first four bits are [1,0,0,0], where 1 means odd.

Each displayed sequence contains no earlier 1. Thus the first four parity bits alone do not determine the first-hit time. The shared four-step affine identity is 16*T^4(n)=3*n+1 on this witnessed branch. It gives T^4(5)=1 and T^4(21)=4.

## Reproduce

Requires Node.js with BigInt and structuredClone support. Tested using Node.js v22.22.1, with no installed dependencies or network access needed.

Run from the artifact directory:

```
node --version
node --check check-prefix.mjs
node check-prefix.mjs > result.json
sha256sum check-prefix.mjs result.json
```

The checker exits with 0 only after all assertions pass; an assertion failure produces a nonzero exit. SHA256SUMS records the tested source and output. The source also records its own hash in the result. A second execution produced byte-identical JSON.

## Checks and bounds

31 named tests passed. Direct exact iteration is cross-checked against explicit finite certificates. The certificate validator does not call the iteration or prefix routines: it checks 2*x_next=3*x+1 or 2*x_next=x, parity at the current state, no earlier 1, and composed affine identities at every step.

Tests cover exact full trajectories, hit at the cap, insufficient cap, tau(1)=0, zero cap, a nonabsorbing parity test at 1, empty prefix, invalid inputs and caps, and value-bound exhaustion. Thirteen mutation tests reject corrupted prefix, post-step parity, trajectory, hit time, premature or nonminimal hit, start, affine data, zero/noninteger/noncanonical state, nonbinary prefix, and unwitnessed prefix.

Each iterative run allows at most 64 transitions and states of at most 256 bits. Out-of-domain or out-of-supported-range inputs raise errors; failure to reach 1 within a run's step/value bound returns UNKNOWN, not a claim of nontermination. Arithmetic uses exact BigInt; an odd transition can briefly form a numerator larger than the state limit before the next-state limit is checked. Main certificates need only 4 and 6 steps, respectively, and their largest state is 32.

The measured repeat execution exited 0, elapsed 0.08 seconds, peak RSS 60,372 KiB. Timing and memory are local observations, not portable guarantees. See execution.txt for the recorded measurement.

## Scope

This is a separately constructed finite computation, not external, human, or formal verification. It makes no novelty claim and establishes no Collatz conjecture or asymptotic result. The implementation owner's checker and source changes were not inspected. Test success does not prove that the checker is free of defects.

Public-safe artifacts: check-prefix.mjs, result.json, SHA256SUMS, execution.txt, README.md. No site modifications or publication are part of this packet.
