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

# math-qread-gate

The groupant beside math/src/qread.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:** [`math/src/qread.rs`](https://github.com/ElamurAI/mova-free/blob/main/math/src/qread.rs)
- **source SHA-256:** `8389b8d58f681217…`
- **covers:** abstain returns the first reason in this order: absent value, absent expression, unread values, v<=1e-9, noninteger distance>1e-6, coefficient magnitude not near1, insufficient source occurrences/nonzero constant, duplicate source occurrences, unused question numbers, unused all_used numbers. (bytes 70008–72126)
- **part of:** [math-qread](https://md.groupants.elamur.ai/free/en/mova/math/src/qread.rs.groupant/)
- **repository folder:** [`math/src/qread.rs.groupant/gate.groupant`](https://github.com/ElamurAI/mova-free/tree/main/math/src/qread.rs.groupant/gate.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 | `model.md` |
| **cost** | partial | [Cost](#cost) |
| **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) |
| `partitioned_reuse` | partitioned_reuse | partial source derived model | [partitioned_reuse](#partitioned-reuse) |
| `required_occurrences` | required_occurrences | partial source derived model | [required_occurrences](#required-occurrences) |

## Parts

- [math-qread-gate-occurrence-partitions](https://md.groupants.elamur.ai/free/en/mova/math/src/qread.rs.groupant/gate.groupant/occurrence-partitions.groupant/)

## Model text


### descriptant

#### math-qread-gate

abstain returns the first reason in this order: absent value, absent expression, unread values, v<=1e-9, noninteger distance>1e-6, coefficient magnitude not near1, insufficient source occurrences/nonzero constant, duplicate source occurrences, unused question numbers, unused all_used numbers.

Epoch 2026-10-31: replaced duplicate catalog sentences with concrete exclusions, compatible-antecedent examples and two distinct scoped behavioral views. Source and prior execution evidence are unchanged; this revision ran no tests.

### approximant

#### Scoped forward relation

abstain returns the first reason in this order: absent value, absent expression, unread values, v<=1e-9, noninteger distance>1e-6, coefficient magnitude not near1, insufficient source occurrences/nonzero constant, duplicate source occurrences, unused question numbers, unused all_used numbers.

This source-derived relation is partial; no executable percentage surrogate or replacement is supplied.

### invariant

#### Scoped domain and invariants

Gate checks provenance and selected numerical predicates, not truth of the parsed story. Accepted finite output has>=2 flattened occurrences and near-unit coefficient magnitudes.

##### Cost

Flattening and sorting provenance dominates duplicate checks; required-number membership uses repeated Vec::contains, so it can be quadratic in occurrences.

### models

### behavior_complement

For valid indices and finite observations, accepting with unread nonempty, v<=1e-9 or a coefficient failing magnitude tolerance is excluded. Later predicates cannot replace an earlier returned reason. This does not exclude all NaN acceptance.

### reverse_reconstruction

The same 'unread numbers' output admits a positive integer answer or zero because unread is checked earlier. Accepted12 can arise from compound4*3 or direct sum5+7 with two distinct occurrences; acceptance does not recover the expression or source values.

### partitioned_reuse

When all_used=false, any duplicate flattened occurrence rejects. When true, duplicates are checked separately among compound leaves and simple leaves; a count used once in each partition may pass.

### required_occurrences

Every index in q_leaf0..nums must occur in the answer provenance. Only when all_used=true must all0..nums occur; irrelevant body-number omission otherwise is not rejected by this predicate.

### tests

#### Scoped evidence

Gate precedence, positivity/integrality/coefficient reuse and compound provenance; not all-used duplicate partitions.

Named actual source fixtures: qread::wave28::{affine_provenance_and_gate_order; empty_query_and_compound_provenance}.

Parent tests.md records commands and paired profiles. No additional coverage inferred from parent fixtures outside this byte range; source-scoped numeric/parse properties remain partial.

##### Wave34 direct-helper refinement

Earlier source-only gaps and wave28 receipts above are historical. Current descendants add actual helper fixtures; see ../wave34-evidence.md and each descendant's Tests section. Full English parsing and general solver correctness remain gaps.

### wave34-composition

## Gate descendant composition

The occurrence-partitions child is reached only after answer/expression presence, unread-number, positivity, integrality and coefficient predicates pass. It first checks flattened cardinality/constant, then chooses global or partitioned duplicate detection based on all_used. Required question occurrences precede the full-body requirement. It returns its first failure or acceptance to abstain; it does not evaluate the expression or verify the supplied value against leaves.

Compatible accepted antecedents therefore require the earlier numerical predicates and valid provenance indices as well as child membership. A compound count reused once outside the compound can pass in all_used mode; this does not permit reuse twice inside one partition. Earlier failures dominate any provenance result. Nonfinite public inputs remain outside the finite numerical interpretation.

### Cost

Earlier predicates scan coefficient values; this child flattens and sorts occurrence lists and performs repeated required-index membership. O(S log S + nums*S) upper accounting with O(S) temporary storage, plus coefficient scan. No optimization or measured throughput is asserted.
