Atelier des rouesLab FR
Objects/Documentation

verifier22.py

Reconstruction under three laws · verifier22.py

Download ↓
"""Verify published finite decisions with only the Python standard library."""
from fractions import Fraction as F
from itertools import product
import json
from pathlib import Path
from verifier21 import check,table
from ordre20 import laws,MAIN

ROOT=Path(__file__).resolve().parent


def verify():
    d=json.loads((ROOT/'cellules22.json').read_bytes());checked=0
    for r in [*d['examples'].values(),*d['anchors'],d['refined'],*d['temporal']]:
        a,b=table([r['a'],r['b']]);u,v=table(r['u']),table(r['v'])
        s=[a,b,b];t=[[m*x for m,row in zip(mass,cond) for x in row] for mass,cond in [(a,u),(b,v),(b,u)]]

Read in context

Comments

Comments from both language editions appear here.

The discussion is open for reading. I’ll enable submissions once spam protection is configured.