In January 1836 Babbage charted how his engine’s mill would multiply, divide and take a square root. Rebuilt models are proved correct in Lean, division and root given H-OD, a rule this project proposes; how his mill caught an overshoot is not known.
Published manuscript · v1.2
01 / THREE CHARTS IN ONE WEEK
In one week of January 1836, Charles Babbage charted three calculations for the mill of his Analytical Engine: the part of the engine that does the arithmetic. On the 11th he charted a multiplication. On the 13th, a division. On the 15th, a square root. None of them uses a table of multiples worked out in advance. Each chart follows the calculation through, band by band, as the mill’s wheels change. Here is the first thing to notice. Every number on the division and root sheets is right. And the columns of numbers on the division sheets, and on the first root sheet, are a fair copy: the starting numbers at the top, the results at the end of each band, and no working anywhere. So what would a mill have to do, wheel by wheel, to write these sheets? What happens if we rebuild it in software and run it against them?
BAB/F/018, Multiplication without table (Science Museum Group) ↗
BAB/F/021, Division without table, sheet 1 of 4 (Science Museum Group) ↗
02 / A FEW PRIMITIVES
How little does a mill need in order to multiply, divide and take a square root? Less than you might think. Nothing in the reconstruction adds, multiplies or divides whole numbers in one go. Everything happens on figure wheels. Each wheel holds one figure, and its place in the number is called its cage. The wheels turn one tooth at a time, in nine rows of movement. When a wheel passes between 9 and 0, it is warned. Carriage, Babbage’s word for carrying, acts on those warnings afterwards. Or it is prevented, which will matter later. Add giving off and retaining (passing a number to another wheel, with or without keeping a copy), a step that moves every figure up one cage, and a counter that runs up when its work is done. That is all the three operations need. The same pieces, tooth by tooth, are in the earlier note on multiplication.
03 / ONE LOOP FOR DIVISION AND SQUARE ROOT
Division and square root look like different problems. In the rebuilt mill, they are the same loop. For each figure of the answer: subtract, then test. If the subtraction did not go too far, make the borrows (carriage, in subtraction) and count one more. If it did, undo the subtraction and step up. The only difference between the two is what gets subtracted, and how it moves. With nothing else changed, the loop writes the division chart’s 11 compared states and the root chart’s 11, in order. It also gets the right answer on 3,000 random operands. One thing it does not work out for itself: it is told how many figures to make and where to start.
04 / “CARRIAGE PREVENTED”
Six of the subtractions on the two charts go too far: the number taken away is larger than what is left. On exactly those six, Babbage wrote “Carriage prevented”. That is a puzzle. To prevent the carriage, the mill must know the subtraction has gone too far before the borrows are made. How could it tell? This project proposes a rule for it, called H-OD, which reads from the wheels whether the subtraction went too far. It agrees with the charts in 12 cases out of 12, and it is proved to be the same as comparing the two numbers. But H-OD is a hypothesis, not something read in Babbage’s papers. Apart from his plans of 1834–35 to compare the numbers first, or to try the subtraction on a copy, every source of 1834 to early 1836 that was read finds out about an overshoot afterwards, from the running up: a borrow leaving the top of the number.
05 / THREE WAYS TO STOP A FIGURE
Babbage’s papers give two other ways to stop a figure. In 1834 he planned to compare the numbers first. In 1835 he subtracted until the wheels ran up, then added back. Rebuilt on the same wheels, all three ways give correct answers. But only carriage prevented writes every compared state on the charts. Why keep the method he kept in 1835? In March of that year Babbage gave his reason, and it was machinery: it needed so few axes (columns of figure wheels) and carriages that “two divisions or even three might be carried on together”.
The three ways, run side by side ↗
06 / WHAT IS PROVED
The rebuilt controllers were also written in Lean, a language for mathematical proofs that a computer checks step by step. The proofs are finished: none is left incomplete, and nothing is assumed beyond Lean’s standard axioms. Multiplication is proved correct as long as the numbers fit on the wheels. Division and square root are proved correct on a condition: that overshoots are decided by H-OD, and that the numbers start from a valid alignment. The chart cases themselves are computed in Lean too. Each rung of the ladder says what it rests on.
The milestone: what is proved and what it is evidence of ↗
Multiplication (formal/Babbage/Mill.lean) ↗
07 / CORRECTNESS IS NOT IMPLEMENTATION
The proofs say the models compute correctly. They do not say Babbage’s mill did. Division and square root rest on H-OD, and no source supports it as his mechanism. The Lean and Python versions of the controllers are not proved to be the same program. Lean takes each row cage by cage; Python works in sequence. That they match is argued, not checked by a run. Parts of the machine are left out. The bolting that chooses which wheel gives off, and the gearing, are not in the proofs. The number of figures in a quotient or root is supplied from outside. And every comparison rests on transcriptions of the charts: readings by a coding agent, an AI model, from the Science Museum Group’s images.
WHAT THIS DOES NOT SHOW
- That Babbage’s mill of January 1836 decided overshoots by H-OD, or by any mechanism acting before the borrows. The charts write the decision; the sources read do not say how it was made.
- Why Babbage moved from comparing first in 1834 to subtracting and restoring in 1835–36, beyond his March 1835 note that the method kept needed fewer axes and carriages. The measured trade-offs belong to this model.
- That the Python and Lean controllers are the same program.
- That the transcriptions are final. They are readings by a coding agent (an AI model) from the Science Museum Group’s images.
Prove what the model computes; say separately what the machine was.
How did the January 1836 charts know, in the band itself, that a subtraction had overshot?
Open here: a detection mechanism of late 1835 not yet found (the trial on a copy of March 1835 was passed over); a running up felt before the borrows were all made; or charts written knowing the arithmetic, as specifications of machinery still to be designed. The carriage drawings of 1834–35 read so far show none.
Thematic notebook / Published record
Closing thought
Built from a few primitives on figure wheels, one controller regenerates Babbage’s January 1836 multiplication and one subtract / test / carry-or-restore loop the 11 compared states of his division and the 11 of his square root; Lean models of the controllers are proved correct and terminating, division and root given H-OD. Of three ways to stop a figure found in his papers — comparing first (1834), subtracting until a running up and adding back (1835), and carriage prevented — only the last writes every state on the charts.

