Skip to content
docs
Arxo ↗

Compare two acts on one case

For LLMs7 sections

I want to compare two acts on one case.

The same predicate name does not prove the same formalization depth. One .lawtest does not execute two programs at once.

Incorrect form
fragment F in Missing
Arxo Law
language "law.core" version "0.2";
package recipe.m05 version "1.0.0";
namespace "urn:recipe:m-queries:05";
source Act { kind policy; }
edition E of Act { language ru; officiality unofficial; materialization_status ABSTRACT_ONLY; in_force [@2026-01-01, infinity); }
fragment F in E { kind article; locator "article/1"; text ru unofficial "Статья 1. Заявление принимается."; }
entity Person;
relation registered(p: Person);
relation eligible(p: Person);
relation approved(p: Person);
@source(F)
rule Decide strict { for p: Person; when registered(p) and eligible(p); then approved(p); }
Input / variantQuestionExpectation
1. full inputtruth(approved(entity_ref("urn:recipe:m-queries:p")))truth_status == TRUE_ONLY; evaluation_status == COMPUTED;
2. no conditiontruth(approved(entity_ref("urn:recipe:m-queries:p")))truth_status == NEITHER; evaluation_status == COMPUTED;
3. no registrationtruth(approved(entity_ref("urn:recipe:m-queries:p")))truth_status == NEITHER; evaluation_status == COMPUTED;
full input establishes
Arxo Law
test "full input establishes" {
given {
context { legal_time @2026-09-13; decision_time @2026-09-13T09:00:00Z; knowledge_time @2026-09-13T09:00:00Z; timezone "UTC"; }
assert registered(entity_ref("urn:recipe:m-queries:p")); assert eligible(entity_ref("urn:recipe:m-queries:p"));
}
evaluate truth(approved(entity_ref("urn:recipe:m-queries:p")));
expect truth_status == TRUE_ONLY; expect evaluation_status == COMPUTED;
}
missing condition gives neither
Arxo Law
test "missing condition gives neither" {
given {
context { legal_time @2026-09-13; decision_time @2026-09-13T09:00:00Z; knowledge_time @2026-09-13T09:00:00Z; timezone "UTC"; }
assert registered(entity_ref("urn:recipe:m-queries:p"));
}
evaluate truth(approved(entity_ref("urn:recipe:m-queries:p")));
expect truth_status == NEITHER; expect evaluation_status == COMPUTED;
}
missing registration gives neither
Arxo Law
test "missing registration gives neither" {
given {
context { legal_time @2026-09-13; decision_time @2026-09-13T09:00:00Z; knowledge_time @2026-09-13T09:00:00Z; timezone "UTC"; }
assert eligible(entity_ref("urn:recipe:m-queries:p"));
}
evaluate truth(approved(entity_ref("urn:recipe:m-queries:p")));
expect truth_status == NEITHER; expect evaluation_status == COMPUTED;
}

The second pinned world is shown below:

Arxo Law
language "law.core" version "0.2";
package recipe.m05 version "1.0.0";
namespace "urn:recipe:m-queries:05";
source Act { kind policy; }
edition E of Act { language ru; officiality unofficial; materialization_status ABSTRACT_ONLY; in_force [@2026-01-01, infinity); }
fragment F in E { kind article; locator "article/1"; text ru unofficial "Статья 1. Заявление принимается."; }
entity Person;
relation registered(p: Person);
relation eligible(p: Person);
relation approved(p: Person);
@source(F)
rule Decide strict { for p: Person; when registered(p); then approved(p); }

The same case and query bytes are fed separately to each program. For the three table rows world B yields TRUE_ONLY, TRUE_ONLY, NEITHER respectively. The criterion is truthStatus of one approved(p), not similarity of answer text. Ordinary law_measure confirms for both worlds one article at depth EXECUTABLE. Different programHash with the same caseHash is expected.

Check of result fields and extra inputs:

Python
>>> import runpy
>>> checks = runpy.run_path("docs/recipes/m-queries/resources/check.py")
>>> checks["worlds"](https://github.com/arxohq/law/blob/master/docs/recipes/m-queries/5)
True

The sidecar mutation reproduces LDC-E5102. Counterfactual table variants are executed separately; input errors are not passed off as NEITHER.

Comparison is by an explicitly same observed quantity approved(p), not by equality of hashes of different programs. The synthetic second act uses the same interface; these are two separate pinned worlds, not a merge of them.

SOURCE_ONLY is not comparable with EXECUTABLE as the same formalization — see Measure formalization depth.

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

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