Introduction

Within the standard \(\Lambda\)CDM (cold dark matter) cosmology1,2,3,4, the formation of structures proceeds hierarchically with small structures coalescing into large structures in a “bottom-up” fashion. For systems involving long-range interaction, the formation of haloes of different sizes is necessary to maximize system entropy5. Therefore, highly localized halo structures and their evolution are major features of \(\Lambda\)CDM model6,7. As a counterpart of “eddies” in hydrodynamic turbulence, “haloes” are the building blocks in the flow of dark matter8,9,10. Halo abundance and internal structure play a central role for modeling structure formation and evolution. These two quantities are also critical to understand the small scale challenges for \(\Lambda\)CDM when comparing model with observations11,12,13,14. However, despite having been extensively studied over many decades, our understanding is still not entirely satisfactory.

First, the abundance of dark matter haloes is described by a halo mass function. The seminal Press-Schechter (PS) model allows one to predict the shape and evolution of mass function based on a density peak approach15. This model relies on a threshold value of overdensity (\(\delta _c\)) that can be obtained from the nonlinear collapse of a spherical over-density16,17. Bond et al. provided an alternative derivation using an excursion set approach (EPS) that puts the theory on a firmer footing by removing the fudge factor in original PS model18, which was further extend to excursion set with correlated steps19,20,21. The PS model was further improved by Jedamzik with a formalism explicitly counting all cosmic materials to address the so-called “cloud-in-cloud” problem in density peak approach22. Lee and Shandarin adopted Zeldovich approximation and extended the PS formalism to a non-spherical dynamical model23. Other developments include combination of the peak and excursion set approaches20, a moving barrier as a better density threshold24, and more recent efforts on developing emulators of halo mass functions for a range of different cosmologies25.

However, when compared to N-body simulations, both PS and EPS models overestimate the number of low-mass haloes and underestimate the number of massive haloes. There are also significant errors at high redshifts26. Further improvement was achieved by computing the density threshold \(\delta _c\) for ellipsoidal collapse27,28. In contrast to the spherical collapse where \(\delta _{c}\) is independent of halo mass, the ellipsoidal collapse leads to a mass-dependent overdensity threshold \(\delta _c\). This modification (hereafter ST) considerably complicates the derivation but provides a better agreement with simulations.

Because of its simplicity, the PS-EPS-ST mass functions are still a very popular analytic model. However, the theoretical basis of this approach is at best heuristic. First, the derivation requires a threshold overdensity from a simplified (if not over simplified) collapse model (either spherical or ellipsoidal). Second, the linear density field is required to identify collapsed structures that is deeply in the non-linear regime. In principle, halo mass function should be an objective intrinsic property of self-gravitating collisionless system that is independent of any simplified (spherical or ellipsoidal) collapse models. In this paper, a different approach is taken to derive the halo mass function without resorting to any simplified models. This approach is based on the random walk of haloes in mass space, which is a direct result of inverse mass cascade in dark matter flow10.

Next, the structure of haloes is described by the halo density profile that can be studied both analytically and numerically with N-body simulations29,30. Since the seminal work of spherical collapse17, the power-law density profile was derived under the self-similar approximation. The secondary in-fall model suggests a power-law density dependent on the initial density of the region that collapsed31,32. High-resolution N-body simulations have shown nearly universal profile with a cuspy density shallower than isothermal profile at smaller radius and steeper at larger radius33,34. For the cuspy inner density from N-body simulations, there seems no consensus on the exact value of the asymptotic logarithmic density slope \(\gamma\). Since the first prediction of \(\gamma = -1.0\) in NFW profile33, the inner density slope of simulated haloes have different values from \(\gamma >-1.0\)35 to \(\gamma =-1.2\)36, and \(\gamma \approx -1.3\)37,38,39. In addition, there still lacks a complete understanding for the origin of nearly universal density profile7. In this paper, similar to the halo random walk in mass space for halo mass function, a new approach is presented based on the particle random walk in real space, which provides a possible theory for nearly universal halo structures and density profiles.

Existing halo mass functions

For comparison with our mass function model, a brief overview of existing mass functions is presented here. The exact definition of mass function varies widely in the literature. The two widely used mass functions are defined as

$$F_{M} (m_{h} ,z) \equiv \frac{{dn(m_{h} ,z)}}{{d\ln (m_{h} )}}{\text{,}}\quad {\mathbf{f}}(\sigma _{\delta } ,z) \equiv F_{M} \frac{{m_{h} }}{{\rho _{0} }}\frac{{d\ln (m_{h} )}}{{d\ln (\sigma _{\delta }^{{ - 1}} )}},$$
(1)

where \(n(m_h,z)\) is the number density of haloes, \(\rho _0\) is the background density. Here \(\sigma _{\delta } \left( m_{h} \right)\) is the density fluctuation when density field is smoothed at mass scale \(m_{h}\), which can be computed from the density power spectrum. When a normalized variable \(\nu ={\delta _{c}^{2} /\sigma _{\delta }^{2} \left( m_{h} \right) }\) is used, the third definition \(f(\nu )\) can be introduced such that the multiplicity mass function \({\textbf {f}}(\sigma _{\delta },z)=2\nu f(\nu )\). In this definition, the PS mass function reads

$$\begin{aligned} f_{PS} \left( \nu \right) =\frac{1}{\sqrt{2\pi } \sqrt{\nu } } e^{-{\nu /2} }. \end{aligned}$$
(2)

The modified PS model (ST model) can be compactly written as:

$$\begin{aligned} f_{ST} \left( \nu \right) =A\sqrt{\frac{2q}{\pi } } \left( 1+\frac{1}{\left( q\nu \right) ^{p} } \right) \frac{1}{2\sqrt{\nu } } e^{-{q\nu /2} }, \end{aligned}$$
(3)

where the normalization condition requires:

$$\begin{aligned} A=\frac{\sqrt{\pi } }{\Gamma \left( {1/2} \right) +2^{-p} \Gamma \left( {1/2} -p\right) }. \end{aligned}$$
(4)

The best fitted parameters from simulation is \(A=0.3222\), \(q=0.707\), and \(p=0.3\) (hereafter ST1), while \(A=0.3222\), \(q=0.75\), and \(p=0.3\) was suggested by Sheth and Tormen40 (hereafter ST2). Both models satisfy the normalization condition \(\int _{0}^{\infty }f\left( \nu \right) d\nu =1\).

Many empirical mass functions were also proposed by fitting to the high-resolution simulation data. For example, a universal mass function by Jenkins etc. (hereafter JK) covers a wide range of different cosmologies and redshifts that is written as41,

$$\begin{aligned} f_{JK} \left( \nu \right) =\frac{0.315}{2\nu } \exp [-\left| \ln \left( {\sqrt{v} /\delta _{c} } \right) +0.61\right| ^{3.8} ], \end{aligned}$$
(5)

where the threshold density \(\delta _{c} =1.6865\). Using a similar form of mass function to ST, Warren proposed (hereafter WR)42

$$\begin{aligned} f_{WR} \left( \nu \right) = 0.7234\left[ \left( \frac{\delta _c}{\sqrt{\nu }}\right) ^{-1.625}+0.2538\right] \exp \left( -\frac{1.1982}{\delta _c^2/\nu }\right) , \end{aligned}$$
(6)

It should be noted that these empirical mass functions might not satisfy the normalization constraint and can be difficult to extrapolate beyond the range of fit.

The other widely used empirical mass function by Tinker etc. was also calibrated from numerical simulations with haloes identified as isolated spherical overdensity masses. The range of halo mass is between \(10^{11}\) and \(10^{15}\) \(h^{-1}M_{\odot }\) with redshift \(z\le 2\)43. TK mass function reads

