Help:Editing/House Style/Mathematical Symbols

From ProofWiki
Jump to navigation Jump to search
This page is about stylistic remarks on mathematical formulas. For technical instructions for using $\LaTeX$, see Help:LaTeX Editing

Mathematical Symbols

Symbol Set

The only symbols that are accepted in $\mathsf{Pr} \infty \mathsf{fWiki}$ $\LaTeX$ source code are the standard alphanumeric and punctuation characters that can be found on a standard English-language keyboard. Letters with diacritical marks such as "á" should not be used.

If non-English characters are needed within $\LaTeX$ source code (the obvious instance being Greek), then the full $\LaTeX$ definition is to be used.

For example: $\alpha$ is to be rendered by the code $\alpha$.

The same applies to specialised mathematical symbols. While it is appreciated that some contributors may have favourite techniques to allow them to place various mathematical symbols directly into the wiki text, such techniques are not portable and cause rendering issues in some browsers.

The only exceptions to this rule are:

when reporting the name of a mathematician, for example: Wacław Franciszek Sierpiński
when explaining the linguistic derivation of a term in, for example, a Language Note section. It is standard, for example, to use Greek characters directly here, rather than their $\LaTeX$ codes.

Inline Equations

Inline equations (that is, those that appear as part of a text sentence) merely need the dollar delimiters. For example:

The semilinear wave equation $\partial_t U = A U + \map B U$ is Hamiltonian.

is produced by the input:

The semilinear wave equation $\partial_t U = A U + \map B U$ is Hamiltonian.

Displayed Equations

Displayed equations should be indented using a single colon, for example, a displayed equation should look like:

$\ds \map H U = \int_0^{2 \pi} \frac {\paren {\partial_x u}^2} 2 + \frac {v^2} 2 - \map F u \rd x$

which you can enter as:

:$\ds \map H U = \int_0^{2 \pi} \frac {\paren {\partial_x u}^2} 2 + \frac {v^2} 2 - \map F u \rd x$

Note the $\mathsf{Pr} \infty \mathsf{fWiki}$ custom command \ds which is a convenience abbreviation for the full command \displaystyle.

Using a format that places the equation on the center of the page:

$$E = m c^2$$

is discouraged, because with our "short sentence" house style, this breaks up the reading flow.

Big Operators

The \ds command should be used at the front of expressions using the 'big operators' such as \sum and \prod, whether the equation is displayed or inline.

This includes (but may not be exclusive to) the commands \frac, \binom, \lim, \bigcup, \bigcap, \int, \sum and \prod.

For example:

$\sum_{i \mathop = 1}^n$
$\prod_{i \mathop = 1}^n$
$\frac {-b \pm \sqrt {b^2 - 4ac} } {2 a}$
$\lim_{n \to \infty} \frac 1 n$

all look better as:

$\ds \sum_{i \mathop = 1}^n$
$\ds \prod_{i \mathop = 1}^n$
$\ds \frac {-b \pm \sqrt {b^2 - 4ac} } {2 a}$
$\ds \lim_{n \mathop \to \infty} \frac 1 n$

and are produced by, respectively:

\ds \sum_{i \mathop = 1}^n
\ds \prod_{i \mathop = 1}^n
\ds \frac {-b \pm \sqrt {b^2 - 4ac} } {2 a}
\ds \lim_{n \mathop \to \infty} \frac 1 n

Furthermore, to improve aesthetic appeal certain characters, such as $=$ and $\in$, when used in subscripts of big operators, must be endowed with the \mathop command to enforce appropriate spacing.

As a contrast, compare:

$\ds \sum_{i = 1}^n \quad \sum_{i \mathop = 1}^n$
$\ds \bigcap_{n \in \N} \quad \bigcap_{n \mathop \in \N}$

The \mathop command is to be used in the following manner (the code produces $\ds \sum_{i \mathop = 1}^n$):

\ds \sum_{i \mathop = 1}^n

Abbreviated Symbols

Certain symbols have abbreviated forms for their big versions:

\dfrac can be used instead of \ds \frac
\dbinom can be used instead of \ds \binom

where d is for display.

Of course, if other big operators are used in the same equation, the \ds command is needed anyway.

However, it does no harm to include \dfrac and \dbinom inside a line defined as \ds, and may make refactoring easier.

So feel free to develop the habit of using \dfrac and \dbinom throughout.

The d of Calculus

When writing calculus operators, use a non-italic form for the $\d$. To achieve this, write it as \d or \rd (the latter includes a half-space before it, for use in integrals).

