# Mapping $\mathbb{Z}_k$ into $\{d,d+1,\ldots,d+k-1\}$ preserving value $\bmod k$

I want to give a (simple) map $$f:\mathbb{Z}_k \to \{d,d+1,\ldots,d+k-1\}$$ for $$d,k \in \mathbb{N}$$ and such that $$\forall i \in \mathbb{Z}_k. f(i) \bmod k = i$$.

Is there a particularly simple way of doing this?

Goal

The goal is to formally prove that if $$f$$ is periodic with period $$k$$ then $$\sum_{m}^{m+k-1} f \; l = \sum_{m+d}^{m+d+k-1} f \; l$$. The above is the particular case $$m = 0$$.

Current solution (suggested by @kingW3)

$$f(i) = (i-d) \; mod \; k + d$$ and if $$g(j) = j \; mod \; k$$ then $$g \circ f = Id$$.

I'm interested in showing $$f \circ g = Id$$. How can I do it?

• Let $f(a+k\mathbb{Z}) = a \text{ mod } k$? – Yanko Apr 21 at 12:20
• @Yanko there $f$ is not mapping onto $\{d,d+1,\ldots,d+k-1\}$ – Javier Apr 21 at 12:31
• $f(i)=((i-d)\mod k)+d$ – kingW3 Apr 21 at 12:44
• @kingW3 seems like working, the same should work for $f:\{m,\ldots,m+k-1\} \to \{m+d,\ldots,m+d+k-1\}$ with $m \in \mathbb{N}$ right? – Javier Apr 21 at 12:57

There's only one way to map $$\Bbb{Z}_k$$ onto a set of consecutive $$k$$ integer in such a way $$f(\bar x)\equiv x\bmod k.$$ That's because in any given set $$K$$ of $$k$$ consecutive integers there's only one $$y\in D$$ satisfying the displayed congruence for any given $$\bar x$$. Thus, let $$f(\bar x)=y$$.