Alphabeta Math
TheoremStatement: Literature-sourcedProof: AI-adaptedprecheck passaudited 2026-08-16
How statement and proof provenance work

The first chip identifies the source of the statement or construction; the second identifies the source of its local proof or verification.

  • Literature-sourced: the exact statement appears in a cited source; only wording and notation differ.
  • AI-adapted: a semantically identical restatement of literature-sourced material, modulo indexing, notation, and boundary cases adopted by the library.
  • AI-generated: a genuinely novel statement formulated by AI, with no source for the claim itself.

These labels describe origin, not correctness: citations and verification chips remain separate evidence.

Words over a finite alphabet avoiding finitely many nonempty factors have a rational length generating function

Statement

Let Σ be a finite alphabet and let B be a finite set of nonempty words over Σ. If an is the number of length-n words over Σ that avoid every factor in B, then

A(x):=∑n≥0anxn

is a rational formal power series over Z.

Facts & Assumptions

Given: A finite alphabet Σ and a finite set B of nonempty words.

[L1]

A rational formal series has a polynomial numerator and a polynomial denominator with unit constant coefficient (Rational formal power series, proper presentations and reduced denominators).

[L2]

For nonempty B, the prefix automaton retains the longest suffix that is a proper prefix of a forbidden word and rejects a transition that creates a forbidden factor (The longest-suffix prefix automaton for a finite set of forbidden factors).

[L3]

For a finite weighted digraph with transfer matrix M, the total weight of length-n walks from u to v is (Mn)uv (The (u,v) entry of An is the total weight of length-n walks from u to v).

[L4]

Every fixed-entry walk generating series of a nonempty finite weighted digraph is a cofactor of I−xM divided by det⁡(I−xM), hence rational (Transfer-matrix theorem: weighted-walk generating functions are cofactors of I−xA divided by det⁡(I−xA)).

[L5]

Finite sums of rational formal power series are rational (Rational formal power series are closed under sums and Cauchy products).

Proof

technique · automaton invariant and transfer matrix
1.1givenL1algebra

If B=∅ and q=∣Σ∣, then an=qn and (1−qx)∑n≥0qnxn=1 coefficientwise, so [L1] makes A(x)=1/(1−qx) rational.

1.2givenL2

Suppose now that B is nonempty. After a word w avoiding B has been read, the automaton state is the longest suffix of w belonging to SB: this holds initially at ε, and repeated application of [L2] preserves it as each accepted letter is appended.

2.1step 1.2L2

Let w avoid B, let s be its state from step 1.2, and let a∈Σ. If wa contains a forbidden factor b, that factor ends at the appended letter, so b=b′a with b′ a suffix of w; and b′ avoids B and is a proper prefix of b∈B, so b′∈SB. Since s is the longest suffix of w in SB, the word b′ is a suffix of s, so b is a factor of sa and [L2] rejects a. Conversely, s is a suffix of w, so any factor of sa in B is a factor of wa. Thus [L2] rejects exactly the extensions that cease to avoid B.

3.1step 1.2step 2.1

Steps 1.2 and 2.1 give a weight-preserving bijection between length-n words avoiding B and length-n walks in the prefix automaton from ε to any state in SB.

4.1step 1.1step 3.1L3L4L5∎

By [L3], an=∑v∈SB(Mn)εv. Each series ∑n≥0(Mn)εvxn is rational by [L4], and their finite sum is rational by [L5]. Together with the empty-B case in step 1.1, this proves the result.

Depends on

Used by

Dependency tree · two levels

18 results within two dependency steps of this one, each drawn at its shortest distance from it. An arrow runs from a result to what uses it, so the chart reads left to right and ends at this result, which carries a heavier outline. Every node is a link to that result. Click elsewhere on the chart to enlarge it.

Sources