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

# mathlib-raw-record

The groupant beside tools/mathlib/src/raw.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/mathlib/src/raw.rs`](https://github.com/ElamurAI/mova-free/blob/main/tools/mathlib/src/raw.rs)
- **source SHA-256:** `7d08c4e6f06ecd7e…`
- **covers:** Start record resets accumulator, header status sets deleted, version appends a tuple; recognized leaf text updates fields or latest version. End record moves accumulator to output; EOF returns. (bytes 6355–10653)
- **part of:** [mathlib-raw](https://md.groupants.elamur.ai/free/en/mova/tools/mathlib/src/raw.rs.groupant/)
- **repository folder:** [`tools/mathlib/src/raw.rs.groupant/record.groupant`](https://github.com/ElamurAI/mova-free/tree/main/tools/mathlib/src/raw.rs.groupant/record.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 | [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) |
| `version_attachment` | version_attachment | partial source derived model | [version_attachment](#version-attachment) |
| `record_boundary` | record_boundary | partial source derived model | [record_boundary](#record-boundary) |
| `text_transport` | text_transport | partial source derived model | [text_transport](#text-transport) |
| `partial_result_on_error` | partial_result_on_error | partial source derived model | [partial_result_on_error](#partial-result-on-error) |

## Model text


### descriptant

#### mathlib-raw-record

Start record resets accumulator, header status sets deleted, version appends a tuple; recognized leaf text updates fields or latest version. End record moves accumulator to output; EOF returns.

##### Epoch 2026-10-31

Prospective model retained before changes. Existing production bytes are preserved; additions are bounded inline tests. Nine source groupants expose ingestion and routing boundaries; typed children bind exact source bytes and reuse their parent syntax projection. Native tests run twice per profile; behavior mutants run as compiled source changes and exact bytes are restored before positive checks.

Important retained observation: network-looking helpers are not all pure (DNS inside github_host and books build); selection deliberately excludes those effects. Mixed-format manifest order is not deterministic, and error paths do not imply rollback.

No network/DNS/download, real catalog/corpus/model/teacher or database execution. Effect paths are source-derived; finite helper tests are not universal verification. No executable percentage surrogate or speed claim; future caps require metric/domain/reference and remain 1/2/5/10%.

### approximant

#### Forward relation

Start record resets accumulator, header status sets deleted, version appends a tuple; recognized leaf text updates fields or latest version. End record moves accumulator to output; EOF returns.

Model observations include returns, retained state and ordered partial effects; on external failures the successful-prefix relation replaces a total-function claim.

### catalog

### behavior_complement

Subject: mathlib-raw-record, source SHA-256 7d08c4e6f06ecd7eabc2c57092405b6d010841ad384398c17f96e1438c098790; finite transition observation.

A header-only identifier cannot create nonempty rec.id; deleted records still appear in parse_page output (run filters them later). Unknown leaf text does not become title.

Domain: stated source predicates, bounded inputs and available resources; arithmetic assumptions and external effect gaps as in the invariant. Operator is the stated relation/projection; complement is a source-derived inner exclusion, reverse retains compatible antecedents. Other views are source-derived partial constraints, not inverse laws.

Evidence: tests.md identifies executed helpers and unexecuted paths. No universal guarantee follows from the finite fixtures.

### reverse_reconstruction

Subject: mathlib-raw-record, source SHA-256 7d08c4e6f06ecd7eabc2c57092405b6d010841ad384398c17f96e1438c098790; finite transition observation.

Each Rec corresponds to many XML encodings and ignored elements. Repeated title fields retain last recognized text; earlier values and namespace prefixes are not recoverable.

Domain: stated source predicates, bounded inputs and available resources; arithmetic assumptions and external effect gaps as in the invariant. Operator is the stated relation/projection; complement is a source-derived inner exclusion, reverse retains compatible antecedents. Other views are source-derived partial constraints, not inverse laws.

Evidence: tests.md identifies executed helpers and unexecuted paths. No universal guarantee follows from the finite fixtures.

### version_attachment

Subject: mathlib-raw-record, source SHA-256 7d08c4e6f06ecd7eabc2c57092405b6d010841ad384398c17f96e1438c098790; finite transition observation.

date/size/source_type update only the last appended version; before any version they have no effect. Encounter order fixes first/last version observations downstream.

Domain: stated source predicates, bounded inputs and available resources; arithmetic assumptions and external effect gaps as in the invariant. Operator is the stated relation/projection; complement is a source-derived inner exclusion, reverse retains compatible antecedents. Other views are source-derived partial constraints, not inverse laws.

Evidence: tests.md identifies executed helpers and unexecuted paths. No universal guarantee follows from the finite fixtures.

### record_boundary

Subject: mathlib-raw-record, source SHA-256 7d08c4e6f06ecd7eabc2c57092405b6d010841ad384398c17f96e1438c098790; finite transition observation.

End record pushes current accumulator even with empty id; Start record resets it. Well-formed conventional OAI nesting is the intended domain; malformed nesting lacks a full schema guarantee.

Domain: stated source predicates, bounded inputs and available resources; arithmetic assumptions and external effect gaps as in the invariant. Operator is the stated relation/projection; complement is a source-derived inner exclusion, reverse retains compatible antecedents. Other views are source-derived partial constraints, not inverse laws.

Evidence: tests.md identifies executed helpers and unexecuted paths. No universal guarantee follows from the finite fixtures.

### text_transport

Subject: mathlib-raw-record, source SHA-256 7d08c4e6f06ecd7eabc2c57092405b6d010841ad384398c17f96e1438c098790; finite transition observation.

read_text then unescape with raw fallback, clean collapse for title/authors/comments and trim-only for id/license/datestamp. Whitespace equivalence classes differ by field; parses_record checks entities and version values.

Domain: stated source predicates, bounded inputs and available resources; arithmetic assumptions and external effect gaps as in the invariant. Operator is the stated relation/projection; complement is a source-derived inner exclusion, reverse retains compatible antecedents. Other views are source-derived partial constraints, not inverse laws.

Evidence: tests.md identifies executed helpers and unexecuted paths. No universal guarantee follows from the finite fixtures.

### partial_result_on_error

parse_page appends each completed record directly to the caller vector. If a later XML/read_text/attribute error occurs, prior entries remain; the Result error does not roll back caller state. Tests cover successful records only, so the failure-prefix relation is source-derived.

Subject and source identity: manifest.json. Domain: scoped forward/invariant; relation is source-derived and partial. Evidence: tests.md distinguishes actual checks from unexecuted effect paths; finite fixtures do not prove all inputs.

### tests

#### Bounded evidence

Selected actual source checks:

- mathlib::raw::tests::licenses_sizes_dates
- mathlib::raw::tests::parses_record

These checks are file-level evidence; fragment branches not reached by these names remain source-derived.

External wave33 mathlib receipt retains native-commands.json, numeric statuses, raw debug/release logs, sorted exact outcomes, mutation logs and original/restored hashes. Seventeen named checks pass twice per profile; six production behavior mutants reject in both profiles, with restored positives. Source syntax is regenerated twice after formatting and compared byte-for-byte. Structural validation tests bindings, not Rust semantics.

No network/DNS/download, real catalog/corpus/model/teacher or database execution. Effect paths are source-derived; finite helper tests are not universal verification. No executable percentage surrogate or speed claim; future caps require metric/domain/reference and remain 1/2/5/10%.

### invariant-and-cost

#### Invariant and cost

##### Invariant

Recognized text fields are normalized independently; header identifier is read but never sets rec.id. check_end_names=false weakens XML validation. Error can leave already appended records in caller vector.

##### Cost

O(XML bytes plus emitted record payload); whole XML is in memory, vectors grow with record/version count.

##### Domain and gaps

No network/DNS/download, real catalog/corpus/model/teacher or database execution. Effect paths are source-derived; finite helper tests are not universal verification. No executable percentage surrogate or speed claim; future caps require metric/domain/reference and remain 1/2/5/10%.