$$\begin{aligned} {\mathbf{f}}(\sigma _{\delta } ,z) = & A\left[ {\left( {\frac{{\sigma _{\delta } }}{b}} \right)^{{ - a}} + 1} \right]\exp \left[ { - \frac{c}{{\sigma _{\delta }^{2} }}} \right],{\text{or equivalently, }} \\ f_{{TK}} (\nu ) = & \frac{A}{{2\nu }}\left[ {\left( {\frac{{\delta _{c} }}{{b\sqrt \nu }}} \right)^{{ - a}} + 1} \right]\exp \left[ { - \frac{{c\nu }}{{\delta _{c}^{2} }}} \right], \\ \end{aligned}$$
(7)

where best fitted parameters \(A=0.186\), \(a=1.47\), \(b=2.57\) and \(c=1.19\) for haloes with a critical density ratio \(\Delta _c=200\). Table 1 summarizes different halo mass functions \({\textbf {f}}(\sigma _{\delta }, z)\) in Eq. (1). The double-\(\lambda\) mass function is analytically derived in Section “Double-λ halo mass function”.

Table 1 Different Halo Mass Functions \({\textbf {f}}(\sigma _{\delta }, z)\).

Mass and energy cascade between haloes

To derive the halo mass function and density profiles, we first introduce the relevant context and background. In CDM cosmology, haloes are continuously merging with small structures (mass accretion). This facilitates an inverse mass cascade in halo mass space, i.e. a continuous mass transfer from small to large mass scales (“inverse”) to allow hierarchical structure formation (see Fig. 1). To explain this, we first identify all haloes in entire system and then group them according to their mass \(m_h\). In simulation, a clear definition of halo is required to identify these haloes. This definition is usually related to a critical density \(\delta _c\) from a simplified collapse model. At this step, we just treat haloes as existing objects without triggering a specific halo definition. In Fig. 1, halo of mass \(m_h\) merging with a single merger of mass m results in a new halo of mass \(m_h+m\). This causes a continuous mass flux from small to large scales along the chain of merging, i.e. an inverse mass cascade at a rate of \(\varepsilon _m\).

Figure 1
figure 1

Schematic plot of the inverse mass cascade for hierarchical structure formation. Halo of mass \(m_h\) merges with single merger (free DM particles of mass m) to cause the mass flux into haloes on larger scales \(m_h+m\) and the next merging along the chain. This facilitates a continuous mass cascade from small to large scales. A scale-independent mass flux \(\varepsilon _m\) is expected for haloes in the mass propagation range (\(<m_h^*\)). Mass cascaded from small scales is simply propagated in the propagation range and consumed to grow haloes with mass \(>m_h^*\) in the deposition range.

Next, the mass of entire halo group (\(m_g\)) including all haloes of the same mass \(m_h\) is \(m_g=N_h m_h\), where \(N_h\) is the number of haloes in that group. Now let’s consider the most dominant and frequent merging, i.e. the merging with a single merger (or a single particle of mass m) in Fig. 1, where \(\tau _h\) is the average waiting time of a given halo group, i.e. the average time interval between two subsequent merging events involving single mergers with any one halo in the same group. Therefore, the rate of mass transfer (or cascade) from mass scale \(m_h\) to scale \(m_h+m\) during the time interval \(\tau _h\) should be

$$\begin{aligned} \varepsilon _m = -\frac{m_h}{\tau _h(m_h,a)}=-\frac{\partial }{\partial t} \left[ M_{h} \left( a\right) \int _{m_{h} }^{\infty }f_{M} \left( m,a \right) dm\right] , \end{aligned}$$
(8)

i.e. the entire halo mass \(m_h\) is transferred to a larger scale in a time interval \(\tau _h\). This equals the rate of change for total mass in all haloes greater than \(m_h\). Here \(M_h(a)\) is the total mass in all haloes, \(f_M(m_h,a)=F_M/\rho _0\) (see Eq. 1) is the probability distribution of total halo mass \(M_h\) with respect to \(m_h\). The integration gives the total mass in all haloes greater than scale \(m_h\). The ’minus’ sign stands for the “inverse” cascade from small to large scales.

When self-gravitating collisionless system reaches a statistically steady state, this rate of mass transfer must be scale independent (i.e. \(\varepsilon _m\) is independent of \(m_h\)). If this is not the case, there would be a net accumulation of mass at some intermediate mass scale below \(m_{h}^{*}\). We exclude this possibility because we require statistical structures of haloes to be self-similar and scale free for haloes smaller than \(m_{h}^{*}\). This leads to the rate of mass cascade \(\varepsilon _m\) independent of mass scale \(m_h\) up to a critical mass \(m_h^*\)10. Therefore, taking the derivative of Eq. (8) with respect to \(m_h\) leads to

$$\begin{aligned} \frac{{\partial \varepsilon _{m} }}{{\partial m_{h} }} = & \frac{{\partial \left[ {M_{h} \left( a \right)f_{M} \left( {m_{h} ,m_{h}^{*} } \right)} \right]}}{{\partial t}} = \frac{{\partial m_{g} \left( {m_{h} ,a} \right)}}{{m_{p} \partial t}} = 0, \\ m_{g} (m_{h} ,t) = & M_{h} (a)f_{M} (m_{h} ,m_{h}^{*} )m_{p} \equiv m_{g} (m_{h} ), \\ \end{aligned}$$
(9)

where \(m_g=N_hm_h\) is the halo group mass, \(m_p\) is mass of a single particle (mass resolution in N-body simulation).

Here the scale-independent \(\varepsilon _m\) requires the halo group mass \(m_g(m_h,t)\equiv m_g(m_h)\) to be independent of time, i.e. a “small scale permanence” where the group mass \(m_g\) of different halo masses \(m_h\) and different redshifts z should collapse on to a common scaling law (Eq. (10) and Fig. 2). Once the statistically steady state is established, the rate of mass cascade \(\varepsilon _m\) becomes scale-independent. The halo group mass \(m_g\) in propagation range becomes time independent due to scale-independent \(\varepsilon _m\). Mass is simply injected at the smallest scale (scale of single mergers), propagated to larger scales in propagation range (\(m_h<m_h^*\)), and consumed to grow haloes in deposition range (\(m_h>m_h^*\)). Halo group mass \(m_g(m_h)\) is constant in time for haloes \(m_h<m_h^*\), and grows with time for haloes \(m_h>m_h^*\). Similarly, due to scale-independent energy cascade, the “small scale permanence” for halo density profile will be identified in Section “Mass scale m*h and small scale permanence” (Fig. 10).

Figure 2
figure 2

The variation of halo group mass \(m_g\) with halo mass \(m_h\) at different redshift z from Illustris-1-Dark simulation. Figure demonstrates the small scale permanence of group mass \(m_g\) in mass space. Once the statistically steady state is established (\(z<8\)), rate of inverse mass cascade \(\varepsilon _m\) becomes scale independent such that the halo group mass \(m_g\) at different redshift z collapse to a time independent power-law \(m_g\propto m_h^{-\lambda }\) (Eq. 10) at small mass scale (propagation range) with halo geometry parameter \(\lambda \approx 0.88\).

To validate this concept, Fig. 2 presents results from large scale cosmological Illustris simulation (Illustris-1-Dark)44. Illustris is a suite of large volume cosmological DM-only and hydrodynamical simulations. The selected Illustris-1-Dark is the DM-only simulation of 106.5Mpc\(^3\) cosmological volume with 1820\(^3\) DM particles for the highest resolution. Each DM particle has a mass around \(7.6\times 10^6 M_{\odot }\). The gravitational softening length is around 1.4kpc. Haloes in simulation were identified by a standard friends-of-friends (FoF) algorithm with linking length parameter b = 0.2 and halo center placed at the minimum of the gravitational potential of entire halo. Simulation has cosmological parameters of a total matter density \(\Omega _m=0.2726\), dark energy density \(\Omega _{DE}=0.7274\) at \(z=0\), and a dimensionless Hubble constant \(h=0.704\).

