previous up next
Go backward to Example
Go up to Top
Go forward to Example
RISC-Linz logo


Recursive predicate definition

iseven subset N
iseven(x) : <=>
   if x = 0
      then T
      else ~iseven(x-1)
with termination function t(x) := x.

Reduction sequence:

iseven(3) = ~iseven(2) = ~~iseven(1) = ~~~iseven(0) =
   ~~~T = ~~F = ~T = F.

Termination after a finite number of unfoldings.

Author: Wolfgang Schreiner
Last Modification: October 14, 1999

previous up next