The psi Pipeline
The psi pipeline is the structural reasoning pipeline of UOR, parallel to the existing phi pipeline. Where phi transforms algebraic expressions through evaluation and canonical form, psi extracts topological invariants from the constraint space.
Pipeline Stages
The psi pipeline has nine stages (the first six compute homology and cohomology; stages 7-9, added in Amendment 55, compute the full homotopy type):
| Stage | Input | Output | Description |
|---|---|---|---|
| psi_1 | Constraints | Nerve | Build the constraint nerve from compatible constraint subsets |
| psi_2 | Nerve | Chain complex | Generate the ChainComplex from the nerve |
| psi_3 | Chain complex | Homology | Compute HomologyGroup via ker/im quotient |
| psi_4 | Homology | Index | Bridge Betti numbers to the analytical index (Euler characteristic) |
| psi_5 | Chain complex | Cochain complex | Dualize chains to cochains via CochainGroup |
| psi_6 | Cochain complex | Cohomology | Compute cohomology and GluingObstruction classes |
| psi_7 | KanComplex | PostnikovTower | Compute PostnikovTruncation for each dimension |
| psi_8 | PostnikovTower | HomotopyGroups | Extract HomotopyGroup from each truncation |
| psi_9 | HomotopyGroups | KInvariants | Compute the KInvariant classifying each extension |
Relationship to the phi Pipeline
The phi pipeline operates on values: it takes an element of R_n, factors it, evaluates it, and produces a canonical form certified by a Certificate.
The psi pipeline operates on constraints: it takes the constraint topology produced during iterative resolution, extracts its simplicial structure, and computes topological invariants that diagnose the health of the resolution.
The two pipelines connect at the resolver:
- phi consumes the partition output of resolution.
- psi consumes the constraint nerve built during resolution.
- Together, they provide both the algebraic result (phi) and the structural diagnosis (psi).
Implementing Structural Reasoning
To implement the psi pipeline:
-
Build the nerve (psi_1): For each subset of active constraints, test mutual compatibility. A k-subset that is mutually compatible becomes a Simplex of dimension k-1.
-
Form chain groups (psi_2): For each dimension k, create the ChainGroup C_k generated by the k-simplices. Construct the BoundaryOperator from the face maps of each simplex.
-
Compute homology (psi_3): Compute H_k = ker(partial_k) / im(partial_{k+1}). Extract Betti numbers beta_k = rank(H_k).
-
Index bridge (psi_4): Verify that chi(K) = sum_k (-1)^k beta_k. This connects the combinatorial Euler characteristic to the homological invariants.
-
Dualize (psi_5): Construct the CochainGroup C^k as the dual of C_k. The coboundary operator delta is the transpose of the boundary operator.
-
Compute cohomology (psi_6): Compute H^k = ker(delta^k) / im(delta^{k-1}). Interpret H^0 as global resolvability and H^1 as gluing obstructions.
Worked Example: 3 Constraints on R_4
Consider three constraints on R_4 = Z/16Z with 4 sites (site 0 through site 3):
- C_1: ResidueConstraint (mod 2, residue 1) — pins site 0
- C_2: DepthConstraint (depth 1–2) — pins sites 0 and 1
- C_3: CarryConstraint (pattern "10") — pins site 1
psi_1 — Nerve construction. Test all constraint subsets for compatibility (nonempty shared pinned sites):
| Subset | Shared sites | Simplex |
|---|---|---|
| {C_1} | {0} | 0-simplex |
| {C_2} | {0,1} | 0-simplex |
| {C_3} | {1} | 0-simplex |
| {C_1, C_2} | {0} | 1-simplex |
| {C_2, C_3} | {1} | 1-simplex |
| {C_1, C_3} | ∅ | — (not compatible) |
| {C_1, C_2, C_3} | ∅ | — (not compatible) |
The nerve is a path: C_1 — C_2 — C_3.
psi_2 — Chain complex. The ChainGroup construction gives:
- C_0 = Z^3 (generated by vertices C_1, C_2, C_3)
- C_1 = Z^2 (generated by edges e_{12}, e_{23})
The BoundaryOperator ∂_1 maps:
- ∂1(e{12}) = C_2 - C_1
- ∂1(e{23}) = C_3 - C_2
psi_3 — Homology. Computing the HomologyGroup:
- ker(∂_1) = 0 (no cycles — the nerve is a tree)
- im(∂_1) has rank 2
- H_0 = Z^3 / im(∂_1) ≅ Z → β_0 = 1 (one connected component)
- H_1 = ker(∂_1) = 0 → β_1 = 0 (no loops)
psi_4 — Index bridge. Euler characteristic: χ = β_0 - β_1 = 1 - 0 = 1. With n = 4 sites, the resolution cost lower bound (IT_7c) is n - χ = 3 constraint applications.
psi_5 — Dualization. The CochainGroup C^k = Hom(C_k, Z) gives:
- C^0 = Z^3 (dual of vertex group)
- C^1 = Z^2 (dual of edge group)
The coboundary δ^0 is the transpose of ∂_1.
psi_6 — Cohomology. Computing:
- H^0 = ker(δ^0) ≅ Z → one global Section exists
- H^1 = ker(δ^1) / im(δ^0) = 0 → no GluingObstruction
Conclusion: The constraint system is topologically trivial — resolution converges without obstruction, requiring at least 3 constraint applications.
Identity Grounding
The psi pipeline identities fall into two categories:
| Category | Identities | Verification |
|---|---|---|
| Verifiable | boundarySquaredZero, coboundarySquaredZero | Direct computation: check partial^2 = 0 and delta^2 = 0 on generators |
| Derivable | psi_4 (index bridge), deRhamDuality, sheafCohomologyBridge, localGlobalPrinciple | Follow from the definitions via standard algebraic topology arguments |