<?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%2FExplainers%2FTwo_kinds_of_equality</id>
	<title>Lean theorem prover/Explainers/Two kinds of equality - 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%2FExplainers%2FTwo_kinds_of_equality"/>
	<link rel="alternate" type="text/html" href="https://invarians.org/index.php?title=Lean_theorem_prover/Explainers/Two_kinds_of_equality&amp;action=history"/>
	<updated>2026-10-21T10:18:17Z</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/Explainers/Two_kinds_of_equality&amp;diff=6758&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/Explainers/Two_kinds_of_equality&amp;diff=6758&amp;oldid=prev"/>
		<updated>2026-10-15T19:34:27Z</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:34, 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:Two kinds of equality}}&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:Two kinds of equality}}&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;{{Technical|Lean theorem prover/Foundations/Definitional equality|Lean theorem prover/Foundations/Propositional equality|Lean theorem prover/Foundations/Proof irrelevance and subsingleton elimination}}&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;{{Technical|Lean theorem prover/Foundations/Definitional equality|Lean theorem prover/Foundations/Propositional equality|Lean theorem prover/Foundations/Proof irrelevance and subsingleton elimination}}&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;br&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;br&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;Lean has two different ways for two things to be the same. Some equalities are&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;Lean has two different ways for two things to be the same. Some equalities are&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>PMA Publisher</name></author>
	</entry>
	<entry>
		<id>https://invarians.org/index.php?title=Lean_theorem_prover/Explainers/Two_kinds_of_equality&amp;diff=6551&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/Explainers/Two_kinds_of_equality&amp;diff=6551&amp;oldid=prev"/>
		<updated>2026-10-14T18:00:49Z</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:Two kinds of equality}}&lt;br /&gt;
{{Technical|Lean theorem prover/Foundations/Definitional equality|Lean theorem prover/Foundations/Propositional equality|Lean theorem prover/Foundations/Proof irrelevance and subsingleton elimination}}&lt;br /&gt;
&lt;br /&gt;
Lean has two different ways for two things to be the same. Some equalities are&lt;br /&gt;
true &amp;#039;&amp;#039;&amp;#039;by calculation&amp;#039;&amp;#039;&amp;#039;: the checker sees them for itself by working the two&lt;br /&gt;
sides out. Others are true &amp;#039;&amp;#039;&amp;#039;by proof&amp;#039;&amp;#039;&amp;#039;: they are statements, and someone has to&lt;br /&gt;
prove them. This page explains the difference, shows where the line falls in a&lt;br /&gt;
simple case, says why it matters, and ends with a rule called &amp;#039;&amp;#039;&amp;#039;proof&lt;br /&gt;
irrelevance&amp;#039;&amp;#039;&amp;#039; that sits on the calculation side of the line.&lt;br /&gt;
&lt;br /&gt;
== Same by calculation ==&lt;br /&gt;
&lt;br /&gt;
Lean knows how its definitions compute. Given &amp;lt;code&amp;gt;2 + 3&amp;lt;/code&amp;gt;, it can unfold&lt;br /&gt;
what addition means and work out the answer, 5. Two expressions that come out the&lt;br /&gt;
same when worked out in this way are called &amp;#039;&amp;#039;&amp;#039;definitionally equal&amp;#039;&amp;#039;&amp;#039;. Lean&amp;#039;s&lt;br /&gt;
reference manual describes this as the mechanically checkable relation that treats&lt;br /&gt;
expressions as equal when their computational behaviour is the same: it unfolds&lt;br /&gt;
definitions, substitutes arguments into functions, and works through definitions by&lt;br /&gt;
cases.&amp;lt;ref name=&amp;quot;ref-types&amp;quot;&amp;gt;The Lean Developers, &amp;quot;The type system&amp;quot;, &amp;#039;&amp;#039;The Lean Language Reference&amp;#039;&amp;#039;, for Lean 4.35.0, chapter 4. [https://lean-lang.org/doc/reference/4.35.0/The-Type-System/ lean-lang.org/doc/reference/4.35.0/The-Type-System/] (accessed 13 October 2026).&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The checker uses definitional equality silently, all the time. If a value has one&lt;br /&gt;
type, and that type is definitionally equal to a second type, the value has the&lt;br /&gt;
second type too; nobody has to say so.&amp;lt;ref name=&amp;quot;ref-types&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The simplest proof of an equation is &amp;lt;code&amp;gt;rfl&amp;lt;/code&amp;gt;, short for&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;reflexivity&amp;#039;&amp;#039;&amp;#039;: everything is equal to itself. It proves an equation exactly&lt;br /&gt;
when the two sides are definitionally equal, because then, to the checker, they are&lt;br /&gt;
the same thing.&amp;lt;ref name=&amp;quot;tpil-qe&amp;quot;&amp;gt;Jeremy Avigad, Leonardo de Moura, Soonho Kong and Sebastian Ullrich, with contributions from the Lean Community, &amp;#039;&amp;#039;Theorem Proving in Lean 4&amp;#039;&amp;#039;, chapter 4, &amp;quot;Quantifiers and Equality&amp;quot;, section 4.2, &amp;quot;Equality&amp;quot;, online book for Lean 4.33.0. [https://lean-lang.org/theorem_proving_in_lean4/Quantifiers-and-Equality/ lean-lang.org/theorem_proving_in_lean4/Quantifiers-and-Equality/] (accessed 13 October 2026).&amp;lt;/ref&amp;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 : 2 + 3 = 5 := rfl&lt;br /&gt;
example (n : Nat) : n + 0 = n := rfl&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Both lines are accepted. The second is the more interesting. It holds for every&lt;br /&gt;
natural number &amp;#039;&amp;#039;n&amp;#039;&amp;#039;, and Lean still sees it by calculation, without knowing what&lt;br /&gt;
&amp;#039;&amp;#039;n&amp;#039;&amp;#039; is.&lt;br /&gt;
&lt;br /&gt;
== Same by proof ==&lt;br /&gt;
&lt;br /&gt;
The mirror image of that second line is refused:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre class=&amp;quot;lean lean-fails&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 (n : Nat) : 0 + n = n := rfl&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Lean 4.34.1 reports a &amp;quot;Type mismatch&amp;quot;: &amp;lt;code&amp;gt;rfl&amp;lt;/code&amp;gt; proves that something&lt;br /&gt;
equals itself, and Lean cannot make &amp;lt;code&amp;gt;0 + n&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;n&amp;lt;/code&amp;gt; into the&lt;br /&gt;
same thing by calculation.&lt;br /&gt;
&lt;br /&gt;
The reason lies in how addition is defined. Addition of natural numbers works by&lt;br /&gt;
going down the &amp;#039;&amp;#039;&amp;#039;second&amp;#039;&amp;#039;&amp;#039; number one step at a time: adding 0 gives back the&lt;br /&gt;
first number, and adding one more than &amp;#039;&amp;#039;k&amp;#039;&amp;#039; gives one more than the result of&lt;br /&gt;
adding &amp;#039;&amp;#039;k&amp;#039;&amp;#039;.&amp;lt;ref name=&amp;quot;tpil-ind&amp;quot;&amp;gt;Jeremy Avigad, Leonardo de Moura, Soonho Kong and Sebastian Ullrich, &amp;#039;&amp;#039;Theorem Proving in Lean 4&amp;#039;&amp;#039;, chapter 7, &amp;quot;Inductive Types&amp;quot;, section 7.4, &amp;quot;Defining the Natural Numbers&amp;quot;. [https://lean-lang.org/theorem_proving_in_lean4/Inductive-Types/ lean-lang.org/theorem_proving_in_lean4/Inductive-Types/] (accessed 14 October 2026).&amp;lt;/ref&amp;gt; So &amp;lt;code&amp;gt;n + 0&amp;lt;/code&amp;gt; matches the first rule&lt;br /&gt;
at once, whatever &amp;#039;&amp;#039;n&amp;#039;&amp;#039; is. But &amp;lt;code&amp;gt;0 + n&amp;lt;/code&amp;gt; asks which rule applies to&lt;br /&gt;
&amp;#039;&amp;#039;n&amp;#039;&amp;#039;, and while &amp;#039;&amp;#039;n&amp;#039;&amp;#039; is unknown the calculation cannot start.&lt;br /&gt;
&lt;br /&gt;
The statement &amp;lt;code&amp;gt;0 + n = n&amp;lt;/code&amp;gt; is still true. It is a &amp;#039;&amp;#039;&amp;#039;propositional&lt;br /&gt;
equality&amp;#039;&amp;#039;&amp;#039;: a statement of the form &amp;quot;&amp;#039;&amp;#039;a&amp;#039;&amp;#039; equals &amp;#039;&amp;#039;b&amp;#039;&amp;#039;&amp;quot; that needs a proof, here&lt;br /&gt;
a proof by induction.&amp;lt;ref name=&amp;quot;tpil-ind&amp;quot; /&amp;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;
theorem my_zero_add (n : Nat) : 0 + n = n := by&lt;br /&gt;
  induction n with&lt;br /&gt;
  | zero =&amp;gt; rfl&lt;br /&gt;
  | succ k ih =&amp;gt; exact congrArg Nat.succ ih&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Read it in two cases. For &amp;#039;&amp;#039;n&amp;#039;&amp;#039; = 0 the claim is 0 + 0 = 0, true by calculation.&lt;br /&gt;
