Formalisation of Herbrand Logic