@@ -181,51 +181,67 @@ theorem normal_of_eq_cosets (h : ∀ g : α, g *l s = s *r g) : s.normal :=
181
181
theorem normal_iff_eq_cosets : s.normal ↔ ∀ g : α, g *l s = s *r g :=
182
182
⟨@eq_cosets_of_normal _ _ s, normal_of_eq_cosets s⟩
183
183
184
+ @[to_additive left_add_coset_eq_iff]
185
+ lemma left_coset_eq_iff {x y : α} : left_coset x s = left_coset y s ↔ x⁻¹ * y ∈ s :=
186
+ begin
187
+ rw set.ext_iff,
188
+ simp_rw [mem_left_coset_iff, set_like.mem_coe],
189
+ split,
190
+ { intro h, apply (h y).mpr, rw mul_left_inv, exact s.one_mem },
191
+ { intros h z, rw ←mul_inv_cancel_right x⁻¹ y, rw mul_assoc, exact s.mul_mem_cancel_left h },
192
+ end
193
+
194
+ @[to_additive right_add_coset_eq_iff]
195
+ lemma right_coset_eq_iff {x y : α} : right_coset ↑s x = right_coset s y ↔ y * x⁻¹ ∈ s :=
196
+ begin
197
+ rw set.ext_iff,
198
+ simp_rw [mem_right_coset_iff, set_like.mem_coe],
199
+ split,
200
+ { intro h, apply (h y).mpr, rw mul_right_inv, exact s.one_mem },
201
+ { intros h z, rw ←inv_mul_cancel_left y x⁻¹, rw ←mul_assoc, exact s.mul_mem_cancel_right h },
202
+ end
203
+
184
204
end coset_subgroup
185
205
186
206
run_cmd to_additive.map_namespace `quotient_group `quotient_add_group
187
207
188
208
namespace quotient_group
189
209
210
+ variables [group α] (s : subgroup α)
211
+
190
212
/-- The equivalence relation corresponding to the partition of a group by left cosets
191
213
of a subgroup.-/
192
214
@[to_additive " The equivalence relation corresponding to the partition of a group by left cosets
193
215
of a subgroup." ]
194
- def left_rel [group α] (s : subgroup α) : setoid α :=
195
- ⟨λ x y, x⁻¹ * y ∈ s,
196
- assume x, by simp [s.one_mem],
197
- assume x y hxy,
198
- have (x⁻¹ * y)⁻¹ ∈ s, from s.inv_mem hxy,
199
- by simpa using this ,
200
- assume x y z hxy hyz,
201
- have x⁻¹ * y * (y⁻¹ * z) ∈ s, from s.mul_mem hxy hyz,
202
- by simpa [mul_assoc] using this ⟩
216
+ def left_rel : setoid α :=
217
+ ⟨λ x y, x⁻¹ * y ∈ s, by { simp_rw ←left_coset_eq_iff, exact left_coset_equivalence_rel s }⟩
218
+
219
+ lemma left_rel_r_eq_left_coset_equivalence :
220
+ @setoid.r _ (quotient_group.left_rel s) = left_coset_equivalence s :=
221
+ by { ext, exact (left_coset_eq_iff s).symm }
203
222
204
223
@[to_additive]
205
- instance left_rel_decidable [group α] (s : subgroup α) [d : decidable_pred (∈ s)] :
206
- decidable_rel (left_rel s).r := λ _ _, d _
224
+ instance left_rel_decidable [decidable_pred (∈ s)] :
225
+ decidable_rel (left_rel s).r := λ x y, ‹decidable_pred (∈ s)› _
207
226
208
227
/-- `quotient s` is the quotient type representing the left cosets of `s`.
209
228
If `s` is a normal subgroup, `quotient s` is a group -/
210
- def quotient [group α] (s : subgroup α) : Type * := quotient (left_rel s)
229
+ def quotient : Type * := quotient (left_rel s)
211
230
212
231
/-- The equivalence relation corresponding to the partition of a group by right cosets of a
213
232
subgroup. -/
214
233
@[to_additive " The equivalence relation corresponding to the partition of a group by right cosets of
215
234
a subgroup." ]
216
- def right_rel [group α] (s : subgroup α) : setoid α :=
217
- ⟨λ x y, y * x⁻¹ ∈ s,
218
- assume x, by simp [s.one_mem],
219
- assume x y hxy,
220
- have (y * x⁻¹)⁻¹ ∈ s, from s.inv_mem hxy,
221
- by simpa using this ,
222
- assume x y z hxy hyz,
223
- have (z * y⁻¹) * (y * x⁻¹) ∈ s, from s.mul_mem hyz hxy,
224
- by simpa [mul_assoc] using this ⟩
235
+ def right_rel : setoid α :=
236
+ ⟨λ x y, y * x⁻¹ ∈ s, by { simp_rw ←right_coset_eq_iff, exact right_coset_equivalence_rel s }⟩
237
+
238
+ lemma right_rel_r_eq_right_coset_equivalence :
239
+ @setoid.r _ (quotient_group.right_rel s) = right_coset_equivalence s :=
240
+ by { ext, exact (right_coset_eq_iff s).symm }
225
241
226
242
@[to_additive]
227
- instance right_rel_decidable [group α] (s : subgroup α) [d : decidable_pred (∈ s)] :
228
- decidable_rel (left_rel s).r := λ _ _, d _
243
+ instance right_rel_decidable [decidable_pred (∈ s)] :
244
+ decidable_rel (right_rel s).r := λ x y, ‹decidable_pred (∈ s)› _
229
245
230
246
end quotient_group
231
247
@@ -277,7 +293,8 @@ quotient.eq'
277
293
@[to_additive]
278
294
lemma eq_class_eq_left_coset (s : subgroup α) (g : α) :
279
295
{x : α | (x : quotient s) = g} = left_coset g s :=
280
- set.ext $ λ z, by { rw [mem_left_coset_iff, set.mem_set_of_eq, eq_comm, quotient_group.eq], simp }
296
+ set.ext $ λ z,
297
+ by rw [mem_left_coset_iff, set.mem_set_of_eq, eq_comm, quotient_group.eq, set_like.mem_coe]
281
298
282
299
@[to_additive]
283
300
lemma preimage_image_coe (N : subgroup α) (s : set α) :
0 commit comments