SKY Combinator Multiway Formalization
A complete Lean 4 formalization of multiway reduction semantics for SKY combinators (S, K, Y), together with a topos-theoretic gluing layer where Grothendieck closure operators form nuclei on sieve lattices. The fixed points of this nucleus—the closed sieves—form a Heyting algebra that canonically identifies equivalent computational states.
Builds on Ben Goertzel's reflective metagraph rewriting framework (arXiv:2112.08272, 2021) and Stephen Wolfram's multiway reduction semantics from the Wolfram Physics Project.
Click to expand
Formal Verification Certificate
Every theorem in this project has been machine-checked by the Lean 4 kernel. No axiom is assumed without proof. No gap exists in the verification chain.
SKY Combinator Multiway Semantics • Lean 4 + Mathlib • Apoth3osis Labs
Multiway graph showing branching reduction paths for SKY combinators. Each node represents a term state, edges are labeled with reduction rules (S, K, Y) and redex paths.
Technical Contributions
Complete Labeled Edge Enumeration
stepEdgesList enumerates all one-step reductions from a term, each labeled with a rule tag (S, K, or Y) and a redex path.stepEdgesList_complete proves every valid reduction appears in the enumeration.
Sieves Form a Frame
For any object X in a category C, Sieve X carries a complete lattice structure. We establish this is a frame (complete Heyting algebra) with implication S => T := U {U | U n S <= T}.
Grothendieck Closure as Nucleus
Given a Grothendieck topology J, the closure operator J.close is inflationary, idempotent, and preserves binary meets. The fixed points form a sublocale inheriting frame/Heyting algebra structure.
Fixed-Point Impossibility
Constructive proof that no total fixed-point operator Y : (a -> a) -> a can exist when a = Bool, since Bool.not has no fixed point. Y-combinator re-entry requires non-termination or partiality.
-Dno_sorry -DwarningAsError=true
Verified via mathics/wolframscript
Lean -> LambdaIR -> MiniC -> C
| LEAN DECLARATION | CONTENT |
|---|---|
| stepEdgesList_complete | Every one-step reduction enumerated with correct labeling |
| Sieve.instFrame | Sieves form a frame (complete Heyting algebra) |
| sieveNucleus | Grothendieck closure is a nucleus on the sieve frame |
| closedSieve_instHeyting | Closed sieves inherit Heyting algebra structure |
| heyting_trichotomy | Classification of Heyting behavior under nuclei |
| no_total_fixpoint_Bool | No total Y operator exists on Bool |
Topos-Theoretic Gluing
Multiway computation, as formalized in the Wolfram Physics Project, models non-deterministic rewriting where all possible reduction paths are explored simultaneously. The resulting multiway graph encodes the complete branching structure of computation from a given initial term.
A fundamental challenge is identifying when different paths lead to equivalent outcomes—a question naturally addressed by sheaf-theoretic gluing. We view the SKY term type as a thin category via the reachability preorder, then equip this with the dense Grothendieck topology J.
The closure operator J.close acts as a nucleus in the sense of locale theory. Its fixed points form a sublocale inheriting frame structure. In computational terms, this identifies terms that are mutually reachable—they collapse to the same "glued" entity.
Our Lean 4 formalization builds on Goertzel's reflective metagraph rewriting framework and Wolfram's multiway semantics, providing machine-checked proofs that multiway systems form infinity-groupoids with complete Heyting algebra structure.

Ben Goertzel
CEO & Founder, SingularityNET
SingularityNET · OpenCog Foundation · AGI Society
Cross-disciplinary scientist and AI researcher who coined the term 'artificial general intelligence'. Creator of Hyperon and MeTTa, a self-modifying metagraph framework where programs exist as sub-metagraphs. His reflective metagraph rewriting paper (arXiv:2112.08272) connects metagraph execution to infinity-groupoids and the Ruliad.

Stephen Wolfram
Founder & CEO, Wolfram Research
Wolfram Research · Wolfram Physics Project
Creator of Mathematica and originator of the Wolfram Physics Project. His multiway reduction semantics—where all possible rule applications are explored simultaneously—provides the computational substrate that our SKY combinator formalization inhabits and extends.
