Encoding Integers

For this assignment, work in a restricted subset of Scheme that roughly corresponds to the lambda calculus. You may use multi-arity function definitions and applications, and let expressions (since we saw how to encode them). For convenience, you may also use "define", but do NOT use it as a short-cut to introduce recursive definitions. Do not use Scheme's numbers, booleans, pairs, conditionals, etc. You may re-use ideas and functions from class, and from chapter 22 of PLAI.

In this subset, choose a representation for integers (both positive and negative natural numbers). A suitable representation might be a pair of a sign bit, and a natural number.

Then implement the operations: zero?, negative?, zero, add1, sub1, add, minus. The last two operations are the usual binary addition and subtraction operations.

Finally implement the "fib" function, which should return 0 on negative numbers.

As usual, please include tests for all your functions. You may use all of Scheme in your test cases (much like we did in class with the "to-scheme-function").