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

Function assert_nat_lit

crates/kernel/src/whnf.rs:4765–4774  ·  view source on GitHub ↗
(e: &AE, expected: u64)

Source from the content-addressed store, hash-verified

4763 let addr = Address::hash(&v.to_le_bytes());
4764 super::super::testing::ME::nat(v, addr)
4765 }
4766
4767 /// Build a Nat env with Nat, Nat.zero, Nat.succ, Nat.rec, and Nat.sub.
4768 /// Nat.sub is defined as a primitive that the kernel's try_reduce_nat handles,
4769 /// but also has a delta-unfoldable body using Nat.rec (to test reduction order).
4770 fn nat_env() -> KEnv<Anon> {
4771 use super::super::constant::RecRule;
4772
4773 let mut env = KEnv::new();
4774 let block = mk_id("Nat");
4775
4776 // Nat : Sort 1
4777 env.insert(

Callers 15

nat_add_lit_litFunction · 0.85
nat_sub_lit_litFunction · 0.85
nat_mul_lit_litFunction · 0.85
nat_div_lit_litFunction · 0.85
nat_mod_lit_litFunction · 0.85
nat_pow_lit_litFunction · 0.85
nat_gcd_lit_litFunction · 0.85
nat_bitwise_lit_litFunction · 0.85
nat_shift_smallFunction · 0.85
nat_add_zero_ctor_leftFunction · 0.85
nat_mul_zero_ctor_rightFunction · 0.85
nat_succ_of_litFunction · 0.85

Calls 1

dataMethod · 0.45

Tested by 15

nat_add_lit_litFunction · 0.68
nat_sub_lit_litFunction · 0.68
nat_mul_lit_litFunction · 0.68
nat_div_lit_litFunction · 0.68
nat_mod_lit_litFunction · 0.68
nat_pow_lit_litFunction · 0.68
nat_gcd_lit_litFunction · 0.68
nat_bitwise_lit_litFunction · 0.68
nat_shift_smallFunction · 0.68
nat_add_zero_ctor_leftFunction · 0.68
nat_mul_zero_ctor_rightFunction · 0.68
nat_succ_of_litFunction · 0.68