File: .lake/packages/batteries/Batteries/Data/Nat/Gcd.lean

full_name: Nat.Coprime
code: /-- `m` and `n` are coprime, or relatively prime, if their `gcd` is 1. -/
@[reducible] def Coprime (m n : Nat) : Prop 
goal: Prop

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

full_name: Nat.coprime_iff_gcd_eq_one
code: theorem coprime_iff_gcd_eq_one : Coprime m n ↔ gcd m n = 1 
goal: m.Coprime n ↔ m.gcd n = 1

full_name: Nat.Coprime.gcd_eq_one
code: theorem Coprime.gcd_eq_one : Coprime m n → gcd m n = 1 
goal: m.Coprime n → m.gcd n = 1

full_name: Nat.Coprime.symm
code: theorem Coprime.symm : Coprime n m → Coprime m n 
goal: n.Coprime m → m.Coprime n

full_name: Nat.coprime_comm
code: theorem coprime_comm : Coprime n m ↔ Coprime m n 
goal: n.Coprime m ↔ m.Coprime n

full_name: Nat.Coprime.dvd_of_dvd_mul_right
code: theorem Coprime.dvd_of_dvd_mul_right (H1 : Coprime k n) (H2 : k ∣ m * n) : k ∣ m 
goal: k ∣ m

full_name: Nat.Coprime.dvd_of_dvd_mul_left
code: theorem Coprime.dvd_of_dvd_mul_left (H1 : Coprime k m) (H2 : k ∣ m * n) : k ∣ n 
goal: k ∣ n

full_name: Nat.Coprime.gcd_mul_left_cancel
code: theorem Coprime.gcd_mul_left_cancel (m : Nat) (H : Coprime k n) : gcd (k * m) n = gcd m n 
goal: (k * m).gcd n = m.gcd n

full_name: Nat.Coprime.gcd_mul_right_cancel
code: theorem Coprime.gcd_mul_right_cancel (m : Nat) (H : Coprime k n) : gcd (m * k) n = gcd m n 
goal: (m * k).gcd n = m.gcd n

full_name: Nat.Coprime.gcd_mul_left_cancel_right
code: theorem Coprime.gcd_mul_left_cancel_right (n : Nat)
    (H : Coprime k m) : gcd m (k * n) = gcd m n 
goal: m.gcd (k * n) = m.gcd n

full_name: Nat.Coprime.gcd_mul_right_cancel_right
code: theorem Coprime.gcd_mul_right_cancel_right (n : Nat)
    (H : Coprime k m) : gcd m (n * k) = gcd m n 
goal: m.gcd (n * k) = m.gcd n

full_name: Nat.coprime_div_gcd_div_gcd
code: theorem coprime_div_gcd_div_gcd
    (H : 0 < gcd m n) : Coprime (m / gcd m n) (n / gcd m n) 
goal: (m / m.gcd n).Coprime (n / m.gcd n)

full_name: Nat.not_coprime_of_dvd_of_dvd
code: theorem not_coprime_of_dvd_of_dvd (dgt1 : 1 < d) (Hm : d ∣ m) (Hn : d ∣ n) : ¬ Coprime m n 
goal: ¬m.Coprime n

full_name: Nat.exists_coprime
code: theorem exists_coprime (m n : Nat) :
    ∃ m' n', Coprime m' n' ∧ m = m' * gcd m n ∧ n = n' * gcd m n 
goal: ∃ m' n', m'.Coprime n' ∧ m = m' * m.gcd n ∧ n = n' * m.gcd n

full_name: Nat.exists_coprime'
code: theorem exists_coprime' (H : 0 < gcd m n) :
    ∃ g m' n', 0 < g ∧ Coprime m' n' ∧ m = m' * g ∧ n = n' * g 
goal: ∃ g m' n', 0 < g ∧ m'.Coprime n' ∧ m = m' * g ∧ n = n' * g

full_name: Nat.Coprime.mul
code: theorem Coprime.mul (H1 : Coprime m k) (H2 : Coprime n k) : Coprime (m * n) k 
goal: (m * n).Coprime k

full_name: Nat.Coprime.mul_right
code: theorem Coprime.mul_right (H1 : Coprime k m) (H2 : Coprime k n) : Coprime k (m * n) 
goal: k.Coprime (m * n)

full_name: Nat.Coprime.coprime_dvd_left
code: theorem Coprime.coprime_dvd_left (H1 : m ∣ k) (H2 : Coprime k n) : Coprime m n 
goal: m.Coprime n

full_name: Nat.Coprime.coprime_dvd_right
code: theorem Coprime.coprime_dvd_right (H1 : n ∣ m) (H2 : Coprime k m) : Coprime k n 
goal: k.Coprime n

full_name: Nat.Coprime.coprime_mul_left
code: theorem Coprime.coprime_mul_left (H : Coprime (k * m) n) : Coprime m n 
goal: m.Coprime n

full_name: Nat.Coprime.coprime_mul_right
code: theorem Coprime.coprime_mul_right (H : Coprime (m * k) n) : Coprime m n 
goal: m.Coprime n

