2

So far, I've always been writing \forall\, x\in X\colon \varphi(x), and, if I really wished to have better spacing and line breaking in narrow linewidth, \forall\penalty1\mskip3mu plus1.5mu minus1.5mu x\penalty2\mskip-2mu plus1mu minus1mu\in\penalty2\mskip-2mu plus1mu minus1mu X\colon\penalty1 \varphi(x).

However, https://tex.stackexchange.com/a/676323 made me think that the default \colon of amsmath might not be intended for the usage within quantified expressions. In testmath.pdf I don't see ∃ at all, and ∀ is used only in a post position, i.e., in formulas of the form “(x) ∀ x”. So it might hypothetically be the case that the creators of amsmath have never thought of the usage “∀ ∈ : (x)”.

Also, when a line ends right after the colon in text mode, e.g., in $∀ ∈ :\\(x)$ or when the line randomly happens to end after the colon in $∀ ∈ :\penalty1 (x)$ , the output has some horizontal space between : and the right margin.

So what's the best™ default spacing around the colon in quantified formulas such as

∀ ∈ : ()

or, for the sake of a longer example,

∀ ∈ , ∈ , ∈ : ₁ ∧ ₂ ⇒ ₁ ∧ ₂

(where the precedence is as in https://alchemy.cs.washington.edu/user-manual/4_1First_Order_Logic.html) and how to express it in LaTeX when amsmath (or another package which makes \colon behave similar to that of amsmath, say, NewTX, or unicode-math + TeX Gyre Termes Math) is in use?

  • What should \penalty do, apart from adding a feasible line break point, which is clearly not wanted? And is anybody forcing you to use \colon? – egreg Feb 24 '23 at 21:37
  • 2
    @egreg On the contrary, we sometimes wish to break after the colon. I consider it natural. –  Feb 24 '23 at 21:38
  • But definitely *not* after \forall, am I right? – egreg Feb 24 '23 at 21:39
  • 2
    @egreg Yes, that too. That's because ∀ …: … is a syntactic structure, so I don't see why it should be treated any differently than other variable binders, such as the class comprehension { … | … }. It's better to break right after the quantifier than within ∈ . –  Feb 24 '23 at 21:42
  • Anyway, I've seen several mathematical logic books and none, that I remember, used a colon after a quantificator. There's no real consensus about how to typeset logic formulas. I heartily disagree about breaking a line between a quantificator and the variable it's binding. As stated, the question is off-topic. Please, just state what you want to achieve, not about style. – egreg Feb 24 '23 at 21:42
  • 2
    @egreg Oh. Bourbaki, I think, writes (∀ ∈ )((x)). KRML writes ∀ ∈ ⦁ (x). At my university, however, 100% of the maths and comp.sci professors wrote ∀ ∈ : (x). –  Feb 24 '23 at 21:45
  • And others write (x)((x)) – egreg Feb 24 '23 at 21:46

0 Answers0