SIRDS for games

I have fond memories of playing the Quake 2 AbSIRD mod, which renders the game as an auto-stereogram (such as used by the brand Magic Eye), allowing you to see 3D information by converging your eyes beyond the screen, and appearing as meaningless noise to ordinary vision. I think playing that mod, though I only did a little, permanently improved my vision in the specific sense of being able to perceive binocular-vision depth information separately.

Recently, I asked Fable 5 to implement a simple 3D game using the same rendering, which it did. Experimenting with this further taught me what SIRDS can do in games. (“SIRDS” stands for Single Image Random Dot Stereogram.)

The information SIRDS conveys in a game

At a high-level, the SIRDS is created as follows:

  • The game renders a depth map.
  • The SIRDS renderer first computes the reciprocal of the values of the depth map to create a (greyscale) disparity map. (In Quake 2 AbSIRD, this disparity map is quantized to integer values, because dot separation can only be integer multiples of pixels. There are ways to remove the quantization, such as by computing the SIRDS in higher-resolution, then downsampling.)
  • The disparity map is then used to create the SIRDS.

This procedure severely limits the information content of the SIRDS:

  • No color can be communicated at all, because there’s only one channel. The player can only perceive depth.
  • Because of taking the reciprocal, different high depths have similar disparity. Thus, because the player can see nothing except depth, geometry at high depths is indistinguishable.
  • Finally, the SIRDS-creation process makes the geometry you can see (the near geometry) harder to see than it would be if viewing the disparity map as a greyscale image. For example, fine details are hard to see.

Overall, the information communicated is lower than even viewing the game in greyscale. This is not like using 3D glasses, where the binocular vision information is in addition to the ordinary RGB image.

That said, SIRDS is a fun gimmick. Playing a game with only SIRDS for perception is challenging and novel. The key point to know when making a SIRDS game is that you cannot expect the player to see anything that is far away.

Stenography

Stenography allows transcribing speech at the rate of speech. Unlike earlier stenographic systems that required manual processing afterward, realtime stenography directly produces a readable transcript, making it suitable for applications such as live captioning.

A realtime stenography system uses a lossless compression scheme of English text. Unlike many compression schemes, a steno system’s compressed encoding must be human-understandable, because a stenographer writes it using a stenographic keyboard.

Like any compression scheme, a steno system must exploit the structure of the data distribution.

Phonemic structure

Most of the information content of spoken English (as with natural language in general) is carried by a sequence of discrete phonemes, which are consonants or vowels. There are other parts of speech that carry information, such as prosody, but they are less important.

So a first attempt at encoding spoken English would encode it as a sequence of phonemes, and that is the main idea behind standard English writing (also known as orthography). It’s approximately the case that each letter corresponds to one phoneme. To be clear, this approximation is rough, among other things because English spelling has become highly irregular over its history. But, for instance, the letter “k” usually indicates the phoneme /k/.

This is as much encoding as a standard computer keyboard (such as with the QWERTY layout) provides. You can type almost one phoneme per keypress. With the exception of world-record-level extraordinary typists, this is not fast enough to keep up with speech, so stenography needs to exploit more structure.

Syllabic structure

English is mostly organized into blocks of rising-and-falling sonority called “syllables”. The concept of syllable is a looser one than the phoneme, in part because it’s often unclear how to cleanly split a word into syllables (a phenomenon called “ambisyllabicity”). But it nevertheless gives an opportunity for improving the encoding.

Syllabic structure is used by typical English stenographic systems, which allow typing most syllables with one stroke of the keyboard. A syllable consists of zero-or-more consonants called the “onset”, a vowel, and zero-or-more consonants called the “coda”. The number of distinct legal onsets, vowels and codas is not very large: roughly 65 onsets, 14 vowels, and 185 codas.

The standard English steno keyboard maps syllables as follows:

  • The left fingers can hit 7 keys, for 127 combinations, which specify the onset.
  • The thumbs can hit 4 keys, for 15 combinations, which specify the vowel.
  • The right fingers can hit 10 keys, for 1023 combinations (though some of these are not physically pressable), which specify the coda.
  • There’s also a single asterisk key in the center that can be hit by the index finger of either hand, used for backspacing and miscellaneous purposes, such as disambiguation.

Thus, there’s enough expressive power in each part of the steno keyboard to specify the syllable part it is assigned.

