Tutorials

These tutorials walk you through real verified algorithms step by step. Each one teaches specific ImandraX concepts and techniques while producing a complete, correct proof.

Prerequisites

Before starting these tutorials, you should be comfortable with:

Tutorial progression

The tutorials are ordered from introductory to advanced:

  1. Sorting Algorithms: verify that insertion sort produces sorted output with the right elements. Covers induction, rewrite rules and automatic proofs.

  2. Merge Sort: verify merge sort with both automatic and manual tactic proofs. Covers custom termination measures, forward-chaining rules and manual tactics.

  3. Compiler Verification: verify a compiler from expressions to a stack machine. Covers custom induction schemes and compiler correctness.

  4. Ripple-Carry Adder: prove a hardware adder circuit correct. Covers hardware verification, bit vectors and automatic proofs of non-trivial properties.

  5. Majority Vote: prove the Boyer-Moore MJRTY voting algorithm correct. Covers using lemmas, algorithm verification and uniqueness proofs.

  6. Interactive Proofs: use the VS Code goal state viewer to develop proofs step by step. Covers tactic composition and incremental proof development.