To output a formula (which fits on one line), you use \[ ... \]
or \{ ... \}. The first form will print the formula in a
mathematical version (like
). The second
will produce a verbatim version, using the syntax (like
/\X (X -> X)).
The second form is useful when producing a documentation for a library, when you have to teach your reader the syntax you use.
Formulas produced by \[ ... \] may be broken by TeX using its usual
breaking scheme. Formula produced by \{ ... \} will never be broken
(because LaTeX do not insert break inside a box produced by \verb).
We will see later how to produce larger formulas.
LaTeX formulas can use extra goodies:
A is a defined symbol in , $$A will refer to the
definition of A (If this definition is applied to arguments, the
result will be normalised before printing). Remember that a single dollar
must be used when $+ to refer to the addition symbol when it is
not applied to two arguments).
$0 refers to the conclusion of the current goal.
\[n or \{n where n is an
integer to access the conclusion and the hypothesis of the nth goal to prove
(instead of the current goal).
A \[ ... \] or \{ ... \} can be used both in text mode
and in math mode. If you are in text mode, \[ ... \] is
equivalent to $\[ ... \]$ (idem with curly braces).
WARNING: the closing of a formula: \], \}
should not be immediately followed by a character such that this
closing plus this character is a valid identifier for . Good practice is
always to follow it by a white space. This is a very common error!