@@ -664,14 +664,12 @@ by refine_struct {..}; simp [add_mul]
664
664
665
665
end is_monoid_hom
666
666
667
- -- TODO rename fields of is_group_hom: mul ↝ map_mul?
668
-
669
667
/-- Predicate for group homomorphism. -/
670
668
class is_group_hom [group α] [group β] (f : α → β) : Prop :=
671
- (mul : ∀ a b : α, f (a * b) = f a * f b)
669
+ (map_mul : ∀ a b : α, f (a * b) = f a * f b)
672
670
673
671
class is_add_group_hom [add_group α] [add_group β] (f : α → β) : Prop :=
674
- (add : ∀ a b, f (a + b) = f a + f b)
672
+ (map_add : ∀ a b, f (a + b) = f a + f b)
675
673
676
674
attribute [to_additive is_add_group_hom] is_group_hom
677
675
attribute [to_additive is_add_group_hom.cases_on] is_group_hom.cases_on
@@ -680,29 +678,29 @@ attribute [to_additive is_add_group_hom.rec] is_group_hom.rec
680
678
attribute [to_additive is_add_group_hom.drec] is_group_hom.drec
681
679
attribute [to_additive is_add_group_hom.rec_on] is_group_hom.rec_on
682
680
attribute [to_additive is_add_group_hom.drec_on] is_group_hom.drec_on
683
- attribute [to_additive is_add_group_hom.add ] is_group_hom.mul
681
+ attribute [to_additive is_add_group_hom.map_add ] is_group_hom.map_mul
684
682
attribute [to_additive is_add_group_hom.mk] is_group_hom.mk
685
683
686
684
instance additive.is_add_group_hom [group α] [group β] (f : α → β) [is_group_hom f] :
687
685
@is_add_group_hom (additive α) (additive β) _ _ f :=
688
- ⟨@is_group_hom.mul α β _ _ f _⟩
686
+ ⟨@is_group_hom.map_mul α β _ _ f _⟩
689
687
690
688
instance multiplicative.is_group_hom [add_group α] [add_group β] (f : α → β) [is_add_group_hom f] :
691
689
@is_group_hom (multiplicative α) (multiplicative β) _ _ f :=
692
- ⟨@is_add_group_hom.add α β _ _ f _⟩
690
+ ⟨@is_add_group_hom.map_add α β _ _ f _⟩
693
691
694
692
attribute [to_additive additive.is_add_group_hom] multiplicative.is_group_hom
695
693
696
694
namespace is_group_hom
697
695
variables [group α] [group β] (f : α → β) [is_group_hom f]
698
696
699
- @[to_additive is_add_group_hom.zero ]
700
- theorem one : f 1 = 1 :=
701
- mul_self_iff_eq_one.1 $ by rw [← mul f, one_mul]
697
+ @[to_additive is_add_group_hom.map_zero ]
698
+ theorem map_one : f 1 = 1 :=
699
+ mul_self_iff_eq_one.1 $ by rw [← map_mul f, one_mul]
702
700
703
- @[to_additive is_add_group_hom.neg ]
704
- theorem inv (a : α) : f a⁻¹ = (f a)⁻¹ :=
705
- eq_inv_of_mul_eq_one $ by rw [← mul f, inv_mul_self, one f]
701
+ @[to_additive is_add_group_hom.map_neg ]
702
+ theorem map_inv (a : α) : f a⁻¹ = (f a)⁻¹ :=
703
+ eq_inv_of_mul_eq_one $ by rw [← map_mul f, inv_mul_self, map_one f]
706
704
707
705
@[to_additive is_add_group_hom.id]
708
706
instance id : is_group_hom (@id α) :=
@@ -711,42 +709,42 @@ instance id : is_group_hom (@id α) :=
711
709
@[to_additive is_add_group_hom.comp]
712
710
instance comp {γ} [group γ] (g : β → γ) [is_group_hom g] :
713
711
is_group_hom (g ∘ f) :=
714
- ⟨λ x y, show g _ = g _ * g _, by rw [mul f, mul g]⟩
712
+ ⟨λ x y, show g _ = g _ * g _, by rw [map_mul f, map_mul g]⟩
715
713
716
714
protected lemma is_conj (f : α → β) [is_group_hom f] {a b : α} : is_conj a b → is_conj (f a) (f b)
717
- | ⟨c, hc⟩ := ⟨f c, by rw [← is_group_hom.mul f, ← is_group_hom.inv f, ← is_group_hom.mul f, hc]⟩
715
+ | ⟨c, hc⟩ := ⟨f c, by rw [← is_group_hom.map_mul f, ← is_group_hom.map_inv f, ← is_group_hom.map_mul f, hc]⟩
718
716
719
717
@[to_additive is_add_group_hom.to_is_add_monoid_hom]
720
718
lemma to_is_monoid_hom (f : α → β) [is_group_hom f] : is_monoid_hom f :=
721
- ⟨is_group_hom.one f, is_group_hom.mul f⟩
719
+ ⟨is_group_hom.map_one f, is_group_hom.map_mul f⟩
722
720
723
721
@[to_additive is_add_group_hom.injective_iff]
724
722
lemma injective_iff (f : α → β) [is_group_hom f] :
725
723
function.injective f ↔ (∀ a, f a = 1 → a = 1 ) :=
726
- ⟨λ h _, by rw ← is_group_hom.one f; exact @h _ _,
727
- λ h x y hxy, by rw [← inv_inv (f x), inv_eq_iff_mul_eq_one, ← is_group_hom.inv f,
728
- ← is_group_hom.mul f] at hxy;
724
+ ⟨λ h _, by rw ← is_group_hom.map_one f; exact @h _ _,
725
+ λ h x y hxy, by rw [← inv_inv (f x), inv_eq_iff_mul_eq_one, ← is_group_hom.map_inv f,
726
+ ← is_group_hom.map_mul f] at hxy;
729
727
simpa using inv_eq_of_mul_eq_one (h _ hxy)⟩
730
728
731
729
attribute [instance] is_group_hom.to_is_monoid_hom
732
730
is_add_group_hom.to_is_add_monoid_hom
733
731
734
732
end is_group_hom
735
733
736
- @[to_additive is_add_group_hom_add ]
737
- lemma is_group_hom_mul {α β} [group α] [comm_group β]
734
+ @[to_additive is_add_group_hom.add ]
735
+ lemma is_group_hom.mul {α β} [group α] [comm_group β]
738
736
(f g : α → β) [is_group_hom f] [is_group_hom g] :
739
737
is_group_hom (λa, f a * g a) :=
740
- ⟨assume a b, by simp only [is_group_hom.mul f, is_group_hom.mul g, mul_comm, mul_assoc, mul_left_comm]⟩
738
+ ⟨assume a b, by simp only [is_group_hom.map_mul f, is_group_hom.map_mul g, mul_comm, mul_assoc, mul_left_comm]⟩
741
739
742
- attribute [instance] is_group_hom_mul is_add_group_hom_add
740
+ attribute [instance] is_group_hom.mul is_add_group_hom.add
743
741
744
- @[to_additive is_add_group_hom_neg ]
745
- lemma is_group_hom_inv {α β} [group α] [comm_group β] (f : α → β) [is_group_hom f] :
742
+ @[to_additive is_add_group_hom.neg ]
743
+ lemma is_group_hom.inv {α β} [group α] [comm_group β] (f : α → β) [is_group_hom f] :
746
744
is_group_hom (λa, (f a)⁻¹) :=
747
- ⟨assume a b, by rw [is_group_hom.mul f, mul_inv]⟩
745
+ ⟨assume a b, by rw [is_group_hom.map_mul f, mul_inv]⟩
748
746
749
- attribute [instance] is_group_hom_inv is_add_group_hom_neg
747
+ attribute [instance] is_group_hom.inv is_add_group_hom.neg
750
748
751
749
@[to_additive neg.is_add_group_hom]
752
750
lemma inv.is_group_hom [comm_group α] : is_group_hom (has_inv.inv : α → α) :=
@@ -757,17 +755,17 @@ attribute [instance] inv.is_group_hom neg.is_add_group_hom
757
755
/-- Predicate for group anti-homomorphism, or a homomorphism
758
756
into the opposite group. -/
759
757
class is_group_anti_hom {β : Type *} [group α] [group β] (f : α → β) : Prop :=
760
- (mul : ∀ a b : α, f (a * b) = f b * f a)
758
+ (map_mul : ∀ a b : α, f (a * b) = f b * f a)
761
759
762
760
namespace is_group_anti_hom
763
761
variables [group α] [group β] (f : α → β) [w : is_group_anti_hom f]
764
762
include w
765
763
766
- theorem one : f 1 = 1 :=
767
- mul_self_iff_eq_one.1 $ by rw [← mul f, one_mul]
764
+ theorem map_one : f 1 = 1 :=
765
+ mul_self_iff_eq_one.1 $ by rw [← map_mul f, one_mul]
768
766
769
- theorem inv (a : α) : f a⁻¹ = (f a)⁻¹ :=
770
- eq_inv_of_mul_eq_one $ by rw [← mul f, mul_inv_self, one f]
767
+ theorem map_inv (a : α) : f a⁻¹ = (f a)⁻¹ :=
768
+ eq_inv_of_mul_eq_one $ by rw [← map_mul f, mul_inv_self, map_one f]
771
769
772
770
end is_group_anti_hom
773
771
@@ -777,19 +775,19 @@ theorem inv_is_group_anti_hom [group α] : is_group_anti_hom (λ x : α, x⁻¹)
777
775
namespace is_add_group_hom
778
776
variables [add_group α] [add_group β] (f : α → β) [is_add_group_hom f]
779
777
780
- lemma sub (a b) : f (a - b) = f a - f b :=
778
+ lemma map_sub (a b) : f (a - b) = f a - f b :=
781
779
calc f (a - b) = f (a + -b) : rfl
782
- ... = f a + f (-b) : add f _ _
783
- ... = f a - f b : by simp[neg f]
780
+ ... = f a + f (-b) : map_add f _ _
781
+ ... = f a - f b : by simp[map_neg f]
784
782
785
783
end is_add_group_hom
786
784
787
- lemma is_add_group_hom_sub {α β} [add_group α] [add_comm_group β]
785
+ lemma is_add_group_hom.sub {α β} [add_group α] [add_comm_group β]
788
786
(f g : α → β) [is_add_group_hom f] [is_add_group_hom g] :
789
787
is_add_group_hom (λa, f a - g a) :=
790
- is_add_group_hom_add f (λa, - g a)
788
+ is_add_group_hom.add f (λa, - g a)
791
789
792
- attribute [instance] is_add_group_hom_sub
790
+ attribute [instance] is_add_group_hom.sub
793
791
794
792
namespace units
795
793
0 commit comments