# Exempt from the sanction, keep the offence ## Intention I want to exclude the sanction without destroying the qualification of the act. ## Incorrect form and why it stays silent ```text title="Incorrect form" // Освобождение оформляют исключением из квалификации offence. ``` Exemption is addressed to the sanction, not to the offence. Fine becomes DEFEATED, but offence stays TRUE_ONLY. ## Correct form ```law language "law.core" version "0.2"; package recipes.zh.r05 version "0.1.0"; namespace "urn:recipe:zh-violation:05"; entity Person; relation enrolled(p: Person); relation done(p: Person); relation act(p: Person); relation offence(p: Person); relation exempt(p: Person); rule Qualify strict { for p: Person; when act(p); then offence(p); } rule Impose defeasible { for p: Person; when offence(p); then duty Fine { bearer p; achieve done(p) during [@2026-09-01, @2026-09-10]; }; unless exempt(p); } ``` ## Frozen execution scene | Facts and snapshot | Question | Answer | |---|---|---| | ordinary sanction; 2026-09-05 | `positions()` | `position(Fine, ACTIVE);` | | exemption; 2026-09-13 | `positions()` | `position(Fine, DEFEATED);` | | offence kept; 2026-09-13 | `truth(offence(entity_ref("urn:recipe:zh-violation:05:p")))` | `truth_status == TRUE_ONLY;` | | proviso removed; 2026-09-05 | `positions()` | `position(Fine, ACTIVE);` | ```law test "ordinary sanction active" { given { context { legal_time @2026-09-05; decision_time @2026-09-05T09:00:00+05:00; knowledge_time @2026-09-30T09:00:00+05:00; timezone "Asia/Almaty"; } assert act(entity_ref("urn:recipe:zh-violation:05:p")); } evaluate positions(); expect position(Fine, ACTIVE); expect evaluation_status == COMPUTED; } ``` ```law test "exemption defeats sanction" { given { context { legal_time @2026-09-13; decision_time @2026-09-13T09:00:00+05:00; knowledge_time @2026-09-30T09:00:00+05:00; timezone "Asia/Almaty"; } assert act(entity_ref("urn:recipe:zh-violation:05:p")); assert exempt(entity_ref("urn:recipe:zh-violation:05:p")); } evaluate positions(); expect position(Fine, DEFEATED); expect evaluation_status == COMPUTED; } ``` ```law test "offence composition survives" { given { context { legal_time @2026-09-13; decision_time @2026-09-13T09:00:00+05:00; knowledge_time @2026-09-30T09:00:00+05:00; timezone "Asia/Almaty"; } assert act(entity_ref("urn:recipe:zh-violation:05:p")); assert exempt(entity_ref("urn:recipe:zh-violation:05:p")); } evaluate truth(offence(entity_ref("urn:recipe:zh-violation:05:p"))); expect truth_status == TRUE_ONLY; expect evaluation_status == COMPUTED; } ``` ```law test "removed clause restores sanction" { given { context { legal_time @2026-09-05; decision_time @2026-09-05T09:00:00+05:00; knowledge_time @2026-09-30T09:00:00+05:00; timezone "Asia/Almaty"; } assert act(entity_ref("urn:recipe:zh-violation:05:p")); assert exempt(entity_ref("urn:recipe:zh-violation:05:p")); } evaluate positions(); expect position(Fine, ACTIVE); expect evaluation_status == COMPUTED; } ``` Qualify was made defeasible with `unless exempt(p)`: the qualification wrongly disappeared. ```law test "exemption on composition removes offence" { given { context { legal_time @2026-09-13; decision_time @2026-09-13T09:00:00+05:00; knowledge_time @2026-09-30T09:00:00+05:00; timezone "Asia/Almaty"; } assert act(entity_ref("urn:recipe:zh-violation:05:p")); assert exempt(entity_ref("urn:recipe:zh-violation:05:p")); } evaluate truth(offence(entity_ref("urn:recipe:zh-violation:05:p"))); expect truth_status == NEITHER; expect evaluation_status == COMPUTED; } ``` ```python >>> import runpy >>> check = runpy.run_path("docs/recipes/zh-violation/resources/check.py") >>> check["check_variant"](https://github.com/arxohq/law/blob/master/docs/recipes/zh-violation/5) 'Ж5: контрфактуал подтверждён; lawc = lawref' ``` ## Counterfactual Diagnostic mutation `rule Impose defeasible` → `rule Impose strict`: LDC-E4110. Semantic differences are pinned as separate scenes. ## Boundary A rule that excludes the offence itself is modelled differently. Here a direct defeater of the sanction is shown; the full liability layer is a separate concern.