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

# math-calc-parser-power-association

The groupant beside math/src/calc.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/calc.rs`](https://github.com/ElamurAI/mova-free/blob/main/math/src/calc.rs)
- **source SHA-256:** `81be7f264f451792…`
- **covers:** pow first consumes postfix; if ^ follows it advances once and parses unary as exponent, producing Pow(base,exponent). postfix repeatedly adds Fact or Index nodes after a primary. Unary may recursively reenter pow, so exponentiation associates right while leading minus wraps the power. (bytes 13128–13882)
- **part of:** [math-calc-parser](https://md.groupants.elamur.ai/free/en/mova/math/src/calc.rs.groupant/parser.groupant/)
- **repository folder:** [`math/src/calc.rs.groupant/parser.groupant/power-association.groupant`](https://github.com/ElamurAI/mova-free/tree/main/math/src/calc.rs.groupant/parser.groupant/power-association.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 | [Forward](#forward) |
| **ast** | partial | `../../syntax.json` |
| **cost** | partial | [Cost](#cost) |
| **descriptant** | present | [Epoch](#epoch) |
| **invariant** | partial | [Invariant](#invariant) |
| **tests** | bounded actual helper 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) |
| `unary_power_order` | unary_power_order | partial source derived model | [unary_power_order](#unary-power-order) |
| `postfix_power_order` | postfix_power_order | partial source derived model | [postfix_power_order](#postfix-power-order) |
| `index_failure_boundary` | index_failure_boundary | partial source derived model | [index_failure_boundary](#index-failure-boundary) |
| `tree_value_distinction` | tree_value_distinction | partial source derived model | [tree_value_distinction](#tree-value-distinction) |

## Model text


### Scope

Source-derived bounded relation for the manifest byte interval. All relations observe one invocation and its stated state effects. Valid caller structures and finite values where specified are premises. No universal proof, percentage-error surrogate or production replacement is claimed.

### Forward

pow first consumes postfix; if ^ follows it advances once and parses unary as exponent, producing Pow(base,exponent). postfix repeatedly adds Fact or Index nodes after a primary. Unary may recursively reenter pow, so exponentiation associates right while leading minus wraps the power.

### Invariant

A successful postfix consumes complete index brackets; the exponent may be negative. The caller retains responsibility for trailing-token rejection.

### Cost

O(number of consumed tokens plus index-expression parsing); recursive depth follows exponent/unary nesting and is not capped. Postfix chain storage is linear in suffix count.

### behavior_complement

For input 2^3^2 the produced tree cannot be Pow(Pow(2,3),2). For -2^2 the tree cannot have Num(-2) as its power base. Missing ] excludes successful postfix completion.

### reverse_reconstruction

The Pow(2,Pow(3,2)) tree admits 2^3^2 and 2^(3^2), plus lexer-equivalent spellings. Grouping discarded by primary prevents unique reconstruction.

### unary_power_order

Unary - calls unary again before forming Neg; pow's exponent calls unary. Thus -2^2 gives -4 and 2^-1 gives an exact half after eval. This is a grammar relation, not floating precedence.

### postfix_power_order

2!^3 has Fact(2) as base. 2^3! has Fact(3) as exponent. Postfix iteration allows repeated factorials and indexes with their usual evaluator domain errors.

### index_failure_boundary

Index expression is parsed through or, then eat(]) must succeed before Index is returned. Prefix cursor effects survive an Err internally; parse exposes only the error.

### tree_value_distinction

2^3^2 and (2^3)^2 evaluate to512 and64 respectively. Numeric agreement for other values would not imply tree equivalence; fixture asserts the actual E structure.

### Tests

Actual helper fixture: `calc::wave34::syntax_zero_and_binding_boundaries`. See file-root wave34-evidence.md for named profile/control receipts. Complement relations above are exclusions, not merely test lists; inverse relations retain compatible antecedents. Unexecuted paths remain source-derived.

### Epoch

2026-10-31 wave34: new descendant refining the existing parent; prior parent descriptions and evidence retained as historical snapshots. Production code is unchanged; inline synthetic tests add bounded observations.
