Helmholtz Free Energy minimization during an irreversible process Consider the classical $(N,V,T)$ system, and its Helmholtz free energy (HFE) $A=U-TS_{system}$.
The system is placed in contact with an hotter heath bath.
It is said that, at equilibrium, the HFE of the system reaches a minimum, i.e. $dU - TdS_{system} = 0$. But, for an irreversible heat transfer $dQ$ from the heat bath to the system, we end up with $dQ=dU<TdS_{system}$. So when does the equilibrium get realized? Do we need an "extra" transfer of heat to the system?
 A: Your differential form is incomplete.
Actually: $$dF=dU -SdT-TdS =-SdT$$
Equilibrium is reached when $dF=0$, so when $-SdT=0$, meaning the temperature constant over time ($T_{system}=T_{bath}$).
That's why at constant temperature Helmoltz free energy is the minimum potential. In the same way regarding a constant pressure process the enthalpy is given by: $$H=U-PV$$
Because it's differential form is then $dH=dU+VdP+PdV=VdP$. At equilibrium with a pressure bath, enthalpy do not vary and is in a minimum.
Each of these is obtained by a Lagrange multiplier meaning that for a constraint on an intensive parameter $X$ coupled to an extensive parameter $Y$ such as $\frac{dU}{dY}=X$ you can construct Z the thermodynamic potential associated like:
$$Z=U-XY$$
Such as its differential form vanishes at equilibrium.
I hope this helps, a bit, the underlying physics is better understood with solid math background in my opinion.
edit: I made a little mistake, the first formula is only valid at constant volume as my differential is $dF=-PdV-SdT$ in  the general case. In any case at equilibrium the volume of the system is supposed constant and no irreversible work is involved. The same reasoning apply as for the internal energy at equilibrium of a closed system.
