back to table · edit · history · where entries came from · files · download
4301 bytes, as of the version from 2026-10-25 17:24 (current). Recorded here, not run.
"""Independent checks for T495, classical-lattice automorphism orders.
Download checks.py, root_checks.py and check.py beside generate.py and grams.json.
Run sage -python checks.py to check values read from T495 (a draft needs its
key in NUMBERDB_API_KEY), or set NUMBERDB_LOCAL_CHECK=1 to compute them locally.
This reads and verifies; it does not modify any table. The root group orders
are computed from Gram matrices independently of the generator's formulas.
Catalogue exceptions are checked against the cited published orders and group
relations. Full catalogue qfauto recomputation is provided by generate.py.
"""
import json
import os
from pathlib import Path
import sys
import numberdb.sage as numberdb
from sage.rings.integer_ring import ZZ
from sage.rings.polynomial.polynomial_ring_constructor import PolynomialRing
from check import agrees_with, exactness, measure, names_its_rings
from root_checks import compute
from generate import ClassicalLatticeAutomorphisms, FAMILIES, order
def numeric(x):
return ZZ(x['number'] if isinstance(x,dict) else x)
def validate(values):
expected_keys={family+','+str(n) for family,ns in FAMILIES for n in ns}
assert set(values)==expected_keys and len(values)==133
assert not exactness(values)
assert not names_its_rings(str(Path(__file__).with_name('generate.py')))
independent=compute()
mismatches=agrees_with({k:values[k] for k in independent},lambda k:ZZ(independent[k]))
assert not mismatches,mismatches
print('PASS: all 116 classical/root/dual entries versus independent Gram computations')
for family in ['A*','D*','E*']:
for k,v in values.items():
if k.startswith(family+','):assert v==values[k.replace('*','')]
for n in range(5,25):assert values['D,'+str(n)]==values['Z,'+str(n)]
for n in range(2,25):
assert values['Z,'+str(n)]==2*n*values['Z,'+str(n-1)]
for n in range(3,25):
assert values['A,'+str(n)]==(n+1)*values['A,'+str(n-1)]
print('PASS: duality, signed-permutation identities and recurrences over their complete stored ranges')
# These polynomials count Coxeter-group elements by length, independently
# of the lattice Gram computation and factorial formulas.
doc=numberdb.table('Poincaré_polynomials_of_the_finite_Coxeter_groups')
ring=PolynomialRing(ZZ,'t');count=0
for k,v in doc['Numbers'].items():
if k[0] not in 'ABDE':continue
n=int(k[1:]);f=k[0];target=('Z' if f=='B' else f)+','+str(n)
if target not in values:continue
factor=(1 if n==1 else 2) if f=='A' else (6 if n==4 else 2) if f=='D' else (2 if n==6 else 1) if f=='E' else 1
polynomial=ring(v['number'] if isinstance(v,dict) else v)
assert values[target]==factor*polynomial(1),(target,polynomial(1))
count+=1
assert count==26,count
print('PASS:',count,'stored Coxeter Poincare polynomials evaluated at 1')
groups=numberdb.table('Orders_of_sporadic_finite_simple_groups')['Numbers']
assert values['Lambda,24']==2*numeric(groups['Co1'])
assert values['Lambda,23']==2*numeric(groups['Co2'])
assert values['Lambda,24']==ZZ(8315553613086720000)
assert values['K,12']==ZZ(2)**10*ZZ(3)**7*5*7==2*ZZ(39191040)
assert values['K,12']!=ZZ(2)**10*ZZ(3)**7*5*8 # Printed typo on p. 429.
# OEIS A014116, Barnes-Wall dimension 16, and its independent group formula.
bw=ZZ(2)**21*(2**4-1)
for i in range(1,4):bw*=2**(2*i)-1
assert bw==89181388800==values['Lambda,16']
for n,v in [(6,103680),(7,2903040),(8,696729600)]:assert values['E,'+str(n)]==v
print('PASS: published E6/E7/E8, Barnes-Wall, real Coxeter-Todd and Leech orders; Co1 and Co2 relations')
print('MEASUREMENT',json.dumps(measure(values)))
return True
if __name__=='__main__':
if os.environ.get('NUMBERDB_KEY_FROM_STDIN')=='1':numberdb.configure(api_key=sys.stdin.read().strip())
if os.environ.get('NUMBERDB_LOCAL_CHECK')=='1':
gen=ClassicalLatticeAutomorphisms()
values={p['family']+','+p['n']:numeric(gen.value(p,100)) for p in gen.enumerate()}
else:
doc=numberdb.table('T495')
values={f+','+str(n):numeric(v) for f,rows in doc['Numbers'].items() for n,v in rows.items()}
validate(values)
print('PASS: every independent check')