One test to prove your model never violates its invariants, via Z3

samgoodwin89 · x · 2026-11-19

samgoodwin89 shows Alchemy's key idea: instead of writing a test per case you can think of (which you should still do), one test can verify the model implementation never violates declared invariants. The screenshot shows a vitest example using Verify.model(Bank, ...) with stubbed FraudCheck and Payments services to exhaustively check behavior.

Related event: Alchemy lands formal verification: invariants as code, automated proofs and counterexamples(6 posts)→

Original post →

More from coding & agent

coding & agent channel →