Different definitions for integral de Rham cohomology classes Suppose that $S$ is a compact orientable surface. In this case, the top de Rham cohomology space $H^2(S)\cong \mathbb{R}$, with the isomorphism given by integration on $2$-forms along $S$.
Now, one can define integral cohomology classes as those cohomology classes $a$ so that $\int_S a \in \mathbb{Z}$. On the other hand, one can also define integral cohomology classes as those classes corresponding to integral Cech cohomology classes $\check{H}^2(S,\underline{\mathbb{Z}})$ in the following way:
If $\omega$ is a closed $2$-form, we can find an open cover $\mathfrak{U}$ of $S$ and $1$-forms $\alpha_U$ on each $U$ so that $\omega|_U = d\alpha_U$. Now, choose functions $f_{UV}$ so that $df_{UV} = \alpha_U - \alpha_V$. The cocycle
$$
f_{UVW} = f_{UV} + f_{VW} - f_{UW}
$$
satisfies that $df_{UVW}=0$, so $f_{UVW} \in \check{H}^2(S,\underline{\mathbb{R}})$.
With this in mind, I claim that $[\omega]$ is integral if and only if one can choose $(\alpha_U)$ and $(f_{UV})$ such that $(f_{UVW}) \in \check{H}^2(S,\underline{\mathbb{Z}})$.
I want to see why these two definitions coincide. More precisely, I would like to see an explicit proof on why, given that $\int_S \omega \in \mathbb{Z}$, I can choose the $f_{UV}$ so that $f_{UVW} \in \mathbb{Z}$. Please, I prefer an explicit proof of this fact, rather than invoking Poincaré Duality/de Rham theorem.
 A: $\def\RR{\mathbb{R}}\def\ZZ{\mathbb{Z}}$I've considered assigning this when I've taught sheaf cohomology but it always seemed a little too hard. Let's see if I can do it. I'll be a little more general while I am at it and do the case of a smooth compact oriented $n$-fold. Choose a triangulation $S$ of the $n$-fold; let $F_j$ be the set of $j$-dimensional faces.
