Here is my layout of the rules for the algebra we developed:   [a, b, …, c] - > a bag, an unordered set of items. (a, b, …, c) -> a list, an ordered set of items. The relation (the kind of relationship) used is provided as an attribute to the list.   A set with zero or one items is a bag, [] or [a]. The lists () and (a) are undefined.   Binary relationships between items, e.g., z->a, z->b, …, z->c, are specified by ([z], (a, b, …, c)) or ([z], [a, b, …, c]), where in the first case, the order of each of the items related to z is important. The syntax (i.e., the use of list notation rather than bag notation) for relationships is due to the need of specifying the “parent” and “child” in each relationship. The parent is listed first.   The shorthand ([z, y, …, w], [a, b, …,c]) means z->a, z->b, …, z->c, y->a, y->b, …, y->c, …, w->a, w->b, …, w->c, with an ordering determined if either bag is given as a list. If the first bag is a list, the order is based on parent with children unordered. If the second bag is a list, the order is based on child, with parents unordered. If both are lists, the ordering is by parent first. With this syntax, the same relation is used for every relationship.     Lists can be concatenated as follows: [a, b] = [a] | [b], [a, b, c] = [a] | [b, c] = [a, b] | [c] (a, b) = [a] || [b], (a, b, c) = [a] || (b, c) =  (a, b) || [c]   I don’t know if these are needed, but I thought they should be added.