kernel-Nat.mod_mul
- Kind
- kernel-term
- Status
- checked
Supports: ∀ {a b x : ℕ}, x % (a * b) = x % a + a * (x / a % b)
test "$(cargo run -q -p axeyum-lean-kernel --example nat_theorem_inventory -- mod_mul 2>/dev/null | grep -Ec '^Nat\.mod_mul[[:space:]]')" -ge 1 Evidence notes
Declared in `nat_prelude/mod_mul_lemmas.rs`'s `declare_mod_mul_family`. Case-splits `a` (`cases_zero_succ`): at `a=0` the whole identity collapses via `zero_mul`/`mod_zero`/`add_zero` congruence, never evaluating `mod _ 0` beyond the one declared equation; at `a=succ apred`, case-splits `b`: at `b=0` the identity again collapses via `mul_zero`/`mod_zero` plus the canonical `x = a*(x/a)+x%a` decomposition (`div_mod_exec`) commuted; at `b=succ bpred` (both positive), `double_decompose` reconstructs `divMod (a*b) x ((x/a)/b) (x%a + a*(x/a%b))` directly from two `div_mod_exec` decompositions (`x` at `a`, then `x/a` at `b`) combined via `left_distrib`/`mul_assoc`/`add_assoc`/`add_comm`, and `div_mod_unique` against the canonical decomposition of `x` at `a*b` (positivity from `one_le_mul`) forces the remainder equality directly. `nat_theorem_inventory`'s rendered type for `Nat.mod_mul` matches this fact's `formal.statement` verbatim (`x0`=a, `x1`=b, `x2`=x).