Skip to content
Topos Uranos

Mathematics and logic: synthesis and challenges

Topos Uranos · Last revised: 14 October 2026

Summary

This lesson closes the fourth unit of the course, devoted to mathematics and logic. It rebuilds the chain of principles and mechanisms that runs from mathematical mode to deduction trees, pointing out at each link which principle is used and in which lesson it is established; it places what has been achieved within the plan of the course and specifies which questions, merely anticipated, are left for the following units; it repeats in its exit assessment the skills of the entry assessment; and it ends with six challenges, harder than the problems of the lessons, which require combining several of them to compose a set of notes with statements, a proof and references, to diagnose documents that compile with defects nothing reports, to carry a logical notation from one tradition to another, to build and debug a deduction with several branches, to predict the numbering and the quantities of a physics report, and to merge two incompatible preambles.

Learning objectives

  1. Rebuild the order of the mechanisms of the unit, identifying the principle on which each one rests.
  2. Explain why so many defects of mathematical writing compile without warning, and where to look for their trace in the output or in the log.
  3. Distinguish what the unit established from what it only anticipated and the following units will develop.
  4. Predict the numbers, the references and the quantities produced by a source with equations, statements and units, and correct it.
  5. Design a preamble that fixes the notation, the statements and the loading order of the packages of a piece of work, and that allows a change of convention without touching the body.

What the unit achieved

The unit set out to have each sign of a formula typeset according to what it means, and to keep the notation of a piece of work the same on all its pages. The purpose has been fulfilled by relying on what the introduction declared known from the previous units: cross-references, which depend on what a label records; commands of one’s own, which gather the decisions of form in the preamble; and the reading of the log. With that, the path travelled can be read as a single chain in five stretches.

Inline and displayed formulas

The lesson on inline and displayed formulas established the principle on which almost all the others depend: in mathematical mode the spaces of the source do not count, and the engine separates each sign according to its class, ordinary, binary operator, relation, punctuation, opening or closing. From it the lesson deduced why a variable is not written with \textit, why $12,345$ gives “12, 345” and why the punctuation of the sentence goes outside an inline formula. It showed that in LuaLaTeX a Greek letter outside its mode produces no error, but disappears or appears out of control, with a single line “Missing character” in the log; it punctuated the displayed formula as part of the sentence, without blank lines and without $$; it numbered with equation, \eqref, \numberwithin and \tag; it distinguished \text from \mathrm; and it studied the comma, which in a formula is punctuation and goes in braces when it belongs to a number, the icomma package, and siunitx, whose defaults already follow English usage and whose locale = UK guards a document against a preamble inherited from another language.

Symbols and notation

The lesson on symbols and notation started from a rule of grouping: ^ and _ act on a single element or on a group in braces. It went through fractions, roots, Greek letters and alphabets, among them the combinations that are lost without error under fontspec, such as \mathbf{\Gamma}; named operators, which babel in English leaves as they are, and what babel in Spanish, the clearest case among the languages that intervene, changes in them (\lim with an accent, a new \sen, \sin untouched) and what es-minimal suppresses; large operators, delimiters and their sizes; the search for an unknown symbol; and unicode-math, with its four precautions. It ended by taking the notation to the preamble, in commands of one’s own that are decided once.

Multi-line equations

The lesson on multi-line equations replaced stacked formulas and eqnarray by align, with the & before the relation, and established that an alignment environment is a table: one row for each \\ and one cell for each stretch between two &. From this it deduced its silent defects (the =&, the extra &, the final double backslash that numbers an empty line, the label on a line with \notag) and its noisy errors; it chose among gather, multline, split, aligned and gathered according to the number the whole must carry; it composed piecewise definitions with cases and dcases, text with \intertext, matrices and augmented matrices; it numbered groups with subequations and allowed page breaks.

Theorems and proofs

