# Is there a generalization of universal algebras that allows the use of multiple sets?

Algebras in Universal algebras are normally over only one set, which is enough to generalize over many algebraic structures. E.g. groups, rings or lattices.

However, some algebraic structures feature functions over 2 (or more) sets. E.g. vector spaces. At least some of those could be still be encoded in universal algebras. A vector space $V$ over a field $F$ could be encoded using the set $V$ as the set of the algebra and then including the relevant functions over $V$ and $F$.

Encoding it in such a way can easily lead to there being infinitely many functions in the signature of the algebra, because one would have to include a scalar multiplication function for every element of $F$.

This approach seems overly ugly, since vector spaces can easily be defined with finitely many functions.

Alternative way of encoding them would be using the set $V \cup F$ as the main set of the algebra. Then we could only use finitely many functions to describe vector spaces, but now we would have partial functions.

So I was wondering if there might exist some kind of universal algebra that is over 2 or more sets, which would generalize vector spaces in a nicer way than the two approaches above. Meaning without needing infinitely many functions or partial functions.

Does such a thing exist?

Of course, universal algebra isn't related to first-order logic as much as it is the equational fragment of first-order logic. The relation between many- and single-sorted equational logic is more complicated: the translation mentioned two sentences prior breaks down in the context of standard universal algebra, since $(i)$ we aren't allowed relation symbols and $(ii)$ we aren't allowed disjunctions or negations either so even if we had unary relation symbols we couldn't write "Every object is in exactly one unary relation."