File: Mathlib/Data/Nat/GCD/Basic.lean

full_name: Nat.gcd_greatest
code: theorem gcd_greatest {a b d : ℕ} (hda : d ∣ a) (hdb : d ∣ b) (hd : ∀ e : ℕ, e ∣ a → e ∣ b → e ∣ d) :
    d = a.gcd b 
goal: d = a.gcd b

full_name: Nat.gcd_add_mul_right_right
code: @[simp]
theorem gcd_add_mul_right_right (m n k : ℕ) : gcd m (n + k * m) = gcd m n 
goal: m.gcd (n + k * m) = m.gcd n

full_name: Nat.gcd_add_mul_left_right
code: @[simp]
theorem gcd_add_mul_left_right (m n k : ℕ) : gcd m (n + m * k) = gcd m n 
goal: m.gcd (n + m * k) = m.gcd n

full_name: Nat.gcd_mul_right_add_right
code: @[simp]
theorem gcd_mul_right_add_right (m n k : ℕ) : gcd m (k * m + n) = gcd m n 
goal: m.gcd (k * m + n) = m.gcd n

full_name: Nat.gcd_mul_left_add_right
code: @[simp]
theorem gcd_mul_left_add_right (m n k : ℕ) : gcd m (m * k + n) = gcd m n 
goal: m.gcd (m * k + n) = m.gcd n

full_name: Nat.gcd_add_mul_right_left
code: @[simp]
theorem gcd_add_mul_right_left (m n k : ℕ) : gcd (m + k * n) n = gcd m n 
goal: (m + k * n).gcd n = m.gcd n

full_name: Nat.gcd_add_mul_left_left
code: @[simp]
theorem gcd_add_mul_left_left (m n k : ℕ) : gcd (m + n * k) n = gcd m n 
goal: (m + n * k).gcd n = m.gcd n

full_name: Nat.gcd_mul_right_add_left
code: @[simp]
theorem gcd_mul_right_add_left (m n k : ℕ) : gcd (k * n + m) n = gcd m n 
goal: (k * n + m).gcd n = m.gcd n

full_name: Nat.gcd_mul_left_add_left
code: @[simp]
theorem gcd_mul_left_add_left (m n k : ℕ) : gcd (n * k + m) n = gcd m n 
goal: (n * k + m).gcd n = m.gcd n

full_name: Nat.gcd_add_self_right
code: @[simp]
theorem gcd_add_self_right (m n : ℕ) : gcd m (n + m) = gcd m n 
goal: m.gcd (n + m) = m.gcd n

full_name: Nat.gcd_add_self_left
code: @[simp]
theorem gcd_add_self_left (m n : ℕ) : gcd (m + n) n = gcd m n 
goal: (m + n).gcd n = m.gcd n

full_name: Nat.gcd_self_add_left
code: @[simp]
theorem gcd_self_add_left (m n : ℕ) : gcd (m + n) m = gcd n m 
goal: (m + n).gcd m = n.gcd m

full_name: Nat.gcd_self_add_right
code: @[simp]
theorem gcd_self_add_right (m n : ℕ) : gcd m (m + n) = gcd m n 
goal: m.gcd (m + n) = m.gcd n

full_name: Nat.gcd_sub_self_left
code: @[simp]
theorem gcd_sub_self_left {m n : ℕ} (h : m ≤ n) : gcd (n - m) m = gcd n m 
goal: (n - m).gcd m = n.gcd m

full_name: Nat.gcd_sub_self_right
code: @[simp]
theorem gcd_sub_self_right {m n : ℕ} (h : m ≤ n) : gcd m (n - m) = gcd m n 
goal: m.gcd (n - m) = m.gcd n

full_name: Nat.gcd_self_sub_left
code: @[simp]
theorem gcd_self_sub_left {m n : ℕ} (h : m ≤ n) : gcd (n - m) n = gcd m n 
goal: (n - m).gcd n = m.gcd n

