---
title: "rt-mixed-tally — Mova code model"
description: "Mova code model of tools/roundtrip/src/tally.rs: components with their labels, obernants and the model text."
url: "https://groupants.elamur.ai/free/en/mova/tools/roundtrip/src/tally.rs.groupant/"
---
Elamur: [Mova](https://md.mova.elamur.ai/free/en/) · [Dictionary](https://md.dictionary.elamur.ai/free/en/) · [Research](https://md.research.elamur.ai/free/en/) · **Groupants**

This page as HTML: <https://groupants.elamur.ai/free/en/mova/tools/roundtrip/src/tally.rs.groupant/>

# rt-mixed-tally

The groupant beside tools/roundtrip/src/tally.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

- **kind:** groupant
- **status:** partial source bound model
- **source:** [`tools/roundtrip/src/tally.rs`](https://github.com/ElamurAI/mova-free/blob/main/tools/roundtrip/src/tally.rs)
- **source SHA-256:** `c3382ca2a337994e…`
- **repository folder:** [`tools/roundtrip/src/tally.rs.groupant`](https://github.com/ElamurAI/mova-free/tree/main/tools/roundtrip/src/tally.rs.groupant)
- **repository commit:** `48f2e6f74146`

> **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

| component | label | where |
|---|---|---|
| **approximant** | partial | [approximant](#approximant) |
| **ast** | partial | `syntax.json` |
| **composition** | partial | [composition](#composition) |
| **cost** | symbolic source derived | [invariant](#invariant) |
| **descriptant** | present | [descriptant](#descriptant) |
| **invariant** | partial | [invariant](#invariant) |
| **tests** | executed bounded checks | [tests](#tests) |

## 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.

| id | type | label | where |
|---|---|---|---|
| `behavior_complement` | behavior_complement | partial source derived model | [behavior_complement](#behavior-complement) |
| `reverse_reconstruction` | reverse_reconstruction | partial source derived model | [reverse_reconstruction](#reverse-reconstruction) |
| `lazy_cap` | lazy_cap | partial source derived model | [lazy_cap](#lazy-cap) |
| `merge_order` | merge_order | partial source derived model | [merge_order](#merge-order) |
| `kind_projection` | kind_projection | partial source derived model | [kind_projection](#kind-projection) |
| `separate_starts` | separate_starts | partial source derived model | [separate_starts](#separate-starts) |

## Parts

- [rt-mixed-tally-cell](https://md.groupants.elamur.ai/free/en/mova/tools/roundtrip/src/tally.rs.groupant/cell.groupant/)

## Model text


### descriptant

#### Descriptant

##### Prospective epoch

2026-10-31 source review predicted: Cell.add increments items/bits and keeps first4 examples. Residual.add lazily evaluates example only below cap; add_k adds kind count/bits. Merge adds all scalar/maps in fixed order and concatenates bounded example prefixes. Tally normal/whole remain separate Start maps. Resource model: Merge O(entries log destination keys + kind maps + bounded cloned examples); retained examples <=4 for normal constructed states, source oversized vectors scanned fully. External prospective.md predates test additions and preserves APIs, effect order, hazards and interaction hypotheses.

##### Observed epoch

Bounded real helper checks in tests.md constrain these models; syntax is a partial lexical projection with no macro expansion, name resolution or proof. Production expressions unchanged; six inline test modules added. Compiled mutants are temporary and exactly restored. Existing malformed-input and nonfinite domains remain explicit, not silently repaired. Parent composes this scope with siblings without adding overlapping costs twice.

Finite synthetic helper evidence only; live corpora, parser/model loading, full orchestration and filesystem failure races excluded.

### approximant

#### Forward relation

Cell.add increments items/bits and keeps first4 examples. Residual.add lazily evaluates example only below cap; add_k adds kind count/bits. Merge adds all scalar/maps in fixed order and concatenates bounded example prefixes. Tally normal/whole remain separate Start maps.

Domain: Counts fit u64; finite floating metrics for mathematical additivity; f64 rounding means merge regrouping is not exact associativity. Input public fields can violate semantic inequalities.

### invariant

#### Invariant and cost

##### Invariant

Counts fit u64; finite floating metrics for mathematical additivity; f64 rounding means merge regrouping is not exact associativity. Input public fields can violate semantic inequalities.

##### Cost

Merge O(entries log destination keys + kind maps + bounded cloned examples); retained examples <=4 for normal constructed states, source oversized vectors scanned fully.

##### Limits

Finite synthetic helper evidence only; live corpora, parser/model loading, full orchestration and filesystem failure races excluded. No percentage surrogate is implemented: categorical parsing/effect observations lack an admitted numerical error metric. Any future profile must define its metric/domain and use only1/2/5/10 percent caps.

### composition

#### Local composition

Cell.add increments items/bits and keeps first4 examples. Residual.add lazily evaluates example only below cap; add_k adds kind count/bits. Merge adds all scalar/maps in fixed order and concatenates bounded example prefixes. Tally normal/whole remain separate Start maps.

Children select narrow source functions with their exact byte intervals. Remaining branches stay in the file model; fragments are not exhaustive partitions. Calls and state joins follow the forward relation, not folder order. Shared scans/helpers are counted once in whole-file costs. Complement of composition is not union of complements; reverse composition retains compatible intermediates and caller premises.

### models

## Typed source-bound relations

Subject: exact source SHA-256 in manifest. Domain and resource premises are in invariant.md. Each model is partial, source-derived, over a single helper invocation or the described finite trace. Complements are proposed inner exclusions under those premises; reverse relations retain all compatible antecedents, with no unique inverse claim. The oracle is the named checks in tests.md; unexecuted cases remain hypotheses. No numerical approximation certificate.

### behavior_complement

Excluded: fifth normal add evaluates closure or preserves example; overflow/nonfinite values are validated. No validation exists for public fields.

### reverse_reconstruction

Aggregates admit many ordered event histories; first4 examples constrain prefix only, counts/kinds constrain sums; merge cannot uniquely undo prior totals.

### lazy_cap

Example closure runs only while destination examples.len()<KEEP; items/bits continue increasing.

### merge_order

Example order follows merge order; counters commute mathematically but f64 accumulation order can differ.

### kind_projection

Plain add has no kind; add_k increments shared Cell plus kind map once.

### separate_starts

normal and whole counters retain different observation units even under same Start enum.

### tests

#### Checks and evidence

Named source/helper checks: tally::wave32_tests::capped_examples_additive_metrics.

Wave32 on2026-10-31:10 distinct exact tests passed twice debug and twice release, with equal sorted named outcomes. This node claims only its listed subset; empty subset means source review only. Five actual source-behavior mutants compiled, failed assertions, restored exact bytes/hash, and passed focused green reruns. No assertion-only mutants; existing swapped-input controls are separate. Receipt bundle: $MOVA_DATA/runs/octopus-wave32-rt_mixed-2026-10-31 (native-commands.json, source-test-map.json, mutation-results.json, *.status/*.log). No live corpus, teacher, frozen assessment, download or production data used.

Finite synthetic helper evidence only; live corpora, parser/model loading, full orchestration and filesystem failure races excluded.
