# Phase 1B — Shared-Core Square Closure

**Experiment:** `PCGC-P1B-CORE`  
**Input:** exact Phase 1 states with at least one closed face  
**Stored states:** 3,463  
**Core criterion cross-check:** PASS

## Exact criterion

For a sphere state

$$
a^2+b^2+c^2=g^2,
$$

the face opposite an edge $x$ has squared diagonal

$$
D_x^2=g^2-x^2=(g-x)(g+x).
$$

Let

$$
h_x=\gcd(g-x,g+x).
$$

Write

$$
g-x=h_xu_x,
$$

$$
g+x=h_xv_x,
$$

with

$$
\gcd(u_x,v_x)=1.
$$

Then

$$
(g-x)(g+x)=h_x^2u_xv_x.
$$

Because $u_x$ and $v_x$ are coprime,

$$
u_xv_x
$$

is an integer square if and only if **both** $u_x$ and $v_x$ are integer squares.

Therefore

$$
D_x\in\mathbb Z
\iff
\frac{g-x}{h_x}\in\mathbb Z^2
\quad\text{and}\quad
\frac{g+x}{h_x}\in\mathbb Z^2.
$$

This gives an exact face-closure gate using only subtraction, gcd, division, and integer-square tests. No floating point and no prime factorization are required.

## Critical state

For

$$
(a,b,c;g)=(448,495,840;1073),
$$

the three channels are:

### Opposite $a=448$

$$
h_a=\gcd(625,1521)=1,
$$

$$
\frac{g-a}{h_a}=625=25^2,
$$

$$
\frac{g+a}{h_a}=1521=39^2.
$$

PASS.

### Opposite $b=495$

$$
h_b=\gcd(578,1568)=2,
$$

$$
\frac{g-b}{h_b}=289=17^2,
$$

$$
\frac{g+b}{h_b}=784=28^2.
$$

PASS.

### Opposite $c=840$

$$
h_c=\gcd(233,1913)=1,
$$

$$
\frac{g-c}{h_c}=233,
$$

$$
\frac{g+c}{h_c}=1913.
$$

FAIL.

Thus the near miss is not merely “close to a square”; two entire shared-core channels close exactly and one channel remains arithmetically open.

## Prime-parity compression

Every face value is itself a sum of two squares. Therefore, by the sum-of-two-squares theorem, every prime

$$
p\equiv3\pmod4
$$

already occurs with even exponent in a face value.

Hence any surviving square defect can only live in

$$
\{2\}\cup\{p:p\equiv1\pmod4\}.
$$

The critical missing face has

$$
445729=233\cdot1913,
$$

and both

$$
233\equiv1913\equiv1\pmod4.
$$

This is consistent with the compressed defect space.

## Research consequence

The next search should no longer optimize “distance to a square”.

Instead, for each of the three edges, use the exact channel state

$$
C_x=
\left(
h_x,
\frac{g-x}{h_x},
\frac{g+x}{h_x}
\right).
$$

A face closes exactly when the last two coordinates are both squares.

The Perfect Cuboid target becomes simultaneous closure of three shared-core channels under the global sphere constraint.

This representation is proof-safe and can be combined with radix observations later.
