How does stokes theorem generalize to sets rather than manifold. I learned the Stokes theorem in the context of differential topology, it says that if I have a $n-1$ form $w$ with compact support on an oriented smooth n-manifold, then $
\int_{\partial M} w = \int_M dw$. However I was asked to prove the following fact using the stokes theorem: given a compact set $K \subset \mathbb C$, and a holomorphic function on $\mathbb C$, $\int_{ \partial K} f =0 $, how should I use the stokes theorem since $K$ here is necessarily a manifold? May be it involves arguing that $\partial K$ can be realized as the boundary of some manifold?
 A: The result is true if we suppose that a compact set $K$ is a smooth oriented 2-manifold over $\mathbb{C}$, and that it's boundary, $\partial K$, is a smooth 1-manifold. Then we are integrating the 1-form $w = f(z)dz$, whose exterior derivative is known to be $0$ (because $f$ is holomorphic).
We can, without loss of generality, suppose that $K$ is connected. Being compact, $K$ is also closed and limited. Now, if we can prove that the boundary points of $K$ (topological boundary points, not the same thing as the boundary of a manifold) form a connected subset (which I believe to be true), then the theorem should become true under the following two hypothesis:


*

*$K$ doesn't have an empty interior

*Every open ball centered on a boundary point of $K$ intersects an interior point of $K$


Actually, (2) implies (1), but I'm leaving it there to emphasize it. I think that using this hypothesis, we can prove that $K$ is actually a (sufficiently smooth) 2-manifold. (1) rules out the example $K = \{x + 0i \in \mathbb{C}| x \in [0,1]\}$ that I gave on the comments, and (2) rules out other weird compact sets such as:
$K = \{z \in \mathbb{C} | |z + 1| \leq 1\} \cup \{x + 0i \in \mathbb{C}| x \in [0,1]\}$
The set above is the union of the closed disk centered on $z = -1$ and radius $1$ with the real line segment $[0, 1]$. The first part can be realized as a smooth oriented 2-manifold and satisfies property (2), while the second one can't. This is still informal though, I'm not sure how laborious or technical it is to prove
Theorem Every non-empty compact set $K$ satisfying (1) and (2) can be realized as a smooth oriented 2-manifold over $\mathbb{C}$.
EDIT: Maybe even this won't be enough - try to imagine the unitary disk $|z| \leq 1$, but create a perturbation on it's boundary using something like the Weierstrass function, a function continuous everywhere but differentiable nowhere. It may even be a continuous manifold, but I don't think it will be differentiable, let alone smooth enough.
EDIT2: It is true that the interior points of $K$ form a differentiable oriented 2-manifold (they are simply a submanifold of $\mathbb{C}$). It's boundary is precisely the closure of it's interior, which is contained in $K$ (and if $K$ satisfies (2), it is all of $K$). It doesn't need however to be a smooth nor even a differentiable manifold - google Koch Snowflake , center it on the origin and let it be your $K$. Stronger hypothesis are needed then, and I think this can't be done with nothing less than "supposing $K$ satisfies (2) and it's boundary points are a smooth 1-manifold".