That is the phonetic approach to stenography, but realtime theories are required to be encodings of text, so they face major problems with homophones and word boundaries, neither of which are accounted for by syllabic structure. A significant part of the complication of realtime theories involves disambiguating homophones and word boundaries.

Is syllabic structure enough to keep up with speech? No. A fast steno can write about 4 strokes per second, and English has about 1.6 syllables per word, so that steno would only achieve 150 words-per-minute (WPM), which is far short of the 225 WPM that professional stenographers are required to reach.

So steno theories must exploit more structure.

Additional structure

Word frequency

Some words are more common than other words. There are also some easily-pronounceable combinations of syllables that are not words at all, which can be considered a special case of word frequency where the frequency is zero.

So common multi-syllabic words can receive single-stroke abbreviations, called “briefs”. For example, StenEd abbreviates “system” as S-M. The idea behind that brief is that the word starts with S and ends with M, but, once having used that stroke for “system”, you can’t use the same idea for “sunbeam”, a less common word.

Word structure: affixes

There are some common affixes (i.e. prefixes and suffixes) in English that can be combined with the adjacent syllable to save a stroke. For example, “ex-” and “-ing” both receive special handling by StenEd.

These rules tend to require certain conditions to apply, so as to avoid conflicts.

Phrase frequency

English contains many common phrases, such as “this is” and “it is”, which, since they are multiple words, contain multiple syllables, so if not abbreviated, they would require multiple strokes. StenEd represents both those phrases with a single stroke.

Phrase abbreviations can be ad hoc or systematic, such as Jeff phrasing.

Discussion

The difficulty of learning a realtime stenographic system seems to arise for the following reasons:

  • Disambiguating homophones and word boundaries.
  • Learning the systems and associations to exploit structure: syllabic, word frequency, affixes, phrase frequency.
  • Mastering all of the above so it becomes automatic.

The phonotactics of codas in General American accents

I have been working towards a steno layout allowing typing IPA symbols, and I want nearly every syllable to be writable with a single stroke. This is easy to do aside from the syllable’s coda (which refers to the final consonant cluster in a syllable), which is rather complicated. The purpose of this post is to record what I have learned about coda consonants, for my later reference.

To come up with a steno scheme, it is helpful to understand which phonemes can appear in a coda and in which order. The study of this is called “phonotactics”. What I’m writing here is not standard phonotactics–it’s an analysis aimed towards creating a steno layout.

For this analysis, I used a list of common words that I then looked up in CMUdict to find pronunciations, from which I took the word-final syllable coda. I excluded:

  • Words with incorrect pronunciations in CMUdict.
  • Non-English words.
  • Rare loanwords.
  • Proper nouns in non-English languages.

It would be easy to understand codas if, for any given coda, which phonemes it contains determines the coda, because of a consistent ordering. This is almost true, but not quite, due to S, Z, and TH (the voiceless phoneme in “math”, not the voiced phoneme in “the”) being problematic. But we can exclude S-Z-TH to get a consistent ordering, which follows what’s called the sonority sequencing principle, which says that consonants in a coda tend to appear in order of decreasing sonority.

Ordering without S, Z, and TH

By excluding S, Z, and TH, we have the following sonority-principle-respecting ordering:

  • Liquids: R < L
  • Nasals: NG M N
  • Fricatives: F V DH SH ZH
  • Affricates: CH JH
  • Plosives: K G P B < D < T

Except where indicated with <, consonants in the same sonority category do not co-occur, but the exceptions are important:

  • The two liquids can co-occur, as in /rl/ (curl).
  • D and T can appear after other plosives. Sometimes that’s because of inflections: /kt/ (backed), /gd/ (bagged), /pt/ (mapped), /bd/ (rubbed). But non-inflection examples abound for T too: /kt/ (act), /pt/ (apt).
  • T can appear after D, because of the odd case of /dst/ in “midst” and “amidst”.

TH

If we include the uses of TH inflecting as an ordinal suffix, a consistent ordering is not possible: /tθ/ (eighth) collides with /θt/ (bequeathed). Other examples of TH inflecting: “fifth”, “eighth”, “hundredth”, “thousandth”.

If we put aside its use as an inflection, TH can be put between D and T to maintain a consistent ordering, but TH is a fricative, so that breaks the sonority sequencing principle. Examples: “width”, “length”, “depth”.

Because the phonemes so far maintain a consistent ordering across every coda, if you know the phonemes, you know the coda. That will break in the next section.

S and Z

