  We investigate the dependence of the mass function of dark-matter haloes on
their environment within the cosmic web of large-scale structure. A dependence
of the halo mass function on large-scale mean density is a standard element of
cosmological theory, allowing mass-dependent biasing to be understood via the
peak-background split. On the assumption of a Gaussian density field, this
analysis can be extended to ask how the mass function depends on the
geometrical environment: clusters, filaments, sheets and voids, as classified
via the tidal tensor (the Hessian matrix of the gravitational potential). In
linear theory, the problem can be solved exactly, and the result is
attractively simple: the conditional mass function has no explicit dependence
on the local tidal field, and is a function only of the local density on the
filtering scale used to define the tidal tensor. There is nevertheless a strong
implicit predicted dependence on geometrical environment, because the local
density couples statistically to the derivatives of the potential. We compute
the predictions of this model and study the limits of their validity by
comparing them to results deduced empirically from $N$-body simulations. We
have verified that, to a good approximation, the abundance of haloes in
different environments depends only on their densities, and not on their tidal
structure. In this sense we find relative differences between halo abundances
in different environments with the same density which are smaller than 13%.
Furthermore, for sufficiently large filtering scales, the agreement with the
theoretical prediction is good, although there are important deviations from
the Gaussian prediction at small, non-linear scales. We discuss how to obtain
improved predictions in this regime, using the 'effective-universe' approach.
