docs← Back to article

Markdown for LLMs

LDC-E2109 — A proposition where a value is required

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

Download this articlePlain text ↗
# LDC-E2109 — A proposition where a value is required

## What it means

A relation call is an assertion, not a value: it says something holds,
but it yields nothing a computation can carry. Positions that need a
value — a conditional guard, a match subject, an argument — cannot take
a bare assertion. The compiler stops at the spot and asks for a real
value expression.

Wrapping the assertion in an explicit status test, or moving it into
the rule body and matching over a value, fixes it. There is no silent
reading of an assertion as true.

## Example

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

relation p(x: Text) kind evaluative;
relation m(x: Text, a: Money) kind empirical;
relation out(x: Text, a: Money) kind institutional;
rule R strict { for x: Text; for a: Money; for b: Money; when m(x, a) and m(x, b); then out(x, if p(x) then a else b); }
```

## Fix

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

relation p(x: Text) kind evaluative;
relation m(x: Text, a: Money) kind empirical;
relation out(x: Text, a: Money) kind institutional;
rule R strict { for x: Text; for a: Money; for b: Money; when m(x, a) and m(x, b); then out(x, if established(p(x)) then a else b); }
```

## Engine message

The engine reports this in its own wording:

```text
example.law:8:99: error LDC-E2109: conditional-expression condition is a Boolean data expression (§56): "p" is a proposition, and there is no implicit §66 `established` in a data conditional; write the status test explicitly: `established(p(…))`, `supported(…)`, `not_known(…)`
```

## Related

- [Expressions and quantities](/constructs/expressions-quantities/) — where values are required.
- [Negation and status](/constructs/negation-and-status/) — how status tests read assertions.