1200 × 1500
Where Babbage’s 1836 count comes from decides what his engine could compute.
Babbage wrote in 1836 that an operation could be repeated a “given variable number” of times, without saying where the number comes from. Read one way, his control cannot reach 2↑↑n; read the other, it can, but not 2↑↑↑n for every n. Both are proved in Lean.
ABOUT THIS NOTE +
A note about what the control mechanisms of Charles Babbage’s Sketch Books of 1836 to 1838 can compute, at the dates the pages give: one operation repeated a counted number of times (March 1836), combinatorial wheels and backing cards to the first card (December 1837), and backing to any card (30 May 1838). I built a machine with only the rules the pages give, fixed each rule as page, reading or idealisation, and proved theorems about it in Lean. The first conjecture, that no deck that halts computes 2↑↑n, was wrong: it fails as soon as a repetition count may be read from the store, and the page of 7 March 1836 does not say where the count comes from. With repetition counts from number cards, everything a halting deck gives off is below a tower of fixed height. With repetition counts from the store, 2↑↑n is reached and 2↑↑↑n, for every n, is not. Two further steps make the machine general, given Minsky’s theorem: a count set inside the loop it counts, which no page read gives; or a stop at 1 ÷ 0 read as the end of the run, with the unconditional backing card the pages do give (for 30 May 1838 under either reading of repetition counts; for December 1837 only if they come from the store, and otherwise open). With a halt as passing the last card, December 1837 is strictly weaker than May 1838 under both readings. The Lean model and the Rust machine agree on 2,015 decks, which is a test, not a proof. The mathematics is classical; what is new here, as far as the search went, is its application to these pages.
01 / A NUMBER PUT ON AN AXIS
On 7 March 1836 Babbage wrote in his Sketch Book: “When any operation is to be terminated after a given variable number of repetitions, let the number of rep.ns be put on an axis having a carriage connected with it.” Unity is subtracted from the axis before each operation, and when it runs up the operation is suspended. The word “variable” is written above the line, in the same ink. The page says the number varies from one use to the next. It does not say where it comes from: from a card punched in advance, or from a number the engine has itself computed and holds in its store. That question turns out to decide how much the machine of these pages can compute.
Scribbling Book Vol. II, Science Museum Group ↗The page read at full resolution ↗
02 / THE CONTROL OF THE SKETCH BOOKS
The pages give three arrangements, each with a date. In March 1836 one operation can be repeated a counted number of times. In December 1837 there are combinatorial wheels, which hold one count outside the store, put there by a combinatorial card from the card itself or from a number “computed” in the store, and backing cards: a counted backing card subtracts unity from the wheels and sends the cards back to the first card until the wheels run up, and an unconditional one “always orders the backing”. On 30 May (the year inferred as 1838) the wheels can be set “to back any No of cards”. Every arrangement found sets a count before the group of cards it counts. Up to April 1842 no page read lets a result of the mill choose between cards, or decide whether a backing happens, except a variant of June 1839, not adopted, within one long addition; a computed number can only be put on the wheels before the group it counts. I built a machine with only these rules and fixed each one in writing as what a page says, a reading of a page that allows more than one, or a modern idealisation such as numbers of unbounded size.
03 / A CONJECTURE THAT FAILED
The first conjecture was that no deck of these dated arrangements that halts computes 2↑↑n, 2 raised to itself n times. It was wrong. A deck of six cards, accepted by the arrangement of December 1837, halts with 2↑↑n for every n ≥ 1: with 4 on the wheels it gives 65,536. It works because the machine, as first built, read a repetition count from the store, so each pass of a counted group can raise 2 to the number the last pass made. The page of 7 March 1836 allows that reading and does not require it. The conjecture was withdrawn in the repository, with the date, rather than quietly replaced.
04 / TWO READINGS, TWO THEOREMS
With repetition counts from number cards only (the wheels may still take computed numbers), everything a halting deck gives off is below a tower of 2s whose height is fixed by the deck, so for every n from some point on it does not give 2↑↑n. With repetition counts from the store, 2↑↑n is reached (a theorem for whole numbers), but everything given off is below a fixed number of tetrations, so it does not give 2↑↑↑n for every n. Both bounds hold for whole numbers and for exact fractions. In the language of the subrecursive hierarchies, the first reading sits within the elementary functions and the second, from December 1837 on, within the next class up; those memberships are argued, not proved. Where a single repetition count comes from moves the machine one level.
05 / ONE STEP NO PAGE GIVES
Add to the arrangement of 30 May 1838 one more thing: a count set inside the group of cards it counts. Then a deck can test a counter for zero with arithmetic alone and keep looping until a computed number says stop, and every counter machine translates into a deck that halts exactly when the machine does and gives off its counters. Two counters compute every partial computable function, with inputs and outputs coded as powers of primes (Minsky, 1967; cited, not formalised), so this machine is general. Every dated arrangement refuses those decks. No page read sets a count inside the group it counts.
06 / OR CHANGE WHAT COUNTS AS THE END
In the theorems above, a run ends by passing its last card, and an operation that fails, such as 1 ÷ 0, is an error. Read such a stop the other way, as the end of the run with the store as its result, and nothing changes while every backing card is counted: the bounds of the two readings hold at every point a run reaches. But the pages also give an unconditional backing card. With it, each pass of a loop does one step of a counter machine and ends by dividing 1 by a number that is 0 only once the machine has halted. The arrangement of 30 May 1838 accepts that deck as it stands, under either reading. December 1837 refuses it, but if a repetition count can come from the store, a second deck, whose flags are each one repeated multiplication, works there too. With repetition counts from number cards only, whether December 1837 becomes general this way is open. Rojas made Zuse’s Z3 general the same way in 1998. No text read treats such a stop as the end of a computation: in Menabrea’s account of 1842 the engine rings a bell at “the passage through zero or infinity” and stops until the attendant sets it going again.
07 / DECEMBER 1837 AGAINST MAY 1838
Backing to any card matters as much as where a count comes from. In December 1837 every card backs to the first, so a halting run is one loop, and with repetition counts from number cards nothing beyond 2 to the 2 to a linear function of the input is given off. A deck of 30 May 1838, which puts a computed 2ⁿ on the wheels, gives 2^2^2ⁿ. With repetition counts from the store, December 1837 stops short of 2↑↑2ⁿ, which May 1838 reaches. So, with a halt as passing the last card, December 1837 is strictly weaker under both readings; with a trap read as the end and counts from the store, both are general. A deck of May 1838 also gives the larger of two numbers with every count set before its group (tested for numbers up to 4, argued in general), which the first version of this study said no deck had been found to do.
08 / HOW IT WAS CHECKED
Every theorem named is in Lean 4, with only its core library, and is checked on every change: no proof is left unfinished. The bounds use only the standard axioms propext and Quot.sound; the theorems that make the machine general, and the instances for whole numbers and fractions, also use the classical axiom of choice, through core Lean’s lemmas on division, case analysis and one proof by contradiction. Two independent reviews read the proofs against the prose. The first found a real gap in the Rust machine (it accepted a negative count on the wheels) and a theorem stated more strongly than proved. The second found the proofs sound but the prose wrong in places: a rule said no computed number reaches the wheels, when the constructions rely on it, and “counts from number cards” had to be narrowed to repetition counts. All were put right. The Lean model is not proved to be the Rust machine. Instead the same decks are run through both and compared: nine decks of the study, six counter-machine decks and 2,000 random decks, the random ones with and without the trap. All 4,015 runs on 2,015 decks agree. The May 1838 decks of section 07 are run in Rust only.
Every deck in this note runs in the browser under every dated arrangement at once. The rules, the theorems, the decks and the tests are in the repository.
FOLLOW THIS IDEA — Source: the machine, the decks, the Lean proofs →FOLLOW THIS IDEA — The rules, each marked page, reading or idealisation →FOLLOW THIS IDEA — What the theorems mean, with the correction →FOLLOW THIS IDEA — The Lean theorems, file by file →FOLLOW THIS IDEA — The first note: Babbage’s programs of August 1837, run →
WHAT THIS DOES NOT SHOW
- These are theorems about models of the control the Sketch Books describe up to 1838, with numbers and a store of unbounded size. They are not claims about Babbage’s engine as he went on to design it. In 1842 Menabrea writes that if a remainder is nothing “the mill will order other cards”, and Lovelace’s Note G of 1843 has V₁₀, which “decides which of two courses the succeeding processes are to follow”. Nothing here says the historical engine was not general.
- The mathematics is classical: the bounds are of the kind Meyer and Ritchie, Kalmár and Grzegorczyk gave for loop programs; the general machines are Minsky’s; and replacing a branch with arithmetic, with a trap to stop, is Rojas’s technique. What a literature search did not find is this classification of Babbage’s dated mechanisms, the dependence on how the 1836 page is read, or machine-checked proofs of either.
- Five items the search found could not be read: Bromley (2000), Rojas (2021), Copeland and Sommaruga (2015), Kfoury (1980), and Goetze and Nehrlich (1980). Any of them may already say some of this, so nothing here is claimed as first.
- Which complexity class each model is exactly is argued, not proved. Minsky’s theorem is cited, not formalised. That the Lean model and the Rust machine agree is tested on 2,015 decks, not proved.
A page that leaves a word open leaves a theorem open. Prove both, and say which page you read.
OPEN
If a page does not say where a number comes from, how much of what a machine could compute is in the machine, and how much in the reading?
Still open here: whether December 1837, with repetition counts from number cards only, becomes general if a trap ends the run; whether May 1838 can compute x mod y, on which its exact class turns; whether each model is exactly the class it is argued to sit in; and whether a person reading the manuscripts agrees with the transcriptions this all rests on.
PUBLICATION HISTORY
Each version preserves its manuscript, claims and source references. Research status is recorded separately from publication.
- V1.0 · 2026-11-27 ↗
First publication, after a fact-check against analytical-engine a9093f5: repetition counts distinguished from combinatorial counts throughout; December 1837 refuses the 1838 trap deck and needs a second deck; pentation stated as 'not for every n'; the Lean-Rust comparison described as 4,015 runs on 2,015 decks; the maximum tested for small inputs; links pinned to the commit. OPEN
- V1.1 · 2026-12-01 ↗
Visual re-edit, no change of result: every chapter opens with Babbage's page (9 crops of the Science Museum Group's scans, 7 of them new: Sketch Book Vol. III pp 161, 162 and 164, and reverse pp 74–75 of 30 May [1838]; AI-agent readings, unchecked by a person), the question it raises and something to try — the axis of 7 March 1836 under both readings, the cards of December 1837 and May 1838 stepped one by one, the tower deck with its count from the store or a number card — then a shorter account and RECORD, MODEL, PROOF and OPEN strips carrying every condition of 1.0, with 32 Lean links pinned to a9093f5; independently fact-checked (findings applied: the tower figure no longer presents a Model A run of a deck Model A does not admit; the year of 30 May stated as inferred; the June 1839 exception kept within one long addition; readings moved out of RECORD; three theorems named; the nesting of wheels on reverse p 74 marked open) OPEN
- V1.2 · 2026-12-02 ↗
Rewritten for readability with no change of result: each act now opens with a question or observation and reads as a short narrative, with technical terms explained on first use; dates, quotations, theorem names and qualifications stay in the strips and sources. A repeated disclaimer about review of the readings is removed; the readings are still attributed to an AI agent OPEN
SOURCES & PROVENANCE
- C. Babbage, Scribbling Book Vol. II (1835–1837), p. 84, 7 March 1836, BAB/S/1/02, the Babbage Papers, Science Museum Group ↗
“a given variable number of repetitions … put on an axis”. Transcribed at full resolution in the repository (sources/notes/repetition-count-1836-1842.md).
- C. Babbage, Scribbling Book Vol. III, pp. 161–165 (December 1837) and reverse pp. 74–75 (“30 May”, the year inferred as 1838), the Babbage Papers, Science Museum Group
The combinatorial wheels and cards, counted and unconditional backing, and backing to any card. Transcribed in sources/notes/sketchbooks-control.md.
- L. F. Menabrea, “Sketch of the Analytical Engine invented by Charles Babbage”, trans. and with notes by A. A. Lovelace, Scientific Memoirs 3 (1843), pp. 666–731 ↗
The bell at “the passage through zero or infinity” (p. 685); “the mill will order other cards” (p. 687); Note G (pp. 728–731). Read in sources/notes/menabrea-lovelace-1843-control.md.
- R. Rojas, “How to make Zuse’s Z3 a universal computer”, IEEE Annals of the History of Computing 20(3), 1998, pp. 51–54 ↗
One loop of arithmetic, ended by an operation the machine cannot do.
- R. Rojas, “Unconventional universal computation in Babbage’s Analytical Engine”, arXiv:2408.03334, 2024 ↗
Universality from a backing that depends on a computed result: the step the 1836–1838 arrangements lack.
- M. L. Minsky, Computation: Finite and Infinite Machines, Prentice-Hall, 1967
Two counters suffice. Cited, not formalised, and not read for this note.
- A. R. Meyer and D. M. Ritchie, “The complexity of loop programs”, Proc. ACM National Meeting, 1967; A. Grzegorczyk, “Some classes of recursive functions”, Rozprawy Matematyczne 4, 1953
The bounds on loops whose count is fixed at entry. Meyer and Ritchie read; Grzegorczyk cited, not read.
- The literature review ↗
What was read, what was not, and what was not found.
- chrishayuk/analytical-engine, commit a9093f5 ↗
src/sketch.rs (the machine), control/ (the decks), formal/ (Lean: Termination, Growth, Separation, Tower, GrowthStore, RatSize, Minsky, Trap, Classes), scripts/lean-diff.sh, docs/semantics.md, docs/expressiveness.md, docs/growth-classes.md.
AUTHOR / Chris Hay · VERSION / 1.0
PUBLISHED 27 NOV 2026 · VERSION 1.0
CITECITE THIS
Research note · 1.0
Hay, C. (2026). Where Babbage’s 1836 count comes from decides what his engine could compute. (Version 1.0). Chris Hay. https://chrishayuk.com/records/N-BABBAGE-CONTROL/1.0
FOLLOW THE WORK
New notebook entries and recorded work, as they appear. Point a feed reader — or an agent of your own — at an address below. No account, no email address, nothing for this site to keep.
The notebook
New ideas, experiments and essays, as they are recorded. Includes labelled working drafts.
OPEN FEEDhttps://chrishayuk.com/notebook/feed.xmlThe record
Everything published to the Chris Hay record.
OPEN FEEDhttps://chrishayuk.com/record/feed.xml
FOR PROGRAMS · follow.json · JSON Feed