Markdown for LLMs
Submit a negative fact
The source Markdown for this article. Copy it into your assistant or download it as a text file.
# Submit a negative fact
## Intention
I want to tell the case that a person is not insured.
## Incorrect form and why it stays silent
Polarity is written before the atom. A field in the assertion body does not replace not:
```text title="Incorrect form"
assert insured(person) { polarity negative; }
```
A second error is to negate the whole conjunction: `not (registered(p) and insured(p))` is rejected.
## Correct form
```law
language "law.core" version "0.2";
package recipes.v.r02 version "0.1.0";
namespace "urn:recipe:v-negation:02";
entity Person;
relation registered(p: Person);
relation insured(p: Person);
relation notice(p: Person);
rule Notice strict {
for p: Person;
when registered(p) and not insured(p);
then notice(p);
}
```
## Frozen execution scene
| Facts | Question | Answer |
|---|---|---|
| registered(a), assert not insured(a) | notice(a) | TRUE_ONLY |
| registered(a), insured(a) { polarity negative; } | notice(a) | NEITHER |
| registered(a), no insured | notice(a) | NEITHER |
```law
test "explicit negative fact triggers notice" {
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 registered(entity_ref("urn:recipe:v-negation:02:a"));
assert not insured(entity_ref("urn:recipe:v-negation:02:a"));
}
evaluate truth(notice(entity_ref("urn:recipe:v-negation:02:a")));
expect truth_status == TRUE_ONLY;
expect applied(Notice);
}
```
```law
test "polarity field is no negation" {
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 registered(entity_ref("urn:recipe:v-negation:02:a"));
assert insured(entity_ref("urn:recipe:v-negation:02:a")) { polarity negative; }
}
evaluate truth(notice(entity_ref("urn:recipe:v-negation:02:a")));
expect truth_status == NEITHER;
expect not applied(Notice);
}
```
## Counterfactual
The two scene files differ in how the negative fact is written; the second keeps the wrong answer. teaches separately pins the ban on not over a conjunction (E1305).
## Boundary
A negative fact must have its own ground; negating a compound formula is rejected.
## Pitfall
`polarity negative` does not give negative support; the fix is `assert not`.