<?xml version="1.0" encoding="UTF-8"?>
<feed
xmlns="http://www.w3.org/2005/Atom"><author><name>Brent A. Yorgey</name><uri>http://ozark.hendrix.edu/~yorgey/forest/brentyorgey/</uri></author><updated>2026-11-07</updated><title>Brent Yorgey › Weeknotes</title><id>http://ozark.hendrix.edu/~yorgey/forest/005U/</id><link
rel="alternate"
href="http://ozark.hendrix.edu/~yorgey/forest/005U/" /><link
rel="self"
href="http://ozark.hendrix.edu/~yorgey/forest/005U/atom.xml" /><entry><title>Weeknotes for 7 November 2026 (week 44)</title><published>2026-11-07T00:00:00Z</published><updated>2026-11-07T00:00:00Z</updated><link
rel="alternate"
type="text/html"
href="http://ozark.hendrix.edu/~yorgey/forest/2026-W44/" /><id>http://ozark.hendrix.edu/~yorgey/forest/2026-W44/</id><content
type="xhtml"><div
xmlns="http://www.w3.org/1999/xhtml"><section
class="block hide-metadata"
id="id--5b139-2c-201229-29"><header><h2>Politics</h2></header><p
xmlns:html="http://www.w3.org/1999/xhtml">I usually stay away from writing about politics.  But I am of course quite pleased at the results of this week's midterm elections in the US.  Everyone knows about the <em>national</em> results; but there is good news at the hyper-local level as well.  For the last two years my wife has served as a "Justice of the Peace" on <span
class="link external"><a
href="https://www.faulknercountyar.gov/quorum-court/">our county's "Quorum Court"</a></span>—basically a body of elected officials who are responsible for overseeing the county budget.  A lot of it is mundane, but every now and then there are more consequential issues at stake (data centers, ICE funding, <em>etc.</em>). She ran unopposed and was re-elected, which was unremarkable (though still worth celebrating).  However, three more out of the 13 seats flipped from Republican to Democrat (one by a razor-thin margin of 5 votes!), for a total of 5 Quorum Court seats now held by Democrats—so the Republican members of the Quorum Court no longer hold a supermajority.  It may not sound like a big deal but in practical terms it makes a difference!</p></section></div></content></entry><entry><title>Weeknotes for 2 November 2026 (week 43)</title><published>2026-11-02T00:00:00Z</published><updated>2026-11-02T00:00:00Z</updated><link
rel="alternate"
type="text/html"
href="http://ozark.hendrix.edu/~yorgey/forest/2026-W43/" /><id>http://ozark.hendrix.edu/~yorgey/forest/2026-W43/</id><content
type="xhtml"><div
xmlns="http://www.w3.org/1999/xhtml"><section
class="block hide-metadata"
id="id-http-3a-2f-2fozark-2ehendrix-2eedu-2f-7eyorgey-2fforest-2f00R8-2f"><header><h2>Applicative functor inference collaboration</h2></header><p
xmlns:html="http://www.w3.org/1999/xhtml">A <span
class="link local"><a
href="/~yorgey/forest/00R7">few weeks ago I reported</a></span> that I had begun reading <em>Coercive Subtyping for Implicit Functorial Programming</em> by <span
class="link local"><a
href="/~yorgey/forest/ryan-doenges">Ryan Doenges</a></span>, <span
class="link local"><a
href="/~yorgey/forest/aaron-stump">Aaron Stump</a></span>, <em>et al.</em>  I contacted them after finishing the paper, and it turns out that our approaches to the problem, though different, are extremely synergistic, with the result that we are going to try collaborating.  I had a really fun video chat with Aaron this week, and we're setting up a meeting with all three of us for this coming week.  I'm really excited!  It's been somewhat difficult for me to build and maintain good collaborations, and this just kind of fell in my lap.  I'm also simply excited to see <span
class="link local"><a
href="/~yorgey/forest/000P">this project</a></span> make forward progress—lately I had felt pretty stuck.
  </p></section><section
class="block hide-metadata"
id="id--5b158-2c-20846-29"><header><h2>ICPC @ Hendrix</h2></header><p
xmlns:html="http://www.w3.org/1999/xhtml">On Saturday I hosted a competition site for the <span
class="link external"><a
href="https://icpc.global/">International
     Collegiate Programming Contest</a></span> at
     Hendrix. 11 teams (including two from Hendrix) competed, and I
     think everyone had fun.  (See <span
class="link local"><a
href="/~yorgey/forest/00R6">these previous weeknotes</a></span> for the reasons I decided to try hosting this year.)  The worst part was trying to make enough copies of the
     OS image in just a few days before the contest, since it took me
     a couple hours to copy each USB key, and quite a few of them turned out to be bad.  Next year I will try a different USB brand,
     and also see if I can find someone in IT who can help copy them.
  </p></section><section
class="block hide-metadata"
id="id--5b849-2c-201765-29"><header><h2>Piano corner</h2></header><p
xmlns:html="http://www.w3.org/1999/xhtml">As a teenager I really loved Romantic composers (<em>e.g.</em> Chopin,
  Rachmaninoff, Brahms (though not Debussy)).  I also played Bach
  because my piano teacher made me—not that I disliked it, but it's
  just not what I would have chosen to play on my own.  As I've gotten
  older, however, Bach has grown on me a lot.  My love for Romantic
  composers is undiminished, but these days I can get lost in learning
  Bach pieces in a way I never did growing up.</p><p
xmlns:html="http://www.w3.org/1999/xhtml">All that is just to say that this week I have become obsessed
  with learning Bach's <span
class="link local"><a
href="/~yorgey/forest/00R5">French Suite No. 6 in E major (BVW 817)</a></span>.
  I had already previously learned No. 4 (E♭ major) and No. 5 (G
  major).  I don't really know what triggered it, exactly; I think I
  just happened to flip to it, and it just grabbed me.  So far I've
  got the Allemande down pretty well and starting to work on
  the Courante.</p></section></div></content></entry><entry><title>Weeknotes for 16 October 2026 (week 41)</title><published>2026-10-17T00:00:00Z</published><updated>2026-10-17T00:00:00Z</updated><link
rel="alternate"
type="text/html"
href="http://ozark.hendrix.edu/~yorgey/forest/2026-W41/" /><id>http://ozark.hendrix.edu/~yorgey/forest/2026-W41/</id><content
type="xhtml"><div
xmlns="http://www.w3.org/1999/xhtml"><section
class="block hide-metadata"
id="id--5b139-2c-20491-29"><header><h2>Fall break!</h2></header><p
xmlns:html="http://www.w3.org/1999/xhtml">This Thursday and Friday was fall break, with no classes—but my kids were still in school (they have their fall break next week) so I got a few days of sitting at my favorite coffee shop or at home with no distractions.  I've used the time to get caught up on some additional things and play a bunch of Hanabi.</p></section><section
class="block hide-metadata"
id="id--5b494-2c-201901-29"><header><h2>Swarm in-game help system and tree traversals</h2></header><p
xmlns:html="http://www.w3.org/1999/xhtml">I've continued <span
class="link external"><a
href="https://github.com/swarm-game/swarm/pull/2802">working steadily</a></span> on the <span
class="link external"><a
href="https://github.com/swarm-game/swarm/issues/2504">integrated help system</a></span> for Swarm.  Each help document can have a special block specifying a table of contents; these tables collectively determine a tree structure for all the help documents.  I wanted to create "next", "previous", and "parent" links on each page, like one often sees in other help systems; I finally realized that these are determined via a <em>preorder traversal</em> of the document tree.  In other words, the <em>previous</em> and <em>next</em> pages should be the ones that come before and after in a preorder traversal, respectively.  I spent several hours writing just a few lines of code to process the tree and automatically generate such links (after previously writing a DFS to build the tree and flag any issues such as duplicate or broken links, or orphan pages).  I suppose some might find this frustrating, but I greatly enjoy thinking hard for an hour and at the end producing just a single, elegant line of code (and, typically, a paragraph-long comment).</p><p
xmlns:html="http://www.w3.org/1999/xhtml">The help system is almost finished—another concentrated push or two should be enough to get it there.  Then, of course, I will have the task of actually writing a bunch of help content, but I enjoy that too.</p></section></div></content></entry><entry><title>Weeknotes for 9 October 2026 (week 40)</title><published>2026-10-12T00:00:00Z</published><updated>2026-10-12T00:00:00Z</updated><link
rel="alternate"
type="text/html"
href="http://ozark.hendrix.edu/~yorgey/forest/2026-W40/" /><id>http://ozark.hendrix.edu/~yorgey/forest/2026-W40/</id><content
type="xhtml"><div
xmlns="http://www.w3.org/1999/xhtml"><section
class="block hide-metadata"
id="id--5b138-2c-201168-29"><header><h2>Courses</h2></header><p
xmlns:html="http://www.w3.org/1999/xhtml">I have finally caught up on grading (<em>aka</em> marking), and I'm hoping to keep it that way.  I have a system for ensuring that I stay on top of grading as things get turned in throughout the semester; it's too boring to explain here but suffice it to say that it involves a spreadsheet and multiple <span
class="link external"><a
href="http://beeminder.com/">Beeminder</a></span> goals.  It's a bit complicated, but the complication has evolved over several years in response to real issues, and it works pretty well, most of the time.  It kind of fell apart earlier in the semester due to some external factors, but now that I'm back on track I'm confident it will continue.</p><p
xmlns:html="http://www.w3.org/1999/xhtml"><span
class="link local"><a
href="/~yorgey/forest/00JF">Algorithms</a></span> continues to go well; I am enjoying writing up my lecture notes in Forester.  The students just had their first exam, and overall they did pretty well. I give out the problems a week in advance, they can prepare however they want, and then they have to come in and write out their answers from memory in class, with no notes or technology.</p></section><section
class="block hide-metadata"
id="id-http-3a-2f-2fozark-2ehendrix-2eedu-2f-7eyorgey-2fforest-2f00R6-2f"><header><h2>ICPC</h2></header><p
xmlns:html="http://www.w3.org/1999/xhtml">I've decided to host a competition site for the <span
class="link external"><a
href="https://icpc.global/">International Collegiate Programming Contest</a></span> (ICPC) regional contest on October 31.  We've never been able to do this before, because it required having enough computer lab space for all the teams to have their own computer; we had very little computer lab space when I arrived ten years ago, and even less now. In any case, the University of Arkansas Fort Smith always hosted a site, which we would travel to (about a 2.5-hour drive) every fall.  But this year, Fort Smith dropped off the list of sites—the faculty member who used to organize it seems to have moved on. At the same time, our region is moving to having teams bring their own computers, and handing out bootable USB sticks with a standard image that they are required to use for the contest; so computer lab space is no longer a limiting factor.  We'll see how it goes.  In the next few weeks I need to buy some USB sticks and copy a disk image onto them!</p></section><section
class="block hide-metadata"
id="id-http-3a-2f-2fozark-2ehendrix-2eedu-2f-7eyorgey-2fforest-2f00R7-2f"><header><h2>Coercive Subtyping for Implicit Functorial Programming</h2></header><p
xmlns:html="http://www.w3.org/1999/xhtml">I have begun <span
class="link external"><a
href="https://al.radbox.org/doi/10.1145/3830439.3831273">reading this paper</a></span> from the most recent Haskell Symposium with great interest, since I have <span
class="link local"><a
href="/~yorgey/forest/000P">spent time thinking about the same problem</a></span>—that is, the problem of automatically inferring/inserting calls to things like <code>fmap</code>.  I really want to do this for <code>Applicative</code> (with restrictions), but haven't managed to make the proof go through so far. They only do it for <code>Functor</code>, but have what looks like a really nice framework based on ideas from normalization by evaluation.  I'm excited to keep reading and see how the ideas can potentially be extended.</p></section></div></content></entry><entry><title>Weeknotes for 2 October 2026 (week 39)</title><published>2026-10-03T00:00:00Z</published><updated>2026-10-03T00:00:00Z</updated><link
rel="alternate"
type="text/html"
href="http://ozark.hendrix.edu/~yorgey/forest/2026-W39/" /><id>http://ozark.hendrix.edu/~yorgey/forest/2026-W39/</id><content
type="xhtml"><div
xmlns="http://www.w3.org/1999/xhtml"><p
xmlns:html="http://www.w3.org/1999/xhtml">Not really a whole lot going on this week besides a mountain of course prep and grading.</p><section
class="block hide-metadata"
id="id--5b232-2c-20793-29"><header><h2>Piano corner</h2></header><p
xmlns:html="http://www.w3.org/1999/xhtml">I hadn't played the exquisitely beautiful <span
class="link local"><a
href="/~yorgey/forest/00O1">Rachmaninoff Prelude in D major</a></span> for a while, so I worked on polishing it up this week.  Again, nothing too technically demanding, but there are a lot of notes with big jumps that must be played quietly, without interrupting the flow of the beautiful melody—so the slightest hesitation will ruin it, and all the notes have to be down cold!  I'm pretty happy with it at this point, but I think it still needs to solidify more before I would be comfortable performing it.</p></section><section
class="block hide-metadata"
id="id--5b796-2c-201529-29"><header><h2>Hanabi corner: learning Turbo 2</h2></header><p
xmlns:html="http://www.w3.org/1999/xhtml">My 15-year-old son and I have started learning the <span
class="link external"><a
href="https://hanabi.wiki/en/conventions/turbo2">Turbo 2 convention system</a></span> for 2-player Hanabi.  I played one game with him this week (we got a perfect score, though it was not a particularly difficult deal) and have played a couple games with others.  I like it a lot so far—it seems to occupy a happy medium between a "natural" convention system like <span
class="link external"><a
href="https://hanabi.github.io/">H-Group</a></span> and "pure information-theoretic" convention systems like <span
class="link external"><a
href="https://hanabi.wiki/en/conventions/hat-guessing">Hat Guessing</a></span> or <span
class="link external"><a
href="https://hanabi.wiki/en/conventions/ReactorZero">Reactor 0</a></span>, and works much better for 2 players than H-Group.</p></section></div></content></entry><entry><title>Weeknotes for 25 September 2026 (week 38)</title><published>2026-09-28T00:00:00Z</published><updated>2026-09-28T00:00:00Z</updated><link
rel="alternate"
type="text/html"
href="http://ozark.hendrix.edu/~yorgey/forest/2026-W38/" /><id>http://ozark.hendrix.edu/~yorgey/forest/2026-W38/</id><content
type="xhtml"><div
xmlns="http://www.w3.org/1999/xhtml"><section
class="block hide-metadata"
id="id--5b141-2c-201488-29"><header><h2>Celebrations and farewells</h2></header><p
xmlns:html="http://www.w3.org/1999/xhtml">This past week has been extremely full, and a rollercoaster of emotions. My wife attended a conference at the beginning of the week, so I was solo parenting our three kids Monday–Wednesday.  On Thursday my wife and I celebrated 23 years together—not our wedding anniversary (which we also celebrate), but the day we officially began dating.  On Friday afternoon I attended a farewell party for a dear colleague who is leaving suddenly and unexpectedly for a wonderful opportunity—I'm excited for her but very sad she is leaving. On Saturday morning, we hosted a bunch of 8–9 year olds for a Harry Potter-themed birthday party (featuring a fun <span
class="link external"><a
href="https://www.etsy.com/listing/1003638944/wizard-escape-room-game-adventure-party?ls=a&amp;ga_order=most_relevant&amp;ga_search_type=all&amp;ga_view_type=gallery&amp;ga_search_query=potter%20escape%20room&amp;ref=sc_gallery-1-1&amp;sr_prefetch=1&amp;pf_from=market&amp;dd=1&amp;plkey=EuWZgBWIwFfXHghrvDUNMQeCZo6e:LT1dd4b556090b6df20e994de15ae12e08c5a3b936">escape room/puzzle solving challenge</a></span>); then on Saturday afternoon we attended the funeral of a dear friend from church (at which I also played the piano).</p><p
xmlns:html="http://www.w3.org/1999/xhtml">Needless to say, I did not get very much work done this week.  I dread having to claw my way out from under the pile of tasks and grading that has accumulated.</p></section><section
class="block hide-metadata"
id="id--5b1491-2c-202617-29"><header><h2>Piano corner</h2></header><p
xmlns:html="http://www.w3.org/1999/xhtml">I finally feel like I have Chopin's <span
class="link local"><a
href="/~yorgey/forest/00H6">Waltz in A♭ major, Op. 64 No. 3</a></span> satisfactorily under my fingers, which I started learning back in June and have worked off and on since then.  This one took a lot longer to learn than some of the others—it is not particularly demanding technically, but it seems to have a relatively high <span
class="link external"><a
href="https://en.wikipedia.org/wiki/Kolmogorov_complexity">Kolmogorov complexity</a></span>.</p><p
xmlns:html="http://www.w3.org/1999/xhtml">I have also polished up Debussy's <span
class="link local"><a
href="/~yorgey/forest/00NM">Clair de Lune</a></span>, which I learned last year but hadn't played in a little while.  It is of course <span
class="link external"><a
href="https://en.wikipedia.org/wiki/Suite_bergamasque">quite famous</a></span>, and I resisted learning it for a long time just because of some perverse nonconformist urge.  But there is a reason it is so popular: it is quite beautiful, and I finally decided that it's just one of those pieces any classical pianist should have in their repertoire.  Besides, although it is fairly accessible, and many people try to learn it due to its popularity, playing it well is a nontrivial challenge.  I'm fairly happy with how I play it at this point.</p></section></div></content></entry><entry><title>Weeknotes for 18 September 2026 (week 37)</title><published>2026-09-19T00:00:00Z</published><updated>2026-09-19T00:00:00Z</updated><link
rel="alternate"
type="text/html"
href="http://ozark.hendrix.edu/~yorgey/forest/2026-W37/" /><id>http://ozark.hendrix.edu/~yorgey/forest/2026-W37/</id><content
type="xhtml"><div
xmlns="http://www.w3.org/1999/xhtml"><section
class="block hide-metadata"
id="id--5b141-2c-20629-29"><header><h2>Advising</h2></header><p
xmlns:html="http://www.w3.org/1999/xhtml">This week was full of office hour meetings, since I was required to have a check-in meeting with all 14 of my first-year advisees.  I'm also requiring my Algorithms students to have several individual meetings with me throughout the semester, and I ill-advisedly made the first one due at the same time—so I had quite a few Algorithms meetings on top of the first-year advising meetings.  It was exhausting, but I also had some really good meetings.</p></section><section
class="block hide-metadata"
id="id--5b632-2c-201053-29"><header><h2>Swarm</h2></header><p
xmlns:html="http://www.w3.org/1999/xhtml">I did manage to fit in a <span
class="link external"><a
href="https://github.com/swarm-game/swarm/pull/2800">bit of work on the Swarm integrated help system</a></span>: you can now hit Tab to cycle among links on a page, and I added a bunch of unit tests for the help parser.  Then I spent some time thinking about how to specify tables of contents; I think I have it planned out now and just need to write the code this coming week.</p></section><section
class="block hide-metadata"
id="id--5b1056-2c-201575-29"><header><h2>Family</h2></header><p
xmlns:html="http://www.w3.org/1999/xhtml">We have celebrated two birthdays in the past few days: my older son turned 15 on the Thursday, and my younger son turned 9 on Friday.  Older son chose to go to <span
class="link external"><a
href="https://www.marbleslab.com/">Marble Slab Creamery</a></span> and younger son chose to visit <span
class="link external"><a
href="https://www.lasdelicias.biz/">Las Delicias</a></span>; much delicious sugar was consumed.  My wife's parents came down for a visit to celebrate their birthdays and attend the community theater musical my younger son is in (opening night is tonight!).</p></section></div></content></entry><entry><title>Weeknotes for 11 September 2026 (week 36)</title><published>2026-09-11T00:00:00Z</published><updated>2026-09-11T00:00:00Z</updated><link
rel="alternate"
type="text/html"
href="http://ozark.hendrix.edu/~yorgey/forest/2026-W36/" /><id>http://ozark.hendrix.edu/~yorgey/forest/2026-W36/</id><content
type="xhtml"><div
xmlns="http://www.w3.org/1999/xhtml"><p
xmlns:html="http://www.w3.org/1999/xhtml">Not much to report this week—I spent all of the Monday holiday finishing my self-evaluation letter and the position request for next year (such a relief to be done with them).  The rest of the week I've been playing catch-up with class preparation and grading.  And I had to spend an hour fixing my homework submission download script and an hour setting up a spreadsheet for my new grading system before I could even get down to the business of grading.  Hopefully more interesting things to report next week.
  </p></div></content></entry><entry><title>Weeknotes for 4 September 2026 (week 35)</title><published>2026-09-04T00:00:00Z</published><updated>2026-09-04T00:00:00Z</updated><link
