Sophie

Sophie

distrib > Fedora > 15 > i386 > by-pkgid > 7ebd25ac536d248d499a3ce2acda963a > files > 5886

Macaulay2-1.3.1-8.fc15.i686.rpm

<?xml version="1.0" encoding="utf-8" ?>  <!-- for emacs: -*- coding: utf-8 -*- -->
<!-- Apache may like this line in the file .htaccess: AddCharset utf-8 .html -->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1 plus MathML 2.0 plus SVG 1.1//EN"	 "http://www.w3.org/2002/04/xhtml-math-svg/xhtml-math-svg-flat.dtd" >
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head><title>poset -- creating a poset</title>
<link rel="stylesheet" type="text/css" href="../../../../Macaulay2/Style/doc.css"/>
</head>
<body>
<table class="buttons">
  <tr>
    <td><div><a href="_poset__Join.html">next</a> | <a href="___Poset.html">previous</a> | <a href="_poset__Join.html">forward</a> | <a href="___Poset.html">backward</a> | up | <a href="index.html">top</a> | <a href="master.html">index</a> | <a href="toc.html">toc</a> | <a href="http://www.math.uiuc.edu/Macaulay2/">Macaulay2 web site</a></div>

    </td>
  </tr>
</table>
<hr/>
<div><h1>poset -- creating a poset</h1>
<div class="single"><h2>Synopsis</h2>
<ul><li><div class="list"><dl class="element"><dt class="heading">Usage: </dt><dd class="value"><div><tt>P = poset (G,R)</tt><br/><tt>P = poset (G,R,M)</tt></div>
</dd></dl>
</div>
</li>
<li><div class="single">Inputs:<ul><li><span><tt>G</tt>, <span>a <a href="../../Macaulay2Doc/html/___List.html">list</a></span>, elements in the ground set of P</span></li>
<li><span><tt>R</tt>, <span>a <a href="../../Macaulay2Doc/html/___List.html">list</a></span>, sequences (a,b) which indicate that a is less than or equal to b</span></li>
<li><span><tt>M</tt>, <span>a <a href="../../Macaulay2Doc/html/___Matrix.html">matrix</a></span>, with entries ij equal to one when the jth element in G is less than or equal to the ith element in G</span></li>
</ul>
</div>
</li>
<li><div class="single">Outputs:<ul><li><span><tt>P</tt>, <span>an object of class <a href="___Poset.html" title="a class for partially ordered sets (posets)">Poset</a></span>, a poset consisting of the elements in G, with the order relations determined by R and or M</span></li>
</ul>
</div>
</li>
</ul>
</div>
<div class="single"><h2>Description</h2>
<div><div>This function allows one to create a poset by defining the set and giving the order relations between the elements in the set.</div>
<table class="examples"><tr><td><pre>i1 : G = {a,b,c,d};</pre>
</td></tr>
<tr><td><pre>i2 : R = {(a,b), (a,c), (c,d)};</pre>
</td></tr>
<tr><td><pre>i3 : P = poset (G,R)

o3 = Poset{cache => CacheTable                  }
           GroundSet => {a, b, c, d}
           RelationMatrix => | 1 1 1 1 |
                             | 0 1 0 0 |
                             | 0 0 1 1 |
                             | 0 0 0 1 |
           Relations => {(a, b), (a, c), (c, d)}

o3 : Poset</pre>
</td></tr>
</table>
<div>Sometimes in finding "enough" relations one inadverdently finds all of the relations in the poset.  In this case, the user can bypass having the function poset calculate the transitive closure of the relations by entering the matrix encoding the relations in when calling the poset function.</div>
<table class="examples"><tr><td><pre>i4 : S = QQ[x,y,z];</pre>
</td></tr>
<tr><td><pre>i5 : G = {x^2, x*y, z^2, x^2*y*z, x*y*z^3, x^2*y^2*z^3};</pre>
</td></tr>
<tr><td><pre>i6 : R = select((flatten apply (G, g-> apply (G, h-> if h % g == 0 then (g,h)))), i -> i =!= null) -- finds all pairs where g divides h

        2   2     2   2        2   2 2 3                      2           
o6 = {(x , x ), (x , x y*z), (x , x y z ), (x*y, x*y), (x*y, x y*z), (x*y,
     ------------------------------------------------------------------------
          3          2 2 3     2   2     2       3     2   2 2 3     2    
     x*y*z ), (x*y, x y z ), (z , z ), (z , x*y*z ), (z , x y z ), (x y*z,
     ------------------------------------------------------------------------
      2        2      2 2 3         3       3         3   2 2 3     2 2 3 
     x y*z), (x y*z, x y z ), (x*y*z , x*y*z ), (x*y*z , x y z ), (x y z ,
     ------------------------------------------------------------------------
      2 2 3
     x y z )}

o6 : List</pre>
</td></tr>
<tr><td><pre>i7 : M = matrix apply (G, g-> apply (G, h-> if h % g == 0 then 1 else 0))

o7 = | 1 0 0 1 0 1 |
     | 0 1 0 1 1 1 |
     | 0 0 1 0 1 1 |
     | 0 0 0 1 0 1 |
     | 0 0 0 0 1 1 |
     | 0 0 0 0 0 1 |

              6        6
o7 : Matrix ZZ  &lt;--- ZZ</pre>
</td></tr>
<tr><td><pre>i8 : P = poset(G,R,M)

o8 = Poset{cache => CacheTable                                                                                                                                                                                                                    }
                          2        2   2          3   2 2 3
           GroundSet => {x , x*y, z , x y*z, x*y*z , x y z }
           RelationMatrix => | 1 0 0 1 0 1 |
                             | 0 1 0 1 1 1 |
                             | 0 0 1 0 1 1 |
                             | 0 0 0 1 0 1 |
                             | 0 0 0 0 1 1 |
                             | 0 0 0 0 0 1 |
                           2   2     2   2        2   2 2 3                      2                 3          2 2 3     2   2     2       3     2   2 2 3     2      2        2      2 2 3         3       3         3   2 2 3     2 2 3   2 2 3
           Relations => {(x , x ), (x , x y*z), (x , x y z ), (x*y, x*y), (x*y, x y*z), (x*y, x*y*z ), (x*y, x y z ), (z , z ), (z , x*y*z ), (z , x y z ), (x y*z, x y*z), (x y*z, x y z ), (x*y*z , x*y*z ), (x*y*z , x y z ), (x y z , x y z )}

o8 : Poset</pre>
</td></tr>
</table>
</div>
</div>
<div class="single"><h2>See also</h2>
<ul><li><span><a href="___Poset.html" title="a class for partially ordered sets (posets)">Poset</a> -- a class for partially ordered sets (posets)</span></li>
<li><span><a href="___Ground__Set.html" title="underlying set of a poset">GroundSet</a> -- underlying set of a poset</span></li>
<li><span><a href="___Relations.html" title="a set of relations in the poset that generates all other relations">Relations</a> -- a set of relations in the poset that generates all other relations</span></li>
<li><span><a href="___Relation__Matrix.html" title="the matrix expressing all of the relations between elements in a Poset">RelationMatrix</a> -- the matrix expressing all of the relations between elements in a Poset</span></li>
</ul>
</div>
<div class="waystouse"><h2>Ways to use <tt>poset</tt> :</h2>
<ul><li>poset(List,List)</li>
<li>poset(List,List,Matrix)</li>
</ul>
</div>
</div>
</body>
</html>