  It is well known that a classical Fubini theorem for Hausdorff dimension
cannot hold; that is, the dimension of the intersections of a fixed set with a
parallel family of planes do not determine the dimension of the set. Here we
prove that a Fubini theorem for Hausdorff dimension does hold modulo sets that
are small on all Lipschitz graphs.
  We say that $G\subset \mathbb{R}^k\times \mathbb{R}^n$ is $\Gamma_k$-null if
for every Lipschitz function $f:\mathbb{R}^k\to \mathbb{R}^n$ the set
$\{t\in\mathbb{R}^k\,:\,(t,f(t))\in G\}$ has measure zero. We show that for
every Borel set $E\subset \mathbb{R}^k\times \mathbb{R}^n$ with $\dim
(\text{proj}_{\mathbb{R}^k} E)=k$ there is a $\Gamma_k$-null subset $G\subset
E$ such that $$\dim (E\setminus G) = k+\text{ess-}\sup(\dim E_t)$$ where
$\text{ess-}\sup(\dim E_t)$ is the essential supremum of the Hausdorff
dimension of the vertical sections $\{E_t\}_{t\in \mathbb{R}^k}$ of $E$. In
addition, we show that, provided that $E$ is not $\Gamma_k$-null, there is a
$\Gamma_k$-null subset $G\subset E$ such that for $F=E \setminus G$, the
Fubini-property holds, that is, $\dim (F) = k+\text{ess-}\sup(\dim F_t)$.
  We also obtain more general results by replacing $\mathbb{R}^k$ by an
Ahlfors-David regular set. Applications of our results include Fubini-type
results for unions of affine subspaces, connection to the Kakeya conjecture and
projection theorems.
