kernel-Nat.coprime_primes
- Kind
- kernel-term
- Status
- checked
Supports: ∀ {p q : ℕ}, Nat.Prime p → Nat.Prime q → (p.Coprime q ↔ p ≠ q)
test "$(cargo run -q -p axeyum-lean-kernel --example nat_theorem_inventory -- coprime_primes 2>/dev/null | grep -Ec '^Nat\.coprime_primes[[:space:]]')" -ge 1 Evidence notes
`build_nat_prelude` admits `Nat.coprime_primes` 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. `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. Primality is spelled inline (`2 ≤ p ∧ ∀ d, d ∣ p → d = 1 ∨ d = p`, matching `euclid_lemma`'s and `coprime_of_lt_prime`'s own convention) rather than through a named `Nat.Prime` predicate, since this prelude has none. The `mp` direction transports `dvd_refl p` along a hypothesised `p = q` to `dvd p q`, then `prime_dvd_iff_not_coprime`'s `mp` contradicts the coprimality hypothesis; `mpr` splits `coprime_or_dvd_of_prime`, and the `dvd p q` branch applies `q`'s own divisor clause to `p`, refuting `p = 1` against `p`'s `2 ≤ p` lower bound and `p = q` against the `p ≠ q` hypothesis directly.