hold, Assertions

An assertion is a claim that the twin possesses a value. Assertions are the mesh's supply side: they are what flows when a matching gap pulls, and they never move for any other reason. A hold with no seeker is inert: declared, membrane-guarded, and perfectly silent.

Syntax

From the grammar in spec §5:

hold        = "hold" fact "=" value [ "±" quantity ] [ "@" number ]
              [ [","] temporal ] ;

temporal    = "decays" ( instant | reltime )
            | "until" instant
            | "every" period ;

Semantics

A hold declares that this twin holds a value for a fact, with three optional refinements:

  • Uncertainty (±): an honest error bar on the value itself. 19:40 ±5m means "around 19:40, trust me to five minutes." The uncertainty is part of the claim, not a hedge added afterward.
  • Confidence (@): how sure the twin is that the claim is true at all, from @0.0 to @1.0, defaulting to @1.0.
  • Temporal validity: when the claim stops being a claim. decays gives an expiry (absolute or relative), until a hard end, every a refresh period. Knowledge in Osmol is perishable by declaration, so nobody has to remember to retract an ETA after dinner.

The full type of an assertion is therefore a triple: (value type, granularity, temporal validity), for example place @ exact, decays 20:00. Value types are quantity, instant, place, enum, or entity, and every one of them carries a granularity coordinate on the lattice. What a given receiver actually absorbs is this value after the owning twin's membrane casts it downward; the assertion itself always stays at its declared grain.

Assertions participate in settling exactly one way: when some other twin's seek matches the fact, the pressure function evaluates the pair, the membrane supplies the cast, and if pressure clears the receiver's threshold, a delta flows and the gap closes. Order of declaration never matters; a hold is a fact about the world, not a step in a procedure.

Examples

The three from spec §4.2:

hold eta(dinner) = 19:40 ±5m, decays 20:00
hold location(office) = grid(52.52, 13.40), decays +2h
hold status(atlas.review) = in-progress @0.9

An instant with uncertainty and decay; a place with a relative decay; an enum with explicit confidence. Three claims, and each one is honest in its own way.

In the v0.1 interpreter

osmol.py keeps assertions in twin.holds, a map from fact string to uninterpreted value string: "19:40 ±5m" is stored and flowed as text, not parsed into an instant plus an error bar. decays and until clauses are parsed by the hold regex but wall-clock time is not simulated, so nothing actually expires during a settle. This is a documented pragma, not an accident (see v0.1 pragmas).

Two constructs auto-emit holds, so your twin can hold more than you wrote:

  • owe emits structural supply at parse time: owe review(atlas) to raj by fri also creates hold status(atlas.review) = in-progress on the ower, because an unmet commitment implies the counterparty's interest in its status.
  • A resolved decide emits its outcome: injecting raj:venue(dinner)=verde deletes the pending decision and creates hold venue(dinner) = verde.

Both are how the dinner mesh's second and third flows come to exist without maya or raj writing a single extra line.

  • seek, the demand side; the only thing a hold can flow toward.
  • membrane, who may see this assertion, and at what grain.
  • O-002, the error you get for trying to sharpen a held value on its way out.
  • The granularity lattice, where the grain coordinate lives.