| Lean 4 | CBMC | |
|---|---|---|
| Proves | An abstract model of the spec & checker invariants | The actual C code logic (gap A) |
| Coverage | Unbounded — all inputs | Bounded — exhaustive up to a size |
| Guarantees | Passing the predicate ⇒ valid solution | Memory-safety + certifier soundness |
| Trust anchor | Lean kernel + propext, Quot.sound | SAT/SMT solver, 247 checks |
| Theorem | Guarantee |
|---|---|
| swapPhys_involutive | A SWAP is its own inverse — routing loses no state |
| swapPhys_injective | No two logical qubits ever collide on one physical qubit |
| applySwaps_injective | The final mapping is a valid placement after any SWAP sequence |
| encGate_injective | Faithfulness — every physical gate decodes to a unique logical gate |
| Theorem | Guarantee |
|---|---|
| chain_lb | Along a dependency chain, start cycles strictly increase |
| makespan_ge_chain | Critical-path lower bound — no schedule beats the longest dependency chain |
| no_self_cycle | A valid schedule certifies the graph is a DAG |
| factory_no_double_book | Two T-gates never share a factory-cycle (latency L ≥ 1) |
| Theorem | Guarantee |
|---|---|
| mem_contract | Semantic faithfulness — shared indices are summed out (symmetric difference) |
| Reduces_length | One contraction removes exactly one live tensor |
| plan_single_iff | Necessity — reaching one tensor forces exactly n−1 steps |
| plan_len_reaches_single | Sufficiency — n−1 contractions always reduce to one |
| Config (phys, log, gates, routed) | Meaning | Result | Time |
|---|---|---|---|
| 3, 3, 2, 4 | small, fully exhaustive | 0 / 247 | <5 s |
| 4, 4, 3, 6 | 4 qubits, 3 gates, 6 routed ops | 0 / 247 | ~30 s |