Manuscript Offprint
arXiv:2611.01825The Scope Grammar of Natural-Language Rules: Counting and Enumerating Readings modulo Logical Equivalence
Abstract
Automated reasoning can certify a rule only once that rule has been written in logic, yet the rules for which such certification is now wanted, from authorization and business policies to clinical eligibility criteria and academic regulations, exist first as text written for people. Such a text fixes which atomic conditions and which connectives occur, but it leaves open how those connectives are bracketed, and each bracketing is a different logical reading that an autoformalizer must either resolve or expose. We investigate the combinatorial object behind this choice, the scope grammar, a small and deliberately ambiguous context-free grammar whose derivation trees are the readings of a connective skeleton and whose quotient by logical equivalence is what matters downstream. A connective skeleton with binary connectives and no negation has derivation trees, the -th Catalan number, but far fewer logically distinct readings, because associativity and the laws of the Boolean algebra identify many of the trees. For the positive fragment, repetition-free and negation-free, we make the gap exact: a reading computes a read-once function, and the uniqueness of the read-once normal form lets us characterize the realizable normal forms by the labels of lowest common ancestors and count them with a two-label recurrence over the operator word, which we verify against exhaustive enumeration for every pattern up to eleven atoms. The count is invariant under reversal and under the duality, and is therefore a function of the composition of operator runs. We prove that a positive skeleton is logically ambiguous if and only if it uses both and , a one-pass test, and that the number of reading classes is at least on atoms. For every pattern up to fifteen atoms the maximally alternating pattern is the worst case, and we determine its class count exactly: its generating function is algebraic of degree three, the count is the 3-Schröder sequence (OEIS A137842), and its growth base is , the five-halves power of the golden ratio and strictly below the Catalan base 4. The maximality itself we reduce to an inequality on increments, verified to sixteen atoms, and we explain why local exchange arguments cannot establish it. We then treat negation, exceptions, and background hyponymy axioms, where normal-form uniqueness still decides equivalence though the counting law does not transfer, and we locate the work among the ambiguity of context-free grammars, read-once and series-parallel enumeration, and the underspecification of quantifier scope in computational semantics.
Keywords scope ambiguity · context-free grammar ambiguity · read-once Boolean functions · Catalan numbers · Schröder numbers · autoformalization · enumeration
*Corresponding author: sherzod@uaeu.ac.ae. ORCID 0000-0001-6661-8469. †ORCID 0000-0001-8797-8471.
1 Introduction
Automated reasoning can give guarantees about a rule only once that rule has been written in logic, and in the settings where such guarantees are now wanted, from authorization and business policies to clinical eligibility criteria and academic regulations, the rules exist first as text that people wrote for other people. Translating them is the task of autoformalization, which large language models now perform fluently [1, 2], and on which industrial systems have begun to depend, for example in the Automated Reasoning checks of Amazon Bedrock Guardrails.³ The value of every downstream proof is bounded by the fidelity of this translation, and a principal way fidelity fails is scope ambiguity: a sentence fixes which atomic conditions and which connectives occur, yet leaves open how the conjunctions, disjunctions, negations, and exceptions are bracketed, so that “no or within thirty days” has several logical readings that disagree about who is covered. A measurement study of this phenomenon, reported separately, finds that for roughly one clinical eligibility criterion in six a plausibility judge retains two or more grammar-generated readings as readings of the text [3].
It is therefore natural to separate a translation into a stage that commits to what the atoms and connectives are, which a language model does well, and a stage that enumerates how they may be bracketed, which a small context-free grammar can do exhaustively. The grammar in question,
which we call the scope grammar, is ambiguous by design, and its derivation trees over a fixed sequence of atoms and connectives, the skeleton, are exactly the candidate readings. What matters downstream is not the trees themselves but their quotient by logical equivalence, because two bracketings that denote the same Boolean function are the same rule. Consider the skeleton : it has bracketings, but only four are logically distinct, because and are the same function by associativity of conjunction (Figure 1). The questions this raises are how many trees a skeleton admits, how many equivalence classes, which syntactic restrictions reduce the class count, and how cheaply the classes can be decided and enumerated.
We answer these questions for the positive fragment, repetition-free and negation-free, where a complete theory is available, and we treat negation and background axioms in part. The object sits at the meeting of three established lines of work, the ambiguity of context-free grammars, the theory of read-once Boolean functions, and the underspecification of scope in computational semantics, which we survey in Section 2. Though each of these lines illuminates a facet of the object, none of them counts the Boolean quotient of the bracketings of a single skeleton, which is precisely the quantity an autoformalizer must control. In the current research, we make the following contributions.
-
We give a dynamic program that enumerates the reading classes directly over Boolean functions, under span-local admissibility constraints, with a correctness proof and a complexity bound (Sections 5 and 6).
-
For a positive skeleton we prove, through the uniqueness of the read-once normal form, a characterization of the realizable normal forms by lowest common ancestors (Lemma 7.1) and, from it, an exact two-label counting recurrence (Theorem 7.2); the count is invariant under reversal and the duality, hence a function of the composition of operator runs (Proposition 7.3), and it agrees with exhaustive enumeration for every pattern up to eleven atoms (Section 7).
-
We prove that a positive skeleton is logically ambiguous if and only if it uses both and , a one-pass test (Theorem 7.5), and that the number of classes is at least (Corollary 7.6); we verify for every pattern up to fifteen atoms that the maximally alternating pattern is the worst case (Proposition 7.7), we show that its count has a cubic generating function, identify it with the 3-Schröder sequence A137842, and obtain its growth base , strictly below the Catalan base 4 (Theorem 7.8); and we reduce the maximality conjecture, through a canonical-bracketing recurrence (Proposition 7.11), to an inequality on increments that we verify to sixteen atoms and show to be beyond local exchange arguments.
-
We extend the equivalence test to negation, exceptions, and background hyponymy axioms, where normal-form uniqueness still decides equivalence but the counting law does not transfer, and we relate the axiomatized ambiguity test to Boolean entailment (Section 8).
The paper is organized as follows. Section 2 surveys related work and Section 3 fixes the preliminaries. Section 4 defines the scope grammar and its readings, Section 5 the admissibility constraints, and Section 6
³Amazon Bedrock Guardrails, Automated Reasoning checks: https://aws.amazon.com/bedrock/guardrails/.
the enumeration algorithm. Section 7 is the counting theory for the positive fragment, Section 8 treats negation, exceptions, and background axioms, and Section 9 concludes with open problems.
Read-once functions and series-parallel networks. A Boolean function expressible with each variable used once is read-once; such functions have a unique formula up to associativity and commutativity, equivalently a unique cotree, and their co-occurrence graphs are exactly the cographs [9, 10, 11, 12, 13, 14]. We use this uniqueness to turn the counting of reading classes into the counting of realizable normal forms. Positive read-once functions coincide with two-terminal series-parallel networks, whose enumeration is classical [15]; our count differs in that it fixes the left-to-right order of the leaves and the operator between each adjacent pair. The closest work in spirit is the enumeration of truth-table statistics over the bracketings of a single operator string: Cameron and Yildiz [16], and Yildiz in follow-up work [17], count the true and false entries summed over the truth tables of all bracketings of , obtaining a recurrence and a limiting proportion of false rows. Implication is neither associative nor read-once, and their quantity is a sum over the rows of all bracketings rather than a count of distinct functions, so their combinatorics and ours diverge; what the two share is the object, the truth tables of the bracketings of one operator string. For one word, the maximally alternating one, the class count itself turns out to be on record: the sequence 1, 2, 4, 10, 24, 66, 172, … is entry A137842 of the OEIS [18], the interleaving of the 3-Schröder numbers A027307 and A032349 [19, 20], which count lattice paths with steps (2, 1), (1, 2), (1, -1), and go back to a Monthly problem of Deutsch [21] (see also Yang and Jiang [22]), and Burstein recorded in 2023, as a comment on these entries, that they count the distinct sets obtainable by parenthesizing an alternating expression of unions and intersections, which is the reading-class count of that word. We learned of this after deriving Theorem 7.8; our derivation is independent and identifies the sequence through its generating function, and the theory for arbitrary operator words (the characterization, the recurrence, the symmetries, the criterion, and the lower bound of Section 7) has, as far as we can determine, no precedent.
Underspecification of scope in computational semantics. The counting and compact representation of readings is well developed for quantifier scope, where a single underspecified description stands for a family of scopings: the generation of quantifier scopings [23], hole semantics and Minimal Recursion Semantics [24], and dominance constraints [25]. That tradition, moreover, does quotient readings by logical equivalence: redundancy elimination removes logically equivalent scopings from an underspecified chart [26], and the set of readings is represented and enumerated as the language of a regular tree grammar [27]. Our work is the connective-scope counterpart. Two differences make the Boolean quotient sharper here than the rewrite-rule equivalence used for quantifiers: the objects are bracketings of rather than orderings of quantifiers, and equivalence is exact Boolean equality, for which the read-once normal form gives a complete invariant and a closed counting law rather than an elimination procedure. Scope ambiguity is also where current language models are known to be unreliable [28], which is the practical reason to enumerate rather than resolve it; the empirical side of that argument, for clinical eligibility criteria, is the companion study [3]. The same concern with ambiguity in rules written for people drives neurosymbolic auditing of software requirements [29] and the older linguistic analysis of ambiguity in requirements and contracts [30].
3 Preliminaries
Let be a finite set of atoms with , and let be the set of Boolean functions . For a set of background axioms, two functions are -equivalent when , that is and agree on every model of ; for this is equality of functions. A function depends on (has as essential) a variable if some assignment changes value when is flipped; it is monotone if flipping an input from 0 to 1 never changes the value from 1 to 0.
A function is read-once if it has a formula over in which every variable occurs once, and positive read-once if such a formula exists over . We use the following classical fact; it is the one external result the counting rests on.
Proposition 3.1 (Read-once normal form, see [14]). A positive read-once function has a read-once formula over that is unique up to the associativity and commutativity of the two operators. Equivalently, contracting every maximal chain of one operator into a single multi-ary gate yields a tree with strictly alternating gate labels, the normal form, which is the unique cotree of the function's cograph.
Immediately, every variable of a read-once formula is essential: a formula in which each variable occurs once depends on each, since fixing the other inputs leaves a formula in that one variable that is not constant. We use this fact repeatedly below.
A bracketing of a sequence of operands is a full binary tree with the operands as leaves in order; there are of them, the -th Catalan number [31]. By an ordered tree on we mean a rooted tree whose leaves are these atoms in left-to-right order. We write for an operator word, for the connective between and , and, in an ordered tree, for the lowest common ancestor of and .
4 The scope grammar and its readings
Definition 4.1 (Skeleton). A skeleton is a word of length over , where are binary connectives written between their operands, is a prefix connective written at the position of the negation cue, and marks a sentence or list-item boundary. A skeleton is repetition-free when each atom of occurs at most once in . We reserve for the number of atoms of and for its length as a string.
Definition 4.2 (Scope grammar). The scope grammar is with
A reading of is a derivation tree of in ; the set of readings is . A boundary is interpreted as conjunction, and no connective inside a sentence takes an operand across a boundary.
The meaning of a reading is defined compositionally by . The exception connective is not a syntactic abbreviation of “”: in the negation covers exactly the constituent , whereas a token may scope over several spans, which is itself a source of ambiguity (Section 8).
Definition 4.3 (Reading classes). For a set of background axioms over (for example when the atom names a kind of the atom ), two readings are -equivalent, written , when and are -equivalent. The set of reading classes is , written when . The skeleton is logically ambiguous when .
For a skeleton with binary connectives and no negation or boundary, the readings are the bracketings of operands, so . The quantity of interest is , which is typically far smaller than ; Figure 1 shows the gap for .
5 Admissibility constraints
Not every derivation tree of a skeleton is a reading an extractor should entertain; two kinds of restriction arise in practice, one syntactic and one semantic, and both fit the framework.
Definition 5.1 (Span-local constraint). A span-local admissibility constraint is a predicate on the root connective of a subtree, the span it covers, and its split point (for a prefix , ). The admissible readings are , those all of whose nodes satisfy , and the admissible reading classes are .
Two instances are reported by the companion study on clinical eligibility criteria [3]. Negation locality forbids a to cover a span that contains an exception or more than one kind of binary connective; on the pilot skeletons it removed about four percent of the reading classes and no reading that a judge found plausible,
Derivation trees of the skeleton : five, the Catalan number ; the formula below each tree is its bracketing

