Documentation

Mathlib.RingTheory.Int.Basic

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 #

Tags #

prime, irreducible, integers, normalization monoid, gcd monoid, greatest common divisor

theorem Int.isCoprime_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_isCoprime {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
theorem Int.Prime.dvd_mul {m n : } {p : } (hp : Nat.Prime p) (h : p m * n) :
p m.natAbs p n.natAbs
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) :
p n.natAbs
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) :
p = 2 p m.natAbs
theorem Int.exists_prime_and_dvd {n : } (hn : n.natAbs 1) :
∃ (p : ), Prime p p n
@[implicit_reducible]
instance Int.instDecidablePredPrime :
DecidablePred Prime
@[implicit_reducible, instance 100]
theorem Int.span_natAbs (a : ) :
Ideal.span {a.natAbs} = Ideal.span {a}
@[simp]
theorem Int.isCoprime_two_left {m : } :
IsCoprime 2 m Odd m
@[simp]
theorem Int.isCoprime_two_right {m : } :
IsCoprime m 2 Odd m
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