Is Morera's theorem the inverse theorem of Goursat's theorem?

While I’m reading Complex Analysis by Elias M.Stein, I found that there must be some relations between Goursat’s theorem and Morera’s theorem. According to Stein, the 2 theorems are as following:

Goursat’s theorem: If $\Omega$ is an open set in $\mathbb{C}$, and T $\subset \Omega$ a triangle whose interior is also contained in $\Omega$, then
whenever f is holomorphic in $\Omega$.

Morera’s theorem: Suppose $f$ is a continuous complex-valued function in the open disc $D$ in $\Bbb{C}$ such that for any triangle $T$ with its interior in $D$ we have:
then $f$ is holomorphic.

As far as I’m concerned, Morera’s theorem is the inverse theorem of Goursat’s theorem. I mean, the former tells us a property of the holomorphic functions, while the latter tells us how to determine a function is holomorphic or not, is it right?
And, what’s the difference between open set $\Omega$ and open disc $D$ here? Are they interchangeable without the result changing? Please help me.

Solutions Collecting From Web of "Is Morera's theorem the inverse theorem of Goursat's theorem?"

Morera’s theorem, when properly(1) stated, is indeed the exact converse of Goursat’s theorem.

Theorem (Morera): Let $\Omega\subset\mathbb{C}$ open, and $f\colon\Omega\to\mathbb{C}$ a continuous function. If for all triangles $T\subset\Omega$ whose interior is also contained in $\Omega$ $$\int_T f(z)\,dz = 0,$$ then $f$ is holomorphic in $\Omega$.

Instead of triangles, one could of course also use rectangles, or other polygons. And actually, we could drop the condition that the interior of the triangle be contained in $\Omega$ and be left with a still true, but arguably less useful result, since we would then have a sufficient but not necessary condition (consider $1/z$ on $\mathbb{C}\setminus \{0\}$ to have function satisfying the condition as stated, but not the stronger condition one obtains by dropping “whose interior is also contained in $\Omega$”).

The condition entails the existence of local primitives of $f$, i.e. every $z\in \Omega$ has a neighbourhood $U$ such that $f = F’$ for a holomorphic function $F$ on $U$. Thus $f$ is holomorphic on $U$ (the derivative of a holomorphic function is again holomorphic), and since holomorphicity is a local property, $f$ is holomorphic on $\Omega$.

To establish the existence of local primitives, one considers (for example) for $z_0 \in \Omega$ a disk $U = D_r(z_0) \subset \Omega$, and on $U$ the function $F(z) = \int_{z_0}^z f(\zeta)\,d\zeta$. The vanishing of the integral of $f$ over triangles whose interior is contained in $\Omega$ then yields $F(z) – F(w) = \int_w^z f(\zeta)\,d\zeta$, from which $F’ = f$ follows with the continuity of $f$.

(1) The term “properly” means “properly for this purpose”, or “adequately to show it is the converse of Goursat’s theorem” here. Stating it for simply connected domains or disks is not wrong.

There is one downside to stating it explicitly for simply connected domains, however. Often, people aren’t aware of the local character of the theorem, and consider the simple connectedness as essential for the validity of the theorem. The essential point is the locality, that one considers not the entire domain $\Omega$, but a small convex neighbourhood $U\subset \Omega$ of a point $z\in \Omega$ to construct the local primitive.