kernel-Nat.prime_dvd_iff_not_coprime
- Kind
- kernel-term
- Status
- checked
Supports: for prime p (2 <= p and every divisor of p is 1 or p), p divides n iff gcd p n != 1
test "$(cargo run -q -p axeyum-lean-kernel --example nat_theorem_inventory -- prime_dvd_iff_not_coprime 2>/dev/null | grep -Ec '^Nat\.prime_dvd_iff_not_coprime[[:space:]]')" -ge 1 Evidence notes
`build_nat_prelude` admits this theorem through the trusted `Kernel::add_declaration` gate. Forward: `dvd p n` plus `dvd p p` (`dvd_refl`) give `dvd p (gcd p n)` (`dvd_gcd`); if `gcd p n = 1` that transports to `dvd p 1`, forcing `p <= 1` (`le_of_dvd`) against primality's `2 <= p` conjunct -- contradiction via `le_trans`/`le_of_succ_le_succ`/`not_succ_le_zero`, the same numeral-contradiction shape `coprime_of_lt_prime` already uses, so `gcd p n != 1`. Reverse: `gcd p n` divides `p` (`gcd_dvd_left`), so primality's divisor clause forces `gcd p n = 1 or gcd p n = p`; the hypothesis rules out `= 1`, leaving `gcd p n = p`, and `dvd p n` follows from `gcd_dvd_right` transported along that equation. `Nat.Prime` has no separate name in this kernel; it is spelled inline as the same `2 <= p and every divisor is 1 or p` clause `coprime_of_lt_prime` already uses. `nat_theorem_inventory` exits non-zero for a name that does not exist, and the `grep -c` requires the admitted declaration to be printed.