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

# mlab-ops-broadcast

The groupant beside mlab/src/ops.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/ops.rs`](https://github.com/ElamurAI/mova-free/blob/main/mlab/src/ops.rs)
- **source SHA-256:** `d0d25c3a91fa1ef8…`
- **covers:** For each axis result equals equal extents, otherwise other extent when one is 1; otherwise Err. map2 chooses equal-shape zipped vectors, then scalar vector map, then j-major broadcast using bidx. cmap2 uses component tuples and narrows final complex result. (bytes 768–3145)
- **part of:** [mlab-ops](https://md.groupants.elamur.ai/free/en/mova/mlab/src/ops.rs.groupant/)
- **repository folder:** [`mlab/src/ops.rs.groupant/broadcast.groupant`](https://github.com/ElamurAI/mova-free/tree/main/mlab/src/ops.rs.groupant/broadcast.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) |
| `representation_transport` | representation_transport | partial source derived model | [representation_transport](#representation-transport) |
| `failure_precedence` | failure_precedence | partial source derived model | [failure_precedence](#failure-precedence) |
| `resource_domain` | resource_domain | partial source derived model | [resource_domain](#resource-domain) |
| `interaction_relation` | interaction_relation | partial source derived model | [interaction_relation](#interaction-relation) |

## Model text


### descriptant

#### Broadcast shape and element maps

For each axis result equals equal extents, otherwise other extent when one is 1; otherwise Err. map2 chooses equal-shape zipped vectors, then scalar vector map, then j-major broadcast using bidx. cmap2 uses component tuples and narrows final complex result.

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

Prospective source reading precedes test additions. Retained observations: elementwise supplies closures/classes; value::Mat::complex may drop zero im after cmap2, affecting representation preimage.

This is partial source-derived modeling, not proof, full semantic coverage, or a performance result. Public malformed representations, unbounded allocations and exhaustive numerical edge cases remain outside the checked fixtures.

### approximant

#### Broadcast shape and element maps forward relation

For each axis result equals equal extents, otherwise other extent when one is 1; otherwise Err. map2 chooses equal-shape zipped vectors, then scalar vector map, then j-major broadcast using bidx. cmap2 uses component tuples and narrows final complex result.

Domain: Well-formed bounded numeric buffers; closure may produce nonfinite output. No allocation failure certificate.

No executable Rust surrogate is supplied: categorical decisions require exact observations; numerical kernels have no measured approximation metric here. Future supported caps are 1%, 2%, 5%, 10% only.

### invariant

#### Invariant and cost

Output axes follow bshape; no input mutation. Scalar paths preserve nonscalar shape including empty dimensions.

Cost: O(output cells), real map equal-shape avoids shape loops but no speed measurement.

Failure ordering: Equal shapes before right scalar before left scalar before bshape; bshape validates rows before columns.

### models

### behavior_complement

2×3 with 4×3 excludes success; 2×1 with 1×3 excludes output shape 1×1 or row-major storage. Well-formed requirement excludes relying on zip truncation as shape validation.

### reverse_reconstruction

For addition output Y, any compatible A/B satisfying Yij=Aexpandij+Bexpandij is antecedent; singleton axes add shape ambiguity. Shape alone cannot recover scalar fast path inputs.

### representation_transport

Output axes follow bshape; no input mutation. Scalar paths preserve nonscalar shape including empty dimensions.

### failure_precedence

Equal shapes before right scalar before left scalar before bshape; bshape validates rows before columns.

### resource_domain

Well-formed bounded numeric buffers; closure may produce nonfinite output. No allocation failure certificate.

### interaction_relation

elementwise supplies closures/classes; value::Mat::complex may drop zero im after cmap2, affecting representation preimage.


### tests

#### Bounded evidence

Selected actual-code Rust test: `ops::wave30::arithmetic` with `cargo test --offline --locked -p mlab --lib`. CPU synthetic fixtures only. Two debug and two release runs, sorted named outcomes, numeric statuses, compiled assertion controls and exact source restoration are retained externally under the wave30 expressions receipt directory. The source-to-test map distinguishes runtime semantics from AST representation checks. This fragment shares the parent test: only the exercised branches are observed; its whole prose is not runtime coverage. No corpus, GPU, live filesystem inspection, callbacks, RNG shuffle or wall-clock execution.

Syntax is generated twice from exact source and compared. Lexical projection has no expansion/type/name resolution. No strict Clippy claim; existing dependency/style findings are not re-run merely for repetition.
