Markdown for LLMs
Accept what an authority established
The source Markdown for this article. Copy it into your assistant or download it as a text file.
# Accept what an authority established
## Intent
I want to check the authority and the form of the answer that establishes a fact.
## Wrong form and why it stays silent
```text title="Incorrect form"
assert judged_fact(P) { origin adjudicated; judgment { authority Court; } }
```
The judgment object is not expressed on the .law/.lawcase surface; it is passed in the case JSON. Without it a compatible answer does not check authority and form.
## Correct form
```law
language "law.core" version "0.2";
package recipes.d.r05 version "0.1.0";
namespace "urn:recipe:d-evidence:05";
entity Person;
external judgment relation judged_fact(p: Person) { authority Court; request_schema Text; }
```
## Frozen execution scene
In the table P and Q are different entities of the page, C is a case; full identifiers are pinned in the scenes.
| Input on 13.09.2026 (a different date is named in the scene) | Question | Answer |
|---|---|---|
| correct authority and form | `truth(judged_fact(P))` | `TRUE_ONLY` / `COMPUTED` |
| foreign authority | `truth(judged_fact(P))` | `NEITHER` / `REQUIRES_JUDGMENT` |
| foreign form | `truth(judged_fact(P))` | `NEITHER` / `REQUIRES_JUDGMENT` |
| without judgment, compatibility | `truth(judged_fact(P))` | `TRUE_ONLY` / `COMPUTED` |
```law
test "matching authority and form establish fact" {
given {
context {
legal_time @2026-09-13;
decision_time @2026-09-13T09:00:00Z;
knowledge_time @2026-09-13T09:00:00Z;
timezone "UTC";
}
}
evaluate truth(judged_fact(entity_ref("urn:recipe:d-evidence:05:p")));
expect truth_status == TRUE_ONLY;
expect evaluation_status == COMPUTED;
}
```
```law
test "foreign authority rejects answer" {
given {
context {
legal_time @2026-09-13;
decision_time @2026-09-13T09:00:00Z;
knowledge_time @2026-09-13T09:00:00Z;
timezone "UTC";
}
}
evaluate truth(judged_fact(entity_ref("urn:recipe:d-evidence:05:p")));
expect truth_status == NEITHER;
expect evaluation_status == REQUIRES_JUDGMENT;
expect issue(JUDGMENT_AUTHORITY_MISMATCH); expect judgment_request(judged_fact, Court);
}
```
```law
test "foreign form rejects answer" {
given {
context {
legal_time @2026-09-13;
decision_time @2026-09-13T09:00:00Z;
knowledge_time @2026-09-13T09:00:00Z;
timezone "UTC";
}
}
evaluate truth(judged_fact(entity_ref("urn:recipe:d-evidence:05:p")));
expect truth_status == NEITHER;
expect evaluation_status == REQUIRES_JUDGMENT;
expect issue(JUDGMENT_PAYLOAD_MISMATCH); expect judgment_request(judged_fact, Court);
}
```
```law
test "missing judgment keeps compatibility" {
given {
context {
legal_time @2026-09-13;
decision_time @2026-09-13T09:00:00Z;
knowledge_time @2026-09-13T09:00:00Z;
timezone "UTC";
}
}
evaluate truth(judged_fact(entity_ref("urn:recipe:d-evidence:05:p")));
expect truth_status == TRUE_ONLY;
expect evaluation_status == COMPUTED;
}
```
An extra scene preserves the refusal of a non-canonical payload: both evaluators reject it alike, with byte-identical canonical documents.
```law
test "malformed Integer payload rejected with identical bytes" {
given {
context {
legal_time @2026-09-13;
decision_time @2026-09-13T09:00:00Z;
knowledge_time @2026-09-13T09:00:00Z;
timezone "UTC";
}
}
evaluate truth(judged_fact(entity_ref("urn:recipe:d-evidence:05:p")));
expect truth_status == NEITHER;
expect evaluation_status == REQUIRES_JUDGMENT;
expect issue(JUDGMENT_PAYLOAD_MISMATCH); expect judgment_request(judged_fact, Court);
}
```
```python
>>> import runpy
>>> check = runpy.run_path("docs/recipes/d-evidence/resources/check.py")
>>> check["check_judgment"](https://github.com/arxohq/law/blob/master/docs/recipes/d-evidence/5)
'Д5: полный ответ и отказы проверены; строковый Integer отвергается одинаково'
```
Resource `05-authority.json`:
```json
{
"id": "urn:recipe:d-evidence:05#case",
"context": {
"legalTime": "2026-09-13",
"decisionTime": "2026-09-13T09:00:00Z",
"knowledgeTime": "2026-09-13T09:00:00Z",
"timezone": "UTC"
},
"assertions": [
{
"id": "urn:recipe:d-evidence:05#answer",
"kind": "assertion",
"package": "urn:recipe:d-evidence:05",
"origin": "adjudicated",
"evidence": [],
"literal": {
"kind": "literal",
"predicate": "urn:recipe:d-evidence:05#judged_fact",
"polarity": "positive",
"args": [
{
"kind": "entity_ref",
"id": "urn:recipe:d-evidence:05:p"
}
]
},
"judgment": {
"authority": "urn:recipe:d-evidence:05#Other",
"payload": {
"kind": "value",
"type": {
"name": "urn:law:std#Text"
},
"value": "установлено"
}
},
"contentHash": "sha256:de47b0c62d9f85555e1331c977d81092bf8e652f26575a77f64d2f77994a260f"
}
]
}
```
Resource `05-legacy.json`:
```json
{
"id": "urn:recipe:d-evidence:05#case",
"context": {
"legalTime": "2026-09-13",
"decisionTime": "2026-09-13T09:00:00Z",
"knowledgeTime": "2026-09-13T09:00:00Z",
"timezone": "UTC"
},
"assertions": [
{
"id": "urn:recipe:d-evidence:05#answer",
"kind": "assertion",
"package": "urn:recipe:d-evidence:05",
"origin": "adjudicated",
"evidence": [],
"literal": {
"kind": "literal",
"predicate": "urn:recipe:d-evidence:05#judged_fact",
"polarity": "positive",
"args": [
{
"kind": "entity_ref",
"id": "urn:recipe:d-evidence:05:p"
}
]
},
"contentHash": "sha256:bdfbfbf5a6fdbfc0fc991e5f6529ff94fdc69bbf9e3c98a1065a82fd417ac03e"
}
]
}
```
Resource `05-malformed.json`:
```json
{
"id": "urn:recipe:d-evidence:05#case",
"context": {
"legalTime": "2026-09-13",
"decisionTime": "2026-09-13T09:00:00Z",
"knowledgeTime": "2026-09-13T09:00:00Z",
"timezone": "UTC"
},
"assertions": [
{
"id": "urn:recipe:d-evidence:05#answer",
"kind": "assertion",
"package": "urn:recipe:d-evidence:05",
"origin": "adjudicated",
"evidence": [],
"literal": {
"kind": "literal",
"predicate": "urn:recipe:d-evidence:05#judged_fact",
"polarity": "positive",
"args": [
{
"kind": "entity_ref",
"id": "urn:recipe:d-evidence:05:p"
}
]
},
"judgment": {
"authority": "urn:recipe:d-evidence:05#Court",
"payload": {
"kind": "value",
"type": {
"name": "urn:law:std#Integer"
},
"value": "1"
}
},
"contentHash": "sha256:2db84bbb82469aa35d0be8f6d12c8b5897e4653a23c787f75be455b4e0013aca"
}
]
}
```
Resource `05-payload.json`:
```json
{
"id": "urn:recipe:d-evidence:05#case",
"context": {
"legalTime": "2026-09-13",
"decisionTime": "2026-09-13T09:00:00Z",
"knowledgeTime": "2026-09-13T09:00:00Z",
"timezone": "UTC"
},
"assertions": [
{
"id": "urn:recipe:d-evidence:05#answer",
"kind": "assertion",
"package": "urn:recipe:d-evidence:05",
"origin": "adjudicated",
"evidence": [],
"literal": {
"kind": "literal",
"predicate": "urn:recipe:d-evidence:05#judged_fact",
"polarity": "positive",
"args": [
{
"kind": "entity_ref",
"id": "urn:recipe:d-evidence:05:p"
}
]
},
"judgment": {
"authority": "urn:recipe:d-evidence:05#Court",
"payload": {
"kind": "value",
"type": {
"name": "urn:law:std#Integer"
},
"value": 1
}
},
"contentHash": "sha256:a2910ccbdf167e0c260602da16ea5eab9376240b498df1e6a8a09e653cce9925"
}
]
}
```
Resource `05-valid.json`:
```json
{
"id": "urn:recipe:d-evidence:05#case",
"context": {
"legalTime": "2026-09-13",
"decisionTime": "2026-09-13T09:00:00Z",
"knowledgeTime": "2026-09-13T09:00:00Z",
"timezone": "UTC"
},
"assertions": [
{
"id": "urn:recipe:d-evidence:05#answer",
"kind": "assertion",
"package": "urn:recipe:d-evidence:05",
"origin": "adjudicated",
"evidence": [],
"literal": {
"kind": "literal",
"predicate": "urn:recipe:d-evidence:05#judged_fact",
"polarity": "positive",
"args": [
{
"kind": "entity_ref",
"id": "urn:recipe:d-evidence:05:p"
}
]
},
"judgment": {
"authority": "urn:recipe:d-evidence:05#Court",
"payload": {
"kind": "value",
"type": {
"name": "urn:law:std#Text"
},
"value": "установлено"
}
},
"contentHash": "sha256:fc301d6c5804b7048a9d40cb7be2797e300843fd3966c00b6de1f4a6f8f741b9"
}
]
}
```
## Counterfactual
Diagnostic mutation (check) — LDC-E0201.
Original fragment:
```law
external judgment relation judged_fact(p: Person) { authority Court; request_schema Text; }
```
Replacement:
```law
external judgment relation judged_fact(p: Person) { authority Court; request_schema Text; }
assert judged_fact(entity_ref("urn:recipe:d-evidence:05:p")) { origin adjudicated; judgment { authority Court; } }
```
The paired scenes above pin the change of outcome.
## Boundary
An answer without judgment is accepted under v1 compatibility. That is not a guarantee of provenance; a checkable authority needs the full object. For a predicate protected by a policy, even an adjudicated assertion does not bypass mandatory support.
A non-canonical Integer carrying the string `"1"` is rejected by both evaluators with byte-identical documents; the ordinary “foreign form” scene uses the canonical JSON number 1.
The defect of accepting case_input in the channel is described in [A judge's answer with authority and form](/recipes/z-interpretations/judge-answer/); this page does not promise to remove it.
## Pitfall
The judgment object lives in the case JSON, not on the .law/.lawcase surface: without it a compatible answer does not check authority and form.