.. 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_03_sylow_subgroups.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_03_sylow_subgroups.py: Sylow's theorems in S_4 ============================= Finds the Sylow 2- and 3-subgroups of the symmetric group S_4 (order 24 = 2^3 * 3) and checks the counting constraints n_p = 1 (mod p) and :math:`n_p \mid |G|/p^k`. .. GENERATED FROM PYTHON SOURCE LINES 11-13 .. code-block:: Python from mathematicskit.abstract_algebra import PermutationGroup, sylow_subgroups .. GENERATED FROM PYTHON SOURCE LINES 14-16 Sylow subgroups of S_4 ----------------------------------------------------- .. GENERATED FROM PYTHON SOURCE LINES 16-25 .. code-block:: Python s4 = PermutationGroup(4) for p in (2, 3): result = sylow_subgroups(s4, p) m = s4.order // result.sylow_order print(f"p = {p}: Sylow order {result.sylow_order}, n_{p} = {result.count}") print(f" n_p mod p = {result.count % p} (should be 1), n_p divides {m}: {m % result.count == 0}") for h in result.subgroups: print(f" {h}") .. rst-class:: sphx-glr-script-out .. code-block:: none p = 2: Sylow order 8, n_2 = 3 n_p mod p = 1 (should be 1), n_p divides 3: True [(0, 1, 2, 3), (0, 1, 3, 2), (1, 0, 2, 3), (1, 0, 3, 2), (2, 3, 0, 1), (2, 3, 1, 0), (3, 2, 0, 1), (3, 2, 1, 0)] [(0, 1, 2, 3), (0, 3, 2, 1), (1, 0, 3, 2), (1, 2, 3, 0), (2, 1, 0, 3), (2, 3, 0, 1), (3, 0, 1, 2), (3, 2, 1, 0)] [(0, 1, 2, 3), (0, 2, 1, 3), (1, 0, 3, 2), (1, 3, 0, 2), (2, 0, 3, 1), (2, 3, 0, 1), (3, 1, 2, 0), (3, 2, 1, 0)] p = 3: Sylow order 3, n_3 = 4 n_p mod p = 1 (should be 1), n_p divides 8: True [(0, 1, 2, 3), (0, 2, 3, 1), (0, 3, 1, 2)] [(0, 1, 2, 3), (2, 1, 3, 0), (3, 1, 0, 2)] [(0, 1, 2, 3), (1, 2, 0, 3), (2, 0, 1, 3)] [(0, 1, 2, 3), (1, 3, 2, 0), (3, 0, 2, 1)] .. rst-class:: sphx-glr-timing **Total running time of the script:** (0 minutes 0.208 seconds) .. _sphx_glr_download_api_gallery_abstract_algebra_structure_plot_03_sylow_subgroups.py: .. only:: html .. container:: sphx-glr-footer sphx-glr-footer-example .. container:: sphx-glr-download sphx-glr-download-jupyter :download:`Download Jupyter notebook: plot_03_sylow_subgroups.ipynb ` .. container:: sphx-glr-download sphx-glr-download-python :download:`Download Python source code: plot_03_sylow_subgroups.py ` .. container:: sphx-glr-download sphx-glr-download-zip :download:`Download zipped: plot_03_sylow_subgroups.zip ` .. only:: html .. rst-class:: sphx-glr-signature `Gallery generated by Sphinx-Gallery `_