Morera gluing lemma across a straight line (source code)

= Morera gluing lemma across a straight line

Let $U\subseteq\mathbb C$ be <open>, let $L$ be a straight line, and let $f:U\to\mathbb C$ be <continuous> on $U$ and <holomorphic> on $U\setminus L$. Then $f$ is <holomorphic> on all of $U$. Near a point of $L$, work in a disk whose closure lies in $U$. Split a small filled triangle along $L$ and triangulate the two resulting convex polygons. Translate each triangle slightly into its corresponding open half-plane, keeping it in $U$. Its <contour integral> is zero by <Cauchy's integral theorem>. On each segment the <integral> is the endpoint difference times the integral of $f$ along the unit-interval parametrization; <uniform continuity> on a containing <compact> disk therefore makes the <contour integral> continuous as the vertices move back. Each untranslated piece consequently has zero integral. Internal oriented edges cancel when the pieces are added, so every small triangle has zero integral. <Morera's theorem> proves the claim locally along the line. The continuity across $L$ is essential; holomorphicity on the two sides alone is insufficient.