REVIEW
Automatic Theorem Proving in Walnut
Formal Languages and Automata Theory · Submitted 18 Mar 2016 · 15 references
Pith's verdict: The Walnut manual: a solid, honest tool reference whose one undelimited caveat in §4.2 is a documentation gap, not a flaw in the underlying procedure.
T0 · AI review
Why Pith says this
Highlight any text to comment on it.
Referee report
The paper
The paper claims
Walnut turns questions about automatic words into finite automata, so a predicate about a sequence is decided by a machine rather than by finding a proof.
The reading
What carries the argument
The load-bearing mechanism is the cross product of automata, which builds the machine for a conjunction from the machines for its two halves by running them in parallel and keeping only pairs of accepting states, with analogous choices of final-state set giving disjunction, exclusive or, implication, and equivalence. Quantification is handled by projection: the quantified coordinate is deleted from every transition, producing a nondeterministic automaton that misses exactly those tuples whose witness exists only after padding with leading or trailing zeros, and the paper's repair is to seed the start states (for most-significant-digit systems) or the final states (for least-significant-digit systems) with everything reachable by reading a string of zeros, then determinize and minimize. Negation is totalization plus swapping final and non-final states, intersected with the automaton for valid representations so that non-representations are not accidentally accepted. Arithmetic and comparison operators are then built recursively from addition and less-than, indexing into a word is read off the final states of that word's automaton with output, and calling a named automaton is shown to be pure syntactic sugar over an existential quantification plus equalities.
Extended reading notes
Core claim
The central claim is that the first-order theory of the natural numbers, extended with the ability to index into automatic words, is decidable in practice, and that Walnut is an implementation of that decision procedure. Every predicate in the language is built from four base relations that each number system supplies — valid representations, addition, equality, and less-than — together with the logical connectives, quantifiers, arithmetic operators, calls to previously defined automata, and indexing expressions. The paper's assertion is that for every such predicate and every ordering of its free variables there is a unique minimal deterministic automaton accepting exactly the same-length representations of the tuples that satisfy it, and that this automaton can be computed by cross product, projection, complementation, and minimization. The author states the consequence directly: questions about squares, overlaps, palindromes, borders, and factor complexity in an automatic word become computations, and the output is not merely a yes or no but a machine describing the entire set of satisfying tuples.
Load-bearing premise
The load-bearing premise is that the automaton built for an existential quantifier accepts exactly the tuples that have a witness; the paper states this holds only when the surviving inputs are all most-significant-digit-first or all least-significant-digit-first, and says that for mixed systems the program builds only the raw projection, which the author calls not theoretically accurate and asks users to be cautious about.
Editorial extensions
If this is right
- Every property expressible in the predicate language is decidable, so questions about squares, overlaps, palindromes, borders, and factor complexity in an automatic word become computations rather than proof searches.
- Because the result is a minimal automaton rather than a bare yes or no, the answer describes the whole set of satisfying tuples, as with the square orders in the Thue–Morse word emerging as $2^k$ and $2^{k+1}+2^k$.
- Predicates can be named with `def` and called from later predicates, so a reusable library of lemmas about a word can be accumulated and cited inside subsequent queries.
- Asking for incidence matrices of chosen free variables lets a user count or enumerate solutions instead of merely deciding existence.
- Regular-expression input through `reg` lets a user hand-build automata for sets that Presburger arithmetic cannot express, such as the powers of two, and mix them into later predicates.
Reading between the lines
- The practical reach of the tool is set less by the logic than by which sequences someone has already encoded as automata with output, so the interesting near-term work is expanding that library rather than expanding the predicate language.
- The acknowledged gap for mixed most-significant-digit and least-significant-digit quantification suggests a concrete repair: carry the padding length as an extra existentially quantified coordinate, which would make the projection exact in the mixed case instead of merely approximate.
- Since the output is an automaton rather than a proof script, an answer can be checked by a small trusted automaton library, which is a much weaker trust requirement than trusting a general-purpose theorem prover.
- The predicate language behaves like a programming language with quantifiers, so the cost of a query is dominated by determinization and minimization; the practical barrier is state blow-up, not the difficulty of the underlying logic.
Original abstract
Walnut is a software package that implements a mechanical decision procedure for deciding certain combinatorial properties of some special words referred to as automatic words or automatic sequences. Walnut is written in Java and is open source. It is licensed under GNU General Public License.
The compiled record
The paper's own sentences, arranged, kept beside the review and separate from it. Each label is drawn from a closed vocabulary; the number beside it is the probability the classifier gave that label. Numbers in the tables are the authors', checked by code. No sentence in this record was written by a model.
The abstract, sentence by sentence
Walnut is a software package that implements a mechanical decision procedure for deciding certain combinatorial properties of some special words referred to as automatic words or automatic sequences. Walnut is written in Java and is open source. It is licensed under GNU General Public License.
background contribution method result interpretation main claim
| # | sentence | role | the authors' own work | states the main conclusion | strength |
|---|---|---|---|---|---|
| s0 | Walnut is a software package that implements a mechanical decision procedure for deciding certain combinatorial properties of some special words referred to as automatic words or automatic sequences. | contribution 0.49 | 0.33 | 0.19 | asserted 1.00 |
| s1 | Walnut is written in Java and is open source. | method 0.68 | 0.47 | 0.03 | asserted 1.00 |
| s2 | It is licensed under GNU General Public License. | background 0.88 | 0.22 | 0.02 | asserted 1.00 |
What was examined, and what was not
- arXiv listing abstract v2
- full text
- figures and tables
- references and citing sentences
- relations to other papers
- P abstract
- S sections
- T body sentences
- C citations
- R cross-paper relations
Figures
Showing 5 of the paper's 8 figures. See all figures in the PDF ↗ Figures reproduced from arXiv:1603.06017 by the authors.
References
How later papers used it
93 later papers cite it
14 later papers by other authors are listed below: 14 used its method or tool.
Uses its method or tool 14 of 79 papers with this label
-
Obtained its main results by computer using Walnut.
Prefixes of the Fibonacci word that end with a cube (2021) · 1.00 · paraphrased: the licence does not allow quoting
-
Proved Dekking's conjecture via purely computational means using a decision procedure implemented in Walnut.
Subword complexity of the Fibonacci-Thue-Morse sequence: the proof of Dekking's conjecture (2020) · 1.00 · paraphrased: the licence does not allow quoting
-
Used the automatic theorem-proving software Walnut to show that the Thue-Morse word contains a factor u of length n-4 such that u0100 is earmarked.
Extremal overlap-free and extremal $\beta$-free binary words (2020) · 1.00 · paraphrased: the licence does not allow quoting
-
Proved this with Walnut.
Extending Dekking's construction of an infinite binary word avoiding abelian $4$-powers (2021) · 1.00 · paraphrased: the licence does not allow quoting
-
Studied p_t(i) and h_t(i) with the aid of the computer program Walnut.
The periodic complexity function of the Thue-Morse word, the Rudin-Shapiro word, and the period-doubling word (2021) · 1.00 · paraphrased: the licence does not allow quoting
-
Utilized the automatic theorem-proving software Walnut to constructively decide first-order predicates concerning the word r.
Repetitions in infinite palindrome-rich words (2019) · 1.00 · paraphrased: the licence does not allow quoting
-
Made extensive use of Walnut, along with Grail, to decide whether a given k-automatic set forms an additive basis of order m and to answer first-order queries about its elements.
Additive Number Theory via Approximation by Regular Languages (2018) · 1.00 · paraphrased: the licence does not allow quoting
-
Used the software called Walnut to give automated proofs in situations where automatic sequences can be used.
Mechanical proving with Walnut for squares and cubes in partial words (2022) · 0.99 · paraphrased: the licence does not allow quoting
-
We use Walnut [ref] , a free software theorem-prover for first-order statements about automata and the sequences they compute.
Properties of a Class of Toeplitz Words (2021) · Decision procedures and Walnut · 1.00
-
We use the automatic theorem-proving software , originally written by Hamoon Mousavi [ref] . is based on an algorithm that can decidably prove or disprove first-order logical statements involving automatic sequences, made possible by Büchi's decidability theorem ( [ref] ).
Monochromatic arithmetic progressions in the Fibonacci, Thue-Morse, and Rudin-Shapiro words (2025) · Section · 1.00
-
For each relation, we compute a linear representation for each term except $a_0$ (resp., $a_1, a_3$) using Walnut [ref] ; then we compute a linear representation for the difference using block matrices.
Proof of a conjecture of Krawchuk and Rampersad (2023) · Preliminary results · 1.00
-
The aim of the course was to allow students to solve as many problems as possible from the Online Encyclopedia of Integer Sequences using the automatic theorem prover [ref] .
Using Walnut to solve problems from the OEIS (2025) · Introduction · 0.97
-
Used the theorem-prover Walnut to prove its guessed representation correct in each case.
Hilbert's spacefilling curve described by automatic, regular, and synchronized sequences (2021) · 1.00 · paraphrased: the licence does not allow quoting
-
Used the automatic theorem-proving software Walnut to do this.
A family of formulas with reversal of high avoidability index (2016) · 1.00 · paraphrased: the licence does not allow quoting
How the literature uses it
90 arXiv papers cite this in 108 sentences
Papers citing it · 17 sentences without a confident label
Uses its method or tool 77 papers
-
Our main results are all obtained by computer using Walnut [ref] .
Prefixes of the Fibonacci word that end with a cube · Walnut computations · 1.00
-
We can prove Dekking's conjecture via purely computational means, using a decision procedure implemented in the free software Walnut [ref] .
Subword complexity of the Fibonacci-Thue-Morse sequence: the proof of Dekking's conjecture · Outline of the proof · 1.00
-
The infinite word $w$ is Fibonacci-automatic, in the sense of [ref] , so we can apply the Walnut theorem-prover [ref] to establish this claim.
Antisquares and Critical Exponents · A good infinite word with critical exponent 2+alpha · 1.00
Compares with it 1 paper
-
Related work Pecan improves on Walnut [ref] , a similar automata-based theorem prover for automatic sequences, by using Büchi automata instead of finite automata.
Pecan: An Automated Theorem Prover for Automatic Sequences using B\"uchi Automata · Introduction · 0.96
Cites it as background 3 papers
-
A more detailed explanation can be found in [ref] .
Mechanical proving with Walnut for squares and cubes in partial words · Squares, antisquares, cubes, and first-order logic · 0.86
-
For more about Walnut, see [ref] and the web page <https://cs.uwaterloo.ca/ shallit/walnut.html> .
An 'Experimental Mathematics' Approach to Stolarsky Interspersions via Automata Theory · Automata, logic, and Walnut · 0.85
-
The software Walnut [ref] has had a revolutionary impact on the theory of automatic words.
Topological invariants for words of linear factor complexity · Concluding remarks · 0.80
Discussion
Disagree with the review, or know something it missed? Leave a comment, highlight any passage above to comment on it, or challenge this review formally.