<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Logic on Siddharth Mishra</title><link>http://brightprogrammer.in/tags/logic/</link><description>Recent content in Logic on Siddharth Mishra</description><generator>Hugo</generator><language>en</language><lastBuildDate>Sun, 14 Jun 2026 21:53:10 -0700</lastBuildDate><atom:link href="http://brightprogrammer.in/tags/logic/index.xml" rel="self" type="application/rss+xml"/><item><title>Lambda Calculus - Logic</title><link>http://brightprogrammer.in/posts/4-lambda-calculus-logic/</link><pubDate>Thu, 06 Feb 2025 00:00:00 +0000</pubDate><guid>http://brightprogrammer.in/posts/4-lambda-calculus-logic/</guid><description>&lt;h2 id="logic">Logic&lt;/h2>
&lt;h3 id="if-else">If, Else&lt;/h3>
&lt;p>Let&amp;rsquo;s build some boolean login out of power of pure combinations. Unlike usual logic, we won&amp;rsquo;t get
&lt;code>true&lt;/code>/&lt;code>false&lt;/code> as values. Here &lt;code>true&lt;/code> and &lt;code>false&lt;/code> are lambda abstractions itself.&lt;/p>
&lt;ul>
&lt;li>$\text{True} \stackrel{\beta}{=} \lambda xy.x$ - Meaning, take two values, and evaluate to only the first one.&lt;/li>
&lt;li>$\text{False}\stackrel{\beta}{=} \lambda xy.y$ - Take two, and evaluate to only the second one, discarding the first.&lt;/li>
&lt;/ul>
&lt;p>These are often called $\text{First}$ and $\text{Second}$ correspondingly for these reasons. So we can write
$\text{First} \equiv \text{True}$ and $\text{Second} \equiv \text{False}$.&lt;/p></description></item></channel></rss>