Laws and objects
A law is a predicate the kernel checks on every change to a resource, whoever proposed it. Objects, activities and seats build on that rule. All of what follows is compiled and proved in Lean and has run through signed Host operations on scratch worlds; none of it is deployed.
What law, claim and requires mean
- A cell law is a decidable predicate over a write's old and new state and its request. It is the judge of admission.
- A package
lawin.obendis enforced: the kernel installs it on every object created from the package and judges every write of the object's declared state by it. Only a fragment compiles (comparisons, membership,monotone,writeOnceNonzero(a nonzero value, once written, never changes; 0 reads as unwritten) and their Boolean combinations); anything else is refused at parse. - A domain law is a cell law over several objects' joint state, judged at the end of every turn that writes a member.
- A spec
claimis listed in a specification's metadata as unchecked. Nothing evaluates it and it never reaches admission. requiresnames a member a specification needs from its final self. It is checked, and it is not a precondition.
Which code wrote
Every law state begins with the slot objective/artifact. For a command with an
Objective claim it holds the claimed method's identity; for any other command it holds
-1. A clause objectivePin accepts only steps whose slot names a pinned
artifact, so an ordinary command is refused whatever its writes. Every object's judged law leads
with that clause for its pinned package, derived from the record and never stored, so no creator
law omits it.
Objects
A cell is an object to the kernel only if it has a record: its package pin, its declared state type, the package's laws, the creator's law, an upgrade policy and a payer. A birth on a cell without a record is refused, and so is a birth of any package but the pinned one. There is no direct write of declared state: every write comes from a birth, a delivery, a call frame or a delivered message under the pinned package. Each must type at the declared state type and is judged by the pin clause, the package's laws, the creator's law and, at the end of the turn, every domain the object belongs to. A delivery's write is judged with the activity's principal as subject, never the deliverer. A refusal names the failing clause and refuses the whole turn.
Activities
An activity is a persisted checkpoint plus one await. Its reply slot has one decider and one
deadline, decided once. A resume delivers the settled outcome together with the object's state
and version read in the same turn, so no write is computed from a stale read. An attempt that
exhausts its declared envelope is a paid turn; an ended activity's record and settled slots are
retired, and the id never returns; anyone may abandon an await after its deadline plus a grace,
which pays the timeout fee and returns the rest of the purse. One public tariff prices every
declared envelope, for native admission and for activities. Each turn is a signed native command
(Host operations 210 to 214, mini activity).
Seats
A seat holds one side of a contract in its own Book account. Its law is offer safety: every
want is met, or every give is refunded. The law is judged on every reallocation, and the exit
path never reads the contract's clause, so no clause can forbid an exit. Each seat turn is a
signed native command (Host operations 215 to 219, mini seat).
Where each stands
The journey rows run on scratch worlds; their results are kept outside this repository.
| Part | Evidence | Landed | Journey row |
|---|---|---|---|
| Native Objective admission (signed invocation, receipt, refusals) | integrated on scratch worlds | 6df4602f, 73223088, a2454432 | objective |
| Law slot and the pin clause | compiled, proved | 2a7c372b | none |
| Object record, law on every state write | integrated on scratch worlds | eac4b18c, de9c84f7, 7b97da60 | objectrecord |
| Activities: records, slots, resume with view, paid exhaustion, abandonment | integrated on scratch worlds | 8194e09d, 67362781, d1ce7b0c, 34d803f8 | activity |
| One public tariff | compiled, proved; in the Host | bf28dd19 | objective (prices the claim) |
| Seats and invitations | integrated on scratch worlds | 6347dcb4, 2c1b5733, 6336af2b | seats |
The bend verb (author and run a program as an activity) | built; carried by the next build | 063ba6cd, 65277f41 | jbend |
Not built: a storage charge for packages, object records and state cells; activities that call, send or await a message; objects holding capabilities; a multi-turn migration.
Objects, activities and seats in the language guide, the kernel activity and seats: each theorem and its line.