full_name: Nat.gcd_self_sub_right
code: @[simp]
theorem gcd_self_sub_right {m n : ℕ} (h : m ≤ n) : gcd n (n - m) = gcd n m 
goal: n.gcd (n - m) = n.gcd m

full_name: Nat.lcm_dvd_mul
code: theorem lcm_dvd_mul (m n : ℕ) : lcm m n ∣ m * n 
goal: m.lcm n ∣ m * n

full_name: Nat.lcm_dvd_iff
code: theorem lcm_dvd_iff {m n k : ℕ} : lcm m n ∣ k ↔ m ∣ k ∧ n ∣ k 
goal: m.lcm n ∣ k ↔ m ∣ k ∧ n ∣ k

full_name: Nat.lcm_pos
code: theorem lcm_pos {m n : ℕ} : 0 < m → 0 < n → 0 < m.lcm n 
goal: 0 < m → 0 < n → 0 < m.lcm n

full_name: Nat.lcm_mul_left
code: theorem lcm_mul_left {m n k : ℕ} : (m * n).lcm (m * k) = m * n.lcm k 
goal: (m * n).lcm (m * k) = m * n.lcm k

full_name: Nat.lcm_mul_right
code: theorem lcm_mul_right {m n k : ℕ} : (m * n).lcm (k * n) = m.lcm k * n 
goal: (m * n).lcm (k * n) = m.lcm k * n

full_name: Nat.instDecidableCoprime_mathlib
code: instance (m n : ℕ) : Decidable (Coprime m n) 
goal: Decidable (m.Coprime n)

full_name: Nat.Coprime.lcm_eq_mul
code: theorem Coprime.lcm_eq_mul {m n : ℕ} (h : Coprime m n) : lcm m n = m * n 
goal: m.lcm n = m * n

full_name: Nat.Coprime.symmetric
code: theorem Coprime.symmetric : Symmetric Coprime 
goal: Symmetric Nat.Coprime

full_name: Nat.Coprime.dvd_mul_right
code: theorem Coprime.dvd_mul_right {m n k : ℕ} (H : Coprime k n) : k ∣ m * n ↔ k ∣ m 
goal: k ∣ m * n ↔ k ∣ m

full_name: Nat.Coprime.dvd_mul_left
code: theorem Coprime.dvd_mul_left {m n k : ℕ} (H : Coprime k m) : k ∣ m * n ↔ k ∣ n 
goal: k ∣ m * n ↔ k ∣ n

full_name: Nat.coprime_add_self_right
code: @[simp]
theorem coprime_add_self_right {m n : ℕ} : Coprime m (n + m) ↔ Coprime m n 
goal: m.Coprime (n + m) ↔ m.Coprime n

full_name: Nat.coprime_self_add_right
code: @[simp]
theorem coprime_self_add_right {m n : ℕ} : Coprime m (m + n) ↔ Coprime m n 
goal: m.Coprime (m + n) ↔ m.Coprime n

full_name: Nat.coprime_add_self_left
code: @[simp]
theorem coprime_add_self_left {m n : ℕ} : Coprime (m + n) n ↔ Coprime m n 
goal: (m + n).Coprime n ↔ m.Coprime n

full_name: Nat.coprime_self_add_left
code: @[simp]
theorem coprime_self_add_left {m n : ℕ} : Coprime (m + n) m ↔ Coprime n m 
goal: (m + n).Coprime m ↔ n.Coprime m

full_name: Nat.coprime_add_mul_right_right
code: @[simp]
theorem coprime_add_mul_right_right (m n k : ℕ) : Coprime m (n + k * m) ↔ Coprime m n 
goal: m.Coprime (n + k * m) ↔ m.Coprime n

full_name: Nat.coprime_add_mul_left_right
code: @[simp]
theorem coprime_add_mul_left_right (m n k : ℕ) : Coprime m (n + m * k) ↔ Coprime m n 
goal: m.Coprime (n + m * k) ↔ m.Coprime n

