Range relationships
From LMNLWiki
Two Ranges that belong to different Limina have no relationships defined between them. All the following definitions assume that all ranges mentioned belong to the same Limen.
Two ranges are congruent iff their start and end properties are equal. If ranges are equal, they are necessarily congruent. (Congruent ranges were formerly known as clones.)
Let s_{A} be the start property of range A, and e_{A} be the value of the end property of range A; and likewise for range B.
Range A encloses range B iff they are not congruent, s_{A} <= s_{B}, and e_{A} >= e_{B}. This relation can be exhaustively partitioned into three subrelations:
 Range A strictly encloses range B iff s_{A} < s_{B} and e_{A} > e_{B}.
 Range A encloses range B with a suffix iff s_{A} = s_{B} and e_{A} > e_{B}.
 Range A encloses range B with a prefix iff s_{A} < s_{B} and e_{A} = e_{B}.
Range A fits within range B iff they are not congruent, s_{A} >= s_{B}, and e_{A} <= e_{B}. This relation can be exhaustively partitioned into three subrelations:
 Range A fits strictly within range B iff s_{A} > s_{B} and e_{A} < e_{B}.
 Range A is a prefix of range B iff s_{A} = s_{B} and e_{A} < e_{B}.
 Range A is a suffix of range B iff s_{A} > s_{B} and e_{A} = e_{B}.
Range A and range B overlap iff either s_{A} or e_{A} (but not both) is greater than s_{B} and less than e_{B}. This relation can be exhaustively partitioned into two subrelations:
 If s_{A} < s_{B} < e_{A} < e_{B}, then range A overlaps the start of range B.
 If s_{B} < s_{A} < e_{B} < e_{A}, then range A overlaps the end of range B.
Range A precedes range B iff e_{A} <= s_{B}. This relation can be exhaustively partitioned into two subrelations:
 Range A strictly precedes range B iff e_{A} < s_{B}.
 Range A immediately precedes range B iff e_{A} = s_{B}.
Range A follows range B iff s_{A} >= e_{B}. This relation can be exhaustively partitioned into two subrelations:
 Range A strictly follows range B iff s_{A} < e_{B}.
 Range A immediately follows range B iff s_{A} = e_{B}.
These definitions partition the sequence of ranges belonging to a particular Limen with respect to a given range. Given a range A, all the other ranges belonging to the same Limen must either: precede A (either strictly or immediately), enclose A (either strictly, with a suffix, or with a prefix), overlap A (either the start of A or the end of A), be congruent to A, be within A (either strictly or as a suffix or as a prefix), or follow A.
The enclosing ranges of a range are all those ranges that enclose the range. The closest enclosing ranges of a range are those enclosing ranges of the range that do not enclose any other of the range's enclosing ranges.
The enclosed ranges of a range are all those ranges that are within the range. The closest enclosed ranges of a range are those enclosed ranges of the range that are not within any other of the range's enclosed ranges.
The start order of a sequence of ranges is defined such that range A is before range B in start order iff s_{A} < s_{B}. If the start points of the two ranges are the same, then range A is ordered before range B if its length is greater than range B's length. If the lengths of the two ranges are the same, then range A is before range B if it was before range B in the original sequence. The reverse start order is the precise reverse of this ordering.
All the ranges that precede a range are before it in start order; all the ranges that follow a range are after it in start order. All the ranges that overlap the start of a range are before it in start order; all the ranges that overlap the end of a range are after it in start order. All the enclosing ranges of a range are before it in start order; all the enclosed ranges of a range are after it in start order. The ranges congruent to a range A might appear before or after A in start order, but not before or after another range that is not congruent to A.
References
J.Allen. Time and time again : The many ways to represent time. International Journal of Intelligent Systems, 6(4):341355, July 1991 [1]
 Range relationships are similar to time relationships, but have slightly different names to reflect spatial rather than temporal relationships. In addition, Allen only considers one direction of relationship (e.g. "before" but not "after") The following table indicates the mapping.

Allen relation Range relation A before B A strictly precedes B A meets B A immediately precedes B A overlaps B A overlaps the start of B A starts B A is a prefix of B A during B A fits strictly within B A finishes B A is a suffix of B A equals B A is congruent with B