For &amp;#039;&amp;#039;n&amp;#039;&amp;#039; one more than some &amp;#039;&amp;#039;k&amp;#039;&amp;#039;, calculation turns &amp;lt;code&amp;gt;0 + (k + 1)&amp;lt;/code&amp;gt; into&lt;br /&gt;
&amp;quot;one more than &amp;lt;code&amp;gt;0 + k&amp;lt;/code&amp;gt;&amp;quot;, and the case before, called&lt;br /&gt;
&amp;lt;code&amp;gt;ih&amp;lt;/code&amp;gt;, says that &amp;lt;code&amp;gt;0 + k&amp;lt;/code&amp;gt; equals &amp;#039;&amp;#039;k&amp;#039;&amp;#039;. The induction does the&lt;br /&gt;
rest.&lt;br /&gt;
&lt;br /&gt;
Every proposition of the form &amp;quot;&amp;#039;&amp;#039;a&amp;#039;&amp;#039; = &amp;#039;&amp;#039;b&amp;#039;&amp;#039;&amp;quot; is a statement of this kind. Some,&lt;br /&gt;
like &amp;lt;code&amp;gt;n + 0 = n&amp;lt;/code&amp;gt;, happen to be provable by &amp;lt;code&amp;gt;rfl&amp;lt;/code&amp;gt; because the&lt;br /&gt;
two sides are definitionally equal. The rest need an argument.&lt;br /&gt;
&lt;br /&gt;
This is the sense of the page&amp;#039;s title. Definitional equality is something the&lt;br /&gt;
checker settles by itself, by working things out, within limits described below.&lt;br /&gt;
Truth in general is not: in the&lt;br /&gt;
1930s Alonzo Church and Alan Turing showed that no mechanical procedure can decide,&lt;br /&gt;
for every logical statement, whether it holds.&amp;lt;ref name=&amp;quot;wadler2015&amp;quot;&amp;gt;Philip Wadler, &amp;quot;Propositions as types&amp;quot;, &amp;#039;&amp;#039;Communications of the ACM&amp;#039;&amp;#039; 58 (12), 2015, pp. 75–84, section 1. [https://doi.org/10.1145/2699407 doi:10.1145/2699407]&amp;lt;/ref&amp;gt; So for the&lt;br /&gt;
second kind of equality the machine does not find the answer; it checks a proof&lt;br /&gt;
that a person, or a search program, has supplied.&lt;br /&gt;
&lt;br /&gt;
== Why the line matters ==&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Definitional equalities are free.&amp;#039;&amp;#039;&amp;#039; The checker applies them by itself. A&lt;br /&gt;
propositional equality has to be invoked: a proof must say where it is used,&lt;br /&gt;
usually by rewriting one side into the other. The page on&lt;br /&gt;
[[Lean theorem prover/Explainers/Tactics|tactics]] shows the commands that do&lt;br /&gt;
this.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;They reach into types.&amp;#039;&amp;#039;&amp;#039; Because types can depend on values, as described on&lt;br /&gt;
[[Lean theorem prover/Explainers/Types as specifications|types as specifications]],&lt;br /&gt;
the line affects which values have which types. A list whose type says its length&lt;br /&gt;
is &amp;lt;code&amp;gt;n + 0&amp;lt;/code&amp;gt; can be used at once where a list of length &amp;lt;code&amp;gt;n&amp;lt;/code&amp;gt; is&lt;br /&gt;
expected, because the two types are definitionally equal. With&lt;br /&gt;
&amp;lt;code&amp;gt;0 + n&amp;lt;/code&amp;gt; it cannot; the proof that the lengths agree has to be applied&lt;br /&gt;
first.&amp;lt;ref name=&amp;quot;ref-types&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;The choice of definition matters.&amp;#039;&amp;#039;&amp;#039; Two definitions of the same function can&lt;br /&gt;
agree on every input and still differ in which equations hold by calculation. The&lt;br /&gt;
choice between them shapes every proof that uses the function.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Calculation has a cost, and limits.&amp;#039;&amp;#039;&amp;#039; Deciding definitional equality means&lt;br /&gt;
doing the computation, and a computation can be long. Lean&amp;#039;s kernel has time and&lt;br /&gt;
depth limits, so that in many cases a calculation that would run for ever is&lt;br /&gt;
stopped instead.&amp;lt;ref name=&amp;quot;lean4lean&amp;quot;&amp;gt;Mario Carneiro, &amp;quot;Lean4Lean: Verifying a Typechecker for Lean, in Lean&amp;quot;, in &amp;#039;&amp;#039;31st International Conference on Types for Proofs and Programs (TYPES 2025)&amp;#039;&amp;#039;, Leibniz International Proceedings in Informatics 384, Schloss Dagstuhl, 2026, pp. 2:1–2:23. [https://doi.org/10.4230/LIPIcs.TYPES.2025.2 doi:10.4230/LIPIcs.TYPES.2025.2]; preprint [https://arxiv.org/abs/2403.14064 arXiv:2403.14064].&amp;lt;/ref&amp;gt;&lt;br /&gt;
Some cases are beyond it altogether: because of known undecidability results for&lt;br /&gt;
Lean&amp;#039;s logic, there are expressions that are definitionally equal by the rules but&lt;br /&gt;
that Lean&amp;#039;s kernel cannot confirm to be equal.&amp;lt;ref name=&amp;quot;lean4lean&amp;quot; /&amp;gt; Lean&amp;#039;s reference manual also records a technical irregularity: as Lean defines it,&lt;br /&gt;
definitional equality is reflexive and symmetric but not transitive, so two steps&lt;br /&gt;
that each hold by calculation need not combine into one that&lt;br /&gt;
does.&amp;lt;ref name=&amp;quot;ref-types&amp;quot; /&amp;gt; In ordinary work these limits are rarely met.&lt;br /&gt;
&lt;br /&gt;
== Proof irrelevance ==&lt;br /&gt;
&lt;br /&gt;
One rule on the calculation side concerns proofs themselves. In Lean, &amp;#039;&amp;#039;&amp;#039;any two&lt;br /&gt;
proofs of the same proposition are definitionally equal&amp;#039;&amp;#039;&amp;#039;.&amp;lt;ref name=&amp;quot;ref-types&amp;quot; /&amp;gt;&amp;lt;ref name=&amp;quot;tpil-props&amp;quot;&amp;gt;Jeremy Avigad, Leonardo de Moura, Soonho Kong and Sebastian Ullrich, &amp;#039;&amp;#039;Theorem Proving in Lean 4&amp;#039;&amp;#039;, chapter 3, &amp;quot;Propositions and Proofs&amp;quot;, section 3.1. [https://lean-lang.org/theorem_proving_in_lean4/Propositions-and-Proofs/ lean-lang.org/theorem_proving_in_lean4/Propositions-and-Proofs/] (accessed 13 October 2026).&amp;lt;/ref&amp;gt;&lt;br /&gt;
The checker never asks which proof was given, only whether there is one.&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;
theorem two_proofs (p : Prop) (h₁ h₂ : p) : h₁ = h₂ := rfl&lt;br /&gt;
#print axioms two_proofs&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Lean accepts this by calculation alone and prints &amp;lt;code&amp;gt;&amp;#039;two_proofs&amp;#039; does not&lt;br /&gt;
depend on any axioms&amp;lt;/code&amp;gt;: proof irrelevance is a rule of Lean&amp;#039;s logic, not one&lt;br /&gt;
of&lt;br /&gt;
[[Lean theorem prover/Explainers/What the axioms are|its axioms]]. A practical&lt;br /&gt;
consequence: the number 3, packaged with one proof that it is below 5, is the same&lt;br /&gt;
value of &amp;lt;code&amp;gt;Fin 5&amp;lt;/code&amp;gt; as 3 packaged with any other such proof.&lt;br /&gt;
&lt;br /&gt;
== Next ==&lt;br /&gt;
&lt;br /&gt;
* [[Lean theorem prover/Explainers/Functions that always finish|Functions that always finish]]: why Lean insists that every function it accepts comes to an end.&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>