@@ -809,6 +809,54 @@ theorem card_comap_dvd_of_injective (K : Subgroup H) (f : α →* H)
809
809
810
810
end Subgroup
811
811
812
+ namespace MonoidHom
813
+
814
+ variable [Group α] {H : Type *} [Group H]
815
+
816
+ /-- An equivalence between any non-empty fiber of a `MonoidHom` and its kernel. -/
817
+ @[to_additive "An equivalence between any non-empty fiber of an `AddMonoidHom` and its kernel."]
818
+ def fiberEquivKer (f : α →* H) (a : α) : f ⁻¹' {f a} ≃ f.ker :=
819
+ (Equiv.setCongr <| Set.ext fun _ => by erw [mem_singleton_iff, mem_smul_set_iff_inv_smul_mem,
820
+ mem_ker, map_mul, map_inv, inv_mul_eq_one, eq_comm]).trans <| Subgroup.leftCosetEquivSubgroup a
821
+
822
+ @[to_additive (attr := simp)]
823
+ lemma fiberEquivKer_apply (f : α →* H) (a : α) (g : f ⁻¹' {f a}) : f.fiberEquivKer a g = a⁻¹ * g :=
824
+ rfl
825
+
826
+ @[to_additive (attr := simp)]
827
+ lemma fiberEquivKer_symm_apply (f : α →* H) (a : α) (g : f.ker) :
828
+ (f.fiberEquivKer a).symm g = a * g :=
829
+ rfl
830
+
831
+ /-- An equivalence between any fiber of a surjective `MonoidHom` and its kernel. -/
832
+ @[to_additive "An equivalence between any fiber of a surjective `AddMonoidHom` and its kernel."]
833
+ noncomputable def fiberEquivKerOfSurjective {f : α →* H} (hf : Function.Surjective f) (h : H) :
834
+ f ⁻¹' {h} ≃ f.ker :=
835
+ (hf h).choose_spec ▸ f.fiberEquivKer (hf h).choose
836
+
837
+ /-- An equivalence between any two non-empty fibers of a `MonoidHom`. -/
838
+ @[to_additive "An equivalence between any two non-empty fibers of an `AddMonoidHom`."]
839
+ def fiberEquiv (f : α →* H) (a b : α) : f ⁻¹' {f a} ≃ f ⁻¹' {f b} :=
840
+ (f.fiberEquivKer a).trans (f.fiberEquivKer b).symm
841
+
842
+ @[to_additive (attr := simp)]
843
+ lemma fiberEquiv_apply (f : α →* H) (a b : α) (g : f ⁻¹' {f a}) :
844
+ f.fiberEquiv a b g = b * (a⁻¹ * g) :=
845
+ rfl
846
+
847
+ @[to_additive (attr := simp)]
848
+ lemma fiberEquiv_symm_apply (f : α →* H) (a b : α) (g : f ⁻¹' {f b}) :
849
+ (f.fiberEquiv a b).symm g = a * (b⁻¹ * g) :=
850
+ rfl
851
+
852
+ /-- An equivalence between any two fibers of a surjective `MonoidHom`. -/
853
+ @[to_additive "An equivalence between any two fibers of a surjective `AddMonoidHom`."]
854
+ noncomputable def fiberEquivOfSurjective {f : α →* H} (hf : Function.Surjective f) (h h' : H) :
855
+ f ⁻¹' {h} ≃ f ⁻¹' {h'} :=
856
+ (fiberEquivKerOfSurjective hf h).trans (fiberEquivKerOfSurjective hf h').symm
857
+
858
+ end MonoidHom
859
+
812
860
namespace QuotientGroup
813
861
814
862
variable [Group α]
0 commit comments