The problems of S and Z are best understood by example:

  • /zd/ (buzzed), /dz/ (buds). Thus Z cannot be ordered.
  • /st/ (bust), /ts/ (buts). Thus S cannot be ordered.
  • /spt/ (clasped), /pst/ (lapsed), /pts/ (erupts). Thus a phoneme set can be shared by 3 distinct codas.
  • /skt/ (asked), /kst/ (axed, text), /kts/ (acts), /ksts/ (texts). This shows a phoneme set shared by 4 distinct codas, and an example of S appearing twice in the same coda.

There are some things we can say about S and Z, however.

  • S in non-final position is always immediately followed by a voiceless obstruent (specifically T, K, P, or TH).
  • Z in non-final position is always immediately followed by D.
  • S in final position never immediately follows a voiced obstruent.
  • Z in final position never immediately follows a voiceless obstruent.
  • (Note: Either S or Z can immediately follow a sonorant. e.g. hearse, hers; false, falls; once, ones.)
  • T never immediately follows a voiced obstruent.
  • D never immediately follows a voiceless obstruent.
  • (Note: Either T or D can immediately follow a sonorant. e.g. hurt, heard; built, billed; want, wand.)

Rules to understand S and Z

We can nearly uniquely describe uses of S and Z by using two different symbols, SZ_early and ZS_final, which we derive from a coda using the following rules:

S/Z in non-final position is SZ_early.
Examples:

  • /st/, /sk/, /sp/ SZ_early
  • /zd/ SZ_early
  • /rst/ SZ_early
  • /skt/ SZ_early
  • /kst/ SZ_early

Otherwise (i.e. the S/Z is in final position), if the S/Z immediately follows an obstruent, it is ZS_final.
Examples:

  • /ts/, /ks/, /ps/ ZS_final
  • /rts/ ZS_final
  • /kts/ ZS_final

Otherwise (i.e. the S/Z is in final position and does not follow an obstruent), S is SZ_early and Z is ZS_final.
Examples:

  • /s/ SZ_early
  • /z/ ZS_final
  • /rs/ SZ_early
  • /rz/ ZS_final
  • /ls/ SZ_early
  • /lz/ ZS_final

This leaves us with only three collisions:

  • /kst/ vs /skt/
  • /tθ/ vs /θt/
  • /pst/ vs /spt/

Mapping chords to pre-r vowels

Towards a steno layout for writing IPA broad transcriptions for General American and Standard Canadian accents, one difficulty is producing pre-r vowels (i.e. vowels that appear before written r). Pre-r vowels are complicated, with many mergers and often pronounced with r-coloring. There are even certain vowels that do not appear except before r. In this post, I propose a simple chording of pre-r vowels.

The key ideas:

  • List an example word for each pre-r vowel and make sure there is a chord for its sound.
  • Pre-r vowels are produced when an ordinary vowel is chorded together with r.

The chording rules, which list the steno keys to press together on the left, are:

  • /ə/ + /ɹ/ => /ɚ/
  • /ʌ/ + /ɹ/ => /ɝ/
  • /oʊ/ + /ɹ/ => /ɔɹ/
  • all others unchanged

Here are the example words for my accent, which accepts most common merges, except for poor-pore.

  • nurse /nɝs/. Use /ʌ/ rule.
  • father /ˈfɑðɚ/. Use /ə/ rule.
  • farce /fɑɹs/. Same vowel as “bot”.
  • force /fɔɹs/. Use /oʊ/ rule.
  • near /nɪɹ/. Same vowel as “bit”.
  • air /ɛɹ/. Same vowel as “bet”.
  • poor /pʊɹ/. Same vowel as “foot”.
  • wire /ˈwaɪɚ/. Write two syllables using two strokes.

The rule to produce /ɔɹ/ deserves some explanation. The most natural way to produce would be /ɔ/ + /ɹ/, but we are accepting the cot-caught merger, so /ɔ/ is not available on the keyboard, and /ɑ/ is already in use to produce /ɑɹ/.

That explains why a special rule is needed, but why /oʊ/? The answer is that /ɔɹ/ appears in words participating in the north-force merger. The “north” branch of the merger historically suggests /ɔ/, which is unavailable, as previously mentioned. The “force” branch however historically suggests /oʊ/ (since it once shared a vowel with words that today are pronounced with /oʊ/), which is available, since /oʊɹ/ is not needed for any syllables (although it can appear in speech when /ɹ/ is in the onset of the next syllable). It’s also pleasantly mnemonic, since the “o_e” spelling in “force” echoes words with /oʊ/, such as “dote”.

