<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://invarians.org/index.php?action=history&amp;feed=atom&amp;title=Lean_theorem_prover%2FNotation</id>
	<title>Lean theorem prover/Notation - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://invarians.org/index.php?action=history&amp;feed=atom&amp;title=Lean_theorem_prover%2FNotation"/>
	<link rel="alternate" type="text/html" href="https://invarians.org/index.php?title=Lean_theorem_prover/Notation&amp;action=history"/>
	<updated>2026-10-21T06:37:21Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.46.2</generator>
	<entry>
		<id>https://invarians.org/index.php?title=Lean_theorem_prover/Notation&amp;diff=6818&amp;oldid=prev</id>
		<title>PMA Publisher: Published from the Principia Machina source</title>
		<link rel="alternate" type="text/html" href="https://invarians.org/index.php?title=Lean_theorem_prover/Notation&amp;diff=6818&amp;oldid=prev"/>
		<updated>2026-10-15T19:35:49Z</updated>

		<summary type="html">&lt;p&gt;Published from the Principia Machina source&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw-interface=&quot;&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 19:35, 15 October 2026&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l1&quot;&gt;Line 1:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 1:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;{{DISPLAYTITLE:Notation}}&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;{{DISPLAYTITLE:Notation}}&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;{{Lean theorem prover map}}&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;This page fixes the notation used across the edition. The Foundations pages write the rules&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;This page fixes the notation used across the edition. The Foundations pages write the rules&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;of Lean&amp;#039;s type theory in the notation of the type-theory literature, inside formulas. Lean&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;of Lean&amp;#039;s type theory in the notation of the type-theory literature, inside formulas. Lean&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;

&lt;!-- diff cache key pma_cutover_20261020t051351z-soft_:diff:1.41:old-6611:rev-6818:php=table --&gt;
&lt;/table&gt;</summary>
		<author><name>PMA Publisher</name></author>
	</entry>
	<entry>
		<id>https://invarians.org/index.php?title=Lean_theorem_prover/Notation&amp;diff=6611&amp;oldid=prev</id>
		<title>PMA Publisher: Published from the Principia Machina source</title>
		<link rel="alternate" type="text/html" href="https://invarians.org/index.php?title=Lean_theorem_prover/Notation&amp;diff=6611&amp;oldid=prev"/>
		<updated>2026-10-14T18:01:21Z</updated>

		<summary type="html">&lt;p&gt;Published from the Principia Machina source&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{{DISPLAYTITLE:Notation}}&lt;br /&gt;