Next, if we focus on a given halo in a halo group, the waiting time \(\tau _g\) for that particular halo to merge with a single merger should be different and much greater than \(\tau _h\) (the waiting time for entire group). Here \(\tau _g\) is expected to be inversely proportional to the surface area of that halo. The larger surface area \(S_h\), the more likely for that halo to merge with a single merger, and the smaller waiting time \(\tau _g\). Therefore, for haloes with a given mass \(m_{h}\), this waiting time \(\tau _{g} \propto S_h^{-1} \propto {m_{h}^{-\lambda }}\), where \(\lambda\) is a key halo geometry parameter. Intuitively, \(\lambda \approx 2/3\) for large haloes (i.e. \(S_h \propto m_h^{2/3}\)). This is also equivalent to the waiting time \(\tau _g\propto \Phi ^{-1}\), where \(\Phi \propto Gm_h/r_h\) is the gravitational potential and \(r_h \propto m_h^{1/3}\) is the size of halo. The greater halo gravitational potential \(\Phi\), the larger velocity dispersion \(\sigma ^2\) from virial theorem (or halo temperature), the smaller waiting time \(\tau _g\), and the more frequently halo merging with mergers. Particle waiting time is dependent on its local potential. This will be used for deriving halo density profile in Section “Double-γ halo density profile”.

Depending on the number of haloes \(N_h\) in a given halo group, the two waiting times \(\tau _g\) and \(\tau _h\) are related to each other as

$$\begin{aligned} \tau _h=-\frac{m_h}{\varepsilon _m}=\frac{\tau _g}{N_h} \propto N_h^{-1} m_h^{-\lambda } \quad \text {and} \quad m_g=N_h m_h\propto m_h^{-\lambda }. \end{aligned}$$
(10)

Again, due to scale-independent rate of mass cascade \(\varepsilon _m\) (not varying with \(m_h\) in propagation range), Eq. (10) requires the number of haloes \(N_h \propto m_h^{-1-\lambda }\) for any given mass \(m_h\), or equivalently a power-law group mass \(m_g=N_h m_h\propto m_h^{-\lambda }\) at small mass scales, i.e. the small scale permanence in Fig. 2. In the same figure, we obtain \(\lambda \approx 0.88\) for Illustris simulation and number of haloes in halo group \(N_h\propto m_h^{-1.9}\) that is in good agreement with other work45.

To summarize, the mass cascade at statistically steady state involves two ranges, the propagation and deposition range. The propagation range for haloes with mass \(m_{h}<m_{h}^{*}\) involves a sequence of merging with single mergers (the smallest structure) to simply propagate mass to larger scales. In this range, the rate of mass transfer \(\varepsilon _m\) is independent of halo mass \(m_h\) and halo group mass \(m_g\) is constant in time. The deposition range (\(m_{h}>m_{h}^{*}\)) involves the consumption (deposition) of mass cascaded from scales below \(m_{h}^{*}\) to grow haloes above \(m_{h}^{*}\) (Fig. 1). Therefore, the inverse mass cascade can be described as: “Little halos have big halos, That feed on their mass; And big halos have greater halos, And so on to growth.”

In addition, haloes possess finite kinetic and potential energy. Accompanied by the mass cascade, there exists a simultaneous energy cascade across haloes of different masses46,47. The rate of energy cascade \(\varepsilon _u \propto \varepsilon _m \left\langle \sigma ^2 \right\rangle /M_h \propto -H\left\langle \sigma ^2 \right\rangle\), where \(\left\langle \sigma ^2 \right\rangle\) is the mean kinetic energy of all particles in all haloes. The specific rate of energy cascade per unit mass (\(\varepsilon _u<0\) for inverse energy cascade) can be estimated from the time variation of velocity dispersion \(u_0^2\) for all dark matter particles,

$$\begin{aligned} \begin{aligned} \varepsilon _{u} = -\frac{3}{2} \frac{u_{0}^{2} }{t_{0} }\approx -4.6\times 10^{-7} \frac{m^{2} }{s^{3}}, \end{aligned} \end{aligned}$$
(11)

where \(u_0 \approx 350km/s\) from N-body simulation and \(t_0\) is the current age of universe9.

Therefore, similar to the mass cascade in propagation range, there exist an inverse (kinetic) energy cascade from small to large scales with a constant rate \(\varepsilon _u\). In this range of scales, the small scale structures evolve so fast and do not feel the slowly evolving large scale structures directly except through constant rate \(\varepsilon _u\). This description indicates that relevant quantities in this range of scales should be determined by and only by \(\varepsilon _{u}\) (\({m^{2}/s^{3}}\)), gravitational constant G (\(m^3/kg\cdot s^2)\), and the relevant length scale r. By a simple dimensional analysis, the halo mass enclosed within r and corresponding halo density should follow the scaling9

$$\begin{aligned} m_r(r) \propto \varepsilon _{u}^{2/3}G^{-1}r^{5/3} \quad \text {and} \quad \rho _r(r) \propto \varepsilon _{u}^{2/3}G^{-1}r^{-4/3}, \end{aligned}$$
(12)

i.e. the 5/3 law and −4/3 law. These results can be demonstrated and confirmed by both N-body simulations (Figs. 12, 13, 14, 15) and halo density profiles from random walk in Section “Double-γ halo density profile” (Eq. 30).

Double-\(\lambda\) halo mass function

To derive halo mass function, the inverse mass cascade can be transformed into a halo random walk in mass space that mimics the random work of particles for diffusion problem. Just similar to the particle diffusion, we can derive the relevant Fokker-Planck equation and corresponding solution, from which halo mass function can be analytically solved. This is not just mathematically convenient, but reveals some fundamental aspects of halo mass function as an intrinsic property of self-gravitating collisionless system.

As shown in Fig. 1, haloes are continuously migrating in mass space from one scale (\(m_h\)) to neighboring scale (\(m_h+m\)) by merging with single mergers. This leads to a probability distribution to find a halo at a given mass. The waiting time (or jumping frequency) for a given halo to migrate from a given mass \(m_h\) to neighboring mass \(m_h+m\) is \(\tau _g\) in Eq. (10). Different from the standard random walk with a constant waiting time, the halo waiting time \(\tau _{g}\) is dependent on the mass of halo, i.e. a position-dependent \(\tau _g\) (Eq. 10). For halo with a given mass \(m_{h}\), the waiting time \(\tau _{g} \propto {m_{h}^{-\lambda }}\), where \(\lambda\) is a key halo geometry parameter we discussed.

First, the random walk of haloes in mass space describes the stochastic variation of the mass of a given halo due to continuous merging with single mergers of mass m. Following the Langevin equation, we can write a stochastic equation for halo mass \(m_h\)10

$$\begin{aligned} \frac{\partial m_{h} \left( t\right) }{\partial t} =\sqrt{2D_{p} \left( m_{h} \right) } \varsigma \left( t\right) \propto \frac{m}{\tau _g}, \end{aligned}$$
(13)

where \(m/\tau _g\) represents the average rate of mass change. For a power-law waiting time \(\tau _{g} \propto {m_{h}^{-\lambda }}\), we find the position-dependent diffusivity should take the form of

$$\begin{aligned} D_{p} \left( m_{h} \right) =D_{p0}(t) m_{h}^{2\lambda }. \end{aligned}$$
(14)

Here \(D_{p0}(t)\) is a proportional constant for diffusivity \(D_{p}\). The white Gaussian noise \(\varsigma (t)\) satisfies the covariance \(\langle \varsigma (t)\varsigma (t^{'})\rangle =\delta (t-t^{'})\) with a zero mean \(\langle \varsigma (t)\rangle =0\). Equation (13) describes the stochastic evolution of halo mass \(m_{h}\) with a waiting time \(\tau _{g}(m_{h})\propto {m_{h}^{-\lambda }}\).

Second, in Stratonovich interpretation48, the Langevin equation (Eq. 13) yields to a distribution function \(P_{h} \left( m_{h},t\right)\) satisfying the Fokker-Planck equation (resembling particle diffusion)

$$\begin{aligned} \frac{\partial P_{h}(m_h,t) }{\partial t}=D_{p0} \frac{\partial }{\partial m_{h} } \left[ m_{h}^{\lambda } \frac{\partial }{\partial m_{h} } \left( m_{h}^{\lambda } P_{h}(m_h,t) \right) \right] , \end{aligned}$$
(15)

