[proofplan]
We prove Hartogs's theorem for $n = 2$ and then deduce the general case by induction. The proof proceeds in three stages. First, we use the [Baire category theorem](/page/Baire%20Category%20Theorem) to find an open region where $f$ is locally bounded: the disc $\mathbb{D}(a_2, r_2)$ is covered by the closed sets $E_m = \{z_2 : |f(z_1, z_2)| \leq m \text{ for all } z_1 \in \mathbb{D}(a_1, r_1)\}$, so some $E_m$ has non-empty interior. Second, on the product of $\mathbb{D}(a_1, r_1)$ with this interior, $f$ is locally bounded and separately holomorphic, so [Osgood's Lemma](/theorems/3379) gives joint holomorphicity. Third, we propagate joint holomorphicity to the full polydisc using the one-variable [Cauchy integral formula](/theorems/345) and the [identity principle](/theorems/3357).
[/proofplan]
[step:Reduce to the case $n = 2$]
We prove the theorem for $n = 2$. The general case follows by induction on $n$: if $f: \Omega \to \mathbb{C}$ is separately holomorphic on an [open set](/page/Open%20Set) $\Omega \subset \mathbb{C}^n$ with $n \geq 3$, then for each fixed $z_n$, the function $(z_1, \dots, z_{n-1}) \mapsto f(z_1, \dots, z_{n-1}, z_n)$ is separately holomorphic in $n - 1$ variables on the slice $\Omega_{z_n} = \{(z_1, \dots, z_{n-1}) : (z_1, \dots, z_n) \in \Omega\}$. By the inductive hypothesis, this function is jointly holomorphic in $(z_1, \dots, z_{n-1})$. Since $f$ is also holomorphic in $z_n$ for fixed $(z_1, \dots, z_{n-1})$, the function $f$ is separately holomorphic in the pair $((z_1, \dots, z_{n-1}), z_n) \in \mathbb{C}^{n-1} \times \mathbb{C}$. Applying the $n = 2$ case (with $\mathbb{C}^{n-1}$ playing the role of the first variable and $\mathbb{C}$ the second) gives joint holomorphicity.
For the remainder of the proof, let $n = 2$ and let $f: \Omega \to \mathbb{C}$ be separately holomorphic on a connected [open set](/page/Open%20Set) $\Omega \subset \mathbb{C}^2$.
[/step]
[step:Apply the Baire category theorem to find a region where $f$ is bounded]
Fix a polydisc $\mathbb{D}^2(a, r) = \mathbb{D}(a_1, r_1) \times \mathbb{D}(a_2, r_2)$ with $\overline{\mathbb{D}^2(a, r)} \subset \Omega$. For each positive integer $m$, define
\begin{align*}
E_m &:= \{z_2 \in \mathbb{D}(a_2, r_2) : |f(z_1, z_2)| \leq m \text{ for all } z_1 \in \overline{\mathbb{D}(a_1, r_1)}\}.
\end{align*}
[claim:Each $E_m$ is closed in $\mathbb{D}(a_2, r_2)$]
Let $(z_2^{(k)})_{k \geq 1}$ be a sequence in $E_m$ converging to some $z_2^{(\infty)} \in \mathbb{D}(a_2, r_2)$. For each fixed $z_1 \in \overline{\mathbb{D}(a_1, r_1)}$, the function $z_2 \mapsto f(z_1, z_2)$ is holomorphic in $z_2$ (by separate holomorphicity), hence continuous. Therefore
\begin{align*}
|f(z_1, z_2^{(\infty)})| = \lim_{k \to \infty} |f(z_1, z_2^{(k)})| \leq m,
\end{align*}
so $z_2^{(\infty)} \in E_m$.
[/claim]
[proof]
Immediate from the continuity argument above.
[/proof]
[claim:$\mathbb{D}(a_2, r_2) = \bigcup_{m=1}^{\infty} E_m$]
For each fixed $z_2 \in \mathbb{D}(a_2, r_2)$, the function $z_1 \mapsto f(z_1, z_2)$ is holomorphic on $\mathbb{D}(a_1, r_1)$ and hence continuous on the compact set $\overline{\mathbb{D}(a_1, r_1)}$. By the extreme value theorem, $\sup_{z_1 \in \overline{\mathbb{D}(a_1, r_1)}} |f(z_1, z_2)| < \infty$, so $z_2 \in E_m$ for some sufficiently large $m$.
[/claim]
[proof]
Immediate from the compactness argument above.
[/proof]
The disc $\mathbb{D}(a_2, r_2)$ is a [complete metric space](/page/Complete%20Metric%20Space) (as an open subset of $\mathbb{C}$, it is completely metrizable). By the [Baire Category Theorem](/theorems/???), a complete [metric space](/page/Metric%20Space) cannot be expressed as a countable union of closed sets with empty interior. Since $\mathbb{D}(a_2, r_2) = \bigcup_m E_m$ and each $E_m$ is closed, at least one $E_{m_0}$ has non-empty interior. Let $V \subset E_{m_0}$ be a non-empty open disc contained in $\mathbb{D}(a_2, r_2)$.
[guided]
We need to find a region where $f$ is bounded, so that we can invoke [Osgood's Lemma](/theorems/3379). The challenge is that a separately [holomorphic function](/page/Holomorphic%20Function) has no a priori bound on any polydisc — we have no uniform control over how $f$ grows. The [Baire category theorem](/theorems/630) is the tool that forces at least one "good" region where boundedness holds.
Fix a polydisc $\mathbb{D}^2(a, r) = \mathbb{D}(a_1, r_1) \times \mathbb{D}(a_2, r_2)$ with $\overline{\mathbb{D}^2(a, r)} \subset \Omega$. For each positive integer $m$, define the sublevel set
\begin{align*}
E_m &:= \{z_2 \in \mathbb{D}(a_2, r_2) : |f(z_1, z_2)| \leq m \text{ for all } z_1 \in \overline{\mathbb{D}(a_1, r_1)}\}.
\end{align*}
The idea is to slice the problem by the second variable: for each $z_2$, we ask whether $f(\cdot, z_2)$ is uniformly bounded by $m$ over the closed disc $\overline{\mathbb{D}(a_1, r_1)}$ in the first variable. The sets $E_m$ are nested: $E_1 \subset E_2 \subset \cdots$.
**Each $E_m$ is closed in $\mathbb{D}(a_2, r_2)$.** Let $(z_2^{(k)})_{k \geq 1}$ be a sequence in $E_m$ converging to some $z_2^{(\infty)} \in \mathbb{D}(a_2, r_2)$. For each fixed $z_1 \in \overline{\mathbb{D}(a_1, r_1)}$, the function $z_2 \mapsto f(z_1, z_2)$ is holomorphic in $z_2$ by separate holomorphicity, and holomorphic functions are continuous. Therefore
\begin{align*}
|f(z_1, z_2^{(\infty)})| = \lim_{k \to \infty} |f(z_1, z_2^{(k)})| \leq m,
\end{align*}
where the inequality holds because each $z_2^{(k)} \in E_m$. Since this bound holds for every $z_1 \in \overline{\mathbb{D}(a_1, r_1)}$, we conclude $z_2^{(\infty)} \in E_m$, so $E_m$ is closed.
**The sets $E_m$ cover $\mathbb{D}(a_2, r_2)$: $\mathbb{D}(a_2, r_2) = \bigcup_{m=1}^{\infty} E_m$.** For each fixed $z_2 \in \mathbb{D}(a_2, r_2)$, the function $z_1 \mapsto f(z_1, z_2)$ is holomorphic on $\mathbb{D}(a_1, r_1)$ and hence continuous on the compact set $\overline{\mathbb{D}(a_1, r_1)}$. By the extreme value theorem, $\sup_{z_1 \in \overline{\mathbb{D}(a_1, r_1)}} |f(z_1, z_2)| < \infty$, so $z_2 \in E_m$ for some sufficiently large $m$. Since $z_2$ was arbitrary, the union covers the full disc.
Now we apply the [Baire Category Theorem](/theorems/???). The disc $\mathbb{D}(a_2, r_2)$ is an open subset of $\mathbb{C}$, hence a Polish space (separable, completely metrizable), and in particular a [complete metric space](/page/Complete%20Metric%20Space). The [Baire category theorem](/page/Baire%20Category%20Theorem) states that a complete [metric space](/page/Metric%20Space) cannot be expressed as a countable union of closed sets with empty interior. We have $\mathbb{D}(a_2, r_2) = \bigcup_m E_m$ and each $E_m$ is closed, so not all $E_m$ can have empty interior — at least one $E_{m_0}$ must contain a non-empty [open set](/page/Open%20Set). Let $V \subset E_{m_0}$ be a non-empty open disc contained in $\mathbb{D}(a_2, r_2)$.
What does this give us? On the product $\mathbb{D}(a_1, r_1) \times V$, the function $f$ satisfies $|f(z_1, z_2)| \leq m_0$ for all $z_1 \in \overline{\mathbb{D}(a_1, r_1)}$ and all $z_2 \in V$. In other words, $f$ is bounded on this product — exactly the hypothesis we need for [Osgood's Lemma](/theorems/3379).
Why is the Baire category argument necessary? Because we have no a priori control on the growth of $f$. A separately [holomorphic function](/page/Holomorphic%20Function) can, in principle, be unbounded on every polydisc (before we know it is jointly holomorphic). The Baire theorem forces at least one "good" slice where boundedness holds, and this single bounded region is the foothold from which we propagate holomorphicity to all of $\Omega$.
[/guided]
[/step]
[step:Apply Osgood's Lemma on the bounded region to obtain joint holomorphicity there]
On the [open set](/page/Open%20Set) $U := \mathbb{D}(a_1, r_1) \times V \subset \Omega$, the function $f$ is separately holomorphic (by hypothesis) and bounded: $|f(z_1, z_2)| \leq m_0$ for all $(z_1, z_2) \in U$ (since $V \subset E_{m_0}$). In particular, $f$ is locally bounded on $U$. By [Osgood's Lemma](/theorems/3379), $f \in \mathcal{O}(U)$.
Joint holomorphicity on $U$ implies in particular that $f$ is continuous on $U$.
[/step]
[step:Propagate holomorphicity to the full polydisc via the Cauchy integral]
Fix $z_2^{(0)} \in V$ and choose $\rho > 0$ such that $\overline{\mathbb{D}(z_2^{(0)}, \rho)} \subset V$. For each $z_1 \in \mathbb{D}(a_1, r_1)$, the function $z_2 \mapsto f(z_1, z_2)$ is holomorphic on $\mathbb{D}(a_2, r_2)$. By the one-variable Cauchy formula applied in $z_2$ on the disc $\mathbb{D}(z_2^{(0)}, \rho)$:
\begin{align*}
f(z_1, z_2) &= \frac{1}{2\pi i} \oint_{|\zeta_2 - z_2^{(0)}| = \rho} \frac{f(z_1, \zeta_2)}{\zeta_2 - z_2}\, d\zeta_2, \quad \text{for all } z_2 \in \mathbb{D}(z_2^{(0)}, \rho).
\end{align*}
On the circle $|\zeta_2 - z_2^{(0)}| = \rho$, we have $\zeta_2 \in V \subset E_{m_0}$, so $(z_1, \zeta_2) \in U$ and $f$ is jointly holomorphic (hence jointly continuous) at $(z_1, \zeta_2)$. The integrand $(z_1, z_2) \mapsto \frac{f(z_1, \zeta_2)}{\zeta_2 - z_2}$ is holomorphic in $z_1$ for each fixed $\zeta_2$ (by separate holomorphicity of $f$), and the bound $|f(z_1, \zeta_2)| \leq m_0$ justifies differentiation under the integral sign with respect to $z_1$ as in the proof of [Osgood's Lemma](/theorems/3379). Therefore the Cauchy integral defines a function holomorphic in both $z_1$ and $z_2$ on $\mathbb{D}(a_1, r_1) \times \mathbb{D}(z_2^{(0)}, \rho)$.
Since this function agrees with $f$ (by the Cauchy integral representation), $f$ is jointly holomorphic on $\mathbb{D}(a_1, r_1) \times \mathbb{D}(z_2^{(0)}, \rho)$.
[/step]
[step:Extend to all of $\Omega$ by connectedness]
Define $S := \{z \in \Omega : f \text{ is holomorphic in a neighbourhood of } z\}$. By the preceding steps, $S$ contains the [open set](/page/Open%20Set) $\mathbb{D}(a_1, r_1) \times V$, so $S \neq \varnothing$. The set $S$ is open by definition.
We show $S$ is also closed in $\Omega$. Let $w = (w_1, w_2) \in \Omega$ be a limit point of $S$. Choose a polydisc $\mathbb{D}^2(w, s) \subset \Omega$. Since $w$ is a limit point of $S$, there exists a point $p \in S \cap \mathbb{D}^2(w, s)$. At $p$, $f$ is jointly holomorphic, hence continuous. Repeat the Baire category argument of the preceding steps on $\mathbb{D}^2(w, s)$: for each $m \geq 1$, define $E_m' = \{z_2 \in \mathbb{D}(w_2, s_2) : |f(z_1, z_2)| \leq m \text{ for all } z_1 \in \overline{\mathbb{D}(w_1, s_1)}\}$. The same reasoning gives an [open set](/page/Open%20Set) $V' \subset \mathbb{D}(w_2, s_2)$ on which $f$ is bounded, and [Osgood's Lemma](/theorems/3379) gives $f \in \mathcal{O}(\mathbb{D}(w_1, s_1) \times V')$. The Cauchy integral propagation argument then extends holomorphicity to all of $\mathbb{D}^2(w, s)$, so $w \in S$.
Since $\Omega$ is connected and $S$ is non-empty, open, and closed in $\Omega$, we conclude $S = \Omega$. Therefore $f \in \mathcal{O}(\Omega)$.
[/step]