Lawfare Group → Knowledge Institute → Lawfare Academy

Reproduce the worked examples

Copy the complete code below into a UTF-8 file named verify.py and run python verify.py with Python 3. It uses only the standard library and performs exact or rational synthetic calculations. It does not access a network or learner records. Assertions fail if the expected synthetic results change.

These checks verify the stated arithmetic and query behavior, not independent academic acceptance or production migration safety.

"""Harbor synthetic evidence laboratory. Arithmetic does not assess actual people."""
from fractions import Fraction as F
import json
checks={}
def check(n,a,b):
 assert a==b,(n,a,b)
 checks[n]=str(a)
ar=F(9,10);ac=F(40,80);br=F(64,80);bc=F(4,10)
assert ar>br and ac>bc
check('Alex aggregate',F(9+40,10+80),F(49,90))
check('Blair aggregate',F(64+4,80+10),F(34,45))
assert F(49,90)<F(34,45)
check('Alex common mix',(ar+ac)/2,F(7,10))
check('Blair common mix',(br+bc)/2,F(3,5))
check('toy motivation product',F(8,10)*F(5,10)*6,F(12,5))
check('participant hours',12*F(90,60),18)
check('transfer task success',F(8,12),F(2,3))
check('first gross reward',100*2,200)
check('second gross reward',90*2,180)
check('first mature count',100-20,80)
check('second mature count',90-5,85)
check('first mature reward',(100-20)*2,160)
check('second mature reward',(90-5)*2,170)
assert 200>180 and 160<170
check('turn concentration',F(30,40),F(3,4))
check('liaison minutes',6*15,90)
check('liaison hours',F(90,60),F(3,2))
check('liaison gap hours',F(3,2)-1,F(1,2))
check('direct handling minutes',40*20,800)
check('direct handling hours',F(800,60),F(40,3))
check('direct handling gap hours',F(40,3)-10,F(10,3))
register=[
 {'claim':'49 successes of90 assigned cases','type':'recorded observation','boundary':'fictional defined period'},
 {'claim':'Uncommitted','type':'motive interpretation','boundary':'not established'},
 {'claim':'Missing diagnostic access impairs resolution','type':'causal hypothesis','boundary':'requires appropriate test'},
 {'claim':'New handoff protocol used','type':'adoption','boundary':'not equivalent to capability'},
 {'claim':'Recognizes a new escalation unaided','type':'capability observation','boundary':'task and support specific'},
 {'claim':'Accepted case outcomes improve because of protocol','type':'causal outcome claim','boundary':'not established by arithmetic'}]
assert len({x['type'] for x in register})==6 and all(x['boundary'] for x in register)
print(json.dumps(dict(passed=True,checks=checks,syntheticClaimRegister=register,limits='No calculation establishes motivation, psychological validity, fairness, diagnosis, legal authority, causal effect or operational readiness. Independent subject review and observed learner testing remain pending. Resource scenarios must not be summed without verified compatible boundaries.'),indent=2))

Related chapters