Documentation

Mathlib.Algebra.GroupWithZero.Associated

Associated elements. #

In this file we define an equivalence relation Associated saying that two elements of a monoid differ by a multiplication by a unit. Then we show that the quotient type Associates is a monoid and prove basic properties of this quotient.

def Associated {M : Type u_1} [Monoid M] (x y : M) :

Two elements of a Monoid are Associated if one of them is another one multiplied by a unit on the right.

Instances For
    theorem Associated.refl {M : Type u_1} [Monoid M] (x : M) :
    @[simp]
    theorem Associated.rfl {M : Type u_1} [Monoid M] {x : M} :
    theorem Associated.symm {M : Type u_1} [Monoid M] {x y : M} :
    Associated x y โ†’ Associated y x
    theorem Associated.comm {M : Type u_1} [Monoid M] {x y : M} :
    Associated x y โ†” Associated y x
    theorem Associated.trans {M : Type u_1} [Monoid M] {x y z : M} :
    Associated x y โ†’ Associated y z โ†’ Associated x z
    @[implicit_reducible]
    def Associated.setoid (M : Type u_2) [Monoid M] :
    Setoid M

    The setoid of the relation x ~แตค y iff there is a unit u such that x * u = y

    Instances For
      theorem Associated.map {M : Type u_2} {N : Type u_3} [Monoid M] [Monoid N] {F : Type u_4} [FunLike F M N] [MonoidHomClass F M N] (f : F) {x y : M} (ha : Associated x y) :
      Associated (f x) (f y)
      theorem Associated.of_eq {M : Type u_1} [Monoid M] {a b : M} (h : a = b) :
      theorem unit_associated_one {M : Type u_1} [Monoid M] {u : Mหฃ} :
      Associated (โ†‘u) 1
      @[simp]
      theorem associated_one_iff_isUnit {M : Type u_1} [Monoid M] {a : M} :
      Associated a 1 โ†” IsUnit a
      @[simp]
      theorem associated_zero_iff_eq_zero {M : Type u_1} [MonoidWithZero M] (a : M) :
      Associated a 0 โ†” a = 0
      theorem associated_one_of_mul_eq_one {M : Type u_1} [CommMonoid M] {a : M} (b : M) (hab : a * b = 1) :
      theorem associated_mul_unit_left {N : Type u_2} [Monoid N] (a u : N) (hu : IsUnit u) :
      Associated (a * u) a
      theorem associated_unit_mul_left {N : Type u_2} [CommMonoid N] (a u : N) (hu : IsUnit u) :
      Associated (u * a) a
      theorem associated_mul_unit_right {N : Type u_2} [Monoid N] (a u : N) (hu : IsUnit u) :
      Associated a (a * u)
      theorem associated_unit_mul_right {N : Type u_2} [CommMonoid N] (a u : N) (hu : IsUnit u) :
      Associated a (u * a)
      theorem associated_mul_isUnit_left_iff {N : Type u_2} [Monoid N] {a u b : N} (hu : IsUnit u) :
      Associated (a * u) b โ†” Associated a b
      theorem associated_isUnit_mul_left_iff {N : Type u_2} [CommMonoid N] {u a b : N} (hu : IsUnit u) :
      Associated (u * a) b โ†” Associated a b
      theorem associated_mul_isUnit_right_iff {N : Type u_2} [Monoid N] {a b u : N} (hu : IsUnit u) :
      Associated a (b * u) โ†” Associated a b
      theorem associated_isUnit_mul_right_iff {N : Type u_2} [CommMonoid N] {a u b : N} (hu : IsUnit u) :
      Associated a (u * b) โ†” Associated a b
      @[simp]
      theorem associated_mul_unit_left_iff {N : Type u_2} [Monoid N] {a b : N} {u : Nหฃ} :
      Associated (a * โ†‘u) b โ†” Associated a b
      @[simp]
      theorem associated_unit_mul_left_iff {N : Type u_2} [CommMonoid N] {a b : N} {u : Nหฃ} :
      Associated (โ†‘u * a) b โ†” Associated a b
      @[simp]
      theorem associated_mul_unit_right_iff {N : Type u_2} [Monoid N] {a b : N} {u : Nหฃ} :
      Associated a (b * โ†‘u) โ†” Associated a b
      @[simp]
      theorem associated_unit_mul_right_iff {N : Type u_2} [CommMonoid N] {a b : N} {u : Nหฃ} :
      Associated a (โ†‘u * b) โ†” Associated a b
      theorem Associated.mul_left {M : Type u_1} [Monoid M] (a : M) {b c : M} (h : Associated b c) :
      Associated (a * b) (a * c)
      theorem Associated.mul_right {M : Type u_1} [CommMonoid M] {a b : M} (h : Associated a b) (c : M) :
      Associated (a * c) (b * c)
      theorem Associated.mul_mul {M : Type u_1} [CommMonoid M] {aโ‚ aโ‚‚ bโ‚ bโ‚‚ : M} (hโ‚ : Associated aโ‚ bโ‚) (hโ‚‚ : Associated aโ‚‚ bโ‚‚) :
      Associated (aโ‚ * aโ‚‚) (bโ‚ * bโ‚‚)
      theorem Associated.pow_pow {M : Type u_1} [CommMonoid M] {a b : M} {n : โ„•} (h : Associated a b) :
      Associated (a ^ n) (b ^ n)
      theorem Associated.dvd {M : Type u_1} [Monoid M] {a b : M} :
      Associated a b โ†’ a โˆฃ b
      theorem Associated.dvd' {M : Type u_1} [Monoid M] {a b : M} (h : Associated a b) :
      b โˆฃ a
      theorem Associated.dvd_dvd {M : Type u_1} [Monoid M] {a b : M} (h : Associated a b) :
      a โˆฃ b โˆง b โˆฃ a
      theorem associated_of_dvd_dvd {M : Type u_1} [MonoidWithZero M] [IsLeftCancelMulZero M] {a b : M} (hab : a โˆฃ b) (hba : b โˆฃ a) :
      theorem dvd_dvd_iff_associated {M : Type u_1} [MonoidWithZero M] [IsLeftCancelMulZero M] {a b : M} :
      a โˆฃ b โˆง b โˆฃ a โ†” Associated a b
      @[implicit_reducible]
      instance instDecidableRelAssociatedOfIsLeftCancelMulZeroOfDvd {M : Type u_1} [MonoidWithZero M] [IsLeftCancelMulZero M] [DecidableRel fun (x1 x2 : M) => x1 โˆฃ x2] :
      DecidableRel fun (x1 x2 : M) => Associated x1 x2
      theorem Associated.dvd_iff_dvd_left {M : Type u_1} [Monoid M] {a b c : M} (h : Associated a b) :
      a โˆฃ c โ†” b โˆฃ c
      theorem Associated.dvd_iff_dvd_right {M : Type u_1} [Monoid M] {a b c : M} (h : Associated b c) :
      a โˆฃ b โ†” a โˆฃ c
      theorem Associated.eq_zero_iff {M : Type u_1} [MonoidWithZero M] {a b : M} (h : Associated a b) :
      a = 0 โ†” b = 0
      theorem Associated.ne_zero_iff {M : Type u_1} [MonoidWithZero M] {a b : M} (h : Associated a b) :
      a โ‰  0 โ†” b โ‰  0
      theorem Associated.prime {M : Type u_1} [CommMonoidWithZero M] {p q : M} (h : Associated p q) (hp : Prime p) :
      theorem prime_mul_iff {M : Type u_1} [CommMonoidWithZero M] [IsCancelMulZero M] {x y : M} :
      Prime (x * y) โ†” Prime x โˆง IsUnit y โˆจ IsUnit x โˆง Prime y
      @[simp]
      theorem prime_pow_iff {M : Type u_1} [CommMonoidWithZero M] [IsCancelMulZero M] {p : M} {n : โ„•} :
      Prime (p ^ n) โ†” Prime p โˆง n = 1
      theorem Irreducible.dvd_iff {M : Type u_1} [Monoid M] {x y : M} (hx : Irreducible x) :
      y โˆฃ x โ†” IsUnit y โˆจ Associated x y
      theorem Irreducible.associated_of_dvd {M : Type u_1} [Monoid M] {p q : M} (p_irr : Irreducible p) (q_irr : Irreducible q) (dvd : p โˆฃ q) :
      theorem Irreducible.dvd_irreducible_iff_associated {M : Type u_1} [Monoid M] {p q : M} (pp : Irreducible p) (qp : Irreducible q) :
      p โˆฃ q โ†” Associated p q
      theorem Prime.associated_of_dvd {M : Type u_1} [CommMonoidWithZero M] [IsCancelMulZero M] {p q : M} (p_prime : Prime p) (q_prime : Prime q) (dvd : p โˆฃ q) :
      theorem Prime.dvd_prime_iff_associated {M : Type u_1} [CommMonoidWithZero M] [IsCancelMulZero M] {p q : M} (pp : Prime p) (qp : Prime q) :
      p โˆฃ q โ†” Associated p q
      theorem Associated.prime_iff {M : Type u_1} [CommMonoidWithZero M] {p q : M} (h : Associated p q) :
      Prime p โ†” Prime q
      theorem Associated.isUnit {M : Type u_1} [Monoid M] {a b : M} (h : Associated a b) :
      IsUnit a โ†’ IsUnit b
      theorem Associated.isUnit_iff {M : Type u_1} [Monoid M] {a b : M} (h : Associated a b) :
      IsUnit a โ†” IsUnit b
      theorem Irreducible.isUnit_iff_not_associated_of_dvd {M : Type u_1} [Monoid M] {x y : M} (hx : Irreducible x) (hy : y โˆฃ x) :
      IsUnit y โ†” ยฌAssociated x y
      theorem Associated.irreducible {M : Type u_1} [Monoid M] {p q : M} (h : Associated p q) (hp : Irreducible p) :
      theorem Associated.irreducible_iff {M : Type u_1} [Monoid M] {p q : M} (h : Associated p q) :
      theorem Associated.of_mul_left {M : Type u_1} [CommMonoidWithZero M] [IsCancelMulZero M] {a b c d : M} (h : Associated (a * b) (c * d)) (hโ‚ : Associated a c) (ha : a โ‰  0) :
      theorem Associated.of_mul_right {M : Type u_1} [CommMonoidWithZero M] [IsCancelMulZero M] {a b c d : M} :
      Associated (a * b) (c * d) โ†’ Associated b d โ†’ b โ‰  0 โ†’ Associated a c
      theorem Associated.of_pow_associated_of_prime {M : Type u_1} [CommMonoidWithZero M] [IsCancelMulZero M] {pโ‚ pโ‚‚ : M} {kโ‚ kโ‚‚ : โ„•} (hpโ‚ : Prime pโ‚) (hpโ‚‚ : Prime pโ‚‚) (hkโ‚ : 0 < kโ‚) (h : Associated (pโ‚ ^ kโ‚) (pโ‚‚ ^ kโ‚‚)) :
      Associated pโ‚ pโ‚‚
      theorem Associated.of_pow_associated_of_prime' {M : Type u_1} [CommMonoidWithZero M] [IsCancelMulZero M] {pโ‚ pโ‚‚ : M} {kโ‚ kโ‚‚ : โ„•} (hpโ‚ : Prime pโ‚) (hpโ‚‚ : Prime pโ‚‚) (hkโ‚‚ : 0 < kโ‚‚) (h : Associated (pโ‚ ^ kโ‚) (pโ‚‚ ^ kโ‚‚)) :
      Associated pโ‚ pโ‚‚
      theorem Irreducible.isRelPrime_iff_not_dvd {M : Type u_1} [Monoid M] {p n : M} (hp : Irreducible p) :
      IsRelPrime p n โ†” ยฌp โˆฃ n

      See also Irreducible.coprime_iff_not_dvd.

      theorem Irreducible.dvd_or_isRelPrime {M : Type u_1} [Monoid M] {p n : M} (hp : Irreducible p) :
      p โˆฃ n โˆจ IsRelPrime p n
      theorem associated_iff_eq {M : Type u_1} [Monoid M] [Subsingleton Mหฃ] {x y : M} :
      Associated x y โ†” x = y
      theorem associated_eq_eq {M : Type u_1} [Monoid M] [Subsingleton Mหฃ] :
      theorem prime_dvd_prime_iff_eq {M : Type u_2} [CommMonoidWithZero M] [IsCancelMulZero M] [Subsingleton Mหฃ] {p q : M} (pp : Prime p) (qp : Prime q) :
      p โˆฃ q โ†” p = q
      theorem eq_of_prime_pow_eq {R : Type u_2} [CommMonoidWithZero R] [IsCancelMulZero R] [Subsingleton Rหฃ] {pโ‚ pโ‚‚ : R} {kโ‚ kโ‚‚ : โ„•} (hpโ‚ : Prime pโ‚) (hpโ‚‚ : Prime pโ‚‚) (hkโ‚ : 0 < kโ‚) (h : pโ‚ ^ kโ‚ = pโ‚‚ ^ kโ‚‚) :
      pโ‚ = pโ‚‚
      theorem eq_of_prime_pow_eq' {R : Type u_2} [CommMonoidWithZero R] [IsCancelMulZero R] [Subsingleton Rหฃ] {pโ‚ pโ‚‚ : R} {kโ‚ kโ‚‚ : โ„•} (hpโ‚ : Prime pโ‚) (hpโ‚‚ : Prime pโ‚‚) (hkโ‚ : 0 < kโ‚‚) (h : pโ‚ ^ kโ‚ = pโ‚‚ ^ kโ‚‚) :
      pโ‚ = pโ‚‚
      @[reducible, inline]
      abbrev Associates (M : Type u_2) [Monoid M] :
      Type u_2

      The quotient of a monoid by the Associated relation. Two elements x and y are associated iff there is a unit u such that x * u = y. There is a natural monoid structure on Associates M.

      Instances For
        @[reducible, inline]
        abbrev Associates.mk {M : Type u_2} [Monoid M] (a : M) :

        The canonical quotient map from a monoid M into the Associates of M

        Instances For
          @[implicit_reducible]
          instance Associates.instInhabited {M : Type u_1} [Monoid M] :
          Inhabited (Associates M)
          theorem Associates.quotient_mk_eq_mk {M : Type u_1} [Monoid M] (a : M) :
          โŸฆaโŸง = Associates.mk a
          theorem Associates.quot_mk_eq_mk {M : Type u_1} [Monoid M] (a : M) :
          Quot.mk (โ‡‘(Associated.setoid M)) a = Associates.mk a
          theorem Associates.forall_associated {M : Type u_1} [Monoid M] {p : Associates M โ†’ Prop} :
          (โˆ€ (a : Associates M), p a) โ†” โˆ€ (a : M), p (Associates.mk a)
          theorem Associates.mk_surjective {M : Type u_1} [Monoid M] :
          Function.Surjective Associates.mk
          @[implicit_reducible]
          instance Associates.instOne {M : Type u_1} [Monoid M] :
          One (Associates M)
          @[simp]
          theorem Associates.mk_eq_one {M : Type u_1} [Monoid M] {a : M} :
          Associates.mk a = 1 โ†” IsUnit a
          @[implicit_reducible]
          instance Associates.instBot {M : Type u_1} [Monoid M] :
          theorem Associates.exists_rep {M : Type u_1} [Monoid M] (a : Associates M) :
          โˆƒ (a0 : M), Associates.mk a0 = a
          @[implicit_reducible]
          instance Associates.instUniqueOfSubsingleton {M : Type u_1} [Monoid M] [Subsingleton M] :
          theorem Associates.mk_injective {M : Type u_1} [Monoid M] [Subsingleton Mหฃ] :
          Function.Injective Associates.mk
          @[implicit_reducible]
          instance Associates.instMul {M : Type u_1} [CommMonoid M] :
          Mul (Associates M)
          @[implicit_reducible]
          @[implicit_reducible]
          theorem Associates.associated_map_mk {M : Type u_1} [CommMonoid M] {f : Associates M โ†’* M} (hinv : Function.RightInverse (โ‡‘f) Associates.mk) (a : M) :
          theorem Associates.mk_pow {M : Type u_1} [CommMonoid M] (a : M) (n : โ„•) :
          theorem Associates.dvd_eq_le {M : Type u_1} [CommMonoid M] :
          (fun (x1 x2 : Associates M) => x1 โˆฃ x2) = fun (x1 x2 : Associates M) => x1 โ‰ค x2
          @[implicit_reducible]
          @[simp]
          theorem Associates.coe_unit_eq_one {M : Type u_1} [CommMonoid M] (u : (Associates M)หฃ) :
          โ†‘u = 1
          theorem Associates.mul_mono {M : Type u_1} [CommMonoid M] {a b c d : Associates M} (hโ‚ : a โ‰ค b) (hโ‚‚ : c โ‰ค d) :
          a * c โ‰ค b * d
          @[implicit_reducible]
          @[simp]
          theorem Associates.mk_dvd_mk {M : Type u_1} [CommMonoid M] {a b : M} :
          Associates.mk a โˆฃ Associates.mk b โ†” a โˆฃ b
          @[simp]
          theorem Associates.isPrimal_mk {M : Type u_1} [CommMonoid M] {a : M} :
          @[implicit_reducible]
          instance Associates.instZero {M : Type u_1} [Zero M] [Monoid M] :
          Zero (Associates M)
          @[implicit_reducible]
          instance Associates.instTopOfZero {M : Type u_1} [Zero M] [Monoid M] :
          @[simp]
          theorem Associates.mk_zero {M : Type u_1} [Zero M] [Monoid M] :
          @[simp]
          theorem Associates.mk_eq_zero {M : Type u_1} [MonoidWithZero M] {a : M} :
          Associates.mk a = 0 โ†” a = 0
          theorem Associates.mk_ne_zero {M : Type u_1} [MonoidWithZero M] {a : M} :
          Associates.mk a โ‰  0 โ†” a โ‰  0
          theorem Associates.exists_non_zero_rep {M : Type u_1} [MonoidWithZero M] {a : Associates M} :
          a โ‰  0 โ†’ โˆƒ (a0 : M), a0 โ‰  0 โˆง Associates.mk a0 = a
          @[implicit_reducible]
          instance Associates.instDecidableRelDvd {M : Type u_1} [CommMonoidWithZero M] [DecidableRel fun (x1 x2 : M) => x1 โˆฃ x2] :
          DecidableRel fun (x1 x2 : Associates M) => x1 โˆฃ x2
          theorem Associates.Prime.le_or_le {M : Type u_1} [CommMonoidWithZero M] {p : Associates M} (hp : Prime p) {a b : Associates M} (h : p โ‰ค a * b) :
          p โ‰ค a โˆจ p โ‰ค b
          @[simp]
          theorem Associates.prime_mk {M : Type u_1} [CommMonoidWithZero M] {p : M} :
          Prime (Associates.mk p) โ†” Prime p
          theorem Associates.irreducible_iff_prime_iff {M : Type u_1} [CommMonoidWithZero M] :
          (โˆ€ (a : M), Irreducible a โ†” Prime a) โ†” โˆ€ (a : Associates M), Irreducible a โ†” Prime a
          theorem Associates.le_of_mul_le_mul_left {M : Type u_1} [CommMonoidWithZero M] [IsCancelMulZero M] (a b c : Associates M) (ha : a โ‰  0) :
          a * b โ‰ค a * c โ†’ b โ‰ค c
          theorem Associates.one_or_eq_of_le_of_prime {M : Type u_1} [CommMonoidWithZero M] [IsCancelMulZero M] {p m : Associates M} (hp : Prime p) (hle : m โ‰ค p) :
          m = 1 โˆจ m = p
          theorem isUnit_of_associated_mul {M : Type u_1} [CommMonoidWithZero M] [IsCancelMulZero M] {p b : M} (h : Associated (p * b) p) (hp : p โ‰  0) :
          theorem dvd_prime_pow {M : Type u_1} [CommMonoidWithZero M] [IsCancelMulZero M] {p q : M} (hp : Prime p) (n : โ„•) :
          q โˆฃ p ^ n โ†” โˆƒ i โ‰ค n, Associated q (p ^ i)