Multiple Expanding Aarex Array Notation is an fifth part of Aarex's Array Notation.
Separators is the object between the entries. Let define row of Ax as separators and define the separator:
- , is the 4th-ranking separator.
- {n} is the 3rd-ranking separator.
- {a A1 b A2 c A3 ...} is the 2nd-ranking separator.
- ;;;... is the 1st-ranking separator.
- To go higher, we need {} after the separators above.
There are finite layers of the separators, so we need to define the separator layer too:
- a() array entries are the separator layer 0.
- Separators on the array A in the are the separator layer, 1 more than A.
- Semi-colon on the separator layer A, is separator layer A+1.
Now here is the definition.
The multiple expanding array notation look like this:
a(a,b,c A1 d A2 e...)x[y]
The integers a, b, c, etc.; are the entries, the Ax group are the separators where is between the entries, and the outermost "a" (like this can be place outside of the array entries) meaning this expression can be Aarex's Array Notation.
The first entry and second entry of AAN are called base and iterator.
The string x[y] is optional and can be removable. x and y means nester and multiplier. Outermost a and x are always be 'a' character and 'x' character.
Note: The comma symbol ',' is shorthand for {0}, else empty is the shorthand {0} if there is multiple semicolons.
All rules are works like epAAN except the process, which have a difference between epAAN and mepAAN.
If neither of 5 rules applied, start the process shown below. First, start from the third entry.
- Case A: If the entry is 0, move on to the next entry.
- English: Else, find the third non-zero entry.
- Case B: If the entry is not 0:
- Case B1: If there is the comma in the left:
- Decrease the entry by 1.
- Change the previous entry to the iterator.
- This process ends.
- Case B2: If there is ;;;... with n semicolons (= A;) in the left:
- Let A; will be at layer t = u.
- Repeat this:
- Let At will be a separator where A; is.
- If At > Au, then break the repeating.
- If u is 0, then break the repeating.
- Decrease u by 1.
- Let define P and Q that is Au = 'P 0 A; n Q'
- Replace Au with Bm, where m is a iterator.
- B1 = 'P 0 A; n-1 Q'
- Bm = 'P 0 A{Bm-1} 1 A; n-1 Q'
- This process ends.
- Case B3: If there is the A{x #} in the left:
- Decrease the entry by 1.
- Define S0 and Sn as '1' and '0 A{x-1 #} Sn-1'
- Replace the previous entry with Sb.
- This process ends.
- Case B4: If there is the {} in the left and case B3 did not applied:
- Decrease the entry by 1.
- Copy the separator to R.
- Replace the entry before the separator with '0 R 1'.
- Continue the process within R separator, beside the process with a(x,y,z).
To compare, we need 2 functions as lv(A) and lv(B) and start at case 1. Set the comma into {0}.
- Case 1: Find the amounts of semicolons before the {} and call it A' and B'.
- If A' < B', then lv(A) < lv(B) and finish.
- If A' > B', then lv(A) > lv(B) and finish.
- If A' = B', then go into case 2.
- Case 2: If A and B were all numbers, then use this case; else go to Case 3.
- If A < B, then lv(A) < lv(B) and finish.
- If A > B, then lv(A) > lv(B) and finish.
- If A = B, then lv(A) = lv(B) and finish.
- Case 3: Find the highest separator possible and call it H. Then find the amounts of H and call it A' and B'.
- If A' < B', then lv(A) < lv(B) and finish.
- If A' > B', then lv(A) > lv(B) and finish.
- If A' = B', then go into case 4.
- Case 4: Find the array preceded by the first H separator and call it A' and B'.
- If lv({A'}) < lv({B'}), then lv(A) < lv(B) and finish.
- If lv({A'}) > lv({B'}), then lv(A) > lv(B) and finish.
- If lv({A'}) = lv({B'}), then remove A' and B' and the first H separator that isn't removed, then:
- If the separator was {}, then lv(A) = lv(B) and finish.
- Else, repeat case 4.