The definition of integral forms A $d$-closed differential form $\phi$ on $X$ is said to be integral if its cohomology class in the de Rham group, $[\phi]\in H^*(X,\mathbb{C})$, is in the image of the natural mapping:
$H^*(X,\mathbb{Z})\to H^*(X,\mathbb{C})$.
But I also see an alternative definition: a form is called integral if its integral over any cycle is an integer.
I can't see how these two definitions agree. And I didn't see the second definition  when I was taking the manifold class. Moreover, I can't find any reference to show these two definitions agree. Can you show me the proof or tell me the reference? 
 A: My comment above explains why things in the image of $H^*(X;\Bbb Z)$ take integer values on cycles. Here I explain the converse in more detail.
Let $C_i(X)$ be the $i$th graded piece of the singular chain complex with $\Bbb Z$ coefficients. Because $\Bbb Z$ is a PID, submodules of a free module are free, and so $\text{Im}_{i-1}(d) \subset C_{i-1}(X)$ is free. Using this freeness, you may find a subset $N \subset C_i(X)$ so that $d: N \to \text{Im}_{i-1}(d)$ is an isomorphism. Then clearly we have $C_i(X) = K \oplus N$, where $K$ is the subcomplex of cycles (aka, $K = \text{ker}_i(d)$). 
Now I assume you have a complex-valued cocycle $\varphi: C_i(X) \to \Bbb C$ so that, on any cycle $c$, the complex number $\varphi(c)$ is an integer. Define $\varphi': C_i(X) \to \Bbb Z$ so that $\varphi'(N) = 0$ and $\varphi' = \varphi$ on $K$. Then $\varphi$ is valued in $\Bbb Z$. Furthermore, $(\delta \varphi')(c) = \varphi'(dc) = 0$ for any chain in $C_{i+1}(X)$, because $dc \in K$ and we have the corresponding property for $\varphi$.
Therefore $\varphi'$ is an integer-valued cocycle. To see that it is cohomologous to $\varphi$, I suggest using the universal coefficient theorem for fields, $H^n(X;k) \cong \text{Hom}(H_n(X;\Bbb Z), k)$. In particular, $k$-valued cocycles which take the same values on homology classes are cohomologous. Of course, since $\varphi = \varphi'$ on cycles, this is true. 
