kernel-Nat.exists_prime_gt
- Kind
- kernel-term
- Status
- checked
Supports: For every natural number n there is a prime p with n < p.
test "$(cargo run -q -p axeyum-lean-kernel --example nat_theorem_inventory -- exists_prime_gt 2>/dev/null | grep -xFc 'Nat.exists_prime_gt 3 ((x0 : AxNat) -> Exists.{1} AxNat (fun (x1 : AxNat) => And (AxNat.lt x0 x1) (And (AxNat.le (AxNat.succ (AxNat.succ AxNat.zero)) x1) (((x2 : AxNat) -> ((x3 : AxNat.dvd x2 x1) -> Or (Eq.{1} AxNat x2 (AxNat.succ AxNat.zero)) (Eq.{1} AxNat x2 x1)))))))')" -ge 1 Evidence notes
`build_nat_prelude` admits this through the trusted `Kernel::add_declaration` gate, which re-checks the proof term against the stated type. Euclid's argument, done over N with no subtraction: take m = n! + 1, which is >= 2 because 1 <= n! (`one_le_factorial`), and let q be a prime dividing it (`exists_prime_dvd`). If q <= n then `dvd_factorial_of_le` gives q | n!, and with q | n!+1 `dvd_add_right_cancel_of_pos` yields q | 1, refuted by `not_dvd_one_of_two_le`. So n <= q, and the n = q case falls to the same contradiction after transporting n <= n along the equality, leaving n < q. The command matches the FULL RENDERED TYPE (grep -qxF), not the theorem name: lane `nat-prime-divisor` measured that a name-only checker survives a weakened statement -- spelling a primality bound `1 <= p` instead of `2 <= p` still type-checks, still admits, and is satisfied by p = 1. The kernel cannot see a weaker statement; only the type can.