Markdown for LLMs
Classify with an exception
The source Markdown for this article. Copy it into your assistant or download it as a text file.
# Classify with an exception
## Intent
I want to drop the ordinary qualification when an established exception applies.
The ordinary qualification and its exception are different rules.
## Wrong form and why it stays silent
```law title="Incorrect form"
classification eligible(p: Person) defeater { when young(p); }
```
A classification must support the class. The exception is written as a separate defeater, not as force defeater on classification.
## Correct form
```law
language "law.core" version "0.2";
package recipes.g.r03 version "0.1.0";
namespace "urn:recipe:g-concepts:03";
entity Person;
relation young(p: Person) kind empirical;
relation exceptional(p: Person);
classification eligible(p: Person) defeasible { when young(p); }
rule Exclude defeater { for p: Person; when exceptional(p); defeat eligible(p); }
```
## Frozen execution scene
| Facts on 13.09.2026 | Question | Answer |
|---|---|---|
| ordinary case | `truth(eligible(entity_ref("urn:recipe:g-concepts:03:p")))` | `truth_status == TRUE_ONLY;` / `COMPUTED` |
| exception | `truth(eligible(entity_ref("urn:recipe:g-concepts:03:p")))` | `truth_status == NEITHER;` / `COMPUTED` |
| no ground | `truth(eligible(entity_ref("urn:recipe:g-concepts:03:p")))` | `truth_status == NEITHER;` / `COMPUTED` |
| defeater removed | `truth(eligible(entity_ref("urn:recipe:g-concepts:03:p")))` | `truth_status == TRUE_ONLY;` / `COMPUTED` |
```law
test "ordinary case classifies" {
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 young(entity_ref("urn:recipe:g-concepts:03:p"));
}
evaluate truth(eligible(entity_ref("urn:recipe:g-concepts:03:p")));
expect truth_status == TRUE_ONLY;
expect evaluation_status == COMPUTED;
}
```
```law
test "exception defeats classification" {
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 young(entity_ref("urn:recipe:g-concepts:03:p")); assert exceptional(entity_ref("urn:recipe:g-concepts:03:p"));
}
evaluate truth(eligible(entity_ref("urn:recipe:g-concepts:03:p")));
expect truth_status == NEITHER;
expect evaluation_status == COMPUTED;
}
```
```law
test "no ground stays unknown" {
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 exceptional(entity_ref("urn:recipe:g-concepts:03:p"));
}
evaluate truth(eligible(entity_ref("urn:recipe:g-concepts:03:p")));
expect truth_status == NEITHER;
expect evaluation_status == COMPUTED;
}
```
```law
test "removed defeater restores classification" {
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 young(entity_ref("urn:recipe:g-concepts:03:p")); assert exceptional(entity_ref("urn:recipe:g-concepts:03:p"));
}
evaluate truth(eligible(entity_ref("urn:recipe:g-concepts:03:p")));
expect truth_status == TRUE_ONLY;
expect evaluation_status == COMPUTED;
}
```
## Counterfactual
Mutation `classification eligible(p: Person) defeasible` → `classification eligible(p: Person) defeater`: LDC-E0201.
## Boundary
A defeater removes support but does not prove not eligible. A strict classification is not cancelled by the same exception.