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
    instance multiplicity.decidableNat :
    DecidableRel fun a b => (multiplicity a b).Dom
    Equations
    theorem induction_on_primes {P : ℕ → Prop} (h₀ : P 0) (h₁ : P 1) (h : ∀ (p a : ℕ), Nat.Prime p → P a → P (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