Poincare's lemma states that in a simply connected domain in three dimensions, a smooth vector field with vanishing curl is the gradient of a scalar field. We will give a proof of this in all space dimensions, when the vector field is in a weak space of distributions ($H^{-1}(\Omega)$). We will also show that the Saint Venant compatibility conditions which characterize smooth symmetric matrix fields which occur as the deformation strains of a displacement field in elasticity, is an analogue of Poincare's lemma, at a higher level, and we will prove it for matrices with entries from the same space of distributions as above. The arguments used in these proofs bring out the intricate interconnections between well known results in functional analysis and PDEs such as Lions' lemma, Korn's inequality etc.