# kernel The proved part of Orbit. `src/main` runs this code, so the proofs replace tests of it. There are no axioms. Contracts are in `.mbt`, specifications in `.mbtp`. | File | Proved | |---|---| | `nat` | The result is the decimal value, or -1 for an empty string, a non-digit, or 10^18 and up. Nothing overflows. | | `version` | `compare` is a total order, and each constraint operator accepts exactly its interval. | | `sort` | `sort_desc` terminates and lists every index once, highest version first and stable. | | `lit` | Literals round trip to their variable and sign, and a literal and its complement never agree. | Run `just prove`. It selects the machine-integer prelude. Plain `moon prove` models integers as unbounded, so it would miss overflow. Not proved, and still tested in `src/main`: splitting strings, ranking prereleases (`Key.pre`), and anything that does I/O. The prover treats strings as opaque. `src/main` is not proof-enabled, so its calls must meet the `proof_require` clauses by themselves. **Writing specifications:** `moonc-prove` 0.10.20 drops the parentheses around an implication, so `(a → b) && (c → d)` is read as `((a → b) && c) → d`. Never put `→` or a quantifier under `&&` or `||`. Give it its own predicate, or use `==`. After changing a proof, break the code on purpose and check that it fails.