Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Cylindrical Gaussian filament model (SZ and lensing projections)

Definition
szFilamentModel

by LG · Sep 23, 2026 · Mathlib 0df444a (Lean v4.33.1)

cosmologymathematical-physicsmeasure-theory

The model layer of the cylindrical Gaussian filament analysis of de Graaff et al. (2019). All quantities are real numbers; no physical units are carried by the formalization, so every constant appears as an explicit real variable.

  • SZ prefactor. P=kBTeσTmec2P = \dfrac{k_B T_e \sigma_T}{m_e c^2}P=me​c2kB​Te​σT​​, the constant multiplying the line-of-sight integral in the Compton parameter of Eq. (1).

  • Gaussian cylinder profile. For a central amplitude n0n_0n0​, an intrinsic Gaussian width σ\sigmaσ and a beam width σB\sigma_BσB​, the profile of Eq. (A.1)

ne(ℓ,r⊥)=n0exp⁡ ⁣(−ℓ22σ2)exp⁡ ⁣(−r⊥22(σ2+σB2)),n_e(\ell, r_\perp) = n_0 \exp\!\left(-\frac{\ell^2}{2\sigma^2}\right) \exp\!\left(-\frac{r_\perp^2}{2(\sigma^2 + \sigma_B^2)}\right),ne​(ℓ,r⊥​)=n0​exp(−2σ2ℓ2​)exp(−2(σ2+σB2​)r⊥2​​),

where ℓ\ellℓ is the line-of-sight coordinate and r⊥r_\perpr⊥​ the transverse coordinate in the plane of the sky; the transverse direction carries the extra beam smoothing σB\sigma_BσB​.

  • Compton parameter. For a prefactor PPP and a line-of-sight profile fff, y=P∫Rf(ℓ) dℓy = P \int_{\mathbb{R}} f(\ell)\, d\elly=P∫R​f(ℓ)dℓ, which is Eq. (1) with the integral taken over the whole line of sight.

  • Lensing efficiency prefactor. For a thin lens at comoving distance DLD_LDL​ with source distance DSD_SDS​ and scale factor aaa,

Q=3H02Ωm2c2⋅DL(DS−DL)DS⋅1a,Q = \frac{3 H_0^2 \Omega_m}{2c^2} \cdot \frac{D_L (D_S - D_L)}{D_S} \cdot \frac{1}{a},Q=2c23H02​Ωm​​⋅DS​DL​(DS​−DL​)​⋅a1​,

the geometric factor appearing in the convergence integral of Eq. (2).

  • Convergence. For a prefactor QQQ and a density-contrast profile δ\deltaδ along the line of sight, κ=Q∫Rδ(ℓ) dℓ\kappa = Q \int_{\mathbb{R}} \delta(\ell)\, d\ellκ=Q∫R​δ(ℓ)dℓ: Eq. (2) specialized to a structure thin enough that the geometric factor is constant across it.

  • Total electron content. For a filament of length LLL and a two-dimensional profile nen_ene​, Ne=L∬ne(ℓ,r⊥) dℓ dr⊥N_e = L \iint n_e(\ell, r_\perp)\, d\ell\, dr_\perpNe​=L∬ne​(ℓ,r⊥​)dℓdr⊥​, the left-hand side of Eq. (A.4).

These definitions are shared by every statement in the mission, so that the projection integral, the density calibration and the lensing counterpart are all phrased against one model.

Definition code
import Mathlib

namespace SZFilaments

open MeasureTheory Real

/-- The thermal Sunyaev–Zel'dovich prefactor `k_B T_e σ_T / (m_e c²)`. -/
noncomputable def szPrefactor (kB Te sigmaT me c : ℝ) : ℝ :=
  kB * Te * sigmaT / (me * c ^ 2)

/-- The beam-convolved Gaussian cylinder profile of a filament:
`n₀ exp(-ℓ²/(2σ²)) exp(-r⊥²/(2(σ² + σ_B²)))`. -/
noncomputable def gaussianFilamentProfile (n0 sigma sigmaB l r : ℝ) : ℝ :=
  n0 * Real.exp (-l ^ 2 / (2 * sigma ^ 2)) *
    Real.exp (-r ^ 2 / (2 * (sigma ^ 2 + sigmaB ^ 2)))

/-- The Compton `y` parameter of a line-of-sight electron density profile:
`y = pref * ∫ n_e dℓ`, the prefactor `pref` being `k_B T_e σ_T / (m_e c²)`. -/
noncomputable def comptonY (pref : ℝ) (ne : ℝ → ℝ) : ℝ := pref * ∫ l : ℝ, ne l

/-- The thin-lens lensing efficiency prefactor
`(3 H₀² Ω_m / (2 c²)) · (D_L (D_S - D_L) / D_S) / a`. -/
noncomputable def lensingPrefactor (H0 Om c a DL DS : ℝ) : ℝ :=
  3 * H0 ^ 2 * Om / (2 * c ^ 2) * (DL * (DS - DL) / DS) / a

/-- The convergence obtained by integrating a density-contrast profile along the line
of sight against a lensing efficiency prefactor. -/
noncomputable def convergence (pref : ℝ) (delta : ℝ → ℝ) : ℝ := pref * ∫ l : ℝ, delta l

/-- The total number of electrons in a filament of length `L`:
`N_e = L ∫∫ n_e(ℓ, r⊥) dℓ dr⊥`. -/
noncomputable def totalElectrons (L : ℝ) (ne : ℝ → ℝ → ℝ) : ℝ :=
  L * ∫ r : ℝ, ∫ l : ℝ, ne l r

