Pure pairs. I. Trees and linear anticomplete pairs

The Erdos-Hajnal Conjecture asserts that for every graph H there is a constant c > 0 such that every graph G that does not contain H as an induced subgraph has a clique or stable set of cardinality at least |G|^c. In this paper, we prove a conjecture of Liebenau, Pilipczuk, and the last two authors, that for every forest H there exists c > 0, such that every graph G contains either an induced copy of H, or a vertex of degree at least c|G|, or two disjoint sets of at least c|G| vertices with no edges between them. It follows that for every forest H there is c > 0 so that if G contains neither H nor its complement as an induced subgraph then there is a clique or stable set of cardinality at least |G|^c.