Most (but not all) of the math-mode stuff in my book consists of terms and formulas of a clean logic:
The terms are recursively constructed from constants (such as 0, 1, 2, true, f, g, +, ∈, or, not, … of any arity including 0) and variables (such as S, x, y, …) using applications of terms to other terms (such as 1+x, f(0,g(y)), x∈S, …).
The atomic formulas are of the form t₁ = t₂, where t₁ and t₂ are terms (such as 3 = x+2, x∈S and not false = true, …).
The formulas are recursively constructed from atomic formulas using logical negation (¬) of formulas (such as ¬(1=2+3), ¬(f(x)=g(0,y)), …), conjunctions (∧) and disjunctions (∨) (such as v=2+x ∧ y+2=z, v=x ∨ y∈S = true, …), and variables binders (such as ∃ x: x+1=2, ∀ x,y: x+y=y+x, {x|x+1>y}, …).
(Btw., all terms have sorts, and there is also a well-sortedness condition imposed on terms and atomic formulas. We drop this here for simplicity.)
Now, when I typeset my formulas containing equality = and binary logical connectives ∧ and ∨, do I get counterintuitive distances? E.g., in v=x \land y=z
, the distances around \land
(a binary operator in LaTeX) are smaller than around =
(a relation in LaTeX), aren't they?
If so, what would be the cleanest way to repair this in my setup? I don't really know and was thinking of something like
\documentclass{article}
\newcommand{\formulaConjunction}{\mskip1.2mu plus.6mu minus.6mu\land\mskip1.2mu plus.6mu minus.6mu}
\newcommand{\formulaDisjunction}{\mskip1.2mu plus.6mu minus.6mu\lor\mskip1.2mu plus.6mu minus.6mu}
\newcommand{\memberOf}{\mathbin{\in}}
\begin{document}\noindent
\(v\memberOf S = \mathsf{true} \formulaConjunction y=f(z)\)\\
\(v=x+1 \formulaDisjunction y=z\)
\end{document}
This way, the distances around the logical conjunction and disjunction connectives become slightly larger than around the equality symbol of the logic, and the distances around the equality symbol become slightly larger than the distances around infix operators (such as +, ∈), don't they? However, this seems very ad-hoc to me. Before I change hundreds of formulas in my book this way, are there any potential pitfalls? Is there anything better that works for all of [pdf|xe|lua]latex ? My guess is that the aforementioned logic is somewhat standard, so some someone must have already done this (or at least a similar) exercise.
\( (v=x+1) \formulaDisjunction (y=z) \)
?