You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
IxVM kernel: native unconstrained_big_uint_div_mod Aiur op + small wins
* Aiur op `unconstrained_big_uint_div_mod(a: KLimbs, b: KLimbs) -> (KLimbs, KLimbs)`:
runtime computes (q, r) via `num_bigint::BigUint::div_rem` and inserts
both result lists into `memory[10]` content-addressed with
multiplicity 0; no constraints emitted. Wired through
bytecode/execute/constraints/trace + FFI decoder +
Source/Typed/Simple/Concrete/Bytecode stages + Meta syntax +
Compiler/{Check, Concretize, Simple, Match, Lower, Layout}. Lean
reference evaluators (Interpret/SourceEval/BytecodeEval) are stubbed
with TODOs; src/aiur/execute.rs is the authoritative impl.
* Primitive.lean: `klimbs_div_mod` now reads (q, r) from the op then
verifies `klimbs_normalize(klimbs_add(klimbs_mul(q, b), r)) == klimbs_normalize(a)`
and `klimbs_lt(r, b) == 1` when `b != 0`. Drops recursive
`klimbs_div_mod_go`: its 2^24-step memo growth on (2^32, 256) was the
klimbs OOM driver.
* Core.lean: route list_lookup through list_drop so sublist ptrs dedup
via Aiur's content-addressed store.
* Infer.lean: collapse App-spine inference into one helper that peels
the head's Forall telescope arg-by-arg using a single expr_inst_many
per step on the ORIGINAL dom (with a growing innermost-first subs
list) instead of N consecutive expr_inst1 rewalks of a residual cod.
* Tests/Ix/IxVM.lean: re-pin 37 FFT costs.
lake exe check Nat.add_comm: 55_504_714 -> 54_350_107 FFT (-2.1%).
lake exe check '_private.Init.Data.String.Decode.0.ByteArray.utf8DecodeChar?.helper₃':
previously OOM (~1.2 GB single allocation inside klimbs_div_mod_go);
now passes at 37_793_684_978 FFT.
0 commit comments