The two core modal logic symbols in LaTeX are \Box for necessity (□) and \Diamond for possibility (◇), both from amssymb; \Box p reads it is necessary that p and \Diamond p it is possible that p. Kripke semantics uses \models (built in) or \Vdash, as in \mathcal{M}, w \models p, with an accessibility relation wRv. Epistemic logic writes knowledge as K_a p, and temporal logic adds \bigcirc p for next and p \mathbin{\mathcal{U}} q for until. The table lists the modal logic symbols people use most, with the package each one needs; the full list follows below.
| Symbol | Command | Use | Package | Copy |
|---|---|---|---|---|
\Box p | Necessarily p | amssymb | ||
\Diamond p | Possibly p | amssymb | ||
\Box(p \to q) | Necessity of an implication (axiom K) | amssymb | ||
\neg\Box\neg p | Not necessarily not p, same as \Diamond p | amssymb | ||
\mathcal{M}, w \models p | p is true at world w | built in | ||
w \Vdash p | Forcing, satisfaction | amssymb | ||
wRv | Accessibility relation | built in | ||
K_a p | Agent a knows p | built in | ||
B_a p | Agent a believes p | built in | ||
C_G p | Common knowledge in group G | built in | ||
\bigcirc p | Next (temporal logic) | built in | ||
p \mathbin{\mathcal{U}} q | Until (temporal logic) | built in |
Propositional connectives and quantifiers are on the logic symbols and quantifiers pages.
\Box\Diamond\neg\Box\neg\Diamond\Box(p \to q)\Diamond(p \land q)K_a pB_a pC_G p\Box p\Diamond pp \mathcal{U} q\bigcirc pw R v\mathcal{M}, w \models p