Proof and algorithm test