The consonant phonemes of General American and Standard Canadian English accents

There are many consonants, but, by grouping them up, it’s not too hard to remember them all. The ordering scheme is:

  • Sonority (1st level), less to more
  • Sonority (2nd level), less to more
  • Voicing, voiceless-to-voiced
  • Place of articulation, front-to-back

We skip /ʍ/, which is typically merged into /w/ in these accents.

Each entry lists a typical spelling (if any), the IPA notation, and one or more example words.

Obstruents

Plosives

Voiceless

  • p, /p/, “pot”
  • t, /t/, “tot”
  • k, /k/, “cot”

Voiced

  • b, /b/, “bot”
  • d, /d/, “dot”
  • g, /g/, “got”

Affricates

Voiceless

  • ch, /t͡ʃ/, e.g. “char”

Voiced

  • j, /d͡ʒ/, e.g. “jar”

Fricatives

Voiceless

  • f, /f/, e.g. “fan”
  • th, /θ/, e.g. “teeth”
  • s, /s/, e.g. “sip”
  • sh, /ʃ/, e.g. “ship”
  • h, /h/, e.g. “hum”

Voiced

  • v, /v/, e.g. “van”
  • th, /ð/, e.g. “teethe”
  • z, /z/, e.g. “zip”
  • (no suggestive spelling), /ʒ/, e.g. “closure”, “fusion”, “genre”

Sonorants

Vowels are also sonorants—these are only the sonorant consonants.

Nasals

  • m, /m/, “rum”
  • n, /n/, “run”
  • ng, /ŋ/, “rung”

Liquids

  • l, /l/, e.g. “let”
  • r, /ɹ/, e.g. “rat”

Semivowels

  • y, /j/, e.g. “yet”
  • w, /w/, e.g. “wet”

A minimal General American vowel inventory

General American English is an umbrella term for many accents of American English and is essentially similar to my own Standard Canadian English accent. The accents under this umbrella do not share exactly the same phonemic inventories, however. This post is my attempt to list the vowels that are unmerged by all speakers of General American English, plus grouping them in an easy-to-remember way.

For minimality, we’ll be accepting the father-bother merger and cot-caught merger (merged towards /ɒ/, which is typical of Canadian English, though less common than /ɑ/ in the US). For simplicity, we’ll also be ignoring r-colored vowels.

For grouping, we’ll use the traditional orthographic classification of vowels into short and long. There will also be diphthongs and the schwa.

Each vowel lists a typical spelling, then IPA, then ARPABET, then example words.

Orthographic-short vowels

a, /æ/, AE, e.g. “bat”
e, /ɛ/, EH, e.g. “bet”
i, /ɪ/, IH, e.g. “bit”
o, /ɒ/, AA, e.g. “bot”, “caught”, “balm”
u, /ʌ/, AH, e.g. “but”, “putt”
oo, /ʊ/, UH, e.g. “foot”, “put”

Orthographic-long vowels

a, /eɪ/, EY, e.g. “bate”
e, /i/, IY, e.g. “beet”
i, /aɪ/, AY, e.g. “bite”
o, /oʊ/, OW, e.g. “boat”
u, /u/, UW, e.g. “moot”, “mute”

Other diphthongs

ou, /aʊ/, AW, e.g. “out”
oi, /ɔɪ/, OY, e.g. “boy”

Schwa

/ə/, AX/AH0, e.g. “about”, “support”

Update (2026-06-05)

After further reading, I have come to believe that it is more common to use /ɑ/ for the cot-caught merger vowel, rather than /ɒ/, even for Canadian English. Example. Given that no symbol can perfectly represent the various ways people say that vowel, the choice is inherently arbitrary, so it seems sensible to go with the most common convention.

TIL: Cork deforms unusually

Cork, the material used for wine corks, has an unusual property.

Most materials exhibit a phenomenon called Poisson’s effect. When you squish them in one direction, they stretch in the other directions; and when you stretch them in one direction, they squish in the other directions. The amount of this effect is measured by a quantity called Poisson’s ratio.

Cork is unusual in having a Poisson ratio of zero, so it does not show Poisson’s effect at all: squishing it in one direction does not stretch it in the other directions.

Harmonic’s Aristotle: first impressions