full_name: Nat.Coprime.coprime_mul_left_right
code: theorem Coprime.coprime_mul_left_right (H : Coprime m (k * n)) : Coprime m n 
goal: m.Coprime n

full_name: Nat.Coprime.coprime_mul_right_right
code: theorem Coprime.coprime_mul_right_right (H : Coprime m (n * k)) : Coprime m n 
goal: m.Coprime n

full_name: Nat.Coprime.coprime_div_left
code: theorem Coprime.coprime_div_left (cmn : Coprime m n) (dvd : a ∣ m) : Coprime (m / a) n 
goal: (m / a).Coprime n

full_name: Nat.Coprime.coprime_div_right
code: theorem Coprime.coprime_div_right (cmn : Coprime m n) (dvd : a ∣ n) : Coprime m (n / a) 
goal: m.Coprime (n / a)

full_name: Nat.coprime_mul_iff_left
code: theorem coprime_mul_iff_left : Coprime (m * n) k ↔ Coprime m k ∧ Coprime n k 
goal: (m * n).Coprime k ↔ m.Coprime k ∧ n.Coprime k

full_name: Nat.coprime_mul_iff_right
code: theorem coprime_mul_iff_right : Coprime k (m * n) ↔ Coprime k m ∧ Coprime k n 
goal: k.Coprime (m * n) ↔ k.Coprime m ∧ k.Coprime n

full_name: Nat.Coprime.gcd_left
code: theorem Coprime.gcd_left (k : Nat) (hmn : Coprime m n) : Coprime (gcd k m) n 
goal: (k.gcd m).Coprime n

full_name: Nat.Coprime.gcd_right
code: theorem Coprime.gcd_right (k : Nat) (hmn : Coprime m n) : Coprime m (gcd k n) 
goal: m.Coprime (k.gcd n)

full_name: Nat.Coprime.gcd_both
code: theorem Coprime.gcd_both (k l : Nat) (hmn : Coprime m n) : Coprime (gcd k m) (gcd l n) 
goal: (k.gcd m).Coprime (l.gcd n)

full_name: Nat.Coprime.mul_dvd_of_dvd_of_dvd
code: theorem Coprime.mul_dvd_of_dvd_of_dvd (hmn : Coprime m n) (hm : m ∣ a) (hn : n ∣ a) : m * n ∣ a 
goal: m * n ∣ a

full_name: Nat.coprime_zero_left
code: @[simp] theorem coprime_zero_left (n : Nat) : Coprime 0 n ↔ n = 1 
goal: Nat.Coprime 0 n ↔ n = 1

full_name: Nat.coprime_zero_right
code: @[simp] theorem coprime_zero_right (n : Nat) : Coprime n 0 ↔ n = 1 
goal: n.Coprime 0 ↔ n = 1

full_name: Nat.coprime_one_left
code: theorem coprime_one_left : ∀ n, Coprime 1 n 
goal: Nat.Coprime 1 n

full_name: Nat.coprime_one_right
code: theorem coprime_one_right : ∀ n, Coprime n 1 
goal: n.Coprime 1

full_name: Nat.coprime_one_left_eq_true
code: @[simp] theorem coprime_one_left_eq_true (n) : Coprime 1 n = True 
goal: Nat.Coprime 1 n = True

full_name: Nat.coprime_one_right_eq_true
code: @[simp] theorem coprime_one_right_eq_true (n) : Coprime n 1 = True 
goal: n.Coprime 1 = True

full_name: Nat.coprime_self
code: @[simp] theorem coprime_self (n : Nat) : Coprime n n ↔ n = 1 
goal: n.Coprime n ↔ n = 1

full_name: Nat.Coprime.pow_left
code: theorem Coprime.pow_left (n : Nat) (H1 : Coprime m k) : Coprime (m ^ n) k 
goal: (m ^ n).Coprime k

full_name: Nat.Coprime.pow_right
code: theorem Coprime.pow_right (n : Nat) (H1 : Coprime k m) : Coprime k (m ^ n) 
goal: k.Coprime (m ^ n)

full_name: Nat.Coprime.pow
code: theorem Coprime.pow {k l : Nat} (m n : Nat) (H1 : Coprime k l) : Coprime (k ^ m) (l ^ n) 
goal: (k ^ m).Coprime (l ^ n)

full_name: Nat.Coprime.eq_one_of_dvd
code: theorem Coprime.eq_one_of_dvd {k m : Nat} (H : Coprime k m) (d : k ∣ m) : k = 1 
goal: k = 1

full_name: Nat.Coprime.gcd_mul
code: theorem Coprime.gcd_mul (k : Nat) (h : Coprime m n) : gcd k (m * n) = gcd k m * gcd k n 
goal: k.gcd (m * n) = k.gcd m * k.gcd n

full_name: Nat.gcd_mul_gcd_of_coprime_of_mul_eq_mul
code: theorem gcd_mul_gcd_of_coprime_of_mul_eq_mul
    (cop : Coprime c d) (h : a * b = c * d) : a.gcd c * b.gcd c = c 
goal: a.gcd c * b.gcd c = c