// Audit of the DISPLAYED verdict of Q-varE-limit (QUESTIONS.md row 797) against // the corpus it is generated from. No compute, no network. const fs = require('fs'); const row = fs.readFileSync('QUESTIONS.md', 'utf8').split('\n')[796]; const vts = fs.readFileSync('vts.md', 'utf8'); // varE-theta2-step.md const vel = fs.readFileSync('vel.md', 'utf8'); // varE-exact-ladder-01.md console.log('=== 1. Which note supplies the displayed verdict ==='); const NOTES = ['lit-dickman-variance', 'lit-smooth-divisors', 'varE-asymptotic', 'varE-exact-ladder-01', 'varE-limit-theorem', 'varE-spectral', 'varE-theta2-proof', 'varE-theta2-step']; const paths = NOTES.map(n => 'research/history/staging/' + n + '.md').sort(); console.log(' ' + NOTES.length + ' notes share the id Q-varE-limit (all listed in the row)'); console.log(' qc/questions.js: the displayed verdict is the LAST note in path order'); console.log(' last in path order: ' + paths[paths.length - 1].split('/').pop()); const vd = s => (s.match(/^verdict:\s*(.*)$/m) || [])[1] || ''; console.log(' theta2-step verdict appears in the row : ' + row.includes(vd(vts).slice(0, 90))); console.log(' exact-ladder verdict appears in the row: ' + row.includes('x = 29 and 31 add two exact levels')); // The note carries two tables. The decoupling ladder is the one whose 6th column // is an X/X_dec ratio and whose 7th is the *ln y column; take rows with 7 fields // where the last field parses as a signed decimal. const all = vel.split('\n').filter(l => /^\|\s*\d+\s*\|/.test(l)) .map(l => l.split('|').map(s => s.trim()).filter(s => s.length)); const rows = all.filter(r => r.length === 7 && /^[+-]\d*\.\d+$/.test(r[6])); console.log('\n=== 2. FINDING A: the row says four levels; the ladder has ' + rows.length + ' ==='); console.log(' x ln y delta*(X-X_dec) X/X_dec *ln y'); for (const r of rows) console.log(' ' + r[0].padEnd(6) + r[1].padEnd(10) + r[4].padEnd(18) + r[5].padEnd(14) + r[6]); console.log(' levels computed: ' + rows.length + ' (x = ' + rows[0][0] + ' .. ' + rows[rows.length - 1][0] + ')'); console.log(' The displayed verdict cites four (x = 13..23) and says "MEASURED on four levels".'); console.log(' The sibling note varE-exact-ladder-01.md, SAME ledger id, carries x = 29 and 31'); console.log(' with *ln y = +0.00309 and +0.00238 - strictly more informative, and not shown.'); console.log(' Cause is path order alone: varE-theta2-step.md sorts after varE-exact-ladder-01.md.'); console.log(' The generator is behaving as documented; the cost is that a reader briefed from'); console.log(' the row gets the weaker of two statements in the same group.'); console.log('\n=== 3. FINDING B: "falling rather than settling" is not monotone on its own range ==='); const col = rows.map(r => ({ x: +r[0], v: parseFloat(r[6]) })); const cited = col.filter(o => o.x >= 13 && o.x <= 23); console.log(' cited range x = 13..23, column delta*(X-X_dec)*ln y:'); for (let i = 0; i < cited.length; i++) { const d = i ? cited[i].v - cited[i - 1].v : null; console.log(' x = ' + String(cited[i].x).padEnd(4) + cited[i].v.toFixed(5).padStart(9) + (d === null ? '' : ' step ' + (d > 0 ? '+' : '') + d.toFixed(5) + (d > 0 ? ' <-- RISES' : ''))); } const r19 = cited.find(o => o.x === 19).v, r23 = cited.find(o => o.x === 23).v; console.log(' on the four cited levels it falls, falls, then RISES by ' + ((r23 / r19 - 1) * 100).toFixed(1) + ' % at the last step.'); const above = col.filter(o => o.x > 23); console.log(' the ladder note scopes it correctly: "falls at every step ABOVE x = 23":'); console.log(' ' + above.map(o => o.v.toFixed(5)).join(' -> ') + ' monotone falling: ' + (above.every((o, i, a) => !i || o.v < a[i - 1].v) ? 'yes' : 'no')); console.log(' the RATIO column the verdict also quotes IS monotone on the cited range:'); console.log(' ' + cited.map(o => rows.find(r => +r[0] === o.x)[5]).join(' > ')); console.log(' => right about the ratios, imprecise about the ln y column, on exactly the'); console.log(' range it names. VERIFIED from the served table.'); console.log('\n=== 4. What both findings cost, and what they do not ==='); console.log(' Neither changes any status: the step is open either way and 0.45546 stays'); console.log(' HEURISTIC. Both are fixed by one clause in varE-theta2-step.md\'s verdict:'); console.log(' cite the ladder\'s two further levels, and scope the falling claim to x > 23.');