I have used the fact that entropy is a state function for years, and it is very useful. But when I think about it, I am not sure why it is true. I get the usual argument for a Carnot cycle and an ideal gas, i.e. that
$\oint \frac{dQ}{T}=0$
and hence that
$\oint ds=0$
where we defined: $ds=\frac{dQ_{rev}}{T}$
I get that we can use this statement to show that s(V,T) will be independent of the path selected to get to the state (V,T). But what about something like a viscous fluid, or a viscoelastic solid? There is no path that you can take that will give you a reversible path integral. You might argue that you could take the path very slowly. But then what about a path dependent material, like a metal, that will undergo hysteresis? Even a slowly deforming path will exhibit hysteresis and be irreversible. So I don't see that you can use a "lets take a reversible path" argument for these types of materials, as you can for an ideal gas and the Carnot cycle. So I am not sure I can a theoretical argument proving that s(V,T) is independent of the path for such materials.
Where am I going wrong? Is there an argument for the path independence of entropy for path dependent materials such as metals and viscous fluids? Or is it simply a reliable postulate?