Alphabeta Math
TheoremStatement: AI-adaptedProof: AI-adaptedPipeline-generatedprecheck pending
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.

Hard and soft attention limits for formal-language prediction

Statement

For PARITY, whose members are the bit strings with an even number of 1s, no fixed finite-depth hard-attention sequence model with fixed parameters recognizes every sufficiently long input exactly. For 2DYCK, whose words are correctly balanced and properly nested strings over two bracket types, no such hard-attention model recognizes the language. In both cases the model appends an end marker before classification.

For all soft-attention conclusions below, fix the parameter matrices, depth, and number of heads independently of length; use scaled dot-product scores with fixed linear query/key/value maps, uniformly bounded token and positional embeddings combined by addition, globally Lipschitz positionwise maps, and a fixed globally Lipschitz logit readout followed by softmax. Under these one-symbol influence assumptions, the parity source process with fixed p∈(0,1) has sharp unigram cross-entropy level

H(u),u(eos)=p/2,u(0)=u(1)=(2−p)/4.

Every such predictor has limiting lower cross-entropy at least H(u), and the constant predictor u attains it.

For the 2DYCK PCFG with rules S→(S)S and S→[S]S each of probability p/2, and S→ϵ of probability 1−p, fix any p∈(0,1). Read its left-to-right output as a finite or infinite bracket stream; sample a length-k prefix conditional on at least k bracket tokens having been emitted, and predict the ordinary next token, without conditioning on exact total length. Every fixed soft-attention predictor satisfying these one-symbol influence assumptions has

lim inf⁡k→∞(Lp,k−Lp,k∗)≥p2(1−p)2log⁡2>0,

where Lp,k is its expected next-token cross-entropy under this prefix law and Lp,k∗ is the corresponding optimal conditional cross-entropy.

The PCFG is a probability law on finite words precisely when p≤1/2. For all p∈(0,1) its finite output can instead be conditioned on eventual termination. For that finite-word probability law, sample prefixes conditional on reaching length k and predict the next token without any additional length conditioning. The same positive-gap conclusion holds with p replaced by a=min⁡(p,1−p):

lim inf⁡k→∞(Lp,kfin−(Lp,kfin)∗)≥a2(1−a)2log⁡2>0.

For p≤1/2 these two prefix laws agree. At p=1/2 finite words have infinite expected length, but the prefix bounds still hold. For p>1/2 the first law includes nonterminating streams and the second conditions them away; neither is an unconditioned probability distribution on finite words with the original parameter p. These are cross-entropy limits, not exact-classification impossibility theorems.

Statement references

Hahn, §§5–6: hard-attention language limits and soft-attention prediction bounds

A nonfinal token has inverse-length influence under bounded soft attention: the precise bounded dot-product model and globally Lipschitz readout followed by softmax.

Paired-prefix lower bound for soft-attention 2DYCK prediction: the paired-prefix soft-attention gap.

Exact 2DYCK PCFG prefix laws and positive paired-prefix mass: exact stream and finite-word prefix laws and a uniform equal-mass pairing.

Facts & Assumptions

Given: The formal-language definitions and model conventions in the Statement.

[F1]

Fixed-depth hard attention cannot recognize PARITY or 2DYCK with the stated end-marker convention (Fixed-depth hard attention cannot recognize PARITY or 2DYCK).

[F2]

For the stated parity source, every such soft predictor has limiting expected cross-entropy at least H(u), and the constant predictor u attains H(u) (Fixed soft attention has no parity advantage over the unigram predictor).

[F3]

Under a positive-mass disjoint equal-prefix pairing whose conditional closing targets are swapped, soft-attention next-token cross-entropy exceeds the conditional optimum by at least P0(1−p)log⁡2 in the limit (Paired-prefix lower bound for soft-attention 2DYCK prediction).

[F4]

The stream prefix law has disjoint equal-mass pairs of mass at least p2(1−p), obtained by flipping the outer opening in a final three-token opening-opening-closing pattern. Conditioning on finite output replaces the parameter by a=min⁡(p,1−p) and gives the same pairing with that parameter (Exact 2DYCK PCFG prefix laws and positive paired-prefix mass).

Proof

1.1givenF1construct

The hard-attention assertions are exactly [F1], proved by the iterated restriction reduction for the fixed finite depth and finite alphabet, with the end marker fixed.

1.2givenF2algebra

The parity cross-entropy lower bound and its sharpness are exactly [F2]. The probability vector u is the equal mixture of the even-parity target (p,(1−p)/2,(1−p)/2) and odd-parity target (0,1/2,1/2) in coordinate order (eos,0,1).

1.3givenF3F4constructalgebra

Put n=k+1 and append the fixed readout end marker to each sampled length-k prefix. By [F4], every prefix in the paired event ends with a closing bracket and has positive stack height; the flipped opening at position k−2 is nonfinal. The pair members have equal probability and ordinary next-token laws assigning p/2 to each opening and 1−p to opposite matching closing types. Hence all hypotheses of [F3] hold with P0=p2(1−p). It gives excess cross-entropy at least p2(1−p)2log⁡2 in the lower limit. The appended readout marker is an input convention and does not assert that the sampled source prefix terminates there.

2.1givenF4step 1.3algebrainduction∎

Under conditioning on eventual termination, [F4] identifies the entire prefix and target process with parameter a=min⁡(p,1−p). Repeat step 1.3 with a to prove the finite-word bound. The finite-word mass and extinction calculation in [F4] give the stated distinction between the two laws. At p=1/2, let Gj be the nodes in generation j of the derivation tree. A finite-generation induction gives E∣Gj∣=(2p)j=1 for every j. Hence the number ZN=∑j=0N∣Gj∣ of nodes through generation N has expectation N+1. The total node count Z is at least ZN, so monotonicity of expectation gives EZ≥N+1 for every N and therefore EZ=∞, without interchanging an expectation with an infinite sum. Finite derivations are full binary trees, and their word length is their node count minus one; thus the finite-word law has infinite expected length. Neither pairing proof uses finite expected length.

Remarks

The explicit prefix-sampling law resolves the conditioning left implicit in Hahn's Theorem 6. Its finite-mean Markov-chain sketch is unnecessary: extending any surviving prefix by two openings and the matching inner close supplies positive paired mass directly. Exact-total-length conditioning is a different prediction problem; its next-token probabilities are not generally p/2,p/2,1−p. The fixed-length universality theorem concerns a separate regime with resources allowed to grow.

Depends on

Used by

Nothing in the library uses this result yet.

Dependency tree · two levels

11 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