Skip to content
Vibe Math Lab.

Guide · Already building · In progress

When two implementations agree and are both wrong

Why two independent-looking programs are not actually independent when they share a library, a convention, or an assumption, and how to hunt for the shared step.

The standard advice for trusting a computed result is to write a second, independent implementation and check that it agrees with the first. This is good advice and it is not sufficient by itself, because "independent" is doing more work in that sentence than it usually gets credit for.

Two programs written by different people, in different languages, on different days, still agreed with each other on a wrong answer in a real case from this program's own record. They were not independent in the way that mattered: both shared a canonicalization step neither author thought to question, and that shared blind spot produced the same wrong number from two different code paths. Agreement felt like proof. It was actually evidence that a mistake was popular, not that it was absent.

The fix was not a third implementation. A fourth agreeing program would have hit the same wall for the same reason. What actually caught it was an external authority that owed nothing to either implementation: a published invariant, a known-correct value from somewhere outside the two agreeing programs, that the shared assumption could be checked against directly.

Start today: the next time two checks agree, spend one minute asking what they share before you accept the agreement as confirmation. A shared library, a shared convention for how an edge case gets handled, a shared assumption about input format. If you cannot name something the two checks do NOT share, go find or build an external anchor that does not depend on either.

First pass, not final

This entry is a first draft grounded in the program's real practice and incident record, awaiting Tyler's own rewrite before it's treated as finished, the same standard every piece of writing on this site and on Checkable holds to. Analysis and drafting assisted by Claude (Anthropic); every result independently verified by recomputation, external ground truth, or expert review.

← Back to the guide