This page fixes the notation used across the edition. The Foundations pages write the rules&lt;br /&gt;
of Lean&amp;#039;s type theory in the notation of the type-theory literature, inside formulas. Lean&lt;br /&gt;
writes many of the same things in its own syntax, inside code. The tables set the two side by&lt;br /&gt;
side, with a one-line meaning and the page on which each first appears in the reading order;&lt;br /&gt;
where the formula and the Lean syntax first appear on different pages, both are named. A dash&lt;br /&gt;
means that the notation has no counterpart on that side.&lt;br /&gt;
&lt;br /&gt;
The formulas follow Carneiro&amp;#039;s presentation of Lean&amp;#039;s type theory, as&lt;br /&gt;
[[Lean theorem prover/Foundations/Terms, types and judgments|Terms, types and judgments]]&lt;br /&gt;
explains; the Lean syntax is that of Lean 4.34.1.&lt;br /&gt;
&lt;br /&gt;
== Judgments and rules ==&lt;br /&gt;
&lt;br /&gt;
A &amp;#039;&amp;#039;&amp;#039;judgment&amp;#039;&amp;#039;&amp;#039; is a statement about the theory, made by its rules; it is not a proposition&lt;br /&gt;
inside Lean, and Lean has no syntax for asserting one. Lean shows judgments in what it prints:&lt;br /&gt;
&amp;lt;code&amp;gt;#check&amp;lt;/code&amp;gt; prints &amp;lt;code&amp;gt;e : A&amp;lt;/code&amp;gt;, and the display of a goal lists a context above&lt;br /&gt;
&amp;lt;code&amp;gt;⊢&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! in formulas !! in Lean !! meaning !! first used&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;math&amp;gt;\Gamma&amp;lt;/math&amp;gt; || the lines above &amp;lt;code&amp;gt;⊢&amp;lt;/code&amp;gt; in a goal || a &amp;#039;&amp;#039;&amp;#039;context&amp;#039;&amp;#039;&amp;#039;: variables with their types, &amp;lt;math&amp;gt;x_1 : A_1, \ldots, x_n : A_n&amp;lt;/math&amp;gt;, each type may mention the variables before it || [[Lean theorem prover/Foundations/Terms, types and judgments|Terms, types and judgments]]&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;math&amp;gt;\vdash&amp;lt;/math&amp;gt; || &amp;lt;code&amp;gt;⊢&amp;lt;/code&amp;gt; || in a formula, &amp;quot;derives&amp;quot;; in a goal, it separates what may be used, above, from what must be shown, after it || formula: [[Lean theorem prover/Foundations/Terms, types and judgments|Terms, types and judgments]]; goal: [[Lean theorem prover/Explainers/Induction, as the machine sees it|Induction, as the machine sees it]]&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;math&amp;gt;\Gamma \vdash e : A&amp;lt;/math&amp;gt; || &amp;lt;code&amp;gt;e : A&amp;lt;/code&amp;gt;, as &amp;lt;code&amp;gt;#check e&amp;lt;/code&amp;gt; prints it || the &amp;#039;&amp;#039;&amp;#039;typing judgment&amp;#039;&amp;#039;&amp;#039;: in the context &amp;lt;math&amp;gt;\Gamma&amp;lt;/math&amp;gt;, the term &amp;lt;math&amp;gt;e&amp;lt;/math&amp;gt; has type &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; || [[Lean theorem prover/Foundations/Terms, types and judgments|Terms, types and judgments]]&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;math&amp;gt;\Gamma \vdash e \equiv e&amp;#039;&amp;lt;/math&amp;gt; || – || &amp;#039;&amp;#039;&amp;#039;definitional equality&amp;#039;&amp;#039;&amp;#039;: &amp;lt;math&amp;gt;e&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;e&amp;#039;&amp;lt;/math&amp;gt; are equal by computation and unfolding, with no proof; Lean tests it when it checks &amp;lt;code&amp;gt;rfl&amp;lt;/code&amp;gt; || [[Lean theorem prover/Foundations/Terms, types and judgments|Terms, types and judgments]]&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;math&amp;gt;e \Leftrightarrow e&amp;#039;&amp;lt;/math&amp;gt; || – || Carneiro&amp;#039;s &amp;#039;&amp;#039;&amp;#039;algorithmic definitional equality&amp;#039;&amp;#039;&amp;#039;, the relation the Lean kernel&amp;#039;s test decides; it implies &amp;lt;math&amp;gt;e \equiv e&amp;#039;&amp;lt;/math&amp;gt; || [[Lean theorem prover/Foundations/Definitional equality|Definitional equality]]&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;math&amp;gt;\Gamma\ \mathrm{ok}&amp;lt;/math&amp;gt;, &amp;lt;math&amp;gt;\cdot&amp;lt;/math&amp;gt; || – || the context is well formed; the empty context || [[Lean theorem prover/Foundations/Terms, types and judgments|Terms, types and judgments]]&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;math&amp;gt;\frac{J_1 \qquad J_2}{J}&amp;lt;/math&amp;gt; || – || an &amp;#039;&amp;#039;&amp;#039;inference rule&amp;#039;&amp;#039;&amp;#039;: from the judgments above the line, the one below || [[Lean theorem prover/Foundations/Terms, types and judgments|Terms, types and judgments]]&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;math&amp;gt;B[a/x]&amp;lt;/math&amp;gt; || – || &amp;lt;math&amp;gt;B&amp;lt;/math&amp;gt; with &amp;lt;math&amp;gt;a&amp;lt;/math&amp;gt; put in place of the variable &amp;lt;math&amp;gt;x&amp;lt;/math&amp;gt; || [[Lean theorem prover/Foundations/Terms, types and judgments|Terms, types and judgments]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Functions, types and universes ==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! in formulas !! in Lean !! meaning !! first used&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;math&amp;gt;(x : A) \to B&amp;lt;/math&amp;gt;, &amp;lt;math&amp;gt;\Pi x : A.\, B&amp;lt;/math&amp;gt;, &amp;lt;math&amp;gt;\prod_{a \in A} B(a)&amp;lt;/math&amp;gt; || &amp;lt;code&amp;gt;(x : A) → B&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;∀ x : A, B&amp;lt;/code&amp;gt; || &amp;#039;&amp;#039;&amp;#039;dependent function type&amp;#039;&amp;#039;&amp;#039;: functions whose result type &amp;lt;math&amp;gt;B&amp;lt;/math&amp;gt; may mention the argument &amp;lt;math&amp;gt;x&amp;lt;/math&amp;gt;; Lean prints it with &amp;lt;code&amp;gt;∀&amp;lt;/code&amp;gt; when &amp;lt;math&amp;gt;B&amp;lt;/math&amp;gt; is a proposition || formula: [[Lean theorem prover/Foundations/Terms, types and judgments|Terms, types and judgments]], &amp;lt;math&amp;gt;\Pi&amp;lt;/math&amp;gt; at [[Lean theorem prover/Foundations/Dependent function types|Dependent function types]]; Lean: [[Lean theorem prover/Foundations/Dependent function types|Dependent function types]]&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;math&amp;gt;A \to B&amp;lt;/math&amp;gt; || &amp;lt;code&amp;gt;A → B&amp;lt;/code&amp;gt; || function type, when &amp;lt;math&amp;gt;B&amp;lt;/math&amp;gt; does not mention the argument; implication, when &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;B&amp;lt;/math&amp;gt; are propositions || [[Lean theorem prover/Explainers/Propositions as types|Propositions as types]]&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;math&amp;gt;\lambda x : A.\, e&amp;lt;/math&amp;gt; || &amp;lt;code&amp;gt;fun (x : A) =&amp;gt; e&amp;lt;/code&amp;gt;, also written &amp;lt;code&amp;gt;fun x ↦ e&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;λ x =&amp;gt; e&amp;lt;/code&amp;gt; || &amp;#039;&amp;#039;&amp;#039;function abstraction&amp;#039;&amp;#039;&amp;#039;: the function sending &amp;lt;math&amp;gt;x&amp;lt;/math&amp;gt; to &amp;lt;math&amp;gt;e&amp;lt;/math&amp;gt; || formula: [[Lean theorem prover/Foundations/Terms, types and judgments|Terms, types and judgments]]; Lean: [[Lean theorem prover/Explainers/What the axioms are|What the axioms are]]&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;math&amp;gt;f\,a&amp;lt;/math&amp;gt; || &amp;lt;code&amp;gt;f a&amp;lt;/code&amp;gt; || application of &amp;lt;math&amp;gt;f&amp;lt;/math&amp;gt; to &amp;lt;math&amp;gt;a&amp;lt;/math&amp;gt; || [[Lean theorem prover/Foundations/Terms, types and judgments|Terms, types and judgments]]&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;math&amp;gt;\mathrm{let}\ x : A := v;\ e&amp;lt;/math&amp;gt; || &amp;lt;code&amp;gt;let x : A := v; e&amp;lt;/code&amp;gt; || a local definition || [[Lean theorem prover/Foundations/Terms, types and judgments|Terms, types and judgments]]&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;math&amp;gt;\mathrm{Sort}\,u&amp;lt;/math&amp;gt; || &amp;lt;code&amp;gt;Sort u&amp;lt;/code&amp;gt; || the &amp;#039;&amp;#039;&amp;#039;universe&amp;#039;&amp;#039;&amp;#039; at level &amp;lt;math&amp;gt;u&amp;lt;/math&amp;gt;, the type of the types at that level || formula: [[Lean theorem prover/Foundations/Terms, types and judgments|Terms, types and judgments]]; Lean: [[Lean theorem prover/Explainers/Building things from constructors|Building things from constructors]]&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;math&amp;gt;\mathrm{Sort}\,0&amp;lt;/math&amp;gt; || &amp;lt;code&amp;gt;Prop&amp;lt;/code&amp;gt; || the universe of propositions || [[Lean theorem prover/Explainers/Propositions as types|Propositions as types]]&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;math&amp;gt;\mathrm{Sort}\,(u+1)&amp;lt;/math&amp;gt; || &amp;lt;code&amp;gt;Type u&amp;lt;/code&amp;gt;; &amp;lt;code&amp;gt;Type&amp;lt;/code&amp;gt; is &amp;lt;code&amp;gt;Type 0&amp;lt;/code&amp;gt; || the universes of data || [[Lean theorem prover/Explainers/Why there is no type of all types|Why there is no type of all types]]&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;math&amp;gt;\mathrm{U}_u&amp;lt;/math&amp;gt; || – || Carneiro&amp;#039;s name for the universe written &amp;lt;math&amp;gt;\mathrm{Sort}\,u&amp;lt;/math&amp;gt; in this edition || [[Lean theorem prover/Foundations/Terms, types and judgments|Terms, types and judgments]]&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;math&amp;gt;\mathrm{imax}\,u\,v&amp;lt;/math&amp;gt; || &amp;lt;code&amp;gt;imax u v&amp;lt;/code&amp;gt; || the level of a function type: &amp;lt;math&amp;gt;0&amp;lt;/math&amp;gt; if &amp;lt;math&amp;gt;v = 0&amp;lt;/math&amp;gt;, otherwise &amp;lt;math&amp;gt;\max(u, v)&amp;lt;/math&amp;gt; || formula: [[Lean theorem prover/Foundations/Terms, types and judgments|Terms, types and judgments]]; Lean: [[Lean theorem prover/Foundations/Universes and Prop|Universes and Prop]]&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;math&amp;gt;c.\{\bar u\}&amp;lt;/math&amp;gt; || &amp;lt;code&amp;gt;c.{u}&amp;lt;/code&amp;gt; || the constant &amp;lt;math&amp;gt;c&amp;lt;/math&amp;gt; used at the universe levels &amp;lt;math&amp;gt;\bar u&amp;lt;/math&amp;gt; || formula: [[Lean theorem prover/Foundations/Terms, types and judgments|Terms, types and judgments]]; Lean: [[Lean theorem prover/Explainers/Building things from constructors|Building things from constructors]]&lt;br /&gt;
|-&lt;br /&gt;
| – || &amp;lt;code&amp;gt;{x : A}&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[C A]&amp;lt;/code&amp;gt; || an &amp;#039;&amp;#039;&amp;#039;implicit&amp;#039;&amp;#039;&amp;#039; argument, filled in by unification; an &amp;#039;&amp;#039;&amp;#039;instance-implicit&amp;#039;&amp;#039;&amp;#039; argument, filled in by instance resolution || [[Lean theorem prover/Explainers/Building things from constructors|Building things from constructors]]; explained at [[Lean theorem prover/Foundations/Dependent function types|Dependent function types]]&lt;br /&gt;
|-&lt;br /&gt;
| – || &amp;lt;code&amp;gt;⟨a, b⟩&amp;lt;/code&amp;gt; || the &amp;#039;&amp;#039;&amp;#039;anonymous constructor&amp;#039;&amp;#039;&amp;#039;: a value of a type with one constructor, such as a pair or a proof of &amp;lt;code&amp;gt;p ∧ q&amp;lt;/code&amp;gt; || [[Lean theorem prover/Explainers/Propositions as types|Propositions as types]]&lt;br /&gt;
|-&lt;br /&gt;
| – || &amp;lt;code&amp;gt;A × B&amp;lt;/code&amp;gt; || the type of pairs || [[Lean theorem prover/Foundations/Definitional equality|Definitional equality]]&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;math&amp;gt;\Sigma x : A.\, B&amp;lt;/math&amp;gt; || &amp;lt;code&amp;gt;(x : A) × B&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;Σ x : A, B&amp;lt;/code&amp;gt; || &amp;#039;&amp;#039;&amp;#039;dependent pair&amp;#039;&amp;#039;&amp;#039;: pairs whose second part has a type that depends on the first || named at [[Lean theorem prover/Foundations/Structural and well-founded recursion|Structural and well-founded recursion]]; no page writes the symbol&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;math&amp;gt;\mathrm{Nat.rec}&amp;lt;/math&amp;gt; || &amp;lt;code&amp;gt;Nat.rec&amp;lt;/code&amp;gt; || the &amp;#039;&amp;#039;&amp;#039;recursor&amp;#039;&amp;#039;&amp;#039; of the natural numbers, at once induction and primitive recursion || formula: [[Lean theorem prover/Foundations/Inductive types and recursors|Inductive types and recursors]]; Lean: [[Lean theorem prover/Explainers/Building things from constructors|Building things from constructors]]&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;math&amp;gt;\prec&amp;lt;/math&amp;gt;, &amp;lt;math&amp;gt;\mathrm{Acc}\;x&amp;lt;/math&amp;gt; || &amp;lt;code&amp;gt;WellFounded&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;Acc&amp;lt;/code&amp;gt; || a well-founded relation; the proposition that &amp;lt;math&amp;gt;x&amp;lt;/math&amp;gt; is accessible, the basis of well-founded recursion || [[Lean theorem prover/Foundations/Structural and well-founded recursion|Structural and well-founded recursion]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
In Lean the dependent function type, function abstraction and the dependent pair are written&lt;br /&gt;
as in the second column; the reference manual gives the full syntax, including &amp;lt;code&amp;gt;↦&amp;lt;/code&amp;gt;&lt;br /&gt;
in place of &amp;lt;code&amp;gt;=&amp;gt;&amp;lt;/code&amp;gt;.&amp;lt;ref name=&amp;quot;rm-fun-terms&amp;quot;&amp;gt;&amp;#039;&amp;#039;The Lean Language Reference&amp;#039;&amp;#039;, for Lean&lt;br /&gt;
4.34.0, lean-lang.org, 2026, section 13.3, &amp;quot;Functions&amp;quot;. https://lean-lang.org/doc/reference/4.34.0/Terms/Functions/&amp;lt;/ref&amp;gt;&amp;lt;ref name=&amp;quot;rm-fun-types&amp;quot;&amp;gt;&amp;#039;&amp;#039;The&lt;br /&gt;
Lean Language Reference&amp;#039;&amp;#039;, for Lean 4.34.0, lean-lang.org, 2026, section 4.1, &amp;quot;Functions&amp;quot;.&lt;br /&gt;
https://lean-lang.org/doc/reference/4.34.0/The-Type-System/Functions/&amp;lt;/ref&amp;gt; Each line below&lt;br /&gt;
is accepted by Lean 4.34.1:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre class=&amp;quot;lean&amp;quot; style=&amp;quot;background: #f8f9fa; border: 1px solid #c8ccd1; padding: 0.6em; margin: 0.3em 0; font-size: 0.85em; line-height: 1.35; overflow-x: auto; white-space: pre;&amp;quot;&amp;gt;&lt;br /&gt;
example : Sort 0 = Prop := rfl&lt;br /&gt;
example : Sort 1 = Type := rfl&lt;br /&gt;
example : Type 1 = Sort 2 := rfl&lt;br /&gt;
example : (fun (x : Nat) =&amp;gt; x + 1) 2 = 3 := rfl&lt;br /&gt;
example : (fun (x : Nat) ↦ x + 1) 2 = 3 := rfl&lt;br /&gt;
example : (λ (x : Nat) =&amp;gt; x + 1) 2 = 3 := rfl&lt;br /&gt;
def pair : (n : Nat) × Fin (n + 1) := ⟨2, 0⟩&lt;br /&gt;
def pair&amp;#039; : Σ n : Nat, Fin (n + 1) := ⟨2, 0⟩&lt;br /&gt;
&lt;br /&gt;
#check ∀ x : Nat, x = x&lt;br /&gt;
#check (x : Nat) → Fin (x + 1)&lt;br /&gt;
#check Nat → Nat&lt;br /&gt;
#check fun (x : Nat) =&amp;gt; x + 1&lt;br /&gt;
#check (Σ n : Nat, Fin (n + 1))&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The five &amp;lt;code&amp;gt;#check&amp;lt;/code&amp;gt; lines print:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre class=&amp;quot;lean-output&amp;quot; style=&amp;quot;background: #ffffff; border: 1px dashed #a2a9b1; padding: 0.6em; margin: 0.3em 0; font-size: 0.85em; line-height: 1.35; overflow-x: auto; white-space: pre;&amp;quot;&amp;gt;&lt;br /&gt;
∀ (x : Nat), x = x : Prop&lt;br /&gt;
(x : Nat) → Fin (x + 1) : Type&lt;br /&gt;
Nat → Nat : Type&lt;br /&gt;
fun x =&amp;gt; x + 1 : Nat → Nat&lt;br /&gt;
(n : Nat) × Fin (n + 1) : Type&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The same dependent function type is printed with &amp;lt;code&amp;gt;∀&amp;lt;/code&amp;gt; when its result is a&lt;br /&gt;
proposition and with &amp;lt;code&amp;gt;→&amp;lt;/code&amp;gt; otherwise, and Lean prints a dependent pair written with&lt;br /&gt;
&amp;lt;code&amp;gt;Σ&amp;lt;/code&amp;gt; in the form &amp;lt;code&amp;gt;(n : Nat) × …&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== Logic ==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! in formulas !! in Lean !! meaning !! first used&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;math&amp;gt;\forall x\, \phi&amp;lt;/math&amp;gt; || &amp;lt;code&amp;gt;∀ x : A, P x&amp;lt;/code&amp;gt; || for every &amp;lt;math&amp;gt;x&amp;lt;/math&amp;gt;; a dependent function type into &amp;lt;code&amp;gt;Prop&amp;lt;/code&amp;gt; || formula: [[Lean theorem prover/Foundations/Classical logic from choice|Classical logic from choice]]; Lean: [[Lean theorem prover/Explainers/Induction, as the machine sees it|Induction, as the machine sees it]]&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;math&amp;gt;\exists x\, \phi&amp;lt;/math&amp;gt; || &amp;lt;code&amp;gt;∃ x : A, P x&amp;lt;/code&amp;gt;, the type &amp;lt;code&amp;gt;Exists&amp;lt;/code&amp;gt; || there is an &amp;lt;math&amp;gt;x&amp;lt;/math&amp;gt;; proved by a witness and a proof, &amp;lt;code&amp;gt;⟨w, h⟩&amp;lt;/code&amp;gt; || formula: [[Lean theorem prover/Foundations/Classical logic from choice|Classical logic from choice]]; Lean: [[Lean theorem prover/Explainers/Automation and its limits|Automation and its limits]]&lt;br /&gt;
|-&lt;br /&gt;
| – || &amp;lt;code&amp;gt;p ∧ q&amp;lt;/code&amp;gt;, the type &amp;lt;code&amp;gt;And&amp;lt;/code&amp;gt; || and || [[Lean theorem prover/Explainers/Propositions as types|Propositions as types]]&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;math&amp;gt;p \lor q&amp;lt;/math&amp;gt; || &amp;lt;code&amp;gt;p ∨ q&amp;lt;/code&amp;gt;, the type &amp;lt;code&amp;gt;Or&amp;lt;/code&amp;gt; || or || formula: [[Lean theorem prover/Foundations/Classical logic from choice|Classical logic from choice]]; Lean: [[Lean theorem prover/Explainers/Propositions as types|Propositions as types]]&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;math&amp;gt;\neg p&amp;lt;/math&amp;gt; || &amp;lt;code&amp;gt;¬p&amp;lt;/code&amp;gt;, defined as &amp;lt;code&amp;gt;p → False&amp;lt;/code&amp;gt; || not || formula: [[Lean theorem prover/Foundations/Classical logic from choice|Classical logic from choice]]; Lean: [[Lean theorem prover/Explainers/What the axioms are|What the axioms are]]&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;math&amp;gt;a \leftrightarrow b&amp;lt;/math&amp;gt; || &amp;lt;code&amp;gt;p ↔ q&amp;lt;/code&amp;gt;, the type &amp;lt;code&amp;gt;Iff&amp;lt;/code&amp;gt; || if and only if || [[Lean theorem prover/Foundations/The three axioms|The three axioms]]&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;math&amp;gt;\mathrm{True}&amp;lt;/math&amp;gt;, &amp;lt;math&amp;gt;\mathrm{False}&amp;lt;/math&amp;gt; || &amp;lt;code&amp;gt;True&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;False&amp;lt;/code&amp;gt; || the proposition with one proof, and the one with none || formula: [[Lean theorem prover/Foundations/Classical logic from choice|Classical logic from choice]]; Lean: &amp;lt;code&amp;gt;True&amp;lt;/code&amp;gt; at [[Lean theorem prover/Explainers/What the axioms are|What the axioms are]], &amp;lt;code&amp;gt;False&amp;lt;/code&amp;gt; at [[Lean theorem prover/Explainers/What has to be trusted|What has to be trusted]]&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;math&amp;gt;\neq&amp;lt;/math&amp;gt; || &amp;lt;code&amp;gt;a ≠ b&amp;lt;/code&amp;gt;, meaning &amp;lt;code&amp;gt;¬(a = b)&amp;lt;/code&amp;gt; || not equal || formula: [[Lean theorem prover/Foundations/Classical logic from choice|Classical logic from choice]]; Lean: [[Lean theorem prover/Explainers/Automation and its limits|Automation and its limits]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Each of these proofs is accepted by Lean 4.34.1; the last shows that &amp;lt;code&amp;gt;¬p&amp;lt;/code&amp;gt; is&lt;br /&gt;
&amp;lt;code&amp;gt;p → False&amp;lt;/code&amp;gt; by definition:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre class=&amp;quot;lean&amp;quot; style=&amp;quot;background: #f8f9fa; border: 1px solid #c8ccd1; padding: 0.6em; margin: 0.3em 0; font-size: 0.85em; line-height: 1.35; overflow-x: auto; white-space: pre;&amp;quot;&amp;gt;&lt;br /&gt;
example (p q : Prop) (hp : p) (hq : q) : p ∧ q := ⟨hp, hq⟩&lt;br /&gt;
example (p q : Prop) (hp : p) : p ∨ q := Or.inl hp&lt;br /&gt;
example (p q : Prop) (h : p → q) (hp : p) : q := h hp&lt;br /&gt;
example (p q : Prop) : p ∧ q ↔ q ∧ p := ⟨fun ⟨a, b⟩ =&amp;gt; ⟨b, a⟩, fun ⟨a, b⟩ =&amp;gt; ⟨b, a⟩⟩&lt;br /&gt;
example : ∀ n : Nat, n + 0 = n := fun _ =&amp;gt; rfl&lt;br /&gt;
example : ∃ n : Nat, n + 2 = 5 := ⟨3, rfl⟩&lt;br /&gt;
example : (2 : Nat) ≠ 3 := by decide&lt;br /&gt;
example (p : Prop) : (¬p) = (p → False) := rfl&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Equality ==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! in formulas !! in Lean !! meaning !! first used&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;math&amp;gt;a = b&amp;lt;/math&amp;gt; || &amp;lt;code&amp;gt;a = b&amp;lt;/code&amp;gt;, the type &amp;lt;code&amp;gt;Eq a b&amp;lt;/code&amp;gt; || &amp;#039;&amp;#039;&amp;#039;propositional equality&amp;#039;&amp;#039;&amp;#039;: a proposition, whose proofs are terms || formula: [[Lean theorem prover/Foundations/Propositional equality|Propositional equality]]; Lean: [[Lean theorem prover/Explainers/What the axioms are|What the axioms are]]&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;math&amp;gt;e \equiv e&amp;#039;&amp;lt;/math&amp;gt; || – || definitional equality, the judgment above || [[Lean theorem prover/Foundations/Terms, types and judgments|Terms, types and judgments]]&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;math&amp;gt;\mathrm{Eq.refl}\,a&amp;lt;/math&amp;gt; || &amp;lt;code&amp;gt;rfl&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;Eq.refl a&amp;lt;/code&amp;gt; || the one constructor of equality: a proof of &amp;lt;math&amp;gt;a = a&amp;lt;/math&amp;gt; || formula: [[Lean theorem prover/Foundations/Propositional equality|Propositional equality]]; Lean: [[Lean theorem prover/Explainers/Two kinds of equality|Two kinds of equality]]&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;math&amp;gt;\mathrm{Eq.rec}&amp;lt;/math&amp;gt; || &amp;lt;code&amp;gt;Eq.rec&amp;lt;/code&amp;gt; || the eliminator of equality: what holds of &amp;lt;math&amp;gt;a&amp;lt;/math&amp;gt; holds of &amp;lt;math&amp;gt;b&amp;lt;/math&amp;gt; when &amp;lt;math&amp;gt;a = b&amp;lt;/math&amp;gt; || [[Lean theorem prover/Foundations/Propositional equality|Propositional equality]]&lt;br /&gt;
|-&lt;br /&gt;
| – || &amp;lt;code&amp;gt;h ▸ e&amp;lt;/code&amp;gt; || &amp;#039;&amp;#039;&amp;#039;substitution&amp;#039;&amp;#039;&amp;#039;: &amp;lt;math&amp;gt;e&amp;lt;/math&amp;gt; carried along a proof &amp;lt;code&amp;gt;h : a = b&amp;lt;/code&amp;gt; || [[Lean theorem prover/Foundations/Propositional equality|Propositional equality]]&lt;br /&gt;
|-&lt;br /&gt;
| – || &amp;lt;code&amp;gt;a ≍ b&amp;lt;/code&amp;gt;, the type &amp;lt;code&amp;gt;HEq a b&amp;lt;/code&amp;gt; || &amp;#039;&amp;#039;&amp;#039;heterogeneous equality&amp;#039;&amp;#039;&amp;#039;, between terms whose types may differ || [[Lean theorem prover/Foundations/Propositional equality|Propositional equality]]&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;math&amp;gt;\mathrm{Quot}\,r&amp;lt;/math&amp;gt;, &amp;lt;math&amp;gt;\mathrm{Quot.mk}\,r\,a&amp;lt;/math&amp;gt; || &amp;lt;code&amp;gt;Quot r&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;Quot.mk r a&amp;lt;/code&amp;gt; || the quotient of a type by a relation &amp;lt;math&amp;gt;r&amp;lt;/math&amp;gt;, and the element of it that &amp;lt;math&amp;gt;a&amp;lt;/math&amp;gt; gives || formula: [[Lean theorem prover/Foundations/Quotient types|Quotient types]]; Lean: [[Lean theorem prover/Foundations/Propositional equality|Propositional equality]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre class=&amp;quot;lean&amp;quot; style=&amp;quot;background: #f8f9fa; border: 1px solid #c8ccd1; padding: 0.6em; margin: 0.3em 0; font-size: 0.85em; line-height: 1.35; overflow-x: auto; white-space: pre;&amp;quot;&amp;gt;&lt;br /&gt;
example (a b : Nat) (h : a = b) (P : Nat → Prop) (hp : P a) : P b := h ▸ hp&lt;br /&gt;
example (n : Nat) (x : Fin n) : x ≍ x := HEq.rfl&lt;br /&gt;
#check @HEq&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Lean 4.34.1 accepts both and prints &amp;lt;code&amp;gt;@HEq : {α : Sort u_1} → α → {β : Sort u_1} → β → Prop&amp;lt;/code&amp;gt;:&lt;br /&gt;
the two sides of &amp;lt;code&amp;gt;≍&amp;lt;/code&amp;gt; may have different types.&lt;br /&gt;
&lt;br /&gt;
== Holes and unification ==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! in formulas !! in Lean !! meaning !! first used&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;math&amp;gt;?m&amp;lt;/math&amp;gt; || &amp;lt;code&amp;gt;?m.12&amp;lt;/code&amp;gt; || a &amp;#039;&amp;#039;&amp;#039;metavariable&amp;#039;&amp;#039;&amp;#039;, a hole the elaborator has yet to fill || formula: [[Lean theorem prover/System/Metavariables and unification|Metavariables and unification]]; Lean: [[Lean theorem prover/Explainers/Holes and goals|Holes and goals]]&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;math&amp;gt;s =^{?} t&amp;lt;/math&amp;gt; || &amp;lt;code&amp;gt;s =?= t&amp;lt;/code&amp;gt; || a &amp;#039;&amp;#039;&amp;#039;unification problem&amp;#039;&amp;#039;&amp;#039;: find values of the metavariables that make the two sides definitionally equal || [[Lean theorem prover/System/Metavariables and unification|Metavariables and unification]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Metatheory ==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! in formulas !! in Lean !! meaning !! first used&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;math&amp;gt;T \vdash \mathrm{Con}(S)&amp;lt;/math&amp;gt; || – || the theory &amp;lt;math&amp;gt;T&amp;lt;/math&amp;gt; proves that the theory &amp;lt;math&amp;gt;S&amp;lt;/math&amp;gt; is consistent || [[Lean theorem prover/Foundations/Consistency and the metatheory|Consistency and the metatheory]]&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;math&amp;gt;\mathrm{ZFC}_n&amp;lt;/math&amp;gt; || – || Zermelo–Fraenkel set theory with choice and &amp;lt;math&amp;gt;n&amp;lt;/math&amp;gt; inaccessible cardinals || [[Lean theorem prover/Foundations/Consistency and the metatheory|Consistency and the metatheory]]&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;math&amp;gt;\mathrm{CIC}_n&amp;lt;/math&amp;gt;, &amp;lt;math&amp;gt;\mathrm{Lean}_n&amp;lt;/math&amp;gt; || – || the Calculus of Inductive Constructions, or Lean&amp;#039;s type theory, with &amp;lt;math&amp;gt;n&amp;lt;/math&amp;gt; universes || [[Lean theorem prover/Foundations/Consistency and the metatheory|Consistency and the metatheory]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Commands and keywords ==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! in Lean !! meaning !! first used&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;example : A := e&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;theorem c : A := e&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;def c : A := e&amp;lt;/code&amp;gt; || a term &amp;lt;code&amp;gt;e&amp;lt;/code&amp;gt; of type &amp;lt;code&amp;gt;A&amp;lt;/code&amp;gt;, unnamed, as a named theorem, or as a named definition || [[Lean theorem prover/Explainers/Propositions as types|Propositions as types]]&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;by&amp;lt;/code&amp;gt; || the term that follows is to be built by tactics || [[Lean theorem prover/Explainers/Types as specifications|Types as specifications]]&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;rfl&amp;lt;/code&amp;gt; || the proof of &amp;lt;code&amp;gt;a = a&amp;lt;/code&amp;gt;; it closes a goal whose two sides are definitionally equal || [[Lean theorem prover/Explainers/Two kinds of equality|Two kinds of equality]]&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;sorry&amp;lt;/code&amp;gt; || a placeholder for a missing proof, recorded as the axiom &amp;lt;code&amp;gt;sorryAx&amp;lt;/code&amp;gt; || [[Lean theorem prover/Explainers/What the axioms are|What the axioms are]]&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;#check e&amp;lt;/code&amp;gt; || print the type of &amp;lt;code&amp;gt;e&amp;lt;/code&amp;gt; || [[Lean theorem prover/Explainers/Why there is no type of all types|Why there is no type of all types]]&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;#print c&amp;lt;/code&amp;gt; || print the definition of &amp;lt;code&amp;gt;c&amp;lt;/code&amp;gt; || [[Lean theorem prover/Explainers/What the axioms are|What the axioms are]]&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;#print axioms c&amp;lt;/code&amp;gt; || list the axioms that &amp;lt;code&amp;gt;c&amp;lt;/code&amp;gt; depends on || [[Lean theorem prover/Explainers/What the axioms are|What the axioms are]]&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;#eval e&amp;lt;/code&amp;gt; || compute &amp;lt;code&amp;gt;e&amp;lt;/code&amp;gt; and print the result || [[Lean theorem prover/Explainers/Functions that always finish|Functions that always finish]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Next ==&lt;br /&gt;
&lt;br /&gt;
[[Lean theorem prover/Sources|Sources]], what was read for the edition.&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;references /&amp;gt;&lt;/div&gt;</summary>
		<author><name>PMA Publisher</name></author>
	</entry>
</feed>