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

# math-steps-transition

The groupant beside math/src/steps.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:** [`math/src/steps.rs`](https://github.com/ElamurAI/mova-free/blob/main/math/src/steps.rs)
- **source SHA-256:** `e5cb6a8faf439e29…`
- **covers:** SHIFT increases next and stack length by1, then fix_leaf_vals restores qs[leaf].val; SKIP increases next only. REDUCE/FAR consumes two stack items and appends one operation tree, representative=max(source indices). legal precedes apply only in generated search. (bytes 10473–32881)
- **part of:** [math-steps](https://md.groupants.elamur.ai/free/en/mova/math/src/steps.rs.groupant/)
- **repository folder:** [`math/src/steps.rs.groupant/transition.groupant`](https://github.com/ElamurAI/mova-free/tree/main/math/src/steps.rs.groupant/transition.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` |
| **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) |
| `stack_accounting` | stack_accounting | partial source derived model | [stack_accounting](#stack-accounting) |
| `oracle_reachability` | oracle_reachability | partial source derived model | [oracle_reachability](#oracle-reachability) |

## Model text


### descriptant

#### math-steps-transition

SHIFT increases next and stack length by1, then fix_leaf_vals restores qs[leaf].val; SKIP increases next only. REDUCE/FAR consumes two stack items and appends one operation tree, representative=max(source indices). legal precedes apply only in generated search.

Epoch 2026-10-31: replaced duplicate catalog sentences with concrete exclusions, compatible-antecedent examples and two distinct scoped behavioral views. Source and prior execution evidence are unchanged; this revision ran no tests.

### approximant

#### Scoped forward relation

SHIFT increases next and stack length by1, then fix_leaf_vals restores qs[leaf].val; SKIP increases next only. REDUCE/FAR consumes two stack items and appends one operation tree, representative=max(source indices). legal precedes apply only in generated search.

This source-derived relation is partial; no executable percentage surrogate or replacement is supplied.

### invariant

#### Scoped domain and invariants

Aligned arrays and valid direct replay actions are preconditions. n<=64 is needed for oracle shift-mask operations. Empty prediction has no final single-item stack.

##### Cost

At most3N+2 rounds expand up to20 actions per beam state, with feature generation, state/tree cloning and candidate sorting; ACTIONS counts expansions, not wall time or exact arithmetic work.

### models

### behavior_complement

Generated SHIFT cannot consume a forbidden/out-of-range input. Generated reduction cannot divide by zero or make negative subtraction. oracle cannot accept overlapping leaf masks. Direct replay is not covered by these exclusions and may panic on invalid actions.

### reverse_reconstruction

Two legal reduction schedules for (a+b)*(c+d) can produce the same tree; skipped unused quantities can differ while the resulting scalar agrees. Tree::Leaf0 and another equal-valued leaf can agree numerically without the same provenance.

### stack_accounting

For a valid prefix, next=#SHIFT+#SKIP and stack_len=#SHIFT-#REDUCE-#FAR. Every reduction preserves the union of operand source leaves; no reuse transition is present.

### oracle_reachability

oracle uses 64-bit masks and reduces only sibling subtrees within stack distance1..3. Disjoint leaf masks are necessary but do not alone guarantee a returned action sequence for arbitrary n/tree order.

### tests

#### Scoped evidence

Oracle/replay and empty prediction only; no nonempty beam or training.

Named actual source fixtures: steps::wave28::{equation_oracle_and_exact_replay; calculator_validation_and_script_bounds}.

Parent tests.md records commands and paired profiles. No additional coverage inferred from parent fixtures outside this byte range; source-scoped numeric/parse properties remain partial.
