/ Stream
build 2026.12.03 · --:--:-- UTC · RSS

BabbTools for the frontier.

mascot mascot

Making

08 · Relations as operators — first formal attempt

Created by: OpenAI Codex

Source: docs/creation/review/08-relations-as-operators-first-formal-attempt.md

Status: exploratory model, 2026-11-25. This is an attempt to take the relations in, is, may, and to as mathematical actions with laws and state effects, not as an approved STREAM specification. It responds to the owner's objection that the tree should encode relations themselves rather than merely offer an index of labels.

Aim

The goal is for each relation family to have a mathematical definition that:

  1. is composed from a small formal base;
  2. acts on the evolving state of a log;
  3. obeys invariants that implementations can check;
  4. admits efficient incremental updates and derived views.

The proposal is to treat a relation as an operator on a shared algebra of forms, entities, transitions and quantities. The bit pattern identifies the operator family; the arguments specify which operands it acts on. Semantics lives in the operator laws and state transition, not just in the label.

Base: a distinction and its Boolean forms

Let Ω be a domain of addressable positions or entities, and let a form be a subset A ⊆ Ω. Its characteristic function is:

χ_A : Ω → 𝟚 = {0,1}
χ_A(x) = 1 iff x ∈ A

A distinction δ_A separates A from its complement Ω \ A. On each point, the mark answers a binary question. Boolean operations combine forms pointwise. Spencer-Brown's calling and crossing laws can be represented by idempotent and involutive reductions in the chosen calculus; the exact term syntax still has to be fixed.

The algebraic space of forms supplies reusable operations:

A ∧ B = intersection
A ∨ B = union
¬A    = complement
0     = empty form
1     = whole domain Ω

This alone is a Boolean algebra: it supplies ways to compare and combine forms. It does not yet contain people, units, permissions, or commercial meaning. Ω, address identity, and the interpretation of its points remain explicit choices.

in: containment is the order induced by the form algebra

Define:

In(A,B)  ⇔  A ∧ B = A
         ⇔  A ⊆ B

This is more than a tag. It is the partial order of forms induced by the distinction algebra. It obeys:

In(A,A)                                      reflexivity
In(A,B) ∧ In(B,C) ⇒ In(A,C)                  transitivity
In(A,B) ∧ In(B,A) ⇒ A = B                    antisymmetry

In STREAM terms, A can be a part, activity, account or object and B its containing boundary. Nested forms yield ancestry and roll-up paths. A log can update a containment edge and derive ancestors/descendants, subject to time validity and acyclicity if the chosen domain requires it. The Boolean equation provides a direct conformance law for any implementation of in.

is: a distinction evaluated at an entity

Treat each property kind k and value v as a distinction over entities:

χ_{k,v,t,frame} : Entities → 𝟚
Is(x,k,v,t,frame) ⇔ χ_{k,v,t,frame}(x) = 1

For a single-valued property, the value forms for kind k partition the relevant entities at a given time/frame:

∀x: exactly one v satisfies Is(x,k,v,t,frame)

An append-only log does not overwrite the old valuation. It appends a new assertion or supersession, and the Register is the derived valuation at an address/time. Identity can be given by extensional equality (A = B iff χ_A = χ_B) while entity identity itself remains the stable log address.

This makes is a predicate/evaluation operator over a form, not just a field label. A factual is bit says “this entry asserts this valuation”; it does not establish that the assertion is true. Recorder, evidence, method and dispute state must remain available to assess it.

may: permission is a constrained transition algebra

Permission is not generated by Boolean distinction alone. Add a state space S, a family of actions/transitions τ : S → S, and for each principal a a state-dependent set of authorized transitions Cap(a,S).

May(a,τ,S) ⇔ τ ∈ Cap(a,S)

The modal “may” operator over a proposition φ can then be defined as:

◇_a φ(S) ⇔ ∃τ ∈ Cap(a,S) : φ(τ(S))

GRANT, DELEGATE and REVOKE are state-changing operators on Cap. A grant can carry a delegable flag, scope σ, and expiry tₑ. Delegation then creates a capability for the delegate only within the grant's bounds:

Delegate(a,b,g,τ,S) is admissible only if
    g ∈ Cap(a,S) ∧ delegable(g)
    ∧ scope(τ) ⊆ scope(g) ∧ now < expiry(g)
then Cap'(b,S) = Cap(b,S) ∪ {τ}

There is no general “permission is transitive” law: the admissibility rule must be evaluated, and revocation must define whether descendants are revoked too. This captures the paper's intuition that authority is a relation, while making the additional deontic/capability rules explicit. Modal logic likewise interprets possibility through a declared accessibility relation; the relation's properties depend on the intended semantics. (Stanford Encyclopedia of Philosophy on modal logic)

to: transfer is a weighted boundary-crossing operator

For one conserved kind u, represent the holdings across objects/accounts as a vector h ∈ Q^N, indexed by entities. A transfer of amount q from i to j is the sparse update:

T_{i→j,u,q}(h) = h + q(e_j - e_i)

e_i and e_j are basis vectors for the endpoints. The transfer changes both ends in one operation, and:

