The Pud Test Kitchen
The proof is
in the pud.
Write a rule for your TypeScript. Pud asks Lean to prove it for every input the rule covers.
Try the half-cent rule
Recipe / cents.proof.ts
Which way is half?
Scale a JavaScript number by 100 and round to the nearest integer. Exactly halfway? Take the higher cent.
Inspect the TypeScript rule ↗Math.round(12.5) 13¢