Skip to content
docs
Arxo ↗

Forbid an incompatible combination

For LLMs6 sections

I want to detect incompatibility of two qualifications without a hidden derivation of negation.

Incorrect form
// require not adult(p) считают производителем not adult(p).

A constraint reads supports four-valued, but does not add them. A constraint violation is a check finding, not a legal violation of a position.

Arxo Law
language "law.core" version "0.2";
package recipes.g.r05 version "0.1.0";
namespace "urn:recipe:g-concepts:05";
entity Person;
relation eligible(p: Person) kind institutional;
relation young(p: Person) kind empirical;
relation adult(p: Person);
constraint Exclusive(p: Person) { when young(p); require not adult(p); severity error; }
Facts on 13.09.2026QuestionAnswer
combination presentedtruth(adult(entity_ref("urn:recipe:g-concepts:05:p")))truth_status == TRUE_ONLY; issue(CONSTRAINT_VIOLATED); / NON_EXECUTABLE
second status unknowntruth(adult(entity_ref("urn:recipe:g-concepts:05:p")))truth_status == NEITHER; / COMPUTED
exclusion provedtruth(adult(entity_ref("urn:recipe:g-concepts:05:p")))truth_status == FALSE_ONLY; / COMPUTED
without the constrainttruth(adult(entity_ref("urn:recipe:g-concepts:05:p")))truth_status == TRUE_ONLY; not issue(CONSTRAINT_VIOLATED); / COMPUTED
presented combination violates constraint
Arxo Law
test "presented combination violates constraint" {
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 young(entity_ref("urn:recipe:g-concepts:05:p")); assert adult(entity_ref("urn:recipe:g-concepts:05:p"));
}
evaluate truth(adult(entity_ref("urn:recipe:g-concepts:05:p")));
expect truth_status == TRUE_ONLY; expect issue(CONSTRAINT_VIOLATED);
expect evaluation_status == NON_EXECUTABLE;
}
unknown second status stays open
Arxo Law
test "unknown second status stays open" {
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 young(entity_ref("urn:recipe:g-concepts:05:p"));
}
evaluate truth(adult(entity_ref("urn:recipe:g-concepts:05:p")));
expect truth_status == NEITHER;
expect evaluation_status == COMPUTED;
}
proven exception refutes
Arxo Law
test "proven exception refutes" {
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 young(entity_ref("urn:recipe:g-concepts:05:p")); assert not adult(entity_ref("urn:recipe:g-concepts:05:p"));
}
evaluate truth(adult(entity_ref("urn:recipe:g-concepts:05:p")));
expect truth_status == FALSE_ONLY;
expect evaluation_status == COMPUTED;
}
removed constraint restores truth
Arxo Law
test "removed constraint 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 young(entity_ref("urn:recipe:g-concepts:05:p")); assert adult(entity_ref("urn:recipe:g-concepts:05:p"));
}
evaluate truth(adult(entity_ref("urn:recipe:g-concepts:05:p")));
expect truth_status == TRUE_ONLY; expect not issue(CONSTRAINT_VIOLATED);
expect evaluation_status == COMPUTED;
}

Constraint verdicts are read from separate CONSTRAINT results and checked together with constraint_check nodes.

Python
>>> import runpy
>>> check = runpy.run_path("docs/recipes/g-concepts/resources/check.py")
>>> check["check_constraints"](https://github.com/arxohq/law/blob/master/docs/recipes/g-concepts/5)
'Г5: вердикты ограничений проверены; lawc = lawref'

Mutation require not adult(p); → then not adult(p);: LDC-E0201.

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.

A rule of negative qualification is written separately. Even a VIOLATED constraint does not automatically create a sanction or a negative fact.

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

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