Zero-Cost POSIX Compliance: Encoding the Socket State Machine in Lean 4's Type System

The best runtime check is the one that never runs.