Notation

This page lists the notation Synthetic reads today: what each piece means, how a formula groups, which formulas read more than one way, and which readings can be sent to Lean. It covers the notation Synthetic starts with. Notation you declare in a Document isn’t read yet.

Each formula passes through up to four stages, and this page says how far each kind of formula goes:

  1. Written: what you typed, which Synthetic keeps as you wrote it.
  2. Read: the mathematical structures it recognizes in what you wrote. There may be more than one.
  3. Sent to Lean: a reading Synthetic can write as a Lean statement, which Lean then checks.
  4. Proved: not yet. A check leaves the statement’s proof as an obligation.

How to type each character, and which look-alike characters are read, is in the formula editor reference.

Constants

WrittenMeans
𝒰the universe of types
ℕthe natural numbers
𝟎the empty type
𝟏the unit type
refl athe proof that a = a, also written refl with a in a subscript
0, 1, 2, …natural numbers, written with the digits 0 to 9

Forms

In this table, A and B stand for any formula in the place they hold.

WrittenReads as
A → B, or A -> Bthe type of functions from A to B
(a : A) → Bthe type of functions taking each a in A to an element of B, which may mention a: the HoTT book’s Π
A × B, or A * Bthe product of two types, or the product of two natural numbers
(a : A) × Bthe type of pairs of an a in A and an element of B, which may mention a: the HoTT book’s Σ
A + Bthe sum of two types, or the sum of two natural numbers
a = bthe type of equalities between a and b
a = b, with a type such as ℕ in a subscript on the =the same, saying the type the equality is in
A ≃ Bequivalence of types
f xf applied to x
2 n: a number before what it multiplies2 times n
n with 2 in a superscriptn to the power 2, on natural numbers
( … )what’s inside, read as one part

Superscripts and subscripts come from the editor’s toolbar, as the formula editor reference says. A name is any name a binder gives or the table above defines. Any other name, such as x in x + 1, is read, but it stands for nothing yet.

How a formula groups

Without parentheses, a formula groups by these, tightest first:

  1. superscripts;
  2. application, and a number before what it multiplies: f x y is (f x) y;
  3. ×;
  4. +: a + b × c + d is (a + (b × c)) + d;
  5. = and ≃: A × B = B × A is an equality between two products;
  6. → and the binders: x = y → P is a function out of an equality.

And within each:

Formulas that read more than one way

+ and × each mean two things: on types, a sum or a product; on natural numbers, addition or multiplication. Synthetic keeps every reading what they join allows, and leaves the choice to you.

To compare readings and choose one, see Readings and Lean checks.

Which readings can be sent to Lean

A check sends Lean a reading only where Synthetic can write it as a Lean statement. That takes all of these:

Where a reading can’t be sent, the check says why, in the words of the rule it meets, such as “Lean checks statements; this reading isn’t one”.

What a check shows

Lean checks that the statement sent is one it can state, and leaves its proof as an obligation. So a false statement passes as readily as a true one: 0 = 1 and 1 + 1 = 3 are sent, as 1 + 1 = 2 is.

Two answers Lean 4 has given, as Synthetic’s tests record them:

A check that Lean can state a reading isn’t a proof of it. Readings and Lean checks says what confirming a reading records.

Not read yet

This page describes Synthetic as it is now, and changes as notation is added.