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

# mlab-builtins-mod-dimensions

The groupant beside mlab/src/builtins/mod.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:** [`mlab/src/builtins/mod.rs`](https://github.com/ElamurAI/mova-free/blob/main/mlab/src/builtins/mod.rs)
- **source SHA-256:** `5e593db042fb0f9c…`
- **covers:** Filter char values, dispatch by numeric argument count, map dimensions with NaN rejection then clamp/floor/saturating cast; constrain higher dimensions to one. (bytes 3299–5008)
- **part of:** [mlab-builtins-mod](https://md.groupants.elamur.ai/free/en/mova/mlab/src/builtins/mod.rs.groupant/)
- **repository folder:** [`mlab/src/builtins/mod.rs.groupant/dimensions.groupant`](https://github.com/ElamurAI/mova-free/tree/main/mlab/src/builtins/mod.rs.groupant/dimensions.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` |
| **cost** | symbolic source derived | [invariant](#invariant) |
| **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) |
| `state_invariant` | state_invariant | partial source derived model | [state_invariant](#state-invariant) |
| `failure_precedence` | failure_precedence | partial source derived model | [failure_precedence](#failure-precedence) |
| `representation_transport` | representation_transport | partial source derived model | [representation_transport](#representation-transport) |
| `resource_cost` | resource_cost | partial source derived model | [resource_cost](#resource-cost) |

## Model text


### descriptant

#### mlab-builtins-mod-dimensions

Filter char values, dispatch by numeric argument count, map dimensions with NaN rejection then clamp/floor/saturating cast; constrain higher dimensions to one.

##### Modeling epoch — 2026-10-31

Prospective source read preceded edits. Bounded synthetic checks and selected existing safe tests exercise actual code; paired debug/release results and compiled negative-control assertions are retained externally. Frozen scenario, corpus, external measurement, full-school and training effects are unexecuted. Partial lexical syntax supplies no macro-expanded or semantic proof.

### approximant

#### Forward relation

Filter char values, dispatch by numeric argument count, map dimensions with NaN rejection then clamp/floor/saturating cast; constrain higher dimensions to one.

##### Domain

Valid Rust value/storage invariants and available bounded resources; exact branch and effect observations only.

##### Executable approximant gap

No useful percentage-error surrogate is established for these categorical, textual or effectful observations. Supported future caps are 1%, 2%, 5%, 10%; no executable approximation or production substitution is claimed.

### invariant

#### Invariants and costs

The helper returns a pair only and does not allocate the requested matrix.

##### Failure ordering

Nonscalar multiargument input is Invalid call; one vector with >2 elements rejects any raw trailing value not exactly 1.

##### Cost

O(number of supplied values and inspected dimensions); input Mat invariants assumed.

### models

## Typed models — mlab-builtins-mod-dimensions

Source-derived partial relations; finite checks do not prove universality.

### behavior_complement

Negative dimensions exclude negative output sizes. More than two nonunit trailing dimensions exclude successful 2D shape.

### reverse_reconstruction

(2,2) admits scalar 2.9, vector [2,2], two scalar args 2 and 2 plus skipped class strings; shape does not identify original arity.

### state_invariant

The helper returns a pair only and does not allocate the requested matrix.

### failure_precedence

Nonscalar multiargument input is Invalid call; one vector with >2 elements rejects any raw trailing value not exactly 1.

### representation_transport

Empty numeric vector maps 0x0 whereas absent numeric arguments maps 1x1.

### resource_cost

O(number of supplied values and inspected dimensions); input Mat invariants assumed.

### tests

#### Evidence and limitations

Parent source checks: builtins::wave30_tests::registry_and_dimensions. The fragment's actual statements lie in the recorded byte range; parent checks need not exercise every branch in this fragment. See ../tests.md for source-level control and limitations.

AST projection generated twice to fresh files and compared byte-for-byte. Runtime evidence is finite and does not establish every branch, allocation failure, backend implementation or effect path. No optimization or speed claim.
