Markdown for LLMs
Priority in a special territory
The source Markdown for this article. Copy it into your assistant or download it as a text file.
# Priority in a special territory
## Intention
I want to turn priority on only when a territorial condition is established.
Priority applies only while the territorial condition holds.
## Incorrect form and why it stays silent
```law title="Incorrect form"
priority ZonePriority { prefer Special over General; reason lex_specialis; }
```
Removing when extends priority to every case. Even when the condition is true, a conflict still requires the same grounded head.
## Correct form
```law
language "law.core" version "0.2";
package recipes.b.r08 version "0.1.0";
namespace "urn:recipe:b-rules:08";
entity Person;
relation eligible(p: Person);
relation special(p: Person);
relation allowed(p: Person);
relation special_zone();
rule General defeasible { for p: Person; when eligible(p); then allowed(p); }
rule Special defeasible { for p: Person; when eligible(p) and special(p); then not allowed(p); }
priority ZonePriority {
prefer Special over General;
when special_zone();
reason lex_specialis;
}
```
## Frozen execution scene
| Facts and choice | Question | Answer |
|---|---|---|
| special zone | `truth(allowed(entity_ref("urn:recipe:b-rules:08:p")))` | `FALSE_ONLY` / `COMPUTED` |
| zone not established | `truth(allowed(entity_ref("urn:recipe:b-rules:08:p")))` | `BOTH` / `COMPUTED` |
| priority condition removed | `truth(allowed(entity_ref("urn:recipe:b-rules:08:p")))` | `FALSE_ONLY` / `COMPUTED` |
| opposite conclusions about different persons | `truth(allowed(entity_ref("urn:recipe:b-rules:08:p")))` | `TRUE_ONLY` / `COMPUTED` |
```law
test "special zone" {
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:08:p")); assert special(entity_ref("urn:recipe:b-rules:08:p")); assert special_zone();
}
evaluate truth(allowed(entity_ref("urn:recipe:b-rules:08:p")));
expect truth_status == FALSE_ONLY;
expect evaluation_status == COMPUTED;
}
```
```law
test "zone not established" {
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:08:p")); assert special(entity_ref("urn:recipe:b-rules:08:p"));
}
evaluate truth(allowed(entity_ref("urn:recipe:b-rules:08:p")));
expect truth_status == BOTH;
expect evaluation_status == COMPUTED;
}
```
```law
test "priority condition 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:08:p")); assert special(entity_ref("urn:recipe:b-rules:08:p"));
}
evaluate truth(allowed(entity_ref("urn:recipe:b-rules:08:p")));
expect truth_status == FALSE_ONLY;
expect evaluation_status == COMPUTED;
}
```
```law
test "opposite findings about different persons" {
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:08:p")); assert eligible(entity_ref("urn:recipe:b-rules:08:q")); assert special(entity_ref("urn:recipe:b-rules:08:q")); assert special_zone();
}
evaluate truth(allowed(entity_ref("urn:recipe:b-rules:08:p")));
expect truth_status == TRUE_ONLY;
expect evaluation_status == COMPUTED;
}
```
## Counterfactual
Mutation: `when special_zone();` → `when allowed(higher);`; rejection LDC-E2104. Scenes that delete a fragment are marked explicitly in the table.
## Boundary
special_zone is an explicit context fact of the teaching case, not geocoding. For a condition on a pair of applications higher/lower are available; subject identity is checked by conflict of heads.