Categories can equivalently be defined as a special kind of partial semigroup: We impose some axioms on a partial semigroup that ensure the existence of well behaved "(partial) identity elements".
One direction is to take the set/class of morphisms of a category together with the composition as the multiplication of a partial semigroup. In the other direction, take the identity elements as objects and take as morphism sets the compatible elements in the partial semigroup.
Non-Question: How can the Yoneda Lemma be recovered from this perspective?
The first step would be to define presheaves and natural transformations in this setting. Then we follow the idea of "identity elements = objects" and the translation is more or less direct.
But I think there might be something more interesting here. Let's roughly unwind the definitions without going to mutch into detail:
Let $\triangleright:D_S\to S$ be the composition of such a partial semigroup where $S$ is a set, and $D_S\subseteq S\times S$ is the set compatible elements.
- A presheaf $U$ in this setting is an assignment $S\to \mathrm{Mor}(\mathrm{Set})$, associating to an element $f\in S$ a map of sets $$Uf:U^tf\to U^sf$$ that is contravariantly compatible with the composition and respects the identity elements.
- What's a representable presheaf in this setting? Let $x\in S$ be an identity element. As usual, we define $よx$ by mapping $f\in S$ to the precomposition $$(f\triangleright-)_x:\{g\in S\,|\,g=\mathrm{id}^t_f\triangleright *\triangleright x\}\to \{h\in S\,|\,h=\mathrm{id}^s_f\triangleright * \triangleright x\}$$ where $*$ ranges over all respectively compatible elements of $S$ and where $\mathrm{id}^s_f$ and $\mathrm{id}^t_f$ denote the source and target identity elemens of $f$.
Observation: This definition does not rely on $x$ being an identity element.
Actual question: Can we still find some form of the yoneda lemma if we allow $x\in S$ to be an arbitrary element in this definition?
My thoughts so far: Let $U$ be a presheaf and let $[V\to U]$ denote the set of natural transformations between presheaves. My first idea was to compare $[よx\to U]$ and $Ux$. But this does not really make sense since in our setting the left hand side is a set and the right hand side is a map of sets.
Nonetheless, I would expect some kind of transport $$[よx\to U] \rightsquigarrow Ux$$ that is in some form surjective, becomes invertible whenever $x$ is invertible and specializes to the yoneda lemma whenever $x$ is an identity element.
Sub-question: What would a suitable notion of transport?