Harmonic’s Aristotle is an AI tool for formal mathematics. It is exciting because it works out-of-the-box with Lean 4 and mathlib4, the standard tools for machine-verified mathematics. Claude and GPT have some ability with mathlib, but not as much, and it is not easily integrated.

Originally, Aristotle was gated behind a waitlist. Yesterday, they opened up access to everyone, and I received my API invitation shortly before that. This blog post records my first impressions.

Installation

Harmonic has clearly put effort into the user experience, because the installation and UI are mostly smooth and easy. I only ran into two minor speedbumps.

Pinning the version of Lean and mathlib

Aristotle works best with these versions of Lean and mathlib:

Lean Toolchain version: leanprover/lean4:v4.24.0
Mathlib version: v4.24.0 - Oct 14, 2025 (f897ebcf72cd16f89ab4577d0c826cd14afaafc7)

However, the installation instructions don’t explain how to pin these versions in your project.

In seems that the following works:

In lean-toolchain:

leanprover/lean4:v4.24.0

In lakefile.toml:

[[require]]
name = "mathlib"
scope = "leanprover-community"
rev = "v4.24.0"

At one point, the Lean VSCode extension overwrote my lean-toolchain file, so I needed to put the version back in. Thus I don’t know the best time to insert these directives.

Command to run Aristotle

The Aristotle docs say to run with

uvx aristotlelib@latest aristotle

But this gave an error on my machine. Instead I needed to use

uvx --from aristotlelib@latest aristotle

Tasks for Aristotle

Aristotle offers four different modes, but so far I have tried only mode 1, “Fill sorries in a lean file (.lean)”. Since I’m figuring out basic usage and derusting on Lean (which I last used about a year ago), I stuck to simple tasks. Here are some I tried.

Some lemmas I’d like to investigate using AI involve Shannon entropy, and mathlib does not seem to have an easy-to-work-with definition of the Shannon entropy of a probability vector, so that inspired some simple not-in-mathlib material to try.

Proving continuity

As a human, it’s easy enough to define the entropy function in terms of mathlib’s negMulLog and prove its continuity. (But I did use LLMs, including Aristotle’s own output, to help me!)

import Mathlib

noncomputable def entropy {n : ℕ} (p : Fin n → ℝ) : ℝ :=
  ∑ i, (p i).negMulLog

lemma continuous_entropy (n : ℕ) : Continuous (entropy (n := n)) := by
  unfold entropy
  fun_prop

I gave the task of proving continuity to Aristotle. It came back with this proof script:

lemma continuous_entropy (n : ℕ) : Continuous (entropy (n := n)) := by
  -- The entropy function is continuous because it is a sum of continuous functions (each term in the sum is continuous).
  have h_cont : Continuous (fun p : Fin n → ℝ => ∑ i, (p i).negMulLog) := by
    have h_term_cont : ∀ i, Continuous (fun p : Fin n → ℝ => (p i).negMulLog) := by
      fun_prop (disch := norm_num)
    exact continuous_finset_sum _ fun i _ => h_term_cont i;
  -- Since the entropy function is defined as the sum of the negMulLog terms, and we've already shown that this sum is continuous, we can conclude that the entropy function is continuous.
  convert h_cont using 1

The proof script is messier and longer than my manual proof, but it verifies.

Proving strict concavity on [0,inf)^n

Another property of entropy is that it is strictly concave on [0,inf)^n. This is surprisingly tricky to prove, though only because of the strictness. Concavity is easy, because it’s a sum of concave functions, and their concavity is already proved by mathlib for negMulLog.

I still haven’t settled on how I’d like to write the proof script by hand, and in the meantime, Aristotle came back with:

