Discrepancy of arithmetic progressions in grids

We prove that the the discrepancy of arithmetic progressions in the d-dimensional grid {1, . . . , N} is within a constant factor depending only on d of N d 2d+2 . This extends the case d = 1, which is a celebrated result of Roth and of Matoušek and Spencer, and removes the polylogarithmic factor from the previous upper bound of Valkó from about two decades ago. We further prove similarly tight bounds for grids of differing side lengths in many cases.