  Recently, several proofs of the Mason--Welsh conjecture for matroids have
been found, which asserts the log-concavity of the sequence that counts
independent sets of a given size. In this article we use the theory of
Lorentzian polynomials, developed by Br\"and\'en and Huh, to prove a
generalization of the Mason-Welsh conjecture to the context of valuated
matroids. In fact, we provide a log-concavity result in the more general
setting of valuated discrete polymatroids, or equivalently, M-convex functions.
Our approach is via the construction of a generic extension of a valuated
matroid or M-convex function, so that the bases of the extension are related to
the independent sets of the original matroid. We also provide a similar
log-concavity result for valuated bimatroids, which, we believe, might be of
independent interest.
