Markdown for LLMs
Achieve by a deadline
The source Markdown for this article. Copy it into your assistant or download it as a text file.
# Achieve by a deadline
## Intention
I want to check that a result is reached before the end date.
After the window ends, silence without an established negation is no violation.
## Incorrect form and why it stays silent
```text title="Incorrect form"
achieve done(p) during [@2026-09-01, infinity);
```
An infinite window never reaches the overdue stage. A finite deadline and explicit non-performance are different necessary conditions of a violation.
## Correct form
```law
language "law.core" version "0.2";
package recipes.a.r01 version "0.1.0";
namespace "urn:recipe:a-positions:01";
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 |
|---|---|---|
| before the deadline; 2026-09-05 | `positions()` | `position(File, ACTIVE);` / `COMPUTED` |
| result presented; 2026-09-05 | `positions()` | `position(File, SATISFIED);` / `COMPUTED` |
| after the deadline, no data; 2026-09-13 | `positions()` | `position(File, UNDETERMINED);` / `COMPUTED` |
| non-performance established; 2026-09-13 | `positions()` | `position(File, VIOLATED);` / `COMPUTED` |
```law
test "active before deadline" {
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:01:p"));
}
evaluate positions();
expect position(File, ACTIVE);
expect evaluation_status == COMPUTED;
}
```
```law
test "satisfied when performed" {
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:01:p")); assert done(entity_ref("urn:recipe:a-positions:01:p"));
}
evaluate positions();
expect position(File, SATISFIED);
expect evaluation_status == COMPUTED;
}
```
```law
test "undetermined after deadline without data" {
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 registered(entity_ref("urn:recipe:a-positions:01:p"));
}
evaluate positions();
expect position(File, UNDETERMINED);
expect evaluation_status == COMPUTED;
}
```
```law
test "violated when non-performance established" {
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 registered(entity_ref("urn:recipe:a-positions:01:p")); assert not done(entity_ref("urn:recipe:a-positions:01:p"));
}
evaluate positions();
expect position(File, VIOLATED);
expect evaluation_status == COMPUTED;
}
```
The incorrect-form variant is executed as a separate package: the finite end of the window is replaced with `infinity`; a negation after the former deadline does not violate an open duty.
```law
test "open window stays active despite recorded failure" {
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 registered(entity_ref("urn:recipe:a-positions:01:p")); assert not done(entity_ref("urn:recipe:a-positions:01:p"));
}
evaluate positions();
expect position(File, ACTIVE);
expect evaluation_status == COMPUTED;
}
```
```python
>>> import runpy
>>> check = runpy.run_path("docs/recipes/a-positions/resources/check.py")
>>> check["check_variant"](https://github.com/arxohq/law/blob/master/docs/recipes/a-positions/1)
'А1: контрфактуал подтверждён; lawc = lawref'
```
## Counterfactual
Mutation: `bearer p;` → ``; rejection LDC-E1305. Additional counterfactuals are shown as separate scenes.
## Boundary
Absence of done after the deadline is UNDETERMINED. Working days and postponements need their own time computation; here the dates are fixed. The witness of an open window is shown separately below.