Nat fixes

This commit is contained in:
2026-09-01 12:54:26 -05:00
parent e595763f91
commit b822e7e713
3 changed files with 70 additions and 36 deletions

View File

@@ -8,8 +8,8 @@ myAndC = (c1 c2 value rest :
(c1 value rest))
-- Plain predicates lifted into contracts with a diagnostic message.
natural? = guardC "natural" (n : gte? n 0)
nonZero? = guardC "non-zero" (n : not? (isZero? n))
natural? = guardC "natural" isNat?
nonZero? = guardC "non-zero" (n : and? (isNat? n) (not? (isZero_? n)))
-- Phantom annotations let point-free definitions carry their own contracts.
-- The base library now uses the same syntax, so head/tail/div etc. are