So you would have:

$\dfrac {\d y} {\d x}$

which would be produced by:

\dfrac {\d y} {\d x}

rather than:

$\dfrac {d y} {d x}$

which would be produced by:

\dfrac {d y} {d x}


We have several fonts available, many of which have particular conventional uses in mathematics.

Examples are:

Calligraphy: \mathcal, which produces $\mathcal{ABCDE} ..., \mathcal {1234567890}$ (uppercase only, but also digits)
Blackboard: \mathbb or (preferably) \Bbb, which produces $\Bbb{ABCDE} ...$ (uppercase only, no digits)
Script: \mathscr, which produces $\mathscr{ABCDE} ...$ (uppercase only, no digits)
Sans serif: \mathsf, which produces $\mathsf{ABCDE} ... \mathsf{abcde} ..., \mathsf {1234567890}$
Fraktur: \mathfrak, which produces $\mathfrak{ABCDE} ... \mathfrak{abcde} ..., \mathfrak {1234567890}$
Fixed Width: \mathtt, which produces $\mathtt{ABCDE} ... \mathtt{abcde} ..., \mathtt {1234567890}$

The use of Fraktur and Script are discouraged, as they are not so easy on the eye and can be difficult to decipher on certain browsers.

Also note that:

\T and \F implement $\T$ and $\F$ respectively, designed to be used for True and False respectively
$\N, \Z, \Q, \R, \C$ have their own $\LaTeX$ codes: \N, \Z, \Q, \R, \C
We also have \GF implemented for $\GF$ (note that \F cannot be used here, as it is already used for $\F$)
all \mathcal uppercase letters have custom $\mathsf{Pr} \infty \mathsf{fWiki}$ shortcut implementations, as \AA, \BB, and so on

Use of Logical Symbols in Mathematical Exposition

This applies mainly to the use of the conjunction symbol $\land$, that is $\text {and}$, and the disjunction symbol $\lor$, that is $\text {or}$.

It is convenient sometimes to write a statement in the style:

$\forall y \in R: \lambda_y = y * I_{_R} \land \rho_y = I_{_R} * y$

However, it may not be immediately obvious to the reader exactly what $\land$ means.

In the various fields, for example abstract algebra and set theory, $\land$ and $\lor$ have a number of different meanings, for example meet and join.

If the reader has been studying such material, it can be irritating to have to change mental gears and suddenly have to adjust to the fact that $\land$ means $\text {and}$.

Hence it is strongly recommended that the above statement be written:

$\forall y \in R: \lambda_y = y * I_{_R} \text { and } \rho_y = I_{_R} * y$

reserving $\land$ and $\lor$ for their use in the field of logic.

Punctuation niceties

A sentence broken by a displayed equation should be ended with a colon:

$\dfrac {\text{display}} {\text{equation}}$

for a better presentation.

On the other hand, the displayed equation itself should not be ended with a full stop or comma.

That is, one should write:

$\displaystyle \bigcap_{S \mathop \in \Bbb S} \Bbb U \setminus S = \Bbb U \setminus \bigcup_{S \mathop \in \Bbb S} S$

and not:

$\displaystyle \bigcap_{S \mathop \in \Bbb S} \Bbb U \setminus S = \Bbb U \setminus \bigcup_{S \mathop \in \Bbb S} S$.

In particular, including the full stop inside the $\LaTeX$ it terminates is definitely incorrect, for readily apparent reasons. So please do not do this:

$\displaystyle \bigcap_{S \mathop \in \Bbb S} \Bbb U \setminus S = \Bbb U \setminus \bigcup_{S \mathop \in \Bbb S} S.$

This is a style tip borrowed from Ian Stewart, from his Galois Theory, 3rd ed. of $2004$.

Use of commas is discouraged. This sort of structure is considered incorrect:

Let $x$ be as follows,
$x \in S$

as commas are reserved in mathematics for separation of elements of a list.


To end a proof, the template {{qed}} should be used, which looks like:

or if you wish to break your page up into subproofs, end those subproofs with {{qed|lemma}}, which looks like:


In a dash for consistent notation, it is understood that these templates should immediately succeed the last line of the proof, that is:

Hence the result.

and not:

Hence the result.


Tempting though it is to write "Q.E.D." at the bottom, this is so uncool as to be positively naff.

Also see


I have come to the conclusion that eliminating visual junk from the printed page is more important than punctuatory pedantry ... everything is much cleaner and less ambiguous without punctuation.