Skip to content
docs
Arxo ↗

Define necessary and sufficient conditions

For LLMs6 sections

I want to derive a concept from sufficient conditions and check its necessary conditions.

A backward step does not appear on its own.

Incorrect form
// Из not young(p) автоматически получают not eligible(p).

exact creates a forward strict rule and a necessary constraint. Negative classification and backward inference do not arise automatically.

Arxo Law
language "law.core" version "0.2";
package recipes.g.r01 version "0.1.0";
namespace "urn:recipe:g-concepts:01";
entity Person;
relation young(p: Person) kind empirical;
definition eligible(p: Person) exact { when young(p); }
Facts on 13.09.2026QuestionAnswer
sufficient conditiontruth(eligible(entity_ref("urn:recipe:g-concepts:01:p")))truth_status == TRUE_ONLY; / COMPUTED
no contrapositiontruth(eligible(entity_ref("urn:recipe:g-concepts:01:p")))truth_status == NEITHER; / COMPUTED
no backward inferencetruth(young(entity_ref("urn:recipe:g-concepts:01:p")))truth_status == NEITHER; / COMPUTED
necessity violatedtruth(eligible(entity_ref("urn:recipe:g-concepts:01:p")))truth_status == TRUE_ONLY; issue(CONSTRAINT_VIOLATED); / NON_EXECUTABLE
sufficient condition holds
Arxo Law
test "sufficient condition holds" {
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:01:p"));
}
evaluate truth(eligible(entity_ref("urn:recipe:g-concepts:01:p")));
expect truth_status == TRUE_ONLY;
expect evaluation_status == COMPUTED;
}
no contraposition
Arxo Law
test "no contraposition" {
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 not young(entity_ref("urn:recipe:g-concepts:01:p"));
}
evaluate truth(eligible(entity_ref("urn:recipe:g-concepts:01:p")));
expect truth_status == NEITHER;
expect evaluation_status == COMPUTED;
}
no converse derivation
Arxo Law
test "no converse derivation" {
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 eligible(entity_ref("urn:recipe:g-concepts:01:p"));
}
evaluate truth(young(entity_ref("urn:recipe:g-concepts:01:p")));
expect truth_status == NEITHER;
expect evaluation_status == COMPUTED;
}
violated necessity blocks document
Arxo Law
test "violated necessity blocks document" {
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 eligible(entity_ref("urn:recipe:g-concepts:01:p")); assert not young(entity_ref("urn:recipe:g-concepts:01:p"));
}
evaluate truth(eligible(entity_ref("urn:recipe:g-concepts:01:p")));
expect truth_status == TRUE_ONLY; expect issue(CONSTRAINT_VIOLATED);
expect evaluation_status == NON_EXECUTABLE;
}

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/1)
'Г1: вердикты ограничений проверены; lawc = lawref'

Mutation definition eligible(p: Person) exact → relation eligible(p: Person); definition eligible(p: Person) exact: LDC-E1201.

The compiler itself declares the definition symbol: a separate relation of the same name is rejected with E1201/E1338. The minimal working form above does not duplicate the declaration.

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.

The necessary half yields a constraint finding, not a new young fact. Exceptions require classification defeasible or separate rules.

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

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