Commit graph

2 commits

Author SHA1 Message Date
e700273136 Add superinstructions LOOK+1, LOOK-1 for 25% faster loops
Fused opcodes: LOOK_ADD1 (lookup + increment) and LOOK_SUB1
(lookup + decrement) emitted directly by compiler for (+ sym 1)
and (- sym 1) patterns. Eliminates one dispatch per loop iteration.

sum-to(50000) ratio improved from 59x to 45x vs Python.
ackermann(3,4) steady at 83x. 571 tests green.

Also defines LOOK_LOOK, CONST_EQ_JF, LOOK_CONST_CALL2
superinstruction opcodes (VM handlers ready, compiler emission
for remaining patterns deferred to next pass).
2026-04-14 13:53:08 -04:00
b5e24e98b1 Add formal Lean 4 proof of EML universality (no sorry)
Lean's type checker verifies all 5 theorems:
  1. exp(x) = eml(x, 1)
  2. e      = eml(1, 1)
  3. ln(x)  = eml(1, eml(eml(1,x), 1))
  4. 0      = eml(1, eml(eml(1,1), 1))
  5. a - b  = eml(ln(a), exp(b))

Zero sorry. Machine-verified. This is a proof, not numerical analysis.
2026-04-13 20:23:30 -04:00