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

Function level_normalize_idempotent

crates/compile/src/congruence.rs:514–530  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

512 /// "post-normalize subterms are normalized" silently invalid).
513 #[test]
514 fn level_normalize_idempotent() {
515 let u = p("u");
516 let v = p("v");
517 let cases = [
518 m(s(z()), s(z())),
519 m(z(), u.clone()),
520 m(u.clone(), m(u.clone(), v.clone())),
521 im(u.clone(), s(v.clone())),
522 im(u, z()),
523 m(s(v.clone()), s(s(v))),
524 ];
525 for l in &cases {
526 let n1 = normalize_level(l);
527 let n2 = normalize_level(&n1);
528 assert_eq!(n1, n2, "normalize_level not idempotent on {}", l.pretty());
529 }
530 }
531}

Callers

nothing calls this directly

Calls 7

pFunction · 0.85
mFunction · 0.85
sFunction · 0.85
zFunction · 0.85
imFunction · 0.85
normalize_levelFunction · 0.70
cloneMethod · 0.45

Tested by

no test coverage detected