Group_Theory_Primer system:sage <style> /* start css.sty */ .cmr-10{font-size:83%;} .cmr-8{font-size:66%;} .cmr-6{font-size:50%;} .cmmi-12{font-style: italic;} .cmmi-8{font-size:66%;font-style: italic;} .cmmi-6{font-size:50%;font-style: italic;} .cmsy-8{font-size:66%;} .cmsy-6{font-size:50%;} .cmex-8{font-size:66%;} .cmex-7x-x-85{font-size:49%;} .msam-8{font-size:66%;} .msam-6{font-size:50%;} .msbm-8{font-size:66%;} .msbm-6{font-size:50%;} .cmr-17{font-size:141%;} .cmsy-10x-x-109{font-size:90%;} .cmbx-12{ font-weight: bold;} .cmtt-12{font-family: monospace;} .cmti-12{ font-style: italic;} p.noindent { text-indent: 0em } td p.noindent { text-indent: 0em; margin-top:0em; } p.nopar { text-indent: 0em; } p.indent{ text-indent: 1.5em } @media print {div.crosslinks {visibility:hidden;}} a img { border-top: 0; border-left: 0; border-right: 0; } center { margin-top:1em; margin-bottom:1em; } td center { margin-top:0em; margin-bottom:0em; } .Canvas { position:relative; } li p.indent { text-indent: 0em } li p:first-child{ margin-top:0em; } li p:last-child, li div:last-child { margin-bottom:0.5em; } li p~ul:last-child, li p~ol:last-child{ margin-bottom:0.5em; } .enumerate1 {list-style-type:decimal;} .enumerate2 {list-style-type:lower-alpha;} .enumerate3 {list-style-type:lower-roman;} .enumerate4 {list-style-type:upper-alpha;} div.newtheorem { margin-bottom: 2em; margin-top: 2em;} .obeylines-h,.obeylines-v {white-space: nowrap; } div.obeylines-v p { margin-top:0; margin-bottom:0; } .overline{ text-decoration:overline; } .overline img{ border-top: 1px solid black; } td.displaylines {text-align:center; white-space:nowrap;} .centerline {text-align:center;} .rightline {text-align:right;} div.verbatim {font-family: monospace; white-space: nowrap; text-align:left; clear:both; } .fbox {padding-left:3.0pt; padding-right:3.0pt; text-indent:0pt; border:solid black 0.4pt; } div.fbox {display:table} div.center div.fbox {text-align:center; clear:both; padding-left:3.0pt; padding-right:3.0pt; text-indent:0pt; border:solid black 0.4pt; } div.minipage{width:100%;} div.center, div.center div.center {text-align: center; margin-left:1em; margin-right:1em;} div.center div {text-align: left;} div.flushright, div.flushright div.flushright {text-align: right;} div.flushright div {text-align: left;} div.flushleft {text-align: left;} .underline{ text-decoration:underline; } .underline img{ border-bottom: 1px solid black; margin-bottom:1pt; } .framebox-c, .framebox-l, .framebox-r { padding-left:3.0pt; padding-right:3.0pt; text-indent:0pt; border:solid black 0.4pt; } .framebox-c {text-align:center;} .framebox-l {text-align:left;} .framebox-r {text-align:right;} span.thank-mark{ vertical-align: super } span.footnote-mark sup.textsuperscript, span.footnote-mark a sup.textsuperscript{ font-size:80%; } div.tabular, div.center div.tabular {text-align: center; margin-top:0.5em; margin-bottom:0.5em; } table.tabular td p{margin-top:0em;} table.tabular {margin-left: auto; margin-right: auto;} td p:first-child{ margin-top:0em; } td p:last-child{ margin-bottom:0em; } div.td00{ margin-left:0pt; margin-right:0pt; } div.td01{ margin-left:0pt; margin-right:5pt; } div.td10{ margin-left:5pt; margin-right:0pt; } div.td11{ margin-left:5pt; margin-right:5pt; } table[rules] {border-left:solid black 0.4pt; border-right:solid black 0.4pt; } td.td00{ padding-left:0pt; padding-right:0pt; } td.td01{ padding-left:0pt; padding-right:5pt; } td.td10{ padding-left:5pt; padding-right:0pt; } td.td11{ padding-left:5pt; padding-right:5pt; } table[rules] {border-left:solid black 0.4pt; border-right:solid black 0.4pt; } .hline hr, .cline hr{ height : 1px; margin:0px; } .tabbing-right {text-align:right;} span.TEX {letter-spacing: -0.125em; } span.TEX span.E{ position:relative;top:0.5ex;left:-0.0417em;} a span.TEX span.E {text-decoration: none; } span.LATEX span.A{ position:relative; top:-0.5ex; left:-0.4em; font-size:85%;} span.LATEX span.TEX{ position:relative; left: -0.4em; } div.float img, div.float .caption {text-align:center;} div.figure img, div.figure .caption {text-align:center;} .marginpar {width:20%; float:right; text-align:left; margin-left:auto; margin-top:0.5em; font-size:85%; text-decoration:underline;} .marginpar p{margin-top:0.4em; margin-bottom:0.4em;} .equation td{text-align:center; vertical-align:middle; } td.eq-no{ width:5%; } table.equation { width:100%; } div.math-display, div.par-math-display{text-align:center;} math .texttt { font-family: monospace; } math .textit { font-style: italic; } math .textsl { font-style: oblique; } math .textsf { font-family: sans-serif; } math .textbf { font-weight: bold; } .partToc a, .partToc, .likepartToc a, .likepartToc {line-height: 200%; font-weight:bold; font-size:110%;} .index-item, .index-subitem, .index-subsubitem {display:block} .caption td.id{font-weight: bold; white-space: nowrap; } table.caption {text-align:center;} h1.partHead{text-align: center} p.bibitem { text-indent: -2em; margin-left: 2em; margin-top:0.6em; margin-bottom:0.6em; } p.bibitem-p { text-indent: 0em; margin-left: 2em; margin-top:0.6em; margin-bottom:0.6em; } .paragraphHead, .likeparagraphHead { margin-top:2em; font-weight: bold;} .subparagraphHead, .likesubparagraphHead { font-weight: bold;} .quote {margin-bottom:0.25em; margin-top:0.25em; margin-left:1em; margin-right:1em; text-align:justify;} .verse{white-space:nowrap; margin-left:2em} div.maketitle {text-align:center;} h2.titleHead{text-align:center;} div.maketitle{ margin-bottom: 2em; } div.author, div.date {text-align:center;} div.thanks{text-align:left; margin-left:10%; font-size:85%; font-style:italic; } div.author{white-space: nowrap;} .quotation {margin-bottom:0.25em; margin-top:0.25em; margin-left:1em; } .abstract p {margin-left:5%; margin-right:5%;} div.abstract {width:100%;} .equation-star td{text-align:center; } table.equation-star { width:100%; } mtd.align-odd{margin-left:2em; text-align:right;} mtd.align-even{margin-right:2em; text-align:left;} .boxed{border: 1px solid black; padding-left:2px; padding-right:2px;} table.multline td {text-align:left; vertical-align:middle; padding-left: 2em; } table.multline td.eq-no { text-align:center; } table.multline { width:100%; } .boxed{border: 1px solid black; padding-left:2px; padding-right:2px;} .boxed{border: 1px solid black; padding-left:2px; padding-right:2px;} div.verbatiminput {font-family: monospace; white-space: nowrap; } .figure img.graphics {margin-left:10%;} /* jsMath suggested additions for spacing control */ .jsMath_hiddenSpan {text-indent: 0px} .typeset {text-indent: 0px} /* end css.sty */ </style> <div class="center" > <!--l. 63--><p class="noindent" > </p><!--l. 64--><p class="noindent" ><span class="cmr-17">Group Theory and SAGE: A Primer</span><br /> Robert A.�Beezer<br /> University of Puget Sound<br /> <span class="cmsy-10x-x-120">�</span>2008 CC-A-SA License<span class="footnote-mark"><a href="sage-group-theory-primer2.html#fn2x0"><sup class="textsuperscript"><!--l. 67--><span class="math" >�</span></sup></a></span><a id="x1-2f0"></a><br /><br /> <span class="cmbx-12">Version 1.0</span><br /> <span class="cmbx-12">January 30, 2009</span></p></div> <h3 class="likesectionHead"><a id="x1-1000"></a>Introduction</h3> <!--l. 77--><p class="noindent" >This <span class="cmtt-12">compilation</span> collects SAGE commands that are useful for a student in an introductory course in group theory. It is not intended to teach SAGE or to teach group theory. (There are many introductory texts on group theory and more information on SAGE can be found via <span class="cmtt-12">sagemath.org</span>.) Rather, by presenting commands roughly in the order a student would learn the corresponding mathematics they might be encouraged to experiment and learn more about mathematics and learn more about SAGE. Not coincidentally, the �E� in SAGE once stood for �Exploration.� </p><!--l. 79--><p class="indent" > This guide is distributed in PDF format, and as a SAGE worksheet. The worksheet version can be imported into the SAGE notebook environment running in a web browser, and then the displayed chunks of code may be executed by SAGE if one clicks on the small �evaluate� link below each cell, for a fully interactive experience. </p> <h3 class="likesectionHead"><a id="x1-2000"></a>Basic Properties of the Integers</h3> <!--l. 83--><p class="noindent" > </p> <h5 class="likesubsubsectionHead"><a id="x1-3000"></a>Integer Division</h5> <!--l. 84--><p class="noindent" ><span class="cmtt-12">a %</span><span class="cmtt-12">�b</span> will return the remainder upon division of <!--l. 84--><span class="math" >a</span> by <!--l. 84--><span class="math" >b</span>. In other words, the value is the unique integer <!--l. 84--><span class="math" >r</span> such that (1) <!--l. 84--><span class="math" >0 ≤ r < b</span>, and (2) <!--l. 84--><span class="math" >a = bq + r</span> for some integer <!--l. 84--><span class="math" >q</span> (the quotient). Then <!--l. 84--><span class="math" >(a − r)∕b</span> will equal <!--l. 84--><span class="math" >q</span>. For example, </p> {{{id=0| r = 14 % 3 q = (14 - r)/3 r, q /// }}} <!--l. 92--><p class="indent" > will return <span class="cmtt-12">2</span> for the value of <span class="cmtt-12">r</span>, and <span class="cmtt-12">4</span> for the value of <span class="cmtt-12">q</span>. Note that the �<span class="cmtt-12">/</span>� is <span class="cmti-12">integer </span>division, where any remainder is cast away and the result is always an integer. So, for example, <span class="cmtt-12">14/3</span> will again equal <span class="cmtt-12">4</span>, not <span class="cmtt-12">4.66666</span>. </p> <h5 class="likesubsubsectionHead"><a id="x1-4000"></a>Greatest Common Divisor</h5> <!--l. 95--><p class="noindent" >The greatest common divisor of <!--l. 95--><span class="math" >a</span> and <!--l. 95--><span class="math" >b</span> is obtained with the command <span class="cmtt-12">gcd(a,b)</span>, where in our first uses, <!--l. 95--><span class="math" >a</span> and <!--l. 95--><span class="math" >b</span> are integers. Later, <!--l. 95--><span class="math" >a</span> and <!--l. 95--><span class="math" >b</span> can be other objects with a notion of divisibility and �greatness,� such as polynomials. For example, </p> {{{id=1| gcd(2776, 2452) /// }}} <!--l. 101--><p class="indent" > will return <span class="cmtt-12">4</span>. </p> <h5 class="likesubsubsectionHead"><a id="x1-5000"></a>Extended Greatest Common Divisor</h5> <!--l. 105--><p class="noindent" >The command <span class="cmtt-12">xgcd(a,b)</span> (�eXtended GCD�) returns a triple where the first element is the greatest common divisor of <!--l. 105--><span class="math" >a</span> and <!--l. 105--><span class="math" >b</span> (as with the <span class="cmtt-12">gcd(a,b)</span> command above), but the next two elements are the values of <!--l. 105--><span class="math" >r</span> and <!--l. 105--><span class="math" >s</span> such that <!--l. 105--><span class="math" >ra + sb =\mathop{ gcd}(a,b)</span>. For example, <span class="cmtt-12">xgcd(633,331)</span> returns <span class="cmtt-12">(1, 194, -371)</span>. Portions of the triple can be extracted using <span class="cmtt-12">[</span><span class="cmtt-12">�]</span> to access the entries of the triple, starting with the first as number <span class="cmtt-12">0</span>. For example, the following should return the result <span class="cmtt-12">True</span> (even if you change the values of <span class="cmtt-12">a</span> and <span class="cmtt-12">b</span>). Studying this block of code will go a long way towards helping you get the most out of SAGE�s output. (Note that �<span class="cmtt-12">=</span>� is how a value is assigned to a variable, while as in the last line, �<span class="cmtt-12">==</span>� is how we determine equality of two items.) </p> {{{id=2| a = 633 b = 331 extended = xgcd(a, b) g = extended[0] r = extended[1] s = extended[2] g == r*a + s*b /// }}} <!--l. 117--><p class="noindent" > </p> <h5 class="likesubsubsectionHead"><a id="x1-6000"></a>Divisibility</h5> <!--l. 118--><p class="noindent" >A remainder of zero indicates divisibility. So <span class="cmtt-12">(a %</span><span class="cmtt-12">�b) == 0</span> will return <span class="cmtt-12">True</span> if <!--l. 118--><span class="math" >b</span> divides <!--l. 118--><span class="math" >a</span>, and will otherwise return <span class="cmtt-12">False</span>. For example, <span class="cmtt-12">(9 %</span><span class="cmtt-12">�3) == 0</span> is <span class="cmtt-12">True</span>, but <span class="cmtt-12">(9 %</span><span class="cmtt-12">�4) == 0</span> is <span class="cmtt-12">False</span>. Try predicting the output of the following before executing it in SAGE. </p> {{{id=3| answer1 = ((20 % 5) == 0) answer2 = ((17 % 4) == 0) answer1, answer2 /// }}} <!--l. 127--><p class="noindent" > </p> <h5 class="likesubsubsectionHead"><a id="x1-7000"></a>Factoring</h5> <!--l. 128--><p class="noindent" >As promised by the Fundamental Theorem of Arithmetic, <span class="cmtt-12">factor(a)</span> will return a unique expression for <!--l. 128--><span class="math" >a</span> as a product of powers of primes. It will print in a nicely-readable form, but can also be manipulated with Python as a list of pairs <!--l. 128--><span class="math" >({p}_{i},{e}_{i})</span> containing primes as bases, and their associated exponents. For example, </p> {{{id=4| factor(2600) /// }}} <!--l. 136--><p class="indent" > returns <span class="cmtt-12">2^3 * 5^2 * 13</span>. We can strip off pieces of the prime decomposition using two levels of <span class="cmtt-12">[</span><span class="cmtt-12">�]</span>. This is another good example to study in order to learn about how to drill down into Python lists. </p> {{{id=5| n = 2600 decomposition = factor(n) print n, " decomposes as ", decomposition secondterm = decomposition[1] print "Base and exponent (pair) for second prime: ", secondterm base = secondterm[0] exponent = secondterm[1] print "Base is ", base print "Exponent is ", exponent thirdbase = decomposition[2][0] thirdexponent = decomposition[2][1] print "Base of third term is ", thirdbase, " with exponent ", thirdexponent /// }}} <!--l. 153--><p class="indent" > With a bit more work, the <span class="cmtt-12">factor()</span> command can be used to factor more complicated items, such as polynomials. </p> <h5 class="likesubsubsectionHead"><a id="x1-8000"></a>Multiplicative Inverse, Modular Arithmetic</h5> <!--l. 156--><p class="noindent" ><span class="cmtt-12">inverse</span><span class="cmtt-12">_mod(a, n)</span> yields the multiplicative inverse of <!--l. 156--><span class="math" >a</span> mod <!--l. 156--><span class="math" >n</span> (or an error if it doesn�t exist). For example, </p> {{{id=6| inverse_mod(352, 917) /// }}} <!--l. 162--><p class="indent" > yields <span class="cmtt-12">508</span>. (As a check, find the integer <!--l. 163--><span class="math" >m</span> such that <span class="cmtt-12">352*508 = m*917+1</span>.) </p><!--l. 165--><p class="indent" > Then try </p> {{{id=7| inverse_mod(4, 24) /// }}} <!--l. 171--><p class="indent" > and explain the result. </p> <h5 class="likesubsubsectionHead"><a id="x1-9000"></a>Powers with Modular Arithmetic</h5> <!--l. 175--><p class="noindent" ><span class="cmtt-12">power</span><span class="cmtt-12">_mod(a, m, n)</span> yields <!--l. 175--><span class="math" >{a}^{m}</span> mod <!--l. 175--><span class="math" >n</span>. For example, </p> {{{id=8| power_mod(15, 831, 23) /// }}} <!--l. 181--><p class="indent" > returns <span class="cmtt-12">10</span>. If <!--l. 181--><span class="math" >m = −1</span>, then this command will duplicate the function of <span class="cmtt-12">inverse</span><span class="cmtt-12">_mod()</span>. </p> <h5 class="likesubsubsectionHead"><a id="x1-10000"></a>Euler <!--l. 184--><span class="math" >ϕ</span>-function</h5> <!--l. 185--><p class="noindent" ><span class="cmtt-12">euler</span><span class="cmtt-12">_phi(n)</span> will return the number of positive integers less than <!--l. 185--><span class="math" >n</span>, and relatively prime to <!--l. 185--><span class="math" >n</span> (i.e.�having greatest common divisor with <!--l. 185--><span class="math" >n</span> equal to <!--l. 185--><span class="math" >1</span>). For example, </p> {{{id=9| euler_phi(345) /// }}} <!--l. 191--><p class="indent" > should return <!--l. 191--><span class="math" >176</span>. Experiment by running the following code several times: </p> {{{id=10| m = random_prime(10000) n = random_prime(10000) m, n, euler_phi(m*n) == euler_phi(m)*euler_phi(n) /// }}} <!--l. 199--><p class="indent" > Feel a conjecture coming on? Can you generalize this result? </p> <h5 class="likesubsubsectionHead"><a id="x1-11000"></a>Primes</h5> <!--l. 203--><p class="noindent" >The command <span class="cmtt-12">is</span><span class="cmtt-12">_prime(a)</span> returns <span class="cmtt-12">True</span> or <span class="cmtt-12">False</span> depending on if <!--l. 203--><span class="math" >a</span> is prime or not. For example, </p> {{{id=11| is_prime(117371) /// }}} <!--l. 209--><p class="indent" > returns <span class="cmtt-12">True</span>, while </p> {{{id=12| is_prime(14547073) /// }}} <!--l. 215--><p class="indent" > returns <span class="cmtt-12">False</span> since <!--l. 215--><span class="math" >14547073 = 1597 ∗ 9109</span> (as you could determine with the <span class="cmtt-12">factor()</span> command). </p><!--l. 217--><p class="indent" > The command <span class="cmtt-12">random</span><span class="cmtt-12">_prime(a,True)</span> will return a random prime between <!--l. 217--><span class="math" >2</span> and <!--l. 217--><span class="math" >a</span>.<br class="newline" />Experiment with </p> {{{id=13| random_prime(10^21,True) /// }}} <!--l. 224--><p class="indent" > (Replacing <span class="cmtt-12">True</span> by <span class="cmtt-12">False</span> will speed up the search, but there will be a very small probability the result will not be prime.) </p><!--l. 226--><p class="indent" > The command <span class="cmtt-12">prime</span><span class="cmtt-12">_range(a,b)</span> returns an ordered list of all the primes from <!--l. 226--><span class="math" >a</span> to <!--l. 226--><span class="math" >b − 1</span>, inclusive. For example, </p> {{{id=14| prime_range(500,550) /// }}} <!--l. 232--><p class="indent" > returns <span class="cmtt-12">[503, 509, 521, 523, 541, 547]</span>. </p><!--l. 234--><p class="indent" > The commands <span class="cmtt-12">next</span><span class="cmtt-12">_prime(a)</span> and <span class="cmtt-12">previous</span><span class="cmtt-12">_prime(a)</span> are other ways to get a single prime number of a desired size. Give �em a try. </p> <h3 class="likesectionHead"><a id="x1-12000"></a>Permutation Groups</h3> <!--l. 239--><p class="noindent" >A good portion of SAGE�s support for group theory is based on routines from GAP (Groups, Algorithms, and Programming at <span class="cmtt-12">http://www.gap-system.org/</span>). Groups can be described in many different ways, such as sets of matrices or sets of symbols subject to a few defining relations. A very concrete way to represent groups is via permutations (one-to-one and onto functions of the integers <!--l. 240--><span class="math" >1</span> through <!--l. 240--><span class="math" >n</span>), using function composition as the operation in the group. SAGE has many routines designed to work with groups of this type and they are also a good way for those learning group theory to gain experience with the basic ideas of group theory. For both these reasons, we will concentrate on these types of groups. </p> <h5 class="likesubsubsectionHead"><a id="x1-13000"></a>Writing Permutations</h5> <!--l. 243--><p class="noindent" >SAGE uses �disjoint cycle notation� for permutations, see any introductory text on group theory (such as Judson, Section 4.1) for more on this. Composition occurs <span class="cmti-12">left to right</span>, which is not what you might expect and is exactly the reverse of what Judson and many others use. (There are good reasons to support either direction, you just need to be certain you know which one is in play.) There are two ways to write the permutation <!--l. 243--><span class="math" >σ = (1\kern 1.95872pt 3)(2\kern 1.95872pt 5\kern 1.95872pt 4)</span>, </p><ol class="enumerate1" > <li class="enumerate" id="x1-13002x1">As a text string (include quotes): <span class="cmtt-12">"(1,3)(2,5,4)"</span> </li> <li class="enumerate" id="x1-13004x2">As a Python list of �tuples�: <span class="cmtt-12">[(1,3), (2,5,4)]</span></li></ol> <!--l. 251--><p class="noindent" > </p> <h5 class="likesubsubsectionHead"><a id="x1-14000"></a>Groups</h5> <!--l. 251--><p class="noindent" >SAGE knows many popular groups as sets of permutations. More are listed below, but for starters, the full �symmetric group� of all possible permutations of <!--l. 251--><span class="math" >1</span> through <!--l. 251--><span class="math" >n</span> can be built with the command <span class="cmtt-12">SymmetricGroup(n)</span>. </p> <!--l. 254--><p class="noindent" ><span class="paragraphHead"><a id="x1-15000"></a><span class="cmbx-12">Permutation Elements</span></span> Elements of a group can be created, and composed, as follows </p> {{{id=15| G = SymmetricGroup(5) sigma = G("(1,3)(2,5,4)") rho = G([(1,4), (1,5)]) rho^-1*sigma*rho /// }}} <!--l. 263--><p class="indent" > Available functions for elements of a permutation group include finding the order of an element, i.e.�for a permutation <!--l. 263--><span class="math" >σ</span> the order is the smallest power of <!--l. 263--><span class="math" >k</span> such that <!--l. 263--><span class="math" >{σ}^{k}</span> equals the identity element <!--l. 263--><span class="math" >()</span>. For example, </p> {{{id=16| sigma = G("(1,3)(2,5,4)") sigma.order() /// }}} <!--l. 270--><p class="indent" > will return <!--l. 270--><span class="math" >6</span>. </p><!--l. 272--><p class="indent" > The sign of the permutation <!--l. 272--><span class="math" >σ</span> is defined to be <!--l. 272--><span class="math" >1</span> for an even permutation and <!--l. 272--><span class="math" > − 1</span> for an odd permutation. For example, </p> {{{id=17| sigma = G("(1,3)(2,5,4)") sigma.sign() /// }}} <!--l. 279--><p class="indent" > will return <!--l. 279--><span class="math" > − 1</span> since <!--l. 279--><span class="math" >σ</span> is an odd permutation. </p><!--l. 281--><p class="indent" > Many more available functions that can be applied to a permutation can be found via �tab-completion.� With <span class="cmtt-12">sigma</span> defined as an element of a permutation group, in a SAGE cell, type <span class="cmtt-12">sigma.</span> (Note the �<span class="cmtt-12">.</span>�) and then press the tab key. You�ll get a list of available functions (you may need to scroll down to see the whole list). Experiment and explore! It�s what SAGE is all about. You really can�t break anything. </p> <h5 class="likesubsubsectionHead"><a id="x1-16000"></a>Creating Groups</h5> <!--l. 284--><p class="noindent" >This is an annotated list of some small well-known permutation groups that can be created simply in SAGE.<br class="newline" />(You can find more in the source code file <br class="newline" /><span class="cmtt-12">/sage/devel/sage/sage/groups/perm</span><span class="cmtt-12">_gps/permgroup</span><span class="cmtt-12">_named.py</span>) </p><!--l. 285--><p class="noindent" ><span class="cmtt-12">SymmetricGroup(n)</span>: All <!--l. 287--><span class="math" >n!</span> permutations on <!--l. 287--><span class="math" >n</span> symbols.<br class="newline" /><span class="cmtt-12">DihedralGroup(n)</span>: Symmetries of an <!--l. 288--><span class="math" >n</span>-gon. Rotations and flips, <!--l. 288--><span class="math" >2n</span> in total.<br class="newline" /><span class="cmtt-12">CyclicPermutationGroup(n)</span>: Rotations of an <!--l. 289--><span class="math" >n</span>-gon (no flips), <!--l. 289--><span class="math" >n</span> in total.<br class="newline" /><span class="cmtt-12">AlternatingGroup(n)</span>: Alternating group on <!--l. 290--><span class="math" >n</span> symbols having <!--l. 290--><span class="math" >n!∕2</span> elements.<br class="newline" /><span class="cmtt-12">KleinFourGroup()</span>: The non-cyclic group of order 4. </p> <h3 class="likesectionHead"><a id="x1-17000"></a>Group Functions</h3> <!--l. 296--><p class="noindent" >Individual elements of permutation groups are important, but we primarily wish to study groups as objects on their own. So a wide-variety of computations are available for groups. Define a group, for example </p> {{{id=18| H = DihedralGroup(6) /// }}} <!--l. 303--><p class="indent" > and then a variety of functions become available. </p><!--l. 305--><p class="indent" > After trying the examples below, experiment with tab-completion. Having defined <span class="cmtt-12">H</span>, type <span class="cmtt-12">H.</span> (note the �<span class="cmtt-12">.</span>�) and then press the tab key. You�ll get a list of available functions (you may need to scroll down to see the whole list). As before, <span class="cmti-12">experiment and explore </span>� its really hard to break anything. </p><!--l. 307--><p class="indent" > Here�s another couple of ways to experiment and explore. Find a function that looks interesting, say <span class="cmtt-12">is</span><span class="cmtt-12">_abelian()</span>. Type <span class="cmtt-12">H.is</span><span class="cmtt-12">_abelian(</span>��(note there is just an opening parenthesis), followed by the tab key. This will display a portion of the source code for the <span class="cmtt-12">is</span><span class="cmtt-12">_abelian()</span> function, describing the inputs and output, possibly illustrated with example uses. </p><!--l. 309--><p class="indent" > If you want to learn more about how SAGE works, or possibly extend its functionality, then you can start by examining the complete Python source code. For example, try <span class="cmtt-12">H.is</span><span class="cmtt-12">_abelian??</span>, which will allow you to determine that the <span class="cmtt-12">is</span><span class="cmtt-12">_abelian()</span> function is basically riding on GAP�s <span class="cmtt-12">IsAbelian()</span> command and asking GAP do the heavy-lifting for us. (To get the maximum advantage of using SAGE it helps to know some basic Python programming, but it is not required.) </p><!--l. 311--><p class="indent" > OK, on to some popular command for groups. If you are using the worksheet, be sure you have defined the group <!--l. 311--><span class="math" >H</span> as the dihedral group <!--l. 311--><span class="math" >{D}_{6}</span>, since we won�t keep repeating its definition below. </p> <h5 class="likesubsubsectionHead"><a id="x1-18000"></a>Abelian?</h5> <!--l. 314--><p class="noindent" >The command </p> {{{id=19| H.is_abelian() /// }}} <!--l. 320--><p class="indent" > will return <span class="cmtt-12">False</span> since <!--l. 320--><span class="math" >{D}_{6}</span> is a non-abelian group. </p> <h5 class="likesubsubsectionHead"><a id="x1-19000"></a>Order</h5> <!--l. 323--><p class="noindent" >The command </p> {{{id=20| H.order() /// }}} <!--l. 329--><p class="indent" > will return <span class="cmtt-12">12</span> since <!--l. 329--><span class="math" >{D}_{6}</span> is a group of with <!--l. 329--><span class="math" >12</span> elements. </p> <h5 class="likesubsubsectionHead"><a id="x1-20000"></a>All Elements</h5> <!--l. 332--><p class="noindent" >The command </p> {{{id=21| H.list() /// }}} <!--l. 338--><p class="indent" > will return all of the elements of <!--l. 338--><span class="math" >H</span> in a fixed order as a Python list. Indexing (<span class="cmtt-12">[</span><span class="cmtt-12">�]</span>) can be used to extract the individual elements of the list, remembering that counting the elements of the list begins at zero. </p> {{{id=22| elements = H.list() elements[3] /// }}} <!--l. 346--><p class="noindent" > </p> <h5 class="likesubsubsectionHead"><a id="x1-21000"></a>Cayley Table</h5> <!--l. 346--><p class="noindent" >The command </p> {{{id=23| H.cayley_table() /// }}} <!--l. 352--><p class="indent" > will construct the Cayley table (or �multiplication table�) of <!--l. 352--><span class="math" >H</span>. The display uses the elements of the group in the same order as the <span class="cmtt-12">list()</span> command, and denoting them as <span class="cmtt-12">xN</span> where <!--l. 352--><span class="math" >N</span> is an integer. For example to determine the element in the table named <span class="cmtt-12">x4</span>, </p> {{{id=24| H.list()[4] /// }}} <!--l. 359--><p class="noindent" > </p> <h5 class="likesubsubsectionHead"><a id="x1-22000"></a>Center</h5> <!--l. 359--><p class="noindent" >The command <span class="cmtt-12">H.center()</span> will return a subgroup that is the center of the group <!--l. 359--><span class="math" >H</span> (see Exercise 2.46 in Judson). Try </p> {{{id=25| H.center().list() /// }}} <!--l. 365--><p class="indent" > to see which elements of <!--l. 365--><span class="math" >H</span> commute with <span class="cmti-12">every </span>element of <!--l. 365--><span class="math" >H</span>. </p><!--l. 367--><p class="noindent" > </p> <h5 class="likesubsubsectionHead"><a id="x1-23000"></a>Cayley Graph</h5> <!--l. 367--><p class="noindent" >For fun, try <span class="cmtt-12">show(H.cayley</span><span class="cmtt-12">_graph())</span>. </p> <h3 class="likesectionHead"><a id="x1-24000"></a>Subgroups</h3> <!--l. 371--><p class="noindent" > </p> <h5 class="likesubsubsectionHead"><a id="x1-25000"></a>Cyclic Subgroups</h5> <!--l. 371--><p class="noindent" >If <span class="cmtt-12">G</span> is a group, and <span class="cmtt-12">a</span> is an element of the group (try <span class="cmtt-12">a=G.random</span><span class="cmtt-12">_element()</span>), then </p> {{{id=26| a=G.random_element() H=G.subgroup([a]) /// }}} <!--l. 378--><p class="indent" > will create <span class="cmtt-12">H</span> as the cyclic subgroup of <span class="cmtt-12">G</span> with generator <span class="cmtt-12">a</span>. </p><!--l. 380--><p class="indent" > For example the code below will (1) create <span class="cmtt-12">G</span> as the symmetric group on five symbols, (2) specify <span class="cmtt-12">sigma</span> as an element of <span class="cmtt-12">G</span>, (3) use <span class="cmtt-12">sigma</span> as the generator of a cyclic subgroup <span class="cmtt-12">H</span>, (4) list all the elements of <span class="cmtt-12">H</span>. In more mathematical notation, we might write <!--l. 380--><span class="math" >\langle (1\kern 1.95872pt 2\kern 1.95872pt 3)(4\kern 1.95872pt 5)\rangle = H ⊆ G = {S}_{5}</span>. </p> {{{id=27| G=SymmetricGroup(5) sigma=G("(1,2,3)(4,5)") H=G.subgroup([sigma]) H.list() /// }}} <!--l. 389--><p class="indent" > Experiment by trying different permutations for <span class="cmtt-12">sigma</span> and observing the effect on <span class="cmtt-12">H</span>. </p> <h5 class="likesubsubsectionHead"><a id="x1-26000"></a>Cyclic Groups</h5> <!--l. 393--><p class="noindent" >Groups that are cyclic themselves are both important, and rich in structure. The command <span class="cmtt-12">CyclicPermutationGroup(n)</span> will create a permutation group that is cyclic with <span class="cmtt-12">n</span> elements. Consider the following example (note that the indentation of the third line is critical) which will list the elements of a cyclic group of order 20, preceded by the order of each element. </p> {{{id=28| n=20 CN = CyclicPermutationGroup(n) for g in CN: print g.order(), " ", g /// }}} <!--l. 402--><p class="indent" > By varying the size of the group (change the value of <span class="cmtt-12">n</span>) you can begin to illustrate some of the structure of a cyclic group (for example, try a prime). </p><!--l. 404--><p class="indent" > We can cut/paste an element of order 5 from the output above (in the case when the cyclic group has 20 elements) and quickly build a subgroup, </p> {{{id=29| rho = C20("(1,17,13,9,5)(2,18,14,10,6)(3,19,15,11,7)(4,20,16,12,8)") H = C20.subgroup([rho]) H.list() /// }}} <!--l. 412--><p class="indent" > For a cyclic group, the following command will list <span class="cmti-12">all </span>of the subgroups. </p> {{{id=30| C20.conjugacy_classes_subgroups() /// }}} <!--l. 418--><p class="indent" > Be careful, this command uses some more advanced ideas, and will not usually list <span class="cmti-12">all </span>of the subgroups of a group � here we are relying on special properties of cyclic groups (but see the next section). </p> <h5 class="likesubsubsectionHead"><a id="x1-27000"></a>All Subgroups</h5> <!--l. 420--><p class="noindent" >If <!--l. 420--><span class="math" >H</span> is a subgroup of <!--l. 420--><span class="math" >G</span> and <!--l. 420--><span class="math" >g ∈ G</span>, then <!--l. 420--><span class="math" >gH{g}^{−1} = \{gh{g}^{−1}\mathrel{∣}h ∈ G\}</span> will also be a subgroup of <!--l. 420--><span class="math" >G</span>. If <span class="cmtt-12">G</span> is a group, then the command <span class="cmtt-12">G.conjugacy</span><span class="cmtt-12">_classes</span><span class="cmtt-12">_subgroups()</span> will return a list of subgroups of <span class="cmtt-12">G</span>, but not all of the subgroups. However, every subgroup can be constructed from one on the list by the <!--l. 420--><span class="math" >gH{g}^{−1}</span> construction with a suitable <!--l. 420--><span class="math" >g</span>. As an illustration, the code below (1) creates <span class="cmtt-12">K</span> as the dihedral group of order 24, <!--l. 420--><span class="math" >{D}_{12}</span>, (2) stores the list of subgroups output by <span class="cmtt-12">K.conjugacy</span><span class="cmtt-12">_classes</span><span class="cmtt-12">_subgroups()</span> in the variable <span class="cmtt-12">sg</span>, (3) prints the elements of the list, (4) selects the second subgroup in the list, and lists its elements. </p> {{{id=31| K=DihedralGroup(12) sg = K.conjugacy_classes_subgroups() print "sg:\n", sg print "\nAn order two subgroup:\n", sg[1].list() /// }}} <!--l. 429--><p class="indent" > It is important to note that this is a nice long list of subgroups, but will rarely create <span class="cmti-12">every </span>such subgroup. For example, the code below (1) creates <span class="cmtt-12">rho</span> as an element of the group <span class="cmtt-12">K</span>, (2) creates <span class="cmtt-12">L</span> as a cyclic subgroup of <span class="cmtt-12">K</span>, (3) prints the two elements of <span class="cmtt-12">L</span>, and finally (4) tests to see if this subgroup is part of the output of the list <span class="cmtt-12">sg</span> created just above (it is not). </p> {{{id=32| rho = K("(1,4)(2,3)(5,12)(6,11)(7,10)(8,9)") L=PermutationGroup([rho]) print L.list() print L in sg /// }}} <!--l. 439--><p class="noindent" > </p> <h3 class="likesectionHead"><a id="x1-28000"></a>Symmetry Groups</h3> <!--l. 441--><p class="noindent" >You can give SAGE a short list of elements of a permutation group and SAGE will find the smallest subgroup that contains those elements. We say the list �generates� the subgroup. We list a few interesting subgroups you can create this way. </p> <h5 class="likesubsubsectionHead"><a id="x1-29000"></a>Symmetries of an Equilateral Triangle</h5> <!--l. 445--><p class="noindent" >Label the vertices of an equilateral triangle as 1, 2 and 3. Then <span class="cmti-12">any </span>permutation of the vertices will be a symmetry of the triangle. So either <span class="cmtt-12">SymmetricGroup(3)</span> or <span class="cmtt-12">DihedralGroup(3)</span> will create the full symmetry group. </p> <h5 class="likesubsubsectionHead"><a id="x1-30000"></a>Symmetries of an <!--l. 447--><span class="math" >n</span>-gon</h5> <!--l. 449--><p class="noindent" >A regular, <!--l. 449--><span class="math" >n</span>-sided figure in the plane (an <!--l. 449--><span class="math" >n</span>-gon) will have <!--l. 449--><span class="math" >2n</span> symmetries, comprised of <!--l. 449--><span class="math" >n</span> rotations (including the trivial one) and <!--l. 449--><span class="math" >n</span> �flips� about various axes. The dihedral group <span class="cmtt-12">DihedralGroup(n)</span> is frequently defined as exactly the symmetry group of an <!--l. 449--><span class="math" >n</span>-gon. </p> <h5 class="likesubsubsectionHead"><a id="x1-31000"></a>Symmetries of a Tetrahedron</h5> <!--l. 453--><p class="noindent" >Label the 4 vertices of a regular tetahedron as 1, 2, 3 and 4. Fix the vertex labeled 4 and roate the opposite face through 120 degrees. This will create the permutation/symmetry <!--l. 453--><span class="math" >(1\kern 1.95872pt 2\kern 1.95872pt 3)</span>. Similarly, fixing vertex 1, and rotating the opposite face will create the permutation <!--l. 453--><span class="math" >(2\kern 1.95872pt 3\kern 1.95872pt 4)</span>. These two permutations are enough to generate the full group of the twelve symmetries of the tetrahedron. Another symmetry can be visualized by running an axis through the midpoint of an edge of the tetrahedron through to the midpoint of the opposite edge, and then rotating by 180 degrees about this axis. For example, the 1�2 edge is opposite the 3�4 edge, and the symmetry is described by the permutation <!--l. 453--><span class="math" >(1\kern 1.95872pt 2)(3\kern 1.95872pt 4)</span>. This permutation, along with either of the above permutations will also generate the group. So here are two ways to create this group, </p> {{{id=33| tetra_one = PermutationGroup(["(1,2,3)", "(2,3,4)"]) tetra_two = PermutationGroup(["(1,2,3)", "(1,2)(3,4)"]) /// }}} <!--l. 460--><p class="indent" > This group has a variety of interesting properties, so it is worth experimenting with. You may also know it as the �alternating group on 4 symbols,� which SAGE will create with the command <span class="cmtt-12">AlternatingGroup(4)</span>. </p> <h5 class="likesubsubsectionHead"><a id="x1-32000"></a>Symmetries of a Cube</h5> <!--l. 464--><p class="noindent" >Label vertices of one face of a cube with 1, 2, 3 and 4, and on the opposite face label the vertices 5, 6, 7 and 8 (5 opposite 1, 6 opposite 2, etc.). Consider three axes that run from the center of a face to the center of the opposite face, and consider a quarter-turn rotation about each axis. These three rotations will construct the entire symmetry group. Use </p> {{{id=34| cube = PermutationGroup(["(3,2,6,7)(4,1,5,8)", "(1,2,6,5)(4,3,7,8)", "(1,2,3,4)(5,6,7,8)"]) cube.list() /// }}} <!--l. 473--><p class="indent" > A cube has four distinct diagonals (joining opposite vertices through the center of the cube). Each symmetry of the cube will cause the diagonals to arrange differently. In this way, we can view an element of the symmetry group as a permutation of four �symbols� � the diagonals. It happens that <span class="cmti-12">each </span>of the 24 permutations of the diagonals is created by exactly one symmetry of the 8 vertices of the cube. So this subgroup of <!--l. 473--><span class="math" >{S}_{8}</span> is �the same as� <!--l. 473--><span class="math" >{S}_{4}</span>. In SAGE, </p> {{{id=35| cube.is_isomorphic(SymmetricGroup(4)) /// }}} <!--l. 479--><p class="indent" > will test to see if the group of symmetries of the cube are �the same as� <!--l. 479--><span class="math" >{S}_{4}</span> and so will return <span class="cmtt-12">True</span>. </p><!--l. 481--><p class="indent" > Here is an another way to create the symmetries of a cube. Number the six <span class="cmti-12">faces </span>of the cube as follows: 1 on top, 2 on the bottom, 3 in front, 4 on the right, 5 in back, 6 on the left. Now the same rotations as before (quarter-turns about axes through the centers of two opposite faces) can be used as generators of the symmetry group, </p> {{{id=36| cubeface = PermutationGroup(["(1,3,2,5)","(1,4,2,6)","(3,4,5,6)"]) cubeface.list() /// }}} <!--l. 488--><p class="indent" > Again, this subgroup of <!--l. 488--><span class="math" >{S}_{6}</span> is �same as� the full symmetric group, <!--l. 488--><span class="math" >{S}_{4}</span>, </p> {{{id=37| cubeface.is_isomorphic(SymmetricGroup(4)) /// }}} <!--l. 494--><p class="indent" > It turns out that in each of the above constructions, it is sufficient to use just two of the three generators (any two). But one generator is not enough. Give it a try, and use SAGE to convince yourself that a generator can be sacrificed in each case. </p> <h3 class="likesectionHead"><a id="x1-33000"></a>Normal Subgroups</h3> <!--l. 498--><p class="noindent" > </p> <h5 class="likesubsubsectionHead"><a id="x1-34000"></a>Checking Normality</h5> <!--l. 499--><p class="noindent" >The code below (1) begins with the alternating group, <!--l. 499--><span class="math" >{A}_{4}</span>, (2) specifies three elements of the group (the three symmetries of the tetrahedron that are 180 degree rotations about axes through midpoints of opposite edges), (3) uses these three elements to generate a subgroup, and finally (4) illustrates the command for testing if the subgroup <span class="cmtt-12">H</span> is a normal subgroup of the group <span class="cmtt-12">A4</span>. </p> {{{id=38| A4=AlternatingGroup(4) r1=A4("(1,2)(3,4)") r2=A4("(1,3)(2,4)") r3=A4("(1,4)(2,3)") H=A4.subgroup([r1,r2,r3]) H.is_normal(A4) /// }}} <!--l. 511--><p class="noindent" > </p> <h5 class="likesubsubsectionHead"><a id="x1-35000"></a>Quotient Group</h5> <!--l. 512--><p class="noindent" >Extending the previous example, we can create the quotient (factor) group of <!--l. 512--><span class="math" >{A}_{4}</span> by <!--l. 512--><span class="math" >H</span>. </p> {{{id=39| A4.quotient_group(H) /// }}} <!--l. 518--><p class="indent" > will return a permutation group generated by <span class="cmtt-12">(1,2,3)</span>. As expected this is a group of order 3. Notice that we do not get back a group of the actual cosets, but instead we get a group <span class="cmti-12">isomorphic </span>to the factor group. </p> <h5 class="likesubsubsectionHead"><a id="x1-36000"></a>Simple Groups</h5> <!--l. 522--><p class="noindent" >It is easy to check to see if a group is void of any normal subgroups. </p> {{{id=40| print AlternatingGroup(5).is_simple() print AlternatingGroup(4).is_simple() /// }}} <!--l. 529--><p class="indent" > will print <span class="cmtt-12">True</span> and then <span class="cmtt-12">False</span>. </p> <h5 class="likesubsubsectionHead"><a id="x1-37000"></a>Composition Series</h5> <!--l. 534--><p class="noindent" >For any group, it is easy to obtain a composition series. There is an element of randomness in the algorithm, so you may not always get the same results. (But the list of factor groups is unique, according to the Jordan-H�lder theorem.) Also, the subgroups generated sometimes have more generators than necessary, so you might want to �study� each subgroup carefully by checking properties like its order. An interesting example is: </p> {{{id=41| DihedralGroup(105).composition_series() /// }}} <!--l. 542--><p class="indent" > The output will be a list of 5 subgroups of <!--l. 542--><span class="math" >{D}_{105}</span>, each a normal subgroup of its predecessor. </p><!--l. 544--><p class="indent" > Several other series are possible, such as the derived series. Use tab-completion to see the possibilities. </p> <h3 class="likesectionHead"><a id="x1-38000"></a>Conjugacy</h3> <!--l. 549--><p class="noindent" >Given a group <!--l. 549--><span class="math" >G</span>, we can define a relation <!--l. 549--><span class="math" > ∼</span> on <!--l. 549--><span class="math" >G</span> by: for <!--l. 549--><span class="math" >a,\kern 1.95872pt b ∈ G</span>, <!--l. 549--><span class="math" >a ∼ b</span> if and only if there exists an element <!--l. 549--><span class="math" >g ∈ G</span> such that <!--l. 549--><span class="math" >ga{g}^{−1} = b</span>. </p><!--l. 551--><p class="indent" > Since this is an equivalence relation, there is an associated partition of the elements of <!--l. 551--><span class="math" >G</span> into equivalence classes. For this very important relation, the classes are known as �conjugacy classes.� A representative of each of these equivalence classes can be found as follows. Suppose <span class="cmtt-12">G</span> is a permutation group, then <span class="cmtt-12">G.conjugacy</span><span class="cmtt-12">_classes</span><span class="cmtt-12">_representatives()</span> will return a list of elements of <!--l. 551--><span class="math" >G</span>, one per conjugacy class. </p><!--l. 553--><p class="indent" > Given an element <!--l. 553--><span class="math" >g ∈ G</span>, the �centralizer� of <!--l. 553--><span class="math" >g</span> is the set <!--l. 553--><span class="math" >C(g) = \{h ∈ G\mathrel{∣}hg{h}^{−1} = g\}</span>, which is a subgroup of <!--l. 553--><span class="math" >G</span>. A theorem tells us that the size of each conjugagcy class is the order of the group divided by the order of the centralizer of an element of the class. With the following code we can determine the size of the conjugacy classes of the full symmetric group on 5 symbols, </p> {{{id=42| G = SymmetricGroup(5) group_order = G.order() reps = G.conjugacy_classes_representatives() class_sizes = [] for g in reps: class_sizes.append( group_order/G.centralizer(g).order() ) print class_sizes /// }}} <!--l. 565--><p class="indent" > This should produce the list <span class="cmtt-12">[1, 10, 15, 20, 20, 30, 24]</span> which you can check sums to 120, the order of the group. You might be able to produce this list by counting elements of the group <!--l. 565--><span class="math" >{S}_{5}</span> with identical cycle structure (which will require a few simple combinatorial arguments). </p> <h3 class="likesectionHead"><a id="x1-39000"></a>Sylow Subgroups</h3> <!--l. 570--><p class="noindent" >Sylow�s Theorems assert the existence of certain subgroups. For example, if <!--l. 570--><span class="math" >p</span> is a prime, and <!--l. 570--><span class="math" >{p}^{r}</span> divides the order of a group <!--l. 570--><span class="math" >G</span>, then <!--l. 570--><span class="math" >G</span> must have a subgroup of order <!--l. 570--><span class="math" >{p}^{r}</span>. Such a subgroup could be found among the output of the <span class="cmtt-12">conjugacy</span><span class="cmtt-12">_classes</span><span class="cmtt-12">_subgroups()</span> command by checking the orders of the subgroups produced. The <span class="cmtt-12">map()</span> command is a quick way to do this. The symmetric group on 8 symbols, <!--l. 570--><span class="math" >{S}_{8}</span>, has order <!--l. 570--><span class="math" >8! = 40, 320</span> and is divisible by <!--l. 570--><span class="math" >{2}^{7} = 128</span>. Let�s find one example of a subgroup of permutations on <!--l. 570--><span class="math" >8</span> symbols with order <!--l. 570--><span class="math" >128</span>. The next command takes a few minutes to run, so go get a cup of coffee after you set it in motion. </p> {{{id=43| G = SymmetricGroup(8) subgroups = G.conjugacy_classes_subgroups() map( order, subgroups ) /// }}} <!--l. 578--><p class="indent" > The <span class="cmtt-12">map(order, subgroups)</span> command will apply the <span class="cmtt-12">order()</span> method to each of the subgroups in the list <span class="cmtt-12">subgroups</span>. The output is thus a large list of the orders of many subgroups (296 to be precise). if you count carefully, you will see that 259<!--l. 578--><span class="math" >{}^{th}</span> subgroup has order 128. You can retrieve this group for further study by referencing it as <span class="cmtt-12">subgroups[258]</span> (remember that counting starts at zero). </p><!--l. 580--><p class="indent" > If <!--l. 580--><span class="math" >{p}^{r}</span> is the highest power of <!--l. 580--><span class="math" >p</span> to divide the order of <!--l. 580--><span class="math" >G</span>, then a subgroup of order <!--l. 580--><span class="math" >{p}^{r}</span> is known as a �Sylow <!--l. 580--><span class="math" >p</span>-subgroup.� Sylow�s Theorems also say any two Sylow <!--l. 580--><span class="math" >p</span>-subgroups are conjugate, so the output of <span class="cmtt-12">conjugacy</span><span class="cmtt-12">_classes</span><span class="cmtt-12">_subgroups()</span> should only contain each Sylow <!--l. 580--><span class="math" >p</span>-subgroup once. But there is an easier way, <span class="cmtt-12">sylow</span><span class="cmtt-12">_subgroup(p)</span> will return one. Notice that the argument of the command is just the prime <!--l. 580--><span class="math" >p</span>, not the full power <!--l. 580--><span class="math" >{p}^{r}</span>. Failure to use a prime will generate an informative error message. </p> <h3 class="likesectionHead"><a id="x1-40000"></a>Groups of Small Order as Permutation Groups</h3> <!--l. 586--><p class="noindent" >We list here constructions, as permutation groups, for all of the groups of order less than <!--l. 586--><span class="math" >16</span>.<br class="newline" /><!--tex4ht:inline--></p><div class="tabular"> <table id="TBL-1" class="tabular" cellspacing="0" cellpadding="0" rules="groups" ><colgroup id="TBL-1-1g"><col id="TBL-1-1" /></colgroup><colgroup id="TBL-1-2g"><col id="TBL-1-2" /></colgroup><colgroup id="TBL-1-3g"><col id="TBL-1-3" /></colgroup><tr style="vertical-align:baseline;" id="TBL-1-1-"><td style="text-align:left; white-space:nowrap;" id="TBL-1-1-1" class="td11">Size</td><td style="text-align:left;" id="TBL-1-1-2" class="td11"><!--l. 589--><p class="noindent" >Construction </p></td><td style="text-align:left;" id="TBL-1-1-3" class="td11"><!--l. 589--><p class="noindent" >Notes </p></td></tr><tr class="hline"><td><hr /></td><td><hr /></td><td><hr /></td></tr><tr class="hline"><td><hr /></td><td><hr /></td><td><hr /></td></tr><tr style="vertical-align:baseline;" id="TBL-1-2-"><td style="text-align:left; white-space:nowrap;" id="TBL-1-2-1" class="td11">1 </td><td style="text-align:left;" id="TBL-1-2-2" class="td11"><!--l. 590--><p class="noindent" ><span class="cmtt-12">SymmetricGroup(1)</span> </p> </td><td style="text-align:left;" id="TBL-1-2-3" class="td11"><!--l. 590--><p class="noindent" >Trivial</p></td> </tr><tr class="hline"><td><hr /></td><td><hr /></td><td><hr /></td></tr><tr class="hline"><td><hr /></td><td><hr /></td><td><hr /></td></tr><tr style="vertical-align:baseline;" id="TBL-1-3-"><td style="text-align:left; white-space:nowrap;" id="TBL-1-3-1" class="td11">2 </td><td style="text-align:left;" id="TBL-1-3-2" class="td11"><!--l. 591--><p class="noindent" ><span class="cmtt-12">SymmetricGroup(2)</span> </p></td><td style="text-align:left;" id="TBL-1-3-3" class="td11"><!--l. 591--><p class="noindent" >Also <span class="cmtt-12">CyclicPermutationGroup(2)</span> </p></td> </tr><tr class="hline"><td><hr /></td><td><hr /></td><td><hr /></td></tr><tr class="hline"><td><hr /></td><td><hr /></td><td><hr /></td></tr><tr style="vertical-align:baseline;" id="TBL-1-4-"><td style="text-align:left; white-space:nowrap;" id="TBL-1-4-1" class="td11">3 </td><td style="text-align:left;" id="TBL-1-4-2" class="td11"><!--l. 592--><p class="noindent" ><span class="cmtt-12">CyclicPermutationGroup(3)</span> </p></td><td style="text-align:left;" id="TBL-1-4-3" class="td11"><!--l. 592--><p class="noindent" >Prime order </p></td> </tr><tr class="hline"><td><hr /></td><td><hr /></td><td><hr /></td></tr><tr class="hline"><td><hr /></td><td><hr /></td><td><hr /></td></tr><tr style="vertical-align:baseline;" id="TBL-1-5-"><td style="text-align:left; white-space:nowrap;" id="TBL-1-5-1" class="td11">4 </td><td style="text-align:left;" id="TBL-1-5-2" class="td11"><!--l. 593--><p class="noindent" ><span class="cmtt-12">CyclicPermutationGroup(4)</span> </p></td><td style="text-align:left;" id="TBL-1-5-3" class="td11"><!--l. 593--><p class="noindent" >Cyclic </p></td> </tr><tr class="hline"><td><hr /></td><td><hr /></td><td><hr /></td></tr><tr style="vertical-align:baseline;" id="TBL-1-6-"><td style="text-align:left; white-space:nowrap;" id="TBL-1-6-1" class="td11">4 </td><td style="text-align:left;" id="TBL-1-6-2" class="td11"><!--l. 594--><p class="noindent" ><span class="cmtt-12">KleinFourGroup()</span> </p></td><td style="text-align:left;" id="TBL-1-6-3" class="td11"><!--l. 594--><p class="noindent" >Abelian, non-cyclic </p></td> </tr><tr class="hline"><td><hr /></td><td><hr /></td><td><hr /></td></tr><tr class="hline"><td><hr /></td><td><hr /></td><td><hr /></td></tr><tr style="vertical-align:baseline;" id="TBL-1-7-"><td style="text-align:left; white-space:nowrap;" id="TBL-1-7-1" class="td11">5 </td><td style="text-align:left;" id="TBL-1-7-2" class="td11"><!--l. 595--><p class="noindent" ><span class="cmtt-12">CyclicPermutationGroup(5)</span> </p></td><td style="text-align:left;" id="TBL-1-7-3" class="td11"><!--l. 595--><p class="noindent" >Prime order </p></td> </tr><tr class="hline"><td><hr /></td><td><hr /></td><td><hr /></td></tr><tr class="hline"><td><hr /></td><td><hr /></td><td><hr /></td></tr><tr style="vertical-align:baseline;" id="TBL-1-8-"><td style="text-align:left; white-space:nowrap;" id="TBL-1-8-1" class="td11">6 </td><td style="text-align:left;" id="TBL-1-8-2" class="td11"><!--l. 596--><p class="noindent" ><span class="cmtt-12">CyclicPermutationGroup(6)</span> </p></td><td style="text-align:left;" id="TBL-1-8-3" class="td11"><!--l. 596--><p class="noindent" >Cyclic </p></td> </tr><tr class="hline"><td><hr /></td><td><hr /></td><td><hr /></td></tr><tr style="vertical-align:baseline;" id="TBL-1-9-"><td style="text-align:left; white-space:nowrap;" id="TBL-1-9-1" class="td11">6 </td><td style="text-align:left;" id="TBL-1-9-2" class="td11"><!--l. 597--><p class="noindent" ><span class="cmtt-12">SymmetricGroup(3)</span> </p></td><td style="text-align:left;" id="TBL-1-9-3" class="td11"><!--l. 597--><p class="noindent" >Non-abelian, also <span class="cmtt-12">DihedralGroup(3)</span> </p></td> </tr><tr class="hline"><td><hr /></td><td><hr /></td><td><hr /></td></tr><tr class="hline"><td><hr /></td><td><hr /></td><td><hr /></td></tr><tr style="vertical-align:baseline;" id="TBL-1-10-"><td style="text-align:left; white-space:nowrap;" id="TBL-1-10-1" class="td11">7 </td><td style="text-align:left;" id="TBL-1-10-2" class="td11"><!--l. 598--><p class="noindent" ><span class="cmtt-12">CyclicPermutationGroup(7)</span> </p></td><td style="text-align:left;" id="TBL-1-10-3" class="td11"><!--l. 598--><p class="noindent" >Prime order </p></td> </tr><tr class="hline"><td><hr /></td><td><hr /></td><td><hr /></td></tr><tr class="hline"><td><hr /></td><td><hr /></td><td><hr /></td></tr><tr style="vertical-align:baseline;" id="TBL-1-11-"><td style="text-align:left; white-space:nowrap;" id="TBL-1-11-1" class="td11">8 </td><td style="text-align:left;" id="TBL-1-11-2" class="td11"><!--l. 599--><p class="noindent" ><span class="cmtt-12">CyclicPermutationGroup(8)</span> </p></td><td style="text-align:left;" id="TBL-1-11-3" class="td11"><!--l. 599--><p class="noindent" >Cyclic </p></td> </tr><tr class="hline"><td><hr /></td><td><hr /></td><td><hr /></td></tr><tr style="vertical-align:baseline;" id="TBL-1-12-"><td style="text-align:left; white-space:nowrap;" id="TBL-1-12-1" class="td11">8 </td><td style="text-align:left;" id="TBL-1-12-2" class="td11"><!--l. 600--><p class="noindent" ><span class="cmtt-12">D1=CyclicPermutationGroup(4)</span><br class="newline" /><span class="cmtt-12">D2=CyclicPermutationGroup(2)</span><br class="newline" /><span class="cmtt-12">G=direct</span><span class="cmtt-12">_product</span><span class="cmtt-12">_permgroups([D1,D2])</span> </p></td><td style="text-align:left;" id="TBL-1-12-3" class="td11"><!--l. 602--><p class="noindent" >Abelian, non-cyclic </p></td> </tr><tr class="hline"><td><hr /></td><td><hr /></td><td><hr /></td></tr><tr style="vertical-align:baseline;" id="TBL-1-13-"><td style="text-align:left; white-space:nowrap;" id="TBL-1-13-1" class="td11">8 </td><td style="text-align:left;" id="TBL-1-13-2" class="td11"><!--l. 603--><p class="noindent" ><span class="cmtt-12">D1=CyclicPermutationGroup(2)</span><br class="newline" /><span class="cmtt-12">D2=CyclicPermutationGroup(2)</span><br class="newline" /><span class="cmtt-12">D3=CyclicPermutationGroup(2)</span><br class="newline" /><span class="cmtt-12">G=direct</span><span class="cmtt-12">_product</span><span class="cmtt-12">_permgroups([D1,D2,D3])</span> </p></td><td style="text-align:left;" id="TBL-1-13-3" class="td11"><!--l. 606--><p class="noindent" >Abelian, non-cyclic </p></td> </tr><tr class="hline"><td><hr /></td><td><hr /></td><td><hr /></td></tr><tr style="vertical-align:baseline;" id="TBL-1-14-"><td style="text-align:left; white-space:nowrap;" id="TBL-1-14-1" class="td11">8 </td><td style="text-align:left;" id="TBL-1-14-2" class="td11"><!--l. 607--><p class="noindent" ><span class="cmtt-12">DihedralGroup(4)</span> </p></td><td style="text-align:left;" id="TBL-1-14-3" class="td11"><!--l. 607--><p class="noindent" >Non-abelian </p></td> </tr><tr class="hline"><td><hr /></td><td><hr /></td><td><hr /></td></tr><tr style="vertical-align:baseline;" id="TBL-1-15-"><td style="text-align:left; white-space:nowrap;" id="TBL-1-15-1" class="td11">8 </td><td style="text-align:left;" id="TBL-1-15-2" class="td11"><!--l. 608--><p class="noindent" ><span class="cmtt-12">PermutationGroup(["(1,2,5,6)(3,4,7,8)",</span><br class="newline" /><span class="cmtt-12">� "(1,3,5,7)(2,8,6,4)" ])</span> </p></td><td style="text-align:left;" id="TBL-1-15-3" class="td11"><!--l. 609--><p class="noindent" >Quaternions<br class="newline" />The two generators are <!--l. 609--><span class="math" >I</span> and <!--l. 609--><span class="math" >J</span></p></td> </tr><tr class="hline"><td><hr /></td><td><hr /></td><td><hr /></td></tr><tr class="hline"><td><hr /></td><td><hr /></td><td><hr /></td></tr><tr style="vertical-align:baseline;" id="TBL-1-16-"><td style="text-align:left; white-space:nowrap;" id="TBL-1-16-1" class="td11">9 </td><td style="text-align:left;" id="TBL-1-16-2" class="td11"><!--l. 610--><p class="noindent" ><span class="cmtt-12">CyclicPermutationGroup(9)</span> </p></td><td style="text-align:left;" id="TBL-1-16-3" class="td11"><!--l. 610--><p class="noindent" >Cyclic </p></td> </tr><tr class="hline"><td><hr /></td><td><hr /></td><td><hr /></td></tr><tr style="vertical-align:baseline;" id="TBL-1-17-"><td style="text-align:left; white-space:nowrap;" id="TBL-1-17-1" class="td11">9 </td><td style="text-align:left;" id="TBL-1-17-2" class="td11"><!--l. 611--><p class="noindent" ><span class="cmtt-12">D1=CyclicPermutationGroup(3)</span><br class="newline" /><span class="cmtt-12">D2=CyclicPermutationGroup(3)</span><br class="newline" /><span class="cmtt-12">G=direct</span><span class="cmtt-12">_product</span><span class="cmtt-12">_permgroups([D1,D2])</span> </p></td><td style="text-align:left;" id="TBL-1-17-3" class="td11"><!--l. 613--><p class="noindent" >Abelian, non-cyclic </p></td> </tr><tr class="hline"><td><hr /></td><td><hr /></td><td><hr /></td></tr><tr class="hline"><td><hr /></td><td><hr /></td><td><hr /></td></tr><tr style="vertical-align:baseline;" id="TBL-1-18-"><td style="text-align:left; white-space:nowrap;" id="TBL-1-18-1" class="td11">10 </td><td style="text-align:left;" id="TBL-1-18-2" class="td11"><!--l. 614--><p class="noindent" ><span class="cmtt-12">CyclicPermutationGroup(10)</span> </p></td><td style="text-align:left;" id="TBL-1-18-3" class="td11"><!--l. 614--><p class="noindent" >Cyclic </p></td> </tr><tr class="hline"><td><hr /></td><td><hr /></td><td><hr /></td></tr><tr style="vertical-align:baseline;" id="TBL-1-19-"><td style="text-align:left; white-space:nowrap;" id="TBL-1-19-1" class="td11">10 </td><td style="text-align:left;" id="TBL-1-19-2" class="td11"><!--l. 615--><p class="noindent" ><span class="cmtt-12">DihedralGroup(5)</span> </p></td><td style="text-align:left;" id="TBL-1-19-3" class="td11"><!--l. 615--><p class="noindent" >Non-abelian </p></td> </tr><tr class="hline"><td><hr /></td><td><hr /></td><td><hr /></td></tr><tr class="hline"><td><hr /></td><td><hr /></td><td><hr /></td></tr><tr style="vertical-align:baseline;" id="TBL-1-20-"><td style="text-align:left; white-space:nowrap;" id="TBL-1-20-1" class="td11">11 </td><td style="text-align:left;" id="TBL-1-20-2" class="td11"><!--l. 616--><p class="noindent" ><span class="cmtt-12">CyclicPermutationGroup(11)</span> </p></td><td style="text-align:left;" id="TBL-1-20-3" class="td11"><!--l. 616--><p class="noindent" >Prime order </p></td> </tr><tr class="hline"><td><hr /></td><td><hr /></td><td><hr /></td></tr><tr class="hline"><td><hr /></td><td><hr /></td><td><hr /></td></tr><tr style="vertical-align:baseline;" id="TBL-1-21-"><td style="text-align:left; white-space:nowrap;" id="TBL-1-21-1" class="td11">12 </td><td style="text-align:left;" id="TBL-1-21-2" class="td11"><!--l. 617--><p class="noindent" ><span class="cmtt-12">CyclicPermutationGroup(12)</span> </p></td><td style="text-align:left;" id="TBL-1-21-3" class="td11"><!--l. 617--><p class="noindent" >Cyclic </p></td> </tr><tr class="hline"><td><hr /></td><td><hr /></td><td><hr /></td></tr><tr style="vertical-align:baseline;" id="TBL-1-22-"><td style="text-align:left; white-space:nowrap;" id="TBL-1-22-1" class="td11">12 </td><td style="text-align:left;" id="TBL-1-22-2" class="td11"><!--l. 618--><p class="noindent" ><span class="cmtt-12">D1=CyclicPermutationGroup(6)</span><br class="newline" /><span class="cmtt-12">D2=CyclicPermutationGroup(2)</span><br class="newline" /><span class="cmtt-12">G=direct</span><span class="cmtt-12">_product</span><span class="cmtt-12">_permgroups([D1,D2])</span> </p></td><td style="text-align:left;" id="TBL-1-22-3" class="td11"><!--l. 620--><p class="noindent" >Abelian, non-cyclic </p></td> </tr><tr class="hline"><td><hr /></td><td><hr /></td><td><hr /></td></tr><tr style="vertical-align:baseline;" id="TBL-1-23-"><td style="text-align:left; white-space:nowrap;" id="TBL-1-23-1" class="td11">12 </td><td style="text-align:left;" id="TBL-1-23-2" class="td11"><!--l. 621--><p class="noindent" ><span class="cmtt-12">DihedralGroup(6)</span> </p></td><td style="text-align:left;" id="TBL-1-23-3" class="td11"><!--l. 621--><p class="noindent" >Non-abelian </p></td> </tr><tr class="hline"><td><hr /></td><td><hr /></td><td><hr /></td></tr><tr style="vertical-align:baseline;" id="TBL-1-24-"><td style="text-align:left; white-space:nowrap;" id="TBL-1-24-1" class="td11">12 </td><td style="text-align:left;" id="TBL-1-24-2" class="td11"><!--l. 622--><p class="noindent" ><span class="cmtt-12">AlternatingGroup(4)</span> </p></td><td style="text-align:left;" id="TBL-1-24-3" class="td11"><!--l. 622--><p class="noindent" >Non-abelian, symmetries of tetrahedron</p></td> </tr><tr class="hline"><td><hr /></td><td><hr /></td><td><hr /></td></tr><tr style="vertical-align:baseline;" id="TBL-1-25-"><td style="text-align:left; white-space:nowrap;" id="TBL-1-25-1" class="td11">12 </td><td style="text-align:left;" id="TBL-1-25-2" class="td11"><!--l. 623--><p class="noindent" ><span class="cmtt-12">PermutationGroup(["(1,2,3)(4,6)(5,7)",</span><br class="newline" /><span class="cmtt-12">� "(1,2)(4,5,6,7)"])</span> </p></td><td style="text-align:left;" id="TBL-1-25-3" class="td11"><!--l. 624--><p class="noindent" >Non-abelian<br class="newline" />Semi-direct product <!--l. 624--><span class="math" >{Z}_{3} ⋊ {Z}_{4}</span></p></td> </tr><tr class="hline"><td><hr /></td><td><hr /></td><td><hr /></td></tr><tr class="hline"><td><hr /></td><td><hr /></td><td><hr /></td></tr><tr style="vertical-align:baseline;" id="TBL-1-26-"><td style="text-align:left; white-space:nowrap;" id="TBL-1-26-1" class="td11">13 </td><td style="text-align:left;" id="TBL-1-26-2" class="td11"><!--l. 625--><p class="noindent" ><span class="cmtt-12">CyclicPermutationGroup(13)</span> </p></td><td style="text-align:left;" id="TBL-1-26-3" class="td11"><!--l. 625--><p class="noindent" >Prime order </p></td> </tr><tr class="hline"><td><hr /></td><td><hr /></td><td><hr /></td></tr><tr class="hline"><td><hr /></td><td><hr /></td><td><hr /></td></tr><tr style="vertical-align:baseline;" id="TBL-1-27-"><td style="text-align:left; white-space:nowrap;" id="TBL-1-27-1" class="td11">14 </td><td style="text-align:left;" id="TBL-1-27-2" class="td11"><!--l. 626--><p class="noindent" ><span class="cmtt-12">CyclicPermutationGroup(14)</span> </p></td><td style="text-align:left;" id="TBL-1-27-3" class="td11"><!--l. 626--><p class="noindent" >Cyclic </p></td> </tr><tr class="hline"><td><hr /></td><td><hr /></td><td><hr /></td></tr><tr style="vertical-align:baseline;" id="TBL-1-28-"><td style="text-align:left; white-space:nowrap;" id="TBL-1-28-1" class="td11">14 </td><td style="text-align:left;" id="TBL-1-28-2" class="td11"><!--l. 627--><p class="noindent" ><span class="cmtt-12">DihedralGroup(7)</span> </p></td><td style="text-align:left;" id="TBL-1-28-3" class="td11"><!--l. 627--><p class="noindent" >Non-abelian </p></td> </tr><tr class="hline"><td><hr /></td><td><hr /></td><td><hr /></td></tr><tr class="hline"><td><hr /></td><td><hr /></td><td><hr /></td></tr><tr style="vertical-align:baseline;" id="TBL-1-29-"><td style="text-align:left; white-space:nowrap;" id="TBL-1-29-1" class="td11">15 </td><td style="text-align:left;" id="TBL-1-29-2" class="td11"><!--l. 628--><p class="noindent" ><span class="cmtt-12">CyclicPermutationGroup(15)</span> </p></td><td style="text-align:left;" id="TBL-1-29-3" class="td11"><!--l. 628--><p class="noindent" >Cyclic </p></td> </tr><tr class="hline"><td><hr /></td><td><hr /></td><td><hr /></td></tr><tr class="hline"><td><hr /></td><td><hr /></td><td><hr /></td></tr><tr style="vertical-align:baseline;" id="TBL-1-30-"><td style="text-align:left; white-space:nowrap;" id="TBL-1-30-1" class="td11"> </td></tr></table></div> <h3 class="likesectionHead"><a id="x1-41000"></a>Acknowledgements</h3> <!--l. 634--><p class="noindent" >The construction of SAGE is the work of many people, and the group theory portion is made possible by the extensive work of the creators of GAP. However, we will single out three people from the SAGE team to thank for major contributions toward bringing you the group theory portion of SAGE: David Joyner, William Stein, and Robert Bradshaw. Thanks! </p> {{{id=89| /// }}}