The lesson on theorems and proofs brought to statements the idea of declaring instead of imitating: with amsthm, \newtheorem fixes the heading, the number and the style of each kind of statement. It deduced when a shared counter is suitable and when separate ones are, when numbering by section or by chapter is, and which style corresponds to what is asserted, to what is stipulated and to what accompanies. It composed proofs with proof, whose heading comes from babel, and corrected the orphan square with \qedhere; it referred with cleveref, loaded after amsthm, with one \crefname per environment, and discovered that with the shared counter of \newtheorem cleveref calls every statement “theorem”, a defect that thmtools corrects.

Logic and deductions

The lesson on logic and deductions separated the object language from the metalanguage, with \to against \Rightarrow and the signs \vdash, \models and \equiv; it applied the principle of the class of a sign to the negation tilde, to the bar of sets and to the colon of functions; it proposed one command per connective, without arguments to change signs and with arguments to change syntax; it gathered the packages of the modal signs; it composed truth tables with array; and it built natural deduction trees with bussproofs, whose stack logic explains its two errors, together with Fitch boxes and arguments in standard form.

The following figure gathers the five stretches into a single chain. Each node of the column is a mechanism or a rule, numbered according to the order in which they rest on one another and joined by an arc to the earlier links it uses; around them float the supports, that is, the principles to which the chain turns again and again, each joined by a solid line to the links that rest on it and by a dotted one to the link where it is established, except those established in previous units, which are drawn as rings. Clicking a support highlights all the links that use it, and each link refers to the lesson in which it is studied.