which describes the evolution of probability function \(P_h\) for halo mass \(m_{h}\) in mass space. Obviously, the halo mass function \(f_M(m_h,t)\) is exactly the distribution function \(P_{h}\), i.e. \(f_{M}\equiv P_{h}\).

Finally, solution to Eq. (15), i.e. the halo mass function, is a stretched Gaussian with an exponential cut-off for large \(m_{h}\) and a power-law behavior for small \(m_{h}\),

$$\begin{aligned} f_{M} \left( m_{h},t\right) =\frac{m_{h}^{-\lambda } }{\sqrt{\pi D_{p0} t} } \exp \left[ -\frac{m_{h}^{2-2\lambda } }{4\left( 1-\lambda \right) ^{2} D_{p0} t} \right] . \end{aligned}$$
(16)

The mean square displacement in mass space is

$$\begin{aligned} \left\langle {m_{h}^{2} } \right\rangle = & \int_{0}^{\infty } {f_{M} } \left( {m_{h} ,t} \right)m_{h}^{2} dm_{h} \\ = & \frac{1}{{\sqrt \pi }}\Gamma \left( {\frac{{3 - \lambda }}{{2 - 2\lambda }}} \right)\left[ {4\left( {1 - \lambda } \right)^{2} D_{{p0}} t} \right]^{{\frac{1}{{1 - \lambda }}}} \equiv \gamma _{0} m_{h}^{{*2}} . \\ \end{aligned}$$
(17)

where \(m_{h}^{*}(t)\) is the critical mass scale and \(\gamma _{0}\) is just a proportional constant. With the exponent of \({1/\left( 1-\lambda \right) } \ge 1\) in Eq. (17), it is clear that the random walk of haloes in mass space is of a super-diffusion nature. Now \(f_{M} \left( m_{h},t\right)\) (Eq. 16) can be rewritten in terms of \(m_{h}^{*}\)

$$\begin{aligned} f_{M} \left( m_{h},t\right) =\frac{\left( 1-\lambda \right) }{m_h^*\sqrt{\pi \eta _{0} } } \left( \frac{m_{h}^{*} }{m_{h}} \right) ^{\lambda } \exp \left[ -\frac{1}{4\eta _{0} } \left( \frac{m_{h} }{m_{h}^{*} } \right) ^{2-2\lambda } \right] , \end{aligned}$$
(18)

where the dimensionless constant

$$\begin{aligned} \eta _{0} =\frac{1}{4} \left[ \frac{\gamma _{0} \sqrt{\pi } }{\Gamma \left( {\left( 3-\lambda \right) /\left( 2-2\lambda \right) } \right) } \right] ^{1-\lambda }. \end{aligned}$$
(19)

The time dependence of \(f_M\) is absorbed into \(m_h^*\). Intuitively, \(\lambda \approx 2/3\) for large haloes in deposition range with low concentration, whose central structures are still dynamically adjusted due to fast mass accretion. While for small haloes with high concentration (propagation range), the mass accretion is slow and inner structure is stable49. These small haloes can be treated as fractal objects with a fractal surface dimension \(D_h \le 3\). The geometry parameter \(\lambda =D_h/3\) can be greater than 2/3 (see Fig. 2). These high concentration low mass haloes are usually found in denser environments50. The denser environment might lead to a rougher halo surface and higher surface fractal dimension \(D_h\). Therefore, two different \(\lambda\) (i.e. double-\(\lambda\)) are required for two ranges (propagation range with \(m_h<m_h^*\) and deposition range with \(m_h>m_h^*\)) due to different halo properties and surrounding environments. The single-\(\lambda\) halo mass function in Eq. (18) can be naturally generalized to a double-\(\lambda\) halo mass function with \(\lambda _{1}\) and \(\lambda _{2}\) for propagation and deposition ranges, respectively. Therefore, the double-\(\lambda\) mass function reads

$$\begin{aligned} \begin{aligned} f_{M} (m_{h},a)&=\left( 2\sqrt{\eta _{0} } \right) ^{-q} \frac{2\left( 1-\lambda _{1} \right) }{q\Gamma \left( {q/2} \right) }\\&\cdot \left( \frac{m_h^*}{m_h}\right) ^{\lambda _{1}}\frac{1}{m_{h}^{*} } \exp \left[ -\frac{1}{4\eta _{0} } \left( \frac{m_{h}}{m_{h}^{*}} \right) ^{2-2\lambda _{2} } \right] . \end{aligned} \end{aligned}$$
(20)

By introducing variable \(\nu =(m_h/m_h^*)^{2/3}\), the three parameter double-\(\lambda\) mass function can be finally written as,

$$\begin{aligned} f_{D\lambda } (\nu )=\frac{p\left( 2\sqrt{\eta _{0} }\right) ^{-q} }{\Gamma \left( {q/2} \right) }{\nu }^{\frac{pq}{2}-1} \exp \left( -\frac{{\nu }^p }{4\eta _{0} } \right) , \end{aligned}$$
(21)

where model parameters p and q have clear physical meaning. Both are related to halo geometry parameters \(\lambda _1\) and \(\lambda _2\) as,

$$\begin{aligned} p=3\left( 1-\lambda _2\right) \quad \text {and} \quad q=\frac{\left( 1-\lambda _{1} \right) }{\left( 1-\lambda _{2} \right) }. \end{aligned}$$
(22)

Clearly, Eq. (21) reduces to the Press-Schechter (PS) mass function if \(\lambda _1=\lambda _2=2/3\) and \(\eta _{0}={1/2}\). However, the derivation of double-\(\lambda\) mass function does not rely on any collapse model (spherical or ellipsoidal). The critical overdensity \(\delta _{c}\) from collapse model is not required in this formulation. In simulation, haloes are usually defined using the critical overdensity \(\delta _c\) to compute the halo mass function. The derivation of double-\(\lambda\) mass function of Eq. (21) does not depend on the exact definition of halo. Different definitions of halo in simulation might affect both halo mass \(m_h\) and the critical mass \(m_h^*\), but not the ratio \(\nu =(m_h/m_h^*)^{2/3}\), and therefore not the double-\(\lambda\) halo mass function. More importantly, \(\lambda _1=\lambda _2=2/3\) or \(p=q=1\) is a natural result of current theory. This formulation reveals that the halo mass function in the form of Eq. (21) is an intrinsic property of self-gravitating collisionless dark matter system that is independent of spherical or ellipsoidal collapse models.

Figure 3
figure 3

Comparison between different halo mass functions \({\textbf {f}}(\sigma _{\delta }, z)\) and simulation at different redshift z. The PS mass function overestimate the mass in small haloes and underestimates the mass in large haloes. The fitted JK mass function matches simulation only in a given range with large deviation for small mass haloes. The WR mass function deviates at small mass with a limit \({\textbf {f}}(\sigma _{\delta }^{-1}\rightarrow 0,z)=-1.695\). The double-\(\lambda\) mass function (Eq. 21) with best fitting parameters \(\eta _{0}=1.162\), \(q=0.365\), and \(p=1.185\) (or \(\lambda _1=0.856\) and \(\lambda _2=0.605\)) matches the simulation and is slightly better than ST mass functions at large halo mass.

The halo geometry exponent \(\lambda\) has a fundamental meaning to relate halo surface area (or effective mass accretion area) to its mass. The cosmology and redshift dependence of \(\lambda _1\) and \(\lambda _2\) can be systematically studied by fitting the model to the simulation data of different cosmologies, similar to the study in25 and51.

Alternatively, similar to the scale radius \(r_s\) for halo density where logarithmic density slope is -2, we may introduce a scale mass \(m_{hs}\) where logarithmic slope \(\partial \ln (f_M)/\partial \ln (m_h) = -1\) such that \(m_{hs} = (2\eta _0 q)^{3/(2p)}m_h^*\) from Eq. (20). With a new scaled variable \({\bar{\nu }}=(m_h/m_{hs})^{2/3}\), mass function in Eq. (21) can be further simplified with p and q as the only two parameters

