# Logic for Computer Scientists/Modal Logic/Multimodal Logics – An example

## Multimodal Logics - An example

If modal logics is to be used for expressing the knowledge of various agents, one needs operators which are parametrised: we introduce box operators ${\displaystyle [a]}$, which are paramtrised by arbitrary terms ${\displaystyle a}$; the same holds for ${\displaystyle \langle a\rangle }$, the parametrised diamond operator.

A king, wishing to know which of his three advisers is the wisest, paints a white spot on each of their foreheads, tells them the spots are black or white and that there is at least one white spot, and asks them to tell him the color of their own spots. After a time the first wise man says, "I do not know whether I have a white spot." The second, hearing this, also says he does not know. The third (truly!) wise man then responds, "My spot must be white."

The following is a formalisation using the abbreviation ${\displaystyle \square F}$, which stands for arbitrary nested paramtrised ${\displaystyle []}$-operators. If we had only 2 wise man ${\displaystyle A}$ and ${\displaystyle B}$, ${\displaystyle \square F}$ would stand for ${\displaystyle [A]F\land [B]F\land [A][B]F\land [B][A]F\land [A][A]F\cdots }$. Hence in general ${\displaystyle \square F}$ stands for "${\displaystyle F}$ is generally known".

${\displaystyle B\neq A\land C\neq A\land C\neq B}$ the three wise are different

${\displaystyle \square (w(A)\lor w(B)\lor w(C))}$ it is generally known, that one of them has a white spot

${\displaystyle \square (\forall x,y:x\neq y\to (\lnot w(x)\to [y]\lnot w(x)))}$ it is generally known, that if someone has no white spot, the others know it

${\displaystyle [C][B]\lnot [A]w(A)}$ C knows, that B knows, that A does not know the colour of his spot

${\displaystyle [C]\lnot [B]w(B)}$ C knows, that B does not know the colour of his spot

The theorem to be proven is "${\displaystyle C}$ knows that he has a white spot":

${\displaystyle [C]w(c)}$

If we had a theorem prover for modal logics we could apply it to the above specified problem in order to obtain a proof and hence an explanation for the theorem.

In the rest of this section we will introduce two methods for the definition of such a theorem prover: A direct tableau calculus and a translation method in to first order classical predicate logic.