Elamur Groupants⌕
☰

world-school-actors-world-event-play

The groupant beside world/src/school.rs in the Mova repository: what the code computes, what it never does, how to go back from its outputs, its invariants, cost and checks.

Facts

Implementation material. A Mova code model describes this code at one source revision: partial models, finite checks and their stated scope. It is not a reviewed general exposition, and its labels are shown as written, never raised.

Components

componentlabelwhere
approximantpartial source modelforward
astpartial../../syntax.json
compositionpartial source modelcomposition
costpartial source modelcost
descriptantpartial source modelepoch-memory
invariantpartial source modelinvariant
testspartial source modelchecks

Obernants

The typed relations around the forward model: the behaviour complement (what the code never does), the reverse reconstruction (every input compatible with an output) and specialised views.

idtypelabelwhere
world-school-actors-world-event-play-behavior-complementbehavior_complementpartial source modelbehavior-complement
world-school-actors-world-event-play-reverse-reconstructionreverse_reconstructionpartial source modelreverse-reconstruction
world-school-actors-world-event-play-fraction_timestate_transitionpartial source modelfraction_time
world-school-actors-world-event-play-transfer_conservationconservation_relationpartial source modeltransfer_conservation
world-school-actors-world-event-play-receiver_selectionorder_relationpartial source modelreceiver_selection
world-school-actors-world-event-play-unknown_effecteffect_boundarypartial source modelunknown_effect

Model text

Wave34, 2026-10-31. Source-bound helper model; no universal proof or approximation-error certificate. Historical parent epoch remains intact.

forward

Fold all initial holdings by actor. For each ordered event obtain (-1,0) for pay, else eff(verb) or return None. Quantity is e.n or (pre-event subject minus keep)*p/q. Update subject first; then explicit receiver, else first original holder different from subject if subject was not an original holder. Return the signed map without pruning.

invariant

All products, sums and differences must fit i64 and fractional q must be nonzero; truncating integer division is retained. Equal subject/receiver identities observe both updates. Unknown effect aborts the local result, not external callback side effects.

cost

H holdings,J events,A actors: O((H+J)log A+JH) plus event/string clones, O(A) map. Callback cost additional.

composition

Parent calls play before answer_of. Fractions inspect state after prior events but before this event; fallback receiver consults original holds, not the updated map. eff is supplied in native tests; dictionary/parser calls are omitted.

behavior-complement

Exclude a successful result if a consulted non-pay effect is None; exclude final clamping of negative actors; exclude computing a fraction from the post-event balance. For supplied pure eff, no mutation of Reading holdings/events occurs.

reverse-reconstruction

Given final map and a fixed event sequence/effects, compatible initial holdings are every ordered list whose aggregated counts replay to that map. Fractions, integer truncation, implicit receiver choice and duplicate holdings make this fiber many-to-one; retain intermediate maps and original-holder identities.

fraction_time

Event j quantity depends on W_(j-1)[subject], so transferring three before all-but-two differs from computing both quantities at the initial ten.

transfer_conservation

When both parties exist, are represented and a+b=0, the event preserves sum of actor balances, including identical actor identities; absent implicit receiver need not conserve.

receiver_selection

Fallback selects the first eligible original holder; reordering original holds may change receiver despite identical initial aggregated map.

unknown_effect

A pure callback returning None suppresses the entire Option map, although earlier local updates occurred. pay bypasses callback and uses the fixed debit. External callback effects would not be rolled back.

checks

Exact world library selections: school::wave12_models::supplied_reading_transfer_and_fraction_use_prior_state. Current repeated debug/release outcomes and compiled controls are in the root sidecar wave34-evidence.md. Only these supplied-input tests are current evidence; older parent module-wide receipts are historical. Macro bodies remain opaque.

epoch-memory

Prospective model saved before edits. This epoch deepens one existing node rather than renaming it. Production implementation unchanged; tests add helper-boundary observations where stated. No live lessons, frozen suites, model loading, teacher or network. Read-only symbolic relations are broader than the finite native domain.

This page in Markdown → https://md.groupants.elamur.ai/free/en/mova/world/src/school.rs.groupant/actors-world.groupant/event-play.groupant/