Skip to content

Local Sequence Legality

Prime #
966
Origin domain
Language And Communication
Subdomain
formal grammars → Language And Communication

Core Idea

Local sequence legality is the structural pattern in which the acceptability of an arrangement of units drawn from a finite inventory is decided by local constraints over short windows of context, prior to and independent of higher-level interpretation. A finite alphabet, a set of position classes, and a rule-set over adjacent (or near-adjacent) positions jointly define a binary legal/illegal verdict on candidate sequences. The constraint set is pre-semantic: legality is fixed before the sequence is asked what it means. Illegal arrangements are filtered before downstream layers process them; legal arrangements may still be meaningless, ambiguous, or wrong, but they have at least cleared the syntactic gate. Globalness is achieved by composition of local verdicts: a sequence is legal exactly when every window is, so a rich legality regime is implemented by adding up verdicts on short windows without any global rule-evaluator.

The structural commitment has three load-bearing parts: a finite alphabet of units; a positional grammar of local context classes (start, end, after-X, before-Y, adjacent-to-Z); and a local rule-set that decides each window's verdict. This is the structural signature of regular and context-free grammars, but it names the pattern wherever it appears outside formal linguistics. The pattern carries no normative or institutional content — its vocabulary is alphabet, window, and rule-set, and it is pre-semantic by construction — which is why it reads as a pure structural prime, recognised rather than imported wherever a finite inventory meets local positional constraints. Its load-bearing architectural insight is that local constraints can do global work: very rich legality regimes can be implemented by summing verdicts on short windows, and the boundary of the pattern is precisely where legality requires non-local information (matching brackets across arbitrary distance, agreement across an unbounded context), at which point the system leaves the local-grammar regime.

How would you explain it like I'm…

Which Pieces Fit Next

In English, some letters just can't sit next to each other — like a word starting with 'tk'. You can tell something looks wrong by checking just the little neighbors, before you even know what the word means. Local Sequence Legality is having simple rules about which pieces are allowed next to which. Break a rule and it's an automatic 'nope.'

Small-Window Rule Check

Local Sequence Legality is about deciding whether an arrangement of things is allowed by checking small windows of it, before worrying about what it means. You start with a limited set of allowed pieces — like letters of the alphabet — and rules about which pieces can sit next to which. If every little neighborhood follows the rules, the whole thing is legal. A legal sequence might still be nonsense or wrong, but at least it passed the basic spelling-style check. The neat trick is that you never need one big rule for the whole thing — you just add up the verdicts from all the tiny windows.

Local Grammar Gate

Local Sequence Legality is the pattern where the acceptability of an arrangement of units from a finite inventory is decided by local constraints over short windows of context, before and independent of any higher-level meaning. A finite alphabet, a set of position classes (start, end, after-X, before-Y), and a rule-set over adjacent or near-adjacent positions together give a yes/no legal verdict on a candidate sequence. The constraints are pre-semantic: legality is fixed before you ask what the sequence means, so illegal arrangements get filtered before deeper layers process them, while legal ones may still turn out meaningless or wrong. Globalness comes from composition of local verdicts: a sequence is legal exactly when every window is legal, so a rich legality regime is built by adding up short-window verdicts with no global rule-checker. The boundary of the pattern is where legality needs non-local information, like matching brackets across any distance, at which point you have left the local-grammar regime.

 

Local Sequence Legality is the structural pattern in which the acceptability of an arrangement of units drawn from a finite inventory is decided by local constraints over short windows of context, prior to and independent of higher-level interpretation. A finite alphabet, a set of position classes, and a rule-set over adjacent (or near-adjacent) positions jointly define a binary legal/illegal verdict on candidate sequences. The constraint set is pre-semantic: legality is fixed before the sequence is asked what it means. Illegal arrangements are filtered before downstream layers process them; legal arrangements may still be meaningless, ambiguous, or wrong, but they have at least cleared the syntactic gate. Globalness is achieved by composition of local verdicts: a sequence is legal exactly when every window is, so a rich legality regime is implemented by summing verdicts on short windows without any global rule-evaluator. The structural commitment has three load-bearing parts: a finite alphabet of units; a positional grammar of local context classes (start, end, after-X, before-Y, adjacent-to-Z); and a local rule-set deciding each window's verdict. This is the signature of regular and context-free grammars, but it names the pattern wherever it appears, carrying no normative or institutional content. The architectural insight is that local constraints can do global work, and the pattern's boundary is precisely where legality requires non-local information (matching brackets across arbitrary distance, agreement across unbounded context).

