Session Type State Spaces Form Lattices
Session types describe communication protocols, but their structural properties as ordered state spaces were not rigorously characterized. It was unclear whether session type state spaces form lattices and how duality and subtyping relate to lattice structure.
The state space of each well-formed session type, quotiented by strongly connected components, is proven to form a bounded lattice, with n-ary parallel composition yielding product lattices. Duality is shown to preserve the lattice up to isomorphism, and Gay-Hole width subtyping is shown to correspond to lattice embedding for non-recursive types. The results are mechanised in Lean 4 with two independently developed tool implementations.
All 108 benchmark protocols across networking, databases, distributed systems, AI, and fault tolerance form lattices; 93 are distributive and 15 non-distributive.
