Skip to content

Latest commit

 

History

History
58 lines (40 loc) · 2.88 KB

File metadata and controls

58 lines (40 loc) · 2.88 KB

Conservation Is Cheap, Invariance Is Expensive

Replication code for Conservation Is Cheap, Invariance Is Expensive: The dimension of responsibility allocation rules immune to corporate restructuring.

Every numerical claim in the paper is produced by one of the scripts below. All are self-contained, use a fixed random seed, and run in seconds.

Requirements

python >= 3.10
numpy
pandas
networkx
pip install -r requirements.txt

Scripts

Script Reproduces Paper
code/general_theorem.py Characterisation of conservative, universally merger-invariant rules; the family $(1-B)I + \beta\mathbf{1}^\top$; the sensitivity $1-B$ to who emitted; component independence forcing $\beta=0$ Theorem 1, Corollary 2, Remark
code/gate_C2.py The van den Ende-Mandel-Rusinowska measure, verified against $\Phi$ and $\Psi$ of their Example 1; Consistency holds under merger while the allocation moves; systematic reduction under consolidation Section 6
code/adjacent.py Adjacency-restricted invariance; chaining and cut vertices; the direction-dependent, distance-independent family on a chain; named rules vs exponential discounting Theorems 2-3, Corollary 4
code/connectivity.py $D(G)=\sum_k c(G-k)$ on input-output networks as a function of the flow threshold; reference structures Section 6, final paragraph
code/pcaf_core.py PCAF attribution, three-factor decomposition, merger and price counterfactuals Corollary 1, Section 7
code/verify.py Numerical checks of the financed-emissions results Corollary 1, Section 7

| code/test_suite.py | 13-test regression suite covering every theorem-level claim (Lemma 1 conditions, the B>1 example and refinement bound, quotient path-independence, obstruction values, graph bounds, the published-example merger, the covariance formula) | all |

Run everything:

cd code && for f in general_theorem.py gate_C2.py adjacent.py connectivity.py verify.py; do
  echo "=== $f ==="; python "$f"; done

Verification against the published measure

gate_C2.py first reconstructs $\Phi$ and $\Psi$ for Example 1 of van den Ende, Mandel and Rusinowska (2025, Social Choice and Welfare 66(2), 423-472) and checks them against the matrices printed in that paper, then checks that Consistency ($\sum_i \rho_i = \sum_i f_i$) holds to machine precision at several parameter values. Only after those checks pass does it run the merger tests.

Input-output data

connectivity.py ships with a synthetic generator so that it runs without downloads. To use real data, build the sector-by-sector intermediate flow matrix Z and call:

from connectivity import report
report(Z, label="WIOD 2016, 2014, 56 sectors")

The WIOD 2016 release is public at https://www.rug.nl/ggdc/valuechain/wiod/wiod-2016-release.

Licence

Code: MIT (see LICENSE). The paper is distributed separately.