⚜ PRINCIPIA ORTHOGONA · Book XIV · Ch 9 ← Ch 8 · Book XIV contents
Book XIV · Chapter 9 · 2026-09-28 · The design of mathematical language
LINGUISTICS · MATHEMATICALHISTORY · MATHEMATICS

What Types Decide

From Leibniz’s signs to a compiler’s juxtaposition
Warrantbook14/ch09-verify.py, 0 FAIL · book14/TypesDecide.lean, kernel-checked
SourcesLeibniz 1684 · Avigad · Aberdein/Ganesalingam · Ganesalingam & Gowers · Macmillan · I❤LA · Stathopoulos & Teufel · Matsuzaki et al.
Corpusthis series at 4b4b354
A symbol does not carry its meaning alone. The same “×” commutes on numbers and not on matrices; the same juxtaposition means a product of scalars, of a matrix and a vector, or of two matrices; the same sign in Leibniz's quotient rule flips according to whether a quantity grows or shrinks. What decides is the type of the thing the symbol is applied to. This chapter follows that idea from Leibniz in 1684 to a compiler in 2021, and tests a claim about the grammar of mathematics on this series.
1 · Leibniz, 1684

A notation designed to be compressed

First page of Leibniz, Nova Methodus pro maximis et minimis, as printed in the collected edition, with the rules for da, d(ax), sums, products xv and quotients v/y
Leibniz, Nova Methodus pro maximis et minimis, Acta Eruditorum Lipsiensium 1684, as reprinted in the collected mathematical writings. Page image held in the repository.

On the first page of the calculus, Leibniz lists his rules: da = 0 for a constant, d(ax) = a dx, the differential of a sum is the sum of the differentials, and Multiplicatio: d(xv) = x dv + v dx. Then comes a sentence about notation itself: “In arbitrio enim est vel formulam, ut xv, vel compendio pro ea literam, ut y, adhibere”, “for it is at our discretion to use either the formula, like xv, or, as an abbreviation for it, a letter, like y.” A letter may stand for a whole formula. That is Chapter 7's compression, written into the rules of the calculus. CITED

His quotient rule is printed as d(v/y) = (±v dy ∓ y dv)/yy. The script checks both readings against the derivative at nine points. With the lower signs, (y dv − v dy)/yy, it is correct at every point. With the upper signs it gives exactly the negative. The next paragraph, “Quoad Signa…”, explains that the signs are settled by whether the quantities increase or decrease. The formula leaves a slot, and a fact about the quantities fills it. COMPUTED

2 · The syntax is type-dependent

Ganesalingam, I❤LA, and one symbol with two laws

Aberdein's review of Ganesalingam's The Language of Mathematics reports its central observation: “Ganesalingam observes that the syntax of mathematics is type-dependent”, so that whether an expression is even well formed can depend on what kind of object its letters denote. Ganesalingam also insists on “full adaptivity”: the mathematics must come from the text, not be built into the analyser. CITED

I❤LA, a language that compiles chalkboard linear algebra into code, applies the same idea. Its rule is that “juxtaposition is multiplication”, compiled “depending on the types of the operands”. The ambiguity in Chapter 1's 6÷2(1+2) comes from juxtaposition with no types attached. Stathopoulos and Teufel use “a mathematical type” as the key for searching research mathematics. CITED

TypesDecide.lean makes the point exact. On the natural numbers, a * b = b * a (nat_mul_comm). On 2×2 integer matrices the same symbol fails: with A = [[0,1],[0,0]] and B = [[0,0],[1,0]], AB ≠ BA (matrix_mul_not_comm). A reader who knows the symbol but not the type cannot know whether the law may be used. Lean's elaborator is the part that decides (Book XIX ch 3). KERNEL-CHECKED

3 · Too little and too much

Does this series write like mathematics?

Avigad (2021) says formal systems “specify too little” and “too much”. He also says of mathematical language: “There are no subtle variations of tense, modality, or aspect, and the subject is generally devoid of subjunctives and counterfactuals.” That is a claim that can be tested. CITED

textwordswas/were per millionmodals per million
Mathematics in Lean88,0661362,180
Avigad 2021 (philosophy of mathematics)16,6531,0213,663
Jurafsky & Martin 2026 (a textbook of another field)302,974≈2,0702,872
this series1,395,6692,9002,559

Modality does not separate the four: all fall between 2,100 and 3,700 modals per million. Tense does. Mathematics in Lean almost never uses the past tense (136 per million), just as Avigad predicts. This series uses it 21 times as often, more than a general textbook. COMPUTED

What that saysMathematics in the strict sense is timeless: it states what is true. This series mostly records what happened: a claim made and withdrawn, a scientist in the gallery, a figure corrected on the Mac. Chapter 2 found the imperatives are in the Lean, and here the timeless statements are too. The prose is the history of doing mathematics, and the Lean is the mathematics. MODEL
4 · Machines that write like people

Macmillan's On the Grammar of Proof names the two virtues Chapter 8 set side by side. Syntactic completeness is a proof that “entirely encode[s] an argument's subtlest details”, as the Lean does. Semantic adequacy is a proof that convinces a fluent mathematician, as Hardy and Wright's does. Ganesalingam and Gowers built a prover that “presents the solutions in a form that is hard to distinguish from solutions that human mathematicians might write”: completeness underneath, adequacy on the surface. Matsuzaki and colleagues tested a system on “real university entrance exam problems”, starting from the problem as a student reads it. CITED

Not establishedGanesalingam's book is still not held; his claims come through Aberdein's review. The Leibniz text was transcribed by eye from the page image, which does not show the edition's page number. Counting “was/were” is a crude measure of tense, and this series' gallery of historical chapters inflates it. None of the systems in §4 was run here. OPEN
  1. G. W. Leibniz, “Nova methodus pro maximis et minimis…”, Acta Eruditorum, Leipzig, 1684; page image from the collected mathematical writings. Held.
  2. J. Avigad, “The design of mathematical language”, 29 Aug 2021.
  3. A. Aberdein, review of M. Ganesalingam, The Language of Mathematics (Springer, 2013), Philosophia Mathematica 25(1) (2017).
  4. M. Ganesalingam & W. T. Gowers, “A fully automatic problem solver with human-style output”, arXiv:1309.4501, 2013.
  5. W. Macmillan, On the Grammar of Proof, MSc thesis, University of Gothenburg, 2021 (supervisor A. Ranta).
  6. Y. Li, S. Kamil, A. Jacobson & Y. Gingold, “I❤LA: Compilable Markdown for Linear Algebra”, ACM Trans. Graph. 40(6), Article 264, 2021.
  7. Y. A. Stathopoulos & S. Teufel, “Mathematical Information Retrieval based on Type Embeddings and Query Expansion”, University of Cambridge.
  8. T. Matsuzaki, H. Iwane, H. Anai & N. H. Arai, “The Most Uncreative Examinee”, AAAI-28, 2014.