Irrationality and Transcendence Criteria for Infinite Series in Isabelle/HOL
aa r X i v : . [ c s . L O ] J a n Irrationality and Transcendence Criteria forInfinite Series in Isabelle/HOL
Angeliki Koutsoukou-Argyraki ( [email protected] )Wenda Li ( [email protected] )Lawrence C. Paulson FRS ( [email protected] )Computer Laboratory, University of Cambridge15 JJ Thomson Avenue, Cambridge CB3 0FD, UKJanuary 14, 2021
Abstract
We give an overview of our formalizations in the proof assistantIsabelle/HOL of certain irrationality and transcendence criteria forinfinite series from three different research papers: by Erdős and Straus(1974), Hančl (2002), and Hančl and Rucki (2005). Our formalizationsin Isabelle/HOL can be found on the Archive of Formal Proofs. Herewe describe selected aspects of the formalization and discuss what thisreveals about the use and potential of Isabelle/HOL in formalizingmodern mathematical research, particularly in these parts of numbertheory and analysis.
Keywords: transcendence, irrationality, series, interactive theorem proving,Isabelle/HOL, proof assistants.
AMS 2020 subject classes : 40A05, 11J68, 11J81, 03B35, 68V20, 68V35.
The libraries of formalized mathematics in various proof assistants (or in-teractive theorem provers) have been growing for years. However, the field1s still far from the goal propounded in 1994 as the QED Manifesto [3] “tobuild a computer system that effectively represents all important mathemat-ical knowledge and techniques”. We are light years from the vision of havingan interactive tool that could “converse” with human mathematicians to aidin the discovery of new results, as colorfully described by Timothy Gow-ers [11]. Our goal within the ALEXANDRIA Project at Cambridge [29] is tocontribute to making proof assistants (and more specifically Isabelle/HOL)more useful to research mathematicians. To gather information about whatspecifically needs to be done, we have been formalizing material to contributeto the Isabelle/HOL Libraries and the Archive of Formal Proofs (AFP). As research mathematics is our main target, and given that a considerableamount of basic mathematics has already been formalized in Isabelle/HOLover the years, here we wish to explore the following question : How receptive to formalization (particularly in Isabelle/HOL) ismainstream published mathematical research?
Here we are not concerned with standard material from undergraduate orgraduate textbooks. Those proofs have been thoroughly studied and checked,and repeatedly reworked and polished by many people over the years. Nor arewe working towards the ambitious goal of formalizing the proof of a landmarkresult. Instead, we are formalizing mainstream mathematical research fromjournal papers fresh from the oven. To explore the question above (within aspecific case study), we ask questions such as these:• To what extent does the current Isabelle/HOL library cover the neces-sary preliminaries?• How helpful are the automatic proof tools?• How much longer than the original proofs are the formalized proofs (i.e.the de Bruijn factor [32])?• Are we going to discover any issues or gaps in the proofs?Clearly, the answers to these questions depend on the chosen proofs. Here weattempt some case studies in number theory, on transcendence and irrational-ity criteria for infinite series. In particular, we choose several results from isabelle.in.tum.de/dist/library/HOL Inevitably, we had to pick topics in which wea priori knew that at least some of the preliminaries were already availablein Isabelle/HOL. The material we chose is mathematically interesting inits own right, and moreover—unlike most results formalized nowadays—itcomes from fairly recent research papers instead of textbooks.Paul Erdős was keenly interested in establishing criteria for the irrational-ity and transcendence of infinite series [7, 8, 10]. Several techniques forshowing the transcendence of series are given by Nishioka [25], who presents,among others, methods originated by Mahler [23]. More recently, Sándor [31],Nyblom [26, 27], and Hančl [13, 14, 12] have obtained many more results inthis area.The plan of this paper is as follows: in the next section we give a brief in-troduction to Isabelle/HOL. In Section 3 we present the material formalizedand in Section 4 we discuss our formalization.
Isabelle is an interactive theorem prover first developed in the 1980s byLawrence Paulson and Tobias Nipkow [24, 28]. Today, Isabelle providesthe Isar language for writing proofs. Isar proofs are hierarchically struc-tured, and they include enough redundancy—consisting of explicitly statedassumptions and goals—to be understandable to humans as well as machines.Isabelle supports multiple different logical formalisms, with Isabelle/HOLspecifically based on higher order logic. Unlike proof assistants based onconstructive type theories with dependent types, it implements simple typetheory. Isabelle/HOL admits classical (non-constructive) proofs, i.e. it ac-cepts the law of the excluded middle, P ∨ ¬ P , as well as the axiom of choice.Simple type theory and classical logic allow for powerful automation,which is a significant advantage. Isabelle/HOL’s main automation tool is Sledgehammer [2], which searches for proofs by calling external automated The proof of Roth’s theorem itself has not been formalized; see Section 4. https://isabelle.in.tum.de/ nitpick and Quickcheck , are also provided. More-over, the command try0 calls a number of built-in proof methods (suchas simplification) in search of a proof. The user interface is Isabelle/jEdit,which provides real-time proof checking, as well as rich semantic informationfor the formal text and direct links to the user manuals and tutorials. Wehave written an introduction to Isabelle aimed at mathematicians [19].The Isabelle/HOL libraries and the AFP contain a vast amount of for-malized material, covering many areas of pure mathematics as well as incomputer science, logic and even philosophy.
In this section, we present the statements of the proofs that we formalizedand verified in Isabelle/HOL. For the proofs the reader may refer to therespective papers [9, 15, 16]. The full Isabelle/HOL formalizations can befound online, on the AFP [22, 20, 21]. We had to fill in many intermediatearguments that were implicit in the original proofs, providing more detailsand clarifications. In this sense, our formalizations may serve—in additionto verification—as supplementary material for detailed study of the originalproofs. We will discuss our formalizations in the next section; in this sectionwe merely present the statements in standard mathematical language.
The following results are by Erdős and Straus [9] and our formalization canbe found on the AFP [22].
Theorem 3.1 (Erdős and Straus [9, Theorem 2.1])
Let { b n } ∞ n =1 be a se-quence of integers and { α n } ∞ n =1 a sequence of positive integers with α n > for all large n and lim n =1 ,n →∞ | b n | α n − α n = 0 . Then the sum ∞ X n =1 b n Q ni =1 α i these can also be found under “Documentation” on the Isabelle webpage s rational if and only if there exists a positive integer B and a sequence ofintegers { c n } ∞ n =1 so that for all large n , Bb n = c n α n − c n +1 , | c n +1 | < α n / . Corollary 3.1 (Erdős and Straus [9, Corollary 2.10])
Let { α n } ∞ n =1 and { b n } ∞ n =1 satisfy the hypotheses of the theorem above and in addition that forall large n we have b n > , α n +1 ≥ α n , lim n →∞ ( b n +1 − b n ) /α n ≤ and lim inf n →∞ α n /b n = 0 . Then the sum ∞ X n =1 b n Q ni =1 α i is irrational. Theorem 3.2 (Theorem 3.1 in [9], Erdős and Straus, 1974)
Let p n bethe n th prime number and let { α n } ∞ n =1 be a monotonic sequence of positiveintegers satisfying lim n →∞ p n /α n = 0 and lim inf n →∞ α n /p n = 0 . Then thesum ∞ X n =1 p n Q ni =1 α i is irrational. The following results are by Hančl [15] and our formalization can be foundon the AFP [20].
Theorem 3.3 (Hančl [15, Theorem 3])
Let
A > be a real number. Let { d n } ∞ n =1 be a sequence of real numbers greater than one. Let { α n } ∞ n =1 and { b n } ∞ n =1 be sequences of positive integers such that lim n →∞ α n n = A and forall sufficiently large nAα n n > ∞ Y j = n d j and lim n →∞ d n n b n = ∞ . Then the sum ∞ X n =1 b n α n is irrational. orollary 3.2 (Hančl [15, Corollary 2]) Let
A > and let { α n } ∞ n =1 and { b n } ∞ n =1 be sequences of positive integers such that lim n →∞ α n n = A . Then,assuming that for every sufficiently large positive integer n , α n n (1+4(2 / n ) ≤ A and b n ≤ (4 / n − , the sum P ∞ n =1 b n /α n is irrational. This corollary follows directly from the theorem by an appropriate choice ofthe sequence { d n } ∞ n =1 , in particular by choosing d n = 1 + (2 / n so that thetheorem can be directly applied. The following results are by Hančl and Rucki in [16] and our formalizationcan be found on the AFP [21].
Theorem 3.4 (Hančl and Rucki [16, Theorem 2.1])
Let δ be a posi-tive real number. Let { α n } ∞ n =1 and { b n } ∞ n =1 be sequences of positive integerssuch that lim sup n →∞ α n +1 ( Q ni =1 α i ) δ · b n +1 = ∞ and lim inf n →∞ α n +1 α n · b n b n +1 > . Then the sum ∞ X n =1 b n α n is transcendental. Theorem 3.5 (Hančl and Rucki [16, Theorem 2.2])
Let δ and ǫ be pos-itive real numbers. Let { α n } ∞ n =1 and { b n } ∞ n =1 be sequences of positive integerssuch that lim sup n →∞ α n +1 ( Q ni =1 α i ) /ǫ + δ · b n +1 = ∞ and for every sufficiently large n ǫ r α n +1 b n +1 ≥ ǫ r α n b n + 1 . hen the sum ∞ X n =1 b n α n is transcendental. The two theorems above are in fact corollaries of Roth’s celebrated resulton rational approximations to algebraic numbers:
Theorem 3.6 (Roth, 1955 [30])
Let a be any algebraic number, not ra-tional. If the inequality | a − pq | < q κ has infinitely many solutions in coprime integers p and q where q > , then κ ≤ . In particular, the two theorems above by Hančl and Rucki [16] asserting thetranscendence of the sum of certain series are shown by finding infinitelymany such integer solutions of the inequality with a the sum of the series inquestion and for some κ > . Our full formalization is online [22] and here we discuss certain key points.The formalization process turned out to be time-consuming: we had to fill ina number of intermediate reasoning steps that had to be made explicit in theformal proofs. For example, in the proof of Theorem 3.2 ([9, Theorem 3.1]),for the sequence of integers { c n } ∞ n =1 (for which c n > for large n ), Erdősand Straus claim that since it is unbounded, for large n there must exist anindex m ≥ n so that c m ≤ c n < c m +1 . In order to prove this claim, we hadfirst to show that for large n { c n } ∞ n =1 can be neither monotone increasing normonotone decreasing, which required some work.We moreover had to do a certain amount of restructuring for the formal-ization of the proof of Theorem 3.1 ([9, Theorem 2.1]), as the original proofis based on a sketch of a construction for obtaining the terms of the desiredsequence { c n } ∞ n =1 , starting with the construction of the first two terms for7arge enough n (“Proceeding in this manner we get the desired sequence”).In particular, in the sufficient direction, we need to obtain a positive integer B and a sequence of integers { c n } ∞ n =1 that satisfy Bb n = c n α n − c n +1 and | c n +1 | < α n / for all large enough n , where { b n } and { a n } are sequences ofintegers with a n > for all n . In the middle of the proof, we will have for alarge enough N Bb N a N − R N is an integer, (1)where { R n } is a sequence such that for all n ≥ N , | R n | < / and R n +1 = a n R n − Bb n +1 a n +1 . (2)To construct a suitable { c n } ∞ n =1 , we let c N be the integer nearest to ( Bb N ) /a N and inductively construct c n +1 = c n α n − Bb n (for all n ≥ N ). This wasachieved by defining a recursive function in Isabelle/HOL: fun get_c::"(nat ⇒ int) ⇒ (nat ⇒ int) ⇒ int ⇒ nat ⇒ (nat ⇒ int)" where "get_c a’ b’ B N 0 = round (B * b’ N / a’ N)"|"get_c a’ b’ B N (Suc n) = get_c a’ b’ B N n * a’ (n+N)- B * b’ (n+N)" where round returns the nearest integer of an input number. By construction,we already have Bb n = c n α n − c n +1 so the goal is to show | c n +1 | < α n / (forall n ≥ N ). To achieve this, we deploy proof by induction to derive c n − ( Bb n ) /a n = R n , where (1) has been used for the base case and (2) for the inductive one. Wecan then close the proof by having | c n +1 | α n = | R n | < . The original proof repeatedly invokes variants of (1) and tries to prove c n isthe closest integer to ( Bb n ) /a n for all n ≥ N (e.g., (2.7)-(2.9) in the originalproof). We believe our altered proof might be more straightforward.We also noted that in the original proofs of Corollary 3.1 ([9, Corollary2.10]) and Theorem 3.2 ([9, Theorem 3.1]) certain inequalities required some8inor corrections (for details we refer to our formalization [22]), which for-tunately did not affect the correctness of the statements or the original proofstructures.Our formalized versions of the statements of Theorem 3.1 ([9, Theorem2.1]), Corollary 3.1 ([9, Corollary 2.10]) and Theorem 3.2 ([9, Theorem 3.1])read as follows: theorem theorem_2_1_Erdos_Straus: fixes a b :: "nat ⇒ int" assumes " ∀ n. a n >0" and " ∀ F n in sequentially. a n > 1" and "( λ n. | b n | / (a (n-1)*a n)) −−−−→ shows "( P n. (b n / ( Q i ≤ n. a i))) ∈ Q ←→ ( ∃ (B::int)>0. ∃ c::nat ⇒ int.( ∀ F n in sequentially. B*b n = c n * a n - c(n+1) ∧ | c(n+1) | 0" and " ∀ F n in sequentially. a n > 1" and "( λ n. | b n | / (a (n-1)*a n)) −−−−→ and " ∀ F n in sequentially. b n > 0 ∧ a (n+1) ≥ a n" and "lim ( λ n. (b(n+1) - b n) / a n) ≤ and "convergent ( λ n. (b(n+1) - b n) / a n)" and "liminf ( λ n. a n / b n) = 0 " shows "( P n. (b n / ( Q i ≤ n. a i))) / ∈ Q " theorem theorem_3_10_Erdos_Straus: fixes a::"nat ⇒ int" assumes " ∀ n. a n >0" and "mono a" and "( λ n. nth_prime n / (a n)^2) −−−−→ and "liminf ( λ n. a n / nth_prime n) = 0" shows "( P n. (nth_prime n / ( Q i ≤ n. a i))) / ∈ Q " Above, sequentially is a filter [17] for expressing limits indexed by positiveintegers. So ∀ F n in sequentially. P n expresses that P n holds for allsufficiently large n . Asymptotic arguments (e.g. limits and statements of the form “for all suffi-ciently large n ”) present real difficulties for mechanised proofs. Justifications9mitted as obvious in paper proofs need to be written out. For example, inthe proof of Theorem 3.2 ([9, Theorem 3.1]) we need to formally prove B ln n + 1 < √ n for all large n, (3)where B is a positive constant. Since the proof of Eq. (3) involves routinecalculations of limits, this step is completely omitted in the paper proof. InIsabelle/HOL, Eq. (3) is encoded as " ∀ F n in sequentially. 8*B*ln n + 1 10o the proposition that B ln n √ n + 1 √ n < for all large enough n, by applying the lemma tendstoD :if lim x → F f ( x ) = l and < e then eventually | f ( x ) − l | < e. Fortunately, Manuel Eberl had just implemented the tactic real_asymp basedon multiseries expansions [4]. It solves Eq. (3) automatically, so we can reduceour initial proof to just one line: have " ∀ F n in sequentially. 8*B*ln n + 1 N :: nat and f :: "nat ⇒ ’a :: real_normed_vector" assumes "c < 1" and " ∀ n ≥ N. norm (f (Suc n)) ≤ c * norm (f n)" shows "summable f" The version modified in terms of limits is given below: lemma summable_ratio_test_tendsto: fixes c :: real and f :: "nat ⇒ ’a :: real_normed_vector" assumes "c < 1" and " ∀ n. f n = and tendsto_c: "( λ n. norm (f (Suc n)) / norm (f n)) −−−−→ c" shows "summable f" proof - from h c<1 i tendsto_c obtain N where N_dist:" ∀ n ≥ N. dist (norm (f (Suc n)) / norm (f n)) c < (1-c)/2" unfolding tendsto_iff eventually_sequentially by (meson diff_gt_0_iff_gt zero_less_divide_iff zero_less_numeral) have "norm (f (Suc n)) / norm (f n) ≤ (1+c)/2" when "n ≥ N" for n using N_dist[rule_format,OF h n ≥ N i ] h c<1 i by (auto simp add:field_simps dist_norm,argo) then have "norm (f (Suc n)) ≤ (1+c)/2 * norm (f n)" when "n ≥ N" for n using h n ≥ N i h ∀ n. f n = i by (auto simp add:divide_simps) moreover have "(1+c)/2 < 1" using h c<1 i by auto ultimately show "summable f" using summable_ratio_test by blast qed ( n ) we show that ALPHA ( n ) ≥ for all n ∈ N . After that, we show the existence of an n ∈ N for whichALPHA ( n ) < , a contradiction: hence, the sum of the series is irrational.As already mentioned, Isar admits structured proofs, which are more read-able than the usual sequence of proof commands. In our proof, the structureof a proof by contradiction is visible: proof (rule ccontr) [...] show False [...] qed . theorem Hancl3: fixes d ::"nat ⇒ real" and a b :: "nat ⇒ int" assumes "A > 1" and d: " ∀ n. d n > 1" and a: " ∀ n. a n>0" and b: " ∀ n. b n > 0" and "s>0" and "( λ n. (a n) powr(1 / of_int(2^n))) −−−−→ A" and " ∀ n ≥ s. A / (a n) powr (1 / of_int(2^n)) > ( Q j. d (n+j))" and "LIM n sequentially. d n ^ 2 ^ n / b n :> at_top" and "convergent_prod d" shows "( P n. b n / a n) / ∈ Q Our formalized version of Corollary 3.2 ([15, Corollary 2]) is as follows: corollary Hancl3corollary: fixes A::real and a b :: "nat ⇒ int" assumes "A > 1" and a: " ∀ n. a n>0" and b: " ∀ n. b n>0" and "( λ n. (a n) powr(1 / of_int(2^n))) −−−−→ A" and " ∀ n ≥ 6. a n powr(1 / of_int (2^n)) * (1 + 4*(2/3)^n) ≤ A ∧ b n ≤ shows "( P n. b n / a n) / ∈ Q " It is interesting to note that while in Corollary 3.2 ([15, Corollary 2]) wehave an assumption that holds “for all sufficiently large positive integer n ”, inour formalized version above this assumption is actually specified as “for all n ≥ ”. In our formalized version of Theorem 3.3 ([15, Theorem 3]) above,“for all sufficiently large n ” had been written simply as “ ∀ n ≥ s ” where s > is some fixed, unknown number. Statements of the form “for all sufficiently14arge” can also be encoded in a more abstract fashion using the keyword eventually , which does not require an additional variable. This material requires the notion of an infinite product, which was then (early2018) not available in Isabelle except in a small development by ManuelEberl. Infinite sums were available, and because we were only dealing withpositive reals, the infinite products could be reduced to infinite sums vialogarithms. However, since one objective of this work was to identify and fillgaps in the libraries, we decided to formalize infinite products directly. Weextended Eberl’s development to a comprehensive Infinite_Products libraryand included it in the next Isabelle release (Isabelle 2018).Consider the following technical lemma, where we make use of Q : lemma show8: fixes d ::"nat ⇒ real " and a ::"nat ⇒ int" and s k::nat assumes "A > 1" and d: " ∀ n. d n> 1" and " ∀ n. a n>0" and "s>0" and "convergent_prod d" and " ∀ n ≥ s. A / (a n) powr(1 / (2::int)^n) > ( Q j. d(n +j))" shows " ∀ n ≥ s. ( Q j. d (j + n)) < A/ (MAX j ∈ {s..n}. a j powr (1 / (2::int) ^ j))" This had been originally formulated using P via the natural logarithmin the first version, so the conclusion instead read shows " ∀ n ≥ s. exp ( P j. ln(d (j + n))) < A/ (MAX j ∈ {s..n}. a j powr (1 / (2::int) ^ j))" By convention, infinite products are defined in two stages [1, p. 241].(1) For nonzero complex numbers, the infinite product Q ∞ k =0 u k is definedto converge if the finite partial products converge to a nonzero limit.If that limit is zero, then the infinite product diverges to zero.(2) If finitely many of the u k equal zero and the infinite product of thenonzero terms converges in the sense of (1), then Q ∞ k =0 u k converges tozero.One advantage of this approach is that Q ∞ k =0 u k = u Q ∞ k =1 u k and similaridentities hold. 15 .3 Formalizing “The transcendence of certain infiniteseries” Our full formalization is online [21]. In this work, too, we had to fill incertain arguments that had been omitted in the original paper, for exampleto show that the series in question were summable. As already mentioned, for the proofs of Theorems 3.4 ([16, Theorem 2.1]) and3.5 ([16, Theorem 2.2]), we applied Theorem 3.6: Roth’s theorem on rationalapproximations to algebraic numbers [30]. The proof of this celebrated theo-rem is long and elaborate; it has not been formalized in any proof assistant,to our knowledge. In our formalization we have thus used the statementof Roth’s theorem merely as an assumption, instead of formalizing Roth’sproof itself beforehand. Roth’s theorem was implemented within a locale asfollows: locale RothsTheorem = assumes RothsTheorem:" ∀ ξ κ . algebraic ξ ∧ ξ / ∈ Q ∧ infinite {(p,q). (q::int)>0 ∧ coprime p q ∧ | ξ - p/q | < 1/q powr κ } −→ κ ≤ A locale collects parameters and assumptions, which it packages as a contextin which to work. This locale simply packages the assumption that Roth’stheorem is true. It is a safer option than assuming the theorem as an axiom.Theorems 3.4 ([16, Theorem 2.1]) and 3.5 ([16, Theorem 2.2]) were thenformalized within this locale: theorem ( in RothsTheorem) HanclRucki1: fixes a b :: "nat ⇒ int" and δ :: real assumes " ∀ k. a k > 0" and " ∀ k. b k > 0" and " δ > 0" and "limsup ( λ k. a(k+1) /( Q i=0..k. a i) powr (2+ δ ) * (1 / b(k+1))) = ∞ " and "liminf ( λ k. a (k+1) / a k * b k / b (k+1)) > 1" shows " ¬ algebraic ( P k. b k / a k)" The reader may notice that this development too seems to depend on the AFP entryfor the Prime Number Theorem [6]. However we only use some technical lemmas fromthat development. Primes play no role here. heorem ( in RothsTheorem) HanclRucki2: fixes a b :: "nat ⇒ int" and δ ε :: real and t :: nat assumes " ∀ k. a k > 0" and " ∀ k. b k > 0" and " δ > 0" " ε > 0" and "limsup ( λ k. a(k+1) / ( Q i=0..k. a i) powr (2 + 2/ ε + δ )* (1 / b(k+1))) = ∞ " and " ∀ k ≥ t. (a (k+1) / b (k+1)) powr (1 / (1+ ε )) ≥ (a k / b k) powr (1 / (1+ ε )) + 1" shows " ¬ algebraic ( P k. b k / a k)" Assuming a key theorem whose proof has not been formalized could beseen as compromising the vision of absolute correctness, which demands abottom-up approach: to formalize the proofs of all prerequisites. However,ours is a more realistic approach that reflects actual mathematical practice.It still guarantees the correctness of the arguments we formalized, which afterall also assume Roth’s theorem. Our approach has the significant advantageof reaching the formalization of more advanced mathematics faster.Nevertheless, care must be taken to avoid propagating errors in the lit-erature. We recommend that an unverified theorem should be taken as anassumption only if it is a fundamental result that has been checked by manymathematicians in the past. Roth’s famous theorem can be considered safein this sense. And all such assumptions must be declared openly [19, Section5]. The process of the formalization helped to reveal a slight mistake in one ofthe original proofs. It puzzled us for some time, although the eventual fixwas straightforward. In the proof of Theorem 3.4 [16, page 534] it is claimedthat from the assumptions it follows that for each real number A > , thereexists a positive integer k such that for all k > k , A · b k α k > b k +1 α k +1 . During the formalization process, we noticed that there is a problem with thisclaim. Consider the counterexample where we set α k +1 = k ( Q ki =1 α i ) ⌈ δ ⌉ if k is odd, and α k +1 = 2 α k otherwise, with b k = 1 for all k . To resolve this,we had suggested a slightly modified version of the original statement anda different proof. However, this turned out to be unnecessary; the authors17uggested to us via email that the problem could be resolved by replacing“for each real number A > ” with “there exists a real number A > ” above.This suggestion repaired the proof, and the rest of our formalization [21]followed the original proof [16] without any further problems. The de Bruijn factor, introduced in 1977 by L. S. van Benthem Jutting [18], isthe ratio of the size of a formalization (in symbols) to the size of the originalmathematical text (in words). Freek Wiedijk [32] recommends making thismore precise by comparing the number of bytes in the computer encodings(using the L A TEX source of the mathematics), even compressing both filesto ensure independence from such factors as the lengths of identifiers. Suchprecision is of questionable value, given the enormous variations in the densityof mathematical texts.Here we only give approximate estimates of the de Bruijn factors forour formalizations, counting the number of lines. We consider the entireamount of the material (i.e. statements together with their proofs as well ascorollaries together with their proofs) in each formalization work. Given ourformalization [22] which spans around 1960 lines, we estimate the de Bruijnfactor for Theorem 3.1 ([9, Theorem 2.1]), Corollary 3.1 ([9, Corollary 2.10])and Theorem 3.2 ([9, Theorem 3.1]) and their respective proofs altogetherto be around 25. Given our formalization [20] which spans around 1054lines, we estimate the de Bruijn factor for Theorem 3.3 ([15, Theorem 3]),Corollary 3.2 ([15, Corollary 2]) and their respective proofs altogether to bearound 21. Finally, given our formalization [21] which spans around 990 lines,we estimate the de Bruijn factor for Theorem 3.4 ([16, Theorem 2.1]) andTheorem 3.5 ([16, Theorem 2.2])and their respective proofs altogether to bearound 13. The above de Bruijn factors are high because we had to fill ina considerable amount of intermediate arguments which had not been madeexplicit in the original proofs, especially in the case of Erdős and Straus [9]. Acknowledgements. The authors thank ERC for their support throughthe ERC Advanced Grant ALEXANDRIA (Project GA 742178). We thankJaroslav Hančl and Pavel Rucki for a helpful email suggesting a fix for theslight mistake in their proof [16, Theorem 2.1]. We also thank Iosif Pinelis forhis useful explanation on MathOverflow regarding an argument in the proof18f Theorem 2.2 in the same paper and Anthony Bordg for a discussion onthe necessity of formalizing advanced mathematics even if the proofs of theprerequisites are not formalized. Appendix Our formalized version of Theorem 3.3 ([15, Theorem 3]) along with its for-malized proof as in [20] is presented below: theorem Hancl3: fixes d :: "nat ⇒ real " and a b ::"nat ⇒ int" and A::real and s::nat assumes "A > 1" and d:" ∀ n. d n> 1" and a:" ∀ n. a n>0" and b:" ∀ n. b n > 0" and "s > 0" and assu1: "(( λ n. a n powr (1/(2::int)^n)) −−−→ A) sequentially" and assu2: " ∀ n ≥ s. A / a n powr (1/(2::int)^n)> ( Q j. d (n + j))" and assu3: "LIM n sequentially. d n ^ 2 ^ n / b n :> at_top" and "convergent_prod d" shows "( P n. b n / a n) / ∈ Q " proof (rule ccontr) assume asm:" ¬ (( P n. b n / a n ) / ∈ Q )" have ab_sum:"summable ( λ j. b j / a j)" using issummable[OF h A>1 i d a b assu1 assu3 h convergent_prod d i ] .obtain p q ::int where "q>0" and pq_def:"( λ n. b (n+1) / a (n+1)) sums (p/q)" proof - from asm have "( P n. b n / a n) ∈ Q " by auto then have "( P n. b (n+1) / a (n+1)) ∈ Q " by (subst suminf_minus_initial_segment[OF ab_sum,of 1]) auto then obtain p’ q’ ::int where "q’ = and pq_def:"( λ n. b (n+1) / a (n+1) ) sums (p’/q’)" unfolding Rats_eq_int_div_int using summable_ignore_initial_segment[OF ab_sum,of 1,THEN summable_sums] by force define p q where "p=(if q’<0 then - p’ else p’)" and "q=(if q’<0 then - q’ else q’)" have "p’/q’=p/q" and "q>0" using h q’ = i unfolding p_def q_def by auto then show ?thesis using that[of q p] pq_def by auto https://mathoverflow.net/questions/323069/why-is-this-series-summable eddefine ALPHA where "ALPHA = ( λ n. q * ( Q j=1..n. a j) * ( P j. b (j+n+1) / a (j+n+1)))" have "ALPHA n ≥ for n proof - have "( P n. b (n+1) / a (n+1)) > 0" apply (rule suminf_pos) using summable_ignore_initial_segment[OF ab_sum,of 1] a b by auto then have "p/q > 0" using sums_unique[OF pq_def,symmetric] by auto then have "q ≥ and "p ≥ using h q>0 i by (auto simp add:divide_simps) moreover have " ∀ n. 1 ≤ a n" and " ∀ n. 1 ≤ b n" using a b by (auto simp add: int_one_le_iff_zero_less) ultimately show ?thesis unfolding ALPHA_def using show7[OF _ _ _ _ pq_def] by auto qedmoreover have " ∃ n. ALPHA n < 1" unfolding ALPHA_def proof (rule lasttoshow[OF d a h s>0 i h q>0 i h A>1 i b _ assu3]) show " ∀ F n in sequentially. ( P j. b (n + j) / a(n + j)) ≤ using show5[OF h A>1 i d a b assu1 assu3 h convergent_prod d i ] by simp show " ∀ m ≥ s. ∃ n ≥ m. d (n + 1)* (MAX j ∈ {s..n}. a j powr (1 / (2::int) ^ j)) ≤ a (n + 1) powr (1 / (2::int) ^ (n + 1))" apply (rule show9[OF h A>1 i d a h s>0 i assu1 h convergent_prod d i ]) using show8[OF h A>1 i d a h s>0 i h convergent_prod d i assu2] by (simp add:algebra_simps) qedultimately show False using not_le by blast qed References [1] Bak, J. and Newman, D. J., Complex Analysis , Springer, 3rd edition(2010).[2] Blanchette, J. C., Kaliszyk, C., Paulson, L. C. and Urban, C., Hammer-ing towards QED , Journal of Formalized Reasoning, 9(1):101–148 (2016).203] Boyer, R. et al., The QED Manifesto , in: A. Bundy (ed.), AutomatedDeduction – CADE 12, LNAI 814, Springer-Verlag, 238–251 (1994).[4] Eberl, M. Verified real asymptotics in Isabelle/HOL . In Proceedings of In-ternational Symposium on Symbolic and Algebraic Computation (2019).[5] Eberl, M. Elementary Facts About the Distribution of Primes , Archiveof Formal Proofs (2019), formal proof development, available on .[6] Eberl, M. and Paulson, L.C., The Prime Number Theorem , Archiveof Formal Proofs (2018), formal proof development, available on .[7] Erdős, P., Sur certaines series à valeur irrationelle , Enseignment Math.,Vol.4, pp.93-100, (1958).[8] Erdős, P., Some problems and results on the irrationality of the sum ofinfinite series , J. Math. Sci., Vol. 10, pp.1-7 (1975).[9] Erdős, P. and Straus, E.G., On the irrationality of certain series , PacificJournal of Mathematics, Vol. 55, No 1 (1974).[10] Erdős, P. and Straus, E.G., Some number theoretic results , Pacific Jour-nal of Mathematics, Vol. 36, pp. 635-646 (1971).[11] Gowers, T., Rough Structure and Classification , in: Alon N., BourgainJ., Connes A., Gromov M., Milman V. (eds.) Visions in Mathematics.Modern Birkhäuser Classics. Birkhäuser Basel (2010).[12] Hančl, J., Criterion for irrational sequences , J. Number Theory, Vol. 43,No. 1, pp. 88-92 (1993).[13] Hančl, J., Transcendental Sequences , Math. Slov., Vol. 46, pp.177-179(1996).[14] Hančl, J., Two criteria for transcendental sequences , Le Matematiche,Vol. 56, pp. 149-160 (2001).[15] Hančl, J., Irrational rapidly convergent series , Rend. Sem. Mat. Univ.Padova, Vol. 107 (2002). 2116] Hančl, J. and Rucki, P., The transcendence of certain infinite series ,Rocky Mountain Journal of Mathematics, 35(2) (2005).[17] Hölzl, J., Immler, F. and Huffman, B. Type classes and filters for math-ematical analysis in Isabelle/HOL . In International Conference on In-teractive Theorem Proving 2013 Jul 22 (pp. 279-294). Springer, Berlin,Heidelberg.[18] Jutting, L.S. van Benthem. Checking Landau’s “Grundlagen” in theAUTOMATH System . PhD thesis, Eindhoven University of Technology(1977). https://doi.org/10.6100/IR23183 .[19] Koutsoukou-Argyraki, A., Formalising Mathematics – in Praxis; AMathematician’s First Experiences with Isabelle/HOL and the Whyand How of Getting Started , Jahresber. Dtsch. Math. Ver. (2020). https://doi.org/10.1365/s13291-020-00221-1 [20] Koutsoukou-Argyraki, A. and Li, W., Irrationalrapidly convergent series , Archive of Formal Proofs(2018), formal proof development, available on .[21] Koutsoukou-Argyraki, A. and Li, W., The transcen-dence of certain infinite series , Archive of FormalProofs (2019), formal proof development, available on .[22] Koutsoukou-Argyraki, A. and Li, W., Irrationality Cri-teria for Series by Erdős and Straus , Archive of For-mal Proofs (2020), formal proof development, available on .[23] Mahler, K., Lectures on transcendental numbers , Lecture Notes in Math-ematics 546, Springer, (1976).[24] Nipkow, T., Paulson, L. C., and Wenzel, M., Isabelle/HOL: A ProofAssistant for Higher-Order Logic , Lecture Notes in Computer Science,Vol. 2283, Springer-Verlag (2002).[25] Nishioka, K., Mahler functions and transcendence , Lecture Notes inMathematics 1631, Springer, (1996).2226] Nyblom, M.A., A theorem on transcendence of infinite series , RockyMountain Journal of Mathematics, Vol. 30 pp. 1111-1120 (2000).[27] Nyblom, M.A., A theorem on transcendence of infinite series II , J. Num-ber Theory Vol. 91, pp.71-80 (2001).[28] Paulson, L. C., The Foundation of a Generic Theorem Prover , Journalof Automated Reasoning, Vol. 5, Issue 3: 363–397, Kluwer AcademicPublishers (1989).[29] Paulson, L. C., ALEXANDRIA: Large-scale formal proof for the work-ing mathematician , project description, (12 Nov. 2018), available on .[30] Roth, K.F., Rational approximations to algebraic numbers, MathematicaVol. 2, Part 1, No. 3, 1–20 (1955).[31] Sándor, J., Some classes of irrational numbers , Studia, Babeş-Bolyai,Mathematica, Vol. 29, pp.3-12 (1994).[32] Wiedijk, F., The De Bruijn Factor , Technical report, De-partment of Computer Science Nijmegen University, P.O.Box 9010, 6500 GL Nijmegen, Netherlands (2000), Online at