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

is a gcd_monoid.

Equations
  • One or more equations did not get rendered due to their size.
Equations
  • One or more equations did not get rendered due to their size.
theorem gcd_eq_nat_gcd (m : ) (n : ) :
gcd m n = Nat.gcd m n
theorem lcm_eq_nat_lcm (m : ) (n : ) :
lcm m n = Nat.lcm m n
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
theorem Int.coe_gcd (i : ) (j : ) :
↑(Int.gcd i j) = gcd i j
theorem Int.coe_lcm (i : ) (j : ) :
↑(Int.lcm i j) = lcm i j
theorem Int.natAbs_gcd (i : ) (j : ) :
theorem Int.natAbs_lcm (i : ) (j : ) :
theorem Int.exists_unit_of_abs (a : ) :
u x, ↑(Int.natAbs a) = u * a
theorem Int.gcd_ne_one_iff_gcd_mul_right_ne_one {a : } {m : } {n : } :
Int.gcd a (m * n) 1 Int.gcd a m 1 Int.gcd a n 1

If gcd a (m * n) ≠ 1, then gcd a m ≠ 1 or gcd a n ≠ 1.

theorem Int.gcd_eq_one_of_gcd_mul_right_eq_one_left {a : } {m : } {n : } (h : Int.gcd a (m * n) = 1) :
Int.gcd a m = 1

If gcd a (m * n) = 1, then gcd a m = 1.

theorem Int.gcd_eq_one_of_gcd_mul_right_eq_one_right {a : } {m : } {n : } (h : Int.gcd a (m * n) = 1) :
Int.gcd a n = 1

If gcd a (m * n) = 1, then gcd a n = 1.

theorem Int.sq_of_gcd_eq_one {a : } {b : } {c : } (h : Int.gcd a 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

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 : Nat.Prime p) (h : p m * n) :
    theorem Int.Prime.dvd_mul' {m : } {n : } {p : } (hp : Nat.Prime p) (h : p m * n) :
    p m p n
    theorem Int.Prime.dvd_pow {n : } {k : } {p : } (hp : Nat.Prime p) (h : p n ^ k) :
    theorem Int.Prime.dvd_pow' {n : } {k : } {p : } (hp : Nat.Prime p) (h : p n ^ k) :
    p n
    theorem prime_two_or_dvd_of_dvd_two_mul_pow_self_two {m : } {p : } (hp : Nat.Prime p) (h : p 2 * m ^ 2) :
    theorem Int.exists_prime_and_dvd {n : } (hn : Int.natAbs n 1) :
    p, Prime p p n
    theorem induction_on_primes {P : Prop} (h₀ : P 0) (h₁ : P 1) (h : (p a : ) → Nat.Prime pP aP (p * a)) (n : ) :
    P n
    theorem Int.associated_iff {a : } {b : } :
    Associated a b a = b a = -b
    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