---
title: "roundtrip-tree-orders — Mova code model"
description: "Mova code model of tools/roundtrip/src/tree.rs: components with their labels, obernants and the model text."
url: "https://groupants.elamur.ai/free/en/mova/tools/roundtrip/src/tree.rs.groupant/orders.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/tree.rs.groupant/orders.groupant/>

# roundtrip-tree-orders

The groupant beside tools/roundtrip/src/tree.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_fragment
- **status:** partial source bound model
- **source:** [`tools/roundtrip/src/tree.rs`](https://github.com/ElamurAI/mova-free/blob/main/tools/roundtrip/src/tree.rs)
- **source SHA-256:** `3db9538748075754…`
- **covers:** Tree ordering coordinates (bytes 3856–6005)
- **part of:** [roundtrip-tree](https://md.groupants.elamur.ai/free/en/mova/tools/roundtrip/src/tree.rs.groupant/)
- **repository folder:** [`tools/roundtrip/src/tree.rs.groupant/orders.groupant`](https://github.com/ElamurAI/mova-free/tree/main/tools/roundtrip/src/tree.rs.groupant/orders.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` |
| **cost** | partial | [invariant-and-cost](#invariant-and-cost) |
| **descriptant** | present | [descriptant](#descriptant) |
| **invariant** | partial | [invariant-and-cost](#invariant-and-cost) |
| **tests** | 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) |
| `coordinate_domains` | coordinate_domains | partial source derived model | [coordinate_domains](#coordinate-domains) |
| `projectivity_domain` | projectivity_domain | partial source derived model | [projectivity_domain](#projectivity-domain) |
| `scope_precondition` | scope_precondition | partial source derived model | [scope_precondition](#scope-precondition) |
| `resource_boundary` | resource_boundary | partial source derived model | [resource_boundary](#resource-boundary) |

## Model text


### descriptant

#### Tree ordering coordinates

2026-10-31 epoch: source scope bytes [3856,6005); Rooted acyclic kids lists yield local child/head orders; projective permutations are reconstructed by emit, crossing arrangements need Full residual.

No annotator/model loading, live corpus, full suite, teacher, GPU or persistent-learning evidence. No executable percentage surrogate: categorical codecs/effects need a useful metric before future caps 1/2/5/10%.

### approximant

#### Tree ordering coordinates

Rooted acyclic kids lists yield local child/head orders; projective permutations are reconstructed by emit, crossing arrangements need Full residual.

Domain: bounded synthetic values, valid source-specific coordinates, nonoverflowing counts, available allocation; fixed environment controls. Relations are source-derived partial models with finite checks, not universal proofs.

### catalog

### behavior_complement

Subject: roundtrip-tree-orders, source hash 3db953874807575403c8d2857006e1932cc72df16fa615b64c5b9e7eceae8da7, transition observation.

For Tree ordering coordinates, excluded transitions violate the stated scoped rule: Rooted acyclic kids lists yield local child/head orders; projective permutations are reconstructed by emit, crossing arrangements need Full residual. This is an inner source-derived exclusion under the domain, not a complement of arbitrary unseen runtime behavior.

Domain: bounded synthetic values, valid source-specific coordinates, nonoverflowing counts, available allocation; fixed environment controls. Relations are source-derived partial models with finite checks, not universal proofs.

Evidence: external wave32 rt_core receipt includes native-commands.json, exact named outcomes twice debug/twice release, raw status/log files, compiled production controls with byte restoration and paired syntax. Only named synthetic helpers execute; model_path/export and live CLI paths have representation/source evidence.

Status: partial source-derived model.

### reverse_reconstruction

Subject: roundtrip-tree-orders, source hash 3db953874807575403c8d2857006e1932cc72df16fa615b64c5b9e7eceae8da7, transition observation.

Fix outputs and post-state of orders; compatible antecedents are all scoped inputs/pre-state satisfying: Rooted acyclic kids lists yield local child/head orders; projective permutations are reconstructed by emit, crossing arrangements need Full residual. Fields outside this byte scope are held fixed; discarded fields remain ambiguous.

Domain: bounded synthetic values, valid source-specific coordinates, nonoverflowing counts, available allocation; fixed environment controls. Relations are source-derived partial models with finite checks, not universal proofs.

Evidence: external wave32 rt_core receipt includes native-commands.json, exact named outcomes twice debug/twice release, raw status/log files, compiled production controls with byte restoration and paired syntax. Only named synthetic helpers execute; model_path/export and live CLI paths have representation/source evidence.

Status: partial source-derived model.

### coordinate_domains

Subject: roundtrip-tree-orders, source hash 3db953874807575403c8d2857006e1932cc72df16fa615b64c5b9e7eceae8da7, transition observation.

Node heads and order are1-based with0 root; spelling keyed by node number, spacing keyed by zero-based output positions. Hints orders are trusted, not checked as permutations.

Domain: bounded synthetic values, valid source-specific coordinates, nonoverflowing counts, available allocation; fixed environment controls. Relations are source-derived partial models with finite checks, not universal proofs.

Evidence: external wave32 rt_core receipt includes native-commands.json, exact named outcomes twice debug/twice release, raw status/log files, compiled production controls with byte restoration and paired syntax. Only named synthetic helpers execute; model_path/export and live CLI paths have representation/source evidence.

Status: partial source-derived model.

### projectivity_domain

Subject: roundtrip-tree-orders, source hash 3db953874807575403c8d2857006e1932cc72df16fa615b64c5b9e7eceae8da7, transition observation.

Every reachable subtree interval must have hi+1-lo=size and root size=n. Disconnected cycles risk overflow or missing traversal; require rooted acyclic valid trees.

Domain: bounded synthetic values, valid source-specific coordinates, nonoverflowing counts, available allocation; fixed environment controls. Relations are source-derived partial models with finite checks, not universal proofs.

Evidence: external wave32 rt_core receipt includes native-commands.json, exact named outcomes twice debug/twice release, raw status/log files, compiled production controls with byte restoration and paired syntax. Only named synthetic helpers execute; model_path/export and live CLI paths have representation/source evidence.

Status: partial source-derived model.

### scope_precondition

Subject: roundtrip-tree-orders, source hash 3db953874807575403c8d2857006e1932cc72df16fa615b64c5b9e7eceae8da7, transition observation.

Tree ordering coordinates requires the coordinate/state assumptions of this fragment; inspect its exact byte range. Rooted acyclic kids lists yield local child/head orders; projective permutations are reconstructed by emit, crossing arrangements need Full residual. Invalid arbitrary state is outside the reconstruction law.

Domain: bounded synthetic values, valid source-specific coordinates, nonoverflowing counts, available allocation; fixed environment controls. Relations are source-derived partial models with finite checks, not universal proofs.

Evidence: external wave32 rt_core receipt includes native-commands.json, exact named outcomes twice debug/twice release, raw status/log files, compiled production controls with byte restoration and paired syntax. Only named synthetic helpers execute; model_path/export and live CLI paths have representation/source evidence.

Status: partial source-derived model.

### resource_boundary

Subject: roundtrip-tree-orders, source hash 3db953874807575403c8d2857006e1932cc72df16fa615b64c5b9e7eceae8da7, transition observation.

Tree ordering coordinates: allocations/clones and recursion/scans within this scope are retained. Parent cost bound is conservative for this subroutine: kids O(n), locals O(n+sum d_h log d_h), emit O(n) on valid acyclic local-order tree. projective O(n) on rooted valid trees. Dec adds lin/morph costs and string rendering; no learned-model inference cost or accuracy measured here.

Domain: bounded synthetic values, valid source-specific coordinates, nonoverflowing counts, available allocation; fixed environment controls. Relations are source-derived partial models with finite checks, not universal proofs.

Evidence: external wave32 rt_core receipt includes native-commands.json, exact named outcomes twice debug/twice release, raw status/log files, compiled production controls with byte restoration and paired syntax. Only named synthetic helpers execute; model_path/export and live CLI paths have representation/source evidence.

Status: partial source-derived model.

### tests

#### Scoped evidence

Evidence: external wave32 rt_core receipt includes native-commands.json, exact named outcomes twice debug/twice release, raw status/log files, compiled production controls with byte restoration and paired syntax. Only named synthetic helpers execute; model_path/export and live CLI paths have representation/source evidence.

Coverage is limited to this fragment's reached branches; parent tests do not prove every scoped branch.

### invariant-and-cost

#### Scoped invariant and cost

Rooted acyclic kids lists yield local child/head orders; projective permutations are reconstructed by emit, crossing arrangements need Full residual.

kids O(n), locals O(n+sum d_h log d_h), emit O(n) on valid acyclic local-order tree. projective O(n) on rooted valid trees. Dec adds lin/morph costs and string rendering; no learned-model inference cost or accuracy measured here.

The parent bound is conservative; unrelated parent effects are excluded from this fragment.
