TypeScript proofs, checked by Lean.
Keeps the result between ordered bounds.
At the window · clamp.proof.ts