ALT is based on three core algebraic (bag) operations called union
& and negation
The union of two values may contain duplicates and maintains order. The union of two values that are not compatible is allowed. Here are the basic rewrite rules for union:
The intersection of two values that are not compatible always results in
none. The intersection between two
structs is a special case and is discussed in a separate section.
Here are the basic rewrite rules for intersection:
ALT also allows the negation of values. This feature has many interesting properties (but has been proven very hard to implement correctly for regular expressions). Here are the basic rewrite rules for negation: