kernel-Nat.coprime_or_dvd_of_prime
- Kind
- kernel-term
- Status
- checked
Supports: ∀ {p : ℕ}, Nat.Prime p → ∀ (i : ℕ), p.Coprime i ∨ p ∣ i
test "$(cargo run -q -p axeyum-lean-kernel --example nat_theorem_inventory -- coprime_or_dvd_of_prime 2>/dev/null | grep -Ec '^Nat\.coprime_or_dvd_of_prime[[:space:]]')" -ge 1 Evidence notes
`build_nat_prelude` admits `Nat.coprime_or_dvd_of_prime` 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. Decides `beq (gcd p i) one` via a `Bool.rec` case split (fully constructive, not classical excluded middle -- `Bool` has exactly two constructors): the `true` branch gives `Coprime p i` directly (`eq_of_beq_eq_true`); the `false` branch gives `Not (Coprime p i)` (`ne_of_beq_eq_false`), which `prime_dvd_iff_not_coprime`'s reverse direction converts to `dvd p i`.