kernel-Nat.add_mod_right
- Kind
- kernel-term
- Status
- checked
Supports: ∀ (x z : ℕ), (x + z) % z = x % z
test "$(cargo run -q -p axeyum-lean-kernel --example nat_theorem_inventory -- add_mod_right 2>/dev/null | grep -Ec '^Nat\.add_mod_right[[:space:]]')" -ge 1 Evidence notes
`build_nat_prelude` admits `Nat.add_mod_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 `add_zero`, at `z=succ zpred` it reads `x+z` as `x+z*1` (`mul_one` backwards) to reach `div_mod_shift`'s reusable `(n+dd*k)%dd = n%dd` fact at `dd:=z`, `n:=x`, `k:=1`. `nat_theorem_inventory`'s rendered type for `Nat.add_mod_right` is `(x0:AxNat)->(x1:AxNat)->Eq (mod (add x0 x1) x1) (mod x0 x1)`, matching this fact's `formal.statement` verbatim (`x0`=x, `x1`=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.