It's fairly easy to conjure a set theory with a modal logic in it. I'm wondering whether the construction is incoherent or useless. I'm also curious what ways of extending set theory with a modal logic already exist.
Let $\varepsilon$ denote the empty set.
There are many questions on this site that ask about what ordered pairs are and the answer usually boils down to this is what a Kuratowski pair is, although there are alternatives.
I think that the standard way to express the above statement is to use model theory. Suppose we are working in ZFC. My understanding of model theory is a bit weak, but I think this amounts to taking the signature of ZFC and its theory, extending the signature with an ordered pair function symbol, and extending the theory with the characteristic property of ordered pairs. We then show that original ZFC with an ordered pair defined as a Kuratowski pair is a model of our extended signature + theory. I'm not exactly sure how to deal with a model whose domain is a proper class rather than a set, but I think the above approach works.
I'm wondering whether it makes sense to instead consider an extended set theory that uses modal logic and is thus capable of hosting non-primitive symbols itself.
For the sake of this example, I'm considering a modal set theory that is like an ordinary set theory such as ZFC, but all of the usual set axioms and axiom schemas of set theory are necessary truths.
The meta-statement a Kuratowski pair is a possible implementation of an ordered pair in some set theory has an obvious translation into modal logic, shown below. The particular modal logic I am using here is S5, but I'm not sure what the consequences are of using different modal logics.
Assuming we do some work off to the side to define the notation $(\cdot,\cdot)$ and assert that it is a legal term if its two arguments are terms, we can express the characteristic property of ordered pairs as follows (10).
$$ \Box \bigg( (a, b) = (b, a) \iff a = b \bigg) \tag{10} $$
We can assert that we are choosing the Kuratowski pair in this world by not using a modal operator at all (11).
$$ ( a, b ) = \{\{a\}, \{a, b\}\} \tag{11} $$
We can assert that a Wiener pair also works
$$ \Diamond \bigg( (a, b) = \{ \{\{a\}, \varepsilon\} , \{\{b\}\}\} \bigg) \tag{12} $$
I think the main thing we've bought by adding modal operators to our logic is the ability to make things that would have been metatheorems into theorems.
For instance if we wanted to express the fact that an ordered pair can't be associative, we can express it as follows
$$ \lnot \Diamond \bigg( (a, (b, c)) = ((a, b), c) \bigg) $$
{{x}, {x, y}} is a possible implementation of a pair
as a conditional theorem, where the characteristic property of ordered pairs is a premise, and b) to come up with a formal setting where we can distinguisharbitrarily chosen definitions
from other facts. – Greg Nisbet Jul 07 '20 at 16:15