Homomorphisms between two algebras whose operations are partial Suppose we have two algebras, $(A, F)$ and $(B, G)$, where $A, B$ are the carrier sets of the algebras and $F$ and $G$ are partial operations, not defined for certain members of $A, B$. 
How can we define a homomorphism between the algebras in this case, where $F$ and $G$ are partial operations, as opposed to total operations?
In the case where $F$ and $G$ are total, a function $f: A \mapsto B$ is a homomorphism iff


*

*For all $n$−ary relations $R$ of $F$, if $\langle a_1, \ldots, a_n\rangle  \in R_A$ then $\langle f(a_1), \ldots, f(a_n)\rangle \in R_B$ and

*For all $n$−ary operations $F$, if $F_A(a_1, \ldots, a_n) = a$ then $F_B(f(a_1), \ldots, f(a_n))= f(a).$


One problem is this. Suppose we have a function C which maps functions of F to functions of G with the same arity. It might not be the case that a
function $f \in F$ is defined for elements $a_1,…,a_n$ iff $C(f)$ is defined for elements $(a_1),…,(a_n)$. So what is the solution?
 A: There are several variations on this theme depending on your requirements for definedness in the two algebras. See Gratzer Universal Algebra Ch. 2. Asaf Karagila's answer gives the weakest version, where you just require $F_B(f(\overline{a}))$ to be defined whenever $F_A(\overline{a})$ is (so $F_B$ is not constrained outside the range of $f$). Gratzer defines a full homomorphism to be one such that whenever $F_B(f(\overline{a}))$ is defined there is some $\overline{a'} \in A$ such that $F_A(\overline{a'})$ is defined and $f(\overline{a'}) = f(\overline{a}))$.  Gratzer's third and strongest version is called a strong homomorphism and requires $F_B(f(\overline{a}))$ to be defined iff $F_A(\overline{a})$ is. In the case of total operations, these three definitions are all equivalent. If you are working with partial operations, you need to pick the one that best suits the task at hand.
A: Operations are nothing more than relations. So $n$-ary operation is a $(n+1)$-ary relation. And a partial operation is just a relation whose domain is not everything.
Now treat your operations as relations, and it'd be the same thing as you wrote. $f\colon A\to B$ is a homomorphism if whenever $\langle a_1,\ldots,a_n\rangle\in F$, then $\langle f(a_1),\ldots,f(a_n)\rangle\in G$.