rel="alternate"
type="text/html"
href="http://ozark.hendrix.edu/~yorgey/forest/2026-W35/" /><id>http://ozark.hendrix.edu/~yorgey/forest/2026-W35/</id><content
type="xhtml"><div
xmlns="http://www.w3.org/1999/xhtml"><p
xmlns:html="http://www.w3.org/1999/xhtml">Missed last week's weeknotes since there is a whole lot going on at
the start of the semester!</p><section
class="block hide-metadata"
id="id--5b240-2c-20655-29"><header><h2>Haskell Interlude</h2></header><p
xmlns:html="http://www.w3.org/1999/xhtml">I was on the <span
class="link external"><a
href="https://haskell.foundation/podcast/">Haskell Interlude podcast</a></span>!  I recorded the actual interview last spring, with <span
class="link local"><a
href="/~yorgey/forest/farhad-mehta">Farhad Mehta</a></span> and <span
class="link local"><a
href="/~yorgey/forest/sam-frohlich">Sam Frohlich</a></span>; the whole process was a lot of fun.  I listened to the episode before it was released and I am not too embarrassed about anything I said, so <span
class="link external"><a
href="https://haskell.foundation/podcast/85/">give it a listen</a></span>!</p></section><section
class="block hide-metadata"
id="id--5b658-2c-202623-29"><header><h2>Semester start</h2></header><p
xmlns:html="http://www.w3.org/1999/xhtml">Because of all administrative responsibilities, I had very little time to prepare for my actual classes, and the first few days of classes hit like a ton of bricks—I did not get very much sleep as I prepared syllabi and assignments at the very last minute.  I do feel I'm in a better place now, though.  Much of it was one-time overhead that need not be repeated.</p><p
xmlns:html="http://www.w3.org/1999/xhtml">Getting to know my students has been fun.  I am teaching one upper-level course (<span
class="link local"><a
href="/~yorgey/forest/00JE">CSCI 382, Algorithms</a></span>) in which I already knew most of the students; one introductory computing course (<span
class="link external"><a
href="https://hendrix-cs.github.io/csci150/">CSCI 150, Foundations of Computer Science</a></span>); and one general education first-year seminar.  For the most part, the students seem thoughtful and engaged.</p><p
xmlns:html="http://www.w3.org/1999/xhtml">I am trying something a bit different with <span
class="link local"><a
href="/~yorgey/forest/00JE">CSCI 382, Algorithms</a></span> this semester (besides <span
class="link local"><a
href="/~yorgey/forest/00JF">typing up my lecture notes in Forester</a></span>). I used to assign weekly problem sets, consisting of a bunch of problems in a PDF that they would have one week to solve and submit.  But scheduling the problem sets around exams and breaks, and making sure they contained appropriate material, was always tricky.  They also didn't adapt well to students who were either very advanced or struggling.  This semester, I am simply publishing a <span
class="link local"><a
href="/~yorgey/forest/00JL">collection of problems</a></span>, and the students are responsible for selecting which problems they want to solve.  To help ensure they are making consistent progress, they still have weekly "problem sets" due, but the problem sets do not specify which problems they must solve, but only a required number of problems instead.  This allows me to publish a wider variety of problems, as well as helping students who fall a bit behind continue to make consistent progress without penalizing them for being behind.</p><p
xmlns:html="http://www.w3.org/1999/xhtml">We'll see how it goes!  I am cautiously optimistic, though of course I'm sure there are things I will learn and change about the system next time.</p></section><section
class="block hide-metadata"
id="id--5b2626-2c-203174-29"><header><h2>Missing ICFP</h2></header><p
xmlns:html="http://www.w3.org/1999/xhtml">ICFP was relatively close to me this year (Indianapolis would be about a 9 hour drive, or a short plane flight or two, away), but unfortunately, it happened during the first week of classes.  Since I am the department chair and an advisor for first-year students, that sadly made ICFP a no-go.  Spent the week watching the occasional livestream, reading friends post about ICFP on Mastodon, and just generally feeling like I was missing out.  I am already plotting how I can make it to Nijmegen next year...</p></section><section
class="block hide-metadata"
id="id--5b3177-2c-203464-29"><header><h2>Admin corner</h2></header><p
xmlns:html="http://www.w3.org/1999/xhtml">A bunch of my extra time is taken up right now with two major administrative tasks: completing a self-evaluation, and putting together a hiring request for next year.  Both are due early next week.  I will be very glad when they are both done!
  </p></section><section
class="block hide-metadata"
id="id--5b3467-2c-203687-29"><header><h2>Swarm</h2></header><p
xmlns:html="http://www.w3.org/1999/xhtml">Only a tiny bit of incremental progress on the integrated help system this week; looking forward to having the above admin stuff done so I can get back to working on this more regularly!</p></section><section
class="block hide-metadata"
id="id--5b3690-2c-203838-29"><header><h2>Piano corner</h2></header><p
xmlns:html="http://www.w3.org/1999/xhtml">I've continued to work on my Chopin waltz project.  I'm also slowly <span
class="link local"><a
href="/~yorgey/forest/00H7">adding repertoire to my forest</a></span>.</p></section></div></content></entry><entry><title>Weeknotes for 21 August 2026 (week 33)</title><published>2026-08-22T00:00:00Z</published><updated>2026-08-22T00:00:00Z</updated><author><name>Brent A. Yorgey</name><uri>http://ozark.hendrix.edu/~yorgey/forest/brentyorgey/</uri></author><link
rel="alternate"
type="text/html"
href="http://ozark.hendrix.edu/~yorgey/forest/2026-W33/" /><id>http://ozark.hendrix.edu/~yorgey/forest/2026-W33/</id><content
type="xhtml"><div
xmlns="http://www.w3.org/1999/xhtml"><section
class="block hide-metadata"
id="id--5b159-2c-201304-29"><header><h2>Swarm</h2></header><p
xmlns:html="http://www.w3.org/1999/xhtml">This week was the 5-year anniversary of my <span
class="link external"><a
href="https://github.com/swarm-game/swarm/commit/479b10e98685cdc4c7c7f1935b679b6b83819dcf">first commit to the
  Swarm repo</a></span>—back in August of 2021, at the start of my sabbatical.  It's been a wonderful, wild ride.  The project has gone much farther than I could have imagined, and been more professionally fruitful than I would have thought possible!  And a big part of the reason it's remained fun for so long is the cool community of other contributors the project has attracted.</p><p
xmlns:html="http://www.w3.org/1999/xhtml">There's been a flurry of activity this week from several other contributors, so I've spent a decent bit of time reviewing PRs.  Among other cool things, there have been some fantastic improvements to memory usage and performance.</p><p
xmlns:html="http://www.w3.org/1999/xhtml">I've also continued working on an integrated help system this week.  It's coming along nicely.  One of the few things still missing is the ability to specify a table of contents for a given page, from which we can automatically display next/previous/up links.  I basically plan to steal the way Sphinx does this with the <code>toctree</code> directive.</p></section><section
class="block hide-metadata"
id="id--5b1307-2c-202375-29"><header><h2>First-year student advising</h2></header><p
xmlns:html="http://www.w3.org/1999/xhtml">I spent a substantial amount of time this week meeting with my cohort of 14 first-year student advisees—first as a group, and then individually.  In past years, they have come to campus with blank slates and we would spend the first week frantically building their schedules, resolving conflicts, finding alternate classes when the class they wanted is too full, and so on.  It didn't leave much time for anything besides putting out fires.  Starting last year, we have a new system in place where they meet with someone virtually over the summer to put together an initial course schedule.  By the time they arrive on campus they already have a mostly-solid schedule, and I just have to help fill it out with an extra class or two.  It is much more civilized and leaves plenty of time for chatting and getting to know them and what they are interested in.  Talking to people all day is a lot, but aside from that it was quite enjoyable; they all seem like lovely human beings with a wide variety of interests.</p></section><section
class="block hide-metadata"
id="id--5b2378-2c-203249-29"><header><h2>Semester prep</h2></header><p
xmlns:html="http://www.w3.org/1999/xhtml">The fall semester is almost upon us.  When I haven't been doing advising stuff I have been working hard on preparing for my fall courses.  I'll be co-teaching our introductory programming course with my colleague, and we don't plan to change much about the course, which by this point is a well-oiled machine.  On the other hand, I am making a few more changes to Algorithms this semester.  In order to reduce incentives for LLM use, I'm adding an extra midterm exam and having some required office hour visits.  But the extra exam makes it more awkward to fit in weekly problem sets at reasonable times, which suddenly made me wonder today whether I could do something more flexible, like assigning individual problems every day and having them choose a portfolio of problems to solve. I still need to work out a lot of details.</p></section><section
class="block hide-metadata"
id="id--5b3252-2c-203863-29"><header><h2>Hanabi</h2></header><p
xmlns:html="http://www.w3.org/1999/xhtml">I have continued to enjoy <span
class="link external"><a
href="https://hanabi.github.io/">Hanabi</a></span> a lot—playing sometimes with my 14yo and sometimes with strangers on <span
class="link external"><a
href="https://hanab.live/lobby">Hanab Live</a></span>.  I think I enjoy it for many of the same reasons that I enjoy bridge—it is collaborative rather than competitive (I'm super competitive and it's easy for me to get stressed out about winning and losing), and involves teamwork, communication, and logical deduction.  I'm always happy to teach others, so if you're intrigued and would like to learn how to play, let me know!</p><p
xmlns:html="http://www.w3.org/1999/xhtml"><img
src="/~yorgey/forest/bafkyrzacicm5iwcmyf3avvnwzd2tbopsynusqvdsn2g6nzldrdw4xtprvouhuo2cnox4yn2igivwx6yiclsthlnvax6nthupqsjll2m3tu2xqedu.png"
loading="lazy" /></p></section></div></content></entry><entry><title>Weeknotes for 14 August 2026 (week 32)</title><published>2026-08-15T00:00:00Z</published><updated>2026-08-15T00:00:00Z</updated><author><name>Brent A. Yorgey</name><uri>http://ozark.hendrix.edu/~yorgey/forest/brentyorgey/</uri></author><link
rel="alternate"
type="text/html"
href="http://ozark.hendrix.edu/~yorgey/forest/2026-W32/" /><id>http://ozark.hendrix.edu/~yorgey/forest/2026-W32/</id><content
type="xhtml"><div
xmlns="http://www.w3.org/1999/xhtml"><section
class="block hide-metadata"
id="id--5b159-2c-20807-29"><header><h2>Swarm integrated help system</h2></header><p
xmlns:html="http://www.w3.org/1999/xhtml">I've started actually putting together the Swarm integrated help system in earnest—the idea is to have a collection of interlinked documents, stored as a bunch of Markdown files, which can be displayed and explored interactively from within the game (and which can also be compiled into a static HTML form).  There's nothing technically challenging about this at all, just a bunch of engineering.  But as the semester ramps up that's exactly what I need—something on which I can make consistent progress in bits of time here and there, without needing big blocks of time to think deeply.</p></section><section
class="block hide-metadata"
id="id--5b810-2c-201467-29"><header><h2>Semester prep</h2></header><p
xmlns:html="http://www.w3.org/1999/xhtml">This week was full of meetings and workshops (department chairs workshop on Monday; meeting with my colleage about our co-taught course on Wednesday; an all-day workshop on new student advising on Thursday; a workshop on the new first-year course on Friday).  After getting back from vacation a couple weeks ago, my todo list is already extremely long.  I'm looking forward to the semester for the most part, but as usual I wish I could spend my time working deeply on a few things rather than having a million tiny administrative tasks.  I am most definitely looking forward to my next sabbatical in a year or two.</p></section></div></content></entry><entry><title>Weeknotes for 7 August 2026 (week 31)</title><published>2026-08-08T00:00:00Z</published><updated>2026-08-08T00:00:00Z</updated><author><name>Brent A. Yorgey</name><uri>http://ozark.hendrix.edu/~yorgey/forest/brentyorgey/</uri></author><link
rel="alternate"
type="text/html"
href="http://ozark.hendrix.edu/~yorgey/forest/2026-W31/" /><id>http://ozark.hendrix.edu/~yorgey/forest/2026-W31/</id><content
type="xhtml"><div
xmlns="http://www.w3.org/1999/xhtml"><section
class="block hide-metadata"
id="id--5b158-2c-201014-29"><header><h2>Maine</h2></header><p
xmlns:html="http://www.w3.org/1999/xhtml">We finally returned earlier this week from our annual trek to
  Maine. We saw a lot of
  <span
class="link external"><a
href="https://en.wikipedia.org/wiki/Common_loon">loons</a></span>, including seven
  at once, which I had never seen before—they tend to be rather
  solitary—but <span
class="link external"><a
href="https://loonproject.org/2020/09/27/understanding-social-gatherings-the-basics/">apparently this is a
  thing</a></span>.</p><p
xmlns:html="http://www.w3.org/1999/xhtml">While there, in addition to a bunch of reading and swimming, I
  made an elaborate DnD-style campaign for my 8-year-old, and played a
  lot more Hanabi.</p><p
xmlns:html="http://www.w3.org/1999/xhtml">On our way home, we saw The Odyssey (not in IMAX, just a regular
big theater screen) and enjoyed it. Geeked out with my percussionist
band nerd son about <span
class="link external"><a
href="https://en.wikipedia.org/wiki/Ludwig_G%C3%B6ransson">Ludwig Göransson</a></span>'s use of a <span
class="link external"><a
href="https://www.youtube.com/watch?v=Z-VjDxckkg8">rhythmic Shepard tone</a></span>.</p></section><section
class="block hide-metadata"
id="id--5b1017-2c-201436-29"><header><h2>Swarm</h2></header><p
xmlns:html="http://www.w3.org/1999/xhtml">My work on Swarm has inched along slowly—still working on Markdown processing in preparation for building an integrated help system.  In other news, however, Patrick Estrada did a bunch of work switching out <span
class="link external"><a
href="https://hackage.haskell.org/package/fused-effects">fused-effects</a></span> for <span
class="link external"><a
href="https://github.com/haskell-effectful/effectful">effectful</a></span>—leading to some <em>significant</em> speedups!</p></section><section
class="block hide-metadata"
id="id--5b1439-2c-202765-29"><header><h2>Semester prep</h2></header><p
xmlns:html="http://www.w3.org/1999/xhtml">This past week I've just started working on preparations for the fall semester. (The first few years I taught at Hendrix, I would tell myself that I would work on fall preparations a little bit each week over the summer, in order to spread out the work; then I would spend the whole summer <em>not</em> working on fall course prep and feeling guilty about it; then at the end of the summer I would do everything at the last minute in an anxiety-fueled and still guilt-ridden panic.  After a few years of this I finally realized that I should just <em>give myself permission</em> to not work on fall prep over the summer.)</p><p
xmlns:html="http://www.w3.org/1999/xhtml">I've started with <span
class="link local"><a
href="/~yorgey/forest/00JE">Algorithms</a></span>.  I've taught this course many times before, so for the most part I won't be making any big changes; but I do plan to <span
class="link local"><a
href="/~yorgey/forest/00JF">write up my lecture notes in Forester</a></span> this year, just like I <span
class="link local"><a
href="/~yorgey/forest/0021">did for Discrete Math last spring</a></span>.  I've also been making a few changes to the course design in light of what I strongly suspect was too much use of generative AI by students in the course last year.  In particular I plan to add one more in-class exam, and require students to come into office hours some number of times for some kind of formally assessed conversation/quiz/oral exam thing.  I'm still not quite sure of the details.</p></section></div></content></entry><entry><title>Weeknotes for 17 July 2026 (week 28)</title><published>2026-07-18T00:00:00Z</published><updated>2026-07-18T00:00:00Z</updated><author><name>Brent A. Yorgey</name><uri>http://ozark.hendrix.edu/~yorgey/forest/brentyorgey/</uri></author><link
rel="alternate"
type="text/html"
href="http://ozark.hendrix.edu/~yorgey/forest/2026-W28/" /><id>http://ozark.hendrix.edu/~yorgey/forest/2026-W28/</id><content
type="xhtml"><div
xmlns="http://www.w3.org/1999/xhtml"><section
class="block hide-metadata"
id="id--5b157-2c-20753-29"><header><h2>Diagrams in Forester!</h2></header><p
xmlns:html="http://www.w3.org/1999/xhtml">Shortly after adding the ability to <span
class="link local"><a
href="/~yorgey/forest/00IO">embed lilypond snippets</a></span> in my forest, I <span
class="link local"><a
href="/~yorgey/forest/00H5">finished adding support</a></span> for embedded <span
class="link external"><a
href="https://diagrams.github.io/">diagrams</a></span> code as well:


 <p><div
class="forester-block"><a
href="/~yorgey/forest/96d4e31e14e129a4">
  <img
