docs← Back to article

Markdown for LLMs

LDC-E2142 — A priority edge that settles nothing

The source Markdown for this article. Copy it into your assistant or download it as a text file.

Download this articlePlain text ↗
# LDC-E2142 — A priority edge that settles nothing

## What it means

A priority between two rules settles a genuine conflict: the two rules
must conclude opposite things about the same predicate, so that preferring
one over the other changes the outcome. When both rules conclude the same
thing — literals of one predicate with the same polarity — there is
nothing to settle, and the edge can never change anything under any
arguments. The compiler keeps the package green but warns at the priority.

This is a warning, not a refusal: the package still checks. Give the two
rules complement heads so the edge has a conflict to settle, or drop the
edge if no conflict was meant.

## Example

```law
language "law.core" version "0.2";
package demo.diagnostics version "0.1.0";
namespace "urn:law:demo:diagnostics";

entity Person;
relation member(p: Person) kind empirical;
relation rate(p: Person, r: Integer) kind institutional;
rule A defeasible { for p: Person; when member(p); then rate(p, 15); }
rule B defeasible { for p: Person; when member(p); then rate(p, 20); }
priority P: A > B reason lex_specialis;
```

## Fix

```law
language "law.core" version "0.2";
package demo.diagnostics version "0.1.0";
namespace "urn:law:demo:diagnostics";

entity Person;
relation member(p: Person) kind empirical;
relation rate(p: Person, r: Integer) kind institutional;
rule A defeasible { for p: Person; when member(p); then rate(p, 15); }
rule B defeasible { for p: Person; when member(p); then not rate(p, 20); }
priority P: A > B reason lex_specialis;
```

## Engine message

The engine reports this in its own wording:

```text
example.law:10:10: warning LDC-E2142: priority P is powerless: rule heads `A` and `B` are literals of one predicate `rate` of one polarity, while §105 makes applications opposite only under complement heads; §107 gives such a pair no victory under any arguments. The working form is a guard in the general rule body together with an explicit defeater (§107 item 3 keeps the «правило над дефитером» edge alive) or a §165 decision table
```

## Related

- [Priority](/constructs/priority/) — how conflicts between rules are settled.
- [Defeasible rules](/constructs/rule-defeasible-unless/) — how a rule yields to an exception.