In mathematics, specifically in topology and functional analysis, compactness theorems provide necessary or sufficient conditions for the compactness of a set.