lemma strictConcaveOn_entropy (n : ℕ) :
    StrictConcaveOn ℝ (Set.Ici 0) (entropy (n := n)) := by
      -- By definition of entropy, we know that it is strictly concave.
      have h_strict_concave : ∀ x y : Fin n → ℝ, 0 ≤ x → 0 ≤ y → x ≠ y → ∀ a b : ℝ, 0 < a → 0 < b → a + b = 1 → a • (∑ i, (x i).negMulLog) + b • (∑ i, (y i).negMulLog) < ∑ i, ((a • x + b • y) i).negMulLog := by
        -- Apply the strict concavity of the entropy function to each term in the sum.
        have h_strict_concave : ∀ x y : ℝ, 0 ≤ x → 0 ≤ y → x ≠ y → ∀ a b : ℝ, 0 < a → 0 < b → a + b = 1 → a • (x.negMulLog) + b • (y.negMulLog) < (a • x + b • y).negMulLog := by
          -- Apply Jensen's inequality for the strictly concave function $f(x) = -x \log x$.
          have h_jensen : StrictConcaveOn ℝ (Set.Ici 0) (fun x : ℝ => -x * Real.log x) := by
            apply_rules [ strictConcaveOn_of_deriv2_neg ] <;> norm_num [ Real.log_div ];
            · exact convex_Ici _;
            · exact ContinuousOn.neg ( Real.continuous_mul_log.continuousOn );
            · intro x hx; rw [ show deriv ( deriv fun y => y * Real.log y ) x = deriv ( fun y => Real.log y + 1 ) x from Filter.EventuallyEq.deriv_eq <| Filter.eventuallyEq_of_mem ( Ioi_mem_nhds hx ) fun y hy => by simp +decide [ hy.out.ne' ] ] ; norm_num [ hx.ne' ] ; positivity;
          simp_all +decide [ StrictConcaveOn ];
          unfold Real.negMulLog; aesop;
        intros x y hx hy hxy a b ha hb hab
        have h_sum_strict_concave : ∑ i, (a • (x i).negMulLog + b • (y i).negMulLog) < ∑ i, ((a • x + b • y) i).negMulLog := by
          apply Finset.sum_lt_sum
          intro i _;
          · by_cases hi : x i = y i;
            · simp +decide [ ← add_mul, ← hi, hab ];
            · exact le_of_lt ( h_strict_concave _ _ ( hx i ) ( hy i ) hi a b ha hb hab );
          · exact ⟨ Classical.choose ( Function.ne_iff.mp hxy ), Finset.mem_univ _, by simpa using h_strict_concave ( x ( Classical.choose ( Function.ne_iff.mp hxy ) ) ) ( y ( Classical.choose ( Function.ne_iff.mp hxy ) ) ) ( hx _ ) ( hy _ ) ( Classical.choose_spec ( Function.ne_iff.mp hxy ) ) a b ha hb hab ⟩
        generalize_proofs at *; (
        simpa only [ Finset.smul_sum, Finset.sum_add_distrib ] using h_sum_strict_concave);
      exact ⟨ convex_Ici _, fun x hx y hy hxy a b ha hb hab => h_strict_concave x y hx hy hxy a b ha hb hab ⟩

The continuity and strict concavity together took 12 minutes for Aristotle, definitely much faster than I’m able to formally prove this lemma. On the other hand, the proof script it created is rather bizarre. For example, it seems to be invoking the axiom of choice, which is not something I’d expect to see for this problem. So, the output seems mainly useful for confirming “this is provable” but not so much for providing a proof script I’d want to read or commit.

Disproving strict concavity on R^n

Informally, a natural way to define the entropy function would be to make its domain [0,inf)^n (not R^n), so that we can simply say “entropy is strictly concave” rather than needing to say “entropy is strictly concave on [0,inf)^n“.

But it’s an unfortunate technical oddity of Lean that it tends to be less awkward to be unrestrictive about function inputs and instead put the conditions as assumptions in lemmas. That’s how mathlib handles log and negMulLog, so that’s what I do with entropy too.

As a result, the informal fact “entropy is strictly concave” is actually not formally true in Lean. (Moreover, it’s not even concave.) But it would be easy to forget the needed assumption when stating the lemma, so I was curious how Aristotle would handle it. In 10 minutes, Aristotle came back with a disproof. The way the output encodes the disproof is in a comment, so I reorganized a bit so I could check it locally with Lean, to get:

lemma strictConcaveOnUniv_entropy :
    ∃ n, ¬StrictConcaveOn ℝ Set.univ (entropy (n := n)) := by
      -- Proof starts here:
      norm_num [ StrictConcaveOn ] at *;
      use 2;
      rintro -;
      unfold entropy;
      refine' ⟨ fun _ => -1, fun _ => 1, _, 1 / 2, _, 1 / 2, _, _, _ ⟩ <;> norm_num;
      · exact fun h => by have := congr_fun h 0; norm_num at this;
      · norm_num [ Real.negMulLog ]

This is a reasonable choice of counterexample, despite the oddity of choosing n=2. It only disproves strictness, though, not concavity. Of course, that’s good enough to refute the sorry I asked it to fill. But it’s not much harder to pick a counterexample that disproves concavity, so a human would probably give you one to begin with, instead of needing to be asked again.

Conclusion

I’m impressed with what I’ve seen in my use of Aristotle so far. It works, and the UI is smooth. The proof scripts produced are clunky, but that’s something I think we can expect to improve with future versions.

A counterexample to fast usage of free energy: hydroelectric dams

In the previous post, I speculated that (in addition to the hydrogenation of carbon that is the topic of the link) life may more generally seek to use free energy more quickly than non-living dissipation.

But sometimes life may use free energy slower than non-living dissipation, and hydroelectric dams are a clear example. Without intervention, the gravitational potential energy of the water would dissipate as it flows downstream. The hydroelectric dam preempts this dissipation, but it uses the free energy much more slowly, by storing the gravitational potential energy indefinitely in a reservoir.

This pattern of preserving free energy for later use also occurs in non-human life, such as a bear preparing for hibernation, though in that case it’s less clear to me that the free energy would have dissipated faster if not preserved by the bear, and also the energy is converted into a different form for preservation, unlike with the dam where the energy remains as gravitational potential energy.

So it’s too simplistic to think of life simply as a faster way to dissipate free energy.

Sean Carroll’s “Free Energy and the Meaning of Life”

Does life use energy, or does energy use life? This counter-intuitive reversal is explored by Sean Carroll in his blog post Free Energy and the Meaning of Life (also on his own blog, missing images). It offers a view of the origin of life, and it’s a viewpoint we can apply to the recent past and the future.

Hydrogenating carbon dioxide

“The purpose of life is to hydrogenate carbon dioxide.” — Mike Russell, paraphrased by Sean Carroll

In one model of early Earth, there are numerous CO2 and H2 molecules. These can be arranged into a lower-energy configuration as follows: 1x CO2 and 4x H2 become 1x CH4 and 2x H2O. But the original configuration is “metastable”: it’s a local minimum of energy. So this reaction can occur only very slowly.

Life however could find more sophisticated methods for rearranging CO2 and H2 into CH4 and H2O. A typical way to think of this: the life is using CO2 and H2 as inputs and emitting CH4 and H2O as waste. But Carroll flips this around: we can instead think of the CO2 and H2 using life to find a way to the lower-energy configuration it wants to reach.

My takeaway for the general principle: when a disequilibrium cannot simply and quickly reach equilibrium, it enables and incentivizes life to speed up the transition to equilibrium. The word “incentive” I chose here hints that economics may be relevant.

Fossil fuels

Carroll doesn’t speculate beyond the one example, so let’s consider another: fossil fuels. To be concrete, consider CH4 (methane, the primary constituent of natural gas). 1x CH4 and 2x O2 want to rearrange into 1x CO2 and 2x H2O. They can’t, but the problem here isn’t chemical (since life isn’t needed to burn methane)–it’s that the methane is trapped underground whereas the oxygen is in the atmosphere.

So the buried CH4 wants to be burned, but it’s not easy to do so. Hundreds of millions of years of life could not find a way to get at it. Evidently, the simplest way to burn fossil CH4 is to create industrial civilization.

Taking the viewpoint of CH4-using-us rather than us-using-CH4 leads to a provocative conclusion: the CH4 will ensure that it is used, somehow or other. That’s a deathblow to the “keep it in the ground” approach to addressing climate change. Thankfully, there are other approaches possible, and finding a way to safely use the CH4 would satisfy its desire.

Stars

Let’s now look into the future. If reservoirs of free energy guide life towards using them, we should look around for large amounts of untapped free energy and imagine what processes might exploit them.

One such source of free energy: stars, such as the sun. One way to use more of its free energy is with a Dyson sphere: placing solar panels in space to collect energy from the radiated light.

But a Dyson sphere still requires billions of years to collect the free energy coming from the star. That’s a long time to wait, which creates a juicy incentive for life to find a way to harvest the energy faster. That life could be our descendents or aliens–but, no matter how, the incentive to make it work is strong.

Everything

Let’s be more expansive in our search for free energy that demands its usage. It’s easier to think of what an absence of free energy looks like: the heat death of the universe, which through non-living processes alone is predicted to take over 10^100 years and consist only of diffuse matter. That timespan is extremely long, giving plenty of time and incentive for life to try to find a way to reach the diffuse matter state faster.

We can formulate Russell’s quotation as: “the purpose of life is to accelerate the heat death of the universe”.

[EDIT: The last formulation was essentially stated in this YouTube comment.]