Documentation

Mathlib.RingTheory.Int.Basic

Divisibility over ℕ and ℤ #

This file collects results for the integers and natural numbers that use abstract algebra in their proofs or cases of ℕ and ℤ being examples of structures in abstract algebra.

Main statements #

Tags #

prime, irreducible, natural numbers, integers, normalization monoid, gcd monoid, greatest common divisor, prime factorization, prime factors, unique factorization, unique factors

Equations
  • One or more equations did not get rendered due to their size.
theorem Int.normUnit_eq (z : ) :
normUnit z = if 0 z then 1 else -1
theorem Int.normalize_of_nonneg {z : } (h : 0 z) :
normalize z = z
theorem Int.normalize_of_nonpos {z : } (h : z 0) :
normalize z = -z
theorem Int.normalize_coe_nat (n : ) :
normalize n = n
theorem Int.abs_eq_normalize (z : ) :
|z| = normalize z
theorem Int.nonneg_of_normalize_eq_self {z : } (hz : normalize z = z) :
0 z
theorem Int.nonneg_iff_normalize_eq_self (z : ) :
normalize z = z 0 z
theorem Int.eq_of_associated_of_nonneg {a : } {b : } (h : Associated a b) (ha : 0 a) (hb : 0 b) :
a = b
Equations
  • One or more equations did not get rendered due to their size.
theorem Int.coe_gcd (i : ) (j : ) :
(i.gcd j) = gcd i j
theorem Int.coe_lcm (i : ) (j : ) :
(i.lcm j) = lcm i j
theorem Int.natAbs_gcd (i : ) (j : ) :
(gcd i j).natAbs = i.gcd j
theorem Int.natAbs_lcm (i : ) (j : ) :
(lcm i j).natAbs = i.lcm j
theorem Int.exists_unit_of_abs (a : ) :
∃ (u : ) (_ : IsUnit u), a.natAbs = u * a
theorem Int.gcd_eq_natAbs {a : } {b : } :
a.gcd b = a.natAbs.gcd b.natAbs
theorem Int.gcd_eq_one_iff_coprime {a : } {b : } :
a.gcd b = 1 IsCoprime a b
theorem Int.coprime_iff_nat_coprime {a : } {b : } :
IsCoprime a b a.natAbs.Coprime b.natAbs
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_coprime {a : } {b : } {c : } (h : IsCoprime a b) (heq : a * b = c ^ 2) :
∃ (a0 : ), a = a0 ^ 2 a = -a0 ^ 2
theorem Int.natAbs_euclideanDomain_gcd (a : ) (b : ) :
(EuclideanDomain.gcd a b).natAbs = a.gcd b

Maps an associate class of integers consisting of -n, n to n : ℕ

Equations
  • One or more equations did not get rendered due to their size.
Instances For
    theorem Int.Prime.dvd_mul {m : } {n : } {p : } (hp : p.Prime) (h : p m * n) :
    p m.natAbs p n.natAbs
    theorem Int.Prime.dvd_mul' {m : } {n : } {p : } (hp : p.Prime) (h : p m * n) :
    p m p n
    theorem Int.Prime.dvd_pow {n : } {k : } {p : } (hp : p.Prime) (h : p n ^ k) :
    p n.natAbs
    theorem Int.Prime.dvd_pow' {n : } {k : } {p : } (hp : p.Prime) (h : p n ^ k) :
    p n
    theorem prime_two_or_dvd_of_dvd_two_mul_pow_self_two {m : } {p : } (hp : p.Prime) (h : p 2 * m ^ 2) :
    p = 2 p m.natAbs
    theorem Int.exists_prime_and_dvd {n : } (hn : n.natAbs 1) :
    ∃ (p : ), Prime p p n
    theorem Int.associated_natAbs (k : ) :
    Associated k k.natAbs
    theorem Int.prime_iff_natAbs_prime {k : } :
    Prime k k.natAbs.Prime
    theorem Int.associated_iff_natAbs {a : } {b : } :
    Associated a b a.natAbs = b.natAbs
    theorem Int.associated_iff {a : } {b : } :
    Associated a b a = b a = -b
    theorem Int.span_natAbs (a : ) :
    Ideal.span {a.natAbs} = Ideal.span {a}
    theorem Int.eq_pow_of_mul_eq_pow_bit1_left {a : } {b : } {c : } (hab : IsCoprime a b) {k : } (h : a * b = c ^ bit1 k) :
    ∃ (d : ), a = d ^ bit1 k
    theorem Int.eq_pow_of_mul_eq_pow_bit1_right {a : } {b : } {c : } (hab : IsCoprime a b) {k : } (h : a * b = c ^ bit1 k) :
    ∃ (d : ), b = d ^ bit1 k
    theorem Int.eq_pow_of_mul_eq_pow_bit1 {a : } {b : } {c : } (hab : IsCoprime a b) {k : } (h : a * b = c ^ bit1 k) :
    (∃ (d : ), a = d ^ bit1 k) ∃ (e : ), b = e ^ bit1 k