Effective metatheory for type theory : PhD thesis