the second hundred · metaphor 194

The Chinese
remainder theorem.

You are not the same person in every room. Softer at the family table, sharper at work, looser among old friends, careful with strangers — and no single one of these is the whole of you. Yet somehow they add up to exactly one person, and anyone who knows a few of them is sure they know who you are.

None of your selves is complete. The colleague has never seen you cry at a wedding; your mother has never watched you chair a meeting; the friend from twenty years ago knows a version of you the others would barely recognise. Each keeps only a partial view — what is left of you once their particular room has taken its slice. Compare their accounts and no two describe quite the same person.

But line the partial selves up and something surprising happens. The more genuinely different the rooms, the fewer people could possibly fit all of them at once. Enough independent angles, and the field of candidates narrows — until only one person is consistent with every account. The parts never contained the whole. Together they point, unmistakably, at a single you. There is a theorem about exactly this.

the numbers 0 … M−1 · each room's residue class is coloured · the value that fits every room glows

reconstructed x
product M = ∏ mᵢ
lcm of moduli
# solutions in 0…M−1
pairwise coprime?
reconstruction A · brute-force scan
reconstruction B · extended Euclid
Who you are in each room · set the remainder
Every number is scanned and reconstructed live — nothing is stored.
Which rooms · the set of moduli
Three independent rooms — remainders mod 3, mod 5, mod 7 — pin down exactly one number between 0 and 104.

The reconstruction

Small views, coprime, name one whole.

Take a number and hide it. Reveal only its remainders: what's left over when you divide by 3, by 5, by 7. Each remainder is a shadow — 2 mod 3 is shared by 2, 5, 8, 11, and infinitely many others; it names not a number but a whole residue class, an endless arithmetic progression. One shadow tells you almost nothing.

Now stack the shadows. The numbers that are 2 mod 3 and 3 mod 5 and 2 mod 7 at once are far rarer. The Chinese remainder theorem makes the count exact: if the divisors are pairwise coprime — sharing no common factor — then in every window of M = 3·5·7 = 105 consecutive numbers there is exactly one that fits all three. Not zero, not two. One. The residues, independent, reconstruct the whole they came from.

That is the whole engine. Each divisor mᵢ is a lens too coarse to resolve much on its own; but coprime lenses see different things, and enough of them together resolve a single value out of the product of their ranges. The partial views were never redundant — they were complementary, and their intersection is a point.

What to notice

Alone, ambiguous. Together, a point. Overlapping, broken.

Play with one room at a time. Drag a single remainder and watch its colour sweep through the grid as a regular stripe — every number in that class lights up. One room can never single you out; it always leaves a crowd. Now read across all the rooms: the one cell where every colour agrees is the reconstruction, and the panel proves it two ways — by scanning all 105 numbers and by the constructive Euclid algorithm — that land on the same value.

