Atelier des rouesLab FR
Objects/Documentation

contextes13.py

I provide the material for check AT.R9.

Download ↓
"""Check the logical steps of the published mpd and syl proofs, retaining premise provenance."""
from itertools import product
import json

def val(f,assignment):
    return assignment[f] if isinstance(f,str) else not val(f[0],assignment) or val(f[1],assignment)

def run():
    p,q,r='pqr'
    pq,qr,pr=(p,q),(q,r),(p,r)
    nested=(p,qr)
    lines={}
    def line(name,formula,*parents):
        support=set().union(*(lines[k][1] for k in parents))
        if name in ('pq','qr','nested'):support={name}
        lines[name]=(formula,support,parents)

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.