Expand description
Causal & counterfactual logic (§16, legal_logic.md) — liability & dependency.
Standard implication (p → q) is insufficient for legal liability. Adjudicating a
human-rights violation or a structural failure needs but-for causation (was the cause
necessary for the harm?), root-node dependency (removing a foundational support
voids everything that depends on it — the “deepest absence”), and overdetermination
(several independent sufficient causes → joint liability, where no single one is but-for).
Causation is a DAG of (cause, q42:causeOf, effect) edges over a set of roots (the
base facts that actually occurred). All evaluation is bounded BFS reachability — zero-heap
(fixed frontier/visited arrays), the same shape as dl::check_subsumption_quin.
Constants§
- MAX_
CAUSAL_ NODES - Bound on distinct nodes in one causal query.
Functions§
- backdoor_
satisfied - Backdoor criterion: a set
zis admissible for estimating the effect ofxonyiff (a) no node inzis a descendant ofx, and (b)zblocks every backdoor (confounding) path — here, every common ancestor (confounder) ofxandyis inz.nodesenumerates the model’s variables. Bounded, zero-heap (composescausedreachability). - but_
for_ cause - But-for causation:
effectoccurred, and but forcauseit would NOT have — i.e.causeis a necessary condition (removing it makeseffectunreachable). This is the legal “but-for” / sine-qua-non test. - cause_
predicate - The causal-edge predicate
(cause, q42:causeOf, effect). - caused
- Did
effectoccur — i.e. is it reachable from the occurredrootsalong causeOf edges? - counterfactual_
absent - Counterfactual “had
intervenebeen absent, wouldeffectstill have occurred?” — the twin-network comparison of the factual world against the counterfactualdo(intervene absent)world. Returns(factual, counterfactual); if they differ,intervenewas counterfactually necessary foreffect. - dependents_
voided - Collect, into
out, thecandidatesthat are voided by removingremoved. Returns the count written. Zero-heap (caller-suppliedout). - do_
intervene - Intervention
do(...): force the variables inset_presentto occur andset_absentto NOT occur — severing the absent nodes from the graph and treating the present ones as exogenous roots — then compute whethereffectresults (P(effect | do(X))as boolean reachability). Zero-heap. - is_
endogenous - Endogenous variable: determined within the model (≥1 incoming causal edge).
- is_
exogenous - Exogenous variable (SCM): a node with NO incoming causal edge — its value enters from outside the model (a root cause / external factor).
- is_
overdetermined - Causal overdetermination (joint liability):
effectoccurred, there are ≥2 candidatecauses, and no single one is but-for — removing any one alone still yields the effect (another sufficient cause remains). Liability is then shared across all of them. - is_
voided_ by - Root-node dependency: is
nodevoided by removing the foundational supportremoved? True iffnodeoccurs normally but becomes unreachable onceremovedis gone — “if food/ shelter is removed, all dependent rights and capacities are voided” (the deepest-absence rule).