|
| 1 | +/- |
| 2 | +Copyright (c) 2019 Yury Kudryashov. All rights reserved. |
| 3 | +Released under Apache 2.0 license as described in the file LICENSE. |
| 4 | +Authors: Yury Kudryashov |
| 5 | +
|
| 6 | +Some proofs and docs came from `algebra/commute` (c) Neil Strickland |
| 7 | +-/ |
| 8 | +import algebra.group.units |
| 9 | +import tactic.rewrite |
| 10 | + |
| 11 | +/-! |
| 12 | +# Semiconjugate elements of a semigroup |
| 13 | +
|
| 14 | +## Main definitions |
| 15 | +
|
| 16 | +We say that `x` is semiconjugate to `y` by `a` (`semiconj_by a x y`), if `a * x = y * a`. |
| 17 | +In this file we provide operations on `semiconj_by _ _ _`. |
| 18 | +
|
| 19 | +In the names of these operations, we treat `a` as the “left” argument, and both `x` and `y` as |
| 20 | +“right” arguments. This way most names in this file agree with the names of the corresponding lemmas |
| 21 | +for `commute a b = semiconj_by a b b`. As a side effect, some lemmas have only `_right` version. |
| 22 | +
|
| 23 | +Lean does not immediately recognise these terms as equations, so for rewriting we need syntax like |
| 24 | +`rw [(h.pow_right 5).eq]` rather than just `rw [h.pow_right 5]`. |
| 25 | +
|
| 26 | +This file provides only basic operations (`mul_left`, `mul_right`, `inv_right` etc). Other |
| 27 | +operations (`pow_right`, field inverse etc) are in the files that define corresponding notions. |
| 28 | +-/ |
| 29 | + |
| 30 | +universes u v |
| 31 | + |
| 32 | +/-- `x` is semiconjugate to `y` by `a`, if `a * x = y * a`. -/ |
| 33 | +@[to_additive add_semiconj_by "`x` is additive semiconjugate to `y` by `a` if `a + x = y + a`"] |
| 34 | +def semiconj_by {M : Type u} [has_mul M] (a x y : M) : Prop := a * x = y * a |
| 35 | + |
| 36 | +namespace semiconj_by |
| 37 | + |
| 38 | +/-- Equality behind `semiconj_by a x y`; useful for rewriting. -/ |
| 39 | +@[to_additive] |
| 40 | +protected lemma eq {S : Type u} [has_mul S] {a x y : S} (h : semiconj_by a x y) : |
| 41 | + a * x = y * a := h |
| 42 | + |
| 43 | +section semigroup |
| 44 | + |
| 45 | +variables {S : Type u} [semigroup S] {a b x y z x' y' : S} |
| 46 | + |
| 47 | +/-- If `a` semiconjugates `x` to `y` and `x'` to `y'`, |
| 48 | +then it semiconjugates `x * x'` to `y * y'`. -/ |
| 49 | +@[to_additive, simp] lemma mul_right (h : semiconj_by a x y) (h' : semiconj_by a x' y') : |
| 50 | + semiconj_by a (x * x') (y * y') := |
| 51 | +by unfold semiconj_by; assoc_rw [h.eq, h'.eq] |
| 52 | + |
| 53 | +/-- If both `a` and `b` semiconjugate `x` to `y`, then so does `a * b`. -/ |
| 54 | +@[to_additive] |
| 55 | +lemma mul_left (ha : semiconj_by a y z) (hb : semiconj_by b x y) : |
| 56 | + semiconj_by (a * b) x z := |
| 57 | +by unfold semiconj_by; assoc_rw [hb.eq, ha.eq, mul_assoc] |
| 58 | + |
| 59 | +end semigroup |
| 60 | + |
| 61 | +section monoid |
| 62 | + |
| 63 | +variables {M : Type u} [monoid M] |
| 64 | + |
| 65 | +/-- Any element semiconjugates `1` to `1`. -/ |
| 66 | +@[simp, to_additive] |
| 67 | +lemma one_right (a : M) : semiconj_by a 1 1 := by rw [semiconj_by, mul_one, one_mul] |
| 68 | + |
| 69 | +/-- One semiconjugates any element to itself. -/ |
| 70 | +@[simp, to_additive] |
| 71 | +lemma one_left (x : M) : semiconj_by 1 x x := eq.symm $ one_right x |
| 72 | + |
| 73 | +/-- If `a` semiconjugates a unit `x` to a unit `y`, then it semiconjugates `x⁻¹` to `y⁻¹`. -/ |
| 74 | +@[to_additive] lemma units_inv_right {a : M} {x y : units M} (h : semiconj_by a x y) : |
| 75 | + semiconj_by a ↑x⁻¹ ↑y⁻¹ := |
| 76 | +calc a * ↑x⁻¹ = ↑y⁻¹ * (y * a) * ↑x⁻¹ : by rw [units.inv_mul_cancel_left] |
| 77 | + ... = ↑y⁻¹ * a : by rw [← h.eq, mul_assoc, units.mul_inv_cancel_right] |
| 78 | + |
| 79 | +@[simp, to_additive] lemma units_inv_right_iff {a : M} {x y : units M} : |
| 80 | + semiconj_by a ↑x⁻¹ ↑y⁻¹ ↔ semiconj_by a x y := |
| 81 | +⟨units_inv_right, units_inv_right⟩ |
| 82 | + |
| 83 | +/-- If a unit `a` semiconjugates `x` to `y`, then `a⁻¹` semiconjugates `y` to `x`. -/ |
| 84 | +@[to_additive] lemma units_inv_symm_left {a : units M} {x y : M} (h : semiconj_by ↑a x y) : |
| 85 | + semiconj_by ↑a⁻¹ y x := |
| 86 | +calc ↑a⁻¹ * y = ↑a⁻¹ * (y * a * ↑a⁻¹) : by rw [units.mul_inv_cancel_right] |
| 87 | + ... = x * ↑a⁻¹ : by rw [← h.eq, ← mul_assoc, units.inv_mul_cancel_left] |
| 88 | + |
| 89 | +@[simp, to_additive] lemma units_inv_symm_left_iff {a : units M} {x y : M} : |
| 90 | + semiconj_by ↑a⁻¹ y x ↔ semiconj_by ↑a x y := |
| 91 | +⟨units_inv_symm_left, units_inv_symm_left⟩ |
| 92 | + |
| 93 | +@[to_additive] theorem units_coe {a x y : units M} (h : semiconj_by a x y) : |
| 94 | + semiconj_by (a : M) x y := |
| 95 | +congr_arg units.val h |
| 96 | + |
| 97 | +@[to_additive] theorem units_of_coe {a x y : units M} (h : semiconj_by (a : M) x y) : |
| 98 | + semiconj_by a x y := |
| 99 | +units.ext h |
| 100 | + |
| 101 | +@[simp, to_additive] theorem units_coe_iff {a x y : units M} : |
| 102 | + semiconj_by (a : M) x y ↔ semiconj_by a x y := |
| 103 | +⟨units_of_coe, units_coe⟩ |
| 104 | + |
| 105 | +end monoid |
| 106 | + |
| 107 | +section group |
| 108 | + |
| 109 | +variables {G : Type u} [group G] {a x y : G} |
| 110 | + |
| 111 | +@[simp, to_additive] lemma inv_right_iff : semiconj_by a x⁻¹ y⁻¹ ↔ semiconj_by a x y := |
| 112 | +@units_inv_right_iff G _ a ⟨x, x⁻¹, mul_inv_self x, inv_mul_self x⟩ |
| 113 | + ⟨y, y⁻¹, mul_inv_self y, inv_mul_self y⟩ |
| 114 | + |
| 115 | +@[to_additive] lemma inv_right : semiconj_by a x y → semiconj_by a x⁻¹ y⁻¹ := |
| 116 | +inv_right_iff.2 |
| 117 | + |
| 118 | +@[simp, to_additive] lemma inv_symm_left_iff : semiconj_by a⁻¹ y x ↔ semiconj_by a x y := |
| 119 | +@units_inv_symm_left_iff G _ ⟨a, a⁻¹, mul_inv_self a, inv_mul_self a⟩ _ _ |
| 120 | + |
| 121 | +@[to_additive] lemma inv_symm_left : semiconj_by a x y → semiconj_by a⁻¹ y x := |
| 122 | +inv_symm_left_iff.2 |
| 123 | + |
| 124 | +@[to_additive] lemma inv_inv_symm (h : semiconj_by a x y) : semiconj_by a⁻¹ y⁻¹ x⁻¹ := |
| 125 | +h.inv_right.inv_symm_left |
| 126 | + |
| 127 | +-- this is not a simp lemma because it can be deduced from other simp lemmas |
| 128 | +@[to_additive] lemma inv_inv_symm_iff : semiconj_by a⁻¹ y⁻¹ x⁻¹ ↔ semiconj_by a x y := |
| 129 | +inv_right_iff.trans inv_symm_left_iff |
| 130 | + |
| 131 | +/-- `a` semiconjugates `x` to `a * x * a⁻¹`. -/ |
| 132 | +@[to_additive] lemma conj_mk (a x : G) : semiconj_by a x (a * x * a⁻¹) := |
| 133 | +by unfold semiconj_by; rw [mul_assoc, inv_mul_self, mul_one] |
| 134 | + |
| 135 | +end group |
| 136 | + |
| 137 | +end semiconj_by |
| 138 | + |
| 139 | +/-- `a` semiconjugates `x` to `a * x * a⁻¹`. -/ |
| 140 | +@[to_additive] |
| 141 | +lemma units.mk_semiconj_by {M : Type u} [monoid M] (u : units M) (x : M) : |
| 142 | + semiconj_by ↑u x (u * x * ↑u⁻¹) := |
| 143 | +by unfold semiconj_by; rw [units.inv_mul_cancel_right] |
0 commit comments