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

# mova-hard-cases-lib

The groupant beside tools/hard-cases/src/lib.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
- **status:** partial source bound model
- **source:** [`tools/hard-cases/src/lib.rs`](https://github.com/ElamurAI/mova-free/blob/main/tools/hard-cases/src/lib.rs)
- **source SHA-256:** `f112098117139798…`
- **repository folder:** [`tools/hard-cases/src/lib.rs.groupant`](https://github.com/ElamurAI/mova-free/tree/main/tools/hard-cases/src/lib.rs.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 approximant](#forward-approximant) |
| **ast** | partial | `syntax.json` |
| **composition** | partial | [Composition](#composition) |
| **cost** | partial | [Cost](#cost) |
| **descriptant** | present | [Descriptant](#descriptant) |
| **invariant** | partial | [Invariant](#invariant) |
| **tests** | finite evidence | [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) |

## Model text


### Descriptant

Crate root of mova-hard-cases: module map of the loop from reading failures to learning and shared helpers (SHA-256, atomic/exclusive writes, CoNLL-U block helpers, normalized-text hash, lane document ids hard:<16 hex>). Source: `tools/hard-cases/src/lib.rs`.

### Forward approximant

doc_id(source, document) = 'hard:' + first16(sha256(source NUL document)); norm_sha(t) = sha256(join(' ', whitespace-split t)); blocks(conllu) = trimmed nonempty blocks each ending in one LF; with_id replaces the sent_id line.

### Invariant

Pure helpers except write_atomic (temp + fsync + rename) and write_new (create_new, refuses to overwrite).

### Cost

Linear in input bytes.

### Composition

Parent of the hard-cases modules; group hard-cases.

### behavior_complement

Holds no policy and calls no process. Evidence status: source-derived model with finite checks, not a proof.

### reverse_reconstruction

doc_id is a one-way hash: the document id is recovered from the wave's selection, not from the id.

### Tests

cargo test --manifest-path tools/hard-cases/Cargo.toml --offline (2026-11-04: 9 unit tests, two identical runs) Finite fixtures and live samples; not a proof.
