The proofs largely follows "Sheaves in Geometry and Logic" by Mac Lane and Moerdijk. This PR includes the following definitions and proofs:
Right adjoint functors with the counit and coreflection (or universal property) and a proof of uniqueness (for categories);
Cartesian closed precategories, exponential and exponentiable objects;
Product (pre)category and bifunctors: internal hom-bifunctor for CCC, binary product bifunctor for precategories with binary products;
Elementary topos definition;
Topos is cartesian closed and balanced;
Set topos instance;
Heyting algebras as cartesian closed posetal categories.
Some supplementary lemmas about pullbacks and products were added to Limit (for example, uniqueness of pullbacks). I also suggest splitting the CartesianPrecat class in two, so that it extends precategories with a terminal object and precategories with binary products separately. This way, for example, meet-semilatice class can extend the class of precategories with binary products.
The proofs largely follows "Sheaves in Geometry and Logic" by Mac Lane and Moerdijk. This PR includes the following definitions and proofs: