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

# world-opchoice-selection

The groupant beside world/src/opchoice.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:** [`world/src/opchoice.rs`](https://github.com/ElamurAI/mova-free/blob/main/world/src/opchoice.rs)
- **source SHA-256:** `770d2eff5a128ca9…`
- **covers:** Weights, score, choose, margin and SURE before book loading. (bytes 11210–12868)
- **part of:** [world-opchoice](https://md.groupants.elamur.ai/free/en/mova/world/src/opchoice.rs.groupant/)
- **repository folder:** [`world/src/opchoice.rs.groupant/selection.groupant`](https://github.com/ElamurAI/mova-free/tree/main/world/src/opchoice.rs.groupant/selection.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 source model | [forward](#forward) |
| **ast** | partial | `../syntax.json` |
| **composition** | partial source model | [composition](#composition) |
| **cost** | partial source model | [cost](#cost) |
| **descriptant** | partial source model | [epoch-memory](#epoch-memory) |
| **invariant** | partial source model | [invariant](#invariant) |
| **tests** | partial source model | [checks](#checks) |

## 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 |
|---|---|---|---|
| `world-opchoice-selection-behavior-complement` | behavior_complement | partial source model | [behavior-complement](#behavior-complement) |
| `world-opchoice-selection-reverse-reconstruction` | reverse_reconstruction | partial source model | [reverse-reconstruction](#reverse-reconstruction) |
| `world-opchoice-selection-zero-weight-choice` | priority_relation | partial source model | [zero-weight-choice](#zero-weight-choice) |
| `world-opchoice-selection-score-kernel` | reverse_reconstruction | partial source model | [score-kernel](#score-kernel) |

## Model text


Weights, score, choose, margin and SURE before book loading.

### forward

Score sums each feature occurrence with absent weights zero; choose replaces only on strict improvement. margin finds first top-score value and minimum top-minus-score among other values; empty returns 0 and no different value returns 1000.

### invariant

choose None iff candidates empty under valid indices. Nonempty margin is nonnegative if subtraction representable. SURE=8 is historical empirical threshold, not a correctness probability.

### cost

Choose O(C*F*log W), plus generated features; margin retains O(C) score/value pairs and scans linearly.

### composition

Candidate enumeration feeds features and first-max scoring. Learner interns the same feature occurrences, preserves candidate order and updates toward the first highest-scoring gold-valued candidate. Text extraction and lexical environment must be fixed. top uses lexical expression ties unlike choose; parent ranking cannot silently substitute one for the other.

### epoch-memory

2026-10-30: i128 oracle exposed unchecked arithmetic overflow. Checked operations now omit unrepresentable candidates, including MIN/-1 division; score and training overflow remain bounded-domain assumptions. Dense learner history and first-tie tests preserve existing behavior.

### checks

See ../tests.md and native opchoice::wave8_models tests. Models are source-derived partial relations, with finite evidence rather than general proof. Syntax projection excludes macro expansion, name resolution and inferred types. No executable approximant: exact gates and categorical choices have no justified percentage metric here.

### behavior-complement

Fixed candidate-order universe excludes later equal-score winners in choose. Positive margin does not certify gold correctness; that property is outside the relation.

### reverse-reconstruction

Winner j imposes strict earlier and non-strict later linear score inequalities. Observed margin constrains only differently valued candidates; same-value score variation and many weight vectors remain possible.

### zero-weight-choice

All-zero weights select first candidate. A larger division weight selects 6/2=3; equal addition/division weights restore first addition. Empty slice returns None.

### score-kernel

For multiplicity vector m, score s admits all bounded integer w satisfying dot(m,w)=s. Absent feature coordinates are unconstrained; duplicate features change coefficients.
