Module docstring
{"# Lemmas about commuting pairs of elements involving units.
"}
{"# Lemmas about commuting pairs of elements involving units.
"}
Commute.units_inv_right
theorem
: Commute a u → Commute a ↑u⁻¹
@[to_additive]
theorem units_inv_right : Commute a u → Commute a ↑u⁻¹ :=
SemiconjBy.units_inv_right
Commute.units_inv_right_iff
theorem
: Commute a ↑u⁻¹ ↔ Commute a u
@[to_additive (attr := simp)]
theorem units_inv_right_iff : CommuteCommute a ↑u⁻¹ ↔ Commute a u :=
SemiconjBy.units_inv_right_iff
Commute.units_inv_left
theorem
: Commute (↑u) a → Commute (↑u⁻¹) a
@[to_additive]
theorem units_inv_left : Commute (↑u) a → Commute (↑u⁻¹) a :=
SemiconjBy.units_inv_symm_left
Commute.units_inv_left_iff
theorem
: Commute (↑u⁻¹) a ↔ Commute (↑u) a
@[to_additive (attr := simp)]
theorem units_inv_left_iff : CommuteCommute (↑u⁻¹) a ↔ Commute (↑u) a :=
SemiconjBy.units_inv_symm_left_iff
Commute.units_val
theorem
: Commute u₁ u₂ → Commute (u₁ : M) u₂
@[to_additive]
theorem units_val : Commute u₁ u₂ → Commute (u₁ : M) u₂ :=
SemiconjBy.units_val
Commute.units_of_val
theorem
: Commute (u₁ : M) u₂ → Commute u₁ u₂
@[to_additive]
theorem units_of_val : Commute (u₁ : M) u₂ → Commute u₁ u₂ :=
SemiconjBy.units_of_val
Commute.units_val_iff
theorem
: Commute (u₁ : M) u₂ ↔ Commute u₁ u₂
@[to_additive (attr := simp)]
theorem units_val_iff : CommuteCommute (u₁ : M) u₂ ↔ Commute u₁ u₂ :=
SemiconjBy.units_val_iff
Units.leftOfMul
definition
(u : Mˣ) (a b : M) (hu : a * b = u) (hc : Commute a b) : Mˣ
/-- If the product of two commuting elements is a unit, then the left multiplier is a unit. -/
@[to_additive "If the sum of two commuting elements is an additive unit, then the left summand is
an additive unit."]
def Units.leftOfMul (u : Mˣ) (a b : M) (hu : a * b = u) (hc : Commute a b) : Mˣ where
val := a
inv := b * ↑u⁻¹
val_inv := by rw [← mul_assoc, hu, u.mul_inv]
inv_val := by
have : Commute a u := hu ▸ (Commute.refl _).mul_right hc
rw [← this.units_inv_right.right_comm, ← hc.eq, hu, u.mul_inv]
Units.rightOfMul
definition
(u : Mˣ) (a b : M) (hu : a * b = u) (hc : Commute a b) : Mˣ
/-- If the product of two commuting elements is a unit, then the right multiplier is a unit. -/
@[to_additive "If the sum of two commuting elements is an additive unit, then the right summand
is an additive unit."]
def Units.rightOfMul (u : Mˣ) (a b : M) (hu : a * b = u) (hc : Commute a b) : Mˣ :=
u.leftOfMul b a (hc.eq ▸ hu) hc.symm
Commute.isUnit_mul_iff
theorem
(h : Commute a b) : IsUnit (a * b) ↔ IsUnit a ∧ IsUnit b
isUnit_mul_self_iff
theorem
: IsUnit (a * a) ↔ IsUnit a
@[to_additive (attr := simp)]
theorem isUnit_mul_self_iff : IsUnitIsUnit (a * a) ↔ IsUnit a :=
(Commute.refl a).isUnit_mul_iff.trans and_self_iff
Commute.units_zpow_right
theorem
(h : Commute a u) (m : ℤ) : Commute a ↑(u ^ m)
@[to_additive (attr := simp)]
lemma Commute.units_zpow_right (h : Commute a u) (m : ℤ) : Commute a ↑(u ^ m) :=
SemiconjBy.units_zpow_right h m
Commute.units_zpow_left
theorem
(h : Commute (↑u) a) (m : ℤ) : Commute (↑(u ^ m)) a
@[to_additive (attr := simp)]
lemma Commute.units_zpow_left (h : Commute ↑u a) (m : ℤ) : Commute ↑(u ^ m) a :=
(h.symm.units_zpow_right m).symm
Units.ofPow
definition
(u : Mˣ) (x : M) {n : ℕ} (hn : n ≠ 0) (hu : x ^ n = u) : Mˣ
/-- If a natural power of `x` is a unit, then `x` is a unit. -/
@[to_additive "If a natural multiple of `x` is an additive unit, then `x` is an additive unit."]
def Units.ofPow (u : Mˣ) (x : M) {n : ℕ} (hn : n ≠ 0) (hu : x ^ n = u) : Mˣ :=
u.leftOfMul x (x ^ (n - 1))
(by rwa [← _root_.pow_succ', Nat.sub_add_cancel (Nat.succ_le_of_lt <| Nat.pos_of_ne_zero hn)])
(Commute.self_pow _ _)
isUnit_pow_iff
theorem
(hn : n ≠ 0) : IsUnit (a ^ n) ↔ IsUnit a
@[to_additive (attr := simp)] lemma isUnit_pow_iff (hn : n ≠ 0) : IsUnitIsUnit (a ^ n) ↔ IsUnit a :=
⟨fun ⟨u, hu⟩ ↦ (u.ofPow a hn hu.symm).isUnit, IsUnit.pow n⟩
isUnit_pow_succ_iff
theorem
: IsUnit (a ^ (n + 1)) ↔ IsUnit a
@[to_additive]
lemma isUnit_pow_succ_iff : IsUnitIsUnit (a ^ (n + 1)) ↔ IsUnit a := isUnit_pow_iff n.succ_ne_zero
isUnit_pow_iff_of_not_isUnit
theorem
(hx : ¬IsUnit a) {n : ℕ} : IsUnit (a ^ n) ↔ n = 0
lemma isUnit_pow_iff_of_not_isUnit (hx : ¬ IsUnit a) {n : ℕ} :
IsUnitIsUnit (a ^ n) ↔ n = 0 := by
rcases n with (_|n) <;>
simp [hx]
Units.ofPowEqOne
definition
(a : M) (n : ℕ) (ha : a ^ n = 1) (hn : n ≠ 0) : Mˣ
/-- If `a ^ n = 1`, `n ≠ 0`, then `a` is a unit. -/
@[to_additive (attr := simps!) "If `n • x = 0`, `n ≠ 0`, then `x` is an additive unit."]
def Units.ofPowEqOne (a : M) (n : ℕ) (ha : a ^ n = 1) (hn : n ≠ 0) : Mˣ := Units.ofPow 1 a hn ha
Units.pow_ofPowEqOne
theorem
(ha : a ^ n = 1) (hn : n ≠ 0) : Units.ofPowEqOne _ n ha hn ^ n = 1
@[to_additive (attr := simp)]
lemma Units.pow_ofPowEqOne (ha : a ^ n = 1) (hn : n ≠ 0) :
Units.ofPowEqOne _ n ha hn ^ n = 1 := Units.ext <| by simp [ha]
IsUnit.of_pow_eq_one
theorem
(ha : a ^ n = 1) (hn : n ≠ 0) : IsUnit a
@[to_additive]
lemma IsUnit.of_pow_eq_one (ha : a ^ n = 1) (hn : n ≠ 0) : IsUnit a :=
(Units.ofPowEqOne _ n ha hn).isUnit
Commute.div_eq_div_iff_of_isUnit
theorem
(hbd : Commute b d) (hb : IsUnit b) (hd : IsUnit d) : a / b = c / d ↔ a * d = c * b
@[to_additive]
lemma Commute.div_eq_div_iff_of_isUnit (hbd : Commute b d) (hb : IsUnit b) (hd : IsUnit d) :
a / b = c / d ↔ a * d = c * b := by
rw [← (hb.mul hd).mul_left_inj, ← mul_assoc, hb.div_mul_cancel, ← mul_assoc, hbd.right_comm,
hd.div_mul_cancel]