kernel-Nat.dvd_iff_mod_eq_zero
- Kind
- kernel-term
- Status
- checked
Supports: ∀ {m n : ℕ}, m ∣ n ↔ n % m = 0
test "$(cargo run -q -p axeyum-lean-kernel --example nat_theorem_inventory -- dvd_iff_mod_eq_zero 2>/dev/null | grep -Ec '^Nat\.dvd_iff_mod_eq_zero[[:space:]]')" -ge 1 Evidence notes
`build_nat_prelude` admits `Nat.dvd_iff_mod_eq_zero` through the trusted `Kernel::add_declaration` gate, which re-checks the proof term against the stated type, so producing this row at all is a machine-checked proof. Built in this session's `nat_prelude/gcd_dvd_mirrors.rs` (lane nat-gcd-dvd-mirrors), wired in via one `declare_gcd_dvd_mirrors` call. Case split on `m`: `m = 0` reduces both sides to `n = 0` directly (`dvd 0 n` unfolds to `n = 0`; `mod n 0 = n` via `mod_zero`); `m = succ j` specializes the existing `div_mod_remainder_eq_zero_iff_dvd` at the executable witness (`div_mod_exec`) and flips the `Iff` order to match. `nat_theorem_inventory`'s rendered type is `(x0:AxNat)->(x1:AxNat)->Iff (dvd x0 x1) (Eq (mod x1 x0) zero)`, matching this fact's `formal.statement`. `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. Verified both ways: the real name greps to a count `-ge 1` (confirmed by direct run); grepping a made-up name (`Nat.dvd_iff_mod_eq_zero_bogus`) exits non-zero (`nat_theorem_inventory` fails closed on an absent name -- measured: `error: no Nat theorem matches ... -- an absent theorem is a failed check, not an empty report`, exit 1).