Type assignment checker
Returns some ty if t can be assigned type ty in context ctx, or none if the term
is ill-typed.
.var c: look upcin the context..abs x m: checkm, look upx's type, and form the arrow typex.ty → m.ty..app m n: check bothmandn; requirem : domain → tyandn : domain.