module FUNCTIONS (TYPES) is function N : Nat is return ord (last of Pid) + 1 end function function == (n: Nat, pid: Pid) : Bool is return n == Nat (pid) end function function == (pid: Pid, n: Nat) : Bool is return Nat (pid) == n end function function < (n: Nat, pid: Pid) : Bool is return n < Nat (pid) end function function < (pid: Pid, n: Nat) : Bool is return Nat (pid) < n end function function >= (n: Nat, pid: Pid) : Bool is return n >= Nat (pid) end function function != (n: Nat, pid: Pid) : Bool is return n != Nat (pid) end function function + (pid: Pid, n: Nat) : Pid is return (Nat (pid) + n) of Pid end function function - (n: Nat, pid: Pid) : Pid is return (n - Nat (pid)) of Pid end function function - (pid: Pid, n: Nat) : Pid is return (Nat (pid) - n) of Pid end function end module