Adeimantus begins Book IV with an interruption. He points out that the guardians can't very well expect to be happy if they are to live as Socrates insists. He points out that since the goal is to fashion a just and happy society, we ought not allow the individual parts to distract us from the holistic endeavor.
To my mind, Adeimantus makes a very valid point. Unless Socrates can make a cogent case for utilitarianism, I don't think we should allow him to gloss over justice and happiness as they relate to individuals. If we are not sure that we would believe any position in his society is just, I'm not certain we can claim that he has succeeded in his endeavor. It is important to recall that the discussion was moved to focus on societal justice because it was believed that this might help us better understand justice on an individual basis. We cannot allow the means to become the end.
Socrates notes: "We should consider whether in setting up our guardians we are aiming to give the the greatest happiness, or whether--since our aim is to see that the city as a whole has the greatest happiness--we must compel and persuade the auxiliaries and guardians to follow the our other policy..." I'm not sure when happiness replaced justice as the goal. Since the dialogue discusses the divergence of the two, I'm not sure we can simply build a happy society and then pronounce it just. Socrates may not be doing this, but he's a sneaky fellow, so it's worth pointing out whenever it seems like he's moving the goalposts.
He next points out that both wealth and poverty should be guarded against, the former because it "makes for luxury, idleness, and revolution", the latter "for slavishness, bad work, and revolution". Two points here: first, Corcyra has caused our philosopher to have revolution on the brain; second, although Aristotle and Plato are often seen to be at odds, we have here a pretty good example of the golden mean from Plato himself.
Socrates then goes on to explain the advantages of their warriors: "Our athletes will easily be able to fight twice or three times their own number and win." (Leonidas scoffs.) He also hints at class warfare, naturally non-existent in his city: "each of [the other cities] consists of two cities at war with one other, that of the poor and that of the rich..." On this basis, he also limits the size of the city to... one city. This isn't very helpful, but, if memory serves, Plato will clarify this in Laws.
The early part of this book is a bit disorganized, at least to my mind. Anyway, the guardians are to protect education at all costs. With successful education, the citizens will see for themselves the value of all Socrates says; the upshot is that much of what appears to be compulsory may be undertaken willfully by dutiful citizens. There's also a nod to the possession of wives and children in common, here, but--again, if memory serves--this will be developed more fully later in the text.
The educational system will be rigidly conservative. There's something to be said for tradition, of course, but any system which is incapable of change tends to be rendered obsolete, so Socrates would do well to provide some manner of incorporating small changes into his system.
Socrates describes the final outcome of education as "a single, newly finished person". He then reiterates why it will be unnecessary to legislate about "the care of parents, hair styles, the clothes and shoes to wear," etc. It is true that education is a powerful tool; as Vladimir Lenin once said: "Give me four years to teach the children and the seed I have sown will never be uprooted." But if the education given proves insufficient to the aims for which it was adopted, it's unclear to me why Socrates would not attempt to legislate for the good of his society.
They next consider legislation about "market business." Socrates points out that for good men, no laws will be necessary, but for bad men, attempts to "put a stop to cheating" etc. are best likened to lobbing heads off a Hydra. There's a lesson for us with our 1400 page bills.
At last insisting that custom dictate various other practices--burying the dead, etc.--the city is complete. It is now time to see whether wisdom, courage, moderation and justice exist therein. Once three have been found, which ever virtue remains will be that which is left in the city. This seems strange, but it makes sense given that the participants in the dialogue do not simply know what justice is, but must find it in some other way--by a process of elimination, evidently.
Wisdom is found in the guardians, courage in the soldiers. Moderation, or self-control, is found in that "the desires of the inferior many are controlled by the wisdom and desires of the superior few." But whereas wisdom and courage were found only in a segment of the populace, moderation is a kind of harmony which extends to ruler and ruled alike.
The other virtues having been found, the search for justice can begin. Socrates thereupon discovers that justice has been lying beneath his feet all the while. For the society was established in a just manner, namely, in that each was "doing one's own work"; the evidence of which is that the leftover portion is "the power that makes it possible for them to grow in the city and that preserves them when they've grown for as long as it remains there itself." Justice has been found, and here the dialogue ends.
Just kidding. Socrates has a good deal more to say. Having found justice, he defines injustice as "meddling and exchange between these three classes"--i.e. money-making (craftsmen, etc.) , auxiliary (soldiers), and guardians. He then proceeds to apply his newly found wisdom to try to understand justice on the individual level.
Another search begins for the three classes, or something akin to them, in the individual. After discussing the nature of thirst, Socrates notes that there are men who do not drink despite their thirst. There are thus two different strains within a man, each compelling him to do something. "We'll call the part of the soul with which it calculates the rational part and the part with which it lusts, hungers, thirsts, and gets excited by other appetites the irrational appetitive part, companion of certain indulgences and pleasures."
But since there were three classes in the city, Socrates continues his search for a third part of the soul, finding it in what he calls the "spirited part". And "therefore it necessarily follows that the individual is wise in the same way and in the same part of himself as the city." In this vein, the rational part of the soul should rule; obedience is the role of the spirited part; both are to govern the appetitive part. Hence it follows that justice is akin to that of a city, that is, each part of the soul doing its part. We come now to an important passage which I must quote at length:
One who is just does not allow any part of himself to do the work of another part or allow the various classes within him to meddle with each other. He regulates well what is really his own and rules himself. He puts himself in order, is his own friend, and harmonizes the three parts of himself like three limiting notes in a musical scale--high, low, and middle. He binds together those parts and any others there may be in between, and from having been many things he becomes entirely one, moderate and harmonious. Only then does he act. And when he does anything, whether acquiring wealth, taking care of his body, engaging in politics, or in private contracts--in all of these, he believes that the action is just and fine that preserves this inner harmony and helps achieve it, and calls it so, and regards as wisdom the knowledge that oversees such actions. And he believes that the action that destroys this harmony is unjust, and calls it so, and regards the belief that oversees it as ignorance.
Injustice, then, is disharmony between the parts of the soul. The "whole of vice" is nothing more than the "turmoil and straying of these parts". Also, just actions are those which produce justice in the soul; unjust actions, those which produce injustice. This now allows us to overcome the argument that justice is only good insofar as one is externally rewarded. For if justice is a rightly ordered soul, it is its own reward. At the same time, if someone is unjust, even if they may seem to prosper, if their soul is in a state of disharmony--as it must be--they cannot be said to be better off than the just man.
The book ends with Socrates beginning a discussion on the five forms of constitutions and of souls.