Skip to content
docs
Arxo ↗

Power and valid exercise

For LLMs6 sections

I want to create an effect only when a valid power is exercised.

Incorrect form
effect approve(valid(p));

A homemade effect name is not a materialization operation. This example needs create; the mere presence of a power does not create the effect.

Arxo Law
language "law.core" version "0.2";
package recipes.a.r06 version "0.1.0";
namespace "urn:recipe:a-positions:06";
entity Person;
relation registered(p: Person);
relation done(p: Person);
relation sign(p: Person);
relation competent(p: Person);
relation valid(p: Person);
rule Grant strict { for p: Person; when registered(p);
then power Permit { holder p; exercise sign(p); valid_when competent(p); effect create(valid(p)); };
}
Facts and snapshotQuestionAnswer
power without exercise; 2026-09-05truth(valid(entity_ref("urn:recipe:a-positions:06:p")))truth_status == NEITHER; / COMPUTED
valid exercise; 2026-09-05truth(valid(entity_ref("urn:recipe:a-positions:06:p")))truth_status == TRUE_ONLY; / COMPUTED
competence not presented; 2026-09-05truth(valid(entity_ref("urn:recipe:a-positions:06:p")))truth_status == NEITHER; / COMPUTED
power without exercise stays unknown
Arxo Law
test "power without exercise stays unknown" {
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:06:p")); assert competent(entity_ref("urn:recipe:a-positions:06:p"));
}
evaluate truth(valid(entity_ref("urn:recipe:a-positions:06:p")));
expect truth_status == NEITHER;
expect evaluation_status == COMPUTED;
}
valid exercise establishes effect
Arxo Law
test "valid exercise establishes effect" {
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:06:p")); assert competent(entity_ref("urn:recipe:a-positions:06:p")); assert sign(entity_ref("urn:recipe:a-positions:06:p"));
}
evaluate truth(valid(entity_ref("urn:recipe:a-positions:06:p")));
expect truth_status == TRUE_ONLY;
expect evaluation_status == COMPUTED;
}
missing competence blocks exercise
Arxo Law
test "missing competence blocks exercise" {
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:06:p")); assert sign(entity_ref("urn:recipe:a-positions:06:p"));
}
evaluate truth(valid(entity_ref("urn:recipe:a-positions:06:p")));
expect truth_status == NEITHER;
expect evaluation_status == COMPUTED;
expect issue(POWER_INVALID_EXERCISE);
}

effect create(valid(p)) is replaced with effect approve(valid(p)): check and lower are green, the effect is not created; the answer is NEITHER.

renamed effect creates nothing
Arxo Law
test "renamed effect creates nothing" {
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:06:p")); assert competent(entity_ref("urn:recipe:a-positions:06:p")); assert sign(entity_ref("urn:recipe:a-positions:06:p"));
}
evaluate truth(valid(entity_ref("urn:recipe:a-positions:06:p")));
expect truth_status == NEITHER;
expect evaluation_status == COMPUTED;
}
Python
>>> import runpy
>>> check = runpy.run_path("docs/recipes/a-positions/resources/check.py")
>>> check["check_variant"](https://github.com/arxohq/law/blob/master/docs/recipes/a-positions/6)
'А6: контрфактуал подтверждён; lawc = lawref'

Mutation: valid_when competent(p); → “; rejection LDC-E1305. Additional counterfactuals are shown as separate scenes.

Exercise here is represented by an established relation of accepted exercise. For presenting events with time, see Present an event with a time. terminate/modify and unsupported operations are not substituted with create.

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

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