Elamur GroupantsโŒ•
โ˜ฐ

math-solution-memory-perceptron

The groupant beside math/src/memory.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

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

componentlabelwhere
approximantpartialapproximant
astpartial../syntax.json
compositionpartialcomposition
descriptantpresentdescriptant
invariantpartialinvariant
testspartial bounded evidencetests

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.

idtypelabelwhere
behavior_complementbehavior_complementpartial source derived modelbehavior_complement
reverse_reconstructionreverse_reconstructionpartial source derived modelreverse_reconstruction
failure_precedencefailure_precedencepartial source derived modelfailure_precedence
representation_transportrepresentation_transportpartial source derived modelrepresentation_transport
resource_boundaryresource_boundarypartial source derived modelresource_boundary
domain_boundarydomain_boundarypartial source derived modeldomain_boundary

Model text

descriptant

Source-bound description

Sort classes and memo ids; update wrong predicted class per feature, accumulate timestamped weights then average by final t. Guess sorts descending scores then lexical class, margin top1-second or0, retains five highest signed feature contributions.

Epoch 2026-10-31: prospective model before bounded synthetic tests; production behavior unchanged. Source scope bytes[5291,8283). No external memory load/generalization. load drops malformed lines and read errors; learned accuracy unmeasured. Not every branch in this fragment executed.

approximant

Forward relation

Sort classes and memo ids; update wrong predicted class per feature, accumulate timestamped weights then average by final t. Guess sorts descending scores then lexical class, margin top1-second or0, retains five highest signed feature contributions.

Domain: No-panic comparison domain requires comparable non-NaN accumulated scores and feature weights. Finite weights alone do not prevent accumulation overflow or NaN; partial_cmp unwrap panics on NaN. Finite meaningful margins additionally require finite score differences. Duplicate features can update twice.

Executable Rust approximant unsupported: categorical/effect observations have no useful percentage metric yet. Future caps1/2/5/10% only; no automatic substitution.

invariant

Invariant and cost

No classes excludes Guess; zero epochs can still leave classes and lexical tied prediction. why has<=5 entries, not necessarily positive weights.

Ordering: Class/id sorting before epochs; accumulated old weight added before each update; final residual time before threshold1e-9.

Cost: O(epochsmemosclasses*features) scoring, plus key clone/hash and sort; weights O(class-feature pairs). usize ticks unchecked.

composition

Composition and epoch memory

features from Problem feed both train and guess; solve compares margin threshold but it is not calibrated probability.

Source scope bytes[5291,8283). No external memory load/generalization. load drops malformed lines and read errors; learned accuracy unmeasured. Not every branch in this fragment executed.

Partial syntax and finite tests do not establish all caller assumptions.

models

behavior_complement

No classes excludes Guess; zero epochs can still leave classes and lexical tied prediction. why has<=5 entries, not necessarily positive weights.

reverse_reconstruction

Winning class/margin admits many weights and feature vectors; averaged weights lose update history. Empty model may come from empty memos or zero updates.

failure_precedence

Class/id sorting before epochs; accumulated old weight added before each update; final residual time before threshold1e-9.

representation_transport

features from Problem feed both train and guess; solve compares margin threshold but it is not calibrated probability.

resource_boundary

O(epochsmemosclasses*features) scoring, plus key clone/hash and sort; weights O(class-feature pairs). usize ticks unchecked.

domain_boundary

No-panic comparison domain requires comparable non-NaN accumulated scores and feature weights. Finite weights alone do not prevent accumulation overflow or NaN; partial_cmp unwrap panics on NaN. Finite meaningful margins additionally require finite score differences. Duplicate features can update twice.

tests

Evidence, 2026-10-31

Selected actual-source checks: cargo test -p math --lib memory::. Exact commands, numeric statuses, normalized outcomes, compiled assertion controls and restoration receipts are in the external wave28 mathcontrol run.

Source scope bytes[5291,8283). No external memory load/generalization. load drops malformed lines and read errors; learned accuracy unmeasured. Not every branch in this fragment executed.

No live teacher/API, trained model, corpus/held-out, GPU, DB or expensive benchmark run. Parent syntax generated twice identically. Scope remains partial.

This page in Markdown โ†’ https://md.groupants.elamur.ai/free/en/mova/math/src/memory.rs.groupant/perceptron.groupant/