docs← Back to article

Markdown for LLMs

LDC-E4704 — A closure over a protected predicate

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

Download this articlePlain text ↗
# LDC-E4704 — A closure over a protected predicate

## What it means

A closure over a guarded fact would materialize its negative straight
from silence, bypassing the acceptance phase entirely. The guarded fact
must stay undecided until support for it is accepted, so the compiler
refuses the closure at the policy.

Close a different predicate, or lift the guard.

## Example

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

entity Thing;
relation paid(t: Thing) kind empirical;
relation scope1(t: Thing) kind institutional;
relation ev_edge(edge: Text, doc: Text, link: Text) kind empirical;
relation accepted_support(edge: Text) kind institutional;
rule Judge strict { for edge: Text; for doc: Text; when ev_edge(edge, doc, "supports"); then accepted_support(edge); }
closure PaidClosed { predicate paid; domain scope1; snapshot "urn:law:demo:snap"; complete_as_of @2026-01-01T00:00:00Z; derive_explicit_negative true; }
evidence policy EvpV1 {
profile "law.core.evidence-policy/0.1";
accepts accepted_support;
protects paid;
input edge ev_edge;
rule Judge;
}
```

## Fix

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

entity Thing;
relation paid(t: Thing) kind empirical;
relation scope1(t: Thing) kind institutional;
relation ev_edge(edge: Text, doc: Text, link: Text) kind empirical;
relation accepted_support(edge: Text) kind institutional;
rule Judge strict { for edge: Text; for doc: Text; when ev_edge(edge, doc, "supports"); then accepted_support(edge); }
closure PaidClosed { predicate scope1; domain scope1; snapshot "urn:law:demo:snap"; complete_as_of @2026-01-01T00:00:00Z; derive_explicit_negative true; }
evidence policy EvpV1 {
profile "law.core.evidence-policy/0.1";
accepts accepted_support;
protects paid;
input edge ev_edge;
rule Judge;
}
```

## Engine message

The engine reports this in its own wording:

```text
example.law:12:1: error LDC-E4704: evidence policy urn:law:demo:diagnostics#EvpV1: closure urn:law:demo:diagnostics#PaidClosed closes a protected predicate urn:law:demo:diagnostics#paid — a materialized negative would bypass the acceptance phase (§78.2.4)
```

## Related

- [Facts and evidence](/constructs/facts-and-evidence/) — what an assertion carries.