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

Commit 977063f

Browse files
committed
chore(group_theory/congruence): a few simp lemmas (#8452)
* add `con.comap_rel`; * add `@[simp]` to `con.ker_rel`; * replace `con.comp_mk'_apply` with `con.coe_mk'`; * [unrelated] add `commute.semiconj_by`.
1 parent 98b0d18 commit 977063f

File tree

2 files changed

+12
-6
lines changed

2 files changed

+12
-6
lines changed

src/algebra/group/commute.lean

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,8 @@ variables {S : Type*} [has_mul S]
4444
@[symm, to_additive] protected theorem symm {a b : S} (h : commute a b) : commute b a :=
4545
eq.symm h
4646

47+
@[to_additive] protected theorem semiconj_by {a b : S} (h : commute a b) : semiconj_by a b b := h
48+
4749
@[to_additive]
4850
protected theorem symm_iff {a b : S} : commute a b ↔ commute b a :=
4951
⟨commute.symm, commute.symm⟩

src/group_theory/congruence.lean

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -510,6 +510,11 @@ def comap (f : M → N) (H : ∀ x y, f (x * y) = f x * f y) (c : con N) : con M
510510
{ mul' := λ w x y z h1 h2, show c (f (w * y)) (f (x * z)), by rw [H, H]; exact c.mul h1 h2,
511511
..c.to_setoid.comap f }
512512

513+
@[simp, to_additive] lemma comap_rel {f : M → N} (H : ∀ x y, f (x * y) = f x * f y)
514+
{c : con N} {x y : M} :
515+
comap f H c x y ↔ c (f x) (f y) :=
516+
iff.rfl
517+
513518
section
514519
open quotient
515520

@@ -606,7 +611,7 @@ lemma le_iff {c d : con M} : c ≤ d ↔ (c : submonoid (M × M)) ≤ d :=
606611
def ker (f : M →* P) : con M := mul_ker f f.3
607612

608613
/-- The definition of the congruence relation defined by a monoid homomorphism's kernel. -/
609-
@[to_additive "The definition of the additive congruence relation defined by an `add_monoid`
614+
@[simp, to_additive "The definition of the additive congruence relation defined by an `add_monoid`
610615
homomorphism's kernel."]
611616
lemma ker_rel (f : M →* P) {x y} : ker f x y ↔ f x = f y := iff.rfl
612617

@@ -637,10 +642,9 @@ variables {c}
637642
@[to_additive "The natural homomorphism from an `add_monoid` to its quotient by a congruence
638643
relation is surjective."]
639644
lemma mk'_surjective : surjective c.mk' :=
640-
λ x, by rcases x; exact ⟨x, rfl⟩
645+
quotient.surjective_quotient_mk'
641646

642-
@[simp, to_additive] lemma comp_mk'_apply (g : c.quotient →* P) {x} :
643-
g.comp c.mk' x = g x := rfl
647+
@[simp, to_additive] lemma coe_mk' : (c.mk' : M → c.quotient) = coe := rfl
644648

645649
/-- The elements related to `x ∈ M`, `M` a monoid, by the kernel of a monoid homomorphism are
646650
those in the preimage of `f(x)` under `f`. -/
@@ -674,7 +678,7 @@ def lift (H : c ≤ ker f) : c.quotient →* P :=
674678
variables {c f}
675679

676680
/-- The diagram describing the universal property for quotients of monoids commutes. -/
677-
@[simp, to_additive "The diagram describing the universal property for quotients of `add_monoid`s
681+
@[to_additive "The diagram describing the universal property for quotients of `add_monoid`s
678682
commutes."]
679683
lemma lift_mk' (H : c ≤ ker f) (x) :
680684
c.lift f H (c.mk' x) = f x := rfl
@@ -716,7 +720,7 @@ end
716720
@[to_additive "The uniqueness part of the universal property for quotients of `add_monoid`s."]
717721
theorem lift_unique (H : c ≤ ker f) (g : c.quotient →* P)
718722
(Hg : g.comp c.mk' = f) : g = c.lift f H :=
719-
lift_funext g (c.lift f H) $ λ x, by rw [lift_coe H, ←comp_mk'_apply, Hg]
723+
lift_funext g (c.lift f H) $ λ x, by { subst f, refl }
720724

721725
/-- Given a congruence relation `c` on a monoid and a homomorphism `f` constant on `c`'s
722726
equivalence classes, `f` has the same image as the homomorphism that `f` induces on the

0 commit comments

Comments
 (0)