Setup: Isolated system at constant T (in contact with heat bath) and constant V. System starts and ends at same V,T. Only interaction with surroundings is heat exchange.

Energy conservation:

W+ΔEsys−Q=0⟹W=Q−ΔEsys

Entropy change of bath: ΔSbath=−Q/T

By the 2nd law (ΔSexttotal≥0):

ΔSsys≥QT

equality iff reversible.

Free energy change:

ΔFsys=ΔEsys−TΔSsys≤ΔEsys−T⋅QT=ΔEsys−Q=−W

Result:

W≤−ΔF

equality iff reversible.

Corollary (W=0): ΔF≤0 — at constant T,V with no work, free energy never increases.