full_name: Nat.coprime_mul_right_add_right
code: @[simp]
theorem coprime_mul_right_add_right (m n k : ℕ) : Coprime m (k * m + n) ↔ Coprime m n 
goal: m.Coprime (k * m + n) ↔ m.Coprime n

full_name: Nat.coprime_mul_left_add_right
code: @[simp]
theorem coprime_mul_left_add_right (m n k : ℕ) : Coprime m (m * k + n) ↔ Coprime m n 
goal: m.Coprime (m * k + n) ↔ m.Coprime n

full_name: Nat.coprime_add_mul_right_left
code: @[simp]
theorem coprime_add_mul_right_left (m n k : ℕ) : Coprime (m + k * n) n ↔ Coprime m n 
goal: (m + k * n).Coprime n ↔ m.Coprime n

full_name: Nat.coprime_add_mul_left_left
code: @[simp]
theorem coprime_add_mul_left_left (m n k : ℕ) : Coprime (m + n * k) n ↔ Coprime m n 
goal: (m + n * k).Coprime n ↔ m.Coprime n

full_name: Nat.coprime_mul_right_add_left
code: @[simp]
theorem coprime_mul_right_add_left (m n k : ℕ) : Coprime (k * n + m) n ↔ Coprime m n 
goal: (k * n + m).Coprime n ↔ m.Coprime n

full_name: Nat.coprime_mul_left_add_left
code: @[simp]
theorem coprime_mul_left_add_left (m n k : ℕ) : Coprime (n * k + m) n ↔ Coprime m n 
goal: (n * k + m).Coprime n ↔ m.Coprime n

full_name: Nat.coprime_sub_self_left
code: @[simp]
theorem coprime_sub_self_left {m n : ℕ} (h : m ≤ n) : Coprime (n - m) m ↔ Coprime n m 
goal: (n - m).Coprime m ↔ n.Coprime m

full_name: Nat.coprime_sub_self_right
code: @[simp]
theorem coprime_sub_self_right {m n : ℕ} (h : m ≤ n) : Coprime m (n - m) ↔ Coprime m n 
goal: m.Coprime (n - m) ↔ m.Coprime n

full_name: Nat.coprime_self_sub_left
code: @[simp]
theorem coprime_self_sub_left {m n : ℕ} (h : m ≤ n) : Coprime (n - m) n ↔ Coprime m n 
goal: (n - m).Coprime n ↔ m.Coprime n

full_name: Nat.coprime_self_sub_right
code: @[simp]
theorem coprime_self_sub_right {m n : ℕ} (h : m ≤ n) : Coprime n (n - m) ↔ Coprime n m 
goal: n.Coprime (n - m) ↔ n.Coprime m

full_name: Nat.coprime_pow_left_iff
code: @[simp]
theorem coprime_pow_left_iff {n : ℕ} (hn : 0 < n) (a b : ℕ) :
    Nat.Coprime (a ^ n) b ↔ Nat.Coprime a b 
goal: (a ^ n).Coprime b ↔ a.Coprime b

full_name: Nat.coprime_pow_right_iff
code: @[simp]
theorem coprime_pow_right_iff {n : ℕ} (hn : 0 < n) (a b : ℕ) :
    Nat.Coprime a (b ^ n) ↔ Nat.Coprime a b 
goal: a.Coprime (b ^ n) ↔ a.Coprime b

full_name: Nat.not_coprime_zero_zero
code: theorem not_coprime_zero_zero : ¬Coprime 0 0 
goal: ¬Nat.Coprime 0 0

full_name: Nat.coprime_one_left_iff
code: theorem coprime_one_left_iff (n : ℕ) : Coprime 1 n ↔ True 
goal: Nat.Coprime 1 n ↔ True

full_name: Nat.coprime_one_right_iff
code: theorem coprime_one_right_iff (n : ℕ) : Coprime n 1 ↔ True 
goal: n.Coprime 1 ↔ True