![BAB/F/021, cover (Division without Table, sheet 1 of 4): "Division / without Table / 13 Jan 1836 / Divide 9889 by 49". "by" is raised; the tail of its y sweeps down and to the left under "9889"; two short dashes below "49" [?stray marks]. The sheet number at the top right of the cover is outside the crop.](/media/notebook/babbage-arithmetic/1836-01-13-divide-9889-by-49-cover.jpg)
![BAB/F/024, table (Division without Table, sheet 4 of 4), bands 2 and 3, right-hand end: Columns from "Figures upon Axis B" to the right edge (R1 Cir, a second Axis A, Figure wheels N.º 3–4, SS, S1, the quotient cages n, n−1, n−2), heads not in the crop. Band 2 (margin "11"): short up arrows in row 2 under R1 Cir and Fig. wheel N.º 3, "Figs Zeros" in row 3, and in the quotient cages "2 0 1"; "04000" at the foot of Figures upon Axis B; above the rule the next band's labels "B 7" ↓.2 and "B 9" ↓.6. Band 3 (margin "12"): a long down arrow and two dashed (stepped) shafts, "Zeros Figs"; "Step up" written across; "↑.2" and "↑.6" in row 12; "40000" at the foot of Figures upon Axis B; labels "U 7", "U 9" at the foot. Stamp "BAB.[F] 24". Outside the crop: the column heads at the top of the sheet; band 1 (quotient "2 0 1", "00100" at its foot); band 2's "Rec.e addition of divisor without carriage" and "Carriage prevented" to the left.](/media/notebook/babbage-arithmetic/1836-01-13-division-quotient-201-remainder-04000.jpg)
![BAB/F/029, table, right half (Square Root, sheet 4 of 4), band 3, right part: The end of the root. In the quotient cages n, n−1, n−2, row 3: "2 0 1". "Twelfth" in pencil across the middle. At the foot of Figs on Div axis: "020000", with a dot over the 2 and over the fourth figure. At the left: "Give off" written vertically and a long down arrow; "Put back / ↓.2 ↓.6 / the levers / upon b 10". Label row at the top "↑.45 ↑.2 ↑.6"; next band's labels at the foot "U.6", "U 4", "B 3", "B [?7]" (blotted), "B 9". Stamp "BAB. [F] 29". Outside the crop: the column heads ("Cages where quotient is registered n n−1 n−2") at the top of the sheet, and "Return the Divisor", "Sign changed from − to +", "Carriage prevented" to the left.](/media/notebook/babbage-arithmetic/1836-01-15-square-root-root-201-remainder-020000.jpg)

![Scribbling Book Vol. II (BAB/S/1/02), p 50 (image 26): Left: "1 Jan 18[?3]6" (the 6 heavy, written over another figure [?5]) / "with Carr." / "00235" / "99765", with a curved stroke from "with" round to "00002935" below; at the far left "0000 / 8175)"; under it "00008174 / 00008175" (the second cut at the foot). Right: "without Car." ("thout" underlined) / "00235" / "00875" (the 5 inked heavily) / "11110" (the first 1 heavy) / rule / "99765" / "00235". At the right edge, parts of a division: "52)", "15", "20/52" and "5/13" [?]. The rest of the left column ("Rem.", "99999999 / 00002935 / 99997064 without") and the series for tan below are outside the crop.](/media/notebook/babbage-arithmetic/1836-01-01-subtraction-without-carriage-11110.jpg)
![BAB/F/026, table, right half (Square Root, sheet 1 of 4), head and bands 1–3, the Dividend block: Head: "Dividend"; columns "Car / riage / c", ″g, ″g1, "O2 ca", "T2 cs"; "Divisor N.º 1 / Transferred" over "Axis V1 / Ver Cir" and "J1"; "Car / riage / ′c", ″g2, ″g3, "O3 ′ca", "T3 ′cs"; "Divisor N.º 2 / Transferred" over "Axis V2[?] / Ver Cir" and "J2[?]"; ′S′S, ′S1, "Wire Axis", "Figs on Dividend Axis". In the label row under the head: "040601". Band 1: no words in these columns; "040601" again at its foot. Band 2: "Suffer Subt.n of 1" across; "Receive Divisor" written vertically; "030601" at the foot. Band 3: "Suffer Subtraction of 3" across; "Bring to Zero" and "Receive Divisor" written vertically; "[Ca]rry" cut at the left edge; "000601" at the foot. Labels and arrows such as "B 1 ↑1.1", "B ↑.45", "B 4 ↑.6", "B 6 ↑.2", "U 4", "U 6". The subtraction of 5 (and its overshoot, "Carriage prevented", 050601) is on F/027, not on this sheet. Outside the crop: the left half ("Receive Addition of 1", "of 3", "of 4" on the divisor axes) and the quotient cages ("0 0 0", "0 0 1") at the right.](/media/notebook/babbage-arithmetic/1836-01-15-square-root-head-040601-subtract-1-and-3.jpg)


![Scribbling Book Vol. XIII (BAB/S/1/13), "Sketch of the history", image 91, left page (stored upside down): Region is in stored pixels; the crop is turned 180° to read. "During the time M.r Jarvis was drawing / plan dated 27 Nov. I was occupied / in designing a plan for long Div.n / 1st I proposed that feelers should try the / 1st fig.[?s] both of Div.r and dividend if the former / were smallest subtract and proceed as / before if the latter advance one fig to / the right and proceed as before / If the 1st fig.[?s] of each are equal feel / the 2nd and so on untill an inequality / take place — and then as before / at each sub.n register one for the quotie[nt]" (the last word runs into the gutter). The paragraph above ("These were put together in a plan … dated 27 Nov.ber", "29 Dec Drawing of fig. axis and cages", the note on reduction to zero) and the one below ("Multiplication was previously decided on …") are outside the crop; the tops of the letters of the line below show at the foot. The history is a retrospect written in 1836.](/media/notebook/babbage-arithmetic/1834-history-feelers-try-first-figures.jpg)
![Scribbling Book Vol. XIII (BAB/S/1/13), p 30 (image 17): Head of p 30: "History of contrivances for Division" / "Feelers & Snails —" / [margin] "1" "Feel on all snails in succession / and back feelers if necessary / very complicated with curious movements / but not fully contrived —". The date 13 March 1835 is at the foot of p 31, not in this crop. Method 1 of the five only.](/media/notebook/babbage-engine/1835-03-13-history-of-contrivances-for-division.jpg)
![Scribbling Book Vol. XIII (BAB/S/1/13), p 30 (image 17), method 2: [margin] "2" "Always lower feelers ⟨when?⟩ with 1[?st] fig of Divisor and / 1 fig of dividend are equal / This was contrived but caused much / loss of time by making in many cases / 10 subtr.ns instead of one". "when?" is interlined in pencil above "with". The tails of method 1 show at the top edge and the top of method 3 ("Subsidiary Axis introduced …") at the foot. The heading "History of contrivances for Division" is above this crop (see the babbage-engine crop of the head of p 30); the date 13 March 1835 is at the foot of p 31.](/media/notebook/babbage-arithmetic/1835-03-13-feelers-ten-subtractions-instead-of-one.jpg)
![Scribbling Book Vol. XIII (BAB/S/1/13), p 31 (image 17), end of method 5: "This only require the axes a and A / and the quotient and register Axis and only / two carriage therefore two divisions / or even three might be carried on together 13 March 1835". The top line is slightly cut at the top edge, with the tail of "mult. pinion" from the line above. At the foot, cut: the start of the later note "25 March. It is observed that …" [the rest outside the crop]. The beginning of method 5 ("The change through zero was now applied …", "running up of 999 …") is at the foot of p 30 and the top of p 31, outside the crop.](/media/notebook/babbage-arithmetic/1835-03-13-two-or-three-divisions-together.jpg)
![Scribbling Book Vol. II (BAB/S/1/02), p 15 (image 8): "In the simplest mode of dividing / Step up both to top this takes [?½] · 30 − q turns / subtr ⟨one from other⟩ and register ditto ditto untill a run[?up] / -ning up when add complement / sum of digits in quotient + 2". A curved line brackets the paragraph at the left; "one from other" is interlined above "and". At the end of the third line a small mark under "run" may be "up" or a flourish [?]; the word continues on the next line as "-ning". At the far left, a struck pencil mark and part of an unrelated fraction "2r(x−r²) / 3r²+x" (cut at the left edge). The date "30 Nov. 1835" is at the top of p 14, outside the crop; the time count for division by table ("Step up Div.nd to top …") is above the crop.](/media/notebook/babbage-arithmetic/1835-11-30-subtract-until-running-up-add-complement.jpg)