Created by: OpenAI Codex
Source: docs/creation/review/15-candidate-seed-language-and-activation.md
Prepared 2026-11-26 for the STREAM owner. Status: exploratory design for discussion; no replacement of the current kernel plan or approval to implement it.
The proposed seed is a finite relational evaluator with explicit atomic effects. Definitions acquire identities before activation; applicable rules derive conclusions, while accepted invocations create occurrences or change active state. This permits the reader to acquire executable vocabulary from recorded definitions while retaining a fixed interpretation and admission mechanism.
1 Questions this construction answers
The construction addresses eight examples: referent creation, containment, derived containment, attributed claims, a dormant definition, activation, a bounded grant, and an authorized change. It also makes termination, authority, absence, correction, and replay assumptions explicit. It is a candidate for a small inspectable seed, not a proof of minimum instruction count.
The previous one-mark discussion supplies a structural intuition. This language additionally stipulates references, finite tuple construction, matching, conjunction, equality, evaluation order, and atomic commitment. These capabilities are not derived merely from an enclosure or from cross/call equations.
2 Fixed machine and changing knowledge
Let H_n be the admitted history prefix, K_n its active definitions, B_n its active base fact occurrences, and C_n its derived closure. Definition proposals have immutable references even before activation.
The fixed machine supplies canonical framing, primitive types and reference identity, deterministic matching, finite closure, guard evaluation, effect staging, admission and activation checks, atomic commit, and replay. A separately named integrity profile supplies hashes, signatures, and authenticated caller evidence. The expression language does not derive cryptographic authenticity.
All governance parameters and trusted bootstrap evidence must be identified by the seed/log profile so independent readers can reproduce admission. An unauthenticated caller-supplied name is not a credential. Initial stewardship is an explicit trust premise. A domain predicate named principal need not exist yet.
K evolves through checked and authorized definitions. B evolves through accepted action effects. C is a disposable projection of K and B. The record is the witnessed history of these changes.
3 Terms and types
Starting primitive values are Ref, exact bounded Int, Bytes, Bool, and Credential. Credential is an opaque identity whose authenticity is supplied by the authenticated envelope; storing a Credential value alone does not authenticate a request. Flat typed tuples are sufficient for predicates. Definition ASTs use finite tagged sequences.
Ref includes prior record/definition addresses and committed entity/fact occurrence addresses. All are stable; their kinds are checked. A finite fresh binder can reserve a reference within the current transaction. Effects may refer to that local binder, but it becomes resolvable outside the transaction only on success. Refusal leaves no live entity behind.
For example, fresh reference allocation can be (log_id, attempt_address, fresh_ordinal), with a distinct address tag for emitted fact occurrences. Retrying the same submission key returns the original receipt. A new key denotes a separate attempt. Canonical domain encoding remains a separate specification.
Numbers, tuple size, arity, bytes, and expression depth have explicit profile limits. Symbolic names below are presentation aliases for definition references, never mutable resolution keys in canonical events.
4 Eight expression forms
| Form | Meaning | Valid location |
|---|---|---|
| relation | Propose predicate signature, base/derived mode, visibility/completeness scope, and finite forbidden-state queries | Definition record |
| rule | Propose positive typed implication with an existing/candidate derived predicate as its head | Definition record |
| action | Propose parameters, guard, declared write set, and finite effect body | Definition record |
| activate | Admit an exact definition bundle under prefix knowledge and governance, effective at the next position | Administrative record |
| invoke | Request an active action with typed operands and authenticated envelope | Action request |
| fresh | Reserve a new stable referent | Action body only |
| emit | Add a typed base fact occurrence | Action body only |
| retire | Close a named live base fact occurrence without removing its historical bytes | Action body only |
Checks and receipts are mandatory machine behavior, not a ninth freely asserted command. A separate stored check receipt is allowed; activation recomputes its checks or validates a prefix-bound check artifact and never trusts a user-written success flag. Live global definition retirement/upgrades are outside this first version; new immutable definitions and action references provide versioning.
Eight forms do not mean eight elementary instructions. Conditions, variable binding, type checks, arithmetic predicates, graph checks, canonicalization, and admission are real machinery. The language keeps these explicit rather than claiming instruction minimality from spelling.
5 Rules and termination
A rule is head <- body, where body is a conjunction of positive relational atoms and typed equality/inequality/order tests. Multiple rules for the same head provide alternatives. Every variable in the head and comparisons must be bound by positive body atoms. Predicate references are fixed; rules cannot quantify over predicates or invoke a dynamically selected action. Rules create no fresh terms, numbers, references, or nested values.
Positive recursion is allowed. Begin with the tuples of active base facts and repeatedly add satisfied rule conclusions until no new tuple appears. Derived predicates cannot be directly emitted. Distinct base fact occurrences remain distinct in history even when their tuples coincide in the closure.
At a finite prefix the active value domain D is finite. For finitely many predicates of fixed arities a_p, at most sum_p |D|^(a_p) distinct tuples exist. Each productive iteration adds a previously absent tuple, so closure terminates. This is a finiteness argument, not an efficiency guarantee. Unrestricted number generation, existential head variables, and term constructors in recursive rules would invalidate it and are excluded.
Evaluation uses deterministic order and profile-defined work limits. Limit exhaustion returns EvaluationLimit, not false. A reader unable to complete required verification reports unverified/unsupported locally; local wall-clock timeouts do not rewrite canonical log outcomes. Published per-invocation limit outcomes require reproducible metering rules.
For explanation, record rule references and supporting base/derived dependencies as a finite graph or construct a finite proof on demand. Do not enumerate every recursive proof path; there can be infinitely many explanations even when the tuple closure is finite.
6 Guards and absence
Action guards are finite queries over the completed pre-state closure. They may use conjunction, alternatives, typed comparisons, and not-exists subqueries over declared closed scopes. Variables are action parameters or range over finite matches. Derived rules themselves remain positive; there is no recursion through negation.
Not-exists is permitted only where the reader has complete authoritative information for the named scope and prefix, including all dependencies of the queried relation. A partial replica returns Unknown/Incomplete, not false or permission. An external claim with no known evidence remains unknown. Explicit negative claims are ordinary attributed facts and are distinct from absent positive facts.
Actions can use non-generating arithmetic tests in guards and checked exact arithmetic expressions in their finite effects. Arithmetic does not feed recursive value generation. Effects do not invoke actions or contain unbounded loops in this candidate.
7 Constraints and atomic effects
Each base relation can declare forbidden-state queries. All active constraints are evaluated over the hypothetical post-state and its completed closure after a staged delta. A matching forbidden query causes refusal. For the parent relation, forbid multiple distinct parents for one child and forbid in(x,x). These checks protect the topology even if an admitted action has an inadequate guard.
The checker type-checks declared reads/writes and forbids action effects on reserved activation, authentication, history, and definition metadata. An action needs an approved write set for each base predicate it can emit or retire. Retire verifies a live occurrence ID, its predicate, and its membership in that write set. Knowledge that an occurrence exists never grants authority to close it.
The engine checks guards against pre-state only. Effects are assembled atomically; an action cannot grant itself permission and use that grant in the same invocation. Post-state constraints check the entire bundle. Failed attempts advance audit/idempotency history only; K and B remain unchanged.
This restricted checker establishes syntactic, type, dependency, effect-scope, and registered-constraint properties. It does not prove that arbitrary admitted business logic is socially correct or that all intended invariants were registered. Activation requires explicit governance of meaning in addition to static checks.
8 The eight examples
The examples use readable pseudocode for the abstract forms, not a frozen wire grammar. @steward and @caller are supplied by the trusted profile and authenticated envelope. The notation carries no unstated inference from a human name to a credential.
8.1 Referent creation
Declare base predicates entity(Ref) and boundary(Ref). Define and activate an action with the guard @caller = @steward and effects:
fresh x
emit entity(x)
emit boundary(x)
Invoking it twice produces distinct references A and B. A third invocation introduces root boundary R for the example. Definition references already existed through machine-level proposal recording; entity creation is the first ordinary domain action, not the first occurrence the machine can represent.
8.2 Containment
Declare base parent(child:Ref, container:Ref) with unique-parent and acyclicity constraints. Activate it together with the derived in rules below so the constraints have their dependencies.
Define an administrative attach(x,y) action: entities and target boundary must exist; x != y; no existing parent(x,_); and not in(y,x). Emit parent(x,y). Both absence checks require the complete local topology.
Attach B under R, then A under B. The only immediate edges are parent(B,R) and parent(A,B). Their occurrence IDs are available through receipts.
8.3 Derived containment
in(x,y) <- parent(x,y)
in(x,z) <- parent(x,y) and in(y,z)
The reader derives in(A,R) while storing the two immediate edges. Strict containment is transitive. Acyclicity is enforced by the constraint forbidding in(x,x). Reflexive within can be separately defined by within(x,x) <- entity(x) and within(x,y) <- in(x,y).
8.4 Attributed claim
Declare base says(author:Credential, subject:Ref, kind:Ref, value:Bytes). Define an action taking subject, kind and value, requiring the subject and kind references to be admissible, and emitting says(@caller,subject,kind,value).
The author comes from the authenticated envelope. The same content can be asserted twice with distinct occurrence IDs. No automatic rule promotes an arbitrary says tuple into a trusted predicate or authority grant. Domain kinds may later introduce typed claim predicates and explicit evidence/adoption rules.
8.5 Dormant definition and latent applicability
Propose a derived principal(Ref) predicate and rule:
principal(x) <- entity(x) and binding_verified(x,c)
The rule reference exists before activation. No inference uses it while it is pending. binding_verified is a protected base predicate written only by an admitted attestation action that validates or relies on explicitly trusted identity evidence. Authentication does not emerge from the words binding_verified.
8.6 Activation
Activate the exact principal predicate/rule bundle after dependency, type, effect and governance checks. It becomes active at the next log address. If no binding_verified tuple exists, it derives nothing. When an authorized attestation later emits binding_verified(P,credential_P), principal(P) follows.
Distinguish dormant definition (not active), active rule without matching premises (inapplicable), and derived conclusion. Inference never triggers a tool call or administrative action automatically. An external scheduler can submit a later invocation naming the premises it used; the guard is rechecked at acceptance.
8.7 Bounded grant
Declare base grant(g:Ref, holder:Ref, action:Ref, scope:Ref, remaining:Int). Define a steward-only issue action that checks principal(holder), active action identity, boundary(scope), and remaining = 1. It freshens g and emits the grant. This example is nondelegable and scoped to one exact action version and one use; expiration and delegation are further definitions, not silently provided.
The action reference can name a move definition that is proposed before issue is invoked and activated in the earlier definition bundle. References to pending definitions are permitted inside checked bundles; invocation still requires the referenced action to be active.
8.8 Authorized state change
Define move(actor,item,old,target,grant_id,grant_fact_id,parent_fact_id). Guards require:
- binding_verified(actor,@caller), principal(actor);
- the named grant occurrence is live, has holder actor, action equal to this exact move definition, scope B, remaining 1;
- the named parent occurrence is live and equals parent(item,old);
- entity(item), boundary(old), boundary(target), boundary(B);
- in(item,B), within(old,B), within(target,B), item != target, old != target;
- not in(target,item), evaluated over complete local topology.
The finite effect body retires the named old parent occurrence and the named grant occurrence, then emits parent(item,target). The grant issuance stays in history as a consumed capability; a separate consumed claim is optional. Both source and destination are checked, so membership in a source scope cannot authorize export to an arbitrary external target.
Create C under B. With A and C inside B, grant P one use of move within B. Move A from B into C. The operation succeeds once. A second distinct request using the spent grant is refused; an identical retry key receives the original receipt. Moving A from B to R is refused because R lies outside B. Concurrent requests are serialized at this log's acceptance boundary and guards re-evaluated at that prefix.
9 Replay and dependency interpretation
For each accepted position, derive K_n from activation records before that position. Compute C_n from current B_n and K_n; evaluate the request; stage effects; compute the candidate closure and constraints; commit once. Activation occurs after its admission record, so its definitions are usable only at the following position.
Activating rules can change derived state without changing base facts. Therefore activation itself must check the candidate closure against existing constraints, name the affected definitions, and preserve the effective prefix. Derived cache invalidation is part of activation.
Retiring a base fact can invalidate derived conclusions. Recompute closure or use a correct truth-maintenance algorithm; monotonically accumulating yesterday's derived conclusions is unsound across retractions. Monotonicity holds within one positive closure computation, not across all history.
Final bootstrap validation replays prefix-effective semantics. Additional checks under completed knowledge may be reported separately; later definitions cannot retroactively authorize earlier acts. This clarifies the earlier plan's final-rules replay language without changing it here.
Replay reconstructs record state, not external effects. An operation that requests a physical/tool action emits an intent. Dispatch and receipts are separate recorded events. Compensation of a real-world effect is a new operation; retiring its record is not physical reversal.
10 Failure cases the design must handle
| Attempt | Required result |
|---|---|
| Invoke a pending definition | Refuse as inactive |
| Activate definition with unbound head variable | Refuse as unsafe rule |
| Recursive rule manufactures successive integers | Refuse unsupported value generation |
| Authorize using partial-view absence | Unknown/incomplete; no authorized transition |
| Caller claims to be another credential | Use authenticated envelope; claimed value grants nothing |
| Emit directly into derived permitted/principal | Refuse derived predicate write |
| New grant and use it in the same action | Pre-state guard cannot see the new grant |
| Move ancestor below descendant | Guard or post-state acyclicity constraint refuses |
| Move item outside grant scope | Scope guard refuses |
| Reuse spent one-use grant with new attempt key | Refuse; no domain delta |
| Retry identical accepted submission key | Return original outcome without duplicate effects |
| Two distinct equal claims | Preserve both occurrences |
| Retire supporting fact | Recompute affected derived conclusions |
| Activate a rule that violates existing constraints | Refuse activation |
| Exhaust deterministic evaluation budget | EvaluationLimit; never treat as false |
These are design obligations from manual reasoning, not executed conformance results.
11 Mapping to STREAM and Pairs
IN can be a defined containment relation with topology constraints. IS can be typed attributed claims with explicit supersession policies. MAY can be the conjunction of authenticated actor binding, active capability and scope conditions. TO needs exact quantity predicates and paired effects, with per-unit conservation expressed as a registered invariant or a trusted transfer constructor. This candidate does not yet define aggregate sums; that arithmetic extension must be explicit before claiming Books coverage.
Principal, book, role and grant are definable domain structures. The fixed machine still contains the power to represent, evaluate, admit and commit their definitions. Domain roles can emerge after seed machinery; the minimal interpreter itself is not derived from those roles.
Cross as complement, crossing as a state transition, arithmetic negation, retirement of a fact and compensation of an external effect remain distinct typed operations. Re-entry can be modeled as positive recursive inference here; this reaches a fixed point and does not itself generate clock time or four phases.
The eight language forms are not the eight STREAM acts or the 128 coordinates. They describe candidate definition machinery. The 128 table remains a proposed semantic map; ASCII spelling and the six stored bits require separate mapping and round-trip work. Pairs' typed account relationships remain domain examples, not proofs that all its financial classifications follow from four glyphs alone.
12 Where the seed remains substantial
The irreducible trusted mechanisms in this proposal include parser/framing, reference allocation, primitive value/type rules, equality, matching and substitution, finite closure, complete-scope guard queries, exact arithmetic, staging and constraints, authentication/admission, idempotency, atomic history append, and resource limits. Cryptographic verification and storage durability have separate implementation contracts. Encoding everything into pairs or bits can reduce surface constructs while enlarging the interpreter or definitions; it is not automatically a reduction in trusted complexity.
Three practical candidates remain: this bounded relational language; a smaller acyclic rule language plus an explicit reachability primitive; or a general small machine with separately proved/checked programs. Compare total trusted implementation, definition size, evaluation bounds, expressiveness and explanation quality. The current recommendation is to specify this relational candidate first because the eight examples are inspectable, then measure the cost of its recursion and completeness machinery before selecting a seed.
13 Open decisions
- Are positive recursive rules worth their closure engine, or should recursion initially be limited to declared structural traversal?
- What exact complete-scope declaration allows absence to be used safely across logs and partial replicas?
- Which universal invariants belong in fixed admission versus registered constraints, and which proof/evidence formats can the reader check?
- Which exact arithmetic/aggregation operations are needed for TO and Books without uncontrolled value generation?
- How are active definitions deprecated and migrated while preserving old interpretation and preventing authority widening?
- Should base facts be universally retired through this mechanism, or should some relation types permit only domain-specific supersession records?
- What is the smallest canonical bootstrap byte grammar, distinct from this readable pseudocode?
Next design artifact: a dependency table for every mechanism and a hand-worked canonical transcript of the eight examples. Implementation awaits the owner's later design decisions.
Local grounding
- Codeable unfolding plan, especially seed activation and knowledge/world separation.
- Human-agent and primitive review.
- /home/mp/make/pairs/modules/link.py: typed symbolic pair expressions.
- /home/mp/make/pairs/lib/entry.py: pair inference from declared account types, with compound fallback.
- The grammar, admission model and examples above are newly proposed constructions, not claims of equivalence to the historical Laws of Form calculus.