"""List the NEW configurations of the enumeration (strict, not implied by a single-number theorem, one row, (strong) six exponentials, Theorem T94' or a projection; 634 of them) on which the extended criterion of main.tex fails, with the reason. Re-runs the enumeration of ../anc/u101_enum.py (read-only) and reuses schema_eval_ext from schema_ext_vs_u101.py (imported with --fast so it writes only schema_ext_fast_out.log, which it overwrites with a header line only). Exact rational arithmetic. Run: python schema_ext_fail_list.py (writes schema_ext_fail_list_out.log; about 10 minutes)""" import sys, os sys.argv.append('--fast') sys.dont_write_bytecode = True HERE = os.path.dirname(os.path.abspath(__file__)) sys.path.insert(0, HERE) _keep = None _fast = os.path.join(HERE, 'schema_ext_fast_out.log') if os.path.exists(_fast): _keep = open(_fast, encoding='utf-8').read() # importing the module truncates this file; restore it below import schema_ext_vs_u101 as X if _keep is not None: X.ns['out'].close(); open(_fast, 'w', encoding='utf-8').write(_keep) u = X.u cells, stats = u.run() new = [] for key in cells: res = u.analyse(key) if res is None or res['margin'] <= 0: continue if u.sort_cell(res)[0] == 'NEW': new.append(res) out = open(os.path.join(HERE, 'schema_ext_fail_list_out.log'), 'w', encoding='utf-8') def pr(*a): s = ' '.join(str(x) for x in a); print(s); out.write(s + '\n') pr('NEW configurations:', len(new)) from collections import Counter cnt = Counter() for r in new: sig, rows, plc = tuple(r['sig']), tuple(r['rows']), [list(x) for x in r['plc']] cell = u.build(sig, rows, plc) ok, why = X.in_class_ext(cell) if not ok: cnt['outside: ' + why] += 1; continue w = X.schema_eval_ext(cell, 'ext') if w[0] > 0: cnt['holds'] += 1; continue P = [u.per(s) for s in sig] note = [] for i in range(2): js = [j for j in range(3) if plc[i][j] == 'Ga'] if len(js) >= 2: rr = u.sub(P[js[0]], P[js[1]]) note.append('row %d has algebraic entries in columns %s; their ratio %s is provably transcendental: %s' % (i, js, u.mfmt(rr), bool(u.prov(rr)))) cnt['fails: ' + ('row with two Ga entries' if note else 'other')] += 1 pr(sig, rows, plc, '| worst (val, dimU, w, r, dead, U, sT, sH, supp) =', w, '|', ', '.join(r['stmt']), '|', '; '.join(note) or 'no row with two Ga entries') pr(dict(cnt))