kernel-Nat.coprime_of_forall_prime_dvd
- Kind
- kernel-term
- Status
- checked
Supports: forall m n, (forall k, Nat.prime_condition k -> k | m -> k | n -> k | 1) -> Nat.gcd m n = 1
test "$(cargo run -q -p axeyum-lean-kernel --example nat_theorem_inventory -- coprime_of_forall_prime_dvd 2>/dev/null | grep -Ec '^Nat\.coprime_of_forall_prime_dvd[[:space:]]')" -ge 1 Evidence notes
`build_nat_prelude` admits `Nat.coprime_of_forall_prime_dvd` 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. Confirmed kernel type: `x0 x1, (x2, (2<=x2 /\ forall x3, x3|x2 -> x3=1 or x3=x2) -> x2|x0 -> x2|x1 -> x2|1) -> gcd x0 x1 = 1`, matching `m n, (k, Prime k -> k|m -> k|n -> k|1) -> Coprime m n` with the prelude's own inline primality spelling (no `Prime`/`Nat.Prime` predicate exists here; matches this file's established convention). Named `Nat.coprime_of_forall_prime_dvd` rather than `coprime_of_dvd` because that name is already taken by the unrelated `Nat.Coprime.of_dvd` (`dvd a1 a2 -> dvd b1 b2 -> Coprime a2 b2 -> Coprime a1 b1`), confirmed by grep of the whole `nat_prelude.rs` field list before naming. Proved via `declare_coprime_of_forall_prime_dvd` (`nat_prelude/primes.rs`): trichotomy on `g := gcd m n` via `lt_or_ge` twice. `g < 1` (so `g = 0` via `le_of_succ_le_succ`+`zero_le`+`le_antisymm`) forces `m = n = 0` (`zero_mul` on the `dvd 0 _` witness), and applying the hypothesis at `k = 2` (`prime_two`, already in this file) then contradicts itself (`refute_dvd_one_against_prime`, an existing private helper this file already had for exactly this `dvd p one -> False` shape). `1 <= g` and `g < 2` gives `g = 1` directly (`le_of_succ_le_succ` + `le_antisymm`) -- the goal. `1 <= g` and `2 <= g`: `exists_prime_dvd` gives a prime factor `pw` of `g`, hence of `m` and `n` (`dvd_trans`), so the hypothesis gives `pw | 1`, refuted the same way. No decidable equality or classical choice beyond the two order trichotomies (`lt_or_ge`) already proved in this prelude.