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

Function level_alpha_eq

crates/compile/src/congruence.rs:41–43  ·  view source on GitHub ↗

Check that two Lean levels are equal modulo the same simplifications `Level::max_smart` / `Level::imax_smart` perform. Why normalize: `aux_gen::expr_utils::subst_level` routes through the smart constructors so substituted levels match the form the kernel produces post-ingress (see commit `ec95312` "Align nested-aux canonical order"). Lean's own `Level.instantiateParams` keeps the un-simplified fa

(a: &Level, b: &Level)

Source from the content-addressed store, hash-verified

39/// only introduce drift. See the "Use raw Level::succ" comment that lived
40/// in `expr_utils::subst_level` prior to `ec95312`.
41pub fn level_alpha_eq(a: &Level, b: &Level) -> Result<(), String> {
42 level_alpha_eq_struct(&normalize_level(a), &normalize_level(b))
43}
44
45/// Normalize a level by applying `Level::max_smart` / `Level::imax_smart`
46/// bottom-up. Idempotent. `Succ` is left raw (see [`level_alpha_eq`]).

Callers 3

expr_alpha_eqFunction · 0.85
expr_alpha_eq_ctxFunction · 0.85
aux_spec_eqFunction · 0.85

Calls 2

level_alpha_eq_structFunction · 0.85
normalize_levelFunction · 0.70

Tested by

no test coverage detected