Structural Signature

the finite alphabet of unitsthe positional grammar of local context classesthe local rule-set deciding each window's verdictthe pre-semantic binary legal/illegal gatethe composition of local verdicts into a global verdictthe locality-boundary invariant: the pattern holds exactly until legality requires non-local information

A system exhibits local sequence legality when each of the following holds:

  • A finite alphabet. Sequences are built from units drawn from a finite inventory — phonemes, tokens, nucleotides, pitch classes, moves, atoms.
  • A positional grammar. A set of local context classes — start, end, after-X, before-Y, adjacent-to-Z — defines the positions over which constraints apply.
  • A local rule-set. A rule-set over adjacent or near-adjacent positions decides each short window's acceptability, independent of higher-level interpretation.
  • A pre-semantic gate. Legality is fixed before the sequence is asked what it means; a binary legal/illegal verdict is produced by different machinery than semantic evaluation, and illegal arrangements are filtered before downstream layers process them.
  • Composition of local verdicts. The whole is legal exactly when every window is; a rich global legality regime is implemented by summing verdicts on short windows with no global rule-evaluator.
  • The locality-boundary invariant. The pattern holds precisely while legality is decidable locally; when it requires non-local information — matching brackets at arbitrary distance, unbounded agreement — the system leaves the local-grammar regime and local interventions systematically fail.

The components compose into one diagnostic: name the alphabet, name the position classes, name the local rules, run the gate — and watch the boundary where non-local information is required and the pattern as stated no longer applies.

What It Is Not

  • Not sequencing. Sequencing concerns the order in which steps are performed (what must precede what to achieve a goal); local sequence legality concerns the binary well-formedness verdict on an arrangement, decided pre-semantically by local windows — legality, not ordering for an outcome.
  • Not an algorithm. An algorithm is a procedure that produces an output; the prime is a gate that admits or rejects a sequence by composing local verdicts, with no computation of a result beyond legal/illegal.
  • Not a formal_system. A formal system includes axioms and inference rules generating theorems with meaning; local sequence legality is pre-semantic — it decides well-formedness before any interpretation, and a legal sequence may still be meaningless.
  • Not composition. Composition assembles parts into a whole; the prime's distinctive content is that global legality is the composition of local verdicts over short windows — the windowing discipline and the locality boundary, not assembly per se.
  • Not local_to_global_aggregation. That prime promotes a locally-checkable property to a global one under an overlap-and-aggregation discipline with obstruction theory; local sequence legality is the narrower finite-alphabet positional-grammar gate, where the global verdict is "legal iff every window is" with the locality boundary as its limit.
  • Common misclassification. Using a local rule-set where legality requires non-local information (balanced brackets at arbitrary depth, unbounded agreement). The pattern holds only while the verdict is decidable from a bounded window; past that boundary the system has left the local-grammar regime and local rules systematically fail.

Broad Use

  • Phonotactics: each language admits some phoneme sequences (English str- onsets, Japanese open syllables) and forbids others, with the legality verdict on the syllable rather than on the word's meaning.
  • Formal grammars and parsing: regular expressions, context-free grammars, and programming-language tokenisation, where legality is decided before semantic analysis.
  • Network protocols: HTTP request lines, SMTP commands, JSON, and URL syntax — a finite alphabet of tokens, a position-keyed local grammar, and a parser that rejects illegal payloads at the gate.
  • Molecular biology: DNA codon legality (start and stop codons in reading frame), restriction-site avoidance in synthetic biology, and splice-site signals at exon–intron boundaries.
  • Music and games: harmonic-progression rules (tonal voice-leading, forbidden parallels) and pitch-class legality in a mode, and chess move legality and legal-algebraic-notation, each a local rule over position classes independent of strategic value.
  • Configuration and chemistry: SKU configurators and deployment-manifest schemas with constrained combinations checked at edit time, and valence legality governing which bonds can exist at which positions in a structural formula.

