kernel-Nat.prime_mod_two_eq_one_iff_ne_two
- Kind
- kernel-term
- Status
- checked
Supports: ∀ {p : ℕ}, Nat.Prime p → (p % 2 = 1 ↔ p ≠ 2)
test "$(cargo run -q -p axeyum-lean-kernel --example nat_theorem_inventory -- prime_mod_two_eq_one_iff_ne_two 2>/dev/null | grep -Ec '^Nat\.prime_mod_two_eq_one_iff_ne_two[[:space:]]')" -ge 1 Evidence notes
`mp` needs no primality: assuming `p=2`, transport `mod p 2=1` along it to `mod 2 2=1`, contradicting `mod 2 2=0` (`even_iff_mod_two_eq_zero` applied to a hand-built `Even 2` witness, `Exists.intro 1 (Eq.refl 2)`) via `succ_ne_zero`. `mpr` is `prime_eq_two_or_mod_two_eq_one`'s case split, with the `Even` branch now contradicting the hypothesis instead of closing the goal.