Divisibility over ℤ #
This file collects results for the integers that use ring theory in their proofs or cases of ℤ being examples of structures in ring theory.
Main statements #
Int.Prime.dvd_mul': A prime number dividing a product in ℤ divides at least one factor.Int.exists_prime_and_dvd: Every non-unit integer has a prime divisor.Int.prime_iff_natAbs_prime: Primality in ℤ corresponds to primality of its absolute value in ℕ.Int.span_natAbs: The principal ideal generated bya.natAbsis equal to that ofa.
Tags #
prime, irreducible, integers, normalization monoid, gcd monoid, greatest common divisor
theorem
Int.gcd_ne_one_iff_gcd_mul_right_ne_one
{a : ℤ}
{m n : ℕ}
:
a.gcd (↑m * ↑n) ≠ 1 ↔ a.gcd ↑m ≠ 1 ∨ a.gcd ↑n ≠ 1
If gcd a (m * n) ≠ 1, then gcd a m ≠ 1 or gcd a n ≠ 1.
theorem
Int.sq_of_gcd_eq_one
{a b c : ℤ}
(h : a.gcd b = 1)
(heq : a * b = c ^ 2)
:
∃ (a0 : ℤ), a = a0 ^ 2 ∨ a = -a0 ^ 2
theorem
Int.sq_of_isCoprime
{a b c : ℤ}
(h : IsCoprime a b)
(heq : a * b = c ^ 2)
:
∃ (a0 : ℤ), a = a0 ^ 2 ∨ a = -a0 ^ 2
theorem
Int.Prime.dvd_mul
{m n : ℤ}
{p : ℕ}
(hp : Nat.Prime p)
(h : ↑p ∣ m * n)
:
p ∣ m.natAbs ∨ p ∣ n.natAbs
theorem
prime_two_or_dvd_of_dvd_two_mul_pow_self_two
{m : ℤ}
{p : ℕ}
(hp : Nat.Prime p)
(h : ↑p ∣ 2 * m ^ 2)
:
p = 2 ∨ p ∣ m.natAbs
@[implicit_reducible, instance 100]
theorem
Int.eq_pow_of_mul_eq_pow_odd_left
{a b c : ℤ}
(hab : IsCoprime a b)
{k : ℕ}
(hk : Odd k)
(h : a * b = c ^ k)
:
∃ (d : ℤ), a = d ^ k
theorem
Int.eq_pow_of_mul_eq_pow_odd_right
{a b c : ℤ}
(hab : IsCoprime a b)
{k : ℕ}
(hk : Odd k)
(h : a * b = c ^ k)
:
∃ (d : ℤ), b = d ^ k
theorem
Int.eq_pow_of_mul_eq_pow_odd
{a b c : ℤ}
(hab : IsCoprime a b)
{k : ℕ}
(hk : Odd k)
(h : a * b = c ^ k)
:
(∃ (d : ℤ), a = d ^ k) ∧ ∃ (e : ℤ), b = e ^ k