## FANDOM

10,843 Pages

Improved Egg Notation

This is a notational and functional upgrade of my previous blog [1]

Note: A change in the encoding renders strings from this version and the previous incompatible.

Concepts
Eggs
A pair of grouping symbols
Egg whites separation between egg groups inside eggs, represented by a comma ,
Egg colors
Red = ()
Blue = []
Green = {}
Egg groups
Contiguous Eggs
Syntax Rules
There may be no red egg to the left of a non-red egg. Example: ()[] is invalid
The above rule also applies to eggs inside other eggs
There is at least one red egg
A Blue Egg may contain Red Eggs or Green Eggs, but not both.
Green Eggs must be inside a Blue Egg or a Green Egg
When there are only Red Eggs, the notation has ended
Symbol glossary
R(n) = n copies of ()
B(X) = [X]
G(X) = {X}
$A^n(Y) = A...A(Y) \ for \ n \ A's$
Lower case letters = non-negative integers
X,Y = Valid egg combinations.
Z = Valid egg combinations, but Z's are always independent of other Z's, for example, when copied, Z's produce independent outputs for each copy.
Rules

1.- $B()R(a) \ \rightarrow \ R(a+1)$

Description: Empty Blue Eggs are replaced with one Red Egg

2.- $B(R(a+1))R(b) \ \rightarrow \ B^b(R(a))R(b)$

Description: Blue Eggs with one or more Red Egg inside are replaced with an amount of Blue Eggs equal to the Red Eggs to the right of the cracked egg, the new Blue Eggs have the same contents as the cracked egg, except for 1 less Red Egg.
Note: $B(X) \ \rightarrow\ R(n)$, thus R(n) also implies possible B(X) of equal value, for example, this is the reason the rules for things like B(a)B(b) and B(B(R(a)))R(b) are implicit

$P(X) = G(Z,X)$

3.- $B(P^n(G(,R(a))))R(b) \ \rightarrow \ B(P^n(,R(a+1)))R(b)$

4.- $B(P^n(G(X,R(a+1))))R(b) \ \rightarrow \ B^b(P^n(G(X,R(a))))R(b)$

5.- $B(P^n(G(X,)))R(b) \ \rightarrow \ B(P^n(Q(G(X,)),b))R(b)$

$Q(X,b) \begin{cases} X = G(,R(a)) \ \rightarrow \ R(a+1)\\ X = G(R(a+1),) \ \rightarrow \ G(R(a),b)\\ X = G(Y,) \ \rightarrow \ Q(Y,b) \end{cases}$

$G(Y,0) = G(Y,)$

$G(Y,n+1) = G(Y,(G,n))$