.. DO NOT EDIT. .. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. .. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: .. "api/gallery/abstract_algebra/structure/plot_04_quotient_groups.py" .. LINE NUMBERS ARE GIVEN BELOW. .. only:: html .. note:: :class: sphx-glr-download-link-note :ref:`Go to the end ` to download the full example code. .. rst-class:: sphx-glr-example-title .. _sphx_glr_api_gallery_abstract_algebra_structure_plot_04_quotient_groups.py: Hölder's quotient groups: S_4 / V_4 is S_3 ================================================ Finds the normal Klein four-group V_4 inside S_4, forms the quotient S_4/V_4, and shows that it is a non-abelian group of order 6, like S_3. .. GENERATED FROM PYTHON SOURCE LINES 10-13 .. code-block:: Python from mathematicskit.abstract_algebra import PermutationGroup, all_subgroups, is_normal_subgroup, quotient_group from mathematicskit.abstract_algebra.visualizers.plots import plot_cayley_table .. GENERATED FROM PYTHON SOURCE LINES 14-16 Normal subgroups of S_4 ----------------------------------------------------- .. GENERATED FROM PYTHON SOURCE LINES 16-21 .. code-block:: Python s4 = PermutationGroup(4) normal = [h for h in all_subgroups(s4) if is_normal_subgroup(s4, h)] print(f"normal subgroup orders in S_4: {[len(h) for h in normal]}") .. rst-class:: sphx-glr-script-out .. code-block:: none normal subgroup orders in S_4: [1, 4, 12, 24] .. GENERATED FROM PYTHON SOURCE LINES 22-24 The quotient by the Klein four-group ----------------------------------------------------- .. GENERATED FROM PYTHON SOURCE LINES 24-30 .. code-block:: Python v4 = next(h for h in normal if len(h) == 4) q = quotient_group(s4, v4) print(f"|S_4 / V_4| = {q.order}, abelian: {q.is_abelian()}") print(f"element orders in the quotient: {sorted(q.element_order(c) for c in q.elements)} (same as S_3)") plot_cayley_table(q) .. image-sg:: /api/gallery/abstract_algebra/structure/images/sphx_glr_plot_04_quotient_groups_001.png :alt: Cayley table (order 6) :srcset: /api/gallery/abstract_algebra/structure/images/sphx_glr_plot_04_quotient_groups_001.png :class: sphx-glr-single-img .. rst-class:: sphx-glr-script-out .. code-block:: none |S_4 / V_4| = 6, abelian: False element orders in the quotient: [1, 2, 2, 2, 3, 3] (same as S_3) .. rst-class:: sphx-glr-timing **Total running time of the script:** (0 minutes 0.128 seconds) .. _sphx_glr_download_api_gallery_abstract_algebra_structure_plot_04_quotient_groups.py: .. only:: html .. container:: sphx-glr-footer sphx-glr-footer-example .. container:: sphx-glr-download sphx-glr-download-jupyter :download:`Download Jupyter notebook: plot_04_quotient_groups.ipynb ` .. container:: sphx-glr-download sphx-glr-download-python :download:`Download Python source code: plot_04_quotient_groups.py ` .. container:: sphx-glr-download sphx-glr-download-zip :download:`Download zipped: plot_04_quotient_groups.zip ` .. only:: html .. rst-class:: sphx-glr-signature `Gallery generated by Sphinx-Gallery `_