Helmholtz Free Energy Minimization Proof In the proof that Helmholtz free energy is minimized at equilibrium, we use the fact that $$\mathrm dS_\text{total}=\mathrm dS_\text{system}+\mathrm dS_\text{bath}\geq 0$$
But we also use the fact that
$$\mathrm dS_\text{bath}=\frac{\mathrm dU_\text{bath}}T=-\frac{\mathrm dU_\text{system}}T$$
Why does this not imply that $\mathrm dS_\text{system}=\frac{\mathrm dU_\text{system}}T$ and therefore $\mathrm dS_\text{total}=0$?
Is this because only the bath is always at temperature $T$, so we can imagine a reversible path, whereas the system may have some temperature fluctuations during the process of heat exchange with the bath?
Who says that $dS_{bath}=\frac{dU_{bath}}{T}=-\frac{dU_{system}}{T}$?  The equation should correctly read $\Delta S_{bath}=\frac{\Delta U_{bath}}{T_{bath}}=\frac{Q_{bath}}{T_{bath}}=-\frac{Q_{syst}}{T_{bath}}$, where the Q's are for the irreversible path.  The Q of the system for the reversible path is different from that for the irreversible path because of both temperature gradients and viscous dissipation of mechanical energy to internal energy during the irreversible path (both of which generate entropy).  For the reversible path of the system, these entropy generation effects are not present.