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

# treeagree-rules-subtype-pick

The groupant beside tools/treeagree/src/rules.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/treeagree/src/rules.rs`](https://github.com/ElamurAI/mova-free/blob/main/tools/treeagree/src/rules.rs)
- **source SHA-256:** `1f33a4afa995261f…`
- **covers:** subtype-pick (bytes 5312–5420)
- **part of:** [treeagree-rules](https://md.groupants.elamur.ai/free/en/mova/tools/treeagree/src/rules.rs.groupant/)
- **repository folder:** [`tools/treeagree/src/rules.rs.groupant/subtype-pick.groupant`](https://github.com/ElamurAI/mova-free/tree/main/tools/treeagree/src/rules.rs.groupant/subtype-pick.groupant)
- **repository commit:** `855da7bd4a7b`

> **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 | `model.md` |
| **ast** | partial | `../syntax.json` |
| **composition** | partial | [Composition](#composition) |
| **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) |
| `equal_base` | equal_base | partial source derived model | [equal_base](#equal-base) |
| `different_base` | different_base | partial source derived model | [different_base](#different-base) |
| `idempotence` | idempotence | partial source derived model | [idempotence](#idempotence) |
| `head_independence` | head_independence | partial source derived model | [head_independence](#head-independence) |

## Model text


### descriptant

#### Descriptant

pick(haiku,agreed) returns haiku if base relations equal, otherwise agreed.

##### Epoch 2026-10-31

Prospective source reading identified conditional input alignment, information loss and failure order before tests. Existing production code is retained; added tests use actual helpers. Finite results update this source-bound model, not all parser/corpus semantics.

No executable percentage surrogate has a justified observation metric for these categorical/effectful APIs. Future profiles require metric, domain and real-reference evidence at caps 1/2/5/10%; no higher cap. Syntax is partial lexical Rust projection without macro expansion or semantic resolution.

### approximant

## Forward approximant

pick(haiku,agreed) returns haiku if base relations equal, otherwise agreed.

### Composition

This fragment is the exact byte-scoped helper identified in the manifest; its relation is restricted to the operations above.

The containing source wires this scoped relation to its callers. Treeagree proposal→gate→commit and treebanks parse→match→collect→render are actual joins; parsecmp is an independent diagnostic path. The external group model distinguishes these tags.

### catalog

## Typed models for treeagree-rules-subtype-pick

Subject: source SHA-256 `1f33a4afa995261fb36eb9c29a0ab8fd1b624501e49713acaad28ece769f8120`; manifest supplies exact source/byte scope. Domain: admitted states in forward model, nonoverflow arithmetic and successful allocations. Observation: one terminating invocation, except explicitly described file trace. Source-derived partial relations; named finite tests constrain selected cases only. Each entry holds arguments and environment fixed except its stated intervention.

### behavior_complement

Result cannot be a third relation distinct from both inputs.

Operator: inner exclusion on admitted domain. Evidence: source branch derivation plus tests.md; unexercised branches remain hypotheses. Oracle: evaluate the scoped actual helper on admissible fixtures and compare this observation. No universal proof.

### reverse_reconstruction

Given result r, compatible pairs either have haiku=r with equal bases or agreed=r with different bases; generally nonunique.

Operator: compatible antecedent relation, retaining ambiguity. Evidence: source branch derivation plus tests.md; unexercised branches remain hypotheses. Oracle: evaluate the scoped actual helper on admissible fixtures and compare this observation. No universal proof.

### equal_base

Same-base agreed subtype does not replace draft subtype; exact representation preservation is intentional.

Operator: specialized observation relation under the stated fixed inputs. Evidence: source branch derivation plus tests.md; unexercised branches remain hypotheses. Oracle: evaluate the scoped actual helper on admissible fixtures and compare this observation. No universal proof.

### different_base

Across base classes result equals agreed exactly, with no retention of draft subtype.

Operator: specialized observation relation under the stated fixed inputs. Evidence: source branch derivation plus tests.md; unexercised branches remain hypotheses. Oracle: evaluate the scoped actual helper on admissible fixtures and compare this observation. No universal proof.

### idempotence

pick(r,r)=r for every Rel; repeated same agreed value stabilizes after first selection.

Operator: specialized observation relation under the stated fixed inputs. Evidence: source branch derivation plus tests.md; unexercised branches remain hypotheses. Oracle: evaluate the scoped actual helper on admissible fixtures and compare this observation. No universal proof.

### head_independence

No head argument exists; Root/head consistency must be checked by propose or shape, not this function.

Operator: specialized observation relation under the stated fixed inputs. Evidence: source branch derivation plus tests.md; unexercised branches remain hypotheses. Oracle: evaluate the scoped actual helper on admissible fixtures and compare this observation. No universal proof.

### tests

#### Scoped evidence

Parent native slice and exact names are in `../tests.md`.

pick fragment is source-derived; native rule tests exercise proposals but do not exhaust relation subtype pairs.

This fragment has no independent full-coverage claim. Its byte range and source hash bind the source-derived relation; parent test success is evidence only where that helper is actually reached.

### invariant-and-cost

#### Invariant and cost

Constant enum base comparisons and copy; no allocation or I/O.

Result cannot be a third relation distinct from both inputs.

The complement and specialized catalog constrain preserved coordinates and effect boundaries. Empty/malformed domains are only guaranteed where explicitly admitted. No whole-program cost bound follows from a helper bound.
