ASKSAGE: Sage Q&A Forum - RSS feedhttps://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Fri, 25 Jan 2019 20:03:29 +0100Binary relationshttps://ask.sagemath.org/question/45079/binary-relations/Are finite binary relations as subsets of Cartesian product implemented in Sage? I am interested in taking set-theoretic operations, finding composition and inverse, checking properties such as reflexivity and antisymmetry. I found a report [here](https://trac.sagemath.org/ticket/24542), but I am not sure if it made its way into version 8.5. If so, is there documentation and examples? By doing `search_src("binaryrelation")` I also found functions `IsBinaryRelation`, `IsReflexiveBinaryRelation`, etc. in `libs/gap/gap_functions.py`, but I am not sure how to use them.
Thu, 17 Jan 2019 13:24:56 +0100https://ask.sagemath.org/question/45079/binary-relations/Answer by slelievre for <p>Are finite binary relations as subsets of Cartesian product implemented in Sage? I am interested in taking set-theoretic operations, finding composition and inverse, checking properties such as reflexivity and antisymmetry. I found a report <a href="https://trac.sagemath.org/ticket/24542">here</a>, but I am not sure if it made its way into version 8.5. If so, is there documentation and examples? By doing <code>search_src("binaryrelation")</code> I also found functions <code>IsBinaryRelation</code>, <code>IsReflexiveBinaryRelation</code>, etc. in <code>libs/gap/gap_functions.py</code>, but I am not sure how to use them.</p>
https://ask.sagemath.org/question/45079/binary-relations/?answer=45117#post-id-45117As you found, implementing binary relations as subsets of the Cartesian product
is the object of
- [Sage Trac ticket 24542: Binary relations in Sage](https://trac.sagemath.org/ticket/24542)
The ticket is currently marked as "needs review", which means the author
is waiting for other developers to check that this can go into Sage. Once
another developer has checked it, it can be given "positive review", and
then make its way into the next version of Sage.
If you are interested in the work done in the ticket and want to try it
on your computer, you can install `git-trac-command`, then open a terminal
and change to the directory where Sage is installed, then run
`git trac checkout 24542`, then run `make`.
See the [developer manual](http://doc.sagemath.org/html/en/developer/) for more detail.Mon, 21 Jan 2019 10:12:38 +0100https://ask.sagemath.org/question/45079/binary-relations/?answer=45117#post-id-45117Comment by EvgenyM for <p>As you found, implementing binary relations as subsets of the Cartesian product
is the object of</p>
<ul>
<li><a href="https://trac.sagemath.org/ticket/24542">Sage Trac ticket 24542: Binary relations in Sage</a></li>
</ul>
<p>The ticket is currently marked as "needs review", which means the author
is waiting for other developers to check that this can go into Sage. Once
another developer has checked it, it can be given "positive review", and
then make its way into the next version of Sage.</p>
<p>If you are interested in the work done in the ticket and want to try it
on your computer, you can install <code>git-trac-command</code>, then open a terminal
and change to the directory where Sage is installed, then run
<code>git trac checkout 24542</code>, then run <code>make</code>.</p>
<p>See the <a href="http://doc.sagemath.org/html/en/developer/">developer manual</a> for more detail.</p>
https://ask.sagemath.org/question/45079/binary-relations/?comment=45182#post-id-45182I accepted your answer to this question, but I cannot believe something studied in every first year Discrete Math course is not a part of Sage.Fri, 25 Jan 2019 20:03:29 +0100https://ask.sagemath.org/question/45079/binary-relations/?comment=45182#post-id-45182