Apoth3osis
<_RESEARCH/PROJECTS

SKY Combinator Multiway Formalization

VERIFIEDLean 4Topos TheoryWolfram PhysicsGitHub
>ABSTRACT

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.

Expand

Click to expand

>MULTIWAY_GRAPH
SKY Combinator Multiway Graph Visualization

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.

>CONTRIBUTIONS

Technical Contributions

1

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.

2

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}.

3

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.

4

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.

>VERIFICATION
BUILD FLAGS
Strict

-Dno_sorry -DwarningAsError=true

CROSS-VALIDATED
Wolfram

Verified via mathics/wolframscript

EXECUTABLE
C Output

Lean -> LambdaIR -> MiniC -> C

>CORE_THEOREMS
LEAN DECLARATIONCONTENT
stepEdgesList_completeEvery one-step reduction enumerated with correct labeling
Sieve.instFrameSieves form a frame (complete Heyting algebra)
sieveNucleusGrothendieck closure is a nucleus on the sieve frame
closedSieve_instHeytingClosed sieves inherit Heyting algebra structure
heyting_trichotomyClassification of Heyting behavior under nuclei
no_total_fixpoint_BoolNo total Y operator exists on Bool
>REDUCTION_RULES
// SKY Combinator Reduction
K x y -> x
S x y z -> (x z) (y z)
Y f -> f (Y f)
// Term syntax
Comb ::= K | S | Y | Comb . Comb
>THEORY

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.