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

# latex-main

The groupant beside latex/src/main.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
- **status:** partial source bound model
- **source:** [`latex/src/main.rs`](https://github.com/ElamurAI/mova-free/blob/main/latex/src/main.rs)
- **source SHA-256:** `c6e1b8a765da5f40…`
- **repository folder:** [`latex/src/main.rs.groupant`](https://github.com/ElamurAI/mova-free/tree/main/latex/src/main.rs.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` |
| **composition** | partial | [composition](#composition) |
| **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) |
| `argument_order` | argument_order | partial source derived model | [argument_order](#argument-order) |
| `exit_policy` | exit_policy | partial source derived model | [exit_policy](#exit-policy) |
| `macro_scope` | macro_scope | partial source derived model | [macro_scope](#macro-scope) |
| `feature` | feature | partial source derived model | [feature](#feature) |

## Parts

- [latex-main-parse](https://md.groupants.elamur.ai/free/en/mova/latex/src/main.rs.groupant/parse.groupant/)
- [latex-main-corpus_cli](https://md.groupants.elamur.ai/free/en/mova/latex/src/main.rs.groupant/corpus_cli.groupant/)

## Model text


### descriptant

#### latex-main

main dispatches first argument parse/tex/corpus else usage2. cmd_parse retains last positional source/macros option, reads macros before parsing; read/syntax errors fail but unknown/red gate/unsupported math succeed. tex loads all documents before globally scanning macros, reports formula errors yet succeeds. corpus options overwrite, invalid limit=None, bad fault=usage, disabled math=2, other tokens paths.

Epoch 2026-10-31: complete sources read before tests/model edits. Partial source-bound modeling; no production optimization or speed claim. Nested fragments share the parent lexical syntax. Caller/callee contracts outside owned files remain delegated.

### approximant

#### Forward relation

main dispatches first argument parse/tex/corpus else usage2. cmd_parse retains last positional source/macros option, reads macros before parsing; read/syntax errors fail but unknown/red gate/unsupported math succeed. tex loads all documents before globally scanning macros, reports formula errors yet succeeds. corpus options overwrite, invalid limit=None, bad fault=usage, disabled math=2, other tokens paths.

#### Domain and executable surrogate gap

Bounded UTF-8 inputs and synthetic local files; supported parser-produced trees and representable arithmetic. Arbitrary public constructors are not certified total. Exact categorical semantics lack a useful percentage surrogate; no executable approximant attachment. Future numerical profiles require an explicit metric, zero case, source/evidence binding and supported 1/2/5/10% cap. Failure/effect differences cannot count as numerical error.

### invariant

#### Invariant

Tex macro scope spans all loaded files in input order; separate parsed/clean/gate counts. Console/output are effects. No teacher route.

#### Cost

Linear argument scan plus all tex bytes retained and delegated macro/parse/gate work; corpus traversal delegated, no input cap.

Allocation failure, stack exhaustion and unchecked counter overflow have no additional certificate. No timing claim or global error bound.

### composition

#### Composition

main dispatches first argument parse/tex/corpus else usage2. cmd_parse retains last positional source/macros option, reads macros before parsing; read/syntax errors fail but unknown/red gate/unsupported math succeed. tex loads all documents before globally scanning macros, reports formula errors yet succeeds. corpus options overwrite, invalid limit=None, bad fault=usage, disabled math=2, other tokens paths.

Tex macro scope spans all loaded files in input order; separate parsed/clean/gate counts. Console/output are effects. No teacher route.

Parser, printer, AST equality, Macros, Rat and evaluator dependencies retain their own contracts. Structural roundtrip is not arithmetic definedness or numeric truth. Exact lexical binding does not prove caller/callee semantics.

### models

### behavior_complement

Tex read failure precedes scanning all macros/formulas. Missing parse source precedes macro read. Invalid fault excludes corpus run. Success does not imply gate green.

### reverse_reconstruction

Success includes clean/unknown formulas, unsupported math and tex formula errors; cannot recover quality. Many overwritten argument lists produce same final options. Usage2 has several causes.

### argument_order

Last positional source wins; incomplete macros flag becomes source; invalid numeric limit unlimited.

### exit_policy

Only source read/parse fails parse; tex formula errors do not fail.

### macro_scope

Later preamble can define macro for earlier body because all texts scanned first.

### feature

--math absent feature returns2; bridge helper otherwise no-op.


### tests

#### Selected evidence

cargo test -p latex --features math --bin latex wave28

Two debug/two release executions retained matching sorted named outcomes. External wave28 latexbridge receipts retain numeric exits, compiled assertion controls, restoration, feature checks and source-test map. This scope is not exhaustive branch coverage; parent tests may only exercise some child transitions. Frozen VMM DATA/classification/hash subprocess, live corpus, teacher/API, training/GPU excluded. Reexport/feature compilation is separate from runtime semantics.

#### Recorded outcome, 2026-10-31

Selected source tests: 2. See evidence.json for exact names, source/log hashes and paired debug/release receipts. Control prefix: control-cli; when present compile=0, assertion-failure=101, restored-positive=0. Seven distinct controls total across this subsystem; bridge implementation shares its integration-test control. No independent runtime control for reexports. Strict Clippy returned 101 on 14 pre-existing library lints in unchanged code.
