Title: Type theory and the external logic of programs