Analytic function avoiding elements of the modular group A friend recently told me the following two facts, for which he cannot recall a proof or a reference
(but he remembers seeing them in the literature):


*

*Let $f$ be a holomorphic function mapping the upper half-plane $H$ into itself. Let $G$ be the
group of fractional linear transformations $(az+b)/(cz+d)$ where $ad-bc=1$, $a,d$ are odd integers
and $b,c$ are even integers. Suppose that for every $g\in G$ and for every $z\in H$,
$f(z)$ is not equal to $g(z)$. Then $f$ is fractional-linear. (Or maybe such $f$ just does not exist).

*Let $f$ be the same as before. Suppose that for all integers $m,n$ and all $z\in H$
we have $f(z)\neq mz+n$. Then $f$ is fractional-linear.
I will appreciate any relevant reference or any other information. 
EDIT: There is no $f\in Aut(H)$ that satisfies the condition of Problem 1. This implies that $f$ constructed by
 Aakumadula is NOT fractional-linear.
To prove this, we write $(az+b)/(cz+d)=(xz+y)/(uz+t)$, where $a,b,c,d$ are given real numbers,
and we want to find integers $x,y,u,t$, where $x,t$ are odd, and $y,u$ are even, so that this has non-real roots
$z$. This is to show that certain quadratic form in $a,b,c,d$ is indefinite. And this is performed
by an elementary calculation.
 A: Concerning question 2 see  Earle, Clifford J. On holomorphic families of pointed Riemann surfaces. Bull. Amer. Math. Soc. 79 (1973), 163–166 and Theorem 3 there. 
A: This is an answer to part of question 1. Such a function $f:H \rightarrow H$ does exist. To see this, let $z\in H$ and $P(w)$ be the meromorphic function on the plane which is the Weierstrass $P$ function corresponding to the lattice $L_z= {\mathbb Z}\oplus {\mathbb Z}z\quad$. I wish to add that $P(w)=P(w,z)\quad$ is a function of two variables. Let 
$x(w)= \frac{P(w)-P(1/2)}{P(z/2)-P(1/2)}=x(w,z)\quad$,  and $y(w)$  a suitable multiple of $P'(w)$.   Then we have the Legendre form of the equation of the elliptic curve
$$y^2=x(x-1)(x-\lambda (z)),$$
where $\lambda :H \rightarrow {\mathbb P}^1\setminus \{0,1,\infty \} \quad$ is the Picard covering map. The deck transformation group is precisely $G$ (modulo $\pm 1\quad$). 
Then, by the properties of the elliptic function $P(w)$, the function $P(w)-P(1/2)\quad$ has a double zero at the $2$ division point $1/2$ and hence does not vanish anywhere else. Similarly for $z/2$ and $(1+z)/2\quad$. Consequently, if we specialise $w=z/3$, then the function $x(z/3)$ does not take the value $0,1,\lambda (z) \quad$. By the lifting criterion, $$x(z/3)=x(z/3,z)= \lambda (f(z)) $$ 
for some $f:H \rightarrow H \quad $. Clearly, $f(z)\neq g(z)\quad$ for any $z\in H\quad$ and for any $g\in G\quad $ where $G$ is the congruence subgroup of level $2$, since their lambda values are distinct. 
A: Here is a slightly different version of   Venkataramanas answer to my question.
Let's say that $f$ omits $g$ if $f(z)$ is never equal to $g(z)$.
Let $G$ be the group of fractional linear transformations such that the unit disc $U$ modulo $G$
is C\ { 0,1 } . (Can anyone suggest a short and recognizable name for this group??
This is a truly fundamental object of complex analysis, and the shortest name for it
that I know is the "principal congruence subgroup of level 2 of the modular group".
Sounds scary for many people).  
Proposition. TFAE: There exists $f$ holomorphic in $U$ that omits $0,1,\infty$ and $\lambda(z)$,
and: there exists $g: U\to U$ that omits all elements of $G$.
Proof. $f=\lambda\circ g$.
Now it is well-known that there exists $f$ holomorphic in $U$ which omits $0,1,\infty$ and $\lambda$.
This is by "extension of holomorphic families of injections" of Slodkowski.
The theorem of Slodkowski says that whenever you have any number of holomorphic functions in $U$
with disjoint graphs, you can add one whose graph is disjoint from those given functions.
And even prescribe the value of this one added function at one point.
Of course,  Venkataramana's answer is better because it gives an explicit construction.
This new answer shows that this is a special case of a well-known and important general principle. 
Somehow I did not figure this out before the Aakumadula's answer.
EDIT on Feb 19 2013. Multi-valued function $f(z)=\sqrt{z}$ omits $0,1,\infty$ and
$f(z)=z$ has no solutions in $C\backslash${0,1}. Thus the composition of $f$ with the universal cover {$\{ |z|<1\}$} to $C\backslash${0,1} omits $0,1,\infty$ and all elements
of the Schwarz's group.
A: I think the idea is the Big Picard theorem.
There is a similar problem I think in Halmos (Problems for Mathematicians Young and Old), concerning $z$, $f(z)$, and $f(f(z))$ being always distinct (it is phrased as saying that $f\circ f$ has no fixed points maybe). Then one shows $f$ is a translation. You go by forming the function $g(z)={f(f(z))-z\over f(z)-z}$ or the like, which now omits 0, 1, and $\infty$ from its image. After messing around (consider $g'(z)$ somehow?) this should give the desired result.
Your problems seem of a similar flavor.