$$\begin{aligned} f_{D\lambda } ({\bar{\nu }})=\frac{p(q/2)^{q/2}}{\Gamma \left( {q/2} \right) }{{\bar{\nu }}}^{\frac{pq}{2}-1} \exp \left( -\frac{q}{2}{{\bar{\nu }}}^p \right) . \end{aligned}$$
(23)

To validate the derived double-\(\lambda\) mass function, we presents results from Illustris simulation (Illustris-1-Dark)44. Figure 3 presents the halo mass function \({\textbf {f}}(\sigma _{\delta }, z)\) in Eq. (1). The best fit of double-\(\lambda\) mass function to the simulation data at all z gives values of \(\eta _{0}=1.162\), \(q=0.365\), and \(p=1.185\) (Fig. 3), which leads to \(\lambda _1=0.856\) and \(\lambda _2=0.605\) from Eq. (22) for the propagation and deposition ranges, respectively. This leads to a slope of \(-\lambda _1-1\approx -1.9\) for halo number density \(n(m_h,z) \propto m_h^{-1.9}\) (Eq. 10), in very good agreement with Fig. 2 and other work45. Compared to predicted value of \(\lambda =2/3\) for matter dominant universe, the effect of dark energy in Illustris simulations seems to enhance the value of \(\lambda _1\) and decrease the value of \(\lambda _2\), reflecting the changes in environments and halo properties due to the presence of dark energy and accelerated expansion.

Figure 4
figure 4

Comparison of mass functions with Illustris-1-Dark simulation (solid blue) at z=0. The PS mass function overestimates mass in small haloes. The fitted JK mass function matches simulation only in a given range. The double-\(\lambda\) mass function (Eq. 21) matches both simulation and the ST and WR mass functions at z=0. Bottom plot presents the relative errors between simulation and different mass functions.

The PS mass function overestimate the mass in small haloes and underestimates the mass in large haloes. The JK mass function matches simulation for large mass haloes with large deviation for small haloes. The fitted WR mass function does not satisfy the normalization condition, where \(\int _{0}^{\infty }f_{WR}(\nu ) d\nu\) diverges. The WR mass function also deviates at small mass with a finite limit \({\textbf {f}}(\sigma _{\delta }^{-1},z)=-1.695\) for \(\sigma _{\delta }\rightarrow \infty\). The ST functions matches the simulation better with \({\textbf {f}}(\sigma _{\delta },z)\rightarrow \sigma _{\delta }^{2p-1}\approx \sigma _{\delta }^{-0.4}\) for large \(\sigma _{\delta }\). For large halo or high redshift, ST mass functions tend to overestimate when compared with simulation, which is also found in other studies52,53. The double-\(\lambda\) mass function is better than ST function for large haloes with \({\textbf {f}}(\sigma _{\delta },z)\rightarrow \sigma _{\delta }^{-pq}\approx \sigma _{\delta }^{-0.43}\) for \(\sigma _{\delta }\rightarrow \infty\).

Figure 5
figure 5

Comparison of mass functions with Illustris-1-Dark (solid blue) at z=4. The simulation results agree with all mass functions except PS. Double-\(\lambda\) mass function (Eq. 21) predicts a slightly lower mass in larger haloes.

Figure 6
figure 6

Comparison of mass functions with Illustris-1-Dark simulation (solid blue) at z=8. The double-\(\lambda\) mass function (Eq. 21) predicts less mass in larger haloes and slightly better agrees with the simulation.

Figure 7
figure 7

Comparison of mass functions with Illustris-1-Dark simulation (solid blue) at z=12. Compared to other mass functions, the double-\(\lambda\) mass function (Eq. 21) predicts less mass in larger haloes and slightly better agrees with the simulation.

Figures 4, 5, 6, 7 present the comparison of halo mass functions \(F_M\) in Eq. (1) with simulation results at \(z=0, 4, 8, \text {and} 12\), as a function of halo mass \(m_h\). Relative errors of different mass functions when compared to binned simulation data are also presented in the bottom plots. Similar conclusions can be obtained from these plots, where WR, ST, TK and double-\(\lambda\) mass functions agree with simulation at lower redshift. Double-\(\lambda\) mass function is slightly better at higher redshifts \(z=8\) and 12.

Mass scale m*h and small scale permanence

The inverse mass cascade and halo mass function (Eq. 20) require a critical halo mass scale \(m_h^*\) that can be related to halo velocity dispersions from virial theorem

$$\begin{aligned} \nu = \left( \frac{m_h}{m_h^*}\right) ^{2/3} = \frac{\langle \sigma _v^2(m_h) \rangle }{\langle \sigma _v^2(m_h^*) \rangle } = \frac{\langle \sigma _v^2(m_h) \rangle }{ \sigma _h^2(m_h^*)}, \end{aligned}$$
(24)

where \(\sigma _v^2(m_h)\) is the velocity dispersion of all DM particles in a halo with a given mass \(m_h\), which represents the temperature of that halo. Here \(\langle \rangle\) represents the average for all haloes in the same group with same mass \(m_h\). In addition, \(\sigma _h^2=VAR(V_h)\) is the dispersion (variance) of halo velocity \(V_h\) (the mean velocity of all particles in the same halo) for all haloes in the same group, where \(\sigma _h^2\) represents the temperature of halo group that is relatively independent of halo mass \(m_h\)5,47.

Figure 8 presents an example of the variation of \(\langle \sigma _v^2\rangle\) and \(\sigma _h^2\) with \(m_h\) at \(z=8\), where the critical mass \(m_h^*(z=8)=9\times 10^{10}M_{\odot }\) can be determined by setting \(\langle \sigma _v^2(m_h^*) \rangle = \sigma _h^2\) in Eq. (24). We can similarly compute the critical mass \(m_h^*\) for other redshifts. The variation of \(m_h^*\) with the scale factor a is presented in Fig. 9. In linear regime, \(m_h^* \propto a^3\) is expected, while in nonlinear regime \(m_h^* \propto a^{3/2}\)10.

With halo mass function in Eq. (18) and the small scale permanence for \(m_g\) in Eqs. (9, 10), and Fig. 2, the halo group mass \(m_g=m_hm_p\) (\(m_p\) is particle mass) should satisfy

$$\begin{aligned} m_g(m_h,t) = M_h(t)f_Mm_p\propto M_h m_h^*{^{\lambda -1}}m_h^{-\lambda }m_p\equiv m_g(m_h), \end{aligned}$$
(25)

such that the total mass in all haloes \(M_h(a)\propto m_h^*{^{1-\lambda }}\) when statistically steady state is established in the nonlinear regime. With \(\lambda =2/3\) for \(m_h=m_h^*\), \(M_h(a)\propto a^{1/2}\) is expected. The time variation of total halo mass \(M_h\) is also presented in Fig. 9.

Figure 8
figure 8

The halo velocity dispersions \(\langle \sigma _v^2\rangle (m_h)\) and \(\sigma _h^2\) at \(z=8\) from Illustris-1-Dark simulation. The two velocity dispersions represent the temperature of haloes and temperature of halo groups47. The large fluctuation at large mass scale is due to fewer massive haloes. Here \(\langle \sigma _v^2 \rangle \propto m_h^{2/3}\) while \(\sigma _h^2\) is relatively independent of \(m_h\). The critical halo mass \(m_h^*(z=8)=9\times 10^{10}M_{\odot }\) is found by setting \(\langle \sigma _v^2 \rangle (m_h^*) = \sigma _h^2\) (Eq. 24).

Figure 9
figure 9

The variation of critical halo mass \(m_h^*\) and total mass \(M_h\) in all haloes with scale factor a. Two regimes can be identified. In the linear regime \(m_h^*\propto a^3\). In nonlinear regime \(m_h^*\propto a^{3/2}\) and \(M_h\propto a^{1/2}\), where statistically steady state is established with a scale-independent rate of cascade. Density profiles of haloes with critical mass \(m_h^*\) are presented in Fig. 10.

