Lux: Last episode we busted a myth — the Pythagorean theorem as bedrock truth. Today we zoom into the diagnostic that does the busting. The Pythagorean residual. What it is, what it tests, and why it's not really about triangles at all. Hex: Not about triangles. What's it about? Lux: Protocol composition. P-three. It tests whether two different ways of getting somewhere cost the same amount. Hex: [intrigued] Walk me through it. Lab-bench style. Lux: Picture a grid. You're at the origin. You want to reach the point delta-x, delta-y — say, three squares east and four squares north. There are two protocols for getting there. Hex: Protocol one: go directly. Cut the diagonal. Lux: That's the shortcut. One move, straight to the destination. The cost is C-tau of delta-x, delta-y — the negative log probability of ending up there after tau micro-steps. Hex: Protocol two: break it into legs. Go east first, then north. Lux: The composed-axis route. First move to delta-x, zero — three squares east. Cost: C-tau of delta-x, zero. Second move to zero, delta-y — four squares north. Cost: C-tau of zero, delta-y. Subtract the origin cost to avoid double-counting. Total: C-tau of delta-x, zero, plus C-tau of zero, delta-y, minus C-tau of zero, zero. Hex: And the residual is the difference between those two protocols. Lux: Exactly. R-tau equals the shortcut cost minus the recipe cost. If R-tau is zero, the two protocols give the same answer. The cost is separable. Moves compose cleanly. That's the Pythagorean condition. Hex: And if R-tau is not zero? Lux: Then the shortcut and the recipe disagree. The cost surface is not separable. Something about the accounting structure resists decomposition into independent axes. The Pythagorean form fails. Hex: That's why you call it a protocol-composition test. It's not testing geometry directly. It's testing whether moves along different axes compose without interference. Lux: P-three — the protocol primitive — is about the order and composition of moves. The Pythagorean residual is a P-three test dressed in geometric clothing. It asks: does the diagonal protocol equal the composed-axis protocol? Hex: Same question a cook asks. Does the shortcut give me the same dish as the full recipe? Lux: Same question. Different kitchen. And the residual is the taste test. Hex: Let's run it. What happens at small tau? Lux: Tau equals four. Four micro-steps on a lazy isotropic random walk. The walker hasn't gone far. The cost surface is lumpy — dominated by lattice artifacts. The Pythagorean residual at this staging is thirty-three-point-two. Hex: That's terrible. The shortcut and the recipe are telling completely different stories. Lux: Completely different. The quadratic fit to the axis costs has an RMS error of twelve-point-one. Nothing is smooth. Nothing is separable. If you plot the cost contours at this staging, they look like irregular blobs. No circles. No symmetry. The lattice is still visible in the accounting. Hex: Now crank tau. Lux: Tau equals sixteen. The central limit theorem is starting to bite. The displacement distribution is moving toward Gaussian. The residual drops. Not zero yet, but visibly falling. The contours of the cost surface are starting to round out. Hex: Keep going. Lux: Tau equals a hundred twenty-eight. Now the distribution is approximately Gaussian, and the negative log of a Gaussian is quadratic. The Pythagorean residual drops to zero-point-zero-six. Nearly perfect. The quadratic fit RMS drops to zero-point-one-five. The axis costs are quadratic to within a fraction of a percent. And the cost contours are circles. Hex: [impressed] Circles. The Pythagorean fingerprint. Lux: At this staging, the quadratic model fits the axis costs about sixty times better than a linear model. The emergence calculus doesn't just show that the Pythagorean form holds — it quantifies how emphatically it holds. Hex: And the transition. Where does the switch flip? Lux: Around tau equals sixteen. Below that: lattice regime. Above that: diffusion regime. The residual crosses from "badly non-Pythagorean" to "approximately Pythagorean" in a narrow band. It's a regime transition, not a gradual fade. Hex: Okay. That's the geometry lab. Same P-three test, different domain. Where else does this show up? Lux: The agency paper. Same structural test, different substrate. Instead of a random walk on a grid, you have an agent on a ring-world. Instead of cost, you have empowerment — the number of distinguishable futures the agent can reach. Hex: And the protocol? What's the composition variable? Lux: Two regimes, identical in every respect except one. Protocol on: the agent's moves depend on a staged phase variable. Right-then-left doesn't give the same result as left-then-right. Moves don't commute. Protocol off: moves are phase-independent. Order doesn't matter. Hex: So composition changes the answer. Lux: At horizon one — a single step — both regimes produce identical empowerment. One-point-zero-five bits. No composition, no difference. At horizon two — two steps — the curves diverge. Protocol on: one-point-six-six bits. Protocol off: one-point-one-two bits. That's forty-eight percent more empowerment from composition alone. Hex: [connecting] Single step: no composition, no divergence. Two steps: composition kicks in, outcomes split. The same pattern as the Pythagorean residual. Lux: Same pattern. At small tau, there's not enough staging for the cost to separate. At large tau, the separation emerges. At horizon one, there's not enough composition for empowerment to diverge. At horizon two, the divergence appears. Same logic. Same primitive. P-three. Hex: Is there a smoking-gun test? A single case where you can point and say: here, composition changes the outcome? Lux: The noncommutativity (non-COM-yoo-tuh-TIV-ih-tee) witness. One specific starting state. Two specific action sequences — right-then-left and left-then-right. With protocol on, the output distributions of those two sequences have a total variation distance of zero-point-six-seven. With protocol off, the distance is zero-point-one-zero. A factor of seven. Hex: Right-then-left lands you in a different place than left-then-right. The order rewrites the destination. But only when the protocol is active. Lux: Only when P-three — the order of composition — is wired into the dynamics. Turn off the protocol and the two sequences converge. The witness is a single pair of inputs that proves noncommutativity. It's the agency equivalent of the Pythagorean residual being nonzero. Hex: And the neural substrate? Lux: Brief confirmation from the neural paper. The P-three schedule — a deterministic kernel rotation keyed to step index — changes the stroboscopic (stroh-boh-SKOP-ik) current by ten to twenty-eight percent across seeds and parameter settings. Protocol composition is a real dynamical effect on a real neural substrate. Not just a ring-world thought experiment. Hex: Ten to twenty-eight percent is not noise. That's a real effect you can see in the data. Lux: Real and reproducible. Consistent across seeds. The Six Birds framework finds protocol composition effects in geometry, agency, and neural dynamics. Different substrates, same primitive, same structural test. Hex: So what have we learned in this lab? Lux: The Pythagorean residual is not a geometry test. It's a P-three test that happens to be expressed in geometric language. It asks: does the shortcut cost the same as the composed recipe? When the answer is yes — staging is high, isotropy holds — you get Pythagoras. When the answer is no, you get a residual that tells you exactly how far from Pythagorean you are. Hex: And the same test, rewritten for agency, asks whether composing moves creates new futures. Lux: And for neural dynamics, whether composing steps changes the current. Hex: One test. Three domains. One primitive. Lux: P-three. Protocol composition. The geometry paper calls it the Pythagorean residual. The agency paper calls it empowerment divergence. The neural paper calls it stroboscopic current change. Same underlying question: does the order and combination of moves matter? Hex: And the answer is always: it depends on staging and structure. Enough staging, enough composition, and the effect becomes measurable. Lux: [precisely] Which is what the emergence calculus framework predicts. Composition effects are not automatic. They emerge under the right conditions and are measurable when they do. And when they don't emerge — small tau, single-step horizons — the residual tells you that too. The diagnostic works in both directions. Hex: It confirms Pythagoras when it holds, and it quantifies the failure when it doesn't. Lux: A protocol-composition test with a built-in scorecard. Hex: Next time? Lux: Episode one forty-eight. We step back from the numbers and tell the story at the bird level. What do the six primitives actually mean in the geometry context? A narrative walkthrough. Hex: From numbers to narrative. The big picture. See you there.