Artificial intelligent assistant

Can linearity be expressed by a modal logic formula? Can I write a modal logic formula that describes linearity? by linearity I mean the following properties: * reflexive * transitive * $\forall{x,y} \;\; (xRy \lor yRx)$ I'm thinking on it for over a day and I guess it's not possible. If it is how and If it is not why?

If by "describes" you mean "modally defines" (i.e., there is a modal formula $\varphi$ such that for every frame: the frame satisfies the property iff the $\varphi$ is valid in the frame), then the answer seems to be no: By the Goldblatt-Thomason Theorem (see e.g. Blackburn, de Rijke, Venema, Modal Logic (2002) p.142) modally definable classes of frames need to be closed under disjoint unions. This is not the case for the class of frames satisfying $\forall x,y \;(xRy \lor yRx)$.

However, the slightly weaker property $ \forall x,y,z\;(xRy \land xRz \rightarrow (yRz \lor zRy)) $ **does** turn out to be modally definable over the class of reflexive and transitive frames by the formula $\Box (\Box A \rightarrow B) \lor \Box (\Box B \rightarrow A)$, see e.g. Hughes, Cresswell, A New Introduction to Modal Logic (1996), p.128 and p.175.

The logic of both of these frame classes is modal logic $\mathsf{S4.3}$.

xcX3v84RxoQ-4GxG32940ukFUIEgYdPy cb4b076b18d08d97d3286cd7f1ca90c4