The second set of necessary truths has to do with the basic relations entailed by the natures of the basic substances and how they exist together as a world. By taking those relations to be the objects described by mathematics, this explanation of their nature explains ontologically why mathematics is true. That enables ontological philosophy to solve the problem of about the nature of mathematical knowledge.

Relations are explained ontologically as aspects of a spatiomaterial world (rather than as objects of knowledge, as epistemological philosophy does). They are aspects of the world, rather than of substances taken separately, because relations depend on the wholeness of space, that is, the nature of space and how space contains all the bits of matter.

Geometry describes the essential nature of space, that is, the relations by which the parts of space make up a three dimensional whole. Though geometry can be formulated as a formal deductive system, both axioms and theorems are true because they correspond to what exists. Though non-Euclidean geometry is possible, Euclidean geometry is the simplest theory of space (and as shown in Change, it is not incompatible with what is known by contemporary physics).

The truth of arithmetic can also be explained by its correspondence to the world. Arithmetic describes an aspect of the world that derives from the nature of space and how it contains all the bits of matter, for that is what makes it possible to pick out particular substances by their spatial relations and to group them together. The relations that result are what arithmetic propositions correspond to.

Since arithmetic and the other branches of mathematics can be derived from set theory, it is possible to explain ontologically how mathematics is true by showing how the axioms of set theory correspond to aspects of a spatiomaterialist world. Since nothing exists but its substances, this includes all possible interpretations of mathematical propositions in a spatiomaterialist world.

The ontological explanation of the truth of the axioms of set theory by spatiomaterialism solves all the main problems that mathematicians have encountered about the truth of set theory.

Though set theory can generate all of mathematics, it does not include a set of all sets (because that would lead to paradox). But the spatiomaterialist explanation of the truth of set theory implies that the totality of all possible sets does exist. It is just that, instead of being a set, the totality is the world itself where the sets all exist as aspects.

The consistency of set theory cannot be demonstrated by formal means. But it can be demonstrated in the same way as the consistency of geometry. The consistency of set theory is shown by its correspondence to a spatiomaterialist world, because that model is shown to be consistent by its actual existence.

Gödel demonstrated that set theory is incomplete in the sense that there are sentences formulatable in arithmetic that cannot be proved, even though those sentences can be shown to be true. But that is not puzzling, given an ontological explanation of the truth of set theory, for Gödel's logical incompleteness does not show that arithmetic or set theory is incomplete in the sense that there are arithmetic sentences about the world whose truth cannot be proved .

Relations are not merely aspects of the world, but also objects of knowledge. That is how epistemological philosophy explains them. The basic relations of substances are described by mathematics, and mathematical propositions stand out from the point of view of the knower, because they seem to be more certain than what is known through experience of the natural world.

The Löwenheim-Skolem theorem implies that no formal system, such as set theory, can determine the references of its terms, because any consistent formal system can be given an interpretation in terms of a denumerable set, such as the whole numbers. But that is just what would be expected of an ontological explanation of the truth of mathematics, since ontology explains its truth by correspondence to a world whose nature if known by empirical ontology.

The problem of mathematical knowledge is its apparent certainty or seeming self-evidence. Thus, the challenge is to explain why it seems more certain than what is known by empirical science, or observation of what happens in the world.

There are basically two, opposite ways to explain the certainty or self evidence of mathematics, those offered by ontological and epistemological philosophy, respectively.

Though ontological philosophy proves mathematics as necessary truths, that does not show that it is certain, for the ontological foundation of its proof is itself empirical. But it can explain why mathematics seems more certain than science, for it also entails a theory about the faculty of reason by which mathematics is known. Reason makes math seem certain because of the role of rational imagination and language, including reflection.

Epistemological philosophy tries to prove that truths are necessary by showing that they can be known with certainty, and the apparent certainty of mathematics has made it the prime example of their method. Success is realism, in this case, about mathematical entities, or what is called "Platonism" in the philosophy of mathematics. The doubts inevitably engendered by problems of metaphysical dualism lead to anti-realism.

Realism about mathematical objects is called "Platonism," because mathematical knowledge is the prime example of the first form of realism, Plato's dualism of Being and Becoming. But Platonism takes different forms in the ancient and modern eras.

Plato held that the objects to which mathematical terms refer are Forms in a realm of Being knowable by rational intuition beyond the changing visible objects in the realm of Becoming.

Theism made it possible for Platonism about mathematics to continue in the modern world, because mathematical objects could be explained as ideas in God's mind. Since God created the natural world, that explained why mathematics was so useful to modern science in explaining the world.

Anti-realist are skeptics about the epistemologist's claim to show that we know the existence and nature of entities beyond what is disclosed by ordinary knowledge of the natural world. But there are two kinds of anti-realism about mathematics, one that affirms the certainty of mathematics and another that denies its certainty.

Since the certainty of mathematics is the phenomenon that originally gave realism its credibility, some of those who are skeptical about realism about mathematical objects (Platonism) affirm the certainty of mathematical knowledge and attempt to explain it on an anti-realist theory of how we know.

Intuitionism (or constructivism) holds that mathematical objects are constructed in rational imagination (intuition). (This view takes rational imagination to be primary.)

Logicism or formalism takes mathematical truth to be just a matter of deducing theorems from the axioms of logic (logicism) or from axioms taken as merely formal structures without any meaning or reference apart from their role in the formal system (formalism). (This view takes the grammatical structure of linguistic representations to be basic.)

Anti-realism about platonic entities is compatible with naturalism, and thus, it is possible to explain the truth of mathematics as correspondence to the natural world (whatever its ontological status may be). But since the natural world is what is known by empirical science, this is to assimilate mathematics to science as a form of empirical knowledge and, thus, to deny that mathematical knowledge is more certain than science in any fundamental way.