Initial attempts to implement the NT class

with automatic generation of witness during typechecking.