Reading the proof of the Hales-Jewett theorem the author defines $W\_L$ as the set
of finite words over some alphabet $L$, $W\_{L\_v}$ as the set of variable-words
over $L$, i.e. finite words over $L \cup \{v\}$ where $v \notin L$ and $v$ occurs
at least once, $S = W\_L \cup W\_{L\_v}$ and the substitution map from $S$ into $W\_L$
obtained by replacing every occurrence of $v$ in the word by some $\lambda \in L$


Consider $(S, ^\frown)$ as a discrete topological space with the concatenation
operation and let $\left(\beta S, ^\frown \right)$ be the space of ultrafilters
over $S$ (the Stone–Čech compactification of $S$) with the operation given by $$\mathcal{U} ^\frown \mathcal{V} = \left\{ A \subseteq S | \left\{x \in S | \left\{y \in S | x ^\frown y \in A \right\} \in \mathcal{V} \right\} \in \mathcal{U} \right\}$$


Let $S\_{L}^{\*} = \left\{\mathcal{U} \in S^{\*}: W\_{L} \in \mathcal{U}\right\}$ and $S\_{L}^{\*} = \left\{\mathcal{U} \in S^{\*}: W\_{L v} \in \mathcal{U}\right\}$


at the beginning of the proof the author asserts:



> 
> Each letter $\lambda \in L$ determines the substitution map $x \mapsto x[\lambda]$ from $W\_{L v} \cup W\_{L}$ into $W\_{L},$ which is clearly the identity on $W\_{L}$ and which extends to a continuous homomorphism $\mathcal{U} \mapsto \mathcal{U}[\lambda]$ from $S\_{L v}^{\*} \cup S\_{L}^{\*}$ into $S\_{L}^{\*}$, which is the identity on $S\_{L}^{\*}$
> 
> 
> 


I'm assuming that the extension is given by the universal property of the
Stone–Čech compactification of $S$ since you can suppose that the substitution map
is continuous and has domain in $S$ and codomain in $\beta S$. I can easily verify that the extension is a continuous function that maps $S\_{L v}^{\*} \cup S\_{L}^{\*}$ into $S\_{L}^{\*}$ and that it is the identity on $S\_{L}^{\*}$ using the fact that the
extension given by the Stone–Čech compactification is


$$ \mathcal{U}[\lambda] = \left\{ B \subseteq S | \exists A \in \mathcal{U} \left( A[\lambda] \subseteq B \right) \right\}$$


I've been trying to prove that the extension is a homomorphism using the above equality but it gets very cumbersome and it is not clear how to prove it, I know that one inclusion would prove the equality (since they are ultrafilters) but i can't prove either of the two so I think that is not the way to prove it, a hint would help me a lot



The extension of the substitution map of the semigroup of variable words to its Stone–Čech compactification is a homomorphism
As I mentioned in comments, I will prove a more general fact: that for any for any semigroup homomorphism $f\colon S→T$, its extension $βf\colon βS→βT$ is a continuous homomorphism of topological semigroups. Here, I use the definitions


$$f(\mathcal{U}) = \{ A \subseteq 
T: f^{-1}(A) \in \mathcal{U} \}$$


and, using ultrafilter quantifiers $\mathcal{U}x\ \varphi(x) \iff \{ x : \varphi(x) \} \in \mathcal{U}$,


$$\mathcal{U} \oplus \mathcal{V} = \{ A \subseteq S: \mathcal{U}x\ \mathcal{V}y\ (x+y \in A) \}$$


First, as a lemma, we observe that $f(\mathcal{U})x\ \varphi(x)$ and $\mathcal{U}x\ \varphi\big( f(x) \big)$ are equivalent, as


$\begin{align}
f(\mathcal{U})x\ \varphi(x) &\iff \{ x: \varphi(x) \} \in f(\mathcal{U}) \\
&\iff f^{-1}\{ x: \varphi(x) \} \in \mathcal{U} \\
&\iff \big\{ x: \varphi\big(f(x) \big) \big\} \in \mathcal{U} \\
&\iff \mathcal{U}x\ \varphi\big( f(x) \big)
\end{align}$


You previously noted that $\beta f$ is already continuous - this is essentially by definition. That $\beta f$ is a semigroup homomorphism now follows from a bit of algebra:


$\begin{align}
f(\mathcal{U} \oplus \mathcal{V}) &= \big\{ A \subseteq T: f^{-1}(A) \in \mathcal{U} \oplus \mathcal{V} \big\} \\
&= \big\{ A \subseteq T: \mathcal{U}x\ \mathcal{V}y\ \big(x+y \in f^{-1}(A) \big) \big\} \\
&= \big\{ A \subseteq T: \mathcal{U}x\ \mathcal{V}y\ \big(f(x+y) \in A \big) \big\} \\
&= \big\{ A \subseteq T: \mathcal{U}x\ \mathcal{V}y\ \big( f(x) + f(y) \in A \big) \big\} \\
&= \big\{ A \subseteq T: f(\mathcal{U})x\ f(\mathcal{V})y\ \big( x + y \in A \big) \big\} && \text{by lemma} \\
&= f(\mathcal{U}) \oplus f(\mathcal{V})
\end{align}$




---


Now, that the substitution map $\mathcal{U} \mapsto \mathcal{U}[\lambda]$ is a homomorphism on ultrafilters follows from the substitution map $v \mapsto v[\lambda]$ on words being a homomorphism. Hopefully you can convince yourself of that...