Then switch to the overlapping preset, {4, 6}. Now the divisors share the factor 2, and the guarantee dies. The window is 24 wide but the pattern really repeats every lcm = 12, so the rooms no longer cover M = 24 distinct combinations — only 12. Move the remainders and the solution count flips between two (the rooms agree about the shared factor, so they're redundant — two numbers fit) and zero (the rooms disagree about it, so they contradict — nothing fits). Uniqueness was never magic. It was independence.

The mapping

The rooms reconstruct the person.

Read each divisor as a context you live in — a job, a family, a friendship, a faith — and each remainder as who you are inside it: the compressed, partial self that context sees. No context holds the whole of you; each keeps only a residue, what survives its particular slicing. On its own, that residue fits countless people. The barista who knows your coffee order could be describing a thousand strangers.

The theorem's claim is that independence is what makes you legible. When your contexts are genuinely different — when the way you are at work is not merely an echo of the way you are at home — each new one cuts the field of possible people who could be all of them at once. Gather enough independent rooms and only one person survives every description. That is the quiet miracle of being known: no one holds all of you, yet together the people who hold pieces are holding, without any of them seeing it, exactly one you.

And it tells you precisely when the miracle fails. Contexts that are not independent — the friend group that is just your workplace after hours, the two accounts that only ever repeat each other — share a common factor. They add remainders without adding resolution. Redundant rooms leave you ambiguous; and rooms that demand contradictory selves leave no consistent person at all.

Read as life lessons

Three things the count keeps saying.

01

One angle is never you

A single remainder names a whole class, not a person — a residue, shared with an endless crowd. Anyone judging you from one room is holding a shadow and mistaking it for the object.

02

Difference is what resolves

Uniqueness comes from coprime views — ones that see genuinely different things. It is not the number of rooms that pins you down but how independent they are. New but redundant tells you nothing new.

03

Overlap breaks the whole

When contexts share a factor they either repeat each other — leaving you ambiguous — or demand incompatible selves — leaving no coherent person at all. Integration is a coprimality problem.

In the wild

Where remainders reassemble a whole.

CRYPTOGRAPHY

RSA decryption runs several times faster by splitting one huge computation into remainders modulo two coprime primes and recombining — the theorem is a load-bearing part of everyday secure traffic.

FAST ARITHMETIC

Residue number systems carry big integers as tuples of small remainders, so processors can add and multiply each coordinate in parallel with no carries between them — coprime moduli keeping the pieces independent.

COUNTING & CALENDARS

The theorem's oldest use is Sunzi's riddle — a count known only by its remainders — and the same trick aligns cycles: festivals, leap years, the meshing of gears whose tooth-counts share no factor.

The mapping, exactly

Mathematics ↔ life.

MathematicsLife
modulus mᵢOne context you live in — a job, a family, a friendship, a room with its own way of seeing you.
residue rᵢWho you are in that room — the compressed, partial self it actually witnesses.
a residue classEveryone who would look the same from that one room — the crowd a single view can never tell apart.
pairwise coprimeThe contexts are genuinely independent — not echoes of one another, each adding something new.
unique x in 0…M−1Exactly one whole person consistent with all the parts — the you that every room, together, points to.
M = m₁·m₂·…How much of you the parts can resolve together — the full reach of independent views multiplied.
non-coprime moduliOverlapping contexts that either just repeat each other or demand contradictory selves — resolution lost.
lcm < productRedundancy — added rooms that cover no new ground, so numbers collide or fall through the gaps.

The honest model

What's really under the hood.

Nothing on this page is scripted. Reconstruction A is brute honesty: the panel walks every integer x from 0 to M−1 and keeps the ones where x mod mᵢ = rᵢ for every room. It literally counts. Reconstruction B is the constructive Chinese-remainder algorithm: it merges the congruences two at a time with the extended Euclidean algorithm, which for coprime m₁, m₂ finds integers with m₁·p + m₂·q = 1 and stitches the pair into one congruence modulo lcm(m₁,m₂). The readouts show A and B agreeing on the same value, every time you move a slider.

Coprimality is the load-bearing assumption, and the panel makes it visible. The solutions of a consistent system always repeat with period L = lcm(m₁,…), so the number of them inside a window of width M = ∏ mᵢ is exactly M / L. When the moduli are coprime, L = M, that ratio is 1, and the value is unique. When they share a factor, L < M: the ratio jumps above 1 (the same value appears more than once — ambiguity) unless the residues are inconsistent on the shared factor, in which case the merge step fails outright and the count is 0contradiction. Both cases are computed, not asserted: switch to {4,6} and watch the count read 2 or 0 as you drag.

Where the metaphor tears

Three honest failures.

People aren't recoverable from finitely many numbers.

A residue is a lossless, exact fact; who-you-are-at-work is neither. Real contexts see you through fog — they compress, distort, and disagree, and none of it composes into a clean integer. The theorem reconstructs a value that was already a whole number to begin with. It does not manufacture a person out of impressions, and no finite stack of impressions ever fully determines one.

Real rooms are never coprime.

The magic needs genuine independence, and human contexts leak into each other constantly — work friends, family faith, the same wound showing up in every relationship. In practice your rooms almost always share factors, which is exactly the case where the guarantee dissolves into redundancy or contradiction. The clean, unique reconstruction is the rare ideal, not the ordinary condition.

Consistency is not coherence.

Even when a unique solution exists, all it certifies is that some number satisfies every congruence — not that the number is good, whole, or at peace. A person can be perfectly consistent across all their rooms and still be fragmented, false, or lost. The theorem finds the one value the parts allow; it says nothing about whether that value is a self worth being.