Alphabeta Math
TheoremStatement: Literature-sourcedProof: AI-adaptedSession-authored (Fable 5 assisted)precheck 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):=n0anxn

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 IxM divided by det(IxM), hence rational (Transfer-matrix theorem: weighted-walk generating functions are cofactors of IxA divided by det(IxA)).

[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.1

If B= and q=Σ, then an=qn and (1qx)n0qnxn=1 coefficientwise, so [L1] makes A(x)=1/(1qx) rational.

givenL1algebra
1.2

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.

givenL2
2.1

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=ba with b a suffix of w; and b avoids B and is a proper prefix of bB, so bSB. 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.

step 1.2L2
3.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.

step 1.2step 2.1
4.1

By [L3], an=vSB(Mn)εv. Each series n0(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.

step 1.1step 3.1L3L4L5

Depends on

Used by

Dependency tree · next 3 levels

Direct dependencies and their dependencies through the next three levels: 41 results over 10 levels. An arrow runs from a result to what uses it, and this result sits at the bottom with a heavier outline. Click the chart to enlarge it.

Sources