Skip to content
docs
Arxo ↗

Walk a chain with strict recursion

For LLMs7 sections

I want to derive reachability along a finite chain of relations.

A recursive bare reader forms a status cycle:

Incorrect form
when reach(a, b) and edge(b, c);
then reach(a, c);
Arxo Law
language "law.core" version "0.2";
package recipes.v.r07 version "0.1.0";
namespace "urn:recipe:v-negation:07";
entity Person;
relation edge(a: Person, b: Person);
relation reach(a: Person, b: Person);
rule Base strict {
for a: Person; for b: Person;
when edge(a, b);
then reach(a, b);
}
rule Step strict {
for a: Person; for b: Person; for c: Person;
when monotone(reach(a, b)) and edge(b, c);
then reach(a, c);
}
FactsQuestionAnswer
edge(a,b), edge(b,c)reach(a,c)TRUE_ONLY
edge(a,b)reach(a,c)NEITHER
no base factsreach(a,c)NEITHER
replace monotone with barecheckE4102
linked edges reach far end
Arxo Law
test "linked edges reach far end" {
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 edge(entity_ref("urn:recipe:v-negation:07:a"), entity_ref("urn:recipe:v-negation:07:b"));
assert edge(entity_ref("urn:recipe:v-negation:07:b"), entity_ref("urn:recipe:v-negation:07:c"));
}
evaluate truth(reach(entity_ref("urn:recipe:v-negation:07:a"), entity_ref("urn:recipe:v-negation:07:c")));
expect truth_status == TRUE_ONLY;
expect applied(Step);
}
single edge reaches nowhere
Arxo Law
test "single edge reaches nowhere" {
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 edge(entity_ref("urn:recipe:v-negation:07:a"), entity_ref("urn:recipe:v-negation:07:b"));
}
evaluate truth(reach(entity_ref("urn:recipe:v-negation:07:a"), entity_ref("urn:recipe:v-negation:07:c")));
expect truth_status == NEITHER;
}
no edges yield nothing
Arxo Law
test "no edges yield nothing" {
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(reach(entity_ref("urn:recipe:v-negation:07:a"), entity_ref("urn:recipe:v-negation:07:c")));
expect truth_status == NEITHER;
}

teaches drops monotone from the recursive reading and gets E4102. The two-edge scene confirms the transitive step; the scene without a base excludes spontaneous support.

Every reading inside the cycle must be monotone; empirical edge does not recurse. This form does not compute a previous round and does not allow a cycle through an aggregate. Names and computed values join only under compatible terms; a universal ban “two monotones do not join” is false.

Read the recursive step with monotone, not supported: supported is the deliberate disputed-fact reading of Use a disputed fact deliberately, and using it for ordinary recursion needlessly lifts the whole package to a higher stratum.

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

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