<?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 Junrui Liu</title><link>https://junrui-liu.github.io/blog/logic/</link><description>Recent content in Logic on Junrui Liu</description><generator>Hugo</generator><language>en-US</language><copyright>Copyright © 2026, Junrui Liu.</copyright><lastBuildDate>Sun, 12 Jul 2026 00:00:00 +0000</lastBuildDate><atom:link href="https://junrui-liu.github.io/blog/logic/index.xml" rel="self" type="application/rss+xml"/><item><title>Logic as Minecraft (Part 1)</title><link>https://junrui-liu.github.io/mc-logic-1/</link><pubDate>Sun, 12 Jul 2026 00:00:00 +0000</pubDate><guid>https://junrui-liu.github.io/mc-logic-1/</guid><description>&lt;h2 id="introduction"&gt;Introduction&lt;/h2&gt;
&lt;p&gt;This blog post is intended to be the first in a series where I try out an alternative approach to teaching formal logic and proofs, using a crafting/resource management game as a vehicle. I will be taking liberal inspiration and examples from the wonderful &lt;a href="https://en.wikipedia.org/wiki/Minecraft"&gt;Minecraft&lt;/a&gt; video game, a game that I enjoy &lt;sup id="fnref:1"&gt;&lt;a href="#fn:1" class="footnote-ref" role="doc-noteref"&gt;1&lt;/a&gt;&lt;/sup&gt;.&lt;/p&gt;
&lt;p&gt;The reason I wanted to try something new is that, although I&amp;rsquo;ve always found logic fascinating, it has a reputation for being quite abstract and challenging in classroom settings. I came up with this Minecraft approach while preparing for a teaching demo talk I gave during my recent academic job interviews, which I had a lot of fun crafting (ha!). So I thought it would be fun to share it here. I hope it&amp;rsquo;ll make learning logic not only &lt;em&gt;fun and intuitive&lt;/em&gt; through (literal) Minecraft gameplay, but also &lt;em&gt;interactive&lt;/em&gt; by later incorporating a live coding environment called an &lt;a href="https://en.wikipedia.org/wiki/Proof_assistant"&gt;interactive theorem prover&lt;/a&gt; &lt;sup id="fnref:2"&gt;&lt;a href="#fn:2" class="footnote-ref" role="doc-noteref"&gt;2&lt;/a&gt;&lt;/sup&gt;, which will allow us to play logic as a (surprisingly addictive) game with real-time feedback.&lt;/p&gt;</description></item><item><title>Solver-aided chorale composition</title><link>https://junrui-liu.github.io/choco/</link><pubDate>Sat, 11 Jun 2022 00:00:00 +0000</pubDate><guid>https://junrui-liu.github.io/choco/</guid><description>&lt;h2 id="introduction"&gt;Introduction&lt;/h2&gt;
&lt;p&gt;Composing music is hard: if you hit the keys on a piano randomly, chances are, it won&amp;rsquo;t sound great. A music theory aims to distill a musical &lt;em&gt;syntax&lt;/em&gt; such that a syntactically correct composition will not sound &amp;ldquo;wrong.&amp;rdquo; Under this view, composition becomes a constraint satisfaction problem: given a background theory, find a sequence of composition actions that does not violate the theory&amp;rsquo;s syntax.&lt;/p&gt;
&lt;p&gt;To illustrate this view, here&amp;rsquo;s a toy project called &lt;a href="https://github.com/junrui-liu/choco"&gt;Choco&lt;/a&gt; that I built for composing music in the style of &lt;a href="https://en.wikipedia.org/wiki/Four-part_harmony"&gt;Baroque four-part chorales&lt;/a&gt;. It was originally developed as a course project for &lt;a href="https://github.com/fredfeng/CS292C/tree/spring-2022"&gt;CS 292C - Computer Aided Reasoning for Software&lt;/a&gt;, and was motivated by my earlier memory of doing four-part voice leading in a music theory class. I felt at that time that the rules of four-part harmony were rigid enough, and the process mechanical enough, that it would be possible to automate the process of composing a chorale. Choco is my attempt at doing just that.&lt;/p&gt;</description></item></channel></rss>