In his commentary on the Sentences of Peter Lombard, St. Thomas says:
Loquendo autem de necessitate quae est ex suppositione divini propositi, quo propter benevolentiam suae bonitatis voluit unicuique eam communicare secundum suam capacitatem, necessarium est quod cuilibet materiae praeparatae forma infundatur. Non tamen eodem modo est in omnibus formis; quia formae quae mediantibus secundis agentibus in materia producuntur, necessario in materia disposita recipiuntur necessitate conditionata in comparatione ad Deum, cujus virtute cetera agentia agunt; sed necessitate absoluta per comparationem ad agentia proxima, quae necessitate naturae agunt propter ordinem divinitus eis impositum, quem praeterire non possunt. Formae autem quae immediate a Deo inducuntur, non habent necessitatem absolutam ex parte agentis, sed quaedam ex parte recipientis, sicut in perfectionibus quae sunt de esse naturae, ut est anima rationalis. Formae autem quae non debentur naturae, sicut gratia et virtutes, immediate a Deo productae, nihil habent de necessitate absoluta, sed solum de necessitate ex suppositione divini ordinis, ut dictum est.
Which is, more or less:
But speaking of the necessity which is on the supposition of the divine intention, by which on account of the benevolence of his [God’s] goodness, he wished to share with each thing according to its capacity, it is necessary that form be infused into every prepared matter. But nevertheless not in the same way in all forms; since forms which are produced in matter through the mediation of secondary agents are necessarily received into matter with a conditional necessity in comparison with God, by the power of whom other agents act, but with an absolute necessity in comparison to the proximate agents, which act by necessity of nature on account of the order divinely imposed on them, which they cannot omit. But forms which are immediately imposed by God, do not have an absolute necessity on the part of the agent, but a certain necessity on the part of the recipient, as in perfections which are of the being of nature, as is the rational soul. And forms which are not owed to nature, like grace and the virtues, produced immediately by God, have nothing of absolute necessity, but only of the necessity on the supposition of the divine order, as was said.
St. Thomas’s overall point is that every disposed matter receives its corresponding form, and that this happens on account of the goodness of God. He asserts that there are three ways in which this happens:
(1) With respect to forms produced through secondary causes, the things involved cannot naturally fail to produce the form in disposed matter, although this is taken to be conditional in comparison with God, presumably in the sense that if God wanted things to happen otherwise, they could happen otherwise, just as St. Thomas asserts that in the Eucharist accidents can exist without substance, by the divine will.
This first case seems intended to cover all natural changes, with one exception (we will get to the exception in a few moments.) So for example, according to St. Thomas, if you dispose matter to be a certain color, it will necessarily be that color; if you dispose matter to be living matter, it will necessarily be living; and so on. Just as we saw with lines and squares, properly disposed matter always has the corresponding form.
(2) Second, there are forms that are “immediately imposed by God,” but which have a certain natural necessity on the part of the recipient. He mentions the rational soul as though it were an example here, but in fact it seems to be the only thing which is meant to fall into this category rather than the third category.
This happens because St. Thomas considers the human soul to be something exceptional and unique in nature, as we can see from his discussion of the human soul as subsistent:
I answer that, It must necessarily be allowed that the principle of intellectual operation which we call the soul, is a principle both incorporeal and subsistent. For it is clear that by means of the intellect man can have knowledge of all corporeal things. Now whatever knows certain things cannot have any of them in its own nature; because that which is in it naturally would impede the knowledge of anything else. Thus we observe that a sick man’s tongue being vitiated by a feverish and bitter humor, is insensible to anything sweet, and everything seems bitter to it. Therefore, if the intellectual principle contained the nature of a body it would be unable to know all bodies. Now every body has its own determinate nature. Therefore it is impossible for the intellectual principle to be a body. It is likewise impossible for it to understand by means of a bodily organ; since the determinate nature of that organ would impede knowledge of all bodies; as when a certain determinate color is not only in the pupil of the eye, but also in a glass vase, the liquid in the vase seems to be of that same color.
Therefore the intellectual principle which we call the mind or the intellect has an operation “per se” apart from the body. Now only that which subsists can have an operation “per se.” For nothing can operate but what is actual: for which reason we do not say that heat imparts heat, but that what is hot gives heat. We must conclude, therefore, that the human soul, which is called the intellect or the mind, is something incorporeal and subsistent.
Elsewhere he says that the human soul alone is special in this way. Thus in the next article he specifically denies subsistence in regard to the souls of other animals:
I answer that, The ancient philosophers made no distinction between sense and intellect, and referred both a corporeal principle, as has been said. Plato, however, drew a distinction between intellect and sense; yet he referred both to an incorporeal principle, maintaining that sensing, just as understanding, belongs to the soul as such. From this it follows that even the souls of brute animals are subsistent. But Aristotle held that of the operations of the soul, understanding alone is performed without a corporeal organ. On the other hand, sensation and the consequent operations of the sensitive soul are evidently accompanied with change in the body; thus in the act of vision, the pupil of the eye is affected by a reflection of color: and so with the other senses. Hence it is clear that the sensitive soul has no “per se” operation of its own, and that every operation of the sensitive soul belongs to the composite. Wherefore we conclude that as the souls of brute animals have no “per se” operations they are not subsistent. For the operation of anything follows the mode of its being.
As a result of this special account of the human soul, St. Thomas asserts that natural agents do not have the capacity, considered in themselves, to produce a human soul. Consequently he says that there is not an absolute necessity on the part of the agents, meaning that there is no necessity because there is not even the possibility, considered on the part of the agents in themselves. But he says there is a necessity on the part of the recipient, meaning that nature would be lacking its appropriate perfection if e.g. the union of human seed and egg did not result in a human soul. And on account of the goodness of God, such a lack will never be permitted. Consequently every matter that is disposed to be human, will actually be human, just as in the case of the forms of the first kind.
(3) Finally, there are forms which are not “owed” to nature in the way that other natural forms are, and in the way in which even the human soul is owed. Here St. Thomas speaks of grace and “the virtues,” by which he means supernatural virtues, not natural virtues.
In order to understand this case, we can imagine a situation where we construct many shapes: squares, circles, triangles and so on. We paint all of them white, with one exception: whenever we have squares, we paint them red. In essence, we have invented a rule: we consider squares, and no other shapes, disposed to be red, and we cause them actually to be so.
In our example, there is nothing about being square that would actually make a thing red. But there is a certain order there, imposed by ourselves, whereby being square is effectively a disposition to be red. In a similar way, St. Thomas asserts that there are dispositions that God considers to be dispositions for grace, even though in themselves they would not be sufficient to make a thing have grace, or even to make a thing need grace. But St. Thomas says that on account of the goodness of God, he considers “doing as well as one can” to be the disposition for grace, and thus God always gives grace to one who does their best, even if they are merely doing their best on a natural level.
While it is not the point of this post, it is because of this account of God’s goodness in relation to form and disposed matter that St. Thomas is fundamentally opposed to any kind of rigid understanding of the doctrine of extra ecclesiam nulla salus. According to St. Thomas, whether there is a natural necessity for it or not, every disposed matter receives its appropriate form, on account of the goodness of God.