I am working with this set of rewrite rules for lambda calculus:
While evaluating "INC 0", I performed these steps:
Subsequently, I evaluated "INC 1" as such:
Are these evaluations accurate? If not, what am I doing incorrectly?
the last step is not correct. It seems like you confused the precedences. (\x.x) is not applied to the first \x. .. abstraction, but part of its body.
you can use an online lambda beta-reducer like https://lamboolda.com/lambda to check your results:
the last step is not correct. It seems like you confused the precedences. (\x.x) is not applied to the first \x. .. abstraction, but part of its body.
you can use an online lambda beta-reducer like https://lamboolda.com/lambda to check your results: