latex-table
The groupant beside latex/src/table.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
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 |
| ast | partial | syntax.json |
| composition | partial | composition |
| descriptant | present | descriptant |
| invariant | partial | invariant |
| tests | executed bounded checks | 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 |
reverse_reconstruction | reverse_reconstruction | partial source derived model | reverse_reconstruction |
class_projection | class_projection | partial source derived model | class_projection |
negation_preimage | negation_preimage | partial source derived model | negation_preimage |
font_subset | font_subset | partial source derived model | font_subset |
generated_binding | generated_binding | partial source derived model | generated_binding |
Parts
Model text
descriptant
latex-table
Class::latex merges Ord/Fence and operator-family classes; include consumes build output. negated matches a fixed partial symbol map; Le and Leqslant both become Nleq. font_letter recognizes only seven double-struck capitals and returns Latin base.
Epoch2026-10-31: full source reviewed before edits; prospective models retained externally. No optimization.
approximant
Forward relation
Class::latex merges Ord/Fence and operator-family classes; include consumes build output. negated matches a fixed partial symbol map; Le and Leqslant both become Nleq. font_letter recognizes only seven double-struck capitals and returns Latin base.
No useful approximate executable metric for exact categorical syntax; future caps1/2/5/10% only.
invariant
Domain, invariant and cost
Class::latex merges Ord/Fence and operator-family classes; include consumes build output. negated matches a fixed partial symbol map; Le and Leqslant both become Nleq. font_letter recognizes only seven double-struck capitals and returns Latin base.
Enum validity comes from compiler; unknown command/env/character returns None. No numerical approximate metric appropriate.
Fixed dispatch costs per lookup; generated arrays constant index; code size proportional to compiled command table. No runtime table file reads.
composition
Composition
Class::latex merges Ord/Fence and operator-family classes; include consumes build output. negated matches a fixed partial symbol map; Le and Leqslant both become Nleq. font_letter recognizes only seven double-struck capitals and returns Latin base.
Build generates table enums consumed by parser dispatch and printers. Lexer tokens feed macros and parser; parser returns AST whose equality ignores spans. Printers and gate compare that quotient, not original bytes. Shared parent syntax backs scoped stages; stages are byte-bound projections, not independent Rust modules.
models
behavior_complement
Unsupported negations and nonlisted font letters return None rather than invented symbol mappings; negation is not involutive.
reverse_reconstruction
Preimage of Nleq contains Le and Leqslant; preimage of mathop contains Op, OpNoLim, Fn, FnLim. Generated alias lookups admit multiple spellings for one enum.
class_projection
Class::latex deliberately merges operator families and Fence with Ord.
negation_preimage
Distinct source symbols can map to same negation; absent mapping is None.
font_subset
Only C,H,N,P,Q,R,Z double-struck capitals map to Font::Bb.
generated_binding
include OUT_DIR/table.rs binds variants, canonical arrays and lookup matches from one build.
tests
Evidence โ 2026-10-31
table::tests::table_lookups; table::tests::every_negation_is_a_relation_or_ord
Selected library filters ast:: lex:: macros:: parse:: print:: table:: and integration gate excluding document_extraction_with_preamble_macros and random_token_soup_never_panics_and_roundtrips. Direct rustc --test latex/build.rs exercises private helpers. All selected tests twice debug/release with identical sorted names. Four compiled mutants at build/AST/parser/printer boundaries fail assertions then exact restoration passes. These do not individually cover every source. Build-main failure effects, allocation failures and universal roundtrip are unproved. Strict Clippy reports existing lints. No corpus/live VMM/API/GPU/full-school/held-out tests.
This page in Markdown โ https://md.groupants.elamur.ai/free/en/mova/latex/src/table.rs.groupant/