A tripos is a first-order hyperdoctrine with equality satisfying an additional property which is sufficient (but, at least in the original definition by Andrew Pitts, more than necessary) to allow it to interpret impredicative higher-order logic as well (in particular, every tripos gives rise to a corresponding topos). The additional property is particularly easy to state for hyperdoctrines whose category of terms is cartesian closed: such a hyperdoctrine is a tripos just in case it possesses a suitably generic predicate, in the sense that there is a natural transformation from a representable functor to (the “set of predicates on -” functor), all of whose components are surjections (this is of course equivalent, by the Yoneda lemma, to the existence of an element of for some object with suitable properties). Note that this notion of “suitably generic predicate” doesn’t require to actually be representable, but, rather, merely a “quotient” of a representable functor.
By reconstructing from a tripos all the subquotients it can “see” of its given sorts and all the functions it can “see” between them (i.e., moving to its category of partial equivalence relations), one obtains an elementary topos.
The surjective natural transformation defining the suitably generic predicate in a tripos of course induces a preorder (but not necessarily posetal) structure on each , the posetal reflection of which gives the Heyting algebra . Accordingly, we can specify a tripos with category of terms by specifying an object and putting Heyting prealgebra structure on in such a way as to yield all the first-order hyperdoctrine structure, with the identity morphism on playing the role of the suitably generic predicate.
Particularly important is the case of triposes whose category of terms is Set (henceforth, “triposes over ”). Every complete Heyting algebra gives rise to a tripos over , taking the predicate functor to be , with the structure of providing all the adjoints required for the first-order hyperdoctrine structure. The category of partial equivalence relations for such a tripos will in fact be the category of sheaves over the locale whose frame is given by (the presentation of localic topoi in terms of -valued partial equivalence relations is due to Higgs?). The triposes over of this form are precisely those for which the preorder imposed on is the straightforward -ary product of the preorder imposed on , where is the carrier of the suitably generic predicate; in all other cases, the former is a finer-grained preorder than the latter. Thus, in some sense, triposes over are a generalization of the notion of “complete Heyting algebra” taking advantage of the ability to use preorder rather than poset structure to allow for a weakening of the condition of completeness.
An example taking advantage of this generalization is given by realizability?: for any partial combinatory algebra A, one can put a pre-ordering on [here, the refers to the actual powerset of in ] as follows: given , let be the set of in such that for all in and in , applied to is defined and an element of . We will of course take just in case is inhabited. This turns out to provide Heyting prealgebra structure on , and, furthermore, even the requisite adjoints to reindexing to equip as the carrier of the suitably generic predicate of a tripos over . This is the realizability tripos for , and its category of partial equivalence relations is the realizability topos for . In the case where is Kleene's first algebra (the PCA whose elements are natural numbers taken as codes for computer programs taking natural number input and producing natural number output if they halt, with obvious application partial function), this is also called the effective topos.