Hello, given a (semi)group [tex]A[/tex] and a sub-(semi)group [tex]S\leq A[/tex], I want to define a morphism [tex]f:A\rightarrow A[/tex] such that [tex]f(s)\in S[/tex], for every [tex]s \in S[/tex]. Essentially it is an ordinary morphism, but for the elements in [tex]S[/tex] it has to behave as an endomorphism. Is this a known concept? does it have already a name? or can it be expressed more compactly?