@@ -701,6 +701,11 @@ eq_inv_of_mul_eq_one $ f.map_mul_eq_one $ inv_mul_self g
701
701
theorem map_mul_inv {G H} [group G] [group H] (f : G →* H) (g h : G) :
702
702
f (g * h⁻¹) = (f g) * (f h)⁻¹ := by rw [f.map_mul, f.map_inv]
703
703
704
+ /-- Group homomorphisms preserve division. -/
705
+ @[simp, to_additive /-" Additive group homomorphisms preserve subtraction. "-/ ]
706
+ theorem map_div {G H} [group G] [group H] (f : G →* H) (g h : G) : f (g / h) = (f g) / (f h) :=
707
+ by rw [div_eq_mul_inv, div_eq_mul_inv, f.map_mul_inv g h]
708
+
704
709
/-- A homomorphism from a group to a monoid is injective iff its kernel is trivial.
705
710
For the iff statement on the triviality of the kernel, see `monoid_hom.injective_iff'`. -/
706
711
@[to_additive /-" A homomorphism from an additive group to an additive monoid is injective iff
@@ -733,6 +738,7 @@ def mk' (f : M → G) (map_mul : ∀ a b : M, f (a * b) = f a * f b) : M →* G
733
738
omit mM
734
739
735
740
/-- Makes a group homomorphism from a proof that the map preserves right division `λ x y, x * y⁻¹`.
741
+ See also `monoid_hom.of_map_div` for a version using `λ x y, x / y`.
736
742
-/
737
743
@[to_additive " Makes an additive group homomorphism from a proof that the map preserves
738
744
the operation `λ a b, a + -b`. See also `add_monoid_hom.of_map_sub` for a version using
@@ -749,6 +755,16 @@ calc f (x * y) = f x * (f $ 1 * 1⁻¹ * y⁻¹)⁻¹ : by simp only [one_mul, o
749
755
⇑(of_map_mul_inv f map_div) = f :=
750
756
rfl
751
757
758
+ /-- Define a morphism of additive groups given a map which respects ratios. -/
759
+ @[to_additive /-"Define a morphism of additive groups given a map which respects difference."-/ ]
760
+ def of_map_div {H : Type *} [group H] (f : G → H) (hf : ∀ x y, f (x / y) = f x / f y) : G →* H :=
761
+ of_map_mul_inv f (by simpa only [div_eq_mul_inv] using hf)
762
+
763
+ @[simp, to_additive]
764
+ lemma coe_of_map_div {H : Type *} [group H] (f : G → H) (hf : ∀ x y, f (x / y) = f x / f y) :
765
+ ⇑(of_map_div f hf) = f :=
766
+ rfl
767
+
752
768
/-- If `f` is a monoid homomorphism to a commutative group, then `f⁻¹` is the homomorphism sending
753
769
`x` to `(f x)⁻¹`. -/
754
770
@[to_additive]
@@ -788,24 +804,6 @@ add_decl_doc add_monoid_hom.has_sub
788
804
789
805
end monoid_hom
790
806
791
- namespace add_monoid_hom
792
-
793
- variables {A B : Type *} [add_zero_class A] [add_comm_group B] [add_group G] [add_group H]
794
-
795
- /-- Additive group homomorphisms preserve subtraction. -/
796
- @[simp] theorem map_sub (f : G →+ H) (g h : G) : f (g - h) = (f g) - (f h) :=
797
- by rw [sub_eq_add_neg, sub_eq_add_neg, f.map_add_neg g h]
798
-
799
- /-- Define a morphism of additive groups given a map which respects difference. -/
800
- def of_map_sub (f : G → H) (hf : ∀ x y, f (x - y) = f x - f y) : G →+ H :=
801
- of_map_add_neg f (by simpa only [sub_eq_add_neg] using hf)
802
-
803
- @[simp] lemma coe_of_map_sub (f : G → H) (hf : ∀ x y, f (x - y) = f x - f y) :
804
- ⇑(of_map_sub f hf) = f :=
805
- rfl
806
-
807
- end add_monoid_hom
808
-
809
807
section commute
810
808
811
809
variables [mul_one_class M] [mul_one_class N] {a x y : M}
0 commit comments