There are three main views of laws:
Humeanism: Laws are a summing up of the most important patterns in the arrangement of things in spacetime.
Nomism: Laws are necessary relations between universals.
Powerism: Laws are grounded in the essential powers of things.
The deficiencies of Humeanism are well known. There are also deficiencies in nomism and powerism, and I want to focus on two.
The first is that they counterintuitively imply that laws are metaphysically necessary. This is well-known.
The second is perhaps less well-known. Nomism and powerism work great for fundamental laws, and for those non-fundamental laws that are logical deductions from the fundamental laws. But there is a category of non-fundamental laws, which I will call impure laws, which are not derivable solely from the fundamental laws, but from the fundamental laws conjoined with certain facts about the arrangement of things in spacetime.
The most notorious of the impure laws is the second law of thermodynamics, that entropy tends to increase. To derive this from the fundamental laws, we need to add some fact about the initial conditions, such as that they have a low entropy. The nomic relations between universals and the essential powers of things do not yield the second law of thermodynamics unless they are combined with facts about which universals are instantiated or which things with which essential powers exist.
A less obvious example of an impure law seems to be conservation of energy. The necessary relations between universals will tell us that in interactions between things with precisely such-and-such universals energy is conserved. And it might well be that the physical things in our world only have these kinds of energy-conserving universals. But things whose universals don’t conserve energy are surely metaphysically possible, and the fact that such things don’t exist is a contingent fact, not grounded in the necessary relations between universals. Similarly, substances with causal powers that do not conserve energy are metaphysically possible, and the non-existence of such things is at best a contingent fact. Thus, to derive the law of conservation of energy, we need not only the fundamental laws grounded in relations between universals or essential powers, but we also need the contingent fact that conservation-violators don’t exist.
Finally, the special sciences (geology, biology, etc.) are surely full of impure laws. Some of them perhaps even merely local ones.
One might bite the bullet and say that the impure laws are not laws at all. But that makes the nomist and powerist accounts inadequate to how “law” gets used in science.
The Humean stands in a different position. If they can account for fundamental laws, impure laws are easy, since the additional grounding is precisely a function of patterns of arrangement. The Humean’s difficulty is with the fundamental laws.
There is a solution, and this is for the nomist and powerist to say that “law of nature” is spoken in many ways, analogically. The primary sense is the fundamental laws that the theories nicely account for. But there are also non-fundamental laws. The pure ones are logical consequences of the fundamental laws, and the impure ones are particularly important consequences of the fundamental laws conjoined with important patterns of things in nature. In other words, impure laws are to be accounted for by a hybrid of the non-Humean theory and the Humean theory.
Now let’s come back to the other difficulty: the necessity worry. I submit that our intuitions about the contingency of laws of nature are much stronger in the case of impure laws than fundamental laws or pure non-fundamental laws. It is not much of a bullet to bite to say that matching charges metaphysically cannot attract—it is quite plausible that this is explained by thevery nature of charge. It is the impure laws where contingency is most obvious: it is metaphysically possible for entropy to decrease (funnily enough, many Humeans deny this, because they define the direction of time in terms of the increase of entropy), and it is metaphysically possible for energy conservation to be violated. But on our hybrid account, the contingency of impure laws is accounted for by the Humean element in them.
Of course, we have to check whether the objections to Humeanism apply to the hybrid theory. Perhaps the most powerful objection to a Humean account of laws is that it only sums up and does not explain. But the hybrid theory can explain, because it doesn’t just sum up—it also cites some fundamental laws. Moreover, it may be the case that the patterns that need to be added to get the impure laws could be initial conditions, such as that the initial entropy is law or that no conservation-violators come into existence. But fundamental law plus initial conditions is a perfectly respectable form of explanation.