src="/~yorgey/forest/bafkyrzacid43fzkirvitxusrgm4f6lrniolp3hp3z727fgnjco66ldfi4mzgmvo757nifagerw34j5escdnyt4gwqyvaza3dmtu2mbiqs5ivmmqg.png"
loading="lazy" />
</a></div></p></p><p
xmlns:html="http://www.w3.org/1999/xhtml">I'm super excited that I finally got this to work.  I've already used it to add some diagrams to my <span
class="link local"><a
href="/~yorgey/forest/0021">Discrete math lecture notes</a></span>, for example, <span
class="link local"><a
href="/~yorgey/forest/00I3">here</a></span>.  If you're curious to see how this works, check out the <span
class="link external"><a
href="https://github.com/byorgey/forest/blob/main/Shake.hs">Shake file here</a></span>.</p></section><section
class="block hide-metadata"
id="id--5b756-2c-201000-29"><header><h2>Maine</h2></header><p
xmlns:html="http://www.w3.org/1999/xhtml">Continuing to hang out in Maine.  I've eaten a lot of ice cream, played a <em>lot</em> of Hanabi, spent part of a day riding again at <span
class="link external"><a
href="https://www.mtabram.com/">Mt. Abram Bike Park</a></span> (I only almost died twice), <em>etc.</em></p></section></div></content></entry><entry><title>Weeknotes for 10 July 2026 (week 27)</title><published>2026-07-10T00:00:00Z</published><updated>2026-07-10T00:00:00Z</updated><author><name>Brent A. Yorgey</name><uri>http://ozark.hendrix.edu/~yorgey/forest/brentyorgey/</uri></author><link
rel="alternate"
type="text/html"
href="http://ozark.hendrix.edu/~yorgey/forest/2026-W27/" /><id>http://ozark.hendrix.edu/~yorgey/forest/2026-W27/</id><content
type="xhtml"><div
xmlns="http://www.w3.org/1999/xhtml"><section
class="block hide-metadata"
id="id--5b157-2c-20519-29"><header><h2>Maine</h2></header><p
xmlns:html="http://www.w3.org/1999/xhtml">We made it to Maine!  It's delightful here. I've already read two whole books, done a lot of swimming, and baked some <span
class="link external"><a
href="https://mathstodon.xyz/@byorgey/112769699589949345">traditional Abie cake</a></span>. Here's a picture I took of a <span
class="link external"><a
href="https://en.wikipedia.org/wiki/Loon">common loon</a></span> swimming right by our dock:</p><p
xmlns:html="http://www.w3.org/1999/xhtml"><img
src="/~yorgey/forest/bafkyrzacia3wubjzmacihuaynrytthtnrbqfxma3cctljcybrvrqd3krhflvbseb3h2ylognqyyns63eewuiibo2a7moayyfhgsp6ccxgj7ldqhe.jpg"
loading="lazy" /></p></section><section
class="block hide-metadata"
id="id-http-3a-2f-2fozark-2ehendrix-2eedu-2f-7eyorgey-2fforest-2f00IO-2f"><header><h2>Lilypond snippets in Forester</h2></header><p
xmlns:html="http://www.w3.org/1999/xhtml">I built a simple preprocessor that can extract arbitrary blocks from Forester source and run them through an external tool, replacing the block with an image. I then put the whole thing together into a <span
class="link external"><a
href="https://hackage.haskell.org/package/shake">Shake</a></span> <span
class="link external"><a
href="https://github.com/byorgey/forest/blob/main/Shake.hs">build system for my forest</a></span>.  Now I can include musical snippets using <span
class="link external"><a
href="https://lilypond.org/">lilypond</a></span> syntax, like this:</p>
 <p
xmlns:html="http://www.w3.org/1999/xhtml"><div
class="forester-block"><a
href="/~yorgey/forest/d4401b29fcf4da45">
  <img