Next, similar to the small scale permanence for group mass \(m_g\) in Fig. 2, we will present the small scale permanence for halo density profile. From the scaling laws due to energy cascade, the density scaling \(\rho _r \propto r^{-4/3}\) is proposed in Eq. (12), which already hints the small scale permanence. To demonstrate this concept, the density profiles for haloes with a critical mass \(m_h^*\) at different redshifts are studied first. In Illustris-1-Dark simulation, all haloes with mass between \(10^{\pm \Delta }m_h^*\) are identified at different redshifts z with \(\Delta =0.1\). The spherical averaged density profile is computed for every halo. The density profile for haloes with critical mass \(m_h^*\) is computed as the average density profile for all haloes with mass between \(10^{\pm \Delta }m_h^*\). Figure 10 presents the time evolution of halo density profiles for haloes with critical mass \(m_h^*(z)\). The small scale permanence from energy cascade can be clearly demonstrated as the density profiles for haloes with critical mass at different redshifts all collapse onto the predicted density scaling (blue solid line \(\rho _h\propto r^{-4/3}\)) on small scales. Finally, if gravity is the only interaction and dark matter is fully collisionless and cold, extending the established scaling in Fig. 10 to the smallest length scale and and the earliest time (or the highest z) might be able to identify dark matter particle mass, size, lifetime, and many other properties46.

Figure 10
figure 10

The evolution of halo density profiles for haloes with critical mass \(m_h^*(z)\). Figure demonstrates the small scale permanence, i.e. the density profiles for haloes with mass \(m_h^*\) at different redshifts z collapse at small scale r onto the predicted density scaling (-4/3 law with \(\rho _h\propto r^{-4/3}\)) from the theory of energy cascade (solid blue line from Eq. 12).

Double-\(\gamma\) halo density profile

The halo density profile can be analytically derived based on a similar idea as deriving halo mass function. Within CDM paradigm, the formation of structures starts from the gravitational collapse of small scale density fluctuations and proceeds hierarchically such that small structures coalesce into large structures in a “bottom-up” fashion. The halo structure is formed hierarchically through a series merging with smaller structures (dominantly with single mergers in Fig. 1).

Now let us follow the mass accretion history of a given halo in Fig. 11, where halo mass \(m_r\equiv m_r(t)\) (or halo size \(r\equiv r(t)\), the radius enclosing mass \(m_r\)) continuously varies with time from 0 to \(m_r\) (or size from 0 to r ). The mean waiting time of every merging with a single merger m has a simple scaling as \(\tau _g \propto m_r^{-\lambda }\propto \Phi ^{-1}\), where \(\lambda\) is a halo geometry parameter (see Eq. 10) and \(\Phi (r) \propto Gm_r/r\) is the gravitational potential at r. In 3D space, halo size r can be related to the position \({\varvec{X}}_t\) of merger m as \(r=\sqrt{{\varvec{X}}_t \cdot {\varvec{X}}_t}\). Since both halo mass \(m_r(t)\) and \(\Phi (r)\) can be related to size r(t), the waiting time \(\tau _g\) should also be a function of r(t), which means a varying waiting time dependent on the particle distance r to halo center

$$\begin{aligned} \tau _g(r) \propto \Phi (r)^{-1} \propto r(t)^{-\gamma }, \end{aligned}$$
(26)

where \(\gamma\) is an exponent for r-dependence of waiting time \(\tau _g\), which can be related to the slope of density profile (see Eq. 30).

Figure 11
figure 11

Schematic plot of the growth of a given halo in both mass \(m_r\) and size r via continuous merging with single mergers, where the waiting time \(\tau _g(m_r)\propto m_r^{-\lambda }\). Every merging event corresponds to a single move of particle m in a random walk process, where the waiting time \(\tau _g(r)\propto r^{-\gamma }\). Particle distribution from 3D random walk gives rise to the halo density.

Since haloes are formed by sequential merging, every DM particle in any halo was a single merger at the time they joined that halo. That particle starts to continuously perform a 3D random walk with a position-dependent waiting time \(\tau _g\) dependent on its local potential \(\Phi\) or r (Eq. 26) right after the merging, where \(\Phi (r)\) is determined by the total enclosed mass within r. In this regard, halo random walk in mass space is consistent with the particle random walk in 3D space. The random walk of DM particles has a position dependent waiting time \(\tau _g \propto \Phi (r)^{-1} \propto r^{-\gamma }\), where \(r=\sqrt{{\varvec{X}}_t \cdot {\varvec{X}}_t}\) is the distance to halo center. The waiting time is also dependent on the local potential \(\Phi (r)\), or from virial theorem, the velocity dispersion \(\sigma ^2\) that represents the local temperature. Since energy cascade theory predicts the 5/3 law for mass scaling \(m_r \propto r^{5/3}\) for the inner region of virialized haloes (see Eq. 12), we have potential \(\Phi (r) \propto Gm_r/r \propto r^{2/3}\) such that \(\gamma =2/3\) from Eq. (26). A position dependent waiting time \(\tau _g(r)\) is an important feature for hierarchical formation of halo structure. A longer waiting time \(\tau _g(r)\) at small r means a more stable core region than the outer region.

Finally, the particle distribution resulting from this position-dependent random walk in 3D space gives rise to the halo density, as shown in Fig. 11. Therefore, to find the halo density profile, we need to derive the particle distribution function due to the random walk in 3D space with \(\tau _g(r)\propto r^{-\gamma }\). The 3D particle random walk can be described by a Langevin equation for particle position \({\varvec{X}}_{t}\) [similar to Eq. (13) for halo random walk in mass space],

$$\begin{aligned} \frac{d{\varvec{X}}_{t} }{dt} = \sqrt{2 D_P({\varvec{X}}_t)} \varvec{\xi }\left( t\right) . \end{aligned}$$
(27)

Due to position-dependent waiting time \(\tau _g(r)\), the position-dependent diffusivity reads

$$\begin{aligned} D_{P}({\varvec{X}}_t)=D_{0}(t) r^{2\gamma }, \end{aligned}$$
(28)

where \(D_{0}(t)\) is a proportional constant. The smaller r, the smaller diffusivity or longer waiting time, and the higher particle density. In It\(\hat{\text {o}}\) convention, the 3D Fokker-Planck equation in Cartesian coordinate can be directly obtained for particle distribution function \(P_{r} \left( {\varvec{X}},t\right)\) (\(i=1,2,3\) for Cartesian coordinates),

$$\begin{aligned} \begin{aligned} \frac{\partial P_{r} \left( {\varvec{X}},t\right) }{\partial t} = D_0\frac{\partial }{\partial X_i}\left[ \frac{\partial }{\partial X_i}\left( r^{2\gamma }P_{r} \left( {\varvec{X}},t\right) \right) \right] . \end{aligned} \end{aligned}$$
(29)

The corresponding solution of Eq. (29) in spherical coordinate is

$$\begin{aligned} P_{r} \left( r,t\right) = \frac{(2-2\gamma )^{\frac{\gamma -2}{1-\gamma }} r^{-2\gamma }}{4\pi \left( D_0t\right) ^{\frac{3-2\gamma }{2-2\gamma }}\Gamma \left( \frac{3-2\gamma }{2-2\gamma }\right) }\exp \left( -\frac{r^{2-2\gamma }}{4(1-\gamma )^2D_0t}\right) . \end{aligned}$$
(30)

Since the distribution function \(P_r(r,t)\) is equivalent to halo density, we find that the parameter \(\gamma\) is half of the density slope at small r.

