Docs

What is proved

MojoProof reads the LLVM IR file that mojo build --emit llvm writes for each GPU kernel, gives it a semantics in Lean (integers, byte memory, threads, barriers, warp shuffles, and IEEE floats through FloatLib), and proves theorems about it. The semantics leaves two things to choices: an address choice (where the blocks a launch allocates are placed) and a NaN choice (the payload of each NaN result, and whether and how a contract operation is fused). A kernel theorem (Kernel.Sound) says that, at every address choice and NaN choice it admits, the launch starts and has no undefined behavior, no unsupported operation, no data race and no deadlock, that no write touches bytes that a load marked !invariant.load reads, that every run terminates, that every schedule gives the same result, and that the result meets the spec. Each line below gives its scope (every program, a family of kernels, one named kernel, one intrinsic, every formula or every float format) and the Lean declaration.

Not proved yet:

What the theorems assume (Lean and the libraries, where the IR comes from, and our reading of LLVM's and PTX's documentation) is listed in docs/TRUST.md.