Unique homomorphic extension theorem

The unique homomorphic extension theorem is a result in mathematical logic which formalizes the intuition that the truth or falsity of a statement can be deduced from the truth values of its parts.

The lemma
Let A be a non-empty set, X a subset of A, F a set of functions in A, and $$ X_+ $$ the inductive closure of X under F.

Let be B any non-empty set and let G be the set of functions on B, such that there is a function $$d:F\to G$$ in G that maps with each function f of arity n in F the following function $$d(f):B^n\to B$$ in G (G cannot be a bijection).

From this lemma we can now build the concept of unique homomorphic extension.

The theorem
If $$ X_+ $$ is a free set generated by X and F, for each function $$h:X\to B$$ there is a single function $$\hat h:X_+\to B$$ such that:


 * $$\forall x\in X, \hat h(x)= h(x); \qquad (1)$$

For each function f of arity n > 0, for each $$x_1,\ldots,x_n\in X^n_+,$$


 * $$\hat h(f(x_1, \ldots, x_n)) = g(\hat h(x_1),\ldots,\hat h(x_n)), \text{ where } g=d(f) \qquad (2)$$



Consequence
The identities seen in (1) e (2) show that $$\hat h$$ is an homomorphism, specifically named the unique homomorphic extension of $$h$$. To prove the theorem, two requirements must be met: to prove that the extension ($$\hat h$$) exists and is unique (assuring the lack of bijections).

Proof of the theorem
We must define a sequence of functions $$ h_i:X_i\to B $$ inductively, satisfying conditions (1) and (2) restricted to $$X_i$$. For this, we define $$h_0=h$$, and given $$h_i$$ then $$h_{i+1}$$shall have the following graph:


 * $${\{(f(x_1,\ldots,x_n),g(h_i(x_1),\ldots,h_i(x_n))) \mid (x_1,\ldots,x_n)\in X^n_i - X^n_{i-1},f\in F\}} \cup {\operatorname{graph}(h_i)} \text{ with } g=d(f)$$

First we must be certain the graph actually has functionality, since $$X_+$$ is a free set, from the lemma we have  $$f(x_1,\ldots,x_n)\in X_{i+1} - X_i$$ when $$(x_1,\ldots,x_n)\in X^n_i - X^n_{i-1},(i\geq 0)$$, so we only have to determine the functionality for the left side of the union. Knowing that the elements of G are functions(again, as defined by the lemma), the only instance where $$(x,y)\in graph(h_i)$$ and $$(x,z)\in graph(h_i)$$ for some $$x\in X_{i+1} - X_i$$ is possible is if we have  $$ x=f(x_1,\ldots,x_m)=f'(y_1,\ldots,y_n) $$  for some $$(x_1,\ldots,x_m)\in X^m_i - X^m_{i-1},(y_1,\ldots,y_n)\in X^n_i - X^n_{i-1}$$ and for some generators $$f$$ and $${f'}$$ in $$F$$.

Since $$ f(X^m_+) $$ and $$ {f'}(X^n_+) $$  are disjoint when $$f\neq {f'},f(x_1,\ldots,x_m) = f'(y_1,\ldots,Y_n)$$ this implies $$f=f' $$ and $$ m=n$$. Being all $$f\in F $$ in $$ X^n_+$$, we must have $$x_j=y_j,\forall j,1\leq j\leq n$$.

Then we have $$y=z=g(x_1,\ldots,x_n)$$ with $$ g=d(f) $$, displaying functionality.

Before moving further we must make use of a new lemma that determines the rules for partial functions, it may be written as: (3)Be $$(f_n)_{n\geq 0}$$ a sequence of partial functions $$f_n:A\to B$$ such that $$f_n\subseteq f_{n+1},\forall n\geq 0$$. Then, $$g=(A,\bigcup graph(f_n),B)$$ is a partial function.  Using (3), $$\hat h =\bigcup_{i\geq 0} h_i$$ is a partial function. Since  $$ dom(\hat h)=\bigcup dom(h_i)=\bigcup X_i=X_+$$ then $$\hat h$$ is total in $$X_+$$.

Furthermore, it is clear from the definition of $$h_i$$ that $$\hat h$$ satisfies (1) and (2). To prove the uniqueness of $$\hat h$$, or any other function $${h'}$$ that satisfies (1) and (2), it is enough to use a simple induction that shows $$\hat h$$ and $${h'}$$ work for $$X_i,\forall i\geq 0$$, and such is proved the Theorem of the Unique Homomorphic Extension.

Example of a particular case
We can use the theorem of unique homomorphic extension for calculating numeric expressions over whole numbers. First, we must define the following:


 * $$ A=\Sigma^*$$ where $$\Sigma= \mathrm{Variables} \cup \{0,1,2,\ldots,9\} \cup \{+,-,*\} \cup \{\}, \text{ where }| *=\mathrm{Variables} \cup \{{0,\ldots,9}\}$$

Be $$F =\{{f-,f+,f*}\}$$

$$f:\Sigma^*\to \Sigma^*_{w\mapsto {-w}} $$

$$f:\Sigma^*x\Sigma^*\to \Sigma^*_{w_1,w_2\mapsto {w_1+w_2}} $$

$$f:\Sigma^*x\Sigma^*\to \Sigma^*_{w_1,w_2\mapsto {w_1*w_2}} $$

Be $$EXPR$$ he inductive closure of $$X$$ under $$F$$ and be$$B=\Z, G={\{Soma(-.-),Mult(-,-),Menos(-)}\}$$

Be $$d:F\to G$$

$$d({f-})=menos$$

$$d({f+})=mais$$

$$d({f*})=mult$$

Then $$\hat h:X_+\to\{{0,1}\}$$ will be a function that calculates recursively the truth-value of a proposition, and in a way, will be an extension of the function $$h:X\to\{{0,1}\}$$that associates a truth-value to each atomic proposition, such that:

(1)$$\hat h (\phi) = h(\phi)$$

(2)$$\hat h({(\neg\phi)})=NAO(\hat h(\psi))$$ (Negation)

$$\hat h({(\rho\land \theta)})= E(\hat h(\rho),\hat h(\theta))$$ (AND Operator)

$$\hat h({(\rho\lor \theta)})= OU(\hat h(\rho),\hat h(\theta))$$ (OR Operator)

$$\hat h({(\rho\to \theta)})= SE\,ENTAO(\hat h(\rho),\hat h(\theta))$$ (IF-THEN Operator)