Clarity

Naming the pattern separates two cleanup tasks that are routinely conflated: syntactic gating (is this arrangement well-formed?) and semantic evaluation (does this well-formed arrangement mean anything useful?). Many engineered systems leak the second into the first — a parser that tries to repair semantic mistakes, a reviewer who marks a syntactically valid but ill-intentioned snippet as "syntactically wrong" — and the split makes the leak visible. The clarifying force is to establish that legality is fixed before interpretation, so that the two verdicts are produced by different machinery and a failure of one is not mistaken for a failure of the other.

The split also makes visible the pre-semantic filter as an architectural lever: tightening the local grammar reduces the input variety that downstream layers must handle, which is a design choice with measurable consequences for the attack surface and the complexity of downstream interpreters. A further clarity benefit is that the prime explains why local constraints can do so much work: the structural insight from formal-language theory is that very rich legality regimes can be implemented by summing verdicts on short windows, with no global rule-evaluator, so a designer who recognises the pattern knows that a local rule-set is often sufficient and that reaching for a global evaluator is unnecessary until the legality genuinely requires non-local information. The prime thereby clarifies both what the gate does (filter pre-semantically) and how cheaply it can be built (locally).

Manages Complexity

The pattern manages complexity by collapsing several apparently-unrelated correctness problems into one diagnostic: name the alphabet, name the position classes, name the local rules, run the gate. The complexity absorbed is the impression that phonotactic acceptability, protocol parsing, codon legality, and chess move-generation are distinct technical problems, when each is the same local-rule-over-position-class structure evaluated over short windows. A phonotactic constraint, an HTTP grammar, a splice-site signal, and a legal-move filter are the same kind of object.

A second compression is that the intervention vocabulary is constant across substrates: extend the alphabet (allow a new token), relax or tighten a local rule (broaden or narrow the legal envelope), introduce an escape sequence (encode otherwise-illegal content via tagged encoding), and shift the position-class definition (change what counts as adjacent). A phonotactic loosening in a borrowed word, a --escape flag in a CLI, and a new restriction-enzyme site in a plasmid backbone are the same structural move. The prime also supports several non-obvious inferences that bound design reasoning: layered defence, since a system with a strict local-legality gate at the boundary has a smaller attack surface for malformed input than one that delegates filtering to downstream interpreters; expressive limits, since a legality cut requiring non-local information (matching brackets at arbitrary distance, unbounded agreement) is no longer in the local-grammar regime and local interventions will systematically fail to capture it; and repair and recovery, since a clean separation between syntactic and semantic verdicts makes possible error-recovery strategies (skip to the next legal position, suggest a minimal repair) that conflated systems cannot offer. Each inference reduces an open-ended correctness question to a bounded check against the local rule-set.

Abstract Reasoning

The prime trains a reasoner to decide legality by composing local verdicts over short windows rather than by appeal to a global rule-evaluator, and to ask of any sequence whether its acceptability is fixed pre-semantically by a finite alphabet, a positional grammar, and a local rule-set. It licenses several non-obvious inferences. The first is layered defence: a system with a strict local-legality gate at the boundary has a smaller attack surface for malformed input than one that delegates filtering to downstream interpreters, so tightening the local grammar is an architectural lever that reduces the input variety downstream layers must handle. The second is expressive limits: if the legal-versus-illegal cut requires non-local information — matching brackets across arbitrary distance, agreement across an unbounded context, palindromic motifs whose endpoints are far apart — the system is no longer in the local-grammar regime, and local interventions (regular-expression matching, finite-state parsing) will systematically fail to capture it, so the reasoner learns to recognise the boundary of the pattern and not to reach for local rules beyond it.

The third inference is repair and recovery: a clean separation between syntactic and semantic verdicts makes possible error-recovery strategies — skip to the next legal position, suggest a minimal repair — that conflated systems cannot offer, because a system that has leaked semantic evaluation into its legality gate has no clean notion of "the nearest legal sequence" to recover toward. The reasoner is also given a constant intervention vocabulary that follows from the structure: extend the alphabet to allow a new token, relax or tighten a local rule to broaden or narrow the legal envelope, introduce an escape sequence to encode otherwise-illegal content via tagged encoding, and shift the position-class definition to change what counts as adjacent. The deepest inference is that local constraints can do global work — very rich legality regimes are implementable by summing verdicts on short windows with no global evaluator — so the reasoner defaults to a local rule-set and escalates to a global mechanism only when the legality genuinely requires non-local information.

