MCPcopy Create free account
hub / github.com/argumentcomputer/ix / norm_add_node

Function norm_add_node

crates/kernel/src/level.rs:341–343  ·  view source on GitHub ↗

Insert `(idx, k)` into the var list at `path`, taking the max of offsets when `idx` is already present. Mirrors Lean4Lean's `NormLevel.addNode v k path'` (`refs/lean4lean/Lean4Lean/Level.lean:92`); `k` must be the current succ-accumulator from `normalize_aux`. An earlier port of this function dropped `k` and always inserted `(idx, 0)`, which silently mis-normalized `Succ^n(imax(u, Param v))` shap

(s: &mut NormLevel, idx: u64, k: u64, path: &[u64])

Source from the content-addressed store, hash-verified

339 Err(pos) => self.var.insert(pos, VarNode { idx, offset: k }),
340 }
341 }
342}
343
344/// Canonical form: a map from imax-paths (sorted param indices representing
345/// the conditioning chain) to nodes tracking constant offsets and variable
346/// contributions.

Callers 2

normalize_auxFunction · 0.85
normalize_imax_dispatchFunction · 0.85

Calls 2

add_varMethod · 0.80
entryMethod · 0.80

Tested by

no test coverage detected