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

Function norm_add_const

crates/kernel/src/level.rs:345–351  ·  view source on GitHub ↗
(s: &mut NormLevel, k: u64, path: &[u64])

Source from the content-addressed store, hash-verified

343/// `NormLevel.addNode v k path'` (`refs/lean4lean/Lean4Lean/Level.lean:92`);
344/// `k` must be the current succ-accumulator from `normalize_aux`.
345///
346/// An earlier port of this function dropped `k` and always inserted
347/// `(idx, 0)`, which silently mis-normalized `Succ^n(imax(u, Param v))`
348/// shapes for `n > 0`. Keep the `k` parameter.
349fn norm_add_node(s: &mut NormLevel, idx: u64, k: u64, path: &[u64]) {
350 s.entry(path.to_vec()).or_default().add_var(idx, k);
351}
352
353fn norm_add_const(s: &mut NormLevel, k: u64, path: &[u64]) {
354 if k == 0 || (k == 1 && !path.is_empty()) {

Callers 2

normalize_auxFunction · 0.85
normalize_imax_dispatchFunction · 0.85

Calls 3

entryMethod · 0.80
is_emptyMethod · 0.45
maxMethod · 0.45

Tested by

no test coverage detected