---
title: "algorithm-longest-increasing-subsequence-tests"
description: "Mova code model of algorithms/src/longest_increasing_subsequence/tests.rs: components with their labels, obernants and the model text."
url: "https://groupants.elamur.ai/free/en/mova/algorithms/src/longest_increasing_subsequence/tests.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/algorithms/src/longest_increasing_subsequence/tests.rs.groupant/>

# algorithm-longest-increasing-subsequence-tests

The groupant beside algorithms/src/longest_increasing_subsequence/tests.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 descriptive instance
- **source:** [`algorithms/src/longest_increasing_subsequence/tests.rs`](https://github.com/ElamurAI/mova-free/blob/main/algorithms/src/longest_increasing_subsequence/tests.rs)
- **source SHA-256:** `3c6c3245674fddd0…`
- **repository folder:** [`algorithms/src/longest_increasing_subsequence/tests.rs.groupant`](https://github.com/ElamurAI/mova-free/tree/main/algorithms/src/longest_increasing_subsequence/tests.rs.groupant)
- **repository commit:** `855da7bd4a7b`

> **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 | [approximant](#approximant) |
| **tests** | existing checks referenced | [checks](#checks) |

## 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) |
| `independent_oracle` | independent_oracle | partial source derived model | [independent_oracle](#independent-oracle) |
| `property_assumptions` | property_assumptions | partial source derived model | [property_assumptions](#property-assumptions) |
| `bounded_coverage_cost` | bounded_coverage_cost | partial source derived model | [bounded_coverage_cost](#bounded-coverage-cost) |

## Model text


### descriptant

#### longest_increasing_subsequence tests groupant

Epoch 2026-10-29: prospective predictions saved outside repository before
implementation. Original std-only code/fixtures; four algorithm tests pass
twice. Compiled red control: replace strict lower-bound predicate with nonstrict comparison.

Combiner: source identity, recurrence, invariant and checks constrain a
conditional model. Complement and converse answer different questions; no
additive inverse identity. Syntax is partial with opaque macros and no type
or name resolution. Finite evidence is not proof of all inputs or parent wiring.
Lawful Ord and successful execution are assumed; trait panics and allocation
failures are outside successful-call semantics. Preserve these observations
in future epochs. No runtime speedup claim.

### approximant

#### Forward, invariant and cost

Generate bounded fixtures, compute independent references, assert agreement
and separate structural properties. References do not consult production
outputs. Enumerate all subsequence masks for optimal length; independently assert validity; quadratic DP checks wider values.

Assumptions: Strict order, latest equal-tail policy, no earliest-index promise; lawful Reverse wrapper.

Coverage: 3280 ternary arrays length 0..7, 335923 subset masks; 1028 seeded/full-width i64 entries against quadratic DP and tie witnesses.
Test oracle costs are described in models.md; production cost: O(n log n) time and O(n) space under ordinary allocation and constant comparisons.

### models

## longest_increasing_subsequence test models

Subject/revision: tests.rs at manifest SHA. Observe one test invocation under
lawful Ord and ordinary allocation. Partial source-derived models have bounded
evidence; no universal proof or arbitrary panic behavior is modeled.

### behavior_complement

U=(fixture, candidate result, verdict). Pass with violated oracle equality
or explicit property assertion is absent from the assertion graph. This exact
complement slice does not exclude implementations overfit to tested fixtures.
The compiled mutation (replace strict lower-bound predicate with nonstrict comparison) is rejected by one exact filtered test.

### reverse_reconstruction

Passing fixtures constrain implementation outputs/properties only on this
finite domain; all agreeing functions remain compatible. Failure identifies
a counterexample, not a unique bug or source. The mutant is one member of
a failure fiber. Complete source reconstruction is not implemented.

### independent_oracle

Enumerate all subsequence masks for optimal length; independently assert validity; quadratic DP checks wider values.
Independent control flow can still share contract misunderstandings; bounded
correspondence is evidence rather than a proof of all inputs.

### property_assumptions

Strict order, latest equal-tail policy, no earliest-index promise; lawful Reverse wrapper.
Dropping lawful order or changing strictness invalidates these targets.
Witnesses and custom-order tests exercise only the declared bounded projection.

### bounded_coverage_cost

3280 ternary arrays length 0..7, 335923 subset masks; 1028 seeded/full-width i64 entries against quadratic DP and tie witnesses.
Seeds use wrapping arithmetic. Generation is exponential in a fixed small
bound; sorting/selection references allocate small vectors. LIS mask oracle
cost is O(2^n*n) per input, larger reference O(n²). Production cost: O(n log n) time and O(n) space under ordinary allocation and constant comparisons.

### checks

#### Evidence, 2026-10-29

Four tests for this algorithm passed twice with temporary local crate exports:
66 total tests, identical normalized outcomes. Strict all-target Clippy and
rustfmt passed. Temporary exports are not committed.

Coverage: 3280 ternary arrays length 0..7, 335923 subset masks; 1028 seeded/full-width i64 entries against quadratic DP and tie witnesses.

External mutant (replace strict lower-bound predicate with nonstrict comparison) compiled; exactly one filtered new exhaustive test
failed an assertion with exit 101. No mutant committed. One red control is not
mutation completeness. Parent owns final exports, registry and source bindings.