src="/~yorgey/forest/bafkyrzacicqzwlvra2qt75qnwx44tofrmbcwbilxjxs5wehoryrpqkibj4yx4trrqvd444auixbwvco6oxgwz7cqs6shkzxmdtm5vvocry6box2p.png"
loading="lazy" />
</a></div></p>
<p
xmlns:html="http://www.w3.org/1999/xhtml">I've been slowly adding musical snippets to identify the first few bars of pieces in my <span
class="link local"><a
href="/~yorgey/forest/00H7">piano repertoire</a></span>.  For example, check out <span
class="link local"><a
href="/~yorgey/forest/00HA">[CW02] Waltz in A♭ major, Op. 34 No. 1</a></span>.</p><p
xmlns:html="http://www.w3.org/1999/xhtml">Next I'll extend the preprocessor to work with <span
class="link external"><a
href="https://diagrams.github.io/">diagrams</a></span> as well.</p></section></div></content></entry><entry><title>Weeknotes for 3 July 2026 (week 26)</title><published>2026-07-05T00:00:00Z</published><updated>2026-07-05T00:00:00Z</updated><author><name>Brent A. Yorgey</name><uri>http://ozark.hendrix.edu/~yorgey/forest/brentyorgey/</uri></author><link
rel="alternate"
type="text/html"
href="http://ozark.hendrix.edu/~yorgey/forest/2026-W26/" /><id>http://ozark.hendrix.edu/~yorgey/forest/2026-W26/</id><content
type="xhtml"><div
xmlns="http://www.w3.org/1999/xhtml"><section
class="block hide-metadata"
id="id--5b156-2c-201919-29"><header><h2>Maine road trip 2026, part 1</h2></header><p
xmlns:html="http://www.w3.org/1999/xhtml">My family makes an annual summer pilgrimage from Conway, Arkansas to <span
class="link external"><a
href="https://en.wikipedia.org/wiki/Peru,_Maine">Peru, Maine</a></span>, where my family owns a cabin.  Getting there involves a week-long road trip in either direction, with plenty of stops along the way to see sights, friends, and family, with a different route every year—the road trip is not just a means to an end but an integral part of the vacation!</p><p
xmlns:html="http://www.w3.org/1999/xhtml">This year, we first drove to <span
class="link external"><a
href="https://www.nps.gov/maca/index.htm">Mammoth Cave National Park</a></span> in Kentucky.  <span
class="link external"><a
href="https://en.wikipedia.org/wiki/Mammoth_Cave_National_Park">Mammoth Cave</a></span> is the longest known cave system in the world, with over 685 km of known passageways.  We took a guided tour of (one tiny part of!) the cave, which was quite impressive.</p><p
xmlns:html="http://www.w3.org/1999/xhtml"><img
src="/~yorgey/forest/bafkyrzaciccnhwwwfksrkuudjuac5jas5n7qqeqcoct7jdap6afon3rcopzmw7fbxwyvjr5ndojvmi5gtebnrz5e4k2mcuuwkzcaegcqjeonsyq5.jpg"
loading="lazy" /></p><p
xmlns:html="http://www.w3.org/1999/xhtml"><img
src="/~yorgey/forest/bafkyrzaciataqwsgwm6so7sdbu2i5t7mx6knv7ss4avxnhwe2kajls4xwccwv5hjh2qfoz2bptorw4thnamr5c3whkxw46j4waz3jhfsv36bv5oh.jpg"
loading="lazy" /></p><p
xmlns:html="http://www.w3.org/1999/xhtml"><img
src="/~yorgey/forest/bafkyrzacid7bzytfaxcjjqalfst5s3avlhgzl3cttxbmtnpi3brro4l72lkkzjcngxn3b6if6l677xbabjp4c3djudzliscxphuhy3uztxyxlbzr.jpg"
loading="lazy" /></p><p
xmlns:html="http://www.w3.org/1999/xhtml">Next we drove to <span
class="link external"><a
href="https://en.wikipedia.org/wiki/Pittsburgh">Pittsburgh, Pennsylvania</a></span> to stay with friends for a few nights.  Activities included a visit to the <span
class="link external"><a
href="https://kaminsciencecenter.org/">Kamin Science Center</a></span> (including, of course, a photo op on the space toilet), dinner with other friends, 4th of July fireworks on the campus of Carnegie Mellon, and attending a Sunday morning service at <span
class="link external"><a
href="https://cityreformed.org/">City Reformed Presbyterian Church</a></span>.  I also went for a mountain bike ride in <span
class="link external"><a
href="https://pittsburghparks.org/explore-your-parks/regional-parks/frick-park/">Frick Park</a></span>, which was fun but exhausting.</p><p
xmlns:html="http://www.w3.org/1999/xhtml"><img
src="/~yorgey/forest/bafkyrzaciaqtyeo4fniktrkowuto5xustmiw3e27rm3mrbgjbb7s6owwpgpe5bs25l5tjwwesjrbnzj3eijbpyd243vik4ub3rnxbg5bbcniptox.jpg"
loading="lazy" /></p><p
xmlns:html="http://www.w3.org/1999/xhtml"><img
src="/~yorgey/forest/bafkyrzaciawzmye4pg27m4awmqstq5p4fc6ipht42dvj7n3lcnlp2kcqk6qo4hlfbf33yn3yuwxemfd23qtuhc75eywtlpwvwxwfd37pecf4csfw.jpg"
loading="lazy" /></p><p
xmlns:html="http://www.w3.org/1999/xhtml">Tomorrow we head to <span
class="link external"><a
href="https://en.wikipedia.org/wiki/Williamstown,_Massachusetts">Williamstown, Massachusetts</a></span> for the last stop on our journey.</p></section><section
class="block hide-metadata"
id="id--5b1922-2c-202712-29"><header><h2>Including diagrams and lilypond snippets in Forester</h2></header><p
xmlns:html="http://www.w3.org/1999/xhtml">I've been thinking more about how to embed <span
class="link external"><a
href="https://diagrams.github.io/">diagrams</a></span> and <span
class="link external"><a
href="https://lilypond.org/">lilypond</a></span> output in Forester trees.  Last week I reported feeling stuck on the diagrams preprocessor I was building, but I recently realized I've been overthinking it: rather than call a diagrams interpreter programmatically (which runs into issues with package databases, mismatched GHC versions, <em>etc.</em>), I should just use it as an external executable.  The other benefit of this approach is that it should work similarly for lilypond, which also works as an external tool that compiles source code to an image, so I hope I can reuse a lot of the same infrastructure in my preprocessing tool.</p></section><section
class="block hide-metadata"
id="id--5b2715-2c-202972-29"><header><h2>Piano corner</h2></header><p
xmlns:html="http://www.w3.org/1999/xhtml">Since we've been on our trip, I haven't been able to play the piano, but I did create a <span
class="link local"><a
href="/~yorgey/forest/00H7">page for my piano repertoire</a></span>.  There are only a couple pieces listed so far, but I plan to add new pieces incrementally.</p></section></div></content></entry><entry><title>Weeknotes for 26 June 2026 (week 25)</title><published>2026-06-27T00:00:00Z</published><updated>2026-06-27T00:00:00Z</updated><author><name>Brent A. Yorgey</name><uri>http://ozark.hendrix.edu/~yorgey/forest/brentyorgey/</uri></author><link
rel="alternate"
type="text/html"
href="http://ozark.hendrix.edu/~yorgey/forest/2026-W25/" /><id>http://ozark.hendrix.edu/~yorgey/forest/2026-W25/</id><content
type="xhtml"><div
xmlns="http://www.w3.org/1999/xhtml"><section
class="block hide-metadata"
id="id--5b157-2c-20784-29"><header><h2>Blog post on FTA proof in Agda</h2></header><p
xmlns:html="http://www.w3.org/1999/xhtml">I finally made a last big push and finished up my <span
class="link external"><a
href="https://byorgey.github.io/blog/posts/2026/06/26/FTA.lagda.html">blog post/tutorial on an Agda proof of the Fundamental Theorem of Arithmetic</a></span> (see <span
class="link local"><a
href="/~yorgey/forest/00H4">here</a></span> for a previous discussion), which ended up being about 13K words (including both prose and code).  Somehow this always happens to me—I set out to write a "short note" about something and then end up with a book, or a 19-part blog post series, or whatever.  I don't think it's a bad thing.  I just ought to know by now what's going to happen at the outset.</p></section><section
class="block hide-metadata"
id="id--5b787-2c-201570-29"><header><h2>Forester hacking</h2></header><p
xmlns:html="http://www.w3.org/1999/xhtml">I've gotten a bit stuck on my tool for <span
class="link local"><a
href="/~yorgey/forest/00H5">Embedding diagrams in Forester</a></span>. The surrounding infrastructure is not hard, but the core mechanic of extracting code to a temporary Haskell file and then calling out to another GHC process to interpret the code, via the <span
class="link external"><a
href="https://hackage.haskell.org/package/hint"><code>hint</code> package</a></span>, is very fiddly; I haven't yet been able to get versions/package databases/planets/mystic sigils etc. to line up properly.</p><p
xmlns:html="http://www.w3.org/1999/xhtml">I've also been idly wondering about embedding music notation within forests via <span
class="link external"><a
href="https://lilypond.org/">lilypond</a></span>.  I will have to look into how <span
class="link external"><a
href="https://liamoc.net/forest/index/index.xml">Liam O'Connor</a></span> includes chant notation in his forest (<em>e.g.</em> <span
class="link external"><a
href="https://liamoc.net/forest/loc-0031/index.xml">here</a></span>).</p></section><section
class="block hide-metadata"
id="id--5b1573-2c-201994-29"><header><h2>Hanabi</h2></header><p
xmlns:html="http://www.w3.org/1999/xhtml">I have continued playing some Hanabi, especially with my 14-year old.  We've played a couple games with strictly no verbal communication. The first time we did terribly, scoring 18/25; the second was much better, 24/25.  In both cases we learned a lot from our mistakes.  I'm looking forward to playing more on vacation and introducing some family members to the game and/or strategies.</p></section><section
class="block hide-metadata"
id="id--5b1997-2c-202997-29"><header><h2>Piano corner</h2></header><p
xmlns:html="http://www.w3.org/1999/xhtml">Worked more on Chopin waltzes; I also practiced several of the movements of <span
class="link local"><a
href="/~yorgey/forest/rutter">John Rutter</a></span>'s <span
class="link local"><a
href="/~yorgey/forest/00H8">Suite Antique</a></span> for flute and piano.  My wife and I played the whole suite together over 20 years ago, when we were dating, but we haven't had many chances to play together since then (first, we didn't have a piano; then, when we did have a piano, we had small kids, which made it hard to find the time to play together).  It was my wife's idea to pull it out, and I'm looking forward to playing with her again!  More generally, I hope we can find more opportunity to play together now that our kids are not quite so little (our youngest is 5, and we're not likely to have any more).  We can start by reviving the Rutter as well as <span
class="link external"><a
href="https://en.wikipedia.org/wiki/Flute_Sonata_(Poulenc)">Poulenc's flute sonata</a></span>, which we also played together a long time ago. Eventually I'd also love to play the <span
class="link external"><a
href="https://en.wikipedia.org/wiki/Flute_Sonata_(Prokofiev)">Prokofiev flute sonata</a></span>.</p></section></div></content></entry><entry><title>Weeknotes for 19 June 2026 (week 24)</title><published>2026-06-22T00:00:00Z</published><updated>2026-06-22T00:00:00Z</updated><author><name>Brent A. Yorgey</name><uri>http://ozark.hendrix.edu/~yorgey/forest/brentyorgey/</uri></author><link
rel="alternate"
type="text/html"
href="http://ozark.hendrix.edu/~yorgey/forest/2026-W24/" /><id>http://ozark.hendrix.edu/~yorgey/forest/2026-W24/</id><content
type="xhtml"><div
xmlns="http://www.w3.org/1999/xhtml"><section
class="block hide-metadata"
id="id--5b157-2c-201131-29"><header><h2>Markdown processing and layout in Swarm</h2></header><p
xmlns:html="http://www.w3.org/1999/xhtml">As part of my work on <span
class="link external"><a
href="https://github.com/swarm-game/swarm/issues/2504">adding a help system to Swarm</a></span>, I realized that I needed to better understand our code for processing Markdown (used for in-game item descriptions, scenario descriptions, and the like).  Of course, what started out as innocently reading through the code and adding some extra comments ended with me rewriting a bunch of code from scratch, which I ended up working on obsessively all week.  However, I'm quite pleased with <span
class="link external"><a
href="https://github.com/swarm-game/swarm/pull/2744">the result</a></span>, which not only fixes several issues we had with spacing and code layout, but also paves the way for easily adding features like <span
class="link external"><a
href="https://github.com/swarm-game/swarm/issues/2746">hyphenation</a></span> and <span
class="link external"><a
href="https://github.com/swarm-game/swarm/issues/574">syntax highlighting</a></span>, in addition to expanding the range of Markdown we support to include links and lists.</p></section><section
class="block hide-metadata"
id="id--5b1134-2c-201894-29"><header><h2>Hanabi</h2></header><p
xmlns:html="http://www.w3.org/1999/xhtml"><span
class="link external"><a
href="https://en.wikipedia.org/wiki/Hanabi_(card_game)">Hanabi</a></span> is a fascinating cooperative game of logical deduction (if you don't know it I recommend checking it out).  My family has had it for a while, and played it occasionally, but within the past week we have been getting into it a bit more, occasioned by my 8-year-old requesting to be taught how to play.  I played a game with him, and he and my older son have both played games with my wife.  I re-read the <span
class="link external"><a
href="https://hanabi.github.io/">introductory conventions from the H-group</a></span>, and my older son and I tried playing an online game using some of those conventions. Hopefully soon we can play some larger games with more of us all together (2-player games are a bit odd).</p></section><section
class="block hide-metadata"
id="id--5b1897-2c-203629-29"><header><h2>Piano corner</h2></header><p
xmlns:html="http://www.w3.org/1999/xhtml">I continued working on <span
class="link external"><a
href="https://en.wikipedia.org/wiki/Waltzes_(Chopin)">Chopin's waltzes</a></span>, spending the majority of my time learning <span
class="link local"><a
href="/~yorgey/forest/00H6">Number 8 in A♭ major</a></span> this week.  It still needs a bit more polishing, but it's largely done.  I also continued polishing a few others, notably No. 12 in F minor/A♭ major.</p><p
xmlns:html="http://www.w3.org/1999/xhtml">In putting together these weeknotes, I've also realized that what exactly counts as a Chopin waltz is somewhat up for debate! There are some pieces that have been attributed to him but probably aren't authentic; some pieces that are definitely by Chopin but may or may not count as a waltz; some authentic waltzes that we know existed but whose manuscripts have been lost; and some authentic waltzes that were published after his death that he may or may not have wanted to be published.  The Dover edition I have contains 17 waltzes (of which I currently know 14).  After consulting <span
class="link external"><a
href="https://en.wikipedia.org/wiki/Waltzes_(Chopin)">the Wikipedia page</a></span>, it seems like there are two more that I want to include in my project: both posthumous waltzes in A minor, the first published in 1955 and the second discovered two years ago at the Morgan Library (which I already learned shortly after it was discovered).</p><p
xmlns:html="http://www.w3.org/1999/xhtml">I really ought to start creating pages in this forest for pieces in my repertoire...</p><p
xmlns:html="http://www.w3.org/1999/xhtml">Only a week and a half left until we leave for our yearly month-long pilgrimage to Maine, where I do not have access to a piano.  I was really hoping to finish learning all the waltzes before we leave, but it's looking unlikely that I will have time (I still have approximately four more of them to learn).  Oh well, I can finish the project when we get back.</p></section></div></content></entry><entry><title>Weeknotes for 12 June 2026 (week 23)</title><published>2026-06-12T00:00:00Z</published><updated>2026-06-12T00:00:00Z</updated><author><name>Brent A. Yorgey</name><uri>http://ozark.hendrix.edu/~yorgey/forest/brentyorgey/</uri></author><link
rel="alternate"
type="text/html"
href="http://ozark.hendrix.edu/~yorgey/forest/2026-W23/" /><id>http://ozark.hendrix.edu/~yorgey/forest/2026-W23/</id><content
type="xhtml"><div
xmlns="http://www.w3.org/1999/xhtml"><section
class="block hide-metadata"
id="id--5b157-2c-20688-29"><header><h2>Family</h2></header><p
xmlns:html="http://www.w3.org/1999/xhtml">We enjoyed time with visiting family this week. On Thursday, I hiked up <span
class="link external"><a
href="https://en.wikipedia.org/wiki/Pinnacle_Mountain_(Arkansas)">Pinnacle Mountain</a></span> with my sister-in law and 6 of our kids (2 of mine and 4 of hers).  It's a strenuous hike (about 220 meters elevation gain over a 1.8km trail) with a lot of fun scrambling over rocks that pays off with a lovely view at the top.</p>
  
  <img
xmlns:html="http://www.w3.org/1999/xhtml"
src="/~yorgey/forest/bafkyrzaciako2efsvsd6nj5v662ha2iojba5omskqmfcsmezat57w5ytpiv7taaylaz76ppzoirk273lplege4prfzswh7ceozn7rbnb6kfmi3eu.jpg"
loading="lazy" />


  
  <img
xmlns:html="http://www.w3.org/1999/xhtml"
src="/~yorgey/forest/bafkyrzacic72qtem53ht46gdpfysa45o6rscgbsnmtz42s3ycceoblgi57f6fm5s3fkpbo5ioterf7i47pwkpf23ji6azfh7rmksdo63rszzxhpx.jpg"
loading="lazy" />


  
  <img
xmlns:html="http://www.w3.org/1999/xhtml"
src="/~yorgey/forest/bafkyrzaciavdhp6zxqi734kcc57g2vlfeganq6ifcypnkaz7rgf6uu7jhtqhv7iuqbkjzzpvoikefa4ay6roq4tclzod7vqrx2d4yciq4gfsesf3.jpg"
loading="lazy" />


  
  <img
xmlns:html="http://www.w3.org/1999/xhtml"
src="/~yorgey/forest/bafkyrzacidwgqinkk4lgdjcza57cb5fcmrmad7nnt5njzj562msw5bbm6ifvedaoa4mmq5kvkfqtltm54yw54nmzsaz4yawtx7ifp3kcns4uumqq.jpg"
loading="lazy" />

</section><section
class="block hide-metadata"
id="id--5b691-2c-201183-29"><header><h2>Blog post on FTA proof in Agda</h2></header><p
xmlns:html="http://www.w3.org/1999/xhtml">I worked a bunch more on this <span
class="link local"><a
href="/~yorgey/forest/00H4">blog post/tutorial I mentioned last week</a></span>.  I'm very close to completing a first pass through the entire proof: cleaning up, reorganizing, and writing prose to explain everything.  Next week I'll make a second pass through editing and polishing; then I'll go through and create a version with holes for people to download and play along.  The plan is to have it published in the next week or two.</p></section><section
class="block hide-metadata"
id="id--5b1186-2c-203556-29"><header><h2>Swarm type + requirements system</h2></header><p
xmlns:html="http://www.w3.org/1999/xhtml">One of the most interesting things about <span
class="link local"><a
href="/~yorgey/forest/000O">Swarm</a></span> is the core mechanic where you must obtain and craft devices that allow you to unlock programming language features.  So we have to be sure robots are able to run their code.  We can (and do) use dynamic runtime checks, but it would be very annoying and tedious if this were the only safeguard.  When you build a robot to run a program, you don't want to manually install all the required devices (there could be dozens, if you are using many language features); you also don't want robots to get halfway through running their programs only to crash because they are missing some required device.  So there is a <em>requirements analysis</em> which figures out what capabilities a program requires, and which devices could provide them; when building a robot, those devices are automatically installed (or, if you do not possess the necessary devices, the build fails).  However, this requirements analysis is an ad-hoc step bolted on after typechecking. At the time I wrote it, I didn't really understand what I was doing.</p><p
xmlns:html="http://www.w3.org/1999/xhtml">Over the years, however, this ad-hoc bolted-on requirements analysis has led to <span
class="link external"><a
href="https://github.com/swarm-game/swarm/issues/231">all sorts of bugs</a></span>.  I've come to realize that the requirements for a program should really be <em>part of its type</em>, with requirements analysis integrated into the type system, similar to other existing work on type-and-effect style systems.  The twist is the distinction between required <em>capabilities</em> and required <em>inventory</em>; the <span
class="katex-math"
data-display="inline"
data-tex="\mathsf {build}">\mathsf {build}</span> command turns the former into the latter, since in order to execute <span
class="katex-math"
data-display="inline"
data-tex="\mathsf {build}">\mathsf {build}</span> you must have the correct devices in your inventory in order to equip them on the newly constructed robot.</p><p
xmlns:html="http://www.w3.org/1999/xhtml">I've spent some time this week working on a formal <span
class="link local"><a
href="/~yorgey/forest/000U">writeup</a></span> of a system that I think will fit the bill. The interesting part is that we really need requirements polymorphism, which means that instead of just keeping track of sets of requirements, we need to keep track of <span
class="link external"><a
href="https://mathstodon.xyz/@byorgey/116738220877346860">expressions involving requirement variables</a></span>, and then solve equations over these expressions after generating them during type inference.  I am hopeful that this will work out nicely, but there are always unforeseen wrinkles.</p></section><section
class="block hide-metadata"
id="id--5b3559-2c-203920-29"><header><h2>Piano corner</h2></header><p
xmlns:html="http://www.w3.org/1999/xhtml">I have <span
class="link external"><a
href="https://en.wikipedia.org/wiki/Waltzes_(Chopin)">Chopin's waltzes</a></span> polished up through number 7.  Number 4 in F major is one I've never played before, but it's a lot of fun; most of my time this week has been spent learning it.  Number 8 is another one I've never played, so next week I will be learning that one.</p></section></div></content></entry><entry><title>Weeknotes for 5 June 2026 (week 22)</title><published>2026-06-06T00:00:00Z</published><updated>2026-06-06T00:00:00Z</updated><author><name>Brent A. Yorgey</name><uri>http://ozark.hendrix.edu/~yorgey/forest/brentyorgey/</uri></author><link
rel="alternate"
type="text/html"
href="http://ozark.hendrix.edu/~yorgey/forest/2026-W22/" /><id>http://ozark.hendrix.edu/~yorgey/forest/2026-W22/</id><content
type="xhtml"><div
xmlns="http://www.w3.org/1999/xhtml"><p
xmlns:html="http://www.w3.org/1999/xhtml">This week has <em>finally</em> felt like the start of summer!</p><section
class="block hide-metadata"
id="id--5b222-2c-20868-29"><header><h2>Concluding the Visiting Assistant Professor search!</h2></header><p
xmlns:html="http://www.w3.org/1999/xhtml">On Monday of this week, we brought a candidate for an on-campus interview for our 1-year visiting position in mathematics.  We made them an offer on Wednesday, and by Friday they had officially accepted!  I'm looking forward to have a new colleague joining us for next year, and also very glad that the search is over—being the chair of a search committee was a lot of work!</p><p
xmlns:html="http://www.w3.org/1999/xhtml">Even though it's official and thus presumably public information, out of an abundance of caution I won't yet mention who it is; I'll probably mention them at some point in the future.</p></section><section
class="block hide-metadata"
id="id--5b871-2c-203414-29"><header><h2>Personal creative retreat</h2></header><p
xmlns:html="http://www.w3.org/1999/xhtml">From Tuesday evening to Thursday morning of this week, I took a
  personal creative retreat. I stayed at an AirBnB out in the country
  about 20 minutes away from my house, in a one-room bungalow located
  on the grounds of a ranch/event/wedding venue.  It was spacious and
  quiet, with plenty of natural light but a lot of big old shade
  trees, so it stayed cool without having to run the A/C unit.  Pretty
  much perfect for working and thinking deeply, and the timing could
  not have been more perfect—right after finally wrapping up our search.</p>
  
  <img
xmlns:html="http://www.w3.org/1999/xhtml"
src="/~yorgey/forest/bafkyrzacidfdb3oazylii4yhmobwhwfnwk35nrakbdkexghvmwg3hlgfaprp3xo2z35anfm5mpcz4edhs7eeyfgnzt2bdcob2ti2gm5ydes2tedj.jpg"
loading="lazy" />

<p
xmlns:html="http://www.w3.org/1999/xhtml">Over the course of my 36-hour stay I got plenty of sleep, ate
some good food, read part of Martha Wells' <em>Queen Demon</em>, and also
did about 11 hours worth of focused, deep work, on three main projects.</p><section
class="block hide-metadata"
id="id-http-3a-2f-2fozark-2ehendrix-2eedu-2f-7eyorgey-2fforest-2f00H5-2f"><header><h3>Embedding diagrams in Forester</h3></header><p
xmlns:html="http://www.w3.org/1999/xhtml">I would really like to be able to use <span
class="link local"><a
href="/~yorgey/forest/000S">Diagrams</a></span> from within
Forester, so I spent a bit of time working on a
<code>diagrams-forester</code> preprocessor tool.  The idea is that it will look for special sentinel blocks that look like
<pre>\diagram{w}{h}{\verb&lt;&lt;&lt;|
  ...
&lt;&lt;&lt;}</pre>
Then it would run the diagrams code in the <code>...</code>, and replace the entire <code>diagram</code> block with an image link.  <code>diagram</code> would also be defined to produce some kind of dummy placeholder, so the code would be valid Forester code both before and after the preprocessor runs.
</p><p
xmlns:html="http://www.w3.org/1999/xhtml">I don't want to spend a lot of time on this, but it's definitely worth spending a few hours on this summer, so I wanted to get it off the ground.  So far it can identify and parse the <code>diagram</code> blocks; I still need to hook it up to the <span
class="link external"><a
href="https://hackage.haskell.org/package/diagrams-builder"><code>diagrams-builder</code> package</a></span> and deal with things like input and output directories and so on.</p></section><section
class="block hide-metadata"
id="id--5b1747-2c-203391-29"><header><h3>Fixing Swarm code metrics to work with imports</h3></header><p
xmlns:html="http://www.w3.org/1999/xhtml">When you complete a <span
class="link local"><a
href="/~yorgey/forest/000O">Swarm</a></span> scenario, in addition to recording your time (both wall-clock and in-game time), it can also record the <em>size</em> of your code, both in terms of the number of characters and the size of the AST, and it records your best (smallest) scores.  This makes it easy to play code golf (competing with yourself, or with others).</p><p
xmlns:html="http://www.w3.org/1999/xhtml">However, when I added <code>import</code> to the language, I completely forgot about this mechanism, and a user recently reported that the game was not counting imports toward the code size, making it possible to game the system by shoving all your code into an import.  Whoops!</p><p
xmlns:html="http://www.w3.org/1999/xhtml">Fixing this was conceptually straightforward, but nontrivial from an engineering point of view.  First, I decided that I didn't want to do a DFS through the import graph every time we want to measure code size—we already do a DFS through the import graph when loading modules in the first place, so why not just cache some relevant information at that point?  So, I added a field to each module record to store a cached set of *all* its transitive dependencies.  Making sure that field was filled in properly involved a number of interesting bugs that I won't go into—including an infuiriating one where a test got the correct result, and then later got an incorrect result when rerunning the exact same test! (it had to do with, you guessed it, caching)—but I <span
class="link external"><a
href="https://github.com/swarm-game/swarm/pull/2738">finally got everything working</a></span> with an elegant framework for easily adding more code metrics in the future.</p></section><section
class="block hide-metadata"
id="id-http-3a-2f-2fozark-2ehendrix-2eedu-2f-7eyorgey-2fforest-2f00H4-2f"><header><h3>Blog post on proof of Fundamental Theorem of Arithmetic in Agda</h3></header><p
xmlns:html="http://www.w3.org/1999/xhtml">A couple months ago I reported that I had, just for fun, completed a completely-from-scratch proof of the Fundamental Theorem of Arithmetic in Agda, and I've decided to turn it into a blog post/tutorial.  It's not an Agda tutorial—I'm assuming the reader already knows the basics of Agda and the Curry-Howard correspondence—but I'm not assuming much beyond that.  There's lots of introductory material out there, but I feel like it might be helpful to have a fully explained medium-size proof, for people who have learned the basics and played around with proof assistants, but would find it helpful to see a more fully worked example.  Along with the blog post I plan to publish a version with holes, so someone wanting to learn could try to fill in the holes while reading along with the explanations.</p><p
xmlns:html="http://www.w3.org/1999/xhtml">I spent a bunch of time (about 5 hours) working on the writeup.  A lot of fun stuff in there, including well-founded induction. I would say it's about... 2/3 finished.  At 11K words so far, it is not going to be short!</p></section></section><section
class="block hide-metadata"
id="id--5b3417-2c-203894-29"><header><h2>Piano corner</h2></header><p
xmlns:html="http://www.w3.org/1999/xhtml">For some reason this week I dug out my old copies of <span
class="link external"><a
href="https://en.wikipedia.org/wiki/The_Virtuoso_Pianist_in_60_Exercises">Hanon</a></span> and Czerny's "School of Velocity".  Kinda boring but a good way to spend 10 minutes warming up.</p><p
xmlns:html="http://www.w3.org/1999/xhtml">I've continued working through all of Chopin's waltzes—I've played many of them before, but they're somewhat rusty, so I'm systematically going through and polishing them up.  So far I'm up to number 4.</p></section></div></content></entry><entry><title>Weeknotes for 29 May 2026 (week 21)</title><published>2026-05-29T00:00:00Z</published><updated>2026-05-29T00:00:00Z</updated><author><name>Brent A. Yorgey</name><uri>http://ozark.hendrix.edu/~yorgey/forest/brentyorgey/</uri></author><link
rel="alternate"
type="text/html"
href="http://ozark.hendrix.edu/~yorgey/forest/2026-W21/" /><id>http://ozark.hendrix.edu/~yorgey/forest/2026-W21/</id><content
type="xhtml"><div
xmlns="http://www.w3.org/1999/xhtml"><p
xmlns:html="http://www.w3.org/1999/xhtml">This week I spent a lot of time helping friends move, fixing Swarm bugs, and working on our search for a 1-year visiting professor.  There's never as much time during the summer to work on big projects as I think there will be, or would like there to be!   But I'm excited to be participating in a "Community of Practice" with other faculty around the book <em>Stolen Focus</em> by Johann Hari.  I'm also excited to take a quiet creative retreat this coming Tuesday-Thursday—I've booked an AirBnB at a place in the country about 20 minutes away for a couple nights!  Expect a full report in next week's weeknotes.</p><section
class="block hide-metadata"
id="id--5b776-2c-202727-29"><header><h2>Swarm</h2></header><section
class="block hide-metadata"
id="id--5b805-2c-201433-29"><header><h3>Fixing transitive import bug</h3></header><p
xmlns:html="http://www.w3.org/1999/xhtml">I fixed the <span
class="link external"><a
href="https://github.com/swarm-game/swarm/issues/2725">import bug</a></span> from last week.  Doing two passes was the right general idea, but I didn't have the details right.  My son actually helped me figure out the right way to do it: first do a DFS through the module cache, evicting everything that is outdated or depends on something outdated.  After that, the actual loading code does not need to change!  Any module which depends on something that has changed will have been evicted from the cache, so we are forced to reload and recheck it.  Simple and robust.</p></section><section
class="block hide-metadata"
id="id--5b1438-2c-202725-29"><header><h3>Exponential import blowup</h3></header><p
xmlns:html="http://www.w3.org/1999/xhtml"><span
class="link local"><a
href="/~yorgey/forest/ondrejweis">Ondřej Weis</a></span> tried testing the import system and, to my simultaneous shame and joy, easily made it completely fall over.  Shame because I worked really hard on that code and thought it was really clean, elegant, and well-thought out.  Joy, because it's wonderful to have someone point out flaws so they can get fixed.</p><p
xmlns:html="http://www.w3.org/1999/xhtml">In particular, if you created a linear chain of modules <span
class="katex-math"
data-display="inline"
data-tex="A \to  B \to  C \to  D \to  \dots ">A \to  B \to  C \to  D \to  \dots </span> where each imports the next, the amount of time it took to load them from disk was <em>exponential</em> in the number of modules!  This completely flummoxed me—I was looking for places where a recursive function accidentally called itself twice on the same AST, or something like that.  But once again Ondřej came to the rescue and figured out that it was because of the way we dynamically built up a stack of unresolved effects as we recursed (every level gets its own new, local, <code>Accum</code> effect to record the imports for each module).  Apparently <code>fused-effects</code>, the effects library we use, does not deal with this situation well at all (though I still don't understand how it leads to <em>exponential</em> time complexity)!  In any case, Ondřej fixed it by handling the accumulation effect explicitly.</p></section></section><section
class="block hide-metadata"
id="id--5b2730-2c-203146-29"><header><h2>Math search</h2></header><p
xmlns:html="http://www.w3.org/1999/xhtml">This week was a lot of "hurry up and wait" as I waited through the holiday weekend for people to be able to work on scheduling a candidate visit, then waiting to hear back from various people we needed to schedule a meeting with, waiting to hear back from some students we would like them to meet with...  We finally have the in-person interview all scheduled for this Monday!</p></section></div></content></entry><entry><title>Weeknotes for 22 May 2026 (week 20)</title><published>2026-05-23T00:00:00Z</published><updated>2026-05-23T00:00:00Z</updated><author><name>Brent A. Yorgey</name><uri>http://ozark.hendrix.edu/~yorgey/forest/brentyorgey/</uri></author><link
rel="alternate"
type="text/html"
href="http://ozark.hendrix.edu/~yorgey/forest/2026-W20/" /><id>http://ozark.hendrix.edu/~yorgey/forest/2026-W20/</id><content
type="xhtml"><div
xmlns="http://www.w3.org/1999/xhtml"><p
xmlns:html="http://www.w3.org/1999/xhtml">This week was indeed much better than <span
class="link local"><a
href="/~yorgey/forest/2026-W19">last week</a></span>!  There was still a good deal of administrative work, but I actually had time to work on some projects.</p><section
class="block hide-metadata"
id="id--5b328-2c-201070-29"><header><h2>Deriving an efficient conjugate function for integer partitions</h2></header><p
xmlns:html="http://www.w3.org/1999/xhtml">I finally had more time to work on <span
class="link local"><a
href="/~yorgey/forest/00GN">deriving an efficient integer partition conjugation function</a></span>.  My optimism of two weeks ago was unfounded—I worked on it a good deal this week but haven't cracked it yet.  But I feel like I have made some good progress, and it's been fun refreshing my memory on stuff from <span
class="link external"><a
href="https://www.librarything.com/work/195696/t/The-Algebra-of-Programming">The Algebra of Programming</a></span> and <span
class="link external"><a
href="https://www.cambridge.org/core/books/algorithm-design-with-haskell/824BE0319E3762CE8BA5B1D91EEA3F52">Algorithm Design with Haskell</a></span>.  If anyone would be interested in collaborating on this, I'd be happy to jump in a video call.</p></section><section
class="block hide-metadata"
id="id--5b1073-2c-202029-29"><header><h2>Open-source maintenance</h2></header><p
xmlns:html="http://www.w3.org/1999/xhtml">The <span
class="link external"><a
href="https://hackage.haskell.org/package/diagrams-solve">diagrams-solve</a></span> and <span
class="link external"><a
href="https://hackage.haskell.org/package/diagrams-lib">diagrams-lib</a></span> packages are full of uses of partial functions such as <code>head</code> and <code>tail</code>, having been written before <span
class="link external"><a
href="https://hackage-content.haskell.org/package/base-4.22.0.0/docs/Data-List-NonEmpty.html">Data.List.NonEmpty</a></span> really existed.  But they generate tons of warnings, and I finally decided to bite the bullet and eliminate the use of partial functions as much as possible.  This has involved some tricky analyses of which lists can be statically known to be nonempty, especially in <em>e.g.</em> list-heavy code used to compute <span
class="link external"><a
href="https://hackage-content.haskell.org/package/diagrams-lib-1.5.1/docs/Diagrams-TwoD-Segment-Bernstein.html">operations on Bernstein polynomials</a></span>, but I made some very good progress this week and the conversion is almost complete.</p></section><section
class="block hide-metadata"
id="id--5b2032-2c-203956-29"><header><h2>Swarm</h2></header><section
class="block hide-metadata"
id="id--5b2061-2c-202752-29"><header><h3>Immutable arrays</h3></header><p
xmlns:html="http://www.w3.org/1999/xhtml">I have finally finished my <span
class="link external"><a
href="https://github.com/swarm-game/swarm/pull/2701/">pull request adding immutable arrays to the language</a></span>!</p><p
xmlns:html="http://www.w3.org/1999/xhtml">In the end I was able to come up with a scenario that requires the use of arrays to solve in a reasonable amount of time, but only needs immutable arrays constructed with an <code>unfold</code> operation: you first "read" a random permutation from a row of letters laid out on the ground, then iterate the permutation a certain number of times and lay the letters back down in the resulting order.  If anyone can think of an efficient way to solve this without the use of an array, I'd love to hear about it!</p></section><section
class="block hide-metadata"
id="id--5b2757-2c-203954-29"><header><h3>New contributors, and import bugs</h3></header><p
xmlns:html="http://www.w3.org/1999/xhtml">Swarm has had several new contributors pop up this week, which is fun. <span
class="link local"><a
href="/~yorgey/forest/tom-scheper">Tom Scheper</a></span> found a <span
class="link external"><a
href="https://github.com/swarm-game/swarm/issues/2725">bug which is rather obvious in retrospect</a></span>—when encountering a module import, we only check the file itself for changes, but not any of its transitive imports.  But this means that if <code>A</code> imports <code>B</code>, and you modify <code>B</code> then re-import <code>A</code>, you will not actually pick up the changes to <code>B</code> unless you touch <code>A</code> as well.  Fixing this is a bit finicky.  We can't just transitively check all imports every time, since we would end up re-checking the same modules repeatedly.  Instead, I think the right idea is to do two passes when processing some top-level source code: first, transitively check its imports looking for any in the module cache that are outdated, and flag them for a reload.  Then, do a second pass where we actually recursively load and check all the modules that need to be loaded, either because they have not been loaded yet or because they are flagged.  I started working on the fix for this a couple days ago and hope to finish soon.</p></section></section><section
class="block hide-metadata"
id="id--5b3959-2c-204589-29"><header><h2>Math search</h2></header><p
xmlns:html="http://www.w3.org/1999/xhtml">As I briefly mentioned in some previous weeknotes, my department is hiring a Visiting Assistant Professor of Mathematics for next year (kind of at the last minute), and we did a bunch of work on our search this week.  We held virtual interviews with several candidates on Wednesday and Thursday afternoons; the committee then met Friday and decided on one to invite for an on-campus interview; the rest of my afternoon consisted of writing a formal request to the provost and setting up phone conversations with some references.  I'm hopeful we can wrap up the search in the next few weeks.</p></section><section
class="block hide-metadata"
id="id--5b4592-2c-205034-29"><header><h2>Piano corner</h2></header><p
xmlns:html="http://www.w3.org/1999/xhtml">This week I pulled out my book of Chopin waltzes and have enjoyed playing through and refreshing them. It turns out there are actually only a few left that I don't know, and they all seem lovely.  I think I might make a side quest for the summer to learn them all; this week I learned No. 13 in D flat major.  Next week I'm going to make an intentional plan for what I want to work on over the summer.</p></section></div></content></entry><entry><title>Weeknotes for 15 May 2026 (week 19)</title><published>2026-05-16T00:00:00Z</published><updated>2026-05-16T00:00:00Z</updated><author><name>Brent A. Yorgey</name><uri>http://ozark.hendrix.edu/~yorgey/forest/brentyorgey/</uri></author><link
rel="alternate"
type="text/html"
href="http://ozark.hendrix.edu/~yorgey/forest/2026-W19/" /><id>http://ozark.hendrix.edu/~yorgey/forest/2026-W19/</id><content
type="xhtml"><div
xmlns="http://www.w3.org/1999/xhtml"><section
class="block hide-metadata"
id="id--5b159-2c-201585-29"><header><h2>Still still wrapping up the semester...</h2></header><p
xmlns:html="http://www.w3.org/1999/xhtml">This week was even worse than last week: students turning in last-minute assignments at the start of the week, submitting final course grades, dealing with lots of academic integrity (aka cheating) cases (I am the chair of my college's academic integrity committee), conducting a last-minute search for a one-year visiting position (I'm the chair of my department and hence the <em>de facto</em> chair of the search committee), participating in a half-day workshop for a new first-year course I will be teaching in the fall... and on top of all that, my church has hired a new pastor who will be arriving soon, and there has been a lot of work getting ready for his arrival and organizing his ordination service.  Basically, I find myself in several leadership positions, all of which required more work than usual over the past few weeks in particular!  I definitely didn't have time to write the blog post I promised last week. Fortunately, in all cases there is light at the end of the tunnel: academic integrity stuff is finished; the search is proceeding well after the initial flurry of reading lots of applications; and almost everything is arranged for our new pastor's arrival.  I always hesitate to say "next week will be better", because I am frequently wrong.  But I really do think next week I will be able to start easing into some summer projects.</p></section></div></content></entry><entry><title>Weeknotes for 8 May 2026 (week 18)</title><published>2026-05-10T00:00:00Z</published><updated>2026-05-10T00:00:00Z</updated><author><name>Brent A. Yorgey</name><uri>http://ozark.hendrix.edu/~yorgey/forest/brentyorgey/</uri></author><link
rel="alternate"
type="text/html"
href="http://ozark.hendrix.edu/~yorgey/forest/2026-W18/" /><id>http://ozark.hendrix.edu/~yorgey/forest/2026-W18/</id><content
type="xhtml"><div
xmlns="http://www.w3.org/1999/xhtml"><section
class="block hide-metadata"
id="id--5b158-2c-20684-29"><header><h2>Still wrapping up the semester...</h2></header><p
xmlns:html="http://www.w3.org/1999/xhtml">Last week I wrote "There is still plenty of work to do... but the pace will be much more relaxed."  I always forget that this is completely false.  Last week was <em>not</em> more relaxed, it was a zoo.  I can only assume this coming week will be the same (in particular, my department is trying to hire a 1-year visitor at the last minute, and I am the chair of the department and hence the chair of the hiring committee); but there is light at the end of the tunnel.</p></section><section
class="block hide-metadata"
id="id--5b687-2c-202047-29"><header><h2>Pride goeth before the fall</h2></header><p
xmlns:html="http://www.w3.org/1999/xhtml">In last week's piano corner, I said "Through an unlikely series of events, it looks like I may have an opportunity to acquire a free... piano".  I am extremely ashamed to have to write this, but it turns out to have been a scam. (The "piano" was free, but of course the shipping was not...)  Fortunately, I did not end up giving the scammers any money—but only very narrowly.  I actually got as far as attempting to send them money via Venmo, but Venmo stopped the payment because it suspected a scam. This, coupled with a friend's skepticism, finally got me to dig more deeply and uncover incontrovertible proof that the whole thing was a scam all along.</p><p
xmlns:html="http://www.w3.org/1999/xhtml">This has been a very humbling and sobering experience.  I like to think of myself as sophisticated, educated, intelligent—just as, I assume, many of us do—and therefore immune to scams or misinformation.  But that seems to have actually made it worse.  I wanted so badly for it to be true that I used my sophisticated, educated intelligence to spin all sorts of justifications for why it was not actually a scam despite the (many!) red flags.</p><p
xmlns:html="http://www.w3.org/1999/xhtml">In the end, I am really thankful that I only lost some pride, not money, and I hope that this experience will help me be more careful and less trusting of my own judgment in the future.</p></section><section
class="block hide-metadata"
id="id-http-3a-2f-2fozark-2ehendrix-2eedu-2f-7eyorgey-2fforest-2f00GN-2f"><header><h2>Deriving an efficient partition conjugation function</h2></header><p
xmlns:html="http://www.w3.org/1999/xhtml">On Saturday I was solving a <span
class="link external"><a
href="https://open.kattis.com/problems/keppni">Kattis problem</a></span> for which I realized that I needed some Haskell code to efficiently compute the <em>conjugate</em> of an <span
class="link external"><a
href="https://en.wikipedia.org/wiki/Integer_partition">integer partition</a></span>.  That is, if we think of a partition as a <span
class="link external"><a
href="https://en.wikipedia.org/wiki/Integer_partition#Ferrers_diagram">Ferrers diagram</a></span>, the conjugate is the partition we get by flipping the diagram along the main diagonal.</p><p
xmlns:html="http://www.w3.org/1999/xhtml">I managed to write an efficient implementation, and solve the Kattis problem, simply by thinking hard; but it made me wonder whether one could <em>derive</em> an efficient implementation starting from an obviously-correct yet inefficient specification (via the <span
class="link external"><a
href="https://en.wikipedia.org/wiki/Bird%E2%80%93Meertens_formalism">Bird-Meertens formalism</a></span>, <em>aka</em> Squiggol).  I spent a very pleasant Sunday afternoon trying to work this out and <span
class="link external"><a
href="https://mathstodon.xyz/@byorgey/116546141253551553">discussing it on Mastodon</a></span>.  I think I'm quite close to having a completely formal derivation; I hope to turn it all into a proper blog post next week.</p></section></div></content></entry><entry><title>Weeknotes for 1 May 2026 (week 17)</title><published>2026-05-03T00:00:00Z</published><updated>2026-05-03T00:00:00Z</updated><author><name>Brent A. Yorgey</name><uri>http://ozark.hendrix.edu/~yorgey/forest/brentyorgey/</uri></author><link
rel="alternate"
type="text/html"
href="http://ozark.hendrix.edu/~yorgey/forest/2026-W17/" /><id>http://ozark.hendrix.edu/~yorgey/forest/2026-W17/</id><content
type="xhtml"><div
xmlns="http://www.w3.org/1999/xhtml"><section
class="block hide-metadata"
id="id--5b158-2c-20541-29"><header><h2>Wrapping up the semester</h2></header><p
xmlns:html="http://www.w3.org/1999/xhtml">Friday, May 1 was the last day of classes for the semester.  There is still plenty of work to do over the next two weeks (final exams / final project presentations, grading, dealing with cases of academic misconduct, <em>etc.</em>) but the pace will be much more relaxed. I'm looking forward to slowly ramping up some summer projects.</p></section><section
class="block hide-metadata"
id="id--5b544-2c-201627-29"><header><h2>Thoughts on Forester for lecture notes</h2></header><p
xmlns:html="http://www.w3.org/1999/xhtml">Using Forester to write up <span
class="link local"><a
href="/~yorgey/forest/0021">lecture notes for my Discrete Mathematics course</a></span> has been a resounding success. Writing them in this medium forced me to think much more carefully about how things are organized and presented, which in many cases led me to make substantive changes for the better, despite having taught this course many times before.  I think the students also found it helpful to have the notes available in an easily searchable and hyperlinked format.  One of the things I want to do over the next few weeks is to go through the notes to clean some things up, add more hyperlinks, and add some extended/optional material in cases where I didn't have time during the semester, possibly put together a simple preprocessor that will allow me to embed <span
class="link local"><a
href="/~yorgey/forest/000S">Diagrams</a></span> code—but overall I think the notes are in really great shape.  I definitely plan to do something similar for other courses in the future.  Next up will be my <span
class="link external"><a
href="https://hendrix-cs.github.io/csci382/">Algorithms</a></span> course in the fall, I think.</p></section><section
class="block hide-metadata"
id="id--5b1630-2c-202862-29"><header><h2>"To my students"</h2></header><p
xmlns:html="http://www.w3.org/1999/xhtml">On Monday, I published a piece I had been working on for a while, unimaginatively titled <span
class="link local"><a
href="/~yorgey/forest/00FD">To my students</a></span>. This year in particular, it felt increasingly disingenuous to say nothing about the current political and technological climate—but I am not good at speaking extemporaneously about such weighty topics, so I decided to write something instead. When it was finished, I emailed a link to my students, and posted a link on Mastodon.  I was not expecting the magnitude of the response.</p><p
xmlns:html="http://www.w3.org/1999/xhtml">I heard from many current students who were appreciative, and had interesting conversations with several of them.  My piece apparently got posted to a much wider student community via social media.  My Mastodon post got much more traction than my posts usually do (though 120 boosts hardly counts as "going viral").  It was also posted to Hacker News, and I made the mistake of reading some of the comments. I heard from a few random strangers for whom the piece resonated particularly strongly. I also heard from someone who was my student when I taught high school math 20 years ago.</p><p
xmlns:html="http://www.w3.org/1999/xhtml">With the exception of the Hacker News comments, overall the experience was very positive and encouraging.</p></section><section
class="block hide-metadata"
id="id--5b2866-2c-204174-29"><header><h2>Mutable and immutable arrays and CESK machines</h2></header><p
xmlns:html="http://www.w3.org/1999/xhtml">I have continued working on immutable arrays in Swarm, but have been stymied by the complexity of implementing a <span
class="link local"><a
href="/~yorgey/forest/00GM">fully general introduction form</a></span> via a CESK machine. Trying to implement it from scratch was breaking my brain, so I tried implementing it in pure Haskell, then doing a manual CPS transformation followed by manual defunctionalization, to try to more mechanically derive the required CESK implementation, but even that was breaking my brain.</p><p
xmlns:html="http://www.w3.org/1999/xhtml">I finally realized this morning that perhaps I have been thinking about this all wrong.  I started out implementing only <em>immutable</em> arrays because I thought it would be <em>simpler</em>—and I figured I would introduce mutable arrays later.  But the need for such complicated introduction forms could be circumvented entirely with mutable arrays. That is, I think I will stick with a simple yet impoverished introduction form for immutable arrays for now (<code>unfoldArray : b -&gt; (b -&gt; (Unit + a*b)) -&gt; Array a</code>), and then later introduce mutable arrays along with a copying <code>freezeArray : MArray a -&gt; Array a</code>.  Although thinking about general introduction forms for immutable arrays has been interesting, I think this will be a lot simpler and more robust.</p></section><section
class="block hide-metadata"
id="id--5b4177-2c-205332-29"><header><h2>Piano corner</h2></header><p
xmlns:html="http://www.w3.org/1999/xhtml">I've continued working on the Chopin 1st concerto.  I'm close to being able to play the entire first movement—only the coda still needs significant work.  Over the summer I want to continue working on the concerto while also being more systematic about practicing other things in my repertoire and possibly learning some other, shorter, new pieces as well.</p><p
xmlns:html="http://www.w3.org/1999/xhtml">Through an unlikely series of events, it looks like I may have an opportunity to acquire a free (!!) 2002 <span
class="link external"><a
href="https://www.alamomusic.com/blogs/whats-new/the-studio-standard-yamaha-c7-grand-piano-review-and-demo">Yamaha C7 grand piano</a></span> for my church.  This is one of the absolute best pianos on the market, and typically costs something like $20k-30k used; a brand-new Yamaha C7X, the successor model, costs about $90k. Getting one for free still seems too good to be true, but I am warily optimistic.  I will certainly write about it (with pictures) if it does indeed come together!  In that case I will almost certainly be spending more time at my church just to play it... I love my Yamaha T118 upright, but it can't compare with a 7'6" Yamaha grand.</p></section></div></content></entry><entry><title>Weeknotes for 24 April 2026 (week 16)</title><published>2026-04-25T00:00:00Z</published><updated>2026-04-25T00:00:00Z</updated><author><name>Brent A. Yorgey</name><uri>http://ozark.hendrix.edu/~yorgey/forest/brentyorgey/</uri></author><link
rel="alternate"
type="text/html"
href="http://ozark.hendrix.edu/~yorgey/forest/2026-W16/" /><id>http://ozark.hendrix.edu/~yorgey/forest/2026-W16/</id><content
type="xhtml"><div
xmlns="http://www.w3.org/1999/xhtml"><p
xmlns:html="http://www.w3.org/1999/xhtml">Not much of interest to report this week—a lot of my time has been spent on various administrative responsibilities, as both the chair of my department and the chair of the Committee on Academic Integrity. Next week is the last week of classes, so over the next few weeks I should start to have more time to work on interesting projects.</p><p
xmlns:html="http://www.w3.org/1999/xhtml">I did complete my <span
class="link local"><a
href="/~yorgey/forest/00FY">Agda proof of the Fundamental Theorem of Arithmetic</a></span>, and I'd like to turn it into a blog post.  I fancy there might be an audience of people who know the basics of Agda but would benefit from seeing a slightly larger development with lots of careful explanation.</p></div></content></entry><entry><title>Weeknotes for 17 April 2026 (week 15)</title><published>2026-04-18T00:00:00Z</published><updated>2026-04-18T00:00:00Z</updated><author><name>Brent A. Yorgey</name><uri>http://ozark.hendrix.edu/~yorgey/forest/brentyorgey/</uri></author><link
rel="alternate"
type="text/html"
href="http://ozark.hendrix.edu/~yorgey/forest/2026-W15/" /><id>http://ozark.hendrix.edu/~yorgey/forest/2026-W15/</id><content
type="xhtml"><div
xmlns="http://www.w3.org/1999/xhtml"><section
class="block hide-metadata"
id="id-http-3a-2f-2fozark-2ehendrix-2eedu-2f-7eyorgey-2fforest-2f00FY-2f"><header><h2>Agda proof of the Fundamental Theorem of Arithmetic</h2></header><p
xmlns:html="http://www.w3.org/1999/xhtml">On Monday, I was idly brainstorming potential final projects for my <span
class="link external"><a
href="https://hendrix-cs.github.io/csci365/">Functional Programming</a></span> students.  Having just <span
class="link local"><a
href="/~yorgey/forest/00EG">taught my Discrete Math students the Fundamental Theorem of Arithmetic</a></span>, I wondered whether formalizing it in Agda could make a nice project.  (I mean formalizing it <em>from scratch</em>: of course, the FTA must already in the Agda standard library.)  Then I... kind of fell down the rabbit hole.  Several hours and 560 lines of Agda later, I'm very close: all I have left is to <span
class="link local"><a
href="/~yorgey/forest/00DL">prove that the result of the division algorithm is unique</a></span> (which is actually kinda tricky).  Well... actually, I've only formalized half of the FTA so far, namely, the part that says any number can be factored into a product of primes.  I haven't yet attempted to formalize the claim that the resulting factorization is unique up to permutation.  We'll see if I decide to add that.</p><p
xmlns:html="http://www.w3.org/1999/xhtml">In any case, this has been a fun and pleasant exercise, requiring a bunch of facts about addition, multiplication, and inequality; well-founded induction; encoding loops from a start value up to an end value; and various other things.  I've been doing everything completely from scratch/memory, without peeking at any Agda stdlib code. Once I finish it I might clean it up and turn it into a blog post.</p><p
xmlns:html="http://www.w3.org/1999/xhtml">Formalizing the proof has led me to rethink a few of the wys I present things in Discrete Math.  For example, I had been defining a number <span
class="katex-math"
data-display="inline"
data-tex="p">p</span> to be prime if "all divisors of <span
class="katex-math"
data-display="inline"
data-tex="p">p</span> are trivial", that is, formally, <span
class="katex-math"
data-display="block"
data-tex="\mathrm {Prime}(p) \equiv  \forall  {d}: {\mathbb {N}}.\;{(d \mid  p) \to  (d = 1 \lor  d = p)}.">\mathrm {Prime}(p) \equiv  \forall  {d}: {\mathbb {N}}.\;{(d \mid  p) \to  (d = 1 \lor  d = p)}.</span>  But now I actually think it is better to define it as "<span
class="katex-math"
data-display="inline"
data-tex="p">p</span> has no nontrivial divisors", that is, <span
class="katex-math"
data-display="block"
data-tex="\mathrm {Prime}(p) \equiv  \forall  {d}: {(1 &lt; d &lt; n) \to  (d \nmid  p)}.\;.">\mathrm {Prime}(p) \equiv  \forall  {d}: {(1 &lt; d &lt; n) \to  (d \nmid  p)}.\;.</span>  Since primality is decidable, these are constructively equivalent, but... I like the second definition better now, for reasons I can't quite put my finger on.
  </p></section></div></content></entry><entry><title>Weeknotes for 10 April 2026 (week 14)</title><published>2026-04-12T00:00:00Z</published><updated>2026-04-12T00:00:00Z</updated><author><name>Brent A. Yorgey</name><uri>http://ozark.hendrix.edu/~yorgey/forest/brentyorgey/</uri></author><link
rel="alternate"
type="text/html"
href="http://ozark.hendrix.edu/~yorgey/forest/2026-W14/" /><id>http://ozark.hendrix.edu/~yorgey/forest/2026-W14/</id><content
type="xhtml"><div
xmlns="http://www.w3.org/1999/xhtml"><p
xmlns:html="http://www.w3.org/1999/xhtml">Not much to report this week... came down with a nasty cold Monday night and have spent the rest of the week doing not much beyond the bare minimum.</p><section
class="block hide-metadata"
id="id--5b315-2c-202025-29"><header><h2>Equivalence relations which are the kernel of a (nice) function</h2></header><p
xmlns:html="http://www.w3.org/1999/xhtml">I did continue to teach my classes (while masked up) and had a
  nice epiphany while <span
class="link local"><a
href="/~yorgey/forest/00DR">teaching about modular equivalence</a></span>: I used to
  present separate detailed proofs showing that the modular
  equivalence relation is reflexive, symmetric, and transitive... but
  I realized that we can first prove the alternative characterization
  <span
class="katex-math"
data-display="inline"
data-tex="(a \equiv _m b) \leftrightarrow  (a \mathbin {\mathbf {mod}} m = b \mathbin {\mathbf {mod}} m)">(a \equiv _m b) \leftrightarrow  (a \mathbin {\mathbf {mod}} m = b \mathbin {\mathbf {mod}} m)</span>, and then it
  automatically inherits all the properties of an equivalence relation
  from equality!  Any time we have a relation <span
class="katex-math"
data-display="inline"
data-tex="R">R</span> such that <span
class="katex-math"
data-display="inline"
data-tex="(x \mathbin {R} y)
  \leftrightarrow  (f(x) = f(y))">(x \mathbin {R} y)
  \leftrightarrow  (f(x) = f(y))</span> for some function <span
class="katex-math"
data-display="inline"
data-tex="f">f</span>, the relation <span
class="katex-math"
data-display="inline"
data-tex="R">R</span> is
  automatically an equivalence, and if the equality is decidable we also get
  a nice way to decide our relation.  This situation comes up
  all the time in computing (convert strings to lowercase in order to
  decide case-insensitive equality; sort lists in order to compare up
  to permutation; and so on).</p><p
xmlns:html="http://www.w3.org/1999/xhtml">I <span
class="link external"><a
href="https://mathstodon.xyz/@byorgey/116388560162882132">posted about this on Mastodon, which led to a nice discussion</a></span>. It turns out that given a function <span
class="katex-math"
data-display="inline"
data-tex="f : A \to  B">f : A \to  B</span>, the equivalence relation on <span
class="katex-math"
data-display="inline"
data-tex="A">A</span> induced by <span
class="katex-math"
data-display="inline"
data-tex="f">f</span> (putting each fiber in its own equivalence class) is called the <em>kernel</em> of <span
class="katex-math"
data-display="inline"
data-tex="f">f</span>.  Previously, I only knew that term in the sense of the set of elements sent to zero by a group or ring homomorphism, but I guess it's related: in the case of a group or ring homomorphism, there's enough structure to allow us to recover the entire kernel relation on the domain from just the set of elements related to zero, so we might as well use the same term "kernel" for both.</p></section></div></content></entry><entry><title>Weeknotes for 3 April 2026 (week 13)</title><published>2026-04-04T00:00:00Z</published><updated>2026-04-04T00:00:00Z</updated><author><name>Brent A. Yorgey</name><uri>http://ozark.hendrix.edu/~yorgey/forest/brentyorgey/</uri></author><link
rel="alternate"
type="text/html"
href="http://ozark.hendrix.edu/~yorgey/forest/2026-W13/" /><id>http://ozark.hendrix.edu/~yorgey/forest/2026-W13/</id><content
type="xhtml"><div
xmlns="http://www.w3.org/1999/xhtml"><section
class="block hide-metadata"
id="id-http-3a-2f-2fozark-2ehendrix-2eedu-2f-7eyorgey-2fforest-2f00GM-2f"><header><h2>Introduction forms for immutable arrays</h2></header><p
xmlns:html="http://www.w3.org/1999/xhtml">After mentioning it in last week's weeknotes, I <span
class="link external"><a
href="https://mathstodon.xyz/@monoidmusician@tech.lgbt/116309751306965503">got some great feedback</a></span> from <span
class="link external"><a
href="https://mathstodon.xyz/@monoidmusician@tech.lgbt">Verity</a></span> on an introduction form for immutable arrays.  (Again, the biggest constraint here is that we don't want to use lists: Swarm <em>does</em> have lists, but not built-in in a primitive way.  Using lists requires you to first unlock algebraic data types as well as recursive types, and you should be able to unlock and use arrays independently.)</p><p
xmlns:html="http://www.w3.org/1999/xhtml">After a bit of back and forth, the current best idea is
<pre>(Int -&gt; a) -&gt; b -&gt; (b -&gt; Unit + Int * (a -&gt; (a * b))) -&gt; Array a</pre>
  <ul><li>The first argument specifies the starting value at any index.</li>
    <li>The second argument is a seed value for the unfold.</li>
    <li>I like to think of the third argument as a protocol for communication between the array constructor and the user, specifying the process for a sort of imperative unfold.
      <ul><li>The array constructor begins by announcing the current seed value of type <code>b</code>.</li>
        <li>The user gets to choose whether to stop, or to continue by specifying an index.</li>
        <li>The array constructor provides the value of type <code>a</code> currently at that index.</li>
        <li>The user then gets to provide a new value of type <code>a</code>, and a new seed.</li></ul></li></ul>
  This is trickier to implement than what I had before (<em>e.g.</em> it requires several new types of CESK machine continuation frames instead of just one, and in practice, we want to wait until we see which indices are requested before deciding on the final size of the array and filling in any missing values), but ultimately should be fine.  I need to finish up the implementation and play around with it: implement some other simpler introduction forms in terms of it, and try using it for things that were inefficient before.
  </p></section><section
class="block hide-metadata"
id="id--5b153-2c-20973-29"><header><h2>Draft blog post on zero/empty set/void type/monoids etc.</h2></header><p
xmlns:html="http://www.w3.org/1999/xhtml">Inspired by <span
class="link external"><a
href="https://mathstodon.xyz/@cxandru@types.pl/116261508892427847">a conversation on Mastodon</a></span>, I've <span
class="link local"><a
href="/~yorgey/forest/00CI">started drafting a blog post</a></span> on the connections between things like <span
class="katex-math"
data-display="inline"
data-tex="\forall ">\forall </span> with an empty domain, functions out of empty types, sum/product/and/or of an empty list, <em>etc.</em>.  None of this will be at all surprising to experienced Haskell programmers or type theorists, but I hope it may be interesting for some who are just learning.</p><p
xmlns:html="http://www.w3.org/1999/xhtml">As these things always happen, when I started expanding my outline into prose, I found that the very first bullet point in the outline expanded into enough material for an entire blog post.  So it may just be very long, or I may split it up into multiple posts... we'll see!</p></section><section
class="block hide-metadata"
id="id--5b976-2c-202834-29"><header><h2>Teaching induction</h2></header><p
xmlns:html="http://www.w3.org/1999/xhtml">I had a lot of fun this week teaching my <span
class="link local"><a
href="/~yorgey/forest/0020">Discrete Math</a></span> students about <span
class="link local"><a
href="/~yorgey/forest/00CA">induction principles for natural numbers</a></span>.</p><p
xmlns:html="http://www.w3.org/1999/xhtml">On Wednesday I went over a strong induction principle.  When I teach them, I usually state it like
   <span
class="katex-math"
data-display="block"
data-tex="P(0) \land  (\forall  k. (\forall  j \leq  k. P(j)) \to  P(k+1)) \to  \forall  n. P(n)">P(0) \land  (\forall  k. (\forall  j \leq  k. P(j)) \to  P(k+1)) \to  \forall  n. P(n)</span>
  I find a formulation without an explicit base case more elegant, but I don't think I am brave enough to teach it this way:
  <span
class="katex-math"
data-display="block"
data-tex="(\forall  k. (\forall  j &lt; k. P(j)) \to  P(k)) \to  \forall  n. P(n)">(\forall  k. (\forall  j &lt; k. P(j)) \to  P(k)) \to  \forall  n. P(n)</span>
  I think they would be completely confused by the apparent lack of a base case.  Of course, the base case is still there, in the sense that you have to at the very least prove <span
class="katex-math"
data-display="inline"
data-tex="P(0)">P(0)</span> with no assumptions, since <span
class="katex-math"
data-display="inline"
data-tex="\forall  j &lt; 0. P(j)">\forall  j &lt; 0. P(j)</span> is trivial.  But you would essentially have to almost always start by doing a case split on whether <span
class="katex-math"
data-display="inline"
data-tex="n">n</span> is 0 anyway, so I feel like I might as well present it in a form with <span
class="katex-math"
data-display="inline"
data-tex="P(0)">P(0)</span> already split out separately.  But I would be interested to hear about how others teach this.  Of course, in some sense it doesn't matter since the two principles are logically equivalent, but I think it matters in a pedagogical sense.</p><p
xmlns:html="http://www.w3.org/1999/xhtml">As the <span
class="link local"><a
href="/~yorgey/forest/00CX">crowning example</a></span>, I proved that every natural number can be written as a sum of distinct powers of two... and then showed them that our induction proof is actually a recursive program for calculating the binary expansion of any natural number, by coding it in Disco:
<pre>binary : N -&gt; Set(N)
binary(0) = {}
binary(2k) = {e+1 | e in binary(k)}
binary(2k+1) = {0} union {e+1 | e in binary(k)}</pre>
I definitely enjoyed seeing several of them get head-exploding expressions on their faces when they realized the correspondence between invoking the induction hypothesis and making a recursive function call.
</p></section><section
class="block hide-metadata"
id="id--5b2837-2c-203704-29"><header><h2>A polynomial testing principle</h2></header><p
xmlns:html="http://www.w3.org/1999/xhtml">I've had Conor McBride's paper <span
class="link external"><a
href="https://personal.cis.strath.ac.uk/conor.mcbride/PolyTest.pdf">A polynomial testing principle</a></span> on my reading list for a while, and this week I finally got around to reading through it carefully, typing up all the Agda code myself and trying to fill in as much of it as I could before peeking.  I now have some much better ideas about how to encode things nicely in Agda. The topic of the paper was also really fun: I was definitely familiar with the idea that two degree-<span
class="katex-math"
data-display="inline"
data-tex="n">n</span> polynomials must be equal if they agree at <span
class="katex-math"
data-display="inline"
data-tex="n+1">n+1</span> points, but I would not have guessed that this can be proved in a few hundred lines of Agda.  I also enjoyed how it hinged on the forward difference and summation operators, old friends of mine from reading Concrete Mathematics when I was in undergrad.</p></section><section
class="block hide-metadata"
id="id--5b3707-2c-204354-29"><header><h2>Piano corner</h2></header><p
xmlns:html="http://www.w3.org/1999/xhtml">For the past few weeks I have been working on Chopin's 1st piano concerto. This is not the first time I've worked on it, but I haven't in a while.  I have long dreamed of performing it someday.  I always figured this was essentially a pipe dream, but after recently seeing <span
class="link external"><a
href="https://www.youtube.com/watch?v=2bFo65szAP0">a video of Olga Scheps playing it with a small chamber orchestra</a></span>, I have a bit more hope that it might be possible! I didn't even realize there was an arrangement for chamber orchestra.  Of course there are arrangements for two pianos as well, though that idea doesn't excite me as much.</p></section></div></content></entry><entry><title>Weeknotes for 27 March 2026 (week 12)</title><published>2026-03-27T00:00:00Z</published><updated>2026-03-27T00:00:00Z</updated><author><name>Brent A. Yorgey</name><uri>http://ozark.hendrix.edu/~yorgey/forest/brentyorgey/</uri></author><link
rel="alternate"
type="text/html"
href="http://ozark.hendrix.edu/~yorgey/forest/2026-W12/" /><id>http://ozark.hendrix.edu/~yorgey/forest/2026-W12/</id><content
type="xhtml"><div
xmlns="http://www.w3.org/1999/xhtml"><p
xmlns:html="http://www.w3.org/1999/xhtml">Weeknotes, Spring Break edition! (For non-US readers: Spring Break is (typically) one week off from classes, approximately in the middle of the spring semester.)  This has been a relaxing and productive week with no classes to teach.</p><section
class="block hide-metadata"
id="id--5b374-2c-203674-29"><header><h2>Immutable arrays in Swarm</h2></header><section
class="block hide-metadata"
id="id--5b423-2c-202520-29"><header><h3>Challenge scenarios requring arrays</h3></header><p
xmlns:html="http://www.w3.org/1999/xhtml">Continuing my work on <span
class="link external"><a
href="https://github.com/swarm-game/swarm/issues/98">immutable arrays in Swarm</a></span>, this week I was playing around with creating some challenge scenarios that require the use of arrays. This is actually somewhat tricky, since you can always simulate arrays with functions—it's just less efficient.  So the general idea is to construct scenarios with a time limit, where you need the efficiency of an array to be able to get a solution that is fast enough. But even this is tricky!</p><p
xmlns:html="http://www.w3.org/1999/xhtml">My first attempt just involved a row of randomly generated capital letters that you are supposed to sort alphabetically.  I thought you could read them all into an array and pick them up at the same time, sort the array, then lay them out in sorted order.  However, I realized that you can just pick them all up, then iterate through the capital letters one at a time in order, and place any that you happen to have of each.</p><p
xmlns:html="http://www.w3.org/1999/xhtml">I constructed another scenario that I thought would work: there is a "key" row of randomly permuted capital letters, and another row of randomly generated capital letters.  You must sort the second row, but in the order specified by the permutation in the first row.  However, I realized there's a clever way to accomplish this in <span
class="katex-math"
data-display="inline"
data-tex="O(n)">O(n)</span> time without using an array: (1) pick up all the items to be sorted; (2) scan through the key permutation, going one recursive call deeper with each item, so the recursion stack ends up storing the entire sequence; (3) unwind the recursion stack while walking along the destination row in reverse; for each item of the permutation, place all the copies of it you have in your inventory.</p><p
xmlns:html="http://www.w3.org/1999/xhtml">Having written this, I think I should go back to my original idea, but use randomly generated strings instead of individual capital letters.  That way, the range of possible values is huge, so there's no way to simply iterate through them in order and place any that you happen to have.  (Currently, there's no way to iterate through items in your inventory...)</p></section><section
class="block hide-metadata"
id="id--5b2525-2c-203672-29"><header><h3>Minimal API for immutable arrays</h3></header><p
xmlns:html="http://www.w3.org/1999/xhtml">It's also been interesting to think about a good minimal API for immutable arrays.  Elimination forms are easy: we just need <code>index : Array a -&gt; Int -&gt; a</code> and <code>size : Array a -&gt; Int</code>.  But what about introduction forms? At this point I've implemented <code>unfold : b -&gt; (b -&gt; Unit + (a * b)) -&gt; Array a</code> (as well as an effectful variant), but I'm starting to think that's not good enough: it assumes that you can generate the array elements in order, all at once.  Instead, I think we really want something like:
<pre>accum : a -&gt; (a -&gt; a -&gt; a) -&gt; b -&gt; (b -&gt; Unit + (Int * a * b)) -&gt; Array a</pre>
  which unfolds (index, value) pairs starting from a seed value, starting with the default value and using the combining function for multiple values at the same index.  In Haskell you would write this as <code>Monoid a =&gt; [(Int, a)] -&gt; Array a</code> but Swarm has no type classes and we don't want arrays to depend on lists, so we encode the monoid constraint via the first two arguments, and encode the list via an unfold.
  </p><p
xmlns:html="http://www.w3.org/1999/xhtml">Is there a simpler way to do this?</p></section></section><section
class="block hide-metadata"
id="id--5b3677-2c-203998-29"><header><h2>Applicative inference</h2></header><p
xmlns:html="http://www.w3.org/1999/xhtml">I had a nice meeting with <span
class="link local"><a
href="/~yorgey/forest/andrey-mokhov">Andrey Mokhov</a></span> to see if we might collaborate on my <span
class="link local"><a
href="/~yorgey/forest/000P">Applicative inference</a></span> research project.  Not sure yet where it will go, but neither of us is under any particular pressure to publish, so I'm content to just let it play out at whatever pace makes sense.</p></section><section
class="block hide-metadata"
id="id--5b4001-2c-204748-29"><header><h2>Exhaustiveness checking for arithmetic patterns in Disco</h2></header><p
xmlns:html="http://www.w3.org/1999/xhtml">I continued working on <span
class="link local"><a
href="/~yorgey/forest/00CG">this project from a couple weeks ago</a></span>.  I made some progress with typechecking and desugaring of arithmetic patterns.  All that's left is to actually plug them into the exhaustiveness checker itself, and make it call out to the semilinear set solver appropriately... but after staring at it for a while, I realized I have no idea how the exhaustiveness checker works!  I suspect some refactoring will be needed, since there doesn't seem to be an obvious place to just stick in some extra code for arithmetic patterns.  Thankfully, the student who wrote it is still around; I hope we can meet about it soon and figure it out together.</p></section><section
class="block hide-metadata"
id="id--5b4751-2c-206345-29"><header><h2>Kattis</h2></header><p
xmlns:html="http://www.w3.org/1999/xhtml">I had fun this week solving a few <span
class="link external"><a
href="https://open.kattis.com/">Kattis</a></span> problems in Haskell.  One particularly interesting problem was <span
class="link external"><a
href="https://open.kattis.com/problems/metrolines">Metro Lines</a></span>: there is a line of stops numbered <span
class="katex-math"
data-display="inline"
data-tex="0">0</span> to <span
class="katex-math"
data-display="inline"
data-tex="N">N</span>, and we are given a bunch (up to <span
class="katex-math"
data-display="inline"
data-tex="2 \times  10^5">2 \times  10^5</span>) of subway lines, each of which has a cost <span
class="katex-math"
data-display="inline"
data-tex="c">c</span> and visits all the stops between <span
class="katex-math"
data-display="inline"
data-tex="l">l</span> and <span
class="katex-math"
data-display="inline"
data-tex="r">r</span> inclusive.  You can get on and off of any line anywhere you want; it costs <span
class="katex-math"
data-display="inline"
data-tex="c \cdot  |x-y|">c \cdot  |x-y|</span> to ride from <span
class="katex-math"
data-display="inline"
data-tex="x">x</span> to <span
class="katex-math"
data-display="inline"
data-tex="y">y</span>, where <span
class="katex-math"
data-display="inline"
data-tex="c">c</span> is the cost of the line.  We're supposed to print out the cheapest fare to get from station <span
class="katex-math"
data-display="inline"
data-tex="0">0</span> to each station from <span
class="katex-math"
data-display="inline"
data-tex="1">1</span> through <span
class="katex-math"
data-display="inline"
data-tex="N">N</span>.</p><p
xmlns:html="http://www.w3.org/1999/xhtml">Try solving it yourself, or click to expand my solution sketch below!</p><section
class="block hide-metadata"
id="id--5b5549-2c-206343-29"><header><h3>Solution sketch for <span
class="link external"><a
href="https://open.kattis.com/problems/metrolines">Metro Lines</a></span> (spoiler)</h3></header><p
xmlns:html="http://www.w3.org/1999/xhtml">The solution is to sort all the line endpoints, then scan through from left to right, keeping track of a set of active lines, sorted by cost (I just used a <code>Set</code> of <span
class="katex-math"
data-display="inline"
data-tex="(\mathit {cost}, \mathit {line ID})">(\mathit {cost}, \mathit {line ID})</span> pairs).  For each segment <span
class="katex-math"
data-display="inline"
data-tex="(k,k+1)">(k,k+1)</span>, we then know the cost <span
class="katex-math"
data-display="inline"
data-tex="c">c</span> of the cheapest line which operates on that segment. The key insight is that since we can get on and off whenever we want, we can independently choose the cheapest line for each one-unit segment; since the cost is linear in the length of the ride, we can just independently add up the cost <span
class="katex-math"
data-display="inline"
data-tex="c">c</span> of each one-unit segment to get the total cost.</p></section></section></div></content></entry><entry><title>Weeknotes for 20 March 2026 (week 11)</title><published>2026-03-20T00:00:00Z</published><updated>2026-03-20T00:00:00Z</updated><author><name>Brent A. Yorgey</name><uri>http://ozark.hendrix.edu/~yorgey/forest/brentyorgey/</uri></author><link
rel="alternate"
type="text/html"
href="http://ozark.hendrix.edu/~yorgey/forest/2026-W11/" /><id>http://ozark.hendrix.edu/~yorgey/forest/2026-W11/</id><content
type="xhtml"><div
xmlns="http://www.w3.org/1999/xhtml"><p
xmlns:html="http://www.w3.org/1999/xhtml">Really didn't have time to do much of anything this week besides grading, course prep, meeting with students in office hours, and administrative tasks as the chair of my department.  The only interesting things I did were to work a bit more on <span
class="link external"><a
href="https://github.com/swarm-game/swarm/issues/98">immutable arrays in Swarm</a></span>, and record an interview for the <span
class="link external"><a
href="https://haskell.foundation/podcast/">Haskell Interlude</a></span> with <span
class="link local"><a
href="/~yorgey/forest/sam-frohlich">Sam Frohlich</a></span> and <span
class="link local"><a
href="/~yorgey/forest/farhad-mehta">Farhad Mehta</a></span>, which was fun.</p></div></content></entry><entry><title>Weeknotes for 13 March 2026 (week 10)</title><published>2026-03-13T00:00:00Z</published><updated>2026-03-13T00:00:00Z</updated><author><name>Brent A. Yorgey</name><uri>http://ozark.hendrix.edu/~yorgey/forest/brentyorgey/</uri></author><link
rel="alternate"
type="text/html"
href="http://ozark.hendrix.edu/~yorgey/forest/2026-W10/" /><id>http://ozark.hendrix.edu/~yorgey/forest/2026-W10/</id><content
type="xhtml"><div
xmlns="http://www.w3.org/1999/xhtml"><section
class="block hide-metadata"
id="id--5b135-2c-20621-29"><header><h2>AI vegetarian</h2></header><p
xmlns:html="http://www.w3.org/1999/xhtml">I've been thinking for a while about publishing an official statement regarding my stance on LLMs (and other generative AI systems), but it always felt too daunting to express what I wanted to express.  But I recently found several things other people had written that captured my position pretty well, so I <span
class="link local"><a
href="/~yorgey/forest/009L">finally published a statement</a></span>.  I still want to write something for my students in particular, but I'm still thinking about that.</p></section><section
class="block hide-metadata"
id="id--5b624-2c-201894-29"><header><h2>Blog post series on constructive logic</h2></header><p
xmlns:html="http://www.w3.org/1999/xhtml">Following last week's discussion on <span
class="link local"><a
href="/~yorgey/forest/00BM">Theorems with both constructive and non-constructive proofs</a></span>, I realized that there is something of a gap in the pedagogical materials available on constructive logic, and the difference between classical and constructive logic. There are many hand-wavy, intuitive explanations of constructive vs non-constructive proofs in, say, slide decks used for teaching undergraduate Discrete Math courses.  There is also lots of advanced material, such as Andrej Bauer's paper <span
class="link external"><a
href="https://math.andrej.com/2016/10/10/five-stages-of-accepting-constructive-mathematics/">Five Stages of Accepting Constructive Mathematics</a></span>, the <span
class="link external"><a
href="https://homotopytypetheory.org/book/">HoTT book</a></span>, and others.  However, there does not seem to be much intermediate-level material.  So I plan to write a series of blog posts aimed at people who are familiar with typed functional programming, and perhaps have even heard of the Curry-Howard correspondence, and perhaps have even played with a theorem prover such as Agda or Lean, but who don't know the actual formal details of classical vs constructive logic.</p><p
xmlns:html="http://www.w3.org/1999/xhtml">Earlier this week I started drafting some ideas on paper; I hope this week or next to find some time to start writing it up more formally.</p></section><section
class="block hide-metadata"
id="id-http-3a-2f-2fozark-2ehendrix-2eedu-2f-7eyorgey-2fforest-2f00CG-2f"><header><h2>Disco: exhaustiveness checking for arithmetic patterns</h2></header><p
xmlns:html="http://www.w3.org/1999/xhtml">A couple summers ago, my student <span
class="link local"><a
href="/~yorgey/forest/colin-phillips">Colin Phillips</a></span> implemented exhaustiveness checking for <span
class="link local"><a
href="/~yorgey/forest/000N">Disco</a></span>, following <span
class="link external"><a
href="https://al.radbox.org/doi/10.1145/3408989">Lower your guards: a compositional pattern-match coverage checker</a></span> by Graf, Peyton Jones, and Scott.  So it can now do things like
<pre>Disco&gt; f : Unit + (Bool * Nat) -&gt; Int
Disco&gt; f(right(False, n)) = 3
Warning: the function f is undefined for some inputs. For example:
f(left(■)) = ...
f(right(true, 0)) = ...
f(right(true, 1)) = ...</pre>
  However, Disco also has <em>arithmetic patterns</em>, like
<pre>f : N -&gt; N
f(2n) = n + 1
f(2n+1) = 3</pre>
but doing coverage checking for these is tricky in general. Quick, for what values (if any) is the below (partial) function undefined?
<pre>f : N -&gt; N
f(3n) = 0
f(1+5n) = 1
f(2n+2) = 2
f(n+12) = 3</pre>
My student <span
class="link local"><a
href="/~yorgey/forest/katherine-reid">Katherine Reid</a></span> was working on a library for solving this problem, via the theory of <span
class="link external"><a
href="https://en.wikipedia.org/wiki/Generalized_arithmetic_progression#Semilinear_sets">semilinear sets</a></span>, but we never quite finished incorporating it into the Disco coverage checker.  Since I'm using Disco to teach again this semester, I've started working on this again.  This week, I mostly just spent some time understanding the existing code and writing down a list of the reamining tasks.  I'm optimistic I can get it polished up and merged before the end of the semester.
  </p><p
xmlns:html="http://www.w3.org/1999/xhtml">(<em>Answer: the function is undefined for <span
class="katex-math"
data-display="inline"
data-tex="5">5</span> and <span
class="katex-math"
data-display="inline"
data-tex="7">7</span>.</em>)</p></section><section
class="block hide-metadata"
id="id--5b1916-2c-202195-29"><header><h2>Swarm export and arrays</h2></header><p
xmlns:html="http://www.w3.org/1999/xhtml">Finally, over in <span
class="link local"><a
href="/~yorgey/forest/000O">Swarm</a></span> land, I've continued polishing up <span
class="link local"><a
href="/~yorgey/forest/00BN">Swarm module export</a></span>.  I've also started working on adding an <span
class="link external"><a
href="https://github.com/swarm-game/swarm/issues/98">immutable array type</a></span> to the language—not difficult, but enjoyable.</p></section></div></content></entry><entry><title>Weeknotes for 6 March 2026 (week 9)</title><published>2026-03-06T00:00:00Z</published><updated>2026-03-06T00:00:00Z</updated><author><name>Brent A. Yorgey</name><uri>http://ozark.hendrix.edu/~yorgey/forest/brentyorgey/</uri></author><link
rel="alternate"
type="text/html"
href="http://ozark.hendrix.edu/~yorgey/forest/2026-W09/" /><id>http://ozark.hendrix.edu/~yorgey/forest/2026-W09/</id><content
type="xhtml"><div
xmlns="http://www.w3.org/1999/xhtml"><section
class="block hide-metadata"
id="id-http-3a-2f-2fozark-2ehendrix-2eedu-2f-7eyorgey-2fforest-2f00BN-2f"><header><h2>Swarm module export</h2></header><p
xmlns:html="http://www.w3.org/1999/xhtml">Earlier this week I was hacking on <span
class="link external"><a
href="https://github.com/swarm-game/swarm">Swarm</a></span>, adding an <code>export</code> construct that allows you to re-export either individual names or entire modules from a given module.  I thought this was going to be easy, but I couldn't figure out how to make it work.  I finally realized that I had been Doing It Wrong™: after typechecking, I was doing a second pass over the type-annotated syntax tree for a module to collect up the names and types of things that should be exported.  But with <code>export</code> in the mix, there was no longer enough information to figure this out just by looking at the syntax (even when fully type-annotated).  The correct (and obvious in retrospect) thing to do is to instead collect up exported names and their types <em>during</em> typechecking.</p></section><section
class="block hide-metadata"
id="id-http-3a-2f-2fozark-2ehendrix-2eedu-2f-7eyorgey-2fforest-2f00BM-2f"><header><h2>Theorems with both constructive and non-constructive proofs</h2></header><p
xmlns:html="http://www.w3.org/1999/xhtml">I've been working on writing up some advanced, optional notes for my Discrete Mathematics students (mostly second-year undergraduates) on classical vs constructive logic, and I wanted a good example of a theorem with both non-constructive and constructive proofs.</p><p
xmlns:html="http://www.w3.org/1999/xhtml">A typical example of a non-constructive proof is of the infinitude of primes: for any natural number <span
class="katex-math"
data-display="inline"
data-tex="n">n</span>, we consider the number <span
class="katex-math"
data-display="inline"
data-tex="n! + 1">n! + 1</span>: either it is prime, or it is divisible by one which must be larger than <span
class="katex-math"
data-display="inline"
data-tex="n">n</span>, since <span
class="katex-math"
data-display="inline"
data-tex="n! + 1">n! + 1</span> is clearly not divisible by anything <span
class="katex-math"
data-display="inline"
data-tex="\leq  n">\leq  n</span>.  This is supposedly nonconstructive since it uses LEM to conclude that <span
class="katex-math"
data-display="inline"
data-tex="n!+1">n!+1</span> is either prime or not, but this is totally unsatisfactory to me.  Since primality is decidable, this instance of LEM is actually constructively provable, and the whole proof immediately becomes an algorithm for computing a prime larger than any <span
class="katex-math"
data-display="inline"
data-tex="n">n</span>.</p><p
xmlns:html="http://www.w3.org/1999/xhtml">(Another typical "example" is the so-called proof by contradiction that <span
class="katex-math"
data-display="inline"
data-tex="\sqrt {2}">\sqrt {2}</span> is irrational; but of course, it is not a proof by contradiction at all.)</p><p
xmlns:html="http://www.w3.org/1999/xhtml">I <span
class="link external"><a
href="https://mathstodon.xyz/@byorgey/116161000975437554">asked for examples on Mastodon</a></span>, which led to a very interesting discussion.</p><ul
xmlns:html="http://www.w3.org/1999/xhtml"><li><span
class="link external"><a
href="https://mathstodon.xyz/@nemo@camp.crates.im/116161539623110695">Henrý Ólson suggested</a></span> the theorem "there exist irrational <span
class="katex-math"
data-display="inline"
data-tex="a">a</span> and <span
class="katex-math"
data-display="inline"
data-tex="b">b</span> such that <span
class="katex-math"
data-display="inline"
data-tex="a^b">a^b</span> is rational".
  <ul><li>The nonconstructive proof uses LEM: <span
class="katex-math"
data-display="inline"
data-tex="\sqrt {2}^{\sqrt {2}}">\sqrt {2}^{\sqrt {2}}</span> is either rational or not; if so, it satisfies the theorem, and if not, <span
class="katex-math"
data-display="inline"
data-tex="(\sqrt {2}^{\sqrt {2}})^{\sqrt {2}} = 2">(\sqrt {2}^{\sqrt {2}})^{\sqrt {2}} = 2</span> does.</li>
    <li>Constructively, we can show that <span
class="katex-math"
data-display="inline"
data-tex="\lg  9">\lg  9</span> is irrational and that <span
class="katex-math"
data-display="inline"
data-tex="(\sqrt  2)^{\lg  9} = 3">(\sqrt  2)^{\lg  9} = 3</span>.</li></ul>
  This is covered by Andrej Bauer in <span
class="link external"><a
href="https://math.andrej.com/2016/10/10/five-stages-of-accepting-constructive-mathematics/">Five Stages of Accepting Constructive Mathematics</a></span>, but I had forgotten it.  It's a pretty good example to show to undergraduates, since the proof with LEM is very clearly nonconstructive, and the whole thing (including proofs of irrationality for <span
class="katex-math"
data-display="inline"
data-tex="\sqrt {2}">\sqrt {2}</span> and <span
class="katex-math"
data-display="inline"
data-tex="\lg  9">\lg  9</span>) requires only some basic number theory.
  </li>

  <li>I came up with the theorem "For every natural <span
class="katex-math"
data-display="inline"
data-tex="n">n</span>, there exists <span
class="katex-math"
data-display="inline"
data-tex="m &gt; n">m &gt; n</span> which is not square".
  <ul><li>Both the nonconstructive and constructive proofs depend on the (constructively proved) lemma that if <span
class="katex-math"
data-display="inline"
data-tex="m">m</span> is square then <span
class="katex-math"
data-display="inline"
data-tex="m+1">m+1</span> is not.</li>
    <li>The nonconstructive proof proceeds by contradiction: suppose every <span
class="katex-math"
data-display="inline"
data-tex="m &gt; n">m &gt; n</span> is square.  Then in particular <span
class="katex-math"
data-display="inline"
data-tex="n+1">n+1</span> and <span
class="katex-math"
data-display="inline"
data-tex="n+2">n+2</span> are square, but the lemma immediately yields a contradiction.</li>
    <li>The constructive proof considers <span
class="katex-math"
data-display="inline"
data-tex="(n+1)^2+1">(n+1)^2+1</span>, which is immediately seen to be non-square by the lemma.</li></ul>
  Jim Kingdon <span
class="link external"><a
href="https://mathstodon.xyz/@soaproot@sfba.social/116163371993733542">protested</a></span>, not unreasonably, that the nonconstructive proof has a similar problem as the proof of infinitude of primes. Since the property of being square is decidable, one can turn the nonconstructive proof into a constructive one fairly easily: just decide whether <span
class="katex-math"
data-display="inline"
data-tex="n+1">n+1</span> is a square; if not, we have our non-square, and if so, the lemma tells us <span
class="katex-math"
data-display="inline"
data-tex="n+2">n+2</span> must be non-square.  This is true, but I still like this example a bit better than the infinitude of primes: that one directly uses an instance of LEM which is constructively provable, whereas this one uses a proof by contradiction.
  </li>

  <li>Jim Kingdon <span
class="link external"><a
href="https://mathstodon.xyz/@soaproot@sfba.social/116163239275063779">also gave another example</a></span>, <span
class="link external"><a
href="https://en.wikipedia.org/wiki/B%C3%A9zout's_identity">Bézout's identity</a></span>.  This seems like a nice example, and one that is accessible to undergraduates, but I'm still confused about it!
  <ul><li>The constructive proof is via the <span
class="link external"><a
href="https://en.wikipedia.org/wiki/Extended_Euclidean_algorithm">Extended Euclidean Algorithm</a></span>.</li>
    <li>The typical non-constructive proof considers the set <span
class="katex-math"
data-display="block"
data-tex="\{ax + by \mid  a, b \in  \Z , ax + by &gt; 0\}">\{ax + by \mid  a, b \in  \Z , ax + by &gt; 0\}</span> and notes that it must have a smallest element by the well-ordering property, then proceeds to prove that this smallest positive element is in fact the GCD of <span
class="katex-math"
data-display="inline"
data-tex="a">a</span> and <span
class="katex-math"
data-display="inline"
data-tex="b">b</span>.  Intuitively, this seems clearly non-constructive, since it does not actually help you compute the smallest element of the set.  But I am still a bit confused about where exactly a classical axiom ends up getting used.  The version of the well-ordering principle which says that <em>every</em> set has a well-order implies the Axiom of Choice; but we surely don't need such a big hammer here.  We are simply using the version that applies to subsets of natural numbers, which is constructively provable (in fact, it is logically equivalent to induction).  The answer seems to be that the <span
class="link external"><a
href="https://unimath.github.io/agda-unimath/elementary-number-theory.well-ordering-principle-natural-numbers.html">constructive well-ordering principle for the natural numbers requires membership of the set to be decidable</a></span>, and deciding whether there exist integers <span
class="katex-math"
data-display="inline"
data-tex="a">a</span> and <span
class="katex-math"
data-display="inline"
data-tex="b">b</span> such that <span
class="katex-math"
data-display="inline"
data-tex="ax + by = n">ax + by = n</span> for a particular <span
class="katex-math"
data-display="inline"
data-tex="n">n</span> is nontrivial.  If you just throw LEM at it, you get the nonconstructive proof.  Or if you work harder, you can actually decide this via the Extended Euclidean Algorithm.</li></ul></li></ul></section></div></content></entry><entry><title>Weeknotes for 27 February 2026 (week 8)</title><published>2026-02-27T00:00:00Z</published><updated>2026-02-27T00:00:00Z</updated><author><name>Brent A. Yorgey</name><uri>http://ozark.hendrix.edu/~yorgey/forest/brentyorgey/</uri></author><link
rel="alternate"
type="text/html"
href="http://ozark.hendrix.edu/~yorgey/forest/2026-W08/" /><id>http://ozark.hendrix.edu/~yorgey/forest/2026-W08/</id><content
type="xhtml"><div
xmlns="http://www.w3.org/1999/xhtml"><section
class="block hide-metadata"
id="id-http-3a-2f-2fozark-2ehendrix-2eedu-2f-7eyorgey-2fforest-2f0087-2f"><header><h2>Material set theory, universal sets, and pedagogy</h2></header><p
xmlns:html="http://www.w3.org/1999/xhtml">In my <span
class="link local"><a
href="/~yorgey/forest/0020">Discrete Mathematics course</a></span> I am currently teaching (traditional, material) set theory.  I've recently noticed several instances where we really "want" to have a universe of discourse, <em>i.e.</em> a global set <span
class="katex-math"
data-display="inline"
data-tex="U">U</span> of which which other sets under consideration are subsets.</p><ul
xmlns:html="http://www.w3.org/1999/xhtml"><li>Of course the notion of <em>set complement</em> doesn't make sense without a universe of discourse; complement with respect to what?</li>
  <li>I typically introduce set equality by defining <span
class="katex-math"
data-display="inline"
data-tex="A = B">A = B</span> to mean <span
class="katex-math"
data-display="inline"
data-tex="(A \subseteq  B) \land  (B \subseteq  A)">(A \subseteq  B) \land  (B \subseteq  A)</span>.  But sometimes we would really like to treat set equality extensionally, <em>i.e.</em> <span
class="katex-math"
data-display="block"
data-tex="(A = B) \leftrightarrow  (\forall  x. x \in  A \leftrightarrow  x \in  B).">(A = B) \leftrightarrow  (\forall  x. x \in  A \leftrightarrow  x \in  B).</span>  But what is the <span
class="katex-math"
data-display="inline"
data-tex="\forall ">\forall </span> quantifying over?  For this to make sense, we must posit that we are quantifying over some kind of universe.</li>
  <li>As for the subset relation itself, I typically define <span
class="katex-math"
data-display="inline"
data-tex="A \subseteq  B">A \subseteq  B</span> as <span
class="katex-math"
data-display="inline"
data-tex="\forall  x \in  A. x \in  B">\forall  x \in  A. x \in  B</span>, but perhaps it is nicer to define it as <span
class="katex-math"
data-display="block"
data-tex="\forall  x \in  U. (x \in  A) \to  (x \in  B).">\forall  x \in  U. (x \in  A) \to  (x \in  B).</span>  If we define it that way, the extensional and subset-both-ways definitions of set equality are simply related by the fact that <span
class="katex-math"
data-display="inline"
data-tex="\forall ">\forall </span> distributes over <span
class="katex-math"
data-display="inline"
data-tex="\land ">\land </span>:
  
  <div
style="margin-left: 30px"><span
class="katex-math"
data-display="inline"
data-tex="\forall  x: U. (x \in  A) \leftrightarrow  (x \in  B)">\forall  x: U. (x \in  A) \leftrightarrow  (x \in  B)</span></div>

  
  <span
class="katex-math"
data-display="inline"
data-tex="\equiv  \quad \quad \quad ">\equiv  \quad \quad \quad </span> { Definition of <span
class="katex-math"
data-display="inline"
data-tex="\leftrightarrow ">\leftrightarrow </span> }

  
  <div
style="margin-left: 30px"><span
class="katex-math"
data-display="inline"
data-tex="\forall  x: U. ((x \in  A) \rightarrow  (x \in  B)) \land  ((x \in  B) \rightarrow  (x \in  A))">\forall  x: U. ((x \in  A) \rightarrow  (x \in  B)) \land  ((x \in  B) \rightarrow  (x \in  A))</span></div>

  
  <span
class="katex-math"
data-display="inline"
data-tex="\equiv  \quad \quad \quad ">\equiv  \quad \quad \quad </span> { <span
class="katex-math"
data-display="inline"
data-tex="\forall ">\forall </span> distributes over <span
class="katex-math"
data-display="inline"
data-tex="\land ">\land </span> }

  
  <div
style="margin-left: 30px"><span
class="katex-math"
data-display="inline"
data-tex="(\forall  x: U. (x \in  A) \rightarrow  (x \in  B)) \land  (\forall  x: U. (x \in  B) \rightarrow  (x \in  A))">(\forall  x: U. (x \in  A) \rightarrow  (x \in  B)) \land  (\forall  x: U. (x \in  B) \rightarrow  (x \in  A))</span></div>

  
  <span
class="katex-math"
data-display="inline"
data-tex="\equiv  \quad \quad \quad ">\equiv  \quad \quad \quad </span> { Definition of <span
class="katex-math"
data-display="inline"
data-tex="\subseteq ">\subseteq </span> }

  
  <div
style="margin-left: 30px"><span
class="katex-math"
data-display="inline"
data-tex="(A \subseteq  B) \land  (B \subseteq  A)">(A \subseteq  B) \land  (B \subseteq  A)</span></div></li></ul><p
xmlns:html="http://www.w3.org/1999/xhtml">But saying "there always has to be a universal set <span
class="katex-math"
data-display="inline"
data-tex="U">U</span>" is kind of equivalent to saying that we want our sets to be <em>typed</em>: you can't just have "a set", you have to
say what universe the elements are going to be chosen from, <em>i.e.</em> the type of the elements.</p><p
xmlns:html="http://www.w3.org/1999/xhtml">What I would <em>really</em> like to do is start with some basic type theory, then later introduce sets as <span
class="katex-math"
data-display="inline"
data-tex="\mathrm {Set}(T) \equiv  T \to  2">\mathrm {Set}(T) \equiv  T \to  2</span>, and build up from there.  But that would be a big change.  It's too late for this semester, but maybe next year...</p></section><section
class="block hide-metadata"
id="id-http-3a-2f-2fozark-2ehendrix-2eedu-2f-7eyorgey-2fforest-2f0088-2f"><header><h2>Re-reading <em
xmlns:html="http://www.w3.org/1999/xhtml">The Goblin Emperor</em></h2></header><p
xmlns:html="http://www.w3.org/1999/xhtml">This week I've re-read Katherine Addison's <em>The Goblin Emperor</em> for the third time.  It's not the kind of thing I usually read; I usually can't stand a lot of politics (for example, I found Kim Stanley Robinson's Mars trilogy tiresome at times).  But there is something so wholesome and inspiring about a character who has a lot of power but works very hard to Do The Right Thing in the midst of a system rife with corruption and greed.</p><p
xmlns:html="http://www.w3.org/1999/xhtml">The week before, I read the third book in the spin-off <em>Chronicles of Osreth</em> trilogy, <em>The Tomb of Dragons</em>. I enjoy them for similar reasons to <em>The Goblin Emperor</em>, and I also enjoy the more mystery/detective slant.  I thought I had already read the first two books in the series, but it turns out that I only read the first—oops!  There were multiple references in the third book to things I didn't remember, which I initially chalked up to having read the second book too long ago, but it turns out it was because I actually haven't read it at all.  So I decided I will go back and re-read the first book (<em>Witness for the Dead</em>) before reading the second, but then I figured I might as well go all the way back and re-read <em>The Goblin Emperor</em> first.</p></section></div></content></entry><entry><title>Weeknotes for 20 February 2026 (week 7)</title><published>2026-02-21T00:00:00Z</published><updated>2026-02-21T00:00:00Z</updated><author><name>Brent A. Yorgey</name><uri>http://ozark.hendrix.edu/~yorgey/forest/brentyorgey/</uri></author><link
rel="alternate"
type="text/html"
href="http://ozark.hendrix.edu/~yorgey/forest/2026-W07/" /><id>http://ozark.hendrix.edu/~yorgey/forest/2026-W07/</id><content
type="xhtml"><div
xmlns="http://www.w3.org/1999/xhtml"><p
xmlns:html="http://www.w3.org/1999/xhtml">Spent a bunch of time this week grading, dealing with
administrative stuff, and <span
class="link local"><a
href="/~yorgey/forest/0060">writing more lecture notes</a></span>. Besides those I did a couple other things of interest:</p><section
class="block hide-metadata"
id="id-http-3a-2f-2fozark-2ehendrix-2eedu-2f-7eyorgey-2fforest-2f0075-2f"><header><h2>Swarm hacking</h2></header><p
xmlns:html="http://www.w3.org/1999/xhtml">I spent a while finishing up <span
class="link external"><a
href="https://github.com/swarm-game/swarm/pull/2688">this pull request</a></span> for <span
class="link local"><a
href="/~yorgey/forest/000O">Swarm</a></span>.  Right now, Swarm feels like it's kind of in this big slog/plateau where we've added all the "easy" features, and now in order to reach the ultimate vision there are a bunch of really hard, big projects/refactorings/redesigns that need to happen.  Stuff that's not sexy and that players will never notice.  Fortunately, although I certainly enjoy adding exciting features, I also really enjoy the <em>craft</em> of writing and refactoring code, of thinking hard about problems and coming up with elegant schemes for solving them.  I don't get to do a whole lot of that otherwise, so I'm really glad to have this somewhat-frivolous-but-surprisingly-professionally-fruitful project to work on.</p></section><section
class="block hide-metadata"
id="id-http-3a-2f-2fozark-2ehendrix-2eedu-2f-7eyorgey-2fforest-2f0074-2f"><header><h2>The Farmer Was Replaced</h2></header><p
xmlns:html="http://www.w3.org/1999/xhtml">I started playing <span
class="link external"><a
href="https://store.steampowered.com/app/2060160/The_Farmer_Was_Replaced/">The Farmer Was Replaced</a></span>—someone recommended it because of its similarities to Swarm.  There definitely are some similarities: in both games, you program robots to move around in a grid world collecting resources to unlock new programming language features.  (There are also some big differences, of course, such as the fact that Swarm has a much cooler programming language.)</p><p
xmlns:html="http://www.w3.org/1999/xhtml">The game feels like it is trying to be a fun way for people to learn programming.  But having taught literally hundreds of beginners how to program, I can tell you unequivocally that no one is going to be learning how to program from this game if they don't already have some other prior programming experience.  Still, it's a pretty fun game, and very polished; the implementation of the in-game Python-esque language is very impressive.</p><p
xmlns:html="http://www.w3.org/1999/xhtml">I haven't finished the game yet, still need to solve some mazes and implement a better snake-playing robot...</p></section></div></content></entry><entry><title>Weeknotes for 13 February 2026 (week 6)</title><published>2026-02-13T00:00:00Z</published><updated>2026-02-13T00:00:00Z</updated><author><name>Brent A. Yorgey</name><uri>http://ozark.hendrix.edu/~yorgey/forest/brentyorgey/</uri></author><link
rel="alternate"
type="text/html"
href="http://ozark.hendrix.edu/~yorgey/forest/2026-W06/" /><id>http://ozark.hendrix.edu/~yorgey/forest/2026-W06/</id><content
type="xhtml"><div
xmlns="http://www.w3.org/1999/xhtml"><p
xmlns:html="http://www.w3.org/1999/xhtml">Inspired by <span
class="link external"><a
href="https://www.jonmsterling.com/019X/">Jon Sterling</a></span> and <span
class="link external"><a
href="https://liamoc.net/forest/loc-001B/index.xml">Liam O'Connor</a></span>, this is my first attempt at writing <span
class="link external"><a
href="https://www.jonmsterling.com/01JS/">weeknotes</a></span>.  It seems like it could be a useful practice, but one that I won't be able to evaluate without trying it.</p><section
class="block hide-metadata"
id="id-http-3a-2f-2fozark-2ehendrix-2eedu-2f-7eyorgey-2fforest-2f005V-2f"><header><h2>Thoughts on pedagogy and community-building</h2></header><p
xmlns:html="http://www.w3.org/1999/xhtml">This semester I am participating in a "teaching square" with several colleagues, where we visit and observe each other's classes—not for the purpose of evaluation, or even constructive criticism, but merely to observe and reflect on our own teaching. On Monday I visited a class taught by one of my colleagues (who shall remain anonymous for now since I don't know whether she would want to be identified publicly in this context).  I very much enjoyed watching the way my colleague got the students to engage actively with her and with each other.  It seemed like the students in the class all knew each others' names, which in my experience is rare, even in a small class.  I don't think this was a coincidence—it was something my colleague intentionally cultivated.</p><p
xmlns:html="http://www.w3.org/1999/xhtml">This week I also read <span
class="link local"><a
href="/~yorgey/forest/shriramkrishnamurthi">Shriram Krishnamurthi</a></span>'s <span
class="link external"><a
href="https://parentheticallyspeaking.org/articles/pedagogy-recommendations/">pedagogy recommendations</a></span>, and among other good advice, he also says several things about creating community within the classroom (such as getting students to introduce themselves to each other repeatedly).</p><p
xmlns:html="http://www.w3.org/1999/xhtml">I'm still thinking about what, if anything, I might concretely do differently in my classes, but it's been good to think about.</p></section><section
class="block hide-metadata"
id="id-http-3a-2f-2fozark-2ehendrix-2eedu-2f-7eyorgey-2fforest-2f005W-2f"><header><h2>Forester setup for Discrete Math lecture notes</h2></header><p
xmlns:html="http://www.w3.org/1999/xhtml">I spent a bunch of time this week writing <span
class="link local"><a
href="/~yorgey/forest/0021">Discrete Math lecture notes</a></span> in Forester, and tweaking my Forester setup to make the process more efficient and the results prettier.

<ul><li>I used <span
class="link external"><a
href="https://pandoc.org/">Pandoc</a></span> to write a <span
class="link external"><a
href="https://github.com/byorgey/pandoc-forester">janky script</a></span> that takes my existing LaTeX lecture notes and makes a first pass at converting them into Forester syntax.  There's still lots more features I could add, and it's nowhere near being a complete, general-purpose pandoc writer (I'm not sure it will ever be), but it already saves me time.</li>

  <li>After <span
class="link external"><a
href="https://lists.sr.ht/~jonsterling/forester-discuss/%3CCAH0njdutB1dVSn4gMRHKFyZhgSzVcrr5KmpCj_3PDoRCqSk_Uw@mail.gmail.com%3E">asking for advice on the forester-discuss mailing list</a></span> and getting a helpful response, I created some <span
class="link external"><a
href="https://github.com/byorgey/forest/blob/main/trees/sproof.tree">simple Forester macros</a></span> for typesetting calculational proofs, like so:

    <p><div
style="margin-left: 30px"><span
class="katex-math"
data-display="inline"
data-tex="2n - 1 &gt; 7">2n - 1 &gt; 7</span></div>

      
  <span
class="katex-math"
data-display="inline"
data-tex="\leftrightarrow  \quad \quad \quad ">\leftrightarrow  \quad \quad \quad </span> { add <span
class="katex-math"
data-display="inline"
data-tex="1">1</span> to both sides }

      
  <div
style="margin-left: 30px"><span
class="katex-math"
data-display="inline"
data-tex="2n &gt; 8">2n &gt; 8</span></div>

      
  <span
class="katex-math"
data-display="inline"
data-tex="\leftrightarrow  \quad \quad \quad ">\leftrightarrow  \quad \quad \quad </span> { divide both sides by <span
class="katex-math"
data-display="inline"
data-tex="2">2</span> }

      
  <div
style="margin-left: 30px"><span
class="katex-math"
data-display="inline"
data-tex="n &gt; 4">n &gt; 4</span></div></p></li>

  <li>When teaching my Discrete Math students to write proofs, I emphasize the way the proofs should be structured, <em>i.e.</em> nested.  I have not yet gone so far as teaching them via a proof assistant like Lean or Agda—I'm not sure I ever will—but I get as close as possible while still writing proofs on paper.  I spent a bit of time tweaking some CSS to be able to easily typeset things like this:

  
  
    
    <section
class="block hide-metadata"
data-taxon="Proof"
id="id--5b2014-2c-202060-29">
    Let <span
class="katex-math"
data-display="inline"
data-tex="k">k</span> be an arbitrary integer; then we must show <span
class="katex-math"
data-display="inline"
data-tex="\mathrm {Odd}(k) \to  \mathrm {Odd}(k^2)">\mathrm {Odd}(k) \to  \mathrm {Odd}(k^2)</span>.
    
  <section
class="block hide-metadata"
data-taxon="Subproof"
id="id--5b2092-2c-202135-29">
      Suppose <span
class="katex-math"
data-display="inline"
data-tex="\mathrm {Odd}(k)">\mathrm {Odd}(k)</span>, that is, there exists an integer <span
class="katex-math"
data-display="inline"
data-tex="j">j</span> such that <span
class="katex-math"
data-display="inline"
data-tex="k = 2j+1">k = 2j+1</span>.  Then we must show that <span
class="katex-math"
data-display="inline"
data-tex="k^2">k^2</span> is also odd.
      
  <section
class="block hide-metadata"
data-taxon="Subproof"
id="id--5b2092-2c-202135-29">
        <span
class="katex-math"
data-display="inline"
data-tex="k^2 = (2j+1)^2 = 4j^2 + 4j + 1 = 2(2j^2 + 2j) + 1">k^2 = (2j+1)^2 = 4j^2 + 4j + 1 = 2(2j^2 + 2j) + 1</span>, so <span
class="katex-math"
data-display="inline"
data-tex="k^2">k^2</span> is odd since it is one more than twice an integer.
      </section>

      Since we showed <span
class="katex-math"
data-display="inline"
data-tex="k^2">k^2</span> is odd under the supposition that <span
class="katex-math"
data-display="inline"
data-tex="k">k</span> is odd, we have proved the implication <span
class="katex-math"
data-display="inline"
data-tex="\mathrm {Odd}(k) \to  \mathrm {Odd}(k^2)">\mathrm {Odd}(k) \to  \mathrm {Odd}(k^2)</span>.
    </section>

    Since <span
class="katex-math"
data-display="inline"
data-tex="k">k</span> was an arbitrary integer, we have proved <span
class="katex-math"
data-display="inline"
data-tex="\forall  {n}: {\mathbb {N}}.\; \mathrm {Odd}(n) \to  \mathrm {Odd}(n^2)">\forall  {n}: {\mathbb {N}}.\; \mathrm {Odd}(n) \to  \mathrm {Odd}(n^2)</span>.
  </section>
  


  This works by creating a new taxon called "Subproof" and using CSS to hide the header and draw a bar on the side.  I'm not sure if there's a better way to accomplish this, but it works pretty well for now.
  </li></ul></p></section><section
class="block hide-metadata"
id="id-http-3a-2f-2fozark-2ehendrix-2eedu-2f-7eyorgey-2fforest-2f005X-2f"><header><h2>Classical vs constructive logic in Discrete Math</h2></header><p
xmlns:html="http://www.w3.org/1999/xhtml">Aside from such technical fiddling, I've also spent a good deal of time over the past few weeks rethinking my approach to teaching logic and proofs in my <span
class="link local"><a
href="/~yorgey/forest/0020">Discrete Math course</a></span>, inspired by <span
class="link external"><a
href="https://mathstodon.xyz/@emilyriehl/115804882229302713">Emily Riehl's approach</a></span> and by <span
class="link external"><a
href="https://mathstodon.xyz/@mjd/115730298446604383">a rant by Mark Jason Dominus about teaching constructive logic</a></span>.</p><p
xmlns:html="http://www.w3.org/1999/xhtml">Of course I love constructive logic; but I have come to the conclusion that, in my context at least, I think there are still good reasons for teaching classical logic (and teaching it <em>first</em>).  So I didn't end up making the radical changes I thought I might; but it was still a very useful exercise, as I did end up reorganizing things in some significant ways.  At some point I will write up a more detailed explanation of how I have decided to teach the course, and why.</p></section><section
class="block hide-metadata"
id="id--5b518-2c-20675-29"><header><h2>Curling</h2></header><p
xmlns:html="http://www.w3.org/1999/xhtml">On a completely different note, I watched a lot of curling this week.  It looks like a lot of fun; I wish I could try it!</p></section></div></content></entry></feed>