Гипер-Е нотация

(БУДЕТ ДОПОЛНЕНО)

Три правила:

* **Правило 1.** Если нет решёток:
\(E[b]x = b^x\).
* **Правило 2.** Если последнее число = 1:
\(E[b]{a\_1}\#{a\_2}\#{a\_3}\cdots\#{a\_n}\#1 = E[b]{a\_1}\#{a\_2}\#{a\_3}\cdots\#{a\_n}\).
* **Правило 3.** Общий случай:
\(E[b]{a\_1}\#{a\_2}\#{a\_3}\cdots\#{a\_{n-2}}\#{a\_{n-1}}\#{a\_n} =\)
\(= E[b]{a\_1}\#{a\_2}\#{a\_3}\cdots\#{a\_{n-2}}\#(E[b]{a\_1}\#{a\_2}\#{a\_3}\cdots\#{a\_{n-2}}\#{a\_{n-1}}\#{(a\_n-1)})\)

Простым языком:

1. Если в выражении только 1 число, выражение равно \(b^x\)
2. Если последнее число равно 1, то его можно убрать.
3. Иначе...
	1. Возьмите выражение и вычтите 1 от последнего числа. Назовём это выражение *z*.
	2. Убираем два последних числа в выражении.
	3. Добавьте *z* в конце выражения.

## Расширение

Расширенная Гипер-Е нотация работает с 1 и больше решёткой между числами. Число решёток следующее за \(a\_x\) отображается, как *h*(*n*). For the sake of this definition, Шаблон:^ is a shorthand for *n* successive hyperion marks. For example, a full expression would be written E(*b*)Шаблон:AsqШаблон:HmШаблон:AsqШаблон:Hm...Шаблон:HmШаблон:AsqШаблон:Hm. Saibian uses @ to indicate rest of expression such as Bowers uses # to indicate the rest of the array.

The difference between original and extended notation is that extended Hyper-E notation allows more than one consecutive #'s.

* **Rule 1.** If there are no hyperions:
\(E(b)x = b^x\).
* **Rule 2.** If the last entry is 1:
\(E(b) @ \#^{h(n-1)}{a\_n}\#^{h(n)}1 = E(b) @ \#^{h(n-1)}{a\_n}\).
* **Rule 3.** If \(h(n-1)>1\):
\(E(b) @ \#^{h(n-2)}{a\_{n-1}}\#^{h(n-1)}{a\_n} = E(b) @ \#^{h(n-2)}{a\_{n-1}}\#^{h(n-1)-1}{a\_{n-1}}\#^{h(n-1)}{a\_n-1}\).
* **Rule 4.** Otherwise:
\(E(b) @ \#^{h(n-2)}{a\_{n-1}}\#{a\_n} = E(b) @ \#^{h(n-2)}(E(b) @ \#^{h(n-2)}{a\_{n-1}}\#{a\_n-1})\) (note \(\#^1\) = \(\#\)).

It seems similar to linear array notation rules. We can also rewrite it in plain English:

1. If there is only one argument *x*, the value of the expression is Шаблон:^.
2. If the last entry is 1, it may be removed.
3. Let *h* be the length of the last set of hyperion marks. If *h* > 1:
	1. Remove the last entry of the expression and call it *r*.
	2. Again remove the last entry of the expression; this time call it *z*.
	3. Repeat *z* *r* times with *h* - 1 hyperion marks in between each repetition. Append this to the end of the expression. (Restore a removed hyperion mark sequence to glue the two expressions together.)
4. If the last set of hyperion marks is of length one:
	1. Evaluate the original expression, but with the last entry decreased by 1. Call this value *z*.
	2. Remove the last two entries of the expression.
	3. Add *z* as an entry to the end of the expression. (Again, restore a removed hyperion mark sequence to glue the two expressions together.)

## Examples

* E(10)6 = E6 = E6#1 = Шаблон:^ = million
* E(10)100 = E100 = E100#1 = Шаблон:^ = googol
This is an example of rule 1 with a one-entry expressions. Since the base defaults to 10, we can abbreviate E(10)100 as E100.
* E100#2 = E(E100#1) = EШаблон:^ = Шаблон:^ = googolplex
* E100#3 = E(E100#2) = E1010100 = Шаблон:^ = googolduplex
This is an example of rule 3 (rule 4 in the expansion) with a two-entry expressions. In the second expression, the parentheses can be omitted: E(E100#1) = EE100#1.
* E303#1 = E303 = eceton = centillion = 10303
* E303#2 = ecetonplex = EE303 = 1010303
* E303#3 = EEE303 = 101010303 = ecetonduplex
* E1#3 = EEE1 = 1010101 = trialogue
* E1#4 = EEEE1 = 10101010 = tetralogue
* E1#10 = EEEEEEEEEE1 = 10^^10 = Decker
* E303#6 = EEEEEE303 = 101010101010303 = ecetonquintiplex
* E1#100 = EEE...EEE1 (100 E's) = giggol
Repeated application of rule 3: E1#100 = EE1#99 = EEE1#98 = ...
* E100#100 = EEE...EEE100 (100 E's) = grangol
This is the same as E1#100, but with a different first entry.
* E100#101 = EEE...EEE100 (101 E's) = grangolplex
E100#101 = EE100#100 = Шаблон:^, hence the name.
* E100#100#2 = E100#(E100#100) = EEE...EEE100 (grangol E's) = grangoldex
Now we enter three-entry expressions.
* E100#100#3 = E100#(E100#100#2) = E100#(E100#(E100#100)) = EEE...EEE100 (grangoldex E's) = grangoldudex
Increasing the value of the third entry makes nesting deeper and deeper.
* E100#100#100#100 = E100#100#(E100#100#100#99) = E100#100#(E100#100#(E100#100#100#98)) = ... gigangol
Four-entry expressions are similar — they create deeper and deeper nesting in the array level below them. This can also be written as E100##4; the beginning of the next level of the notation.
* E100##100 = E100#100#100#...#100#100#100 with 100 repetitions of 100 = gugold
Now we have arrived at Extended Hyper-E Notation. Two successive hyperion marks (*deutero-hyperions*) indicate repetition at the lower level.
* E100##100#100 = graatagold
This expression decomposes into E*a*##*b* expressions by applying rule 4 repeatedly.
* E100##100##100 = E100##100#100#...#100#100 with 100 repetitions of 100 = gugolthra
We ignore the first ## until the second one has been expanded and all the 100s have been solved.
* E100###100 = E100##100##...##100##100 with 100 repetitions of 100 = throogol
Three hyperion marks (*trito-hyperions*) constitute a repetition of two hyperion marks. Remember, the double marks are solved from right to left.
* E100####100 = E100###100###...###100###100 with 100 repetitions of 100 = teroogol
Quadruple hyperions decompose into triples.
* Godgahlah = E100#####...#####100 with 100 hyperion marks or E100#100100
Sets of 100 hyperion marks decompose into 99s, 99s decompose into 98s, etc. Also note that the superscript 100 means that there are 100 #'s, and should not be confused with E100#(100100).

## Relationship to Other Notations

The first levels of Hyper-E notation are based on Exponentiation. That is, E(n) equals 10^n. Later on, the more E added, the greater the power tower until you start seeing hyperion marks. Different levels of singular hyperion marks can indicate different notations. For example, Hyper-E can relate to Arrow notation through the following rule: For any number defined as E(n)#(n)#(n)#(n)...#(n) with an X amount of n's, the corresponding figure in arrow notation is N ^^^...^^^ N+1 with an X amount of up arrows.

## Pseudocode

For a fixed number of variables, the original Hyper-E Notation is primitive-recursive, although the values it produces are well beyond that of any computer. The extended Hyper-E Notation is nonprimitive-recursive for two variables or more.

```
**function** E*b*(Шаблон:Asq, Шаблон:Asq, ..., Шаблон:Asq, Шаблон:Asq):

    **if** *n* = 1:
        **return** Шаблон:^

    **if** Шаблон:Asq = 1:
        **return** E*b*(Шаблон:Asq, Шаблон:Asq, ..., Шаблон:Asq)

    *z* := E*b*(Шаблон:Asq, Шаблон:Asq, ..., Шаблон:Asq, Шаблон:Asq - 1)

    **return** E*b*(Шаблон:Asq, Шаблон:Asq, ..., Шаблон:Asq, *z*)

**function** xE*b*(Шаблон:Asq, Шаблон:Asq, ..., Шаблон:Asq, Шаблон:Asq;
             Шаблон:Asq, Шаблон:Asq, ..., Шаблон:Asq, Шаблон:Asq):

    **if** *n* = 1:
        **return** Шаблон:^

    **if** Шаблон:Asq = 1:
        **return** xE*b*(Шаблон:Asq, Шаблон:Asq, ..., Шаблон:Asq;
                   Шаблон:Asq, Шаблон:Asq, ..., Шаблон:Asq)

    **if** Шаблон:Asq > 1:
        *r* := Шаблон:Asq
        *z* := Шаблон:Asq
        *zseq* := *z*, *z*, ..., *z*, *z* (*r* times)
        *h* := Шаблон:Asq
        *hseq* := *h*, *h*, ..., *h*, *h* (*r* - 1 times)
        **return** xE*b*(Шаблон:Asq, Шаблон:Asq, ..., Шаблон:Asq, *zseq*;
                   Шаблон:Asq, Шаблон:Asq, ..., Шаблон:Asq, *hseq*)

    *z* := xE*b*(Шаблон:Asq, Шаблон:Asq, ..., Шаблон:Asq - 1;
             Шаблон:Asq, Шаблон:Asq, ..., Шаблон:Asq, Шаблон:Asq)
    **return** xE*b*(Шаблон:Asq, Шаблон:Asq, ..., Шаблон:Asq, *z*;
               Шаблон:Asq, Шаблон:Asq, ..., Шаблон:Asq)=

```