Skip to content

Algebraic laws requirements

Criterion: Sequential composition of skills is associative. Verification: pytest tests/test_algebraic_laws.py::test_law1_additive_fold_associativity and test_law1_multiplicative_fold_associativity

Criterion: Additive layer must be applied before multiplicative layer. Verification: pytest tests/test_algebraic_laws.py::test_law2_additive_before_multiplicative (teeth: test_law2_wrong_order_differs)

Criterion: Charge consumption below zero produces zero and emits a ChargeDeficitEmitted event. Verification: pytest tests/test_algebraic_laws.py::test_law3_floor_never_negative, test_law3_deficit_emits_event, test_law3_no_deficit_preserves_balance

Criterion: Identity preservation and composition preservation for trigger graph evaluation. Verification: pytest tests/test_algebraic_laws.py::test_law4a_empty_loadout_is_trivial_graph, test_law4b_pair_edges_are_local, test_law4b_pair_edge_specification

Criterion: Cooldown reduction stacking is distributive under min/max. Verification: pytest tests/test_algebraic_laws.py::test_cooldown_semiring_distributivity

Not revalidated 2026-10-11: no test by this name exists; the law has no executable verification in the current suite.

Law 6: Verification Monotone Classification

Section titled “Law 6: Verification Monotone Classification”

Criterion: Adding skills to a verified outlier loadout cannot reduce its classification. Verification: pytest tests/test_algebraic_laws.py::test_verification_monotone_classification

Not revalidated 2026-10-11: no test by this name exists; the law has no executable verification in the current suite.

Criterion: Proportion of randomly assembled outlier loadouts remains below configurable threshold epsilon. Verification: pytest tests/test_algebraic_laws.py::test_law7_estimate_brackets_analytic_truth_and_flag_agrees (teeth: test_law7_teeth_permissive_cycle_is_not_compliant)

Criterion: On the local monotone subset of modifiers — those with (layer = ADDITIVE, operation = "add") or (layer = MULTIPLICATIVE, operation = "multiply") — replacing one modifier’s static value with a strictly larger rolled value yields a strictly larger modifier_output(S, v), holding the other modifier values fixed. Modifiers with operation set, min, or max are explicitly excluded: with these operations a higher rolled value can produce a non-increasing or strictly lower output, so they fall outside the guarantee. Runtime value-regime caveats: additive add requires the substituted value to be non-negative, and multiplicative multiply requires it to be at least 1 while the running multiplicative accumulator remains positive. See docs/development/architecture/gain-cost-model.md for the full specification. Verification: pytest tests/test_algebraic_laws.py::test_law8_additive_add_strictly_increases, test_law8_multiplicative_multiply_strictly_increases (teeth: test_law8_teeth_set_min_excluded_and_not_monotone)

Criterion: Theme-derived modifier covariance is positive semi-definite with strictly positive entries between slots of the same theme, strictly negative entries between slots of competing themes, and zero entries between slots of distinct non-competing themes, for any catalog partition, competition subgraph, slot counts, and coupling strengths inside ThemeCoupling’s bounds. PSD-ness holds by construction under the |b| <= a/(k-1) scaling (blo.5 design section 4.2), with CovarMatrix’s construction-time eigenvalue check as the boundary assertion on that proof. Verification: pytest tests/test_theme_derivation.py (sign structure, PSD property over random partitions, pinned design-harness targets, closed-form spectrum); severity: uv run pytest tests/test_empirical_covariance.py::test_severity_latent_covariance_recovers_theme_derived_matrix