let rec suc = function n -> if is_zero (n) then d1 (n) else if is_even_non_zero (n) then d1 (inv_d0 (n)) else (* is_odd (n) *) d0 (suc (inv_d1 (n)))