kernel-Nat.add_mul_div_right
- Kind
- kernel-term
- Status
- checked
Supports: ∀ (x y : ℕ) {z : ℕ}, 0 < z → (x + y * z) / z = x / z + y
test "$(cargo run -q -p axeyum-lean-kernel --example nat_theorem_inventory -- add_mul_div_right 2>/dev/null | grep -Ec '^Nat\.add_mul_div_right[[:space:]]')" -ge 1 Evidence notes
`build_nat_prelude` admits `Nat.add_mul_div_right` through the trusted `Kernel::add_declaration` gate (declared in `nat_prelude/div_mod_lemmas.rs`'s `declare_add_div_mod_shift_family`). Route: a `mul_comm` bridge (the product is `y*z`, `div_mod_shift` wants `dd*k` with `dd:=z`) onto `div_mod_shift`'s reusable `(n+dd*k)/dd = n/dd+k` fact, instantiated at `dd:=z`, `n:=x`, `k:=y`. `nat_theorem_inventory`'s rendered type for `Nat.add_mul_div_right` is `(x0:AxNat)->(x1:AxNat)->(x2:AxNat)->(x3:Lt zero x2)->Eq (div (add x0 (mul x1 x2)) x2) (add (div x0 x2) x1)`, matching this fact's `formal.statement` verbatim (`x0`=x, `x1`=y, `x2`=z). `nat_theorem_inventory` exits non-zero for a name that does not exist, and the `grep -c` count (tested `-ge 1`, not piped into `grep -q`) requires the admitted declaration to actually be printed.