Whereas formal category theory is classically considered within a 2-category, in this paper a double-dimensional approach is taken. More precisely we develop such theory within the setting of hypervirtual double categories, a notion extending that of virtual double category (also known as fc-multicategory) by adding cells with nullary target.This paper starts by introducing the notion of hypervirtual double category, followed by describing its basic theory and its relation to other types of double category. After this the notion of 'weak' Kan extension within a hypervirtual double category is considered, together with three strengthenings. The first of these generalises Borceux-Kelly's notion of Kan extension along enriched functors, the second one generalises Street's notion of pointwise Kan extension in 2-categories, and the third is a combination of the other two; these stronger notions are compared. The notion of yoneda embedding is then considered in a hypervirtual double category, and compared to that of a good yoneda structure on a 2-category; the latter in the sense of Street-Walters and Weber. Conditions are given ensuring that a yoneda embedding y : A → A defines A as the free small cocompletion of A, in a suitable sense.In the second half we consider formal category theory in the presence of algebraic structures. In detail: to a monad T on a hypervirtual double category K several hypervirtual double categories T -Alg (v,w) of T -algebras are associated, one for each pair of types of weak coherence satisfied by the Talgebras and their morphisms respectively. This is followed by the study of the creation of, amongst others, left Kan extensions by the forgetful functors T -Alg (v,w) → K. The main motivation of this paper is the description of conditions ensuring that yoneda embeddings in K lift along these forgetful functors, as well as ensuring that such lifted algebraic yoneda embeddings again define free small cocompletions, now in T -Alg (v,w) . As a first example we apply the previous to monoidal structures on categories, hence recovering Day convolution of presheaves and Im-Kelly's result on free monoidal cocompletion, as well as obtaining a "monoidal Yoneda lemma".
MotivationCentral to classical category theory is the Yoneda lemma which, for a locally small category A, describes the position of the representable presheaves A(-, x) within * Part of this paper was written during a visit to Macquarie University, while its main results formed the subject of a series of talks at the Australian Category Seminar. I would like to thank