Markdown for LLMs
Duty bound by the rule body
The source Markdown for this article. Copy it into your assistant or download it as a text file.
# Duty bound by the rule body
## Intention
I want to bind the duty bearer with a positive premise.
## Incorrect form and why it stays silent
```law title="Incorrect form"
rule R strict { for p: Person; when true; then duty File { bearer p; achieve done(p) during [@2026-09-01, @2026-09-10]; }; }
```
for declares a variable but does not enumerate persons. A rule head must be bound by the body; current check and lower both reject with E4101. The old catalogue claim of a green check is no longer reproduced.
## Correct form
```law
language "law.core" version "0.2";
package recipes.a.r14 version "0.1.0";
namespace "urn:recipe:a-positions:14";
entity Person;
relation registered(p: Person);
relation done(p: Person);
rule R strict { for p: Person; when registered(p);
then duty File { bearer p; achieve done(p) during [@2026-09-01, @2026-09-10]; };
}
```
## Frozen execution scene
| Facts and snapshot | Question | Answer |
|---|---|---|
| one named person; 2026-09-05 | `positions()` | `position_count(File, ACTIVE, 1);` / `COMPUTED` |
| no premise; 2026-09-05 | `positions()` | `not positions_present();` / `COMPUTED` |
```law
test "named bearer creates one duty" {
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 registered(entity_ref("urn:recipe:a-positions:14:p"));
}
evaluate positions();
expect position_count(File, ACTIVE, 1);
expect evaluation_status == COMPUTED;
}
```
```law
test "no premise creates no position" {
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";
}
}
evaluate positions();
expect not positions_present();
expect evaluation_status == COMPUTED;
}
```
```python
>>> import runpy
>>> check = runpy.run_path("docs/recipes/a-positions/resources/check.py")
>>> check["check_boundary"](https://github.com/arxohq/law/blob/master/docs/recipes/a-positions/14)
'А14: граница проверена'
```
## Counterfactual
Mutation: `when registered(p);` → `when true;`; rejection LDC-E4101. Additional counterfactuals are shown as separate scenes.
## Boundary
An event binder in activation is the special form for event activation, not a licence for an arbitrary bearer. Rules over underived persons do not create positions.