Schwarz reflection principle for meromorphic functions I'm trying to work on this exercise from Conway's Complex Analysis textbook (Exercise 3, Chapter 9, Section 1). Here $G$ denotes a symmetric region, $G_+$ the points of $G$ above the real axis and $G_0$ the points of $G$ on the real axis.

Let $f\colon G_+ \cup G_0 \to \mathbb{C}_\infty$ be a continuous function such that $f$ is meromorphic on $G_+$. Also suppose that $f(x) \in \mathbb{R}$ if $x \in G_0$. Show that there is a meromorphic function $g\colon G \to \mathbb{C}_\infty$ such that $g(z) = f(z)$ for $z \in G_+ \cup G_0$.

I read about using an adapted version of the Morera's theorem to prove this on Wikipedia but I have no idea what they were referring to.
I thought about trying to use the standard Morera's theorem on triangles that passed through or had a pole in its interior but had no ideia how to work on that.
Can anyone give me some hints on what to do here? Thanks in advance!
 A: The idea of the reflection principle is that you define
$$
g(z) = 
\begin{cases} 
      f(z) & z \in G_+ \\
      f(z) & z \in G_0 \\
      \overline{f(\bar z)} & z \in G_- 
   \end{cases}
$$
Now you need to prove several claims:

*

*$g$ is continuous on all of $G$

*$g$ is meromorphic on $G_+$ and $G_-$

*$g$ is holomorphic on some open set containing $G_0$.

I'll sketch the proof of the last claim in that list; the others are easier to show.
Choose an open, simply connected set $G_*$ with $G_0 \subseteq G_* \subseteq G$, but small enough so that $G_*$ doesn't contain any poles. This is possible because $f$ takes finite values on $G_0$ and $f$ is continuous, so the poles can't have a limit point in $G_0$.
Now use Morera's theorem. Choose a triangle in $G_*$. If the triangle is fully contained in $G_+$ or $G_-$ then there's no problem here; the path integral around the boundary is $0$ by Cauchy's theorem. If the triangle crosses the boundary $Im(z)=0$ then break the triangle into two smaller triangles, one in $G_+ \cup G_0$ and the other in $G_- \cup G_0$, and compute the two path integrals separately.
Say $T_-$ is the triangle intersected with $G_- \cup G_0$. Then $\int_{T_- - iy} g(z)dz = 0$ for all $y>0$ (assuming $y$ is small enough to keep this adjusted triangle inside our domain), and we have $$0 = \lim_{y \to 0 ^+} \int_{T_- - iy}g(z)dz = \lim_{y \to 0 ^+} \int_{T_-} g(z+iy)dz = \int_{T_-} f(z)dz$$
where the last step relied on $f$ being uniformly continuous on the relevant region. We have uniform continuity because $f$ is continuous on a closed, bounded set that contains the relevant region for this limit of integrals.
Use the same argument to conclude $\int_{T_+} g(z)dz = 0$. Then combining the two parts of the path, we get the conclusion we need to prove $g$ is holomorphic on $G_*$ by Morera's theorem.
