At least two of three
Intention
Section titled “Intention”I want to check a vote threshold in an explicitly complete finite body.
A threshold needs a declared completeness flag: the scenes check one of three, two of three, missing completeness, and a completion cycle.
Incorrect form and why it stays silent
Section titled “Incorrect form and why it stays silent”when count(collect p: Person where member(p)) == 3 and count(collect p: Person where member(p) and yes(p)) >= 2;Without a completeness flag three known members are treated as the full body. The yes producer must finish before count: the aggregate reads a frozen layer.
Correct form
Section titled “Correct form”language "law.core" version "0.2";package recipes.l.r07 version "0.1.0";namespace "urn:recipe:l-calc:07";
entity Person;relation member(p: Person);relation ballot(p: Person);relation yes(p: Person);relation complete();relation quorum();rule Positive strict { for p: Person; when ballot(p); then yes(p); }rule Quorum strict { when complete() and count(collect p: Person where member(p)) == 3 and count(collect p: Person where member(p) and yes(p)) >= 2; then quorum();}Frozen execution scene
Section titled “Frozen execution scene”| Facts and choice | Question | Answer |
|---|---|---|
| 1. one of three | truth(quorum()) | NEITHER / COMPUTED |
| 2. two of three, completeness known | truth(quorum()) | TRUE_ONLY / COMPUTED |
| 3. two known votes, completeness not declared | truth(quorum()) | NEITHER / COMPUTED |
| 4. counterfactual: completeness check removed | truth(quorum()) | TRUE_ONLY / COMPUTED |
one of three
test "one of three" { 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 member(entity_ref("urn:recipe:l-calc:07:a")); assert member(entity_ref("urn:recipe:l-calc:07:b")); assert member(entity_ref("urn:recipe:l-calc:07:c")); assert ballot(entity_ref("urn:recipe:l-calc:07:a")); assert complete(); } evaluate truth(quorum()); expect truth_status == NEITHER; expect evaluation_status == COMPUTED;
}two of three, completeness known
test "two of three, completeness known" { 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 member(entity_ref("urn:recipe:l-calc:07:a")); assert member(entity_ref("urn:recipe:l-calc:07:b")); assert member(entity_ref("urn:recipe:l-calc:07:c")); assert ballot(entity_ref("urn:recipe:l-calc:07:a")); assert ballot(entity_ref("urn:recipe:l-calc:07:b")); assert complete(); } evaluate truth(quorum()); expect truth_status == TRUE_ONLY; expect evaluation_status == COMPUTED;
}two known votes, completeness unclaimed
test "two known votes, completeness unclaimed" { 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 member(entity_ref("urn:recipe:l-calc:07:a")); assert member(entity_ref("urn:recipe:l-calc:07:b")); assert member(entity_ref("urn:recipe:l-calc:07:c")); assert ballot(entity_ref("urn:recipe:l-calc:07:a")); assert ballot(entity_ref("urn:recipe:l-calc:07:b")); } evaluate truth(quorum()); expect truth_status == NEITHER; expect evaluation_status == COMPUTED;
}completeness check removed
test "completeness check removed" { 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 member(entity_ref("urn:recipe:l-calc:07:a")); assert member(entity_ref("urn:recipe:l-calc:07:b")); assert member(entity_ref("urn:recipe:l-calc:07:c")); assert ballot(entity_ref("urn:recipe:l-calc:07:a")); assert ballot(entity_ref("urn:recipe:l-calc:07:b")); } evaluate truth(quorum()); expect truth_status == TRUE_ONLY; expect evaluation_status == COMPUTED;
}Counterfactual
Section titled “Counterfactual”Mutation: for p: Person; when ballot(p); → for p: Person; when ballot(p) and quorum();; expected LDC-E4102. Additional counterfactuals are shown as separate table rows.
Boundary
Section titled “Boundary”Threshold and full body are given as conditions; a different denominator or weighted votes needs a different rule.
Pitfall
Section titled “Pitfall”Without the completeness flag, known members are silently treated as the full body.
Documentation for Arxo. Writings — blog.arxo.io.
Anonymous visit counts on stats.arxo.io, no cookies.