Proof of Group Theory Relation - Fixed Point Sets I was wondering if anyone could help me with a proof of the following Theorem.  It is merely listed as a statement in my book...

Let $A$ and $C$ be finite sets, and let $G$ be a group of permutations of $A$. For any $f$ that exists in $C^A$ and $\pi$ that exists in $G$, it follows that $\pi(f) = f$ if and only if $f$ is constant on every cycle of $\pi$. 


I was thinking somewhere along the lines of this:
Take any permutation $\pi$ of $[n]$, where the permutation is either cycled or not. Fix some $i$ in $\pi$ in the permutation. Thus $\pi=(i)(1\dots n-1)$. It follows that, if $f(i) = i$, then $\pi(i) = i$, as $i$ is fixed.
If i is not fixed in some cycle permutation of $\pi$, e.g. $\pi=(i 2)(1\dots n-2)$, then it is necessarily so that $\pi(i) = 2,$ and . Thus, for the above statement to be valid, i must be fixed for all cycles of $\pi$. 
===
Logically the statement makes sense, but an actual proof help out a lot! Thanks
 A: $$\pi(f)\neq f \iff \exists a\in A:f(\pi(a))\neq f(a) \iff \exists \text{ cycle }(a_1 a_2 \cdots a_k)\in\pi,\,\, i\le k:f(a_i)\neq f(a_{i+1})$$
A: Let $\pi$ be a permutation of $A$, and $f$ a function from $A$ to $C$.  By $\pi(f)$, I assume you mean the function that maps $\pi(a)$ to $f(a), a \in A$, i.e. it is the function obtained by applying $f$ to $A$ after permuting the elements in the domain $A$ by $\pi$.  
So $f: a \mapsto f(a), f: \pi(a) \mapsto f(\pi(a)), \pi(f): \pi(a) \mapsto f(a)$.  From the latter two maps, observe that $\pi(f)=f$ iff $f(\pi(a))=f(a), \forall a \in A$.  Suppose $\pi$ contains the cycle $(\alpha_1,\alpha_2,\ldots)$.  If $f(\alpha_1) \ne f(\alpha_2)$, then $f(\alpha_1) \ne f(\pi(\alpha_1))$, whence $f \ne \pi(f)$. Conversely, if  $f(\alpha_1) = f(\alpha_2)$, then $f(\alpha_1) = f(\pi(\alpha_1))$, and similarly if $f$ is constant on each cycle, then $f(a)=f(\pi(a)), \forall a \in A$.
A: I suppose $\pi(f)$ is defined as $f\circ\pi^{-1}: A\to C$ (the inverse is to get a proper left-action on $C^A$). Then $\pi(f)=f$ means that for all $x\in A$ one has $\pi(f)(x)=f(x)\iff f(\pi^{-1}(x))=f(x)$; taking $x=\pi(a)$ this implies
$$
  f(a)=f(\pi(a))\qquad\text{for all $a\in A$}
$$
(this is actually equivalent to $\pi(f)=f$ since every $x\in A$ equals $\pi(a)$ for some $a\in A$). Iterating one gets $f(a)=f(\pi^i(a))$ for all integers$~i$, which means that $f$ is constant on $\pi$-orbits (cycles). Conversely that property also ensures that $\pi(f)=f$.
