Documentation

Mathlib.RingTheory.Coprime.Lemmas

Additional lemmas about elements of a ring satisfying IsCoprime #

and elements of a monoid satisfying IsRelPrime

These lemmas are in a separate file to the definition of IsCoprime or IsRelPrime as they require more imports.

Notably, this includes lemmas about Finset.prod as this requires importing BigOperators, and lemmas about Pow since these are easiest to prove via Finset.prod.

@[simp]
theorem Nat.isCoprime_iff_coprime {m n : โ„•} :
IsCoprime โ†‘m โ†‘n โ†” m.Coprime n
theorem IsCoprime.natCoprime {m n : โ„•} :
IsCoprime โ†‘m โ†‘n โ†’ m.Coprime n

Alias of the forward direction of Nat.isCoprime_iff_coprime.

theorem Nat.Coprime.isCoprime {m n : โ„•} :
m.Coprime n โ†’ IsCoprime โ†‘m โ†‘n

Alias of the reverse direction of Nat.isCoprime_iff_coprime.

@[deprecated IsCoprime.natCoprime (since := "2025-08-25")]
theorem IsCoprime.nat_coprime {m n : โ„•} :
IsCoprime โ†‘m โ†‘n โ†’ m.Coprime n

Alias of the forward direction of Nat.isCoprime_iff_coprime.


Alias of the forward direction of Nat.isCoprime_iff_coprime.