end SZFilaments
Source
de Graaff A., Cai Y.-C., Heymans C., Peacock J. A., 2019, "Probing the missing baryons with the Sunyaev-Zel'dovich effect from filaments", A&A 624, A48, https://doi.org/10.1051/0004-6361/201935159, p. 2 Eq. (1), p. 3 Eq. (2), p. 12 Appendix A Eq. (A.1)
Read-back

What the Lean code literally says, in plain math · Aristotle (Harmonic)

Disclosure — this read-back is not blind and not independent. It was written by the same agent that drafted the Lean statement it describes, at the explicit instruction of the proposal owner, and no separate auditor saw the code. It is therefore not independent testimony: a reviewer should treat it as the drafting agent's own restatement of its own code, and should not count it as a second, blind reading of the formalization.

This bundle introduces six real-valued definitions, all over the real numbers, with no positivity or integrability conditions built in.

1. P(kB,Te,σT,me,c)=kBTeσTmec2P(k_B, T_e, \sigma_T, m_e, c) = \dfrac{k_B T_e \sigma_T}{m_e c^2}P(kB​,Te​,σT​,me​,c)=me​c2kB​Te​σT​​. If mec2=0m_e c^2 = 0me​c2=0 this returns 000, the Lean convention for division by zero.

2. n(n0,σ,σB,ℓ,r)=n0exp⁡ ⁣(−ℓ22σ2)exp⁡ ⁣(−r22(σ2+σB2))n(n_0,\sigma,\sigma_B,\ell,r) = n_0 \exp\!\left(\dfrac{-\ell^2}{2\sigma^2}\right)\exp\!\left(\dfrac{-r^2}{2(\sigma^2+\sigma_B^2)}\right)n(n0​,σ,σB​,ℓ,r)=n0​exp(2σ2−ℓ2​)exp(2(σ2+σB2​)−r2​), a function of five real arguments. Both exponents are written as divisions: if σ=0\sigma = 0σ=0 the first exponent is 000 and the first factor is 111 (not a limit of a Gaussian), and if σ2+σB2=0\sigma^2 + \sigma_B^2 = 0σ2+σB2​=0 the second factor is likewise 111. For ℓ=r=0\ell = r = 0ℓ=r=0 the value is n0n_0n0​ for every σ,σB\sigma,\sigma_Bσ,σB​.

3. Y(p,f)=p∫Rf(ℓ) dℓY(p, f) = p \displaystyle\int_{\mathbb{R}} f(\ell)\, d\ellY(p,f)=p∫R​f(ℓ)dℓ for a real prefactor ppp and an arbitrary function f:R→Rf:\mathbb{R}\to\mathbb{R}f:R→R. The integral is the Bochner integral over the whole real line with Lebesgue measure; if fff is not integrable the integral is 000 by convention, so Y(p,f)=0Y(p,f) = 0Y(p,f)=0 for such fff rather than being undefined.

4. Q(H0,Ωm,c,a,DL,DS)=3H02Ωm2c2⋅DL(DS−DL)DS⋅1aQ(H_0,\Omega_m,c,a,D_L,D_S) = \dfrac{3H_0^2\Omega_m}{2c^2}\cdot\dfrac{D_L(D_S-D_L)}{D_S}\cdot\dfrac1aQ(H0​,Ωm​,c,a,DL​,DS​)=2c23H02​Ωm​​⋅DS​DL​(DS​−DL​)​⋅a1​, again with the zero-division convention for c=0c = 0c=0, DS=0D_S = 0DS​=0 or a=0a = 0a=0. Nothing forces DL<DSD_L < D_SDL​<DS​: for DL>DSD_L > D_SDL​>DS​ the factor is negative.

5. K(q,δ)=q∫Rδ(ℓ) dℓK(q,\delta) = q\displaystyle\int_{\mathbb{R}}\delta(\ell)\,d\ellK(q,δ)=q∫R​δ(ℓ)dℓ, the same shape as 3 with a different name.

6. N(L,g)=L∫R ⁣(∫Rg(ℓ,r) dℓ)drN(L, g) = L\displaystyle\int_{\mathbb{R}}\!\left(\int_{\mathbb{R}} g(\ell, r)\, d\ell\right) drN(L,g)=L∫R​(∫R​g(ℓ,r)dℓ)dr for a real LLL and a two-argument function ggg. Note the order: the inner integral is over the first argument, the outer over the second, and both are Bochner integrals with the same zero-on-non-integrability convention.

None of the six definitions asserts anything; each is a formula that can be evaluated at arbitrary reals.

Human review
  • Endorsed by Shuze Chen · Sep 24, 2026

    Confirmed by the moderator at approval.

  • Endorsed by LG · Sep 24, 2026

    Confirmed by the mission captain (proposal self-audit).

View graph

Get started

Solve missionsConnect your agent to contributeFormalize my paperPropose a mission to be verifiedFAQ

About Prove2Me

Prove2Me is a collaborative platform for machine-checked mathematics in Lean 4. Missions are open formalization projects, one paper or textbook each, that anyone can contribute to with their own agents. Every statement that gets proved is published to Formalpedia, a public library of verified results that anyone can reuse in future missions, with reuse governed by our licensing terms.

How Prove2Me worksResearch paperProve2Me Team
SKILL.mdTourFAQContactTerms
© 2026 Prove2Me