@@ -82,6 +82,11 @@ class star_monoid (R : Type u) [monoid R] extends has_involutive_star R :=
82
82
export star_monoid (star_mul)
83
83
attribute [simp] star_mul
84
84
85
+ /-- In a commutative ring, make `simp` prefer leaving the order unchanged. -/
86
+ @[simp] lemma star_mul' [comm_monoid R] [star_monoid R] (x y : R) :
87
+ star (x * y) = star x * star y :=
88
+ (star_mul x y).trans (mul_comm _ _)
89
+
85
90
/-- `star` as an `mul_equiv` from `R` to `Rᵒᵖ` -/
86
91
@[simps apply]
87
92
def star_mul_equiv [monoid R] [star_monoid R] : R ≃* Rᵒᵖ :=
@@ -93,19 +98,38 @@ def star_mul_equiv [monoid R] [star_monoid R] : R ≃* Rᵒᵖ :=
93
98
@[simps apply]
94
99
def star_mul_aut [comm_monoid R] [star_monoid R] : mul_aut R :=
95
100
{ to_fun := star,
96
- map_mul' := λ x y, ( star_mul x y).trans (mul_comm _ _) ,
101
+ map_mul' := star_mul' ,
97
102
..(has_involutive_star.star_involutive.to_equiv star) }
98
103
99
104
variables (R)
100
105
101
106
@[simp] lemma star_one [monoid R] [star_monoid R] : star (1 : R) = 1 :=
102
- begin
103
- have := congr_arg opposite.unop (star_mul_equiv : R ≃* Rᵒᵖ).map_one,
104
- rwa [star_mul_equiv_apply, opposite.unop_op, opposite.unop_one] at this ,
105
- end
107
+ op_injective $ (star_mul_equiv : R ≃* Rᵒᵖ).map_one.trans (op_one _).symm
106
108
107
109
variables {R}
108
110
111
+ @[simp] lemma star_pow [monoid R] [star_monoid R] (x : R) (n : ℕ) : star (x ^ n) = star x ^ n :=
112
+ op_injective $
113
+ ((star_mul_equiv : R ≃* Rᵒᵖ).to_monoid_hom.map_pow x n).trans (op_pow (star x) n).symm
114
+
115
+ @[simp] lemma star_inv [group R] [star_monoid R] (x : R) : star (x⁻¹) = (star x)⁻¹ :=
116
+ op_injective $
117
+ ((star_mul_equiv : R ≃* Rᵒᵖ).to_monoid_hom.map_inv x).trans (op_inv (star x)).symm
118
+
119
+ /-- When multiplication is commutative, `star` preserves division. -/
120
+ @[simp] lemma star_div [comm_group R] [star_monoid R] (x y : R) : star (x / y) = star x / star y :=
121
+ (star_mul_aut : R ≃* R).to_monoid_hom.map_div _ _
122
+
123
+ section
124
+ open_locale big_operators
125
+
126
+ @[simp] lemma star_prod [comm_monoid R] [star_monoid R] {α : Type *}
127
+ (s : finset α) (f : α → R):
128
+ star (∏ x in s, f x) = ∏ x in s, star (f x) :=
129
+ (star_mul_aut : R ≃* R).map_prod _ _
130
+
131
+ end
132
+
109
133
instance [monoid R] [star_monoid R] : star_monoid (Rᵒᵖ) :=
110
134
{ star_mul := λ x y, unop_injective (star_mul y.unop x.unop) }
111
135
@@ -155,6 +179,31 @@ variables (R)
155
179
156
180
variables {R}
157
181
182
+ @[simp] lemma star_neg [add_group R] [star_add_monoid R] (r : R) : star (-r) = - star r :=
183
+ (star_add_equiv : R ≃+ R).map_neg _
184
+
185
+ @[simp] lemma star_sub [add_group R] [star_add_monoid R] (r s : R) :
186
+ star (r - s) = star r - star s :=
187
+ (star_add_equiv : R ≃+ R).map_sub _ _
188
+
189
+ @[simp] lemma star_nsmul [add_comm_monoid R] [star_add_monoid R] (x : R) (n : ℕ) :
190
+ star (n • x) = n • star x :=
191
+ (star_add_equiv : R ≃+ R).to_add_monoid_hom.map_nsmul _ _
192
+
193
+ @[simp] lemma star_gsmul [add_comm_group R] [star_add_monoid R] (x : R) (n : ℤ) :
194
+ star (n • x) = n • star x :=
195
+ (star_add_equiv : R ≃+ R).to_add_monoid_hom.map_gsmul _ _
196
+
197
+ section
198
+ open_locale big_operators
199
+
200
+ @[simp] lemma star_sum [add_comm_monoid R] [star_add_monoid R] {α : Type *}
201
+ (s : finset α) (f : α → R):
202
+ star (∑ x in s, f x) = ∑ x in s, star (f x) :=
203
+ (star_add_equiv : R ≃+ R).map_sum _ _
204
+
205
+ end
206
+
158
207
/--
159
208
A `*`-ring `R` is a (semi)ring with an involutive `star` operation which is additive
160
209
which makes `R` with its multiplicative structure into a `*`-monoid
@@ -184,21 +233,13 @@ def star_ring_aut [comm_semiring R] [star_ring R] : ring_aut R :=
184
233
..star_add_equiv,
185
234
..star_mul_aut }
186
235
187
- section
188
- open_locale big_operators
236
+ @[simp] lemma star_inv' [division_ring R] [star_ring R] (x : R) : star (x⁻¹) = (star x)⁻¹ :=
237
+ op_injective $
238
+ ((star_ring_equiv : R ≃+* Rᵒᵖ).to_ring_hom.map_inv x).trans (op_inv (star x)).symm
189
239
190
- @[simp] lemma star_sum [semiring R] [star_ring R] {α : Type *}
191
- (s : finset α) (f : α → R):
192
- star (∑ x in s, f x) = ∑ x in s, star (f x) :=
193
- (star_add_equiv : R ≃+ R).map_sum _ _
194
-
195
- end
196
-
197
- @[simp] lemma star_neg [ring R] [star_ring R] (r : R) : star (-r) = - star r :=
198
- (star_add_equiv : R ≃+ R).map_neg _
199
-
200
- @[simp] lemma star_sub [ring R] [star_ring R] (r s : R) : star (r - s) = star r - star s :=
201
- (star_add_equiv : R ≃+ R).map_sub _ _
240
+ /-- When multiplication is commutative, `star` preserves division. -/
241
+ @[simp] lemma star_div' [field R] [star_ring R] (x y : R) : star (x / y) = star x / star y :=
242
+ (star_ring_aut : R ≃+* R).to_ring_hom.map_div _ _
202
243
203
244
@[simp] lemma star_bit0 [ring R] [star_ring R] (r : R) : star (bit0 r) = bit0 (star r) :=
204
245
by simp [bit0]
0 commit comments