Here's a geometric way of looking at it. I'll start with a summary, and then give a formal-ish description if that's more your jam.
---
The fundamental issue is physicists use the same symbol for the physical, measurable quantity, and the function relating it to other quantities. To be clear, that isn't a criticism: it's a notational necessity (there are too many quantities to assign distinct symbols for each function). But that makes the semantics muddled.
However, there is also a lack of clarity about the semantics of "quantities". I think it is best to think of quantities as functions over an underlying state space. Functional relationships _between_ the quantities can then be reconstructed from those quantities, subject to uniqueness conditions.
This gives a more natural interpretation for the derivatives. It highlights that an expression like S(U, N, V) doesn't imply S _is_ the function, just that it's associated to it, and that S as a quantity could be associated with other functions.
---
The state space S has the structure of a differential manifold, diffeomorphic to R^n [0].
A quantity -- what in thermodynamics we might call a "state variable" -- is a smooth real-valued function on S.
An diffeomorphism between S and R^n is a co-ordinate system. Its components form the co-ordinates. Intuitively, any collection of quantities X = (X_1, ..., X_n) which uniquely labels all points in S is a co-ordinate system, which is the same thing as saying that it's invertible. [1]
Given such a co-ordinate system, any quantity Y can naturally be associated with a function f_Y : R^n -> R, defined by f_Y(x_1, ..., x_n) := Y(X^-1(x_1, ..., x_n)). In other words, this is the co-ordinate representation of Y. In physics, we would usually write that, as an abuse of notation: Y = Y(X_1, ..., X_n).
This leads to the definition of the partial derivative holding some quantities constant: you map the "held constant" quantities and the quantity in the denominator to the appropriate co-ordinate system, then take the derivative of f_Y, giving you a function which can then be mapped back to a quantity.
In that process, you have to make sure that the held constant quantities and the denominator quantity form a co-ordinate system. A lot of thermodynamic functions are posited to obey monotonicity/convexity properties, and this is why. It might be also possible to find a more permissive definition that uses multi-valued functions, similar to how Riemann surfaces are used in complex analysis.
To do that we'd probably want to be a bit more general and allow for "partial co-ordinate systems", which might also be useful for cases involving composite systems. Any collection of quantities (Y, X_1, ..., X_n) can be naturally associated with a relation [2], where (y, x_1, ..., x_n) is in the relation if there exists a point s in S such that (Y(s), X_1(s), ..., X_n(s)) = (y, x_1, ..., x_n). You can promote that to a function if it satisfies a uniqueness condition.
I think it is also possible to give a metric (Riemannian) structure on the manifold in a way compatible with the Second Law. I remember skimming through some papers on the topic, but didn't look in enough detail.
---
[0] Or half of R^n, or a quadrant maybe.
[1] The "diffeomorphism" definition also adds the condition that the inverse be smooth.
[2] Incidentally, same sense of "relation" that leads to the "relational data model"!
---
The fundamental issue is physicists use the same symbol for the physical, measurable quantity, and the function relating it to other quantities. To be clear, that isn't a criticism: it's a notational necessity (there are too many quantities to assign distinct symbols for each function). But that makes the semantics muddled.
However, there is also a lack of clarity about the semantics of "quantities". I think it is best to think of quantities as functions over an underlying state space. Functional relationships _between_ the quantities can then be reconstructed from those quantities, subject to uniqueness conditions.
This gives a more natural interpretation for the derivatives. It highlights that an expression like S(U, N, V) doesn't imply S _is_ the function, just that it's associated to it, and that S as a quantity could be associated with other functions.
---
The state space S has the structure of a differential manifold, diffeomorphic to R^n [0].
A quantity -- what in thermodynamics we might call a "state variable" -- is a smooth real-valued function on S.
An diffeomorphism between S and R^n is a co-ordinate system. Its components form the co-ordinates. Intuitively, any collection of quantities X = (X_1, ..., X_n) which uniquely labels all points in S is a co-ordinate system, which is the same thing as saying that it's invertible. [1]
Given such a co-ordinate system, any quantity Y can naturally be associated with a function f_Y : R^n -> R, defined by f_Y(x_1, ..., x_n) := Y(X^-1(x_1, ..., x_n)). In other words, this is the co-ordinate representation of Y. In physics, we would usually write that, as an abuse of notation: Y = Y(X_1, ..., X_n).
This leads to the definition of the partial derivative holding some quantities constant: you map the "held constant" quantities and the quantity in the denominator to the appropriate co-ordinate system, then take the derivative of f_Y, giving you a function which can then be mapped back to a quantity.
In that process, you have to make sure that the held constant quantities and the denominator quantity form a co-ordinate system. A lot of thermodynamic functions are posited to obey monotonicity/convexity properties, and this is why. It might be also possible to find a more permissive definition that uses multi-valued functions, similar to how Riemann surfaces are used in complex analysis.
To do that we'd probably want to be a bit more general and allow for "partial co-ordinate systems", which might also be useful for cases involving composite systems. Any collection of quantities (Y, X_1, ..., X_n) can be naturally associated with a relation [2], where (y, x_1, ..., x_n) is in the relation if there exists a point s in S such that (Y(s), X_1(s), ..., X_n(s)) = (y, x_1, ..., x_n). You can promote that to a function if it satisfies a uniqueness condition.
I think it is also possible to give a metric (Riemannian) structure on the manifold in a way compatible with the Second Law. I remember skimming through some papers on the topic, but didn't look in enough detail.
---
[0] Or half of R^n, or a quadrant maybe.
[1] The "diffeomorphism" definition also adds the condition that the inverse be smooth.
[2] Incidentally, same sense of "relation" that leads to the "relational data model"!