The Euclidean algorithm is not optimal among uniform processes
Version 1 / Oct 29, 2026 / CC BY 4.0
Abstract
Reusing a stored Euclidean prefix, we show that every pair has a derivation of from with applications of the remainder function alone; Euclid's algorithm needs order in the worst case. These derivations bound the intrinsic complexity of gcd and coprimeness by the same order, refuting Moschovakis's conjectured logarithmic lower bounds for uniform processes; by his best-uniform-process theorem, a single uniform process attains this bound. The Main Conjecture for algorithms remains open. We also prove an lower bound on this complexity for almost all coprime pairs and give, for each , a nondeterministic register program computing gcd that, on every input , has a successful computation using at most remainder calls. The upper bound also answers negatively an open problem of van den Dries and Moschovakis on the closure depth of the gcd. The main bounds and the refutations are formalised in Lean 4; the best-uniform-process theorem is cited.
Provenance statement
Formalizations
Tools used
- OpenAI
- CodexVersion GPT-6-Astra
- Anthropic
- Claude CodeVersion Claude Opus 5.5
- Lean
- LeanVersion 4
References
- Nader H. Bshouty. Euclidean GCD algorithm is not optimal . Research Report 1989-376-38, Department of Computer Science, University of Calgary, December 1989. doi:10.11575/ PRISM/30475 (https://doi.org/10.11575/PRISM/30475).DOI
- Benny Chor and Oded Goldreich. An improved parallel algorithm for integer GCD. Algorithmica 5(1--4):1--10, 1990. doi:10.1007/BF01840374 (https://doi.org/10.1007/BF01840374).DOI
- Leonardo de Moura and Sebastian Ullrich. The Lean 4 theorem prover and programming language. In Automated Deduction -- CADE 28 , Lecture Notes in Computer Science, vol. 12699, pp. 625--635. Springer, 2021. doi:10.1007/978-3-030-79876-5_37 (https://doi.org/10.1007/978-3-030-79876-5_37).DOI
- Ravindran Kannan, Gary Miller and Larry Rudolph. Sublinear parallel algorithm for computing the greatest common divisor of two integers. SIAM Journal on Computing 16(1):7--16, 1987. doi:10.1137/0216002 (https://doi.org/10.1137/0216002).DOI
- Donald E. Knuth. The Art of Computer Programming, Vol. 2: Seminumerical Algorithms , 3rd ed. Addison-Wesley, Reading, MA, 1997.
- Yishay Mansour, Baruch Schieber and Prasoon Tiwari. A lower bound for integer greatest common divisor computations. Journal of the ACM 38(2):453--471, 1991. doi:10.1145/103516.103522 (https://doi.org/10.1145/103516.103522).DOI
- Yishay Mansour, Baruch Schieber and Prasoon Tiwari. Lower bounds for computations with the floor operation. SIAM Journal on Computing 20(2):315--327, 1991. doi:10.1137/0220020 (https://doi.org/10.1137/0220020).DOI
- The mathlib Community. The Lean mathematical library. In Proceedings of the 9th ACM SIGPLAN International Conference on Certified Programs and Proofs (CPP 2020) , pp. 367--381. ACM, 2020. doi:10.1145/3372885.3373824 (https://doi.org/10.1145/3372885.3373824).DOI
- Yiannis N. Moschovakis. Absolute lower bounds for uniform processes . Unpublished lecture notes (first draft), January 25, 2012. https://www.math.ucla.edu/~ynm/nadalb.pdf.link
- Yiannis N. Moschovakis. Abstract Recursion and Intrinsic Complexity . Lecture Notes in Logic, vol. 48. Cambridge University Press and Association for Symbolic Logic, 2019. doi:10.1017/9781108234238 (https://doi.org/10.1017/9781108234238).DOI
Show all 14 referencesShow fewer references
- Palomar registry. Entry PALOMAR-2026-10-23-000012, version 2, for commit 2548681 of https://github.com/jasondavies/euclid-uniform-processes. https://palomar-registry.org/entry?id=PALOMAR-2026-10-23-000012&version=2.link
- J. Stein. Computational problems associated with Racah algebra. Journal of Computational Physics 1(3):397--405, 1967. doi:10.1016/0021-9991(67)90047-2 (https://doi.org/10.1016/0021-9991(67)90047-2).DOI
- Lou van den Dries and Yiannis N. Moschovakis. Is the Euclidean algorithm optimal among its peers? Bulletin of Symbolic Logic 10(3):390--418, 2004. doi:10.2178/bsl/1102022663 (https://doi.org/10.2178/bsl/1102022663).DOI
- Lou van den Dries and Yiannis N. Moschovakis. Arithmetic complexity. ACM Transactions on Computational Logic 10(1), Article 2, 49 pp., 2009. doi:10.1145/1459010.1459012 (https://doi.org/10.1145/1459010.1459012). Preprint: https://www.math.ucla.edu/~ynm/papers/ac.pdf.DOI
Version history
- v1 · 16 pagesSubmitted by Jason DaviesInitial depositCurrentOct 28, 2026