docs← Back to article

Markdown for LLMs

An exception establishes negation

The source Markdown for this article. Copy it into your assistant or download it as a text file.

Download this articlePlain text ↗
# An exception establishes negation

## Intention

I want an explicit refusal, not merely the removal of positive support.

The scenes compare the bare and the contrary forms.

## Incorrect form and why it stays silent

```text title="Incorrect form"
unless special(p);

then duty Stay { bearer p; goal maintenance { condition allowed(p); window [@2026-01-01, infinity); } };
unless special(p) then not allowed(p);
```

A bare proviso yields NEITHER, a contrary one — FALSE_ONLY. The negation attaches to the literal, not to a duty template. The mutation replaces the literal head with a norm and is rejected with E1302.

## Correct form

```law
language "law.core" version "0.2";
package recipes.b.r03 version "0.1.0";
namespace "urn:recipe:b-rules:03";

entity Person;
relation eligible(p: Person);
relation special(p: Person);
relation allowed(p: Person);
rule General defeasible {
    for p: Person; when eligible(p); then allowed(p);
    unless special(p) then not allowed(p);
}
```

## Frozen execution scene

| Facts and choice | Question | Answer |
|---|---|---|
| explicit refusal | `truth(allowed(entity_ref("urn:recipe:b-rules:03:p")))` | `FALSE_ONLY` / `COMPUTED` |
| contrary head removed | `truth(allowed(entity_ref("urn:recipe:b-rules:03:p")))` | `NEITHER` / `COMPUTED` |
| no exception | `truth(allowed(entity_ref("urn:recipe:b-rules:03:p")))` | `TRUE_ONLY` / `COMPUTED` |

```law
test "explicit refusal" {
    given {
        context {
            legal_time @2026-09-13;
            decision_time @2026-09-13T09:00:00+05:00;
            knowledge_time @2026-09-13T09:00:00+05:00;
            timezone "Asia/Almaty";
        }
        assert eligible(entity_ref("urn:recipe:b-rules:03:p")); assert special(entity_ref("urn:recipe:b-rules:03:p"));
    }
    evaluate truth(allowed(entity_ref("urn:recipe:b-rules:03:p")));
    expect truth_status == FALSE_ONLY;
    expect evaluation_status == COMPUTED;
}
```

```law
test "contrary head removed" {
    given {
        context {
            legal_time @2026-09-13;
            decision_time @2026-09-13T09:00:00+05:00;
            knowledge_time @2026-09-13T09:00:00+05:00;
            timezone "Asia/Almaty";
        }
        assert eligible(entity_ref("urn:recipe:b-rules:03:p")); assert special(entity_ref("urn:recipe:b-rules:03:p"));
    }
    evaluate truth(allowed(entity_ref("urn:recipe:b-rules:03:p")));
    expect truth_status == NEITHER;
    expect evaluation_status == COMPUTED;
}
```

```law
test "no exception" {
    given {
        context {
            legal_time @2026-09-13;
            decision_time @2026-09-13T09:00:00+05:00;
            knowledge_time @2026-09-13T09:00:00+05:00;
            timezone "Asia/Almaty";
        }
        assert eligible(entity_ref("urn:recipe:b-rules:03:p"));
    }
    evaluate truth(allowed(entity_ref("urn:recipe:b-rules:03:p")));
    expect truth_status == TRUE_ONLY;
    expect evaluation_status == COMPUTED;
}
```

## Counterfactual

Mutation: `then allowed(p);` → `then duty Stay { Bearer p; goal maintenance { condition allowed(p); window [@2026-01-01, infinity); } };`; rejection LDC-E1302. Scenes that delete a fragment are marked explicitly in the table.

## Boundary

Norm-heads have no complement: unless C then not A is undefined for a position. For conflicting positions, see [Two incompatible duties](/recipes/a-positions/incompatible-duties/).