Commit graph

3 commits

Author SHA1 Message Date
Maximus Gorog
5531398040 Merge master and add DiagramMap composition methods
Integrates the parallel agent work (slice computation, degeneracy
factorisation, explosion) with the normalisation implementation.

Added to DiagramMap:
- compose(): Compose two diagram maps
- has_singular_height_in_image(): Check if height is in singular image

All 77 tests pass.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-04-07 03:26:12 -06:00
Maximus Gorog
02d23cf554 Implement normalisation algorithm (Construction 17)
Complete implementation of the zigzag normalisation algorithm from the
LICS 2022 paper "Zigzag normalisation for associative n-categories".

Key changes:
- diagram.rs: Add DiagramMap composition, singular_map extraction
- degeneracy.rs: Add extract_singular_map() and height checking functions
- normalise.rs: Complete Construction 17 with essential identity detection

The algorithm:
1. Recursively normalise at each regular height
2. Recursively normalise at each singular height with cospan leg composites
3. Assemble into intermediate diagram P
4. Remove trivial cospans (ONLY if identity AND not in sink image)
5. Compose degeneracies: d = dP ∘ dS

Critical: In dimension >= 4, some identity cospans are ESSENTIAL and must
be preserved if they are in the image of any sink map.

All 57 tests pass.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-04-07 03:24:30 -06:00
Maximus Gorog
cd4b951f78 Scaffold zigzag-engine library
Initial structure implementing the zigzag construction for associative
n-categories (LICS 2022 paper). Includes:

- monotone.rs: MonotoneMap with Wraith's R equivalence (complete)
- zigzag.rs: Zigzag<T>, ZigzagMap<S> with composition
- diagram.rs: Diagram, DiagramN, Cospan, Rewrite, Cone types
- signature.rs: Generator, Signature (complete)
- degeneracy.rs: Degeneracy detection stubs
- normalise.rs: Construction 17 algorithm structure
- typecheck.rs: Type checking against signatures
- explosion.rs: k-points and Poset for layout
- layout.rs: SpringConstraint API surface

All 33 unit tests pass.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-04-07 02:42:06 -06:00