The Lovelace–De Morgan mathematical correspondence: A critical re-appraisal

Ada Lovelace is widely regarded as an early pioneer of computer science, due to an 1843 paper about Charles Babbage’s Analytical Engine, which, had it been built, would have been a general-purpose computer. However, there has been considerable disagreement among scholars as to her mathematical proﬁciency. This paper presents the ﬁrst account by historians of mathematics of the correspondence between Lovelace and the mathematician Augustus De Morgan from 1840–41. Detailed contextual analysis allows us to present a corrected ordering of the archive material, countering previous claims of Lovelace’s mathematical inadequacies, and presenting a more nuanced assessment of her abilities. über die Korrespondenz der Jahre 1840–41 zwischen Lovelace und dem Mathematiker Augustus De Morgan. Detaillierte Kontextanalyse erlaubt es uns, eine korrigierte Anordnung des Archivmaterials vorzulegen, die bisherigen Meinungen über die mathematischen Unzulänglichkeiten von Lovelace entgegenwirkt und die eine nuanciertere Bewertung ihrer Fähigkeiten erlaubt. whereas it might be supposed that the application would never be complete until it embraced geometry of three dimensions. No such extension has however yet been made; though it is not unreasonable to suppose that it may be made at some future time.


Introduction
On 21 January 1844, the English mathematician Augustus De Morgan wrote a confidential letter to Lady Noel Byron about her 28-year-old daughter, Augusta Ada King, the Countess of Lovelace, who De Morgan had tutored as a private pupil in various areas of advanced mathematics for about eighteen months in the early 1840s. In his letter, while he was at pains to stress that "I have never expressed to Lady Lovelace my opinion of her as a student of these matters" [i.e. mathematics], De Morgan wrote: I feel bound to tell you that the power of thinking on these matters which Lady L[ovelace] has always shewn from the beginning of my correspondence with her, has been something so utterly out of the common way for any beginner, man or woman, that this power must be duly considered by her friends, with reference to the question whether they should urge or check her obvious determination to try not only to reach but to get beyond, the present bounds of knowledge. 1 Not content with such high praise, to reinforce his point he continued: Had any young [male] beginner, about to go to Cambridge, shewn the same power[s], I should have prophesied ... that they would have certainly made him an original mathematical investigator, perhaps of first rate eminence (LB 339, ADM to Lady Byron, 21 Jan. 1844, f. 2). De Morgan's letter was written a few months after the publication of the paper for which Lovelace is now famous-her translation, with extensive appendices, of Luigi Menabrea's Notions sur la Machine Analytique de M. Charles Babbage (Lovelace, 1843). Since the dawn of modern computing in the midtwentieth century the paper has been regarded as a remarkable account, which presents Charles Babbage's design for a general purpose computer, his Analytical Engine, not in terms of mechanical detail, but as what would now be called an "abstract machine", making it readily understandable to modern readers. As well as broader speculation about the potential of the machine, for example to do algebra or compose music, the paper contains a large table setting out the calculation of the seventh Bernoulli number, often called the "first computer program". 2 A thorough treatment of the content of Lovelace's paper is given in Haigh and Priestley (2015) and Misa (2016) and the references cited therein.
In the two hundred years since her birth, Lovelace's life and work have received much attention, with opinions ranging from "genius" to "charlatan". In her lifetime she was most famous, not for her scientific work, but as the daughter of the poet Lord Byron, brought up by her mother following her parents' acrimonious separation when she was a few weeks old. An extensive archive of family papers has provided the subject matter for scholarly biographies, quantities of secondary literature, and numerous popular articles and websites: for surveys see (Hollings et al., 2017;Misa, 2016), and references therein. However our work appears to be the first time that historians of mathematics have studied the material in detail.
In Hollings et al. (2017), changing opinions of Lovelace's mathematical ability, and the influence they have had on scholarly and popular accounts, are reviewed. In summary, during her lifetime she was held in respect by the British scientific community, and deferential references to the 1843 paper and her mathematical ability continued through the mid-twentieth-century in literature on computing. However, one of the earliest biographies, by Dorothy Stein, which remains the most detailed in its analysis of Lovelace's scientific interests, argues that her elementary mathematical errors and frequent questions to De Morgan and others on matters of detail (Stein, 1985, pp. 84, 89-91) are "evidence of the tenuousness with which she grasped the subject of mathematics," claiming that such evidence "would be difficult to credit about one who succeeded in gaining a contemporary and posthumous reputation as a mathematical talent, if there were not so much of it".
This work influenced later authors to argue that her contribution to the 1843 paper must have been slight: for example Babbage scholar Allan Bromley was fairly neutral in Bromley (1982), whereas his essay in Aspray's overview of computing history (Aspray, 1990), concluded: "Not only is there no evidence that Ada ever prepared a program for the Analytical Engine, but her correspondence with Babbage shows that she did not have the knowledge to do so" (Bromley, 1990, p. 89). More recently in a thorough survey of the ongoing debate, Thomas Misa concluded that Lovelace's paper of 1843, including its mathematical content, was "the product of an intense intellectual collaboration" between Lovelace and Babbage (Misa, 2016, p. 18). Stein's largely unquestioned downplaying of Lovelace's mathematical competence also seems to have shifted focus to the more reflective aspects of the paper, with a number of writers building on Betty Toole's view of Lovelace as "a synthesizer and a visionary" who "saw the need for a mathematical and scientific language which was more expressive and which incorporated imagination" (Toole, 1992, p. 2).
Thus this paper addresses two related questions: whether Lovelace had the mathematical knowledge and skills to contribute to the 1843 paper, and whether De Morgan's claim of her mathematical potential was justified. Our work is underpinned by a crucial corrected ordering of the archive material, and by what is, surprisingly, the first detailed analysis by historians of mathematics of Lovelace's mathematical correspondence with Augustus De Morgan. We draw upon recent research in the history of mathematics, in particular a close knowledge of De Morgan's related work, and show that, by the beginning of 1842, Lovelace had acquired a solid grounding in several areas of what was then university-level mathematics, a critical attitude towards underlying principles, and the ability to make perceptive and far-reaching mathematical observations. Our work thus challenges earlier judgements impugning her competence to contribute to the 1843 paper, and her potential, in time, for mathematical research.
The present paper is a sequel to our work on Lovelace's mathematical education before 1840 (Hollings et al., 2017), in which we analyse Lovelace's eclectic and largely self-administered mathematical education, rooted in an older tradition of practical mathematics and synthetic geometry, with a later exposure, thanks to Mary Somerville, to the newer analytic approach based on continental mathematics. That detailed contextual study allowed us to challenge Dorothy Stein's assertion that Lovelace's correspondence with Somerville is evidence of profound lack of ability (Stein, 1985, pp. 55-56), and Doron Swade's claim that in the late 1830s Lovelace lacked the background to have understood accounts of Babbage's earlier Difference Engine (Swade, 2000, pp. 166-168).
In the present paper, Section 2 gives the background to Lovelace's correspondence course with De Morgan, and an overview of the content and context. Section 3 shows some of the difficulties she encountered, and how studying with De Morgan developed her knowledge, skills and approach to learning. Section 4 shows her emerging strengths of attention to detail, interest in big questions, and desire to tackle problems from first principles, illustrated with a extended analysis in their historical context of her prescient and correct observations on George Peacock's principle of the permanence of equivalent forms, and her speculation on possible extensions to complex numbers. Section 5 presents our further new research contribution: a contextual analysis which provides a corrected ordering of the archive material, enabling further challenge to claims by Stein of Lovelace's mathematical weaknesses. Section 6 draws together our judgement of her mathematical knowledge and potential, and reviews briefly opportunities for further research by historians of mathematics.