From this insight, assume \(\gamma\) is unknown, we can predict the value of \(\gamma\) as follows: Since the waiting time \(\tau _g \propto \Phi (r)^{-1} \propto r^{-\gamma }\), halo density should scale as \(\rho _r \propto r^{-2\gamma }\) from Eq. (30). The halo mass enclosed in r scales as \(m_r \propto \rho _r r^3 \propto r^{3-2\gamma }\). The local potential at r should scale as \(\Phi (r) \propto Gm_r/r \propto r^{3-2\gamma -1}\). The waiting time of particle at r should satisfy Eq. (26) that requires \(3-2\gamma -1=\gamma\) such that \(\gamma =2/3\) and the density slope \(2\gamma =4/3\). It should be noted that the random walk theory for halo structure formation confirms the −4/3 law (\(\rho _r\propto r^{-4/3}\)) predicted by the energy cascade theory in Eq. (12). Predictions are tested against simulations in Figs. 12, 13, 14, 15. Similar to halo mass function (Eq. 20), the exponent \(\gamma\) can be different in two different ranges, i.e. the power law below the scale radius \(r_s\) and the exponential decay above \(r_s\). Using two different \(\gamma\) for r-dependence of waiting time \(\tau _g(r) \propto r^{-\gamma }\), i.e. \(\gamma _1\) and \(\gamma _2\) for two different ranges, based on the single-\(\gamma\) distribution in Eq. (30), the double-\(\gamma\) distribution reads

$$\begin{aligned} P_{r} \left( r,t\right) = \frac{(2-2\gamma _2)^{\frac{2\gamma _1-2-\gamma _2}{1-\gamma _2}} r^{-2\gamma _1} }{4\pi \left( D_0t\right) ^{\frac{3-2\gamma _1}{2-2\gamma _2}}\Gamma \left( \frac{3-2\gamma _1}{2-2\gamma _2}\right) }\exp \left( -\frac{r^{2-2\gamma _2}}{4(1-\gamma _2)^2D_0t}\right) . \end{aligned}$$
(31)

Introducing the conventional scale radius \(r_s(t)\) where the logarithmic slope of \(P_{r}(r,t)\) equals -2, we should have

$$\begin{aligned} 4(1-\gamma _2)^2D_0t = \frac{2-2\gamma _2}{2-2\gamma _1}r_s^{2-2\gamma _2}. \end{aligned}$$
(32)

Substituting Eq. (32) into Eq. (31) and introducing a dimensionless spatial-temporal variable \(x=r/r_s(t)\), distribution function reads

$$\begin{aligned} P_{r} \left( x\right) = \frac{(1-\gamma _2) x^{-2\gamma _1}}{2\pi \Gamma \left( \frac{3-2\gamma _1}{2-2\gamma _2}\right) \left( \frac{1-\gamma _2}{1-\gamma _1}\right) ^{\frac{3-2\gamma _1}{2-2\gamma _2}}}\exp \left( -\frac{1-\gamma _1}{1-\gamma _2}x^{2-2\gamma _2}\right) . \end{aligned}$$
(33)

Finally, the two parameter particle distribution function can be written as [with a similar form as mass function in Eq. (23)]

$$\begin{aligned} P_{r} \left( x\right) = \frac{\alpha \beta ^{-(\frac{1}{\alpha }+\frac{1}{\beta })}}{4\pi \Gamma \left( \frac{1}{\alpha }+\frac{1}{\beta }\right) } x^{\frac{\alpha }{\beta }-2} \exp \left( -\frac{x^{\alpha }}{\beta }\right) , \end{aligned}$$
(34)

where two dimensionless parameters \(\alpha\) and \(\beta\) are

$$\begin{aligned} \alpha = 2-2\gamma _2 \quad \text {and} \quad \beta = \frac{1-\gamma _2}{1-\gamma _1}. \end{aligned}$$
(35)

The time variation of the distribution function is absorbed into the scale radius \(r_s(t)\). The double-\(\gamma\) distribution function reduces to the Einasto profile with \(\alpha =2\beta\). The cumulative distribution in spherical coordinate can be easily obtained as,

$$\begin{aligned} \int _{0}^{x} P_{r} \left( y\right) 4\pi {y}^2 d{y} = 1-\frac{\Gamma \left( \frac{1}{\alpha }+\frac{1}{\beta },\frac{x^{\alpha }}{\beta }\right) }{\Gamma \left( \frac{1}{\alpha }+\frac{1}{\beta }\right) }, \end{aligned}$$
(36)

where \(\Gamma (x,y)\) is an upper incomplete gamma function.

So far we provide physical interpretation and a possible theory for halo density. The general density profile can be finally written as

$$\begin{aligned} \rho _h(r,t)=\rho _s(t) \frac{P_r(x)}{P_r(1)} = \rho _s(t) x^{\frac{\alpha }{\beta }-2} \exp \left( \frac{1}{\beta }\left( 1-{x^{\alpha }}\right) \right) , \end{aligned}$$
(37)

where \(\rho _s(t)\) is the density at scale radius \(r_s\). Simulated haloes were found to have different density slopes in different simulations as discussed in Section “Introduction”. This might be due to the different radial flow and mass accretion rate in these haloes, whose density profile can be modelled by the general solution in Eq. (37)9.

On small scale, virialized haloes are incompressible with vanishing (proper) radial flow54. For fully virialized haloes with vanishing radial flow, we would expect −4/3 law for inner density with \(2\gamma _1=4/3\), which is consistent with the limiting density slope in Eq. (12). Combining Eq. (37) with \(\alpha /\beta =2/3\) leads to density profile that is consistent with the prediction from energy cascade in Eq. (12),

$$\begin{aligned} \rho _h(r,t) = A_r\varepsilon _u^{2/3}G^{-1}r_s^{-4/3}\left( \frac{r}{r_s}\right) ^{-4/3}\exp \left[ -\frac{1}{\beta _r}\left( \frac{r}{r_s}\right) ^{2\beta _r/3}\right] . \end{aligned}$$
(38)

The small scale permanence for halo density in Fig. 10 becomes

$$\begin{aligned} \rho _h(r,t) \equiv \rho _h(r) =A_r \varepsilon _{u}^{2/3}G^{-1}r^{-4/3} \quad \text {for} \quad r\rightarrow 0, \end{aligned}$$
(39)

where \(A_r\) is an amplitude parameter of halo density, \(\beta _r=\beta\) is a shape parameter of density profile, and \(r_s\) is the scale radius.

Figure 12
figure 12

Halo density profiles for different halo mass \(m_h\) at \(z=0\) (solid lines). The predicted scaling law (Eq. 12) for halo density is presented as the solid blue line. The double-\(\gamma\) density model (Eq. 38) was also plotted for all haloes as dashed lines.

Figure 13
figure 13

Halo density profiles for different halo mass \(m_h\) at \(z=4\) (solid lines). The predicted scaling law (Eq. 12) for halo density is presented as the solid blue line. for comparison, the double-\(\gamma\) density model (Eq. 38) was also plotted as dashed lines. Model fits better for halo density at higher redshift. The asymptotic density slope \(-4/3\) at small r can be identified.

To validate the proposed density model in Eq. (38), spherical averaged density profile was first obtained for all haloes with given mass in a range of \(10^{\pm \Delta }m_h\) at different redshifts z. Next, we obtained the average halo density profile for all haloes in the same range at same redshift. The radial flow in these haloes might be cancelled out after this averaging such that the averaged halo density can be better described by Eq. (38) with an inner slope of \(2\gamma _1=4/3\).

Figure 14
figure 14

Halo density profiles for different halo mass \(m_h\) at \(z=8\) (solid lines). The predicted scaling law (Eq. 12) for halo density is presented as the solid blue line. The double-\(\gamma\) density model (Eq. 38) was also plotted as dashed lines. The asymptotic density slope \(-4/3\) at small r can be identified.

Figures 12, 13, 14, 15 present the halo density profiles of different halo mass \(m_h\) at different redshifts z from Illustris dark matter only simulations: Illustris-1-Dark (solid lines), where \(\Delta\) is selected to be 0.1. The double-\(\gamma\) density model (Eq. 38) was also used to fit all haloes and plotted as dashed lines in these figures. The best-fit model parameters \(A_r\), \(\beta _r\) and \(r_s\) can be obtained for different halo mass \(m_h\) and redshifts z (as presented in Figs. 16, 17, 18). The double-\(\gamma\) density model provides a reasonably well fit to all haloes at all redshifts, with slightly better fit at higher redshift in a matter-dominant universe.