For each vertex $u \in F_0$, let $U(u)$ be the star shaped open neighborhood of $u$ as in the OP's answer. The $U(u)$ give an open cover of $X$. For any $u_0$, $u_1$, ..., $u_j$ in $F_0$, the intersection $U(u_0) \cap \cdots \cap U(u_j)$ is empty if $(u_0, \dots, u_j)$ are not the vertices of a face, and this intersection is a contractible open set which I'll call $U(\sigma)$ if $(u_0, \dots, u_j)$ are the vertices of a face $\sigma$ in $F_j$. Thus, the Cech complex of $\underline{\RR}$ is identified with the simplicial cohomology complex
$$\RR^{F_0} \to \RR^{F_1} \to \cdots \RR^{F_{n-1}} \overset{d_{n-1}}{\longrightarrow} \RR^{F_n}.$$
For any $n-1$ dimensional face $\tau$, there are two $n$-faces $\sigma_1$ and $\sigma_2$ containing $\tau$. Letting $e_{\tau}$ be the basis function corresponding to $\tau$, we have $d_{n-1}(e_{\tau}) = e_{\sigma_1} - e_{\sigma_2}$. (I am being sloppy about signs, but the fact that we are on an oriented manifold will make it all work out in the end.) So (using that our manifold is connected) the cokernel of $d_{n-1}$ is clearly $\RR$, and an explicit map from $\RR^{F_n}$ to the cokernel sends a function $f \in \RR^{F_n}$ to $\sum_{\sigma \in F_n} f(\sigma)$.
Let $\Omega^p$ be the sheaf of smooth $p$-forms, and let $Z^p$ be the subsheaf of closed $p$-forms. Note that $Z^0 = \underline{\RR}$, so we have just computed that $H^n(X, Z^0) \cong \RR$. The Poincare lemma gives short exact sequences $Z^p \to \Omega^p \to Z^{p+1}$ for $0 \leq p \leq n$, so we get boundary maps
$$H^0(X, Z^n) \to H^1(X, Z^{n-1}) \to \cdots \to H^n(X, Z^0) \cong \RR.\quad (\ast)$$
In the case of a surface, the OP has given explicit descriptions of these maps in his answer.
By the usual argument with partitions of unity, $H^q(X, \Omega^p)$ vanishes for $q>0$, so all these maps are isomorphisms except the first one. The first map, in turn, is surjective with kernel $d H^0(X, \Omega^{n-1})$. So the image of the first map is $H^n_{DR}(X)$, and all the other $H^q(X, Z^{n-q})$ are isomorphic to $H^n_{DR}(X)$. Our goal, given an $n$-form $\omega$, is to show that the composition of all these maps gives $\int_X \omega$.
Note that a class in $H^q(X, Z^{n-q})$ is given by a Cech representative $( \eta_{\sigma} )_{\sigma \in F_q}$, where $\eta_{\sigma}$ is a closed $(n-q)$-form on $U(\sigma)$.
Choose a regular CW subdivision $S^{\perp}$ of $X$ dual to the triangulation. That means the poset of faces of $S^{\perp}$ is dual to that of $S$ and each $j$-face $\sigma$ in $S$ crosses the dual $n-j$ face $\sigma^{\perp}$ transversely in one point. An explicit way to do this is to take the barycentric subdivision of $S$ and draw the "obvious" dual faces. If we choose an ordering of $F_0$, that gives an orientation to every face $\sigma$ of $F_q$, and then we can use the global orientation of $X$ to orient $\sigma^{\perp}$.
I claim that the composite isomorphism $(\ast)$ from $H^{q}(X, Z^{n-q})$ sends $(\eta_{\sigma})_{\sigma \in F_q}$ to
$$\sum_{\sigma \in F_q} \int_{\sigma^{\perp}} \eta_{\sigma}.$$
Let's see what this means for $q=n$. Each $\eta_{\sigma}$ is a closed $0$-form on $U(\sigma)$. A closed $0$-form is locally constant function and $U(\sigma)$ is connected, so we just have a real number for each $\sigma$ in $F_n$ and we can thus think of $\eta$ as a vector in $\RR^{F_n}$. Each $\sigma^{\perp}$ is just a point in the interior of $\sigma$. So we are just summing up the values of $\eta$ on the $n$-faces, and this is the map $\RR^{F_n} \to \RR$ that we described before.
Let's next see what this means for $q=0$. Each $\eta_{\sigma}$ is an $n$-form on $\sigma$, and the condition that $(\eta_{\sigma})$ is a Cech co-cycle says that $\eta_{\sigma}$ is the restriction of a global $n$-form $\omega$ on $X$. The $n$-faces $\sigma^{\perp}$, for $\sigma \in F_0$, partition $X$. So
$$\sum_{\sigma \in F_q} \int_{\sigma^{\perp}} \eta_{\sigma} = \sum_{\sigma \in F_q} \int_{\sigma^{\perp}} \omega|_{\sigma^{\perp}} = \int_X \omega.$$
Thus, we just need to show that, if $(\eta_{\sigma})$ represents a class in $H^q(X, Z^{n-q})$ and $\delta_q$ is the boundary map $H^q(X, Z^{n-q}) \to H^{q+1}(X, Z^{n-q-1})$, then
$$\sum_{\sigma \in F_q} \int_{\sigma^{\perp}} \eta_{\sigma} = \sum_{\tau \in F_{q+1}} \int_{\tau^{\perp}} \delta_q(\eta)_{\tau}. \quad (\dagger)$$
Whew! Okay, let's remember how the boundary map in sheaf cohomology works. Let $(\eta_{\sigma})$ be a cocycle for $H^q(X, Z^p)$. Since each $\sigma$ is contractible, we can lift each $\eta_{\sigma}$ to a $p-1$ form $\theta_{\sigma}$ with $d(\theta_{\sigma}) = \eta_{\sigma}$.  Let $\tau$ be a $q+1$ face of our triangulation. Then
$$\delta_q(\eta)_{\tau} = \sum_{\sigma \subset \tau} \pm \theta_{\sigma},$$ where the sign involves the relative orientation of $\sigma$ and $\tau$.
We want to show $(\dagger)$. Plugging in the above description of the Cech co-boundary, the right hand side is
$$\sum_{\tau \in F_{q+1}} \int_{\tau^{\perp}} \sum_{\sigma \subset \tau} \pm \theta_{\sigma}.$$
Pulling the sum out of the integral and switching order of summation, we have
$$\sum_{\sigma \in F_q} \sum_{\tau \supset \sigma}  \int_{\tau^{\perp}} \pm \theta_{\sigma}.\quad (\heartsuit)$$
Now, the subdivisions $S$ and $S^{\perp}$ are dual, so $\tau \supset \sigma$ if and only if $\sigma^{\perp} \subset \tau^{\perp}$ or, in other words, $\tau^{\perp} \subset \partial(\sigma^{\perp})$. All the signs work out perfectly, so that $(\heartsuit)$ is
$$ \sum_{\sigma \in F_q} \int_{\partial(\sigma^{\perp})} \theta_{\sigma}.$$
By Stokes' theorem,
$$\int_{\partial(\sigma^{\perp})} \theta_{\sigma} = \int_{\sigma^{\perp}} d(\theta_{\sigma}) = \int_{\sigma^{\perp}} \eta_\sigma.$$
We have now recovered the left hand side of $(\dagger)$.

