montrepol / liquid /src /MP /Liquid /Smoke.hs
SNAPKITTYWEST's picture
montrepol: exact mathematics in Haskell, with proofs and a certifying solver
5316c4e verified
Raw History Blame Contribute Delete
191 Bytes
-- SPDX-License-Identifier: AGPL-3.0-or-later
module MP.Liquid.Smoke (clampNat) where
{-@ clampNat :: Int -> {v:Int | v >= 0} @-}
clampNat :: Int -> Int
clampNat x = if x < 0 then 0 else x