Binary trees expansion to the lambda calculus type checker