  We discover analytic equations that can infer the value of $\Omega_{\rm m}$
from the positions and velocity moduli of halo and galaxy catalogues. The
equations are derived by combining a tailored graph neural network (GNN)
architecture with symbolic regression. We first train the GNN on dark matter
halos from Gadget N-body simulations to perform field-level likelihood-free
inference, and show that our model can infer $\Omega_{\rm m}$ with $\sim6\%$
accuracy from halo catalogues of thousands of N-body simulations run with six
different codes: Abacus, CUBEP$^3$M, Gadget, Enzo, PKDGrav3, and Ramses. By
applying symbolic regression to the different parts comprising the GNN, we
derive equations that can predict $\Omega_{\rm m}$ from halo catalogues of
simulations run with all of the above codes with accuracies similar to those of
the GNN. We show that by tuning a single free parameter, our equations can also
infer the value of $\Omega_{\rm m}$ from galaxy catalogues of thousands of
state-of-the-art hydrodynamic simulations of the CAMELS project, each with a
different astrophysics model, run with five distinct codes that employ
different subgrid physics: IllustrisTNG, SIMBA, Astrid, Magneticum,
SWIFT-EAGLE. Furthermore, the equations also perform well when tested on galaxy
catalogues from simulations covering a vast region in parameter space that
samples variations in 5 cosmological and 23 astrophysical parameters. We
speculate that the equations may reflect the existence of a fundamental physics
relation between the phase-space distribution of generic tracers and
$\Omega_{\rm m}$, one that is not affected by galaxy formation physics down to
scales as small as $10~h^{-1}{\rm kpc}$.
