REVIEW 3 major objections 3 minor 22 references
Corecursive Coding of High Computational Derivatives and Power Series
T0 review · 3 major / 3 minor · reviewed 2026-08-10 · deepseek-v4-flash
Pith's one-line read The paper argues that a lazy, corecursive data type can hold an expression together with all of its derivatives, so that differentiating an expression just means taking the tail of the chain.
desk verdict A readable Haskell tutorial on lazy derivative towers and power series with a genuinely neat convolution product, but the 1000-derivative claim is unverified and the code is not archived—worth refereeing if reproducibility is demanded. read the letter →
The pith
A machine-rendered reading of the paper's core claim, the machinery that carries it, and where it could break.
The reading
What carries the argument
The load-bearing object is the infinite corecursive stream called a derivative chain, written with the constructor `(:>)` and type `Df a`; it represents an expression as `value :> derivative-tower`, so differentiation is just taking the tail. Around it the paper builds an arithmetic `Num`/`Fractional`/`Floating` instance in which every operation is defined recursively on the tail, with self-referential definitions (for example `w = exp x0 :> (x' * w)`) allowed only when the recursive call is guarded by a constructor. For multiplication the paper replaces the doubling Leibniz rule with a convolution driven by the infinite Pascal triangle, and division is reconstructed from the same convolution; this is what keeps the cost polynomial rather than exponential. For series, the analogous constructor `(:-)` and the pair `sdif`/`sint` (formal differentiation and integration with a given constant) carry the definitions of exp, log, sin, division, composition via an infinite Horner scheme, and reversion via the rearrangement `t = 0 :- w; w = 1 :- (-w*w*scompose v t)`.
What would settle it
Evaluate the derivative tower of $\exp(-x)\sin(x)$ at $x=0.5$ using ordinary floating-point arithmetic, and compare the 1000th coefficient against an independently computed high-precision reference; if the values diverge before reaching 1000 terms, the claimed polynomial-cost convolution does not deliver what the paper asserts.
Extended reading notes
Core claim
The central claim is that one closed differential algebra can be implemented as a lazy, corecursive data type, so that the derivative of an expression is again an expression of the same type. Concretely, the chain type `a :> Df a` holds a value followed by its derivative tower; the variable is `x :> 1 :> 0 :> ...` and constants are `c :> 0 :> ...`, and the arithmetic rules are chosen so that every operation yields a new chain whose tail is the derivative of the whole. Multiplication is the delicate step: the naive pointwise Leibniz rule costs exponentially many terms, so the paper supplies a convolution using the Pascal triangle's binomial rows; after that optimisation, $\exp(-x)\sin(x)$ yields 1000 coefficients quickly. The same construction is carried over to formal power series `a :- Series a`, where integration rather than differentiation is the natural constructor, and where equation solving produces the Lambert W function and the Stirling asymptotic coefficients. The paper's broadest assertion is that equations become algorithms: a self-referential definition such as `lw0 = 0 :> exp(-lw0)/(1+lw0)` is not a circularity to be avoided but a working program that generates the whole derivative chain.
Load-bearing premise
The whole construction depends on Haskell's lazy evaluation resolving every self-referential stream equation to the intended infinite sequence; if a recursive call is forced before a constructor has produced its first chunk, the definition collapses to bottom and coefficients silently diverge or become NaNs.
Editorial extensions
If this is right
- Any expression written with the usual arithmetic and elementary functions automatically has a derivative tower of every order; a caller who wants only ten derivatives pays only for ten.
- Function composition and reversion reduce to short recursive routines, so inverse-function derivative tables (Faà di Bruno and Lagrange-inversion style results) can be generated, not hand-derived.
- Power series share the same corecursive structure, so series solutions and asymptotic corrections — the paper demonstrates the Stirling coefficients — are produced by the same arithmetic rather than by separate symbolic packages.
- The main practical limit is not the algebra but the runtime: thunk accumulation and floating-point noise cap useful Double precision at roughly 100–200 composition terms; beyond that, inexact zeros propagate into NaNs.
Reading between the lines
- If the corecursive encoding is as robust as the paper suggests, it gives a cheap way to test identities and limit behaviours: compose a function with its computed inverse and measure how many terms survive before floating-point noise, which would turn the paper's warning into a quantitative stability metric.
- The same mechanism could be lifted to truncated series with a fixed modulus, where exact rational or interval arithmetic replaces Double; that would directly test whether the NaN wall is a laziness artifact or an inherent arithmetic instability.
- Because the chain construction is type-generic in the scalar, applying it to interval types or to dual numbers of higher order might yield validated enclosures for high derivatives, a use the paper does not pursue.
Signed reviews
Editorial analysis
A structured set of objections, weighed in public.
Referee Report
Summary. The paper presents lazy functional (Haskell) implementations of two related infinite structures: derivative towers (`Df a`), where an expression is stored together with all of its derivatives as an infinite corecursive chain, and formal power series (`Series a`). It defines arithmetic operations, including optimized multiplication via binomial convolution and corecursive division, as well as elementary functions through self-referential differential equations. It then develops composition and reversion for both towers and series, and applies the machinery to the Lambert W function, Hermite functions, inverse functions, and the Stirling expansion of n!. The manuscript claims that the optimized multiplication makes it practical to generate 1000 derivatives of exp(-x) sin x 'fairly fast', and that a short reversion routine replaces pages of published formulas.
Significance. The paper's strength is algorithmic and didactic: if the code is correct and reproducible, it provides a compact and unusually readable implementation of arbitrary-order forward automatic differentiation and formal power series manipulation. The printed coefficient sequences for Lambert W, reversion, and Stirling match known results, and the manuscript is honest about failure modes such as bottom values, floating-point corruption, and thunk accumulation. The main weakness is that the central scalability claim is not independently checkable: no code archive is supplied, several helper functions are undefined, and the footnoted instability of the programs weakens the reproducibility case. The contribution is significant conditional on the provided artifacts; as submitted, the paper needs a revision that makes those artifacts available and validates the quantitative claims.
major comments (3)
- [Section 2.3, page 8, and footnote 7] The only quantitative scalability evidence, the statement that 1000 elements of exp(-x) sin x were generated 'fairly fast', is not reproducible. The manuscript gives no code archive (footnote 7 says the programs are unstable and asks the reader to contact the author), no timing or hardware/compiler details, and no accuracy criterion. The exact derivatives at 0 have magnitude 2^{n/2} (about 10^150 at n=1000), so Double rounding error is about 10^134 before the binomial convolution (2.3) can amplify it; the generated elements may be finite doubles carrying no correct digits. The authors should archive the code, report experimental conditions, and validate the 1000-term output against exact rational or high-precision values.
- [Section 2.4, page 11] The paper reports that compchain needs about 80 seconds for 200 terms, that going further is useless, and that the composition of cos and arccos explodes after 10-15 terms because floating-point zeros propagate. This sharply qualifies the abstract's phrase 'arbitrarily long sequences of derivatives'. The corecursive scheme is not invalidated, but the manuscript should state precisely whether the intended guarantee is formal (exact arithmetic) or practical (Double up to a problem-dependent order), and should discuss whether the instability is inherent to the algorithm or an artifact of the chosen precision.
- [Section 3.4, page 16-17] The Stirling derivation is asserted rather than proved: the text states 'We omit the proofs' and uses 'It is easy to check' for the cancellation of the linear term and the back-substitution recurrence (3.7)-(3.10). In addition, the code in this section uses undefined helpers (`shd`, `stl`, `exp0`, `log1`, `dbfacs`) and the final diagonal-summation step is only partially specified. The section should supply the missing definitions and at least sketch the omitted algebraic verification, or be explicitly marked as an exercise for the reader.
minor comments (3)
- [Section 2.4] The function `compchain` calls `toscal`, but the definition below is named `toscalar`; also `hd`, `df`, `dToList`, and `zeros` are used without definitions, so the composition example cannot be executed from the printed text alone.
- [Throughout] The manuscript contains numerous typos and stylistic slips (e.g., 'repectively', 'wthout anything else', 'beauty') and some references are incomplete; a careful proofreading pass is needed before final submission.
- [Section 2.4] The phrase that three lines of code 'replace many dozens pages' in cited papers is rhetorical; either substantiate it with a concrete comparison or soften it, since the claim depends on the entire library behind those lines.
Circularity Check
No significant circularity: all claimed outputs are generated by explicit corecursive transformations of standard differential/algebraic identities, with self-citations serving only as provenance.
full rationale
The paper contains no fitted parameters masquerading as predictions and no derivation step that reduces by definition to its own input. The core constructs, such as lw0 = 0 :> exp(-lw0)/(1+lw0), the exponential and trigonometric towers, the convolution-based multiplication, and the series reversion sreverse, are all explicit corecursive encodings of standard differential equations or formal power series identities. The Lambert W chain is cross-checked against the known formula (-n)^(n-1), and the Stirling coefficients are derived twice from independent recurrences; neither derivation uses the target series as an input. The paper's self-citations to Karczmarczuk (1994, 1997, 1998, 2001) are contextual and historical rather than load-bearing, since the algorithms and equations are fully presented in this text. The admitted limitations, such as corruption of high-order Double derivative chains and the 10-15 term explosions in composition, are empirical accuracy/reproducibility concerns, not circularities. The unverified 1000-element timing claim for exp(-x)*sin(x) is a reproducibility risk, but it is not a logical circularity.
Assumptions & free parameters
assumptions (6)
- standard math The differentiation operator is linear, satisfies the Leibniz rule, and is closed on the data type of derivative chains (Section 2).
- domain assumption Haskell lazy evaluation semantics gives well-defined least or greatest fixed points for the corecursive stream definitions used in the paper (Sections 2 and 3).
- standard math Formal power series identities (multiplication, division, composition with zero constant term, reversion) hold as operations on infinite coefficient sequences (Section 3).
- domain assumption The Lambert W function is analytic at 0 with W(0)=0, so the recursive chain lw0 = 0 :> exp(-lw0)/(1+lw0) has the intended solution (Section 2.2).
- standard math Gaussian moment formula integral z^(2m) exp(-n z^2/2) dz = sqrt(2*pi/n) * (2m-1)!! / n^m is valid (Section 4, Eq. 4.4).
- domain assumption Asymptotic series may be manipulated formally without convergence; the Stirling series is treated as a formal expansion (Sections 3.4 and 4).
Cite this review
Pith. "Pith review of Corecursive Coding of High Computational Derivatives and Power Series." pith.science (2026). https://pith.science/paper/CIOZGTOB
@misc{pith2026250113194,
author = {Pith},
title = {Pith review of: Corecursive Coding of High Computational Derivatives and Power Series},
year = {2026},
howpublished = {\url{https://pith.science/paper/CIOZGTOB}},
note = {Machine review of arXiv:2501.13194}
}
read the original abstract
We discuss the functional lazy techniques in generation and handling of arbitrarily long sequences of derivatives of numerical expressions in one ``variable''; the domain to which the paper belongs is usually nicknamed ``Automatic differentiation''. Two models thereof are considered, the chains of ``pure'' derivatives, and the infinite power series, similar, but algorithmically a bit different. We deal with their arithmetic/algebra, and with more convoluted procedures, such as composition and reversion. Some more specific applications of these structures are also presented.
Figures
Reference graph
Works this paper leans on
-
[1]
Apostol, T. M. (2000) Calculating higher derivatives of inverses. The Amer. Math. Monthly. 107(8), 738 –
work page 2000
-
[10]
Corless, R. M., Knuth, D. E. et al.. (1996) On the Lambert W function. Advances in Computational Mathematics. 5, 329 —-
work page 1996
-
[11]
https://iopscience.iop.org/ article/10.1088/0143-0807/37/6/065008/pdf. Fa`a di Bruno, F. (1855) Sullo sviluppo delle funzioni.Annali di Scienze Matematiche e Fisiche. 6, 479 –
-
[13]
(1998) Differentiation of functional programs
Karczmarczuk, J. (1998) Differentiation of functional programs. Proc. III ACM Intern. Conference on Functional Programming. ACM. pp. 195 –
work page 1998
-
[57]
Knuth, D. E. (1997)The Art of Computer Programming, Seminumerical Algorithms. Addison-Wesley. Kono, K. (2017) Higher derivative of composition. https://fractional-calculus.com/ higher_derivative_composition.pdf. Leibniz (von), G. W. (1685) Comment on the Step Reckoner, his calculating machine invented in
work page 1997
-
[112]
cgi?article=1425&context=faculty_publications
https://researchrepository.wvu.edu/cgi/viewcontent. cgi?article=1425&context=faculty_publications. Strawderman, R. (2000) Higher-Order Asymptotic Approximation: Laplace, Saddlepoint, and Related Methods. Journal of the American Statistical Association . 95(452), 1358 – 1364.https://www.researchgate.net/publication/254287979_Higher-Order_ Asymptotic_Approx...
-
[203]
(2001) Functional differentiation of computer programs
Karczmarczuk, J. (2001) Functional differentiation of computer programs. Higher-Order and Symbolic Computation. 14, 35 –
work page 2001
-
[219]
https://www.researchgate.net/publication/266167744_ Euler_Lambert_and_the_Lambert_W-function_today. B¨ ucker, M.et al.. (2024) autodiff.org. https://www.autodiff.org/. Carothers, D. C. et al.. (2012) Connections between power series methods and automatic differenti- ation. In Lecture Notes in Computational Science and Engineering. Springer. chapter 1, pp. 1 —-
Show all 22 references
-
[234]
Kaplanski, I
https://maa.org/sites/default/files/pdf/ upload_library/22/Ford/Johnson217-234.pdf. Kaplanski, I. (1957) An Introduction to Differential Algebra. Hermann, Paris. http://mmrc.iss. ac.cn/˜weili/DifferentialAlgebra/References/Kaplansky.pdf. Karczmarczuk, J. (1994) Lazy functional...
1957
-
[262]
McIlroy, M
https://hal.science/hal-01483287/document. McIlroy, M. D. (1990) Squinting at power series.Software: practice and Experience. 209, 661 –
1990
-
[335]
(2024) References on the Lambert W function and its generalizations
Mez˝o, I. (2024) References on the Lambert W function and its generalizations. https://sites. google.com/site/istvanmezo81/references-on-the-lambert-w-function . Plasmeijer, R. et al.. (2022) Clean. https://wiki.clean.cs.ru.nl/Clean. Reynolds, J. B. (1944) Reversion of series ...
2024
-
[359]
Dunham, W
https://cs.uwaterloo.ca/research/tr/1993/03/W.pdf. Dunham, W. (2008) The Calculus Gallery: Masterpieces from Newton to Lebesgue . Princeton University Press. Eager, D., Pendrill, A.-M. & Reistad, N. (2016) Beyond velocity and acceleration: jerk, snap and higher derivatives. Eu...
2008
-
[480]
Flanders, H
https://books.google.fr/books?id=ddE3AAAAMAAJ&pg=PA479&redir_esc=y#v= onepage&q&f=false. Flanders, H. (2001) From Ford to Fa`a. American Mathematical Monthly. 108(6), 558 —-
2001
-
[484]
Johnson, W
https://arxiv.org/abs/1108.4772. Johnson, W. P. (2002) The Curious History of Fa `a di Bruno’s Formula. The American Mathematical Monthly. 109(3), 217 –
2002 arXiv
-
[561]
& Manchon, D
Frabetti, A. & Manchon, D. (2011) Five interpretations of Fa`a di Bruno’s formula. Dyson–Schwinger Equations and Fa`a di Bruno Hopf Algebras in Physics and Combinatorics.https://arxiv.org/ pdf/1402.5551. Graham, R. L., Knuth, D. E. & Patashnik, O. (1994)Concrete Mathematics. A...
2011 arXiv
-
[580]
Ritt, J. F. (1966) Differential Algebra. Dover, New York. http://mmrc.iss.ac.cn/˜weili/ DifferentialAlgebra/References/Ritt.pdf. Schwatt, I. J. (1962)An Introduction to the Operations with Series. Chelsea scientific books. Chelsea Publishing Company. https://archive.org/detail...
1966
-
[595]
Brito, P
http://www.eecs.harvard.edu/˜htk/publication/ 1978-jacm-brent-kung.pdf . Brito, P. et al. . (2008) Euler, Lambert, and the Lambert W-function today. The Mathematical Scientist. 33, 203 ––
2008
-
[683]
McIlroy, M. D. (1999) Power series, power serious. Journal of Functional Programming. 9, 323 –
1999
-
[741]
(1800) Du calcul des d ´erivations
Arbogast, L. (1800) Du calcul des d ´erivations. Levrault,Strasbourg. https://books.google. fr/books?id=YoPq8uCy5Y8C&printsec=frontcover&hl=fr&source=gbs_ge_summary_ r&cad=0#v=onepage&q&f=false. Bender, C. & Orszag, S. (1978) Advanced Mathematical Methods for Scientists and En...
1978
-
[1673]
(2017) Higher order derivatives of the inverse function.https://vixra.org/pdf/1703
Liptaj, A. (2017) Higher order derivatives of the inverse function.https://vixra.org/pdf/1703. 0295v1.pdf. Martins, J. J., Sturdza, P. & Alonso, J. J. (2003) The complex-step derivative approximation. ACM Trans. on Math. Soft. 29, 245 –
2017
-
[1991]
Brent, R. P. & Kung, H.-T. (1978) Fast algorithms for manipulating formal power series. Journal of the ACM. 25(4), 581 –
1978
-
[2616]
Wheeler, N
https://arxiv.org/pdf/gr-qc/0309109.pdf. Wheeler, N. (2017) Functional inversion strategies. https://www.reed.edu/physics/ faculty/wheeler/documents/Miscellaneous%20Math/Functional%20Inversion% 20Strategies/Applied%20Functional%20Inversion%20.pdf. Wikipedia. (2023) Automatic d...
2017 arXiv
Reviewed August 10, 2026 · model on record in the stance chip above.
Discussion (0). Continue with ORCID to comment.