full_name: Nat.gcd_mul_of_coprime_of_dvd
code: theorem gcd_mul_of_coprime_of_dvd {a b c : ℕ} (hac : Coprime a c) (b_dvd_c : b ∣ c) :
    gcd (a * b) c = b 
goal: (a * b).gcd c = b

full_name: Nat.Coprime.eq_of_mul_eq_zero
code: theorem Coprime.eq_of_mul_eq_zero {m n : ℕ} (h : m.Coprime n) (hmn : m * n = 0) :
    m = 0 ∧ n = 1 ∨ m = 1 ∧ n = 0 
goal: m = 0 ∧ n = 1 ∨ m = 1 ∧ n = 0

full_name: Nat.prodDvdAndDvdOfDvdProd
code: /-- Represent a divisor of `m * n` as a product of a divisor of `m` and a divisor of `n`.

See `exists_dvd_and_dvd_of_dvd_mul` for the more general but less constructive version for other
`GCDMonoid`s. -/
def prodDvdAndDvdOfDvdProd {m n k : ℕ} (H : k ∣ m * n) :
    { d : { m' // m' ∣ m } × { n' // n' ∣ n } // k = d.1 * d.2 } 
goal: { d // k = ↑d.1 * ↑d.2 }

full_name: Nat.dvd_mul
code: theorem dvd_mul {x m n : ℕ} : x ∣ m * n ↔ ∃ y z, y ∣ m ∧ z ∣ n ∧ y * z = x 
goal: x ∣ m * n ↔ ∃ y z, y ∣ m ∧ z ∣ n ∧ y * z = x

full_name: Nat.pow_dvd_pow_iff
code: theorem pow_dvd_pow_iff {a b n : ℕ} (n0 : n ≠ 0) : a ^ n ∣ b ^ n ↔ a ∣ b 
goal: a ^ n ∣ b ^ n ↔ a ∣ b

full_name: Nat.coprime_iff_isRelPrime
code: theorem coprime_iff_isRelPrime {m n : ℕ} : m.Coprime n ↔ IsRelPrime m n 
goal: m.Coprime n ↔ IsRelPrime m n

full_name: Nat.eq_one_of_dvd_coprimes
code: /-- If `k:ℕ` divides coprime `a` and `b` then `k = 1` -/
theorem eq_one_of_dvd_coprimes {a b k : ℕ} (h_ab_coprime : Coprime a b) (hka : k ∣ a)
    (hkb : k ∣ b) : k = 1 
goal: k = 1

full_name: Nat.Coprime.mul_add_mul_ne_mul
code: theorem Coprime.mul_add_mul_ne_mul {m n a b : ℕ} (cop : Coprime m n) (ha : a ≠ 0) (hb : b ≠ 0) :
    a * m + b * n ≠ m * n 
goal: a * m + b * n ≠ m * n

full_name: Nat.dvd_gcd_mul_iff_dvd_mul
code: theorem dvd_gcd_mul_iff_dvd_mul : x ∣ gcd x n * m ↔ x ∣ n * m 
goal: x ∣ x.gcd n * m ↔ x ∣ n * m

full_name: Nat.dvd_mul_gcd_iff_dvd_mul
code: theorem dvd_mul_gcd_iff_dvd_mul : x ∣ n * gcd x m ↔ x ∣ n * m 
goal: x ∣ n * x.gcd m ↔ x ∣ n * m

full_name: Nat.dvd_gcd_mul_gcd_iff_dvd_mul
code: theorem dvd_gcd_mul_gcd_iff_dvd_mul : x ∣ gcd x n * gcd x m ↔ x ∣ n * m 
goal: x ∣ x.gcd n * x.gcd m ↔ x ∣ n * m

full_name: Nat.gcd_mul_gcd_eq_iff_dvd_mul_of_coprime
code: theorem gcd_mul_gcd_eq_iff_dvd_mul_of_coprime (hcop : Coprime n m) :
    gcd x n * gcd x m = x ↔ x ∣ n * m 
goal: x.gcd n * x.gcd m = x ↔ x ∣ n * m