There seem to be many version of the notion "the internal language of a category", with which I'm kinda confused.
For example, in any standard textbooks on topos theory, we have the notion of internal language of a topos, which is a logic.
There is also the internal language of a cartesian closed category, which is a type theory (e.g. in Awodey's draft, 4.6). Where basic types are objects, morphisms become functions, with some axioms.
In nLab The internal language (as a type theory) for a locally cartesian closed category is defined to have closed types the objects, and dependent types as morphisms, contexts as tower of morphisms, and terms as sections (which I'm also confused with, a section is a morphism per se, so is should be interpreted as a dependent type already?)
There could be more that I will not enumerate here. My question are:
- Is there a very general definition of internal language of an arbitrary category or a very general class of categories, so it unifies all those variant versions?
- Is there any relationship when we refer to internal language as logic with when we refer to it as a type theory? (Can they be unified?)