school-witness
The groupant beside world/src/knowledge.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
| component | label | where |
|---|---|---|
| approximant | partial source model | forward |
| ast | partial | ../../syntax.json |
| cost | partial source model | cost |
| descriptant | present | epoch-memory |
| invariant | partial source model | invariant |
| tests | existing scoped 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 |
|---|---|---|---|
school-witness-behavior-complement | behavior_complement | partial source model | behavior-complement |
school-witness-reverse-reconstruction | reverse_reconstruction | partial source model | reverse-reconstruction |
school-witness-coordinate-cancellation | update_sparsity | partial source model | coordinate-cancellation |
school-witness-local-gap | energy_identity | partial source model | local-gap |
Model text
Source-bound partial models, epoch 2026-10-29. Subject: world/src/knowledge.rs at the manifest SHA-256. Observation: Supported structured perceptron correction with active witness identity. Every relation below concerns this frozen source/configuration. Structural validation does not establish semantic correctness.
forward
On understood non-count wrong decisions with supported right and chosen options, increment right feature coordinates and decrement chosen coordinates; otherwise keep weights.
invariant
Only addressed ask/route/feature coordinates change; shared coordinates cancel according to multiplicity. Caller must supply valid option indexes and a valid weight table.
cost
O(number of feature occurrences in the two support vectors); no frame search inside correction.
checks
knowledge::school_math_tests::selected_witness_updates_the_decision_gap_and_explanation and scope_fallback_and_non_weight_decisions_do_not_learn_wrong_features. See ../../tests.md for executed scope. A proposed oracle below is not a completed check.
epoch-memory
2026-10-29: inspected the existing implementation before modeling. Preserved current behavior, including lossy decoding, index-sensitive ties and conditional updates. Existing witness tests distinguish active-scope learning from a wrong global witness. Counts represent distinct observations, not independent proofs. No source changes, performance gain, full-course result or autonomous combiner is claimed. AST remains explicitly absent; ranges bind source bytes only. Parser resources, panic/allocation behavior and complete inference semantics remain gaps.
behavior-complement
Type: behavior_complement. Domain and observation: Supported structured perceptron correction with active witness identity, as narrowed below. Operator/target: U is well-indexed (w,Answer,right,w') transitions without arithmetic overflow. R is learn_answer. U\R contains any w'!=w when !understood, count is Some, choice==right, or either required support is absent. In the active case it contains w'!=w+phi_right-phi_choice. This is an exact algebraic target with source-derived correspondence only.
Approximation: source-derived scoped relation, conditional on valid internal state and fixed flags/resources; unmodeled behavior remains unknown. Evidence/oracle: Existing focused fixtures exercise guard branches and active +2; no universal arithmetic proof.
reverse-reconstruction
Type: reverse_reconstruction. Domain and observation: Supported structured perceptron correction with active witness identity, as narrowed below. Operator/target: For fixed Answer/right, w=w'-d in the active branch; otherwise w=w'. If Answer/right is hidden, B(w') is the union over all compatible d and inactive histories. Thus fixed metadata yields unique subtraction, but weights alone never identify the exercise.
Approximation: source-derived scoped relation, conditional on valid internal state and fixed flags/resources; unmodeled behavior remains unknown. Evidence/oracle: Proposed enumeration of bounded integer weights and support multiplicities.
coordinate-cancellation
Type: update_sparsity. Domain and observation: Supported structured perceptron correction with active witness identity, as narrowed below. Operator/target: For index j, delta_j=count(right features mapped to j)-count(chosen features mapped to j). feat_idx merges Conflict slots other than Verb/Agent/Patient into coordinate12; the model uses coordinate multisets, not distinct semantic feature names.
Approximation: source-derived scoped relation, conditional on valid internal state and fixed flags/resources; unmodeled behavior remains unknown. Evidence/oracle: Existing fixture cancels shared verb in the old-witness control; noncanonical conflict collisions remain proposed.
local-gap
Type: energy_identity. Domain and observation: Supported structured perceptron correction with active witness identity, as narrowed below. Operator/target: With fixed d and g(w)=w dot d, g(w+d)-g(w)=sum_j d_j^2. This says nothing about next-call witness selection, global held-out accuracy, or overflow. A wrong witness can improve its own gap while worsening the actually selected scope.
Approximation: source-derived scoped relation, conditional on valid internal state and fixed flags/resources; unmodeled behavior remains unknown. Evidence/oracle: Executed current-scope +2 versus old-scope -2 fixture; formal/School.lean is an external specification, not newly executed here.
This page in Markdown โ https://md.groupants.elamur.ai/free/en/mova/world/src/knowledge.rs.groupant/decision.groupant/witness.groupant/