Alphabeta Math
DefinitionDefinition: AI-adaptedProof: Not applicableSession-authored (Fable 5 assisted)audited 2026-08-26
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.

Balanced bracket words, defined by the recursive grammar

Definition

Let Σ:={(,)} and let Σ:=NΣ be the set of all finite words over Σ, the words of length being the functions {0,,1}Σ (Finite words, contiguous factors, avoidance and proper-prefix states). Write ε for the empty word and uv for concatenation.

Call a set XΣ grammatical when εX and (u)vX for all u,vX. The set Σ itself is grammatical, so the family of grammatical subsets is a nonempty subfamily of P(Σ) (The power set P(x)={z:zx}), and we may define

B:={XΣ:X is grammatical},

the balanced bracket words. Thus B is itself grammatical, and it is contained in every grammatical set.

Structural induction, which is what the definition is for. If XB is grammatical then X=B, since B is contained in every grammatical set. So to prove that every balanced bracket word has a property it suffices to prove it for ε and to prove it for (u)v whenever it holds for u and for v.

Every nonempty balanced word factors as (u)v. Put B:={ε}{(u)v:u,vB}. Then BB because B is grammatical, and B is itself grammatical: it contains ε, and if u,vB then u,vB, so (u)vB by construction. By the previous paragraph B=B, which is the assertion.

Lengths. Every wB has even length: this holds for ε, and if u and v have even lengths then so does (u)v, whose length is u+v+2. So put, for nN,

Bn:={wB:w=2n}.

Then B0={ε}, since a balanced word of length 0 is ε and εB; and for every n,

Bn+1=in{(u)v:uBi, vBni},

by the factorisation clause together with the additivity of lengths. In particular B1={()} and B2={(()),()()}.

Each Bn is finite, being a subset of the set Σ2n of words of length 2n, which is finite with 22n elements (The set AB of functions BA between finite sets is finite, with AB=AB, A subset of a finite set is finite, with BA, and equality holds if and only if B=A, The cardinality A of a finite set).

Remarks

  • The grammar is the definition, and that is deliberate. The set could instead have been defined by the counting condition — every prefix has at least as many ( as ), with equal totals — and then the theorem that follows would be a tautology. Taking the recursive description as the definition makes the equivalence of the two descriptions something to prove, and it is that equivalence that the counting arguments use.

  • No parser and no stack. The definition quantifies over subsets of Σ and takes an intersection. Nothing about reading a word left to right is assumed; the left-to-right characterisation is the content of the next item.

  • Why the graded pieces are indexed by half the length. A balanced word has even length, and every count on this page is stated in the number of bracket pairs. The displayed recursion for Bn+1 is the same shape as the first-return decomposition of a Dyck path, which is why the two families have the same counts.

Depends on

Used by

Dependency tree · two levels

25 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