  The probability distribution function for an out of equilibrium system may
sometimes be approximated by a physically motivated "trial" distribution. A
particularly interesting case is when a driven system (e.g., active matter) is
approximated by a thermodynamic one. We show here that every set of trial
distributions yields an inequality playing the role of a generalization of the
second law. The better the approximation is, the more constraining the
inequality becomes: this suggests a criterion for its accuracy, as well as an
optimization procedure that may be implemented numerically and even
experimentally. The fluctuation relation behind this inequality, -a natural and
practical extension of the Hatano-Sasa theorem-, does not rely on the a priori
knowledge of the stationary probability distribution.
