CHRIS HAY

IDEAS · SYSTEMS · OBJECTS / LONDON · 2026

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.

N-BABBAGE-CONTROLOPENRECORDED 2026-11-27PUBLISHED · V1.1CITE ↓FOLLOW ↓

01 / A NUMBER PUT ON AN AXIS

On 7 March 1836 Babbage wrote that when an operation is to end “after a given variable number of repetitions”, the number should be put on an axis, unity subtracted before each operation, and the running up would suspend it. The page says the number varies from one use to the next. It does not say where it comes from: a card punched in advance, or a number the engine has computed and holds in its store. That decides how much this machine 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. March 1836 repeats one operation a counted number of times. In December 1837 combinatorial wheels hold a count, and backing cards send the cards back to the first card, counted or always. 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 it counts, and up to April 1842 no page read lets a result of the mill choose between cards, apart from one variant of June 1839, not adopted, within one long addition.

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, because the machine, as first built, read a repetition count from the store. 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 from some n on it does not give 2↑↑n. With repetition counts from the store, a deck reaches 2↑↑n, but no deck gives 2↑↑↑n for every n. Each of these is proved in Lean. 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 every counter machine translates into a deck that halts exactly when the machine does. Given Minsky’s theorem (cited, not formalised), this machine is general. Every dated arrangement refuses those decks, and no page read sets a count inside the group it counts.

06 / OR CHANGE WHAT COUNTS AS THE END

So far a run ends by passing its last card, and 1 ÷ 0 is an error. Read such a stop as the end of the run instead. While every backing card is counted, nothing changes. But the pages also give a card that always orders the backing; with it, 30 May 1838 becomes general under either reading, given Minsky’s theorem, and December 1837 does if repetition counts come from the store. With counts from number cards only, December 1837 is open. No text read treats such a stop as the end of a computation.

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. With a halt as passing the last card, December 1837 is strictly weaker than 30 May 1838 under both readings; with a trap read as the end and counts from the store, both are general.

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 behind section 07, including the larger of two numbers, are run in Rust only.

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.

  1. 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

    MANUSCRIPT JSON ↗ · BIBTEX ↗ · CSL JSON ↗

  2. 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

    MANUSCRIPT JSON ↗ · BIBTEX ↗ · CSL JSON ↗

  3. 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

    MANUSCRIPT JSON ↗ · BIBTEX ↗ · CSL JSON ↗

MACHINE-READABLE HISTORY ↗

SOURCES & PROVENANCE

AUTHOR / Chris Hay · VERSION / 1.1

PUBLISHED 27 NOV 2026 · REVISED 1 DEC 2026 · VERSION 1.1

CITE

CITE THIS

Research note · 1.1

Hay, C. (2026). Where Babbage’s 1836 count comes from decides what his engine could compute. (Version 1.1). Chris Hay. https://chrishayuk.com/records/N-BABBAGE-CONTROL/1.1