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

# math-comb-products

The groupant beside math/src/comb.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/comb.rs`](https://github.com/ElamurAI/mova-free/blob/main/math/src/comb.rs)
- **source SHA-256:** `c5937a3576697c05…`
- **covers:** Balanced products build factorial/permutation/binomial; signed generalization and conversion-before-symmetry determine failure ordering. Legendre reconstructs prime powers using sieve. Exact outputs exclude differing products on bounded domain; unavailable checks do not. O(k) big multiplies plus sieve. (bytes 475–4466)
- **part of:** [math-comb](https://md.groupants.elamur.ai/free/en/mova/math/src/comb.rs.groupant/)
- **repository folder:** [`math/src/comb.rs.groupant/products.groupant`](https://github.com/ElamurAI/mova-free/tree/main/math/src/comb.rs.groupant/products.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) |
| `guard_order` | guard_order | partial source derived model | [guard_order](#guard-order) |
| `product_tree` | product_tree | partial source derived model | [product_tree](#product-tree) |
| `legendre_relation` | legendre_relation | partial source derived model | [legendre_relation](#legendre-relation) |
| `machine_boundary` | machine_boundary | partial source derived model | [machine_boundary](#machine-boundary) |

## Model text


### descriptant

#### math-comb-products

Balanced products build factorial/permutation/binomial; signed generalization and conversion-before-symmetry determine failure ordering. Legendre reconstructs prime powers using sieve. Exact outputs exclude differing products on bounded domain; unavailable checks do not. O(k) big multiplies plus sieve.

Epoch 2026-10-31: complete source read, parent AST reused; partial finite evidence only.

### approximant

#### Scoped forward and cost

Balanced products build factorial/permutation/binomial; signed generalization and conversion-before-symmetry determine failure ordering. Legendre reconstructs prime powers using sieve. Exact outputs exclude differing products on bounded domain; unavailable checks do not. O(k) big multiplies plus sieve.

No executable percent surrogate claimed.

### invariant

#### Scoped invariant

Balanced products build factorial/permutation/binomial; signed generalization and conversion-before-symmetry determine failure ordering. Legendre reconstructs prime powers using sieve. Exact outputs exclude differing products on bounded domain; unavailable checks do not. O(k) big multiplies plus sieve.

Source range[475,4466) bound by manifest digest. Parent domain applies, not arbitrary public states.

### models

## Source-scoped typed relations

### behavior_complement

factorial(n>MAX_N) excludes Ok; binomial(k<0) excludes Err and returns0. With nonnegative n and admitted k<=n, output must equal exact product ratio, not rounded f64.

### reverse_reconstruction

Result1 admits factorial0/1 and binomial(n,0)/binomial(n,n) for many n. For fixed nonnegative n, symmetry k and n-k can share a count; negative-n generalization adds signed fibers.

### guard_order

binomial checks negative k, then k->u64, then negative n recursion, then k>n, then symmetry and MAX_N. Oversized k can fail before a small symmetric complement is found.

### product_tree

prod_range(lo>hi)=1; spans<16 multiply serially, larger spans split m=lo+(hi-lo)/2 and multiply subproducts. prod_offset uses the same balanced traversal shifted by arbitrary Z base.

### legendre_relation

Independent factorial/binomial checks use sums floor(n/p^i) from sieve primes. binomial_legendre returns None for k>n or n>1e7, while check_binomial outside admitted n labels unavailable and accepts true.

### machine_boundary

catalan computes2*n and n+1 as u64 before arbitrary precision, so direct huge calls can overflow despite binomial work caps. Tests do not establish safety at every u64.

### tests

#### Evidence

See ../tests.md for actual checks and source mutant; this fragment adds no runtime test.

Balanced products build factorial/permutation/binomial; signed generalization and conversion-before-symmetry determine failure ordering. Legendre reconstructs prime powers using sieve. Exact outputs exclude differing products on bounded domain; unavailable checks do not. O(k) big multiplies plus sieve.
