Recently, the Elementary Process Theory (EPT) has been developed as a set of fundamental principles that might underlie a gravitational repulsion of matter and antimatter. This paper presents set matrix theory (SMT) as the foundation of the mathematical-logical framework in which the EPT has been formalized: it is, namely, objectionable to use Zermelo-Fraenkel set theory (ZF) as such. SMT is a generalization of ZF: whereas ZF uses only sets as primitive objects, in the framework of SMT finite matrices with set-valued entries are objects sui generis, with a 1 × 1 set matrix [x] being identical to the set x. It is proved that every set that can be constructed in ZF can also be constructed in SMT: as a mathematical foundation, SMT is thus not weaker than ZF. In addition, it is shown that SMT is more suitable than ZF for the intended application to physics. The conclusion is that SMT, contrary to ZF, is acceptable as the mathematical-logical foundation of the framework for physics that is determined by the EPT.