Interactive front end for the Lean model in Poc/Amm.lean.
swap_k_nondecreasing — after any swap, r0′·r1′ ≥ r0·r1: fees and rounding only ever grow k.
swap_out_lt_reserve — a swap can never pay out the whole output reserve: the pool can't be drained.
removeLiq_le_reserves — liquidity removal never pays out more than the reserves.
addLiq_shares_positive — a positive first deposit mints a positive number of shares.
Axes are the reserves. The curve is the hyperbola for the current k; the dot is the current (r0, r1). After a swap, the pre-swap point is shown ghosted.
Demo sequence: addLiq 1000000/1000000 → addLiq 100000/100000 → swap 10000 token0 in → swap 5000 token1 in → swap 50000 token0 in → removeLiq 100000 shares. Note: k after the two deposits is 1.210e12, and each swap grows it further — the withheld fees accrue to LPs.