Some Ramsey-type results for the n-cube

In this note we establish a Ramsey-type result for certain subsets of the n-dimensional cube. This can then be applied to obtain reasonable bounds on various related structures, such as (partial) Hales-Jewett lines for alphabets of sizes 3 and 4, Hilbert cubes in sets of real numbers with small sumsets, ''corners'' in the integer lattice in the plane, and 3-term integer geometric progressions.