The OP only asked for top cohomology, but I think other cohomological degrees are similar. Once again, we have maps
$$H^0(X, Z^k) \to H^1(X, Z^{k-1}) \to \cdots \to H^k(X, Z^0)$$
giving isomorphisms
$$H^k_{DR}(X) \cong H^1(X, Z^{k-1}) \cong \cdots \cong H^k(X, Z^0) \cong H^k(X, \RR). \quad (\diamondsuit)$$
We'd like to know that a class $\omega$ in $H^k_{DR}(X)$ is represented by a class in $H^k(X, \ZZ)$ if and only if $\omega$ pairs to an integer against every integer chain in $H_k(X, \ZZ)$; it is enough to test against chains coming from the triangulation $S$. Let $c = \sum_{\rho \in F_k} c_{\rho} \rho$ be a $k$-chain. We want to how to pair all the spaces in $(\diamondsuit)$ against $c$. Let $\eta$ be a $q$-cocycle for $Z^{k-q}$. I believe the same argument as before shows that $\langle c, \eta \rangle$ is
$$\sum_{\sigma \in F_q} c_{\rho} \sum_{\rho \in F_k} \int_{\sigma^{\perp} \cap \rho} \eta_{\sigma}. $$
In particular, if $q=k$, then $\sigma^{\perp} \cap \rho$ is a single point when $\rho = \sigma$ and otherwise $0$. So, viewing the Cech cohomology $H^k(X,\mathbb{R})$ as the cohomology of
$$\RR^{F_0} \to \RR^{F_1} \to \cdots \RR^{F_{n-1}} \overset{d_{n-1}}{\longrightarrow} \RR^{F_n}$$
and the simplicial cohomology $H_k(X, \ZZ)$ as the homology of
$$\ZZ^{F_0} \leftarrow \ZZ^{F_1} \leftarrow \cdots \leftarrow \ZZ^{F_n},$$
the pairing between $H^k(X,\mathbb{R})$ and $H_k(X, \ZZ)$ is induced by the obvious pairing between $\RR^{F_k}$ and $\ZZ^{F_k}$.
We then want to show that, if a cocycle in $\RR^{F_k}$ pairs integrally against all cycles in $\ZZ^{F_k}$, then that cocyle is cohomologous to one in $\ZZ^{F_k}$. That sounds like some easy linear algebra, although I don't see a one line proof.
A: I think I have an answer, although there is one step that still bugs me.
First one has to pick a triangulation of $S$. Let us call $V$, $E$ and $F$ the sets of vertices, edges and faces. By choosing now the open covering $\mathfrak{U}$ associated to this triangulation (i.e. the one given by the "stars" of the vertices, see p. 42 at Griffiths-Harris), we get that, while the open sets are in bijection with the vertices, the double intersections correspond to the edges and the triple to the faces.
Thus, in this case the Cech complex looks like this
$$
\mathbb{R}^{|V|} \overset{d_1}{\longrightarrow} \mathbb{R}^{|E|} \overset{d_2}{\longrightarrow} \mathbb{R}^{|F|},
$$
where $d_1( (k_v)_{v \in V} ) = (k_{v} - k_{w})_{vw\in E}$ and $d_2( (k_{vw})_{vw\in E} ) = (k_{vw} + k_{wu} - k_{vu})_{vwu \in F} .$
By carefully writing the matrix of $d_2$ one gets that $\mathrm{coker} d_2 \cong \mathbb{R}$. On the other hand, if one defines $\psi: \mathbb{R}^{|F|} \rightarrow \mathbb{R}$ in such a way that
$$
\psi( (k_{vwu})_{vwu \in F} ) = \sum_{vwu \in F} k_{vwu}, 
$$
one checks that $\mathrm{im} d_2 \subset \ker \psi$ and $\ker \psi \neq \mathbb{R}^{|F|}$, so $\ker \psi = \mathrm{im} d_2$. What this implies is that $\psi$ gives an isomorphism
$$
\psi: H^2(\mathfrak{U},\underline{\mathbb{R}}) \longrightarrow \mathbb{R}.
$$
The key now is to find an explicit isomorphism
$$
I: H^2(S,\mathbb{R}) \longrightarrow H^2(\mathfrak{U}, \underline{\mathbb{R}})
$$
so that $\psi(I(a)) = \int_S a$.
This would show that the $a$ with $\int_S a \in \mathbb{Z}$ are precisely those that $I(a) \in H^2(\mathfrak{U}, \underline{\mathbb{Z}})$.
I think that now the way to construct explicitly the isomorphism $I$ is like in Woodhouse's "Geometric Quantization" (A6) and also in Weil's paper "Sur les theoremes de de Rham". On one hand, the way one gets a cocycle from a $2$-form is like in the statement of my question. On the other hand, the way to recover $\omega$ from the $f_{UVW}$ is by defining
$$
\omega_f = \sum_{U,V,W} f_{UVW} h_{W} dh_U \wedge dh_V,
$$
where the $h_U$ are a partition on unity on the covering $\mathfrak{U}$. In Woodhouse it is shown that $[\omega_f]=[\omega]$.
However, I still do not understand why (or ever if it is true that) $\int_S \omega_f = \sum_{U,V,W} f_{UVW}$.
(BTW, also check out this question: https://mathoverflow.net/questions/329836/integral-of-top-forms-in-terms-of-Čech-representative ).