Knowledge Transfer

The transferable content is the finite-alphabet / positional-context / local-rule-set / gate structure together with the four-move intervention vocabulary (extend the alphabet, relax or tighten a rule, introduce an escape, shift the window) and the boundary watch for non-local legality. The role mappings are regular and formally shared: the alphabet maps to phonemes, tokens, nucleotides, pitch classes, board moves, SKU options, atoms; the positional context maps to syllable position, request-line structure, reading frame, metric position, board context, configuration slot, bond position; the gate maps to a phonological filter, a parser, a ribosome's reading-frame check, a legal-move generator, a schema validator, a valence checker.

The transfers are reuses of one formal structure across substrates with genuinely shared machinery. Regular and context-free grammar formalism is the codification of local-legality reasoning, exported from phonotactics and syntax into compilers, protocols, and validation; bioinformatics pipelines borrow grammar-based reasoning to identify legal sequence motifs (codons, splice sites, restriction patterns) using essentially the same machinery; legal-move generators in board games and voice-leading rules in tonal harmony share the local-rule-over-position-class structure and can both be implemented as small rule-sets evaluated over short windows; SKU rule engines and valence-checking tools share the machinery of verifying local rules over a positional inventory. An HTTP server rejecting a malformed request before any application logic runs — the first line matching a fixed production, each header matching a field grammar, the headers terminating with an empty line — is structurally the same gate as a ribosome's reading-frame check, a chess engine's legal-move generator, and a phonological filter deciding whether a sound combination even registers as a possible word, none of them concerning whether the sequence is meaningful. The load-bearing recognition that transfers is the pre-semantic, local, binary, positional character of the legality verdict, and the boundary watch that flags when non-local information is required and the pattern as stated no longer applies. Because the structure is pure relational machinery with formal-grammar vocabulary and no normative or institutional content, it is recognised rather than imported wherever a finite inventory meets local positional constraints, which is why it transfers cleanly across linguistics, computer science, molecular biology, music, games, configuration, and chemistry, and why its cross-domain machinery is genuinely shared rather than merely analogical.

Examples

Formal/abstract

A regular-expression-based tokeniser is the cleanest formal instance, because the locality boundary is exactly where the theory predicts. The finite alphabet is the character set of the source language; the positional grammar is the set of token-class contexts (start-of-token, after-a-digit, before-whitespace); the local rule-set decides each short window — a run of digits is an integer literal, a letter followed by alphanumerics is an identifier. The pre-semantic gate is decisive: the tokeniser decides whether 3.14 is a legal numeric literal before any layer asks what the number means, and an illegal byte sequence is rejected at the gate before downstream parsing. Legality is achieved by composition of local verdicts — the input is a legal token stream exactly when every window matches a production, with no global rule-evaluator. The locality-boundary invariant is where the example becomes instructive: a regular expression can recognise integer literals and identifiers locally, but it cannot match balanced parentheses to arbitrary depth, because that legality requires non-local information (the count of opens far from the corresponding close). At that boundary the system must leave the regular-grammar regime and escalate to a context-free parser with a stack — and a reasoner who recognises the boundary does not waste effort trying to write a regex for balanced brackets. The four-move intervention vocabulary applies directly: extend the alphabet to admit a new token, tighten a local rule to narrow the legal envelope, introduce an escape sequence to encode an otherwise-illegal character, or shift the position-class definition.

Mapped back: The tokeniser instantiates every role — character alphabet, token-class positions, local rules, pre-semantic gate, composition of window verdicts — and the locality-boundary invariant is shown precisely by the balanced-parenthesis case, where legality requires non-local information and the local-grammar regime must be left.

Applied/industry