Background
Ada, Countess of Lovelace (1815Lovelace ( -1852 was the daughter of the poet Lord Byron (1788-1824) and his wife Annabella (née Milbanke) . Under Lady Byron's guidance, with the assistance of governesses and informal tutors, the young girl was introduced to arithmetic and practical geometry, before progressing to the study of Euclid's Elements in her later teenage years: she also developed an interest in mechanical devices, and read widely in the popular mathematical and science literature of the day (Hollings et al., 2017).
In 1835 she married William, the eighth Baron King of Ockham, becoming the Countess of Lovelace on her husband's elevation to an earldom three years later (Moore, 1977, pp. 69, 92). Although her new married life, plus the birth of three children between 1836 and 1839, somewhat interrupted her mathematical studies, she endeavoured to maintain them, in part via a friendship and correspondence with the mathematical and scientific writer, Mary Somerville (1780-1872). 3 But face-to-face interaction was rendered impossible after 1838, when Somerville moved with her husband to Italy.
By late 1839, Lovelace was actively making enquiries for a suitable mathematical tutor. Letters from this time reveal that she recruited her friend and scientific mentor Charles Babbage (1791Babbage ( -1871, who she had known since her late teens, to make enquiries to find her an appropriate instructor, but that this search was, initially at least, unsuccessful (Huskey and Huskey, 1980, pp. 306, 308). However, by the summer of 1840, Lovelace could report to her mother that a tutor had been found and that her mathematical studies were once more underway (LB 41, AAL to Lady Byron, 29 July [1840], f. 179v). She was now working under the tutelage of Augustus De Morgan (1806Morgan ( -1871. De Morgan was a Cambridge graduate and part-time actuary, who had been appointed the first professor of mathematics at the London University (now called University College London, or UCL) in 1828. A talented and patient teacher (Rice, 1999), De Morgan was a prolific writer on all areas of mathematics, publishing numerous research papers, largely on algebra and logic, as well as countless popular articles, book reviews, encyclopedia entries and textbooks, several of them written for the contemporaneous Society for the Diffusion of Useful Knowledge (S.D.U.K.) of which he was a prominent member (De Morgan, 1882, pp. 401-415). His most substantial publication was The Differential and Integral Calculus, an 800-page compendium published in 25 instalments by the S.D.U.K. between 1836 and 1842, and which he was still in the process of writing while tutoring Lovelace. De Morgan was also actively involved in another long-term S.D.U.K. project, the Society's Penny Cyclopaedia, which appeared in 27 volumes from 1833 to 1843, and for which he wrote almost all the entries on the mathematical sciences, numbering over 700 and comprising roughly one-sixth of the entire publication (De Morgan, 1882, pp. 407-414).
Well connected with the scientific and liberal intelligentsia of the day, De Morgan's marriage to Sophia Frend (1809-92) in 1837 had widened his social circle still further and, since his wife had been well known to the Byron family since childhood, it was not long before he was introduced first to Lady Byron and eventually to Ada Lovelace (De Morgan, 1882, p. 89). 4 The arrangement between the student and her new tutor was simple: Lovelace essentially undertook what would nowadays be called a "correspondence course" with De Morgan, which consisted of guided independent reading along with a variety of pertinent problem exercises. This material came largely from De Morgan's own published textbooks and articles, supplemented on occasion by other relevant works. In addition to this, when Lovelace travelled from her home in the country to her London residence in St. James's Square, there were some occasions when the professor and his pupil would meet face-to-face, either in St. James's or at the De Morgan family home at 69 Gower Street in Bloomsbury. It is clear that this arrangement seems to have worked well and certainly appears to have been agreeable to Lovelace, as she wrote in July of 1840: "I think the professor suits me exceedingly well" (LB 41,AAL to Lady Byron,f. 179v).
Of the correspondence that passed between Lovelace and her teacher, only a subset survives and it is by its very nature fragmentary. The 63 letters (43 from Lovelace, 20 from De Morgan) appear to cover a period of about eighteen months from around July 1840 to January 1842, although we cannot be certain of this since De Morgan and (especially) Lovelace seem to have been rather lax about dating. Nevertheless, we can tell that the correspondence proceeded in fits and starts, sometimes moving very rapidly indeed, while at other times being interrupted for weeks on end by lack of activity, before eventually coming to a halt.
In her earliest letters, Lovelace left no doubt that the subject on which she wished to focus her attention was calculus-and she wanted to get to it as soon as possible. With this goal in view, the first few months of her correspondence course with De Morgan (July-October 1840) were concerned with preliminary matters such as ensuring that Lovelace had the necessary foundational knowledge. It quickly transpired that there were significant gaps, and De Morgan was quick to warn her of the periodic digressions into algebra and trigonometry that would be required to fill them: "You understand of course that your Diff[erentia]l Calculus must be delayed from time to time while you make up those points of Algebra and Trigonometry which you have left behind" (LB 170, ADM to AAL, 27 Sept. 1840, f. 16r).
Very soon, in consequence, we find Lovelace working her way through De Morgan's textbooks on algebra, trigonometry and ratio and proportion, as she reviewed (or perhaps learnt for the first time) coordinate geometry, functions and functional equations, inequalities, logarithmic and exponential functions, and infinite series. By November, however, she was taking her first steps in the differential calculus, not just by using De Morgan's publications, but also by studying A Collection of Examples of the Application of the Differential and Integral Calculus (1820), written by Babbage's undergraduate contemporary and De Morgan's erstwhile Cambridge tutor, George Peacock. 5 The winter of late 1840 and early 1841 saw Lovelace working feverishly through De Morgan's Differential and Integral Calculus to master the concepts of the differential calculus: limits, continuity, convergence, and countless rules and procedures. By February 1841, she reported to her mother that "All is prosperous. The Mathematics & Mr De Morgan going on very well indeed. You would be much pleased to see the heap of papers of my writing, which have now accumulated into honourable & substantial evidence of my steady industry for some months past" (LB 42, AAL to Lady Byron, 24 Feb. [1841], ff. 20r-20v). In late February the correspondence broke off for some months, apparently because of the distress caused by the revelation of her late father's alleged relationship with his half-sister Augusta Leigh. Although in a letter to Sophia De Morgan that spring she maintained that "the Differential Calculus is king of the company;-& may it this work as a favour to his wife (and the Byron family). Certainly no money appears to have changed hands-although there are quaint references to, and thanks proffered for, partridges and other game received from the Lovelace estate! (LB 170, ADM to AAL, ff. 12v, 34r). 5 This book had been written by Peacock to supplement the more theoretical material contained in the famous translation of Lacroix's Traité élémentaire de calcul différentiel et de calcul intégral, published by Babbage, John Herschel and himself in 1816. By 1840, it was long out of print and becoming quite rare. Indeed, in one letter Lovelace remarked that her second-hand copy had cost £2, 12 shillings and sixpence, equivalent to nearly £200 in today's money! But De Morgan assured her that this was money well spent: "Peacock's examples will be of more use than any book" (LB 170, ADM to AAL, 15 Sept. 1840, f. 14v). ever be so!" (LB 170, AAL to Sophia De Morgan, [Spring 1841], f. 60v), contact with the professor did not resume until June 1841 after a four-month break, with Lovelace apologising that "I am a little vexed at this interruption. I was going on so nicely" (LB 170, AAL to ADM, [June 1841], f. 50v). By this point, she had begun the study of integration, which proceeded throughout the summer of 1841, with brief incursions into differential equations and mechanics. By the autumn of that year, she had become interested in the algebra of complex numbers, at which point she read De Morgan's Penny Cyclopaedia article on "Negative and Impossible Quantities" (De Morgan, 1840a). This article led straight into a subsequent piece entitled "Operation" (De Morgan, 1840b), which contained a reference to an entry in the same volume on the "Numbers of Bernoulli" (De Morgan, 1840c). 6 In this way, Lovelace was first introduced to the subject of Bernoulli numbers-which would ultimately form the mathematical basis of her famous table in the 1843 paper. The information that enables us to make this deduction is contained in the very last letter of substance from Lovelace to De Morgan, dated November 1841. The next one, from January 1842, merely remarks that she has been very mathematically unproductive recently. And from that point, the correspondence, such as it now exists, is essentially over.
Although the content of the letters is almost entirely mathematical, there are occasional references to current events that help to put the material into historical context. Such matters include the birth of the De Morgans' third child, George, and the pregnancy of Queen Victoria (who was then carrying the future king, Edward VII); the Lafarge murder trial 7 ; and the death of De Morgan's father-in-law in February 1841. These contemporary references are useful in helping us to date some of the letters, since the majority are either undated, contain only the day and the month (minus the year), or have merely a phrase like "Monday evening" to indicate the date of composition. Moreover, Lovelace is particularly guilty of writing what is clearly the wrong day of the week for the date indicated. 8 To complicate matters further, two of Lovelace's recent biographers Dorothy Stein and Betty Toole have, we believe, fallen into the very understandable trap of assigning incorrect dates to a few of her letters.
In the case of Toole's work, this has little to no effect on the overall picture she presents, merely resulting in a couple of letters being presented, in our view, out of sequence. In the case of Stein's analysis, however, the erroneous dating weakens a portion of her argument significantly, since it depends on a particular letter's dating from late 1842. As will be shown in Section 5, our research presents a compelling case for an earlier date, which in turn forms the basis of our challenge to Stein's claims mentioned in Section 1. We therefore now present a representative sample of the Lovelace-De Morgan correspondence in detail, beginning with a survey of the mathematical areas Lovelace found challenging, followed by a discussion of some of her particular strengths.

Lovelace's mathematical challenges
All mathematics students, even the most competent and well-prepared, find some things difficult when they first encounter them, but it is rare to have such an articulate record of these difficulties, and the way the student learns from overcoming them.
In the intense interactions over this period we see Lovelace not only learning new material and repairing the gaps in her previous eclectic education, but also learning better habits of study from De Morgan: going more slowly, learning from mistakes, and having a realistic expectation of what can be achieved. She was an enthusiastic pupil and, initially at least, impatient to move as quickly as possible. In September 1840 she wrote: I could wish I went on quicker. That is, I wish a human head, or my head at all events, could take in a great deal more & a great deal more rapidly than is the case; and if I had made my own head, I would have proportioned its wishes & ambition a little more to its capacity. ... When I compare the very little I do, with the very much -the infinite I may say -that there is to be done; I can only hope that hereafter in some future state, we shall be cleverer than we are now (LB 170, 13 September [1840], ff. 48v-49v).
This eagerness is almost always countered by De Morgan's steady but reassuring words of caution: ... never estimate progress by the number of pages. You can hardly be a judge of the progress you make, and I should say that it is more likely you progress rapidly upon a point that makes you think for an hour, than upon an hour's quick reading, even when you feel satisfied. That which you say about the comparison of what you do with what you see can be done was equally said by Newton when he compared himself to a boy who had picked up a few pebbles from the shore ... so that you have respectable authority for supposing that you will never get rid of that feeling; and it is no use trying to catch the horizon (LB 170, 15 September 1840, f. 14r).
By November, Lovelace was beginning to see the wisdom of this advice. She reported to her mother: I work on very slowly. This Mr De Morgan does not wish otherwise. On the contrary he cautioned me against a wish I had at one time to proceed rather too rapidly (LB 41,29 November 1840, f. 187v).
As Toole observes (Toole, 1992, p. 85), Lovelace wrote to De Morgan when she encountered problems, and so it is inevitable that the bulk of the correspondence is devoted to her difficulties, those faced by many students learning calculus. We now consider examples to illustrate her poor background at the start of her studies, her persistence in addressing things she found difficult, often covering many pages with speculations before admitting defeat, and her increasing skill in recognising and learning from her mistakes. As she wrote to De Morgan: I used once to regret these sort of errors & to speak of time lost over them. But I have materially altered my mind on this subject. I often gain more from the discovery of a mistake of this sort, than from 10 acquisitions made at once & without any kind of difficulty (LB 170,22 December 1840, f. 70r).

Lack of background
After some preliminary suggested reading from various of De Morgan's Penny Cyclopaedia articlessuch as "Infinite", "Nothing" and "Limit"-Lovelace began her course of study with the introductory chapter of the Differential and Integral Calculus. All seemed to go well, and she appeared to have no difficulty in solving a simple algebraic question from mechanics (De Morgan, 1836Morgan, -1842. But she was unable to understand the next problem (see Figure 1). As is evident from De Morgan's reply to her (no longer extant) query, she does not appear to have come across the definitions of the words co-ordinate, ordinate and abscissa before, and indeed this material is not covered in the textbooks she had previously studied (Hollings et al., 2017). Since the solution to the above problem is simply the straight line y = 2 3 x, De Morgan explained, "If then P M = 2 3 OM, always, we have P M OM = 2 3 always, or the direction OP is always such as to make the angle P OM the same, namely that angle which has 2 3 for its tangent." But, he noted: "To see all this fully something of Trigonometry and the application of algebra to geometry is required" (LB 170, 17 Aug. 1840, f. 7v).
It was from this point that Lovelace began working her way through analytical geometry and trigonometry, while still reading the calculus text. One of the earliest results of this reading in the existing manuscripts is her attempt to sketch the curve of y = x 2 , which is preserved along with De Morgan's comment on it (see Figure 2). In her sketch, Lovelace took various x-values 1 4 , 1 2 , 3 4 , 1, 3 2 , . . . and drew corresponding lines of length 1 16 , 1 4 , 9 16 , 1, 9 4 , . . . perpendicular to the x-axis, tracing out the shape of the curve representing the function y = x 2 . But she could not understand why it is that the curve provides the geometric form of the function, "as I should have said that the perpendicular straight lines are the representation of the function, & I do not see any precise relation that the existing curve holds to them" (LB 170, [1840], f. 11). To this, De Morgan answered: "The precise relation is that this one curve, and no other, belongs to y = x 2 . Of course there could be no visible relation unless to a person whose eye was so good a judge of length that he could see the ordinate increasing with the square of the abscissa" (LB 170, [1840], f. 11).
This answer may have satisfied her initially, but Lovelace was soon puzzled again, this time by the representation of an arbitrary continuous function on page 45 of the Calculus (see Figure 3). To find the functional expression for such a curve would, wrote De Morgan, take "more than the skill of the most practised algebraist" (De Morgan, 1836-1842, p. 45); but Lovelace's apparent confusion seems to have arisen from his claim in another letter that "There must be an infinite number of different equations which  Such a significant gap in her mathematical knowledge must surely have given De Morgan pause, and in his reply, he patiently gave as unambiguous a definition as possible ("The equation of a curve means that equation which must necessarily be true of the coordinates of every point in it" (LB 170,15 Sept. 1840, f. 15r)) and contented himself with the more elementary example of a circle of radius a, centred at the origin.
This appears to have cleared up the misunderstanding, since no further questions of this kind occur in the correspondence. However, it shows both the gaps in her mathematical knowledge, and her ingenuity in trying to resolve them, in this case by working with an alternate idea of what the equation to a curve might be.

Elementary errors
As with many beginners, Lovelace sometimes made elementary errors, particularly in algebraic manipulation, a weakness already apparent before she started to study with De Morgan (Hollings et al., 2017). In a letter of 27 November [1840], 9 Lovelace was struggling with an exercise in functional equations (De Morgan, 1837, p. 206), introduced in Chapter 10 of De Morgan's Elements of Algebra.
Shew that the equation 9 We shall have more to say about the date of this letter later (see Section 5). is satisfied by for every value of a: and also that can have no other solution than φx = ax.
Although she was able to solve the second part, she admitted to being "completely baffled" by the first, unsurprisingly as she had made the beginner's mistake of misreading the question, thinking that both parts asked for the most general solution of the given equation, when in fact the first is only asking for verification of a single solution. As she grew more experienced she began to pose problems for herself, for example in 1841, when she tried to prove that d dx (x n ) = nx n−1 . She observed "It had not struck me that, calling (x + θ) = v, the form This passage and the previous one are often quoted as evidence of her particularly imaginative approach to technical material (Toole, 1992, p. 100): however as they are the only ones of this nature in several hundred otherwise straightforward pages, we feel that the claim is somewhat overblown. De Morgan encouraged her to do routine exercises to help her manipulative skills, which no doubt reduced the frequency and egregiousness of some of her errors, but she sometimes still struggled with algebraic intuition. For example, while reading De Morgan's Penny Cyclopaedia article on "Negative and Impossible Quantities" in September 1841, she came across the following passage (De Morgan, 1840a, p. 134): . . . it can be easily shown that any algebraical expression, however complicated, which is a function of √ (−1), can be reduced to the form A + B √ (−1), where A and B are possible 10 quantities. For instance (k being where A and B are determined as follows. Let Lovelace reported (LB 170,9 Sept. [1841], f. 123r) that she had "tried a little to demonstrate this Formula" (i.e. (1)) and-based on the assumption that tan θ = b a gives sin θ = b and cos θ = a-had obtained However, since she could get no further, she believed that the complete demonstration "must be a very complicated process" (LB 170,9 Sept. [1841], f. 123v). In fact, she was closer than she realised-if she had remembered that sin θ and cos θ are in fact equal to b/r and a/r, respectively, the demonstration would have followed easily. As Lovelace developed her skills she became better at spotting her own mistakes, as we see when she started to study calculus. She worked through Peacock's book and, for example (Peacock, 1820, p presumably via a repeated application of the product rule, obtaining "& I am inclined to think it is a misprint in the latter" (LB 170, 10 Nov. [1840], f. 63r). Nevertheless, it was she who was in error since she had forgotten to apply the chain rule to (b − x) 4 . De Morgan commented: "It is very common to suppose that if φx differentiated gives ψx, LB 170, 14 Nov. 1840, f. 20r). Sure enough, once Lovelace rectified the mistake she obtained the correct answer. Nevertheless, she remained puzzled as to why her solution to a different question was valid, when it contained exactly the same mistake. But her diagnosis of the problem was almost certainly correct: "I am inclined to think that my solution ... comes out right only because I have managed to make another blunder of a sign in the course of the proofs, which has corrected the first blunder" (LB 170, 16 Nov. [1840], ff. 146r-146v).

Calculus
Lovelace's questions to De Morgan as she started to study calculus show challenges that today's beginners, and their teachers, will recognise, and are echoed in debates on calculus instruction from De Morgan's day onwards.
Her understanding was sometimes not helped by De Morgan's somewhat imprecise definitions, and she became increasingly tenacious at questioning these. For example, he explained that the term definite integral is used "because the first and last values of the variable, ... a and a + h, are definite, defined, or given" (De Morgan, 1836Morgan, -1842. In contrast he defined an indefinite integral as evaluated from an arbitrary constant x = a to x = x, "which is an awkward way of saying that the last value of x is indefinite" (De Morgan, 1836Morgan, -1842. Thus, given a primitive function On the other hand, letting which, since a (and therefore also φ 1 (a)) was an arbitrary constant, gave the indefinite integral where "C + C 1 may be what we please" (De Morgan, 1836-1842, p. 101). Lovelace could not see why only the indefinite integral had the form φ(x) + C when "the argument at the top of page 101 seems to me to apply equally to the Definite Integral" (LB 170, [July 1841], f. 152v). Quite apart from the fact that φ(a) is just as much an arbitrary constant in (2) as it is in (3), Lovelace protested that "the assumption that when a is arbitrary, then any function of a, say φa, is also arbitrary, or may be anything we please, seems to me not always valid". Giving the example of φ(a) = a 0 , she asserted that "We may assume a = anything we like, but φa will not in this case be arbitrary" (LB 170, [July 1841], f. 153r). It is a clever example, and a reasonable argument; however, she has overlooked that in this particular case, since φ (a) would be zero, the value of its integral would indeed be a completely arbitrary constant.
Although she found infinite series difficult, there is no doubt that Lovelace was fascinated by them. One particular source of interest was Taylor's Theorem and its many ramifications; indeed she described herself in February 1841 as being "particularly curious about this wonderful Theorem" (LB 170, 6 Feb. [1841], f. 98v). De Morgan's proof of it began with the consideration of a special case, the Mean Value Theorem, which he stated as follows: "for some positive value of θ less than unity" (De Morgan, 1836Morgan, -1842 Why should θ be independent of a and h [?] we have never proved it to be so: all we have proved is that one of the numerical values of θ is < 1, or that this equation (4) can be satisfied by a value of θ < 1. As to what θ is, let ψ be the inverse function of φ so that ψφ x = x. Then Say that this is not a function of a and h, if you dare [!] In this case it was actually the professor, and not the student, who was in error; for in this reply De Morgan had made the erroneous assumption that φ is always invertible in the domain under consideration, which is by no means necessarily true. Consequently, Lovelace's doubts about the validity of his assertion and its use in proving Taylor's Theorem turned out to be well founded. For a logician of De Morgan's calibre, such a mistake was a rare occurrence, and spotting it must have given his student some confidence of her increasing skill.

Moving on to proof
By early 1841 Lovelace was going beyond working through examples in the text-book, and trying to develop her own proofs. Like many beginners, she sometimes found this challenging, but the two examples below exhibit her developing mathematical maturity in appreciating mistaken circular reasoning, and recognising for herself an invalid hypothesis.
Lovelace attempted her own proof of the derivative of x n , where n ∈ N, writing that "It strikes me as having the advantage in simplicity, & in referring to fewer requisite previous Propositions" (LB 170, 10 Jan. [1841], f. 82v). De Morgan's proof of this had relied on a generalisation of the product rule, namely (De Morgan, 1836-1842, p. 51): If u be the product of n functions P QR . . . then the product of all but P is u P , and so on; whence we have Letting u = x n = x · x · x · · · x (n times), the above formula gave him or nx n−1 . Although Lovelace's attempted proof no longer exists in the correspondence, references to it enable us to infer that she based it on De Morgan's definition of the differential coefficient (De Morgan, 1836Morgan, -1842), constructing the difference quotient expanding (x + θ) n into x n + nx n−1 θ + · · · + θ n , cancelling the x n , dividing by θ and then taking the limit as θ → 0. Of course there is nothing wrong with her proof, but as De Morgan noted in his reply, it does rely on the binomial theorem for the expansion of (x + θ) n . "Besides," he added, "if you take the common proof of the binomial theorem, 11 you are reasoning in a circle, for that proof requires that it should be shown that v n −w n v−w has the limit nv n−1 as w approaches v. This is precisely the proposition which you have deduced from the binomial theorem" (LB 170, [Jan. 1841], f. 34r). Sure enough, a few days later came Lovelace's acknowledgement that "my proof of the limit for the function x n is a piece of circular argument" (LB 170, 17 Jan. [1841], f. 85v).
Another example of mistaken reasoning, which a better knowledge of logarithms might have helped her to avoid, occurred when De Morgan asked her to "Try to prove the following. It is only when y = ax (a being constant) that dy dx = y x " (LB 170, 11 July [1841], f. 112v). Although a little uncertain as to the soundness of her answer, she sent it along, writing: "I do not feel quite sure that my proof is a proof. But I think it is too." Her argument ran as follows: Not surprisingly, given her uncertainty as to the logical correctness of her argument, she was a little defensive about its key premise, which she no doubt felt was also its chief weakness (LB 170, 15 Aug. [1841], f. 116v): To be sure you may say that there is a different Differential Co-efficient for every different initial value of x taken to start from, thus: And this is perhaps what invalidates my argument above.
She spotted the error for herself, reporting a few days later: "As for dy dx = y x , I see my fallacy about y x being a fixed quantity" (LB 170, 21 Aug. [1841], f. 122r).
Through the Lovelace-De Morgan correspondence, then, we are able to observe, over a period of approximately eighteen months, Lovelace progressing from a fairly elementary level to a working knowledge of several major branches of what was then university-level mathematics. The letters also reveal gaps in her knowledge, particularly in the early stages, and that her difficulties with algebraic manipulation were not fully overcome. But they also show the range of problems she encountered during her studies with De Morgan and how the problems and her questions about them increased in sophistication as she became more technically adept and proficient in handling advanced concepts.

Lovelace's mathematical strengths
To further develop our claim that Lovelace managed to attain a respectable level of mathematical competence, we now present in some detail four examples which show the increasing sophistication of the material she was studying, and exhibit qualities consistent with mathematical capability, understanding and insight: a keen eye for detail; an aptitude for critical thinking; the ability to make insightful observations; and a passing acquaintance with elements of contemporaneous mathematical research. We give a detailed account of her challenge to De Morgan's use of Peacock's "Principle of the Permanence of Equivalent Forms", where she was correct; explore her prescient speculation about a possible extension of the complex numbers to higher dimensions; and exhibit some of the research material to which she was being introduced.

A keen eye for detail
In his autobiography, Charles Babbage recalled that, during the composition of Lovelace's paper on his Analytical Engine, while it was he who had performed the algebraic manipulations necessary to explain the machine's computation of Bernoulli numbers, it was Lovelace who had "detected a grave mistake which I had made in the process" (Babbage, 1864, p. 136). Her studies with De Morgan also display this keen eye for mathematical detail, and their correspondence contains multiple claims by Lovelace to have spotted errors or misprints in the various textbooks she was reading, most of which turned out to be valid.
Some of the errors were simple typos, others presumably careless mistakes by De Morgan; in a few extant cases, he acknowledged the errors, either in his correspondence to her, or in a subsequently printed errata section of the publication. Indeed, one wonders whether De Morgan might have appreciated Lovelace's utility as a proof reader for some of his publications! Of course, despite this careful reading, not all of Lovelace's corrections were correct. In an interesting example from the correspondence, we see Lovelace spotting an apparent mistake in De Morgan's Calculus, only to discover while writing that it was she who was in error.
The matter concerned the definite integral +a −a x n dx, where n is an integer, which De Morgan claimed was "= 0 when n is odd, = 2a n+1 n + 1 when n is even" (De Morgan, 1836Morgan, -1842 As well as spotting mistakes, Lovelace would also sometimes draw attention to unclear statements. For example in September 1841, she wrote to complain about a passage in his Calculus, in which De Morgan tried to argue that adherence to the standard rules of algebra would produce consistent results, regardless of the meanings of the various symbols. Given a set of symbols a, b, c, . . . representing real numbers, and a given algebraic process, De Morgan claimed the result obtained would be consistent with that obtained using the expressions regardless of whether the symbols under the square roots represented positive real numbers or not. What he wrote was somewhat misleading: "[S]o far as results are concerned, the application of rules will have the same effect whether √ m, √ n, &c, represent [real] quantities or not, provided only that they be used as if they were [real] quantities. If, then, instead of m, n, &c., we write −1 at the end of the process, we shall produce the same results as if we had commenced with a + √ −1 − √ −1, &c., that is, with a, &c. (because since √ −1 is to be used as a quantity, √ −1 − √ −1 = 0)" (De Morgan, 1836-1842, pp. 119-120). Lovelace challenged him, writing: "It is true that in the form a + √ m − √ n, if (−1) be substituted for m and n, the results come out the same as if we work with a only, but were the form a + √ m, a − √ m, a × √ m, or fifty others one can think of, surely the substitution of (−1) for m will not bring out results the same as if we worked with a only; and in fact can only do so when the impossible expression is so introduced as to neutralize itself, if I may so speak" (LB 170,19 Sept. [1841], f. 128r). Thus Lovelace's concern was not the use of imaginary quantities, but the lack of sufficient generality in the example used by De Morgan to corroborate his point-a valid criticism to which we shall return.
Such examples confirm the intensity of Lovelace's attention to detail and her keen eye for clarity and consistency, and provide further evidence of her increasingly sophisticated understanding.

Independent thinking
Lovelace's letters to De Morgan contain abundant evidence of the independence of thought that appeared to characterise much of her intellectual endeavour: she often sent De Morgan her attempts to independently verify certain formulae, give alternative proofs of theorems, or develop further consequences of them. In the words of Stein, "Lovelace refused simply to follow a derivation by rule but insisted on trying her own chain of inferences" (Stein, 1985, p. 76), and she would doggedly continue to ask awkward questions on a subject (be it a theorem, problem, or definition) until she was fully satisfied that she understood it completely.
Perhaps the most striking example of her persistence occurs early on in the correspondence, in November 1840, when she was making her way through the proof of the binomial theorem in De Morgan's Elements of Algebra. In the final stage of the proof, described by Lovelace as "rather cumbrous" (LB 170, 10 Nov. [1840], f. 65r), De Morgan had shown that, if the function φ(n) is defined as (1 + x) n , then φ(n)φ(m) = φ(n + m) for m, n ∈ Z + . But it was what followed that prompted her chief objection. Having proved the result true for natural number exponents, De Morgan then announced the following "principle" (De Morgan, 1837, p. 212): When an algebraical multiplication, or other operation, such as has hitherto been defined, can be proved to produce a certain result in cases where the letters stand for whole numbers, then the same result must be true when the letters stand for fractions, or incommensurable numbers, and also when they are negative.
Given this assumption, it was now easy for him to finish his demonstration and to declare the binomial theorem proved "in all cases" (De Morgan, 1837, p. 213).
But for Lovelace, this principle was highly dubious: "I am not at all sure that I like the assumption in the last paragraph of page 212. It seems to me somewhat a large one, & much more wanting of proof than many things which in Mathematics are rigorously & scrupulously demonstrated" (LB 170, 10 Nov.
[1840], f. 65v). De Morgan nevertheless assured her that the assumption of the principle was merely a consequence of "the nature of the method by which algebraical operations are performed". In other words, he wrote: "There is no difference of operation in the fundamental rules (addition subt n mult n & div n ) whether the symbols be whole nos or fractions. Hence if a theorem be true when the letters are any wh[ole] nos, it remains true when they are fractions" (LB 170, 14 Nov. 1840, f. 21v). In a subsequent letter, he tried to outline the logic behind this questionable reasoning, but the result was equally unsatisfying (LB 170, [Nov. 1840]

, f. 24r):
A is true when m is a whole number. Whenever A is true, B is true. B is of that nature, that if true when m is a whole number, it is also true when m is a fraction. When B is true C is true. ∴ C is true if A be true when m is a whole number.
The principle upon which De Morgan was so insistent had been used implicitly by British algebraists for years, but it had only been formalised relatively recently when, in his Treatise on Algebra of 1830, George Peacock had formulated it as the "Principle of the Permanence of Equivalent Forms" (Peacock, 1830, p. 104

):
Whatever form is Algebraically equivalent to another, when expressed in general symbols, must be true, whatever those symbols denote. Whatever equivalent form is discoverable in arithmetical Algebra considered as the science of suggestion, when the symbols are general in their form, though specific in their value, will continue to be an equivalent form when the symbols are general in their nature as well as in their form.
Peacock's Principle appeared towards the end of a debate that had been rumbling on for the best part of a century among British scholars on the legitimacy of the use of negative and imaginary numbers in mathematics (Pycior, 1997). Prior to 1830, the question of what such algebraic concepts actually meant was central to these discussions. But in his Treatise on Algebra, Peacock took a different approach (Pycior, 1981;Fisch, 1999). Instead of trying to assign interpretation or significance to negative and imaginary numbers, he postulated two different algebraic systems. The first, which he styled "arithmetical algebra", was essentially little more than a generalised version of common arithmetic, where letters represented non-negative real numbers and no results outside that domain were considered valid. By contrast, in the second system, called "symbolical algebra", letters could now represent any arbitrary kind of quantity, including negatives or imaginaries, provided that all operations performed on them obeyed the commonly accepted laws of arithmetic (commutativity, distributivity, etc.). Indeed, as has been argued in Rice (2001, p. 158), "given that the question posed was to legitimise negatives and imaginaries in algebra, Peacock had answered, not by attempting to clarify the meaning of such entities, but by redefining what was meant by algebra itself".
Peacock's work was particularly influential on the generation of mathematicians whose careers began in the immediate wake of the Treatise's publication. This generation included De Morgan and other British contemporaries such as Duncan Gregory and George Boole, who were instrumental in furthering the trend towards abstraction in early Victorian mathematics. 12 By 1840, the emphasis was not on what symbols such as −x or √ −1 actually meant but under what formal laws they operated. Peacock's Principle was essentially a contrivance designed to facilitate the very necessary extension of the concept of number. Thus, for example, because it was an accepted arithmetical fact that (a + b)(c + d) = ac + bc + ad + bd, for specific positive numerical values of a, b, c and d, by the Permanence Principle the same result would automatically be true whether a, b, c and d were positive, negative, fractional, irrational, or even complex. De Morgan's invocation of this principle to generalise his proof of the binomial theorem would thus have been a perfectly acceptable mode of procedure among many British mathematicians at this time, although as he admitted to Lovelace, it "requires some algebraical practice to see the necessity of its truth" (LB 170, 14 Nov. 1840, f. 22r).
Given her near obsessive attention to detail and her thirst for a thorough understanding of the material she studied, it is hardly surprising that Lovelace was critical of the Permanence Principle, as such an unproven assumption was at considerable variance with the standards of rigour she would have assumed were uniformly applied throughout mathematics. As we now know, the principle (at least in its strongest form as stated by Peacock) was fundamentally flawed, and the flaw was exposed within three years of Lovelace's comment. The discovery was linked to a further perceptive and highly prescient observation made by Lovelace to De Morgan, concerning extensions to the complex numbers.

A prescient speculation
The attentive reader will have noticed that our final example of Section 4.1 also included an appeal by De Morgan to the Permanence Principle, in which he tried to argue that, provided the standard laws of algebra were adhered to, the expressions a . . could all be manipulated to produce coherent results, regardless of the algebraic entities they represented. He pointed out that "all algebraical expressions are combined and reduced by rules, which, although derived from notions on quantity, will produce the same results, if we alter the form of the primitive expressions in any manner, consistently with the rules, even though the new forms should no longer admit of being considered as quantities" (De Morgan, 1836Morgan, -1842. Although we have seen that Lovelace disagreed with De Morgan over his presentation of this example, she was not at all concerned by the extension of algebra to include the two-dimensional consideration of complex numbers. Indeed, in the same letter of September 1841, she wrote (LB 170,19 Sept. [1841], f. 128r): It cannot help striking me that this extension of Algebra ought to lead to a further extension similar in nature, to Geometry in Three-Dimensions; & that again perhaps to a further extension into some unknown region, & so on ad-infinitum possibly.
This was a strikingly accurate prediction, the more so as it was related to developments of which she must have been quite unaware.
In the early nineteenth century, as complex numbers finally entered the mathematical mainstream, both algebraically and geometrically, the question arose as to whether the concept could be extended further, to so-called "hypercomplex numbers" capable of representation in three-dimensional space (Katz and Parshall, 2014, chapter 13). British mathematicians such as De Morgan were intensely interested in this question during the 1830s and 1840s, and attempted to construct systems of "triple algebra" by defining number triples as a + bi + cj , where a, b, c ∈ R, i 2 = j 2 = −1 and i = j . Of course, as we now know, this search for three-dimensional division algebras over the reals was doomed to failure, but an unexpected consequence was William Rowan Hamilton's discovery of the four-dimensional algebra of quaternions in October 1843, followed by that of the eight-dimensional octonions by John Graves two months later.
Aside from the realisation that mathematicians were essentially free to invent new algebras, subject to certain laws of operation (Parshall, 2011), one of the most significant consequences of Hamilton and Graves' discoveries was the existence of generalised forms of numbers which violated one or more of the fundamental laws of arithmetic. In other words, whereas the commutative law of multiplication is a standard and inviolable relation in N, Z, Q, R and C, it does not hold for quaternions or octonions. This provided the first violation of the Permanence Principle discussed above.
It would therefore seem that Lovelace's speculation of the extendability of the complex numbers was remarkably visionary in its scope and accurate in its ultimate realisation. But before we rush to praise her too highly, it is worth reading her letter a little more closely. A sentence or two later she remarks: "You do hint in parts of page 136 at the possibility of something of this sort" (LB 170, 19 Sept. [1841], f. 128v). Although she does not give an exact citation, it is not difficult to find that on page 136 of De Morgan's Penny Cyclopaedia entry on "Negative and Impossible Quantities", he writes (De Morgan, 1840a, p. 136): The subject-matter of the preceding algebra is geometry of only two dimensions; whereas it might be supposed that the application would never be complete until it embraced geometry of three dimensions. No such extension has however yet been made; though it is not unreasonable to suppose that it may be made at some future time.
Thus she was merely echoing back De Morgan's own sentiments, and, although he probably was "delighted at Lovelace's grasping the idea that a two-dimensional treatment could be generalized" (Stein, 1985, p. 80), the idea of extending the algebra of complex numbers to three dimensions was certainly not her own.
However, quite the reverse is true of her belief that algebra could perhaps be susceptible to "further extension into some unknown region, & so on ad-infinitum"; indeed this is a far more abstract notion than anything suggested by De Morgan, who never mentioned or implied anything of the kind. Indeed, extensions of complex numbers to dimensions greater than three were not even considered prior to 1843, whereas once quaternions had been discovered, a host of multi-dimensional algebraic systems, such as Grassmann algebras, Clifford algebras and Cayley-Dickson algebras quickly followed. It is possible that De Morgan would have stopped short of making such an ambitious prediction because he was aware of the difficulties inherent in extending the algebra of C to three dimensions, let alone some n > 3, whereas Lovelace's ignorance of these complexities might have meant that her speculations were less inhibited. Nevertheless, her conjecture illustrates her ability to make perceptive and consequential mathematical observations, and remains a significant mathematical statement, not simply by virtue of its prescience, but also because of its timing, its imagination and ultimately its accuracy.

Research-awareness
At the very end of 1839, De Morgan had presented the first of four papers entitled "On the Foundation of Algebra" to the Cambridge Philosophical Society. A development of Peacock's formal approach to the subject, this paper would ultimately influence the course of De Morgan's research in both algebra and logic. But it also had a more immediate effect, via a particularly intriguing passage on the fifth page (De Morgan, 1839, p. 177): An extension to geometry of three dimensions is not practicable until we can assign two symbols, and ω, such that a + b + cω = a 1 + b 1 + c 1 ω gives a = a 1 , b = b 1 and c = c 1 : and no definite symbol of ordinary algebra will fulfil this condition. Again, in passing from x to −x by two operations, we make use in ordinary algebra of one particular solution of x.
An extension to three dimensions would require a solution of the equation φ 3 x = −x, containing an arbitrary constant, and leading to a function of triple value, totally unknown at present.
As William Rowan Hamilton later recalled, this paper by De Morgan, and this passage in particular, was one of the catalysts for the eventual discovery of his algebra of quaternions: "...among the circumstances which assisted to prevent me from losing sight of the general subject, and from wholly abandoning the attempt to turn to some useful account those early speculations of mine, on triplets and on sets, was probably the publication of Professor De Morgan's first Paper on the Foundation of Algebra, of which he sent me a copy in 1841" (Hamilton, 1853, p. 41).
A letter from November of that year reveals that Lovelace too was reading this paper, and she questioned De Morgan on the following (De Morgan, 1839, p. 177

):
A general solution of φ 2 x = αx can be expressed when any particular solution x is known. For if f f −1 x be the general solution, 13 we have so that it is only necessary that f and α should be convertible. 14 Since then (−1) This passage is hard enough for a present-day reader to understand, but Lovelace asked for clarification of the notation, introduced by John Herschel in 1813 and still not in universal use nearly three decades later (Herschel, 1813, p. 10). She explained: "In the treatise you sent me on the 'Foundation of Algebra', I cannot make out in the least (page 5) about the general solution of φ 2 x = αx. I suspect I do not understand the notation f −1 x. I quite understand f 2 x or φ 2 x, f n x or φ n x. Judging by analogy, from page 82 of the Differential & Integral Calculus, (where −1 x is explained), I conceive f −1 x or φ −1 x may mean 'the quantity which having had an operation f or φ performed with & upon it, is = x' " (LB 170,8 Nov. [1841], f. 135v).
We can thus deduce that by November 1841, her algebraic abilities had clearly progressed to the point where De Morgan was sending her his own research, and by this stage, she was able to investigate the source of her difficulty in the literature available to her, and make an educated (and correct) guess as to its solution. She may still have been some way from doing independent research, but De Morgan seemed to believe that she was ready to read research-level mathematical publications.
In addition to his work on the foundations of algebra, the early 1840s also saw De Morgan investigating the then controversial subject of divergent series. His chief contribution was a lengthy paper in 1844, in which he argued strongly against their total rejection by the likes of Cauchy and Abel. Although admitting that "many series are such as we cannot at present safely use, except as means of discovery," he maintained that "to say that what we cannot use no others ever can ... seems to me a departure from all rules of prudence" (De Morgan, 1844, p. 183). Similar sentiments were expressed in a chapter of his Differential and Integral Calculus, in which he cautioned: "the history of algebra shows us that nothing is more unsound than the rejection of any method which naturally arises, on account of one or more apparently valid cases in which such method leads to erroneous results" (De Morgan, 1836Morgan, -1842. In short, he intoned, "remember √ −1" (De Morgan, 1844, p. 183). Lovelace would have become aware of his thinking on this issue while reading his Elements of Algebra, in which he extended the meaning of the "=" sign to include what he termed "arithmetical equality" and "algebraical equality" (De Morgan, 1837, p. 195). By the former, he meant essentially results that made numerical sense, whereas by the latter he meant that the two expressions on either side of the equals sign were algebraically equivalent. He also pointed out that "we do not say that every algebraical use of = will produce arithmetical equalities, but only that whenever an algebraical use of = does produce an arithmetical equation, we shall find that equation to be arithmetically true" (De Morgan, 1837, p. 198). Taking the series he noted that the value of x = 1 2 would result in the arithmetical equality while letting x = −1 and x = 2 would give 1 − 1 + 1 − 1 + · · · = 1 2 and 1 + 2 + 4 + 8 + 16 + · · · = −1 as respective algebraical equalities. Since De Morgan's correspondence with Lovelace coincided with the period when divergent series were prominent in his mind, it is not surprising that she was on occasion privy to matters immediately pertaining to his research. One such example appeared in a letter of October 1840, in which he gave the example of series (5), which he said "is certainly true in the arithmetical sense when x < 1. But if x > 1, say x = 2, we have 1 1 − 2 or − 1 = 1 + 2 + 4 + 8 + 16 + &c which, arithmetically considered is absurd. But nevertheless −1 and 1 + 2 + 4 + 8 + &c have the same properties" (LB 170, 15 Oct. 1840, ff. 19r-19v). In his 1844 paper, he also showed that the arithmetical value of 1 + 2 + 4 + 8 + · · · was ∞, but he was insistent that ∞ and −1 were both legitimate values of the series. As he said: "let it come out any thing but −1 or ∞ ... and I shall then be obliged to confess that divergent series must be abandoned" (De Morgan, 1844, p. 187). Until that time, he reiterated, mathematicians would be unwise to reject entirely what they do not understand, since even "the most determined rejector of all divergent series doubtless makes use of them in his closet" (De Morgan, 1844, p. 183). Of course, De Morgan's general view of the subject turned out to be well-founded, even if his paper was later (accurately) described by G.H. Hardy as "a remarkable mixture of acuteness and confusion" (Hardy, 1949, p. 19). Divergent series would have to wait a further half century before the work of Poincaré and Cesàro brought the subject back into the mathematical mainstream. Nevertheless, via her correspondence with De Morgan, Lovelace had been given a brief but tantalising glimpse of what were then cutting-edge research-level opinions on the matter, even if as De Morgan warned her, It is fair to tell you that the use of divergent series is condemned altogether by some modern names of very great note. For myself I am fully satisfied that they have an algebraical truth wholly independent of arithmetical considerations; but I am also satisfied that this is the most difficult question in mathematics (LB 170, 15 Oct. 1840, f. 19v).
We can therefore be fairly certain that Lovelace was beginning to become acquainted with elements of De Morgan's research, as well as being passingly familiar with a couple of the broad research-level issues under discussion by British mathematicians circa 1840. In the 1842 preface to his calculus textbook De Morgan justified introducing his students to the uncertain boundaries of known mathematics, by claiming that "the way to enlarge the settled country has not been by keeping within it, but by making voyages of discovery" (De Morgan, 1836Morgan, -1842. He continued: ... the few in this country who pay attention to any difficulty of mathematics for its own sake come to their pursuit through the casualties of taste or circumstances and the number of such casualties should be increased by allowing all students whose capacity will let them read on the higher branches of applied mathematics (De Morgan, 1836Morgan, -1842. By the end of 1841, after eighteen months of working under his guidance, Lovelace seemed to be on the cusp of blossoming into real mathematical maturity. Her questions were becoming more sophisticated and her studies had diversified to include independent reading on matters of particular interest. 15 But it was at this point that her mathematical education suddenly came to a stop: her correspondence with De Morgan broke off and, with the exception of a couple of isolated (and brief) messages, it would seem that it was never resumed.

A temporal readjustment
We now come to the apparent assignment of incorrect dates to some of Lovelace's letters to De Morgan, which has caused biographers to misrepresent her abilities. As we explained in Section 2, the primary cause was the looseness and inaccuracy of the original dating by the correspondents. A secondary reason was that the order into which the letters were catalogued by the Bodleian Library on their receipt of the papers in the 1970s, while mostly accurate, did not take into account the mathematical content. Thus, the consideration of a specific issue in, say, trigonometry might appear in August 1840, then disappear, before re-appearing in a letter catalogued (erroneously) as being from August 1841. The two main publications to suffer from these previously unnoticed errors are Toole (1992) and Stein (1985).
In the first publication, Toole presented, inter alia, edited transcriptions of many items from the Lovelace-De Morgan correspondence, the vast majority of which were given in the correct chronological order. There are, however, a couple of erroneously placed items. Indeed, in introducing them she stated that "The dating of the next two letters was difficult ... [since] there are no other letters in August 1842 from Ashley Combe" (Toole, 1992, p. 189). The reason for this is simple: these two letters date from 1841, not 1842. In a series of letters written in the late summer of 1841, Lovelace sent De Morgan four papers she had written on the subject of accelerating force, 16 the first of which accompanied a letter given (correctly) by Toole as dating from 15 August 1841 (Toole, 1992, pp. 168-169). Subsequent letters referring to these papers on force date from 16, 21 and 28 August 1841; the last one, however, was actually transcribed by Toole as dating from August 1842, along with another from 4 September (Toole, 1992, pp. 189-190). But given the subject matter under discussion in these letters, it is hard to believe that Lovelace wrote four papers on a subject of current interest to her in August 1841, sent three of them to De Morgan in quick succession, and then-precisely one year and one week later-sent along the fourth paper! It seems more likely that Toole's dating of these two items is mistaken.
A similar mistake, with more serious implications, is contained in Stein's biography of Lovelace from 1985. To begin our refutation of it, we need to quote it in full (Stein, 1985, p. 90): The last surviving letters in Lovelace's mathematical correspondence with De Morgan are dated 16 and 27 November 1842 (hence shortly before she translated the Menabrea memoir). In them we find her wrestling with an elementary problem in functional equations. (The problem was: She was still unable to take a mathematical expression and substitute it back into the given equation. It was the same "principle" that had plagued her in her correspondence with Mary Somerville and in earlier letters to De Morgan. Stein then gives the quote from the letter cited in our Section 3.2, in which Lovelace exclaimed that "These Functional Equations are complete Will-o'-the-Wisps to me". The impression given is thus of a young lady, whose mathematical skills have barely progressed over a period of seven years, including two years of intensive study with one of the foremost British mathematicians of the age-an image that hardly fits our picture of Lovelace as someone capable of finding derivatives from first principles by early 1841. It is hardly surprising therefore that neither Stein nor many of the scholars who have followed her analysis could give credence to the idea that Lovelace was competent enough to produce a paper for publication on a mathematical subject. And indeed, were Stein's analysis correct, it would seem somewhat far fetched that someone, incapable of making a simple algebraic substitution in November 1842, could write the mathematically informed and erudite work that appeared in print in August of 1843. 17 But of course, this analysis is not correct. And the reason, again, is that the letter of 27 November (and indeed that of 16 November) has been misdated to 1842, when in fact it dates from precisely two years earlier-when Lovelace was puzzling over functional equations in Chapter 10 of De Morgan's Elements of Algebra (see Section 3.2). To see this clearly, and to present the most convincing case for our proposed re-dating of the items in question, we present here short extracts from these letters, along with samples from De Morgan's contemporaneous replies: 10 November [no year given]: AAL to ADM: "I do not know why it is exactly, but I feel I only half understand that little Chapter X [on Notation of Functions], and it has already cost me more trouble with less effect than most things have. I must study it a little more I suppose." (LB 170, 14 November 1840: ADM to AAL: "The notation of functions is very abstract. Can you put your finger upon the part of Chapt. X at which there is difficulty". (LB 170,f. 22r) 16 November [no year given: 1842 or 1847 added by later reader]: AAL to ADM: "I can explain exactly what my difficulty is in Chapter X. ... That I do not comprehend at all the means of deducing from a Functional Equation the form which will satisfy it, is I think clear from my being quite unable to solve the example at the end of the Chapter 'Shew that the equation φ(x + y) + φ(x − y) = 2φx × φy is satisfied by φx = 1 2 (a x + a −x )'. I have tried several times, substituting first 1 for x, then 1 for y but I can make nothing whatever of it, and I think it is evident there is something that has preceded, which I have not understood. The 2nd example given for practice 'Shew that φ(x + y) = φx + φy can have no other solution than φx = ax', I have not attempted." (LB 170, Friday [no date given]: ADM to AAL: "If φ(x + y) = φx + φy be always true (hypothesis) It is true when x = 0. It is also true when y = −x. This equation being always true, is the representation of a collection of an infinite number of truths. I do not say that these truths coexist." (LB 170,f. 25v) 27 "I can soon put you out of your misery about p. 206. You have shown correctly that φ(x + y) = φ(x) + φ(y) can have no other solution than φx = ax, but the preceding question is not of the same kind; it is not show that there can be no other solution except 1 2 a x + a −x but show that 1 2 a x + a −x is a solution: that is, try this solution. ... I think you have got all you were meant to get from the chapter on functions." (LB 170, It thus becomes evident that we have a series of six sequential letters, clearly written back-and-forth within days of each other, concerning the same algebraic issue, namely, how to solve a particular kind of functional equation. The dating by both Lovelace and De Morgan is very lax, but crucially, one letter from De Morgan bears the date "Nov 14/40", verifying that this sequence of letters dates from 1840 and not 1842. Since a significant portion of Stein's portrayal of Lovelace as mathematically weak relies on the 27 November letter dating from 1842, our re-dating of it to 1840 leaves her argument with very little foundation. Consequently, we can be as near certain as possible that Stein's picture of Lovelace as barely mathematically competent by as late as 1842 is indeed incorrect.

Conclusion
We have thus seen that, by the end of her correspondence with De Morgan, Lovelace had acquired good habits of study, a grounding in certain areas of higher mathematics, a critical attitude towards foundational principles, the ability to make perceptive mathematical observations, and exposure to ideas then current in British mathematical research. Our conclusions are based on a reordering of the archive material and a new close reading of it, both of which, in contrast to previous authors, draw upon recent research in the history of mathematics, and other mathematical work of the day, in particular a close knowledge of De Morgan's related work. In the rest of this section we draw attention to two larger areas of enquiry that are beyond the scope of this paper, before reassessing our original research questions.
First of all, we have not in this paper addressed questions concerning Lovelace's life beyond her scientific interests (which are already covered in a number of biographies), in particular why her mathematical studies might have come to a halt. We have not looked at the broader social and cultural context of Lovelace's life and work, or the shaping by that context of opinions of her work, both in her lifetime, and by later writers. As we sketch above, and in more detail in Hollings et al. (2017), the tone of scholarly biographies, and of the secondary and popular works they influence, varies remarkably. A metabiography in the sense of Sapp (1990) might assess both the archival record, and its interpretation in later accounts of Lovelace's life and contribution, in the context of class, gender, or health, as well as broader trends in the history of science and varying perceptions of mathematics amongst mathematicians, other scientists, and the general public. Such a fuller account might question, for example, how Lovelace's aristocratic background, her supposed mental state, views of "appropriate" womanly behaviour, or changing concepts of science and scientific contribution had influenced later accounts. In particular we do not address questions of Lovelace's persistent health problems, and sometimes volatile frame of mind, or the perceptions by her and her circle of the dangers of mathematical studies: as De Morgan wrote to Lady Byron these "might be injurious to a person whose bodily health is not strong. ... The reason is obvious: the very great tension of mind which they require is beyond the strength of a woman's physical power of application" (LB 339, ADM to Lady Byron, 21 Jan. 1844, ff. 1-2). Lovelace herself seems to have believed this: in December 1841, as her correspondence with De Morgan began to falter, she wrote to his wife: "I have been very unwell indeed ... for there has been no end to the manias & whims I have been subject to ... Many causes have contributed to produce the past derangements; & I shall in the future avoid them. One ingredient, -(but only one among many) has been too much Mathematics (Stein, 1985, pp. 80-81).
A fuller account is given in Winter (1998): a modern biographer would be unlikely to follow Stein (1985, pp. 281-297) and devote a substantial appendix to a posthumous psychiatric diagnosis.
We also do not address the very broad questions of gender, mathematics and nineteenth-century science, but adopt the approach of other recent work on women and science-for example Jones and Hawkins (2015), introducing a special issue of Notes and Records devoted to women and science, and articles therein by Waring (2015) and Orr (2015)-in treating Lovelace as a member of a scientific community, alongside Babbage, De Morgan and Somerville. Further analysis might address varying perceptions of how to present women scientists (Jones and Hawkins, 2015), the misremembering of women's contributions (Summerfield, 2004), or masculine identity and scientific discourse in the nineteenth century (Ellis, 2017). Alternative framings in the context of women's studies are given in the recent volume by Krämer (2015), although some of these are based on secondary sources that are a little out of date.
Secondly, we have not addressed questions of Lovelace's broader study and writing on mathematics. We observe that Lovelace and her mother and husband read widely in the latest scientific works, for example by Babbage, Somerville, von Humboldt and Whewell (Hollings et al., 2017), part of an emerging trend of works, alive to broader scientific, societal and religious debate, which set out to explain scientific and mathematical material to the general reader in mathematical terms, but without explicit mathematics. Lovelace continued such reading during and after her studies with De Morgan, and although she kept her letters to him free of what she termed "metaphysical enquiries & speculations" (LB 170, 6 Feb. [1841], f. 98r), such reflections occurred frequently in her letters to her other correspondents, and undoubtedly informed her broader contributions to the 1843 paper. A recent thorough analysis by Forbes-Macphail (2013) treats these writings in the context of nineteenth-century poetry, but they await further study by historians of mathematics for the light they shed on the thinking of Lovelace and her circle, and on broader issues.
We return now to our two main research questions and consider, first, whether Lovelace had the mathematical knowledge and skills to contribute to the 1843 paper: for the purposes of this paper we take the view (see Section 1 and Misa, 2016) that it was a collaboration with Babbage. On the basis of our work we challenge the assertions (see Section 1), originating from Stein, and developed by others, that she did not. Lovelace's paper would certainly have been considered a work of mathematics at the time and it shows evidence of skill and originality, even if then, as now, the mathematical content was not especially significant. Mathematically, the paper relied on methods of finite differences and the approximation of functions by finite power series. Lovelace drew on her exposure to the more abstract "science of operations," by speculating that functional domains for the Analytical Engine need not be restricted merely to real numbers, and pointed out that this could allow computations with complex numbers or even the composition of pieces of music. She also introduced an elegant cycle notation for describing the internal representations used by the Analytical Engine, which was then used in the discussions illustrating the choice of power series representation for the Bernoulli numbers. All this drew heavily from ideas and concepts (functions, series, notation, algebraic abstraction) that she had first learnt in her studies with De Morgan. But as he noted, it was the content of her letters to him, rather than her paper on Babbage's engine, that he believed contained evidence of her true mathematical potential: The tract about Babbage's machine is a pretty thing enough, but I could I think produce a series of extracts, out of Lady Lovelace's first queries upon new subjects, which would make a mathematician see that it was no criterion of what might be expected from her (LB 339, ADM to Lady Byron, 21 Jan. 1844, f. 2). Surprisingly, while the paper is widely known, and aspects of it, such as whether there was a bug in the "program" and who might have put it there, have been discussed at length (see Misa, 2016), there is as yet no full scholarly edition of the work, which might address the broader, and perhaps more interesting, questions of the cultural, mathematical and scientific context. In particular, there are questions that need further investigation by historians of mathematics, such as a full understanding of what was meant by the statement that the machine could "do algebra", or the content and context of the broader reflections on the mathematical powers of the machine, both of which would seem to draw on Lovelace's deepening mathematical knowledge, and her broader scientific interests.
Turning to the question of Lovelace's potential as "an original mathematical investigator, perhaps of first rate eminence" (LB 339, ADM to Lady Byron, 21 Jan. 1844, f. 2), we assert that by the end of her studies with De Morgan in 1842, while Lovelace's abilities were consistent with De Morgan's judgement, she was probably not yet ready to enter the world of mathematical research. As we see in her reading of his research paper in November 1841, her skills in critical thinking and flashes of insight were balanced with the need of remedial work to address the gaps in her mathematical knowledge, particularly the lack of skill in algebraic manipulations: "my Algebra wits, as you say, not having been quite proportionally stretched with some of my other wits" (LB 170, 19 Sept. [1841], f. 127r). This weakness was largely due, not to lack of drive or talent, but to her patchy mathematical education prior to 1840, in which algebra barely featured (see Hollings et al., 2017). Furthermore, when it is recalled that in September of 1840 she barely understood the meaning of an equation of a curve, to have become familiar with higher algebra and the differential and integral calculus in eighteen months of non-continuous semi-independent study represents a considerable achievement. Had this rate of learning been sustained, one might speculate that she may have reached research-level ability in a further one or two years. As she herself wrote to Babbage in July 1843: "I am in good spirits; for I hope another year will make me really something of an Analyst" (Toole, 1992, p. 215). More experience might also have given her more confidence to pursue her own work independently-as she wrote: "I don't yet know enough to be sure always of the solidity or appositeness of my findings" (Baum, 1986, p. 88).
De Morgan clearly believed that Lovelace had some kind of latent mathematical talent, but he may not have been the best, or most unbiased, judge. Although he insisted that, in order not to over-encourage Lovelace, "I have therefore contented myself with very good, quite right, and so on" (LB 339, ADM to Lady Byron, 21 Jan. 1844, f. 1), it could be argued that his inclination (perhaps influenced by both her gender and class), and that of others, to praise her work instead of giving substantive criticism, ultimately retarded the development of her mathematical skills.
Yet she certainly had the capacity to ask the right kind of questions, the tenacity to work things out, and the persistence to strive for a deeper understanding. So it is certainly plausible, given what she had learnt with De Morgan, that in time a paper on the calculus of functions or a note on the theory of equationsbearing the signature "A.A.L."-might have appeared in the Philosophical Magazine or the Cambridge and Dublin Mathematical Journal, both publications to which he was a frequent contributor. Indeed, early Victorian journals contain many contributions from long-forgotten amateur mathematicians solving a particular differential equation here or giving a new geometrical proof there. Such papers may not have been very profound or influential-very few (then as now) were-but they were mathematics nonetheless. De Morgan may have thought Lovelace capable in time of writing an original monograph or major research paper, but her mathematical skills were probably not sufficiently developed in 1843.
Perhaps De Morgan had more documentary evidence to substantiate his views than currently exists, but today we have little other evidence that Lovelace might eventually have produced major results. Apart from the 1843 paper, and the broader speculation mentioned above, her surviving mathematical writings are slight, and although Stein (1985) has a substantial narrative account, there has to date been no serious scholarly analysis by historians of mathematics. A number of letters reflect on her interest in mesmerism, which led her to speculate that she might one day "bequeath to the generations a Calculus of the Nervous System" (Somerville Papers (Bodleian Library, Oxford), Dep. c.367, Folder MSBY-9, AAL to Woronzow Greig, 15 Nov. 1844, f. 255r), an undertaking intended to do for the science of the brain what Newton had done for the study of physics. She sought out collaborators: though she wanted to work further with Babbage, he remained a friend but declined further scientific collaboration (Stein, 1985, p. 120;Toole, 1992, pp. 232-233). So too did Michael Faraday, who in a letter to Lovelace tactfully cited his recent ill health as evidence that, while he would have liked to have been of assistance, "nature is against you" (James, 1996, p. 265). And although Lovelace remained in contact with Mary Somerville after her erstwhile mentor moved to Italy in 1838, direct collaboration with her was simply not practicable.
As for a collaboration with De Morgan, Lovelace seems to have remained far too in awe of him to propose anything of the kind. 18 Besides, the professor was a busy man, and far too mathematically selfsufficient to enter into a collaboration with anyone, let alone a former student. In fact, after 1843, the only mathematics Lovelace published was in the form of two substantial footnotes appended to a paper on the effect of climate on crop management, published by her husband, in the Journal of the Royal Agricultural Society (Lovelace, 1848, pp. 322-324, 325-326). It was this publication that occasioned Lovelace's final, brief and undated letter to De Morgan, with which she enclosed an early printed, but uncorrected, version of Lord Lovelace's paper. She observed that "Much of the Paper, tho' on so dry a subject, is amusing enough," requesting that "If you look at it, & should discover any inaccuracies or anything which might be made clearer, pray be kind enough to mention it" (LB 170, [1848], ff. 157v-158r). And with the words "I will not now detain you further", she brought the Lovelace-De Morgan correspondence, or at least what survives of it, to an end. This correspondence has provided us with a unique perspective on the mathematical development of Ada Lovelace. It is in these letters that we observe a dedicated and talented student working with a remarkable and insightful teacher to overcome the limitations of her prior knowledge and the inevitable difficulties of any beginner in learning mathematics. They show both the problems she had with some basic skills, and also that she was capable of moments of great insight and understanding that belied her lack of formal training. Indeed, certain questions and remarks evince an intellectual acuity that has tantalised and beguiled scholars from De Morgan to the present day.
It is the contrast between the mathematics that she actually wrote and her mathematical potential that has fuelled much of the debates regarding Lovelace's mathematical ability; for despite De Morgan's prediction that she would "get beyond the present bounds of knowledge", we have no evidence that she created original mathematics in either published or unpublished form. The reasons for this await further research, but were probably a combination of a lack of training, lack of good health, lack of a collaborator and ultimately a lack of time before her death in 1852 at the early age of 36.
Just as Babbage's Analytical Engine remained, and remains, a hypothetical construct and Lovelace's famous "program" merely a theoretical algorithm designed to run on it, so Lovelace's mathematical potential remained just that: latent and unfulfilled. And yet the fact that her work is still the focus of ongoing research more than a century and a half later could be regarded as a posthumous realisation of that potential, since it has brought Lovelace a level of influence and recognition that she never attained in her lifetime. Indeed, as we have shown above, our work opens up many further questions: about Lovelace's life; about the 1843 paper; about broader nineteenth-century mathematical culture; women and nineteenth-century mathematics; and what the various presentations of Lovelace tell us about the diverse scientific and cultural contexts which produced them. Our work shows the importance of historians of mathematics for the study of mathematical archives, and raises the question of why such a well-known figure, and such a substantial archive, have not yet received more attention from professional historians of mathematics.