theorem Nat.Coprime.cast {R : Type u_1} [CommRing R] {a b : โ„•} (h : a.Coprime b) :
IsCoprime โ†‘a โ†‘b
theorem ne_zero_or_ne_zero_of_nat_coprime {A : Type u} [CommRing A] [Nontrivial A] {a b : โ„•} (h : a.Coprime b) :
โ†‘a โ‰  0 โˆจ โ†‘b โ‰  0
theorem IsCoprime.prod_left {R : Type u} {I : Type v} [CommSemiring R] {x : R} {s : I โ†’ R} {t : Finset I} (h : โˆ€ i โˆˆ t, IsCoprime (s i) x) :
IsCoprime (โˆ i โˆˆ t, s i) x
theorem IsCoprime.prod_right {R : Type u} {I : Type v} [CommSemiring R] {x : R} {s : I โ†’ R} {t : Finset I} :
(โˆ€ i โˆˆ t, IsCoprime x (s i)) โ†’ IsCoprime x (โˆ i โˆˆ t, s i)
theorem IsCoprime.prod_left_iff {R : Type u} {I : Type v} [CommSemiring R] {x : R} {s : I โ†’ R} {t : Finset I} :
IsCoprime (โˆ i โˆˆ t, s i) x โ†” โˆ€ i โˆˆ t, IsCoprime (s i) x
theorem IsCoprime.prod_right_iff {R : Type u} {I : Type v} [CommSemiring R] {x : R} {s : I โ†’ R} {t : Finset I} :
IsCoprime x (โˆ i โˆˆ t, s i) โ†” โˆ€ i โˆˆ t, IsCoprime x (s i)
theorem IsCoprime.of_prod_left {R : Type u} {I : Type v} [CommSemiring R] {x : R} {s : I โ†’ R} {t : Finset I} (H1 : IsCoprime (โˆ i โˆˆ t, s i) x) (i : I) (hit : i โˆˆ t) :
IsCoprime (s i) x
theorem IsCoprime.of_prod_right {R : Type u} {I : Type v} [CommSemiring R] {x : R} {s : I โ†’ R} {t : Finset I} (H1 : IsCoprime x (โˆ i โˆˆ t, s i)) (i : I) (hit : i โˆˆ t) :
IsCoprime x (s i)
theorem Finset.prod_dvd_of_coprime {R : Type u} {I : Type v} [CommSemiring R] {z : R} {s : I โ†’ R} {t : Finset I} (Hs : (โ†‘t).Pairwise (Function.onFun IsCoprime s)) (Hs1 : โˆ€ i โˆˆ t, s i โˆฃ z) :
โˆ x โˆˆ t, s x โˆฃ z
theorem Fintype.prod_dvd_of_coprime {R : Type u} {I : Type v} [CommSemiring R] {z : R} {s : I โ†’ R} [Fintype I] (Hs : Pairwise (Function.onFun IsCoprime s)) (Hs1 : โˆ€ (i : I), s i โˆฃ z) :
โˆ x : I, s x โˆฃ z
theorem exists_sum_eq_one_iff_pairwise_coprime {R : Type u} {I : Type v} [CommSemiring R] {s : I โ†’ R} {t : Finset I} [DecidableEq I] (h : t.Nonempty) :
(โˆƒ (ฮผ : I โ†’ R), โˆ‘ i โˆˆ t, ฮผ i * โˆ j โˆˆ t \ {i}, s j = 1) โ†” Pairwise (Function.onFun IsCoprime fun (i : โ†ฅt) => s โ†‘i)
theorem exists_sum_eq_one_iff_pairwise_coprime' {R : Type u} {I : Type v} [CommSemiring R] {s : I โ†’ R} [Fintype I] [Nonempty I] [DecidableEq I] :
(โˆƒ (ฮผ : I โ†’ R), โˆ‘ i : I, ฮผ i * โˆ j โˆˆ {i}แถœ, s j = 1) โ†” Pairwise (Function.onFun IsCoprime s)
theorem pairwise_coprime_iff_coprime_prod {R : Type u} {I : Type v} [CommSemiring R] {s : I โ†’ R} {t : Finset I} [DecidableEq I] :
Pairwise (Function.onFun IsCoprime fun (i : โ†ฅt) => s โ†‘i) โ†” โˆ€ i โˆˆ t, IsCoprime (s i) (โˆ j โˆˆ t \ {i}, s j)
theorem IsCoprime.pow_left {R : Type u} [CommSemiring R] {x y : R} {m : โ„•} (H : IsCoprime x y) :
IsCoprime (x ^ m) y
theorem IsCoprime.pow_right {R : Type u} [CommSemiring R] {x y : R} {n : โ„•} (H : IsCoprime x y) :
IsCoprime x (y ^ n)
theorem IsCoprime.pow {R : Type u} [CommSemiring R] {x y : R} {m n : โ„•} (H : IsCoprime x y) :
IsCoprime (x ^ m) (y ^ n)
theorem IsCoprime.pow_left_iff {R : Type u} [CommSemiring R] {x y : R} {m : โ„•} (hm : 0 < m) :
theorem IsCoprime.pow_right_iff {R : Type u} [CommSemiring R] {x y : R} {m : โ„•} (hm : 0 < m) :
theorem IsCoprime.pow_iff {R : Type u} [CommSemiring R] {x y : R} {m n : โ„•} (hm : 0 < m) (hn : 0 < n) :
IsCoprime (x ^ m) (y ^ n) โ†” IsCoprime x y
theorem IsRelPrime.prod_left {ฮฑ : Type u_2} {I : Type u_1} [CommMonoid ฮฑ] [DecompositionMonoid ฮฑ] {x : ฮฑ} {s : I โ†’ ฮฑ} {t : Finset I} :
(โˆ€ i โˆˆ t, IsRelPrime (s i) x) โ†’ IsRelPrime (โˆ i โˆˆ t, s i) x
theorem IsRelPrime.prod_right {ฮฑ : Type u_2} {I : Type u_1} [CommMonoid ฮฑ] [DecompositionMonoid ฮฑ] {x : ฮฑ} {s : I โ†’ ฮฑ} {t : Finset I} :
(โˆ€ i โˆˆ t, IsRelPrime x (s i)) โ†’ IsRelPrime x (โˆ i โˆˆ t, s i)
theorem IsRelPrime.prod_left_iff {ฮฑ : Type u_1} {I : Type u_2} [CommMonoid ฮฑ] [DecompositionMonoid ฮฑ] {x : ฮฑ} {s : I โ†’ ฮฑ} {t : Finset I} :
IsRelPrime (โˆ i โˆˆ t, s i) x โ†” โˆ€ i โˆˆ t, IsRelPrime (s i) x
theorem IsRelPrime.prod_right_iff {ฮฑ : Type u_1} {I : Type u_2} [CommMonoid ฮฑ] [DecompositionMonoid ฮฑ] {x : ฮฑ} {s : I โ†’ ฮฑ} {t : Finset I} :
IsRelPrime x (โˆ i โˆˆ t, s i) โ†” โˆ€ i โˆˆ t, IsRelPrime x (s i)
theorem IsRelPrime.of_prod_left {ฮฑ : Type u_1} {I : Type u_2} [CommMonoid ฮฑ] [DecompositionMonoid ฮฑ] {x : ฮฑ} {s : I โ†’ ฮฑ} {t : Finset I} (H1 : IsRelPrime (โˆ i โˆˆ t, s i) x) (i : I) (hit : i โˆˆ t) :
IsRelPrime (s i) x
theorem IsRelPrime.of_prod_right {ฮฑ : Type u_1} {I : Type u_2} [CommMonoid ฮฑ] [DecompositionMonoid ฮฑ] {x : ฮฑ} {s : I โ†’ ฮฑ} {t : Finset I} (H1 : IsRelPrime x (โˆ i โˆˆ t, s i)) (i : I) (hit : i โˆˆ t) :
IsRelPrime x (s i)
theorem Finset.prod_dvd_of_isRelPrime {ฮฑ : Type u_2} {I : Type u_1} [CommMonoid ฮฑ] [DecompositionMonoid ฮฑ] {z : ฮฑ} {s : I โ†’ ฮฑ} {t : Finset I} :
(โ†‘t).Pairwise (Function.onFun IsRelPrime s) โ†’ (โˆ€ i โˆˆ t, s i โˆฃ z) โ†’ โˆ x โˆˆ t, s x โˆฃ z
theorem Fintype.prod_dvd_of_isRelPrime {ฮฑ : Type u_2} {I : Type u_1} [CommMonoid ฮฑ] [DecompositionMonoid ฮฑ] {z : ฮฑ} {s : I โ†’ ฮฑ} [Fintype I] (Hs : Pairwise (Function.onFun IsRelPrime s)) (Hs1 : โˆ€ (i : I), s i โˆฃ z) :
โˆ x : I, s x โˆฃ z
theorem pairwise_isRelPrime_iff_isRelPrime_prod {ฮฑ : Type u_2} {I : Type u_1} [CommMonoid ฮฑ] [DecompositionMonoid ฮฑ] {s : I โ†’ ฮฑ} {t : Finset I} [DecidableEq I] :
Pairwise (Function.onFun IsRelPrime fun (i : โ†ฅt) => s โ†‘i) โ†” โˆ€ i โˆˆ t, IsRelPrime (s i) (โˆ j โˆˆ t \ {i}, s j)
theorem IsRelPrime.pow_left {ฮฑ : Type u_1} [CommMonoid ฮฑ] [DecompositionMonoid ฮฑ] {x y : ฮฑ} {m : โ„•} (H : IsRelPrime x y) :
IsRelPrime (x ^ m) y
theorem IsRelPrime.pow_right {ฮฑ : Type u_1} [CommMonoid ฮฑ] [DecompositionMonoid ฮฑ] {x y : ฮฑ} {n : โ„•} (H : IsRelPrime x y) :
IsRelPrime x (y ^ n)
theorem IsRelPrime.pow {ฮฑ : Type u_1} [CommMonoid ฮฑ] [DecompositionMonoid ฮฑ] {x y : ฮฑ} {m n : โ„•} (H : IsRelPrime x y) :
IsRelPrime (x ^ m) (y ^ n)
theorem IsRelPrime.pow_left_iff {ฮฑ : Type u_1} [CommMonoid ฮฑ] [DecompositionMonoid ฮฑ] {x y : ฮฑ} {m : โ„•} (hm : 0 < m) :
theorem IsRelPrime.pow_right_iff {ฮฑ : Type u_1} [CommMonoid ฮฑ] [DecompositionMonoid ฮฑ] {x y : ฮฑ} {m : โ„•} (hm : 0 < m) :
theorem IsRelPrime.pow_iff {ฮฑ : Type u_1} [CommMonoid ฮฑ] [DecompositionMonoid ฮฑ] {x y : ฮฑ} {m n : โ„•} (hm : 0 < m) (hn : 0 < n) :
IsRelPrime (x ^ m) (y ^ n) โ†” IsRelPrime x y