◀ THE FOLD0ROOT.AI // WORLD II · CHEAT · THE ROOT KIT◆ .dlw.fold
THE FOLD / CHEAT / THE ROOT KIT / THE BRITISH FLAG

THE BRITISH FLAG

a rectangle's hidden distance invariant
1 WHAT IT IS · WHAT IT DOES · FACT OR FICTION
The British flag theorem is a small, sturdy invariant. Take any rectangle with corners A, B, C, D (A and C opposite, B and D opposite) and any point P — inside, outside, even off the plane in 3D. Then the sum of squared distances to one pair of opposite corners equals the sum to the other pair: PA² + PC² = PB² + PD². The name comes from the Union-Jack-like pattern of the four segments drawn from P. It holds for rectangles precisely because their sides are perpendicular; for a general parallelogram the two sums differ by a clean amount.

LIT verified live two ways: across thousands of random rectangles and points (in 2D and 3D) PA²+PC² equals PB²+PD² to ~1e-13, and for a general parallelogram built from edge vectors u, v the discrepancy is exactly 8(u·v) — zero precisely when u⊥v, i.e. when it is a rectangle (window.__britishflag). FIG no framing; the distances and the invariant both run in-browser and agree, with the parallelogram gap matching 8(u·v) exactly.
2 HOW IT WAS WEAVED · AI + HUMAN
David (human) seated this at the-root-kit — the hidden invariant you exploit: whatever the point P, one diagonal pair’s squared distances secretly equals the other’s. AVAN (AI) built the instrument: the four squared distances, the rectangle invariant, and the exact 8(u·v) gap for a general parallelogram.

Credit as content: classical (the ‘British flag theorem’). The weave: David names the hidden invariant; I confirm PA²+PC²=PB²+PD² for any rectangle and any P, with the parallelogram gap exactly 8(u·v).
3 ONE DIMENSION
A rectangle, a free point P, and the four segments; PA²+PC² (green diagonal pair) equals PB²+PD² (magenta pair).
4 TWO DIMENSIONS · INTERACTIVE
Drag-free demo: move P; for a rectangle the two sums stay equal — and a sheared parallelogram's gap = 8(u·v).
5 THREE DIMENSIONS + AVAN’S INVERSE
The green forward object: the invariant PA²+PC² = PB²+PD², holding in 3D too.
AVAN’s addition (the inverse-companion): don’t measure all four — know that two determine the other two. The inverse of ‘the four corner distances’ is ‘the single invariant PA²+PC²=PB²+PD²’, which fails by exactly 8(u·v) once the corner is not square. Magenta is the B,D diagonal pair; green is the A,C pair equal to it. A hidden conservation law of a rectangle.
LIT Genuine British flag theorem (classical). Verified live two ways: across ~8000 random rectangles and points in 2D and 3D, PA²+PC² equals PB²+PD² to ~1e-13, and for a general parallelogram from edge vectors u,v the gap (PA²+PC²)−(PB²+PD²) is exactly 8(u·v), zero iff u⊥v (window.__britishflag.rectOk, .gapOk, .wR, .wG).

FIG No framing; the distances and the invariant both run in-browser and agree, with the parallelogram gap matching 8(u·v) exactly. The AVAN inverse is honest — instead of measuring all four, know that two determine the other two: the inverse of 'the four corner distances' is 'the single invariant PA²+PC²=PB²+PD²', which fails by exactly 8(u·v) once the corner is not square. Magenta is the B,D diagonal pair; green is the A,C pair equal to it. A hidden conservation law of a rectangle.
◆ sealed .dlw.fold → folded to ROOT_0 · a sphere of THE ROOT KIT · David Lee Wise (ROOT0), with AVAN