Rawls' account in section 38 opens with a description of the most basic element of the legal system, the view that there has to be 'impartial and regular' administration of public rules. Rawls describes this as "justice as regularity" but, whilst it appears the most formal part of the legal system, he includes within its correct functioning ways in which subtle bias are undermined or prevented from having more than limited effect so its scope is wider than is often included in formal views of law.
Law creates, as Rawls puts it, 'legitimate expectations' for social cooperation, including forming the basis for mutual trust. Law effectively "defines" the basic structure of a society so is fundamental to Rawls' conception. The rules that we term "laws" are also public and are governed by some precepts that are further built into the conception of justice as regularity. Included amongst these precepts are the assumptions that ought implies can; similar cases are treated similarly; there is no offense without a law and the precepts of natural justice. "Ought implies can", an important Kantian notion, is interpreted here legalistically to imply that legal systems cannot ask us to perform impossible actions. It includes a sense within it that laws are framed in "good faith" with regard to this assumption. The rule requiring similarity of treatment with regard to similar cases limits judicial discretion and sets the basis for precedents to build up into a general pattern. The central element of this second rule is the importance of 'consistency' just as the first rule was formulated by reference to 'good faith'. The third rule relates back to the point about publicity indicating that laws have to be general in statement and intent and not retroactive in application. Rules of natural justice require due process, impartiality of legal application, fairness of procedure and regular maintenance of rules.
The general conception of justice as regularity thus contains a great deal more than pure references to "formality" alone might suggest. After making this clear Rawls turns to the relationship of the rule of law to liberty. Without clear specification of what the law permits, for example, liberty is insecure. This helps to show that the desire for liberty is central to a functional legal system that is regular in application. This regularity of the legal system secures stability in social arrangements, not least with regard to penal sanctions for bad conduct and the understanding of what the latter consists in. This is the general point of all contractarian reasoning, going back to Hobbes.
Liberty is protected best by impartial and regular administration of law. On the basis of this regularity citizens have a plan for how to operate. One of the things that follows from Rawls' way of comprehending the legal system as based on securing liberty is that punishment is not seen by him (as some allege it is by Kant) as primarily retributive in point. Rather, punishment is connected to liberty in terms of responsibility being the ground on which we can trust each other to act. Since punishment is viewed in this way by Rawls it is to be expected that his account of it would differ later in substantive ways from Kant's but, unfortunately, little is really said by Rawls about this topic in Theory.
The only real point raised in section 38 concerns the way that liberties might have to be restricted more than one would wish in ideal circumstances in order to be better realised in non-ideal conditions. This point is referred to with regard to how the provisions of justice as regularity might have to be relaxed in emergency conditions. However, the point of any such relaxation would only be the better thereby to base equal liberties on the good of the representative citizen.
Section 39 turns to the further definition of the priority of liberty. Liberty can only be restricted for its own sake, as followed from the argument of section 38. But it can be restricted in two distinct ways. The first way would be that the basic liberties, whilst being equal, may be more or less extensive in range. The second way would be that the basic liberties may remain extensive but be unequally applied. If the first way is taken then the lesser extensiveness of the liberties has itself to be justified by reference to the gain of freedom of the representative citizen. On the other hand if liberties are unequally applied then the freedom of those with lesser liberty has to be all the better secured this way.
Restrictions on liberty can be grounded either on natural limitations or on contingencies of historical or social sort. Natural limitations affect the situation of children for example whilst contingencies of various sorts restrict freedom of speech (for example). However these points are distinguished by Rawls from the non-ideal circumstances in which there is injustice existent in various ways.
Rawls' general point is to consider the basis of restrictions on liberty of the two sorts indicated and to show that these restrictions cannot be such as to undermine the priority of liberty. Regulation of liberty of speech, for example, restricts liberty in various ways but it can be done in ways that are not unequal in application so such a kind of limitation can effectively be assimilated to a natural constraint despite having contingent ways of presenting itself.
Unequal liberties, if administered, by contrast, clearly show injustice exists but can still be regulated in such a way that the most important liberties are most equally allowed. This involves Rawls discussing paternalism as the real basis of inequality of liberties is a certain kind of paternalistic concern but such concern has to be guided by a theory of primary goods and by an understanding of real preferences. The discussion thus culminates with the restatement of the first principle of justice now given in a way that strikingly resembles Kant's universal principle of right in the Doctrine of Right (Ak. 6: 230). Rawls' first principle now reads: "each person is to have an equal right to the most extensive total system of equal basic liberties compatible with a similar system of liberty for all". However this new formulation of the first principle of justice is accompanied now by the 'priority rule' which indicates not just that the principles of justice are in lexical order and that liberty, hence, can only be restricted for its own sake. It also indicates the two cases in which such restrictions are plausible. There is, as yet, no systematic argument given for the priority of liberty and Rawls postpones this to section 82, towards the conclusion of Theory.