court-lattice
The groupant beside yom-hadin/src/court.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 | approximant |
| ast | partial | syntax.json |
| composition | partial | descriptant |
| cost | partial | model.md |
| descriptant | present | descriptant |
| invariant | partial | Invariant |
| tests | finite native checks | 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 |
reverse_reconstruction | reverse_reconstruction | partial source derived model | reverse_reconstruction |
anchor_cap_reindex | anchor_cap_reindex | partial source derived model | anchor_cap_reindex |
condition_exception_algebra | condition_exception_algebra | partial source derived model | condition_exception_algebra |
binary_count_fiber | binary_count_fiber | partial source derived model | binary_count_fiber |
precedence_and_tip_horizon | precedence_and_tip_horizon | partial source derived model | precedence_and_tip_horizon |
Parts
Model text
descriptant
Case facts to capped rule matches, choice lattice, evaluation and bounded tip search.
Epoch 2026-10-31
Prospective review preceded test edits. Runtime logic unchanged; three sources gain tests. Synthetic witnesses do not validate legal conclusions.
Composition: Match defendant anchors by highest Cover with first tie; build condition/exception points and discard completed duties; rank/cap16/reindex; append disputes, precedence and suspension. Evaluate blocked/local eligibility, dispute winners, principle key and optional suspension. Count weighted firing masks times global assignments; tipping enumerates distinct-point alternative sets.
Retained limits: partial syntax, opaque macros; no live corpus, teacher, parser model, production filesystem or frozen gold. Complete semantics and executable approximants remain open.
approximant
Forward model
Case facts to capped rule matches, choice lattice, evaluation and bounded tip search.
Match defendant anchors by highest Cover with first tie; build condition/exception points and discard completed duties; rank/cap16/reindex; append disputes, precedence and suspension. Evaluate blocked/local eligibility, dispute winners, principle key and optional suspension. Count weighted firing masks times global assignments; tipping enumerates distinct-point alternative sets.
Not an executable substitute. Percentage approximation is unsupported without a useful metric; future profiles limited to 1/2/5/10% require actual-reference comparison.
Obligation boundary: an act anchor gives duty0 for positive conduct and duty2 for negation. duty0 is skipped before matching/cap, while duty2 remains; a condition anchor derives duty from clause_status. Labels use act_verb (first act, else first condition), not patient text. The independent integration review supplies additional completed/negated-duty witnesses; local checks do not claim these branches directly.
models
Typed models: Case facts to capped rule matches, choice lattice, evaluation and bounded tip search.
Subject: yom-hadin/src/court.rs, SHA-256 c780d974b015dcefc5018d326ca5f1e0ec47af0c8fbd23927213a8848285b099. Domain: bounded finite synthetic rules/cases; valid indices and successful allocation unless a section narrows this. Each relation observes implementation, not legal authority. Status: partial source-derived model, finite evidence mapped in tests.md.
behavior_complement
In generated valid lattices, excluded traces include blocked rule firing, negated forbidden act conviction from that rule, completed duty retained, and suspension outside2..max. No bounds are claimed for malformed externally assembled Lattice assignments.
Operator: stated relation on this source projection. Assumptions: named domain and unchanged dependencies. Evidence: tests.md maps finite observations; other branches remain source review only.
reverse_reconstruction
For observed verdict v, compatible antecedents are all admitted (j,case,defendant,assignment) with evaluate(lattice(...),assignment).0=v. Counts aggregate assignments and erase case/rule distinctions; representative stored assignment is one witness, never a unique inverse.
Operator: stated relation on this source projection. Assumptions: named domain and unchanged dependencies. Evidence: tests.md maps finite observations; other branches remain source review only.
anchor_cap_reindex
Anchor ties use first clause/fact order. Cap sorts descending weight then Cover then ascending original order, truncates16, restores body order, rewrites each local point.rule. Weak discarded rules cannot contribute later counts.
Operator: stated relation on this source projection. Assumptions: named domain and unchanged dependencies. Evidence: tests.md maps finite observations; other branches remain source review only.
condition_exception_algebra
Condition group chooses maximal Status (OR); exception group minimal Status (AND), with opposite-word and explicit sure-negation early failures. Unmet<Unknown<Broad<Met ordering means unknown can dominate unmet inside OR.
Operator: stated relation on this source projection. Assumptions: named domain and unchanged dependencies. Evidence: tests.md maps finite observations; other branches remain source review only.
binary_count_fiber
For unblocked rule with k local binary points: one assignment fires and2^k-1 fail. Blocked rule contributes2^k only to nonfiring mask; unblocked k0 cannot fail. Multiply by global Cartesian choices; require shifts/products fit.
Operator: stated relation on this source projection. Assumptions: named domain and unchanged dependencies. Evidence: tests.md maps finite observations; other branches remain source review only.
precedence_and_tip_horizon
Distinct verdicts maximize selected principle key; strict > preserves first tie. Dispute elimination precedes this. Tipping starts honest even keep0, then distinct-point sets by depth/order; unreachable within depth differs from absent from full counts.
Operator: stated relation on this source projection. Assumptions: named domain and unchanged dependencies. Evidence: tests.md maps finite observations; other branches remain source review only.
tests
Checks and evidence
External run label: octopus-wave31-court-2026-10-31; exact commands in native-commands.json, per-source observations in source-test-map.json, numeric exits and named outcomes in raw logs.
19 exact selected native tests twice debug and twice release execute actual linked code on bounded hand-built cases. CLI covers argument helpers only. Full extraction/model initialization, actual jurisdiction loading, protocol disk errors, resource exhaustion and malformed public lattices are unexecuted. Module declarations have compile evidence only.
Three compiled source-behavior mutants: count weight, precedence tie, modal tie; each requires compile success, named assertion failure, exact byte/hash restoration and positive rerun. Legacy fixture interventions count separately. Final observations: external evidence-summary.md.
This node observes: Case facts to capped rule matches, choice lattice, evaluation and bounded tip search.. Unmapped models remain source-derived/prospective, not verified by the whole test count.
The exact per-source names and limits are retained in source-evidence.md.
invariant-and-cost
Invariant and cost
Invariant
Rules retain body order after cap; local point indices refer to retained rules. For valid internally generated binary local points and arithmetic fitting u128/usize, total is sum of verdict counts and equals product of option cardinalities.
Cost
Matching scales with rule clausesfactsterm scans plus condition scans and sort O(R log R). For n<=16 matches, p points, g global combinations, count O(2^ngE), E includes n*p plus text. Tipping explores sum_{k<=depth} products of k point-alternative counts, allocates a whole level before 200000 cutoff; cap16 does not bound p or arithmetic.
Symbolic bounds, not timings. Resource exhaustion is not tested.
source-evidence
Source observation map
Actual matching/count/evaluate/tips; parser read_case unexecuted; root independent composition probe adds completed/negated duty boundary.
- no_rule_applies_is_not_a_verdict
- removing_a_condition_changes_the_path_counts
- a_broad_term_is_a_choice_point_and_the_plain_reading_is_narrow
- conflicting_rules_are_settled_by_the_chosen_principle
- wave31_count_matches_explicit_assignments_and_ties_keep_first
This page in Markdown → https://md.groupants.elamur.ai/free/en/mova/yom-hadin/src/court.rs.groupant/