Operations that only apply for Nat (N ...)s.
The Nat (N ...) plus another Nat (N ...). Give the subtracted value twice as a tuple.
nat6 |> NNat.sub ( nat5, nat5 )
--> Nat 1 :
--> Nat
--> (N Nat1
--> (Is a To Nat1Plus a)
--> (Is b To Nat1Plus b)
--> )This is only rarely useful, as you shouldn't
inRangeXMinus10ToX x =
-- won't work
isInRange (x |> NNat.sub ( nat10, nat10 )) x
isAtLeast10LessThan x =
-- the only use case
isAtLeast (x |> NNat.sub ( nat10, nat10 ))(examples don't compile, just for demonstration)
The
Nat (N ...)plus anotherNat (N ...). Give the added value twice as a tuple.This is only rarely useful, as you shouldn't
(examples don't compile, just for demonstration)