Figure 15
figure 15

Halo density profiles for different halo mass \(m_h\) at \(z=12\) (solid lines). The predicted scaling law (Eq. 12) for halo density is presented as the solid blue line. The double-\(\gamma\) density model (Eq. 38) was also plotted as dashed lines for comparison.

Figure 16
figure 16

The variation of amplitude parameter \(A_r\) for halo density with the dimensionless parameter \(\nu\) at different redshifts z. In principle, \(A_r\) increases with halo mass \(m_h\). This is related to the waiting time \(\tau _g \propto m_h^{-\lambda }\).

Figure 17
figure 17

The variation of shape parameter \(\beta _r\) for halo density with \(\nu\) at different redshifts z. The shape parameter \(\beta _r\) varies in a small range between 1 and 3 and slightly decreases with halo mass \(m_h\).

Figure 16 presents the variation of amplitude parameter \(A_r\) with the dimensionless parameter \(\nu\) defined in Eq. (24). As expected, the amplitude parameter \(A_r \propto \nu ^{2/3}\) increases with halo mass \(m_h\) at fixed redshift or decreases with time at fixed mass \(m_h\). The mass cascade across haloes is accompanied by a simultaneous energy cascade across haloes. The rate of cascade is independent of mass scale for group of haloes of the same mass. For individual haloes with mass \(m_h<m_h^*\), the rate of energy cascade \(\varepsilon\) in these haloes is smaller due to the longer waiting time \(\tau _g \propto m_h^{-\lambda }\). The effective rate of energy cascade \(\varepsilon\) in individual haloes is inversely proportional to \(\tau _g\),

$$\begin{aligned} \varepsilon (m_h,a) = \left( {m_h}/{m_h^*}\right) ^{\lambda } \varepsilon _u = \nu ^{3\lambda /2}\varepsilon _u. \end{aligned}$$
(40)

Therefore, the halo density \(\rho _h \propto \varepsilon ^{2/3} G^{-1} r^{-4/3}\propto m_h^{2\lambda /3}\) (see Eq. 12) such that the amplitude parameter \(A_r \propto \nu ^{\lambda }\), as shown in Fig. 16. With \(\lambda =2/3\), halo density scales with halo mass as \(\rho _h \propto m_h^{4/9}\) at a given position r.

Figure 17 presents the variation of shape parameter \(\beta _r\) with \(\nu\). The shape parameter \(\beta _r\) is relatively independent of parameter \(\nu\) at low redshift z. It varies in a small range between 1 and 3 and slightly decreases with halo mass \(m_h\), which corresponds to a range of \(\gamma _2=2/3\) for large haloes and \(\gamma _2=0\) for small haloes with \(\gamma _1=2/3\) (see Eq. 35). In the range \(r>r_s\), the potential \(\Phi\) is relatively independent of r due to exponential decay of density. Therefore, the waiting time becomes less dependent on r in this range with \(\gamma _2\le \gamma _1\). Table 2 lists relevant values of \(\lambda\) and \(\gamma\) in different ranges.

Table 2 Halo parameters \(\lambda\) and \(\gamma\) from theory and simulation.

Figure 18 presents the variation of the best fitted scale radius \(r_s\) with \(\nu\) at different redshifts z, where \(r_s\) increases with \(\nu\) with an approximate scaling of \(r_s \propto \nu ^{1/2}\). In summary, the amplitude parameter \(A_r\) is related to the rate of cascade \(\varepsilon\) in haloes (Eq. 40), while the shape parameter \(\beta _r\) is related to the parameter \(\gamma\) (Eq. 35), i.e. the position dependence of waiting time \(\tau _g\propto r^{-\gamma }\).

Figure 18
figure 18

The variation of scale radius \(r_s\) for halo density with \(\nu\) at different redshifts z. The scale radius increases with \(\nu\) as \(r_s \propto \nu ^{1/2}\).

It would be also interesting to compare the density profile obtained in this work with the Einasto and NFW profiles. Figure 19 presents the comparison for small (\(10^{8.5}M_{\odot }\) ) and large haloes (\(10^{13}M_{\odot }\)) at redshift \(z=0\) (haloes in Fig. 12). These density profiles include: (1) the general double-\(\gamma\) profile in Eq. (37) with \(\alpha\) and \(\beta\) being independent; 2) the Einasto profile with \(\alpha =2\beta\) in Eq. (37); (3) the double-\(\gamma\) profile with \(\alpha =2\beta /3\) in Eq. (37) or Eq. (38) for fully virialized haloes; and (4) the standard NFW profile. Bottom plots present the relative errors between these density profiles and simulation results. As expected, the general double-\(\gamma\) profile provides the best fit of simulated halo density, compared to NFW profile. The double-\(\gamma\) profile with \(\alpha =2\beta /3\) (Eq. 38) provides a slight better fit than Einasto profile for small haloes, and a much better fit for large haloes.

Figure 19
figure 19

The comparison between different density profiles that fit to haloes with a mass of \(10^{8.5}M_{\odot }\) and \(10^{13}M_{\odot }\) at redshift \(z=0\). These density profiles include: (1) the general double-\(\gamma\) profile in Eq. (37) with \(\alpha\) and \(\beta\) being independent (green); (2) the Einasto profile with \(\alpha =2\beta\) in Eq. (37) (blue); (3) the double-\(\gamma\) profile with \(\alpha =2\beta /3\) in Eq. (37) or Eq. (38) (red); (4) the standard NFW profile (black). The bottom plots present the relative errors between these density profiles and simulation results. Double-\(\gamma\) profiles provide better fit of simulated halo density.

Finally, additional tests for different halo definitions and cosmologies should be very helpful to include data from simulations other than Illustris series. In this case, parameters in halo mass function and density models (Eqs. (21) and (37)) need to be fitted for different cosmologies. From this study, we can find how model parameters (halo parameters \(\lambda\) and \(\gamma\)) vary with different cosmologies, which will require extensive work in future study. Here a quick test of double-\(\gamma\) density for some simulated haloes in the literature was presented. Figure 20 provides the best fit by the general model in Eq. (37) for these simulated haloes. Since the analytically derived double-\(\gamma\) profile reduces to Einasto profile for \(\alpha =2\beta /3\), the general double-\(\gamma\) profile is expected to provide a better fit than Einasto profile for all simulated haloes.

Figure 20
figure 20

Some halo density profiles for simulated haloes: (1) Ghalo55; (2) Via Lactea56; (3) Aquarius57; (4) Dubinski58; (5) FIRE:DMO38. The general double-\(\gamma\) density model (Eq. 37) was also used to fit all simulated haloes for the entire range of r.

Conclusion

In this paper, a simple theory was presented for halo mass function and density profile. The small scale permanence is proposed for halo group mass \(m_g\) and halo density profile \(\rho _h\) due to scale-independent rate of mass and energy cascade (Figs. 2 and 10). Both halo mass function and halo density profile can be analytically derived based on this simple theory. The position-dependent waiting time \(\tau _g\propto m_h^{-\lambda }\) leads to an analytical mass function modelled by a stretched Gaussian with a power-law behavior on small scale and exponential decay on large scale (Eq. 18). This can be further improved by considering two different values of \(\lambda\) in propagation and deposition ranges, i.e. a double-\(\lambda\) mass function in Eq. (21). Similarly, a double-\(\gamma\) halo density profile is proposed based on the particle random walk in 3D space with a position-dependent waiting time \(\tau _g\propto r^{-\gamma }\) (Eq. 37). The predicted value of \(\gamma =2/3\) leads to a cuspy density profile with an inner slope of −4/3, consistent with the energy cascade theory (Eq. 12). The Press-Schechter mass function and Einasto profile are just special cases of the proposed model. Models were compared and validated against the Illustris simulations. Future work will involve additional tests for proposed models in different cosmologies.