fix the application bug; and realized that I should think about a simple form of solving constraints for checking/inference of the wff
decided to do type inference for formula