Ask Your Question
4

Binary relations

asked 2019-01-17 13:24:56 +0200

EvgenyM gravatar image

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, 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.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
2

answered 2019-01-21 10:12:38 +0200

slelievre gravatar image

updated 2019-01-21 10:13:28 +0200

As you found, implementing binary relations as subsets of the Cartesian product is the object of

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 for more detail.

edit flag offensive delete link more

Comments

I 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.

EvgenyM gravatar imageEvgenyM ( 2019-01-25 20:03:29 +0200 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2019-01-17 13:24:56 +0200

Seen: 547 times

Last updated: Jan 21 '19