I think there is a weird logical loop I keep running into with the second law of thermodynamics. One sequence is
Clausius Equality: $\oint \frac{\delta Q}{T}=0$ for reversible processes. This means there exists some state function $S$ such that $\Delta S(P) = \int_P \frac{\delta Q}{T} $ for reversible $P$. From this, you can define it up to a constant over the whole space.
Then ... Second Law of Thermodynamics: $\Delta S \geq 0 $ for all physically realizable processes. However, I read that the Clausius equality is actually a result of the second law of thermodynamics so you can't actually work in this order.
Alternatively, you could say that the second law simultaneously proposes the existence of $S$ as a state function, its relation to heat and temperature for reversible processes, and its natural increase over time. However, this feels like a little too much to me and makes me think the Clausius equality is basically trivial (which is fine).
I just want to know the correct logical progression for defining entropy and making statements about it. Is it defined through the second law or does the second law merely make a statement about something that was created elsewhere? If so, how do we create it?
Edit: I was thinking about this and thought maybe a potentially nice order is starting with the definition that $\Delta S = \int \frac{\delta Q}{T}$ letting it be a process function for now. Then declaring the second law, using it to prove Clausius's equality, and, from there, proving its a state function.
My concern with all of this also however is that the proper definition of thermodynamic temperature also comes from entropy so, in that case, I have no idea how this progression goes.