Theorem proving in higher order logics