kernel-Nat.add_mul_mod_self_right
- Kind
- kernel-term
- Status
- checked
Supports: ∀ (x y z : ℕ), (x + y * z) % z = x % z
test "$(cargo run -q -p axeyum-lean-kernel --example nat_theorem_inventory -- add_mul_mod_self_right 2>/dev/null | grep -Ec '^Nat\.add_mul_mod_self_right[[:space:]]')" -ge 1 Evidence notes
`build_nat_prelude` admits `Nat.add_mul_mod_self_right` through the trusted `Kernel::add_declaration` gate (declared in `nat_prelude/div_mod_lemmas.rs`'s `declare_add_div_mod_shift_family`). Route: no positivity hypothesis is given, so the divisor `z` is case-split via `cases_zero_succ`; at `z=0` the goal collapses via `mul_zero` plus `add_zero`, at `z=succ zpred` a `mul_comm` bridge (product is `y*z`, `div_mod_shift` wants `dd*k` with `dd:=z`) reaches `div_mod_shift`'s reusable `(n+dd*k)%dd = n%dd` fact at `dd:=z`, `n:=x`, `k:=y`. `nat_theorem_inventory`'s rendered type for `Nat.add_mul_mod_self_right` is `(x0:AxNat)->(x1:AxNat)->(x2:AxNat)->Eq (mod (add x0 (mul x1 x2)) x2) (mod x0 x2)`, 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.