Set Theory: Relations
This script is an attempt to give users examples of relations in set theory. A relation is randomly generated initially and users have the option of making the relation symmetric, reflexive, transitive, antisymmetric, or a function (via the dropdown list box). Then the buttons allow you to test to see if the relation you've "created" fits into any of the major categories of relations. The ones I have here are Function, Equivalence Relation, Partial Order Set, and Total Order Set. Here are some definitions to help you get started:
Properties of Relations:
A relation R is symmetric if whenever an element (a, b) belongs to R, then so does (b, a).
A relation R is reflexive if for every element a in the universe of the relation, the element (a, a) belongs to R.
A relation R is transitive if for every pair of elements (a, b) and (c, d) and b = c, then the element (a, d) belongs to R.
A relation R is anti-symmetric if the elements (a, b) and (b, a) do not belong to the relation whenever a is not equal to b.
Types of Relations:
A relation R is a function (on its set of defined elements) if there do not exist elements (a, b) and (a, c) which both belong to R.
A relation R is an equivalence relation if R is symmetric, reflexive and transitive.
A relation R is a partial order set if R is anti-symmetric, reflexive and transitive.
A relation R is a total order set if it is a partial order set and for every pair of elements a and b, either (a, b) is in R or (b, a) is in R.