@@ -3,8 +3,9 @@ Copyright (c) 2018 Johannes Hölzl. All rights reserved.
33Released under Apache 2.0 license as described in the file LICENSE.
44Authors: Johannes Hölzl, Callum Sutton, Yury Kudryashov
55-/
6- import algebra.group.type_tags
7- import algebra.group_with_zero.units
6+ import algebra.hom.group
7+ import data.fun_like.equiv
8+ import logic.equiv.basic
89import data.pi.algebra
910
1011/-!
@@ -524,74 +525,6 @@ def monoid_hom.to_mul_equiv [mul_one_class M] [mul_one_class N] (f : M →* N) (
524525 right_inv := monoid_hom.congr_fun h₂,
525526 map_mul' := f.map_mul }
526527
527- /-- A group is isomorphic to its group of units. -/
528- @[to_additive " An additive group is isomorphic to its group of additive units" ]
529- def to_units [group G] : G ≃* Gˣ :=
530- { to_fun := λ x, ⟨x, x⁻¹, mul_inv_self _, inv_mul_self _⟩,
531- inv_fun := coe,
532- left_inv := λ x, rfl,
533- right_inv := λ u, units.ext rfl,
534- map_mul' := λ x y, units.ext rfl }
535-
536- @[simp, to_additive] lemma coe_to_units [group G] (g : G) :
537- (to_units g : G) = g := rfl
538-
539- namespace units
540-
541- variables [monoid M] [monoid N] [monoid P]
542-
543- /-- A multiplicative equivalence of monoids defines a multiplicative equivalence
544- of their groups of units. -/
545- def map_equiv (h : M ≃* N) : Mˣ ≃* Nˣ :=
546- { inv_fun := map h.symm.to_monoid_hom,
547- left_inv := λ u, ext $ h.left_inv u,
548- right_inv := λ u, ext $ h.right_inv u,
549- .. map h.to_monoid_hom }
550-
551- @[simp]
552- lemma map_equiv_symm (h : M ≃* N) : (map_equiv h).symm = map_equiv h.symm :=
553- rfl
554-
555- @[simp]
556- lemma coe_map_equiv (h : M ≃* N) (x : Mˣ) : (map_equiv h x : N) = h x :=
557- rfl
558-
559- /-- Left multiplication by a unit of a monoid is a permutation of the underlying type. -/
560- @[to_additive " Left addition of an additive unit is a permutation of the underlying type." ,
561- simps apply {fully_applied := ff}]
562- def mul_left (u : Mˣ) : equiv.perm M :=
563- { to_fun := λx, u * x,
564- inv_fun := λx, ↑u⁻¹ * x,
565- left_inv := u.inv_mul_cancel_left,
566- right_inv := u.mul_inv_cancel_left }
567-
568- @[simp, to_additive]
569- lemma mul_left_symm (u : Mˣ) : u.mul_left.symm = u⁻¹.mul_left :=
570- equiv.ext $ λ x, rfl
571-
572- @[to_additive]
573- lemma mul_left_bijective (a : Mˣ) : function.bijective ((*) a : M → M) :=
574- (mul_left a).bijective
575-
576- /-- Right multiplication by a unit of a monoid is a permutation of the underlying type. -/
577- @[to_additive " Right addition of an additive unit is a permutation of the underlying type." ,
578- simps apply {fully_applied := ff}]
579- def mul_right (u : Mˣ) : equiv.perm M :=
580- { to_fun := λx, x * u,
581- inv_fun := λx, x * ↑u⁻¹,
582- left_inv := λ x, mul_inv_cancel_right x u,
583- right_inv := λ x, inv_mul_cancel_right x u }
584-
585- @[simp, to_additive]
586- lemma mul_right_symm (u : Mˣ) : u.mul_right.symm = u⁻¹.mul_right :=
587- equiv.ext $ λ x, rfl
588-
589- @[to_additive]
590- lemma mul_right_bijective (a : Mˣ) : function.bijective ((* a) : M → M) :=
591- (mul_right a).bijective
592-
593- end units
594-
595528namespace equiv
596529
597530section has_involutive_neg
@@ -610,173 +543,4 @@ lemma inv_symm : (equiv.inv G).symm = equiv.inv G := rfl
610543
611544end has_involutive_neg
612545
613- section group
614- variables [group G]
615-
616- /-- Left multiplication in a `group` is a permutation of the underlying type. -/
617- @[to_additive " Left addition in an `add_group` is a permutation of the underlying type." ]
618- protected def mul_left (a : G) : perm G := (to_units a).mul_left
619-
620- @[simp, to_additive]
621- lemma coe_mul_left (a : G) : ⇑(equiv.mul_left a) = (*) a := rfl
622-
623- /-- Extra simp lemma that `dsimp` can use. `simp` will never use this. -/
624- @[simp, nolint simp_nf,
625- to_additive " Extra simp lemma that `dsimp` can use. `simp` will never use this." ]
626- lemma mul_left_symm_apply (a : G) : ((equiv.mul_left a).symm : G → G) = (*) a⁻¹ := rfl
627-
628- @[simp, to_additive]
629- lemma mul_left_symm (a : G) : (equiv.mul_left a).symm = equiv.mul_left a⁻¹ :=
630- ext $ λ x, rfl
631-
632- @[to_additive]
633- lemma _root_.group.mul_left_bijective (a : G) : function.bijective ((*) a) :=
634- (equiv.mul_left a).bijective
635-
636- /-- Right multiplication in a `group` is a permutation of the underlying type. -/
637- @[to_additive " Right addition in an `add_group` is a permutation of the underlying type." ]
638- protected def mul_right (a : G) : perm G := (to_units a).mul_right
639-
640- @[simp, to_additive]
641- lemma coe_mul_right (a : G) : ⇑(equiv.mul_right a) = λ x, x * a := rfl
642-
643- @[simp, to_additive]
644- lemma mul_right_symm (a : G) : (equiv.mul_right a).symm = equiv.mul_right a⁻¹ :=
645- ext $ λ x, rfl
646-
647- /-- Extra simp lemma that `dsimp` can use. `simp` will never use this. -/
648- @[simp, nolint simp_nf,
649- to_additive " Extra simp lemma that `dsimp` can use. `simp` will never use this." ]
650- lemma mul_right_symm_apply (a : G) : ((equiv.mul_right a).symm : G → G) = λ x, x * a⁻¹ := rfl
651-
652- @[to_additive]
653- lemma _root_.group.mul_right_bijective (a : G) : function.bijective (* a) :=
654- (equiv.mul_right a).bijective
655-
656- /-- A version of `equiv.mul_left a b⁻¹` that is defeq to `a / b`. -/
657- @[to_additive /-" A version of `equiv.add_left a (-b)` that is defeq to `a - b`. "-/ , simps]
658- protected def div_left (a : G) : G ≃ G :=
659- { to_fun := λ b, a / b,
660- inv_fun := λ b, b⁻¹ * a,
661- left_inv := λ b, by simp [div_eq_mul_inv],
662- right_inv := λ b, by simp [div_eq_mul_inv] }
663-
664- @[to_additive]
665- lemma div_left_eq_inv_trans_mul_left (a : G) :
666- equiv.div_left a = (equiv.inv G).trans (equiv.mul_left a) :=
667- ext $ λ _, div_eq_mul_inv _ _
668-
669- /-- A version of `equiv.mul_right a⁻¹ b` that is defeq to `b / a`. -/
670- @[to_additive /-" A version of `equiv.add_right (-a) b` that is defeq to `b - a`. "-/ , simps]
671- protected def div_right (a : G) : G ≃ G :=
672- { to_fun := λ b, b / a,
673- inv_fun := λ b, b * a,
674- left_inv := λ b, by simp [div_eq_mul_inv],
675- right_inv := λ b, by simp [div_eq_mul_inv] }
676-
677- @[to_additive]
678- lemma div_right_eq_mul_right_inv (a : G) : equiv.div_right a = equiv.mul_right a⁻¹ :=
679- ext $ λ _, div_eq_mul_inv _ _
680-
681- end group
682-
683- section group_with_zero
684- variables [group_with_zero G]
685-
686- /-- Left multiplication by a nonzero element in a `group_with_zero` is a permutation of the
687- underlying type. -/
688- @[simps {fully_applied := ff}]
689- protected def mul_left₀ (a : G) (ha : a ≠ 0 ) : perm G :=
690- (units.mk0 a ha).mul_left
691-
692- lemma _root_.mul_left_bijective₀ (a : G) (ha : a ≠ 0 ) :
693- function.bijective ((*) a : G → G) :=
694- (equiv.mul_left₀ a ha).bijective
695-
696- /-- Right multiplication by a nonzero element in a `group_with_zero` is a permutation of the
697- underlying type. -/
698- @[simps {fully_applied := ff}]
699- protected def mul_right₀ (a : G) (ha : a ≠ 0 ) : perm G :=
700- (units.mk0 a ha).mul_right
701-
702- lemma _root_.mul_right_bijective₀ (a : G) (ha : a ≠ 0 ) :
703- function.bijective ((* a) : G → G) :=
704- (equiv.mul_right₀ a ha).bijective
705-
706- end group_with_zero
707-
708546end equiv
709-
710- /-- In a `division_comm_monoid`, `equiv.inv` is a `mul_equiv`. There is a variant of this
711- `mul_equiv.inv' G : G ≃* Gᵐᵒᵖ` for the non-commutative case. -/
712- @[to_additive " When the `add_group` is commutative, `equiv.neg` is an `add_equiv`." , simps apply]
713- def mul_equiv.inv (G : Type *) [division_comm_monoid G] : G ≃* G :=
714- { to_fun := has_inv.inv,
715- inv_fun := has_inv.inv,
716- map_mul' := mul_inv,
717- ..equiv.inv G }
718-
719- @[simp] lemma mul_equiv.inv_symm (G : Type *) [division_comm_monoid G] :
720- (mul_equiv.inv G).symm = mul_equiv.inv G := rfl
721-
722- section type_tags
723-
724- /-- Reinterpret `G ≃+ H` as `multiplicative G ≃* multiplicative H`. -/
725- def add_equiv.to_multiplicative [add_zero_class G] [add_zero_class H] :
726- (G ≃+ H) ≃ (multiplicative G ≃* multiplicative H) :=
727- { to_fun := λ f, ⟨f.to_add_monoid_hom.to_multiplicative,
728- f.symm.to_add_monoid_hom.to_multiplicative, f.3 , f.4 , f.5 ⟩,
729- inv_fun := λ f, ⟨f.to_monoid_hom, f.symm.to_monoid_hom, f.3 , f.4 , f.5 ⟩,
730- left_inv := λ x, by { ext, refl, },
731- right_inv := λ x, by { ext, refl, }, }
732-
733- /-- Reinterpret `G ≃* H` as `additive G ≃+ additive H`. -/
734- def mul_equiv.to_additive [mul_one_class G] [mul_one_class H] :
735- (G ≃* H) ≃ (additive G ≃+ additive H) :=
736- { to_fun := λ f, ⟨f.to_monoid_hom.to_additive, f.symm.to_monoid_hom.to_additive, f.3 , f.4 , f.5 ⟩,
737- inv_fun := λ f, ⟨f.to_add_monoid_hom, f.symm.to_add_monoid_hom, f.3 , f.4 , f.5 ⟩,
738- left_inv := λ x, by { ext, refl, },
739- right_inv := λ x, by { ext, refl, }, }
740-
741- /-- Reinterpret `additive G ≃+ H` as `G ≃* multiplicative H`. -/
742- def add_equiv.to_multiplicative' [mul_one_class G] [add_zero_class H] :
743- (additive G ≃+ H) ≃ (G ≃* multiplicative H) :=
744- { to_fun := λ f, ⟨f.to_add_monoid_hom.to_multiplicative',
745- f.symm.to_add_monoid_hom.to_multiplicative'', f.3 , f.4 , f.5 ⟩,
746- inv_fun := λ f, ⟨f.to_monoid_hom, f.symm.to_monoid_hom, f.3 , f.4 , f.5 ⟩,
747- left_inv := λ x, by { ext, refl, },
748- right_inv := λ x, by { ext, refl, }, }
749-
750- /-- Reinterpret `G ≃* multiplicative H` as `additive G ≃+ H` as. -/
751- def mul_equiv.to_additive' [mul_one_class G] [add_zero_class H] :
752- (G ≃* multiplicative H) ≃ (additive G ≃+ H) :=
753- add_equiv.to_multiplicative'.symm
754-
755- /-- Reinterpret `G ≃+ additive H` as `multiplicative G ≃* H`. -/
756- def add_equiv.to_multiplicative'' [add_zero_class G] [mul_one_class H] :
757- (G ≃+ additive H) ≃ (multiplicative G ≃* H) :=
758- { to_fun := λ f, ⟨f.to_add_monoid_hom.to_multiplicative'',
759- f.symm.to_add_monoid_hom.to_multiplicative', f.3 , f.4 , f.5 ⟩,
760- inv_fun := λ f, ⟨f.to_monoid_hom, f.symm.to_monoid_hom, f.3 , f.4 , f.5 ⟩,
761- left_inv := λ x, by { ext, refl, },
762- right_inv := λ x, by { ext, refl, }, }
763-
764- /-- Reinterpret `multiplicative G ≃* H` as `G ≃+ additive H` as. -/
765- def mul_equiv.to_additive'' [add_zero_class G] [mul_one_class H] :
766- (multiplicative G ≃* H) ≃ (G ≃+ additive H) :=
767- add_equiv.to_multiplicative''.symm
768-
769- end type_tags
770-
771- section
772- variables (G) (H)
773-
774- /-- `additive (multiplicative G)` is just `G`. -/
775- def add_equiv.additive_multiplicative [add_zero_class G] : additive (multiplicative G) ≃+ G :=
776- mul_equiv.to_additive'' (mul_equiv.refl (multiplicative G))
777-
778- /-- `multiplicative (additive H)` is just `H`. -/
779- def mul_equiv.multiplicative_additive [mul_one_class H] : multiplicative (additive H) ≃* H :=
780- add_equiv.to_multiplicative'' (add_equiv.refl (additive H))
781-
782- end
0 commit comments