---
title: "math-qread-gate-occurrence-partitions — 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/occurrence-partitions.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/occurrence-partitions.groupant/>

# math-qread-gate-occurrence-partitions

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:** Flatten source occurrences for expression leaf keys. Reject fewer than two occurrences or nonzero constant before duplicate tests. With all_used false, reject any repeated occurrence globally. With true, check repetitions separately inside compound and simple leaf partitions. Then require q_leaf0..nums and, when all_used, all0..nums. (bytes 70927–72125)
- **part of:** [math-qread-gate](https://md.groupants.elamur.ai/free/en/mova/math/src/qread.rs.groupant/gate.groupant/)
- **repository folder:** [`math/src/qread.rs.groupant/gate.groupant/occurrence-partitions.groupant`](https://github.com/ElamurAI/mova-free/tree/main/math/src/qread.rs.groupant/gate.groupant/occurrence-partitions.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 | [Forward](#forward) |
| **ast** | partial | `../../syntax.json` |
| **cost** | partial | [Cost](#cost) |
| **descriptant** | present | [Epoch](#epoch) |
| **invariant** | partial | [Invariant](#invariant) |
| **tests** | bounded actual helper 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) |
| `cross_partition_reuse` | cross_partition_reuse | partial source derived model | [cross_partition_reuse](#cross-partition-reuse) |
| `question_before_body` | question_before_body | partial source derived model | [question_before_body](#question-before-body) |
| `occurrence_not_value` | occurrence_not_value | partial source derived model | [occurrence_not_value](#occurrence-not-value) |
| `coefficient_projection` | coefficient_projection | partial source derived model | [coefficient_projection](#coefficient-projection) |

## Model text


### Scope

Source-derived bounded relation for the manifest byte interval. All relations observe one invocation and its stated state effects. Valid caller structures and finite values where specified are premises. No universal proof, percentage-error surrogate or production replacement is claimed.

### Forward

Flatten source occurrences for expression leaf keys. Reject fewer than two occurrences or abs(e.c)>1e-9 before duplicate tests. Finite nonzero constants with magnitude at most 1e-9 pass this local predicate; it is not an exact-zero requirement. With all_used false, reject any repeated occurrence globally. With true, check repetitions separately inside compound and simple leaf partitions. Then require q_leaf0..nums and, when all_used, all0..nums.

### Invariant

An accepted state under valid indices has enough occurrences and covers each required index. all_used allows one cross-partition reuse but rejects within-partition reuse. Earlier numerical gate predicates must already have passed.

### Cost

Flatten O(S), sort O(S log S); partitioning repeats bounded scans/sorts. Required-index contains scans add O(nums*S), with O(S) temporary storage. No change to the existing algorithm is made.

### behavior_complement

Acceptance excludes duplicate occurrences within the same partition under all_used. Global duplicates across the two partitions are not excluded then. Missing required question index excludes acceptance before the all-body omission reason.

### reverse_reconstruction

Accepted8 admits provenance of4*3-4 with all_used=true and direct5+3. The same duplicate reason admits many different values because provenance, not values, controls it; earlier gate reasons constrain compatibility.

### cross_partition_reuse

compound(a,b)-a repeats a across partitions: false mode rejects, true mode accepts when all required occurrences are present. Fixture toggles only all_used.

### question_before_body

A missing j in q_leaf0..nums returns question-unused even when all_used also lacks it. Moving q_leaf0 to nums changes the same omission to two-step-unused.

### occurrence_not_value

Two distinct leaves with equal numeric values have distinct occurrence indices and do not duplicate by equality of values. Compound leaves concatenate occurrence lists, preserving multiplicity.

### coefficient_projection

This stage flattens keys independent of coefficient sign; earlier gate checked near-unit magnitude. Negative uses still consume occurrences. Zero terms already removed by affine add are absent.

### Tests

Actual helper fixture: `qread::wave34::provenance_partitions_and_required_occurrences`. See file-root wave34-evidence.md for named profile/control receipts. Complement relations above are exclusions, not merely test lists; inverse relations retain compatible antecedents. Unexecuted paths remain source-derived.

### Epoch

2026-10-31 wave34: new descendant refining the existing parent; prior parent descriptions and evidence retained as historical snapshots. Production code is unchanged; inline synthetic tests add bounded observations.