Two unrelated substrates exercise the identical structure with genuinely shared machinery: an HTTP server's request parser and a ribosome's reading-frame check. The HTTP parser's finite alphabet is the set of protocol tokens; its positional grammar is the request structure (the first line must match a method-URI-version production, each header a field-name-colon-value production, the header block terminating with an empty line); its local rule-set decides each window; and its pre-semantic gate rejects a malformed request before any application logic runs — the layered-defence inference, since a strict local gate at the boundary shrinks the attack surface that downstream interpreters must handle against malformed input. The composition of local verdicts makes the whole request legal exactly when every line matches its production. The molecular-biology instance shares the formal structure: the ribosome reads a DNA-derived sequence over a finite alphabet of codons, with the reading frame as the positional grammar, start and stop codons as local rules, and the reading-frame check as the pre-semantic gate — none of it concerning whether the resulting protein is useful, only whether the sequence is legally readable. Both admit the same repair-and-recovery move that conflated systems cannot: because the syntactic and semantic verdicts are cleanly separated, a parser can skip to the next legal position and a synthetic-biology pipeline can avoid an illegal restriction site by an escape-style recoding, each recovering toward "the nearest legal sequence."

Mapped back: The HTTP parser and the ribosome's reading-frame check are the same finite-alphabet, local-rule, pre-semantic gate as the tokeniser, with protocol tokens and codons as alphabets — both filtering legality before meaning, with the strict local gate furnishing layered defence and the syntactic/semantic separation enabling clean error recovery.

Structural Tensions

T1 — Local sufficiency versus non-local legality (scopal). The prime's signature insight is that local constraints over short windows can do global work — but only up to the locality boundary, beyond which legality requires non-local information (balanced brackets at arbitrary depth, unbounded agreement). Here the boundary is with context-free and richer grammars. The failure mode is local-rule overreach: trying to express a genuinely non-local constraint with a finite-window rule-set (writing a regex for balanced parentheses), producing a gate that silently admits illegal sequences or rejects legal ones. Diagnostic: ask whether the legality verdict can be decided from any bounded window — if it needs to count or match across arbitrary distance, the local-grammar regime has been left and local rules will systematically fail.

T2 — Syntactic gate versus semantic evaluation (scopal). Legality is pre-semantic by construction — a legal sequence may still be meaningless. The frequent leak is conflating the two verdicts, repairing semantic errors at the syntactic gate or rejecting well-formed-but-unwanted content as "illegal." The failure mode is verdict conflation: a parser that tries to fix meaning, or a reviewer who marks a syntactically valid but ill-intentioned input as syntactically wrong, so neither verdict is cleanly produced and error recovery loses its notion of "nearest legal sequence." Diagnostic: check that the gate decides only well-formedness and hands meaning downstream — if the legality rule references intent or usefulness, semantics has leaked into syntax.

