Markdown for LLMs
Record a case with ready values
The source Markdown for this article. Copy it into your assistant or download it as a text file.
# Record a case with ready values
## Intention
I want to present my facts to an existing rule.
## Incorrect form and why it stays silent
A fact argument is not a computation program.
```text title="Incorrect form"
assert age(p, 17 + 1);
```
That form is rejected with `LDC-E1325`; it does not compute an age.
## Correct form
Below is only a self-contained stand for case inputs; it does not replace a file-based case package.
```law
language "law.core" version "0.2";
package recipes.n.r06 version "0.1.0";
namespace "urn:recipe:n-package:06";
entity Person;
relation age(p: Person, years: Integer);
relation adult(p: Person);
rule Adult strict {
for p: Person;
for years: Integer;
when age(p, years) and years >= 18;
then adult(p);
}
case PersonCase {
const p: Person = entity_ref("urn:recipe:n-package:06:p");
assert age(p, 18);
}
```
## Frozen execution scene
A local distinguishing scene:
| Facts | Question | Answer |
|---|---|---|
| age(p,18) in given | adult(p) | TRUE_ONLY |
```law
test "given value matches" {
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 age(entity_ref("urn:recipe:n-package:06:p"), 18);
}
evaluate truth(adult(entity_ref("urn:recipe:n-package:06:p")));
expect truth_status == TRUE_ONLY;
}
```
## Counterfactual
`teaches` replaces the value 18 in the case with `17 + 1`: the exact rejection LDC-E1325. Rules in given are forbidden; computation is performed before the fact is presented, or by a program rule.
## Pitfall
A computation in a fact argument does not yield the needed value; it is rejected with LDC-E1325. The fix is to present the ready 18.