Lean community blog (Posts by Adam Topaz)https://leanprover-community.github.io/blog/enContents © 2023 <a href="mailto:">The Lean prover community</a> Mon, 09 Jan 2023 09:13:43 GMTNikola (getnikola.com)http://blogs.law.harvard.edu/tech/rss- Definitions in the liquid tensor experimenthttps://leanprover-community.github.io/blog/posts/lte-examples/Adam Topaz<div><p>A few weeks ago, we announced the <a href="https://leanprover-community.github.io/blog/posts/lte-final/">completion of the liquid tensor experiment</a> (<strong>LTE</strong> for short).
What this means is that we stated and (completely) proved the following result in Lean:</p>
<pre class="code literal-block"><span class="kd">variables</span> <span class="o">(</span><span class="n">p'</span> <span class="n">p</span> <span class="o">:</span> <span class="n">ℝ</span><span class="bp">≥</span><span class="mi">0</span><span class="o">)</span> <span class="o">[</span><span class="n">fact</span> <span class="o">(</span><span class="mi">0</span> <span class="bp"><</span> <span class="n">p'</span><span class="o">)]</span> <span class="o">[</span><span class="n">fact</span> <span class="o">(</span><span class="n">p'</span> <span class="bp"><</span> <span class="n">p</span><span class="o">)]</span> <span class="o">[</span><span class="n">fact</span> <span class="o">(</span><span class="n">p</span> <span class="bp">≤</span> <span class="mi">1</span><span class="o">)]</span>
<span class="kd">theorem</span> <span class="n">liquid_tensor_experiment</span>
<span class="o">(</span><span class="n">S</span> <span class="o">:</span> <span class="n">Profinite</span><span class="o">)</span> <span class="o">(</span><span class="n">V</span> <span class="o">:</span> <span class="n">pBanach</span> <span class="n">p</span><span class="o">)</span> <span class="o">:</span>
<span class="bp">∀</span> <span class="n">i</span> <span class="bp">></span> <span class="mi">0</span><span class="o">,</span> <span class="n">Ext</span> <span class="n">i</span> <span class="o">(</span><span class="n">ℳ_</span><span class="o">{</span><span class="n">p'</span><span class="o">}</span> <span class="n">S</span><span class="o">)</span> <span class="n">V</span> <span class="bp">≅</span> <span class="mi">0</span> <span class="o">:=</span>
<span class="c1">-- the proof ...</span>
</pre>
<p>The code block above, which is taken directly from the file <a href="https://github.com/leanprover-community/lean-liquid/blob/92f188bd17f34dbfefc92a83069577f708851aec/src/challenge.lean"><code>challenge.lean</code></a> in the main <a href="https://github.com/leanprover-community/lean-liquid">LTE repository</a>, uses some custom notation to make the statement appear as close as possible to the main theorem mentioned in
<a href="https://xenaproject.wordpress.com/2020/12/05/liquid-tensor-experiment/">Scholze's original challenge</a>.
Fortunately, it's relatively straightforward to unravel the notation to see the underlying definitions themselves.
But there is a bigger issue: How can we convince ourselves (and others) that the <em>definitions</em> we introduced in LTE are actually <em>correct</em>? </p>
<p>For instance, we could have <em>defined</em> <code>Ext</code> to be $0$ (spoiler: we didn't).
Or, we could have made some subtle innocent mistake in setting up the definitions that somehow <em>implies</em> that <code>Ext</code> is always $0$, or that all condensed abelian groups are trivial, or one of several other pitfalls that renders the statement above meaningless.</p>
<p>To answer this question, we built a new <a href="https://github.com/leanprover-community/lean-liquid/tree/92f188bd17f34dbfefc92a83069577f708851aec/src/examples"><code>examples</code> folder</a> in the repository which contains several files corresponding to the main players in the statement above.
These examples can be considered as centralized "sanity checks" that the definitions we wrote using Lean actually behave as expected.</p>
<p>We tried to write the files in this folder in a way which should be (approximately) readable by mathematicians who have minimal experience with Lean.
The goal is to make it easy for non-experts to look through the examples folder, then look through the concise final statement in <code>challenge.lean</code>, and be reasonably confident that the challenge was accomplished.</p>
<p>This blog post gives a detailed overview of this folder and its contents, and how it relates to the definitions used in the main statement of the <a href="https://github.com/leanprover-community/lean-liquid">liquid tensor experiment</a>.
It is meant to be read <em>alongside</em> the actual files from the <a href="https://github.com/leanprover-community/lean-liquid/tree/92f188bd17f34dbfefc92a83069577f708851aec/src/examples">examples folder</a>.</p>
<p><a href="https://leanprover-community.github.io/blog/posts/lte-examples/">Read more…</a> (29 min remaining to read)</p></div>https://leanprover-community.github.io/blog/posts/lte-examples/Fri, 14 Oct 2022 17:00:00 GMT