T3 — Tighter gate versus expressive cost (sign). Tightening the local grammar shrinks the downstream attack surface (layered defence), but an over-tight gate forbids legal-but-unanticipated content and forces ugly escape mechanisms. The failure mode is over-restriction: narrowing the legal envelope so far that legitimate inputs (a borrowed word's foreign cluster, a valid-but-rare token) are rejected at the boundary, pushing users toward escapes that reintroduce the variety the tightening removed. Diagnostic: weigh each tightening against the legal inputs it now excludes — a gate sized to the threat model rather than to maximal strictness, and confirm escapes are not silently re-widening the envelope the rule meant to close.

T4 — Composition of window verdicts versus window-boundary effects (coupling). Global legality is the composition of local verdicts — legal iff every window is — but this assumes window verdicts are independent, while real constraints can couple across window boundaries (a rule whose verdict depends on context just outside the window). The failure mode is boundary blindness: defining position classes too narrowly so a constraint straddling two windows is checked by neither, admitting an illegal sequence that every individual window passed. Diagnostic: verify that the position-class definition makes every constraint decidable within a single window — if a rule's evidence spans a window seam, the windowing is wrong and composition will not capture it.

T5 — Pre-registered alphabet versus alphabet drift (temporal). The finite alphabet is fixed at design time, but real inventories grow — new tokens, borrowed phonemes, new SKU options — and the rule-set written for the old alphabet may not have verdicts for the new units. The failure mode is stale-alphabet gating: an unextended grammar either rejecting newly-legitimate units or, worse, having no rule for them and falling through to a default that mis-classifies. Diagnostic: treat the alphabet as a versioned object and re-audit the local rules whenever it extends, confirming each new unit has explicit position-class verdicts rather than relying on the gate's default behaviour.

T6 — Strict gating versus error recovery (sign). A clean local gate enables recovery (skip to the next legal position, suggest a minimal repair), but strict binary rejection without a recovery strategy turns one illegal window into a hard failure of the whole sequence. The failure mode is brittle gating: a gate that correctly identifies illegality but offers no path to the nearest legal sequence, so a single malformed byte aborts processing that could have resynchronised. Diagnostic: check that the syntactic/semantic separation is actually exploited for recovery — a gate that rejects without a defined "nearest legal" target is leaving the prime's recovery affordance on the table.

Structural–Framed Character

Local sequence legality sits at the structural pole of the structural–framed spectrum: aggregate 0.0, with all five criteria at zero, and on this prime every diagnostic points the same way. The pattern is pure relational machinery — a finite alphabet, a positional grammar of local context classes, a local rule-set deciding each window's verdict, and a pre-semantic binary legal/illegal gate whose global verdict is the composition of local verdicts — the structural signature of regular and context-free grammars wherever it appears.

vocab_travels is 0.0 because each substrate tells the pattern in its own words and the cross-domain machinery is genuinely shared rather than translated: phonemes and syllable position in phonotactics, tokens and productions in parsing, codons and reading frame in molecular biology, pitch classes and metric position in music, board moves and board context in chess. evaluative_weight is 0.0: legality is a binary well-formedness verdict carrying no approval — a legal sequence may still be meaningless or wrong, and the prime is explicit that legality is fixed before the sequence is asked what it means. institutional_origin is 0.0: it is formal-grammar structure, pre-semantic by construction, with no appeal to institutions or norms. human_practice_bound is 0.0: the ribosome's reading-frame check and DNA codon legality run the identical gate in a biological substrate with no human present, and chemical valence legality runs it in matter. import_vs_recognize is 0.0: invoking the prime recognises a finite-alphabet-meets-local-positional-constraint structure already present — name the alphabet, the positions, the local rules, run the gate — rather than importing an interpretive frame. Every diagnostic reads structural, which is why this is a canonical structural prime with genuinely shared cross-domain formal machinery.

Substrate Independence

Local sequence legality is a maximally substrate-independent prime — composite 5 / 5 on the substrate-independence scale. Its domain breadth (5 / 5) is exhaustive: the alphabet-plus-positional-grammar structure recurs with identical force across phonotactics (which sound sequences a language permits), formal grammars and parsing, network protocols (legal message-byte sequences), molecular biology (codon and splice-site legality in DNA and RNA), music (permitted note and chord progressions), games (legal move sequences), software configuration formats, and chemistry (valid bonding sequences) — formal, linguistic, biological, and physical substrates with no common medium. The structural abstraction (5 / 5) is complete because the prime is pure relational structure: a finite alphabet, a positional grammar, and a local rule-set that produce a legal/illegal verdict by composing window verdicts, carrying no normative or institutional content — the legality is pre-semantic, decided before the sequence is asked what it means. The transfer evidence (5 / 5) rests on genuinely shared formal machinery: the theory of regular and context-free languages, finite-state acceptors, and window-based constraint checking is the same apparatus whether applied to phonotactic well-formedness, protocol grammars, or splice-site recognition, so the cross-domain transfer is mathematical identity, not analogy. The pattern is recognized rather than imported wherever a finite alphabet and local positional rules gate well-formedness, which is exactly why a phonotactic constraint, a protocol grammar, and a codon-legality rule are interchangeable instances of one structure.

  • Composite substrate independence — 5 / 5
  • Domain breadth — 5 / 5
  • Structural abstraction — 5 / 5
  • Transfer evidence — 5 / 5

Relationships to Other Primes

One-hop neighborhood: parents above, mutual partners to the right, children below.Local SequenceLegalitysubsumption: Local-to-Global AggregationLocal-to-GlobalAggregation

Parents (1) — more general patterns this builds on

  • Local Sequence Legality is a kind of Local-to-Global Aggregation

    The file is explicit that local_sequence_legality is the "narrower, specifically grammatical case" of local_to_global_aggregation: a locally-checkable property promoted to a global verdict, where local_to_global_aggregation is "the broad mathematical pattern" with the general overlap-and-glue discipline and obstruction theory, and this prime "adds the pre-semantic, alphabet-and-position- class specificity." That is an is-a (specialization) relation, and its own cross-ref links local_to_global_aggregation. NOT the sequencing nearest (0.898), a deliberate non-confusion (ordering-for-outcome vs binary well-formedness). Medium because local_to_global_aggregation is a candidate; if it lands, this is the natural parent.

Path to root: Local Sequence LegalityLocal-to-Global Aggregation

Neighborhood in Abstraction Space

Local Sequence Legality sits in a moderately populated region (47th percentile for distinctiveness): it has near-neighbors but no dense thicket of synonyms.

Family — Ordering, Sequencing & Dependency (12 primes)

Nearest neighbors

Computed from structural-signature embeddings · 2026-06-14

Not to Be Confused With

The nearest embedding neighbour is sequencing, and the two share a surface concern with arrangements of units in order. But they ask categorically different questions. Sequencing is teleological: it concerns the order in which steps must be performed to achieve some outcome — what must precede what, which dependencies bind, how to schedule toward a goal. Local sequence legality is pre-semantic and binary: it concerns whether an arrangement is well-formed at all, decided by local constraints over short windows before the sequence is asked what it means or whether it accomplishes anything. A sequence can be perfectly legal (clears the syntactic gate) yet accomplish nothing, and a sequence can be in the wrong order for its goal (a sequencing failure) while remaining locally legal. The prime's load-bearing claim — that a finite alphabet, positional grammar, and local rule-set produce a legal/illegal verdict by composing window verdicts — has no analogue in sequencing, which is about achieving an end, not gating well-formedness. A practitioner who conflates them will reach for ordering-for-an-outcome reasoning where the actual task was a positional well-formedness check.

The prime is also confusable with local_to_global_aggregation, and the two are genuinely close — both promote local verdicts to a global one and both have a locality boundary. The distinction is one of generality and machinery. local_to_global_aggregation is the broad mathematical pattern (compactness, sheaf glueing, distributed consensus) in which a locally-checkable property lifts to the whole under an explicit overlap/compatibility condition and aggregation rule, with a rich obstruction theory that turns lift-failure into structural information. Local sequence legality is the narrower, specifically grammatical case: a finite alphabet, a positional grammar of context classes, and a local rule-set, where the global verdict is the simple conjunction "legal iff every window is legal," and the boundary is precisely the regular/context-free divide where legality starts to require non-local information. The aggregation prime's overlap-and-glue discipline is more general than the sequence prime's windowed conjunction; the sequence prime adds the pre-semantic, alphabet-and-position-class specificity that the aggregation prime does not carry. A practitioner working a phonotactic or protocol-parsing problem wants the sequence prime's concrete grammar machinery; one working a topological or consensus problem wants the aggregation prime's overlap-and-obstruction apparatus. Treating them as one loses either the grammatical specificity or the general glueing discipline.

A third confusion worth dispelling is with formal_system, since both concern legal strings over an alphabet under rules. But a formal system pairs well-formedness with axioms and inference rules that generate theorems carrying meaning — its purpose is to derive truths. Local sequence legality stops at well-formedness: it is the pre-semantic gate that decides whether a string is a possible sentence before any question of what it asserts or derives. The prime explicitly separates the syntactic gate from semantic evaluation and warns against leaking the latter into the former (a parser that tries to repair meaning, a reviewer marking ill-intentioned-but-valid input as "syntactically wrong"). A practitioner who frames a legality gate as a formal system will import inference and meaning where the task was purely to filter malformed input before downstream layers process it.

These distinctions decide the tool. Framing the problem as sequencing reaches for outcome-ordering where the task was positional well-formedness; framing it as local_to_global_aggregation reaches for general overlap-and-glue machinery where a concrete windowed grammar suffices (or, worse, applies windowed conjunction where genuine overlap-obstruction reasoning was needed); framing it as a formal_system imports semantics into a pre-semantic gate. The prime's contribution is the finite-alphabet, positional, local, binary character of the legality verdict and the boundary watch that flags when non-local information is required and local rules must give way.

Solution Archetypes

No catalogued solution archetypes reference this prime yet.