Skip to content
docs
Arxo ↗

Declare relation functionality

For LLMs6 sections

I want to detect two values of one key while keeping both facts.

Incorrect form
// При двух адресах ключ выбирает последний; при отсутствии адреса доказывает отрицание.

KEY_CONFLICT reports two incompatible projections without deleting either. A key does not give completeness and does not prove that a row exists.

Arxo Law
language "law.core" version "0.2";
package recipes.g.r11 version "0.1.0";
namespace "urn:recipe:g-concepts:11";
entity Person;
relation address(p: Person, city: Text) kind empirical { key(p); }
relation eligible(p: Person);
rule Registered strict { for p: Person; for city: Text; when address(p, city); then eligible(p); }
Facts on 13.09.2026QuestionAnswer
first value kepttruth(address(entity_ref("urn:recipe:g-concepts:11:p"), "A"))truth_status == TRUE_ONLY; issue(KEY_CONFLICT); / NON_EXECUTABLE
second value kepttruth(address(entity_ref("urn:recipe:g-concepts:11:p"), "B"))truth_status == TRUE_ONLY; issue(KEY_CONFLICT); / NON_EXECUTABLE
address unknowntruth(address(entity_ref("urn:recipe:g-concepts:11:p"), "A"))truth_status == NEITHER; / COMPUTED
key removedtruth(address(entity_ref("urn:recipe:g-concepts:11:p"), "A"))truth_status == TRUE_ONLY; not issue(KEY_CONFLICT); / COMPUTED
first value kept under conflict
Arxo Law
test "first value kept under conflict" {
given {
context {
legal_time @2026-09-13;
decision_time @2026-09-13T09:00:00+05:00;
knowledge_time @2026-09-13T09:00:00+05:00;
timezone "Asia/Almaty";
}
assert address(entity_ref("urn:recipe:g-concepts:11:p"), "A"); assert address(entity_ref("urn:recipe:g-concepts:11:p"), "B");
}
evaluate truth(address(entity_ref("urn:recipe:g-concepts:11:p"), "A"));
expect truth_status == TRUE_ONLY; expect issue(KEY_CONFLICT);
expect evaluation_status == NON_EXECUTABLE;
}
second value kept under conflict
Arxo Law
test "second value kept under conflict" {
given {
context {
legal_time @2026-09-13;
decision_time @2026-09-13T09:00:00+05:00;
knowledge_time @2026-09-13T09:00:00+05:00;
timezone "Asia/Almaty";
}
assert address(entity_ref("urn:recipe:g-concepts:11:p"), "A"); assert address(entity_ref("urn:recipe:g-concepts:11:p"), "B");
}
evaluate truth(address(entity_ref("urn:recipe:g-concepts:11:p"), "B"));
expect truth_status == TRUE_ONLY; expect issue(KEY_CONFLICT);
expect evaluation_status == NON_EXECUTABLE;
}
unknown address stays unknown
Arxo Law
test "unknown address stays unknown" {
given {
context {
legal_time @2026-09-13;
decision_time @2026-09-13T09:00:00+05:00;
knowledge_time @2026-09-13T09:00:00+05:00;
timezone "Asia/Almaty";
}
}
evaluate truth(address(entity_ref("urn:recipe:g-concepts:11:p"), "A"));
expect truth_status == NEITHER;
expect evaluation_status == COMPUTED;
}
removed key restores truth
Arxo Law
test "removed key restores truth" {
given {
context {
legal_time @2026-09-13;
decision_time @2026-09-13T09:00:00+05:00;
knowledge_time @2026-09-13T09:00:00+05:00;
timezone "Asia/Almaty";
}
assert address(entity_ref("urn:recipe:g-concepts:11:p"), "A"); assert address(entity_ref("urn:recipe:g-concepts:11:p"), "B");
}
evaluate truth(address(entity_ref("urn:recipe:g-concepts:11:p"), "A"));
expect truth_status == TRUE_ONLY; expect not issue(KEY_CONFLICT);
expect evaluation_status == COMPUTED;
}

Mutation key(p); → key(missing);: LDC-E1304.

An issue with error severity forbids a COMPUTED document: CONSTRAINT_VIOLATED and KEY_CONFLICT make the whole document NON_EXECUTABLE. This does not erase the fact’s truth status and does not change the constraint verdict.

Choosing a single value requires only and cardinality handling. Two positive tuples do not make each atom BOTH: this is a data conflict, not negative support.

Documentation for Arxo. Writings — blog.arxo.io.

Anonymous visit counts on stats.arxo.io, no cookies.