Issue #2308: the bounds walk states q*d + r == high*2^w + low for a narrowing_div_rem…

Open and answer this issue on GitHub.

decision, bugs · opened 2026-11-19 · updated 2026-11-19 · 0 comments

Filed by the driver from the Found: of the run of issue-2013 (#2013) (owner, 2026-11-06).

Found

the bounds walk states q*d + r == high*2^w + low for a narrowing_div_rem only at 8 and 32 bits: pub fn wide_index(xs: ref Vec[i64], low: u64) -> i64 { if xs.len() < 20 { return 0 }; let zero: i64 = 0; let (q, r) = zero.narrowing_div_rem(low, 10) ?? return 0; if low <= 100 && r >= 0 && q >= 0 { return xs[q] + xs[r] }; return 0 } under nikaia check --bounds gives xs[q] checked: no fact bounds what it reads (the i32/u32 twin with low: u32 proves it, tests/compiler/tests/narrowing_div_rem_proves_an_index_by_its_rest.bounds); traced: bounds_walk.nika bounding_division_halves, 2^64 is not an i64 arena constant (int), so the fact cannot be written; no decision yet (a wide constant in the arena, or the fact split as high2^632)

To build

Done when

The probe or check gives the expected output the first item names from its ADR or Part I-III section, and a tests/compiler/tests/ test (or the named check) that failed on the unfixed tree is green; or the probe already passes on develop and a test pins it, naming the commit that fixed it; or the issue is closed as by design, naming the function or ADR.


Generated by Claude Code

Back to Open Issues