Reading classes: four normal forms, each maximal run of one connective contracted into one gate; the third and fourth trees share a class
Figure 1: The skeleton has derivation trees (top) but four reading classes (bottom): the third and fourth trees differ only in the association of the two conjunctions and contract to the same normal form, in which the root conjunction has three children. Gates are circled, conjunction in blue and disjunction in orange. The trees are authoritative; in the formula labels binds more tightly than , so a label such as abbreviates .
and it is adopted. A second constraint, requiring every exception to run to the end of its sentence and attach to the whole preceding material or to the nearest conjunct, removed about fourteen percent of the classes but also four of the twenty plausible readings of the first pilot, because real exceptions attach to intermediate groups, and it is rejected. The point of the span-local form is that, whatever is chosen, the enumeration of Section 6 is correct without change, so modeling decisions of this kind are isolated from the algorithm.
The semantic restriction comes from background axioms. When a skeleton carries exemplification, as in “a condition such as ”, the examples are kinds of the head and contribute hyponymy axioms to , under which readings that differ only on impossible assignments merge. Since adding axioms can only coarsen the equivalence, that is implies refines , enlarging the axiom set can only merge classes, so ; the complexity this adds to deciding ambiguity is taken up in Section 8.
6 Enumerating the classes
The classes can be computed without first materializing the trees, by a dynamic program over spans that stores, for each span, the set of Boolean functions its admissible subreadings realize. For a span let
computed by and, for longer spans, by combining and at each admissible binary split and at an admissible prefix negation.
Lemma 6.1 (Correctness). For every span-local constraint and all , ; in particular, when has no boundary, is in bijection with the admissible reading classes .
Proof. By induction on . The base case is the single atom. For a longer span, a reading has a root that is either a prefix over or a binary connective with subtrees and , and the root satisfies . Since the semantics is compositional, is \neg[\![t']]\ or, which by the induction hypothesis lie in the set the algorithm forms from or from and . Conversely every function the algorithm forms is the meaning of such a reading, built from witnesses of its arguments, and the reading is admissible because depends only on the root's span and split. Classes across boundaries are obtained by running the algorithm per sentence and conjoining.
Representing each function by its truth table of bits, the algorithm uses bit operations, where . Classes modulo are obtained by merging truth tables that agree on all models of , or, when is large, by replacing the truth-table test with the entailment queries discharged by an SMT solver [32, 33].
7 Counting readings of the positive fragment
Throughout this section a skeleton is positive: repetition-free, with connectives in only, no negation and no boundary, so that its operator word is over distinct atoms. The argument has three steps. Every reading computes a positive read-once function, so by Proposition 3.1 a reading class is a normal form; we characterize which alternating ordered trees are realizable normal forms of (Lemma 7.1); and we count them by a recurrence that decomposes a normal form at its root gate (Theorem 7.2). The symmetries of the count, a one-pass ambiguity test, and the worst-case growth follow.
Every reading of a positive skeleton computes a positive read-once function, since each atom occurs once and the operators are ; so by Proposition 3.1 two readings are logically equivalent exactly when they share a normal form. A normal form on is an ordered tree whose internal gates are labeled in , strictly alternating between a gate and its gate children, each gate having at least two children.
Lemma 7.1 (Realizable normal forms). An alternating ordered tree as above is the normal form of some reading of if and only if the label of lca equals for every with . Distinct such trees are normal forms of logically inequivalent readings.
Proof. In any bracketing of the binary node that carries the connective is the lowest node whose subtree contains both and , and contracting runs of one operator does not change which gate is the lowest common ancestor of two leaves nor its label; so the normal form of a reading satisfies the condition. Conversely, given an alternating tree satisfying it, binarize each gate left to right; every binary node so created lies between two adjacent atoms whose lowest common ancestor is that gate, so it receives the right connective and the result is a bracketing of whose contraction is the given tree. The last claim is the uniqueness of the read-once normal form.
Theorem 7.2 (Counting). For a label with dual , let be the number of realizable -rooted normal forms on the atoms with , that is, alternating trees with root label in which the label of lca is for every with ; and let be the number of ways to tile the atoms into at least one consecutive part, each part a single atom or a realizable -rooted normal form on its atoms, with at every boundary between parts. Then
where if and otherwise, and for
Proof. By Lemma 7.1 we count alternating ordered trees in which the label of lca is for all . Fix the root label . The root's children partition into at least two consecutive blocks; the boundary between two consecutive blocks is a pair whose lowest common ancestor is the root, so there, and each block is a single atom or an -rooted tree on its own atoms satisfying the condition for the pairs inside it. The first block covers for the first chosen boundary , and the rest is a tiling of into at least one further block of the same kind, which is what counts; every pair is a boundary at exactly one gate, namely its lowest common ancestor, so the conditions at the different gates are independent and the products count correctly. The root label is determined by the function for (the normal form is unique), so the -rooted and -rooted families are disjoint and their counts add.
The recurrence is quadratic in the sub-counts and is evaluated in arithmetic operations. As an independent check we computed the classes of every operator pattern on atoms by exhaustive enumeration of all bracketings and their truth tables, and the recurrence returned the same count in every case; Table 1 lists counts for small .
Table 1: Reading classes of positive skeletons. The raw tree count is the Catalan number ; depends only on the composition (Proposition 7.3). “alt.” is the maximally alternating pattern, “run” the single-operator pattern; the last column lists selected other compositions.
| alt. | run | selected compositions | ||
|---|---|---|---|---|
| 2 | 1 | 1 | 1 | |
| 3 | 2 | 2 | 1 | |
| 4 | 5 | 4 | 1 | (1, 2), (2, 1) 3 |
| 5 | 14 | 10 | 1 | (1, 2, 1) 8; (1, 1, 2), (2, 2) 6; (1, 3), (3, 1) 4 |
| 6 | 42 | 24 | 1 | (1, 1, 2, 1) 19; (1, 1, 1, 2) 18; (1, 2, 2) 15; (1, 3, 1) 13; (2, 1, 2) 9 |
| 7 | 132 | 66 | 1 | |
| 8 | 429 | 172 | 1 | |
| 9 | 1430 | 498 | 1 | |
| 10 | 4862 | 1360 | 1 | |
| 11 | 16796 | 4066 | 1 | |
| 12 | 58786 | 11444 | 1 | |
| 13 | 208012 | 34970 | 1 | |
| 14 | 742900 | 100520 | 1 | |
| 15 | 2674440 | 312066 | 1 |
Proposition 7.3 (Symmetries). Let the composition of a positive operator word be the sequence of the lengths of its maximal runs of equal operators. Then is invariant under reversal, , and under the duality that exchanges the two operators; consequently depends only on .
Proof. Reversing the atom order and mirroring every bracketing is a bijection between the readings of and those of its reversal, and since and are commutative a reading and its mirror compute the same function of the atom set, so the bijection preserves logical equivalence and the class counts agree. Exchanging the two operators in a reading replaces its function by the De Morgan dual , a bijection on Boolean functions that preserves equality, so the class counts of and of its dual word agree. Finally, a positive word is determined by its composition together with its leading operator, so exactly two words share a composition and they are duals of each other; hence is a function of alone.
Summing over all words gives a closed form that calibrates the table.
Proposition 7.4 (Schröder sum). For ,
where is the -th little Schröder number , the number of plane trees with leaves and no node of out-degree one.
Proof. By Lemma 7.1, is the number of alternating ordered trees on whose gate labels satisfy label(lca(k)) = . Conversely, an ordered tree with every gate of out-degree at least two, with no labels, is realizable for exactly two words: the label of the root gate may be chosen freely, every other gate's label is then forced by alternation, and the word is read off as . The number of such trees is [31].
Theorem 7.5 (Ambiguity criterion). A positive skeleton is logically ambiguous if and only if its operator word contains both and . Consequently logical ambiguity of the positive fragment is decidable in one pass over , in time .
Proof. If uses only one operator then all its bracketings are equal by associativity, so . If uses both, it has two adjacent positions carrying different operators, that is a factor or on three consecutive atoms . Choose any bracketing of that first brackets these three atoms together as a subtree, which is possible by associating outward from that factor. The two internal bracketings of the factor give the non-equivalent subfunctions and , which differ at (for the dual factor the subfunctions and differ at ), while the surrounding context, a positive read-once formula in the remaining atoms together with one input fed by the factor, is monotone and depends on that input, since every variable of a read-once formula is essential. A monotone function that depends on an input takes both values at some fixed setting of its other inputs, so substituting two functions that differ on some assignment yields two functions that differ on an extension of that assignment; hence the two whole readings are non-equivalent and . The test is to scan for one and one .
The same construction, applied at several places at once, makes the class count exponential.
Corollary 7.6 (Exponential lower bound). For a positive skeleton on atoms, , where is the largest number of pairwise disjoint three-atom factors of each using both operators. In particular the maximally alternating word has , so its class count is at least .
Proof. Pick disjoint three-atom factors, each with its two operators different, and fix one bracketing of that first brackets each factor into a subtree and combines the subtrees and the remaining atoms in any fixed way. Within each factor the two internal bracketings give, as in the proof of Theorem 7.5, two subfunctions that differ on some assignment; choosing one of the two at each factor independently gives readings. The ambient formula, read-once in the factor-subfunctions and the remaining atoms, is monotone and depends on each of its inputs, so two choices that differ at some factor yield globally inequivalent functions by the argument of Theorem 7.5; the readings are therefore pairwise inequivalent. In the alternating word every interior atom sits between two different operators, so the triples on atoms for are disjoint and each uses both operators.
Proposition 7.7 (Worst case, computational). For every and every positive operator word on atoms, is maximized by the maximally alternating word; its count is the “alt.” column of Table 1, beginning 1, 2, 4, 10, 24, 66, 172 for .
Theorem 7.8 (Identification and growth of the alternating count). Let be the number of reading classes of the maximally alternating positive word on atoms, the “alt.” column of Table 1, with , and let and be its generating function and the odd part of it. Then
so that is algebraic of degree three, . Consequently is the -th 3-Schröder number (OEIS A027307), is its convolution square (A032349), the whole sequence is A137842, and
where is the golden ratio and
in particular is strictly below the Catalan base 4.
Proof. Specializing the recurrence of Theorem 7.2 to the alternating word, the count of a span depends only on its length and on the parity of the position of its leading operator. Writing for the generating functions of the numbers of realizable normal forms whose root label equals, respectively differs from, the span's leading operator, for that of all of them (the atom alone contributes ), and subscripts for the even- and odd-length parts, the recurrence collapses to the finite system
with and . Eliminating and gives , which is , together with ; eliminating from gives the cubic, of whose three branches the one with is the series in question (two branches pass through the origin, since the cubic reduces to at ). The equation is the known functional equation of the generating function of the 3-Schröder numbers, and A032349 has generating function , which is after [19, 20]; this identifies the two parity subsequences and hence the sequence A137842. For the growth, the discriminant of the cubic in is , whose real roots are with (its other roots, , are larger in modulus); the branch is analytic on and has a square-root singularity at each of the two dominant points , both simple roots of the discriminant. Singularity analysis [34] at the conjugate pair gives with , the contribution of supplying the factor that alternates with the parity of ; the two constants are those of the asymptotics of A027307 and A032349 recorded by Kotesovec [19, 20], rewritten per atom.
Remark 7.9. We derived the cubic before learning that the sequence was on record (Section 2); the derivation above is self-contained, and the identification with the 3-Schröder numbers adds to our count the closed forms, the P-recursive recurrences, and the lattice-path and colored-ternary-tree interpretations collected in the OEIS entries. As checks, the cubic annihilates the first two hundred coefficients produced by the recurrence of Theorem 7.2, and evaluated at and agrees with to three digits; the verification is in the accompanying code.
By Proposition 7.7 the alternating word is the maximizer for every , and we conjecture it is the maximizer for all ; granting the conjecture, is the worst-case growth base over positive words on atoms. The separation that matters for autoformalization holds already without it: the raw tree count grows with base 4 while the alternating class count grows with base , so on this family the equivalence quotient removes an exponential family of spurious readings and not merely a polynomial factor, and by Corollary 7.6 the surviving class count is itself exponential. An extractor that commits to a bracketing during atomization rather than deferring to the grammar therefore discards such a family of genuine alternatives.
On the maximality conjecture. We record what we can prove toward Proposition 7.7 and why the obvious routes fail. The first tool is a second canonical representative of a class, the left-associated bracketing of its normal form.
Lemma 7.10 (Canonical bracketings). Map each normal form to the bracketing obtained by associating every gate to the left. This is a bijection between and the bracketings of in which no node has, as its right child, an internal node carrying the same connective.
Proof. In the left-associated bracketing of a gate with children the right child of every node of the gate is one of , a leaf or a gate of the dual label, so the bracketing has the stated property; conversely, in a bracketing with the property, contracting each maximal chain of left children carrying one connective yields an alternating tree whose left-associated bracketing is the original, and distinct normal forms yield distinct bracketings.
Decomposing a canonical bracketing of along the chain of right children from its root, which ends at the last connective , gives a recurrence in the length of the word.
Proposition 7.11 (Appending a connective). For a positive word and a connective , writing for the word on atoms, , and ,
with of the empty word equal to 1.
Proof. In a canonical bracketing of follow right children from the root; the chain ends at the node carrying , since the right subtree of any other node is nonempty. If the root carries , the left subtree is a canonical bracketing of , which gives the first term. Otherwise let be the connective carried by the node just above on the chain; by Lemma 7.10, , the part of the tree to the left of and including that node is a canonical bracketing of (its own chain of right children ends at ), and the left subtree of the node carrying is a canonical bracketing of . The decomposition is reversible.
For the alternating word the sum runs over the positions of one parity, and Proposition 7.11 is then the recurrence behind Theorem 7.8. It also isolates what a proof of maximality needs. Writing for the alternating count, the maximality for atoms follows from the maximality for atoms together with the statement that the alternating word also maximizes the increment, which we therefore state as the conjecture to attack.
Conjecture 7.12 (Increment maximality). For every positive word on atoms,
By Proposition 7.11 and induction on , Conjecture 7.12 implies that the alternating word maximizes for every . We have verified it for every word with . We were not able to prove it, and the reason deserves recording: the count is not monotone under any local change of the word. Flipping one connective can lower it even in the interior of a long run, and refining the composition can lower it: (2, 3) gives 10 classes while its refinements (2, 1, 2) and (1, 1, 3) give 9 and 8, and (4, 4) gives 70 while (3, 1, 4) gives 20, since a singleton run wedged between long runs is nearly inert. Every composition does admit some refinement that does not lower the count (verified for ), so a monotone path to the alternating word always exists, but no uniform rule selecting it survived our tests, and a Walsh expansion of over the words shows that the alternating word does not simply align all Fourier signs. A proof will therefore have to be global.
8 Negation, exceptions, and background axioms
Negation and exceptions. Adding negation keeps the function read-once over the basis . By De Morgan's laws the negations of a repetition-free formula can be pushed to the leaves, where each atom acquires a fixed sign, and the uniqueness of the positive normal form (Proposition 3.1) then applies to the signed formula, so that two readings of a skeleton with negation are logically equivalent if and only if they have the same signed normal form. The counting theory does not transfer as it stands, however: pushing a negation inward exchanges the operators under its scope, and because the scope of a token differs between readings, different readings of one skeleton push down to different positive operator words, so neither Proposition 7.3 nor the recurrence of Theorem 7.2 applies to the original word. Counting classes in the presence of negation is therefore a separate problem, which we leave open; the enumeration of Section 6 remains exact. The exception operator is covered as well: since and, in a repetition-free skeleton, and share no atom, an node is a read-once gate like any other, and a skeleton with exceptions remains read-once.
Negation does, however, introduce a kind of ambiguity the positive fragment does not have, namely the scope of the negation token itself: the skeleton has the two readings and , which are inequivalent although only one binary operator occurs, so the criterion of Theorem 7.5 is special to the negation-free case. In the enumeration the scope of a prefix is exactly the choice of the span it covers, controlled by the negation-locality constraint of Section 5 and admitted by Lemma 6.1 without change.
Background axioms and the complexity of the ambiguity test. Under hyponymy axioms (Section 5) the counts of Section 7 are upper bounds, and for and a positive skeleton the ambiguity test is Theorem 7.5. Deciding -equivalence of two readings is the entailment , which for a set of Horn implications and Boolean is a coNP question in general and is discharged in practice by the solver of Section 6. Deciding -ambiguity, that is , asks whether two non--equivalent readings exist; it is answered by the enumeration of Lemma 6.1 with the truth-table test replaced by entailment, at a cost that inherits the exponential growth of the class count (Corollary 7.6). Whether -ambiguity admits a test as cheap as the one-pass criterion of the unaxiomatized positive fragment is open; we expect it does not, because the merging effect of is not local to the operator word.
9 Conclusion
We have made precise the gap between the Catalan number of bracketings of a connective skeleton and the number of its logically distinct readings. For the positive fragment this gap is governed throughout by the uniqueness of the read-once normal form: the realizable classes are characterized by lowest common ancestors, counted exactly by a two-label recurrence, shown to depend only on the composition of operator runs, and decided for ambiguity in a single pass. The class count is exponential, and the maximally alternating family, which we verify to be the worst case up to fifteen atoms, grows with base , a value obtained exactly from a cubic generating function and lying strictly below the Catalan base 4. Beyond the positive fragment, normal-form uniqueness continues to decide equivalence for negation, exceptions, and background axioms, though the counting law does not transfer.
Several questions remain, which we state as open problems. (1) Prove that the alternating word maximizes for all , which would upgrade the growth base of Theorem 7.8 to the worst case over all positive words; by Proposition 7.11 it suffices to prove Conjecture 7.12, and the non-monotonicity recorded in Section 7 rules out local exchange arguments. (2) Give a counting theory for skeletons with negation, where the scope of a token varies between readings and the positive recurrence no longer applies. (3) Decide whether the classes under a given admissibility constraint can be enumerated in output-polynomial time, and characterize the constraints under which enumeration is polynomial, which would connect the combinatorics to the extractor constraints of Section 5. (4) Settle the complexity of -ambiguity relative to the unaxiomatized case.
Funding
This research received no specific grant from any funding agency in the public, commercial, or not-for-profit sectors.
Conflicts of interest
The authors declare that there is no conflict of interest.
Data availability
The code that reproduces every computation in the paper, including the verification of the counting recurrence against exhaustive enumeration, the generating-function derivation, and the checks reported for the maximality conjecture, will be deposited in a public repository with a DOI together with the journal version, and is available from the corresponding author on request in the meantime. The companion empirical study is available at https://doi.org/10.5281/zenodo.23600731.
Acknowledgments
The authors gratefully acknowledge the College of Computing and Artificial Intelligence and the Research and Innovation Office at the United Arab Emirates University for the institutional resources, including computational facilities, library access, and infrastructural support.
References
[1] Yuhuai Wu, Albert Q. Jiang, Wenda Li, Markus N. Rabe, Charles Staats, Mateja Jamnik, and Christian Szegedy. Autoformalization with large language models. In Advances in Neural Information Processing Systems 35, pages 32353–32368, 2022. doi:10.52202/068431-2344. [2] Matthias Cosler, Christopher Hahn, Daniel Mendoza, Frederik Schmitt, and Caroline Trippel. nl2spec: Interactively translating unstructured natural language to temporal logics with large language models. In Computer Aided Verification (CAV 2023), volume 13965 of LNCS, pages 383–396. Springer, 2023. doi:10.1007/978-3-031-37703-7_18. [3] Sherzod Turaev and Mary John. Grammar-enumerated readings versus sampling for detecting scope ambiguity in clinical trial eligibility criteria: A pilot study. Technical report, code, and data, version 0.1. Zenodo, 2026. doi:10.5281/zenodo.23600731. [4] Seymour Ginsburg and Joseph Ullian. Ambiguity in context-free languages. Journal of the ACM, 13(1): 62–89, 1966. doi:10.1145/321312.321318. [5] Michael A. Harrison. Introduction to Formal Language Theory. Addison-Wesley, 1978. [6] Klaus Wich. Ambiguity functions of context-free grammars and languages. PhD thesis, University of Stuttgart, 2005. [7] Jürgen Dassow and Gheorghe Păun. Regulated Rewriting in Formal Language Theory, volume 18 of EATCS Monographs in Theoretical Computer Science. Springer, Berlin, 1989.
[8] Jürgen Dassow and Sherzod Turaev. Petri net controlled grammars: The case of special Petri nets. Journal of Universal Computer Science, 15(14):2808–2835, 2009. doi:10.3217/jucs-015-14-2808.
[9] John P. Hayes. The fanout structure of switching functions. Journal of the ACM, 22(4):551–571, 1975. doi:10.1145/321906.321918.
[10] Vladimir A. Gurvich. Repetition-free Boolean functions. Uspekhi Matematicheskikh Nauk, 32(1):183–184, 1977.
[11] Daniele Mundici. Functions computed by monotone Boolean formulas with no repeated variables. Theoretical Computer Science, 66(1):113–114, 1989. doi:10.1016/0304-3975(89)90150-3.
[12] Mauricio Karchmer, Nathan Linial, Ilan Newman, Michael Saks, and Avi Wigderson. Combinatorial characterization of read-once formulae. Discrete Mathematics, 114(1-3):275–282, 1993. doi:10.1016/0012-365X(93)90372-Z.
[13] Derek G. Corneil, H. Lerchs, and L. Stewart Burlingham. Complement reducible graphs. Discrete Applied Mathematics, 3(3):163–174, 1981. doi:10.1016/0166-218X(81)90013-5.
[14] Martin Charles Golumbic and Vladimir Gurvich. Read-once functions. In Yves Crama and Peter L. Hammer, editors, Boolean Functions: Theory, Algorithms, and Applications, pages 448–486. Cambridge University Press, 2011. doi:10.1017/CBO9780511852008.011.
[15] John Riordan and Claude E. Shannon. The number of two-terminal series-parallel networks. Journal of Mathematics and Physics, 21(1-4):83–93, 1942. doi:10.1002/sapm194221183.
[16] Peter J. Cameron and Volkan Yildiz. Counting false entries in truth tables of bracketed formulae connected by implication. arXiv preprint arXiv:1106.4443, 2011.
[17] Volkan Yildiz. General combinatorial structure of truth tables of bracketed formulae connected by implication. arXiv preprint arXiv:1205.5595, 2012.
[18] OEIS Foundation Inc. Entry A137842 (P. Barry, 2008; comment by A. Burstein, 2023). The On-Line Encyclopedia of Integer Sequences, https://oeis.org/A137842, 2026.
[19] OEIS Foundation Inc. Entry A027307, the 3-Schröder numbers (E. Deutsch; functional equation by P. Bala, 2011; asymptotics by V. Kotesovec, 2012; comment by A. Burstein, 2023). The On-Line Encyclopedia of Integer Sequences, https://oeis.org/A027307, 2026.
[20] OEIS Foundation Inc. Entry A032349 (E. Deutsch; asymptotics by V. Kotesovec, 2012; comment by A. Burstein, 2023). The On-Line Encyclopedia of Integer Sequences, https://oeis.org/A032349, 2026.
[21] Emeric Deutsch, David Callan, M. Beck, D. Beckwith, W. Bohm, R. F. McCoart, and GCHQ Problems Group. Another type of lattice path: 10658. The American Mathematical Monthly, 107(4):368–370, 2000. doi:10.2307/2589192.
[22] Sheng-Liang Yang and Mei-Yang Jiang. The m-Schröder paths and m-Schröder numbers. Discrete Mathematics, 344(2):112209, 2021. doi:10.1016/j.disc.2020.112209.
[23] Jerry R. Hobbs and Stuart M. Shieber. An algorithm for generating quantifier scopings. Computational Linguistics, 13(1–2):47–63, 1987.
[24] Ann Copestake, Dan Flickinger, Carl Pollard, and Ivan A. Sag. Minimal recursion semantics: An introduction. Research on Language and Computation, 3(2-3):281–332, 2005. doi:10.1007/s11168-006-6327-9.
[25] Alexander Koller, Joachim Niehren, and Stefan Thater. Bridging the gap between underspecification formalisms: Hole semantics as dominance constraints. In Proceedings of the Tenth Conference of the European Chapter of the Association for Computational Linguistics (EACL 2003), volume 1, pages 195–202. Association for Computational Linguistics, 2003. doi:10.3115/1067807.1067834.
[26] Alexander Koller and Stefan Thater. An improved redundancy elimination algorithm for underspecified representations. In Proceedings of the 21st International Conference on Computational Linguistics and the 44th Annual Meeting of the Association for Computational Linguistics (ACL-44), pages 409–416. Association for Computational Linguistics, 2006. doi:10.3115/1220175.1220227.
[27] Alexander Koller, Michaela Regneri, and Stefan Thater. Regular tree grammars as a formalism for scope underspecification. In Proceedings of ACL-08: HLT, pages 218–226. Association for Computational Linguistics, 2008.
[28] Gaurav Kamath, Sebastian Schuster, Sowmya Vajjala, and Siva Reddy. Scope ambiguities in large language models. Transactions of the Association for Computational Linguistics, 12:738–754, 2024. doi:10.1162/tacl_a_00670.
[29] Benjamin Hall and William Eiers. Neurosymbolic auditing of natural-language software requirements. arXiv preprint arXiv:2605.13817, 2026.
[30] Daniel M. Berry, Erik Kamsties, and Michael M. Krieger. From contract drafting to software specification: Linguistic sources of ambiguity. A handbook, version 1.0. University of Waterloo, https://cs.uwaterloo.ca/~dberry/handbook/ambiguityHandbook.pdf, November 2003.
[31] Richard P. Stanley. Enumerative Combinatorics, volume 2. Cambridge University Press, 1999. doi:10.1017/CBO9780511609589.
[32] Leonardo de Moura and Nikolaj Bjørner. Z3: An efficient SMT solver. In Tools and Algorithms for the Construction and Analysis of Systems (TACAS 2008), volume 4963 of LNCS, pages 337–340. Springer, 2008. doi:10.1007/978-3-540-78800-3_24.
[33] Haniel Barbosa, Clark Barrett, Martin Brain, Gereon Kremer, Hanna Lachnitt, Makai Mann, Abdalrhman Mohamed, Mudathir Mohamed, Aina Niemetz, Andres Nötzli, Alex Ozdemir, Mathias Preiner, Andrew Reynolds, Ying Sheng, Cesare Tinelli, and Yoni Zohar. cvc5: A versatile and industrial-strength SMT solver. In Tools and Algorithms for the Construction and Analysis of Systems (TACAS 2022), volume 13243 of LNCS, pages 415–442. Springer, 2022. doi:10.1007/978-3-030-99524-9_24.
[34] Philippe Flajolet and Robert Sedgewick. Analytic Combinatorics. Cambridge University Press, 2009. doi:10.1017/CBO9780511801655.