1ᵀ T(h) = 1ᵀ h

So the sum of the conserved quantity is unchanged inside the closed boundary. Across many transfers, build an oriented node-edge incidence matrix B and an edge-quantity vector q:

Δh = Bq

Each edge column has −1 at its source, +1 at its destination and zero elsewhere. A closed internal transfer has a zero-sum column. External generation, loss or boundary crossing must be represented by explicit source/sink accounts or nonzero boundary supply. Network-flow formulations use exactly this incidence structure for balance equations. (NetworkX incidence-matrix definition)

This is an actual algebraic state change and invariant, not a to label. Per-entry endpoint updates can be sparse; aggregate views are folds over the same edge deltas. Units are separate dimensions: conservation is enforced per compatible unit, with conversion handled by an explicit transformation rule.

A first object and its first relations

Suppose the first boundary distinguishes a log domain L from its complement. The first in-log address x can then be introduced by an append operation. One possible representation is:

x := address(log_id, entry_position, fact_position)
In({x}, L)                         x is in this log
Is(x, declared-kind, k)            x has declared kind k

Here {x} is the singleton form for that address. The first equation relates a form to its containing form; the second evaluates a kind distinction at the address. A later grant can place an authorized transition in Cap(root,S). A later to fact applies a signed quantity delta between two addresses.

This constructs an in-system referent and a connected set of relations. It does not prove that a physical object exists or that an assertion is correct. Those are evidence and trust questions; the log records who asserted what, under which frame, and with what support.

Encoding the operators in a fact type

Under the paper's proposed representation, a type selects an operator and its mode:

Type = (relation-family, relation-specific-direction, modality, phase)

The first type glyph carries the relation family and its direction/polarity. Direction is interpreted by the selected operator:

FamilyDirection/polarity example
inenter / leave
isassert / supersede
mayallow / withhold
tointo / out of a boundary

The second glyph carries factual/possible modality and phase (instant/begin/end/sample). The roles then supply operands:

time · subject · object · kind · measure

Thus an is entry dispatches to valuation/supersession semantics; may dispatches to capability-state semantics; to dispatches to a weighted vector update; and in dispatches to order/containment semantics. The type is executable because it chooses a state transition with defined laws.

The numeric assignment of type-bit patterns to operator families is still a codebook decision. The algebra makes the operations meaningful once defined; it does not force, for example, that 00 mean in. The human labels are not arbitrary, though: each names an operator with a signature, laws and observable state effect.

Unified state update and telemetry

Let S contain the form lattice, property valuations/history, capability state and per-kind holdings. Each fact induces one relation operator T_f:

S_{n+1} = T_{f_n}(S_n)
S_N     = T_{f_{N-1}} ∘ ... ∘ T_{f_1} ∘ T_{f_0}(S₀)

The log is the ordered composition of relation operations. The operators can share one address space and common frame/provenance, while maintaining specialized indexes for ancestry, current property values, authorization checks and balances. This is a plausible route to fast telemetry: each new fact applies a local delta and preserves invariants, instead of reparsing every historical row for each view. It is not a performance guarantee by itself; data structures, event rates, workload shape and concurrency still determine runtime.

The deeper hypothesis is that the four relations describe four mathematically different ways a distinction participates in state:

  • in orders forms by inclusion;
  • is evaluates distinctions over forms/entities;
  • may restricts which state transitions are admissible;
  • to moves a conserved measure across a boundary.

That is a stronger proposal than “four labels for four slots.” It should be accepted only if the same algebra can handle real domains without hidden fifth relations or ambiguous operator laws.

What remains to prove or decide

  1. Does STREAM's “first mark” construct a useful carrier of addressable forms, or must the seed separately posit a set of identifiers?
  2. Is is one relation for identity and properties, or should equality be a meta-operation while is is only valuation?
  3. Which properties are single-valued partitions, multi-valued predicates, or temporal functions?
  4. Is in always a partial order? Which domains require interval membership, overlapping containment or explicit cycles?
  5. What are the precise authority transition constructors, delegation closure and revocation effects?
  6. Does every to relation represent a conserved movement? How are measurement, generation, loss, conversion, uncertainty and corrections modeled?
  7. How do fact/possible modality, evidence status, estimates and actor attribution compose with these operators?
  8. Can each operator update its projections incrementally while independent readers produce identical states from the same canonical log?
  9. Can conformance vectors prove the algebraic laws, invalid-transition refusals and edge cases across implementations?

Summary

This attempt treats the four relations as operators in a common state algebra. A distinction provides a Boolean space of forms; in becomes its inclusion order, is evaluates property distinctions, may restricts allowed transitions, and to applies a conserved weighted delta. The last two require additional structures and axioms beyond the primary distinction calculus. The design wager is that these additions are not unrelated fields: they are the minimal four operators needed to organize, characterize, authorize and move forms through a changing system.

The test for the wager is operational: define the signatures and laws precisely; encode each operation; show that logs update the same state deterministically; and measure whether the specialized deltas make telemetry faster while retaining complete evidence and correction semantics.

Read on Telegraph