Supports of the chain

  • AWhat a label records. A label records the last number assigned before it, within its environment, without knowing what it is attached to. Established in the previous unit. Admitted without proof in this unit.
  • BCommands of one’s own. A command of one’s own names a function, and its definition, written once in the preamble, fixes its form; changing it changes the whole document. Established in the previous unit. Admitted without proof in this unit.
  • CLoading order. Packages are loaded in the order in which they are read, and a later one adjusts, keeps or undoes what an earlier one did. Established in the previous unit. Admitted without proof in this unit.
  • DThe class of a sign. In mathematical mode the engine separates each sign according to its class (ordinary, binary operator, relation, punctuation, opening, closing) and ignores the spaces of the source. Established in: 1. Two modes.
  • EWhat disappears without error. In LuaLaTeX, a sign that the font in use does not contain does not stop the compilation: it disappears, and only leaves a line “Missing character” in the log. Established in: 2. Signs in the wrong mode.
  • FOne element or one group. Subscripts, superscripts and arguments act on the element that follows or on a group in braces, which are not printed. Established in: 6. Subscripts and superscripts.
  • GAn alignment is a table. An alignment environment builds one row for each \\ and one cell for each stretch between two &, even if the row is left empty. Established in: 11. Aligning with align.
  • HThe stack of trees. An inference with n premises takes the last n trees of the stack and returns one; the proof is printed if exactly one is left at the end. Established in: 23. Deduction trees.
  1. Segment 1 Inline and displayed formulas

    • Predict the result of a sign, a variable or a word written in the wrong mode.
    • Punctuate inline and displayed formulas as parts of the sentence.
    • Number displayed formulas and refer to them.
    • Write decimals and quantities according to English usage, with siunitx or without it.
    1. Two modes. In mathematical mode letters are variables, the spaces of the source do not count, spacing is decided by the class of each sign and a blank line is not allowed.

      Rests on: D (The class of a sign). Proved in: Inline and displayed formulas.

    2. Signs in the wrong mode. A _ in the text gives “Missing $ inserted”; \alpha outside a formula disappears or appears glued; a word inside a formula is a product of variables and goes in \text or in \mathrm, which are not interchangeable.

      Uses: 1. Two modes. Rests on: E (What disappears without error). Proved in: Inline and displayed formulas.

    3. The formula in the sentence. An inline formula limits its height and leaves the punctuation of the sentence outside; a displayed formula is punctuated inside, without blank lines, with \[…\] or equation and never with $$.

      Uses: 1. Two modes. Rests on: D (The class of a sign). Proved in: Inline and displayed formulas.

    4. Numbering and referring. equation numbers and its label goes inside; \eqref adds the parentheses; \numberwithin numbers by section; \tag sets a tag without using up a number.

      Uses: 3. The formula in the sentence. Rests on: A (What a label records). Proved in: Inline and displayed formulas.

    5. Point and comma. The comma of a formula is punctuation, and a comma that belongs to a number goes in braces, {,}; the point is an ordinary sign; babel in English converts neither, and siunitx takes its convention from \sisetup, not from babel.

      Uses: 1. Two modes. Rests on: D (The class of a sign). Proved in: Inline and displayed formulas.

  2. Segment 2 Symbols and notation

    • Group subscripts and superscripts and predict what is missing without braces.
    • Choose alphabet, variant and operator according to the convention of the discipline.
    • Foresee what babel changes in the operators: nothing in English, a good deal in Spanish.
    • Fix the notation of the document in its preamble.
    1. Subscripts and superscripts. x^10 raises only the 1; x^{10} raises the group; two indices of the same kind in a row give “Double subscript” or “Double superscript”.

      Uses: 1. Two modes. Rests on: F (One element or one group). Proved in: Symbols and notation.

    2. Letters and alphabets. Each alphabet says what kind of object is named; with fontspec, \mathbf{\Gamma} disappears and \mathbf{\alpha} does not come out bold, and the bold of a symbol is \boldsymbol.

      Uses: 6. Subscripts and superscripts. Rests on: E (What disappears without error). Proved in: Symbols and notation.

    3. Named operators. Operators go upright with their space; babel in English changes nothing, whereas babel in Spanish puts an accent on \lim, \max, \min and \inf, defines \sen and leaves \sin alone, and es-minimal suppresses all of it.

      Uses: 6. Subscripts and superscripts. Rests on: D (The class of a sign). Proved in: Symbols and notation.

    4. Delimiters. \left and \right measure what they enclose and come in pairs; manual sizes give fine control; mathtools defines pairs such as \abs.

      Uses: 6. Subscripts and superscripts. Rests on: D (The class of a sign), F (One element or one group). Proved in: Symbols and notation.

    5. Notation in the preamble. \R, \vect, \dd or \abs are defined once; unicode-math goes after amsmath, with no amssymb behind it, and asks for \symbf for bold.

      Uses: 7. Letters and alphabets, 8. Named operators, 9. Delimiters. Rests on: B (Commands of one’s own), C (Loading order), E (What disappears without error). Proved in: Symbols and notation.

  3. Segment 3 Multi-line equations

    • Align chains and systems with align, with the & before the relation.
    • Decide which lines are numbered and predict the numbers.
    • Choose the environment according to the structure and the number of the whole.
    • Compose piecewise definitions, matrices and interspersed text.
    1. Aligning with align. The & goes before the relation and \\ opens a row; =& and an extra & change the result without warning, and a blank line stops the compilation.

      Uses: 3. The formula in the sentence. Rests on: G (An alignment is a table), D (The class of a sign). Proved in: Multi-line equations.

    2. Which lines are numbered. align numbers every row, including the empty one left by a final \\; \notag removes the number without using it up, and a label on that line records the number of the next numbered line.

      Uses: 11. Aligning with align, 4. Numbering and referring. Rests on: G (An alignment is a table), A (What a label records). Proved in: Multi-line equations.

    3. One number for the whole. split inside equation gives the chain one number; aligned and gathered are blocks without a number; subequations gives letters to a group that uses up a single number.

      Uses: 11. Aligning with align, 12. Which lines are numbered. Rests on: A (What a label records). Proved in: Multi-line equations.

    4. Cases, matrices and text. cases has two columns and turns an extra & into the end of a row; dcases typesets at display size; matrices allow ten columns; array draws bars; \intertext does not break the alignment.

      Uses: 11. Aligning with align. Rests on: G (An alignment is a table). Proved in: Multi-line equations.

  4. Segment 4 Theorems and proofs

    • Declare statements with their style and their counter.
    • Predict the numbering of a shared or separate series.
    • Close proofs with the symbol in its place.
    • Refer to statements by their name.
    1. Declared statements. \newtheorem from amsthm, in the preamble, fixes heading, number and appearance; the heading is written by the author, and the starred form does not number.

      Rests on: B (Commands of one’s own). Proved in: Theorems and proofs.

    2. Counters and styles. [thm] makes a single series, whose number tells the place; [section] or [chapter] numbers by division; plain, definition and remark answer to what is asserted, stipulated or accompanies.

      Uses: 15. Declared statements. Rests on: B (Commands of one’s own). Proved in: Theorems and proofs.

    3. Proofs. proof takes its heading from babel and sets the square at the end of the last paragraph; if it ends in a formula or a list, \qedhere puts it in its place, except next to a number.

      Uses: 15. Declared statements, 11. Aligning with align. Proved in: Theorems and proofs.

    4. Referring to statements. The label goes inside the environment; amsthm is loaded before cleveref, with one \crefname per environment; with the shared counter of \newtheorem everything is called “theorem”, and thmtools corrects it.

      Uses: 16. Counters and styles, 4. Numbering and referring. Rests on: A (What a label records), C (Loading order). Proved in: Theorems and proofs.

  5. Segment 5 Logic and deductions

    • Distinguish the object language from the metalanguage in the notation.
    • Correct the spacing of the tilde, the bar, the colon and the quantifiers.
    • Change tradition from the preamble.
    • Build and debug deduction trees, truth tables and arguments.
    1. Two levels of language. \to is the connective of the object language and \Rightarrow the arrow of the metalanguage; \vdash asserts deduction and \models semantic consequence.

      Uses: 8. Named operators. Proved in: Logic and deductions.

    2. Logical spacing. \sim is a relation and goes in braces; the keyboard bar is ordinary and \mid a relation; : is a relation and \colon punctuation; the scope of a quantifier is decided by a parenthesis.

      Uses: 19. Two levels of language, 5. Point and comma. Rests on: D (The class of a sign). Proved in: Logic and deductions.

    3. One command per connective. Without arguments, the command changes the sign from one tradition to another; with arguments, the definition also decides the order and the parentheses, and allows Polish notation.

      Uses: 20. Logical spacing, 10. Notation in the preamble. Rests on: B (Commands of one’s own), F (One element or one group). Proved in: Logic and deductions.

    4. Modal signs and truth tables. \Box, \Diamond and \vDash require amssymb, and latexsym loaded before changes the diamond; a truth table is an array with T and F upright.

      Uses: 19. Two levels of language, 14. Cases, matrices and text. Rests on: C (Loading order), G (An alignment is a table). Proved in: Logic and deductions.

    5. Deduction trees. In bussproofs, \AxiomC sets a leaf and inferences take the last trees; if some are missing, “Hypotheses missing!”; if there are too many, “Proof tree badly specified.” when printing.

      Uses: 19. Two levels of language. Rests on: H (The stack of trees). Proved in: Logic and deductions.

    6. Boxes and standard form. logicproof composes Fitch boxes as a table with subproof; an argument in standard form numbers the premises and separates the conclusion with a rule and \therefore.

      Uses: 23. Deduction trees, 22. Modal signs and truth tables. Rests on: G (An alignment is a table). Proved in: Logic and deductions.

Towards tables and figures. The chain stops where formulas, statements and deductions are complete and numbered: the table, which here served only matrices, truth tables and proofs, grows in the next unit into the tables and figures of the document, with their captions, their numbers and their place on the page.