<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/"><channel><title>Logic on CS Theorems</title><link>https://cs.lozic.me/areas/logic/</link><description>Recent content in Logic on CS Theorems</description><generator>Hugo</generator><language>en-us</language><lastBuildDate>Fri, 10 Dec 2027 12:00:00 +0100</lastBuildDate><atom:link href="https://cs.lozic.me/areas/logic/index.xml" rel="self" type="application/rss+xml"/><item><title>Resolution and CDCL</title><link>https://cs.lozic.me/posts/t050-resolution-and-cdcl/</link><pubDate>Fri, 10 Dec 2027 12:00:00 +0100</pubDate><guid>https://cs.lozic.me/posts/t050-resolution-and-cdcl/</guid><description>&lt;h2 id="symptom"&gt;Symptom&lt;/h2&gt;
&lt;p&gt;SAT is NP-complete (T027). It is &lt;em&gt;the&lt;/em&gt; NP-complete problem, the one everything
else reduces to. The textbook conclusion is that you should avoid it.&lt;/p&gt;
&lt;p&gt;Meanwhile: a hardware verification team routinely discharges instances with two
million variables and ten million clauses in under a minute. Package managers
solve dependency resolution with SAT. Every bounded model checker (T049) is a SAT
solver with a front end. The planning community abandoned custom search for
SAT encodings and got faster.&lt;/p&gt;</description></item><item><title>Hoare Logic and Weakest Preconditions</title><link>https://cs.lozic.me/posts/t048-hoare-logic-and-weakest-preconditions/</link><pubDate>Fri, 19 Nov 2027 12:00:00 +0100</pubDate><guid>https://cs.lozic.me/posts/t048-hoare-logic-and-weakest-preconditions/</guid><description>&lt;h2 id="symptom"&gt;Symptom&lt;/h2&gt;
&lt;p&gt;You changed a loop. It looks right. The tests pass. You are not confident.&lt;/p&gt;
&lt;p&gt;The reason you are not confident is that the tests check a finite set of inputs
and the loop runs on all of them. You know this. So you stare at the loop and
try to convince yourself by simulating it in your head, which works for three
iterations and then stops working.&lt;/p&gt;</description></item><item><title>The Curry–Howard Correspondence</title><link>https://cs.lozic.me/posts/t042-the-curry-howard-correspondence/</link><pubDate>Fri, 17 Sep 2027 12:00:00 +0100</pubDate><guid>https://cs.lozic.me/posts/t042-the-curry-howard-correspondence/</guid><description>&lt;h2 id="symptom"&gt;Symptom&lt;/h2&gt;
&lt;p&gt;You write a function signature and it looks like a sentence:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-haskell" data-lang="haskell"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nf"&gt;f&lt;/span&gt; &lt;span class="ow"&gt;::&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;a&lt;/span&gt; &lt;span class="ow"&gt;-&amp;gt;&lt;/span&gt; &lt;span class="n"&gt;b&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="ow"&gt;-&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;b&lt;/span&gt; &lt;span class="ow"&gt;-&amp;gt;&lt;/span&gt; &lt;span class="n"&gt;c&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="ow"&gt;-&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;a&lt;/span&gt; &lt;span class="ow"&gt;-&amp;gt;&lt;/span&gt; &lt;span class="n"&gt;c&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Read it aloud: if $a$ implies $b$, and $b$ implies $c$, then $a$ implies $c$.
That is transitivity of implication, a rule of logic you have known since school.
And the implementation, &lt;code&gt;f g h = h . g&lt;/code&gt;, is the &lt;em&gt;proof&lt;/em&gt; of it: given evidence for
$a$, apply the first, then apply the second.&lt;/p&gt;</description></item><item><title>The Barriers: Relativization and Natural Proofs</title><link>https://cs.lozic.me/posts/t030-the-barriers-relativization-and-natural-proofs/</link><pubDate>Fri, 02 Apr 2027 12:00:00 +0100</pubDate><guid>https://cs.lozic.me/posts/t030-the-barriers-relativization-and-natural-proofs/</guid><description>&lt;h2 id="symptom"&gt;Symptom&lt;/h2&gt;
&lt;p&gt;You have read T026 and T027 and you are wondering the obvious thing.&lt;/p&gt;
&lt;p&gt;Fifty years. Thousands of researchers. A million-dollar prize. And P vs NP has
not moved. That is strange — most famous problems yield partial results, near
misses, special cases that suggest the shape of the answer. Here there is
almost nothing. We cannot even prove that NP requires more than linear-size
circuits, which is a laughably weak statement compared to what everyone
believes.&lt;/p&gt;</description></item><item><title>The Cook–Levin Theorem</title><link>https://cs.lozic.me/posts/t027-the-cook-levin-theorem/</link><pubDate>Fri, 19 Mar 2027 12:00:00 +0100</pubDate><guid>https://cs.lozic.me/posts/t027-the-cook-levin-theorem/</guid><description>&lt;h2 id="symptom"&gt;Symptom&lt;/h2&gt;
&lt;p&gt;You know reductions (T017): to prove your problem hard, reduce a known-hard
problem to it. Fine. But that begs the obvious question, and it is the question
a sharp colleague asks the first time you use the technique.&lt;/p&gt;</description></item><item><title>Godel's Incompleteness Theorems</title><link>https://cs.lozic.me/posts/t015-godels-incompleteness-theorems/</link><pubDate>Fri, 22 Jan 2027 12:00:00 +0100</pubDate><guid>https://cs.lozic.me/posts/t015-godels-incompleteness-theorems/</guid><description>&lt;h2 id="symptom"&gt;Symptom&lt;/h2&gt;
&lt;p&gt;The proof assistant is failing you. You are trying to verify a piece of
concurrent code in Coq or Lean, and the tool will not accept your termination
argument. A colleague says, without much conviction, &amp;ldquo;well, Gödel — you can&amp;rsquo;t
prove everything anyway.&amp;rdquo;&lt;/p&gt;</description></item><item><title>Kleene's Recursion Theorem</title><link>https://cs.lozic.me/posts/t014-kleenes-recursion-theorem/</link><pubDate>Fri, 15 Jan 2027 12:00:00 +0100</pubDate><guid>https://cs.lozic.me/posts/t014-kleenes-recursion-theorem/</guid><description>&lt;h2 id="symptom"&gt;Symptom&lt;/h2&gt;
&lt;p&gt;Write a program that prints its own source code. No file I/O, no reading
&lt;code&gt;__file__&lt;/code&gt;, no cheating.&lt;/p&gt;
&lt;p&gt;The first attempt fails instantly. To print the source you must contain the
source, and then the containing text is also part of the source, so you must
contain that too. The regress is obviously infinite, and most people conclude
after ten minutes that the task is impossible.&lt;/p&gt;</description></item><item><title>The Halting Problem</title><link>https://cs.lozic.me/posts/t010-the-halting-problem/</link><pubDate>Fri, 09 Oct 2026 12:00:00 +0200</pubDate><guid>https://cs.lozic.me/posts/t010-the-halting-problem/</guid><description>&lt;h2 id="symptom"&gt;Symptom&lt;/h2&gt;
&lt;p&gt;Your CI has a test that hangs. Not fails — hangs. Somebody suggests the obvious
fix: before running a test, check whether it terminates, and skip it if not.&lt;/p&gt;</description></item><item><title>Cantor's Diagonal Argument</title><link>https://cs.lozic.me/posts/t002-cantors-diagonal-argument/</link><pubDate>Fri, 02 Oct 2026 12:00:00 +0200</pubDate><guid>https://cs.lozic.me/posts/t002-cantors-diagonal-argument/</guid><description>&lt;h2 id="symptom"&gt;Symptom&lt;/h2&gt;
&lt;p&gt;Somebody proposes a tool that will find all the bugs. Not most bugs. All of
them. The pitch has the shape: we enumerate the failure modes, we write a
checker for each, we keep adding checkers, and the set of undetected bugs
shrinks toward zero.&lt;/p&gt;</description></item></channel></rss>