Skip to content
This repository was archived by the owner on Jul 24, 2024. It is now read-only.

Commit 7180d2f

Browse files
feat(group_theory/coset): Show that quotient_group.left_rel and left_coset_equivalence are the same thing (#8382)
Co-authored-by: Anne Baanen <Vierkantor@users.noreply.github.com>
1 parent 32c8227 commit 7180d2f

File tree

1 file changed

+41
-24
lines changed

1 file changed

+41
-24
lines changed

src/group_theory/coset.lean

Lines changed: 41 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -181,51 +181,67 @@ theorem normal_of_eq_cosets (h : ∀ g : α, g *l s = s *r g) : s.normal :=
181181
theorem normal_iff_eq_cosets : s.normal ↔ ∀ g : α, g *l s = s *r g :=
182182
⟨@eq_cosets_of_normal _ _ s, normal_of_eq_cosets s⟩
183183

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+
184204
end coset_subgroup
185205

186206
run_cmd to_additive.map_namespace `quotient_group `quotient_add_group
187207

188208
namespace quotient_group
189209

210+
variables [group α] (s : subgroup α)
211+
190212
/-- The equivalence relation corresponding to the partition of a group by left cosets
191213
of a subgroup.-/
192214
@[to_additive "The equivalence relation corresponding to the partition of a group by left cosets
193215
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 }
203222

204223
@[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)› _
207226

208227
/-- `quotient s` is the quotient type representing the left cosets of `s`.
209228
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)
211230

212231
/-- The equivalence relation corresponding to the partition of a group by right cosets of a
213232
subgroup. -/
214233
@[to_additive "The equivalence relation corresponding to the partition of a group by right cosets of
215234
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 }
225241

226242
@[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)› _
229245

230246
end quotient_group
231247

@@ -277,7 +293,8 @@ quotient.eq'
277293
@[to_additive]
278294
lemma eq_class_eq_left_coset (s : subgroup α) (g : α) :
279295
{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]
281298

282299
@[to_additive]
283300
lemma preimage_image_coe (N : subgroup α) (s : set α) :

0 commit comments

Comments
 (0)