In the paper "On the Erdős distinct distance problem in the plane" by Larry Guth and Nets Hawk Katz,

http://arxiv.org/PS_cache/arxiv/pdf/1011/1011.4105v1.pdf

they define the functions $d(P)$, (distinct distances between $N$ points), and $Q(P)$, (quadruples on $N$ points where the distances between the first two points of the quadruple are equal to the second two points). They then apply Cauchy Schwarz to obtain

$|d(P)|\ge\frac{N^4}{|Q(P)|}$

However, I don't see how we can consider the functions $d$ and $Q$ to be functions in the same Vector Space, since one yields a set of distances, where the other yields a set of quadruples. If I can't interpret them as elements of a Vector Space, I don't see how Cauchy Schwarz can be applied.