  In [1] we defined a new kind of space called 'structured space' which locally
resembles, near each of its points, some algebraic structure. We noted in the
conclusion of the cited paper that the maps $f_s$ and $h$, which are of great
importance in the theory of structured spaces, have some connections with the
notions of presheaves (and hence also sheaves) and vector bundles. There are
well known cohomology theories involving such objects; this suggests the
possibility of the existence of (co)homology theories for structured spaces
which are somehow related to $f_s$ and $h$. In this paper we indeed develop two
cohomology theories for structured spaces: one of them arises from $f_s$, while
the other one arises from $h$. In order to do this, we first develop a more
general cohomology theory (called rectangular cohomology in the finite case,
and square cohomology in the infinite case), which can actually be applied also
in many other situations, and then we obtain the cohomology theories for
structured spaces as simple consequences of this theory.
