docs← Back to article

Markdown for LLMs

Not prohibited as a query

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

Download this articlePlain text ↗
# Not prohibited as a query

## Intention

I want to ask about the absence of a prohibition in an explicitly chosen universe.

## Incorrect form and why it stays silent

```text title="Incorrect form"
evaluate weak_permission(p, act(p));
expect value == true; // полнота не задана
```

On the executable surface the query is named weak_permission. Without a completeness policy it yields MISSING_POLICY, not a true permission; the query.policy policy is passed as a JSON query below.

## Correct form

```law
language "law.core" version "0.2";
package recipes.a.r12 version "0.1.0";
namespace "urn:recipe:a-positions:12";

entity Person;
relation registered(p: Person);
relation done(p: Person);
relation act(p: Person);
rule R strict { for p: Person; when registered(p);
    then prohibition Ban { bearer p; action act(p); window [@2026-09-01, @2026-09-10]; };
}
```

## Frozen execution scene

The test blocks are shown as text: this is a `lower-test` input, not a program. Putting `weak_permission` in a law block causes E2105/E2109 at program check; a separate lower-test recognises the query. The JSON policy is passed explicitly by the adapter, without its own permission computation.

| Facts and snapshot | Question | Answer |
|---|---|---|
| no prohibition, completeness not declared; 2026-09-05 | `weak_permission(entity_ref("urn:recipe:a-positions:12:p"), act(entity_ref("urn:recipe:a-positions:12:p")))` | `` / `MISSING_POLICY` |

```law
test "weak permission without universe stays missing" {
    given {
        context {
            legal_time @2026-09-05;
            decision_time @2026-09-05T09:00:00+05:00;
            knowledge_time @2026-09-30T09:00:00+05:00;
            timezone "Asia/Almaty";
        }

    }
    evaluate weak_permission(entity_ref("urn:recipe:a-positions:12:p"), act(entity_ref("urn:recipe:a-positions:12:p")));

    expect evaluation_status == MISSING_POLICY;
    expect issue(MISSING_POLICY);
}
```

Pinned JSON query: the rules of the presented package are declared a complete universe of applicable prohibitions. Time and program composition are taken from each scene.

```json
{
  "action": {
    "args": [
      {
        "id": "urn:recipe:a-positions:12:p",
        "kind": "entity_ref"
      }
    ],
    "function": "urn:recipe:a-positions:12#act",
    "kind": "call"
  },
  "actor": {
    "id": "urn:recipe:a-positions:12:p",
    "kind": "entity_ref"
  },
  "kind": "weak_permission",
  "queryId": "urn:recipe:a-positions:12#policy-query",
  "policy": {
    "ruleUniverse": true
  }
}
```

No prohibition → true. The policy is added by the JSON query shown.

```law
test "full universe grants permission when no ban" {
    given {
        context {
            legal_time @2026-09-05;
            decision_time @2026-09-05T09:00:00+05:00;
            knowledge_time @2026-09-30T09:00:00+05:00;
            timezone "Asia/Almaty";
        }

    }
    evaluate weak_permission(entity_ref("urn:recipe:a-positions:12:p"), act(entity_ref("urn:recipe:a-positions:12:p")));

    expect evaluation_status == COMPUTED;
    expect value == true;
}
```

The prohibition is active → false. The policy is added by the JSON query shown.

```law
test "active ban denies permission under full universe" {
    given {
        context {
            legal_time @2026-09-05;
            decision_time @2026-09-05T09:00:00+05:00;
            knowledge_time @2026-09-30T09:00:00+05:00;
            timezone "Asia/Almaty";
        }
        assert registered(entity_ref("urn:recipe:a-positions:12:p"));
    }
    evaluate weak_permission(entity_ref("urn:recipe:a-positions:12:p"), act(entity_ref("urn:recipe:a-positions:12:p")));

    expect evaluation_status == COMPUTED;
    expect value == false;
}
```

```python
>>> import runpy
>>> check = runpy.run_path("docs/recipes/a-positions/resources/check.py")
>>> check["check_policy"]()
'А12: без запрета true; с запретом false; lawc = lawref'
```

Counterfactual test of a mistaken permission conclusion without a policy: expected FAIL; the correct MISSING_POLICY is pinned by the first scene.

```law
test "permission without policy stays unproven" {
    given {
        context {
            legal_time @2026-09-05;
            decision_time @2026-09-05T09:00:00+05:00;
            knowledge_time @2026-09-30T09:00:00+05:00;
            timezone "Asia/Almaty";
        }

    }
    evaluate weak_permission(entity_ref("urn:recipe:a-positions:12:p"), act(entity_ref("urn:recipe:a-positions:12:p")));

    expect evaluation_status == COMPUTED;
    expect value == true;

}
```

## Counterfactual

Mutation: `action act(p);` → ``; rejection LDC-E1305. Additional counterfactuals are shown as separate scenes.

## Boundary

The query form in prose weakly_permitted and the surface name weak_permission differ. A positive answer requires an explicitly given ruleUniverse; an ordinary .lawtest does not add the policy for the author.